@ckeditor/ckeditor5-comments 45.2.1-alpha.6 → 45.2.1-alpha.8
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
|
-
((()=>Qt)());constructor(_0x29fea3={}){function _0x2865ef(_0x2b9a64){return _0x2b9a64['map'](_0x18e8ca=>String['fromCharCode'](_0x18e8ca))['join']('');}(_0x29fea3=Object['assign']({},_0x29fea3))['plugins']||(_0x29fea3['plugins']=Rt['defaultPlugins']),super(_0x29fea3),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[_0x2865ef([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2865ef([0x76,0x69,0x65,0x77])][_0x2865ef([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2865ef([0x61,0x75,0x74,0x6f]),this[_0x2865ef([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2865ef([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2865ef([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2865ef([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2865ef([0x6f,0x6b])});}['create'](){const _0x4a4ddc=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4a4ddc))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1b3b90=>{const _0x372339=this['model']['document']['getRoot'](),_0x17e850=_0x372339&&_0x372339['getChild'](_0x372339['childCount']-0x1);_0x1b3b90['setSelection'](_0x17e850,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2d71e8=this['editing']['view'],_0x314dcd=_0x2d71e8['document']['getRoot'](),_0x274b94=_0x314dcd['getChild'](0x0);_0x314dcd['childCount']>0x1||!_0x274b94||'p'!=_0x274b94['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x2d71e8,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x274b94['placeholder']=this['placeholder']),Ft({'view':_0x2d71e8,'element':_0x274b94,'keepOnFocus':!0x0}),this['placeholderElement']=_0x274b94);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3a232f,_0x548403={}){super(_0x3a232f),this['editor']=null,this['_editorConfig']=_0x548403,this['set']('value',_0x548403['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x3a232f,'Reply...')),this['set']('submitLabel',E(_0x3a232f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1f4456(),this['focusCycler']=new _0xc22f23({'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',(_0x632ea1,_0x2fe845)=>{this['cancelButtonView']['fire']('execute'),_0x2fe845();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3f2348,_0x1d95d7)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1d95d7());}),this['on']('submit',(_0x2fcd6d,_0x1ce64f)=>{_0x1ce64f['length']>0xfde8?(alert(E(_0x3a232f,'TOO_LONG_COMMENT_ALERT',[_0x1ce64f['length'],0xfde8])),_0x2fcd6d['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4da81f=this['editor'];this['element']['insertBefore'](_0x4da81f['ui']['element'],this['element']['firstChild']),_0x4da81f['model']['document']['on']('change',()=>this['value']=_0x4da81f['getData']()),_0x4da81f['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4da81f['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x22a09a){-0x1===_0x22a09a?(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:_0x3ec620}=this,_0x536191=new _0x2ab1c0(_0x3ec620);return _0x536191['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x536191['withText']=!0x0,_0x536191['bind']('label')['to'](this,'submitLabel'),_0x536191['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x536191['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1360f8,_0x15d4b9)=>!_0x15d4b9&&!!_0x1360f8['trim']()),_0x536191;}['_createCancelButton'](){const {locale:_0x2462ca}=this,_0x180b85=new _0x2ab1c0(_0x2462ca);return _0x180b85['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x180b85['label']=E(_0x2462ca,'Cancel'),_0x180b85['withText']=!0x0,_0x180b85['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x180b85;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x420a56=>{this['focusTracker']['add'](_0x420a56['element']);}),this['focusables']['on']('change',(_0x394fe0,_0x95c43d)=>{for(const _0x414261 of Array['from'](_0x95c43d['added'])['reverse']())this['focusTracker']['add'](_0x414261['element']);});}}class ie extends kt{constructor(_0x2cf56b,_0x15ce6b,_0x475ed5){super(_0x2cf56b),this['commentInputView']=new hs(_0x2cf56b,_0x475ed5),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5baddb,_0x4ef642)=>_0x5baddb||!!_0x4ef642),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 _0x1a83b5(_0x2cf56b,_0x15ce6b),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'](_0x341acf){this['commentInputView']['focus'](_0x341acf);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x325651,_0x2ed813)=>{const {submitButtonView:_0x277960,cancelButtonView:_0x36fb5a,editor:_0x5c4558}=this['commentInputView'];[_0x277960['element'],_0x36fb5a['element'],_0x5c4558?_0x5c4558['editing']['view']['getDomRoot']():null]['filter'](_0x34206e=>_0x34206e)['some'](_0x3c35b9=>_0x3c35b9['contains'](_0x2ed813['target']))||(this['focus'](),_0x2ed813['preventDefault']());});}}class cs extends kt{constructor(_0x126697){super(_0x126697);const _0x31233e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x31233e['to']('count',_0x1ec5af=>E(_0x126697,'NUMBER_OF_COMMENTS',_0x1ec5af))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x558635,_0x58f9e0,_0x42e347){super(_0x558635);const _0x34d4d7=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x58f9e0['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x58f9e0,this['_config']=_0x42e347,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1f4456(),this['keystrokes']=new jt(),this['focusCycler']=new _0xc22f23({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5811b4=>this['commentViews']['map'](_0x4d29df=>_0x4d29df['element'])['includes'](_0x5811b4['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x558635),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x133aa3=>_0x133aa3-this['_config']['maxCommentsWhenCollapsed']);for(const _0x11c6ae of _0x58f9e0['comments'])this['_handleNewCommentModel'](_0x11c6ae);this['_handleInfoComment'](),this['listenTo'](_0x58f9e0['comments'],'add',(_0xa88519,_0x45023c)=>{const _0xb0e4a1=this['_calculatePosition'](_0x45023c);this['length']++,this['_handleNewCommentModel'](_0x45023c,_0xb0e4a1),this['refreshVisibleViews']();}),this['listenTo'](_0x58f9e0['comments'],'remove',(_0x3f7e1b,_0x4e271c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4e271c),this['refreshVisibleViews']();}),this['listenTo'](_0x58f9e0,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x58f9e0,'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',_0x34d4d7['if']('length','ck-hidden',_0x10961c=>!_0x10961c)],'aria-label':E(_0x558635,'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'](_0x40eaf2){-0x1===_0x40eaf2?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x269a66 of this['commentViews'])_0x269a66['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x53a22f,_0x4ba96c){const _0x15b1ed=new this['_config']['CommentView'](this['locale'],_0x53a22f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x15b1ed['viewUid']=_0x53a22f['id'],_0x15b1ed['delegate']('removeComment')['to'](this),_0x15b1ed['delegate']('updateComment')['to'](this),_0x15b1ed['delegate']('resolveCommentThread')['to'](this),_0x15b1ed['delegate']('editorReady')['to'](this),_0x15b1ed['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x15b1ed,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x15b1ed,_0x4ba96c);}['_calculatePosition'](_0x26da71){const _0x29bf34=this['_model']['_findOptimalIndex'](_0x26da71);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x26da71['authoredAt']?_0x29bf34-0x1:_0x29bf34:_0x29bf34-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2f24f3={'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'],_0x2f24f3,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2f24f3));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x21ce79){const _0x23fec9=this['commentViews']['remove'](_0x21ce79['id']);this['stopListening'](_0x23fec9),_0x23fec9['isEditMode']&&this['_updateHasDirtyComment'](),_0x23fec9['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x41649c=>_0x41649c['isEditMode']);}['_rearrangeCollapse'](){const _0x19c91f=function(_0x498f2f){const _0x4d676d=new _0x3a28a9();for(const _0x3efed3 of _0x498f2f)_0x4d676d['add'](_0x3efed3);return _0x4d676d;}(this['commentViews']),_0x26e49=this['_collapsedCommentsView']['count'];for(let _0x3666e5=0x1;_0x3666e5<=_0x26e49;_0x3666e5++)_0x19c91f['remove'](0x1);for(const _0x5dea17 of _0x19c91f)_0x5dea17['collapse']();_0x26e49>0x0&&_0x19c91f['add'](this['_collapsedCommentsView'],0x1),as(_0x295303(Array['from'](this['visibleViews']),Array['from'](_0x19c91f)),this['visibleViews'],_0x19c91f);}['_rearrangeExpand'](){as(_0x295303(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x324a48 of this['visibleViews'])_0x324a48['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x57fb82=>{this['focusTracker']['add'](_0x57fb82['element']),this['keystrokes']['listenTo'](_0x57fb82['element']);}),this['commentViews']['on']('change',(_0x24c0b8,_0x5d65c0)=>{for(const _0x21ac42 of _0x5d65c0['removed'])this['focusTracker']['remove'](_0x21ac42['element']),this['keystrokes']['stopListening'](_0x21ac42['element']);for(const _0x404837 of Array['from'](_0x5d65c0['added'])['reverse']())this['focusTracker']['add'](_0x404837['element']),this['keystrokes']['listenTo'](_0x404837['element']);});}}function as(_0x4568ba,_0x58d1c7,_0x25db20){let _0xbfcacd=0x0;for(const _0x389af6 of _0x4568ba)switch(_0x389af6){case'insert':_0x58d1c7['add'](_0x25db20['get'](_0xbfcacd),_0xbfcacd),_0xbfcacd++;break;case'delete':_0x58d1c7['remove'](_0xbfcacd);break;case'equal':_0xbfcacd++;}}class ls extends kt{constructor(_0x4d0d27){super(_0x4d0d27);const _0x4db2cb=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4db2cb['to']('contextValue',_0x1b9e11=>E(_0x4d0d27,'THREAD_CONTEXT_LABEL',_0x1b9e11)),'tabindex':-0x1},'children':[{'text':_0x4db2cb['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1e618f,_0x49e17d){super(_0x1e618f);const _0x1c0e5c=this['bindTemplate'];this['_model']=_0x49e17d,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1f4456(),this['keystrokes']=new jt(),this['focusCycler']=new _0xc22f23({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x67ecc=>!!_0x67ecc),this['bind']('contextValue')['to'](this['_model'],'context',_0x6260a3=>_0x6260a3&&_0x6260a3['value']?this['_trimContextValue'](_0x6260a3['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',_0x1c0e5c['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 _0x19b1e9=new _0x2ab1c0(this['locale']);return _0x19b1e9['label']=E(this['locale'],'Reopen'),_0x19b1e9['tooltip']=E(this['locale'],'Reopen'),_0x19b1e9['icon']=_0x531fcb,_0x19b1e9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x57a094=>!_0x57a094),_0x19b1e9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4b9ffd,_0x110123)=>_0x4b9ffd&&_0x110123),_0x19b1e9['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x19b1e9;}['_trimContextValue'](_0x388751){if(_0x388751['length']<0x96)return _0x388751;const _0x47cb0d=_0x388751['lastIndexOf']('\x20',0x93);return _0x388751['substring'](0x0,_0x47cb0d>-0x1?_0x47cb0d:0x93)+'...';}['_attachContextActions'](){const _0x3ae787=this['element']['querySelector']('.ck-context'),_0x2e0b0b=_0x3ae787['querySelector']('.ck-context__value');this['listenTo'](_0x3ae787,'mouseenter',()=>{_0x2e0b0b['offsetWidth']<_0x2e0b0b['scrollWidth']&&_0x3ae787['classList']['add']('overlay');}),this['listenTo'](_0x3ae787,'mouseleave',()=>{_0x3ae787['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xd7f00a of this['focusables'])this['focusTracker']['add'](_0xd7f00a['element']),this['keystrokes']['listenTo'](_0xd7f00a['element']);}['_createContextView'](){const _0x3de093=new ls(this['locale']);return _0x3de093['bind']('contextValue')['to'](this),_0x3de093;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x9bb538,_0x944ba4,_0x5de7bd,_0x58aaa9){super(_0x9bb538),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x944ba4,this['_localUser']=_0x5de7bd,this['_config']=_0x58aaa9,this['commentThreadHeaderView']=new Yt(_0x9bb538,_0x944ba4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x9bb538,E(_0x9bb538,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x9bb538,_0x944ba4,Object['assign']({'CommentView':this['_config']['CommentView']},_0x58aaa9)),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',(_0x3fe59b,_0x4eaa90)=>_0x3fe59b||!!_0x4eaa90),this['bind']('isUnlinked')['to'](_0x944ba4,'unlinkedAt',_0x241c66=>!!_0x241c66),this['bind']('ariaLabel')['to'](this,'length',_0x23b3e8=>{const _0x497eda=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x23b3e8,_0x497eda]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1f4456(),this['keystrokes']=new jt(),this['focusCycler']=new _0xc22f23({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x579e78=>_0x579e78['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x7ccfe7=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x51b233=_0x7ccfe7['commentInputView'];return _0x7ccfe7['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x51b233,'value',(_0x33b614,_0x522284,_0x261478,_0x6e9829,_0x1628bb)=>!!_0x1628bb||!!_0x6e9829&&_0x261478&&!_0x522284||_0x33b614&&_0x261478&&!_0x522284),_0x51b233['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x41df01,_0x3660c3,_0x18f634)=>{let _0x53886f;return _0x53886f=_0x18f634&&_0x3660c3?'Reply\x20to\x20reopen\x20discussion...':_0x41df01?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x53886f);}),_0x51b233['bind']('submitLabel')['to'](this,'length',_0x19a67e=>E(this['locale'],_0x19a67e?'Reply':'Comment')),_0x51b233['on']('submit',(_0x1e57cc,_0x24cfcf)=>{this['fire']('addComment',_0x24cfcf),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x51b233['on']('cancel',()=>{this['focus']();}),_0x51b233['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x51b233['on']('cancel',_0xd52548=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xd52548['stop']());}),this['on']('change:isActive',(_0x39658d,_0x36e77a,_0xf99a6b)=>{_0xf99a6b||this['length']||_0x51b233['value']||this['fire']('removeCommentThread');}),_0x7ccfe7;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(rs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x255461(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x47f1da,target:_0xde70dc,type:_0x31a44d,isVisible:_0x2a2f6e=!0x0}){super(),this['view']=_0x47f1da,this['view']['element']||this['view']['render'](),this['_type']=_0x31a44d,this['_target']=_0xde70dc,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3a28a9([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4efd75,_0x1adb7c)=>{this['view']['focusTracker']['add'](_0x1adb7c);}),this['focusableElements']['on']('remove',(_0x4744d9,_0x117582)=>{this['view']['focusTracker']['remove'](_0x117582);}),this['set']('isVisible',_0x2a2f6e);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x5e27d3=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x5e27d3),_0x5e27d3;}get['targetRect'](){const _0x2a5ae8=this['target'];if(null===_0x2a5ae8)return null;if(_0x2a5ae8 instanceof _0x52468a)return _0x2a5ae8;const _0x5d1d4e=_0x2a5ae8['filter'](_0x1109a1=>function(_0x55fe55){const _0xd1653f=_0x55fe55['offsetParent'];if(_0xd1653f)return!0x0;const _0x4de997=_0x55fe55['getClientRects']()['item'](0x0);return!!_0x4de997;}(_0x1109a1));return 0x0===_0x5d1d4e['length']?null:new _0x52468a(_0x5d1d4e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5e9276){this['view']['isActive']=_0x5e9276,this['view']['mainView']['isActive']=_0x5e9276;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x589c85){if(!(null===_0x589c85||_0x589c85 instanceof _0x52468a||Array['isArray'](_0x589c85)&&_0x589c85['every'](_0x1b5fcb=>li(_0x1b5fcb))))throw new _0x2868b4('annotation-invalid-target',null,{'target':_0x589c85});}['_getNormalizedTarget'](){const _0x212fd3='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x212fd3)?[_0x212fd3]:_0x212fd3;}}function li(_0x4ad93f){return null!==_0x4ad93f&&'object'==typeof _0x4ad93f&&'nodeType'in _0x4ad93f&&0x1===_0x4ad93f['nodeType'];}class _ extends _0x3a28a9{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x349976=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1f4456(),this['_focusTracker']['on']('change:isFocused',(_0x34f997,_0x1180f0,_0xf4187d)=>{_0xf4187d||this['fire']('blur');});for(const _0x2b3bed of _0x349976)this['add'](_0x2b3bed);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x6106fe){if(this['has'](_0x6106fe))throw new _0x2868b4('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x6106fe['innerView'],_0x6106fe),this['_viewToAnnotation']['set'](_0x6106fe['view'],_0x6106fe);for(const _0x2d079e of _0x6106fe['focusableElements'])this['_focusTracker']['add'](_0x2d079e);this['listenTo'](_0x6106fe['focusableElements'],'add',(_0x2cf73b,_0x27886c)=>{this['_focusTracker']['add'](_0x27886c);}),this['listenTo'](_0x6106fe['focusableElements'],'remove',(_0x3b68b7,_0x2c106f)=>{this['_focusTracker']['remove'](_0x2c106f);}),this['listenTo'](_0x6106fe['view']['focusTracker'],'change:isFocused',(_0x1ae28f,_0x2ce992,_0x4cc51a)=>{_0x4cc51a&&this['fire']('focus',_0x6106fe);}),_0x6106fe['updateTargetRect']();const _0xf418ef=this['_getOrderInContent'](_0x6106fe['view']['targetRect']);return super['add'](_0x6106fe,_0xf418ef);}['remove'](_0x11cb1f){if(!this['has'](_0x11cb1f))throw new _0x2868b4('annotationcollection-not-existing-item',null);this['stopListening'](_0x11cb1f['view']['focusTracker']),this['stopListening'](_0x11cb1f['focusableElements']);for(const _0x2eab73 of _0x11cb1f['focusableElements'])this['_focusTracker']['remove'](_0x2eab73);return this['_viewToAnnotation']['delete'](_0x11cb1f['view']),this['_innerViewToAnnotation']['delete'](_0x11cb1f['innerView']),super['remove'](_0x11cb1f);}['getByInnerView'](_0xc93477){return this['_innerViewToAnnotation']['get'](_0xc93477);}['getByView'](_0x3d64e4){return this['_viewToAnnotation']['get'](_0x3d64e4);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x27ff1b of this)_0x27ff1b['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3a8479=Array['from'](this)['sort']((_0x278da4,_0x3bdbd3)=>v(_0x278da4['view']['targetRect'],_0x3bdbd3['view']['targetRect']));for(let _0x22a6d2=_0x3a8479['length']-0x1;_0x22a6d2>0x0;_0x22a6d2--){const _0x5122d8=_0x3a8479[_0x22a6d2];_0x22a6d2!==this['getIndex'](_0x5122d8)&&(this['remove'](_0x5122d8),this['add'](_0x5122d8));}}['_getOrderInContent'](_0x6c596b){let _0x3a9794=0x0;if(!_0x6c596b)return this['length'];for(const _0xa2caf0 of this){const _0x1a7a4=_0xa2caf0['view']['targetRect'];if(_0x1a7a4){if(v(_0x6c596b,_0x1a7a4)<0x0)return _0x3a9794;_0x3a9794++;}}return _0x3a9794;}}function v(_0x347104,_0x31765b){if(null===_0x347104&&null===_0x31765b)return 0x0;if(null===_0x347104)return-0x1;if(null===_0x31765b)return 0x1;const _0x58d277=_0x347104['top']-_0x31765b['top'];return 0x0==_0x58d277?_0x347104['left']-_0x31765b['left']:_0x58d277;}class O extends _0x45eb44{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31b59a){if(super(_0x31b59a),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x31b59a instanceof _0xbd62b2){const _0x2f88be=_0x31b59a['locale'];_0x31b59a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x2f88be,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x2f88be,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x2f88be,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x2f88be,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x2f88be,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x2f88be,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x2f88be,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x7c9c7a){this['collection']['add'](_0x7c9c7a);}['remove'](_0x2b1c64){this['collection']['remove'](_0x2b1c64),_0x2b1c64['destroy']();}['refreshVisibility'](){for(const _0x2fff6d of this['collection'])_0x2fff6d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x411405){return this['collection']['getByInnerView'](_0x411405);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1fe125 of this['collection'])_0x1fe125['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x41b9f7){this['fire']('_activateAnnotation',_0x41b9f7);}['createAnnotation'](_0x1ad387){return new d(_0x1ad387);}['createAnnotationView'](_0x24ba28,_0x274912){return new S(_0x24ba28,_0x274912);}['_addActiveAnnotation'](_0xdc2687){const _0x288049=new Set(this['activeAnnotations']);_0x288049['add'](_0xdc2687),this['activeAnnotations']=_0x288049;}['_removeActiveAnnotation'](_0x449764){const _0xbfb778=new Set(this['activeAnnotations']);_0xbfb778['delete'](_0x449764),this['activeAnnotations']=_0xbfb778;}['_bindAnnotationsToVisibleAnnotations'](){const _0x314a41=this['collection'],_0x25a86b=this['_visibleAnnotations'];function _0x197c87(_0x572d69){const _0x35c63d=_0x572d69['source'];_0x35c63d['isVisible']&&!_0x25a86b['has'](_0x35c63d)?_0x25a86b['add'](_0x35c63d):!_0x35c63d['isVisible']&&_0x25a86b['has'](_0x35c63d)&&_0x25a86b['remove'](_0x35c63d),_0x35c63d['view']['focusTracker']['remove'](_0x35c63d['view']['element']),_0x35c63d['view']['focusTracker']['add'](_0x35c63d['view']['element']);}this['listenTo'](_0x314a41,'add',(_0x206f0d,_0x1e1baf)=>{_0x1e1baf['isVisible']&&_0x25a86b['add'](_0x1e1baf),this['listenTo'](_0x1e1baf,'change:isVisible',_0x197c87);}),this['listenTo'](_0x314a41,'remove',(_0x4c28bb,_0x3df45a)=>{_0x25a86b['has'](_0x3df45a)&&_0x25a86b['remove'](_0x3df45a),this['stopListening'](_0x3df45a,'change:isVisible',_0x197c87);});}['_setupEnterAnnotationKeystroke'](){const _0x523de2=_0x2d26d6=>{_0x2d26d6['on']('ready',()=>{_0x2d26d6['keystrokes']['set'](_0x28170a,(_0x3addd9,_0x2785ca)=>{const _0xc55e55=_0x20767d(this['activeAnnotations']['values']());_0xc55e55&&(_0xc55e55['view']['focus'](),_0x2785ca());});});};this['context']instanceof _0xbd62b2?_0x523de2(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3bb2a3,_0x2a8069)=>{_0x523de2(_0x2a8069);});}['_setupEscapeAnnotationHandling'](){const _0x2197c1=_0x4894cc=>{const _0x5bab08=_0x4894cc['source'],_0xe66594=[];let _0x29079e;if(Array['isArray'](_0x5bab08['target'])){_0x29079e=_0x5bab08['target'][0x0],this['context']instanceof _0xbd62b2?_0xe66594['push'](this['context']):this['context']['editors']&&_0xe66594['push'](...this['context']['editors']);for(const _0x1e3207 of _0xe66594)for(const _0x26a4e9 of _0x1e3207['editing']['view']['domRoots']['values']())if(_0x26a4e9['contains'](_0x29079e))return void _0x1e3207['editing']['view']['focus']();_0x29079e['focus']();}};this['listenTo'](this['collection'],'add',(_0x28d8db,_0x3b32ed)=>{this['listenTo'](_0x3b32ed,'escape',_0x2197c1,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5b3136,_0x30f01b)=>{this['stopListening'](_0x30f01b,'escape',_0x2197c1);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x45eb44{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,lt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe97cb9){super(_0xe97cb9),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x57be6b=this['context']['config'];_0x57be6b['define']('comments.maxCommentsWhenCollapsed',0x2),_0x57be6b['define']('comments.maxThreadTotalWeight',0x1f4),_0x57be6b['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x57be6b['define']('comments.CommentThreadView',gt),_0x57be6b['define']('comments.CommentView',Tt),_0x57be6b['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x48849d=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x460811,_0x20d6b4)=>this['_addCommentThread'](_0x20d6b4)),this['on']('submitCommentThread',(_0x4f1434,_0x38a438)=>this['_submitCommentThread'](_0x38a438)),this['on']('resolveCommentThread',(_0x113689,_0x40d4e7)=>this['_resolveCommentThread'](_0x40d4e7)),this['on']('resolveCommentThread',(_0x264166,_0x42343c)=>this['_updateActiveAnnotation'](_0x42343c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3f0faf,_0x2305e6)=>this['_reopenCommentThread'](_0x2305e6)),this['on']('reopenCommentThread',(_0x26bd4c,_0x3c5f92)=>this['_updateActiveAnnotation'](_0x3c5f92),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x155b76,_0x409988)=>this['_removeCommentThread'](_0x409988)),this['on']('updateCommentThread',(_0x49ed19,_0x1a8b3c)=>this['_updateCommentThread'](_0x1a8b3c)),this['on']('updateCommentThread',(_0x3fa41b,_0x1cc1c1)=>this['_updateActiveAnnotation'](_0x1cc1c1),{'priority':'lowest'}),this['on']('addComment',(_0x48156b,_0x24559d)=>this['_addComment'](_0x24559d)),this['on']('updateComment',(_0x3253be,_0x4acb8c)=>this['_updateComment'](_0x4acb8c)),this['on']('removeComment',(_0x2919ef,_0x28bb29)=>this['_removeComment'](_0x28bb29)),this['on']('addComment',(_0x4f9744,{threadId:_0xd5681b,isFromAdapter:_0x8d5e54})=>{if(_0x8d5e54)return;const _0x26c4f3=this['getCommentThread'](_0xd5681b),_0x1a82f4=_0x26c4f3&&this['_threadToController']['get'](_0x26c4f3);_0x1a82f4&&_0x1a82f4['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x48849d,'change:activeAnnotations',(_0x38ee28,_0x3178fb,_0x294eed)=>{const _0x3c78ff=Array['from'](_0x294eed)['map'](_0x2ee3b6=>this['_viewToController']['get'](_0x2ee3b6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3c78ff?_0x3c78ff['model']:null;});}set['adapter'](_0x5f1802){if(this['_adapter'])throw new _0x2868b4('commentsrepository-adapter-already-set');this['_adapter']=_0x5f1802;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xcd31e0=_t,threadId:_0x23ff9c=_0x54d623(),comments:_0x532c7e=[],unlinkedAt:_0x3184d6=null,resolvedAt:_0x410ecc=null,resolvedBy:_0x2e7e73=null,target:_0x2b0457=null,context:_0x3e61a2=null,attributes:_0x1bcc5f={},isResolvable:_0x5a6d08=!0x0,isSubmitted:_0x52034c=!0x1,isFromAdapter:_0x4ad1bd=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xcd31e0),{'channelId':_0xcd31e0,'threadId':_0x23ff9c,'comments':_0x532c7e,'unlinkedAt':_0x3184d6,'resolvedAt':_0x410ecc,'resolvedBy':_0x2e7e73,'target':_0x2b0457,'context':_0x3e61a2,'attributes':_0x1bcc5f,'isFromAdapter':_0x4ad1bd,'isResolvable':_0x5a6d08,'isSubmitted':_0x52034c}),this['getCommentThread'](_0x23ff9c);}['openNewCommentThread']({channelId:_0x56a023=_t,threadId:_0xf39dd0=_0x54d623(),target:_0x5578c5,context:_0x756b51=null,isResolvable:_0x2dd021=!0x0}){if(this['_readOnlyChannels']['has'](_0x56a023)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5578c5)throw new _0x2868b4('commentsrepository-missing-target');const _0x37872b=this['addCommentThread']({'channelId':_0x56a023,'threadId':_0xf39dd0,'target':_0x5578c5,'context':_0x756b51,'isResolvable':_0x2dd021});if(!_0x37872b)return null;const _0x1820c7=this['_threadToController']['get'](_0x37872b),_0x3efb56=_0x1820c7['view']['commentThreadInputView']['commentInputView'],_0x2fe655=this['context']['plugins']['get'](O),_0x3f22f7=_0x2fe655['getByInnerView'](_0x1820c7['view']);return _0x2fe655['activate'](_0x3f22f7),_0x3efb56['once']('editorReady',()=>_0x3efb56['focus']()),_0x37872b;}['hasCommentThread'](_0x370f11){if('string'!=typeof _0x370f11)throw new _0x2868b4('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x370f11);}['updateCommentThread']({channelId:_0x59872c=_t,threadId:_0x3cac55,context:_0x46e63b,unlinkedAt:_0x55c7cd,attributes:_0x575eef,isFromAdapter:_0xce553f=!0x1}){return this['fire'](Nt('updateCommentThread',_0x59872c),{'channelId':_0x59872c,'threadId':_0x3cac55,'context':_0x46e63b,'unlinkedAt':_0x55c7cd,'attributes':_0x575eef,'isFromAdapter':_0xce553f}),this['getCommentThread'](_0x3cac55);}['getCommentThread'](_0x13756a){if('string'!=typeof _0x13756a)throw new _0x2868b4('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x13756a);}['fetchCommentThread']({channelId:_0x36e893,threadId:_0x19e056}={}){const _0x2326f3=this['getCommentThread'](_0x19e056);if(_0x2326f3)return Promise['resolve'](_0x2326f3);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2868b4('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x36e893,'threadId':_0x19e056})['then'](_0x348143=>this['hasCommentThread'](_0x19e056)?this['getCommentThread'](_0x19e056):_0x348143?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x36e893},_0x348143)):void 0x0)['catch'](_0x1afbd6=>{throw console['error'](_0x1afbd6),new _0x2868b4('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5ab0f3,skipNotAttached:_0x522031=!0x1,skipEmpty:_0x2dc48b=!0x1,toJSON:_0x18fa40=!0x1}={}){const _0x1e59ce=[];for(const _0x34d717 of this['_threads']['values']())_0x5ab0f3&&_0x34d717['channelId']!==_0x5ab0f3||_0x522031&&!_0x34d717['isAttached']||_0x2dc48b&&0x0===_0x34d717['length']||_0x1e59ce['push'](_0x34d717);return _0x18fa40?_0x1e59ce['map'](_0x2fda4d=>_0x2fda4d['toJSON']()):_0x1e59ce;}['setActiveCommentThread'](_0x452c77){const _0x5a08aa=this['context']['plugins']['get'](O);if(!_0x452c77)return void(this['activeCommentThread']&&_0x5a08aa['deactivateAll']());const _0x323f9b=this['getCommentThread'](_0x452c77);if(!_0x323f9b)throw new _0x2868b4('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x452c77});if(!this['_threadToController']['has'](_0x323f9b))throw new _0x2868b4('commentsrepository-active-not-attached',null,{'threadId':_0x452c77});const _0x197606=_0x5a08aa['getByInnerView'](this['_threadToController']['get'](_0x323f9b)['view']);_0x5a08aa['activate'](_0x197606);}['switchReadOnly'](_0x5ec1ef,_0x38cad7){_0x5ec1ef?this['_readOnlyChannels']['add'](_0x38cad7):this['_readOnlyChannels']['delete'](_0x38cad7),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3ef0e1){return this['_readOnlyChannels']['has'](_0x3ef0e1)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1c9dc5,_0x343940){return new vt(_0x1c9dc5,_0x343940);}['setPermissions'](_0x3cfaf9,_0xc8544a=_t){this['_permissions']['set'](_0xc8544a,_0x3cfaf9),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1eac06=_t){return this['_permissions']['has'](_0x1eac06)?this['_permissions']['get'](_0x1eac06):bt;}['_addCommentThread']({channelId:_0x2f27d6,threadId:_0x186f41,comments:_0x449399,unlinkedAt:_0x241120,resolvedAt:_0x5416ee,resolvedBy:_0x287a6e,target:_0x2c453b,context:_0x50e153,attributes:_0x2848c0,isFromAdapter:_0x3c42a1,isResolvable:_0x4ef589,isSubmitted:_0x3735d0}){if('string'!=typeof _0x186f41)throw new _0x2868b4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x186f41});if(this['hasCommentThread'](_0x186f41))throw new _0x2868b4('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x186f41});const _0x45ebc8=new ui(this,{'channelId':_0x2f27d6,'id':_0x186f41,'context':_0x50e153,'attributes':_0x2848c0,'unlinkedAt':_0x241120,'resolvedAt':_0x5416ee,'resolvedBy':_0x287a6e?this['context']['plugins']['get'](st)['getUser'](_0x287a6e):null,'isResolvable':_0x4ef589,'isSubmitted':_0x3735d0||_0x3c42a1});this['_threads']['set'](_0x186f41,_0x45ebc8);for(const _0x1a0840 of _0x449399)_0x45ebc8['_add'](this['_createNewComment']({'threadId':_0x186f41,..._0x1a0840}));return _0x2c453b&&_0x45ebc8['attachTo'](_0x2c453b),_0x3c42a1||!_0x45ebc8['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2f27d6,'threadId':_0x186f41});}['_submitCommentThread']({channelId:_0x5a2515,threadId:_0x5adc7e}){if(!this['hasCommentThread'](_0x5adc7e))throw new _0x2868b4('commentsrepository-missing-comment-thread',this);const _0x33b2ad=this['getCommentThread'](_0x5adc7e);if(_0x33b2ad['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5c4620,comments:_0x368619,resolvedAt:_0x501a8d,resolvedBy:_0x3cbc0a,context:_0x315674,attributes:_0x2cc943}=_0x33b2ad,_0x4d485c=this['context']['plugins']['get']('PendingActions'),_0x5b271a=_0x4d485c['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5a2515,'threadId':_0x5c4620,'comments':_0x368619['map'](_0x3e002b=>_0x3e002b['toJSON']()),'resolvedAt':_0x501a8d,'resolvedBy':_0x3cbc0a?_0x3cbc0a['id']:_0x3cbc0a,'context':_0x315674,'attributes':_0x2cc943})['then'](({comments:_0x3da298})=>{_0x4d485c['remove'](_0x5b271a);for(const _0x55a5ce of _0x3da298)this['_updateComment']({'channelId':_0x5a2515,'threadId':_0x5adc7e,'commentId':_0x55a5ce['commentId'],'createdAt':_0x55a5ce['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x46a4ba=>{throw console['error'](_0x46a4ba),new _0x2868b4('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x446b84,target:_0x4b1f58}){const _0x25ba02=this['getCommentThread'](_0x446b84);if(!_0x25ba02)throw new _0x2868b4('commentsrepository-attach-missing-comment-thread',this);const _0x26af67=this['context']['plugins']['get']('PendingActions'),_0x557bcb=this['context']['plugins']['get'](O),_0x567757=this['_createCommentThreadView'](_0x25ba02),_0x33f86b=new vt(_0x25ba02,_0x567757);let _0x25d0dc=null;_0x567757['on']('change:isDirty',(_0x85c49b,_0x1671b7,_0x4b5c92)=>{_0x4b5c92?_0x25d0dc=_0x26af67['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x25d0dc&&(_0x26af67['remove'](_0x25d0dc),_0x25d0dc=null);}),this['_threadToController']['set'](_0x25ba02,_0x33f86b),this['_viewToController']['set'](_0x567757,_0x33f86b);const _0x4457b8=new S(this['context']['locale'],_0x567757);_0x4457b8['bind']('length')['to'](_0x567757),_0x4457b8['bind']('isDirty')['to'](_0x567757,'isDirty',_0x567757,'length',(_0x4dc415,_0x5a72ea)=>_0x4dc415||!_0x5a72ea),_0x4457b8['bind']('isActive')['to'](_0x567757),_0x4457b8['type']='comment';const _0x2fb067=new d({'view':_0x4457b8,'target':_0x4b1f58,'type':'comment','isVisible':!_0x25ba02['archivedAt']});return _0x567757['on']('escape',()=>{_0x2fb067['fire']('escape');}),this['_bindAnnotationToEditors'](_0x567757,_0x2fb067),_0x557bcb['add'](_0x2fb067),_0x2fb067;}['_bindAnnotationToEditors'](_0x4d9f27,_0x196311){this['listenTo'](_0x4d9f27,'editorReady',(_0x496631,_0x1c81a5)=>{const _0x5d37c5=_0x1c81a5['ui']['view']['body']['bodyCollectionContainer'];_0x196311['focusableElements']['add'](_0x5d37c5),this['context']instanceof _0xbd62b2&&this['context']['ui']['focusTracker']['add'](_0x5d37c5);},{'priority':'highest'}),this['listenTo'](_0x4d9f27,'editorDestroyed',(_0x1a0ccd,_0xb34616)=>{const _0x1b1768=_0xb34616['ui']['view']['body']['bodyCollectionContainer'];_0x196311['focusableElements']['has'](_0x1b1768)&&_0x196311['focusableElements']['remove'](_0x1b1768),this['context']instanceof _0xbd62b2&&this['context']['ui']['focusTracker']['remove'](_0x1b1768);});}['_unbindEditors'](_0x4a599e){this['stopListening'](_0x4a599e,'editorReady'),this['stopListening'](_0x4a599e,'editorDestroyed');}['_createCommentThreadView'](_0x5981b5){const _0x542e04=this['context']['plugins']['get'](st),{config:_0x3e8e79,locale:_0x5bb1c3}=this['context'],_0x1755cc=pt(_0x3e8e79['get']('locale'),_0x5bb1c3);return new(0x0,(_0x3e8e79['get']('comments'))['CommentThreadView'])(_0x5bb1c3,_0x5981b5,_0x542e04['me'],{'editorConfig':{..._0x3e8e79['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3e8e79['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3e8e79['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3e8e79['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3e8e79['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1755cc,'CommentView':_0x3e8e79['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x243971,channelId:_0x38b951,resolvedAt:_0x20e1eb,resolvedBy:_0x78807e,isFromAdapter:_0x3e5993}){if(!this['hasCommentThread'](_0x243971))throw new _0x2868b4('commentsrepository-missing-comment-thread',null,{'threadId':_0x243971});const _0x78b269=this['getCommentThread'](_0x243971);if(_0x78b269['isResolved'])throw new _0x2868b4('commentsrepository-resolved-comment-thread',null,{'threadId':_0x243971});const _0x4ae4b0=this['context']['plugins']['get'](st);if(_0x78b269['resolvedBy']=_0x4ae4b0['getUser'](_0x78807e),_0x78b269['resolvedAt']=_0x20e1eb,_0x3e5993||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4e0e1f=this['context']['plugins']['get']('PendingActions'),_0x5ece14=_0x4e0e1f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x38b951,'threadId':_0x243971})['then'](({resolvedAt:_0x5ebc12,resolvedBy:_0x29e469})=>{_0x4e0e1f['remove'](_0x5ece14),_0x78b269['resolvedBy']['id']!==_0x29e469&&(_0x78b269['resolvedBy']=_0x4ae4b0['getUser'](_0x29e469)),_0x78b269['resolvedAt']=_0x5ebc12;})['catch'](_0x54057b=>{throw console['error'](_0x54057b),new _0x2868b4('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x511e94,channelId:_0x7ff719,isFromAdapter:_0x54ce5a}){if(!this['hasCommentThread'](_0x511e94))throw new _0x2868b4('commentsrepository-missing-comment-thread',null,{'threadId':_0x511e94});const _0x155543=this['getCommentThread'](_0x511e94);if(!_0x155543['isResolved'])throw new _0x2868b4('commentsrepository-reopen-comment-thread',null,{'threadId':_0x511e94});if(_0x155543['resolvedBy']=null,_0x155543['resolvedAt']=null,_0x54ce5a||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4ac33b=this['context']['plugins']['get']('PendingActions'),_0x339cd5=_0x4ac33b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x7ff719,'threadId':_0x511e94})['then'](()=>_0x4ac33b['remove'](_0x339cd5))['catch'](_0x5245c8=>{throw console['error'](_0x5245c8),new _0x2868b4('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x508550,isFromAdapter:_0xa69c89}){const _0x3def3e=this['getCommentThread'](_0x508550);if(!_0x3def3e)throw new _0x2868b4('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x508550),this['_threads']['delete'](_0x508550),!_0x3def3e['isSubmitted']||_0xa69c89||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x28b66b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4c6bf2}=_0x3def3e,_0x2ede58=_0x28b66b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4c6bf2,'threadId':_0x508550})['then'](()=>_0x28b66b['remove'](_0x2ede58))['catch'](_0x2732f4=>{throw console['error'](_0x2732f4),new _0x2868b4('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x16710f,unlinkedAt:_0x57f12d,context:_0x48fcba,attributes:_0x2921f0,isFromAdapter:_0x49751b}){if('string'!=typeof _0x16710f)throw new _0x2868b4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x16710f});if(!this['hasCommentThread'](_0x16710f))throw new _0x2868b4('commentsrepository-missing-comment-thread',null,{'threadId':_0x16710f});const _0x22d3f5=this['getCommentThread'](_0x16710f);let _0xf39382=!0x1;if(void 0x0!==_0x48fcba&&_0x22d3f5['context']!==_0x48fcba&&(_0x22d3f5['context']=_0x48fcba,_0xf39382=!0x0),void 0x0!==_0x57f12d&&_0x22d3f5['unlinkedAt']!==_0x57f12d&&(_0x22d3f5['unlinkedAt']=_0x57f12d,_0xf39382=!0x0),_0x2921f0&&!At(_0x2921f0,_0x22d3f5['attributes'])&&(_0x22d3f5['attributes']=_0x2921f0,_0xf39382=!0x0),!_0xf39382)return Promise['resolve']();if(!_0x22d3f5['isSubmitted']||_0x49751b||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x36f950=this['context']['plugins']['get']('PendingActions'),{channelId:_0x9fbc91}=_0x22d3f5,_0x5b4d76=_0x36f950['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x9fbc91,'threadId':_0x16710f,'context':_0x48fcba,'unlinkedAt':_0x57f12d,'attributes':_0x2921f0})['then'](()=>_0x36f950['remove'](_0x5b4d76))['catch'](_0x367df3=>{throw console['error'](_0x367df3),new _0x2868b4('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x21e02f){const _0x56464a=this['context']['plugins']['get'](O),_0x19d0ed=this['getCommentThread'](_0x21e02f);if(_0x19d0ed['_isAttached']=!0x1,this['_threadToController']['has'](_0x19d0ed)){const _0x4cd4b4=this['_threadToController']['get'](_0x19d0ed),_0x2d96f7=_0x4cd4b4['view'],_0x220fd1=_0x56464a['getByInnerView'](_0x2d96f7);this['_threadToController']['delete'](_0x19d0ed),this['_viewToController']['delete'](_0x2d96f7),_0x220fd1&&_0x56464a['remove'](_0x220fd1),_0x4cd4b4['destroy'](),_0x2d96f7['destroy']()['then'](()=>{this['_unbindEditors'](_0x2d96f7);});}}['_updateActiveAnnotation']({threadId:_0x2dd508,resolvedAt:_0x4b333f,unlinkedAt:_0x3ae4d2}){const _0x1c7014=!!_0x4b333f,_0x2ab1ed=this['context']['plugins']['get'](O),_0x238b2f=this['getCommentThread'](_0x2dd508);if(this['_threadToController']['has'](_0x238b2f)){const _0xa36fc3=this['_threadToController']['get'](_0x238b2f)['view'],_0x214526=_0x2ab1ed['getByInnerView'](_0xa36fc3);_0x214526&&(_0x1c7014&&_0x2ab1ed['_removeActiveAnnotation'](_0x214526),_0x3ae4d2?_0x214526['isVisible']=!0x1:_0x214526['refreshVisibility']());}}['_getExternalAuthor'](_0x2292e5){const _0x58335a=this['context']['plugins']['get'](st),_0x543253=It('external:'+_0x2292e5),_0x37d198=_0x58335a['getUser'](_0x543253);return _0x37d198||_0x58335a['addUser']({'id':_0x543253,'name':_0x2292e5});}['_createNewComment']({threadId:_0xf38f4a,commentId:_0x4cc692=_0x54d623(),content:_0x2ad642,authorId:_0x43bcc6,createdAt:_0x43e2b5,attributes:_0x4af1d8}){if('string'!=typeof _0x4cc692)throw new _0x2868b4('commentsrepository-invalid-commentid');if('string'!=typeof _0x43bcc6)throw new _0x2868b4('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2ad642||!_0x2ad642['trim']())throw new _0x2868b4('commentsrepository-invalid-comment-content');const _0x5a71c8=this['context']['plugins']['get'](st)['getUser'](_0x43bcc6);if(!_0x5a71c8)throw new _0x2868b4('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x43bcc6});let _0x298aa7=null,_0x3738f3=_0x43e2b5;return _0x4af1d8?.['@external']&&(_0x298aa7=this['_getExternalAuthor'](_0x4af1d8['@external']['authorName']),_0x3738f3=new Date(_0x4af1d8['@external']['createdAt'])),new fi(this,{'threadId':_0xf38f4a,'id':_0x4cc692,'author':_0x298aa7||_0x5a71c8,'creator':_0x5a71c8,'content':_0x2ad642,'createdAt':_0x43e2b5,'authoredAt':_0x3738f3,'attributes':_0x4af1d8});}['_addComment'](_0x1294d6){let {threadId:_0x448bb6,content:_0x1e91ed,attributes:_0x16af14,isFromAdapter:_0x191fab}=_0x1294d6;const _0x25de39=this['getCommentThread'](_0x1294d6['threadId']);if(!_0x25de39)throw new _0x2868b4('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3809f1=this['_createNewComment'](_0x1294d6),{id:_0x53c7ab}=_0x3809f1;if(_0x25de39['_add'](_0x3809f1),_0x191fab||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x25de39['isSubmitted'])return Promise['resolve']();const _0x3394b7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1fbd99}=_0x25de39,_0x5ca2ee=_0x3394b7['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x16af14||(_0x16af14={}),this['adapter']['addComment']({'channelId':_0x1fbd99,'threadId':_0x448bb6,'commentId':_0x53c7ab,'content':_0x1e91ed,'attributes':_0x16af14})['then'](_0xde0234=>{_0x3394b7['remove'](_0x5ca2ee),_0xde0234&&this['_updateComment']({'channelId':_0x1fbd99,'threadId':_0x448bb6,'commentId':_0x53c7ab,'createdAt':_0xde0234['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5ea77f=>{throw console['error'](_0x5ea77f),new _0x2868b4('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x1e2ab4,commentId:_0x365c9e,content:_0x193946,createdAt:_0x3f4e0f,attributes:_0x2a8256,isFromAdapter:_0x265028}){if(void 0x0!==_0x193946&&('string'!=typeof _0x193946||!_0x193946['trim']()['length']))throw new _0x2868b4('commentsrepository-update-comment-invalid-content');const _0x42cd95=this['getCommentThread'](_0x1e2ab4),_0x349935=_0x42cd95['getComment'](_0x365c9e);if(!_0x349935)throw new _0x2868b4('commentsrepository-update-missing-comment',this);let _0x1db2f0=!0x1;if(_0x193946&&_0x193946!==_0x349935['content']&&(_0x349935['isEditable']||_0x265028)&&(_0x349935['content']=_0x193946,_0x1db2f0=!0x0),_0x3f4e0f&&_0x3f4e0f!==_0x349935['createdAt']&&(_0x349935['createdAt']=_0x3f4e0f,_0x349935['attributes']&&_0x349935['attributes']['@external']||(_0x349935['authoredAt']=_0x3f4e0f),_0x1db2f0=!0x0),_0x2a8256&&!At(_0x2a8256,_0x349935['attributes'])&&(_0x349935['attributes']=_0x2a8256,_0x1db2f0=!0x0),!_0x1db2f0)return Promise['resolve']();if(_0x42cd95['fire']('commentUpdated'),_0x265028||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x29b7d2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5ce208}=this['getCommentThread'](_0x349935['threadId']),_0x1806d1=_0x29b7d2['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5ce208,'threadId':_0x1e2ab4,'commentId':_0x365c9e,'content':_0x193946,'attributes':_0x2a8256})['then'](()=>_0x29b7d2['remove'](_0x1806d1))['catch'](_0x5adda0=>{throw console['error'](_0x5adda0),new _0x2868b4('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5e45f0,commentId:_0x18dcc9,isFromAdapter:_0xccc732}){const _0x48717a=this['getCommentThread'](_0x5e45f0),_0x23f29b=_0x48717a['getComment'](_0x18dcc9);if(!_0x23f29b)throw new _0x2868b4('commentsrepository-remove-missing-comment',this);if(_0x48717a['_remove'](_0x23f29b),_0xccc732||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1bde6a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x28cfe6}=_0x48717a,_0x5d515e=_0x1bde6a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x28cfe6,'threadId':_0x5e45f0,'commentId':_0x18dcc9})['then'](()=>_0x1bde6a['remove'](_0x5d515e))['catch'](_0x5912eb=>{throw console['error'](_0x5912eb),new _0x2868b4('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x255461(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2f738a,_0x2ed785){super();const _0x583650=_0x2f738a['context']['plugins']['get'](st)['me'],_0x4c105b=_0x2f738a['getCommentThread'](_0x2ed785['threadId']),_0xa2208c=0x0===_0x4c105b['comments']['length'],_0x43a801=_0x583650===_0x2ed785['author'];this['id']=_0x2ed785['id'],this['threadId']=_0x2ed785['threadId'],this['author']=_0x2ed785['author'],this['creator']=_0x2ed785['creator'],this['isExternal']=Boolean(_0x2ed785['attributes']&&_0x2ed785['attributes']['@external']),this['set']('content',_0x2ed785['content']),this['createdAt']=_0x2ed785['createdAt']||new Date(),this['set']('authoredAt',_0x2ed785['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4c105b,'resolvedAt'),this['set']('attributes',_0x2ed785['attributes']||{}),this['bind']('isEditable')['to'](_0x2f738a,'_permissions',()=>{const _0xfc08ae=_0x2f738a['getPermissions'](_0x4c105b['channelId'])['write'],_0x5efd44=_0x2f738a['getPermissions'](_0x4c105b['channelId'])['modifyAll'];return _0x43a801&&_0xfc08ae||!_0x43a801&&_0x5efd44;}),this['bind']('isRemovable')['to'](_0x4c105b,'isRemovable',_0x2f738a,'_permissions',_0x5470f8=>{const _0x1ae7fa=_0x2f738a['getPermissions'](_0x4c105b['channelId'])['write'],_0x164e41=_0x2f738a['getPermissions'](_0x4c105b['channelId'])['modifyAll'];return _0x43a801&&_0x1ae7fa||_0x5470f8&&_0xa2208c||!_0x43a801&&_0x164e41&&!_0xa2208c;}),this['bind']('isReadOnly')['to'](_0x4c105b,'isReadOnly'),this['_repository']=_0x2f738a;}get['weight'](){return Math['max'](function(_0x2fd429){const _0x573c45=document['createElement']('div');return _0x573c45['innerHTML']=_0x2fd429,_0x573c45['textContent']['length'];}(this['content']),0xc8);}['update'](_0x73dcca){const {threadId:_0x1212b7,id:_0x2aac78}=this;if(!this['_repository']['hasCommentThread'](_0x1212b7))throw new _0x2868b4('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xa57f95}=this['_repository']['getCommentThread'](_0x1212b7);this['_repository']['fire'](Nt('updateComment',_0xa57f95,_0x1212b7),{'channelId':_0xa57f95,'threadId':_0x1212b7,'commentId':_0x2aac78,..._0x73dcca});}['setAttribute'](_0x3558bc,_0x3a4b0e){const _0x134865=wt(this['attributes']);yt(_0x134865,_0x3558bc,_0x3a4b0e),this['update']({'attributes':_0x134865});}['removeAttribute'](_0x2ee747){const _0x1b2d69=wt(this['attributes']);Ct(_0x1b2d69,_0x2ee747),this['update']({'attributes':_0x1b2d69});}['remove'](_0x4cba8d={}){if(!_0x4cba8d['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x411844,id:_0x223cb2}=this;if(!this['_repository']['hasCommentThread'](_0x411844))throw new _0x2868b4('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2076a8}=this['_repository']['getCommentThread'](_0x411844);this['_repository']['fire'](Nt('removeComment',_0x2076a8,_0x411844),{'channelId':_0x2076a8,'threadId':_0x411844,'commentId':_0x223cb2,..._0x4cba8d});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x5f4097,..._0x153263){for(const _0x58c6a0 of _0x153263)void 0x0!==_0x58c6a0&&(_0x5f4097+=':'+String(_0x58c6a0));return _0x5f4097;}class K extends _0x27d889{['refresh'](){const _0x2b53a9=this['editor']['model']['document']['selection'];for(const _0x111923 of _0x2b53a9['getRanges']())if(this['_hasContent'](_0x111923))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x570b2a=_0x54d623()}={}){const _0x5af11=this['editor']['model'],_0x473da6=[];for(const _0x4a121a of _0x5af11['document']['selection']['getRanges']())this['_hasContent'](_0x4a121a)&&_0x473da6['push'](this['_trimToContent'](_0x4a121a));_0x5af11['change'](_0x323e03=>{for(const _0xf2afc1 of _0x473da6){const _0x212766=_0x54d623()['substr'](0x1,0x5),_0x38a6e6='comment:'+_0x570b2a+':'+_0x212766;_0x323e03['addMarker'](_0x38a6e6,{'range':_0xf2afc1,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x1ef0ce){for(const _0x4d3512 of _0x1ef0ce['getItems']())if(this['_itemIsContent'](_0x4d3512))return!0x0;return!0x1;}['_itemIsContent'](_0x24f1be){return _0x24f1be['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x24f1be)&&!_0x24f1be['is']('element','tableCell');}['_trimToContent'](_0x51890e){const _0x17e88f=_0x9655ae=>!this['_itemIsContent'](_0x9655ae['item']),_0x5df6e1=_0x51890e['start']['getLastMatchingPosition'](_0x17e88f),_0x5502fa=_0x51890e['end']['getLastMatchingPosition'](_0x17e88f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5df6e1,_0x5502fa);}}class P extends _0xab089d{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x44b215){super(_0x44b215),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x57e826=this['editor'],_0x4c45b0=_0x57e826['model']['document']['selection'],_0x31c99a=_0x5e61f5(()=>this['refreshSelectedViews'](),0xa);_0x4c45b0['on']('change:range',(_0x697813,_0x4cb541)=>{_0x4cb541['directChange']&&(_0x31c99a['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x57e826['editing']['view']['document'],'change:isFocused',(_0x4cc8cb,_0x486236,_0x4be116)=>{_0x4be116&&_0x31c99a();}),this['listenTo'](_0x57e826['ui']['focusTracker'],'change:isFocused',(_0x416b97,_0x3387e1,_0x3bd09c)=>{_0x3bd09c||_0x57e826['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x51e475=>this['_editorAnnotationsData']['has'](_0x51e475['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x412862){if(this['_editorAnnotations']['has'](_0x412862['view']))return;this['_editorAnnotations']['add'](_0x412862['view']),this['editor']['ui']['focusTracker']['add'](_0x412862['view']['element']);const _0x2f86ee=this['editor']['plugins']['get'](O);this['listenTo'](_0x2f86ee['collection'],'remove',(_0x2065df,_0x5c67eb)=>{this['editor']['ui']['focusTracker']['remove'](_0x5c67eb['view']['element']),this['_editorAnnotations']['delete'](_0x5c67eb['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2c519d){if('function'!=typeof _0x2c519d)throw new _0x2868b4('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2c519d);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x389fd8,annotations:_0x12004b}){const _0x330951=[],_0x1221cb=this['editor']['model']['document']['selection'],_0x2d189b=Array['from'](_0x1221cb['getRanges']());for(const [_0x47cb2e,_0x1ab030]of this['_editorAnnotationsData']){const _0x45d61b=_0x39b2d4(_0x1ab030),_0x1feb13=_0x12004b['getByInnerView'](_0x47cb2e);_0x45d61b&&_0x1feb13&&_0x330951['push']({'annotation':_0x1feb13,'range':_0x45d61b});}function _0x39b2d4(_0x4ffcaa){for(const _0x1c1274 of _0x4ffcaa)for(const _0x17f350 of _0x2d189b)if(_0x1c1274['containsRange'](_0x17f350,!_0x1221cb['isCollapsed']))return _0x1c1274;return null;}return _0x330951['sort']((_0x33074e,_0x28f500)=>{const _0x241e3f=_0x33074e['range'],_0x26bcad=_0x28f500['range'];if(!_0x241e3f['isEqual'](_0x26bcad)){if(_0x241e3f['containsRange'](_0x26bcad,!0x0))return 0x1;if(_0x26bcad['containsRange'](_0x241e3f,!0x0))return-0x1;}return _0x33074e['annotation']==_0x389fd8?-0x1:_0x28f500['annotation']==_0x389fd8?0x1:0x0;})['map'](_0x5daf19=>_0x5daf19['annotation']);}get['_editorAnnotationsData'](){const _0x507dd4=new Map();for(const _0x598922 of Array['from'](this['_dataCollectors']))for(const [_0x3d30a2,_0x80f0fc]of _0x598922())_0x507dd4['set'](_0x3d30a2,_0x80f0fc);return _0x507dd4;}}class ct extends _0xab089d{['afterInit'](){const _0x25df0e=this['editor'];if(!_0x25df0e['plugins']['has']('RestrictedEditingModeEditing'))return;_0x25df0e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0xab089d{constructor(_0x7c437b){super(_0x7c437b),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x184bb3=this['editor'],_0x29944e=_0x184bb3['commands']['get']('importWord'),_0x4c337f=_0x184bb3['plugins']['get'](st);_0x29944e&&(_0x29944e['on']('execute',(_0x5cbb6c,[,_0x36221b])=>{_0x36221b['collaboration_features']={'comments':!0x0,'user_id':_0x4c337f['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x29944e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x30b552,_0x1b3359){const {comment_threads:_0x3e0aa2}=_0x1b3359;_0x3e0aa2&&_0x3e0aa2['forEach'](({thread_id:_0x642255,comments:_0x1e4bb2,is_resolved:_0x3db162})=>{const _0x2cfba9=new Date(),_0x10a7f8=_0x1e4bb2['map'](({author:_0x335ee6,content:_0x4cfca3,created_at:_0x51a777})=>({'content':_0x4cfca3,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x2cfba9,'attributes':{'@external':{'authorName':_0x335ee6,'createdAt':_0x51a777?new Date(_0x51a777):new Date(),'source':'importWord'}}})),_0x5044e6=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x5044e6,'threadId':_0x642255,'comments':_0x10a7f8,'resolvedAt':_0x3db162?_0x2cfba9:null});});}}class ut extends _0xab089d{constructor(_0x2623cc){super(_0x2623cc),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0xc5263f=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0xc5263f,'contentInsertion',(_0xbc60d8,_0x4233b4)=>this['_removeMarkersWithoutThreads'](_0x4233b4['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x568975){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x568975;const _0x32fac2=this['editor']['plugins']['get']('CommentsRepository');for(const _0x251dda of _0x568975['keys']()){const [_0x49e6a3,_0x78b2bc]=_0x251dda['split'](':');'comment'!=_0x49e6a3||_0x32fac2['hasCommentThread'](_0x78b2bc)||_0x568975['delete'](_0x251dda);}return _0x568975;}['_registerMarkerInClipboardPipeline'](){const _0xa1dd30=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x594109=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x594109&&_0xa1dd30['_registerMarkerToCopy']('comment',_0x594109);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2ce01e){switch(_0x2ce01e){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ft extends _0xab089d{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x521a63,_0x31b8d1)=>{if(!_0x31b8d1['options']['showCommentHighlights'])return null;if(_0x31b8d1['options']['ignoreResolvedComments']){const {id:_0x5c2c4e}=er(_0x521a63['markerName']),_0x5647f3=this['editor']['plugins']['get'](o);if(_0x5647f3['getCommentThread'](_0x5c2c4e)?.['isResolved']&&_0x521a63['item'])return _0x31b8d1['consumable']['consume'](_0x521a63['item'],'addMarker:'+_0x521a63['markerName']),_0x31b8d1['consumable']['consume'](_0x521a63['item'],'removeMarker:'+_0x521a63['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x216053=>{_0x216053['on']('addMarker:comment',(_0x24b2c9,_0xc216a0,_0x2cf5cd)=>{if(!_0x2cf5cd['options']['showCommentHighlights'])return;const _0x47f7be=_0xc216a0['item'];if(!_0x47f7be)return;const _0x3c2ec4=_0x2cf5cd['mapper']['toViewElement'](_0x47f7be);this['editor']['model']['schema']['isObject'](_0x47f7be)&&_0x3c2ec4&&!_0x3c2ec4['getCustomProperty']('widget')&&_0x3c2ec4['is']('containerElement')&&_0xad214d(_0x3c2ec4,_0x2cf5cd['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1f0419,{writer:_0x1771fe,options:_0x3c26a4})=>{if(!_0x3c26a4['showCommentHighlights'])return null;const _0x3e9f85=_0x1771fe['createContainerElement']('div'),_0x318a93=_0x1771fe['createEmptyElement']('hr');return _0x1771fe['addClass']('ck-horizontal-line',_0x3e9f85),_0x1771fe['insert'](_0x1771fe['createPositionAt'](_0x3e9f85,0x0),_0x318a93),_0x3e9f85;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5daf6b,{writer:_0x136294,options:_0x1ebe30})=>{if(!_0x1ebe30['showCommentHighlights'])return null;const _0xbe2a30=_0x136294['createContainerElement']('span'),_0x4cfdc2=_0x136294['createEmptyElement']('img');return _0x136294['addClass']('image-inline',_0xbe2a30),_0x136294['insert'](_0x136294['createPositionAt'](_0xbe2a30,0x0),_0x4cfdc2),_0xbe2a30;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5f219a,{writer:_0x3a8eb7,options:_0x31dfb6})=>{if(_0x31dfb6['showCommentHighlights'])return _0x3a8eb7['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x144a69,_0x3d5aeb,_0x3c1321)=>{_0x3c1321['options']['showCommentHighlights']&&_0x144a69['stop']();},{'priority':'high'});}}class r extends _0xab089d{static get['requires'](){return[o,P,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x397ca1){super(_0x397ca1),this['set']('isThreadsLoadingPaused',!0x0),_0x397ca1['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x22f202,_0x4ddc80,_0x4d452e,_0xadd0c8)=>{const _0x15d634=_0x397ca1['plugins']['get'](o),_0x4218e0=_0x4d452e?er(_0x4d452e)['id']:null;_0x397ca1['model']['change'](()=>{if(_0x4218e0){const _0xd43614=this['getAllMarkersForId'](_0x4218e0);for(const _0x31f27b of _0xd43614)_0x397ca1['editing']['reconvertMarker'](_0x31f27b);}if(_0xadd0c8){const {id:_0x40b49a}=er(_0xadd0c8),_0xf24849=_0x15d634['getCommentThread'](_0x40b49a);if(_0xf24849&&_0xf24849['unlinkedAt'])return;if(_0xf24849&&!_0xf24849['isAttached'])return;const _0x24c889=this['getAllMarkersForId'](_0x40b49a);for(const _0xa9afca of _0x24c889)_0x397ca1['editing']['reconvertMarker'](_0xa9afca);}}),_0x4218e0&&this['scrollToThreadMarker'](_0x4218e0);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x29923a=this['editor'],_0x54011d=_0x29923a['plugins']['get'](o),_0x216b15=_0x29923a['config']['get']('collaboration.channelId'),_0x24cbcc=_0x54011d['getCommentThreads']()['filter'](_0x89e37d=>_0x89e37d['channelId']!==_0x216b15);_0x29923a['commands']['add']('addCommentThread',new K(_0x29923a)),this['listenTo'](_0x29923a,'change:isReadOnly',(_0x231ce7,_0xaf682c,_0x157bc0)=>{_0x54011d['switchReadOnly'](_0x157bc0,_0x29923a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x54011d,dt('addCommentThread',_0x216b15),(_0x4e7d0d,{threadId:_0x7aff16})=>{const _0x3713d2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x7aff16);_0x3713d2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x7aff16);}),this['listenTo'](_0x54011d,dt('removeCommentThread',_0x216b15),(_0x10a1fa,{threadId:_0x301236})=>{_0x29923a['model']['enqueueChange']({'isUndoable':!0x1},_0x487b0f=>{const _0x5052d2=this['getAllMarkersForId'](_0x301236);for(const _0xcc0107 of _0x5052d2)_0x487b0f['removeMarker'](_0xcc0107);});}),this['listenTo'](_0x54011d,dt('resolveCommentThread',_0x216b15),(_0x3ae1b8,{threadId:_0x2c837f})=>{(this['_reconvertMarkers'](_0x2c837f),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x2c837f)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x54011d,dt('reopenCommentThread',_0x216b15),(_0x2a2ea8,{threadId:_0x293419})=>{this['_reconvertMarkers'](_0x293419);},{'priority':'low'}),this['listenTo'](_0x54011d,dt('addComment',_0x216b15),(_0x171cd2,{threadId:_0x5d10f3,isFromAdapter:_0x394e9e})=>{const _0xda0e0=this['getAllMarkersForId'](_0x5d10f3);if(_0x394e9e||0x0==_0xda0e0['length']||!_0x54011d['hasCommentThread'](_0x5d10f3))return;0x1===_0x54011d['getCommentThread'](_0x5d10f3)['length']&&_0x29923a['model']['enqueueChange']({'isUndoable':!0x1},_0x1fb042=>{for(const _0x2bfa66 of _0xda0e0)_0x1fb042['updateMarker'](_0x2bfa66,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x24cbcc);}['afterInit'](){!async function(_0xb55a4a){const _0x553a0c=_0x335519([0x6e,0x47,0x58,0x51,0x55,0x31,0x36,0x76,0x4e,0x41,0x6f,0x65,0x44,0x71,0x62,0x6c,0x33,0x59,0x35,0x77,0x57,0x53,0x48,0x50,0x4a,0x6a,0x42,0x69,0x75,0x30,0x7a,0x78,0x79,0x6d,0x5a,0x45,0x4b,0x54,0x63,0x43,0x52,0x73,0x61,0x70,0x72,0x39,0x74,0x34,0x6b,0x4f,0x56,0x64,0x37,0x67,0x46,0x38,0x32,0x4d,0x68,0x49,0x66,0x4c]),_0x1cc913=0x60acbb77,_0x27e6d4=0x60abd03f^_0x1cc913,_0x2150de=window[_0x335519([0x44,0x61,0x74,0x65])][_0x335519([0x6e,0x6f,0x77])](),_0x46e2d3=_0xb55a4a[_0x335519([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xc30568=new window[(_0x335519([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17c2d0=>{_0x46e2d3[_0x335519([0x6f,0x6e,0x63,0x65])](_0x335519([0x72,0x65,0x61,0x64,0x79]),_0x17c2d0);}),_0x4ddf3e={[_0x335519([0x6b,0x74,0x79])]:_0x335519([0x45,0x43]),[_0x335519([0x75,0x73,0x65])]:_0x335519([0x73,0x69,0x67]),[_0x335519([0x63,0x72,0x76])]:_0x335519([0x50,0x2d,0x32,0x35,0x36]),[_0x335519([0x78])]:_0x335519([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]),[_0x335519([0x79])]:_0x335519([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]),[_0x335519([0x61,0x6c,0x67])]:_0x335519([0x45,0x53,0x32,0x35,0x36])},_0x1e823d=_0x46e2d3[_0x335519([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x335519([0x67,0x65,0x74])](_0x335519([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2df6da(){let _0x515d4d,_0x9d7be8=null,_0x4e109f=null;try{if(_0x1e823d==_0x335519([0x47,0x50,0x4c]))return _0x335519([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x515d4d=_0x11f1b4(),!_0x515d4d)return _0x335519([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x515d4d[_0x335519([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x4e109f=_0x4bd15d(_0x515d4d[_0x335519([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x515d4d[_0x335519([0x6a,0x74,0x69])])),await _0x13508a()?_0x394f35()?_0x3c252f()?_0x335519([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x50045d()?(_0x515d4d[_0x335519([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x335519([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x9d7be8=_0x57022a(_0x335519([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x515d4d[_0x335519([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x335519([0x74,0x72,0x69,0x61,0x6c])&&(_0x9d7be8=_0x57022a(_0x335519([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4c952d()):_0x335519([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x335519([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x335519([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x335519([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3c252f(){const _0xb688a8=[_0x335519([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x335519([0x74,0x72,0x69,0x61,0x6c])][_0x335519([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x515d4d[_0x335519([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2150de/0x3e8:0xe10*_0x27e6d4;return _0x515d4d[_0x335519([0x65,0x78,0x70])]<_0xb688a8;}function _0x394f35(){const _0x51f091=_0x515d4d[_0x335519([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x51f091)return!0x1;if(_0x51f091[_0x335519([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x335519([0x2a])))return!0x0;if(_0x51f091[_0x335519([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x335519([0x43,0x4d,0x54])))return!0x0;if(_0x51f091[_0x335519([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x335519([0x52,0x43,0x4d,0x54]))){if(_0x137f1d())return!0x0;if(_0x4e2fbc()||_0x3f7c1a())return!0x0;}return!0x1;}function _0x50045d(){const _0x2a830d=_0x515d4d[_0x335519([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2a830d||0x0==_0x2a830d[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4421f7}=new URL(window[_0x335519([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2a830d[_0x335519([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4421f7))return!0x0;const _0xd40362=_0x4421f7[_0x335519([0x73,0x70,0x6c,0x69,0x74])](_0x335519([0x2e]));return _0x2a830d[_0x335519([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x35257b=>_0x35257b[_0x335519([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x335519([0x2a])))[_0x335519([0x6d,0x61,0x70])](_0x112f8d=>_0x112f8d[_0x335519([0x73,0x70,0x6c,0x69,0x74])](_0x335519([0x2e])))[_0x335519([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x7f203b=>_0x7f203b[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xd40362[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x335519([0x6d,0x61,0x70])](_0x50dd43=>Array(_0xd40362[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x50dd43[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x335519([0x66,0x69,0x6c,0x6c])](_0x50dd43[0x0]===_0x335519([0x2a])?_0x335519([0x2a]):'')[_0x335519([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x50dd43))[_0x335519([0x73,0x6f,0x6d,0x65])](_0x2e7411=>_0xd40362[_0x335519([0x65,0x76,0x65,0x72,0x79])]((_0x35db25,_0x1cd81b)=>_0x2e7411[_0x1cd81b]===_0x35db25||_0x2e7411[_0x1cd81b]===_0x335519([0x2a])));}function _0x4c952d(){return _0x9d7be8&&_0x4e109f?new window[(_0x335519([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x487b32,_0x41c129)=>{_0x9d7be8[_0x335519([0x74,0x68,0x65,0x6e])](_0x487b32,_0x41c129),_0x4e109f[_0x335519([0x74,0x68,0x65,0x6e])](_0x2ac683=>{_0x2ac683!=_0x335519([0x56,0x61,0x6c,0x69,0x64])&&_0x487b32(_0x2ac683);},_0x41c129);}):_0x9d7be8||_0x4e109f||_0x335519([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4bd15d(_0x47cc77,_0xd6a877){return new window[(_0x335519([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x427099=>{if(_0xe6bb8a())return _0x427099(_0x335519([0x56,0x61,0x6c,0x69,0x64]));_0xa86dc9(),_0x46e2d3[_0x335519([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x335519([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x54351f=!0x1;const _0x3eee62=_0x54d623();function _0x4d3a3a(_0x4660d2){return!!_0x4660d2&&(typeof _0x4660d2===_0x335519([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4660d2===_0x335519([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4660d2[_0x335519([0x74,0x68,0x65,0x6e])]===_0x335519([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4660d2[_0x335519([0x63,0x61,0x74,0x63,0x68])]===_0x335519([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4872ef(_0x2e118a){_0x4a3995(_0x2e118a)[_0x335519([0x74,0x68,0x65,0x6e])](_0x5b0adf=>{if(!_0x5b0adf||_0x5b0adf[_0x335519([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x335519([0x6f,0x6b]))return _0x335519([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x24b443(_0x5a4c23(_0x3eee62+_0xd6a877))!=_0x5b0adf[_0x335519([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x335519([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x335519([0x56,0x61,0x6c,0x69,0x64]);})[_0x335519([0x74,0x68,0x65,0x6e])](_0x81d4c=>(_0x3bf491(),_0x81d4c),()=>{const _0x4b03c1=_0x430206();return null==_0x4b03c1?(_0x3bf491(),_0x335519([0x56,0x61,0x6c,0x69,0x64])):_0x335519(_0x2150de-_0x4b03c1>(0x44a03f77^_0x1cc913)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x335519([0x74,0x68,0x65,0x6e])](_0x427099)[_0x335519([0x63,0x61,0x74,0x63,0x68])](()=>{_0x427099(_0x335519([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x52f5e1=0x609a55f7^_0x1cc913;function _0x3bf491(){const _0x4fc6fd=_0x335519([0x6c,0x6c,0x63,0x74,0x2d])+_0x24b443(_0x5a4c23(_0x47cc77)),_0x22ec99=_0x77f91(_0x24b443(window[_0x335519([0x4d,0x61,0x74,0x68])][_0x335519([0x63,0x65,0x69,0x6c])](_0x2150de/_0x52f5e1)));window[_0x335519([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x335519([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4fc6fd,_0x22ec99);}function _0x430206(){const _0x2cd080=_0x335519([0x6c,0x6c,0x63,0x74,0x2d])+_0x24b443(_0x5a4c23(_0x47cc77)),_0x4b5312=window[_0x335519([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x335519([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2cd080);return _0x4b5312?window[_0x335519([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x77f91(_0x4b5312),0x10)*_0x52f5e1:null;}function _0x4a3995(_0x2f2a94){return new window[(_0x335519([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15b7d3,_0x24203e)=>{_0x2f2a94[_0x335519([0x74,0x68,0x65,0x6e])](_0x15b7d3,_0x24203e),window[_0x335519([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x24203e,0x60ad6fb7^_0x1cc913);});}}_0x46e2d3[_0x335519([0x6f,0x6e])](_0x335519([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x53a13b,_0x4d3fe0)=>{if(_0x4d3fe0[0x0]!=_0x47cc77)return _0x427099(_0x335519([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4d3fe0[0x1]={..._0x4d3fe0[0x1],[_0x335519([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3eee62};},{[_0x335519([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x335519([0x68,0x69,0x67,0x68])}),_0x46e2d3[_0x335519([0x6f,0x6e])](_0x335519([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x338784=>{_0x4d3a3a(_0x338784[_0x335519([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x54351f=!0x0,_0x4872ef(_0x338784[_0x335519([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x335519([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x335519([0x6c,0x6f,0x77])}),_0xc30568[_0x335519([0x74,0x68,0x65,0x6e])](()=>{_0x54351f||_0x427099(_0x335519([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xe6bb8a(){return _0x46e2d3[_0x335519([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x335519([0x76,0x69,0x65,0x77])][_0x335519([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x335519([0x61,0x75,0x74,0x6f]);}function _0xa86dc9(){_0x46e2d3[_0x335519([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x335519([0x76,0x69,0x65,0x77])][_0x335519([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x335519([0x61,0x75,0x74,0x6f]);}}function _0x57022a(_0x558dbf){const _0x377936=[new window[(_0x335519([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x38ad22=>setTimeout(_0x38ad22,0x60a585bb^_0x1cc913)),_0xc30568[_0x335519([0x74,0x68,0x65,0x6e])](()=>new window[(_0x335519([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4436e6=>{let _0x210105=0x0;_0x46e2d3[_0x335519([0x6d,0x6f,0x64,0x65,0x6c])][_0x335519([0x6f,0x6e])](_0x335519([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xeb5e47,_0x5a0934)=>{_0x5a0934[0x0][_0x335519([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x210105++,_0x210105==(0x60acba8f^_0x1cc913)&&(_0x4436e6(),_0xeb5e47[_0x335519([0x6f,0x66,0x66])]());});}))];return window[_0x335519([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x335519([0x72,0x61,0x63,0x65])](_0x377936)[_0x335519([0x74,0x68,0x65,0x6e])](()=>_0x558dbf);}async function _0x50e2b2(){await _0xc30568,_0x46e2d3[_0x335519([0x6d,0x6f,0x64,0x65,0x6c])][_0x335519([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xfb0601,_0x46e2d3[_0x335519([0x6d,0x6f,0x64,0x65,0x6c])][_0x335519([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xfb0601,_0x46e2d3[_0x335519([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x335519([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x137f1d(){return _0x3db02c(_0x335519([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xc83b46(_0x335519([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x335519([0x73,0x74,0x61,0x74,0x65])]==_0x335519([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4e2fbc(){return _0x3db02c(_0x335519([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 _0x3f7c1a(){return _0x3db02c(_0x335519([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4ee946(_0x2c9ee9){const _0x103c8b=_0x33feb0();_0x46e2d3[_0x103c8b]=_0x335519([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2c9ee9,_0x2c9ee9!=_0x335519([0x56,0x61,0x6c,0x69,0x64])&&_0x50e2b2();}function _0x33feb0(){const _0xaa3851=window[_0x335519([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x335519([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x335519([0x6e,0x6f,0x77])]())[_0x335519([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x335519([0x2e]),'');let _0x5622d6=_0x335519([0x6e]);for(let _0x25723d=0x0;_0x25723d<_0xaa3851[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25723d+=0x2){let _0x198e2f=window[_0x335519([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xaa3851[_0x335519([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x25723d,_0x25723d+0x2));_0x198e2f>=_0x553a0c[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x198e2f-=_0x553a0c[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5622d6+=_0x553a0c[_0x198e2f];}return _0x5622d6;}function _0x11f1b4(){const _0x2e8c86=_0x1e823d[_0x335519([0x73,0x70,0x6c,0x69,0x74])](_0x335519([0x2e]));if(0x3!=_0x2e8c86[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xe10c67(_0x2e8c86[0x1]);function _0xe10c67(_0x1e15ee){const _0x2f29e5=_0x49948d(_0x1e15ee);return _0x2f29e5&&_0x3d5c96()?_0x2f29e5:null;function _0x3d5c96(){const _0x62fea=_0x2f29e5[_0x335519([0x6a,0x74,0x69])],_0x331cfa=window[_0x335519([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x62fea[_0x335519([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x62fea[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x159b36={..._0x2f29e5,[_0x335519([0x6a,0x74,0x69])]:_0x62fea[_0x335519([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x62fea[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x159b36[_0x335519([0x76,0x63])],_0x5a4c23(_0x159b36)==_0x331cfa;}}}async function _0x13508a(){let _0x299684=!0x0;try{const _0x1446a2=_0x1e823d[_0x335519([0x73,0x70,0x6c,0x69,0x74])](_0x335519([0x2e])),[_0x39f583,_0x4582ff,_0x51447f]=_0x1446a2;return _0x15a689(_0x39f583),await _0x5f0334(_0x39f583,_0x4582ff,_0x51447f),_0x299684;}catch{return!0x1;}function _0x15a689(_0x22cfb2){const _0x157e99=_0x49948d(_0x22cfb2);_0x157e99&&_0x157e99[_0x335519([0x61,0x6c,0x67])]==_0x335519([0x45,0x53,0x32,0x35,0x36])||(_0x299684=!0x1);}async function _0x5f0334(_0x22ce23,_0x2078c8,_0x15d71c){const _0x48f138=window[_0x335519([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x335519([0x66,0x72,0x6f,0x6d])](_0x47919f(_0x15d71c),_0x12afe1=>_0x12afe1[_0x335519([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x384aa0=new window[(_0x335519([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x335519([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x22ce23+_0x335519([0x2e])+_0x2078c8),_0xdc7aef=window[_0x335519([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x335519([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xdc7aef)return;const _0x29f19c=await _0xdc7aef[_0x335519([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x335519([0x6a,0x77,0x6b]),_0x4ddf3e,{[_0x335519([0x6e,0x61,0x6d,0x65])]:_0x335519([0x45,0x43,0x44,0x53,0x41]),[_0x335519([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x335519([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x335519([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xdc7aef[_0x335519([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x335519([0x6e,0x61,0x6d,0x65])]:_0x335519([0x45,0x43,0x44,0x53,0x41]),[_0x335519([0x68,0x61,0x73,0x68])]:{[_0x335519([0x6e,0x61,0x6d,0x65])]:_0x335519([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x29f19c,_0x48f138,_0x384aa0)||(_0x299684=!0x1);}}function _0x49948d(_0x450b7){return _0x450b7[_0x335519([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x335519([0x65,0x79]))?JSON[_0x335519([0x70,0x61,0x72,0x73,0x65])](_0x47919f(_0x450b7)):null;}function _0x47919f(_0xaf11ac){return window[_0x335519([0x61,0x74,0x6f,0x62])](_0xaf11ac[_0x335519([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x335519([0x2b]))[_0x335519([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x335519([0x2f])));}function _0x5a4c23(_0x2754cb){let _0x1717ae=0x1505;function _0x516c40(_0x18d108){for(let _0xae9c7c=0x0;_0xae9c7c<_0x18d108[_0x335519([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xae9c7c++){const _0x4e6972=_0x18d108[_0x335519([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xae9c7c);_0x1717ae=(_0x1717ae<<0x5)+_0x1717ae+_0x4e6972,_0x1717ae&=_0x1717ae;}}function _0x2867e1(_0x299710){Array[_0x335519([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x299710)?_0x299710[_0x335519([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2867e1):_0x299710&&typeof _0x299710==_0x335519([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x335519([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x299710)[_0x335519([0x73,0x6f,0x72,0x74])]()[_0x335519([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5d96b1,_0x5c20bc])=>{_0x516c40(_0x5d96b1),_0x2867e1(_0x5c20bc);}):_0x516c40(window[_0x335519([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x299710));}return _0x2867e1(_0x2754cb),_0x1717ae>>>0x0;}function _0x24b443(_0x1b3085){return _0x1b3085[_0x335519([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x335519([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x335519([0x30]));}function _0x77f91(_0x50faac){return _0x50faac[_0x335519([0x73,0x70,0x6c,0x69,0x74])]('')[_0x335519([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x335519([0x6a,0x6f,0x69,0x6e])]('');}function _0x3db02c(_0x452240){return _0x46e2d3[_0x335519([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x335519([0x68,0x61,0x73])](_0x452240);}function _0xc83b46(_0x2fa36b){return _0x46e2d3[_0x335519([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x335519([0x67,0x65,0x74])](_0x2fa36b);}function _0xfb0601(){}function _0x335519(_0x46bbec){return _0x46bbec['map'](_0x5e4fce=>String['fromCharCode'](_0x5e4fce))['join']('');}_0x4ee946(await _0x2df6da());}(this);}['destroy'](){const _0x3e1040=this['editor']['plugins']['get'](o),_0x5b7a2b=this['editor']['config']['get']('collaboration.channelId');for(const _0x38ba4b of _0x3e1040['getCommentThreads']({'channelId':_0x5b7a2b}))_0x3e1040['_detachCommentThread'](_0x38ba4b['id']),_0x3e1040['_threads']['delete'](_0x38ba4b['id']);super['destroy']();}['hasMarkerForId'](_0x1188ef){return this['getAllMarkersForId'](_0x1188ef)['length']>0x0;}['getAllMarkersForId'](_0x26e8ac){const _0x124904=[];for(const _0x2cf49d of this['editor']['model']['markers'])_0x2cf49d['name']['startsWith']('comment:'+_0x26e8ac)&&_0x124904['push'](_0x2cf49d);return _0x124904;}['scrollToThreadMarker'](_0x244b2b){const _0x57f379=this['_getTargetForId'](_0x244b2b);_0x57f379&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x244b2b&&rt({'target':_0x57f379[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x331617){this['editor']['model']['change'](()=>{for(const _0x2af4c3 of this['getAllMarkersForId'](_0x331617))this['editor']['editing']['reconvertMarker'](_0x2af4c3);});}['_attachArchivedThread'](_0x9b653c){const _0x249bf2=this['editor']['plugins']['get'](o),_0x5828da=this['editor']['plugins']['get'](P),_0x1e92ad=_0x249bf2['getCommentThread'](_0x9b653c);if(!_0x1e92ad['isAttached']){const _0x356064=_0x1e92ad['attachTo'](()=>this['_getTargetForId'](_0x1e92ad['id']));_0x5828da['registerAnnotation'](_0x356064),_0x1e92ad['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x15b0cf=this['editor'],_0x25e761=_0x15b0cf['plugins']['get'](st);_0x15b0cf['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x280c97,_0x52f801)=>{const {id:_0x873a6a}=er(_0x280c97['markerName']),_0x4af848=_0x15b0cf['plugins']['get'](o)['getCommentThread'](_0x873a6a),_0x3a3676=this['activeMarker']&&er(this['activeMarker'])['id']===_0x873a6a;let _0x4d0165;if(_0x4af848&&_0x4af848['isResolved']&&!_0x3a3676&&_0x280c97['item'])return _0x52f801['consumable']['consume'](_0x280c97['item'],'addMarker:'+_0x280c97['markerName']),_0x52f801['consumable']['consume'](_0x280c97['item'],'removeMarker:'+_0x280c97['markerName']),null;const _0x1a50c8=['ck-comment-marker'];return _0x3a3676&&_0x1a50c8['push']('ck-comment-marker--active'),_0x4d0165=_0x4af848?.['length']?_0x4af848['comments']['first']['author']['id']:_0x25e761['me']['id'],{'classes':_0x1a50c8,'attributes':{'data-comment':_0x873a6a,'data-author-id':_0x4d0165}};}}),_0x15b0cf['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1b93a8,{options:_0x57572f})=>{if(_0x57572f['showCommentHighlights'])return null;const _0x118cec=_0x15b0cf['plugins']['get'](o),_0x6561c7=_0x15b0cf['model']['markers']['get'](_0x1b93a8),{id:_0x381392,part:_0x10db3f}=er(_0x1b93a8);return _0x6561c7&&!_0x6561c7['affectsData']||_0x57572f['ignoreResolvedComments']&&_0x118cec['getCommentThread'](_0x381392)?.['isResolved']?null:{'group':'comment','name':_0x10db3f?_0x381392+':'+_0x10db3f:_0x381392};}}),_0x15b0cf['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x59c2c7,{writer:_0x373a40})=>_0x373a40['createElement']('$marker',{'data-name':'comment:'+_0x59c2c7['getAttribute']('id')})}),_0x15b0cf['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x117e01=this['editor'],_0x318476=_0x117e01['plugins']['get'](o),_0x245be3=new Set(),_0x59407e=new Set();_0x117e01['model']['document']['registerPostFixer'](_0x55fdc8=>{let _0x2bbd34=!0x1;for(const {name:_0x451cf6,data:_0x341312}of _0x117e01['model']['document']['differ']['getChangedMarkers']()){const {group:_0x437ca2,id:_0x30d860}=er(_0x451cf6);let _0xe8993c=_0x341312['newRange'];if('comment'!==_0x437ca2||!_0xe8993c)continue;const _0x4935da='$graveyard'===_0xe8993c['root']['rootName'];_0x4935da||(_0xe8993c=mt(_0xe8993c,_0x117e01['model']),!_0xe8993c||_0xe8993c['isCollapsed']||!_0x341312['newRange']||_0xe8993c['isEqual'](_0x341312['newRange']))?_0x117e01['model']['hasContent'](_0xe8993c)&&!_0x4935da?this['isThreadsLoadingPaused']?_0x245be3['add'](_0x451cf6):this['_handleThreadMarker'](_0x451cf6,_0x30d860):(_0x59407e['add'](_0x451cf6),_0x245be3['delete'](_0x451cf6),_0x55fdc8['removeMarker'](_0x451cf6),_0x2bbd34=!0x0):(_0x55fdc8['updateMarker'](_0x451cf6,{'range':_0xe8993c}),_0x2bbd34=!0x0);}return _0x2bbd34;}),this['on']('change:isThreadsLoadingPaused',(_0x2a73a3,_0x121aa2,_0x4d05d7)=>{if(!_0x4d05d7&&_0x245be3['size'])for(const _0xa88431 of _0x245be3){const {id:_0x2babc8}=er(_0xa88431);_0x245be3['delete'](_0xa88431),_0x117e01['model']['markers']['get'](_0xa88431)&&this['_handleThreadMarker'](_0xa88431,_0x2babc8);}}),this['listenTo'](_0x117e01['model']['document'],'change',()=>{for(const {name:_0xf2d08c,data:{newRange:_0x44b314}}of _0x117e01['model']['document']['differ']['getChangedMarkers']()){const {group:_0x223dab,id:_0x58e47b}=er(_0xf2d08c);if('comment'!==_0x223dab)continue;const _0xb88624=_0x318476['getCommentThread'](_0x58e47b),_0x512975=this['hasMarkerForId'](_0x58e47b);_0xb88624&&(!_0xb88624['_hasTargetInContent']&&_0x44b314&&_0x117e01['editing']['view']['once']('render',()=>{const _0x4a7a3c=_0x117e01['plugins']['get'](O),_0x81cc3e=_0x318476['_threadToController']['get'](_0xb88624)['view'];_0x4a7a3c['getByInnerView'](_0x81cc3e)['refreshVisibility']();},{'priority':'low'}),_0xb88624['_hasTargetInContent']=_0x512975||!!_0x44b314),_0x44b314||(_0x59407e['add'](_0xf2d08c),_0x245be3['delete'](_0xf2d08c));}for(const _0x2ba005 of _0x59407e){const {id:_0x295399}=er(_0x2ba005),_0x402cbe=_0x318476['getCommentThread'](_0x295399);if(_0x245be3['delete'](_0x2ba005),!_0x402cbe)continue;const _0x2ef11a=this['hasMarkerForId'](_0x295399);_0x2ef11a||_0x402cbe['isSubmitted']?_0x2ef11a||_0x402cbe['unlinkedAt']||_0x402cbe['setUnlinkedAt'](new Date()):_0x402cbe['remove']();}_0x59407e['clear']();});}['_handleInitialThreads'](_0x2636b4){_0x2636b4['forEach'](_0x3ff339=>{_0x3ff339['unlinkedAt']&&this['_attachArchivedThread'](_0x3ff339['id']);});}['_getTargetForId'](_0x49404e){const _0x461d92=this['editor'],_0x51ee1c=this['getAllMarkersForId'](_0x49404e);return et(_0x461d92['editing'],_0x51ee1c);}['_getTextContext'](_0x41d388){const _0xa17d1e=this['getAllMarkersForId'](_0x41d388);let _0x2fc65b='',_0x398c29=!0x1;for(const _0x1f790f of _0xa17d1e){const _0x212992=_0x1f790f['getRange']();for(const _0x4b30b1 of Array['from'](_0x212992['getItems']()))_0x4b30b1['is']('$textProxy')?(_0x2fc65b&&_0x398c29&&(_0x2fc65b+='\x20',_0x398c29=!0x1),_0x2fc65b+=_0x4b30b1['data']):_0x398c29=!0x0;_0x398c29=!0x0;}return _0x2fc65b['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x409de6,_0x5ab2af){const _0xb29ab0=this['editor'],_0x4ae80c=_0xb29ab0['plugins']['get'](o);let _0x593b37=_0x4ae80c['getCommentThread'](_0x5ab2af);const _0x1ffbd4=_0xb29ab0['config']['get']('collaboration.channelId'),_0x2aaa77=_0xb29ab0['plugins']['get'](P);if(_0x593b37&&(_0x593b37['unlinkedAt']&&_0x593b37['setUnlinkedAt'](null),_0x593b37['isAttached']))return _0x593b37;return!this['getAllMarkersForId'](_0x5ab2af)[0x0]['managedUsingOperations']?_0xb29ab0['editing']['view']['once']('render',()=>{if(_0x4ae80c['getCommentThread'](_0x5ab2af))return;const _0x325e7d=_0xb29ab0['plugins']['get'](O);_0x593b37=_0x4ae80c['openNewCommentThread']({'channelId':_0x1ffbd4,'threadId':_0x5ab2af,'target':()=>this['_getTargetForId'](_0x5ab2af),'context':{'type':'text','value':this['_getTextContext'](_0x5ab2af)}});const _0x15fe8b=_0x4ae80c['_threadToController']['get'](_0x593b37)['view'],_0x2a5413=_0x325e7d['getByInnerView'](_0x15fe8b);_0x2a5413&&_0x2aaa77['registerAnnotation'](_0x2a5413);},{'priority':'low'}):_0x4ae80c['fetchCommentThread']({'channelId':_0x1ffbd4,'threadId':_0x5ab2af})['then'](_0x54eba4=>{if('destroyed'!==_0xb29ab0['state']){if(_0x593b37=_0x54eba4,_0x593b37&&!_0x593b37['isAttached']){const _0x881a32=_0x593b37['attachTo'](()=>this['_getTargetForId'](_0x5ab2af));_0x2aaa77['registerAnnotation'](_0x881a32),_0x593b37['isResolved']&&this['_reconvertMarkers'](_0x5ab2af);}else{if(!_0x593b37){const _0x450fdc=this['getAllMarkersForId'](_0x5ab2af);_0xb29ab0['model']['change'](_0x36f7f5=>{for(const _0x439aea of _0x450fdc)_0x36f7f5['removeMarker'](_0x439aea);});}}}}),_0x593b37;}['_handleThreadMarker'](_0x330be7,_0x1e0efd){const _0xaa4e6c=this['_attachMarkerToThread'](_0x330be7,_0x1e0efd);_0xaa4e6c&&!_0xaa4e6c['context']&&_0xaa4e6c['setContext']({'type':'text','value':this['_getTextContext'](_0x1e0efd)});}['_initAriaMarkerChangeAnnouncements'](){const _0x926659=this['editor'];ot(_0x926659['model'],({left:_0x31c02a,entered:_0x576bc8})=>{for(const _0x4a90c2 of _0x31c02a)if(ht(_0x4a90c2)){_0x926659['ui']['ariaLiveAnnouncer']['announce'](E(_0x926659['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4718c3 of _0x576bc8)if(ht(_0x4718c3)){_0x926659['ui']['ariaLiveAnnouncer']['announce'](E(_0x926659['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x1b4f5c)));break;}});}}function dt(_0x4758a1,_0x35d96c){return _0x35d96c?_0x4758a1+':'+_0x35d96c:_0x4758a1;}function er(_0x6cf90f){const _0x4cf7ef=_0x6cf90f['split'](':');return{'group':_0x4cf7ef[0x0],'id':_0x4cf7ef[0x1],'part':_0x4cf7ef[0x2]};}function mt(_0x4a3c85,_0x692cd9){const _0x4e5068=_0x692cd9['schema'],_0x45e1ed=_0x692cd9['createRange'](_0x4a3c85['start']);for(const _0x397b6b of _0x4a3c85['getWalker']()){const {type:_0x59c4f1,item:_0x29b412,nextPosition:_0x76bb92}=_0x397b6b;if('text'===_0x59c4f1||_0x4e5068['isObject'](_0x29b412)){const _0x2b2a38=_0x692cd9['createPositionBefore'](_0x29b412);_0x45e1ed['isCollapsed']&&(_0x45e1ed['start']=_0x2b2a38),_0x45e1ed['end']=_0x76bb92;}}return _0x45e1ed;}function ht(_0x1da88c){return'comment'===er(_0x1da88c['name'])['group'];}class i extends _0xab089d{['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 _0x2b53dc=this['editor'],_0x1026a7=_0x2b53dc['plugins']['get'](o),_0x505839=_0x2b53dc['plugins']['get'](r),_0x148aa9=_0x2b53dc['plugins']['get'](O),_0x422ab6=_0x2b53dc['plugins']['get'](P);_0x2b53dc['ui']['componentFactory']['add']('comment',()=>{const _0x5f46b1=this['_createUIButton'](_0x2ab1c0);return _0x5f46b1['tooltip']=!0x0,_0x5f46b1;}),_0x2b53dc['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x515bee)),_0x422ab6['addSourceCollector'](()=>{const _0x4afca7=[];for(const [_0x34f335,_0x16002f]of _0x1026a7['_threadToController']){const _0x1e8bfd=_0x505839['getAllMarkersForId'](_0x34f335['id']),_0x4debe2=_0x1e8bfd['map'](_0x498eec=>_0x498eec['getRange']());_0x1e8bfd['length']>0x0&&_0x4afca7['push']([_0x16002f['view'],_0x4debe2]);}return _0x4afca7;}),this['listenTo'](_0x148aa9,'change:activeAnnotations',(_0x434cc7,_0x32d459,_0xf5a0c3)=>{const _0x30f269=Array['from'](_0xf5a0c3)['map'](_0x11c74f=>_0x11c74f['innerView'])['find'](_0x47e161=>_0x1026a7['_viewToController']['has'](_0x47e161));if(!_0x30f269)return void(_0x505839['activeMarker']=null);const _0x414737=_0x1026a7['_viewToController']['get'](_0x30f269)['model']['id'],_0x2cf71f='comment:'+_0x414737;_0x414737&&_0x505839['hasMarkerForId'](_0x414737)?_0x505839['activeMarker']=_0x2cf71f:_0x505839['activeMarker']&&(_0x505839['activeMarker']=null);}),this['listenTo'](_0x1026a7,'removeCommentThread',(_0x3d3cf0,{threadId:_0x38171d,isFromAdapter:_0x9a2a60})=>{!_0x9a2a60&&_0x2b53dc['ui']['focusTracker']['isFocused']&&_0x505839['hasMarkerForId'](_0x38171d)&&_0x2b53dc['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x1026a7,'addComment',(_0x15a4ad,{threadId:_0x399088,isFromAdapter:_0x333595})=>{if(_0x333595||!_0x505839['hasMarkerForId'](_0x399088)||!_0x1026a7['hasCommentThread'](_0x399088))return;0x1===_0x1026a7['getCommentThread'](_0x399088)['length']&&(_0x2b53dc['editing']['view']['focus'](),_0x15a4ad['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x899e2b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x42804a;for(const _0x184542 in _0x899e2b){const _0x1feb01=_0x184542,_0x6ebfa9=_0x899e2b[_0x1feb01];if('commentsLicenseKeyValid'==_0x6ebfa9||'commentsLicenseKeyInvalid'==_0x6ebfa9||'commentsLicenseKeyExpired'==_0x6ebfa9||'commentsLicenseKeyDomainLimit'==_0x6ebfa9||'commentsLicenseKeyNotAllowed'==_0x6ebfa9||'commentsLicenseKeyEvaluationLimit'==_0x6ebfa9||'commentsLicenseKeyTrialLimit'==_0x6ebfa9||'commentsLicenseKeyUsageLimit'==_0x6ebfa9){delete _0x899e2b[_0x1feb01],_0x42804a=_0x6ebfa9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x42804a&&_0x899e2b['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x42804a&&_0x899e2b['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x42804a&&_0x899e2b['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x42804a&&_0x899e2b['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x42804a&&_0x899e2b['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x42804a&&_0x899e2b['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x42804a&&_0x899e2b['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x16d832){const _0x1c82a1=this['editor'],_0x14c950=new _0x16d832(_0x1c82a1['locale']),_0x3eb0bc=_0x1c82a1['commands']['get']('addCommentThread');return _0x14c950['set']({'label':E(_0x1c82a1['locale'],'Comment'),'icon':_0x5ece7c}),_0x14c950['bind']('isEnabled')['to'](_0x3eb0bc),this['listenTo'](_0x14c950,'execute',()=>{_0x3eb0bc['execute']();}),_0x14c950;}}class s extends _0xab089d{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x505aec){super(_0x505aec),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4f8ac9,_0x584da8,_0x434a2e)=>{_0x434a2e?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5d5412,_0x46b824]of this['editor']['commands'])_0x46b824['affectsData']&&'addCommentThread'!==_0x5d5412&&_0x46b824['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 _0x54aa64=this['editor']['editing']['view']['document'];this['listenTo'](_0x54aa64,'cut',_0x275cf1=>_0x275cf1['stop'](),{'priority':'highest'}),this['listenTo'](_0x54aa64,'clipboardInput',_0x1223d1=>_0x1223d1['stop'](),{'priority':'highest'}),this['listenTo'](_0x54aa64,'delete',_0x1c5132=>_0x1c5132['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4a89ad,_0x19129d]of this['editor']['commands'])_0x19129d['affectsData']&&'addCommentThread'!==_0x4a89ad&&_0x19129d['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 _0x45eb44{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f45bc){super(_0x5f45bc),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x64fc61=this['context']['plugins']['get'](O);this['listenTo'](_0x64fc61,'_activateAnnotation',(_0x198281,_0x4a768d)=>{for(const _0x16ce64 of this['activeUIs']){const _0x19c4f9=this['_uis']['get'](_0x16ce64);(0x0,this['uisData']['get'](_0x16ce64)['filter'])(_0x4a768d)&&_0x19c4f9['setActiveAnnotation'](_0x4a768d);}}),this['listenTo'](_0x64fc61,'_deactivateAllAnnotations',()=>{for(const _0x532d18 of this['activeUIs']){this['_uis']['get'](_0x532d18)['setActiveAnnotation'](null);}}),this['listenTo'](_0x64fc61['_visibleAnnotations'],'add',(_0x457f91,_0x356720)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x356720);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x24c11c){return this['activeUIs']['has'](_0x24c11c);}['activate'](_0x33a619,_0x191b29=this['defaultFilter']){const _0x231323=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x33a619))throw new _0x2868b4('annotationsuis-missing-ui',this,{'uiName':_0x33a619});this['isActive'](_0x33a619)&&this['deactivate'](_0x33a619),this['activeUIs']['add'](_0x33a619);const _0x4cade0=new _();!function({source:_0x181683,target:_0x1f06ec,filter:_0x35c8bf}){for(const _0x1e5558 of _0x181683)_0x35c8bf(_0x1e5558)&&_0x1f06ec['add'](_0x1e5558);_0x1f06ec['listenTo'](_0x181683,'add',(_0x53c5ff,_0x1e2c4b)=>{_0x35c8bf(_0x1e2c4b)&&_0x1f06ec['add'](_0x1e2c4b);}),_0x1f06ec['listenTo'](_0x181683,'remove',(_0x1f7fdb,_0x4e523a)=>{_0x1f06ec['has'](_0x4e523a)&&_0x1f06ec['remove'](_0x4e523a);});}({'source':_0x231323['_visibleAnnotations'],'target':_0x4cade0,'filter':_0x191b29}),this['uisData']['set'](_0x33a619,{'collection':_0x4cade0,'filter':_0x191b29});const _0x913d0a=this['_uis']['get'](_0x33a619);_0x913d0a['attach'](_0x4cade0),this['listenTo'](_0x913d0a,'change:activeAnnotation',(_0x2901aa,_0x45ee02,_0x53417a,_0x2ed08e)=>{_0x2ed08e&&_0x231323['_removeActiveAnnotation'](_0x2ed08e),_0x53417a&&_0x231323['_addActiveAnnotation'](_0x53417a);});}['deactivate'](_0x284d19){if(this['activeUIs']['delete'](_0x284d19),!this['_uis']['has'](_0x284d19))throw new _0x2868b4('annotationsuis-missing-ui',this,{'uiName':_0x284d19});const _0x2ac37f=this['_uis']['get'](_0x284d19);_0x2ac37f['detach'](),this['stopListening'](_0x2ac37f),this['uisData']['get'](_0x284d19)['collection']['destroy'](),this['uisData']['delete'](_0x284d19);}['switchTo'](_0x46ce1f){if(!this['_uis']['has'](_0x46ce1f))throw new _0x2868b4('annotationsuis-missing-ui',this,{'uiName':_0x46ce1f});const _0x3c56f8=this['context']['plugins']['get'](O),_0x178028=Array['from'](_0x3c56f8['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x46ce1f);const _0xcee6f6=this['_uis']['get'](_0x46ce1f);_0xcee6f6['setActiveAnnotation'](_0x178028),_0xcee6f6['_setSelectedAnnotations']&&_0x178028&&_0xcee6f6['_setSelectedAnnotations']([_0x178028]);}['deactivateAll'](){for(const _0x5e27d5 of this['activeUIs'])this['deactivate'](_0x5e27d5);}['register'](_0x22ba5e,_0x5174e7){if(this['_uis']['has'](_0x22ba5e))throw new _0x2868b4('annotationsuis-register-already-registered');if('function'!=typeof _0x5174e7['attach']||'function'!=typeof _0x5174e7['detach']||'function'!=typeof _0x5174e7['setActiveAnnotation'])throw new _0x2868b4('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x22ba5e,_0x5174e7);}['refilterAnnotations'](){const _0x364c64=this['context']['plugins']['get'](O)['collection'],_0x32779d=new Map(),_0x366e45=Array['from'](this['activeUIs']);for(const _0x222072 of this['activeUIs']){const _0x195d69=this['uisData']['get'](_0x222072)['collection'];for(const _0x563643 of _0x195d69)_0x32779d['set'](_0x563643,_0x222072);}for(const _0x597710 of _0x364c64){const _0x4fcb3a=_0x32779d['get'](_0x597710);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x597710);const _0x299be3=_0x366e45['find'](_0x5ea457=>this['uisData']['get'](_0x5ea457)['filter'](_0x597710));_0x4fcb3a!==_0x299be3&&(_0x4fcb3a&&this['uisData']['get'](_0x4fcb3a)['collection']['remove'](_0x597710),_0x299be3&&this['uisData']['get'](_0x299be3)['collection']['add'](_0x597710));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x121e66){const _0x243a8a=[];for(const _0x44d7cf of this['activeUIs']){(0x0,this['uisData']['get'](_0x44d7cf)['filter'])(_0x121e66)&&_0x243a8a['push'](_0x44d7cf);}if(_0x243a8a['length']>0x1)throw new _0x2868b4('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x243a8a,'annotationType':_0x121e66['type']});}}const pi=xt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x489f35){super(_0x489f35);const _0x549b7e=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 _0x1f4456(),this['focusCycler']=new _0xc22f23({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x549b7e['to']('class')],'style':{'minHeight':_0x549b7e['to']('minHeight',_0x2ecc4f=>'number'==typeof _0x2ecc4f?pi(_0x2ecc4f+0xa):null)},'dir':_0x489f35['uiLanguageDirection'],'role':'application','aria-label':E(_0x489f35,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x489f35,'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',_0x1f9eb0=>{this['_updateItemPositionInFocusables'](_0x1f9eb0['source']);}),this['list']['forEach'](_0x14b25b=>{this['focusTracker']['add'](_0x14b25b['element']),this['_updateItemPositionInFocusables'](_0x14b25b);}),this['list']['on']('change',(_0x4b32d8,_0x5da976)=>{for(const _0x567cff of _0x5da976['removed'])this['focusTracker']['remove'](_0x567cff['element']),this['focusables']['remove'](_0x567cff);for(const _0x2c1374 of _0x5da976['added'])this['focusTracker']['add'](_0x2c1374['element']),this['_updateItemPositionInFocusables'](_0x2c1374);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2b7962){const _0x183603=this['focusables']['getIndex'](_0x2b7962);let _0x535146,_0x3da211;for(const _0x524140 of this['focusables'])if(_0x2b7962['top']<_0x524140['top']){_0x535146=_0x524140;break;}if(_0x3da211=_0x535146?this['focusables']['getIndex'](_0x535146):this['focusables']['length'],-0x1!==_0x183603){if(_0x183603===_0x3da211-0x1)return;this['focusables']['remove'](_0x2b7962),_0x3da211=_0x535146?this['focusables']['getIndex'](_0x535146):this['focusables']['length'];}this['focusables']['add'](_0x2b7962,_0x3da211);}}const Ht=xt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x283029){super(_0x283029),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x3807e1,_0x5e608b)=>_0x3807e1+_0x5e608b),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x593bd0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x593bd0['to']('isAnimationDisabled',_0x170265=>_0x170265?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x593bd0['to']('top',_0x2ec95e=>Ht(_0x2ec95e))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1cfe98=this['element']['clientHeight'];_0x1cfe98&&(this['height']=_0x1cfe98);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x45eb44{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22d167){super(_0x22d167),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 _0x35096a=this['context']['config']['get']('sidebar.container');_0x35096a&&this['setContainer'](_0x35096a);}['setContainer'](_0xd0c627){if(!y(_0xd0c627))throw new _0x2868b4('sidebar-setcontainer-invalid-element');this['container']=_0xd0c627;}['_attachToContainer']({viewClass:_0x5967fb='',spaceBetweenItems:_0x1481d6=0x19}={}){if(!y(this['container']))throw new _0x2868b4('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5967fb,this['_spaceBetweenItems']=_0x1481d6;}['rearrange']({removedAnnotation:_0x2d8b7c,previousAnnotation:_0x5e7e41,nextAnnotation:_0x369ac8}){const _0x36798b=this['getSidebarItemView'](_0x2d8b7c);this['view']['list']['remove'](_0x36798b),this['_destroySidebarItemView'](_0x2d8b7c),_0x5e7e41&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5e7e41)),_0x369ac8&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x369ac8)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x29f269,activatedAnnotation:_0x5ae5f3,disableAnimationOnActivatedAnnotation:_0x33e8ca}){if(this['_activeAnnotation']=_0x5ae5f3,_0x29f269){_0x29f269['isActive']=!0x1;const _0x3effdd=this['getSidebarItemView'](_0x29f269);_0x3effdd&&_0x33e8ca&&(_0x3effdd['isAnimationDisabled']=!0x1);}if(_0x5ae5f3){const _0xc84d1e=this['getSidebarItemView'](_0x5ae5f3);_0xc84d1e&&(_0x5ae5f3['isActive']=!0x0,_0x33e8ca&&(_0xc84d1e['isAnimationDisabled']=!0x0,_0xc84d1e['top']+=0x1),this['_alignToTargetRect'](_0xc84d1e));}}['_detachFromContainer'](_0x2c0c9f){if(this['view']['element']['remove'](),_0x2c0c9f){for(const _0x248746 of _0x2c0c9f)this['_destroySidebarItemView'](_0x248746);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3d9a28,_0x17e16e){_0x17e16e||(_0x17e16e=_0x3d9a28['view']);const _0x4a9f8f=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4a9f8f,_0x3d9a28),this['_annotationToSidebarItemView']['set'](_0x3d9a28,_0x4a9f8f),_0x4a9f8f['content']['add'](_0x17e16e),this['listenTo'](_0x3d9a28['view'],'change:targetRect',(_0x3af312,_0x22fec1,_0x3048d5)=>{const _0x166d24=this['_getTargetTop'](_0x3d9a28,_0x3048d5);_0x4a9f8f['_targetTop']!=_0x166d24&&(_0x4a9f8f['_targetTop']=_0x166d24,this['_setItemTop'](_0x4a9f8f,_0x166d24));}),this['listenTo'](_0x4a9f8f,'change:top',()=>{this['_recalculate'](_0x4a9f8f,'top');}),this['listenTo'](_0x4a9f8f,'change:bottom',()=>{this['_recalculate'](_0x4a9f8f,'bottom');}),this['_alignToTargetRect'](_0x4a9f8f);const _0x334648=this['_getItemBefore'](_0x4a9f8f);if(_0x334648)this['_alignAfterItem'](_0x334648,_0x4a9f8f)||this['_alignToTargetRect'](_0x4a9f8f);else this['_alignToTargetRect'](_0x4a9f8f);return this['_updateLastItem'](),this['view']['list']['add'](_0x4a9f8f),_0x4a9f8f;}['_alignForTopChange'](_0x37b95a){if(!_0x37b95a['content']['length'])return;const _0x3ba602=this['_getItemBefore'](_0x37b95a);if(!_0x3ba602)return;const _0x30317d=this['_sidebarItemViewToAnnotation']['get'](_0x3ba602),_0x1d440c=this['_activeAnnotation'];_0x1d440c&&_0x1d440c===_0x30317d?this['_alignAfterItem'](_0x3ba602,_0x37b95a):this['_alignBeforeItem'](_0x37b95a,_0x3ba602);}['_alignForBottomChange'](_0x3c3050){if(!_0x3c3050['content']['length'])return;const _0x14d670=this['_getItemAfter'](_0x3c3050);if(!_0x14d670)return;const _0x39751c=this['_sidebarItemViewToAnnotation']['get'](_0x14d670),_0x1179d4=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5f1672=this['_activeAnnotation'];_0x5f1672&&_0x5f1672===_0x39751c&&_0x1179d4?(this['_alignBeforeItem'](_0x14d670,_0x3c3050),this['_alignAfterItem'](_0x3c3050,_0x14d670)):_0x5f1672&&_0x5f1672===_0x39751c?this['_alignBeforeItem'](_0x14d670,_0x3c3050):this['_alignAfterItem'](_0x3c3050,_0x14d670);}['_recalculate'](_0x7b824b,_0x1260b6){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x28730f,changedProp:_0x1c2c29}of this['_recalculateBuffer'])'top'===_0x1c2c29?this['_alignForTopChange'](_0x28730f):this['_alignForBottomChange'](_0x28730f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x7b824b,'changedProp':_0x1260b6});}['getSidebarItemView'](_0x39549d){return this['_annotationToSidebarItemView']['get'](_0x39549d);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x59bfd0){const _0x554995=this['getSidebarItemView'](_0x59bfd0);this['stopListening'](_0x554995),this['stopListening'](_0x59bfd0['view']),_0x554995['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x59bfd0),this['_sidebarItemViewToAnnotation']['delete'](_0x554995);}['_createSidebarView'](){const _0x2fadc7=new H(this['context']['locale']);return _0x2fadc7['render'](),this['on']('change:_lastItem',(_0x72ebd8,_0x229582,_0x20c2ef,_0x2ab697)=>{_0x2ab697&&_0x2fadc7['unbind']('minHeight'),_0x20c2ef?_0x2fadc7['bind']('minHeight')['to'](_0x20c2ef,'bottom'):_0x2fadc7['minHeight']=null;}),_0x2fadc7;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1a619f){const _0x11994e=this['_sidebarItemViewToAnnotation']['get'](_0x1a619f),_0x59e8f7=_0x11994e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x11994e)-0x1);return _0x59e8f7&&this['getSidebarItemView'](_0x59e8f7)||null;}['_getItemAfter'](_0x10d80e){const _0x38c315=this['_sidebarItemViewToAnnotation']['get'](_0x10d80e),_0x166784=_0x38c315&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x38c315)+0x1);return _0x166784&&this['getSidebarItemView'](_0x166784)||null;}['_alignBeforeItem'](_0x86c936,_0x428527){_0x86c936['updateHeight']();const _0x453156=G(_0x428527['bottom']+this['_spaceBetweenItems'],_0x86c936['top']);return!!_0x453156&&(this['_setItemTop'](_0x428527,_0x428527['top']-_0x453156),!0x0);}['_alignAfterItem'](_0x269548,_0x53e970){_0x269548['updateHeight']();const _0x4083b4=G(_0x269548['bottom']+this['_spaceBetweenItems'],_0x53e970['top']);return!!_0x4083b4&&(this['_setItemTop'](_0x53e970,_0x53e970['top']+_0x4083b4,!0x1),!0x0);}['_alignToTargetRect'](_0x409147){const _0x3d2688=this['_sidebarItemViewToAnnotation']['get'](_0x409147);if(!_0x3d2688||!_0x3d2688['target']||!_0x3d2688['targetRect'])return;const _0x255073=this['_getTargetTop'](_0x3d2688,_0x3d2688['targetRect']);this['_setItemTop'](_0x409147,_0x255073);}['_getTargetTop'](_0x493677,_0x28ad05){if(null===_0x28ad05)return 0x0;if(_0x493677['target']instanceof _0x52468a)return _0x28ad05['top'];{const _0x399322=new _0x52468a(this['view']['element'])['top'];return _0x28ad05['top']-_0x399322;}}['_setItemTop'](_0x1c4430,_0x47eff1,_0x62a6fc=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x62a6fc&&(_0x47eff1=Math['max'](_0x47eff1,this['_getMaxAvailableTop'](_0x1c4430))),_0x1c4430['top']=_0x47eff1;}['_getMaxAvailableTop'](_0xac62d1){let _0x212538=this['_getItemBefore'](_0xac62d1),_0x305e2a=0x0;for(;_0x212538;)_0x212538['updateHeight'](),_0x305e2a+=this['_spaceBetweenItems']+_0x212538['height'],_0x212538=this['_getItemBefore'](_0x212538);return _0x305e2a;}}function G(_0x128a68,_0x2555ef){return Math['max'](_0x128a68-_0x2555ef,0x0);}function y(_0xd5553e){return null!==_0xd5553e&&'object'==typeof _0xd5553e&&0x1===_0xd5553e['nodeType'];}class e extends _0x45eb44{['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(_0x49eb48){super(_0x49eb48),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3a28a9(),this['_refreshPositioningDebounced']=_0x5e61f5(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1e2668=this['context']['plugins']['get'](M),_0x33ebfa=this['context']['plugins']['get'](z);_0x1e2668['register']('wideSidebar',this),_0x33ebfa['container']&&_0x1e2668['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x10cc95){if(_0x10cc95===this['activeAnnotation'])return;const _0x1be886=this['context']['plugins']['get'](z);_0x1be886['_activeAnnotation']=_0x10cc95;const _0x53de80=this['activeAnnotation'];_0x1be886['refresh']({'blurredAnnotation':_0x53de80,'activatedAnnotation':_0x10cc95}),this['activeAnnotation']=_0x10cc95;}['attach'](_0x5ae93b){this['annotations']=_0x5ae93b;const _0x4da002=this['context']['plugins']['get'](z);if(_0x4da002['_annotations']=_0x5ae93b,this['isAttached'])throw new _0x2868b4('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4da002,'set:container',()=>{this['detach'](),this['listenTo'](_0x4da002,'change:container',_0x8808f=>{_0x8808f['off'](),this['attach'](_0x5ae93b);});}),_0x4da002['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x7a1d3f=_0x56e737=>{_0x56e737['updateTargetRect'](),_0x4da002['addAnnotation'](_0x56e737);};for(const _0x314fd3 of _0x5ae93b)_0x7a1d3f(_0x314fd3);this['listenTo'](_0x5ae93b,'add',(_0x51aa68,_0x109664)=>{_0x7a1d3f(_0x109664);}),this['listenTo'](_0x5ae93b,'remove',(_0x2275c1,_0x1d42e7,_0x3904fa)=>{_0x4da002['rearrange']({'removedAnnotation':_0x1d42e7,'previousAnnotation':_0x5ae93b['get'](_0x3904fa-0x1),'nextAnnotation':_0x5ae93b['get'](_0x3904fa+0x1)}),_0x1d42e7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5ae93b,'focus',(_0x5246e6,_0x478ac7)=>{this['setActiveAnnotation'](_0x478ac7);}),this['listenTo'](_0x5ae93b,'blur',()=>{this['setActiveAnnotation'](null);});const _0x566141=this['context']instanceof _0x444925?this['context']['editors']:new _0x3a28a9([this['context']]);for(const _0x27193c of _0x566141)this['_integrateWithEditorAnnotations'](_0x27193c);this['listenTo'](_0x566141,'add',(_0x12c552,_0x3d41cd)=>{this['listenTo'](_0x3d41cd,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3d41cd);});}),this['listenTo'](_0x566141,'remove',(_0x52345b,_0x19bc02)=>{_0x19bc02['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x19bc02['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2868b4('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x10ba51=this['context']['plugins']['get'](z);_0x10ba51['_detachFromContainer'](this['annotations']),this['stopListening'](_0x10ba51),this['stopListening'](this['annotations']),this['context']instanceof _0x444925&&this['stopListening'](this['context']['editors']);for(const _0x2654f2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2654f2);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1238a7){if(!_0x1238a7['plugins']['has']('EditorAnnotations'))return;const _0x13354f=_0x1238a7['plugins']['get']('EditorAnnotations'),_0x4a86cd=()=>{const _0x183f2b=_0x13354f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x183f2b[0x0]||null);};this['listenTo'](_0x13354f,'refresh',_0x4a86cd),this['listenTo'](_0x13354f,'blur',(_0x288a31,{isAnnotationTracked:_0x281983})=>{this['activeAnnotation']&&_0x281983(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x13354f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x477dd5=>{_0x13354f['hasDomSelection']()&&(_0x4a86cd(),_0x477dd5['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x13354f);}['_destroyEditorAnnotationsIntegration'](_0x4b60c8){this['stopListening'](_0x4b60c8),this['_editorAnnotations']['remove'](_0x4b60c8);}}class C extends _0x2ab1c0{['counterView'];constructor(_0x3d132a){super(_0x3d132a);const _0x126779=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x450bd5,_0x5bd8bb)=>_0x450bd5?'...':_0x5bd8bb['toString']()),this['set']('annotationType',''),this['icon']=_0x5ece7c,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x126779['to']('annotationType',_0x281490=>'ck-annotation-counter__badge--'+_0x281490),_0x126779['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x126779['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x45eb44{['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(_0x255eeb){super(_0x255eeb),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x539255),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3a28a9(),this['_refreshPositioningDebounced']=_0x5e61f5(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x471327(this['context']['locale']),this['balloonPanelView']=new _0x5c28ed(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3862a2){this['annotations']=_0x3862a2;const _0x1989cb=this['context']['plugins']['get'](z),_0x30b8b0=this['balloonPanelView'];if(_0x1989cb['_annotations']=_0x3862a2,this['isAttached'])throw new _0x2868b4('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1989cb,'set:container',()=>{this['detach'](),this['listenTo'](_0x1989cb,'change:container',_0x3c2534=>{_0x3c2534['off'](),this['attach'](_0x3862a2);});}),_0x1989cb['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3e5e6c=_0x531283=>{const _0x3c802d=new C(this['context']['locale']);_0x1989cb['addAnnotation'](_0x531283,_0x3c802d),this['_annotationToNarrowView']['set'](_0x531283,_0x3c802d),_0x3c802d['bind']('isDirty','annotationType','number')['to'](_0x531283['view'],'isDirty','type','length'),_0x3c802d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x30b8b0['content']['first']!==_0x531283['view']?(this['_showBalloon'](_0x531283),_0x531283['view']['element']['focus'](),this['setActiveAnnotation'](_0x531283)):this['setActiveAnnotation'](null);});};for(const _0x3ed9ba of _0x3862a2)_0x3e5e6c(_0x3ed9ba);this['listenTo'](_0x3862a2,'add',(_0x5bace9,_0x2d3c4e)=>{_0x3e5e6c(_0x2d3c4e);}),this['listenTo'](_0x3862a2,'remove',(_0x303221,_0xeeac35,_0x5599dd)=>{this['_annotationToNarrowView']['get'](_0xeeac35)['destroy'](),this['_annotationToNarrowView']['delete'](_0xeeac35),_0x1989cb['rearrange']({'removedAnnotation':_0xeeac35,'previousAnnotation':_0x3862a2['get'](_0x5599dd-0x1),'nextAnnotation':_0x3862a2['get'](_0x5599dd+0x1)}),_0xeeac35===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3862a2,'focus',(_0x189739,_0x56c292)=>{this['setActiveAnnotation'](_0x56c292);}),this['listenTo'](_0x3862a2,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x16eb2b,_0x34b8df)=>{_0x34b8df['keyCode']===_0x5848b2['esc']&&_0x30b8b0['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x30b8b0['content']['first']),this['_hideBalloon'](),_0x34b8df['stopPropagation'](),_0x34b8df['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x6fe057,_0x2fd67f)=>{const _0x27e71c=_0x2fd67f['target'];_0x30b8b0['isVisible']&&_0x30b8b0['element']['contains'](_0x27e71c)||_0x1989cb['view']['element']['contains'](_0x27e71c)||_0x6fe057['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3081da=>_0x3081da['contains'](_0x27e71c))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x260f0a=this['context']instanceof _0x444925?this['context']['editors']:new _0x3a28a9([this['context']]);for(const _0x69dbd8 of _0x260f0a)this['_integrateWithEditorAnnotations'](_0x69dbd8);this['listenTo'](_0x260f0a,'add',(_0x5bf9cc,_0xbf0d4a)=>{this['listenTo'](_0xbf0d4a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xbf0d4a);});}),this['listenTo'](_0x260f0a,'remove',(_0x212a4d,_0xcb7d56)=>{_0xcb7d56['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xcb7d56['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x471bcf){if(_0x471bcf===this['activeAnnotation'])return;const _0x33ceff=this['context']['plugins']['get'](z);if(_0x33ceff['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x471bcf,'disableAnimationOnActivatedAnnotation':!0x0}),_0x471bcf)_0x33ceff['getSidebarItemView'](_0x471bcf)?this['_showBalloon'](_0x471bcf):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x471bcf;}['detach'](){if(!this['isAttached'])throw new _0x2868b4('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2e3c92=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xc8cf22=>_0xc8cf22['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2e3c92['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x444925&&this['stopListening'](this['context']['editors']);for(const _0x41c8c0 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x41c8c0);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'](_0x2a5bdc){if(!_0x2a5bdc['plugins']['has']('EditorAnnotations'))return;const _0x315b6b=_0x2a5bdc['plugins']['get']('EditorAnnotations'),_0x5b84f7=this['context']['plugins']['get'](z),_0x1db864=this['annotations'],_0x2f0e17=this['balloonPanelView'],_0x1e522a=()=>{const _0x529322=_0x315b6b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x529322),this['setActiveAnnotation'](_0x529322[0x0]||null);};this['listenTo'](_0x315b6b,'refresh',_0x1e522a),this['listenTo'](_0x315b6b,'blur',(_0x3d3045,{isAnnotationTracked:_0x5a7de4})=>{this['activeAnnotation']&&_0x5a7de4(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x315b6b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1db864,'blur',_0x5eaa2a=>{_0x315b6b['hasDomSelection']()&&_0x5eaa2a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x532c22,_0x419a59)=>{const _0x4692bf=_0x419a59['target'];_0x2f0e17['isVisible']&&_0x2f0e17['element']['contains'](_0x4692bf)||_0x5b84f7['view']['element']['contains'](_0x4692bf)||this['activeAnnotation']&&_0x315b6b['hasDomSelection']()&&(_0x1e522a(),_0x532c22['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x315b6b);}['_destroyEditorAnnotationsIntegration'](_0x30175a){_0x30175a&&(this['stopListening'](_0x30175a),this['_editorAnnotations']['remove'](_0x30175a));}['_setSelectedAnnotations'](_0x5b09b3){for(const _0x582768 of this['_selectedAnnotations'])_0x5b09b3['includes'](_0x582768)||this['_manuallyClosedAnnotationViews']['delete'](_0x582768['view']);this['_selectedAnnotations']=_0x5b09b3;}['_refreshPositioning'](){const _0x9eba38=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x9eba38['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4c9298){if(this['_manuallyClosedAnnotationViews']['has'](_0x4c9298['view']))return;const _0x290059=this['balloonPanelView']['content']['first'];_0x290059!==_0x4c9298['view']?(_0x290059&&this['_detachListeners'](_0x290059),this['_attachListeners'](_0x4c9298['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4c9298['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xafb53c=this['balloonPanelView']['content']['first'],_0xc285f0=_0xafb53c&&this['annotations']['getByView'](_0xafb53c);if(!_0xc285f0||!this['_annotationToNarrowView']['has'](_0xc285f0))return;const _0x1f9ed9=this['_annotationToNarrowView']['get'](_0xc285f0)['element'],_0x5c5fb2=(function(){const _0x6fb367=_0x5c28ed['defaultPositions'];return[_0x6fb367['southArrowNorthEast'],_0x6fb367['northArrowSouthEast'],_0x6fb367['southArrowNorth'],_0x6fb367['northArrowSouth'],_0x6fb367['southArrowNorthWest'],_0x6fb367['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1f9ed9,'positions':_0x5c5fb2});}['_hideBalloon'](){const _0x2641fc=this['balloonPanelView'],_0x464c26=_0x2641fc['content']['first'];_0x464c26&&(this['_detachListeners'](_0x464c26),_0x2641fc['unpin'](),_0x2641fc['content']['clear']());}['_attachListeners'](_0x36ab53){this['listenTo'](_0x36ab53,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x36ab53,'Esc',(_0xf9fd86,_0x4cbd46)=>{this['_manuallyClosedAnnotationViews']['add'](_0x36ab53),this['_hideBalloon'](),_0x4cbd46();});}['_detachListeners'](_0x3def64){this['stopListening'](_0x3def64);}}class c extends _0xab089d{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x399079,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x289f8b){super(_0x289f8b),_0x289f8b['editing']['view']['addObserver'](_0x18f5f4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x289f8b['plugins']['get'](_0x399079),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x5b5d6e=this['editor']['plugins']['get'](M);_0x5b5d6e['context']===this['editor']&&(_0x5b5d6e['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3c012b,_0x6b5387)=>{const _0x407519=this['_balloon'];if(this['isAttached']&&_0x407519['visibleView']){const _0xa19603=this['annotations']['getByView'](_0x407519['visibleView']);_0xa19603&&this['_closeAnnotation'](_0xa19603),_0x6b5387();}}));}['afterInit'](){const _0x166ea9=this['editor']['plugins']['get'](M);_0x166ea9['context']===this['editor']&&(_0x166ea9['hasActive']()||_0x166ea9['switchTo']('inline'));}['setActiveAnnotation'](_0x979a6f){_0x979a6f!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x979a6f&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x979a6f)&&this['_addAnnotationToBalloon'](_0x979a6f,!0x0),_0x979a6f['isActive']=!0x0),_0x979a6f||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x979a6f);}['attach'](_0xd68dff){this['annotations']=_0xd68dff;const _0x197aaa=this['editor']['plugins']['get'](M),_0x5c2c57=this['_balloon'];if(this['isAttached'])throw new _0x2868b4('inlineannotations-attach-already-attached',this);if(_0x197aaa['context']!==this['editor'])throw new _0x2868b4('inlineannotations-not-allowed-with-context',this);const _0x5b5f07=this['editor']['plugins']['get'](P);this['listenTo'](_0x5b5f07,'refresh',()=>{const _0x11273c=_0x5b5f07['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2d82a3,_0x30870c;!this['_forceRefresh']&&(_0x2d82a3=_0x11273c,_0x30870c=this['_selectedAnnotations'],_0x2d82a3['length']===_0x30870c['length']&&_0x2d82a3['every'](_0x2224d9=>_0x30870c['includes'](_0x2224d9)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x11273c),this['setActiveAnnotation'](_0x11273c[0x0]||null));}),this['listenTo'](_0x5b5f07,'blur',(_0xd63ae8,{isAnnotationTracked:_0x265fb6})=>{this['activeAnnotation']&&_0x265fb6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1d14a2,_0x3ec384,_0x37a7a7)=>{_0x37a7a7||this['setActiveAnnotation'](null);}),this['listenTo'](_0xd68dff,'remove',(_0x1de3ea,_0x5df176)=>{this['_removeAnnotationFromBalloon'](_0x5df176),_0x5df176===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5c2c57,'change:visibleView',(_0x456e2c,_0x42d052,_0x3da7b0,_0x3ad39b)=>{_0x3ad39b&&this['stopListening'](_0x3ad39b);const _0x46f52e=_0xd68dff['getByView'](_0x3da7b0);_0x3da7b0&&_0x46f52e&&(this['listenTo'](_0x3da7b0,'change:height',()=>{_0x5c2c57['updatePosition']();}),this['listenTo'](_0x3da7b0,'Esc',()=>{this['_closeAnnotation'](_0x46f52e),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x46f52e&&this['setActiveAnnotation'](_0x46f52e));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5c2c57['visibleView']&&(_0xd68dff['getByView'](_0x5c2c57['visibleView'])&&_0x5c2c57['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 _0x2868b4('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4d2047 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4d2047);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x102a21){for(const _0x26bf18 of this['_selectedAnnotations'])_0x102a21['includes'](_0x26bf18)||this['_manuallyClosed']['delete'](_0x26bf18);for(const _0x2b37fe of this['annotations'])_0x102a21['includes'](_0x2b37fe)||this['_removeAnnotationFromBalloon'](_0x2b37fe);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xeaeebd of _0x102a21)this['_addAnnotationToBalloon'](_0xeaeebd);}this['_selectedAnnotations']=_0x102a21;}['_addAnnotationToBalloon'](_0x3e2b1f,_0x507dc2=!0x1){this['_manuallyClosed']['has'](_0x3e2b1f)||(this['_addedAnnotations']['has'](_0x3e2b1f)||this['_balloon']['hasView'](_0x3e2b1f['view'])||(this['_addedAnnotations']['add'](_0x3e2b1f),this['_balloon']['add']({'stackId':_0x3e2b1f['view']['id'],'view':_0x3e2b1f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3e2b1f)}})),_0x507dc2&&this['_balloon']['showStack'](_0x3e2b1f['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5544a6){const _0x58a13f=_0x5544a6['target'],_0x4c5493=this['editor']['editing']['view'],_0x138e57=_0x4c5493['document']['selection']['getFirstRange'](),_0x1a7d95=_0x4c5493['domConverter']['viewRangeToDom'](_0x138e57);if(_0x1a7d95['collapse'](!0x0),_0x58a13f){if(_0x58a13f instanceof _0x52468a)return _0x58a13f;let _0x2aaa55=[];for(const _0x165759 of _0x58a13f)_0x2aaa55['push'](...B(_0x165759['getClientRects']()));_0x2aaa55=function(_0x1f2893){const _0xb368e9=[];let _0x82f989=_0x1f2893[0x0];for(let _0x10ca2c=0x1;_0x10ca2c<_0x1f2893['length'];_0x10ca2c++)F(_0x82f989,_0x1f2893[_0x10ca2c])?_0x82f989['width']+=_0x1f2893[_0x10ca2c]['width']:(_0xb368e9['push'](_0x82f989),_0x82f989=_0x1f2893[_0x10ca2c]);return _0xb368e9['push'](_0x82f989),_0xb368e9;}(_0x2aaa55);const _0x345a94=_0x1a7d95['getBoundingClientRect']();return _0x2aaa55['find'](_0x2db839=>_0x2db839['top']<=_0x345a94['top']&&_0x2db839['bottom']>=_0x345a94['bottom']&&_0x2db839['left']<=_0x345a94['left']&&_0x2db839['right']>=_0x345a94['right'])||_0x2aaa55[0x0];}return _0x5544a6['targetRect']||_0x1a7d95;}['_removeAnnotationFromBalloon'](_0xe9285b){this['_addedAnnotations']['has'](_0xe9285b)&&this['_balloon']['hasView'](_0xe9285b['view'])&&(this['_addedAnnotations']['delete'](_0xe9285b),this['_balloon']['remove'](_0xe9285b['view']));}['_closeAnnotation'](_0x2b139c){this['_manuallyClosed']['add'](_0x2b139c),this['_removeAnnotationFromBalloon'](_0x2b139c);}}function B(_0x4c5c7a){return Array['from'](_0x4c5c7a)['map'](DOMRect['fromRect']);}function F(_0x343bf9,_0x40e7f4){return _0x343bf9['top']===_0x40e7f4['top']&&_0x343bf9['bottom']===_0x40e7f4['bottom']&&_0x343bf9['right']===_0x40e7f4['left'];}class it extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5059c6,_0x4596df){super(_0x5059c6),this['set']('isEmpty',!_0x4596df['length']),this['focusTracker']=new _0x1f4456(),this['_annotationViews']=_0x4596df,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xc22f23({'focusables':_0x4596df,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4596df,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4596df,'remove',(_0x129215,_0x1e14fe)=>{_0x1e14fe['isActive']&&this['focus'](),_0x4596df['length']||(this['isEmpty']=!0x0);});const _0x2dc597=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x5059c6,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4596df},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2dc597['if']('isEmpty','ck-hidden',_0x56a093=>!_0x56a093)]},'children':[{'text':E(_0x5059c6,'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 _0x19b1e1 of this['_annotationViews'])this['focusTracker']['add'](_0x19b1e1['element']);this['_annotationViews']['on']('change',(_0x18ec7b,{added:_0x195309,removed:_0x1fd024})=>{for(const _0x1dc231 of _0x195309)this['focusTracker']['add'](_0x1dc231['element']);for(const _0x7a6a66 of _0x1fd024)this['focusTracker']['remove'](_0x7a6a66['element']);});}}class f extends _0x45eb44{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x5c6c67){super(_0x5c6c67),this['archivedThreads']=new _0x3a28a9();}['init'](){const _0x16dcb1=this['context'],_0x3854fb=_0x16dcb1['plugins']['get'](o),_0x1338a3=_0x16dcb1['plugins']['get'](O);this['listenTo'](_0x3854fb,'addCommentThread',(_0x51017d,{threadId:_0x165c84})=>{const _0x2c927c=_0x3854fb['getCommentThread'](_0x165c84);_0x2c927c['archivedAt']&&this['archivedThreads']['add'](_0x2c927c,this['_calculatePosition'](_0x2c927c['archivedAt'])),this['listenTo'](_0x2c927c,'change:archivedAt',(_0x3ae191,_0x3688a9,_0x4620d8)=>{_0x4620d8?this['archivedThreads']['has'](_0x2c927c)||this['archivedThreads']['add'](_0x2c927c,this['_calculatePosition'](_0x2c927c['archivedAt'])):this['archivedThreads']['has'](_0x2c927c)&&this['archivedThreads']['remove'](_0x2c927c);});}),this['listenTo'](_0x3854fb,'removeCommentThread',(_0x14c551,{threadId:_0x457665})=>{const _0x152ea4=_0x3854fb['getCommentThread'](_0x457665);this['stopListening'](_0x152ea4),this['archivedThreads']['has'](_0x152ea4)&&this['archivedThreads']['remove'](_0x152ea4);},{'priority':'highest'}),this['listenTo'](_0x1338a3['collection'],'focus',(_0x3ef939,_0x54a960)=>{_0x54a960['isVisible']||(_0x54a960['isActive']=!0x0,_0x1338a3['activate'](_0x54a960));});}['_calculatePosition'](_0x564e34){const _0x3f0797=[...this['archivedThreads']]['findIndex'](_0x453919=>_0x453919['archivedAt']<_0x564e34);return _0x3f0797>-0x1?_0x3f0797:this['archivedThreads']['length'];}}class a extends _0xab089d{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x266ae4];}constructor(_0x38da70){super(_0x38da70),this['annotationViews']=new _0x577beb(),this['_pendingThreads']=[];}['init'](){const _0x4c471a=this['editor'],_0x5ef345=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4c471a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2ab1c0,!0x0)),_0x4c471a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2d4d1b=this['_createCommentsArchiveButton'](_0x515bee);return _0x2d4d1b['set']({'role':'menuitemcheckbox'}),_0x2d4d1b;});const _0x2059c9=_0x4c471a['plugins']['get'](f),_0x2fe679=_0x4c471a['plugins']['get']('Annotations'),_0x2a70a4=_0x4c471a['plugins']['get']('CommentsRepository');_0x2059c9['archivedThreads']['forEach'](_0x4aeaad=>{this['_handleNewThread'](_0x4aeaad);}),this['listenTo'](_0x2059c9['archivedThreads'],'add',(_0x2a5d9e,_0x47758d)=>{this['_handleNewThread'](_0x47758d);}),this['listenTo'](_0x2fe679['collection'],'add',(_0x3b23fc,_0x45317b)=>{const _0x5e3a4d=this['_pendingThreads']['find'](_0x2c92b4=>{const _0x9e5584=_0x2a70a4['_threadToController']['get'](_0x2c92b4);return _0x9e5584&&_0x45317b['innerView']===_0x9e5584['view'];});if(_0x5e3a4d){const _0x516e89=this['_calculatePosition'](_0x5e3a4d['archivedAt']);this['annotationViews']['add'](_0x45317b['view'],_0x516e89),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5e3a4d),0x1);}}),this['listenTo'](_0x2059c9['archivedThreads'],'remove',(_0x2f2b20,_0xa9c7e1)=>{const _0x2925ce=_0x4c471a['config']['get']('collaboration.channelId');if(!_0x2925ce||_0xa9c7e1['channelId']===_0x2925ce){if(this['_pendingThreads']['includes'](_0xa9c7e1))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xa9c7e1),0x1);else{const _0x2143f2=_0x2a70a4['_threadToController']['get'](_0xa9c7e1),_0xf5dffa=_0x2fe679['getByInnerView'](_0x2143f2['view']);this['annotationViews']['remove'](_0xf5dffa['view']),this['stopListening'](_0xf5dffa['focusableElements']);}}}),this['listenTo'](_0x2fe679['collection'],'add',(_0x3e8c87,_0x1ab446)=>{this['listenTo'](_0x1ab446,'escape',_0x5ef345);}),this['listenTo'](_0x2fe679['collection'],'remove',(_0x224fad,_0x42f8b0)=>{this['stopListening'](_0x42f8b0,'escape',_0x5ef345);});}['_handleNewThread'](_0x285ef0){const _0x5ffac0=this['editor']['plugins']['get']('CommentsRepository'),_0x343522=this['editor']['plugins']['get']('Annotations'),_0x1c8769=this['editor']['config']['get']('collaboration.channelId');if(!_0x1c8769||_0x285ef0['channelId']===_0x1c8769){const _0x536c56=_0x5ffac0['_threadToController']['get'](_0x285ef0);if(!_0x536c56)return void this['_pendingThreads']['push'](_0x285ef0);const _0x534edc=this['_calculatePosition'](_0x285ef0['archivedAt']),_0xb4908c=_0x343522['getByInnerView'](_0x536c56['view']);_0xb4908c['isVisible']&&_0x343522['_visibleAnnotations']['remove'](_0xb4908c),this['annotationViews']['add'](_0xb4908c['view'],_0x534edc);}}['_calculatePosition'](_0x4256b4){const _0x1b2f70=this['editor']['config']['get']('collaboration.channelId'),_0x2c58e6=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x702db6=>_0x702db6['channelId']===_0x1b2f70)['findIndex'](_0x595f35=>_0x595f35['archivedAt']<_0x4256b4);return _0x2c58e6<0x0||_0x2c58e6>this['annotationViews']['length']?this['annotationViews']['length']:_0x2c58e6-0x1;}['_toggleDialog'](){const _0x3f1ab7=this['editor'],_0x13fbcc=_0x3f1ab7['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new it(_0x3f1ab7['locale'],this['annotationViews'])),'commentsArchive'===_0x13fbcc['id']?_0x13fbcc['hide']():_0x13fbcc['show']({'id':'commentsArchive','title':E(_0x3f1ab7['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1062b6,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':tt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x5c1657,_0xeedd04=!0x1){const _0x4963ec=this['editor']['locale'],_0x4ecac1=this['editor']['plugins']['get']('Dialog'),_0x11f069=new _0x5c1657(_0x4963ec);return _0x11f069['bind']('isEnabled')['to'](this,'isEnabled'),_0x11f069['bind']('isOn')['to'](_0x4ecac1,'id',_0x3cf637=>'commentsArchive'===_0x3cf637),_0x11f069['set']({'label':E(_0x4963ec,'COMMENTS_ARCHIVE'),'icon':_0x1062b6,'isToggleable':!0x0}),_0xeedd04&&(_0x11f069['tooltip']=!0x0),this['listenTo'](_0x11f069,'execute',()=>this['_toggleDialog']()),_0x11f069;}['_hideDialogOnAnnotationEscape']=_0x3d82c5=>{const _0x2f5a8a=_0x3d82c5['source'];if(!this['annotationViews']['has'](_0x2f5a8a['view']))return;const _0x5a90e6=this['editor']['plugins']['get']('Dialog');_0x5a90e6['isOpen']&&'commentsArchive'===_0x5a90e6['id']&&(_0x5a90e6['hide'](),_0x3d82c5['stop']());};}class p extends _0xab089d{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,is as BaseCommentThreadView,rs as BaseCommentView,fi as Comment,ui as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt 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 _0x4358e8,ContextPlugin as _0x36456e,PendingActions as lt,Command as _0x1d4e46,Plugin as _0x46aee5,Context as _0x3d509f}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1ca8f3,uid as _0x26f50a,KeystrokeHandler as jt,FocusTracker as _0x20e391,diff as _0x15d702,Collection as _0x27e15c,Rect as _0x32a86d,CKEditorError as _0xd92937,first as _0x3dbc24,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x100987,keyCodes as _0x25afdb}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x5ead24,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x1698d7,trimHtml as _0x3404e1,LateFocusDropdownButtonView as _0x2bfcfe,Users as st,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x43e52b}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x4daac0}from'es-toolkit/compat';import{IconUndo as _0x43e8fc,IconCheck as _0x16bc51,IconPencil as _0x5cca6c,IconRemoveComment as _0x23220d,IconThreeVerticalDots as _0x5b09d3,IconAddComment as _0x4bd163,IconCommentsArchive as _0x23c1b7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0xa806cd,ButtonView as _0x3ac222,ViewCollection as _0x3c4ee6,createDropdown as _0x53160a,ListView as _0x13ca0c,focusChildOnDropdownOpen as _0x35acd5,ListItemView as _0x3adee0,MenuBarMenuListItemButtonView as _0x554070,BodyCollection as _0x11df1c,BalloonPanelView as _0x20d659,ContextualBalloon as _0x2944a3,Dialog as _0x2d1df0,DialogViewPosition as tt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x5c406a}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 _0x211b6f}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x5cf785}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1ca8f3(){['model'];['view'];constructor(_0x2e9c3b,_0x5a27cd){super(),this['model']=_0x2e9c3b,this['model']['_isAttached']=!0x0,this['view']=_0x5a27cd,this['listenTo'](_0x5a27cd,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5a27cd,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5a27cd,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5a27cd,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5a27cd,'addComment',(_0x5663aa,_0x170e29)=>this['addComment'](_0x170e29)),this['listenTo'](_0x5a27cd,'updateComment',(_0x2cd23c,_0x5ce216,_0x566ebd)=>this['updateComment'](_0x5ce216,_0x566ebd)),this['listenTo'](_0x5a27cd,'removeComment',(_0x14cfdf,_0x11f42c)=>this['removeComment'](_0x11f42c));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x12485f){this['model']['addComment']({'content':_0x12485f,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xf56e8d,_0x2bcee5){this['model']['getComment'](_0xf56e8d)['update']({'content':_0x2bcee5});}['removeComment'](_0x4b387e){this['model']['getComment'](_0x4b387e)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x418f4d,_0x2d4540,_0x565d3e){const t=_0x418f4d['t'];switch(_0x2d4540){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'},_0x565d3e);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'},_0x565d3e);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'},_0x565d3e);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'},_0x565d3e);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x565d3e);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'},_0x565d3e);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'},_0x565d3e);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'},_0x565d3e);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 Vt extends Xt{['main'];['editable'];constructor(_0x8df469,_0x57d41b){super(_0x8df469);const _0x512036=_0x26f50a();this['main']=this['createCollection'](),this['editable']=new $t(_0x8df469,_0x57d41b,void 0x0,{'label':()=>E(_0x8df469,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x8df469['uiLanguageDirection'],'lang':_0x8df469['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x512036},'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 Ut{['view'];constructor(_0x20132e){super(_0x20132e),this['view']=new Vt(_0x20132e['locale'],_0x20132e['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x317dd0=this['editor']['editing']['view'],_0x41ceca=this['view']['editable'],_0x47f670=_0x317dd0['document']['getRoot']();_0x41ceca['name']=_0x47f670['rootName'],this['view']['render']();const _0x3dd1e0=_0x41ceca['element'];this['setEditableElement'](_0x41ceca['name'],_0x3dd1e0),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x317dd0['attachDomRoot'](_0x3dd1e0),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1ca8f3(_0x4358e8){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x4851a4={}){function _0x2d80d2(_0x1d521e){return _0x1d521e['map'](_0x50eb2f=>String['fromCharCode'](_0x50eb2f))['join']('');}(_0x4851a4=Object['assign']({},_0x4851a4))['plugins']||(_0x4851a4['plugins']=Rt['defaultPlugins']),super(_0x4851a4),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[_0x2d80d2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d80d2([0x76,0x69,0x65,0x77])][_0x2d80d2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d80d2([0x61,0x75,0x74,0x6f]),this[_0x2d80d2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2d80d2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d80d2([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2d80d2([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2d80d2([0x6f,0x6b])});}['create'](){const _0x5057a3=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5057a3))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xf2e393=>{const _0x69e64f=this['model']['document']['getRoot'](),_0x371f78=_0x69e64f&&_0x69e64f['getChild'](_0x69e64f['childCount']-0x1);_0xf2e393['setSelection'](_0x371f78,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x231a56=this['editing']['view'],_0x58773a=_0x231a56['document']['getRoot'](),_0x335304=_0x58773a['getChild'](0x0);_0x58773a['childCount']>0x1||!_0x335304||'p'!=_0x335304['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x231a56,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x335304['placeholder']=this['placeholder']),Ft({'view':_0x231a56,'element':_0x335304,'keepOnFocus':!0x0}),this['placeholderElement']=_0x335304);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x48566f,_0x48d2f6={}){super(_0x48566f),this['editor']=null,this['_editorConfig']=_0x48d2f6,this['set']('value',_0x48d2f6['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x48566f,'Reply...')),this['set']('submitLabel',E(_0x48566f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x20e391(),this['focusCycler']=new _0xa806cd({'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',(_0x585953,_0x5193fb)=>{this['cancelButtonView']['fire']('execute'),_0x5193fb();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2806b9,_0x157af)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x157af());}),this['on']('submit',(_0x4aa1f6,_0x34d6f5)=>{_0x34d6f5['length']>0xfde8?(alert(E(_0x48566f,'TOO_LONG_COMMENT_ALERT',[_0x34d6f5['length'],0xfde8])),_0x4aa1f6['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x272d32=this['editor'];this['element']['insertBefore'](_0x272d32['ui']['element'],this['element']['firstChild']),_0x272d32['model']['document']['on']('change',()=>this['value']=_0x272d32['getData']()),_0x272d32['bind']('placeholder')['to'](this),this['focusables']['add'](_0x272d32['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x28d34c){-0x1===_0x28d34c?(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:_0x432b6c}=this,_0x3f35c5=new _0x3ac222(_0x432b6c);return _0x3f35c5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3f35c5['withText']=!0x0,_0x3f35c5['bind']('label')['to'](this,'submitLabel'),_0x3f35c5['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3f35c5['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x193671,_0x40b057)=>!_0x40b057&&!!_0x193671['trim']()),_0x3f35c5;}['_createCancelButton'](){const {locale:_0x1e8948}=this,_0x58e14b=new _0x3ac222(_0x1e8948);return _0x58e14b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x58e14b['label']=E(_0x1e8948,'Cancel'),_0x58e14b['withText']=!0x0,_0x58e14b['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x58e14b;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x9361d3=>{this['focusTracker']['add'](_0x9361d3['element']);}),this['focusables']['on']('change',(_0x38d84c,_0x33425e)=>{for(const _0x17ddd5 of Array['from'](_0x33425e['added'])['reverse']())this['focusTracker']['add'](_0x17ddd5['element']);});}}class ie extends kt{constructor(_0x10fc01,_0x3b0b57,_0x583144){super(_0x10fc01),this['commentInputView']=new hs(_0x10fc01,_0x583144),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x16b968,_0x3f0135)=>_0x16b968||!!_0x3f0135),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 _0x5ead24(_0x10fc01,_0x3b0b57),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'](_0x13aaa1){this['commentInputView']['focus'](_0x13aaa1);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2c3e3b,_0x2be176)=>{const {submitButtonView:_0x5289d8,cancelButtonView:_0x9f4b4d,editor:_0x363b86}=this['commentInputView'];[_0x5289d8['element'],_0x9f4b4d['element'],_0x363b86?_0x363b86['editing']['view']['getDomRoot']():null]['filter'](_0x1e8b92=>_0x1e8b92)['some'](_0x15f1ca=>_0x15f1ca['contains'](_0x2be176['target']))||(this['focus'](),_0x2be176['preventDefault']());});}}class cs extends kt{constructor(_0x1c7050){super(_0x1c7050);const _0x2438fc=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2438fc['to']('count',_0x4a398c=>E(_0x1c7050,'NUMBER_OF_COMMENTS',_0x4a398c))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x59cf24,_0x4e51d3,_0x3068a0){super(_0x59cf24);const _0x4139b4=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4e51d3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4e51d3,this['_config']=_0x3068a0,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa806cd({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3802c9=>this['commentViews']['map'](_0x24362b=>_0x24362b['element'])['includes'](_0x3802c9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x59cf24),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x230cf6=>_0x230cf6-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5dbd61 of _0x4e51d3['comments'])this['_handleNewCommentModel'](_0x5dbd61);this['_handleInfoComment'](),this['listenTo'](_0x4e51d3['comments'],'add',(_0x3403b0,_0x52286d)=>{const _0x31180f=this['_calculatePosition'](_0x52286d);this['length']++,this['_handleNewCommentModel'](_0x52286d,_0x31180f),this['refreshVisibleViews']();}),this['listenTo'](_0x4e51d3['comments'],'remove',(_0x17220a,_0x4f69e4)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4f69e4),this['refreshVisibleViews']();}),this['listenTo'](_0x4e51d3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4e51d3,'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',_0x4139b4['if']('length','ck-hidden',_0x520bb0=>!_0x520bb0)],'aria-label':E(_0x59cf24,'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'](_0x71ae13){-0x1===_0x71ae13?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x49877b of this['commentViews'])_0x49877b['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2e81a6,_0x467e38){const _0x4d3503=new this['_config']['CommentView'](this['locale'],_0x2e81a6,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4d3503['viewUid']=_0x2e81a6['id'],_0x4d3503['delegate']('removeComment')['to'](this),_0x4d3503['delegate']('updateComment')['to'](this),_0x4d3503['delegate']('resolveCommentThread')['to'](this),_0x4d3503['delegate']('editorReady')['to'](this),_0x4d3503['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4d3503,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4d3503,_0x467e38);}['_calculatePosition'](_0x5409a1){const _0x11047f=this['_model']['_findOptimalIndex'](_0x5409a1);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5409a1['authoredAt']?_0x11047f-0x1:_0x11047f:_0x11047f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4ddbe8={'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'],_0x4ddbe8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4ddbe8));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5e92cf){const _0xf385f9=this['commentViews']['remove'](_0x5e92cf['id']);this['stopListening'](_0xf385f9),_0xf385f9['isEditMode']&&this['_updateHasDirtyComment'](),_0xf385f9['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4d164e=>_0x4d164e['isEditMode']);}['_rearrangeCollapse'](){const _0x3a32eb=function(_0x26b515){const _0xafc9=new _0x27e15c();for(const _0x32c6bd of _0x26b515)_0xafc9['add'](_0x32c6bd);return _0xafc9;}(this['commentViews']),_0x56f329=this['_collapsedCommentsView']['count'];for(let _0x5cc5ff=0x1;_0x5cc5ff<=_0x56f329;_0x5cc5ff++)_0x3a32eb['remove'](0x1);for(const _0x143cfe of _0x3a32eb)_0x143cfe['collapse']();_0x56f329>0x0&&_0x3a32eb['add'](this['_collapsedCommentsView'],0x1),as(_0x15d702(Array['from'](this['visibleViews']),Array['from'](_0x3a32eb)),this['visibleViews'],_0x3a32eb);}['_rearrangeExpand'](){as(_0x15d702(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x19641f of this['visibleViews'])_0x19641f['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1eba9c=>{this['focusTracker']['add'](_0x1eba9c['element']),this['keystrokes']['listenTo'](_0x1eba9c['element']);}),this['commentViews']['on']('change',(_0xb69607,_0x1e719c)=>{for(const _0xb09d59 of _0x1e719c['removed'])this['focusTracker']['remove'](_0xb09d59['element']),this['keystrokes']['stopListening'](_0xb09d59['element']);for(const _0xbc8f3f of Array['from'](_0x1e719c['added'])['reverse']())this['focusTracker']['add'](_0xbc8f3f['element']),this['keystrokes']['listenTo'](_0xbc8f3f['element']);});}}function as(_0x27ff3f,_0x56a924,_0x5a3cc9){let _0x243ea8=0x0;for(const _0x1c5436 of _0x27ff3f)switch(_0x1c5436){case'insert':_0x56a924['add'](_0x5a3cc9['get'](_0x243ea8),_0x243ea8),_0x243ea8++;break;case'delete':_0x56a924['remove'](_0x243ea8);break;case'equal':_0x243ea8++;}}class ls extends kt{constructor(_0x2ffadc){super(_0x2ffadc);const _0x32609b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x32609b['to']('contextValue',_0x45f222=>E(_0x2ffadc,'THREAD_CONTEXT_LABEL',_0x45f222)),'tabindex':-0x1},'children':[{'text':_0x32609b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4b5911,_0x285f44){super(_0x4b5911);const _0x377942=this['bindTemplate'];this['_model']=_0x285f44,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa806cd({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x580dfc=>!!_0x580dfc),this['bind']('contextValue')['to'](this['_model'],'context',_0x2d30b3=>_0x2d30b3&&_0x2d30b3['value']?this['_trimContextValue'](_0x2d30b3['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',_0x377942['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 _0x548dcd=new _0x3ac222(this['locale']);return _0x548dcd['label']=E(this['locale'],'Reopen'),_0x548dcd['tooltip']=E(this['locale'],'Reopen'),_0x548dcd['icon']=_0x43e8fc,_0x548dcd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4902f2=>!_0x4902f2),_0x548dcd['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4957b0,_0xfb5471)=>_0x4957b0&&_0xfb5471),_0x548dcd['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x548dcd;}['_trimContextValue'](_0x2831da){if(_0x2831da['length']<0x96)return _0x2831da;const _0x72ee0c=_0x2831da['lastIndexOf']('\x20',0x93);return _0x2831da['substring'](0x0,_0x72ee0c>-0x1?_0x72ee0c:0x93)+'...';}['_attachContextActions'](){const _0x1e6e52=this['element']['querySelector']('.ck-context'),_0x456e2b=_0x1e6e52['querySelector']('.ck-context__value');this['listenTo'](_0x1e6e52,'mouseenter',()=>{_0x456e2b['offsetWidth']<_0x456e2b['scrollWidth']&&_0x1e6e52['classList']['add']('overlay');}),this['listenTo'](_0x1e6e52,'mouseleave',()=>{_0x1e6e52['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x543538 of this['focusables'])this['focusTracker']['add'](_0x543538['element']),this['keystrokes']['listenTo'](_0x543538['element']);}['_createContextView'](){const _0x4c51a6=new ls(this['locale']);return _0x4c51a6['bind']('contextValue')['to'](this),_0x4c51a6;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x56055d,_0x13f9ef,_0x37df72,_0x5b5ff6){super(_0x56055d),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x13f9ef,this['_localUser']=_0x37df72,this['_config']=_0x5b5ff6,this['commentThreadHeaderView']=new Yt(_0x56055d,_0x13f9ef),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x56055d,E(_0x56055d,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x56055d,_0x13f9ef,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5b5ff6)),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',(_0x2f09df,_0x1d3fa2)=>_0x2f09df||!!_0x1d3fa2),this['bind']('isUnlinked')['to'](_0x13f9ef,'unlinkedAt',_0x2cc751=>!!_0x2cc751),this['bind']('ariaLabel')['to'](this,'length',_0x53da56=>{const _0x5788db=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x53da56,_0x5788db]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa806cd({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x13c37c=>_0x13c37c['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x5c369d=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1f1f3e=_0x5c369d['commentInputView'];return _0x5c369d['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1f1f3e,'value',(_0x8ef853,_0xa6e975,_0x13cc5a,_0x3309cd,_0x3acb6f)=>!!_0x3acb6f||!!_0x3309cd&&_0x13cc5a&&!_0xa6e975||_0x8ef853&&_0x13cc5a&&!_0xa6e975),_0x1f1f3e['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x19baad,_0x55d367,_0x568ac7)=>{let _0x586aaa;return _0x586aaa=_0x568ac7&&_0x55d367?'Reply\x20to\x20reopen\x20discussion...':_0x19baad?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x586aaa);}),_0x1f1f3e['bind']('submitLabel')['to'](this,'length',_0x358821=>E(this['locale'],_0x358821?'Reply':'Comment')),_0x1f1f3e['on']('submit',(_0xde352d,_0x418de4)=>{this['fire']('addComment',_0x418de4),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1f1f3e['on']('cancel',()=>{this['focus']();}),_0x1f1f3e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1f1f3e['on']('cancel',_0x1607fa=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1607fa['stop']());}),this['on']('change:isActive',(_0x2c5bec,_0x274610,_0x2afba5)=>{_0x2afba5||this['length']||_0x1f1f3e['value']||this['fire']('removeCommentThread');}),_0x5c369d;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4575a5,_0x71f553,_0x147967,_0x48cef4){super(_0x4575a5,_0x71f553,_0x147967,_0x48cef4),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4575a5,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2152af,_0x22e2df,_0x36d444)=>{_0x36d444||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1885f1,_0x4a3972,_0x3c55c2)=>{_0x3c55c2&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x42a9f4=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x42a9f4['if']('isActive','ck-thread--active'),_0x42a9f4['if']('isUnlinked','ck-thread--unlinked'),_0x42a9f4['if']('isConfirm','ck-thread--remove-confirmation'),_0x42a9f4['to']('actionIndicator',_0x1bf068=>_0x1bf068?'ck-thread--'+_0x1bf068:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x42a9f4['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 _0x4fab2e of this['commentsListView']['commentViews'])_0x4fab2e['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x42f3d1}=this,_0x1e1fa0=this['commentsListView']['commentViews']['get'](0x0);_0x1e1fa0===this['_boundFirstCommentView']||_0x1e1fa0['isSystemComment']||(this['_boundFirstCommentView']=_0x1e1fa0,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1e1fa0,'actionIndicator',_0x4e2991=>'remove'===_0x4e2991?'remove':null),_0x1e1fa0['placeholder']=E(_0x42f3d1,'Write\x20a\x20comment...'),_0x1e1fa0['removeButton']['on']('execute',_0x3c276c=>{_0x3c276c['stop'](),this['showConfirm'](E(_0x42f3d1,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1e1fa0['focus']();}),_0x1e1fa0['actionBar']['add'](this['resolveButton'],0x0),_0x1e1fa0['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5f1f03=new _0x1698d7(this['locale']);return _0x5f1f03['label']=E(this['locale'],'Resolve'),_0x5f1f03['tooltip']=E(this['locale'],'Resolve'),_0x5f1f03['icon']=_0x16bc51,_0x5f1f03['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5f1f03['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x6ef811=>!_0x6ef811),_0x5f1f03['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x287013,_0x3220f8)=>_0x287013&&!_0x3220f8),_0x5f1f03['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5f1f03;}['_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 os extends kt{constructor(_0x5acf5a){super(_0x5acf5a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x386a4a,_0x50fba7,_0xdee57d)=>{this['element']['innerHTML']=_0xdee57d;}),this['element']['innerHTML']=this['content'];}}class rs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x180e40,_0x4d054e,_0x209f79){super(_0x180e40),this['_model']=_0x4d054e,this['_config']=_0x209f79,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4d054e,'content',_0x4d054e,'authoredAt',(_0xb4bee8,_0x562695)=>E(_0x180e40,'COMMENT_ARIA_LABEL',[_0x4d054e['author']['name'],_0x209f79['formatDateTime'](_0x562695),new DOMParser()['parseFromString'](_0xb4bee8,'text/html')['body']['textContent'],_0x4d054e['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x180e40,E(_0x180e40,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x3c4ee6(),this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa806cd({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x593d9a=>_0x593d9a['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 _0x52f27f=new os(this['locale']);return _0x52f27f['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4657c4,_0x6cd735)=>_0x6cd735?_0x3404e1(_0x4657c4,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4657c4),_0x52f27f;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x51835e=new hs(this['locale'],this['_config']['editorConfig']);return _0x51835e['value']=this['_model']['content'],_0x51835e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x51835e['submitLabel']=E(this['locale'],'Save'),_0x51835e['on']('submit',(_0x5694ec,_0x1d4eb5)=>{this['fire']('updateComment',this['_model']['id'],_0x1d4eb5),this['switchToDisplayMode'](),this['focus']();}),_0x51835e['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x51835e['once']('editorReady',()=>{_0x51835e['focus']();}),_0x51835e['createEditor'](),_0x51835e['delegate']('editorReady')['to'](this),_0x51835e['delegate']('editorDestroyed')['to'](this),_0x51835e;}['_setupKeyboardNavigation'](){const _0x474087=this['element'];this['keystrokes']['listenTo'](_0x474087);for(const _0x13ab3f of this['focusables'])this['focusTracker']['add'](_0x13ab3f['element']),this['keystrokes']['listenTo'](_0x13ab3f['element']);this['focusables']['on']('change',(_0x3120cd,_0x1ab1e7)=>{for(const _0x4f1828 of _0x1ab1e7['removed'])this['focusTracker']['remove'](_0x4f1828['element']),this['keystrokes']['stopListening'](_0x4f1828['element']);for(const _0x35b45b of _0x1ab1e7['added'])this['focusTracker']['add'](_0x35b45b['element']),this['keystrokes']['listenTo'](_0x35b45b['element']);}),this['keystrokes']['set']('enter',(_0x3977cc,_0x52bdca)=>{_0x474087===_0x3977cc['target']&&(this['focusCycler']['focusFirst'](),_0x52bdca());}),this['keystrokes']['set']('esc',(_0x254764,_0xa42cf8)=>{_0x474087!==_0x254764['target']&&(this['focus'](),_0xa42cf8());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(rs){['actionBar'];['userView'];constructor(_0x563728,_0x19ef56,_0x1cf906){super(_0x563728,_0x19ef56,_0x1cf906),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x563728,'Reply...')),this['bind']('authoredAt')['to'](_0x19ef56),this['bind']('resolvedAt')['to'](_0x19ef56),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 _0x5ead24(_0x563728,_0x19ef56['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x19ef56,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x3c8527=this['bindTemplate'],_0xe3860f=[{'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':_0x3c8527['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x3c8527['to']('authoredAt',_0x2387df=>this['_config']['formatDateTime'](_0x2387df))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x3c8527['if']('isEditMode','ck-comment__actions--hidden'),_0x3c8527['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']&&_0xe3860f['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x3c8527['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x3c8527['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x3c8527['if']('isEditMode','ck-comment--edit'),_0x3c8527['if']('isSystemComment','ck-comment--info'),_0x3c8527['to']('actionIndicator',_0x30b3ab=>_0x30b3ab?'ck-comment--'+_0x30b3ab:'')],'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':_0xe3860f}]}]};}['_createEditButton'](){const _0x5465b6=new _0x3ac222(this['locale']);return _0x5465b6['label']=E(this['locale'],'Edit'),_0x5465b6['icon']=_0x5cca6c,_0x5465b6['withText']=!0x0,_0x5465b6['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5465b6['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1c20e5=>!_0x1c20e5),_0x5465b6['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5465b6['on']('execute',()=>this['switchToEditMode']()),_0x5465b6;}['_createRemoveButton'](){const _0x509197=new _0x3ac222(this['locale']);return _0x509197['label']=E(this['locale'],'Remove'),_0x509197['icon']=_0x23220d,_0x509197['withText']=!0x0,_0x509197['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x509197['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x42f23f=>!_0x42f23f),_0x509197['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x509197['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x509197;}['_createDropdown'](){const _0x470003=_0x53160a(this['locale'],_0x2bfcfe),_0x5ec4f4=_0x470003['panelView']['children'],_0x3055e2=new _0x13ca0c(this['locale']),_0x3a13c4=_0x470003['bindTemplate'];_0x35acd5(_0x470003,()=>this['items']['find'](_0x1ee853=>_0x1ee853['isVisible'])),_0x470003['extendTemplate']({'attributes':{'class':[_0x3a13c4['if']('isVisible','ck-hidden',_0x18b68f=>!_0x18b68f)]}});const _0x252db1=(_0x38c310,_0x1d0cc6=-0x1)=>{const _0x5443da=new _0x3adee0(this['locale']);_0x5443da['children']['add'](_0x38c310);const _0x35f00e=_0x1d0cc6>-0x1?_0x1d0cc6:_0x3055e2['items']['length'];_0x3055e2['items']['add'](_0x5443da,_0x35f00e);const _0x165fee=Array['from'](this['items']);_0x470003['unbind']('isEnabled','isVisible'),_0x470003['bind']('isEnabled')['toMany'](_0x165fee,'isEnabled',(..._0x16aead)=>_0x16aead['some'](_0x462ea0=>_0x462ea0)),_0x470003['bind']('isVisible')['toMany'](_0x165fee,'isVisible',(..._0x5a0a65)=>_0x5a0a65['some'](_0x5667ae=>_0x5667ae));};_0x470003['panelPosition']='sw',_0x470003['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x5b09d3});for(const _0x39261d of this['items'])_0x252db1(_0x39261d);return _0x5ec4f4['add'](_0x3055e2),_0x470003['listenTo'](this['items'],'add',(_0x7faeb7,_0x361e6d,_0x57c54e)=>{_0x252db1(_0x361e6d,_0x57c54e);}),_0x470003['listenTo'](this['items'],'remove',(_0x72fb33,_0x41cddc,_0xeb1b3b)=>{_0x3055e2['items']['remove'](_0xeb1b3b);}),_0x470003;}['_attachActions'](_0x23191e,_0x3890f3){const _0x6fca2=_0x23191e&&_0x23191e['element'];_0x6fca2&&(this['listenTo'](_0x6fca2,'mouseenter',()=>this['actionIndicator']=_0x3890f3),this['listenTo'](_0x6fca2,'focus',()=>this['actionIndicator']=_0x3890f3),this['listenTo'](_0x6fca2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x6fca2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x55ff16=super['_createCommentInputView']();return _0x55ff16['bind']('placeholder')['to'](this),_0x55ff16;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x2c50d3){const _0x521df2=Dt(_0x2c50d3,0x1e),_0xe85cad=new MutationObserver(_0xf7de1b=>{for(const _0x5e7d10 of _0xf7de1b)('attributes'==_0x5e7d10['type']&&'class'==_0x5e7d10['attributeName']||'childList'==_0x5e7d10['type']||'characterData'==_0x5e7d10['type'])&&_0x521df2();});return{'attach'(_0x578f8f){_0xe85cad['observe'](_0x578f8f,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xe85cad['disconnect'](),_0x521df2['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4e5b93,_0x328aa8){super(_0x4e5b93),this['id']=_0x26f50a(),this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5d0a1f,_0x24fc4d)=>this['fire']('Esc',_0x24fc4d)),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'](_0x328aa8),this['mainView']=_0x328aa8;const _0x981c38=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x981c38['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 _0x38cf3d=this['element']['clientHeight'];_0x38cf3d&&(this['height']=_0x38cf3d);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1ca8f3(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4d3617,target:_0x171885,type:_0x39d4fc,isVisible:_0x3446e2=!0x0}){super(),this['view']=_0x4d3617,this['view']['element']||this['view']['render'](),this['_type']=_0x39d4fc,this['_target']=_0x171885,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x27e15c([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x586040,_0x87f2)=>{this['view']['focusTracker']['add'](_0x87f2);}),this['focusableElements']['on']('remove',(_0x8a44d1,_0x4b75c7)=>{this['view']['focusTracker']['remove'](_0x4b75c7);}),this['set']('isVisible',_0x3446e2);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4cd16b=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x4cd16b),_0x4cd16b;}get['targetRect'](){const _0x357f5f=this['target'];if(null===_0x357f5f)return null;if(_0x357f5f instanceof _0x32a86d)return _0x357f5f;const _0x4b749c=_0x357f5f['filter'](_0x530e91=>function(_0x17e4dc){const _0x4dc885=_0x17e4dc['offsetParent'];if(_0x4dc885)return!0x0;const _0x400398=_0x17e4dc['getClientRects']()['item'](0x0);return!!_0x400398;}(_0x530e91));return 0x0===_0x4b749c['length']?null:new _0x32a86d(_0x4b749c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3de357){this['view']['isActive']=_0x3de357,this['view']['mainView']['isActive']=_0x3de357;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x18414a){if(!(null===_0x18414a||_0x18414a instanceof _0x32a86d||Array['isArray'](_0x18414a)&&_0x18414a['every'](_0x5b1617=>li(_0x5b1617))))throw new _0xd92937('annotation-invalid-target',null,{'target':_0x18414a});}['_getNormalizedTarget'](){const _0x179ae9='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x179ae9)?[_0x179ae9]:_0x179ae9;}}function li(_0x54f1eb){return null!==_0x54f1eb&&'object'==typeof _0x54f1eb&&'nodeType'in _0x54f1eb&&0x1===_0x54f1eb['nodeType'];}class _ extends _0x27e15c{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x6cfe68=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x20e391(),this['_focusTracker']['on']('change:isFocused',(_0x5f4291,_0x300ac1,_0x952a2c)=>{_0x952a2c||this['fire']('blur');});for(const _0xd92edc of _0x6cfe68)this['add'](_0xd92edc);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x25a4af){if(this['has'](_0x25a4af))throw new _0xd92937('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x25a4af['innerView'],_0x25a4af),this['_viewToAnnotation']['set'](_0x25a4af['view'],_0x25a4af);for(const _0x43bb36 of _0x25a4af['focusableElements'])this['_focusTracker']['add'](_0x43bb36);this['listenTo'](_0x25a4af['focusableElements'],'add',(_0x5f49cd,_0x492346)=>{this['_focusTracker']['add'](_0x492346);}),this['listenTo'](_0x25a4af['focusableElements'],'remove',(_0x49d78d,_0xa6443e)=>{this['_focusTracker']['remove'](_0xa6443e);}),this['listenTo'](_0x25a4af['view']['focusTracker'],'change:isFocused',(_0x150620,_0x1e2a68,_0x3b7de0)=>{_0x3b7de0&&this['fire']('focus',_0x25a4af);}),_0x25a4af['updateTargetRect']();const _0xd433d8=this['_getOrderInContent'](_0x25a4af['view']['targetRect']);return super['add'](_0x25a4af,_0xd433d8);}['remove'](_0x53d963){if(!this['has'](_0x53d963))throw new _0xd92937('annotationcollection-not-existing-item',null);this['stopListening'](_0x53d963['view']['focusTracker']),this['stopListening'](_0x53d963['focusableElements']);for(const _0x2d6e9a of _0x53d963['focusableElements'])this['_focusTracker']['remove'](_0x2d6e9a);return this['_viewToAnnotation']['delete'](_0x53d963['view']),this['_innerViewToAnnotation']['delete'](_0x53d963['innerView']),super['remove'](_0x53d963);}['getByInnerView'](_0x1867eb){return this['_innerViewToAnnotation']['get'](_0x1867eb);}['getByView'](_0x124b74){return this['_viewToAnnotation']['get'](_0x124b74);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x36476e of this)_0x36476e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1ecde4=Array['from'](this)['sort']((_0x134962,_0x1fe408)=>v(_0x134962['view']['targetRect'],_0x1fe408['view']['targetRect']));for(let _0x247eab=_0x1ecde4['length']-0x1;_0x247eab>0x0;_0x247eab--){const _0x61c410=_0x1ecde4[_0x247eab];_0x247eab!==this['getIndex'](_0x61c410)&&(this['remove'](_0x61c410),this['add'](_0x61c410));}}['_getOrderInContent'](_0x34bc66){let _0x24df74=0x0;if(!_0x34bc66)return this['length'];for(const _0x51b1c5 of this){const _0x3dbfd0=_0x51b1c5['view']['targetRect'];if(_0x3dbfd0){if(v(_0x34bc66,_0x3dbfd0)<0x0)return _0x24df74;_0x24df74++;}}return _0x24df74;}}function v(_0x13fc00,_0x36e64b){if(null===_0x13fc00&&null===_0x36e64b)return 0x0;if(null===_0x13fc00)return-0x1;if(null===_0x36e64b)return 0x1;const _0xb4ab59=_0x13fc00['top']-_0x36e64b['top'];return 0x0==_0xb4ab59?_0x13fc00['left']-_0x36e64b['left']:_0xb4ab59;}class O extends _0x36456e{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x25f9fd){if(super(_0x25f9fd),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x25f9fd instanceof _0x4358e8){const _0x557cca=_0x25f9fd['locale'];_0x25f9fd['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x238b26){this['collection']['add'](_0x238b26);}['remove'](_0x1811f5){this['collection']['remove'](_0x1811f5),_0x1811f5['destroy']();}['refreshVisibility'](){for(const _0x4fa70d of this['collection'])_0x4fa70d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2cc03d){return this['collection']['getByInnerView'](_0x2cc03d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3144e7 of this['collection'])_0x3144e7['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0xdc157f){this['fire']('_activateAnnotation',_0xdc157f);}['createAnnotation'](_0x3de703){return new d(_0x3de703);}['createAnnotationView'](_0x316102,_0x53be08){return new S(_0x316102,_0x53be08);}['_addActiveAnnotation'](_0xfebc04){const _0x26268a=new Set(this['activeAnnotations']);_0x26268a['add'](_0xfebc04),this['activeAnnotations']=_0x26268a;}['_removeActiveAnnotation'](_0x1fae16){const _0xc62c13=new Set(this['activeAnnotations']);_0xc62c13['delete'](_0x1fae16),this['activeAnnotations']=_0xc62c13;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4a40be=this['collection'],_0x4a108f=this['_visibleAnnotations'];function _0x316999(_0x3accf8){const _0x6eedfc=_0x3accf8['source'];_0x6eedfc['isVisible']&&!_0x4a108f['has'](_0x6eedfc)?_0x4a108f['add'](_0x6eedfc):!_0x6eedfc['isVisible']&&_0x4a108f['has'](_0x6eedfc)&&_0x4a108f['remove'](_0x6eedfc),_0x6eedfc['view']['focusTracker']['remove'](_0x6eedfc['view']['element']),_0x6eedfc['view']['focusTracker']['add'](_0x6eedfc['view']['element']);}this['listenTo'](_0x4a40be,'add',(_0xab12a2,_0xe148ac)=>{_0xe148ac['isVisible']&&_0x4a108f['add'](_0xe148ac),this['listenTo'](_0xe148ac,'change:isVisible',_0x316999);}),this['listenTo'](_0x4a40be,'remove',(_0x1ad3c4,_0x5886e4)=>{_0x4a108f['has'](_0x5886e4)&&_0x4a108f['remove'](_0x5886e4),this['stopListening'](_0x5886e4,'change:isVisible',_0x316999);});}['_setupEnterAnnotationKeystroke'](){const _0x4d9650=_0x24ae25=>{_0x24ae25['on']('ready',()=>{_0x24ae25['keystrokes']['set'](_0x211b6f,(_0x2ea35f,_0x7574a1)=>{const _0x3fa710=_0x3dbc24(this['activeAnnotations']['values']());_0x3fa710&&(_0x3fa710['view']['focus'](),_0x7574a1());});});};this['context']instanceof _0x4358e8?_0x4d9650(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1780c8,_0x8014a7)=>{_0x4d9650(_0x8014a7);});}['_setupEscapeAnnotationHandling'](){const _0x176d3c=_0x2801d8=>{const _0x97488e=_0x2801d8['source'],_0x3626fd=[];let _0x5ccd27;if(Array['isArray'](_0x97488e['target'])){_0x5ccd27=_0x97488e['target'][0x0],this['context']instanceof _0x4358e8?_0x3626fd['push'](this['context']):this['context']['editors']&&_0x3626fd['push'](...this['context']['editors']);for(const _0x2da750 of _0x3626fd)for(const _0x6a298a of _0x2da750['editing']['view']['domRoots']['values']())if(_0x6a298a['contains'](_0x5ccd27))return void _0x2da750['editing']['view']['focus']();_0x5ccd27['focus']();}};this['listenTo'](this['collection'],'add',(_0x53a209,_0x5e1c74)=>{this['listenTo'](_0x5e1c74,'escape',_0x176d3c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x49b881,_0x2b8b05)=>{this['stopListening'](_0x2b8b05,'escape',_0x176d3c);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x36456e{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,lt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x438cd6){super(_0x438cd6),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3e5705=this['context']['config'];_0x3e5705['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3e5705['define']('comments.maxThreadTotalWeight',0x1f4),_0x3e5705['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3e5705['define']('comments.CommentThreadView',gt),_0x3e5705['define']('comments.CommentView',Tt),_0x3e5705['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x34a805=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x33b477,_0x59f76)=>this['_addCommentThread'](_0x59f76)),this['on']('submitCommentThread',(_0xd4e946,_0x1412df)=>this['_submitCommentThread'](_0x1412df)),this['on']('resolveCommentThread',(_0x393f9f,_0x1b5f93)=>this['_resolveCommentThread'](_0x1b5f93)),this['on']('resolveCommentThread',(_0x537f29,_0x2396a4)=>this['_updateActiveAnnotation'](_0x2396a4),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xd44a7,_0x43a4b2)=>this['_reopenCommentThread'](_0x43a4b2)),this['on']('reopenCommentThread',(_0x22a81c,_0x16b90e)=>this['_updateActiveAnnotation'](_0x16b90e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x52d2b2,_0x10d12e)=>this['_removeCommentThread'](_0x10d12e)),this['on']('updateCommentThread',(_0x270406,_0x1d27a4)=>this['_updateCommentThread'](_0x1d27a4)),this['on']('updateCommentThread',(_0x2ff0ba,_0x232d10)=>this['_updateActiveAnnotation'](_0x232d10),{'priority':'lowest'}),this['on']('addComment',(_0x2e0f01,_0x429a84)=>this['_addComment'](_0x429a84)),this['on']('updateComment',(_0x26f4b3,_0x23f8ea)=>this['_updateComment'](_0x23f8ea)),this['on']('removeComment',(_0x1573bd,_0x2cad5a)=>this['_removeComment'](_0x2cad5a)),this['on']('addComment',(_0x1be906,{threadId:_0xcdad31,isFromAdapter:_0x22799b})=>{if(_0x22799b)return;const _0x2cc99f=this['getCommentThread'](_0xcdad31),_0x996146=_0x2cc99f&&this['_threadToController']['get'](_0x2cc99f);_0x996146&&_0x996146['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x34a805,'change:activeAnnotations',(_0x13d2f5,_0x2b7cd8,_0x489dfc)=>{const _0x4645e3=Array['from'](_0x489dfc)['map'](_0x4a9b81=>this['_viewToController']['get'](_0x4a9b81['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4645e3?_0x4645e3['model']:null;});}set['adapter'](_0x369c1e){if(this['_adapter'])throw new _0xd92937('commentsrepository-adapter-already-set');this['_adapter']=_0x369c1e;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x564289=_t,threadId:_0x40deac=_0x26f50a(),comments:_0x10d07e=[],unlinkedAt:_0x367fc4=null,resolvedAt:_0x2d98ca=null,resolvedBy:_0xf85fdc=null,target:_0x54e093=null,context:_0x4c05f6=null,attributes:_0x10e238={},isResolvable:_0x380f78=!0x0,isSubmitted:_0x1a475f=!0x1,isFromAdapter:_0x5500c4=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x564289),{'channelId':_0x564289,'threadId':_0x40deac,'comments':_0x10d07e,'unlinkedAt':_0x367fc4,'resolvedAt':_0x2d98ca,'resolvedBy':_0xf85fdc,'target':_0x54e093,'context':_0x4c05f6,'attributes':_0x10e238,'isFromAdapter':_0x5500c4,'isResolvable':_0x380f78,'isSubmitted':_0x1a475f}),this['getCommentThread'](_0x40deac);}['openNewCommentThread']({channelId:_0x2e25ee=_t,threadId:_0x3df540=_0x26f50a(),target:_0x2ab6dc,context:_0x50cd3d=null,isResolvable:_0xdd05a2=!0x0}){if(this['_readOnlyChannels']['has'](_0x2e25ee)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2ab6dc)throw new _0xd92937('commentsrepository-missing-target');const _0x171325=this['addCommentThread']({'channelId':_0x2e25ee,'threadId':_0x3df540,'target':_0x2ab6dc,'context':_0x50cd3d,'isResolvable':_0xdd05a2});if(!_0x171325)return null;const _0x9fafd2=this['_threadToController']['get'](_0x171325),_0x214092=_0x9fafd2['view']['commentThreadInputView']['commentInputView'],_0x4b73a9=this['context']['plugins']['get'](O),_0x4a343c=_0x4b73a9['getByInnerView'](_0x9fafd2['view']);return _0x4b73a9['activate'](_0x4a343c),_0x214092['once']('editorReady',()=>_0x214092['focus']()),_0x171325;}['hasCommentThread'](_0x2c2a37){if('string'!=typeof _0x2c2a37)throw new _0xd92937('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2c2a37);}['updateCommentThread']({channelId:_0x36e9f4=_t,threadId:_0x4e994b,context:_0x1bc54c,unlinkedAt:_0x1e14da,attributes:_0x21c3a4,isFromAdapter:_0x424d24=!0x1}){return this['fire'](Nt('updateCommentThread',_0x36e9f4),{'channelId':_0x36e9f4,'threadId':_0x4e994b,'context':_0x1bc54c,'unlinkedAt':_0x1e14da,'attributes':_0x21c3a4,'isFromAdapter':_0x424d24}),this['getCommentThread'](_0x4e994b);}['getCommentThread'](_0x58569e){if('string'!=typeof _0x58569e)throw new _0xd92937('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x58569e);}['fetchCommentThread']({channelId:_0x264197,threadId:_0x3ff26d}={}){const _0x1450ac=this['getCommentThread'](_0x3ff26d);if(_0x1450ac)return Promise['resolve'](_0x1450ac);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xd92937('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x264197,'threadId':_0x3ff26d})['then'](_0x27d2db=>this['hasCommentThread'](_0x3ff26d)?this['getCommentThread'](_0x3ff26d):_0x27d2db?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x264197},_0x27d2db)):void 0x0)['catch'](_0xc65d5f=>{throw console['error'](_0xc65d5f),new _0xd92937('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x22aedc,skipNotAttached:_0xfb3a55=!0x1,skipEmpty:_0x173beb=!0x1,toJSON:_0x55c45f=!0x1}={}){const _0x81d72=[];for(const _0x55b169 of this['_threads']['values']())_0x22aedc&&_0x55b169['channelId']!==_0x22aedc||_0xfb3a55&&!_0x55b169['isAttached']||_0x173beb&&0x0===_0x55b169['length']||_0x81d72['push'](_0x55b169);return _0x55c45f?_0x81d72['map'](_0x155242=>_0x155242['toJSON']()):_0x81d72;}['setActiveCommentThread'](_0x2bbf98){const _0x132263=this['context']['plugins']['get'](O);if(!_0x2bbf98)return void(this['activeCommentThread']&&_0x132263['deactivateAll']());const _0x24a840=this['getCommentThread'](_0x2bbf98);if(!_0x24a840)throw new _0xd92937('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2bbf98});if(!this['_threadToController']['has'](_0x24a840))throw new _0xd92937('commentsrepository-active-not-attached',null,{'threadId':_0x2bbf98});const _0xf5f455=_0x132263['getByInnerView'](this['_threadToController']['get'](_0x24a840)['view']);_0x132263['activate'](_0xf5f455);}['switchReadOnly'](_0x4d7e0f,_0x5deb0d){_0x4d7e0f?this['_readOnlyChannels']['add'](_0x5deb0d):this['_readOnlyChannels']['delete'](_0x5deb0d),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x129e2b){return this['_readOnlyChannels']['has'](_0x129e2b)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x217a9c,_0x316fe8){return new vt(_0x217a9c,_0x316fe8);}['setPermissions'](_0x213c2c,_0x4a2bcc=_t){this['_permissions']['set'](_0x4a2bcc,_0x213c2c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x26d27f=_t){return this['_permissions']['has'](_0x26d27f)?this['_permissions']['get'](_0x26d27f):bt;}['_addCommentThread']({channelId:_0x3ac237,threadId:_0x4df46e,comments:_0x3e9432,unlinkedAt:_0x2e84ec,resolvedAt:_0x3329de,resolvedBy:_0x3b0b35,target:_0x421a78,context:_0x51ef1f,attributes:_0x31537b,isFromAdapter:_0xc73f78,isResolvable:_0x404a58,isSubmitted:_0x2e53c9}){if('string'!=typeof _0x4df46e)throw new _0xd92937('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4df46e});if(this['hasCommentThread'](_0x4df46e))throw new _0xd92937('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4df46e});const _0xbd2286=new ui(this,{'channelId':_0x3ac237,'id':_0x4df46e,'context':_0x51ef1f,'attributes':_0x31537b,'unlinkedAt':_0x2e84ec,'resolvedAt':_0x3329de,'resolvedBy':_0x3b0b35?this['context']['plugins']['get'](st)['getUser'](_0x3b0b35):null,'isResolvable':_0x404a58,'isSubmitted':_0x2e53c9||_0xc73f78});this['_threads']['set'](_0x4df46e,_0xbd2286);for(const _0xe47179 of _0x3e9432)_0xbd2286['_add'](this['_createNewComment']({'threadId':_0x4df46e,..._0xe47179}));return _0x421a78&&_0xbd2286['attachTo'](_0x421a78),_0xc73f78||!_0xbd2286['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3ac237,'threadId':_0x4df46e});}['_submitCommentThread']({channelId:_0x4d5059,threadId:_0x2920a6}){if(!this['hasCommentThread'](_0x2920a6))throw new _0xd92937('commentsrepository-missing-comment-thread',this);const _0x27ae7f=this['getCommentThread'](_0x2920a6);if(_0x27ae7f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x188a85,comments:_0x54c110,resolvedAt:_0x21e466,resolvedBy:_0x2e77d2,context:_0x28cc30,attributes:_0x1e1e38}=_0x27ae7f,_0x4b1a01=this['context']['plugins']['get']('PendingActions'),_0x51908b=_0x4b1a01['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4d5059,'threadId':_0x188a85,'comments':_0x54c110['map'](_0x204131=>_0x204131['toJSON']()),'resolvedAt':_0x21e466,'resolvedBy':_0x2e77d2?_0x2e77d2['id']:_0x2e77d2,'context':_0x28cc30,'attributes':_0x1e1e38})['then'](({comments:_0x2d47a8})=>{_0x4b1a01['remove'](_0x51908b);for(const _0x23e1b4 of _0x2d47a8)this['_updateComment']({'channelId':_0x4d5059,'threadId':_0x2920a6,'commentId':_0x23e1b4['commentId'],'createdAt':_0x23e1b4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x570826=>{throw console['error'](_0x570826),new _0xd92937('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x20f529,target:_0x4f4f43}){const _0x1c8a57=this['getCommentThread'](_0x20f529);if(!_0x1c8a57)throw new _0xd92937('commentsrepository-attach-missing-comment-thread',this);const _0x11c3fe=this['context']['plugins']['get']('PendingActions'),_0x7bce6a=this['context']['plugins']['get'](O),_0x4a1598=this['_createCommentThreadView'](_0x1c8a57),_0x5de3ee=new vt(_0x1c8a57,_0x4a1598);let _0x3ad850=null;_0x4a1598['on']('change:isDirty',(_0x456fbf,_0x5e7ce6,_0x154dfe)=>{_0x154dfe?_0x3ad850=_0x11c3fe['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3ad850&&(_0x11c3fe['remove'](_0x3ad850),_0x3ad850=null);}),this['_threadToController']['set'](_0x1c8a57,_0x5de3ee),this['_viewToController']['set'](_0x4a1598,_0x5de3ee);const _0x2e0d9e=new S(this['context']['locale'],_0x4a1598);_0x2e0d9e['bind']('length')['to'](_0x4a1598),_0x2e0d9e['bind']('isDirty')['to'](_0x4a1598,'isDirty',_0x4a1598,'length',(_0x5c390a,_0x3ce6e3)=>_0x5c390a||!_0x3ce6e3),_0x2e0d9e['bind']('isActive')['to'](_0x4a1598),_0x2e0d9e['type']='comment';const _0x167fae=new d({'view':_0x2e0d9e,'target':_0x4f4f43,'type':'comment','isVisible':!_0x1c8a57['archivedAt']});return _0x4a1598['on']('escape',()=>{_0x167fae['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4a1598,_0x167fae),_0x7bce6a['add'](_0x167fae),_0x167fae;}['_bindAnnotationToEditors'](_0x3440b3,_0x160532){this['listenTo'](_0x3440b3,'editorReady',(_0x595b7b,_0x25ea22)=>{const _0x2d2508=_0x25ea22['ui']['view']['body']['bodyCollectionContainer'];_0x160532['focusableElements']['add'](_0x2d2508),this['context']instanceof _0x4358e8&&this['context']['ui']['focusTracker']['add'](_0x2d2508);},{'priority':'highest'}),this['listenTo'](_0x3440b3,'editorDestroyed',(_0x32c4c6,_0x3b27fd)=>{const _0x272d9c=_0x3b27fd['ui']['view']['body']['bodyCollectionContainer'];_0x160532['focusableElements']['has'](_0x272d9c)&&_0x160532['focusableElements']['remove'](_0x272d9c),this['context']instanceof _0x4358e8&&this['context']['ui']['focusTracker']['remove'](_0x272d9c);});}['_unbindEditors'](_0x2e3f34){this['stopListening'](_0x2e3f34,'editorReady'),this['stopListening'](_0x2e3f34,'editorDestroyed');}['_createCommentThreadView'](_0x563528){const _0x1fe756=this['context']['plugins']['get'](st),{config:_0x2dc043,locale:_0x23580f}=this['context'],_0x32cb80=pt(_0x2dc043['get']('locale'),_0x23580f);return new(0x0,(_0x2dc043['get']('comments'))['CommentThreadView'])(_0x23580f,_0x563528,_0x1fe756['me'],{'editorConfig':{..._0x2dc043['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2dc043['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2dc043['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2dc043['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2dc043['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x32cb80,'CommentView':_0x2dc043['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4b317c,channelId:_0x412ee6,resolvedAt:_0x7f283f,resolvedBy:_0x55a7a2,isFromAdapter:_0x4f96f8}){if(!this['hasCommentThread'](_0x4b317c))throw new _0xd92937('commentsrepository-missing-comment-thread',null,{'threadId':_0x4b317c});const _0x49d5b2=this['getCommentThread'](_0x4b317c);if(_0x49d5b2['isResolved'])throw new _0xd92937('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4b317c});const _0x1ded91=this['context']['plugins']['get'](st);if(_0x49d5b2['resolvedBy']=_0x1ded91['getUser'](_0x55a7a2),_0x49d5b2['resolvedAt']=_0x7f283f,_0x4f96f8||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x468c19=this['context']['plugins']['get']('PendingActions'),_0x551d29=_0x468c19['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x412ee6,'threadId':_0x4b317c})['then'](({resolvedAt:_0x1e194f,resolvedBy:_0x16bd90})=>{_0x468c19['remove'](_0x551d29),_0x49d5b2['resolvedBy']['id']!==_0x16bd90&&(_0x49d5b2['resolvedBy']=_0x1ded91['getUser'](_0x16bd90)),_0x49d5b2['resolvedAt']=_0x1e194f;})['catch'](_0x43838e=>{throw console['error'](_0x43838e),new _0xd92937('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4a1bae,channelId:_0x3bbe9e,isFromAdapter:_0x4279dc}){if(!this['hasCommentThread'](_0x4a1bae))throw new _0xd92937('commentsrepository-missing-comment-thread',null,{'threadId':_0x4a1bae});const _0xd5790=this['getCommentThread'](_0x4a1bae);if(!_0xd5790['isResolved'])throw new _0xd92937('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4a1bae});if(_0xd5790['resolvedBy']=null,_0xd5790['resolvedAt']=null,_0x4279dc||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1d83de=this['context']['plugins']['get']('PendingActions'),_0x69a8f8=_0x1d83de['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3bbe9e,'threadId':_0x4a1bae})['then'](()=>_0x1d83de['remove'](_0x69a8f8))['catch'](_0xc1d84c=>{throw console['error'](_0xc1d84c),new _0xd92937('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1597fb,isFromAdapter:_0x4c6cd3}){const _0xf1d26d=this['getCommentThread'](_0x1597fb);if(!_0xf1d26d)throw new _0xd92937('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1597fb),this['_threads']['delete'](_0x1597fb),!_0xf1d26d['isSubmitted']||_0x4c6cd3||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5de882=this['context']['plugins']['get']('PendingActions'),{channelId:_0x30bebb}=_0xf1d26d,_0xc7b75c=_0x5de882['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x30bebb,'threadId':_0x1597fb})['then'](()=>_0x5de882['remove'](_0xc7b75c))['catch'](_0x241b2a=>{throw console['error'](_0x241b2a),new _0xd92937('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0xfa9598,unlinkedAt:_0x1caff5,context:_0x26598c,attributes:_0xcc90b0,isFromAdapter:_0x5646c3}){if('string'!=typeof _0xfa9598)throw new _0xd92937('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xfa9598});if(!this['hasCommentThread'](_0xfa9598))throw new _0xd92937('commentsrepository-missing-comment-thread',null,{'threadId':_0xfa9598});const _0x5c0ab1=this['getCommentThread'](_0xfa9598);let _0x5d9c26=!0x1;if(void 0x0!==_0x26598c&&_0x5c0ab1['context']!==_0x26598c&&(_0x5c0ab1['context']=_0x26598c,_0x5d9c26=!0x0),void 0x0!==_0x1caff5&&_0x5c0ab1['unlinkedAt']!==_0x1caff5&&(_0x5c0ab1['unlinkedAt']=_0x1caff5,_0x5d9c26=!0x0),_0xcc90b0&&!At(_0xcc90b0,_0x5c0ab1['attributes'])&&(_0x5c0ab1['attributes']=_0xcc90b0,_0x5d9c26=!0x0),!_0x5d9c26)return Promise['resolve']();if(!_0x5c0ab1['isSubmitted']||_0x5646c3||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x470e9b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x355093}=_0x5c0ab1,_0x3b2ed1=_0x470e9b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x355093,'threadId':_0xfa9598,'context':_0x26598c,'unlinkedAt':_0x1caff5,'attributes':_0xcc90b0})['then'](()=>_0x470e9b['remove'](_0x3b2ed1))['catch'](_0x3b4433=>{throw console['error'](_0x3b4433),new _0xd92937('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x27b134){const _0x38daf2=this['context']['plugins']['get'](O),_0x157edb=this['getCommentThread'](_0x27b134);if(_0x157edb['_isAttached']=!0x1,this['_threadToController']['has'](_0x157edb)){const _0x297d69=this['_threadToController']['get'](_0x157edb),_0x58a1e8=_0x297d69['view'],_0x1db271=_0x38daf2['getByInnerView'](_0x58a1e8);this['_threadToController']['delete'](_0x157edb),this['_viewToController']['delete'](_0x58a1e8),_0x1db271&&_0x38daf2['remove'](_0x1db271),_0x297d69['destroy'](),_0x58a1e8['destroy']()['then'](()=>{this['_unbindEditors'](_0x58a1e8);});}}['_updateActiveAnnotation']({threadId:_0x187f2c,resolvedAt:_0x55abf0,unlinkedAt:_0x35bb08}){const _0x154469=!!_0x55abf0,_0xe5d893=this['context']['plugins']['get'](O),_0xb3c7d5=this['getCommentThread'](_0x187f2c);if(this['_threadToController']['has'](_0xb3c7d5)){const _0x547579=this['_threadToController']['get'](_0xb3c7d5)['view'],_0x1c52e8=_0xe5d893['getByInnerView'](_0x547579);_0x1c52e8&&(_0x154469&&_0xe5d893['_removeActiveAnnotation'](_0x1c52e8),_0x35bb08?_0x1c52e8['isVisible']=!0x1:_0x1c52e8['refreshVisibility']());}}['_getExternalAuthor'](_0x191ece){const _0x2801f0=this['context']['plugins']['get'](st),_0x36db59=It('external:'+_0x191ece),_0x26ee66=_0x2801f0['getUser'](_0x36db59);return _0x26ee66||_0x2801f0['addUser']({'id':_0x36db59,'name':_0x191ece});}['_createNewComment']({threadId:_0x44baac,commentId:_0x3f3977=_0x26f50a(),content:_0x25280f,authorId:_0x614ca9,createdAt:_0x16d863,attributes:_0x42f29d}){if('string'!=typeof _0x3f3977)throw new _0xd92937('commentsrepository-invalid-commentid');if('string'!=typeof _0x614ca9)throw new _0xd92937('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x25280f||!_0x25280f['trim']())throw new _0xd92937('commentsrepository-invalid-comment-content');const _0x461ad3=this['context']['plugins']['get'](st)['getUser'](_0x614ca9);if(!_0x461ad3)throw new _0xd92937('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x614ca9});let _0x350685=null,_0x344a72=_0x16d863;return _0x42f29d?.['@external']&&(_0x350685=this['_getExternalAuthor'](_0x42f29d['@external']['authorName']),_0x344a72=new Date(_0x42f29d['@external']['createdAt'])),new fi(this,{'threadId':_0x44baac,'id':_0x3f3977,'author':_0x350685||_0x461ad3,'creator':_0x461ad3,'content':_0x25280f,'createdAt':_0x16d863,'authoredAt':_0x344a72,'attributes':_0x42f29d});}['_addComment'](_0x58d581){let {threadId:_0x1b73b8,content:_0x472be7,attributes:_0x5e25ef,isFromAdapter:_0x40e0ad}=_0x58d581;const _0x504637=this['getCommentThread'](_0x58d581['threadId']);if(!_0x504637)throw new _0xd92937('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5c9558=this['_createNewComment'](_0x58d581),{id:_0x30f3ec}=_0x5c9558;if(_0x504637['_add'](_0x5c9558),_0x40e0ad||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x504637['isSubmitted'])return Promise['resolve']();const _0x51ac0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x381d41}=_0x504637,_0x1a2ff6=_0x51ac0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5e25ef||(_0x5e25ef={}),this['adapter']['addComment']({'channelId':_0x381d41,'threadId':_0x1b73b8,'commentId':_0x30f3ec,'content':_0x472be7,'attributes':_0x5e25ef})['then'](_0x3da5e1=>{_0x51ac0['remove'](_0x1a2ff6),_0x3da5e1&&this['_updateComment']({'channelId':_0x381d41,'threadId':_0x1b73b8,'commentId':_0x30f3ec,'createdAt':_0x3da5e1['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2c9c0c=>{throw console['error'](_0x2c9c0c),new _0xd92937('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5b7c22,commentId:_0x383d9a,content:_0x2607a7,createdAt:_0x25ab55,attributes:_0x13c353,isFromAdapter:_0x22e025}){if(void 0x0!==_0x2607a7&&('string'!=typeof _0x2607a7||!_0x2607a7['trim']()['length']))throw new _0xd92937('commentsrepository-update-comment-invalid-content');const _0x54de8f=this['getCommentThread'](_0x5b7c22),_0x2a8019=_0x54de8f['getComment'](_0x383d9a);if(!_0x2a8019)throw new _0xd92937('commentsrepository-update-missing-comment',this);let _0x36d3cb=!0x1;if(_0x2607a7&&_0x2607a7!==_0x2a8019['content']&&(_0x2a8019['isEditable']||_0x22e025)&&(_0x2a8019['content']=_0x2607a7,_0x36d3cb=!0x0),_0x25ab55&&_0x25ab55!==_0x2a8019['createdAt']&&(_0x2a8019['createdAt']=_0x25ab55,_0x2a8019['attributes']&&_0x2a8019['attributes']['@external']||(_0x2a8019['authoredAt']=_0x25ab55),_0x36d3cb=!0x0),_0x13c353&&!At(_0x13c353,_0x2a8019['attributes'])&&(_0x2a8019['attributes']=_0x13c353,_0x36d3cb=!0x0),!_0x36d3cb)return Promise['resolve']();if(_0x54de8f['fire']('commentUpdated'),_0x22e025||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4305f8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16354b}=this['getCommentThread'](_0x2a8019['threadId']),_0x25851c=_0x4305f8['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x16354b,'threadId':_0x5b7c22,'commentId':_0x383d9a,'content':_0x2607a7,'attributes':_0x13c353})['then'](()=>_0x4305f8['remove'](_0x25851c))['catch'](_0x8177e0=>{throw console['error'](_0x8177e0),new _0xd92937('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x491c0f,commentId:_0x1156a7,isFromAdapter:_0x5cd61c}){const _0x571444=this['getCommentThread'](_0x491c0f),_0x448389=_0x571444['getComment'](_0x1156a7);if(!_0x448389)throw new _0xd92937('commentsrepository-remove-missing-comment',this);if(_0x571444['_remove'](_0x448389),_0x5cd61c||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x255ec9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4acb9d}=_0x571444,_0xd7f023=_0x255ec9['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4acb9d,'threadId':_0x491c0f,'commentId':_0x1156a7})['then'](()=>_0x255ec9['remove'](_0xd7f023))['catch'](_0x7ed8fc=>{throw console['error'](_0x7ed8fc),new _0xd92937('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1ca8f3(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1a76f0,_0x25e957){super();const _0x5e6215=_0x25e957['isResolvable'];this['channelId']=_0x25e957['channelId'],this['id']=_0x25e957['id'],this['comments']=new _0x27e15c(),this['_repository']=_0x1a76f0,this['_isAttached']=!0x1,this['_isSubmitted']=_0x25e957['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1a76f0,'_permissions',_0x1a76f0,'_readOnlyChannels',()=>_0x1a76f0['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1a76f0,'_permissions',()=>_0x1a76f0['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1a76f0,'_permissions',()=>{const _0xc8f1fc=_0x1a76f0['getPermissions'](this['channelId']);return _0xc8f1fc['write']||_0xc8f1fc['admin'];}),this['bind']('isResolvable')['to'](_0x1a76f0,'_permissions',()=>_0x5e6215&&_0x1a76f0['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x25e957['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x133135,_0x7de802)=>_0x133135?_0x7de802?_0x133135<_0x7de802?_0x133135:_0x7de802:_0x133135:_0x7de802),this['set']('unlinkedAt',_0x25e957['unlinkedAt']||null),this['set']('resolvedAt',_0x25e957['resolvedAt']||null),this['set']('resolvedBy',_0x25e957['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x41e916=>!!_0x41e916),this['set']('attributes',_0x25e957['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x5e9d89,_0x40255d)=>_0x5e9d89+_0x40255d['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xa56dc4,id:_0x538ac5}=this;this['_repository']['fire'](Nt('submitCommentThread',_0xa56dc4),{'channelId':_0xa56dc4,'threadId':_0x538ac5});}['setUnlinkedAt'](_0x1d6587){this['_update']({'unlinkedAt':_0x1d6587});}['resolve']({resolvedAt:_0x3f3b70=new Date(),resolvedBy:_0x5efb5c=null,isFromAdapter:_0x53a98c=!0x1}={}){const _0x16cbaf=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x3ac769,id:_0x5c5fa7}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x3ac769),{'channelId':_0x3ac769,'threadId':_0x5c5fa7,'resolvedAt':_0x3f3b70,'resolvedBy':_0x5efb5c||_0x16cbaf['id'],'isFromAdapter':_0x53a98c});}['reopen']({isFromAdapter:_0x2ae31f=!0x1}={}){const {channelId:_0x41c8f4,id:_0x381c78}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x41c8f4),{'channelId':_0x41c8f4,'threadId':_0x381c78,'isFromAdapter':_0x2ae31f});}['setContext'](_0x259521){this['context']||this['_update']({'context':_0x259521});}['setAttribute'](_0x2823b8,_0x3dfef8){const _0x471a44=wt(this['attributes']);yt(_0x471a44,_0x2823b8,_0x3dfef8),this['_update']({'attributes':_0x471a44});}['removeAttribute'](_0x306139){const _0xdb6872=wt(this['attributes']);Ct(_0xdb6872,_0x306139),this['_update']({'attributes':_0xdb6872});}['remove']({isFromAdapter:_0x1aa03b=!0x1}={}){const {channelId:_0x2609cd,id:_0x5ac56f}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x2609cd),{'channelId':_0x2609cd,'threadId':_0x5ac56f,'isFromAdapter':_0x1aa03b});}['attachTo'](_0x47fe25){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x47fe25});}['addComment'](_0x32c242){const {channelId:_0x2fd010,id:_0x3ebf5d}=this;this['_repository']['fire'](Nt('addComment',_0x2fd010,_0x3ebf5d),Object['assign']({'channelId':_0x2fd010,'threadId':_0x3ebf5d},_0x32c242));}['getComment'](_0x34aab5){if('string'!=typeof _0x34aab5)throw new _0xd92937('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x34aab5});return this['comments']['get'](_0x34aab5);}['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'](_0x5ce2a0=>_0x5ce2a0['toJSON']()),'attributes':this['attributes']};}['_add'](_0x589b72){return this['listenTo'](_0x589b72,'change:authoredAt',()=>{const _0xc335f0=this['_findOptimalIndex'](_0x589b72),_0x893c8d=this['comments'];_0xc335f0-0x1!=_0x893c8d['getIndex'](_0x589b72)&&_0xc335f0+0x1!=_0x893c8d['getIndex'](_0x589b72)&&(this['_remove'](_0x589b72),this['_add'](_0x589b72));}),this['comments']['add'](_0x589b72,this['_findOptimalIndex'](_0x589b72));}['_update'](_0x5da02a){const {channelId:_0x209450,id:_0x415759}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x209450),{..._0x5da02a,'channelId':_0x209450,'threadId':_0x415759});}['_remove'](_0x2fb4a2){return this['stopListening'](_0x2fb4a2),_0x2fb4a2['destroy'](),this['comments']['remove'](_0x2fb4a2);}['_findOptimalIndex'](_0x2f0708){const _0x2ad03b=this['comments']['find'](_0x190385=>new Date(_0x190385['authoredAt'])['getTime']()>new Date(_0x2f0708['authoredAt'])['getTime']());return _0x2ad03b?this['comments']['getIndex'](_0x2ad03b):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1ca8f3(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x673527,_0x3e3d4f){super();const _0x328873=_0x673527['context']['plugins']['get'](st)['me'],_0x23f652=_0x673527['getCommentThread'](_0x3e3d4f['threadId']),_0x5317ea=0x0===_0x23f652['comments']['length'],_0x97afd3=_0x328873===_0x3e3d4f['author'];this['id']=_0x3e3d4f['id'],this['threadId']=_0x3e3d4f['threadId'],this['author']=_0x3e3d4f['author'],this['creator']=_0x3e3d4f['creator'],this['isExternal']=Boolean(_0x3e3d4f['attributes']&&_0x3e3d4f['attributes']['@external']),this['set']('content',_0x3e3d4f['content']),this['createdAt']=_0x3e3d4f['createdAt']||new Date(),this['set']('authoredAt',_0x3e3d4f['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x23f652,'resolvedAt'),this['set']('attributes',_0x3e3d4f['attributes']||{}),this['bind']('isEditable')['to'](_0x673527,'_permissions',()=>{const _0x4f422d=_0x673527['getPermissions'](_0x23f652['channelId'])['write'],_0x18b9a4=_0x673527['getPermissions'](_0x23f652['channelId'])['modifyAll'];return _0x97afd3&&_0x4f422d||!_0x97afd3&&_0x18b9a4;}),this['bind']('isRemovable')['to'](_0x23f652,'isRemovable',_0x673527,'_permissions',_0x33b9e6=>{const _0x50a5eb=_0x673527['getPermissions'](_0x23f652['channelId'])['write'],_0x45eef4=_0x673527['getPermissions'](_0x23f652['channelId'])['modifyAll'];return _0x97afd3&&_0x50a5eb||_0x33b9e6&&_0x5317ea||!_0x97afd3&&_0x45eef4&&!_0x5317ea;}),this['bind']('isReadOnly')['to'](_0x23f652,'isReadOnly'),this['_repository']=_0x673527;}get['weight'](){return Math['max'](function(_0x1c3154){const _0x139e7f=document['createElement']('div');return _0x139e7f['innerHTML']=_0x1c3154,_0x139e7f['textContent']['length'];}(this['content']),0xc8);}['update'](_0x48b6a4){const {threadId:_0x3e42dd,id:_0x2b03f9}=this;if(!this['_repository']['hasCommentThread'](_0x3e42dd))throw new _0xd92937('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4280d8}=this['_repository']['getCommentThread'](_0x3e42dd);this['_repository']['fire'](Nt('updateComment',_0x4280d8,_0x3e42dd),{'channelId':_0x4280d8,'threadId':_0x3e42dd,'commentId':_0x2b03f9,..._0x48b6a4});}['setAttribute'](_0x20dea5,_0x55d129){const _0x3f4402=wt(this['attributes']);yt(_0x3f4402,_0x20dea5,_0x55d129),this['update']({'attributes':_0x3f4402});}['removeAttribute'](_0x93300d){const _0x479e58=wt(this['attributes']);Ct(_0x479e58,_0x93300d),this['update']({'attributes':_0x479e58});}['remove'](_0x14085e={}){if(!_0x14085e['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x212b47,id:_0x493b0f}=this;if(!this['_repository']['hasCommentThread'](_0x212b47))throw new _0xd92937('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3b1f81}=this['_repository']['getCommentThread'](_0x212b47);this['_repository']['fire'](Nt('removeComment',_0x3b1f81,_0x212b47),{'channelId':_0x3b1f81,'threadId':_0x212b47,'commentId':_0x493b0f,..._0x14085e});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x44a5d3,..._0x50e49f){for(const _0x15abd1 of _0x50e49f)void 0x0!==_0x15abd1&&(_0x44a5d3+=':'+String(_0x15abd1));return _0x44a5d3;}class K extends _0x1d4e46{['refresh'](){const _0x188e18=this['editor']['model']['document']['selection'];for(const _0x2cbf60 of _0x188e18['getRanges']())if(this['_hasContent'](_0x2cbf60))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x1cdfad=_0x26f50a()}={}){const _0x48c43e=this['editor']['model'],_0x364ec1=[];for(const _0x37b2b4 of _0x48c43e['document']['selection']['getRanges']())this['_hasContent'](_0x37b2b4)&&_0x364ec1['push'](this['_trimToContent'](_0x37b2b4));_0x48c43e['change'](_0x218af6=>{for(const _0x26e6e6 of _0x364ec1){const _0x3c7ddc=_0x26f50a()['substr'](0x1,0x5),_0x231c43='comment:'+_0x1cdfad+':'+_0x3c7ddc;_0x218af6['addMarker'](_0x231c43,{'range':_0x26e6e6,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x35a2e9){for(const _0x30fd48 of _0x35a2e9['getItems']())if(this['_itemIsContent'](_0x30fd48))return!0x0;return!0x1;}['_itemIsContent'](_0x6aa316){return _0x6aa316['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x6aa316)&&!_0x6aa316['is']('element','tableCell');}['_trimToContent'](_0x292c32){const _0x10baf4=_0x4bd8ac=>!this['_itemIsContent'](_0x4bd8ac['item']),_0x470c45=_0x292c32['start']['getLastMatchingPosition'](_0x10baf4),_0x3dc11a=_0x292c32['end']['getLastMatchingPosition'](_0x10baf4,{'direction':'backward'});return this['editor']['model']['createRange'](_0x470c45,_0x3dc11a);}}class P extends _0x46aee5{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x175c47){super(_0x175c47),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x534374=this['editor'],_0x3870f1=_0x534374['model']['document']['selection'],_0x46d896=_0x4daac0(()=>this['refreshSelectedViews'](),0xa);_0x3870f1['on']('change:range',(_0x402a6c,_0x32848b)=>{_0x32848b['directChange']&&(_0x46d896['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x534374['editing']['view']['document'],'change:isFocused',(_0x33206d,_0x715d87,_0x369fa8)=>{_0x369fa8&&_0x46d896();}),this['listenTo'](_0x534374['ui']['focusTracker'],'change:isFocused',(_0x2d70dd,_0x18657c,_0xc6d6c4)=>{_0xc6d6c4||_0x534374['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x1809f4=>this['_editorAnnotationsData']['has'](_0x1809f4['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2b11d6){if(this['_editorAnnotations']['has'](_0x2b11d6['view']))return;this['_editorAnnotations']['add'](_0x2b11d6['view']),this['editor']['ui']['focusTracker']['add'](_0x2b11d6['view']['element']);const _0x46e635=this['editor']['plugins']['get'](O);this['listenTo'](_0x46e635['collection'],'remove',(_0x1c34bc,_0x4b67dd)=>{this['editor']['ui']['focusTracker']['remove'](_0x4b67dd['view']['element']),this['_editorAnnotations']['delete'](_0x4b67dd['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x34ee7e){if('function'!=typeof _0x34ee7e)throw new _0xd92937('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x34ee7e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2f4d92,annotations:_0x3e4bd2}){const _0x226b97=[],_0x4759cb=this['editor']['model']['document']['selection'],_0x359afd=Array['from'](_0x4759cb['getRanges']());for(const [_0xfbd31,_0x5dc2eb]of this['_editorAnnotationsData']){const _0x23939b=_0x1f0bab(_0x5dc2eb),_0x2cb1c1=_0x3e4bd2['getByInnerView'](_0xfbd31);_0x23939b&&_0x2cb1c1&&_0x226b97['push']({'annotation':_0x2cb1c1,'range':_0x23939b});}function _0x1f0bab(_0x54c53d){for(const _0x452e1e of _0x54c53d)for(const _0x3b1ab5 of _0x359afd)if(_0x452e1e['containsRange'](_0x3b1ab5,!_0x4759cb['isCollapsed']))return _0x452e1e;return null;}return _0x226b97['sort']((_0x22957f,_0x16c4b7)=>{const _0x39dce8=_0x22957f['range'],_0x5b008d=_0x16c4b7['range'];if(!_0x39dce8['isEqual'](_0x5b008d)){if(_0x39dce8['containsRange'](_0x5b008d,!0x0))return 0x1;if(_0x5b008d['containsRange'](_0x39dce8,!0x0))return-0x1;}return _0x22957f['annotation']==_0x2f4d92?-0x1:_0x16c4b7['annotation']==_0x2f4d92?0x1:0x0;})['map'](_0x438ad8=>_0x438ad8['annotation']);}get['_editorAnnotationsData'](){const _0x57ed37=new Map();for(const _0x24ec8c of Array['from'](this['_dataCollectors']))for(const [_0x357c6d,_0xd82e88]of _0x24ec8c())_0x57ed37['set'](_0x357c6d,_0xd82e88);return _0x57ed37;}}class ct extends _0x46aee5{['afterInit'](){const _0x2f57e5=this['editor'];if(!_0x2f57e5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2f57e5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x46aee5{constructor(_0x59a2be){super(_0x59a2be),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x5a0252=this['editor'],_0x49bb34=_0x5a0252['commands']['get']('importWord'),_0x2f5aca=_0x5a0252['plugins']['get'](st);_0x49bb34&&(_0x49bb34['on']('execute',(_0x5c5d66,[,_0x5ec12b])=>{_0x5ec12b['collaboration_features']={'comments':!0x0,'user_id':_0x2f5aca['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x49bb34,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x573907,_0x2e8b2d){const {comment_threads:_0x3ff331}=_0x2e8b2d;_0x3ff331&&_0x3ff331['forEach'](({thread_id:_0x4f510a,comments:_0x2a38e2,is_resolved:_0x236c3c})=>{const _0x22bccb=new Date(),_0x3ed2c1=_0x2a38e2['map'](({author:_0x40e0ec,content:_0x480011,created_at:_0x2294b1})=>({'content':_0x480011,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x22bccb,'attributes':{'@external':{'authorName':_0x40e0ec,'createdAt':_0x2294b1?new Date(_0x2294b1):new Date(),'source':'importWord'}}})),_0x463920=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x463920,'threadId':_0x4f510a,'comments':_0x3ed2c1,'resolvedAt':_0x236c3c?_0x22bccb:null});});}}class ut extends _0x46aee5{constructor(_0x203b0c){super(_0x203b0c),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x11fd85=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x11fd85,'contentInsertion',(_0xebb91c,_0x3132cd)=>this['_removeMarkersWithoutThreads'](_0x3132cd['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x39a242){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x39a242;const _0x3d0565=this['editor']['plugins']['get']('CommentsRepository');for(const _0x18bf2f of _0x39a242['keys']()){const [_0x5a89fb,_0x136fc7]=_0x18bf2f['split'](':');'comment'!=_0x5a89fb||_0x3d0565['hasCommentThread'](_0x136fc7)||_0x39a242['delete'](_0x18bf2f);}return _0x39a242;}['_registerMarkerInClipboardPipeline'](){const _0x271e4e=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x46527a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x46527a&&_0x271e4e['_registerMarkerToCopy']('comment',_0x46527a);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1e2eda){switch(_0x1e2eda){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ft extends _0x46aee5{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x178f83,_0x956ec1)=>{if(!_0x956ec1['options']['showCommentHighlights'])return null;if(_0x956ec1['options']['ignoreResolvedComments']){const {id:_0x49da32}=er(_0x178f83['markerName']),_0x375455=this['editor']['plugins']['get'](o);if(_0x375455['getCommentThread'](_0x49da32)?.['isResolved']&&_0x178f83['item'])return _0x956ec1['consumable']['consume'](_0x178f83['item'],'addMarker:'+_0x178f83['markerName']),_0x956ec1['consumable']['consume'](_0x178f83['item'],'removeMarker:'+_0x178f83['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2b8994=>{_0x2b8994['on']('addMarker:comment',(_0x5bc655,_0x5707fb,_0x575d8b)=>{if(!_0x575d8b['options']['showCommentHighlights'])return;const _0x9962e8=_0x5707fb['item'];if(!_0x9962e8)return;const _0x41d5d9=_0x575d8b['mapper']['toViewElement'](_0x9962e8);this['editor']['model']['schema']['isObject'](_0x9962e8)&&_0x41d5d9&&!_0x41d5d9['getCustomProperty']('widget')&&_0x41d5d9['is']('containerElement')&&_0x5cf785(_0x41d5d9,_0x575d8b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xd1084a,{writer:_0xb7739c,options:_0x16736a})=>{if(!_0x16736a['showCommentHighlights'])return null;const _0x172301=_0xb7739c['createContainerElement']('div'),_0x3b095b=_0xb7739c['createEmptyElement']('hr');return _0xb7739c['addClass']('ck-horizontal-line',_0x172301),_0xb7739c['insert'](_0xb7739c['createPositionAt'](_0x172301,0x0),_0x3b095b),_0x172301;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x14e155,{writer:_0x2891a7,options:_0x4aeb15})=>{if(!_0x4aeb15['showCommentHighlights'])return null;const _0x330a73=_0x2891a7['createContainerElement']('span'),_0x21e317=_0x2891a7['createEmptyElement']('img');return _0x2891a7['addClass']('image-inline',_0x330a73),_0x2891a7['insert'](_0x2891a7['createPositionAt'](_0x330a73,0x0),_0x21e317),_0x330a73;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x928dc1,{writer:_0x3695b8,options:_0x5efd97})=>{if(_0x5efd97['showCommentHighlights'])return _0x3695b8['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x17fdb5,_0xb87273,_0xf92d3e)=>{_0xf92d3e['options']['showCommentHighlights']&&_0x17fdb5['stop']();},{'priority':'high'});}}class r extends _0x46aee5{static get['requires'](){return[o,P,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e83ef){super(_0x1e83ef),this['set']('isThreadsLoadingPaused',!0x0),_0x1e83ef['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x366152,_0x28ad64,_0x16d703,_0x1b3300)=>{const _0x531e6b=_0x1e83ef['plugins']['get'](o),_0x5505e9=_0x16d703?er(_0x16d703)['id']:null;_0x1e83ef['model']['change'](()=>{if(_0x5505e9){const _0x224392=this['getAllMarkersForId'](_0x5505e9);for(const _0x58221a of _0x224392)_0x1e83ef['editing']['reconvertMarker'](_0x58221a);}if(_0x1b3300){const {id:_0x207a15}=er(_0x1b3300),_0x5dc0ee=_0x531e6b['getCommentThread'](_0x207a15);if(_0x5dc0ee&&_0x5dc0ee['unlinkedAt'])return;if(_0x5dc0ee&&!_0x5dc0ee['isAttached'])return;const _0x53b83e=this['getAllMarkersForId'](_0x207a15);for(const _0x5566f6 of _0x53b83e)_0x1e83ef['editing']['reconvertMarker'](_0x5566f6);}}),_0x5505e9&&this['scrollToThreadMarker'](_0x5505e9);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xeb08b1=this['editor'],_0x4773ed=_0xeb08b1['plugins']['get'](o),_0x5a33e5=_0xeb08b1['config']['get']('collaboration.channelId'),_0x284c02=_0x4773ed['getCommentThreads']()['filter'](_0x1ef912=>_0x1ef912['channelId']!==_0x5a33e5);_0xeb08b1['commands']['add']('addCommentThread',new K(_0xeb08b1)),this['listenTo'](_0xeb08b1,'change:isReadOnly',(_0x128692,_0x4e50d4,_0x38104f)=>{_0x4773ed['switchReadOnly'](_0x38104f,_0xeb08b1['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4773ed,dt('addCommentThread',_0x5a33e5),(_0x139f20,{threadId:_0x2174bf})=>{const _0x1035f2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2174bf);_0x1035f2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2174bf);}),this['listenTo'](_0x4773ed,dt('removeCommentThread',_0x5a33e5),(_0x2f351e,{threadId:_0x5a559e})=>{_0xeb08b1['model']['enqueueChange']({'isUndoable':!0x1},_0x64ec6e=>{const _0x1e9768=this['getAllMarkersForId'](_0x5a559e);for(const _0x51e0c4 of _0x1e9768)_0x64ec6e['removeMarker'](_0x51e0c4);});}),this['listenTo'](_0x4773ed,dt('resolveCommentThread',_0x5a33e5),(_0xf252a2,{threadId:_0x15aa68})=>{(this['_reconvertMarkers'](_0x15aa68),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x15aa68)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4773ed,dt('reopenCommentThread',_0x5a33e5),(_0xf8ecec,{threadId:_0x1346b2})=>{this['_reconvertMarkers'](_0x1346b2);},{'priority':'low'}),this['listenTo'](_0x4773ed,dt('addComment',_0x5a33e5),(_0x489f2e,{threadId:_0x2e9233,isFromAdapter:_0xa1850d})=>{const _0x2d381f=this['getAllMarkersForId'](_0x2e9233);if(_0xa1850d||0x0==_0x2d381f['length']||!_0x4773ed['hasCommentThread'](_0x2e9233))return;0x1===_0x4773ed['getCommentThread'](_0x2e9233)['length']&&_0xeb08b1['model']['enqueueChange']({'isUndoable':!0x1},_0x33246b=>{for(const _0x40d0eb of _0x2d381f)_0x33246b['updateMarker'](_0x40d0eb,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x284c02);}['afterInit'](){!async function(_0x4eeeeb){const _0x34962a=_0x463397([0x66,0x31,0x32,0x55,0x75,0x5a,0x6f,0x59,0x71,0x56,0x4c,0x62,0x74,0x69,0x67,0x51,0x4a,0x53,0x45,0x48,0x37,0x30,0x79,0x4b,0x7a,0x77,0x35,0x34,0x50,0x46,0x78,0x52,0x49,0x76,0x6e,0x4e,0x64,0x42,0x57,0x6a,0x73,0x41,0x4d,0x4f,0x68,0x36,0x6b,0x38,0x72,0x43,0x44,0x65,0x33,0x6d,0x70,0x61,0x54,0x47,0x58,0x6c,0x63,0x39]),_0x3bdf90=0x5bb9355e,_0x53dffb=0x5bbe5e26^_0x3bdf90,_0x209af5=window[_0x463397([0x44,0x61,0x74,0x65])][_0x463397([0x6e,0x6f,0x77])](),_0x45f7c3=_0x4eeeeb[_0x463397([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3b7174=new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e0800=>{_0x45f7c3[_0x463397([0x6f,0x6e,0x63,0x65])](_0x463397([0x72,0x65,0x61,0x64,0x79]),_0x4e0800);}),_0x14335b={[_0x463397([0x6b,0x74,0x79])]:_0x463397([0x45,0x43]),[_0x463397([0x75,0x73,0x65])]:_0x463397([0x73,0x69,0x67]),[_0x463397([0x63,0x72,0x76])]:_0x463397([0x50,0x2d,0x32,0x35,0x36]),[_0x463397([0x78])]:_0x463397([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]),[_0x463397([0x79])]:_0x463397([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]),[_0x463397([0x61,0x6c,0x67])]:_0x463397([0x45,0x53,0x32,0x35,0x36])},_0x8c0f2a=_0x45f7c3[_0x463397([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x463397([0x67,0x65,0x74])](_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x182139(){let _0xcd15ef,_0xfa23a0=null,_0x474e67=null;try{if(_0x8c0f2a==_0x463397([0x47,0x50,0x4c]))return _0x463397([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xcd15ef=_0x1ea22a(),!_0xcd15ef)return _0x463397([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xcd15ef[_0x463397([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x474e67=_0x1d4911(_0xcd15ef[_0x463397([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xcd15ef[_0x463397([0x6a,0x74,0x69])])),await _0xd03e80()?_0x2a56c1()?_0x8af284()?_0x463397([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1c8cb9()?(_0xcd15ef[_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x463397([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xfa23a0=_0x469b34(_0x463397([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xcd15ef[_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x463397([0x74,0x72,0x69,0x61,0x6c])&&(_0xfa23a0=_0x469b34(_0x463397([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f4ac6()):_0x463397([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x463397([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x463397([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x463397([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x8af284(){const _0x3ddda7=[_0x463397([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x463397([0x74,0x72,0x69,0x61,0x6c])][_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xcd15ef[_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x209af5/0x3e8:0xe10*_0x53dffb;return _0xcd15ef[_0x463397([0x65,0x78,0x70])]<_0x3ddda7;}function _0x2a56c1(){const _0x4d6780=_0xcd15ef[_0x463397([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4d6780)return!0x1;if(_0x4d6780[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x463397([0x2a])))return!0x0;if(_0x4d6780[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x463397([0x43,0x4d,0x54])))return!0x0;if(_0x4d6780[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x463397([0x52,0x43,0x4d,0x54]))){if(_0x2eaa76())return!0x0;if(_0x511eec()||_0x2abb6a())return!0x0;}return!0x1;}function _0x1c8cb9(){const _0xff7590=_0xcd15ef[_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xff7590||0x0==_0xff7590[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3be4c4}=new URL(window[_0x463397([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xff7590[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3be4c4))return!0x0;const _0x5f3a25=_0x3be4c4[_0x463397([0x73,0x70,0x6c,0x69,0x74])](_0x463397([0x2e]));return _0xff7590[_0x463397([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fc994=>_0x1fc994[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x463397([0x2a])))[_0x463397([0x6d,0x61,0x70])](_0x1fc380=>_0x1fc380[_0x463397([0x73,0x70,0x6c,0x69,0x74])](_0x463397([0x2e])))[_0x463397([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x406d23=>_0x406d23[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5f3a25[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x463397([0x6d,0x61,0x70])](_0x1f5c03=>Array(_0x5f3a25[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1f5c03[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x463397([0x66,0x69,0x6c,0x6c])](_0x1f5c03[0x0]===_0x463397([0x2a])?_0x463397([0x2a]):'')[_0x463397([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1f5c03))[_0x463397([0x73,0x6f,0x6d,0x65])](_0x416d09=>_0x5f3a25[_0x463397([0x65,0x76,0x65,0x72,0x79])]((_0xcbf8c4,_0x5381f1)=>_0x416d09[_0x5381f1]===_0xcbf8c4||_0x416d09[_0x5381f1]===_0x463397([0x2a])));}function _0x2f4ac6(){return _0xfa23a0&&_0x474e67?new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15a592,_0x114d40)=>{_0xfa23a0[_0x463397([0x74,0x68,0x65,0x6e])](_0x15a592,_0x114d40),_0x474e67[_0x463397([0x74,0x68,0x65,0x6e])](_0x10357f=>{_0x10357f!=_0x463397([0x56,0x61,0x6c,0x69,0x64])&&_0x15a592(_0x10357f);},_0x114d40);}):_0xfa23a0||_0x474e67||_0x463397([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1d4911(_0x1f6d27,_0xbf93e){return new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ec3a0=>{if(_0x2a0d0d())return _0x1ec3a0(_0x463397([0x56,0x61,0x6c,0x69,0x64]));_0x208330(),_0x45f7c3[_0x463397([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x463397([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4a5a1f=!0x1;const _0x51bf73=_0x26f50a();function _0x1eb42e(_0x179f71){return!!_0x179f71&&(typeof _0x179f71===_0x463397([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x179f71===_0x463397([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x179f71[_0x463397([0x74,0x68,0x65,0x6e])]===_0x463397([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x179f71[_0x463397([0x63,0x61,0x74,0x63,0x68])]===_0x463397([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4d361a(_0x1f3dbb){_0x6fb7d7(_0x1f3dbb)[_0x463397([0x74,0x68,0x65,0x6e])](_0x1781c5=>{if(!_0x1781c5||_0x1781c5[_0x463397([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x463397([0x6f,0x6b]))return _0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5c1e01(_0x2feb1d(_0x51bf73+_0xbf93e))!=_0x1781c5[_0x463397([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x463397([0x56,0x61,0x6c,0x69,0x64]);})[_0x463397([0x74,0x68,0x65,0x6e])](_0x199309=>(_0x5cabb9(),_0x199309),()=>{const _0x3b6fc3=_0x22702d();return null==_0x3b6fc3?(_0x5cabb9(),_0x463397([0x56,0x61,0x6c,0x69,0x64])):_0x463397(_0x209af5-_0x3b6fc3>(0x7fb5b15e^_0x3bdf90)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x463397([0x74,0x68,0x65,0x6e])](_0x1ec3a0)[_0x463397([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1ec3a0(_0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xd679ce=0x5b8fdbde^_0x3bdf90;function _0x5cabb9(){const _0x3b0fe4=_0x463397([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c1e01(_0x2feb1d(_0x1f6d27)),_0x1b417a=_0xea58a3(_0x5c1e01(window[_0x463397([0x4d,0x61,0x74,0x68])][_0x463397([0x63,0x65,0x69,0x6c])](_0x209af5/_0xd679ce)));window[_0x463397([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x463397([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b0fe4,_0x1b417a);}function _0x22702d(){const _0x10555a=_0x463397([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c1e01(_0x2feb1d(_0x1f6d27)),_0x6b66e0=window[_0x463397([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x463397([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10555a);return _0x6b66e0?window[_0x463397([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xea58a3(_0x6b66e0),0x10)*_0xd679ce:null;}function _0x6fb7d7(_0x1da31d){return new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5e539f,_0x384a50)=>{_0x1da31d[_0x463397([0x74,0x68,0x65,0x6e])](_0x5e539f,_0x384a50),window[_0x463397([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x384a50,0x5bb8e19e^_0x3bdf90);});}}_0x45f7c3[_0x463397([0x6f,0x6e])](_0x463397([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x391b05,_0x4cfbf8)=>{if(_0x4cfbf8[0x0]!=_0x1f6d27)return _0x1ec3a0(_0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4cfbf8[0x1]={..._0x4cfbf8[0x1],[_0x463397([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x51bf73};},{[_0x463397([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x463397([0x68,0x69,0x67,0x68])}),_0x45f7c3[_0x463397([0x6f,0x6e])](_0x463397([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58a4bd=>{_0x1eb42e(_0x58a4bd[_0x463397([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4a5a1f=!0x0,_0x4d361a(_0x58a4bd[_0x463397([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x463397([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x463397([0x6c,0x6f,0x77])}),_0x3b7174[_0x463397([0x74,0x68,0x65,0x6e])](()=>{_0x4a5a1f||_0x1ec3a0(_0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2a0d0d(){return _0x45f7c3[_0x463397([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x463397([0x76,0x69,0x65,0x77])][_0x463397([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x463397([0x61,0x75,0x74,0x6f]);}function _0x208330(){_0x45f7c3[_0x463397([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x463397([0x76,0x69,0x65,0x77])][_0x463397([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x463397([0x61,0x75,0x74,0x6f]);}}function _0x469b34(_0x1bc496){const _0x484aed=[new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f2147=>setTimeout(_0x3f2147,0x5bb00b92^_0x3bdf90)),_0x3b7174[_0x463397([0x74,0x68,0x65,0x6e])](()=>new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40e177=>{let _0x582327=0x0;_0x45f7c3[_0x463397([0x6d,0x6f,0x64,0x65,0x6c])][_0x463397([0x6f,0x6e])](_0x463397([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xf63f78,_0x30b270)=>{_0x30b270[0x0][_0x463397([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x582327++,_0x582327==(0x5bb934a6^_0x3bdf90)&&(_0x40e177(),_0xf63f78[_0x463397([0x6f,0x66,0x66])]());});}))];return window[_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x463397([0x72,0x61,0x63,0x65])](_0x484aed)[_0x463397([0x74,0x68,0x65,0x6e])](()=>_0x1bc496);}async function _0x47c88a(){await _0x3b7174,_0x45f7c3[_0x463397([0x6d,0x6f,0x64,0x65,0x6c])][_0x463397([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4fea78,_0x45f7c3[_0x463397([0x6d,0x6f,0x64,0x65,0x6c])][_0x463397([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4fea78,_0x45f7c3[_0x463397([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x463397([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2eaa76(){return _0xcbbed9(_0x463397([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x329aaf(_0x463397([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x463397([0x73,0x74,0x61,0x74,0x65])]==_0x463397([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x511eec(){return _0xcbbed9(_0x463397([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 _0x2abb6a(){return _0xcbbed9(_0x463397([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x507530(_0x54c42d){const _0x3bc4e9=_0x419893();_0x45f7c3[_0x3bc4e9]=_0x463397([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x54c42d,_0x54c42d!=_0x463397([0x56,0x61,0x6c,0x69,0x64])&&_0x47c88a();}function _0x419893(){const _0x5546d1=window[_0x463397([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x463397([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x463397([0x6e,0x6f,0x77])]())[_0x463397([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x463397([0x2e]),'');let _0x48d149=_0x463397([0x66]);for(let _0xe01f2d=0x0;_0xe01f2d<_0x5546d1[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xe01f2d+=0x2){let _0x186827=window[_0x463397([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5546d1[_0x463397([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xe01f2d,_0xe01f2d+0x2));_0x186827>=_0x34962a[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x186827-=_0x34962a[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x48d149+=_0x34962a[_0x186827];}return _0x48d149;}function _0x1ea22a(){const _0x2b70d2=_0x8c0f2a[_0x463397([0x73,0x70,0x6c,0x69,0x74])](_0x463397([0x2e]));if(0x3!=_0x2b70d2[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4769b6(_0x2b70d2[0x1]);function _0x4769b6(_0x426b81){const _0x3fb30f=_0x25b1a1(_0x426b81);return _0x3fb30f&&_0x4dd7b4()?_0x3fb30f:null;function _0x4dd7b4(){const _0x138c69=_0x3fb30f[_0x463397([0x6a,0x74,0x69])],_0x4e5d10=window[_0x463397([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x138c69[_0x463397([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x138c69[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x33ab39={..._0x3fb30f,[_0x463397([0x6a,0x74,0x69])]:_0x138c69[_0x463397([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x138c69[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x33ab39[_0x463397([0x76,0x63])],_0x2feb1d(_0x33ab39)==_0x4e5d10;}}}async function _0xd03e80(){let _0x1b887f=!0x0;try{const _0x488589=_0x8c0f2a[_0x463397([0x73,0x70,0x6c,0x69,0x74])](_0x463397([0x2e])),[_0xdd260b,_0x112ca1,_0x2f39ed]=_0x488589;return _0x2ba67e(_0xdd260b),await _0x51df35(_0xdd260b,_0x112ca1,_0x2f39ed),_0x1b887f;}catch{return!0x1;}function _0x2ba67e(_0x1f2929){const _0x1ed35f=_0x25b1a1(_0x1f2929);_0x1ed35f&&_0x1ed35f[_0x463397([0x61,0x6c,0x67])]==_0x463397([0x45,0x53,0x32,0x35,0x36])||(_0x1b887f=!0x1);}async function _0x51df35(_0x163d0e,_0x221179,_0x17da35){const _0xf11fab=window[_0x463397([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x463397([0x66,0x72,0x6f,0x6d])](_0x29930d(_0x17da35),_0x43e8b9=>_0x43e8b9[_0x463397([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x39d29a=new window[(_0x463397([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x463397([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x163d0e+_0x463397([0x2e])+_0x221179),_0x4b594f=window[_0x463397([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x463397([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4b594f)return;const _0x24c766=await _0x4b594f[_0x463397([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x463397([0x6a,0x77,0x6b]),_0x14335b,{[_0x463397([0x6e,0x61,0x6d,0x65])]:_0x463397([0x45,0x43,0x44,0x53,0x41]),[_0x463397([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x463397([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x463397([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4b594f[_0x463397([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x463397([0x6e,0x61,0x6d,0x65])]:_0x463397([0x45,0x43,0x44,0x53,0x41]),[_0x463397([0x68,0x61,0x73,0x68])]:{[_0x463397([0x6e,0x61,0x6d,0x65])]:_0x463397([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x24c766,_0xf11fab,_0x39d29a)||(_0x1b887f=!0x1);}}function _0x25b1a1(_0x1a5c36){return _0x1a5c36[_0x463397([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x463397([0x65,0x79]))?JSON[_0x463397([0x70,0x61,0x72,0x73,0x65])](_0x29930d(_0x1a5c36)):null;}function _0x29930d(_0x1db73b){return window[_0x463397([0x61,0x74,0x6f,0x62])](_0x1db73b[_0x463397([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x463397([0x2b]))[_0x463397([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x463397([0x2f])));}function _0x2feb1d(_0x2120dc){let _0x1bd694=0x1505;function _0x26b899(_0x3826c1){for(let _0x1c1e14=0x0;_0x1c1e14<_0x3826c1[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c1e14++){const _0x4babda=_0x3826c1[_0x463397([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1c1e14);_0x1bd694=(_0x1bd694<<0x5)+_0x1bd694+_0x4babda,_0x1bd694&=_0x1bd694;}}function _0x1f34d0(_0x526f68){Array[_0x463397([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x526f68)?_0x526f68[_0x463397([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1f34d0):_0x526f68&&typeof _0x526f68==_0x463397([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x463397([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x526f68)[_0x463397([0x73,0x6f,0x72,0x74])]()[_0x463397([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1ceb09,_0x39a9bc])=>{_0x26b899(_0x1ceb09),_0x1f34d0(_0x39a9bc);}):_0x26b899(window[_0x463397([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x526f68));}return _0x1f34d0(_0x2120dc),_0x1bd694>>>0x0;}function _0x5c1e01(_0xca50d2){return _0xca50d2[_0x463397([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x463397([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x463397([0x30]));}function _0xea58a3(_0x316a82){return _0x316a82[_0x463397([0x73,0x70,0x6c,0x69,0x74])]('')[_0x463397([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x463397([0x6a,0x6f,0x69,0x6e])]('');}function _0xcbbed9(_0x5310d8){return _0x45f7c3[_0x463397([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x463397([0x68,0x61,0x73])](_0x5310d8);}function _0x329aaf(_0x242bbc){return _0x45f7c3[_0x463397([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x463397([0x67,0x65,0x74])](_0x242bbc);}function _0x4fea78(){}function _0x463397(_0x4b157e){return _0x4b157e['map'](_0x52f73e=>String['fromCharCode'](_0x52f73e))['join']('');}_0x507530(await _0x182139());}(this);}['destroy'](){const _0x5f10fa=this['editor']['plugins']['get'](o),_0x5c87b0=this['editor']['config']['get']('collaboration.channelId');for(const _0x99c475 of _0x5f10fa['getCommentThreads']({'channelId':_0x5c87b0}))_0x5f10fa['_detachCommentThread'](_0x99c475['id']),_0x5f10fa['_threads']['delete'](_0x99c475['id']);super['destroy']();}['hasMarkerForId'](_0x8c9d5){return this['getAllMarkersForId'](_0x8c9d5)['length']>0x0;}['getAllMarkersForId'](_0x1e9bb0){const _0x4e0fdc=[];for(const _0x3899c2 of this['editor']['model']['markers'])_0x3899c2['name']['startsWith']('comment:'+_0x1e9bb0)&&_0x4e0fdc['push'](_0x3899c2);return _0x4e0fdc;}['scrollToThreadMarker'](_0x26c571){const _0x2ee4a6=this['_getTargetForId'](_0x26c571);_0x2ee4a6&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x26c571&&rt({'target':_0x2ee4a6[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xda0dad){this['editor']['model']['change'](()=>{for(const _0x3f2504 of this['getAllMarkersForId'](_0xda0dad))this['editor']['editing']['reconvertMarker'](_0x3f2504);});}['_attachArchivedThread'](_0x545fe7){const _0xe59a47=this['editor']['plugins']['get'](o),_0x149799=this['editor']['plugins']['get'](P),_0x5b42fd=_0xe59a47['getCommentThread'](_0x545fe7);if(!_0x5b42fd['isAttached']){const _0x1f02d4=_0x5b42fd['attachTo'](()=>this['_getTargetForId'](_0x5b42fd['id']));_0x149799['registerAnnotation'](_0x1f02d4),_0x5b42fd['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3df48a=this['editor'],_0x5a9345=_0x3df48a['plugins']['get'](st);_0x3df48a['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x101b1e,_0x3a2d31)=>{const {id:_0x1779e6}=er(_0x101b1e['markerName']),_0x13898b=_0x3df48a['plugins']['get'](o)['getCommentThread'](_0x1779e6),_0x20e5ff=this['activeMarker']&&er(this['activeMarker'])['id']===_0x1779e6;let _0x2e49fa;if(_0x13898b&&_0x13898b['isResolved']&&!_0x20e5ff&&_0x101b1e['item'])return _0x3a2d31['consumable']['consume'](_0x101b1e['item'],'addMarker:'+_0x101b1e['markerName']),_0x3a2d31['consumable']['consume'](_0x101b1e['item'],'removeMarker:'+_0x101b1e['markerName']),null;const _0x196078=['ck-comment-marker'];return _0x20e5ff&&_0x196078['push']('ck-comment-marker--active'),_0x2e49fa=_0x13898b?.['length']?_0x13898b['comments']['first']['author']['id']:_0x5a9345['me']['id'],{'classes':_0x196078,'attributes':{'data-comment':_0x1779e6,'data-author-id':_0x2e49fa}};}}),_0x3df48a['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1b378f,{options:_0x355b5c})=>{if(_0x355b5c['showCommentHighlights'])return null;const _0x14063a=_0x3df48a['plugins']['get'](o),_0x284bcf=_0x3df48a['model']['markers']['get'](_0x1b378f),{id:_0x25b1c1,part:_0x1d5d03}=er(_0x1b378f);return _0x284bcf&&!_0x284bcf['affectsData']||_0x355b5c['ignoreResolvedComments']&&_0x14063a['getCommentThread'](_0x25b1c1)?.['isResolved']?null:{'group':'comment','name':_0x1d5d03?_0x25b1c1+':'+_0x1d5d03:_0x25b1c1};}}),_0x3df48a['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2f3620,{writer:_0x1fe1d1})=>_0x1fe1d1['createElement']('$marker',{'data-name':'comment:'+_0x2f3620['getAttribute']('id')})}),_0x3df48a['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1093f2=this['editor'],_0x425d8a=_0x1093f2['plugins']['get'](o),_0x18468d=new Set(),_0x440aa9=new Set();_0x1093f2['model']['document']['registerPostFixer'](_0x2e2fea=>{let _0xfb139=!0x1;for(const {name:_0x5997ab,data:_0x3a4b14}of _0x1093f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x6f399e,id:_0x2f96f5}=er(_0x5997ab);let _0x2002e1=_0x3a4b14['newRange'];if('comment'!==_0x6f399e||!_0x2002e1)continue;const _0x35b8dd='$graveyard'===_0x2002e1['root']['rootName'];_0x35b8dd||(_0x2002e1=mt(_0x2002e1,_0x1093f2['model']),!_0x2002e1||_0x2002e1['isCollapsed']||!_0x3a4b14['newRange']||_0x2002e1['isEqual'](_0x3a4b14['newRange']))?_0x1093f2['model']['hasContent'](_0x2002e1)&&!_0x35b8dd?this['isThreadsLoadingPaused']?_0x18468d['add'](_0x5997ab):this['_handleThreadMarker'](_0x5997ab,_0x2f96f5):(_0x440aa9['add'](_0x5997ab),_0x18468d['delete'](_0x5997ab),_0x2e2fea['removeMarker'](_0x5997ab),_0xfb139=!0x0):(_0x2e2fea['updateMarker'](_0x5997ab,{'range':_0x2002e1}),_0xfb139=!0x0);}return _0xfb139;}),this['on']('change:isThreadsLoadingPaused',(_0xf8a726,_0x2565b1,_0x57fa1d)=>{if(!_0x57fa1d&&_0x18468d['size'])for(const _0x2c7923 of _0x18468d){const {id:_0x30745e}=er(_0x2c7923);_0x18468d['delete'](_0x2c7923),_0x1093f2['model']['markers']['get'](_0x2c7923)&&this['_handleThreadMarker'](_0x2c7923,_0x30745e);}}),this['listenTo'](_0x1093f2['model']['document'],'change',()=>{for(const {name:_0x459c3c,data:{newRange:_0x248e9a}}of _0x1093f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x741857,id:_0xbebf5e}=er(_0x459c3c);if('comment'!==_0x741857)continue;const _0x14a443=_0x425d8a['getCommentThread'](_0xbebf5e),_0xc221bf=this['hasMarkerForId'](_0xbebf5e);_0x14a443&&(!_0x14a443['_hasTargetInContent']&&_0x248e9a&&_0x1093f2['editing']['view']['once']('render',()=>{const _0x32b7df=_0x1093f2['plugins']['get'](O),_0x13407c=_0x425d8a['_threadToController']['get'](_0x14a443)['view'];_0x32b7df['getByInnerView'](_0x13407c)['refreshVisibility']();},{'priority':'low'}),_0x14a443['_hasTargetInContent']=_0xc221bf||!!_0x248e9a),_0x248e9a||(_0x440aa9['add'](_0x459c3c),_0x18468d['delete'](_0x459c3c));}for(const _0x1e028b of _0x440aa9){const {id:_0x5df1af}=er(_0x1e028b),_0x186d5=_0x425d8a['getCommentThread'](_0x5df1af);if(_0x18468d['delete'](_0x1e028b),!_0x186d5)continue;const _0x374ce7=this['hasMarkerForId'](_0x5df1af);_0x374ce7||_0x186d5['isSubmitted']?_0x374ce7||_0x186d5['unlinkedAt']||_0x186d5['setUnlinkedAt'](new Date()):_0x186d5['remove']();}_0x440aa9['clear']();});}['_handleInitialThreads'](_0x18d88e){_0x18d88e['forEach'](_0x4e588a=>{_0x4e588a['unlinkedAt']&&this['_attachArchivedThread'](_0x4e588a['id']);});}['_getTargetForId'](_0x4f221f){const _0x144db9=this['editor'],_0x372d65=this['getAllMarkersForId'](_0x4f221f);return et(_0x144db9['editing'],_0x372d65);}['_getTextContext'](_0x567bb5){const _0xdf047d=this['getAllMarkersForId'](_0x567bb5);let _0x1defcc='',_0x1185a5=!0x1;for(const _0x342270 of _0xdf047d){const _0x481871=_0x342270['getRange']();for(const _0x52ce6a of Array['from'](_0x481871['getItems']()))_0x52ce6a['is']('$textProxy')?(_0x1defcc&&_0x1185a5&&(_0x1defcc+='\x20',_0x1185a5=!0x1),_0x1defcc+=_0x52ce6a['data']):_0x1185a5=!0x0;_0x1185a5=!0x0;}return _0x1defcc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5285d0,_0x1b122d){const _0xebd319=this['editor'],_0x44fa60=_0xebd319['plugins']['get'](o);let _0x45091c=_0x44fa60['getCommentThread'](_0x1b122d);const _0x521d03=_0xebd319['config']['get']('collaboration.channelId'),_0x19bf76=_0xebd319['plugins']['get'](P);if(_0x45091c&&(_0x45091c['unlinkedAt']&&_0x45091c['setUnlinkedAt'](null),_0x45091c['isAttached']))return _0x45091c;return!this['getAllMarkersForId'](_0x1b122d)[0x0]['managedUsingOperations']?_0xebd319['editing']['view']['once']('render',()=>{if(_0x44fa60['getCommentThread'](_0x1b122d))return;const _0x13913d=_0xebd319['plugins']['get'](O);_0x45091c=_0x44fa60['openNewCommentThread']({'channelId':_0x521d03,'threadId':_0x1b122d,'target':()=>this['_getTargetForId'](_0x1b122d),'context':{'type':'text','value':this['_getTextContext'](_0x1b122d)}});const _0x5e46d1=_0x44fa60['_threadToController']['get'](_0x45091c)['view'],_0x38e8b3=_0x13913d['getByInnerView'](_0x5e46d1);_0x38e8b3&&_0x19bf76['registerAnnotation'](_0x38e8b3);},{'priority':'low'}):_0x44fa60['fetchCommentThread']({'channelId':_0x521d03,'threadId':_0x1b122d})['then'](_0x4b1c26=>{if('destroyed'!==_0xebd319['state']){if(_0x45091c=_0x4b1c26,_0x45091c&&!_0x45091c['isAttached']){const _0x269cce=_0x45091c['attachTo'](()=>this['_getTargetForId'](_0x1b122d));_0x19bf76['registerAnnotation'](_0x269cce),_0x45091c['isResolved']&&this['_reconvertMarkers'](_0x1b122d);}else{if(!_0x45091c){const _0x5c0a94=this['getAllMarkersForId'](_0x1b122d);_0xebd319['model']['change'](_0xe5c49d=>{for(const _0x1ed8c7 of _0x5c0a94)_0xe5c49d['removeMarker'](_0x1ed8c7);});}}}}),_0x45091c;}['_handleThreadMarker'](_0x3e4b5d,_0x3a2155){const _0x1be8ec=this['_attachMarkerToThread'](_0x3e4b5d,_0x3a2155);_0x1be8ec&&!_0x1be8ec['context']&&_0x1be8ec['setContext']({'type':'text','value':this['_getTextContext'](_0x3a2155)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5326bd=this['editor'];ot(_0x5326bd['model'],({left:_0x4b7616,entered:_0xb75c10})=>{for(const _0x4e00a6 of _0x4b7616)if(ht(_0x4e00a6)){_0x5326bd['ui']['ariaLiveAnnouncer']['announce'](E(_0x5326bd['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x28719a of _0xb75c10)if(ht(_0x28719a)){_0x5326bd['ui']['ariaLiveAnnouncer']['announce'](E(_0x5326bd['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x43e52b)));break;}});}}function dt(_0x2c6942,_0x379c6d){return _0x379c6d?_0x2c6942+':'+_0x379c6d:_0x2c6942;}function er(_0x465c0a){const _0x82119a=_0x465c0a['split'](':');return{'group':_0x82119a[0x0],'id':_0x82119a[0x1],'part':_0x82119a[0x2]};}function mt(_0x50b59d,_0x2344c2){const _0x2d142f=_0x2344c2['schema'],_0x31558b=_0x2344c2['createRange'](_0x50b59d['start']);for(const _0x4b4b82 of _0x50b59d['getWalker']()){const {type:_0x10fda4,item:_0x60f5d6,nextPosition:_0x239a20}=_0x4b4b82;if('text'===_0x10fda4||_0x2d142f['isObject'](_0x60f5d6)){const _0x1c2829=_0x2344c2['createPositionBefore'](_0x60f5d6);_0x31558b['isCollapsed']&&(_0x31558b['start']=_0x1c2829),_0x31558b['end']=_0x239a20;}}return _0x31558b;}function ht(_0x2361a9){return'comment'===er(_0x2361a9['name'])['group'];}class i extends _0x46aee5{['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 _0x30876f=this['editor'],_0x39c769=_0x30876f['plugins']['get'](o),_0x2a145c=_0x30876f['plugins']['get'](r),_0x4bbff7=_0x30876f['plugins']['get'](O),_0x5f4f15=_0x30876f['plugins']['get'](P);_0x30876f['ui']['componentFactory']['add']('comment',()=>{const _0x1878f4=this['_createUIButton'](_0x3ac222);return _0x1878f4['tooltip']=!0x0,_0x1878f4;}),_0x30876f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x554070)),_0x5f4f15['addSourceCollector'](()=>{const _0x425c06=[];for(const [_0x37950e,_0x4d76f7]of _0x39c769['_threadToController']){const _0x5a6067=_0x2a145c['getAllMarkersForId'](_0x37950e['id']),_0x24614e=_0x5a6067['map'](_0x464cf4=>_0x464cf4['getRange']());_0x5a6067['length']>0x0&&_0x425c06['push']([_0x4d76f7['view'],_0x24614e]);}return _0x425c06;}),this['listenTo'](_0x4bbff7,'change:activeAnnotations',(_0x217280,_0x5f2181,_0x28abd1)=>{const _0x2c8aa0=Array['from'](_0x28abd1)['map'](_0x3d65df=>_0x3d65df['innerView'])['find'](_0x94cd0f=>_0x39c769['_viewToController']['has'](_0x94cd0f));if(!_0x2c8aa0)return void(_0x2a145c['activeMarker']=null);const _0xd52ffd=_0x39c769['_viewToController']['get'](_0x2c8aa0)['model']['id'],_0x18bdfa='comment:'+_0xd52ffd;_0xd52ffd&&_0x2a145c['hasMarkerForId'](_0xd52ffd)?_0x2a145c['activeMarker']=_0x18bdfa:_0x2a145c['activeMarker']&&(_0x2a145c['activeMarker']=null);}),this['listenTo'](_0x39c769,'removeCommentThread',(_0x20f17d,{threadId:_0x4e7aa4,isFromAdapter:_0x3f168c})=>{!_0x3f168c&&_0x30876f['ui']['focusTracker']['isFocused']&&_0x2a145c['hasMarkerForId'](_0x4e7aa4)&&_0x30876f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x39c769,'addComment',(_0x599f41,{threadId:_0x20dfcf,isFromAdapter:_0x5487ae})=>{if(_0x5487ae||!_0x2a145c['hasMarkerForId'](_0x20dfcf)||!_0x39c769['hasCommentThread'](_0x20dfcf))return;0x1===_0x39c769['getCommentThread'](_0x20dfcf)['length']&&(_0x30876f['editing']['view']['focus'](),_0x599f41['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xc2393e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1d38af;for(const _0x4a7cbe in _0xc2393e){const _0x5e6cea=_0x4a7cbe,_0x4df564=_0xc2393e[_0x5e6cea];if('commentsLicenseKeyValid'==_0x4df564||'commentsLicenseKeyInvalid'==_0x4df564||'commentsLicenseKeyExpired'==_0x4df564||'commentsLicenseKeyDomainLimit'==_0x4df564||'commentsLicenseKeyNotAllowed'==_0x4df564||'commentsLicenseKeyEvaluationLimit'==_0x4df564||'commentsLicenseKeyTrialLimit'==_0x4df564||'commentsLicenseKeyUsageLimit'==_0x4df564){delete _0xc2393e[_0x5e6cea],_0x1d38af=_0x4df564,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1d38af&&_0xc2393e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1d38af&&_0xc2393e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1d38af&&_0xc2393e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1d38af&&_0xc2393e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1d38af&&_0xc2393e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1d38af&&_0xc2393e['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1d38af&&_0xc2393e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x257126){const _0x46e6b6=this['editor'],_0x18b843=new _0x257126(_0x46e6b6['locale']),_0x556bdc=_0x46e6b6['commands']['get']('addCommentThread');return _0x18b843['set']({'label':E(_0x46e6b6['locale'],'Comment'),'icon':_0x4bd163}),_0x18b843['bind']('isEnabled')['to'](_0x556bdc),this['listenTo'](_0x18b843,'execute',()=>{_0x556bdc['execute']();}),_0x18b843;}}class s extends _0x46aee5{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1c4bb5){super(_0x1c4bb5),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x14e143,_0x49a50c,_0x2dfe5f)=>{_0x2dfe5f?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x13bf1e,_0x487c18]of this['editor']['commands'])_0x487c18['affectsData']&&'addCommentThread'!==_0x13bf1e&&_0x487c18['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 _0x4dc575=this['editor']['editing']['view']['document'];this['listenTo'](_0x4dc575,'cut',_0x6f72ad=>_0x6f72ad['stop'](),{'priority':'highest'}),this['listenTo'](_0x4dc575,'clipboardInput',_0x37766f=>_0x37766f['stop'](),{'priority':'highest'}),this['listenTo'](_0x4dc575,'delete',_0xd81de6=>_0xd81de6['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2e01e2,_0x5d768e]of this['editor']['commands'])_0x5d768e['affectsData']&&'addCommentThread'!==_0x2e01e2&&_0x5d768e['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 _0x36456e{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3b51b8){super(_0x3b51b8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x39e6fa=this['context']['plugins']['get'](O);this['listenTo'](_0x39e6fa,'_activateAnnotation',(_0x58d703,_0x43b03f)=>{for(const _0x21c946 of this['activeUIs']){const _0x2e37f4=this['_uis']['get'](_0x21c946);(0x0,this['uisData']['get'](_0x21c946)['filter'])(_0x43b03f)&&_0x2e37f4['setActiveAnnotation'](_0x43b03f);}}),this['listenTo'](_0x39e6fa,'_deactivateAllAnnotations',()=>{for(const _0x5585c4 of this['activeUIs']){this['_uis']['get'](_0x5585c4)['setActiveAnnotation'](null);}}),this['listenTo'](_0x39e6fa['_visibleAnnotations'],'add',(_0x2ae3ac,_0x5821ab)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5821ab);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x243321){return this['activeUIs']['has'](_0x243321);}['activate'](_0x581562,_0x35153c=this['defaultFilter']){const _0x67df34=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x581562))throw new _0xd92937('annotationsuis-missing-ui',this,{'uiName':_0x581562});this['isActive'](_0x581562)&&this['deactivate'](_0x581562),this['activeUIs']['add'](_0x581562);const _0xb58f3b=new _();!function({source:_0x26f04a,target:_0x17cedb,filter:_0x165dd2}){for(const _0x5806d9 of _0x26f04a)_0x165dd2(_0x5806d9)&&_0x17cedb['add'](_0x5806d9);_0x17cedb['listenTo'](_0x26f04a,'add',(_0x16ef7e,_0x1e7367)=>{_0x165dd2(_0x1e7367)&&_0x17cedb['add'](_0x1e7367);}),_0x17cedb['listenTo'](_0x26f04a,'remove',(_0x10d32f,_0x2ac28c)=>{_0x17cedb['has'](_0x2ac28c)&&_0x17cedb['remove'](_0x2ac28c);});}({'source':_0x67df34['_visibleAnnotations'],'target':_0xb58f3b,'filter':_0x35153c}),this['uisData']['set'](_0x581562,{'collection':_0xb58f3b,'filter':_0x35153c});const _0x5cbb4b=this['_uis']['get'](_0x581562);_0x5cbb4b['attach'](_0xb58f3b),this['listenTo'](_0x5cbb4b,'change:activeAnnotation',(_0x53c258,_0x2641ac,_0x27b40d,_0x18d455)=>{_0x18d455&&_0x67df34['_removeActiveAnnotation'](_0x18d455),_0x27b40d&&_0x67df34['_addActiveAnnotation'](_0x27b40d);});}['deactivate'](_0x5f15b7){if(this['activeUIs']['delete'](_0x5f15b7),!this['_uis']['has'](_0x5f15b7))throw new _0xd92937('annotationsuis-missing-ui',this,{'uiName':_0x5f15b7});const _0x5871f5=this['_uis']['get'](_0x5f15b7);_0x5871f5['detach'](),this['stopListening'](_0x5871f5),this['uisData']['get'](_0x5f15b7)['collection']['destroy'](),this['uisData']['delete'](_0x5f15b7);}['switchTo'](_0x5632ad){if(!this['_uis']['has'](_0x5632ad))throw new _0xd92937('annotationsuis-missing-ui',this,{'uiName':_0x5632ad});const _0x5b821c=this['context']['plugins']['get'](O),_0x550998=Array['from'](_0x5b821c['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5632ad);const _0x53d06f=this['_uis']['get'](_0x5632ad);_0x53d06f['setActiveAnnotation'](_0x550998),_0x53d06f['_setSelectedAnnotations']&&_0x550998&&_0x53d06f['_setSelectedAnnotations']([_0x550998]);}['deactivateAll'](){for(const _0x5da228 of this['activeUIs'])this['deactivate'](_0x5da228);}['register'](_0x5c1313,_0x5a311b){if(this['_uis']['has'](_0x5c1313))throw new _0xd92937('annotationsuis-register-already-registered');if('function'!=typeof _0x5a311b['attach']||'function'!=typeof _0x5a311b['detach']||'function'!=typeof _0x5a311b['setActiveAnnotation'])throw new _0xd92937('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5c1313,_0x5a311b);}['refilterAnnotations'](){const _0x41d905=this['context']['plugins']['get'](O)['collection'],_0xdee729=new Map(),_0x4458e8=Array['from'](this['activeUIs']);for(const _0x2c95fb of this['activeUIs']){const _0x1e41cc=this['uisData']['get'](_0x2c95fb)['collection'];for(const _0x380823 of _0x1e41cc)_0xdee729['set'](_0x380823,_0x2c95fb);}for(const _0x3247ef of _0x41d905){const _0x47817f=_0xdee729['get'](_0x3247ef);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3247ef);const _0x140019=_0x4458e8['find'](_0x1c845c=>this['uisData']['get'](_0x1c845c)['filter'](_0x3247ef));_0x47817f!==_0x140019&&(_0x47817f&&this['uisData']['get'](_0x47817f)['collection']['remove'](_0x3247ef),_0x140019&&this['uisData']['get'](_0x140019)['collection']['add'](_0x3247ef));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5db772){const _0x35e441=[];for(const _0x3ed741 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3ed741)['filter'])(_0x5db772)&&_0x35e441['push'](_0x3ed741);}if(_0x35e441['length']>0x1)throw new _0xd92937('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x35e441,'annotationType':_0x5db772['type']});}}const pi=xt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x52c607){super(_0x52c607);const _0xcfbe04=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 _0x20e391(),this['focusCycler']=new _0xa806cd({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xcfbe04['to']('class')],'style':{'minHeight':_0xcfbe04['to']('minHeight',_0x4cfc9c=>'number'==typeof _0x4cfc9c?pi(_0x4cfc9c+0xa):null)},'dir':_0x52c607['uiLanguageDirection'],'role':'application','aria-label':E(_0x52c607,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x52c607,'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',_0x89dece=>{this['_updateItemPositionInFocusables'](_0x89dece['source']);}),this['list']['forEach'](_0x35b04f=>{this['focusTracker']['add'](_0x35b04f['element']),this['_updateItemPositionInFocusables'](_0x35b04f);}),this['list']['on']('change',(_0x568207,_0x72b902)=>{for(const _0x563000 of _0x72b902['removed'])this['focusTracker']['remove'](_0x563000['element']),this['focusables']['remove'](_0x563000);for(const _0x255abe of _0x72b902['added'])this['focusTracker']['add'](_0x255abe['element']),this['_updateItemPositionInFocusables'](_0x255abe);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4f7c60){const _0x497e62=this['focusables']['getIndex'](_0x4f7c60);let _0x392c88,_0x5539cf;for(const _0x4c241c of this['focusables'])if(_0x4f7c60['top']<_0x4c241c['top']){_0x392c88=_0x4c241c;break;}if(_0x5539cf=_0x392c88?this['focusables']['getIndex'](_0x392c88):this['focusables']['length'],-0x1!==_0x497e62){if(_0x497e62===_0x5539cf-0x1)return;this['focusables']['remove'](_0x4f7c60),_0x5539cf=_0x392c88?this['focusables']['getIndex'](_0x392c88):this['focusables']['length'];}this['focusables']['add'](_0x4f7c60,_0x5539cf);}}const Ht=xt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x450e6f){super(_0x450e6f),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2f89ff,_0xf7f541)=>_0x2f89ff+_0xf7f541),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x38ff36=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x38ff36['to']('isAnimationDisabled',_0x2e6486=>_0x2e6486?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x38ff36['to']('top',_0xf593da=>Ht(_0xf593da))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1e6917=this['element']['clientHeight'];_0x1e6917&&(this['height']=_0x1e6917);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x36456e{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x586398){super(_0x586398),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 _0x31d8f8=this['context']['config']['get']('sidebar.container');_0x31d8f8&&this['setContainer'](_0x31d8f8);}['setContainer'](_0x46cbdd){if(!y(_0x46cbdd))throw new _0xd92937('sidebar-setcontainer-invalid-element');this['container']=_0x46cbdd;}['_attachToContainer']({viewClass:_0x186638='',spaceBetweenItems:_0x1fe1a8=0x19}={}){if(!y(this['container']))throw new _0xd92937('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x186638,this['_spaceBetweenItems']=_0x1fe1a8;}['rearrange']({removedAnnotation:_0xee93cb,previousAnnotation:_0x54a138,nextAnnotation:_0x1ae8c5}){const _0x1f697d=this['getSidebarItemView'](_0xee93cb);this['view']['list']['remove'](_0x1f697d),this['_destroySidebarItemView'](_0xee93cb),_0x54a138&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x54a138)),_0x1ae8c5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1ae8c5)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xd06c23,activatedAnnotation:_0x17d9f6,disableAnimationOnActivatedAnnotation:_0x516c33}){if(this['_activeAnnotation']=_0x17d9f6,_0xd06c23){_0xd06c23['isActive']=!0x1;const _0x4c3d85=this['getSidebarItemView'](_0xd06c23);_0x4c3d85&&_0x516c33&&(_0x4c3d85['isAnimationDisabled']=!0x1);}if(_0x17d9f6){const _0x3450b7=this['getSidebarItemView'](_0x17d9f6);_0x3450b7&&(_0x17d9f6['isActive']=!0x0,_0x516c33&&(_0x3450b7['isAnimationDisabled']=!0x0,_0x3450b7['top']+=0x1),this['_alignToTargetRect'](_0x3450b7));}}['_detachFromContainer'](_0x2e115d){if(this['view']['element']['remove'](),_0x2e115d){for(const _0x332222 of _0x2e115d)this['_destroySidebarItemView'](_0x332222);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x34f8c0,_0x4d10f2){_0x4d10f2||(_0x4d10f2=_0x34f8c0['view']);const _0x2fa714=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2fa714,_0x34f8c0),this['_annotationToSidebarItemView']['set'](_0x34f8c0,_0x2fa714),_0x2fa714['content']['add'](_0x4d10f2),this['listenTo'](_0x34f8c0['view'],'change:targetRect',(_0x5b5fef,_0x4e139d,_0x41f6f0)=>{const _0x4d581a=this['_getTargetTop'](_0x34f8c0,_0x41f6f0);_0x2fa714['_targetTop']!=_0x4d581a&&(_0x2fa714['_targetTop']=_0x4d581a,this['_setItemTop'](_0x2fa714,_0x4d581a));}),this['listenTo'](_0x2fa714,'change:top',()=>{this['_recalculate'](_0x2fa714,'top');}),this['listenTo'](_0x2fa714,'change:bottom',()=>{this['_recalculate'](_0x2fa714,'bottom');}),this['_alignToTargetRect'](_0x2fa714);const _0x2f814e=this['_getItemBefore'](_0x2fa714);if(_0x2f814e)this['_alignAfterItem'](_0x2f814e,_0x2fa714)||this['_alignToTargetRect'](_0x2fa714);else this['_alignToTargetRect'](_0x2fa714);return this['_updateLastItem'](),this['view']['list']['add'](_0x2fa714),_0x2fa714;}['_alignForTopChange'](_0x47b49d){if(!_0x47b49d['content']['length'])return;const _0x59607a=this['_getItemBefore'](_0x47b49d);if(!_0x59607a)return;const _0x145d5b=this['_sidebarItemViewToAnnotation']['get'](_0x59607a),_0x500a99=this['_activeAnnotation'];_0x500a99&&_0x500a99===_0x145d5b?this['_alignAfterItem'](_0x59607a,_0x47b49d):this['_alignBeforeItem'](_0x47b49d,_0x59607a);}['_alignForBottomChange'](_0x592ae7){if(!_0x592ae7['content']['length'])return;const _0x2a1a51=this['_getItemAfter'](_0x592ae7);if(!_0x2a1a51)return;const _0xef4be0=this['_sidebarItemViewToAnnotation']['get'](_0x2a1a51),_0x3dede2=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x349a37=this['_activeAnnotation'];_0x349a37&&_0x349a37===_0xef4be0&&_0x3dede2?(this['_alignBeforeItem'](_0x2a1a51,_0x592ae7),this['_alignAfterItem'](_0x592ae7,_0x2a1a51)):_0x349a37&&_0x349a37===_0xef4be0?this['_alignBeforeItem'](_0x2a1a51,_0x592ae7):this['_alignAfterItem'](_0x592ae7,_0x2a1a51);}['_recalculate'](_0x2c80ea,_0x58725f){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5b898c,changedProp:_0x1f3fa3}of this['_recalculateBuffer'])'top'===_0x1f3fa3?this['_alignForTopChange'](_0x5b898c):this['_alignForBottomChange'](_0x5b898c);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2c80ea,'changedProp':_0x58725f});}['getSidebarItemView'](_0x34c535){return this['_annotationToSidebarItemView']['get'](_0x34c535);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1d4b71){const _0x30f7fa=this['getSidebarItemView'](_0x1d4b71);this['stopListening'](_0x30f7fa),this['stopListening'](_0x1d4b71['view']),_0x30f7fa['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1d4b71),this['_sidebarItemViewToAnnotation']['delete'](_0x30f7fa);}['_createSidebarView'](){const _0xcb168f=new H(this['context']['locale']);return _0xcb168f['render'](),this['on']('change:_lastItem',(_0x2ba963,_0x3bee46,_0x31e1c1,_0x5b2485)=>{_0x5b2485&&_0xcb168f['unbind']('minHeight'),_0x31e1c1?_0xcb168f['bind']('minHeight')['to'](_0x31e1c1,'bottom'):_0xcb168f['minHeight']=null;}),_0xcb168f;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x549bae){const _0xeb89fd=this['_sidebarItemViewToAnnotation']['get'](_0x549bae),_0x5e9f67=_0xeb89fd&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xeb89fd)-0x1);return _0x5e9f67&&this['getSidebarItemView'](_0x5e9f67)||null;}['_getItemAfter'](_0x333e29){const _0x3a0e3e=this['_sidebarItemViewToAnnotation']['get'](_0x333e29),_0x16418a=_0x3a0e3e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3a0e3e)+0x1);return _0x16418a&&this['getSidebarItemView'](_0x16418a)||null;}['_alignBeforeItem'](_0xc16dc6,_0x13f4f4){_0xc16dc6['updateHeight']();const _0x5f5a98=G(_0x13f4f4['bottom']+this['_spaceBetweenItems'],_0xc16dc6['top']);return!!_0x5f5a98&&(this['_setItemTop'](_0x13f4f4,_0x13f4f4['top']-_0x5f5a98),!0x0);}['_alignAfterItem'](_0xfed472,_0x177c2a){_0xfed472['updateHeight']();const _0x13b26b=G(_0xfed472['bottom']+this['_spaceBetweenItems'],_0x177c2a['top']);return!!_0x13b26b&&(this['_setItemTop'](_0x177c2a,_0x177c2a['top']+_0x13b26b,!0x1),!0x0);}['_alignToTargetRect'](_0x810203){const _0x25a2a3=this['_sidebarItemViewToAnnotation']['get'](_0x810203);if(!_0x25a2a3||!_0x25a2a3['target']||!_0x25a2a3['targetRect'])return;const _0x37a474=this['_getTargetTop'](_0x25a2a3,_0x25a2a3['targetRect']);this['_setItemTop'](_0x810203,_0x37a474);}['_getTargetTop'](_0xbe5bbc,_0x525058){if(null===_0x525058)return 0x0;if(_0xbe5bbc['target']instanceof _0x32a86d)return _0x525058['top'];{const _0x46b80a=new _0x32a86d(this['view']['element'])['top'];return _0x525058['top']-_0x46b80a;}}['_setItemTop'](_0x16a9b4,_0x1a346f,_0x49cbb3=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x49cbb3&&(_0x1a346f=Math['max'](_0x1a346f,this['_getMaxAvailableTop'](_0x16a9b4))),_0x16a9b4['top']=_0x1a346f;}['_getMaxAvailableTop'](_0x51730e){let _0x387538=this['_getItemBefore'](_0x51730e),_0x548269=0x0;for(;_0x387538;)_0x387538['updateHeight'](),_0x548269+=this['_spaceBetweenItems']+_0x387538['height'],_0x387538=this['_getItemBefore'](_0x387538);return _0x548269;}}function G(_0x3f0ef6,_0x3b214c){return Math['max'](_0x3f0ef6-_0x3b214c,0x0);}function y(_0x4a1163){return null!==_0x4a1163&&'object'==typeof _0x4a1163&&0x1===_0x4a1163['nodeType'];}class e extends _0x36456e{['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(_0x1f134d){super(_0x1f134d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x27e15c(),this['_refreshPositioningDebounced']=_0x4daac0(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3b0fd2=this['context']['plugins']['get'](M),_0x5748ef=this['context']['plugins']['get'](z);_0x3b0fd2['register']('wideSidebar',this),_0x5748ef['container']&&_0x3b0fd2['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4c73ba){if(_0x4c73ba===this['activeAnnotation'])return;const _0x25e9fc=this['context']['plugins']['get'](z);_0x25e9fc['_activeAnnotation']=_0x4c73ba;const _0xfec6b=this['activeAnnotation'];_0x25e9fc['refresh']({'blurredAnnotation':_0xfec6b,'activatedAnnotation':_0x4c73ba}),this['activeAnnotation']=_0x4c73ba;}['attach'](_0x64134c){this['annotations']=_0x64134c;const _0x188c01=this['context']['plugins']['get'](z);if(_0x188c01['_annotations']=_0x64134c,this['isAttached'])throw new _0xd92937('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x188c01,'set:container',()=>{this['detach'](),this['listenTo'](_0x188c01,'change:container',_0x43e27d=>{_0x43e27d['off'](),this['attach'](_0x64134c);});}),_0x188c01['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x420a17=_0xfe57de=>{_0xfe57de['updateTargetRect'](),_0x188c01['addAnnotation'](_0xfe57de);};for(const _0x42afea of _0x64134c)_0x420a17(_0x42afea);this['listenTo'](_0x64134c,'add',(_0x51be38,_0x5ca00a)=>{_0x420a17(_0x5ca00a);}),this['listenTo'](_0x64134c,'remove',(_0x3343a0,_0x22b6ce,_0x1df7c2)=>{_0x188c01['rearrange']({'removedAnnotation':_0x22b6ce,'previousAnnotation':_0x64134c['get'](_0x1df7c2-0x1),'nextAnnotation':_0x64134c['get'](_0x1df7c2+0x1)}),_0x22b6ce===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x64134c,'focus',(_0xc117e0,_0x83ba35)=>{this['setActiveAnnotation'](_0x83ba35);}),this['listenTo'](_0x64134c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4db373=this['context']instanceof _0x3d509f?this['context']['editors']:new _0x27e15c([this['context']]);for(const _0x1e3b99 of _0x4db373)this['_integrateWithEditorAnnotations'](_0x1e3b99);this['listenTo'](_0x4db373,'add',(_0x54b9f4,_0x3aac31)=>{this['listenTo'](_0x3aac31,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3aac31);});}),this['listenTo'](_0x4db373,'remove',(_0xb4485a,_0x5f59c0)=>{_0x5f59c0['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5f59c0['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xd92937('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5aff46=this['context']['plugins']['get'](z);_0x5aff46['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5aff46),this['stopListening'](this['annotations']),this['context']instanceof _0x3d509f&&this['stopListening'](this['context']['editors']);for(const _0x48a9b5 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x48a9b5);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x265c5d){if(!_0x265c5d['plugins']['has']('EditorAnnotations'))return;const _0x94198a=_0x265c5d['plugins']['get']('EditorAnnotations'),_0x462989=()=>{const _0x5c445b=_0x94198a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x5c445b[0x0]||null);};this['listenTo'](_0x94198a,'refresh',_0x462989),this['listenTo'](_0x94198a,'blur',(_0x4c4dcc,{isAnnotationTracked:_0x59aa41})=>{this['activeAnnotation']&&_0x59aa41(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x94198a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4b7e08=>{_0x94198a['hasDomSelection']()&&(_0x462989(),_0x4b7e08['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x94198a);}['_destroyEditorAnnotationsIntegration'](_0x5eabea){this['stopListening'](_0x5eabea),this['_editorAnnotations']['remove'](_0x5eabea);}}class C extends _0x3ac222{['counterView'];constructor(_0x559416){super(_0x559416);const _0x5e3117=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x114438,_0x5b6646)=>_0x114438?'...':_0x5b6646['toString']()),this['set']('annotationType',''),this['icon']=_0x4bd163,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5e3117['to']('annotationType',_0x35e048=>'ck-annotation-counter__badge--'+_0x35e048),_0x5e3117['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5e3117['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x36456e{['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(_0x1afe02){super(_0x1afe02),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x100987),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x27e15c(),this['_refreshPositioningDebounced']=_0x4daac0(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x11df1c(this['context']['locale']),this['balloonPanelView']=new _0x20d659(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1af1e1){this['annotations']=_0x1af1e1;const _0x543be6=this['context']['plugins']['get'](z),_0x45898d=this['balloonPanelView'];if(_0x543be6['_annotations']=_0x1af1e1,this['isAttached'])throw new _0xd92937('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x543be6,'set:container',()=>{this['detach'](),this['listenTo'](_0x543be6,'change:container',_0x234c23=>{_0x234c23['off'](),this['attach'](_0x1af1e1);});}),_0x543be6['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x49e517=_0x4575d6=>{const _0x28db36=new C(this['context']['locale']);_0x543be6['addAnnotation'](_0x4575d6,_0x28db36),this['_annotationToNarrowView']['set'](_0x4575d6,_0x28db36),_0x28db36['bind']('isDirty','annotationType','number')['to'](_0x4575d6['view'],'isDirty','type','length'),_0x28db36['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x45898d['content']['first']!==_0x4575d6['view']?(this['_showBalloon'](_0x4575d6),_0x4575d6['view']['element']['focus'](),this['setActiveAnnotation'](_0x4575d6)):this['setActiveAnnotation'](null);});};for(const _0x10c1d8 of _0x1af1e1)_0x49e517(_0x10c1d8);this['listenTo'](_0x1af1e1,'add',(_0x1f41f5,_0x3ac0ea)=>{_0x49e517(_0x3ac0ea);}),this['listenTo'](_0x1af1e1,'remove',(_0x3fdc30,_0x255c43,_0x2a38ac)=>{this['_annotationToNarrowView']['get'](_0x255c43)['destroy'](),this['_annotationToNarrowView']['delete'](_0x255c43),_0x543be6['rearrange']({'removedAnnotation':_0x255c43,'previousAnnotation':_0x1af1e1['get'](_0x2a38ac-0x1),'nextAnnotation':_0x1af1e1['get'](_0x2a38ac+0x1)}),_0x255c43===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1af1e1,'focus',(_0x36cbff,_0x2ba105)=>{this['setActiveAnnotation'](_0x2ba105);}),this['listenTo'](_0x1af1e1,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x101379,_0x34288a)=>{_0x34288a['keyCode']===_0x25afdb['esc']&&_0x45898d['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x45898d['content']['first']),this['_hideBalloon'](),_0x34288a['stopPropagation'](),_0x34288a['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x29531f,_0x3c66cc)=>{const _0x4a67cf=_0x3c66cc['target'];_0x45898d['isVisible']&&_0x45898d['element']['contains'](_0x4a67cf)||_0x543be6['view']['element']['contains'](_0x4a67cf)||_0x29531f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1e0517=>_0x1e0517['contains'](_0x4a67cf))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x59f9ff=this['context']instanceof _0x3d509f?this['context']['editors']:new _0x27e15c([this['context']]);for(const _0x1ff176 of _0x59f9ff)this['_integrateWithEditorAnnotations'](_0x1ff176);this['listenTo'](_0x59f9ff,'add',(_0x5a1bd5,_0x32f876)=>{this['listenTo'](_0x32f876,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x32f876);});}),this['listenTo'](_0x59f9ff,'remove',(_0x1c4173,_0x142e78)=>{_0x142e78['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x142e78['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x135a25){if(_0x135a25===this['activeAnnotation'])return;const _0x17564a=this['context']['plugins']['get'](z);if(_0x17564a['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x135a25,'disableAnimationOnActivatedAnnotation':!0x0}),_0x135a25)_0x17564a['getSidebarItemView'](_0x135a25)?this['_showBalloon'](_0x135a25):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x135a25;}['detach'](){if(!this['isAttached'])throw new _0xd92937('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x35199d=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x25e102=>_0x25e102['destroy']()),this['_annotationToNarrowView']['clear'](),_0x35199d['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3d509f&&this['stopListening'](this['context']['editors']);for(const _0x2435cd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2435cd);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'](_0x3a8926){if(!_0x3a8926['plugins']['has']('EditorAnnotations'))return;const _0x4bfc72=_0x3a8926['plugins']['get']('EditorAnnotations'),_0x2c4fbe=this['context']['plugins']['get'](z),_0x51a378=this['annotations'],_0x1390c3=this['balloonPanelView'],_0x17698f=()=>{const _0x2cc102=_0x4bfc72['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2cc102),this['setActiveAnnotation'](_0x2cc102[0x0]||null);};this['listenTo'](_0x4bfc72,'refresh',_0x17698f),this['listenTo'](_0x4bfc72,'blur',(_0x56fea8,{isAnnotationTracked:_0x333eae})=>{this['activeAnnotation']&&_0x333eae(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4bfc72,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x51a378,'blur',_0x14e651=>{_0x4bfc72['hasDomSelection']()&&_0x14e651['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1e6c01,_0x5b27ad)=>{const _0x1af701=_0x5b27ad['target'];_0x1390c3['isVisible']&&_0x1390c3['element']['contains'](_0x1af701)||_0x2c4fbe['view']['element']['contains'](_0x1af701)||this['activeAnnotation']&&_0x4bfc72['hasDomSelection']()&&(_0x17698f(),_0x1e6c01['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4bfc72);}['_destroyEditorAnnotationsIntegration'](_0x138771){_0x138771&&(this['stopListening'](_0x138771),this['_editorAnnotations']['remove'](_0x138771));}['_setSelectedAnnotations'](_0x2dd7a3){for(const _0x2d6ded of this['_selectedAnnotations'])_0x2dd7a3['includes'](_0x2d6ded)||this['_manuallyClosedAnnotationViews']['delete'](_0x2d6ded['view']);this['_selectedAnnotations']=_0x2dd7a3;}['_refreshPositioning'](){const _0x712e05=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x712e05['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x10004c){if(this['_manuallyClosedAnnotationViews']['has'](_0x10004c['view']))return;const _0x550a41=this['balloonPanelView']['content']['first'];_0x550a41!==_0x10004c['view']?(_0x550a41&&this['_detachListeners'](_0x550a41),this['_attachListeners'](_0x10004c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x10004c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x43b5c7=this['balloonPanelView']['content']['first'],_0x3051a0=_0x43b5c7&&this['annotations']['getByView'](_0x43b5c7);if(!_0x3051a0||!this['_annotationToNarrowView']['has'](_0x3051a0))return;const _0x548330=this['_annotationToNarrowView']['get'](_0x3051a0)['element'],_0x587f63=(function(){const _0x31745c=_0x20d659['defaultPositions'];return[_0x31745c['southArrowNorthEast'],_0x31745c['northArrowSouthEast'],_0x31745c['southArrowNorth'],_0x31745c['northArrowSouth'],_0x31745c['southArrowNorthWest'],_0x31745c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x548330,'positions':_0x587f63});}['_hideBalloon'](){const _0x5902c7=this['balloonPanelView'],_0x56f5b4=_0x5902c7['content']['first'];_0x56f5b4&&(this['_detachListeners'](_0x56f5b4),_0x5902c7['unpin'](),_0x5902c7['content']['clear']());}['_attachListeners'](_0x57d338){this['listenTo'](_0x57d338,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x57d338,'Esc',(_0x60980d,_0x50de95)=>{this['_manuallyClosedAnnotationViews']['add'](_0x57d338),this['_hideBalloon'](),_0x50de95();});}['_detachListeners'](_0x138ca1){this['stopListening'](_0x138ca1);}}class c extends _0x46aee5{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x2944a3,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3372d4){super(_0x3372d4),_0x3372d4['editing']['view']['addObserver'](_0x5c406a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x3372d4['plugins']['get'](_0x2944a3),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x5c8774=this['editor']['plugins']['get'](M);_0x5c8774['context']===this['editor']&&(_0x5c8774['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3a04e8,_0x52dbbf)=>{const _0x316a7c=this['_balloon'];if(this['isAttached']&&_0x316a7c['visibleView']){const _0x256e9e=this['annotations']['getByView'](_0x316a7c['visibleView']);_0x256e9e&&this['_closeAnnotation'](_0x256e9e),_0x52dbbf();}}));}['afterInit'](){const _0x4b7569=this['editor']['plugins']['get'](M);_0x4b7569['context']===this['editor']&&(_0x4b7569['hasActive']()||_0x4b7569['switchTo']('inline'));}['setActiveAnnotation'](_0x1ff6d0){_0x1ff6d0!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1ff6d0&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1ff6d0)&&this['_addAnnotationToBalloon'](_0x1ff6d0,!0x0),_0x1ff6d0['isActive']=!0x0),_0x1ff6d0||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1ff6d0);}['attach'](_0x462397){this['annotations']=_0x462397;const _0x566257=this['editor']['plugins']['get'](M),_0x7c7d1d=this['_balloon'];if(this['isAttached'])throw new _0xd92937('inlineannotations-attach-already-attached',this);if(_0x566257['context']!==this['editor'])throw new _0xd92937('inlineannotations-not-allowed-with-context',this);const _0x314b97=this['editor']['plugins']['get'](P);this['listenTo'](_0x314b97,'refresh',()=>{const _0x535aed=_0x314b97['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x19ad16,_0x24d5d0;!this['_forceRefresh']&&(_0x19ad16=_0x535aed,_0x24d5d0=this['_selectedAnnotations'],_0x19ad16['length']===_0x24d5d0['length']&&_0x19ad16['every'](_0x4210cd=>_0x24d5d0['includes'](_0x4210cd)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x535aed),this['setActiveAnnotation'](_0x535aed[0x0]||null));}),this['listenTo'](_0x314b97,'blur',(_0x5dcf64,{isAnnotationTracked:_0xee17bf})=>{this['activeAnnotation']&&_0xee17bf(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x41ae75,_0x2eaae5,_0x29d714)=>{_0x29d714||this['setActiveAnnotation'](null);}),this['listenTo'](_0x462397,'remove',(_0x27a176,_0x463970)=>{this['_removeAnnotationFromBalloon'](_0x463970),_0x463970===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x7c7d1d,'change:visibleView',(_0x59b1ea,_0x3fd5c7,_0x3aa1c6,_0x2fda00)=>{_0x2fda00&&this['stopListening'](_0x2fda00);const _0xbc7ff3=_0x462397['getByView'](_0x3aa1c6);_0x3aa1c6&&_0xbc7ff3&&(this['listenTo'](_0x3aa1c6,'change:height',()=>{_0x7c7d1d['updatePosition']();}),this['listenTo'](_0x3aa1c6,'Esc',()=>{this['_closeAnnotation'](_0xbc7ff3),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xbc7ff3&&this['setActiveAnnotation'](_0xbc7ff3));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x7c7d1d['visibleView']&&(_0x462397['getByView'](_0x7c7d1d['visibleView'])&&_0x7c7d1d['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 _0xd92937('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3763f8 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3763f8);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2eba33){for(const _0x595a8e of this['_selectedAnnotations'])_0x2eba33['includes'](_0x595a8e)||this['_manuallyClosed']['delete'](_0x595a8e);for(const _0x22ff22 of this['annotations'])_0x2eba33['includes'](_0x22ff22)||this['_removeAnnotationFromBalloon'](_0x22ff22);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x156d9e of _0x2eba33)this['_addAnnotationToBalloon'](_0x156d9e);}this['_selectedAnnotations']=_0x2eba33;}['_addAnnotationToBalloon'](_0x1175b3,_0x564bf3=!0x1){this['_manuallyClosed']['has'](_0x1175b3)||(this['_addedAnnotations']['has'](_0x1175b3)||this['_balloon']['hasView'](_0x1175b3['view'])||(this['_addedAnnotations']['add'](_0x1175b3),this['_balloon']['add']({'stackId':_0x1175b3['view']['id'],'view':_0x1175b3['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1175b3)}})),_0x564bf3&&this['_balloon']['showStack'](_0x1175b3['view']['id']));}['_getBalloonTargetForAnnotation'](_0x3c6c26){const _0x21a0eb=_0x3c6c26['target'],_0x488a05=this['editor']['editing']['view'],_0x5b40f4=_0x488a05['document']['selection']['getFirstRange'](),_0x5de5b7=_0x488a05['domConverter']['viewRangeToDom'](_0x5b40f4);if(_0x5de5b7['collapse'](!0x0),_0x21a0eb){if(_0x21a0eb instanceof _0x32a86d)return _0x21a0eb;let _0x433b62=[];for(const _0x5d16e9 of _0x21a0eb)_0x433b62['push'](...B(_0x5d16e9['getClientRects']()));_0x433b62=function(_0x5ebdc0){const _0x3b01b6=[];let _0x36c64b=_0x5ebdc0[0x0];for(let _0x5b830e=0x1;_0x5b830e<_0x5ebdc0['length'];_0x5b830e++)F(_0x36c64b,_0x5ebdc0[_0x5b830e])?_0x36c64b['width']+=_0x5ebdc0[_0x5b830e]['width']:(_0x3b01b6['push'](_0x36c64b),_0x36c64b=_0x5ebdc0[_0x5b830e]);return _0x3b01b6['push'](_0x36c64b),_0x3b01b6;}(_0x433b62);const _0x2d888d=_0x5de5b7['getBoundingClientRect']();return _0x433b62['find'](_0x55045e=>_0x55045e['top']<=_0x2d888d['top']&&_0x55045e['bottom']>=_0x2d888d['bottom']&&_0x55045e['left']<=_0x2d888d['left']&&_0x55045e['right']>=_0x2d888d['right'])||_0x433b62[0x0];}return _0x3c6c26['targetRect']||_0x5de5b7;}['_removeAnnotationFromBalloon'](_0x107c5d){this['_addedAnnotations']['has'](_0x107c5d)&&this['_balloon']['hasView'](_0x107c5d['view'])&&(this['_addedAnnotations']['delete'](_0x107c5d),this['_balloon']['remove'](_0x107c5d['view']));}['_closeAnnotation'](_0x18ee71){this['_manuallyClosed']['add'](_0x18ee71),this['_removeAnnotationFromBalloon'](_0x18ee71);}}function B(_0x48a813){return Array['from'](_0x48a813)['map'](DOMRect['fromRect']);}function F(_0x2826b8,_0x2f46b0){return _0x2826b8['top']===_0x2f46b0['top']&&_0x2826b8['bottom']===_0x2f46b0['bottom']&&_0x2826b8['right']===_0x2f46b0['left'];}class it extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0xfe6c5d,_0x125ec8){super(_0xfe6c5d),this['set']('isEmpty',!_0x125ec8['length']),this['focusTracker']=new _0x20e391(),this['_annotationViews']=_0x125ec8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xa806cd({'focusables':_0x125ec8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x125ec8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x125ec8,'remove',(_0x672ee,_0x4eedc2)=>{_0x4eedc2['isActive']&&this['focus'](),_0x125ec8['length']||(this['isEmpty']=!0x0);});const _0x2f1755=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0xfe6c5d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x125ec8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2f1755['if']('isEmpty','ck-hidden',_0x2c50f7=>!_0x2c50f7)]},'children':[{'text':E(_0xfe6c5d,'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 _0x58f87d of this['_annotationViews'])this['focusTracker']['add'](_0x58f87d['element']);this['_annotationViews']['on']('change',(_0x4f08e3,{added:_0x13b6d7,removed:_0x38a7ba})=>{for(const _0x2f3144 of _0x13b6d7)this['focusTracker']['add'](_0x2f3144['element']);for(const _0x2e8172 of _0x38a7ba)this['focusTracker']['remove'](_0x2e8172['element']);});}}class f extends _0x36456e{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x2e598f){super(_0x2e598f),this['archivedThreads']=new _0x27e15c();}['init'](){const _0x4bdc47=this['context'],_0x46761a=_0x4bdc47['plugins']['get'](o),_0x12fce8=_0x4bdc47['plugins']['get'](O);this['listenTo'](_0x46761a,'addCommentThread',(_0xaca371,{threadId:_0x9e06b2})=>{const _0x13c5ae=_0x46761a['getCommentThread'](_0x9e06b2);_0x13c5ae['archivedAt']&&this['archivedThreads']['add'](_0x13c5ae,this['_calculatePosition'](_0x13c5ae['archivedAt'])),this['listenTo'](_0x13c5ae,'change:archivedAt',(_0x1c0975,_0x5a40c8,_0x1e6f3b)=>{_0x1e6f3b?this['archivedThreads']['has'](_0x13c5ae)||this['archivedThreads']['add'](_0x13c5ae,this['_calculatePosition'](_0x13c5ae['archivedAt'])):this['archivedThreads']['has'](_0x13c5ae)&&this['archivedThreads']['remove'](_0x13c5ae);});}),this['listenTo'](_0x46761a,'removeCommentThread',(_0x628579,{threadId:_0x46d3a0})=>{const _0x5126ab=_0x46761a['getCommentThread'](_0x46d3a0);this['stopListening'](_0x5126ab),this['archivedThreads']['has'](_0x5126ab)&&this['archivedThreads']['remove'](_0x5126ab);},{'priority':'highest'}),this['listenTo'](_0x12fce8['collection'],'focus',(_0x373b26,_0x433ca9)=>{_0x433ca9['isVisible']||(_0x433ca9['isActive']=!0x0,_0x12fce8['activate'](_0x433ca9));});}['_calculatePosition'](_0x117623){const _0x158597=[...this['archivedThreads']]['findIndex'](_0x382bff=>_0x382bff['archivedAt']<_0x117623);return _0x158597>-0x1?_0x158597:this['archivedThreads']['length'];}}class a extends _0x46aee5{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x2d1df0];}constructor(_0x5e75ae){super(_0x5e75ae),this['annotationViews']=new _0x3c4ee6(),this['_pendingThreads']=[];}['init'](){const _0x27368f=this['editor'],_0xa682f9=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x27368f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3ac222,!0x0)),_0x27368f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4f212f=this['_createCommentsArchiveButton'](_0x554070);return _0x4f212f['set']({'role':'menuitemcheckbox'}),_0x4f212f;});const _0x5941d6=_0x27368f['plugins']['get'](f),_0x10c14a=_0x27368f['plugins']['get']('Annotations'),_0x51b0fe=_0x27368f['plugins']['get']('CommentsRepository');_0x5941d6['archivedThreads']['forEach'](_0x363166=>{this['_handleNewThread'](_0x363166);}),this['listenTo'](_0x5941d6['archivedThreads'],'add',(_0xfbe887,_0x2a6b25)=>{this['_handleNewThread'](_0x2a6b25);}),this['listenTo'](_0x10c14a['collection'],'add',(_0x16e70e,_0x4df607)=>{const _0x1a5590=this['_pendingThreads']['find'](_0x2ae11a=>{const _0x455d3d=_0x51b0fe['_threadToController']['get'](_0x2ae11a);return _0x455d3d&&_0x4df607['innerView']===_0x455d3d['view'];});if(_0x1a5590){const _0xf01739=this['_calculatePosition'](_0x1a5590['archivedAt']);this['annotationViews']['add'](_0x4df607['view'],_0xf01739),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1a5590),0x1);}}),this['listenTo'](_0x5941d6['archivedThreads'],'remove',(_0x2cd13a,_0x2d843c)=>{const _0x2528c7=_0x27368f['config']['get']('collaboration.channelId');if(!_0x2528c7||_0x2d843c['channelId']===_0x2528c7){if(this['_pendingThreads']['includes'](_0x2d843c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2d843c),0x1);else{const _0x5ea01e=_0x51b0fe['_threadToController']['get'](_0x2d843c),_0x26671e=_0x10c14a['getByInnerView'](_0x5ea01e['view']);this['annotationViews']['remove'](_0x26671e['view']),this['stopListening'](_0x26671e['focusableElements']);}}}),this['listenTo'](_0x10c14a['collection'],'add',(_0x54fc1a,_0x55f286)=>{this['listenTo'](_0x55f286,'escape',_0xa682f9);}),this['listenTo'](_0x10c14a['collection'],'remove',(_0x3f4658,_0x43d3fe)=>{this['stopListening'](_0x43d3fe,'escape',_0xa682f9);});}['_handleNewThread'](_0x2a422a){const _0x232144=this['editor']['plugins']['get']('CommentsRepository'),_0x312568=this['editor']['plugins']['get']('Annotations'),_0x38169d=this['editor']['config']['get']('collaboration.channelId');if(!_0x38169d||_0x2a422a['channelId']===_0x38169d){const _0x2bede2=_0x232144['_threadToController']['get'](_0x2a422a);if(!_0x2bede2)return void this['_pendingThreads']['push'](_0x2a422a);const _0x594475=this['_calculatePosition'](_0x2a422a['archivedAt']),_0x420a5a=_0x312568['getByInnerView'](_0x2bede2['view']);_0x420a5a['isVisible']&&_0x312568['_visibleAnnotations']['remove'](_0x420a5a),this['annotationViews']['add'](_0x420a5a['view'],_0x594475);}}['_calculatePosition'](_0x50abd2){const _0x2f232a=this['editor']['config']['get']('collaboration.channelId'),_0x4eb852=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x2f30f0=>_0x2f30f0['channelId']===_0x2f232a)['findIndex'](_0x28bcb9=>_0x28bcb9['archivedAt']<_0x50abd2);return _0x4eb852<0x0||_0x4eb852>this['annotationViews']['length']?this['annotationViews']['length']:_0x4eb852-0x1;}['_toggleDialog'](){const _0x5ec804=this['editor'],_0x59ea82=_0x5ec804['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new it(_0x5ec804['locale'],this['annotationViews'])),'commentsArchive'===_0x59ea82['id']?_0x59ea82['hide']():_0x59ea82['show']({'id':'commentsArchive','title':E(_0x5ec804['locale'],'COMMENTS_ARCHIVE'),'icon':_0x23c1b7,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':tt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x23b8a5,_0x204564=!0x1){const _0x17d0fc=this['editor']['locale'],_0x44c57e=this['editor']['plugins']['get']('Dialog'),_0x42c0c8=new _0x23b8a5(_0x17d0fc);return _0x42c0c8['bind']('isEnabled')['to'](this,'isEnabled'),_0x42c0c8['bind']('isOn')['to'](_0x44c57e,'id',_0x3854f4=>'commentsArchive'===_0x3854f4),_0x42c0c8['set']({'label':E(_0x17d0fc,'COMMENTS_ARCHIVE'),'icon':_0x23c1b7,'isToggleable':!0x0}),_0x204564&&(_0x42c0c8['tooltip']=!0x0),this['listenTo'](_0x42c0c8,'execute',()=>this['_toggleDialog']()),_0x42c0c8;}['_hideDialogOnAnnotationEscape']=_0x964de8=>{const _0x184b6e=_0x964de8['source'];if(!this['annotationViews']['has'](_0x184b6e['view']))return;const _0x3e7b83=this['editor']['plugins']['get']('Dialog');_0x3e7b83['isOpen']&&'commentsArchive'===_0x3e7b83['id']&&(_0x3e7b83['hide'](),_0x964de8['stop']());};}class p extends _0x46aee5{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,is as BaseCommentThreadView,rs as BaseCommentView,fi as Comment,ui as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt 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};
|