@ckeditor/ckeditor5-comments 48.0.0-alpha.0 → 48.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -11
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>kt)());constructor(_0x44dd80={}){function _0x4f7b27(_0x1e8a0f){return _0x1e8a0f['map'](_0x25ca7f=>String['fromCharCode'](_0x25ca7f))['join']('');}(_0x44dd80=Object['assign']({},_0x44dd80))['plugins']||(_0x44dd80['plugins']=Ot['defaultPlugins']),super(_0x44dd80),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4f7b27([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f7b27([0x76,0x69,0x65,0x77])][_0x4f7b27([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f7b27([0x61,0x75,0x74,0x6f]),this[_0x4f7b27([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4f7b27([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f7b27([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4f7b27([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4f7b27([0x6f,0x6b])});}['create'](){const _0x18a5e1=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x18a5e1))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5ef1c4=>{const _0x2b7eec=this['model']['document']['getRoot'](),_0x21ab8b=_0x2b7eec&&_0x2b7eec['getChild'](_0x2b7eec['childCount']-0x1);_0x5ef1c4['setSelection'](_0x21ab8b,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x5ea0c4=this['editing']['view'],_0x504140=_0x5ea0c4['document']['getRoot'](),_0x2084b2=_0x504140['getChild'](0x0);_0x504140['childCount']>0x1||!_0x2084b2||'p'!=_0x2084b2['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x5ea0c4,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2084b2['placeholder']=this['placeholder']),ut({'view':_0x5ea0c4,'element':_0x2084b2,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2084b2);}}class Mt extends _0x2e27f6{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2720f7,_0x5d7c84={}){super(_0x2720f7),this['editor']=null,this['_editorConfig']=_0x5d7c84,this['set']('value',_0x5d7c84['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x2720f7,'Reply...')),this['set']('submitLabel',bt(_0x2720f7,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x4ff923(),this['focusTracker']=new _0x5b085d(),this['focusCycler']=new _0x2e3f33({'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',(_0x406716,_0x4795eb)=>{this['cancelButtonView']['fire']('execute'),_0x4795eb();}),this['keystrokes']['set']('Ctrl+Enter',(_0x40fd72,_0x34e601)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x34e601());}),this['on']('submit',(_0xcb0433,_0x6c2fcc)=>{_0x6c2fcc['length']>0xfde8?(alert(bt(_0x2720f7,'TOO_LONG_COMMENT_ALERT',[_0x6c2fcc['length'],0xfde8])),_0xcb0433['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x5e7d55=this['editor'];this['element']['insertBefore'](_0x5e7d55['ui']['element'],this['element']['firstChild']),_0x5e7d55['model']['document']['on']('change',()=>this['value']=_0x5e7d55['getData']()),_0x5e7d55['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5e7d55['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x50af6f){-0x1===_0x50af6f?(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:_0x549e7e}=this,_0x136427=new _0x2ef389(_0x549e7e);return _0x136427['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x136427['withText']=!0x0,_0x136427['bind']('label')['to'](this,'submitLabel'),_0x136427['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x136427['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x33ab26,_0x2e0288)=>!_0x2e0288&&!!_0x33ab26['trim']()),_0x136427;}['_createCancelButton'](){const {locale:_0x3174e5}=this,_0x2adeea=new _0x2ef389(_0x3174e5);return _0x2adeea['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2adeea['label']=bt(_0x3174e5,'Cancel'),_0x2adeea['withText']=!0x0,_0x2adeea['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2adeea;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2c6a5b=>{this['focusTracker']['add'](_0x2c6a5b['element']);}),this['focusables']['on']('change',(_0x37e29f,_0x135c56)=>{for(const _0x14c495 of Array['from'](_0x135c56['added'])['reverse']())this['focusTracker']['add'](_0x14c495['element']);});}}class Rt extends _0x2e27f6{constructor(_0x391de1,_0x11865d,_0x590373){super(_0x391de1),this['commentInputView']=new Mt(_0x391de1,_0x590373),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x51a62b,_0x1f3067)=>_0x51a62b||!!_0x1f3067),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 _0x69ebf(_0x391de1,_0x11865d),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'](_0x5c36a8){this['commentInputView']['focus'](_0x5c36a8);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x181bfa,_0x4ff328)=>{const {submitButtonView:_0x9255cf,cancelButtonView:_0x23ce5a,editor:_0x4ca7ed}=this['commentInputView'];[_0x9255cf['element'],_0x23ce5a['element'],_0x4ca7ed?_0x4ca7ed['editing']['view']['getDomRoot']():null]['filter'](_0x38c5d1=>_0x38c5d1)['some'](_0x430a13=>_0x430a13['contains'](_0x4ff328['target']))||(this['focus'](),_0x4ff328['preventDefault']());});}}class xt extends _0x2e27f6{constructor(_0x4f1987){super(_0x4f1987);const _0x1de049=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1de049['to']('count',_0x5520ae=>bt(_0x4f1987,'NUMBER_OF_COMMENTS',_0x5520ae))}]});}}class St extends _0x2e27f6{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1426b7,_0x2b1244,_0x6ddf41){super(_0x1426b7);const _0x1d01f1=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2b1244['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2b1244,this['_config']=_0x6ddf41,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5b085d(),this['keystrokes']=new _0x4ff923(),this['focusCycler']=new _0x2e3f33({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xe6e15f=>this['commentViews']['map'](_0x5df1dc=>_0x5df1dc['element'])['includes'](_0xe6e15f['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x1426b7),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3e93ba=>_0x3e93ba-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2fea37 of _0x2b1244['comments'])this['_handleNewCommentModel'](_0x2fea37);this['_handleInfoComment'](),this['listenTo'](_0x2b1244['comments'],'add',(_0x2bbdbf,_0x1e3dd6)=>{const _0x14ed76=this['_calculatePosition'](_0x1e3dd6);this['length']++,this['_handleNewCommentModel'](_0x1e3dd6,_0x14ed76),this['refreshVisibleViews']();}),this['listenTo'](_0x2b1244['comments'],'remove',(_0x89bf0,_0x2d1a6c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2d1a6c),this['refreshVisibleViews']();}),this['listenTo'](_0x2b1244,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2b1244,'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',_0x1d01f1['if']('length','ck-hidden',_0x2b61b0=>!_0x2b61b0)],'aria-label':bt(_0x1426b7,'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'](_0x4c2505){-0x1===_0x4c2505?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x6c10b6 of this['commentViews'])_0x6c10b6['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x457727,_0x451eb6){const _0x27c43a=new this['_config']['CommentView'](this['locale'],_0x457727,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x27c43a['viewUid']=_0x457727['id'],_0x27c43a['delegate']('removeComment')['to'](this),_0x27c43a['delegate']('updateComment')['to'](this),_0x27c43a['delegate']('resolveCommentThread')['to'](this),_0x27c43a['delegate']('editorReady')['to'](this),_0x27c43a['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x27c43a,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x27c43a,_0x451eb6);}['_calculatePosition'](_0x273d3b){const _0x16d85b=this['_model']['_findOptimalIndex'](_0x273d3b);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x273d3b['authoredAt']?_0x16d85b-0x1:_0x16d85b:_0x16d85b-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x40aa09={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x40aa09,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x40aa09));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x117b1e){const _0x58ca12=this['commentViews']['remove'](_0x117b1e['id']);this['stopListening'](_0x58ca12),_0x58ca12['isEditMode']&&this['_updateHasDirtyComment'](),_0x58ca12['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3e6c69=>_0x3e6c69['isEditMode']);}['_rearrangeCollapse'](){const _0x525e0d=function(_0x18910b){const _0x27e604=new _0x3b337f();for(const _0x17b328 of _0x18910b)_0x27e604['add'](_0x17b328);return _0x27e604;}(this['commentViews']),_0x1f4d59=this['_collapsedCommentsView']['count'];for(let _0x17a4af=0x1;_0x17a4af<=_0x1f4d59;_0x17a4af++)_0x525e0d['remove'](0x1);for(const _0x11852b of _0x525e0d)_0x11852b['collapse']();_0x1f4d59>0x0&&_0x525e0d['add'](this['_collapsedCommentsView'],0x1),Pt(_0xa0b8e7(Array['from'](this['visibleViews']),Array['from'](_0x525e0d)),this['visibleViews'],_0x525e0d);}['_rearrangeExpand'](){Pt(_0xa0b8e7(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x365b77 of this['visibleViews'])_0x365b77['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1ef9d1=>{this['focusTracker']['add'](_0x1ef9d1['element']),this['keystrokes']['listenTo'](_0x1ef9d1['element']);}),this['commentViews']['on']('change',(_0x2cdffa,_0x2c04d1)=>{for(const _0x183a69 of _0x2c04d1['removed'])this['focusTracker']['remove'](_0x183a69['element']),this['keystrokes']['stopListening'](_0x183a69['element']);for(const _0x1c0d85 of Array['from'](_0x2c04d1['added'])['reverse']())this['focusTracker']['add'](_0x1c0d85['element']),this['keystrokes']['listenTo'](_0x1c0d85['element']);});}}function Pt(_0x53e7e5,_0x17bb6b,_0x252b16){let _0x2e6e0d=0x0;for(const _0x1959d8 of _0x53e7e5)switch(_0x1959d8){case'insert':_0x17bb6b['add'](_0x252b16['get'](_0x2e6e0d),_0x2e6e0d),_0x2e6e0d++;break;case'delete':_0x17bb6b['remove'](_0x2e6e0d);break;case'equal':_0x2e6e0d++;}}class Lt extends _0x2e27f6{constructor(_0x47c051){super(_0x47c051);const _0x1c740d=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1c740d['to']('contextValue',_0x39392a=>bt(_0x47c051,'THREAD_CONTEXT_LABEL',_0x39392a)),'tabindex':-0x1},'children':[{'text':_0x1c740d['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x2e27f6{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x109572,_0x57ac9e){super(_0x109572);const _0x10ff18=this['bindTemplate'];this['_model']=_0x57ac9e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5b085d(),this['keystrokes']=new _0x4ff923(),this['focusCycler']=new _0x2e3f33({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xc75625=>!!_0xc75625),this['bind']('contextValue')['to'](this['_model'],'context',_0x1fc978=>_0x1fc978&&_0x1fc978['value']?this['_trimContextValue'](_0x1fc978['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x10ff18['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 _0x570d10=new _0x2ef389(this['locale']);return _0x570d10['label']=bt(this['locale'],'Reopen'),_0x570d10['tooltip']=bt(this['locale'],'Reopen'),_0x570d10['icon']=_0x2731bd,_0x570d10['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x513e9e=>!_0x513e9e),_0x570d10['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x45e7dd,_0x1d9dc7)=>_0x45e7dd&&_0x1d9dc7),_0x570d10['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x570d10;}['_trimContextValue'](_0x23acc9){if(_0x23acc9['length']<0x96)return _0x23acc9;const _0x1e3435=_0x23acc9['lastIndexOf']('\x20',0x93);return _0x23acc9['substring'](0x0,_0x1e3435>-0x1?_0x1e3435:0x93)+'...';}['_attachContextActions'](){const _0x2431f3=this['element']['querySelector']('.ck-context'),_0x24b8b6=_0x2431f3['querySelector']('.ck-context__value');this['listenTo'](_0x2431f3,'mouseenter',()=>{_0x24b8b6['offsetWidth']<_0x24b8b6['scrollWidth']&&_0x2431f3['classList']['add']('overlay');}),this['listenTo'](_0x2431f3,'mouseleave',()=>{_0x2431f3['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4b4d95 of this['focusables'])this['focusTracker']['add'](_0x4b4d95['element']),this['keystrokes']['listenTo'](_0x4b4d95['element']);}['_createContextView'](){const _0x129b8e=new Lt(this['locale']);return _0x129b8e['bind']('contextValue')['to'](this),_0x129b8e;}}class Vt extends _0x2e27f6{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1d7d69,_0x102768,_0x1c5c85,_0x2ebf29){super(_0x1d7d69),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x102768,this['_localUser']=_0x1c5c85,this['_config']=_0x2ebf29,this['commentThreadHeaderView']=new Dt(_0x1d7d69,_0x102768),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x33705e(_0x1d7d69,bt(_0x1d7d69,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x1d7d69,_0x102768,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2ebf29)),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',(_0x23ff7b,_0x2e8fea)=>_0x23ff7b||!!_0x2e8fea),this['bind']('isUnlinked')['to'](_0x102768,'unlinkedAt',_0x31db5c=>!!_0x31db5c),this['bind']('ariaLabel')['to'](this,'length',_0x5d76e2=>{const _0x481a57=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x5d76e2,_0x481a57]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5b085d(),this['keystrokes']=new _0x4ff923(),this['focusCycler']=new _0x2e3f33({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3c3cc6=>_0x3c3cc6['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x2c2338(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3862d1=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0xc9453a=_0x3862d1['commentInputView'];return _0x3862d1['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0xc9453a,'value',(_0x146f65,_0x2c0169,_0x11abfe,_0x22ff06,_0x5e0df7)=>!!_0x5e0df7||!!_0x22ff06&&_0x11abfe&&!_0x2c0169||_0x146f65&&_0x11abfe&&!_0x2c0169),_0xc9453a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4b08ce,_0xc7df2b,_0x2b2c3e)=>{let _0x101d73;return _0x101d73=_0x2b2c3e&&_0xc7df2b?'Reply\x20to\x20reopen\x20discussion...':_0x4b08ce?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x101d73);}),_0xc9453a['bind']('submitLabel')['to'](this,'length',_0x53a6f9=>bt(this['locale'],_0x53a6f9?'Reply':'Comment')),_0xc9453a['on']('submit',(_0x23a74d,_0x20ddd4)=>{this['fire']('addComment',_0x20ddd4),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0xc9453a['on']('cancel',()=>{this['focus']();}),_0xc9453a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xc9453a['on']('cancel',_0x33946c=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x33946c['stop']());}),this['on']('change:isActive',(_0x41c553,_0x4ff4e5,_0x235add)=>{_0x235add||this['length']||_0xc9453a['value']||this['fire']('removeCommentThread');}),_0x3862d1;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x413137(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1aefa9,target:_0x502d84,type:_0x2eba51,isVisible:_0xb888f8=!0x0}){super(),this['view']=_0x1aefa9,this['view']['element']||this['view']['render'](),this['_type']=_0x2eba51,this['_target']=_0x502d84,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3b337f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xa6461a,_0x451e64)=>{this['view']['focusTracker']['add'](_0x451e64);}),this['focusableElements']['on']('remove',(_0x376f77,_0x26e5ef)=>{this['view']['focusTracker']['remove'](_0x26e5ef);}),this['set']('isVisible',_0xb888f8);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xadde10=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0xadde10),_0xadde10;}get['targetRect'](){const _0x59762f=this['target'];if(null===_0x59762f)return null;if(_0x59762f instanceof _0x2e7ae5)return _0x59762f;const _0x1b930c=_0x59762f['filter'](_0x1fb09f=>function(_0x484670){const _0x4b6cd8=_0x484670['offsetParent'];if(_0x4b6cd8)return!0x0;const _0x429cb2=_0x484670['getClientRects']()['item'](0x0);return!!_0x429cb2;}(_0x1fb09f));return 0x0===_0x1b930c['length']?null:_0x2e7ae5['getDomElementRects'](_0x1b930c[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x328073){this['view']['isActive']=_0x328073,this['view']['mainView']['isActive']=_0x328073;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x359d1f){if(!(null===_0x359d1f||_0x359d1f instanceof _0x2e7ae5||Array['isArray'](_0x359d1f)&&_0x359d1f['every'](_0x880850=>Gt(_0x880850))))throw new _0x1b1980('annotation-invalid-target',null,{'target':_0x359d1f});}['_getNormalizedTarget'](){const _0x419b20='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x419b20)?[_0x419b20]:_0x419b20;}}function Gt(_0x4617b9){return null!==_0x4617b9&&'object'==typeof _0x4617b9&&'nodeType'in _0x4617b9&&0x1===_0x4617b9['nodeType'];}class jt extends _0x3b337f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5433ac=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5b085d(),this['_focusTracker']['on']('change:isFocused',(_0x590bb8,_0x34eee0,_0x2a711d)=>{_0x2a711d||this['fire']('blur');});for(const _0x36d55e of _0x5433ac)this['add'](_0x36d55e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x538c60){if(this['has'](_0x538c60))throw new _0x1b1980('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x538c60['innerView'],_0x538c60),this['_viewToAnnotation']['set'](_0x538c60['view'],_0x538c60);for(const _0x5018c0 of _0x538c60['focusableElements'])this['_focusTracker']['add'](_0x5018c0);this['listenTo'](_0x538c60['focusableElements'],'add',(_0x22b504,_0x23797c)=>{this['_focusTracker']['add'](_0x23797c);}),this['listenTo'](_0x538c60['focusableElements'],'remove',(_0xe0c4af,_0x5ac004)=>{this['_focusTracker']['remove'](_0x5ac004);}),this['listenTo'](_0x538c60['view']['focusTracker'],'change:isFocused',(_0x2d6ef6,_0x59bc6a,_0x246152)=>{_0x246152&&this['fire']('focus',_0x538c60);}),_0x538c60['updateTargetRect']();const _0x488647=this['_getOrderInContent'](_0x538c60['view']['targetRect']);return super['add'](_0x538c60,_0x488647);}['remove'](_0x1e0e25){if(!this['has'](_0x1e0e25))throw new _0x1b1980('annotationcollection-not-existing-item',null);this['stopListening'](_0x1e0e25['view']['focusTracker']),this['stopListening'](_0x1e0e25['focusableElements']);for(const _0x2c5292 of _0x1e0e25['focusableElements'])this['_focusTracker']['remove'](_0x2c5292);return this['_viewToAnnotation']['delete'](_0x1e0e25['view']),this['_innerViewToAnnotation']['delete'](_0x1e0e25['innerView']),super['remove'](_0x1e0e25);}['getByInnerView'](_0x19d5dd){return this['_innerViewToAnnotation']['get'](_0x19d5dd);}['getByView'](_0x3034f9){return this['_viewToAnnotation']['get'](_0x3034f9);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x211503 of this)_0x211503['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2eed46=Array['from'](this)['sort']((_0x46401c,_0x4719d6)=>qt(_0x46401c['view']['targetRect'],_0x4719d6['view']['targetRect']));for(let _0x546387=_0x2eed46['length']-0x1;_0x546387>0x0;_0x546387--){const _0x1bb4ea=_0x2eed46[_0x546387];_0x546387!==this['getIndex'](_0x1bb4ea)&&(this['remove'](_0x1bb4ea),this['add'](_0x1bb4ea));}}['_getOrderInContent'](_0x25dc9a){let _0x17995e=0x0;if(!_0x25dc9a)return this['length'];for(const _0xe9a1c6 of this){const _0x8be4ab=_0xe9a1c6['view']['targetRect'];if(_0x8be4ab){if(qt(_0x25dc9a,_0x8be4ab)<0x0)return _0x17995e;_0x17995e++;}}return _0x17995e;}}function Xt({source:_0x1ffa4c,target:_0x2cb80e,filter:_0x44c1c2}){for(const _0x3ac1e2 of _0x1ffa4c)_0x44c1c2(_0x3ac1e2)&&_0x2cb80e['add'](_0x3ac1e2);_0x2cb80e['listenTo'](_0x1ffa4c,'add',(_0x1d74e7,_0x5277cc)=>{_0x44c1c2(_0x5277cc)&&_0x2cb80e['add'](_0x5277cc);}),_0x2cb80e['listenTo'](_0x1ffa4c,'remove',(_0x160cd5,_0x56394b)=>{_0x2cb80e['has'](_0x56394b)&&_0x2cb80e['remove'](_0x56394b);});}function qt(_0x12e2ba,_0x1782cb){if(null===_0x12e2ba&&null===_0x1782cb)return 0x0;if(null===_0x12e2ba)return-0x1;if(null===_0x1782cb)return 0x1;const _0x494476=_0x12e2ba['top']-_0x1782cb['top'];return 0x0==_0x494476?_0x12e2ba['left']-_0x1782cb['left']:_0x494476;}class $t extends _0x4e5218{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x13c089){if(super(_0x13c089),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x13c089 instanceof _0x5707ed){const _0x377d61=_0x13c089['locale'];_0x13c089['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x377d61,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5d54f1){this['collection']['add'](_0x5d54f1);}['remove'](_0x2c91a2){this['collection']['remove'](_0x2c91a2),_0x2c91a2['destroy']();}['refreshVisibility'](){for(const _0x12c5cc of this['collection'])_0x12c5cc['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1e969d){return this['collection']['getByInnerView'](_0x1e969d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x57bc4f of this['collection'])_0x57bc4f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2cffb3){this['fire']('_activateAnnotation',_0x2cffb3);}['createAnnotation'](_0x1ff4dc){return new Yt(_0x1ff4dc);}['createAnnotationView'](_0x5c5c03,_0x402f48){return new Kt(_0x5c5c03,_0x402f48);}['_addActiveAnnotation'](_0x5df07a){const _0x5048ec=new Set(this['activeAnnotations']);_0x5048ec['add'](_0x5df07a),this['activeAnnotations']=_0x5048ec;}['_removeActiveAnnotation'](_0x3cbb32){const _0x2e0e0c=new Set(this['activeAnnotations']);_0x2e0e0c['delete'](_0x3cbb32),this['activeAnnotations']=_0x2e0e0c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2705b7=this['collection'],_0x2a9e12=this['_visibleAnnotations'];function _0x142a55(_0x427929){const _0x1a700d=_0x427929['source'];_0x1a700d['isVisible']&&!_0x2a9e12['has'](_0x1a700d)?_0x2a9e12['add'](_0x1a700d):!_0x1a700d['isVisible']&&_0x2a9e12['has'](_0x1a700d)&&_0x2a9e12['remove'](_0x1a700d),_0x1a700d['view']['focusTracker']['remove'](_0x1a700d['view']['element']),_0x1a700d['view']['focusTracker']['add'](_0x1a700d['view']['element']);}this['listenTo'](_0x2705b7,'add',(_0x16e4e3,_0x1ccb84)=>{_0x1ccb84['isVisible']&&_0x2a9e12['add'](_0x1ccb84),this['listenTo'](_0x1ccb84,'change:isVisible',_0x142a55);}),this['listenTo'](_0x2705b7,'remove',(_0x2bc15d,_0x1fed97)=>{_0x2a9e12['has'](_0x1fed97)&&_0x2a9e12['remove'](_0x1fed97),this['stopListening'](_0x1fed97,'change:isVisible',_0x142a55);});}['_setupEnterAnnotationKeystroke'](){const _0x3d99e2=_0x5361ed=>{_0x5361ed['on']('ready',()=>{_0x5361ed['keystrokes']['set'](_0x626299,(_0x231d5d,_0x41710f)=>{const _0x5b1fe5=_0x4e8b63(this['activeAnnotations']['values']());_0x5b1fe5&&(_0x5b1fe5['view']['focus'](),_0x41710f());});});};this['context']instanceof _0x5707ed?_0x3d99e2(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xd7993f,_0xee7e8)=>{_0x3d99e2(_0xee7e8);});}['_setupEscapeAnnotationHandling'](){const _0x41203a=_0x48d966=>{const _0x46dca8=_0x48d966['source'],_0x24b9cb=[];let _0x208767;if(Array['isArray'](_0x46dca8['target'])){_0x208767=_0x46dca8['target'][0x0],this['context']instanceof _0x5707ed?_0x24b9cb['push'](this['context']):this['context']['editors']&&_0x24b9cb['push'](...this['context']['editors']);for(const _0x253271 of _0x24b9cb)for(const _0x563702 of _0x253271['editing']['view']['domRoots']['values']())if(_0x563702['contains'](_0x208767))return void _0x253271['editing']['view']['focus']();_0x208767['focus']();}};this['listenTo'](this['collection'],'add',(_0x392bed,_0x3ef9f0)=>{this['listenTo'](_0x3ef9f0,'escape',_0x41203a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x582f48,_0x146fef)=>{this['stopListening'](_0x146fef,'escape',_0x41203a);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x4e5218{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0xbc9174,_0x10cb81];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11e34a){super(_0x11e34a),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xc0b40d=this['context']['config'];_0xc0b40d['define']('comments.maxCommentsWhenCollapsed',0x2),_0xc0b40d['define']('comments.maxThreadTotalWeight',0x1f4),_0xc0b40d['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xc0b40d['define']('comments.CommentThreadView',Bt),_0xc0b40d['define']('comments.CommentView',Ut),_0xc0b40d['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x50c3d0=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x49fa0a,_0x345407)=>this['_addCommentThread'](_0x345407)),this['on']('submitCommentThread',(_0x425dfb,_0xb04424)=>this['_submitCommentThread'](_0xb04424)),this['on']('resolveCommentThread',(_0x2c154b,_0x93d18f)=>this['_resolveCommentThread'](_0x93d18f)),this['on']('resolveCommentThread',(_0xaaa065,_0x23fdd7)=>this['_updateActiveAnnotation'](_0x23fdd7),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x4e20c9,_0x3f5a1e)=>this['_reopenCommentThread'](_0x3f5a1e)),this['on']('reopenCommentThread',(_0x2caacf,_0x50e64d)=>this['_updateActiveAnnotation'](_0x50e64d),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x48b389,_0x46a74d)=>this['_removeCommentThread'](_0x46a74d)),this['on']('updateCommentThread',(_0x42d5a1,_0x37db40)=>this['_updateCommentThread'](_0x37db40)),this['on']('updateCommentThread',(_0x128e6b,_0x3936c9)=>this['_updateActiveAnnotation'](_0x3936c9),{'priority':'lowest'}),this['on']('addComment',(_0x4f6f63,_0x36f000)=>this['_addComment'](_0x36f000)),this['on']('updateComment',(_0x3dd47c,_0xab84ae)=>this['_updateComment'](_0xab84ae)),this['on']('removeComment',(_0xbff37,_0x117fbf)=>this['_removeComment'](_0x117fbf)),this['on']('addComment',(_0x5f0e1a,{threadId:_0x2f9495,isFromAdapter:_0x5218cd})=>{if(_0x5218cd)return;const _0x3739ac=this['getCommentThread'](_0x2f9495),_0x1a7d6f=_0x3739ac&&this['_threadToController']['get'](_0x3739ac);_0x1a7d6f&&_0x1a7d6f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x50c3d0,'change:activeAnnotations',(_0xdaf8ec,_0x28dea5,_0x311f9b)=>{const _0x268952=Array['from'](_0x311f9b)['map'](_0x404ccb=>this['_viewToController']['get'](_0x404ccb['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x268952?_0x268952['model']:null;});}set['adapter'](_0x403ab4){if(this['_adapter'])throw new _0x1b1980('commentsrepository-adapter-already-set');this['_adapter']=_0x403ab4;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x343340=zt,threadId:_0x17e4f5=_0xd38b92(),comments:_0x4df5b6=[],unlinkedAt:_0x532248=null,resolvedAt:_0x7174e7=null,resolvedBy:_0x25cb98=null,target:_0x210775=null,context:_0x49435a=null,attributes:_0x4dcb1b={},isResolvable:_0x564d21=!0x0,isSubmitted:_0x59efb0=!0x1,isFromAdapter:_0x4bd92e=!0x1}={}){return this['fire'](ii('addCommentThread',_0x343340),{'channelId':_0x343340,'threadId':_0x17e4f5,'comments':_0x4df5b6,'unlinkedAt':_0x532248,'resolvedAt':_0x7174e7,'resolvedBy':_0x25cb98,'target':_0x210775,'context':_0x49435a,'attributes':_0x4dcb1b,'isFromAdapter':_0x4bd92e,'isResolvable':_0x564d21,'isSubmitted':_0x59efb0}),this['getCommentThread'](_0x17e4f5);}['openNewCommentThread']({channelId:_0x5def14=zt,threadId:_0x867bb4=_0xd38b92(),target:_0x1067d9,context:_0xf1f227=null,isResolvable:_0x491ab2=!0x0}){if(this['_readOnlyChannels']['has'](_0x5def14)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1067d9)throw new _0x1b1980('commentsrepository-missing-target');const _0xed1d7=this['addCommentThread']({'channelId':_0x5def14,'threadId':_0x867bb4,'target':_0x1067d9,'context':_0xf1f227,'isResolvable':_0x491ab2});if(!_0xed1d7)return null;const _0x56764a=this['_threadToController']['get'](_0xed1d7),_0x376a98=_0x56764a['view']['commentThreadInputView']['commentInputView'],_0x2e3f9a=this['context']['plugins']['get']($t),_0x3e1751=_0x2e3f9a['getByInnerView'](_0x56764a['view']);return _0x2e3f9a['activate'](_0x3e1751),_0x376a98['once']('editorReady',()=>_0x376a98['focus']()),_0xed1d7;}['hasCommentThread'](_0x4b7320){if('string'!=typeof _0x4b7320)throw new _0x1b1980('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4b7320);}['updateCommentThread']({channelId:_0x149bd1=zt,threadId:_0x3642fa,context:_0x4a7323,unlinkedAt:_0xbd0e1d,attributes:_0x513c46,isFromAdapter:_0x143d5a=!0x1}){return this['fire'](ii('updateCommentThread',_0x149bd1),{'channelId':_0x149bd1,'threadId':_0x3642fa,'context':_0x4a7323,'unlinkedAt':_0xbd0e1d,'attributes':_0x513c46,'isFromAdapter':_0x143d5a}),this['getCommentThread'](_0x3642fa);}['getCommentThread'](_0x2b41a5){if('string'!=typeof _0x2b41a5)throw new _0x1b1980('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2b41a5);}['fetchCommentThread']({channelId:_0x2b750c,threadId:_0x18417c}={}){const _0x440654=this['getCommentThread'](_0x18417c);if(_0x440654)return Promise['resolve'](_0x440654);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x1b1980('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2b750c,'threadId':_0x18417c})['then'](_0xc00b25=>this['hasCommentThread'](_0x18417c)?this['getCommentThread'](_0x18417c):_0xc00b25?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2b750c},_0xc00b25)):void 0x0)['catch'](_0x5504da=>{throw console['error'](_0x5504da),new _0x1b1980('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3f3aac,skipNotAttached:_0x3090b3=!0x1,skipEmpty:_0x664d13=!0x1,toJSON:_0x57a12f=!0x1}={}){const _0x3cd145=[];for(const _0x43d0cb of this['_threads']['values']())_0x3f3aac&&_0x43d0cb['channelId']!==_0x3f3aac||_0x3090b3&&!_0x43d0cb['isAttached']||_0x664d13&&0x0===_0x43d0cb['length']||_0x3cd145['push'](_0x43d0cb);return _0x57a12f?_0x3cd145['map'](_0x26af2b=>_0x26af2b['toJSON']()):_0x3cd145;}['getAnnotationForCommentThread'](_0x4a1ba6){const _0x2a2fb1=this['_threadToController']['get'](_0x4a1ba6);if(!_0x2a2fb1)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x2a2fb1['view'])||null;}['getCommentThreadForAnnotation'](_0x441338){const _0xd3052e=this['_viewToController']['get'](_0x441338['innerView']);return _0xd3052e?_0xd3052e['model']:null;}['setActiveCommentThread'](_0xfcc049){const _0x5c5ca6=this['context']['plugins']['get']($t);if(!_0xfcc049)return void(this['activeCommentThread']&&_0x5c5ca6['deactivateAll']());const _0x24d3ca=this['getCommentThread'](_0xfcc049);if(!_0x24d3ca)throw new _0x1b1980('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xfcc049});if(!this['_threadToController']['has'](_0x24d3ca))throw new _0x1b1980('commentsrepository-active-not-attached',null,{'threadId':_0xfcc049});const _0x36c435=_0x5c5ca6['getByInnerView'](this['_threadToController']['get'](_0x24d3ca)['view']);_0x5c5ca6['activate'](_0x36c435);}['switchReadOnly'](_0x102dae,_0x41e503){_0x102dae?this['_readOnlyChannels']['add'](_0x41e503):this['_readOnlyChannels']['delete'](_0x41e503),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2008fb){return this['_readOnlyChannels']['has'](_0x2008fb)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3ba169,_0x453c38){return new It(_0x3ba169,_0x453c38);}['setPermissions'](_0x4f2d87,_0x563c9d=zt){this['_permissions']['set'](_0x563c9d,_0x4f2d87),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2863d2=zt){return this['_permissions']['has'](_0x2863d2)?this['_permissions']['get'](_0x2863d2):Jt;}['_addCommentThread']({channelId:_0x4dcfde,threadId:_0x2367f9,comments:_0x15c3bc,unlinkedAt:_0x3a7635,resolvedAt:_0x90ba20,resolvedBy:_0x368405,target:_0x1ec5ba,context:_0x43ea0c,attributes:_0x4344e3,isFromAdapter:_0x5520a0,isResolvable:_0x2d2d6a,isSubmitted:_0x40d98f}){if('string'!=typeof _0x2367f9)throw new _0x1b1980('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2367f9});if(this['hasCommentThread'](_0x2367f9))throw new _0x1b1980('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2367f9});const _0x5fd225=new Zt(this,{'channelId':_0x4dcfde,'id':_0x2367f9,'context':_0x43ea0c,'attributes':_0x4344e3,'unlinkedAt':_0x3a7635,'resolvedAt':_0x90ba20,'resolvedBy':_0x368405?this['context']['plugins']['get'](_0x10cb81)['getUser'](_0x368405):null,'isResolvable':_0x2d2d6a,'isSubmitted':_0x40d98f||_0x5520a0});this['_threads']['set'](_0x2367f9,_0x5fd225);for(const _0x511a41 of _0x15c3bc)_0x5fd225['_add'](this['_createNewComment']({'threadId':_0x2367f9,..._0x511a41}));return _0x1ec5ba&&_0x5fd225['attachTo'](_0x1ec5ba),_0x5520a0||!_0x5fd225['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4dcfde,'threadId':_0x2367f9});}['_submitCommentThread']({channelId:_0x22223e,threadId:_0x1fbe8a}){if(!this['hasCommentThread'](_0x1fbe8a))throw new _0x1b1980('commentsrepository-missing-comment-thread',this);const _0x1cbf9b=this['getCommentThread'](_0x1fbe8a);if(_0x1cbf9b['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2ab27c,comments:_0x50d2b3,resolvedAt:_0x501513,resolvedBy:_0x4fd153,context:_0x89396,attributes:_0x2371a2}=_0x1cbf9b,_0x5c4eb3=this['context']['plugins']['get']('PendingActions'),_0x31cb83=_0x5c4eb3['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x22223e,'threadId':_0x2ab27c,'comments':_0x50d2b3['map'](_0x3202c6=>_0x3202c6['toJSON']()),'resolvedAt':_0x501513,'resolvedBy':_0x4fd153?_0x4fd153['id']:_0x4fd153,'context':_0x89396,'attributes':_0x2371a2})['then'](({comments:_0x56f420})=>{_0x5c4eb3['remove'](_0x31cb83);for(const _0x3f8bea of _0x56f420)this['_updateComment']({'channelId':_0x22223e,'threadId':_0x1fbe8a,'commentId':_0x3f8bea['commentId'],'createdAt':_0x3f8bea['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x24b2de=>{throw console['error'](_0x24b2de),new _0x1b1980('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5391bf,target:_0x401205}){const _0x3466f4=this['getCommentThread'](_0x5391bf);if(!_0x3466f4)throw new _0x1b1980('commentsrepository-attach-missing-comment-thread',this);const _0x2b1ab6=this['context']['plugins']['get']('PendingActions'),_0x2b820f=this['context']['plugins']['get']($t),_0x4b3b26=this['_createCommentThreadView'](_0x3466f4),_0xf43015=new It(_0x3466f4,_0x4b3b26);let _0x3bb88f=null;_0x4b3b26['on']('change:isDirty',(_0x2e8aae,_0x56842b,_0x37fe4c)=>{_0x37fe4c?_0x3bb88f=_0x2b1ab6['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3bb88f&&(_0x2b1ab6['remove'](_0x3bb88f),_0x3bb88f=null);}),this['_threadToController']['set'](_0x3466f4,_0xf43015),this['_viewToController']['set'](_0x4b3b26,_0xf43015);const _0x35b1e5=new Kt(this['context']['locale'],_0x4b3b26);_0x35b1e5['bind']('length')['to'](_0x4b3b26),_0x35b1e5['bind']('isDirty')['to'](_0x4b3b26,'isDirty',_0x4b3b26,'length',(_0x307cee,_0x2f6753)=>_0x307cee||!_0x2f6753),_0x35b1e5['bind']('isActive')['to'](_0x4b3b26),_0x35b1e5['type']='comment';const _0x1f6e25=new Yt({'view':_0x35b1e5,'target':_0x401205,'type':'comment','isVisible':!_0x3466f4['archivedAt']&&!!('function'==typeof _0x401205?_0x401205():_0x401205)});return _0x4b3b26['on']('escape',()=>{_0x1f6e25['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4b3b26,_0x1f6e25),_0x2b820f['add'](_0x1f6e25),_0x1f6e25;}['_bindAnnotationToEditors'](_0x43d107,_0x196a6d){this['listenTo'](_0x43d107,'editorReady',(_0x560d60,_0x5e9225)=>{const _0x4f0ef8=_0x5e9225['ui']['view']['body']['bodyCollectionContainer'];_0x196a6d['focusableElements']['add'](_0x4f0ef8),this['context']instanceof _0x5707ed&&this['context']['ui']['focusTracker']['add'](_0x4f0ef8);},{'priority':'highest'}),this['listenTo'](_0x43d107,'editorDestroyed',(_0x4e33c1,_0x3a5776)=>{const _0x40796c=_0x3a5776['ui']['view']['body']['bodyCollectionContainer'];_0x196a6d['focusableElements']['has'](_0x40796c)&&_0x196a6d['focusableElements']['remove'](_0x40796c),this['context']instanceof _0x5707ed&&this['context']['ui']['focusTracker']['remove'](_0x40796c);});}['_unbindEditors'](_0x10c799){this['stopListening'](_0x10c799,'editorReady'),this['stopListening'](_0x10c799,'editorDestroyed');}['_createCommentThreadView'](_0x5472c4){const _0x58f5ca=this['context']['plugins']['get'](_0x10cb81),{config:_0xa02f5,locale:_0x360041}=this['context'],_0x50652d=_0x4d6238(_0xa02f5['get']('locale'),_0x360041);return new(0x0,(_0xa02f5['get']('comments'))['CommentThreadView'])(_0x360041,_0x5472c4,_0x58f5ca['me'],{'editorConfig':{..._0xa02f5['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xa02f5['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xa02f5['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xa02f5['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xa02f5['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x50652d,'CommentView':_0xa02f5['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x16f871,channelId:_0x51d55d,resolvedAt:_0x414042,resolvedBy:_0x534713,isFromAdapter:_0xa0e818}){if(!this['hasCommentThread'](_0x16f871))throw new _0x1b1980('commentsrepository-missing-comment-thread',null,{'threadId':_0x16f871});const _0x5af6b8=this['getCommentThread'](_0x16f871);if(_0x5af6b8['isResolved'])throw new _0x1b1980('commentsrepository-resolved-comment-thread',null,{'threadId':_0x16f871});const _0x17e8e0=this['context']['plugins']['get'](_0x10cb81);if(_0x5af6b8['resolvedBy']=_0x17e8e0['getUser'](_0x534713),_0x5af6b8['resolvedAt']=_0x414042,_0xa0e818||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3ddbac=this['context']['plugins']['get']('PendingActions'),_0x3d715c=_0x3ddbac['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x51d55d,'threadId':_0x16f871})['then'](({resolvedAt:_0x2e0082,resolvedBy:_0x304516})=>{_0x3ddbac['remove'](_0x3d715c),_0x5af6b8['resolvedBy']['id']!==_0x304516&&(_0x5af6b8['resolvedBy']=_0x17e8e0['getUser'](_0x304516)),_0x5af6b8['resolvedAt']=_0x2e0082;})['catch'](_0x1af706=>{throw console['error'](_0x1af706),new _0x1b1980('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x417cae,channelId:_0x5a8553,isFromAdapter:_0x2b0db2}){if(!this['hasCommentThread'](_0x417cae))throw new _0x1b1980('commentsrepository-missing-comment-thread',null,{'threadId':_0x417cae});const _0x56d43b=this['getCommentThread'](_0x417cae);if(!_0x56d43b['isResolved'])throw new _0x1b1980('commentsrepository-reopen-comment-thread',null,{'threadId':_0x417cae});if(_0x56d43b['resolvedBy']=null,_0x56d43b['resolvedAt']=null,_0x2b0db2||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1d2ec3=this['context']['plugins']['get']('PendingActions'),_0x2858d9=_0x1d2ec3['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5a8553,'threadId':_0x417cae})['then'](()=>_0x1d2ec3['remove'](_0x2858d9))['catch'](_0x4eac4c=>{throw console['error'](_0x4eac4c),new _0x1b1980('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4cad56,isFromAdapter:_0x40cf40}){const _0xc94a46=this['getCommentThread'](_0x4cad56);if(!_0xc94a46)throw new _0x1b1980('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4cad56),this['_threads']['delete'](_0x4cad56),!_0xc94a46['isSubmitted']||_0x40cf40||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x18c627=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cf9f8}=_0xc94a46,_0xa52c39=_0x18c627['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4cf9f8,'threadId':_0x4cad56})['then'](()=>_0x18c627['remove'](_0xa52c39))['catch'](_0x4cfef4=>{throw console['error'](_0x4cfef4),new _0x1b1980('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x17af93,unlinkedAt:_0x3698f3,context:_0x4ae24c,attributes:_0x2206bd,isFromAdapter:_0x34dad5}){if('string'!=typeof _0x17af93)throw new _0x1b1980('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x17af93});if(!this['hasCommentThread'](_0x17af93))throw new _0x1b1980('commentsrepository-missing-comment-thread',null,{'threadId':_0x17af93});const _0x4f5247=this['getCommentThread'](_0x17af93);let _0x23a9e3=!0x1;if(void 0x0!==_0x4ae24c&&_0x4f5247['context']!==_0x4ae24c&&(_0x4f5247['context']=_0x4ae24c,_0x23a9e3=!0x0),void 0x0!==_0x3698f3&&_0x4f5247['unlinkedAt']!==_0x3698f3&&(_0x4f5247['unlinkedAt']=_0x3698f3,_0x23a9e3=!0x0),_0x2206bd&&!_0x4ec491(_0x2206bd,_0x4f5247['attributes'])&&(_0x4f5247['attributes']=_0x2206bd,_0x23a9e3=!0x0),!_0x23a9e3)return Promise['resolve']();if(!_0x4f5247['isSubmitted']||_0x34dad5||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2eab09=this['context']['plugins']['get']('PendingActions'),{channelId:_0x58da1e}=_0x4f5247,_0x5a5c25=_0x2eab09['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x58da1e,'threadId':_0x17af93,'context':_0x4ae24c,'unlinkedAt':_0x3698f3,'attributes':_0x2206bd})['then'](()=>_0x2eab09['remove'](_0x5a5c25))['catch'](_0x1f61e9=>{throw console['error'](_0x1f61e9),new _0x1b1980('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x36be8b){const _0x3251aa=this['context']['plugins']['get']($t),_0x120699=this['getCommentThread'](_0x36be8b);if(_0x120699['_isAttached']=!0x1,this['_threadToController']['has'](_0x120699)){const _0x224865=this['_threadToController']['get'](_0x120699),_0x2dd933=_0x224865['view'],_0x2da1e3=_0x3251aa['getByInnerView'](_0x2dd933);this['_threadToController']['delete'](_0x120699),this['_viewToController']['delete'](_0x2dd933),_0x2da1e3&&_0x3251aa['remove'](_0x2da1e3),_0x224865['destroy'](),_0x2dd933['destroy']()['then'](()=>{this['_unbindEditors'](_0x2dd933);});}}['_updateActiveAnnotation']({threadId:_0x2e677c,resolvedAt:_0x422da5,unlinkedAt:_0x172941}){const _0x68167c=!!_0x422da5,_0x4d69b7=this['context']['plugins']['get']($t),_0x419e4b=this['getCommentThread'](_0x2e677c);if(this['_threadToController']['has'](_0x419e4b)){const _0x225621=this['_threadToController']['get'](_0x419e4b)['view'],_0x5905d6=_0x4d69b7['getByInnerView'](_0x225621);_0x5905d6&&(_0x68167c&&_0x4d69b7['_removeActiveAnnotation'](_0x5905d6),_0x172941?_0x5905d6['isVisible']=!0x1:_0x5905d6['refreshVisibility']());}}['_getExternalAuthor'](_0x414df6){const _0x5dda38=this['context']['plugins']['get'](_0x10cb81),_0x2c13d5=_0x31eb8f('external:'+_0x414df6),_0x13a202=_0x5dda38['getUser'](_0x2c13d5);return _0x13a202||_0x5dda38['addUser']({'id':_0x2c13d5,'name':_0x414df6});}['_createNewComment']({threadId:_0x5de296,commentId:_0x158b59=_0xd38b92(),content:_0x51befc,authorId:_0x47d0f6,createdAt:_0x507ebc,attributes:_0x4675ee}){if('string'!=typeof _0x158b59)throw new _0x1b1980('commentsrepository-invalid-commentid');if('string'!=typeof _0x47d0f6)throw new _0x1b1980('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x51befc||!_0x51befc['trim']())throw new _0x1b1980('commentsrepository-invalid-comment-content');const _0x472bff=this['context']['plugins']['get'](_0x10cb81)['getUser'](_0x47d0f6);if(!_0x472bff)throw new _0x1b1980('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x47d0f6});let _0xce5c64=null,_0x2d71c6=_0x507ebc;return _0x4675ee?.['@external']&&(_0xce5c64=this['_getExternalAuthor'](_0x4675ee['@external']['authorName']),_0x2d71c6=new Date(_0x4675ee['@external']['createdAt'])),new ti(this,{'threadId':_0x5de296,'id':_0x158b59,'author':_0xce5c64||_0x472bff,'creator':_0x472bff,'content':_0x51befc,'createdAt':_0x507ebc,'authoredAt':_0x2d71c6,'attributes':_0x4675ee});}['_addComment'](_0x43fede){let {threadId:_0xc606b3,content:_0x247e8e,attributes:_0x431211,isFromAdapter:_0x372a50}=_0x43fede;const _0x59c747=this['getCommentThread'](_0x43fede['threadId']);if(!_0x59c747)throw new _0x1b1980('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5de2fc=this['_createNewComment'](_0x43fede),{id:_0x6f6440}=_0x5de2fc;if(_0x59c747['_add'](_0x5de2fc),_0x372a50||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x59c747['isSubmitted'])return Promise['resolve']();const _0x1c41d1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3a48ae}=_0x59c747,_0x59b6d7=_0x1c41d1['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x431211||(_0x431211={}),this['adapter']['addComment']({'channelId':_0x3a48ae,'threadId':_0xc606b3,'commentId':_0x6f6440,'content':_0x247e8e,'attributes':_0x431211})['then'](_0x5ba169=>{_0x1c41d1['remove'](_0x59b6d7),_0x5ba169&&this['_updateComment']({'channelId':_0x3a48ae,'threadId':_0xc606b3,'commentId':_0x6f6440,'createdAt':_0x5ba169['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4f2624=>{throw console['error'](_0x4f2624),new _0x1b1980('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xc09ee1,commentId:_0x3979aa,content:_0x13a682,createdAt:_0x229834,attributes:_0x54eac7,isFromAdapter:_0x2df6b5}){if(void 0x0!==_0x13a682&&('string'!=typeof _0x13a682||!_0x13a682['trim']()['length']))throw new _0x1b1980('commentsrepository-update-comment-invalid-content');const _0x2b3b81=this['getCommentThread'](_0xc09ee1),_0x72b1b7=_0x2b3b81['getComment'](_0x3979aa);if(!_0x72b1b7)throw new _0x1b1980('commentsrepository-update-missing-comment',this);let _0x25998e=!0x1;if(_0x13a682&&_0x13a682!==_0x72b1b7['content']&&(_0x72b1b7['isEditable']||_0x2df6b5)&&(_0x72b1b7['content']=_0x13a682,_0x25998e=!0x0),_0x229834&&_0x229834!==_0x72b1b7['createdAt']&&(_0x72b1b7['createdAt']=_0x229834,_0x72b1b7['attributes']&&_0x72b1b7['attributes']['@external']||(_0x72b1b7['authoredAt']=_0x229834),_0x25998e=!0x0),_0x54eac7&&!_0x4ec491(_0x54eac7,_0x72b1b7['attributes'])&&(_0x72b1b7['attributes']=_0x54eac7,_0x25998e=!0x0),!_0x25998e)return Promise['resolve']();if(_0x2b3b81['fire']('commentUpdated'),_0x2df6b5||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x41e3d8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x49636e}=this['getCommentThread'](_0x72b1b7['threadId']),_0x26391b=_0x41e3d8['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x49636e,'threadId':_0xc09ee1,'commentId':_0x3979aa,'content':_0x13a682,'attributes':_0x54eac7})['then'](()=>_0x41e3d8['remove'](_0x26391b))['catch'](_0x152802=>{throw console['error'](_0x152802),new _0x1b1980('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x321c62,commentId:_0x5626fd,isFromAdapter:_0x545459}){const _0x20bbda=this['getCommentThread'](_0x321c62),_0x3549af=_0x20bbda['getComment'](_0x5626fd);if(!_0x3549af)throw new _0x1b1980('commentsrepository-remove-missing-comment',this);if(_0x20bbda['_remove'](_0x3549af),_0x545459||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4e955a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x289510}=_0x20bbda,_0x158c61=_0x4e955a['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x289510,'threadId':_0x321c62,'commentId':_0x5626fd})['then'](()=>_0x4e955a['remove'](_0x158c61))['catch'](_0x495789=>{throw console['error'](_0x495789),new _0x1b1980('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x413137(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0xc88c60,_0x2edb58){super();const _0x517378=_0xc88c60['context']['plugins']['get'](_0x10cb81)['me'],_0x37bcd1=_0xc88c60['getCommentThread'](_0x2edb58['threadId']),_0x2bd990=0x0===_0x37bcd1['comments']['length'],_0x1c217b=_0x517378===_0x2edb58['author'];this['id']=_0x2edb58['id'],this['threadId']=_0x2edb58['threadId'],this['author']=_0x2edb58['author'],this['creator']=_0x2edb58['creator'],this['isExternal']=Boolean(_0x2edb58['attributes']&&_0x2edb58['attributes']['@external']),this['set']('content',_0x2edb58['content']),this['createdAt']=_0x2edb58['createdAt']||new Date(),this['set']('authoredAt',_0x2edb58['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x37bcd1,'resolvedAt'),this['set']('attributes',_0x2edb58['attributes']||{}),this['bind']('isEditable')['to'](_0xc88c60,'_permissions',()=>{const _0x505380=_0xc88c60['getPermissions'](_0x37bcd1['channelId'])['write'],_0x12eb9b=_0xc88c60['getPermissions'](_0x37bcd1['channelId'])['modifyAll'];return _0x1c217b&&_0x505380||!_0x1c217b&&_0x12eb9b;}),this['bind']('isRemovable')['to'](_0x37bcd1,'isRemovable',_0xc88c60,'_permissions',_0x551f84=>{const _0x46cff9=_0xc88c60['getPermissions'](_0x37bcd1['channelId'])['write'],_0x24b9b8=_0xc88c60['getPermissions'](_0x37bcd1['channelId'])['modifyAll'];return _0x1c217b&&_0x46cff9||_0x551f84&&_0x2bd990||!_0x1c217b&&_0x24b9b8&&!_0x2bd990;}),this['bind']('isReadOnly')['to'](_0x37bcd1,'isReadOnly'),this['_repository']=_0xc88c60;}get['weight'](){return Math['max'](function(_0x404711){const _0x54832c=document['createElement']('div');return _0x54832c['innerHTML']=_0x404711,_0x54832c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x4273bd){const {threadId:_0x4bc95d,id:_0x873c4c}=this;if(!this['_repository']['hasCommentThread'](_0x4bc95d))throw new _0x1b1980('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5d9c91}=this['_repository']['getCommentThread'](_0x4bc95d);this['_repository']['fire'](ii('updateComment',_0x5d9c91,_0x4bc95d),{'channelId':_0x5d9c91,'threadId':_0x4bc95d,'commentId':_0x873c4c,..._0x4273bd});}['setAttribute'](_0x5415ac,_0x235e8a){const _0x51d0ec=_0xae9a1e(this['attributes']);_0x3916ab(_0x51d0ec,_0x5415ac,_0x235e8a),this['update']({'attributes':_0x51d0ec});}['removeAttribute'](_0x5d0451){const _0x33bb7f=_0xae9a1e(this['attributes']);_0x165f1c(_0x33bb7f,_0x5d0451),this['update']({'attributes':_0x33bb7f});}['remove'](_0x344863={}){if(!_0x344863['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2f46ca,id:_0x3e7aa4}=this;if(!this['_repository']['hasCommentThread'](_0x2f46ca))throw new _0x1b1980('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x553302}=this['_repository']['getCommentThread'](_0x2f46ca);this['_repository']['fire'](ii('removeComment',_0x553302,_0x2f46ca),{'channelId':_0x553302,'threadId':_0x2f46ca,'commentId':_0x3e7aa4,..._0x344863});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x16513e,..._0x53321d){for(const _0x3dbe70 of _0x53321d)void 0x0!==_0x3dbe70&&(_0x16513e+=':'+String(_0x3dbe70));return _0x16513e;}class ei extends _0x4b2822{constructor(_0x13b628){super(_0x13b628),this['set']('hasContent',!0x1);}['refresh'](){const _0x1f14be=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4b1bc1 of _0x1f14be['getRanges']())if(this['_hasContent'](_0x4b1bc1))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x190849=_0xd38b92(),ranges:_0x35dc6e,comment:_0x13f635}={}){const _0xa06be8=this['editor']['model'],_0x5b7972=_0x35dc6e??Array['from'](_0xa06be8['document']['selection']['getRanges']()),_0x249a86=[];for(const _0x232dd2 of _0x5b7972)this['_hasContent'](_0x232dd2)&&_0x249a86['push'](this['_trimToContent'](_0x232dd2));if(!_0x249a86['length'])throw new _0x1b1980('addcommentthreadcommand-incorrect-ranges',null);_0x13f635&&this['_createCommentThread'](_0x190849,_0x13f635),this['_createMarkersFromRanges'](_0x190849,_0x249a86,!!_0x13f635);}['_createMarkersFromRanges'](_0x4eaab4,_0x596566,_0x53bce8){this['editor']['model']['change'](_0x53cd50=>{for(const _0x57003d of _0x596566){const _0x1e12c0=_0xd38b92()['substr'](0x1,0x5),_0x4ea2a0='comment:'+_0x4eaab4+':'+_0x1e12c0;_0x53cd50['addMarker'](_0x4ea2a0,{'range':_0x57003d,'usingOperation':_0x53bce8,'affectsData':_0x53bce8});}});}['_createCommentThread'](_0x92eb52,_0x53b870){const _0x415a28=this['editor']['plugins']['get']('CommentsRepository'),_0xa231b0=this['editor']['config']['get']('collaboration.channelId'),_0x237d5b=this['editor']['plugins']['get']('Users')['me'];if(!_0x237d5b)throw new _0x1b1980('addcommentthreadcommand-user-not-found',null);_0x415a28['addCommentThread']({'threadId':_0x92eb52,'channelId':_0xa231b0,'comments':[{'authorId':_0x237d5b['id'],'content':_0x53b870,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x176fc7){for(const _0x4bbd07 of _0x176fc7['getItems']())if(this['_itemIsContent'](_0x4bbd07))return!0x0;return!0x1;}['_itemIsContent'](_0x5ace5c){return _0x5ace5c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5ace5c)&&!_0x5ace5c['is']('element','tableCell');}['_trimToContent'](_0x412132){const _0x5df6b1=_0xb4d900=>!this['_itemIsContent'](_0xb4d900['item']),_0x398a46=_0x412132['start']['getLastMatchingPosition'](_0x5df6b1),_0x22444f=_0x412132['end']['getLastMatchingPosition'](_0x5df6b1,{'direction':'backward'});return this['editor']['model']['createRange'](_0x398a46,_0x22444f);}}class si extends _0x3549b7{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28f0a9){super(_0x28f0a9),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x38113=this['editor'],_0x50cea4=_0x38113['model']['document']['selection'],_0x4ca8f6=_0x14b05e(()=>this['refreshSelectedViews'](),0xa);_0x50cea4['on']('change:range',(_0x3999f3,_0x5b74b3)=>{_0x5b74b3['directChange']&&(_0x4ca8f6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x38113['editing']['view']['document'],'change:isFocused',(_0x10c4ca,_0x18701b,_0x15a8fb)=>{_0x15a8fb&&_0x4ca8f6();}),this['listenTo'](_0x38113['ui']['focusTracker'],'change:isFocused',(_0x130173,_0x30400d,_0x59ea25)=>{_0x59ea25||this['fire']('blur',{'isAnnotationTracked':_0x5ba3d2=>this['_editorAnnotationsData']['has'](_0x5ba3d2['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x486a27){if(this['_editorAnnotations']['has'](_0x486a27['view']))return;this['_editorAnnotations']['add'](_0x486a27['view']),this['editor']['ui']['focusTracker']['add'](_0x486a27['view']['element']);const _0x2fa865=this['editor']['plugins']['get']($t);this['listenTo'](_0x2fa865['collection'],'remove',(_0x23876b,_0x3f956d)=>{this['editor']['ui']['focusTracker']['remove'](_0x3f956d['view']['element']),this['_editorAnnotations']['delete'](_0x3f956d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x374838){if('function'!=typeof _0x374838)throw new _0x1b1980('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x374838);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x12b99d,annotations:_0x1909f4}){const _0x2bb546=[],_0xfe98bc=this['editor']['model']['document']['selection'],_0x55d298=Array['from'](_0xfe98bc['getRanges']());for(const [_0x454497,_0x3ce62a]of this['_editorAnnotationsData']){const _0x1cb475=_0x553de3(_0x3ce62a),_0x4f8333=_0x1909f4['getByInnerView'](_0x454497);_0x1cb475&&_0x4f8333&&_0x2bb546['push']({'annotation':_0x4f8333,'range':_0x1cb475});}function _0x553de3(_0x2182f4){for(const _0x347695 of _0x2182f4)for(const _0x42e86f of _0x55d298)if(_0x347695['containsRange'](_0x42e86f,!_0xfe98bc['isCollapsed']))return _0x347695;return null;}return _0x2bb546['sort']((_0x49b588,_0x4042f4)=>{const _0x22f322=_0x49b588['range'],_0x4175d7=_0x4042f4['range'];if(!_0x22f322['isEqual'](_0x4175d7)){if(_0x22f322['containsRange'](_0x4175d7,!0x0))return 0x1;if(_0x4175d7['containsRange'](_0x22f322,!0x0))return-0x1;}return _0x49b588['annotation']==_0x12b99d?-0x1:_0x4042f4['annotation']==_0x12b99d?0x1:0x0;})['map'](_0x42a68d=>_0x42a68d['annotation']);}get['_editorAnnotationsData'](){const _0x17ea8f=new Map();for(const _0x589036 of Array['from'](this['_dataCollectors']))for(const [_0x36ce22,_0x36f4aa]of _0x589036())_0x17ea8f['set'](_0x36ce22,_0x36f4aa);return _0x17ea8f;}}class ni extends _0x3549b7{['afterInit'](){const _0x578eac=this['editor'];if(!_0x578eac['plugins']['has']('RestrictedEditingModeEditing'))return;_0x578eac['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x3549b7{constructor(_0x3a0b2a){super(_0x3a0b2a),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xc25787=this['editor'],_0xcdd739=_0xc25787['commands']['get']('importWord'),_0x57673c=_0xc25787['plugins']['get'](_0x10cb81);_0xcdd739&&(_0xcdd739['on']('execute',(_0x51ccb5,[,_0x193392])=>{_0x193392['collaboration_features']={'comments':!0x0,'user_id':_0x57673c['me']['id']};},{'priority':_0x42489c['high']+0xa}),this['listenTo'](_0xcdd739,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3938c5,_0x26e9a0){const {comment_threads:_0x8155db}=_0x26e9a0;_0x8155db&&_0x8155db['forEach'](({thread_id:_0x49f29c,comments:_0x400137,is_resolved:_0x9e3d35})=>{const _0x56e591=new Date(),_0x3d52d8=_0x400137['map'](({author:_0x4bad5a,content:_0x3d95ed,created_at:_0x538823})=>({'content':_0x3d95ed,'authorId':this['editor']['plugins']['get'](_0x10cb81)['me']['id'],'createdAt':_0x56e591,'attributes':{'@external':{'authorName':_0x4bad5a,'createdAt':_0x538823?new Date(_0x538823):new Date(),'source':'importWord'}}})),_0x18b669=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x18b669,'threadId':_0x49f29c,'comments':_0x3d52d8,'resolvedAt':_0x9e3d35?_0x56e591:null});});}}class ri extends _0x3549b7{constructor(_0xbdba35){super(_0xbdba35),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x233456=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x233456,'contentInsertion',(_0x2c95b9,_0x35c724)=>this['_removeMarkersWithoutThreads'](_0x35c724['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xea7190){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xea7190;const _0x3fbd51=this['editor']['plugins']['get']('CommentsRepository');for(const _0x144f9e of _0xea7190['keys']()){const [_0x472cbb,_0x432933]=_0x144f9e['split'](':');'comment'!=_0x472cbb||_0x3fbd51['hasCommentThread'](_0x432933)||_0xea7190['delete'](_0x144f9e);}return _0xea7190;}['_registerMarkerInClipboardPipeline'](){const _0x2d727b=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x40027c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x40027c&&_0x2d727b['_registerMarkerToCopy']('comment',_0x40027c);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x28c2d0){switch(_0x28c2d0){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x4bf009){const _0x84fa01=_0x4bf009['split'](':');return{'group':_0x84fa01[0x0],'id':_0x84fa01[0x1],'part':_0x84fa01[0x2]};}class ai extends _0x3549b7{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x13c6de,_0x3f8f68)=>{if(!_0x3f8f68['options']['showCommentHighlights'])return null;if(_0x3f8f68['options']['ignoreResolvedComments']){const {id:_0x10a4c7}=hi(_0x13c6de['markerName']),_0x5d3c1e=this['editor']['plugins']['get'](Qt);if(_0x5d3c1e['getCommentThread'](_0x10a4c7)?.['isResolved']&&_0x13c6de['item'])return _0x3f8f68['consumable']['consume'](_0x13c6de['item'],'addMarker:'+_0x13c6de['markerName']),_0x3f8f68['consumable']['consume'](_0x13c6de['item'],'removeMarker:'+_0x13c6de['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x348bfc=>{_0x348bfc['on']('addMarker:comment',(_0x131db6,_0x107223,_0x4985df)=>{if(!_0x4985df['options']['showCommentHighlights'])return;const _0x4298fc=_0x107223['item'];if(!_0x4298fc)return;const _0x10bc74=_0x4985df['mapper']['toViewElement'](_0x4298fc);this['editor']['model']['schema']['isObject'](_0x4298fc)&&_0x10bc74&&!_0x10bc74['getCustomProperty']('widget')&&_0x10bc74['is']('containerElement')&&Ct(_0x10bc74,_0x4985df['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x26fa14,{writer:_0x4f8908,options:_0x72be6d})=>{if(!_0x72be6d['showCommentHighlights'])return null;const _0x1b8687=_0x4f8908['createContainerElement']('div'),_0x1b9133=_0x4f8908['createEmptyElement']('hr');return _0x4f8908['addClass']('ck-horizontal-line',_0x1b8687),_0x4f8908['insert'](_0x4f8908['createPositionAt'](_0x1b8687,0x0),_0x1b9133),_0x1b8687;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x6daa4b,{writer:_0xed0473,options:_0x55b31f})=>{if(!_0x55b31f['showCommentHighlights'])return null;const _0x3cabf6=_0xed0473['createContainerElement']('span'),_0x352366=_0xed0473['createEmptyElement']('img');return _0xed0473['addClass']('image-inline',_0x3cabf6),_0xed0473['insert'](_0xed0473['createPositionAt'](_0x3cabf6,0x0),_0x352366),_0x3cabf6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x7010d3,{writer:_0x2000d3,options:_0x11de9d})=>{if(_0x11de9d['showCommentHighlights'])return _0x2000d3['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1b1112,_0x339478,_0x1f2fea)=>{_0x1f2fea['options']['showCommentHighlights']&&_0x1b1112['stop']();},{'priority':'high'});}}class ci extends _0x3549b7{static get['requires'](){return[Qt,si,_0x10cb81,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1567e0){super(_0x1567e0),this['set']('isThreadsLoadingPaused',!0x0),_0x1567e0['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xe8155d,_0xd10858,_0x1ea20d,_0x12a4c8)=>{const _0x397742=_0x1567e0['plugins']['get'](Qt),_0xe02ce6=_0x1ea20d?hi(_0x1ea20d)['id']:null;_0x1567e0['model']['change'](()=>{if(_0xe02ce6){const _0x28dafc=this['getAllMarkersForId'](_0xe02ce6);for(const _0x441e36 of _0x28dafc)_0x1567e0['editing']['reconvertMarker'](_0x441e36);}if(_0x12a4c8){const {id:_0x246f4f}=hi(_0x12a4c8),_0x372f42=_0x397742['getCommentThread'](_0x246f4f);if(_0x372f42&&_0x372f42['unlinkedAt'])return;if(_0x372f42&&!_0x372f42['isAttached'])return;const _0x5dd24b=this['getAllMarkersForId'](_0x246f4f);for(const _0x1f4738 of _0x5dd24b)_0x1567e0['editing']['reconvertMarker'](_0x1f4738);}}),_0xe02ce6&&this['scrollToThreadMarker'](_0xe02ce6);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xafb97a=this['editor'],_0x252f0c=_0xafb97a['plugins']['get'](Qt),_0x269b5a=_0xafb97a['config']['get']('collaboration.channelId'),_0x30f24e=_0x252f0c['getCommentThreads']()['filter'](_0xc7fdd8=>_0xc7fdd8['channelId']!==_0x269b5a);_0xafb97a['commands']['add']('addCommentThread',new ei(_0xafb97a)),this['listenTo'](_0xafb97a,'change:isReadOnly',(_0x25b053,_0x3cef00,_0x3b2c67)=>{_0x252f0c['switchReadOnly'](_0x3b2c67,_0xafb97a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x252f0c,di('addCommentThread',_0x269b5a),(_0x3cca60,{threadId:_0x2d4fd9})=>{const _0x214b46=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x2d4fd9);_0x214b46?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2d4fd9);}),this['listenTo'](_0x252f0c,di('removeCommentThread',_0x269b5a),(_0x386219,{threadId:_0x5e7941})=>{_0xafb97a['model']['enqueueChange']({'isUndoable':!0x1},_0x2c4e0a=>{const _0xb35f38=this['getAllMarkersForId'](_0x5e7941);for(const _0x52924e of _0xb35f38)_0x2c4e0a['removeMarker'](_0x52924e);});}),this['listenTo'](_0x252f0c,di('resolveCommentThread',_0x269b5a),(_0x147fe5,{threadId:_0x511945})=>{(this['_reconvertMarkers'](_0x511945),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x511945)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x252f0c,di('reopenCommentThread',_0x269b5a),(_0x320024,{threadId:_0x1ba3f7})=>{this['_reconvertMarkers'](_0x1ba3f7);},{'priority':'low'}),this['listenTo'](_0x252f0c,di('addComment',_0x269b5a),(_0x11edd0,{threadId:_0x6a31e2,isFromAdapter:_0x2bde04})=>{const _0x13e55b=this['getAllMarkersForId'](_0x6a31e2);if(_0x2bde04||0x0==_0x13e55b['length']||!_0x252f0c['hasCommentThread'](_0x6a31e2))return;0x1===_0x252f0c['getCommentThread'](_0x6a31e2)['length']&&_0xafb97a['model']['enqueueChange']({'isUndoable':!0x1},_0x5624cf=>{for(const _0x457a8e of _0x13e55b)_0x5624cf['updateMarker'](_0x457a8e,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x30f24e);}['afterInit'](){!async function(_0x5ca77a){const _0x1f0f99=_0x3a532b([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x4e89b6=0x73460ab3,_0x2ea39f=0x73418e7b^_0x4e89b6,_0x38a315=window[_0x3a532b([0x44,0x61,0x74,0x65])][_0x3a532b([0x6e,0x6f,0x77])](),_0x5014c0=_0x5ca77a[_0x3a532b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1ea55d=new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3feac2=>{_0x5014c0[_0x3a532b([0x6f,0x6e,0x63,0x65])](_0x3a532b([0x72,0x65,0x61,0x64,0x79]),_0x3feac2);}),_0x510758={[_0x3a532b([0x6b,0x74,0x79])]:_0x3a532b([0x45,0x43]),[_0x3a532b([0x75,0x73,0x65])]:_0x3a532b([0x73,0x69,0x67]),[_0x3a532b([0x63,0x72,0x76])]:_0x3a532b([0x50,0x2d,0x32,0x35,0x36]),[_0x3a532b([0x78])]:_0x3a532b([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]),[_0x3a532b([0x79])]:_0x3a532b([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]),[_0x3a532b([0x61,0x6c,0x67])]:_0x3a532b([0x45,0x53,0x32,0x35,0x36])},_0x9d18a4=_0x5014c0[_0x3a532b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3a532b([0x67,0x65,0x74])](_0x3a532b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x55251c(){let _0x4c8505,_0x2e738d=null,_0x227fcb=null;try{if(_0x9d18a4==_0x3a532b([0x47,0x50,0x4c]))return _0x3a532b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4c8505=_0x364d8f(),!_0x4c8505)return _0x3a532b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4c8505[_0x3a532b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x227fcb=_0x3b0d6e(_0x4c8505[_0x3a532b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4c8505[_0x3a532b([0x6a,0x74,0x69])])),await _0x36a04d()?_0x14a853()?_0x3c1499()?_0x3a532b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3b5460()?(_0x4c8505[_0x3a532b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3a532b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2e738d=_0x11ae28(_0x3a532b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x148194()):_0x3a532b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3a532b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3a532b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3a532b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3c1499(){const _0x3b9b15=[_0x3a532b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3a532b([0x74,0x72,0x69,0x61,0x6c])][_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c8505[_0x3a532b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x38a315/0x3e8:0xe10*_0x2ea39f;return _0x4c8505[_0x3a532b([0x65,0x78,0x70])]<_0x3b9b15;}function _0x14a853(){const _0x16bb0b=_0x4c8505[_0x3a532b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x16bb0b)return!0x1;if(_0x16bb0b[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x2a])))return!0x0;if(_0x16bb0b[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x43,0x4d,0x54])))return!0x0;if(_0x16bb0b[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x1238ea())return!0x0;if(_0x16bb0b[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x52,0x43,0x4d,0x54]))){if(_0x164752())return!0x0;if(_0x461014()||_0x2d82c1())return!0x0;}return!0x1;}function _0x3b5460(){const _0x408482=_0x4c8505[_0x3a532b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x408482||0x0==_0x408482[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1f947a}=new URL(window[_0x3a532b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x408482[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f947a))return!0x0;const _0x5508c9=_0x1f947a[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])](_0x3a532b([0x2e]));return _0x408482[_0x3a532b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4aee8a=>_0x4aee8a[_0x3a532b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a532b([0x2a])))[_0x3a532b([0x6d,0x61,0x70])](_0x496e46=>_0x496e46[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])](_0x3a532b([0x2e])))[_0x3a532b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x39f8e5=>_0x39f8e5[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5508c9[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3a532b([0x6d,0x61,0x70])](_0x5540e6=>Array(_0x5508c9[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5540e6[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3a532b([0x66,0x69,0x6c,0x6c])](_0x5540e6[0x0]===_0x3a532b([0x2a])?_0x3a532b([0x2a]):'')[_0x3a532b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5540e6))[_0x3a532b([0x73,0x6f,0x6d,0x65])](_0xd54ed5=>_0x5508c9[_0x3a532b([0x65,0x76,0x65,0x72,0x79])]((_0x319840,_0x251e22)=>_0xd54ed5[_0x251e22]===_0x319840||_0xd54ed5[_0x251e22]===_0x3a532b([0x2a])));}function _0x148194(){return _0x2e738d&&_0x227fcb?new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4d739e,_0x487beb)=>{_0x2e738d[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x4d739e,_0x487beb),_0x227fcb[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x3a78f1=>{_0x3a78f1!=_0x3a532b([0x56,0x61,0x6c,0x69,0x64])&&_0x4d739e(_0x3a78f1);},_0x487beb);}):_0x2e738d||_0x227fcb||_0x3a532b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3b0d6e(_0x367ad9,_0x321371){return new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52c1df=>{if(_0x5b3475())return _0x52c1df(_0x3a532b([0x56,0x61,0x6c,0x69,0x64]));_0x2b3226(),_0x5014c0[_0x3a532b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3a532b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x407e14=!0x1;const _0x5ca43d=_0xd38b92();function _0x38a648(_0x3c3a5e){return!!_0x3c3a5e&&(typeof _0x3c3a5e===_0x3a532b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3c3a5e===_0x3a532b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3c3a5e[_0x3a532b([0x74,0x68,0x65,0x6e])]===_0x3a532b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3c3a5e[_0x3a532b([0x63,0x61,0x74,0x63,0x68])]===_0x3a532b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xcab991(_0x4f81cc){_0x41d44d(_0x4f81cc)[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x41886e=>{if(!_0x41886e||_0x41886e[_0x3a532b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3a532b([0x6f,0x6b]))return _0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x36db7e(_0x35070e(_0x5ca43d+_0x321371))!=_0x41886e[_0x3a532b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3a532b([0x56,0x61,0x6c,0x69,0x64]);})[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x523576=>(_0x2f8c69(),_0x523576),()=>{const _0x58c69f=_0x1518e3();return null==_0x58c69f?(_0x2f8c69(),_0x3a532b([0x56,0x61,0x6c,0x69,0x64])):_0x3a532b(_0x38a315-_0x58c69f>(0x574a8eb3^_0x4e89b6)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x52c1df)[_0x3a532b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x52c1df(_0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2e757e=0x7370e433^_0x4e89b6;function _0x2f8c69(){const _0x594135=_0x3a532b([0x6c,0x6c,0x63,0x74,0x2d])+_0x36db7e(_0x35070e(_0x367ad9)),_0x22f3fd=_0x1c8fc2(_0x36db7e(window[_0x3a532b([0x4d,0x61,0x74,0x68])][_0x3a532b([0x63,0x65,0x69,0x6c])](_0x38a315/_0x2e757e)));window[_0x3a532b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3a532b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x594135,_0x22f3fd);}function _0x1518e3(){const _0xabb6d5=_0x3a532b([0x6c,0x6c,0x63,0x74,0x2d])+_0x36db7e(_0x35070e(_0x367ad9)),_0x4de94a=window[_0x3a532b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3a532b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xabb6d5);return _0x4de94a?window[_0x3a532b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c8fc2(_0x4de94a),0x10)*_0x2e757e:null;}function _0x41d44d(_0x4411c9){return new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2b08a7,_0x34e29b)=>{_0x4411c9[_0x3a532b([0x74,0x68,0x65,0x6e])](_0x2b08a7,_0x34e29b),window[_0x3a532b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x34e29b,0x7347de73^_0x4e89b6);});}}_0x5014c0[_0x3a532b([0x6f,0x6e])](_0x3a532b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x7834e8,_0x57c3a4)=>{if(_0x57c3a4[0x0]!=_0x367ad9)return _0x52c1df(_0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x57c3a4[0x1]={..._0x57c3a4[0x1],[_0x3a532b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5ca43d};},{[_0x3a532b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3a532b([0x68,0x69,0x67,0x68])}),_0x5014c0[_0x3a532b([0x6f,0x6e])](_0x3a532b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3ede7c=>{_0x38a648(_0x3ede7c[_0x3a532b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x407e14=!0x0,_0xcab991(_0x3ede7c[_0x3a532b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3a532b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3a532b([0x6c,0x6f,0x77])}),_0x1ea55d[_0x3a532b([0x74,0x68,0x65,0x6e])](()=>{_0x407e14||_0x52c1df(_0x3a532b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5b3475(){return _0x5014c0[_0x3a532b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3a532b([0x76,0x69,0x65,0x77])][_0x3a532b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3a532b([0x61,0x75,0x74,0x6f]);}function _0x2b3226(){_0x5014c0[_0x3a532b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3a532b([0x76,0x69,0x65,0x77])][_0x3a532b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3a532b([0x61,0x75,0x74,0x6f]);}}function _0x11ae28(_0x112eda){const _0x4635f8=[new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xfb1a5e=>setTimeout(_0xfb1a5e,0x734f347f^_0x4e89b6)),_0x1ea55d[_0x3a532b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3e7fc3=>{let _0x220940=0x0;_0x5014c0[_0x3a532b([0x6d,0x6f,0x64,0x65,0x6c])][_0x3a532b([0x6f,0x6e])](_0x3a532b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xbf9d2b,_0x57ecd9)=>{_0x57ecd9[0x0][_0x3a532b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x220940++,_0x220940==(0x73460f5b^_0x4e89b6)&&(_0x3e7fc3(),_0xbf9d2b[_0x3a532b([0x6f,0x66,0x66])]());});}))];return window[_0x3a532b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3a532b([0x72,0x61,0x63,0x65])](_0x4635f8)[_0x3a532b([0x74,0x68,0x65,0x6e])](()=>_0x112eda);}async function _0x4e5e64(){await _0x1ea55d,_0x5014c0[_0x3a532b([0x6d,0x6f,0x64,0x65,0x6c])][_0x3a532b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xeb97f4,_0x5014c0[_0x3a532b([0x6d,0x6f,0x64,0x65,0x6c])][_0x3a532b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xeb97f4,_0x5014c0[_0x3a532b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3a532b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1238ea(){return window[_0x3a532b([0x67,0x6c,0x6f,0x62])]&&window[_0x3a532b([0x67,0x6c,0x6f,0x62])][_0x3a532b([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x164752(){return _0x17f71b(_0x3a532b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x57fecd(_0x3a532b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3a532b([0x73,0x74,0x61,0x74,0x65])]==_0x3a532b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x461014(){return _0x17f71b(_0x3a532b([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 _0x2d82c1(){return _0x17f71b(_0x3a532b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x462428(_0x187446){const _0x25774c=_0x464220();_0x5014c0[_0x25774c]=_0x3a532b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x187446,_0x187446!=_0x3a532b([0x56,0x61,0x6c,0x69,0x64])&&_0x4e5e64();}function _0x464220(){const _0x297f5c=window[_0x3a532b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3a532b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3a532b([0x6e,0x6f,0x77])]())[_0x3a532b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3a532b([0x2e]),'');let _0x3aee49=_0x3a532b([0x4b]);for(let _0x21bd2f=0x0;_0x21bd2f<_0x297f5c[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x21bd2f+=0x2){let _0x92511c=window[_0x3a532b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x297f5c[_0x3a532b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x21bd2f,_0x21bd2f+0x2));_0x92511c>=_0x1f0f99[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x92511c-=_0x1f0f99[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3aee49+=_0x1f0f99[_0x92511c];}return _0x3aee49;}function _0x364d8f(){const _0x10b082=_0x9d18a4[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])](_0x3a532b([0x2e]));if(0x3!=_0x10b082[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3d35ba(_0x10b082[0x1]);function _0x3d35ba(_0x307ee5){const _0x238fc7=_0x46c02c(_0x307ee5);return _0x238fc7&&_0x1fb842()?_0x238fc7:null;function _0x1fb842(){const _0x59986f=_0x238fc7[_0x3a532b([0x6a,0x74,0x69])],_0x227498=window[_0x3a532b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x59986f[_0x3a532b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x59986f[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x47d5ba={..._0x238fc7,[_0x3a532b([0x6a,0x74,0x69])]:_0x59986f[_0x3a532b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x59986f[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x47d5ba[_0x3a532b([0x76,0x63])],_0x35070e(_0x47d5ba)==_0x227498;}}}async function _0x36a04d(){let _0x369a14=!0x0;try{const _0x3ed68e=_0x9d18a4[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])](_0x3a532b([0x2e])),[_0x1c6fa0,_0xf2c509,_0x6b603e]=_0x3ed68e;return _0x46217a(_0x1c6fa0),await _0x131043(_0x1c6fa0,_0xf2c509,_0x6b603e),_0x369a14;}catch{return!0x1;}function _0x46217a(_0x369b63){const _0x254313=_0x46c02c(_0x369b63);_0x254313&&_0x254313[_0x3a532b([0x61,0x6c,0x67])]==_0x3a532b([0x45,0x53,0x32,0x35,0x36])||(_0x369a14=!0x1);}async function _0x131043(_0x24d51a,_0x2dca1b,_0x4c3e53){const _0x265825=window[_0x3a532b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3a532b([0x66,0x72,0x6f,0x6d])](_0x4a5882(_0x4c3e53),_0x901137=>_0x901137[_0x3a532b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x36c43d=new window[(_0x3a532b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3a532b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x24d51a+_0x3a532b([0x2e])+_0x2dca1b),_0x390536=window[_0x3a532b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3a532b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x390536)return;const _0x342ac1=await _0x390536[_0x3a532b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3a532b([0x6a,0x77,0x6b]),_0x510758,{[_0x3a532b([0x6e,0x61,0x6d,0x65])]:_0x3a532b([0x45,0x43,0x44,0x53,0x41]),[_0x3a532b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3a532b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3a532b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x390536[_0x3a532b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3a532b([0x6e,0x61,0x6d,0x65])]:_0x3a532b([0x45,0x43,0x44,0x53,0x41]),[_0x3a532b([0x68,0x61,0x73,0x68])]:{[_0x3a532b([0x6e,0x61,0x6d,0x65])]:_0x3a532b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x342ac1,_0x265825,_0x36c43d)||(_0x369a14=!0x1);}}function _0x46c02c(_0x35b39d){return _0x35b39d[_0x3a532b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3a532b([0x65,0x79]))?JSON[_0x3a532b([0x70,0x61,0x72,0x73,0x65])](_0x4a5882(_0x35b39d)):null;}function _0x4a5882(_0x4aade4){return window[_0x3a532b([0x61,0x74,0x6f,0x62])](_0x4aade4[_0x3a532b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3a532b([0x2b]))[_0x3a532b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3a532b([0x2f])));}function _0x35070e(_0x1d149f){let _0x528a98=0x1505;function _0x416dfa(_0x2ea2b7){for(let _0x5429c9=0x0;_0x5429c9<_0x2ea2b7[_0x3a532b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5429c9++){const _0x2ff5ef=_0x2ea2b7[_0x3a532b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5429c9);_0x528a98=(_0x528a98<<0x5)+_0x528a98+_0x2ff5ef,_0x528a98&=_0x528a98;}}function _0x43f39a(_0x34e16f){Array[_0x3a532b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x34e16f)?_0x34e16f[_0x3a532b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x43f39a):_0x34e16f&&typeof _0x34e16f==_0x3a532b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3a532b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x34e16f)[_0x3a532b([0x73,0x6f,0x72,0x74])]()[_0x3a532b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x445a69,_0x38e39a])=>{_0x416dfa(_0x445a69),_0x43f39a(_0x38e39a);}):_0x416dfa(window[_0x3a532b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x34e16f));}return _0x43f39a(_0x1d149f),_0x528a98>>>0x0;}function _0x36db7e(_0x1d4f02){return _0x1d4f02[_0x3a532b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3a532b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3a532b([0x30]));}function _0x1c8fc2(_0x18b300){return _0x18b300[_0x3a532b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3a532b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3a532b([0x6a,0x6f,0x69,0x6e])]('');}function _0x17f71b(_0x5f2452){return _0x5014c0[_0x3a532b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3a532b([0x68,0x61,0x73])](_0x5f2452);}function _0x57fecd(_0x21afa6){return _0x5014c0[_0x3a532b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3a532b([0x67,0x65,0x74])](_0x21afa6);}function _0xeb97f4(){}function _0x3a532b(_0x8ec2bb){return _0x8ec2bb['map'](_0x2f79d6=>String['fromCharCode'](_0x2f79d6))['join']('');}_0x462428(await _0x55251c());}(this);}['destroy'](){const _0x28ffa6=this['editor']['plugins']['get'](Qt),_0x427c0c=this['editor']['config']['get']('collaboration.channelId');for(const _0x3f6eae of _0x28ffa6['getCommentThreads']({'channelId':_0x427c0c}))_0x28ffa6['_detachCommentThread'](_0x3f6eae['id']),_0x28ffa6['_threads']['delete'](_0x3f6eae['id']);super['destroy']();}['hasMarkerForId'](_0xeafaa3){return this['getAllMarkersForId'](_0xeafaa3)['length']>0x0;}['getAllMarkersForId'](_0x509789){const _0x2debbb=[];for(const _0x3aea37 of this['editor']['model']['markers'])_0x3aea37['name']['startsWith']('comment:'+_0x509789)&&_0x2debbb['push'](_0x3aea37);return _0x2debbb;}['scrollToThreadMarker'](_0x45f39f){setTimeout(()=>{const _0x25efe2=this['_getTargetForId'](_0x45f39f);if(!_0x25efe2)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x45f39f&&_0x262072({'target':_0x25efe2[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2b29c2){this['editor']['model']['change'](()=>{for(const _0x29e3b5 of this['getAllMarkersForId'](_0x2b29c2))this['editor']['editing']['reconvertMarker'](_0x29e3b5);});}['_attachArchivedThread'](_0x3b9651){const _0xd1f0d3=this['editor']['plugins']['get'](Qt),_0x367a7d=this['editor']['plugins']['get'](si),_0x41b41c=_0xd1f0d3['getCommentThread'](_0x3b9651);if(!_0x41b41c['isAttached']){const _0x34c237=_0x41b41c['attachTo'](()=>this['_getTargetForId'](_0x41b41c['id']));_0x367a7d['registerAnnotation'](_0x34c237),_0x41b41c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x88279b=this['editor'],_0x59a9f9=_0x88279b['plugins']['get'](_0x10cb81);_0x88279b['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x16c851,_0x19e562)=>{const {id:_0xe7595c}=hi(_0x16c851['markerName']),_0x3f1c8e=_0x88279b['plugins']['get'](Qt)['getCommentThread'](_0xe7595c),_0x315b62=this['activeMarker']&&hi(this['activeMarker'])['id']===_0xe7595c;let _0x2541d3;if(_0x3f1c8e&&_0x3f1c8e['isResolved']&&!_0x315b62&&_0x16c851['item'])return _0x19e562['consumable']['consume'](_0x16c851['item'],'addMarker:'+_0x16c851['markerName']),_0x19e562['consumable']['consume'](_0x16c851['item'],'removeMarker:'+_0x16c851['markerName']),null;const _0xdbd1d8=['ck-comment-marker'];return _0x315b62&&_0xdbd1d8['push']('ck-comment-marker--active'),_0x2541d3=_0x3f1c8e?.['length']?_0x3f1c8e['comments']['first']['author']['id']:_0x59a9f9['me']['id'],{'classes':_0xdbd1d8,'attributes':{'data-comment':_0xe7595c,'data-author-id':_0x2541d3}};}}),_0x88279b['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x15555d,{options:_0x23a484})=>{if(_0x23a484['showCommentHighlights'])return null;const _0x358a0b=_0x88279b['plugins']['get'](Qt),_0x2102ed=_0x88279b['model']['markers']['get'](_0x15555d),{id:_0x43697c,part:_0x341595}=hi(_0x15555d);return _0x2102ed&&!_0x2102ed['affectsData']||_0x23a484['ignoreResolvedComments']&&_0x358a0b['getCommentThread'](_0x43697c)?.['isResolved']?null:{'group':'comment','name':_0x341595?_0x43697c+':'+_0x341595:_0x43697c};}}),_0x88279b['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4f7c85,{writer:_0x5d38ac})=>_0x5d38ac['createElement']('$marker',{'data-name':'comment:'+_0x4f7c85['getAttribute']('id')})}),_0x88279b['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x512271=this['editor'],_0x1ab43e=_0x512271['plugins']['get'](Qt),_0x34a3dc=new Set(),_0x27402b=new Set();_0x512271['model']['document']['registerPostFixer'](_0x4d2423=>{let _0x35acfb=!0x1;for(const {name:_0x253965,data:_0xf271ae}of _0x512271['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4ccd78,id:_0x38c8b2}=hi(_0x253965);let _0x5107a4=_0xf271ae['newRange'];if('comment'!==_0x4ccd78||!_0x5107a4)continue;const _0x1b79aa='$graveyard'===_0x5107a4['root']['rootName'];_0x1b79aa||(_0x5107a4=li(_0x5107a4,_0x512271['model']),!_0x5107a4||_0x5107a4['isCollapsed']||!_0xf271ae['newRange']||_0x5107a4['isEqual'](_0xf271ae['newRange']))?_0x512271['model']['hasContent'](_0x5107a4)&&!_0x1b79aa?this['isThreadsLoadingPaused']?_0x34a3dc['add'](_0x253965):this['_handleThreadMarker'](_0x253965,_0x38c8b2):(_0x27402b['add'](_0x253965),_0x34a3dc['delete'](_0x253965),_0x4d2423['removeMarker'](_0x253965),_0x35acfb=!0x0):(_0x4d2423['updateMarker'](_0x253965,{'range':_0x5107a4}),_0x35acfb=!0x0);}return _0x35acfb;}),this['on']('change:isThreadsLoadingPaused',(_0x2f4609,_0x21f4e1,_0x177738)=>{if(!_0x177738&&_0x34a3dc['size'])for(const _0xb39ac7 of _0x34a3dc){const {id:_0x26c226}=hi(_0xb39ac7);_0x34a3dc['delete'](_0xb39ac7),_0x512271['model']['markers']['get'](_0xb39ac7)&&this['_handleThreadMarker'](_0xb39ac7,_0x26c226);}}),this['listenTo'](_0x512271['model']['document'],'change',()=>{for(const {name:_0xd1b6d3,data:{newRange:_0x51575e}}of _0x512271['model']['document']['differ']['getChangedMarkers']()){const {group:_0x138ec7,id:_0x4cabf0}=hi(_0xd1b6d3);if('comment'!==_0x138ec7)continue;const _0x2e69d2=_0x1ab43e['getCommentThread'](_0x4cabf0),_0x230401=this['hasMarkerForId'](_0x4cabf0);_0x2e69d2&&(!_0x2e69d2['_hasTargetInContent']&&_0x51575e&&_0x512271['editing']['view']['once']('render',()=>{const _0x303a47=_0x512271['plugins']['get']($t),_0x1cfb35=_0x1ab43e['_threadToController']['get'](_0x2e69d2)['view'];_0x303a47['getByInnerView'](_0x1cfb35)['refreshVisibility']();},{'priority':'low'}),_0x2e69d2['_hasTargetInContent']=_0x230401||!!_0x51575e),_0x51575e||(_0x27402b['add'](_0xd1b6d3),_0x34a3dc['delete'](_0xd1b6d3));}for(const _0x586e6b of _0x27402b){const {id:_0x7bb1b7}=hi(_0x586e6b),_0x211642=_0x1ab43e['getCommentThread'](_0x7bb1b7);if(_0x34a3dc['delete'](_0x586e6b),!_0x211642)continue;const _0x3f5ba5=this['hasMarkerForId'](_0x7bb1b7);_0x3f5ba5||_0x211642['isSubmitted']?_0x3f5ba5||_0x211642['unlinkedAt']||_0x211642['setUnlinkedAt'](new Date()):_0x211642['remove']();}_0x27402b['clear']();});}['_handleInitialThreads'](_0x3297d9){_0x3297d9['forEach'](_0x91897a=>{_0x91897a['unlinkedAt']&&this['_attachArchivedThread'](_0x91897a['id']);});}['_getTargetForId'](_0x4f86af){const _0x59fd16=this['editor'],_0x5e6459=this['getAllMarkersForId'](_0x4f86af);return _0x217526(_0x59fd16['editing'],_0x5e6459);}['_getTextContext'](_0x37d018){const _0x144040=this['getAllMarkersForId'](_0x37d018);let _0x772f18='',_0x2b3323=!0x1;for(const _0x31ae0f of _0x144040){const _0xc0166a=_0x31ae0f['getRange']();for(const _0x57a2ca of Array['from'](_0xc0166a['getItems']()))_0x57a2ca['is']('$textProxy')?(_0x772f18&&_0x2b3323&&(_0x772f18+='\x20',_0x2b3323=!0x1),_0x772f18+=_0x57a2ca['data']):_0x2b3323=!0x0;_0x2b3323=!0x0;}return _0x772f18['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1c05ec,_0x403859){const _0x4470e3=this['editor'],_0x35fa44=_0x4470e3['plugins']['get'](Qt);let _0x203eb0=_0x35fa44['getCommentThread'](_0x403859);const _0x41575a=_0x4470e3['config']['get']('collaboration.channelId'),_0x24795a=_0x4470e3['plugins']['get'](si);if(_0x203eb0&&(_0x203eb0['unlinkedAt']&&_0x203eb0['setUnlinkedAt'](null),_0x203eb0['isAttached']))return _0x203eb0;return!this['getAllMarkersForId'](_0x403859)[0x0]['managedUsingOperations']?_0x4470e3['editing']['view']['once']('render',()=>{if(_0x35fa44['getCommentThread'](_0x403859))return;const _0x473a36=_0x4470e3['plugins']['get']($t);_0x203eb0=_0x35fa44['openNewCommentThread']({'channelId':_0x41575a,'threadId':_0x403859,'target':()=>this['_getTargetForId'](_0x403859),'context':{'type':'text','value':this['_getTextContext'](_0x403859)}});const _0x350908=_0x35fa44['_threadToController']['get'](_0x203eb0)['view'],_0x48e580=_0x473a36['getByInnerView'](_0x350908);_0x48e580&&_0x24795a['registerAnnotation'](_0x48e580);},{'priority':'low'}):_0x35fa44['fetchCommentThread']({'channelId':_0x41575a,'threadId':_0x403859})['then'](_0x54ebbb=>{if('destroyed'!==_0x4470e3['state']){if(_0x203eb0=_0x54ebbb,_0x203eb0&&!_0x203eb0['isAttached']){const _0x5305d0=_0x203eb0['attachTo'](()=>this['_getTargetForId'](_0x403859));_0x24795a['registerAnnotation'](_0x5305d0),_0x203eb0['isResolved']&&this['_reconvertMarkers'](_0x403859);}else{if(!_0x203eb0){const _0x55c74a=this['getAllMarkersForId'](_0x403859);_0x4470e3['model']['change'](_0x414d3=>{for(const _0xe8691f of _0x55c74a)_0x414d3['removeMarker'](_0xe8691f);});}}}}),_0x203eb0;}['_handleThreadMarker'](_0x25c007,_0xc6fb47){const _0x43b5a3=this['_attachMarkerToThread'](_0x25c007,_0xc6fb47);_0x43b5a3&&!_0x43b5a3['context']&&_0x43b5a3['setContext']({'type':'text','value':this['_getTextContext'](_0xc6fb47)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1964e3=this['editor'];_0x1d04f1(_0x1964e3['model'],({left:_0x273783,entered:_0x4d1385})=>{for(const _0x548861 of _0x273783)if(ui(_0x548861)){_0x1964e3['ui']['ariaLiveAnnouncer']['announce'](bt(_0x1964e3['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xd3eeb7 of _0x4d1385)if(ui(_0xd3eeb7)){_0x1964e3['ui']['ariaLiveAnnouncer']['announce'](bt(_0x1964e3['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x2660aa(_0x626299)));break;}});}}function di(_0x24ce84,_0x517fa8){return _0x517fa8?_0x24ce84+':'+_0x517fa8:_0x24ce84;}function li(_0x5438b5,_0x158f50){const _0x135a92=_0x158f50['schema'],_0x5b9fcb=_0x158f50['createRange'](_0x5438b5['start']);for(const _0x553aa8 of _0x5438b5['getWalker']()){const {type:_0x22f8f3,item:_0x33ca62,nextPosition:_0x351e52}=_0x553aa8;if('text'===_0x22f8f3||_0x135a92['isObject'](_0x33ca62)){const _0x528b71=_0x158f50['createPositionBefore'](_0x33ca62);_0x5b9fcb['isCollapsed']&&(_0x5b9fcb['start']=_0x528b71),_0x5b9fcb['end']=_0x351e52;}}return _0x5b9fcb;}function ui(_0x5d18dd){return'comment'===hi(_0x5d18dd['name'])['group'];}class mi extends _0x3549b7{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x4d213c=this['editor'],_0x433a7d=_0x4d213c['plugins']['get'](Qt),_0x231151=_0x4d213c['plugins']['get'](ci),_0x2da7b5=_0x4d213c['plugins']['get']($t),_0x546719=_0x4d213c['plugins']['get'](si);_0x4d213c['ui']['componentFactory']['add']('comment',()=>{const _0xd9c5d0=this['_createUIButton'](_0x2ef389);return _0xd9c5d0['tooltip']=!0x0,_0xd9c5d0;}),_0x4d213c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x546719['addSourceCollector'](()=>{const _0x3af0ee=[];for(const [_0x288f48,_0x2a4d68]of _0x433a7d['_threadToController']){const _0xc0e06a=_0x231151['getAllMarkersForId'](_0x288f48['id']),_0x58c98c=_0xc0e06a['map'](_0x5349da=>_0x5349da['getRange']());_0xc0e06a['length']>0x0&&_0x3af0ee['push']([_0x2a4d68['view'],_0x58c98c]);}return _0x3af0ee;}),this['listenTo'](_0x2da7b5,'change:activeAnnotations',(_0x188643,_0x4f53c9,_0x1430ff)=>{const _0x5bb9f0=Array['from'](_0x1430ff)['map'](_0x5b541d=>_0x5b541d['innerView'])['find'](_0x1864c8=>_0x433a7d['_viewToController']['has'](_0x1864c8));if(!_0x5bb9f0)return void(_0x231151['activeMarker']=null);const _0x219a02=_0x433a7d['_viewToController']['get'](_0x5bb9f0)['model']['id'],_0xacc2e3='comment:'+_0x219a02;_0x219a02&&_0x231151['hasMarkerForId'](_0x219a02)?_0x231151['activeMarker']=_0xacc2e3:_0x231151['activeMarker']&&(_0x231151['activeMarker']=null);}),this['listenTo'](_0x433a7d,'removeCommentThread',(_0x321cf9,{threadId:_0x2111fc,isFromAdapter:_0x4e0ab7})=>{!_0x4e0ab7&&_0x4d213c['ui']['focusTracker']['isFocused']&&_0x231151['hasMarkerForId'](_0x2111fc)&&_0x4d213c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x433a7d,'addComment',(_0x3d950d,{threadId:_0x4e16d4,isFromAdapter:_0x363600})=>{if(_0x363600||!_0x231151['hasMarkerForId'](_0x4e16d4)||!_0x433a7d['hasCommentThread'](_0x4e16d4))return;0x1===_0x433a7d['getCommentThread'](_0x4e16d4)['length']&&(_0x4d213c['editing']['view']['focus'](),_0x3d950d['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1d648c=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2c4412;for(const _0x1f183b in _0x1d648c){const _0x16571a=_0x1f183b,_0x36f3a7=_0x1d648c[_0x16571a];if('commentsLicenseKeyValid'==_0x36f3a7||'commentsLicenseKeyInvalid'==_0x36f3a7||'commentsLicenseKeyExpired'==_0x36f3a7||'commentsLicenseKeyDomainLimit'==_0x36f3a7||'commentsLicenseKeyNotAllowed'==_0x36f3a7||'commentsLicenseKeyEvaluationLimit'==_0x36f3a7||'commentsLicenseKeyUsageLimit'==_0x36f3a7){delete _0x1d648c[_0x16571a],_0x2c4412=_0x36f3a7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2c4412&&_0x1d648c['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2c4412&&_0x1d648c['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2c4412&&_0x1d648c['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2c4412&&_0x1d648c['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2c4412&&_0x1d648c['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x2c4412&&_0x1d648c['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x25f989){const _0x5c9686=this['editor'],_0x551b4b=new _0x25f989(_0x5c9686['locale']),_0x517084=_0x5c9686['commands']['get']('addCommentThread');return _0x551b4b['set']({'label':bt(_0x5c9686['locale'],'Comment'),'icon':_0x1714f5}),_0x551b4b['bind']('isEnabled')['to'](_0x517084,'isEnabled',_0x517084,'hasContent',(_0x20d478,_0x10aefd)=>_0x20d478&&_0x10aefd),this['listenTo'](_0x551b4b,'execute',()=>{_0x517084['execute']();}),_0x551b4b;}}class fi extends _0x3549b7{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0x7ead42){super(_0x7ead42),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5beed8,_0xb65d3c,_0x3643b3)=>{_0x3643b3?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x216e11,_0x5acc4e]of this['editor']['commands'])_0x5acc4e['affectsData']&&'addCommentThread'!==_0x216e11&&_0x5acc4e['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x55ceed=this['editor']['editing']['view']['document'];this['listenTo'](_0x55ceed,'cut',_0x5f5995=>_0x5f5995['stop'](),{'priority':'highest'}),this['listenTo'](_0x55ceed,'clipboardInput',_0x20f931=>_0x20f931['stop'](),{'priority':'highest'}),this['listenTo'](_0x55ceed,'delete',_0x37bf36=>_0x37bf36['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x190982,_0xd02d40]of this['editor']['commands'])_0xd02d40['affectsData']&&'addCommentThread'!==_0x190982&&_0xd02d40['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x4e5218{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x162602){super(_0x162602),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x358899=this['context']['plugins']['get']($t);this['listenTo'](_0x358899,'_activateAnnotation',(_0x6fb526,_0x64856b)=>{for(const _0x24b3f3 of this['activeUIs']){const _0x2ba913=this['_uis']['get'](_0x24b3f3);(0x0,this['uisData']['get'](_0x24b3f3)['filter'])(_0x64856b)&&_0x2ba913['setActiveAnnotation'](_0x64856b);}}),this['listenTo'](_0x358899,'_deactivateAllAnnotations',()=>{for(const _0x2ea6c1 of this['activeUIs']){this['_uis']['get'](_0x2ea6c1)['setActiveAnnotation'](null);}}),this['listenTo'](_0x358899['_visibleAnnotations'],'add',(_0x25b6fb,_0x3e3fad)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3e3fad);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1fcdd2){return this['activeUIs']['has'](_0x1fcdd2);}['activate'](_0x4a250a,_0x18f775=this['defaultFilter']){const _0xf07172=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x4a250a))throw new _0x1b1980('annotationsuis-missing-ui',this,{'uiName':_0x4a250a});this['isActive'](_0x4a250a)&&this['deactivate'](_0x4a250a),this['activeUIs']['add'](_0x4a250a);const _0x29aa2c=new jt();Xt({'source':_0xf07172['_visibleAnnotations'],'target':_0x29aa2c,'filter':_0x18f775}),this['uisData']['set'](_0x4a250a,{'collection':_0x29aa2c,'filter':_0x18f775});const _0x2e40f5=this['_uis']['get'](_0x4a250a);_0x2e40f5['attach'](_0x29aa2c),this['listenTo'](_0x2e40f5,'change:activeAnnotation',(_0x554754,_0x79cbb,_0x312090,_0x57b39f)=>{_0x57b39f&&_0xf07172['_removeActiveAnnotation'](_0x57b39f),_0x312090&&_0xf07172['_addActiveAnnotation'](_0x312090);});}['deactivate'](_0x74fe6d){if(this['activeUIs']['delete'](_0x74fe6d),!this['_uis']['has'](_0x74fe6d))throw new _0x1b1980('annotationsuis-missing-ui',this,{'uiName':_0x74fe6d});const _0x27a571=this['_uis']['get'](_0x74fe6d);_0x27a571['detach'](),this['stopListening'](_0x27a571),this['uisData']['get'](_0x74fe6d)['collection']['destroy'](),this['uisData']['delete'](_0x74fe6d);}['switchTo'](_0x446da3){if(!this['_uis']['has'](_0x446da3))throw new _0x1b1980('annotationsuis-missing-ui',this,{'uiName':_0x446da3});const _0x234037=this['context']['plugins']['get']($t),_0x548b7a=Array['from'](_0x234037['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x446da3);const _0x727e40=this['_uis']['get'](_0x446da3);_0x727e40['setActiveAnnotation'](_0x548b7a),_0x727e40['_setSelectedAnnotations']&&_0x548b7a&&_0x727e40['_setSelectedAnnotations']([_0x548b7a]);}['deactivateAll'](){for(const _0x2b7a97 of this['activeUIs'])this['deactivate'](_0x2b7a97);}['register'](_0x8c173e,_0x44b070){if(this['_uis']['has'](_0x8c173e))throw new _0x1b1980('annotationsuis-register-already-registered');if('function'!=typeof _0x44b070['attach']||'function'!=typeof _0x44b070['detach']||'function'!=typeof _0x44b070['setActiveAnnotation'])throw new _0x1b1980('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x8c173e,_0x44b070);}['refilterAnnotations'](){const _0xa17890=this['context']['plugins']['get']($t)['collection'],_0x577337=new Map(),_0x36ef3a=Array['from'](this['activeUIs']);for(const _0x21cf90 of this['activeUIs']){const _0x53f176=this['uisData']['get'](_0x21cf90)['collection'];for(const _0x38272b of _0x53f176)_0x577337['set'](_0x38272b,_0x21cf90);}for(const _0x529acf of _0xa17890){const _0x4cbf27=_0x577337['get'](_0x529acf);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x529acf);const _0x202c26=_0x36ef3a['find'](_0x33bc1f=>this['uisData']['get'](_0x33bc1f)['filter'](_0x529acf));_0x4cbf27!==_0x202c26&&(_0x4cbf27&&this['uisData']['get'](_0x4cbf27)['collection']['remove'](_0x529acf),_0x202c26&&this['uisData']['get'](_0x202c26)['collection']['add'](_0x529acf));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x592dde){const _0x479b6c=[];for(const _0x382dd1 of this['activeUIs']){(0x0,this['uisData']['get'](_0x382dd1)['filter'])(_0x592dde)&&_0x479b6c['push'](_0x382dd1);}if(_0x479b6c['length']>0x1)throw new _0x1b1980('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x479b6c,'annotationType':_0x592dde['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x1a9879('px');class Ai extends _0x2e27f6{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4e6c69){super(_0x4e6c69),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x8aec3f,_0x49e603)=>_0x8aec3f+_0x49e603),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xe4f97c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xe4f97c['to']('isAnimationDisabled',_0x2f8b92=>_0x2f8b92?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xe4f97c['to']('top',_0xaf76b9=>gi(_0xaf76b9))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5acb5b=this['element']['clientHeight'];_0x5acb5b&&(this['height']=_0x5acb5b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x4e5218{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b5057){super(_0x1b5057),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 _0xd45239=this['context']['config']['get']('sidebar.container');_0xd45239&&this['setContainer'](_0xd45239);}['setContainer'](_0x29bb81){if(!yi(_0x29bb81))throw new _0x1b1980('sidebar-setcontainer-invalid-element');this['container']=_0x29bb81;}['_attachToContainer']({viewClass:_0x33ffd6='',spaceBetweenItems:_0x4e5cd1=0x19}={}){if(!yi(this['container']))throw new _0x1b1980('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x33ffd6,this['_spaceBetweenItems']=_0x4e5cd1;}['rearrange']({removedAnnotation:_0xb12bae,previousAnnotation:_0x3bbafd,nextAnnotation:_0x31e921}){const _0x4efca2=this['getSidebarItemView'](_0xb12bae);this['view']['list']['remove'](_0x4efca2),this['_destroySidebarItemView'](_0xb12bae),_0x3bbafd&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3bbafd)),_0x31e921&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x31e921)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x6d731f,activatedAnnotation:_0x1baa7d,disableAnimationOnActivatedAnnotation:_0x3fff28}){if(this['_activeAnnotation']=_0x1baa7d,_0x6d731f){_0x6d731f['isActive']=!0x1;const _0x22271a=this['getSidebarItemView'](_0x6d731f);_0x22271a&&_0x3fff28&&(_0x22271a['isAnimationDisabled']=!0x1);}if(_0x1baa7d){const _0x2faef6=this['getSidebarItemView'](_0x1baa7d);_0x2faef6&&(_0x1baa7d['isActive']=!0x0,_0x3fff28&&(_0x2faef6['isAnimationDisabled']=!0x0,_0x2faef6['top']+=0x1),this['_alignToTargetRect'](_0x2faef6));}}['_detachFromContainer'](_0x2b6404){if(this['view']['element']['remove'](),_0x2b6404){for(const _0x4ec97f of _0x2b6404)this['_destroySidebarItemView'](_0x4ec97f);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1551d3,_0x1e5aa1){_0x1e5aa1||(_0x1e5aa1=_0x1551d3['view']);const _0x497cc8=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x497cc8,_0x1551d3),this['_annotationToSidebarItemView']['set'](_0x1551d3,_0x497cc8),_0x497cc8['content']['add'](_0x1e5aa1),this['listenTo'](_0x1551d3['view'],'change:targetRect',(_0x2b1b58,_0x3e9e28,_0x38bca6)=>{const _0x4f3e5b=this['_getTargetTop'](_0x1551d3,_0x38bca6);_0x497cc8['_targetTop']!=_0x4f3e5b&&(_0x497cc8['_targetTop']=_0x4f3e5b,this['_setItemTop'](_0x497cc8,_0x4f3e5b));}),this['listenTo'](_0x497cc8,'change:top',()=>{this['_recalculate'](_0x497cc8,'top');}),this['listenTo'](_0x497cc8,'change:bottom',()=>{this['_recalculate'](_0x497cc8,'bottom');}),this['_alignToTargetRect'](_0x497cc8);const _0x42a436=this['_getItemBefore'](_0x497cc8);if(_0x42a436)this['_alignAfterItem'](_0x42a436,_0x497cc8)||this['_alignToTargetRect'](_0x497cc8);else this['_alignToTargetRect'](_0x497cc8);return this['_updateLastItem'](),this['view']['list']['add'](_0x497cc8),_0x497cc8;}['_alignForTopChange'](_0xcd01c5){if(!_0xcd01c5['content']['length'])return;const _0x4332a1=this['_getItemBefore'](_0xcd01c5);if(!_0x4332a1)return;const _0x2bcd35=this['_sidebarItemViewToAnnotation']['get'](_0x4332a1),_0x517bd4=this['_activeAnnotation'];_0x517bd4&&_0x517bd4===_0x2bcd35?this['_alignAfterItem'](_0x4332a1,_0xcd01c5):this['_alignBeforeItem'](_0xcd01c5,_0x4332a1);}['_alignForBottomChange'](_0x1d3bdf){if(!_0x1d3bdf['content']['length'])return;const _0x1e1240=this['_getItemAfter'](_0x1d3bdf);if(!_0x1e1240)return;const _0x23630a=this['_sidebarItemViewToAnnotation']['get'](_0x1e1240),_0xdebba7=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x513cf3=this['_activeAnnotation'];_0x513cf3&&_0x513cf3===_0x23630a&&_0xdebba7?(this['_alignBeforeItem'](_0x1e1240,_0x1d3bdf),this['_alignAfterItem'](_0x1d3bdf,_0x1e1240)):_0x513cf3&&_0x513cf3===_0x23630a?this['_alignBeforeItem'](_0x1e1240,_0x1d3bdf):this['_alignAfterItem'](_0x1d3bdf,_0x1e1240);}['_recalculate'](_0x5895b4,_0x2723b7){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x311c2f,changedProp:_0x18ef6f}of this['_recalculateBuffer'])'top'===_0x18ef6f?this['_alignForTopChange'](_0x311c2f):this['_alignForBottomChange'](_0x311c2f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5895b4,'changedProp':_0x2723b7});}['getSidebarItemView'](_0x6060a0){return this['_annotationToSidebarItemView']['get'](_0x6060a0);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x38a794){const _0x49de7a=this['getSidebarItemView'](_0x38a794);this['stopListening'](_0x49de7a),this['stopListening'](_0x38a794['view']),_0x49de7a['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x38a794),this['_sidebarItemViewToAnnotation']['delete'](_0x49de7a);}['_createSidebarView'](){const _0x10e84c=new _i(this['context']['locale']);return _0x10e84c['render'](),this['on']('change:_lastItem',(_0x5ca60f,_0xc22194,_0x4dd287,_0xe536d6)=>{_0xe536d6&&_0x10e84c['unbind']('minHeight'),_0x4dd287?_0x10e84c['bind']('minHeight')['to'](_0x4dd287,'bottom'):_0x10e84c['minHeight']=null;}),_0x10e84c;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2adc2e){const _0x2f7fa8=this['_sidebarItemViewToAnnotation']['get'](_0x2adc2e),_0x1e5f80=_0x2f7fa8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2f7fa8)-0x1);return _0x1e5f80&&this['getSidebarItemView'](_0x1e5f80)||null;}['_getItemAfter'](_0x4c503a){const _0x168ca8=this['_sidebarItemViewToAnnotation']['get'](_0x4c503a),_0x289454=_0x168ca8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x168ca8)+0x1);return _0x289454&&this['getSidebarItemView'](_0x289454)||null;}['_alignBeforeItem'](_0x1abc53,_0x5c3690){_0x1abc53['updateHeight']();const _0xc2589b=vi(_0x5c3690['bottom']+this['_spaceBetweenItems'],_0x1abc53['top']);return!!_0xc2589b&&(this['_setItemTop'](_0x5c3690,_0x5c3690['top']-_0xc2589b),!0x0);}['_alignAfterItem'](_0x3b62b8,_0x55658d){_0x3b62b8['updateHeight']();const _0x467bda=vi(_0x3b62b8['bottom']+this['_spaceBetweenItems'],_0x55658d['top']);return!!_0x467bda&&(this['_setItemTop'](_0x55658d,_0x55658d['top']+_0x467bda,!0x1),!0x0);}['_alignToTargetRect'](_0x34f6f4){const _0x450142=this['_sidebarItemViewToAnnotation']['get'](_0x34f6f4);if(!_0x450142||!_0x450142['target']||!_0x450142['targetRect'])return;const _0x754534=this['_getTargetTop'](_0x450142,_0x450142['targetRect']);this['_setItemTop'](_0x34f6f4,_0x754534);}['_getTargetTop'](_0x320723,_0x39697c){if(null===_0x39697c)return 0x0;if(_0x320723['target']instanceof _0x2e7ae5)return _0x39697c['top'];{const _0xb2dfd2=new _0x2e7ae5(this['view']['element'])['top'];return _0x39697c['top']-_0xb2dfd2;}}['_setItemTop'](_0x5483c9,_0x12e359,_0xa4cd78=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xa4cd78&&(_0x12e359=Math['max'](_0x12e359,this['_getMaxAvailableTop'](_0x5483c9))),_0x5483c9['top']=_0x12e359;}['_getMaxAvailableTop'](_0x62851){let _0x4c4c2a=this['_getItemBefore'](_0x62851),_0x5f27cf=0x0;for(;_0x4c4c2a;)_0x4c4c2a['updateHeight'](),_0x5f27cf+=this['_spaceBetweenItems']+_0x4c4c2a['height'],_0x4c4c2a=this['_getItemBefore'](_0x4c4c2a);return _0x5f27cf;}}function vi(_0x207ce8,_0x47607d){return Math['max'](_0x207ce8-_0x47607d,0x0);}function yi(_0x28658b){return null!==_0x28658b&&'object'==typeof _0x28658b&&0x1===_0x28658b['nodeType'];}class Ci extends _0x4e5218{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54d8cd){super(_0x54d8cd),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3b337f(),this['_refreshPositioningDebounced']=_0x14b05e(()=>{_0x54d8cd['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1311f6=this['context']['plugins']['get'](pi),_0x1e820f=this['context']['plugins']['get'](Ti);_0x1311f6['register']('wideSidebar',this),_0x1e820f['container']&&_0x1311f6['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5b7ec3){if(_0x5b7ec3===this['activeAnnotation'])return;const _0x472230=this['context']['plugins']['get'](Ti);_0x472230['_activeAnnotation']=_0x5b7ec3;const _0x138bd8=this['activeAnnotation'];_0x472230['refresh']({'blurredAnnotation':_0x138bd8,'activatedAnnotation':_0x5b7ec3}),this['activeAnnotation']=_0x5b7ec3;}['attach'](_0x2c15e2){this['annotations']=_0x2c15e2;const _0x331931=this['context']['plugins']['get'](Ti);if(_0x331931['_annotations']=_0x2c15e2,this['isAttached'])throw new _0x1b1980('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x331931,'set:container',()=>{this['detach'](),this['listenTo'](_0x331931,'change:container',_0xa9dc91=>{_0xa9dc91['off'](),this['attach'](_0x2c15e2);});}),_0x331931['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2c8c34=_0x46678d=>{_0x46678d['updateTargetRect'](),_0x331931['addAnnotation'](_0x46678d);};for(const _0x2011b5 of _0x2c15e2)_0x2c8c34(_0x2011b5);this['listenTo'](_0x2c15e2,'add',(_0x243b17,_0x54dfdc)=>{_0x2c8c34(_0x54dfdc);}),this['listenTo'](_0x2c15e2,'remove',(_0x3494e8,_0x2ed230,_0x1053e3)=>{_0x331931['rearrange']({'removedAnnotation':_0x2ed230,'previousAnnotation':_0x2c15e2['get'](_0x1053e3-0x1),'nextAnnotation':_0x2c15e2['get'](_0x1053e3+0x1)}),_0x2ed230===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2c15e2,'focus',(_0x42cb32,_0x3e4768)=>{this['setActiveAnnotation'](_0x3e4768);}),this['listenTo'](_0x2c15e2,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4849c9=this['context']instanceof _0x430c8f?this['context']['editors']:new _0x3b337f([this['context']]);for(const _0x2f0f5f of _0x4849c9)this['_integrateWithEditorAnnotations'](_0x2f0f5f);this['listenTo'](_0x4849c9,'add',(_0x5051c9,_0x1baf65)=>{this['listenTo'](_0x1baf65,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1baf65);});}),this['listenTo'](_0x4849c9,'remove',(_0x4abfb4,_0x126aac)=>{_0x126aac['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x126aac['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x1b1980('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5a444e=this['context']['plugins']['get'](Ti);_0x5a444e['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5a444e),this['stopListening'](this['annotations']),this['context']instanceof _0x430c8f&&this['stopListening'](this['context']['editors']);for(const _0x42a6cd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x42a6cd);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x30142d){if(!_0x30142d['plugins']['has']('EditorAnnotations'))return;const _0x42050e=_0x30142d['plugins']['get']('EditorAnnotations'),_0x1e57c4=()=>{const _0x2c77cc=_0x42050e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2c77cc[0x0]||null);};this['listenTo'](_0x42050e,'refresh',_0x1e57c4),this['listenTo'](_0x42050e,'blur',(_0x387cc8,{isAnnotationTracked:_0xa542be})=>{this['activeAnnotation']&&_0xa542be(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x42050e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2d51ce=>{_0x42050e['hasDomSelection']()&&(_0x1e57c4(),_0x2d51ce['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x42050e);}['_destroyEditorAnnotationsIntegration'](_0x5aa915){this['stopListening'](_0x5aa915),this['_editorAnnotations']['remove'](_0x5aa915);}}class Ii extends _0x2ef389{['counterView'];constructor(_0x2da66c){super(_0x2da66c);const _0x43a367=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x46d284,_0x1ffeba)=>_0x46d284?'...':_0x1ffeba['toString']()),this['set']('annotationType',''),this['icon']=_0x1714f5,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x2e27f6(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x43a367['to']('annotationType',_0x35b99e=>'ck-annotation-counter__badge--'+_0x35b99e),_0x43a367['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x43a367['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x4e5218{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51914e){super(_0x51914e),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xba838f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3b337f(),this['_refreshPositioningDebounced']=_0x14b05e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x4e029b){this['annotations']=_0x4e029b;const _0xd89889=this['context']['plugins']['get'](Ti),_0x40c095=this['balloonPanelView'];if(_0xd89889['_annotations']=_0x4e029b,this['isAttached'])throw new _0x1b1980('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xd89889,'set:container',()=>{this['detach'](),this['listenTo'](_0xd89889,'change:container',_0x3af0d9=>{_0x3af0d9['off'](),this['attach'](_0x4e029b);});}),_0xd89889['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x44e695=_0x3bedd2=>{const _0x35f9e9=new Ii(this['context']['locale']);_0xd89889['addAnnotation'](_0x3bedd2,_0x35f9e9),this['_annotationToNarrowView']['set'](_0x3bedd2,_0x35f9e9),_0x35f9e9['bind']('isDirty','annotationType','number')['to'](_0x3bedd2['view'],'isDirty','type','length'),_0x35f9e9['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x40c095['content']['first']!==_0x3bedd2['view']?(this['_showBalloon'](_0x3bedd2),_0x3bedd2['view']['element']['focus'](),this['setActiveAnnotation'](_0x3bedd2)):this['setActiveAnnotation'](null);});};for(const _0x1275c7 of _0x4e029b)_0x44e695(_0x1275c7);this['listenTo'](_0x4e029b,'add',(_0x4c8c58,_0x2c82cd)=>{_0x44e695(_0x2c82cd);}),this['listenTo'](_0x4e029b,'remove',(_0x595497,_0x385508,_0x221db1)=>{this['_annotationToNarrowView']['get'](_0x385508)['destroy'](),this['_annotationToNarrowView']['delete'](_0x385508),_0xd89889['rearrange']({'removedAnnotation':_0x385508,'previousAnnotation':_0x4e029b['get'](_0x221db1-0x1),'nextAnnotation':_0x4e029b['get'](_0x221db1+0x1)}),_0x385508===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4e029b,'focus',(_0x460eaf,_0x1e2336)=>{this['setActiveAnnotation'](_0x1e2336);}),this['listenTo'](_0x4e029b,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x48996f,_0x332bc6)=>{_0x332bc6['keyCode']===_0x5c8495['esc']&&_0x40c095['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x40c095['content']['first']),this['_hideBalloon'](),_0x332bc6['stopPropagation'](),_0x332bc6['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0xa235a0,_0x7fb295)=>{const _0x38683c=_0x7fb295['target'];_0x40c095['isVisible']&&_0x40c095['element']['contains'](_0x38683c)||_0xd89889['view']['element']['contains'](_0x38683c)||_0xa235a0['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4fe28e=>_0x4fe28e['contains'](_0x38683c))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x261f1d=this['context']instanceof _0x430c8f?this['context']['editors']:new _0x3b337f([this['context']]);for(const _0x6e67ad of _0x261f1d)this['_integrateWithEditorAnnotations'](_0x6e67ad);this['listenTo'](_0x261f1d,'add',(_0x68cadb,_0x19b5eb)=>{this['listenTo'](_0x19b5eb,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x19b5eb);});}),this['listenTo'](_0x261f1d,'remove',(_0x225b12,_0xd97049)=>{_0xd97049['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xd97049['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x29fab0){if(_0x29fab0===this['activeAnnotation'])return;const _0x460144=this['context']['plugins']['get'](Ti);if(_0x460144['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x29fab0,'disableAnimationOnActivatedAnnotation':!0x0}),_0x29fab0)_0x460144['getSidebarItemView'](_0x29fab0)?this['_showBalloon'](_0x29fab0):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x29fab0;}['detach'](){if(!this['isAttached'])throw new _0x1b1980('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4aa088=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2d29cc=>_0x2d29cc['destroy']()),this['_annotationToNarrowView']['clear'](),_0x4aa088['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x430c8f&&this['stopListening'](this['context']['editors']);for(const _0x30a67f of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x30a67f);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'](_0xde4e47){if(!_0xde4e47['plugins']['has']('EditorAnnotations'))return;const _0x2e2ef0=_0xde4e47['plugins']['get']('EditorAnnotations'),_0x5e1e86=this['context']['plugins']['get'](Ti),_0x226409=this['annotations'],_0x2ab7dc=this['balloonPanelView'],_0x3219f4=()=>{const _0x2a4401=_0x2e2ef0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2a4401),this['setActiveAnnotation'](_0x2a4401[0x0]||null);};this['listenTo'](_0x2e2ef0,'refresh',_0x3219f4),this['listenTo'](_0x2e2ef0,'blur',(_0x50fb2f,{isAnnotationTracked:_0x57dd0d})=>{this['activeAnnotation']&&_0x57dd0d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2e2ef0,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x226409,'blur',_0x31a84e=>{_0x2e2ef0['hasDomSelection']()&&_0x31a84e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5095db,_0x4fbeb7)=>{const _0x460f35=_0x4fbeb7['target'];_0x2ab7dc['isVisible']&&_0x2ab7dc['element']['contains'](_0x460f35)||_0x5e1e86['view']['element']['contains'](_0x460f35)||this['activeAnnotation']&&_0x2e2ef0['hasDomSelection']()&&(_0x3219f4(),_0x5095db['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2e2ef0);}['_destroyEditorAnnotationsIntegration'](_0x23aa7c){_0x23aa7c&&(this['stopListening'](_0x23aa7c),this['_editorAnnotations']['remove'](_0x23aa7c));}['_setSelectedAnnotations'](_0x2574ac){for(const _0x91f0f8 of this['_selectedAnnotations'])_0x2574ac['includes'](_0x91f0f8)||this['_manuallyClosedAnnotationViews']['delete'](_0x91f0f8['view']);this['_selectedAnnotations']=_0x2574ac;}['_refreshPositioning'](){const _0x3da1d0=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x3da1d0['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x592d14){if(this['_manuallyClosedAnnotationViews']['has'](_0x592d14['view']))return;const _0x241732=this['balloonPanelView']['content']['first'];_0x241732!==_0x592d14['view']?(_0x241732&&this['_detachListeners'](_0x241732),this['_attachListeners'](_0x592d14['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x592d14['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xe55527=this['balloonPanelView']['content']['first'],_0x4ef2ef=_0xe55527&&this['annotations']['getByView'](_0xe55527);if(!_0x4ef2ef||!this['_annotationToNarrowView']['has'](_0x4ef2ef))return;const _0x17e956=this['_annotationToNarrowView']['get'](_0x4ef2ef)['element'],_0x359abb=(function(){const _0x11bfb2=ht['defaultPositions'];return[_0x11bfb2['southArrowNorthEast'],_0x11bfb2['northArrowSouthEast'],_0x11bfb2['southArrowNorth'],_0x11bfb2['northArrowSouth'],_0x11bfb2['southArrowNorthWest'],_0x11bfb2['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x17e956,'positions':_0x359abb});}['_hideBalloon'](){const _0x476a75=this['balloonPanelView'],_0x58e276=_0x476a75['content']['first'];_0x58e276&&(this['_detachListeners'](_0x58e276),_0x476a75['unpin'](),_0x476a75['content']['clear']());}['_attachListeners'](_0x262397){this['listenTo'](_0x262397,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x262397,'Esc',(_0x4ae3d6,_0x4de6c0)=>{this['_manuallyClosedAnnotationViews']['add'](_0x262397),this['_hideBalloon'](),_0x4de6c0();});}['_detachListeners'](_0x1a60b1){this['stopListening'](_0x1a60b1);}}class Ei extends _0x3549b7{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5c3f40){super(_0x5c3f40),_0x5c3f40['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5c3f40['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x14b05e(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x57045f=this['editor']['plugins']['get'](pi);_0x57045f['context']===this['editor']&&(_0x57045f['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x385c47,_0x4e2e3c)=>{const _0x8fcae5=this['_balloon'];if(this['isAttached']&&_0x8fcae5['visibleView']){const _0x121f36=this['annotations']['getByView'](_0x8fcae5['visibleView']);_0x121f36&&this['_closeAnnotation'](_0x121f36),_0x4e2e3c();}}));}['afterInit'](){const _0x47a3df=this['editor']['plugins']['get'](pi);_0x47a3df['context']===this['editor']&&(_0x47a3df['hasActive']()||_0x47a3df['switchTo']('inline'));}['setActiveAnnotation'](_0xf0e50a){_0xf0e50a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0xf0e50a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0xf0e50a)&&this['_addAnnotationToBalloon'](_0xf0e50a,!0x0),_0xf0e50a['isActive']=!0x0),_0xf0e50a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0xf0e50a);}['attach'](_0x56caea){this['annotations']=_0x56caea;const _0x58df42=this['editor']['plugins']['get'](pi),_0x181c64=this['_balloon'];if(this['isAttached'])throw new _0x1b1980('inlineannotations-attach-already-attached',this);if(_0x58df42['context']!==this['editor'])throw new _0x1b1980('inlineannotations-not-allowed-with-context',this);const _0x2dc089=this['editor']['plugins']['get'](si);this['listenTo'](_0x2dc089,'refresh',()=>{const _0x130ef0=_0x2dc089['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1b1512,_0x586f38;!this['_forceRefresh']&&(_0x1b1512=_0x130ef0,_0x586f38=this['_selectedAnnotations'],_0x1b1512['length']===_0x586f38['length']&&_0x1b1512['every'](_0x216721=>_0x586f38['includes'](_0x216721)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x130ef0),this['setActiveAnnotation'](_0x130ef0[0x0]||null));}),this['listenTo'](_0x2dc089,'blur',(_0x11f47c,{isAnnotationTracked:_0x28c00c})=>{this['activeAnnotation']&&_0x28c00c(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2dc089,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2ddbac,_0x362bd3,_0x559e52)=>{_0x559e52||this['setActiveAnnotation'](null);}),this['listenTo'](_0x56caea,'remove',(_0x5b3e3d,_0x465a78)=>{this['_removeAnnotationFromBalloon'](_0x465a78),_0x465a78===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x181c64,'change:visibleView',(_0x4cb49a,_0x2276bd,_0x212eea,_0x5265c7)=>{_0x5265c7&&this['stopListening'](_0x5265c7);const _0x1e220e=_0x56caea['getByView'](_0x212eea);_0x212eea&&_0x1e220e&&(this['listenTo'](_0x212eea,'change:height',()=>{_0x181c64['updatePosition']();}),this['listenTo'](_0x212eea,'Esc',()=>{this['_closeAnnotation'](_0x1e220e),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1e220e&&this['setActiveAnnotation'](_0x1e220e));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x181c64['visibleView']&&(_0x56caea['getByView'](_0x181c64['visibleView'])&&_0x181c64['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 _0x1b1980('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5caea6 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5caea6);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x2e68f0){for(const _0x138b5e of this['_selectedAnnotations'])_0x2e68f0['includes'](_0x138b5e)||this['_manuallyClosed']['delete'](_0x138b5e);for(const _0x15e3f2 of this['annotations'])_0x2e68f0['includes'](_0x15e3f2)||this['_removeAnnotationFromBalloon'](_0x15e3f2);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x42f06e of _0x2e68f0)this['_addAnnotationToBalloon'](_0x42f06e);}this['_selectedAnnotations']=_0x2e68f0;}['_addAnnotationToBalloon'](_0x39d073,_0x4d43cc=!0x1){this['_manuallyClosed']['has'](_0x39d073)||(this['_addedAnnotations']['has'](_0x39d073)||this['_balloon']['hasView'](_0x39d073['view'])||(this['_addedAnnotations']['add'](_0x39d073),this['_balloon']['add']({'stackId':_0x39d073['view']['id'],'view':_0x39d073['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x39d073)}})),_0x4d43cc&&this['_balloon']['showStack'](_0x39d073['view']['id']));}['_getBalloonTargetForAnnotation'](_0x36d44a){const _0x2b97e5=_0x36d44a['target'],_0x12f990=this['editor']['editing']['view'],_0x333785=_0x12f990['document']['selection']['getFirstRange'](),_0x2e619e=_0x12f990['domConverter']['viewRangeToDom'](_0x333785);if(_0x2e619e['collapse'](!0x0),_0x2b97e5){if(_0x2b97e5 instanceof _0x2e7ae5)return _0x2b97e5;let _0x1802ce=[];for(const _0x2b185f of _0x2b97e5)_0x1802ce['push'](..._0x2e7ae5['getDomElementRects'](_0x2b185f));_0x1802ce=function(_0x25947e){const _0x2939cf=[];let _0x3c21eb=_0x25947e[0x0];for(let _0x1b280c=0x1;_0x1b280c<_0x25947e['length'];_0x1b280c++)if(Ni(_0x3c21eb,_0x25947e[_0x1b280c])){const _0x2c0b2f=_0x25947e[_0x1b280c]['width'];_0x3c21eb['width']+=_0x2c0b2f,_0x3c21eb['right']+=_0x2c0b2f;}else _0x2939cf['push'](_0x3c21eb),_0x3c21eb=_0x25947e[_0x1b280c];return _0x2939cf['push'](_0x3c21eb),_0x2939cf;}(_0x1802ce);const _0x2f2901=_0x2e619e['getBoundingClientRect']();return _0x1802ce['find'](_0x30d4ca=>_0x30d4ca['top']<=_0x2f2901['top']&&_0x30d4ca['bottom']>=_0x2f2901['bottom']&&_0x30d4ca['left']<=_0x2f2901['left']&&_0x30d4ca['right']>=_0x2f2901['right'])||_0x1802ce[0x0];}return _0x36d44a['targetRect']||_0x2e619e;}['_removeAnnotationFromBalloon'](_0x37735c){this['_addedAnnotations']['has'](_0x37735c)&&this['_balloon']['hasView'](_0x37735c['view'])&&(this['_addedAnnotations']['delete'](_0x37735c),this['_balloon']['remove'](_0x37735c['view']));}['_closeAnnotation'](_0x4439df){this['_manuallyClosed']['add'](_0x4439df),this['_removeAnnotationFromBalloon'](_0x4439df);}}function Ni(_0x4ec689,_0x22fe0e){return _0x4ec689['top']===_0x22fe0e['top']&&_0x4ec689['bottom']===_0x22fe0e['bottom']&&_0x4ec689['right']===_0x22fe0e['left'];}class ki extends _0x2e27f6{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x449d27,_0x177c99){super(_0x449d27),this['set']('isEmpty',!_0x177c99['length']),this['focusTracker']=new _0x5b085d(),this['_annotationViews']=_0x177c99,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2e3f33({'focusables':_0x177c99,'focusTracker':this['focusTracker']}),this['listenTo'](_0x177c99,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x177c99,'remove',(_0x5cae16,_0x53f73f)=>{_0x53f73f['isActive']&&this['focus'](),_0x177c99['length']||(this['isEmpty']=!0x0);});const _0x3d5472=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x449d27,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x177c99},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x3d5472['if']('isEmpty','ck-hidden',_0x537611=>!_0x537611)]},'children':[{'text':bt(_0x449d27,'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 _0x3c224a of this['_annotationViews'])this['focusTracker']['add'](_0x3c224a['element']);this['_annotationViews']['on']('change',(_0x10508a,{added:_0x50d04e,removed:_0x2f06f2})=>{for(const _0x2e5aea of _0x50d04e)this['focusTracker']['add'](_0x2e5aea['element']);for(const _0x5ed5d1 of _0x2f06f2)this['focusTracker']['remove'](_0x5ed5d1['element']);});}}class Oi extends _0x4e5218{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x375e34){super(_0x375e34),this['archivedThreads']=new _0x3b337f();}['init'](){const _0x3fa3a9=this['context'],_0x2baf95=_0x3fa3a9['plugins']['get'](Qt),_0x2c6686=_0x3fa3a9['plugins']['get']($t);this['listenTo'](_0x2baf95,'addCommentThread',(_0x136491,{threadId:_0x3fbb1f})=>{const _0x5eb093=_0x2baf95['getCommentThread'](_0x3fbb1f);_0x5eb093['archivedAt']&&this['archivedThreads']['add'](_0x5eb093,this['_calculatePosition'](_0x5eb093['archivedAt'])),this['listenTo'](_0x5eb093,'change:archivedAt',(_0x58f3f3,_0x1417fe,_0x25d528)=>{_0x25d528?this['archivedThreads']['has'](_0x5eb093)||this['archivedThreads']['add'](_0x5eb093,this['_calculatePosition'](_0x5eb093['archivedAt'])):this['archivedThreads']['has'](_0x5eb093)&&this['archivedThreads']['remove'](_0x5eb093);});}),this['listenTo'](_0x2baf95,'removeCommentThread',(_0x4d30d1,{threadId:_0xcf8433})=>{const _0x56b9ac=_0x2baf95['getCommentThread'](_0xcf8433);this['stopListening'](_0x56b9ac),this['archivedThreads']['has'](_0x56b9ac)&&this['archivedThreads']['remove'](_0x56b9ac);},{'priority':'highest'}),this['listenTo'](_0x2c6686['collection'],'focus',(_0x2c180c,_0x142bd9)=>{_0x142bd9['isVisible']||(_0x142bd9['isActive']=!0x0,_0x2c6686['activate'](_0x142bd9));});}['_calculatePosition'](_0x1a3f08){const _0xd84e14=[...this['archivedThreads']]['findIndex'](_0x2709c5=>_0x2709c5['archivedAt']<_0x1a3f08);return _0xd84e14>-0x1?_0xd84e14:this['archivedThreads']['length'];}}class Mi extends _0x3549b7{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x5aaf68){super(_0x5aaf68),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x1d4af1=this['editor'],_0x50e840=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1d4af1['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2ef389,!0x0)),_0x1d4af1['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5d8d83=this['_createCommentsArchiveButton'](ot);return _0x5d8d83['set']({'role':'menuitemcheckbox'}),_0x5d8d83;});const _0x405799=_0x1d4af1['plugins']['get'](Oi),_0x3fef3c=_0x1d4af1['plugins']['get']('Annotations'),_0x51a885=_0x1d4af1['plugins']['get']('CommentsRepository');_0x405799['archivedThreads']['forEach'](_0x5e68a9=>{this['_handleNewThread'](_0x5e68a9);}),this['listenTo'](_0x405799['archivedThreads'],'add',(_0x4e9444,_0x2d5dd0)=>{this['_handleNewThread'](_0x2d5dd0);}),this['listenTo'](_0x3fef3c['collection'],'add',(_0x2a7ac8,_0x291c0f)=>{const _0x2b810b=this['_pendingThreads']['find'](_0x5ab0d3=>{const _0xda2f5f=_0x51a885['_threadToController']['get'](_0x5ab0d3);return _0xda2f5f&&_0x291c0f['innerView']===_0xda2f5f['view'];});if(_0x2b810b){const _0x4717d7=this['_calculatePosition'](_0x2b810b['archivedAt']);this['_addAnnotationToArchive'](_0x291c0f,_0x4717d7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2b810b),0x1);}}),this['listenTo'](_0x405799['archivedThreads'],'remove',(_0x5d4184,_0x308c47)=>{const _0x4923e1=_0x1d4af1['config']['get']('collaboration.channelId');if(!_0x4923e1||_0x308c47['channelId']===_0x4923e1){if(this['_pendingThreads']['includes'](_0x308c47))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x308c47),0x1);else{const _0x521852=_0x51a885['_threadToController']['get'](_0x308c47),_0x586e51=_0x3fef3c['getByInnerView'](_0x521852['view']);this['annotationViews']['remove'](_0x586e51['view']),this['stopListening'](_0x586e51),this['stopListening'](_0x586e51['focusableElements']);}}}),this['listenTo'](_0x3fef3c['collection'],'add',(_0x2758db,_0x2502f7)=>{this['listenTo'](_0x2502f7,'escape',_0x50e840);}),this['listenTo'](_0x3fef3c['collection'],'remove',(_0x3f2625,_0x54f30a)=>{this['stopListening'](_0x54f30a,'escape',_0x50e840);});}['_addAnnotationToArchive'](_0x3e8b66,_0x24fbc0){this['listenTo'](_0x3e8b66,'set:isVisible',_0x41eed6=>{_0x41eed6['return']=!0x1,_0x41eed6['stop']();}),this['annotationViews']['add'](_0x3e8b66['view'],_0x24fbc0);}['_handleNewThread'](_0x5ac901){const _0x5d7221=this['editor']['plugins']['get']('CommentsRepository'),_0x161d7c=this['editor']['plugins']['get']('Annotations'),_0x1f59d7=this['editor']['config']['get']('collaboration.channelId');if(!_0x1f59d7||_0x5ac901['channelId']===_0x1f59d7){const _0x1d44fc=_0x5d7221['_threadToController']['get'](_0x5ac901);if(!_0x1d44fc)return void this['_pendingThreads']['push'](_0x5ac901);const _0x273777=this['_calculatePosition'](_0x5ac901['archivedAt']),_0x2f181b=_0x161d7c['getByInnerView'](_0x1d44fc['view']);_0x2f181b['isVisible']&&_0x161d7c['_visibleAnnotations']['remove'](_0x2f181b),this['_addAnnotationToArchive'](_0x2f181b,_0x273777);}}['_calculatePosition'](_0x29edec){const _0x52b76b=this['editor']['config']['get']('collaboration.channelId'),_0x47ac4f=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x3f0791=>_0x3f0791['channelId']===_0x52b76b)['findIndex'](_0x5989bf=>_0x5989bf['archivedAt']<_0x29edec);return _0x47ac4f<0x0||_0x47ac4f>this['annotationViews']['length']?this['annotationViews']['length']:_0x47ac4f-0x1;}['_toggleDialog'](){const _0x17abbf=this['editor'],_0x4e3583=_0x17abbf['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x17abbf['locale'],this['annotationViews'])),'commentsArchive'===_0x4e3583['id']?_0x4e3583['hide']():_0x4e3583['show']({'id':'commentsArchive','title':bt(_0x17abbf['locale'],'COMMENTS_ARCHIVE'),'icon':_0x317037,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2c3836,_0x19418b=!0x1){const _0x104464=this['editor']['locale'],_0x3b94eb=this['editor']['plugins']['get']('Dialog'),_0x4529a0=new _0x2c3836(_0x104464);return _0x4529a0['bind']('isEnabled')['to'](this,'isEnabled'),_0x4529a0['bind']('isOn')['to'](_0x3b94eb,'id',_0x2e6c57=>'commentsArchive'===_0x2e6c57),_0x4529a0['set']({'label':bt(_0x104464,'COMMENTS_ARCHIVE'),'icon':_0x317037,'isToggleable':!0x0}),_0x19418b&&(_0x4529a0['tooltip']=!0x0),this['listenTo'](_0x4529a0,'execute',()=>this['_toggleDialog']()),_0x4529a0;}['_hideDialogOnAnnotationEscape']=_0x252a22=>{const _0x319b28=_0x252a22['source'];if(!this['annotationViews']['has'](_0x319b28['view']))return;const _0x2af4ec=this['editor']['plugins']['get']('Dialog');_0x2af4ec['isOpen']&&'commentsArchive'===_0x2af4ec['id']&&(_0x2af4ec['hide'](),_0x252a22['stop']());};}class Ri extends _0x3549b7{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x34ca7b,ContextPlugin as _0x4770a4,PendingActions as _0xc2d06c,Command as _0x1a419f,Plugin as _0x1dae7b,Context as _0x39691f}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1a473d,uid as _0x588627,KeystrokeHandler as _0x1989d5,FocusTracker as _0x3b1487,diff as _0x346149,Collection as _0x53f197,Rect as _0x981c3,CKEditorError as _0x22c1ce,first as _0x22c885,priorities as _0x409d6c,scrollViewportToShowTarget as _0x3a8720,getEnvKeystrokeText as _0x5d8af7,toUnit as _0x1aa775,DomEmitterMixin as _0x334846,keyCodes as _0x51522a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x486d17,AriaDescriptionView as _0x396338,setupThreadKeyboardNavigation as _0x4d2af3,ConfirmMixin as _0x74a058,LateFocusButtonView as _0x1bda2b,trimHtml as _0x25dea0,LateFocusDropdownButtonView as _0x3cf895,FOCUS_ANNOTATION_KEYSTROKE as _0x2636b1,Users as _0x3468b4,getDateTimeFormatter as _0x26db8e,hashObject as _0x5e92c9,getAllMarkersDomElementsSorted as _0x5e3453,surroundingMarkersDetector as _0x502eea}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x9ac7ea,cloneDeep as _0x17a138,set as _0x43ef4e,unset as _0x25cba3,isEqual as _0x11f450,debounce as _0x2b37bd}from'es-toolkit/compat';import{IconUndo as _0x4df0dd,IconCheck as _0x69ae7f,IconPencil as _0x368ade,IconRemoveComment as _0x1baaff,IconThreeVerticalDots as _0xb22004,IconAddComment as _0x885b6e,IconCommentsArchive as _0x5ecbdf}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x5a1bad,InlineEditableUIView as _0x5d0018,EditorUI as _0x5cfb14,View as _0x4938be,FocusCycler as _0x572537,ButtonView as _0x733762,ViewCollection as tt,createDropdown as it,ListView as et,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as lt,enableViewPlaceholder as ut,MouseObserver as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _t,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Tt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as vt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget/dist/index.js';class It extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1a473d(){['model'];['view'];constructor(_0x146ff3,_0x42956c){super(),this['model']=_0x146ff3,this['model']['_isAttached']=!0x0,this['view']=_0x42956c,this['listenTo'](_0x42956c,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x42956c,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x42956c,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x42956c,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x42956c,'addComment',(_0x5ed671,_0x2eed49)=>this['addComment'](_0x2eed49)),this['listenTo'](_0x42956c,'updateComment',(_0x10509e,_0x32ef3e,_0x2dc579)=>this['updateComment'](_0x32ef3e,_0x2dc579)),this['listenTo'](_0x42956c,'removeComment',(_0x248eed,_0x1976cd)=>this['removeComment'](_0x1976cd));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x574f24){this['model']['addComment']({'content':_0x574f24,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x1d70de,_0x42f298){this['model']['getComment'](_0x1d70de)['update']({'content':_0x42f298});}['removeComment'](_0x535ca4){this['model']['getComment'](_0x535ca4)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function bt(_0x151a33,_0x148347,_0x2c85c6){const t=_0x151a33['t'];switch(_0x148347){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'},_0x2c85c6);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'},_0x2c85c6);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'},_0x2c85c6);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'},_0x2c85c6);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2c85c6);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'},_0x2c85c6);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'},_0x2c85c6);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'},_0x2c85c6);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Et extends _0x5a1bad{['main'];['editable'];constructor(_0x554c2e,_0x20662c){super(_0x554c2e);const _0x319c86=_0x588627();this['main']=this['createCollection'](),this['editable']=new _0x5d0018(_0x554c2e,_0x20662c,void 0x0,{'label':()=>bt(_0x554c2e,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x554c2e['uiLanguageDirection'],'lang':_0x554c2e['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x319c86},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Nt extends _0x5cfb14{['view'];constructor(_0x418768){super(_0x418768),this['view']=new Et(_0x418768['locale'],_0x418768['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2e93d4=this['editor']['editing']['view'],_0x558695=this['view']['editable'],_0xec726e=_0x2e93d4['document']['getRoot']();_0x558695['name']=_0xec726e['rootName'],this['view']['render']();const _0x5bdf53=_0x558695['element'];this['setEditableElement'](_0x558695['name'],_0x5bdf53),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2e93d4['attachDomRoot'](_0x5bdf53),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const kt=[ft,_t,gt,At,Tt,vt,yt];class Ot extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1a473d(_0x34ca7b){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>kt)());constructor(_0x4f7cb1={}){function _0x5ca9a2(_0x99adc1){return _0x99adc1['map'](_0x5184c2=>String['fromCharCode'](_0x5184c2))['join']('');}(_0x4f7cb1=Object['assign']({},_0x4f7cb1))['plugins']||(_0x4f7cb1['plugins']=Ot['defaultPlugins']),super(_0x4f7cb1),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x5ca9a2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5ca9a2([0x76,0x69,0x65,0x77])][_0x5ca9a2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5ca9a2([0x61,0x75,0x74,0x6f]),this[_0x5ca9a2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5ca9a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5ca9a2([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5ca9a2([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5ca9a2([0x6f,0x6b])});}['create'](){const _0x59cb36=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x59cb36))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2a930e=>{const _0x13ef8e=this['model']['document']['getRoot'](),_0x200c5c=_0x13ef8e&&_0x13ef8e['getChild'](_0x13ef8e['childCount']-0x1);_0x2a930e['setSelection'](_0x200c5c,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x34ad37=this['editing']['view'],_0x51f5c1=_0x34ad37['document']['getRoot'](),_0x18cabd=_0x51f5c1['getChild'](0x0);_0x51f5c1['childCount']>0x1||!_0x18cabd||'p'!=_0x18cabd['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(lt(_0x34ad37,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x18cabd['placeholder']=this['placeholder']),ut({'view':_0x34ad37,'element':_0x18cabd,'keepOnFocus':!0x0}),this['placeholderElement']=_0x18cabd);}}class Mt extends _0x4938be{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x37383b,_0x3ba179={}){super(_0x37383b),this['editor']=null,this['_editorConfig']=_0x3ba179,this['set']('value',_0x3ba179['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',bt(_0x37383b,'Reply...')),this['set']('submitLabel',bt(_0x37383b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x1989d5(),this['focusTracker']=new _0x3b1487(),this['focusCycler']=new _0x572537({'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',(_0x253f2a,_0x4afe96)=>{this['cancelButtonView']['fire']('execute'),_0x4afe96();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2c0b9e,_0x35124f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x35124f());}),this['on']('submit',(_0x6181ec,_0x513a81)=>{_0x513a81['length']>0xfde8?(alert(bt(_0x37383b,'TOO_LONG_COMMENT_ALERT',[_0x513a81['length'],0xfde8])),_0x6181ec['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Ot(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x139062=this['editor'];this['element']['insertBefore'](_0x139062['ui']['element'],this['element']['firstChild']),_0x139062['model']['document']['on']('change',()=>this['value']=_0x139062['getData']()),_0x139062['bind']('placeholder')['to'](this),this['focusables']['add'](_0x139062['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x38bb19){-0x1===_0x38bb19?(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:_0x28114b}=this,_0xf9c3fe=new _0x733762(_0x28114b);return _0xf9c3fe['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xf9c3fe['withText']=!0x0,_0xf9c3fe['bind']('label')['to'](this,'submitLabel'),_0xf9c3fe['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xf9c3fe['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xc6b943,_0xe8b16c)=>!_0xe8b16c&&!!_0xc6b943['trim']()),_0xf9c3fe;}['_createCancelButton'](){const {locale:_0x3bcb4e}=this,_0x4d93b6=new _0x733762(_0x3bcb4e);return _0x4d93b6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4d93b6['label']=bt(_0x3bcb4e,'Cancel'),_0x4d93b6['withText']=!0x0,_0x4d93b6['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4d93b6;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x1c3e48=>{this['focusTracker']['add'](_0x1c3e48['element']);}),this['focusables']['on']('change',(_0x4e37ae,_0x251c0e)=>{for(const _0x4d901b of Array['from'](_0x251c0e['added'])['reverse']())this['focusTracker']['add'](_0x4d901b['element']);});}}class Rt extends _0x4938be{constructor(_0x21cf22,_0xc7932f,_0x1c0077){super(_0x21cf22),this['commentInputView']=new Mt(_0x21cf22,_0x1c0077),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x53d84c,_0x52e735)=>_0x53d84c||!!_0x52e735),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 _0x486d17(_0x21cf22,_0xc7932f),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'](_0x216780){this['commentInputView']['focus'](_0x216780);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x534fb4,_0x549d2b)=>{const {submitButtonView:_0xa4d8be,cancelButtonView:_0x54c31c,editor:_0x332075}=this['commentInputView'];[_0xa4d8be['element'],_0x54c31c['element'],_0x332075?_0x332075['editing']['view']['getDomRoot']():null]['filter'](_0x2e5215=>_0x2e5215)['some'](_0x4462c6=>_0x4462c6['contains'](_0x549d2b['target']))||(this['focus'](),_0x549d2b['preventDefault']());});}}class xt extends _0x4938be{constructor(_0x288611){super(_0x288611);const _0x57979a=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x57979a['to']('count',_0x3fc851=>bt(_0x288611,'NUMBER_OF_COMMENTS',_0x3fc851))}]});}}class St extends _0x4938be{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x41fab9,_0x2d43ac,_0x358508){super(_0x41fab9);const _0x5b311c=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2d43ac['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2d43ac,this['_config']=_0x358508,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3b1487(),this['keystrokes']=new _0x1989d5(),this['focusCycler']=new _0x572537({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x36c9f7=>this['commentViews']['map'](_0x17d8c5=>_0x17d8c5['element'])['includes'](_0x36c9f7['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new xt(_0x41fab9),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2f4db3=>_0x2f4db3-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3d690f of _0x2d43ac['comments'])this['_handleNewCommentModel'](_0x3d690f);this['_handleInfoComment'](),this['listenTo'](_0x2d43ac['comments'],'add',(_0x45b5f6,_0x21fa71)=>{const _0x4d63c6=this['_calculatePosition'](_0x21fa71);this['length']++,this['_handleNewCommentModel'](_0x21fa71,_0x4d63c6),this['refreshVisibleViews']();}),this['listenTo'](_0x2d43ac['comments'],'remove',(_0x2706ec,_0x3bdf3e)=>{this['length']--,this['_handleRemoveCommentModel'](_0x3bdf3e),this['refreshVisibleViews']();}),this['listenTo'](_0x2d43ac,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2d43ac,'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',_0x5b311c['if']('length','ck-hidden',_0x2342ed=>!_0x2342ed)],'aria-label':bt(_0x41fab9,'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'](_0x171cec){-0x1===_0x171cec?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5261d0 of this['commentViews'])_0x5261d0['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x9c4166,_0x480f52){const _0x104a63=new this['_config']['CommentView'](this['locale'],_0x9c4166,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x104a63['viewUid']=_0x9c4166['id'],_0x104a63['delegate']('removeComment')['to'](this),_0x104a63['delegate']('updateComment')['to'](this),_0x104a63['delegate']('resolveCommentThread')['to'](this),_0x104a63['delegate']('editorReady')['to'](this),_0x104a63['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x104a63,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x104a63,_0x480f52);}['_calculatePosition'](_0xcf211d){const _0x1a9c97=this['_model']['_findOptimalIndex'](_0xcf211d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xcf211d['authoredAt']?_0x1a9c97-0x1:_0x1a9c97:_0x1a9c97-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x312a54={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':bt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x312a54,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x312a54));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x96d8e4){const _0x48a7a6=this['commentViews']['remove'](_0x96d8e4['id']);this['stopListening'](_0x48a7a6),_0x48a7a6['isEditMode']&&this['_updateHasDirtyComment'](),_0x48a7a6['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x435dd7=>_0x435dd7['isEditMode']);}['_rearrangeCollapse'](){const _0x40c534=function(_0x443bc5){const _0x85a12c=new _0x53f197();for(const _0x878d0b of _0x443bc5)_0x85a12c['add'](_0x878d0b);return _0x85a12c;}(this['commentViews']),_0x34d6a6=this['_collapsedCommentsView']['count'];for(let _0x3013b6=0x1;_0x3013b6<=_0x34d6a6;_0x3013b6++)_0x40c534['remove'](0x1);for(const _0x2665e6 of _0x40c534)_0x2665e6['collapse']();_0x34d6a6>0x0&&_0x40c534['add'](this['_collapsedCommentsView'],0x1),Pt(_0x346149(Array['from'](this['visibleViews']),Array['from'](_0x40c534)),this['visibleViews'],_0x40c534);}['_rearrangeExpand'](){Pt(_0x346149(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2203be of this['visibleViews'])_0x2203be['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x6782cd=>{this['focusTracker']['add'](_0x6782cd['element']),this['keystrokes']['listenTo'](_0x6782cd['element']);}),this['commentViews']['on']('change',(_0x2bd0f6,_0x53b710)=>{for(const _0x5bbae0 of _0x53b710['removed'])this['focusTracker']['remove'](_0x5bbae0['element']),this['keystrokes']['stopListening'](_0x5bbae0['element']);for(const _0x376084 of Array['from'](_0x53b710['added'])['reverse']())this['focusTracker']['add'](_0x376084['element']),this['keystrokes']['listenTo'](_0x376084['element']);});}}function Pt(_0x1a0b0e,_0x17cb33,_0x492f73){let _0x158fca=0x0;for(const _0x464793 of _0x1a0b0e)switch(_0x464793){case'insert':_0x17cb33['add'](_0x492f73['get'](_0x158fca),_0x158fca),_0x158fca++;break;case'delete':_0x17cb33['remove'](_0x158fca);break;case'equal':_0x158fca++;}}class Lt extends _0x4938be{constructor(_0x290ebd){super(_0x290ebd);const _0x3b2308=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3b2308['to']('contextValue',_0x1683b0=>bt(_0x290ebd,'THREAD_CONTEXT_LABEL',_0x1683b0)),'tabindex':-0x1},'children':[{'text':_0x3b2308['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Dt extends _0x4938be{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x319201,_0x27981b){super(_0x319201);const _0x54280c=this['bindTemplate'];this['_model']=_0x27981b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3b1487(),this['keystrokes']=new _0x1989d5(),this['focusCycler']=new _0x572537({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x38618d=>!!_0x38618d),this['bind']('contextValue')['to'](this['_model'],'context',_0x180f92=>_0x180f92&&_0x180f92['value']?this['_trimContextValue'](_0x180f92['value']):bt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x54280c['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 _0x4dc9ff=new _0x733762(this['locale']);return _0x4dc9ff['label']=bt(this['locale'],'Reopen'),_0x4dc9ff['tooltip']=bt(this['locale'],'Reopen'),_0x4dc9ff['icon']=_0x4df0dd,_0x4dc9ff['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3da79c=>!_0x3da79c),_0x4dc9ff['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xa984,_0x177911)=>_0xa984&&_0x177911),_0x4dc9ff['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4dc9ff;}['_trimContextValue'](_0x1ab802){if(_0x1ab802['length']<0x96)return _0x1ab802;const _0x5d4894=_0x1ab802['lastIndexOf']('\x20',0x93);return _0x1ab802['substring'](0x0,_0x5d4894>-0x1?_0x5d4894:0x93)+'...';}['_attachContextActions'](){const _0x368291=this['element']['querySelector']('.ck-context'),_0x58f290=_0x368291['querySelector']('.ck-context__value');this['listenTo'](_0x368291,'mouseenter',()=>{_0x58f290['offsetWidth']<_0x58f290['scrollWidth']&&_0x368291['classList']['add']('overlay');}),this['listenTo'](_0x368291,'mouseleave',()=>{_0x368291['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4dfe2e of this['focusables'])this['focusTracker']['add'](_0x4dfe2e['element']),this['keystrokes']['listenTo'](_0x4dfe2e['element']);}['_createContextView'](){const _0x22872f=new Lt(this['locale']);return _0x22872f['bind']('contextValue')['to'](this),_0x22872f;}}class Vt extends _0x4938be{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4f79fe,_0x174d1d,_0x4a224d,_0x5df727){super(_0x4f79fe),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x174d1d,this['_localUser']=_0x4a224d,this['_config']=_0x5df727,this['commentThreadHeaderView']=new Dt(_0x4f79fe,_0x174d1d),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x396338(_0x4f79fe,bt(_0x4f79fe,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new St(_0x4f79fe,_0x174d1d,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5df727)),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',(_0x13cce3,_0x283e5d)=>_0x13cce3||!!_0x283e5d),this['bind']('isUnlinked')['to'](_0x174d1d,'unlinkedAt',_0x168c34=>!!_0x168c34),this['bind']('ariaLabel')['to'](this,'length',_0x464640=>{const _0x2ebdb1=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return bt(this['locale'],'COMMENT_THREAD_LABEL',[_0x464640,_0x2ebdb1]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3b1487(),this['keystrokes']=new _0x1989d5(),this['focusCycler']=new _0x572537({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x38001e=>_0x38001e['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x4d2af3(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x249940=new Rt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5c4d0d=_0x249940['commentInputView'];return _0x249940['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5c4d0d,'value',(_0x1f9144,_0xacb2ec,_0xc847e7,_0x338595,_0x548c7d)=>!!_0x548c7d||!!_0x338595&&_0xc847e7&&!_0xacb2ec||_0x1f9144&&_0xc847e7&&!_0xacb2ec),_0x5c4d0d['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x418bfc,_0x764e4a,_0x49f1cd)=>{let _0x23a390;return _0x23a390=_0x49f1cd&&_0x764e4a?'Reply\x20to\x20reopen\x20discussion...':_0x418bfc?'Reply...':'Write\x20a\x20comment...',bt(this['locale'],_0x23a390);}),_0x5c4d0d['bind']('submitLabel')['to'](this,'length',_0x502725=>bt(this['locale'],_0x502725?'Reply':'Comment')),_0x5c4d0d['on']('submit',(_0x167169,_0x1b626f)=>{this['fire']('addComment',_0x1b626f),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5c4d0d['on']('cancel',()=>{this['focus']();}),_0x5c4d0d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5c4d0d['on']('cancel',_0xbd89da=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xbd89da['stop']());}),this['on']('change:isActive',(_0x413382,_0x584dc5,_0x26878f)=>{_0x26878f||this['length']||_0x5c4d0d['value']||this['fire']('removeCommentThread');}),_0x249940;}}class Bt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x74a058(Vt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x25f139,_0x238345,_0x86dc15,_0x1c412b){super(_0x25f139,_0x238345,_0x86dc15,_0x1c412b),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x25f139,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x6fe989,_0x248e84,_0x1bf40b)=>{_0x1bf40b||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x260825,_0x19a36e,_0x3e0f21)=>{_0x3e0f21&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x42f251=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x42f251['if']('isActive','ck-thread--active'),_0x42f251['if']('isUnlinked','ck-thread--unlinked'),_0x42f251['to']('actionIndicator',_0x577552=>_0x577552?'ck-thread--'+_0x577552:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x42f251['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 _0x39eb9e of this['commentsListView']['commentViews'])_0x39eb9e['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x58b1a3}=this,_0x1fa525=this['commentsListView']['commentViews']['get'](0x0);_0x1fa525===this['_boundFirstCommentView']||_0x1fa525['isSystemComment']||(this['_boundFirstCommentView']=_0x1fa525,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1fa525,'actionIndicator',_0x48ff8b=>'remove'===_0x48ff8b?'remove':null),_0x1fa525['placeholder']=bt(_0x58b1a3,'Write\x20a\x20comment...'),_0x1fa525['removeButton']['on']('execute',_0x165ad2=>{_0x165ad2['stop'](),this['showConfirm'](bt(_0x58b1a3,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1fa525['focus']();}),_0x1fa525['actionBar']['add'](this['resolveButton'],0x0),_0x1fa525['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x49d3a7=new _0x1bda2b(this['locale']);return _0x49d3a7['label']=bt(this['locale'],'Resolve'),_0x49d3a7['tooltip']=bt(this['locale'],'Resolve'),_0x49d3a7['icon']=_0x69ae7f,_0x49d3a7['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x49d3a7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x10a723=>!_0x10a723),_0x49d3a7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x52c953,_0x4049b6)=>_0x52c953&&!_0x4049b6),_0x49d3a7['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x49d3a7;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class Ht extends _0x4938be{constructor(_0x30909e){super(_0x30909e),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x253e2c,_0x4d0a3f,_0x538d5f)=>{this['element']['innerHTML']=_0x538d5f;}),this['element']['innerHTML']=this['content'];}}class Ft extends _0x4938be{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x54a4d6,_0x1d988c,_0x5dc202){super(_0x54a4d6),this['_model']=_0x1d988c,this['_config']=_0x5dc202,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1d988c,'content',_0x1d988c,'authoredAt',(_0x3e4f0f,_0x21cf48)=>bt(_0x54a4d6,'COMMENT_ARIA_LABEL',[_0x1d988c['author']['name'],_0x5dc202['formatDateTime'](_0x21cf48),new DOMParser()['parseFromString'](_0x3e4f0f,'text/html')['body']['textContent'],_0x1d988c['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x396338(_0x54a4d6,bt(_0x54a4d6,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x3b1487(),this['keystrokes']=new _0x1989d5(),this['focusCycler']=new _0x572537({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5f3b03=>_0x5f3b03['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):bt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?bt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):bt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x5730b7=new Ht(this['locale']);return _0x5730b7['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x58967c,_0x2f8015)=>_0x2f8015?_0x25dea0(_0x58967c,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x58967c),_0x5730b7;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x49b483=new Mt(this['locale'],this['_config']['editorConfig']);return _0x49b483['value']=this['_model']['content'],_0x49b483['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x49b483['submitLabel']=bt(this['locale'],'Save'),_0x49b483['on']('submit',(_0x4f5025,_0x2729c6)=>{this['fire']('updateComment',this['_model']['id'],_0x2729c6),this['switchToDisplayMode'](),this['focus']();}),_0x49b483['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x49b483['once']('editorReady',()=>{_0x49b483['focus']();}),_0x49b483['createEditor'](),_0x49b483['delegate']('editorReady')['to'](this),_0x49b483['delegate']('editorDestroyed')['to'](this),_0x49b483;}['_setupKeyboardNavigation'](){const _0x722f80=this['element'];this['keystrokes']['listenTo'](_0x722f80);for(const _0x11cd2d of this['focusables'])this['focusTracker']['add'](_0x11cd2d['element']),this['keystrokes']['listenTo'](_0x11cd2d['element']);this['focusables']['on']('change',(_0x5d7a7c,_0x5e5066)=>{for(const _0x45dfea of _0x5e5066['removed'])this['focusTracker']['remove'](_0x45dfea['element']),this['keystrokes']['stopListening'](_0x45dfea['element']);for(const _0x2c6f82 of _0x5e5066['added'])this['focusTracker']['add'](_0x2c6f82['element']),this['keystrokes']['listenTo'](_0x2c6f82['element']);}),this['keystrokes']['set']('enter',(_0x2da00f,_0x2240c3)=>{_0x722f80===_0x2da00f['target']&&(this['focusCycler']['focusFirst'](),_0x2240c3());}),this['keystrokes']['set']('esc',(_0x5cf4df,_0x4a6227)=>{_0x722f80!==_0x5cf4df['target']&&(this['focus'](),_0x4a6227());});}}class Ut extends/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x74a058(Ft){['actionBar'];['userView'];constructor(_0x5747d6,_0x4d16eb,_0x1eb6ca){super(_0x5747d6,_0x4d16eb,_0x1eb6ca),this['set']('actionIndicator',null),this['set']('placeholder',bt(_0x5747d6,'Reply...')),this['bind']('authoredAt')['to'](_0x4d16eb),this['bind']('resolvedAt')['to'](_0x4d16eb),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 _0x486d17(_0x5747d6,_0x4d16eb['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4d16eb,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0xc1e92c=this['bindTemplate'],_0x5d2e90=[{'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':_0xc1e92c['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xc1e92c['to']('authoredAt',_0x490e91=>this['_config']['formatDateTime'](_0x490e91))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0xc1e92c['if']('isEditMode','ck-comment__actions--hidden'),_0xc1e92c['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']&&_0x5d2e90['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0xc1e92c['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0xc1e92c['if']('isEditMode','ck-comment--edit'),_0xc1e92c['if']('isSystemComment','ck-comment--info'),_0xc1e92c['to']('actionIndicator',_0x29509a=>_0x29509a?'ck-comment--'+_0x29509a:'')],'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':_0x5d2e90}]}]};}['_createEditButton'](){const _0x23f190=new _0x733762(this['locale']);return _0x23f190['label']=bt(this['locale'],'Edit'),_0x23f190['icon']=_0x368ade,_0x23f190['withText']=!0x0,_0x23f190['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x23f190['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x333284=>!_0x333284),_0x23f190['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x23f190['on']('execute',()=>this['switchToEditMode']()),_0x23f190;}['_createRemoveButton'](){const _0x152233=new _0x733762(this['locale']);return _0x152233['label']=bt(this['locale'],'Remove'),_0x152233['icon']=_0x1baaff,_0x152233['withText']=!0x0,_0x152233['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x152233['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x42c041=>!_0x42c041),_0x152233['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x152233['on']('execute',()=>{this['showConfirm'](bt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x152233;}['_createDropdown'](){const _0xcd9cfe=it(this['locale'],_0x3cf895),_0x5c353b=_0xcd9cfe['panelView']['children'],_0x55abaf=new et(this['locale']),_0x3298d9=_0xcd9cfe['bindTemplate'];st(_0xcd9cfe,()=>this['items']['find'](_0x115492=>_0x115492['isVisible'])),_0xcd9cfe['extendTemplate']({'attributes':{'class':[_0x3298d9['if']('isVisible','ck-hidden',_0x4d4a91=>!_0x4d4a91)]}});const _0x4f07e1=(_0x87b108,_0x569092=-0x1)=>{const _0x1dd017=new nt(this['locale']);_0x1dd017['children']['add'](_0x87b108);const _0x3b7443=_0x569092>-0x1?_0x569092:_0x55abaf['items']['length'];_0x55abaf['items']['add'](_0x1dd017,_0x3b7443);const _0x4b213e=Array['from'](this['items']);_0xcd9cfe['unbind']('isEnabled','isVisible'),_0xcd9cfe['bind']('isEnabled')['toMany'](_0x4b213e,'isEnabled',(..._0x4c1d4e)=>_0x4c1d4e['some'](_0x5ccfd4=>_0x5ccfd4)),_0xcd9cfe['bind']('isVisible')['toMany'](_0x4b213e,'isVisible',(..._0x36dad4)=>_0x36dad4['some'](_0x125b86=>_0x125b86));};_0xcd9cfe['panelPosition']='sw',_0xcd9cfe['buttonView']['set']({'label':bt(this['locale'],'Show\x20more\x20items'),'icon':_0xb22004});for(const _0x191ec7 of this['items'])_0x4f07e1(_0x191ec7);return _0x5c353b['add'](_0x55abaf),_0xcd9cfe['listenTo'](this['items'],'add',(_0x22a095,_0x26d3ef,_0x44d21a)=>{_0x4f07e1(_0x26d3ef,_0x44d21a);}),_0xcd9cfe['listenTo'](this['items'],'remove',(_0x3251cc,_0x55052e,_0x3cc0b0)=>{_0x55abaf['items']['remove'](_0x3cc0b0);}),_0xcd9cfe;}['_attachActions'](_0x60a0b3,_0x396a52){const _0x3e2c44=_0x60a0b3&&_0x60a0b3['element'];_0x3e2c44&&(this['listenTo'](_0x3e2c44,'mouseenter',()=>this['actionIndicator']=_0x396a52),this['listenTo'](_0x3e2c44,'focus',()=>this['actionIndicator']=_0x396a52),this['listenTo'](_0x3e2c44,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3e2c44,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x5ca514=super['_createCommentInputView']();return _0x5ca514['bind']('placeholder')['to'](this),_0x5ca514;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Wt(_0x3ac7f4){const _0x1c2d4c=_0x9ac7ea(_0x3ac7f4,0x1e),_0x455dfd=new MutationObserver(_0x132f48=>{for(const _0x3d5503 of _0x132f48)('attributes'==_0x3d5503['type']&&'class'==_0x3d5503['attributeName']||'childList'==_0x3d5503['type']||'characterData'==_0x3d5503['type'])&&_0x1c2d4c();});return{'attach'(_0x2c190a){_0x455dfd['observe'](_0x2c190a,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x455dfd['disconnect'](),_0x1c2d4c['cancel']();}};}class Kt extends _0x4938be{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x6dc82,_0x623b83){super(_0x6dc82),this['id']=_0x588627(),this['focusTracker']=new _0x3b1487(),this['keystrokes']=new _0x1989d5(),this['keystrokes']['set']('Esc',(_0x5d5aee,_0xec6371)=>this['fire']('Esc',_0xec6371)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Wt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x623b83),this['mainView']=_0x623b83;const _0x597c40=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x597c40['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 _0x46e94f=this['element']['clientHeight'];_0x46e94f&&(this['height']=_0x46e94f);}}class Yt extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1a473d(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4cb2e1,target:_0x3fdb8a,type:_0x3fa855,isVisible:_0x3c55fe=!0x0}){super(),this['view']=_0x4cb2e1,this['view']['element']||this['view']['render'](),this['_type']=_0x3fa855,this['_target']=_0x3fdb8a,Yt['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x53f197([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x36f805,_0x34c380)=>{this['view']['focusTracker']['add'](_0x34c380);}),this['focusableElements']['on']('remove',(_0x21f89c,_0x207908)=>{this['view']['focusTracker']['remove'](_0x207908);}),this['set']('isVisible',_0x3c55fe);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2f0f3b=this['_getNormalizedTarget']();return Yt['_assertCorrectTarget'](_0x2f0f3b),_0x2f0f3b;}get['targetRect'](){const _0x2792b2=this['target'];if(null===_0x2792b2)return null;if(_0x2792b2 instanceof _0x981c3)return _0x2792b2;const _0x78f73c=_0x2792b2['filter'](_0x2750e4=>function(_0x15f393){const _0x525981=_0x15f393['offsetParent'];if(_0x525981)return!0x0;const _0x46a1e1=_0x15f393['getClientRects']()['item'](0x0);return!!_0x46a1e1;}(_0x2750e4));return 0x0===_0x78f73c['length']?null:_0x981c3['getDomElementRects'](_0x78f73c[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x455bd6){this['view']['isActive']=_0x455bd6,this['view']['mainView']['isActive']=_0x455bd6;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x34bc32){if(!(null===_0x34bc32||_0x34bc32 instanceof _0x981c3||Array['isArray'](_0x34bc32)&&_0x34bc32['every'](_0x194cb2=>Gt(_0x194cb2))))throw new _0x22c1ce('annotation-invalid-target',null,{'target':_0x34bc32});}['_getNormalizedTarget'](){const _0x126a63='function'==typeof this['_target']?this['_target']():this['_target'];return Gt(_0x126a63)?[_0x126a63]:_0x126a63;}}function Gt(_0x4b10fb){return null!==_0x4b10fb&&'object'==typeof _0x4b10fb&&'nodeType'in _0x4b10fb&&0x1===_0x4b10fb['nodeType'];}class jt extends _0x53f197{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3484d5=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3b1487(),this['_focusTracker']['on']('change:isFocused',(_0x4a84aa,_0x51194a,_0xa05c7d)=>{_0xa05c7d||this['fire']('blur');});for(const _0x5ef8be of _0x3484d5)this['add'](_0x5ef8be);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x31f5ad){if(this['has'](_0x31f5ad))throw new _0x22c1ce('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x31f5ad['innerView'],_0x31f5ad),this['_viewToAnnotation']['set'](_0x31f5ad['view'],_0x31f5ad);for(const _0x38f5db of _0x31f5ad['focusableElements'])this['_focusTracker']['add'](_0x38f5db);this['listenTo'](_0x31f5ad['focusableElements'],'add',(_0x1e24bb,_0x43278a)=>{this['_focusTracker']['add'](_0x43278a);}),this['listenTo'](_0x31f5ad['focusableElements'],'remove',(_0x12092a,_0x358e8d)=>{this['_focusTracker']['remove'](_0x358e8d);}),this['listenTo'](_0x31f5ad['view']['focusTracker'],'change:isFocused',(_0x35a953,_0x116dbb,_0x25fc56)=>{_0x25fc56&&this['fire']('focus',_0x31f5ad);}),_0x31f5ad['updateTargetRect']();const _0x183fbd=this['_getOrderInContent'](_0x31f5ad['view']['targetRect']);return super['add'](_0x31f5ad,_0x183fbd);}['remove'](_0x106b66){if(!this['has'](_0x106b66))throw new _0x22c1ce('annotationcollection-not-existing-item',null);this['stopListening'](_0x106b66['view']['focusTracker']),this['stopListening'](_0x106b66['focusableElements']);for(const _0x1a1cd5 of _0x106b66['focusableElements'])this['_focusTracker']['remove'](_0x1a1cd5);return this['_viewToAnnotation']['delete'](_0x106b66['view']),this['_innerViewToAnnotation']['delete'](_0x106b66['innerView']),super['remove'](_0x106b66);}['getByInnerView'](_0x3ae728){return this['_innerViewToAnnotation']['get'](_0x3ae728);}['getByView'](_0x4fd44b){return this['_viewToAnnotation']['get'](_0x4fd44b);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x231289 of this)_0x231289['updateTargetRect']();this['_sort']();}['_sort'](){const _0x252af3=Array['from'](this)['sort']((_0x5a98f0,_0x4544aa)=>qt(_0x5a98f0['view']['targetRect'],_0x4544aa['view']['targetRect']));for(let _0x121dd7=_0x252af3['length']-0x1;_0x121dd7>0x0;_0x121dd7--){const _0x551ef6=_0x252af3[_0x121dd7];_0x121dd7!==this['getIndex'](_0x551ef6)&&(this['remove'](_0x551ef6),this['add'](_0x551ef6));}}['_getOrderInContent'](_0xe0398c){let _0x30bfdb=0x0;if(!_0xe0398c)return this['length'];for(const _0x254f3c of this){const _0x255103=_0x254f3c['view']['targetRect'];if(_0x255103){if(qt(_0xe0398c,_0x255103)<0x0)return _0x30bfdb;_0x30bfdb++;}}return _0x30bfdb;}}function Xt({source:_0x412fed,target:_0x326c77,filter:_0x38efa1}){for(const _0x3d07eb of _0x412fed)_0x38efa1(_0x3d07eb)&&_0x326c77['add'](_0x3d07eb);_0x326c77['listenTo'](_0x412fed,'add',(_0x1e3d30,_0x2f146a)=>{_0x38efa1(_0x2f146a)&&_0x326c77['add'](_0x2f146a);}),_0x326c77['listenTo'](_0x412fed,'remove',(_0x7b9c6f,_0x4fd624)=>{_0x326c77['has'](_0x4fd624)&&_0x326c77['remove'](_0x4fd624);});}function qt(_0x2848da,_0x5890b4){if(null===_0x2848da&&null===_0x5890b4)return 0x0;if(null===_0x2848da)return-0x1;if(null===_0x5890b4)return 0x1;const _0x2f7cb9=_0x2848da['top']-_0x5890b4['top'];return 0x0==_0x2f7cb9?_0x2848da['left']-_0x5890b4['left']:_0x2f7cb9;}class $t extends _0x4770a4{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe44ec4){if(super(_0xe44ec4),this['collection']=new jt(),this['_visibleAnnotations']=new jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xe44ec4 instanceof _0x34ca7b){const _0x1aa124=_0xe44ec4['locale'];_0xe44ec4['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':bt(_0x1aa124,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':bt(_0x1aa124,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':bt(_0x1aa124,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':bt(_0x1aa124,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':bt(_0x1aa124,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':bt(_0x1aa124,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':bt(_0x1aa124,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x43085e){this['collection']['add'](_0x43085e);}['remove'](_0x28d5a9){this['collection']['remove'](_0x28d5a9),_0x28d5a9['destroy']();}['refreshVisibility'](){for(const _0x40eeb2 of this['collection'])_0x40eeb2['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x11f9a1){return this['collection']['getByInnerView'](_0x11f9a1);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5a2d32 of this['collection'])_0x5a2d32['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x43b6ad){this['fire']('_activateAnnotation',_0x43b6ad);}['createAnnotation'](_0x47547c){return new Yt(_0x47547c);}['createAnnotationView'](_0x16af75,_0x5da43e){return new Kt(_0x16af75,_0x5da43e);}['_addActiveAnnotation'](_0x2c9d24){const _0x16fb95=new Set(this['activeAnnotations']);_0x16fb95['add'](_0x2c9d24),this['activeAnnotations']=_0x16fb95;}['_removeActiveAnnotation'](_0x4ab89d){const _0x4c6279=new Set(this['activeAnnotations']);_0x4c6279['delete'](_0x4ab89d),this['activeAnnotations']=_0x4c6279;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5cab11=this['collection'],_0x57c09f=this['_visibleAnnotations'];function _0x4221f1(_0x41f4ef){const _0x3014ff=_0x41f4ef['source'];_0x3014ff['isVisible']&&!_0x57c09f['has'](_0x3014ff)?_0x57c09f['add'](_0x3014ff):!_0x3014ff['isVisible']&&_0x57c09f['has'](_0x3014ff)&&_0x57c09f['remove'](_0x3014ff),_0x3014ff['view']['focusTracker']['remove'](_0x3014ff['view']['element']),_0x3014ff['view']['focusTracker']['add'](_0x3014ff['view']['element']);}this['listenTo'](_0x5cab11,'add',(_0x5e11ae,_0x34f15d)=>{_0x34f15d['isVisible']&&_0x57c09f['add'](_0x34f15d),this['listenTo'](_0x34f15d,'change:isVisible',_0x4221f1);}),this['listenTo'](_0x5cab11,'remove',(_0x5af5a9,_0x2a47c4)=>{_0x57c09f['has'](_0x2a47c4)&&_0x57c09f['remove'](_0x2a47c4),this['stopListening'](_0x2a47c4,'change:isVisible',_0x4221f1);});}['_setupEnterAnnotationKeystroke'](){const _0x4aa91b=_0x5295b4=>{_0x5295b4['on']('ready',()=>{_0x5295b4['keystrokes']['set'](_0x2636b1,(_0xb66ad6,_0x448a41)=>{const _0x506243=_0x22c885(this['activeAnnotations']['values']());_0x506243&&(_0x506243['view']['focus'](),_0x448a41());});});};this['context']instanceof _0x34ca7b?_0x4aa91b(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5f3561,_0x45242a)=>{_0x4aa91b(_0x45242a);});}['_setupEscapeAnnotationHandling'](){const _0x149f5e=_0x1526b0=>{const _0x1849a5=_0x1526b0['source'],_0x1311ec=[];let _0x3db448;if(Array['isArray'](_0x1849a5['target'])){_0x3db448=_0x1849a5['target'][0x0],this['context']instanceof _0x34ca7b?_0x1311ec['push'](this['context']):this['context']['editors']&&_0x1311ec['push'](...this['context']['editors']);for(const _0x517ed2 of _0x1311ec)for(const _0x4bd2cf of _0x517ed2['editing']['view']['domRoots']['values']())if(_0x4bd2cf['contains'](_0x3db448))return void _0x517ed2['editing']['view']['focus']();_0x3db448['focus']();}};this['listenTo'](this['collection'],'add',(_0x70ef44,_0x1312cb)=>{this['listenTo'](_0x1312cb,'escape',_0x149f5e,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x579197,_0x23ffdb)=>{this['stopListening'](_0x23ffdb,'escape',_0x149f5e);});}}const zt=Symbol('noChannel'),Jt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class Qt extends _0x4770a4{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[$t,_0xc2d06c,_0x3468b4];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f137e){super(_0x3f137e),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x49d844=this['context']['config'];_0x49d844['define']('comments.maxCommentsWhenCollapsed',0x2),_0x49d844['define']('comments.maxThreadTotalWeight',0x1f4),_0x49d844['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x49d844['define']('comments.CommentThreadView',Bt),_0x49d844['define']('comments.CommentView',Ut),_0x49d844['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xbcb81d=this['context']['plugins']['get']($t);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x1b686f,_0x420445)=>this['_addCommentThread'](_0x420445)),this['on']('submitCommentThread',(_0x3f7ab0,_0x558b5e)=>this['_submitCommentThread'](_0x558b5e)),this['on']('resolveCommentThread',(_0x41867e,_0x30d963)=>this['_resolveCommentThread'](_0x30d963)),this['on']('resolveCommentThread',(_0x18a3e4,_0x548631)=>this['_updateActiveAnnotation'](_0x548631),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x19825a,_0x59daf6)=>this['_reopenCommentThread'](_0x59daf6)),this['on']('reopenCommentThread',(_0x3970b9,_0x5e4ea4)=>this['_updateActiveAnnotation'](_0x5e4ea4),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5b8a1c,_0x256ca3)=>this['_removeCommentThread'](_0x256ca3)),this['on']('updateCommentThread',(_0x11cadf,_0x3fb13a)=>this['_updateCommentThread'](_0x3fb13a)),this['on']('updateCommentThread',(_0x4907ed,_0x27f245)=>this['_updateActiveAnnotation'](_0x27f245),{'priority':'lowest'}),this['on']('addComment',(_0x5b65df,_0x58f789)=>this['_addComment'](_0x58f789)),this['on']('updateComment',(_0x2307bc,_0x3016d0)=>this['_updateComment'](_0x3016d0)),this['on']('removeComment',(_0x5293cc,_0x2d8abe)=>this['_removeComment'](_0x2d8abe)),this['on']('addComment',(_0x4b7f6d,{threadId:_0x1e8014,isFromAdapter:_0x3b4860})=>{if(_0x3b4860)return;const _0x5ac9f2=this['getCommentThread'](_0x1e8014),_0x3ddeff=_0x5ac9f2&&this['_threadToController']['get'](_0x5ac9f2);_0x3ddeff&&_0x3ddeff['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xbcb81d,'change:activeAnnotations',(_0x55a27b,_0x3fd3ca,_0x25e5af)=>{const _0x22cb95=Array['from'](_0x25e5af)['map'](_0x1c4e7b=>this['_viewToController']['get'](_0x1c4e7b['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x22cb95?_0x22cb95['model']:null;});}set['adapter'](_0x5b88e1){if(this['_adapter'])throw new _0x22c1ce('commentsrepository-adapter-already-set');this['_adapter']=_0x5b88e1;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x1fe436=zt,threadId:_0x4b7c1b=_0x588627(),comments:_0x243cc1=[],unlinkedAt:_0x4393fb=null,resolvedAt:_0x184280=null,resolvedBy:_0x3e429a=null,target:_0x49d8b4=null,context:_0x27e0dd=null,attributes:_0x71bbdd={},isResolvable:_0x54a791=!0x0,isSubmitted:_0x4cb53a=!0x1,isFromAdapter:_0xd230a7=!0x1}={}){return this['fire'](ii('addCommentThread',_0x1fe436),{'channelId':_0x1fe436,'threadId':_0x4b7c1b,'comments':_0x243cc1,'unlinkedAt':_0x4393fb,'resolvedAt':_0x184280,'resolvedBy':_0x3e429a,'target':_0x49d8b4,'context':_0x27e0dd,'attributes':_0x71bbdd,'isFromAdapter':_0xd230a7,'isResolvable':_0x54a791,'isSubmitted':_0x4cb53a}),this['getCommentThread'](_0x4b7c1b);}['openNewCommentThread']({channelId:_0x469706=zt,threadId:_0xaca50f=_0x588627(),target:_0x19ba2a,context:_0x216355=null,isResolvable:_0x3ab91d=!0x0}){if(this['_readOnlyChannels']['has'](_0x469706)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x19ba2a)throw new _0x22c1ce('commentsrepository-missing-target');const _0x1d7f0d=this['addCommentThread']({'channelId':_0x469706,'threadId':_0xaca50f,'target':_0x19ba2a,'context':_0x216355,'isResolvable':_0x3ab91d});if(!_0x1d7f0d)return null;const _0x1a41fb=this['_threadToController']['get'](_0x1d7f0d),_0x4ca5fd=_0x1a41fb['view']['commentThreadInputView']['commentInputView'],_0x542e98=this['context']['plugins']['get']($t),_0x239cf0=_0x542e98['getByInnerView'](_0x1a41fb['view']);return _0x542e98['activate'](_0x239cf0),_0x4ca5fd['once']('editorReady',()=>_0x4ca5fd['focus']()),_0x1d7f0d;}['hasCommentThread'](_0x2e8ed3){if('string'!=typeof _0x2e8ed3)throw new _0x22c1ce('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2e8ed3);}['updateCommentThread']({channelId:_0x17a1d3=zt,threadId:_0x595599,context:_0x451fe1,unlinkedAt:_0x2da628,attributes:_0x415a9a,isFromAdapter:_0x48ff92=!0x1}){return this['fire'](ii('updateCommentThread',_0x17a1d3),{'channelId':_0x17a1d3,'threadId':_0x595599,'context':_0x451fe1,'unlinkedAt':_0x2da628,'attributes':_0x415a9a,'isFromAdapter':_0x48ff92}),this['getCommentThread'](_0x595599);}['getCommentThread'](_0x172f1d){if('string'!=typeof _0x172f1d)throw new _0x22c1ce('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x172f1d);}['fetchCommentThread']({channelId:_0x50c3e4,threadId:_0xbec50}={}){const _0x385065=this['getCommentThread'](_0xbec50);if(_0x385065)return Promise['resolve'](_0x385065);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x22c1ce('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x50c3e4,'threadId':_0xbec50})['then'](_0x300972=>this['hasCommentThread'](_0xbec50)?this['getCommentThread'](_0xbec50):_0x300972?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x50c3e4},_0x300972)):void 0x0)['catch'](_0x551bf4=>{throw console['error'](_0x551bf4),new _0x22c1ce('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0xb42814,skipNotAttached:_0x6722c3=!0x1,skipEmpty:_0x22de97=!0x1,toJSON:_0x37e9f3=!0x1}={}){const _0x1fbe05=[];for(const _0xdfd884 of this['_threads']['values']())_0xb42814&&_0xdfd884['channelId']!==_0xb42814||_0x6722c3&&!_0xdfd884['isAttached']||_0x22de97&&0x0===_0xdfd884['length']||_0x1fbe05['push'](_0xdfd884);return _0x37e9f3?_0x1fbe05['map'](_0x39a1dd=>_0x39a1dd['toJSON']()):_0x1fbe05;}['getAnnotationForCommentThread'](_0x3d3be5){const _0x1e0266=this['_threadToController']['get'](_0x3d3be5);if(!_0x1e0266)return null;return this['context']['plugins']['get']($t)['getByInnerView'](_0x1e0266['view'])||null;}['getCommentThreadForAnnotation'](_0x3736e7){const _0x1cb883=this['_viewToController']['get'](_0x3736e7['innerView']);return _0x1cb883?_0x1cb883['model']:null;}['setActiveCommentThread'](_0x5b8c53){const _0x33973f=this['context']['plugins']['get']($t);if(!_0x5b8c53)return void(this['activeCommentThread']&&_0x33973f['deactivateAll']());const _0x45288e=this['getCommentThread'](_0x5b8c53);if(!_0x45288e)throw new _0x22c1ce('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5b8c53});if(!this['_threadToController']['has'](_0x45288e))throw new _0x22c1ce('commentsrepository-active-not-attached',null,{'threadId':_0x5b8c53});const _0x5fe601=_0x33973f['getByInnerView'](this['_threadToController']['get'](_0x45288e)['view']);_0x33973f['activate'](_0x5fe601);}['switchReadOnly'](_0x19409c,_0x4f5c09){_0x19409c?this['_readOnlyChannels']['add'](_0x4f5c09):this['_readOnlyChannels']['delete'](_0x4f5c09),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x17d01c){return this['_readOnlyChannels']['has'](_0x17d01c)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x56048a,_0x28f58c){return new It(_0x56048a,_0x28f58c);}['setPermissions'](_0x180aee,_0xf0c01d=zt){this['_permissions']['set'](_0xf0c01d,_0x180aee),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5e91e6=zt){return this['_permissions']['has'](_0x5e91e6)?this['_permissions']['get'](_0x5e91e6):Jt;}['_addCommentThread']({channelId:_0x424bb5,threadId:_0x30df6c,comments:_0x173859,unlinkedAt:_0x481ff0,resolvedAt:_0x31dcc8,resolvedBy:_0x191443,target:_0x40be4f,context:_0x568d60,attributes:_0x235eef,isFromAdapter:_0x299855,isResolvable:_0x133330,isSubmitted:_0x18a121}){if('string'!=typeof _0x30df6c)throw new _0x22c1ce('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x30df6c});if(this['hasCommentThread'](_0x30df6c))throw new _0x22c1ce('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x30df6c});const _0x4f3c08=new Zt(this,{'channelId':_0x424bb5,'id':_0x30df6c,'context':_0x568d60,'attributes':_0x235eef,'unlinkedAt':_0x481ff0,'resolvedAt':_0x31dcc8,'resolvedBy':_0x191443?this['context']['plugins']['get'](_0x3468b4)['getUser'](_0x191443):null,'isResolvable':_0x133330,'isSubmitted':_0x18a121||_0x299855});this['_threads']['set'](_0x30df6c,_0x4f3c08);for(const _0xdc74f of _0x173859)_0x4f3c08['_add'](this['_createNewComment']({'threadId':_0x30df6c,..._0xdc74f}));return _0x40be4f&&_0x4f3c08['attachTo'](_0x40be4f),_0x299855||!_0x4f3c08['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x424bb5,'threadId':_0x30df6c});}['_submitCommentThread']({channelId:_0x2688c8,threadId:_0x275410}){if(!this['hasCommentThread'](_0x275410))throw new _0x22c1ce('commentsrepository-missing-comment-thread',this);const _0x157f00=this['getCommentThread'](_0x275410);if(_0x157f00['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x318d4c,comments:_0x749efd,resolvedAt:_0x5ee751,resolvedBy:_0x3a8b4b,context:_0x468352,attributes:_0x3d8d84}=_0x157f00,_0x576122=this['context']['plugins']['get']('PendingActions'),_0x2ef685=_0x576122['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2688c8,'threadId':_0x318d4c,'comments':_0x749efd['map'](_0x3efd2c=>_0x3efd2c['toJSON']()),'resolvedAt':_0x5ee751,'resolvedBy':_0x3a8b4b?_0x3a8b4b['id']:_0x3a8b4b,'context':_0x468352,'attributes':_0x3d8d84})['then'](({comments:_0x2546c5})=>{_0x576122['remove'](_0x2ef685);for(const _0x176a3b of _0x2546c5)this['_updateComment']({'channelId':_0x2688c8,'threadId':_0x275410,'commentId':_0x176a3b['commentId'],'createdAt':_0x176a3b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3fa168=>{throw console['error'](_0x3fa168),new _0x22c1ce('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x1faae8,target:_0x44303a}){const _0x4cac95=this['getCommentThread'](_0x1faae8);if(!_0x4cac95)throw new _0x22c1ce('commentsrepository-attach-missing-comment-thread',this);const _0x4515c7=this['context']['plugins']['get']('PendingActions'),_0x20c7cb=this['context']['plugins']['get']($t),_0x556499=this['_createCommentThreadView'](_0x4cac95),_0x3bc164=new It(_0x4cac95,_0x556499);let _0xc0f2ed=null;_0x556499['on']('change:isDirty',(_0x4511f7,_0x4ff546,_0x85d173)=>{_0x85d173?_0xc0f2ed=_0x4515c7['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xc0f2ed&&(_0x4515c7['remove'](_0xc0f2ed),_0xc0f2ed=null);}),this['_threadToController']['set'](_0x4cac95,_0x3bc164),this['_viewToController']['set'](_0x556499,_0x3bc164);const _0x51de46=new Kt(this['context']['locale'],_0x556499);_0x51de46['bind']('length')['to'](_0x556499),_0x51de46['bind']('isDirty')['to'](_0x556499,'isDirty',_0x556499,'length',(_0x30cee9,_0x509476)=>_0x30cee9||!_0x509476),_0x51de46['bind']('isActive')['to'](_0x556499),_0x51de46['type']='comment';const _0x232958=new Yt({'view':_0x51de46,'target':_0x44303a,'type':'comment','isVisible':!_0x4cac95['archivedAt']&&!!('function'==typeof _0x44303a?_0x44303a():_0x44303a)});return _0x556499['on']('escape',()=>{_0x232958['fire']('escape');}),this['_bindAnnotationToEditors'](_0x556499,_0x232958),_0x20c7cb['add'](_0x232958),_0x232958;}['_bindAnnotationToEditors'](_0x1426f7,_0x41e564){this['listenTo'](_0x1426f7,'editorReady',(_0x4c8f28,_0x5195a4)=>{const _0x2c2a87=_0x5195a4['ui']['view']['body']['bodyCollectionContainer'];_0x41e564['focusableElements']['add'](_0x2c2a87),this['context']instanceof _0x34ca7b&&this['context']['ui']['focusTracker']['add'](_0x2c2a87);},{'priority':'highest'}),this['listenTo'](_0x1426f7,'editorDestroyed',(_0x147358,_0xb1ef1a)=>{const _0x1706a6=_0xb1ef1a['ui']['view']['body']['bodyCollectionContainer'];_0x41e564['focusableElements']['has'](_0x1706a6)&&_0x41e564['focusableElements']['remove'](_0x1706a6),this['context']instanceof _0x34ca7b&&this['context']['ui']['focusTracker']['remove'](_0x1706a6);});}['_unbindEditors'](_0x2005d7){this['stopListening'](_0x2005d7,'editorReady'),this['stopListening'](_0x2005d7,'editorDestroyed');}['_createCommentThreadView'](_0x369d40){const _0x4458d6=this['context']['plugins']['get'](_0x3468b4),{config:_0x57d413,locale:_0x1ea7b6}=this['context'],_0x4eb16e=_0x26db8e(_0x57d413['get']('locale'),_0x1ea7b6);return new(0x0,(_0x57d413['get']('comments'))['CommentThreadView'])(_0x1ea7b6,_0x369d40,_0x4458d6['me'],{'editorConfig':{..._0x57d413['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x57d413['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x57d413['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x57d413['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x57d413['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4eb16e,'CommentView':_0x57d413['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3b8b04,channelId:_0x4fe25a,resolvedAt:_0x2370f1,resolvedBy:_0x3f1f99,isFromAdapter:_0x5d34b6}){if(!this['hasCommentThread'](_0x3b8b04))throw new _0x22c1ce('commentsrepository-missing-comment-thread',null,{'threadId':_0x3b8b04});const _0x2a1d1a=this['getCommentThread'](_0x3b8b04);if(_0x2a1d1a['isResolved'])throw new _0x22c1ce('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3b8b04});const _0x35ea1f=this['context']['plugins']['get'](_0x3468b4);if(_0x2a1d1a['resolvedBy']=_0x35ea1f['getUser'](_0x3f1f99),_0x2a1d1a['resolvedAt']=_0x2370f1,_0x5d34b6||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4ed7a2=this['context']['plugins']['get']('PendingActions'),_0x471a8f=_0x4ed7a2['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4fe25a,'threadId':_0x3b8b04})['then'](({resolvedAt:_0x38bdf5,resolvedBy:_0x54df6e})=>{_0x4ed7a2['remove'](_0x471a8f),_0x2a1d1a['resolvedBy']['id']!==_0x54df6e&&(_0x2a1d1a['resolvedBy']=_0x35ea1f['getUser'](_0x54df6e)),_0x2a1d1a['resolvedAt']=_0x38bdf5;})['catch'](_0x480cbd=>{throw console['error'](_0x480cbd),new _0x22c1ce('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x499ac8,channelId:_0x4e3d6a,isFromAdapter:_0x42508e}){if(!this['hasCommentThread'](_0x499ac8))throw new _0x22c1ce('commentsrepository-missing-comment-thread',null,{'threadId':_0x499ac8});const _0x375f7a=this['getCommentThread'](_0x499ac8);if(!_0x375f7a['isResolved'])throw new _0x22c1ce('commentsrepository-reopen-comment-thread',null,{'threadId':_0x499ac8});if(_0x375f7a['resolvedBy']=null,_0x375f7a['resolvedAt']=null,_0x42508e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x474baf=this['context']['plugins']['get']('PendingActions'),_0x53ad01=_0x474baf['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4e3d6a,'threadId':_0x499ac8})['then'](()=>_0x474baf['remove'](_0x53ad01))['catch'](_0x39773c=>{throw console['error'](_0x39773c),new _0x22c1ce('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2c009d,isFromAdapter:_0x194685}){const _0x43adf3=this['getCommentThread'](_0x2c009d);if(!_0x43adf3)throw new _0x22c1ce('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2c009d),this['_threads']['delete'](_0x2c009d),!_0x43adf3['isSubmitted']||_0x194685||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x17be1a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5d08a3}=_0x43adf3,_0x362b71=_0x17be1a['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5d08a3,'threadId':_0x2c009d})['then'](()=>_0x17be1a['remove'](_0x362b71))['catch'](_0x403286=>{throw console['error'](_0x403286),new _0x22c1ce('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2f7154,unlinkedAt:_0x39ccd3,context:_0x25a20e,attributes:_0x5d1242,isFromAdapter:_0x358be2}){if('string'!=typeof _0x2f7154)throw new _0x22c1ce('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2f7154});if(!this['hasCommentThread'](_0x2f7154))throw new _0x22c1ce('commentsrepository-missing-comment-thread',null,{'threadId':_0x2f7154});const _0x17f568=this['getCommentThread'](_0x2f7154);let _0x3e9450=!0x1;if(void 0x0!==_0x25a20e&&_0x17f568['context']!==_0x25a20e&&(_0x17f568['context']=_0x25a20e,_0x3e9450=!0x0),void 0x0!==_0x39ccd3&&_0x17f568['unlinkedAt']!==_0x39ccd3&&(_0x17f568['unlinkedAt']=_0x39ccd3,_0x3e9450=!0x0),_0x5d1242&&!_0x11f450(_0x5d1242,_0x17f568['attributes'])&&(_0x17f568['attributes']=_0x5d1242,_0x3e9450=!0x0),!_0x3e9450)return Promise['resolve']();if(!_0x17f568['isSubmitted']||_0x358be2||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xc80dd2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x118780}=_0x17f568,_0x37376c=_0xc80dd2['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x118780,'threadId':_0x2f7154,'context':_0x25a20e,'unlinkedAt':_0x39ccd3,'attributes':_0x5d1242})['then'](()=>_0xc80dd2['remove'](_0x37376c))['catch'](_0x474e81=>{throw console['error'](_0x474e81),new _0x22c1ce('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2a45b6){const _0x20107b=this['context']['plugins']['get']($t),_0x2115fd=this['getCommentThread'](_0x2a45b6);if(_0x2115fd['_isAttached']=!0x1,this['_threadToController']['has'](_0x2115fd)){const _0x2e6698=this['_threadToController']['get'](_0x2115fd),_0xcb9fd5=_0x2e6698['view'],_0x28b44c=_0x20107b['getByInnerView'](_0xcb9fd5);this['_threadToController']['delete'](_0x2115fd),this['_viewToController']['delete'](_0xcb9fd5),_0x28b44c&&_0x20107b['remove'](_0x28b44c),_0x2e6698['destroy'](),_0xcb9fd5['destroy']()['then'](()=>{this['_unbindEditors'](_0xcb9fd5);});}}['_updateActiveAnnotation']({threadId:_0xf11a30,resolvedAt:_0x416be9,unlinkedAt:_0x5aa93b}){const _0xe427d5=!!_0x416be9,_0x5782b0=this['context']['plugins']['get']($t),_0x113c16=this['getCommentThread'](_0xf11a30);if(this['_threadToController']['has'](_0x113c16)){const _0x5c3895=this['_threadToController']['get'](_0x113c16)['view'],_0x1a80fb=_0x5782b0['getByInnerView'](_0x5c3895);_0x1a80fb&&(_0xe427d5&&_0x5782b0['_removeActiveAnnotation'](_0x1a80fb),_0x5aa93b?_0x1a80fb['isVisible']=!0x1:_0x1a80fb['refreshVisibility']());}}['_getExternalAuthor'](_0xe1da84){const _0x28a9a9=this['context']['plugins']['get'](_0x3468b4),_0x3d5983=_0x5e92c9('external:'+_0xe1da84),_0x5675c9=_0x28a9a9['getUser'](_0x3d5983);return _0x5675c9||_0x28a9a9['addUser']({'id':_0x3d5983,'name':_0xe1da84});}['_createNewComment']({threadId:_0x483fd3,commentId:_0x433765=_0x588627(),content:_0x24f6cc,authorId:_0x50932a,createdAt:_0x2aa00f,attributes:_0x345900}){if('string'!=typeof _0x433765)throw new _0x22c1ce('commentsrepository-invalid-commentid');if('string'!=typeof _0x50932a)throw new _0x22c1ce('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x24f6cc||!_0x24f6cc['trim']())throw new _0x22c1ce('commentsrepository-invalid-comment-content');const _0x126c86=this['context']['plugins']['get'](_0x3468b4)['getUser'](_0x50932a);if(!_0x126c86)throw new _0x22c1ce('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x50932a});let _0x4e1163=null,_0xd5b744=_0x2aa00f;return _0x345900?.['@external']&&(_0x4e1163=this['_getExternalAuthor'](_0x345900['@external']['authorName']),_0xd5b744=new Date(_0x345900['@external']['createdAt'])),new ti(this,{'threadId':_0x483fd3,'id':_0x433765,'author':_0x4e1163||_0x126c86,'creator':_0x126c86,'content':_0x24f6cc,'createdAt':_0x2aa00f,'authoredAt':_0xd5b744,'attributes':_0x345900});}['_addComment'](_0x2cd016){let {threadId:_0x11e821,content:_0x41e374,attributes:_0x57081c,isFromAdapter:_0x390693}=_0x2cd016;const _0x1c32be=this['getCommentThread'](_0x2cd016['threadId']);if(!_0x1c32be)throw new _0x22c1ce('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x18bb23=this['_createNewComment'](_0x2cd016),{id:_0xcbf3c2}=_0x18bb23;if(_0x1c32be['_add'](_0x18bb23),_0x390693||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1c32be['isSubmitted'])return Promise['resolve']();const _0x9b311e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x14987c}=_0x1c32be,_0x121448=_0x9b311e['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x57081c||(_0x57081c={}),this['adapter']['addComment']({'channelId':_0x14987c,'threadId':_0x11e821,'commentId':_0xcbf3c2,'content':_0x41e374,'attributes':_0x57081c})['then'](_0x10ecf1=>{_0x9b311e['remove'](_0x121448),_0x10ecf1&&this['_updateComment']({'channelId':_0x14987c,'threadId':_0x11e821,'commentId':_0xcbf3c2,'createdAt':_0x10ecf1['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4fa1e6=>{throw console['error'](_0x4fa1e6),new _0x22c1ce('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x51c6c9,commentId:_0x7460ce,content:_0x445b04,createdAt:_0x109a72,attributes:_0x2dadcb,isFromAdapter:_0x4562d1}){if(void 0x0!==_0x445b04&&('string'!=typeof _0x445b04||!_0x445b04['trim']()['length']))throw new _0x22c1ce('commentsrepository-update-comment-invalid-content');const _0x3e6c3e=this['getCommentThread'](_0x51c6c9),_0xda8bf1=_0x3e6c3e['getComment'](_0x7460ce);if(!_0xda8bf1)throw new _0x22c1ce('commentsrepository-update-missing-comment',this);let _0x391591=!0x1;if(_0x445b04&&_0x445b04!==_0xda8bf1['content']&&(_0xda8bf1['isEditable']||_0x4562d1)&&(_0xda8bf1['content']=_0x445b04,_0x391591=!0x0),_0x109a72&&_0x109a72!==_0xda8bf1['createdAt']&&(_0xda8bf1['createdAt']=_0x109a72,_0xda8bf1['attributes']&&_0xda8bf1['attributes']['@external']||(_0xda8bf1['authoredAt']=_0x109a72),_0x391591=!0x0),_0x2dadcb&&!_0x11f450(_0x2dadcb,_0xda8bf1['attributes'])&&(_0xda8bf1['attributes']=_0x2dadcb,_0x391591=!0x0),!_0x391591)return Promise['resolve']();if(_0x3e6c3e['fire']('commentUpdated'),_0x4562d1||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x414335=this['context']['plugins']['get']('PendingActions'),{channelId:_0x51069e}=this['getCommentThread'](_0xda8bf1['threadId']),_0x2e9a5a=_0x414335['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x51069e,'threadId':_0x51c6c9,'commentId':_0x7460ce,'content':_0x445b04,'attributes':_0x2dadcb})['then'](()=>_0x414335['remove'](_0x2e9a5a))['catch'](_0x1269e9=>{throw console['error'](_0x1269e9),new _0x22c1ce('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x7aaea7,commentId:_0x33b4a8,isFromAdapter:_0x2fc0fe}){const _0xe69db0=this['getCommentThread'](_0x7aaea7),_0x37616c=_0xe69db0['getComment'](_0x33b4a8);if(!_0x37616c)throw new _0x22c1ce('commentsrepository-remove-missing-comment',this);if(_0xe69db0['_remove'](_0x37616c),_0x2fc0fe||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x19aa9b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x41b0a4}=_0xe69db0,_0x23666f=_0x19aa9b['add'](bt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x41b0a4,'threadId':_0x7aaea7,'commentId':_0x33b4a8})['then'](()=>_0x19aa9b['remove'](_0x23666f))['catch'](_0x44d74d=>{throw console['error'](_0x44d74d),new _0x22c1ce('commentsrepository-remove-comment-internal-error',this);});}}class Zt extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1a473d(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5abdd1,_0x3120c9){super();const _0x215749=_0x3120c9['isResolvable'];this['channelId']=_0x3120c9['channelId'],this['id']=_0x3120c9['id'],this['comments']=new _0x53f197(),this['_repository']=_0x5abdd1,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3120c9['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5abdd1,'_permissions',_0x5abdd1,'_readOnlyChannels',()=>_0x5abdd1['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5abdd1,'_permissions',()=>_0x5abdd1['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5abdd1,'_permissions',()=>{const _0x7291ac=_0x5abdd1['getPermissions'](this['channelId']);return _0x7291ac['write']||_0x7291ac['admin'];}),this['bind']('isResolvable')['to'](_0x5abdd1,'_permissions',()=>_0x215749&&_0x5abdd1['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3120c9['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5f4cae,_0x1f8c66)=>_0x5f4cae?_0x1f8c66?_0x5f4cae<_0x1f8c66?_0x5f4cae:_0x1f8c66:_0x5f4cae:_0x1f8c66),this['set']('unlinkedAt',_0x3120c9['unlinkedAt']||null),this['set']('resolvedAt',_0x3120c9['resolvedAt']||null),this['set']('resolvedBy',_0x3120c9['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x98fa1=>!!_0x98fa1),this['set']('attributes',_0x3120c9['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x300f96,_0x50af9d)=>_0x300f96+_0x50af9d['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x1c4154,id:_0x270dd6}=this;this['_repository']['fire'](ii('submitCommentThread',_0x1c4154),{'channelId':_0x1c4154,'threadId':_0x270dd6});}['setUnlinkedAt'](_0x584c3c){this['_update']({'unlinkedAt':_0x584c3c});}['resolve']({resolvedAt:_0xe1b1d2=new Date(),resolvedBy:_0x13fd88='',isFromAdapter:_0x335ab9=!0x1}={}){const _0x428db1=this['_repository']['context']['plugins']['get'](_0x3468b4)['me'],{channelId:_0x30835a,id:_0x4d4209}=this;this['_repository']['fire'](ii('resolveCommentThread',_0x30835a),{'channelId':_0x30835a,'threadId':_0x4d4209,'resolvedAt':_0xe1b1d2,'resolvedBy':_0x13fd88||_0x428db1['id'],'isFromAdapter':_0x335ab9});}['reopen']({isFromAdapter:_0x484b75=!0x1}={}){const {channelId:_0x5e6e8f,id:_0x320b6e}=this;this['_repository']['fire'](ii('reopenCommentThread',_0x5e6e8f),{'channelId':_0x5e6e8f,'threadId':_0x320b6e,'isFromAdapter':_0x484b75});}['setContext'](_0x19a042){this['context']||this['_update']({'context':_0x19a042});}['setAttribute'](_0x4b6a33,_0xb04da3){const _0x4de9e=_0x17a138(this['attributes']);_0x43ef4e(_0x4de9e,_0x4b6a33,_0xb04da3),this['_update']({'attributes':_0x4de9e});}['removeAttribute'](_0x4ea8bf){const _0x42be8a=_0x17a138(this['attributes']);_0x25cba3(_0x42be8a,_0x4ea8bf),this['_update']({'attributes':_0x42be8a});}['remove']({isFromAdapter:_0x5e2cf8=!0x1}={}){const {channelId:_0xe81cbd,id:_0x2b56e7}=this;this['_repository']['fire'](ii('removeCommentThread',_0xe81cbd),{'channelId':_0xe81cbd,'threadId':_0x2b56e7,'isFromAdapter':_0x5e2cf8});}['attachTo'](_0x4060ec){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x4060ec});}['addComment'](_0x487374){const {channelId:_0x3c5e17,id:_0x11a7c1}=this;this['_repository']['fire'](ii('addComment',_0x3c5e17,_0x11a7c1),Object['assign']({'channelId':_0x3c5e17,'threadId':_0x11a7c1},_0x487374));}['getComment'](_0x41ff08){if('string'!=typeof _0x41ff08)throw new _0x22c1ce('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x41ff08});return this['comments']['get'](_0x41ff08);}['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'](_0x33e7b1=>_0x33e7b1['toJSON']()),'attributes':this['attributes']};}['_add'](_0x55a354){return this['listenTo'](_0x55a354,'change:authoredAt',()=>{const _0x163dda=this['_findOptimalIndex'](_0x55a354),_0x76ffeb=this['comments'];_0x163dda-0x1!=_0x76ffeb['getIndex'](_0x55a354)&&_0x163dda+0x1!=_0x76ffeb['getIndex'](_0x55a354)&&(this['_remove'](_0x55a354),this['_add'](_0x55a354));}),this['comments']['add'](_0x55a354,this['_findOptimalIndex'](_0x55a354));}['_update'](_0x19b671){const {channelId:_0x5743e9,id:_0x1c9233}=this;this['_repository']['fire'](ii('updateCommentThread',_0x5743e9),{..._0x19b671,'channelId':_0x5743e9,'threadId':_0x1c9233});}['_remove'](_0x216c5d){return this['stopListening'](_0x216c5d),_0x216c5d['destroy'](),this['comments']['remove'](_0x216c5d);}['_findOptimalIndex'](_0x54420d){const _0x3c0fe6=this['comments']['find'](_0x15093c=>new Date(_0x15093c['authoredAt'])['getTime']()>new Date(_0x54420d['authoredAt'])['getTime']());return _0x3c0fe6?this['comments']['getIndex'](_0x3c0fe6):this['length'];}}class ti extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1a473d(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1b54a5,_0x3f7d56){super();const _0x56028d=_0x1b54a5['context']['plugins']['get'](_0x3468b4)['me'],_0x1481e9=_0x1b54a5['getCommentThread'](_0x3f7d56['threadId']),_0x4f3911=0x0===_0x1481e9['comments']['length'],_0x62e484=_0x56028d===_0x3f7d56['author'];this['id']=_0x3f7d56['id'],this['threadId']=_0x3f7d56['threadId'],this['author']=_0x3f7d56['author'],this['creator']=_0x3f7d56['creator'],this['isExternal']=Boolean(_0x3f7d56['attributes']&&_0x3f7d56['attributes']['@external']),this['set']('content',_0x3f7d56['content']),this['createdAt']=_0x3f7d56['createdAt']||new Date(),this['set']('authoredAt',_0x3f7d56['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x1481e9,'resolvedAt'),this['set']('attributes',_0x3f7d56['attributes']||{}),this['bind']('isEditable')['to'](_0x1b54a5,'_permissions',()=>{const _0x4ef40b=_0x1b54a5['getPermissions'](_0x1481e9['channelId'])['write'],_0x48c78a=_0x1b54a5['getPermissions'](_0x1481e9['channelId'])['modifyAll'];return _0x62e484&&_0x4ef40b||!_0x62e484&&_0x48c78a;}),this['bind']('isRemovable')['to'](_0x1481e9,'isRemovable',_0x1b54a5,'_permissions',_0x5201e6=>{const _0x1084a0=_0x1b54a5['getPermissions'](_0x1481e9['channelId'])['write'],_0x43f4df=_0x1b54a5['getPermissions'](_0x1481e9['channelId'])['modifyAll'];return _0x62e484&&_0x1084a0||_0x5201e6&&_0x4f3911||!_0x62e484&&_0x43f4df&&!_0x4f3911;}),this['bind']('isReadOnly')['to'](_0x1481e9,'isReadOnly'),this['_repository']=_0x1b54a5;}get['weight'](){return Math['max'](function(_0x316b11){const _0x432221=document['createElement']('div');return _0x432221['innerHTML']=_0x316b11,_0x432221['textContent']['length'];}(this['content']),0xc8);}['update'](_0x12b63f){const {threadId:_0x3dc771,id:_0x3aafe1}=this;if(!this['_repository']['hasCommentThread'](_0x3dc771))throw new _0x22c1ce('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x59d3bc}=this['_repository']['getCommentThread'](_0x3dc771);this['_repository']['fire'](ii('updateComment',_0x59d3bc,_0x3dc771),{'channelId':_0x59d3bc,'threadId':_0x3dc771,'commentId':_0x3aafe1,..._0x12b63f});}['setAttribute'](_0x17b9f7,_0x2f0698){const _0x578372=_0x17a138(this['attributes']);_0x43ef4e(_0x578372,_0x17b9f7,_0x2f0698),this['update']({'attributes':_0x578372});}['removeAttribute'](_0x43e6c9){const _0x2cbcac=_0x17a138(this['attributes']);_0x25cba3(_0x2cbcac,_0x43e6c9),this['update']({'attributes':_0x2cbcac});}['remove'](_0x492178={}){if(!_0x492178['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1d8932,id:_0x333326}=this;if(!this['_repository']['hasCommentThread'](_0x1d8932))throw new _0x22c1ce('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x46e89f}=this['_repository']['getCommentThread'](_0x1d8932);this['_repository']['fire'](ii('removeComment',_0x46e89f,_0x1d8932),{'channelId':_0x46e89f,'threadId':_0x1d8932,'commentId':_0x333326,..._0x492178});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function ii(_0x183705,..._0xb2168d){for(const _0x1c5b32 of _0xb2168d)void 0x0!==_0x1c5b32&&(_0x183705+=':'+String(_0x1c5b32));return _0x183705;}class ei extends _0x1a419f{constructor(_0x4740b2){super(_0x4740b2),this['set']('hasContent',!0x1);}['refresh'](){const _0x1d3fd2=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x560896 of _0x1d3fd2['getRanges']())if(this['_hasContent'](_0x560896))return void(this['hasContent']=!0x0);}['execute']({threadId:_0xa35e89=_0x588627(),ranges:_0x50ad30,comment:_0x489f3b}={}){const _0xd29bac=this['editor']['model'],_0x17c821=_0x50ad30??Array['from'](_0xd29bac['document']['selection']['getRanges']()),_0x97da0c=[];for(const _0x45956b of _0x17c821)this['_hasContent'](_0x45956b)&&_0x97da0c['push'](this['_trimToContent'](_0x45956b));if(!_0x97da0c['length'])throw new _0x22c1ce('addcommentthreadcommand-incorrect-ranges',null);_0x489f3b&&this['_createCommentThread'](_0xa35e89,_0x489f3b),this['_createMarkersFromRanges'](_0xa35e89,_0x97da0c,!!_0x489f3b);}['_createMarkersFromRanges'](_0x25403e,_0x2c3846,_0x2aa034){this['editor']['model']['change'](_0x2996bf=>{for(const _0x3a98e2 of _0x2c3846){const _0x3dcb84=_0x588627()['substr'](0x1,0x5),_0x4ab9e2='comment:'+_0x25403e+':'+_0x3dcb84;_0x2996bf['addMarker'](_0x4ab9e2,{'range':_0x3a98e2,'usingOperation':_0x2aa034,'affectsData':_0x2aa034});}});}['_createCommentThread'](_0x5a9e92,_0x475a3f){const _0x377f19=this['editor']['plugins']['get']('CommentsRepository'),_0x3eb769=this['editor']['config']['get']('collaboration.channelId'),_0x2860c2=this['editor']['plugins']['get']('Users')['me'];if(!_0x2860c2)throw new _0x22c1ce('addcommentthreadcommand-user-not-found',null);_0x377f19['addCommentThread']({'threadId':_0x5a9e92,'channelId':_0x3eb769,'comments':[{'authorId':_0x2860c2['id'],'content':_0x475a3f,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x19e7d6){for(const _0x483a07 of _0x19e7d6['getItems']())if(this['_itemIsContent'](_0x483a07))return!0x0;return!0x1;}['_itemIsContent'](_0x1498ba){return _0x1498ba['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1498ba)&&!_0x1498ba['is']('element','tableCell');}['_trimToContent'](_0x1de48){const _0x49016=_0x4c1bec=>!this['_itemIsContent'](_0x4c1bec['item']),_0x4084e7=_0x1de48['start']['getLastMatchingPosition'](_0x49016),_0x444fee=_0x1de48['end']['getLastMatchingPosition'](_0x49016,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4084e7,_0x444fee);}}class si extends _0x1dae7b{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[$t];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5709d5){super(_0x5709d5),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4cb1b2=this['editor'],_0x15f04d=_0x4cb1b2['model']['document']['selection'],_0x2c4950=_0x2b37bd(()=>this['refreshSelectedViews'](),0xa);_0x15f04d['on']('change:range',(_0x2a74f6,_0x36adbe)=>{_0x36adbe['directChange']&&(_0x2c4950['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4cb1b2['editing']['view']['document'],'change:isFocused',(_0x180cfb,_0x15ea98,_0x1cf7f2)=>{_0x1cf7f2&&_0x2c4950();}),this['listenTo'](_0x4cb1b2['ui']['focusTracker'],'change:isFocused',(_0xa9c8c2,_0x43a6b1,_0x405387)=>{_0x405387||this['fire']('blur',{'isAnnotationTracked':_0x399fe2=>this['_editorAnnotationsData']['has'](_0x399fe2['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5683ce){if(this['_editorAnnotations']['has'](_0x5683ce['view']))return;this['_editorAnnotations']['add'](_0x5683ce['view']),this['editor']['ui']['focusTracker']['add'](_0x5683ce['view']['element']);const _0x154062=this['editor']['plugins']['get']($t);this['listenTo'](_0x154062['collection'],'remove',(_0x560986,_0x3a9966)=>{this['editor']['ui']['focusTracker']['remove'](_0x3a9966['view']['element']),this['_editorAnnotations']['delete'](_0x3a9966['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x800afd){if('function'!=typeof _0x800afd)throw new _0x22c1ce('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x800afd);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x55957f,annotations:_0x5862a0}){const _0x77edd1=[],_0x506e1c=this['editor']['model']['document']['selection'],_0x317013=Array['from'](_0x506e1c['getRanges']());for(const [_0x357b58,_0x2b0271]of this['_editorAnnotationsData']){const _0xc3e171=_0x2c1ca8(_0x2b0271),_0x507347=_0x5862a0['getByInnerView'](_0x357b58);_0xc3e171&&_0x507347&&_0x77edd1['push']({'annotation':_0x507347,'range':_0xc3e171});}function _0x2c1ca8(_0x3f18e2){for(const _0x2bf8f9 of _0x3f18e2)for(const _0x2db638 of _0x317013)if(_0x2bf8f9['containsRange'](_0x2db638,!_0x506e1c['isCollapsed']))return _0x2bf8f9;return null;}return _0x77edd1['sort']((_0x296603,_0x40c67d)=>{const _0x452b1a=_0x296603['range'],_0xbb0446=_0x40c67d['range'];if(!_0x452b1a['isEqual'](_0xbb0446)){if(_0x452b1a['containsRange'](_0xbb0446,!0x0))return 0x1;if(_0xbb0446['containsRange'](_0x452b1a,!0x0))return-0x1;}return _0x296603['annotation']==_0x55957f?-0x1:_0x40c67d['annotation']==_0x55957f?0x1:0x0;})['map'](_0x51bf3d=>_0x51bf3d['annotation']);}get['_editorAnnotationsData'](){const _0x5871e6=new Map();for(const _0xf288 of Array['from'](this['_dataCollectors']))for(const [_0x2b517e,_0x427c3b]of _0xf288())_0x5871e6['set'](_0x2b517e,_0x427c3b);return _0x5871e6;}}class ni extends _0x1dae7b{['afterInit'](){const _0x79c855=this['editor'];if(!_0x79c855['plugins']['has']('RestrictedEditingModeEditing'))return;_0x79c855['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class oi extends _0x1dae7b{constructor(_0x5ab686){super(_0x5ab686),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x133b18=this['editor'],_0x43a3a3=_0x133b18['commands']['get']('importWord'),_0x1c202a=_0x133b18['plugins']['get'](_0x3468b4);_0x43a3a3&&(_0x43a3a3['on']('execute',(_0x40958a,[,_0x505b65])=>{_0x505b65['collaboration_features']={'comments':!0x0,'user_id':_0x1c202a['me']['id']};},{'priority':_0x409d6c['high']+0xa}),this['listenTo'](_0x43a3a3,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4f7ba1,_0x4fb31d){const {comment_threads:_0x242fbd}=_0x4fb31d;_0x242fbd&&_0x242fbd['forEach'](({thread_id:_0xe9af31,comments:_0x286049,is_resolved:_0x4422ab})=>{const _0x1b372c=new Date(),_0x394a52=_0x286049['map'](({author:_0xed9927,content:_0x2f4261,created_at:_0x2997ac})=>({'content':_0x2f4261,'authorId':this['editor']['plugins']['get'](_0x3468b4)['me']['id'],'createdAt':_0x1b372c,'attributes':{'@external':{'authorName':_0xed9927,'createdAt':_0x2997ac?new Date(_0x2997ac):new Date(),'source':'importWord'}}})),_0x46c74b=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](Qt)['addCommentThread']({'channelId':_0x46c74b,'threadId':_0xe9af31,'comments':_0x394a52,'resolvedAt':_0x4422ab?_0x1b372c:null});});}}class ri extends _0x1dae7b{constructor(_0x1a8376){super(_0x1a8376),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x2f6877=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2f6877,'contentInsertion',(_0x49e3c2,_0x38ad79)=>this['_removeMarkersWithoutThreads'](_0x38ad79['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x59705c){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x59705c;const _0x4d5ffc=this['editor']['plugins']['get']('CommentsRepository');for(const _0x48cd89 of _0x59705c['keys']()){const [_0x5bfa31,_0x3efb39]=_0x48cd89['split'](':');'comment'!=_0x5bfa31||_0x4d5ffc['hasCommentThread'](_0x3efb39)||_0x59705c['delete'](_0x48cd89);}return _0x59705c;}['_registerMarkerInClipboardPipeline'](){const _0x381ad1=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x30eabc=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x30eabc&&_0x381ad1['_registerMarkerToCopy']('comment',_0x30eabc);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x5bad67){switch(_0x5bad67){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function hi(_0x1f6e03){const _0x7899fc=_0x1f6e03['split'](':');return{'group':_0x7899fc[0x0],'id':_0x7899fc[0x1],'part':_0x7899fc[0x2]};}class ai extends _0x1dae7b{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x26448a,_0x442da5)=>{if(!_0x442da5['options']['showCommentHighlights'])return null;if(_0x442da5['options']['ignoreResolvedComments']){const {id:_0x5b9a62}=hi(_0x26448a['markerName']),_0x4c3e74=this['editor']['plugins']['get'](Qt);if(_0x4c3e74['getCommentThread'](_0x5b9a62)?.['isResolved']&&_0x26448a['item'])return _0x442da5['consumable']['consume'](_0x26448a['item'],'addMarker:'+_0x26448a['markerName']),_0x442da5['consumable']['consume'](_0x26448a['item'],'removeMarker:'+_0x26448a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1c575d=>{_0x1c575d['on']('addMarker:comment',(_0x13ff68,_0x55b955,_0x2349f6)=>{if(!_0x2349f6['options']['showCommentHighlights'])return;const _0x1f3ff2=_0x55b955['item'];if(!_0x1f3ff2)return;const _0x2aecb9=_0x2349f6['mapper']['toViewElement'](_0x1f3ff2);this['editor']['model']['schema']['isObject'](_0x1f3ff2)&&_0x2aecb9&&!_0x2aecb9['getCustomProperty']('widget')&&_0x2aecb9['is']('containerElement')&&Ct(_0x2aecb9,_0x2349f6['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x175e14,{writer:_0x41047a,options:_0x24cb96})=>{if(!_0x24cb96['showCommentHighlights'])return null;const _0x273a8f=_0x41047a['createContainerElement']('div'),_0x288c43=_0x41047a['createEmptyElement']('hr');return _0x41047a['addClass']('ck-horizontal-line',_0x273a8f),_0x41047a['insert'](_0x41047a['createPositionAt'](_0x273a8f,0x0),_0x288c43),_0x273a8f;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x14fb47,{writer:_0x2a67d4,options:_0x35afa0})=>{if(!_0x35afa0['showCommentHighlights'])return null;const _0x2d82ae=_0x2a67d4['createContainerElement']('span'),_0x5676c0=_0x2a67d4['createEmptyElement']('img');return _0x2a67d4['addClass']('image-inline',_0x2d82ae),_0x2a67d4['insert'](_0x2a67d4['createPositionAt'](_0x2d82ae,0x0),_0x5676c0),_0x2d82ae;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xfb2d1e,{writer:_0x3a7caf,options:_0x122fe4})=>{if(_0x122fe4['showCommentHighlights'])return _0x3a7caf['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1a458a,_0x5ca9d9,_0x293995)=>{_0x293995['options']['showCommentHighlights']&&_0x1a458a['stop']();},{'priority':'high'});}}class ci extends _0x1dae7b{static get['requires'](){return[Qt,si,_0x3468b4,ni,oi,ri,ai];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x37397b){super(_0x37397b),this['set']('isThreadsLoadingPaused',!0x0),_0x37397b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4ba71d,_0x217222,_0x340516,_0x5738d2)=>{const _0x525c9d=_0x37397b['plugins']['get'](Qt),_0x19cab6=_0x340516?hi(_0x340516)['id']:null;_0x37397b['model']['change'](()=>{if(_0x19cab6){const _0x1c9af7=this['getAllMarkersForId'](_0x19cab6);for(const _0x32b9fc of _0x1c9af7)_0x37397b['editing']['reconvertMarker'](_0x32b9fc);}if(_0x5738d2){const {id:_0x29141}=hi(_0x5738d2),_0xd0b415=_0x525c9d['getCommentThread'](_0x29141);if(_0xd0b415&&_0xd0b415['unlinkedAt'])return;if(_0xd0b415&&!_0xd0b415['isAttached'])return;const _0xa066b3=this['getAllMarkersForId'](_0x29141);for(const _0x55aa71 of _0xa066b3)_0x37397b['editing']['reconvertMarker'](_0x55aa71);}}),_0x19cab6&&this['scrollToThreadMarker'](_0x19cab6);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5e2198=this['editor'],_0x4c4622=_0x5e2198['plugins']['get'](Qt),_0x5ba377=_0x5e2198['config']['get']('collaboration.channelId'),_0x3a2a49=_0x4c4622['getCommentThreads']()['filter'](_0x294690=>_0x294690['channelId']!==_0x5ba377);_0x5e2198['commands']['add']('addCommentThread',new ei(_0x5e2198)),this['listenTo'](_0x5e2198,'change:isReadOnly',(_0x3dd6f9,_0x16ba94,_0x9fcb27)=>{_0x4c4622['switchReadOnly'](_0x9fcb27,_0x5e2198['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4c4622,di('addCommentThread',_0x5ba377),(_0x350332,{threadId:_0x545af2})=>{const _0x22ec1e=this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x545af2);_0x22ec1e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x545af2);}),this['listenTo'](_0x4c4622,di('removeCommentThread',_0x5ba377),(_0x4ebb5e,{threadId:_0x3bb7da})=>{_0x5e2198['model']['enqueueChange']({'isUndoable':!0x1},_0x5a075d=>{const _0x780da8=this['getAllMarkersForId'](_0x3bb7da);for(const _0x460a7d of _0x780da8)_0x5a075d['removeMarker'](_0x460a7d);});}),this['listenTo'](_0x4c4622,di('resolveCommentThread',_0x5ba377),(_0x2e62f5,{threadId:_0x103290})=>{(this['_reconvertMarkers'](_0x103290),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](Qt)['getCommentThread'](_0x103290)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4c4622,di('reopenCommentThread',_0x5ba377),(_0x50f7d3,{threadId:_0xddab3d})=>{this['_reconvertMarkers'](_0xddab3d);},{'priority':'low'}),this['listenTo'](_0x4c4622,di('addComment',_0x5ba377),(_0x4f162a,{threadId:_0x1736eb,isFromAdapter:_0x322073})=>{const _0x1af1a9=this['getAllMarkersForId'](_0x1736eb);if(_0x322073||0x0==_0x1af1a9['length']||!_0x4c4622['hasCommentThread'](_0x1736eb))return;0x1===_0x4c4622['getCommentThread'](_0x1736eb)['length']&&_0x5e2198['model']['enqueueChange']({'isUndoable':!0x1},_0x19c5a1=>{for(const _0x12f64d of _0x1af1a9)_0x19c5a1['updateMarker'](_0x12f64d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3a2a49);}['afterInit'](){!async function(_0x34ed14){const _0x3abf87=_0x56bb24([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x37b920=0x73460ab3,_0x392d03=0x73418e4b^_0x37b920,_0x2123b5=window[_0x56bb24([0x44,0x61,0x74,0x65])][_0x56bb24([0x6e,0x6f,0x77])](),_0x1d152c=_0x34ed14[_0x56bb24([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2487f2=new window[(_0x56bb24([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb31954=>{_0x1d152c[_0x56bb24([0x6f,0x6e,0x63,0x65])](_0x56bb24([0x72,0x65,0x61,0x64,0x79]),_0xb31954);}),_0x4dc079={[_0x56bb24([0x6b,0x74,0x79])]:_0x56bb24([0x45,0x43]),[_0x56bb24([0x75,0x73,0x65])]:_0x56bb24([0x73,0x69,0x67]),[_0x56bb24([0x63,0x72,0x76])]:_0x56bb24([0x50,0x2d,0x32,0x35,0x36]),[_0x56bb24([0x78])]:_0x56bb24([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]),[_0x56bb24([0x79])]:_0x56bb24([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]),[_0x56bb24([0x61,0x6c,0x67])]:_0x56bb24([0x45,0x53,0x32,0x35,0x36])},_0x206ab9=_0x1d152c[_0x56bb24([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x56bb24([0x67,0x65,0x74])](_0x56bb24([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2a738d(){let _0x5f05d8,_0x5bd26a=null,_0x8622eb=null;try{if(_0x206ab9==_0x56bb24([0x47,0x50,0x4c]))return _0x56bb24([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5f05d8=_0x201441(),!_0x5f05d8)return _0x56bb24([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5f05d8[_0x56bb24([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x8622eb=_0x583182(_0x5f05d8[_0x56bb24([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5f05d8[_0x56bb24([0x6a,0x74,0x69])])),await _0x40d81e()?_0x124ae2()?_0x44e9ca()?_0x56bb24([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x44c9de()?(_0x5f05d8[_0x56bb24([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x56bb24([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5bd26a=_0x4bd823(_0x56bb24([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2bd070()):_0x56bb24([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x56bb24([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x56bb24([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x56bb24([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x44e9ca(){const _0x3cba2e=[_0x56bb24([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x56bb24([0x74,0x72,0x69,0x61,0x6c])][_0x56bb24([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f05d8[_0x56bb24([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2123b5/0x3e8:0xe10*_0x392d03;return _0x5f05d8[_0x56bb24([0x65,0x78,0x70])]<_0x3cba2e;}function _0x124ae2(){const _0x49d4ea=_0x5f05d8[_0x56bb24([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x49d4ea)return!0x1;if(_0x49d4ea[_0x56bb24([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x56bb24([0x2a])))return!0x0;if(_0x49d4ea[_0x56bb24([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x56bb24([0x43,0x4d,0x54])))return!0x0;if(_0x49d4ea[_0x56bb24([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x56bb24([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0xdeb05e())return!0x0;if(_0x49d4ea[_0x56bb24([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x56bb24([0x52,0x43,0x4d,0x54]))){if(_0x21ba78())return!0x0;if(_0x36a0b6()||_0x232bcb())return!0x0;}return!0x1;}function _0x44c9de(){const _0x389c64=_0x5f05d8[_0x56bb24([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x389c64||0x0==_0x389c64[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x23908f}=new URL(window[_0x56bb24([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x389c64[_0x56bb24([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x23908f))return!0x0;const _0x2e1a81=_0x23908f[_0x56bb24([0x73,0x70,0x6c,0x69,0x74])](_0x56bb24([0x2e]));return _0x389c64[_0x56bb24([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5629c2=>_0x5629c2[_0x56bb24([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x56bb24([0x2a])))[_0x56bb24([0x6d,0x61,0x70])](_0x567d88=>_0x567d88[_0x56bb24([0x73,0x70,0x6c,0x69,0x74])](_0x56bb24([0x2e])))[_0x56bb24([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4a5ab9=>_0x4a5ab9[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2e1a81[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x56bb24([0x6d,0x61,0x70])](_0x1c0b56=>Array(_0x2e1a81[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1c0b56[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x56bb24([0x66,0x69,0x6c,0x6c])](_0x1c0b56[0x0]===_0x56bb24([0x2a])?_0x56bb24([0x2a]):'')[_0x56bb24([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1c0b56))[_0x56bb24([0x73,0x6f,0x6d,0x65])](_0x657f3b=>_0x2e1a81[_0x56bb24([0x65,0x76,0x65,0x72,0x79])]((_0x1846de,_0x34308e)=>_0x657f3b[_0x34308e]===_0x1846de||_0x657f3b[_0x34308e]===_0x56bb24([0x2a])));}function _0x2bd070(){return _0x5bd26a&&_0x8622eb?new window[(_0x56bb24([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2e0f43,_0x1f8a18)=>{_0x5bd26a[_0x56bb24([0x74,0x68,0x65,0x6e])](_0x2e0f43,_0x1f8a18),_0x8622eb[_0x56bb24([0x74,0x68,0x65,0x6e])](_0x1dca3f=>{_0x1dca3f!=_0x56bb24([0x56,0x61,0x6c,0x69,0x64])&&_0x2e0f43(_0x1dca3f);},_0x1f8a18);}):_0x5bd26a||_0x8622eb||_0x56bb24([0x56,0x61,0x6c,0x69,0x64]);}}function _0x583182(_0x5bc2a9,_0x5a5595){return new window[(_0x56bb24([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c9ac5=>{if(_0x53618c())return _0x5c9ac5(_0x56bb24([0x56,0x61,0x6c,0x69,0x64]));_0x3e04bd(),_0x1d152c[_0x56bb24([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x56bb24([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x377f87=!0x1;const _0x4848ea=_0x588627();function _0x1e61e8(_0x9d9f56){return!!_0x9d9f56&&(typeof _0x9d9f56===_0x56bb24([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x9d9f56===_0x56bb24([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x9d9f56[_0x56bb24([0x74,0x68,0x65,0x6e])]===_0x56bb24([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x9d9f56[_0x56bb24([0x63,0x61,0x74,0x63,0x68])]===_0x56bb24([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x446833(_0x1db3c1){_0x1d97b1(_0x1db3c1)[_0x56bb24([0x74,0x68,0x65,0x6e])](_0x49e6ba=>{if(!_0x49e6ba||_0x49e6ba[_0x56bb24([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x56bb24([0x6f,0x6b]))return _0x56bb24([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1ad72b(_0x291ed3(_0x4848ea+_0x5a5595))!=_0x49e6ba[_0x56bb24([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x56bb24([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x56bb24([0x56,0x61,0x6c,0x69,0x64]);})[_0x56bb24([0x74,0x68,0x65,0x6e])](_0x175647=>(_0x48f022(),_0x175647),()=>{const _0x4ddca4=_0x224761();return null==_0x4ddca4?(_0x48f022(),_0x56bb24([0x56,0x61,0x6c,0x69,0x64])):_0x56bb24(_0x2123b5-_0x4ddca4>(0x574a8eb3^_0x37b920)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x56bb24([0x74,0x68,0x65,0x6e])](_0x5c9ac5)[_0x56bb24([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5c9ac5(_0x56bb24([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x31e6a9=0x7370e433^_0x37b920;function _0x48f022(){const _0x1fb907=_0x56bb24([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ad72b(_0x291ed3(_0x5bc2a9)),_0x349ac5=_0x516a0b(_0x1ad72b(window[_0x56bb24([0x4d,0x61,0x74,0x68])][_0x56bb24([0x63,0x65,0x69,0x6c])](_0x2123b5/_0x31e6a9)));window[_0x56bb24([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x56bb24([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1fb907,_0x349ac5);}function _0x224761(){const _0x20dc42=_0x56bb24([0x6c,0x6c,0x63,0x74,0x2d])+_0x1ad72b(_0x291ed3(_0x5bc2a9)),_0x115b0c=window[_0x56bb24([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x56bb24([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x20dc42);return _0x115b0c?window[_0x56bb24([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x516a0b(_0x115b0c),0x10)*_0x31e6a9:null;}function _0x1d97b1(_0xe51d72){return new window[(_0x56bb24([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x26d5e6,_0x491579)=>{_0xe51d72[_0x56bb24([0x74,0x68,0x65,0x6e])](_0x26d5e6,_0x491579),window[_0x56bb24([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x491579,0x7347de73^_0x37b920);});}}_0x1d152c[_0x56bb24([0x6f,0x6e])](_0x56bb24([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2a50f9,_0x55beb1)=>{if(_0x55beb1[0x0]!=_0x5bc2a9)return _0x5c9ac5(_0x56bb24([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x55beb1[0x1]={..._0x55beb1[0x1],[_0x56bb24([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4848ea};},{[_0x56bb24([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x56bb24([0x68,0x69,0x67,0x68])}),_0x1d152c[_0x56bb24([0x6f,0x6e])](_0x56bb24([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5c8191=>{_0x1e61e8(_0x5c8191[_0x56bb24([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x377f87=!0x0,_0x446833(_0x5c8191[_0x56bb24([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x56bb24([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x56bb24([0x6c,0x6f,0x77])}),_0x2487f2[_0x56bb24([0x74,0x68,0x65,0x6e])](()=>{_0x377f87||_0x5c9ac5(_0x56bb24([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x53618c(){return _0x1d152c[_0x56bb24([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x56bb24([0x76,0x69,0x65,0x77])][_0x56bb24([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x56bb24([0x61,0x75,0x74,0x6f]);}function _0x3e04bd(){_0x1d152c[_0x56bb24([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x56bb24([0x76,0x69,0x65,0x77])][_0x56bb24([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x56bb24([0x61,0x75,0x74,0x6f]);}}function _0x4bd823(_0x4a892a){const _0x4b7a25=[new window[(_0x56bb24([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4edda3=>setTimeout(_0x4edda3,0x734f347f^_0x37b920)),_0x2487f2[_0x56bb24([0x74,0x68,0x65,0x6e])](()=>new window[(_0x56bb24([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2db3ea=>{let _0x3fe7b9=0x0;_0x1d152c[_0x56bb24([0x6d,0x6f,0x64,0x65,0x6c])][_0x56bb24([0x6f,0x6e])](_0x56bb24([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x51248c,_0x73158d)=>{_0x73158d[0x0][_0x56bb24([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3fe7b9++,_0x3fe7b9==(0x73460f5b^_0x37b920)&&(_0x2db3ea(),_0x51248c[_0x56bb24([0x6f,0x66,0x66])]());});}))];return window[_0x56bb24([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x56bb24([0x72,0x61,0x63,0x65])](_0x4b7a25)[_0x56bb24([0x74,0x68,0x65,0x6e])](()=>_0x4a892a);}async function _0x19896e(){await _0x2487f2,_0x1d152c[_0x56bb24([0x6d,0x6f,0x64,0x65,0x6c])][_0x56bb24([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3a2506,_0x1d152c[_0x56bb24([0x6d,0x6f,0x64,0x65,0x6c])][_0x56bb24([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3a2506,_0x1d152c[_0x56bb24([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x56bb24([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xdeb05e(){return window[_0x56bb24([0x67,0x6c,0x6f,0x62])]&&window[_0x56bb24([0x67,0x6c,0x6f,0x62])][_0x56bb24([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x21ba78(){return _0x1aec18(_0x56bb24([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x34b6fd(_0x56bb24([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x56bb24([0x73,0x74,0x61,0x74,0x65])]==_0x56bb24([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x36a0b6(){return _0x1aec18(_0x56bb24([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 _0x232bcb(){return _0x1aec18(_0x56bb24([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xa2c655(_0x3024ff){const _0x1f2310=_0x35f533();_0x1d152c[_0x1f2310]=_0x56bb24([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3024ff,_0x3024ff!=_0x56bb24([0x56,0x61,0x6c,0x69,0x64])&&_0x19896e();}function _0x35f533(){const _0x206ce0=window[_0x56bb24([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x56bb24([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x56bb24([0x6e,0x6f,0x77])]())[_0x56bb24([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x56bb24([0x2e]),'');let _0x107f5a=_0x56bb24([0x4b]);for(let _0x4fa582=0x0;_0x4fa582<_0x206ce0[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4fa582+=0x2){let _0x30776a=window[_0x56bb24([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x206ce0[_0x56bb24([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4fa582,_0x4fa582+0x2));_0x30776a>=_0x3abf87[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x30776a-=_0x3abf87[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x107f5a+=_0x3abf87[_0x30776a];}return _0x107f5a;}function _0x201441(){const _0x19162f=_0x206ab9[_0x56bb24([0x73,0x70,0x6c,0x69,0x74])](_0x56bb24([0x2e]));if(0x3!=_0x19162f[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3e4a57(_0x19162f[0x1]);function _0x3e4a57(_0x424782){const _0x3e6efe=_0x1c0926(_0x424782);return _0x3e6efe&&_0x15d39c()?_0x3e6efe:null;function _0x15d39c(){const _0x5b623c=_0x3e6efe[_0x56bb24([0x6a,0x74,0x69])],_0x52cede=window[_0x56bb24([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5b623c[_0x56bb24([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b623c[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x75c3c5={..._0x3e6efe,[_0x56bb24([0x6a,0x74,0x69])]:_0x5b623c[_0x56bb24([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5b623c[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x75c3c5[_0x56bb24([0x76,0x63])],_0x291ed3(_0x75c3c5)==_0x52cede;}}}async function _0x40d81e(){let _0x5bf64a=!0x0;try{const _0x566565=_0x206ab9[_0x56bb24([0x73,0x70,0x6c,0x69,0x74])](_0x56bb24([0x2e])),[_0x528e79,_0x2dd854,_0x23bcba]=_0x566565;return _0x32aaa0(_0x528e79),await _0x3ec969(_0x528e79,_0x2dd854,_0x23bcba),_0x5bf64a;}catch{return!0x1;}function _0x32aaa0(_0x5389e9){const _0x2b52ba=_0x1c0926(_0x5389e9);_0x2b52ba&&_0x2b52ba[_0x56bb24([0x61,0x6c,0x67])]==_0x56bb24([0x45,0x53,0x32,0x35,0x36])||(_0x5bf64a=!0x1);}async function _0x3ec969(_0x4398aa,_0x3a330a,_0x3d94db){const _0x3a5fb2=window[_0x56bb24([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x56bb24([0x66,0x72,0x6f,0x6d])](_0x241ce7(_0x3d94db),_0x16029c=>_0x16029c[_0x56bb24([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3abbbe=new window[(_0x56bb24([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x56bb24([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4398aa+_0x56bb24([0x2e])+_0x3a330a),_0x167584=window[_0x56bb24([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x56bb24([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x167584)return;const _0x3c1173=await _0x167584[_0x56bb24([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x56bb24([0x6a,0x77,0x6b]),_0x4dc079,{[_0x56bb24([0x6e,0x61,0x6d,0x65])]:_0x56bb24([0x45,0x43,0x44,0x53,0x41]),[_0x56bb24([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x56bb24([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x56bb24([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x167584[_0x56bb24([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x56bb24([0x6e,0x61,0x6d,0x65])]:_0x56bb24([0x45,0x43,0x44,0x53,0x41]),[_0x56bb24([0x68,0x61,0x73,0x68])]:{[_0x56bb24([0x6e,0x61,0x6d,0x65])]:_0x56bb24([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3c1173,_0x3a5fb2,_0x3abbbe)||(_0x5bf64a=!0x1);}}function _0x1c0926(_0x557568){return _0x557568[_0x56bb24([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x56bb24([0x65,0x79]))?JSON[_0x56bb24([0x70,0x61,0x72,0x73,0x65])](_0x241ce7(_0x557568)):null;}function _0x241ce7(_0xefcca7){return window[_0x56bb24([0x61,0x74,0x6f,0x62])](_0xefcca7[_0x56bb24([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x56bb24([0x2b]))[_0x56bb24([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x56bb24([0x2f])));}function _0x291ed3(_0x4c9505){let _0x2ac456=0x1505;function _0x4d0146(_0x2c4f5d){for(let _0x34eb44=0x0;_0x34eb44<_0x2c4f5d[_0x56bb24([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x34eb44++){const _0x383091=_0x2c4f5d[_0x56bb24([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x34eb44);_0x2ac456=(_0x2ac456<<0x5)+_0x2ac456+_0x383091,_0x2ac456&=_0x2ac456;}}function _0x469ad7(_0x2ddfeb){Array[_0x56bb24([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2ddfeb)?_0x2ddfeb[_0x56bb24([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x469ad7):_0x2ddfeb&&typeof _0x2ddfeb==_0x56bb24([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x56bb24([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2ddfeb)[_0x56bb24([0x73,0x6f,0x72,0x74])]()[_0x56bb24([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4407c3,_0x51cd96])=>{_0x4d0146(_0x4407c3),_0x469ad7(_0x51cd96);}):_0x4d0146(window[_0x56bb24([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2ddfeb));}return _0x469ad7(_0x4c9505),_0x2ac456>>>0x0;}function _0x1ad72b(_0x4f03c1){return _0x4f03c1[_0x56bb24([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x56bb24([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x56bb24([0x30]));}function _0x516a0b(_0x504e1c){return _0x504e1c[_0x56bb24([0x73,0x70,0x6c,0x69,0x74])]('')[_0x56bb24([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x56bb24([0x6a,0x6f,0x69,0x6e])]('');}function _0x1aec18(_0x1b6cf3){return _0x1d152c[_0x56bb24([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x56bb24([0x68,0x61,0x73])](_0x1b6cf3);}function _0x34b6fd(_0x1069c9){return _0x1d152c[_0x56bb24([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x56bb24([0x67,0x65,0x74])](_0x1069c9);}function _0x3a2506(){}function _0x56bb24(_0x194c48){return _0x194c48['map'](_0x2d8146=>String['fromCharCode'](_0x2d8146))['join']('');}_0xa2c655(await _0x2a738d());}(this);}['destroy'](){const _0x2c3a44=this['editor']['plugins']['get'](Qt),_0x111962=this['editor']['config']['get']('collaboration.channelId');for(const _0x4cfb9e of _0x2c3a44['getCommentThreads']({'channelId':_0x111962}))_0x2c3a44['_detachCommentThread'](_0x4cfb9e['id']),_0x2c3a44['_threads']['delete'](_0x4cfb9e['id']);super['destroy']();}['hasMarkerForId'](_0x596bf1){return this['getAllMarkersForId'](_0x596bf1)['length']>0x0;}['getAllMarkersForId'](_0x2e2add){const _0x318269=[];for(const _0x127d6d of this['editor']['model']['markers'])_0x127d6d['name']['startsWith']('comment:'+_0x2e2add)&&_0x318269['push'](_0x127d6d);return _0x318269;}['scrollToThreadMarker'](_0x2d2648){setTimeout(()=>{const _0x36bfca=this['_getTargetForId'](_0x2d2648);if(!_0x36bfca)return;this['activeMarker']&&hi(this['activeMarker'])['id']===_0x2d2648&&_0x3a8720({'target':_0x36bfca[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2e5bfb){this['editor']['model']['change'](()=>{for(const _0x11fd61 of this['getAllMarkersForId'](_0x2e5bfb))this['editor']['editing']['reconvertMarker'](_0x11fd61);});}['_attachArchivedThread'](_0x25a367){const _0x41f1ba=this['editor']['plugins']['get'](Qt),_0x3ad703=this['editor']['plugins']['get'](si),_0x296efb=_0x41f1ba['getCommentThread'](_0x25a367);if(!_0x296efb['isAttached']){const _0x43bd9e=_0x296efb['attachTo'](()=>this['_getTargetForId'](_0x296efb['id']));_0x3ad703['registerAnnotation'](_0x43bd9e),_0x296efb['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x159385=this['editor'],_0x285d81=_0x159385['plugins']['get'](_0x3468b4);_0x159385['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x268a2c,_0x708f35)=>{const {id:_0x22e695}=hi(_0x268a2c['markerName']),_0x2f5df3=_0x159385['plugins']['get'](Qt)['getCommentThread'](_0x22e695),_0x5435d4=this['activeMarker']&&hi(this['activeMarker'])['id']===_0x22e695;let _0x21693b;if(_0x2f5df3&&_0x2f5df3['isResolved']&&!_0x5435d4&&_0x268a2c['item'])return _0x708f35['consumable']['consume'](_0x268a2c['item'],'addMarker:'+_0x268a2c['markerName']),_0x708f35['consumable']['consume'](_0x268a2c['item'],'removeMarker:'+_0x268a2c['markerName']),null;const _0x1198a7=['ck-comment-marker'];return _0x5435d4&&_0x1198a7['push']('ck-comment-marker--active'),_0x21693b=_0x2f5df3?.['length']?_0x2f5df3['comments']['first']['author']['id']:_0x285d81['me']['id'],{'classes':_0x1198a7,'attributes':{'data-comment':_0x22e695,'data-author-id':_0x21693b}};}}),_0x159385['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x53220e,{options:_0x273abb})=>{if(_0x273abb['showCommentHighlights'])return null;const _0x22eb21=_0x159385['plugins']['get'](Qt),_0x30f4b6=_0x159385['model']['markers']['get'](_0x53220e),{id:_0x2ac8ed,part:_0x28839a}=hi(_0x53220e);return _0x30f4b6&&!_0x30f4b6['affectsData']||_0x273abb['ignoreResolvedComments']&&_0x22eb21['getCommentThread'](_0x2ac8ed)?.['isResolved']?null:{'group':'comment','name':_0x28839a?_0x2ac8ed+':'+_0x28839a:_0x2ac8ed};}}),_0x159385['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x378447,{writer:_0x3c9c04})=>_0x3c9c04['createElement']('$marker',{'data-name':'comment:'+_0x378447['getAttribute']('id')})}),_0x159385['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2a046c=this['editor'],_0x4bb5eb=_0x2a046c['plugins']['get'](Qt),_0x4a3af6=new Set(),_0x1f6c3a=new Set();_0x2a046c['model']['document']['registerPostFixer'](_0x4bdec4=>{let _0xa21879=!0x1;for(const {name:_0x2767fd,data:_0x5ca853}of _0x2a046c['model']['document']['differ']['getChangedMarkers']()){const {group:_0x58a39f,id:_0x1c9a04}=hi(_0x2767fd);let _0x5a9ca2=_0x5ca853['newRange'];if('comment'!==_0x58a39f||!_0x5a9ca2)continue;const _0x48d036='$graveyard'===_0x5a9ca2['root']['rootName'];_0x48d036||(_0x5a9ca2=li(_0x5a9ca2,_0x2a046c['model']),!_0x5a9ca2||_0x5a9ca2['isCollapsed']||!_0x5ca853['newRange']||_0x5a9ca2['isEqual'](_0x5ca853['newRange']))?_0x2a046c['model']['hasContent'](_0x5a9ca2)&&!_0x48d036?this['isThreadsLoadingPaused']?_0x4a3af6['add'](_0x2767fd):this['_handleThreadMarker'](_0x2767fd,_0x1c9a04):(_0x1f6c3a['add'](_0x2767fd),_0x4a3af6['delete'](_0x2767fd),_0x4bdec4['removeMarker'](_0x2767fd),_0xa21879=!0x0):(_0x4bdec4['updateMarker'](_0x2767fd,{'range':_0x5a9ca2}),_0xa21879=!0x0);}return _0xa21879;}),this['on']('change:isThreadsLoadingPaused',(_0x1226dc,_0xe9e95f,_0x5db9cc)=>{if(!_0x5db9cc&&_0x4a3af6['size'])for(const _0x1617a1 of _0x4a3af6){const {id:_0x23e7a3}=hi(_0x1617a1);_0x4a3af6['delete'](_0x1617a1),_0x2a046c['model']['markers']['get'](_0x1617a1)&&this['_handleThreadMarker'](_0x1617a1,_0x23e7a3);}}),this['listenTo'](_0x2a046c['model']['document'],'change',()=>{for(const {name:_0x3d835c,data:{newRange:_0xf71f04}}of _0x2a046c['model']['document']['differ']['getChangedMarkers']()){const {group:_0x35e9e3,id:_0x279f24}=hi(_0x3d835c);if('comment'!==_0x35e9e3)continue;const _0x210827=_0x4bb5eb['getCommentThread'](_0x279f24),_0x1fb1fc=this['hasMarkerForId'](_0x279f24);_0x210827&&(!_0x210827['_hasTargetInContent']&&_0xf71f04&&_0x2a046c['editing']['view']['once']('render',()=>{const _0x2ab76d=_0x2a046c['plugins']['get']($t),_0x3536c4=_0x4bb5eb['_threadToController']['get'](_0x210827)['view'];_0x2ab76d['getByInnerView'](_0x3536c4)['refreshVisibility']();},{'priority':'low'}),_0x210827['_hasTargetInContent']=_0x1fb1fc||!!_0xf71f04),_0xf71f04||(_0x1f6c3a['add'](_0x3d835c),_0x4a3af6['delete'](_0x3d835c));}for(const _0x486955 of _0x1f6c3a){const {id:_0x3316a2}=hi(_0x486955),_0x473a3c=_0x4bb5eb['getCommentThread'](_0x3316a2);if(_0x4a3af6['delete'](_0x486955),!_0x473a3c)continue;const _0x2424b9=this['hasMarkerForId'](_0x3316a2);_0x2424b9||_0x473a3c['isSubmitted']?_0x2424b9||_0x473a3c['unlinkedAt']||_0x473a3c['setUnlinkedAt'](new Date()):_0x473a3c['remove']();}_0x1f6c3a['clear']();});}['_handleInitialThreads'](_0x13f470){_0x13f470['forEach'](_0x3ed006=>{_0x3ed006['unlinkedAt']&&this['_attachArchivedThread'](_0x3ed006['id']);});}['_getTargetForId'](_0x24e46e){const _0x56e1bb=this['editor'],_0x1f3137=this['getAllMarkersForId'](_0x24e46e);return _0x5e3453(_0x56e1bb['editing'],_0x1f3137);}['_getTextContext'](_0x1335a2){const _0x2bcb4a=this['getAllMarkersForId'](_0x1335a2);let _0x102dc2='',_0x2b94cd=!0x1;for(const _0x3ae8f6 of _0x2bcb4a){const _0x2df069=_0x3ae8f6['getRange']();for(const _0x508b2b of Array['from'](_0x2df069['getItems']()))_0x508b2b['is']('$textProxy')?(_0x102dc2&&_0x2b94cd&&(_0x102dc2+='\x20',_0x2b94cd=!0x1),_0x102dc2+=_0x508b2b['data']):_0x2b94cd=!0x0;_0x2b94cd=!0x0;}return _0x102dc2['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x39b2cf,_0x207549){const _0x5d0f97=this['editor'],_0x30d708=_0x5d0f97['plugins']['get'](Qt);let _0x137da1=_0x30d708['getCommentThread'](_0x207549);const _0x2b8149=_0x5d0f97['config']['get']('collaboration.channelId'),_0x8fe544=_0x5d0f97['plugins']['get'](si);if(_0x137da1&&(_0x137da1['unlinkedAt']&&_0x137da1['setUnlinkedAt'](null),_0x137da1['isAttached']))return _0x137da1;return!this['getAllMarkersForId'](_0x207549)[0x0]['managedUsingOperations']?_0x5d0f97['editing']['view']['once']('render',()=>{if(_0x30d708['getCommentThread'](_0x207549))return;const _0x2dd744=_0x5d0f97['plugins']['get']($t);_0x137da1=_0x30d708['openNewCommentThread']({'channelId':_0x2b8149,'threadId':_0x207549,'target':()=>this['_getTargetForId'](_0x207549),'context':{'type':'text','value':this['_getTextContext'](_0x207549)}});const _0xa097f=_0x30d708['_threadToController']['get'](_0x137da1)['view'],_0x386514=_0x2dd744['getByInnerView'](_0xa097f);_0x386514&&_0x8fe544['registerAnnotation'](_0x386514);},{'priority':'low'}):_0x30d708['fetchCommentThread']({'channelId':_0x2b8149,'threadId':_0x207549})['then'](_0x3b6e73=>{if('destroyed'!==_0x5d0f97['state']){if(_0x137da1=_0x3b6e73,_0x137da1&&!_0x137da1['isAttached']){const _0x4119c5=_0x137da1['attachTo'](()=>this['_getTargetForId'](_0x207549));_0x8fe544['registerAnnotation'](_0x4119c5),_0x137da1['isResolved']&&this['_reconvertMarkers'](_0x207549);}else{if(!_0x137da1){const _0x8aa1a3=this['getAllMarkersForId'](_0x207549);_0x5d0f97['model']['change'](_0x35958c=>{for(const _0x246ccb of _0x8aa1a3)_0x35958c['removeMarker'](_0x246ccb);});}}}}),_0x137da1;}['_handleThreadMarker'](_0x456bbc,_0x4cbd70){const _0x5d993d=this['_attachMarkerToThread'](_0x456bbc,_0x4cbd70);_0x5d993d&&!_0x5d993d['context']&&_0x5d993d['setContext']({'type':'text','value':this['_getTextContext'](_0x4cbd70)});}['_initAriaMarkerChangeAnnouncements'](){const _0xb8031d=this['editor'];_0x502eea(_0xb8031d['model'],({left:_0x37d18a,entered:_0x4efed7})=>{for(const _0x17c4ca of _0x37d18a)if(ui(_0x17c4ca)){_0xb8031d['ui']['ariaLiveAnnouncer']['announce'](bt(_0xb8031d['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5768b8 of _0x4efed7)if(ui(_0x5768b8)){_0xb8031d['ui']['ariaLiveAnnouncer']['announce'](bt(_0xb8031d['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x5d8af7(_0x2636b1)));break;}});}}function di(_0x1b8b87,_0x1fd668){return _0x1fd668?_0x1b8b87+':'+_0x1fd668:_0x1b8b87;}function li(_0x24c1c2,_0x138327){const _0x1d1811=_0x138327['schema'],_0x4b9dfd=_0x138327['createRange'](_0x24c1c2['start']);for(const _0x3f0127 of _0x24c1c2['getWalker']()){const {type:_0x6e9847,item:_0x21968b,nextPosition:_0x28fed0}=_0x3f0127;if('text'===_0x6e9847||_0x1d1811['isObject'](_0x21968b)){const _0x36251c=_0x138327['createPositionBefore'](_0x21968b);_0x4b9dfd['isCollapsed']&&(_0x4b9dfd['start']=_0x36251c),_0x4b9dfd['end']=_0x28fed0;}}return _0x4b9dfd;}function ui(_0x400665){return'comment'===hi(_0x400665['name'])['group'];}class mi extends _0x1dae7b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,ci,si,$t];}get['CommentsListView'](){return St;}get['CommentThreadInputView'](){return Rt;}['init'](){const _0x345cb3=this['editor'],_0x3b05fe=_0x345cb3['plugins']['get'](Qt),_0x2b798f=_0x345cb3['plugins']['get'](ci),_0x2e782b=_0x345cb3['plugins']['get']($t),_0x2deadf=_0x345cb3['plugins']['get'](si);_0x345cb3['ui']['componentFactory']['add']('comment',()=>{const _0x9b225d=this['_createUIButton'](_0x733762);return _0x9b225d['tooltip']=!0x0,_0x9b225d;}),_0x345cb3['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x2deadf['addSourceCollector'](()=>{const _0x1dae04=[];for(const [_0x11a79e,_0x170267]of _0x3b05fe['_threadToController']){const _0x5a5704=_0x2b798f['getAllMarkersForId'](_0x11a79e['id']),_0x3271ae=_0x5a5704['map'](_0x3d20c9=>_0x3d20c9['getRange']());_0x5a5704['length']>0x0&&_0x1dae04['push']([_0x170267['view'],_0x3271ae]);}return _0x1dae04;}),this['listenTo'](_0x2e782b,'change:activeAnnotations',(_0x112dcd,_0x43721b,_0xe00875)=>{const _0x2775b8=Array['from'](_0xe00875)['map'](_0x32c83b=>_0x32c83b['innerView'])['find'](_0x5ae588=>_0x3b05fe['_viewToController']['has'](_0x5ae588));if(!_0x2775b8)return void(_0x2b798f['activeMarker']=null);const _0x4d5ef4=_0x3b05fe['_viewToController']['get'](_0x2775b8)['model']['id'],_0x31b175='comment:'+_0x4d5ef4;_0x4d5ef4&&_0x2b798f['hasMarkerForId'](_0x4d5ef4)?_0x2b798f['activeMarker']=_0x31b175:_0x2b798f['activeMarker']&&(_0x2b798f['activeMarker']=null);}),this['listenTo'](_0x3b05fe,'removeCommentThread',(_0x482b1a,{threadId:_0x28bc34,isFromAdapter:_0x1bf8c9})=>{!_0x1bf8c9&&_0x345cb3['ui']['focusTracker']['isFocused']&&_0x2b798f['hasMarkerForId'](_0x28bc34)&&_0x345cb3['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3b05fe,'addComment',(_0x4394ac,{threadId:_0xba88ae,isFromAdapter:_0x2168de})=>{if(_0x2168de||!_0x2b798f['hasMarkerForId'](_0xba88ae)||!_0x3b05fe['hasCommentThread'](_0xba88ae))return;0x1===_0x3b05fe['getCommentThread'](_0xba88ae)['length']&&(_0x345cb3['editing']['view']['focus'](),_0x4394ac['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x34ce7f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x35bbc8;for(const _0x5cc42f in _0x34ce7f){const _0x3f6459=_0x5cc42f,_0x5d2398=_0x34ce7f[_0x3f6459];if('commentsLicenseKeyValid'==_0x5d2398||'commentsLicenseKeyInvalid'==_0x5d2398||'commentsLicenseKeyExpired'==_0x5d2398||'commentsLicenseKeyDomainLimit'==_0x5d2398||'commentsLicenseKeyNotAllowed'==_0x5d2398||'commentsLicenseKeyEvaluationLimit'==_0x5d2398||'commentsLicenseKeyUsageLimit'==_0x5d2398){delete _0x34ce7f[_0x3f6459],_0x35bbc8=_0x5d2398,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x35bbc8&&_0x34ce7f['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x35bbc8&&_0x34ce7f['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x35bbc8&&_0x34ce7f['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x35bbc8&&_0x34ce7f['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x35bbc8&&_0x34ce7f['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x35bbc8&&_0x34ce7f['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3204a6){const _0x76ae82=this['editor'],_0x5824a3=new _0x3204a6(_0x76ae82['locale']),_0x248f3b=_0x76ae82['commands']['get']('addCommentThread');return _0x5824a3['set']({'label':bt(_0x76ae82['locale'],'Comment'),'icon':_0x885b6e}),_0x5824a3['bind']('isEnabled')['to'](_0x248f3b,'isEnabled',_0x248f3b,'hasContent',(_0x5e8a15,_0x5c86b0)=>_0x5e8a15&&_0x5c86b0),this['listenTo'](_0x5824a3,'execute',()=>{_0x248f3b['execute']();}),_0x5824a3;}}class fi extends _0x1dae7b{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[ci];}constructor(_0xa650f8){super(_0xa650f8),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2c5e59,_0x541023,_0x3b1f55)=>{_0x3b1f55?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x16716b,_0x1c1990]of this['editor']['commands'])_0x1c1990['affectsData']&&'addCommentThread'!==_0x16716b&&_0x1c1990['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x26f0bb=this['editor']['editing']['view']['document'];this['listenTo'](_0x26f0bb,'cut',_0x309b84=>_0x309b84['stop'](),{'priority':'highest'}),this['listenTo'](_0x26f0bb,'clipboardInput',_0x1d1761=>_0x1d1761['stop'](),{'priority':'highest'}),this['listenTo'](_0x26f0bb,'delete',_0x41a463=>_0x41a463['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3c9899,_0x263969]of this['editor']['commands'])_0x263969['affectsData']&&'addCommentThread'!==_0x3c9899&&_0x263969['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class pi extends _0x4770a4{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[$t];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a765b){super(_0x2a765b),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3f4e1a=this['context']['plugins']['get']($t);this['listenTo'](_0x3f4e1a,'_activateAnnotation',(_0x3ed78a,_0x37262b)=>{for(const _0x24aba1 of this['activeUIs']){const _0x24f98a=this['_uis']['get'](_0x24aba1);(0x0,this['uisData']['get'](_0x24aba1)['filter'])(_0x37262b)&&_0x24f98a['setActiveAnnotation'](_0x37262b);}}),this['listenTo'](_0x3f4e1a,'_deactivateAllAnnotations',()=>{for(const _0x17b68f of this['activeUIs']){this['_uis']['get'](_0x17b68f)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3f4e1a['_visibleAnnotations'],'add',(_0x76329e,_0x1313dc)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1313dc);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x341243){return this['activeUIs']['has'](_0x341243);}['activate'](_0x1ead8a,_0x5905d8=this['defaultFilter']){const _0x42a1b8=this['context']['plugins']['get']($t);if(!this['_uis']['has'](_0x1ead8a))throw new _0x22c1ce('annotationsuis-missing-ui',this,{'uiName':_0x1ead8a});this['isActive'](_0x1ead8a)&&this['deactivate'](_0x1ead8a),this['activeUIs']['add'](_0x1ead8a);const _0x1c3353=new jt();Xt({'source':_0x42a1b8['_visibleAnnotations'],'target':_0x1c3353,'filter':_0x5905d8}),this['uisData']['set'](_0x1ead8a,{'collection':_0x1c3353,'filter':_0x5905d8});const _0x4c6815=this['_uis']['get'](_0x1ead8a);_0x4c6815['attach'](_0x1c3353),this['listenTo'](_0x4c6815,'change:activeAnnotation',(_0x14062b,_0x598d6f,_0x4e9443,_0x493e3a)=>{_0x493e3a&&_0x42a1b8['_removeActiveAnnotation'](_0x493e3a),_0x4e9443&&_0x42a1b8['_addActiveAnnotation'](_0x4e9443);});}['deactivate'](_0x579948){if(this['activeUIs']['delete'](_0x579948),!this['_uis']['has'](_0x579948))throw new _0x22c1ce('annotationsuis-missing-ui',this,{'uiName':_0x579948});const _0x4907d4=this['_uis']['get'](_0x579948);_0x4907d4['detach'](),this['stopListening'](_0x4907d4),this['uisData']['get'](_0x579948)['collection']['destroy'](),this['uisData']['delete'](_0x579948);}['switchTo'](_0xde26b3){if(!this['_uis']['has'](_0xde26b3))throw new _0x22c1ce('annotationsuis-missing-ui',this,{'uiName':_0xde26b3});const _0x521f8d=this['context']['plugins']['get']($t),_0x5a44c1=Array['from'](_0x521f8d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xde26b3);const _0x377b1f=this['_uis']['get'](_0xde26b3);_0x377b1f['setActiveAnnotation'](_0x5a44c1),_0x377b1f['_setSelectedAnnotations']&&_0x5a44c1&&_0x377b1f['_setSelectedAnnotations']([_0x5a44c1]);}['deactivateAll'](){for(const _0x110a82 of this['activeUIs'])this['deactivate'](_0x110a82);}['register'](_0x43ba24,_0x890a43){if(this['_uis']['has'](_0x43ba24))throw new _0x22c1ce('annotationsuis-register-already-registered');if('function'!=typeof _0x890a43['attach']||'function'!=typeof _0x890a43['detach']||'function'!=typeof _0x890a43['setActiveAnnotation'])throw new _0x22c1ce('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x43ba24,_0x890a43);}['refilterAnnotations'](){const _0x5d1966=this['context']['plugins']['get']($t)['collection'],_0x1bcb49=new Map(),_0x508adb=Array['from'](this['activeUIs']);for(const _0x312e6e of this['activeUIs']){const _0x3881ef=this['uisData']['get'](_0x312e6e)['collection'];for(const _0x5dacf6 of _0x3881ef)_0x1bcb49['set'](_0x5dacf6,_0x312e6e);}for(const _0x223537 of _0x5d1966){const _0x379d38=_0x1bcb49['get'](_0x223537);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x223537);const _0x55d909=_0x508adb['find'](_0x1a04dd=>this['uisData']['get'](_0x1a04dd)['filter'](_0x223537));_0x379d38!==_0x55d909&&(_0x379d38&&this['uisData']['get'](_0x379d38)['collection']['remove'](_0x223537),_0x55d909&&this['uisData']['get'](_0x55d909)['collection']['add'](_0x223537));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3b2261){const _0x2f0389=[];for(const _0x31225a of this['activeUIs']){(0x0,this['uisData']['get'](_0x31225a)['filter'])(_0x3b2261)&&_0x2f0389['push'](_0x31225a);}if(_0x2f0389['length']>0x1)throw new _0x22c1ce('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2f0389,'annotationType':_0x3b2261['type']});}}const wi=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x1aa775('px');class _i extends _0x4938be{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x47663e){super(_0x47663e);const _0x3d1eef=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 _0x3b1487(),this['focusCycler']=new _0x572537({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x3d1eef['to']('class')],'style':{'minHeight':_0x3d1eef['to']('minHeight',_0x19cb41=>'number'==typeof _0x19cb41?wi(_0x19cb41+0xa):null)},'dir':_0x47663e['uiLanguageDirection'],'role':'application','aria-label':bt(_0x47663e,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':bt(_0x47663e,'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',_0x329da9=>{this['_updateItemPositionInFocusables'](_0x329da9['source']);}),this['list']['forEach'](_0x535864=>{this['focusTracker']['add'](_0x535864['element']),this['_updateItemPositionInFocusables'](_0x535864);}),this['list']['on']('change',(_0x509e02,_0x51faf6)=>{for(const _0x374dde of _0x51faf6['removed'])this['focusTracker']['remove'](_0x374dde['element']),this['focusables']['remove'](_0x374dde);for(const _0x25f718 of _0x51faf6['added'])this['focusTracker']['add'](_0x25f718['element']),this['_updateItemPositionInFocusables'](_0x25f718);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2d3b97){const _0x43dc7f=this['focusables']['getIndex'](_0x2d3b97);let _0x3313b0,_0x868f1d;for(const _0x57c5eb of this['focusables'])if(_0x2d3b97['top']<_0x57c5eb['top']){_0x3313b0=_0x57c5eb;break;}if(_0x868f1d=_0x3313b0?this['focusables']['getIndex'](_0x3313b0):this['focusables']['length'],-0x1!==_0x43dc7f){if(_0x43dc7f===_0x868f1d-0x1)return;this['focusables']['remove'](_0x2d3b97),_0x868f1d=_0x3313b0?this['focusables']['getIndex'](_0x3313b0):this['focusables']['length'];}this['focusables']['add'](_0x2d3b97,_0x868f1d);}}const gi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x1aa775('px');class Ai extends _0x4938be{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x161f78){super(_0x161f78),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x153fc8,_0x17e34f)=>_0x153fc8+_0x17e34f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Wt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1cd55f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1cd55f['to']('isAnimationDisabled',_0xb66565=>_0xb66565?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1cd55f['to']('top',_0x5b2fdb=>gi(_0x5b2fdb))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x48b59b=this['element']['clientHeight'];_0x48b59b&&(this['height']=_0x48b59b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Ti extends _0x4770a4{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x36c64d){super(_0x36c64d),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 _0x34a05e=this['context']['config']['get']('sidebar.container');_0x34a05e&&this['setContainer'](_0x34a05e);}['setContainer'](_0x44ffe9){if(!yi(_0x44ffe9))throw new _0x22c1ce('sidebar-setcontainer-invalid-element');this['container']=_0x44ffe9;}['_attachToContainer']({viewClass:_0x2573f6='',spaceBetweenItems:_0x3a1bb1=0x19}={}){if(!yi(this['container']))throw new _0x22c1ce('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2573f6,this['_spaceBetweenItems']=_0x3a1bb1;}['rearrange']({removedAnnotation:_0x1aafc0,previousAnnotation:_0x31ada3,nextAnnotation:_0x5ce34b}){const _0x132213=this['getSidebarItemView'](_0x1aafc0);this['view']['list']['remove'](_0x132213),this['_destroySidebarItemView'](_0x1aafc0),_0x31ada3&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x31ada3)),_0x5ce34b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5ce34b)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x379a03,activatedAnnotation:_0x3d20f2,disableAnimationOnActivatedAnnotation:_0x45d20a}){if(this['_activeAnnotation']=_0x3d20f2,_0x379a03){_0x379a03['isActive']=!0x1;const _0x2ac2b1=this['getSidebarItemView'](_0x379a03);_0x2ac2b1&&_0x45d20a&&(_0x2ac2b1['isAnimationDisabled']=!0x1);}if(_0x3d20f2){const _0x486c8a=this['getSidebarItemView'](_0x3d20f2);_0x486c8a&&(_0x3d20f2['isActive']=!0x0,_0x45d20a&&(_0x486c8a['isAnimationDisabled']=!0x0,_0x486c8a['top']+=0x1),this['_alignToTargetRect'](_0x486c8a));}}['_detachFromContainer'](_0x3701dc){if(this['view']['element']['remove'](),_0x3701dc){for(const _0x2497a4 of _0x3701dc)this['_destroySidebarItemView'](_0x2497a4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x34c92c,_0x909833){_0x909833||(_0x909833=_0x34c92c['view']);const _0x58ca2d=new Ai(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x58ca2d,_0x34c92c),this['_annotationToSidebarItemView']['set'](_0x34c92c,_0x58ca2d),_0x58ca2d['content']['add'](_0x909833),this['listenTo'](_0x34c92c['view'],'change:targetRect',(_0x2a96c4,_0x5d337b,_0x4e8e40)=>{const _0xe9610c=this['_getTargetTop'](_0x34c92c,_0x4e8e40);_0x58ca2d['_targetTop']!=_0xe9610c&&(_0x58ca2d['_targetTop']=_0xe9610c,this['_setItemTop'](_0x58ca2d,_0xe9610c));}),this['listenTo'](_0x58ca2d,'change:top',()=>{this['_recalculate'](_0x58ca2d,'top');}),this['listenTo'](_0x58ca2d,'change:bottom',()=>{this['_recalculate'](_0x58ca2d,'bottom');}),this['_alignToTargetRect'](_0x58ca2d);const _0x43d87e=this['_getItemBefore'](_0x58ca2d);if(_0x43d87e)this['_alignAfterItem'](_0x43d87e,_0x58ca2d)||this['_alignToTargetRect'](_0x58ca2d);else this['_alignToTargetRect'](_0x58ca2d);return this['_updateLastItem'](),this['view']['list']['add'](_0x58ca2d),_0x58ca2d;}['_alignForTopChange'](_0x4b4ae6){if(!_0x4b4ae6['content']['length'])return;const _0x482205=this['_getItemBefore'](_0x4b4ae6);if(!_0x482205)return;const _0x4af316=this['_sidebarItemViewToAnnotation']['get'](_0x482205),_0x21c395=this['_activeAnnotation'];_0x21c395&&_0x21c395===_0x4af316?this['_alignAfterItem'](_0x482205,_0x4b4ae6):this['_alignBeforeItem'](_0x4b4ae6,_0x482205);}['_alignForBottomChange'](_0x3ab0f3){if(!_0x3ab0f3['content']['length'])return;const _0x2bfbbe=this['_getItemAfter'](_0x3ab0f3);if(!_0x2bfbbe)return;const _0x16f3bc=this['_sidebarItemViewToAnnotation']['get'](_0x2bfbbe),_0x548265=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x117716=this['_activeAnnotation'];_0x117716&&_0x117716===_0x16f3bc&&_0x548265?(this['_alignBeforeItem'](_0x2bfbbe,_0x3ab0f3),this['_alignAfterItem'](_0x3ab0f3,_0x2bfbbe)):_0x117716&&_0x117716===_0x16f3bc?this['_alignBeforeItem'](_0x2bfbbe,_0x3ab0f3):this['_alignAfterItem'](_0x3ab0f3,_0x2bfbbe);}['_recalculate'](_0x5a1b4c,_0xa95d9d){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x51ccf9,changedProp:_0x7f172}of this['_recalculateBuffer'])'top'===_0x7f172?this['_alignForTopChange'](_0x51ccf9):this['_alignForBottomChange'](_0x51ccf9);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5a1b4c,'changedProp':_0xa95d9d});}['getSidebarItemView'](_0xe04b4c){return this['_annotationToSidebarItemView']['get'](_0xe04b4c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4e6e59){const _0x1d78af=this['getSidebarItemView'](_0x4e6e59);this['stopListening'](_0x1d78af),this['stopListening'](_0x4e6e59['view']),_0x1d78af['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4e6e59),this['_sidebarItemViewToAnnotation']['delete'](_0x1d78af);}['_createSidebarView'](){const _0x32a19d=new _i(this['context']['locale']);return _0x32a19d['render'](),this['on']('change:_lastItem',(_0x512a03,_0x393988,_0x47d2a7,_0x14bc2d)=>{_0x14bc2d&&_0x32a19d['unbind']('minHeight'),_0x47d2a7?_0x32a19d['bind']('minHeight')['to'](_0x47d2a7,'bottom'):_0x32a19d['minHeight']=null;}),_0x32a19d;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5a9b4e){const _0x2b6342=this['_sidebarItemViewToAnnotation']['get'](_0x5a9b4e),_0x152204=_0x2b6342&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2b6342)-0x1);return _0x152204&&this['getSidebarItemView'](_0x152204)||null;}['_getItemAfter'](_0x4a9593){const _0x1a0bba=this['_sidebarItemViewToAnnotation']['get'](_0x4a9593),_0x1172e6=_0x1a0bba&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1a0bba)+0x1);return _0x1172e6&&this['getSidebarItemView'](_0x1172e6)||null;}['_alignBeforeItem'](_0xe68ee7,_0x173ac3){_0xe68ee7['updateHeight']();const _0x53f3ef=vi(_0x173ac3['bottom']+this['_spaceBetweenItems'],_0xe68ee7['top']);return!!_0x53f3ef&&(this['_setItemTop'](_0x173ac3,_0x173ac3['top']-_0x53f3ef),!0x0);}['_alignAfterItem'](_0x318c88,_0x437625){_0x318c88['updateHeight']();const _0x504eae=vi(_0x318c88['bottom']+this['_spaceBetweenItems'],_0x437625['top']);return!!_0x504eae&&(this['_setItemTop'](_0x437625,_0x437625['top']+_0x504eae,!0x1),!0x0);}['_alignToTargetRect'](_0x4a0cfc){const _0x5af864=this['_sidebarItemViewToAnnotation']['get'](_0x4a0cfc);if(!_0x5af864||!_0x5af864['target']||!_0x5af864['targetRect'])return;const _0xe10859=this['_getTargetTop'](_0x5af864,_0x5af864['targetRect']);this['_setItemTop'](_0x4a0cfc,_0xe10859);}['_getTargetTop'](_0x542c6b,_0x44054d){if(null===_0x44054d)return 0x0;if(_0x542c6b['target']instanceof _0x981c3)return _0x44054d['top'];{const _0x5b30b6=new _0x981c3(this['view']['element'])['top'];return _0x44054d['top']-_0x5b30b6;}}['_setItemTop'](_0x1c55da,_0x5853c2,_0x57d79e=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x57d79e&&(_0x5853c2=Math['max'](_0x5853c2,this['_getMaxAvailableTop'](_0x1c55da))),_0x1c55da['top']=_0x5853c2;}['_getMaxAvailableTop'](_0x23cce8){let _0x777607=this['_getItemBefore'](_0x23cce8),_0x106b2b=0x0;for(;_0x777607;)_0x777607['updateHeight'](),_0x106b2b+=this['_spaceBetweenItems']+_0x777607['height'],_0x777607=this['_getItemBefore'](_0x777607);return _0x106b2b;}}function vi(_0x2c390d,_0x330972){return Math['max'](_0x2c390d-_0x330972,0x0);}function yi(_0x4eda30){return null!==_0x4eda30&&'object'==typeof _0x4eda30&&0x1===_0x4eda30['nodeType'];}class Ci extends _0x4770a4{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1fffdb){super(_0x1fffdb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x53f197(),this['_refreshPositioningDebounced']=_0x2b37bd(()=>{_0x1fffdb['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5d8c5f=this['context']['plugins']['get'](pi),_0x14a1ec=this['context']['plugins']['get'](Ti);_0x5d8c5f['register']('wideSidebar',this),_0x14a1ec['container']&&_0x5d8c5f['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x36084e){if(_0x36084e===this['activeAnnotation'])return;const _0x4afcf7=this['context']['plugins']['get'](Ti);_0x4afcf7['_activeAnnotation']=_0x36084e;const _0x254905=this['activeAnnotation'];_0x4afcf7['refresh']({'blurredAnnotation':_0x254905,'activatedAnnotation':_0x36084e}),this['activeAnnotation']=_0x36084e;}['attach'](_0x56c153){this['annotations']=_0x56c153;const _0x177977=this['context']['plugins']['get'](Ti);if(_0x177977['_annotations']=_0x56c153,this['isAttached'])throw new _0x22c1ce('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x177977,'set:container',()=>{this['detach'](),this['listenTo'](_0x177977,'change:container',_0x1903d9=>{_0x1903d9['off'](),this['attach'](_0x56c153);});}),_0x177977['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1b10e2=_0x8334df=>{_0x8334df['updateTargetRect'](),_0x177977['addAnnotation'](_0x8334df);};for(const _0x2dd7cd of _0x56c153)_0x1b10e2(_0x2dd7cd);this['listenTo'](_0x56c153,'add',(_0x1dbbd3,_0x2ae348)=>{_0x1b10e2(_0x2ae348);}),this['listenTo'](_0x56c153,'remove',(_0x23d17a,_0x3f34a8,_0x15d569)=>{_0x177977['rearrange']({'removedAnnotation':_0x3f34a8,'previousAnnotation':_0x56c153['get'](_0x15d569-0x1),'nextAnnotation':_0x56c153['get'](_0x15d569+0x1)}),_0x3f34a8===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x56c153,'focus',(_0x4a20cf,_0x2874bb)=>{this['setActiveAnnotation'](_0x2874bb);}),this['listenTo'](_0x56c153,'blur',()=>{this['setActiveAnnotation'](null);});const _0x406043=this['context']instanceof _0x39691f?this['context']['editors']:new _0x53f197([this['context']]);for(const _0x483d66 of _0x406043)this['_integrateWithEditorAnnotations'](_0x483d66);this['listenTo'](_0x406043,'add',(_0x44e727,_0x2111ed)=>{this['listenTo'](_0x2111ed,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2111ed);});}),this['listenTo'](_0x406043,'remove',(_0xc97246,_0x36c04f)=>{_0x36c04f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x36c04f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x22c1ce('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4084a0=this['context']['plugins']['get'](Ti);_0x4084a0['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4084a0),this['stopListening'](this['annotations']),this['context']instanceof _0x39691f&&this['stopListening'](this['context']['editors']);for(const _0x4a5ca4 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4a5ca4);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0xbc6dda){if(!_0xbc6dda['plugins']['has']('EditorAnnotations'))return;const _0x557946=_0xbc6dda['plugins']['get']('EditorAnnotations'),_0x5d2486=()=>{const _0x3c1771=_0x557946['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3c1771[0x0]||null);};this['listenTo'](_0x557946,'refresh',_0x5d2486),this['listenTo'](_0x557946,'blur',(_0x1295a4,{isAnnotationTracked:_0x5d8b5a})=>{this['activeAnnotation']&&_0x5d8b5a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x557946,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x40dc17=>{_0x557946['hasDomSelection']()&&(_0x5d2486(),_0x40dc17['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x557946);}['_destroyEditorAnnotationsIntegration'](_0x512ba3){this['stopListening'](_0x512ba3),this['_editorAnnotations']['remove'](_0x512ba3);}}class Ii extends _0x733762{['counterView'];constructor(_0xc5cd91){super(_0xc5cd91);const _0x8aa9d0=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3a7b64,_0x3a1138)=>_0x3a7b64?'...':_0x3a1138['toString']()),this['set']('annotationType',''),this['icon']=_0x885b6e,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x4938be(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x8aa9d0['to']('annotationType',_0x3ca60c=>'ck-annotation-counter__badge--'+_0x3ca60c),_0x8aa9d0['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x8aa9d0['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class bi extends _0x4770a4{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Ti,pi];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3b7dde){super(_0x3b7dde),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x334846())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x53f197(),this['_refreshPositioningDebounced']=_0x2b37bd(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](pi)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xc0172e){this['annotations']=_0xc0172e;const _0x1e8d2b=this['context']['plugins']['get'](Ti),_0x3d520f=this['balloonPanelView'];if(_0x1e8d2b['_annotations']=_0xc0172e,this['isAttached'])throw new _0x22c1ce('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1e8d2b,'set:container',()=>{this['detach'](),this['listenTo'](_0x1e8d2b,'change:container',_0x146aaf=>{_0x146aaf['off'](),this['attach'](_0xc0172e);});}),_0x1e8d2b['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x208995=_0x394a14=>{const _0x5d97d7=new Ii(this['context']['locale']);_0x1e8d2b['addAnnotation'](_0x394a14,_0x5d97d7),this['_annotationToNarrowView']['set'](_0x394a14,_0x5d97d7),_0x5d97d7['bind']('isDirty','annotationType','number')['to'](_0x394a14['view'],'isDirty','type','length'),_0x5d97d7['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3d520f['content']['first']!==_0x394a14['view']?(this['_showBalloon'](_0x394a14),_0x394a14['view']['element']['focus'](),this['setActiveAnnotation'](_0x394a14)):this['setActiveAnnotation'](null);});};for(const _0x14c5f9 of _0xc0172e)_0x208995(_0x14c5f9);this['listenTo'](_0xc0172e,'add',(_0x246686,_0x58d7f8)=>{_0x208995(_0x58d7f8);}),this['listenTo'](_0xc0172e,'remove',(_0x5971cd,_0x49b7cb,_0x3fd580)=>{this['_annotationToNarrowView']['get'](_0x49b7cb)['destroy'](),this['_annotationToNarrowView']['delete'](_0x49b7cb),_0x1e8d2b['rearrange']({'removedAnnotation':_0x49b7cb,'previousAnnotation':_0xc0172e['get'](_0x3fd580-0x1),'nextAnnotation':_0xc0172e['get'](_0x3fd580+0x1)}),_0x49b7cb===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xc0172e,'focus',(_0x144e9f,_0x5b3cd2)=>{this['setActiveAnnotation'](_0x5b3cd2);}),this['listenTo'](_0xc0172e,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x145dc7,_0x22c721)=>{_0x22c721['keyCode']===_0x51522a['esc']&&_0x3d520f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3d520f['content']['first']),this['_hideBalloon'](),_0x22c721['stopPropagation'](),_0x22c721['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x274190,_0x3e5ef4)=>{const _0x4cd7e4=_0x3e5ef4['target'];_0x3d520f['isVisible']&&_0x3d520f['element']['contains'](_0x4cd7e4)||_0x1e8d2b['view']['element']['contains'](_0x4cd7e4)||_0x274190['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x558a83=>_0x558a83['contains'](_0x4cd7e4))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x486f0c=this['context']instanceof _0x39691f?this['context']['editors']:new _0x53f197([this['context']]);for(const _0x2d64b3 of _0x486f0c)this['_integrateWithEditorAnnotations'](_0x2d64b3);this['listenTo'](_0x486f0c,'add',(_0x4050be,_0x209759)=>{this['listenTo'](_0x209759,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x209759);});}),this['listenTo'](_0x486f0c,'remove',(_0x1c5a16,_0x21ed70)=>{_0x21ed70['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x21ed70['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x42353f){if(_0x42353f===this['activeAnnotation'])return;const _0x323e21=this['context']['plugins']['get'](Ti);if(_0x323e21['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x42353f,'disableAnimationOnActivatedAnnotation':!0x0}),_0x42353f)_0x323e21['getSidebarItemView'](_0x42353f)?this['_showBalloon'](_0x42353f):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x42353f;}['detach'](){if(!this['isAttached'])throw new _0x22c1ce('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4580d6=this['context']['plugins']['get'](Ti);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4b571c=>_0x4b571c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x4580d6['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x39691f&&this['stopListening'](this['context']['editors']);for(const _0x10e011 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x10e011);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'](_0x2ed52a){if(!_0x2ed52a['plugins']['has']('EditorAnnotations'))return;const _0x2d1780=_0x2ed52a['plugins']['get']('EditorAnnotations'),_0xb95037=this['context']['plugins']['get'](Ti),_0x4d2be7=this['annotations'],_0x213376=this['balloonPanelView'],_0xcfd2c0=()=>{const _0x4236fc=_0x2d1780['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4236fc),this['setActiveAnnotation'](_0x4236fc[0x0]||null);};this['listenTo'](_0x2d1780,'refresh',_0xcfd2c0),this['listenTo'](_0x2d1780,'blur',(_0x34b911,{isAnnotationTracked:_0x1ab3af})=>{this['activeAnnotation']&&_0x1ab3af(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2d1780,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4d2be7,'blur',_0x3acd3c=>{_0x2d1780['hasDomSelection']()&&_0x3acd3c['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2e2b05,_0x38fca7)=>{const _0x274617=_0x38fca7['target'];_0x213376['isVisible']&&_0x213376['element']['contains'](_0x274617)||_0xb95037['view']['element']['contains'](_0x274617)||this['activeAnnotation']&&_0x2d1780['hasDomSelection']()&&(_0xcfd2c0(),_0x2e2b05['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2d1780);}['_destroyEditorAnnotationsIntegration'](_0x48c377){_0x48c377&&(this['stopListening'](_0x48c377),this['_editorAnnotations']['remove'](_0x48c377));}['_setSelectedAnnotations'](_0x293efa){for(const _0x1450ec of this['_selectedAnnotations'])_0x293efa['includes'](_0x1450ec)||this['_manuallyClosedAnnotationViews']['delete'](_0x1450ec['view']);this['_selectedAnnotations']=_0x293efa;}['_refreshPositioning'](){const _0x42004f=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x42004f['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xf370b0){if(this['_manuallyClosedAnnotationViews']['has'](_0xf370b0['view']))return;const _0x18d431=this['balloonPanelView']['content']['first'];_0x18d431!==_0xf370b0['view']?(_0x18d431&&this['_detachListeners'](_0x18d431),this['_attachListeners'](_0xf370b0['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xf370b0['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x298c40=this['balloonPanelView']['content']['first'],_0x1510bd=_0x298c40&&this['annotations']['getByView'](_0x298c40);if(!_0x1510bd||!this['_annotationToNarrowView']['has'](_0x1510bd))return;const _0x5bb964=this['_annotationToNarrowView']['get'](_0x1510bd)['element'],_0x4d12a9=(function(){const _0x53af94=ht['defaultPositions'];return[_0x53af94['southArrowNorthEast'],_0x53af94['northArrowSouthEast'],_0x53af94['southArrowNorth'],_0x53af94['northArrowSouth'],_0x53af94['southArrowNorthWest'],_0x53af94['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5bb964,'positions':_0x4d12a9});}['_hideBalloon'](){const _0xef96f1=this['balloonPanelView'],_0x27f7cb=_0xef96f1['content']['first'];_0x27f7cb&&(this['_detachListeners'](_0x27f7cb),_0xef96f1['unpin'](),_0xef96f1['content']['clear']());}['_attachListeners'](_0x477de9){this['listenTo'](_0x477de9,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x477de9,'Esc',(_0x4805bd,_0x21a63b)=>{this['_manuallyClosedAnnotationViews']['add'](_0x477de9),this['_hideBalloon'](),_0x21a63b();});}['_detachListeners'](_0x1d1d69){this['stopListening'](_0x1d1d69);}}class Ei extends _0x1dae7b{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[si,at,pi];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x26b244){super(_0x26b244),_0x26b244['editing']['view']['addObserver'](mt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x26b244['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x2b37bd(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x51f73f=this['editor']['plugins']['get'](pi);_0x51f73f['context']===this['editor']&&(_0x51f73f['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x18aee2,_0x28518f)=>{const _0x5ee222=this['_balloon'];if(this['isAttached']&&_0x5ee222['visibleView']){const _0x593f7d=this['annotations']['getByView'](_0x5ee222['visibleView']);_0x593f7d&&this['_closeAnnotation'](_0x593f7d),_0x28518f();}}));}['afterInit'](){const _0x2c694a=this['editor']['plugins']['get'](pi);_0x2c694a['context']===this['editor']&&(_0x2c694a['hasActive']()||_0x2c694a['switchTo']('inline'));}['setActiveAnnotation'](_0x5095d5){_0x5095d5!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5095d5&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5095d5)&&this['_addAnnotationToBalloon'](_0x5095d5,!0x0),_0x5095d5['isActive']=!0x0),_0x5095d5||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5095d5);}['attach'](_0x23679b){this['annotations']=_0x23679b;const _0x21d654=this['editor']['plugins']['get'](pi),_0x675dfd=this['_balloon'];if(this['isAttached'])throw new _0x22c1ce('inlineannotations-attach-already-attached',this);if(_0x21d654['context']!==this['editor'])throw new _0x22c1ce('inlineannotations-not-allowed-with-context',this);const _0x3e4bb0=this['editor']['plugins']['get'](si);this['listenTo'](_0x3e4bb0,'refresh',()=>{const _0x9dbde5=_0x3e4bb0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x24abe4,_0x465996;!this['_forceRefresh']&&(_0x24abe4=_0x9dbde5,_0x465996=this['_selectedAnnotations'],_0x24abe4['length']===_0x465996['length']&&_0x24abe4['every'](_0x576da7=>_0x465996['includes'](_0x576da7)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x9dbde5),this['setActiveAnnotation'](_0x9dbde5[0x0]||null));}),this['listenTo'](_0x3e4bb0,'blur',(_0x542882,{isAnnotationTracked:_0x1a7a7e})=>{this['activeAnnotation']&&_0x1a7a7e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3e4bb0,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x277fa6,_0x5ee4fc,_0x5ee3c1)=>{_0x5ee3c1||this['setActiveAnnotation'](null);}),this['listenTo'](_0x23679b,'remove',(_0x38150a,_0x5cde96)=>{this['_removeAnnotationFromBalloon'](_0x5cde96),_0x5cde96===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x675dfd,'change:visibleView',(_0x55d0d0,_0xe66fb7,_0x23a550,_0x230555)=>{_0x230555&&this['stopListening'](_0x230555);const _0x53a56b=_0x23679b['getByView'](_0x23a550);_0x23a550&&_0x53a56b&&(this['listenTo'](_0x23a550,'change:height',()=>{_0x675dfd['updatePosition']();}),this['listenTo'](_0x23a550,'Esc',()=>{this['_closeAnnotation'](_0x53a56b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x53a56b&&this['setActiveAnnotation'](_0x53a56b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x675dfd['visibleView']&&(_0x23679b['getByView'](_0x675dfd['visibleView'])&&_0x675dfd['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 _0x22c1ce('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x111b77 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x111b77);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x1f5d2e){for(const _0x127876 of this['_selectedAnnotations'])_0x1f5d2e['includes'](_0x127876)||this['_manuallyClosed']['delete'](_0x127876);for(const _0xb490d6 of this['annotations'])_0x1f5d2e['includes'](_0xb490d6)||this['_removeAnnotationFromBalloon'](_0xb490d6);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x34a3ad of _0x1f5d2e)this['_addAnnotationToBalloon'](_0x34a3ad);}this['_selectedAnnotations']=_0x1f5d2e;}['_addAnnotationToBalloon'](_0x3ab6f6,_0x558c65=!0x1){this['_manuallyClosed']['has'](_0x3ab6f6)||(this['_addedAnnotations']['has'](_0x3ab6f6)||this['_balloon']['hasView'](_0x3ab6f6['view'])||(this['_addedAnnotations']['add'](_0x3ab6f6),this['_balloon']['add']({'stackId':_0x3ab6f6['view']['id'],'view':_0x3ab6f6['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3ab6f6)}})),_0x558c65&&this['_balloon']['showStack'](_0x3ab6f6['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4c624e){const _0x268db5=_0x4c624e['target'],_0x436e3b=this['editor']['editing']['view'],_0x2bac47=_0x436e3b['document']['selection']['getFirstRange'](),_0x2c8b2a=_0x436e3b['domConverter']['viewRangeToDom'](_0x2bac47);if(_0x2c8b2a['collapse'](!0x0),_0x268db5){if(_0x268db5 instanceof _0x981c3)return _0x268db5;let _0x44defb=[];for(const _0x186138 of _0x268db5)_0x44defb['push'](..._0x981c3['getDomElementRects'](_0x186138));_0x44defb=function(_0x847575){const _0x19ed1e=[];let _0x1f2296=_0x847575[0x0];for(let _0x538fd3=0x1;_0x538fd3<_0x847575['length'];_0x538fd3++)if(Ni(_0x1f2296,_0x847575[_0x538fd3])){const _0x35f3a3=_0x847575[_0x538fd3]['width'];_0x1f2296['width']+=_0x35f3a3,_0x1f2296['right']+=_0x35f3a3;}else _0x19ed1e['push'](_0x1f2296),_0x1f2296=_0x847575[_0x538fd3];return _0x19ed1e['push'](_0x1f2296),_0x19ed1e;}(_0x44defb);const _0x414f50=_0x2c8b2a['getBoundingClientRect']();return _0x44defb['find'](_0x16753d=>_0x16753d['top']<=_0x414f50['top']&&_0x16753d['bottom']>=_0x414f50['bottom']&&_0x16753d['left']<=_0x414f50['left']&&_0x16753d['right']>=_0x414f50['right'])||_0x44defb[0x0];}return _0x4c624e['targetRect']||_0x2c8b2a;}['_removeAnnotationFromBalloon'](_0x4581f3){this['_addedAnnotations']['has'](_0x4581f3)&&this['_balloon']['hasView'](_0x4581f3['view'])&&(this['_addedAnnotations']['delete'](_0x4581f3),this['_balloon']['remove'](_0x4581f3['view']));}['_closeAnnotation'](_0x451670){this['_manuallyClosed']['add'](_0x451670),this['_removeAnnotationFromBalloon'](_0x451670);}}function Ni(_0x6c64f5,_0x34af06){return _0x6c64f5['top']===_0x34af06['top']&&_0x6c64f5['bottom']===_0x34af06['bottom']&&_0x6c64f5['right']===_0x34af06['left'];}class ki extends _0x4938be{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x41871a,_0x6d9b7b){super(_0x41871a),this['set']('isEmpty',!_0x6d9b7b['length']),this['focusTracker']=new _0x3b1487(),this['_annotationViews']=_0x6d9b7b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x572537({'focusables':_0x6d9b7b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x6d9b7b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x6d9b7b,'remove',(_0x5b4db6,_0x52ace8)=>{_0x52ace8['isActive']&&this['focus'](),_0x6d9b7b['length']||(this['isEmpty']=!0x0);});const _0x6ecfc1=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':bt(_0x41871a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x6d9b7b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x6ecfc1['if']('isEmpty','ck-hidden',_0x148f1a=>!_0x148f1a)]},'children':[{'text':bt(_0x41871a,'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 _0xea629 of this['_annotationViews'])this['focusTracker']['add'](_0xea629['element']);this['_annotationViews']['on']('change',(_0x4f472d,{added:_0x12efb9,removed:_0x15134a})=>{for(const _0x5654ed of _0x12efb9)this['focusTracker']['add'](_0x5654ed['element']);for(const _0xf9abf4 of _0x15134a)this['focusTracker']['remove'](_0xf9abf4['element']);});}}class Oi extends _0x4770a4{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Qt,$t];}constructor(_0x4f4d9b){super(_0x4f4d9b),this['archivedThreads']=new _0x53f197();}['init'](){const _0x1dcf62=this['context'],_0x20a138=_0x1dcf62['plugins']['get'](Qt),_0x10838a=_0x1dcf62['plugins']['get']($t);this['listenTo'](_0x20a138,'addCommentThread',(_0x202152,{threadId:_0x9a8c04})=>{const _0x56e09f=_0x20a138['getCommentThread'](_0x9a8c04);_0x56e09f['archivedAt']&&this['archivedThreads']['add'](_0x56e09f,this['_calculatePosition'](_0x56e09f['archivedAt'])),this['listenTo'](_0x56e09f,'change:archivedAt',(_0x292b14,_0x181388,_0x1aa818)=>{_0x1aa818?this['archivedThreads']['has'](_0x56e09f)||this['archivedThreads']['add'](_0x56e09f,this['_calculatePosition'](_0x56e09f['archivedAt'])):this['archivedThreads']['has'](_0x56e09f)&&this['archivedThreads']['remove'](_0x56e09f);});}),this['listenTo'](_0x20a138,'removeCommentThread',(_0x3b2d46,{threadId:_0x215e45})=>{const _0xfd5a5c=_0x20a138['getCommentThread'](_0x215e45);this['stopListening'](_0xfd5a5c),this['archivedThreads']['has'](_0xfd5a5c)&&this['archivedThreads']['remove'](_0xfd5a5c);},{'priority':'highest'}),this['listenTo'](_0x10838a['collection'],'focus',(_0x310d52,_0x3a035a)=>{_0x3a035a['isVisible']||(_0x3a035a['isActive']=!0x0,_0x10838a['activate'](_0x3a035a));});}['_calculatePosition'](_0x5d9239){const _0x1ed9a3=[...this['archivedThreads']]['findIndex'](_0x3525a2=>_0x3525a2['archivedAt']<_0x5d9239);return _0x1ed9a3>-0x1?_0x1ed9a3:this['archivedThreads']['length'];}}class Mi extends _0x1dae7b{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Oi,ct];}constructor(_0x571e79){super(_0x571e79),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x18b92f=this['editor'],_0x5b17f6=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x18b92f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x733762,!0x0)),_0x18b92f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5fa6b7=this['_createCommentsArchiveButton'](ot);return _0x5fa6b7['set']({'role':'menuitemcheckbox'}),_0x5fa6b7;});const _0x5edae2=_0x18b92f['plugins']['get'](Oi),_0x12ca6b=_0x18b92f['plugins']['get']('Annotations'),_0x208df5=_0x18b92f['plugins']['get']('CommentsRepository');_0x5edae2['archivedThreads']['forEach'](_0x3e1b45=>{this['_handleNewThread'](_0x3e1b45);}),this['listenTo'](_0x5edae2['archivedThreads'],'add',(_0x156f41,_0xd804bc)=>{this['_handleNewThread'](_0xd804bc);}),this['listenTo'](_0x12ca6b['collection'],'add',(_0x26b451,_0x284589)=>{const _0x4364ee=this['_pendingThreads']['find'](_0x383680=>{const _0x504f13=_0x208df5['_threadToController']['get'](_0x383680);return _0x504f13&&_0x284589['innerView']===_0x504f13['view'];});if(_0x4364ee){const _0x5ac397=this['_calculatePosition'](_0x4364ee['archivedAt']);this['_addAnnotationToArchive'](_0x284589,_0x5ac397),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4364ee),0x1);}}),this['listenTo'](_0x5edae2['archivedThreads'],'remove',(_0x5ef6bf,_0x5416eb)=>{const _0x921c=_0x18b92f['config']['get']('collaboration.channelId');if(!_0x921c||_0x5416eb['channelId']===_0x921c){if(this['_pendingThreads']['includes'](_0x5416eb))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5416eb),0x1);else{const _0x595bcc=_0x208df5['_threadToController']['get'](_0x5416eb),_0x240d64=_0x12ca6b['getByInnerView'](_0x595bcc['view']);this['annotationViews']['remove'](_0x240d64['view']),this['stopListening'](_0x240d64),this['stopListening'](_0x240d64['focusableElements']);}}}),this['listenTo'](_0x12ca6b['collection'],'add',(_0x5d307a,_0x1c9b24)=>{this['listenTo'](_0x1c9b24,'escape',_0x5b17f6);}),this['listenTo'](_0x12ca6b['collection'],'remove',(_0x542d57,_0x3b0d72)=>{this['stopListening'](_0x3b0d72,'escape',_0x5b17f6);});}['_addAnnotationToArchive'](_0x4cdf0a,_0x125be0){this['listenTo'](_0x4cdf0a,'set:isVisible',_0x26854d=>{_0x26854d['return']=!0x1,_0x26854d['stop']();}),this['annotationViews']['add'](_0x4cdf0a['view'],_0x125be0);}['_handleNewThread'](_0x4b07e9){const _0xc49c75=this['editor']['plugins']['get']('CommentsRepository'),_0x3a8760=this['editor']['plugins']['get']('Annotations'),_0x1acb27=this['editor']['config']['get']('collaboration.channelId');if(!_0x1acb27||_0x4b07e9['channelId']===_0x1acb27){const _0x14dea6=_0xc49c75['_threadToController']['get'](_0x4b07e9);if(!_0x14dea6)return void this['_pendingThreads']['push'](_0x4b07e9);const _0x227465=this['_calculatePosition'](_0x4b07e9['archivedAt']),_0x316188=_0x3a8760['getByInnerView'](_0x14dea6['view']);_0x316188['isVisible']&&_0x3a8760['_visibleAnnotations']['remove'](_0x316188),this['_addAnnotationToArchive'](_0x316188,_0x227465);}}['_calculatePosition'](_0x20485e){const _0x10a25d=this['editor']['config']['get']('collaboration.channelId'),_0x435a04=[...this['editor']['plugins']['get'](Oi)['archivedThreads']]['filter'](_0x2cadd1=>_0x2cadd1['channelId']===_0x10a25d)['findIndex'](_0x57bae2=>_0x57bae2['archivedAt']<_0x20485e);return _0x435a04<0x0||_0x435a04>this['annotationViews']['length']?this['annotationViews']['length']:_0x435a04-0x1;}['_toggleDialog'](){const _0x4b834a=this['editor'],_0x566dbf=_0x4b834a['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new ki(_0x4b834a['locale'],this['annotationViews'])),'commentsArchive'===_0x566dbf['id']?_0x566dbf['hide']():_0x566dbf['show']({'id':'commentsArchive','title':bt(_0x4b834a['locale'],'COMMENTS_ARCHIVE'),'icon':_0x5ecbdf,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x28498,_0x28d7a7=!0x1){const _0x25a64f=this['editor']['locale'],_0x54431f=this['editor']['plugins']['get']('Dialog'),_0x517eb2=new _0x28498(_0x25a64f);return _0x517eb2['bind']('isEnabled')['to'](this,'isEnabled'),_0x517eb2['bind']('isOn')['to'](_0x54431f,'id',_0x126ac5=>'commentsArchive'===_0x126ac5),_0x517eb2['set']({'label':bt(_0x25a64f,'COMMENTS_ARCHIVE'),'icon':_0x5ecbdf,'isToggleable':!0x0}),_0x28d7a7&&(_0x517eb2['tooltip']=!0x0),this['listenTo'](_0x517eb2,'execute',()=>this['_toggleDialog']()),_0x517eb2;}['_hideDialogOnAnnotationEscape']=_0x59fbdc=>{const _0x4d272f=_0x59fbdc['source'];if(!this['annotationViews']['has'](_0x4d272f['view']))return;const _0x33590a=this['editor']['plugins']['get']('Dialog');_0x33590a['isOpen']&&'commentsArchive'===_0x33590a['id']&&(_0x33590a['hide'](),_0x59fbdc['stop']());};}class Ri extends _0x1dae7b{static get['requires'](){return[Qt,ci,mi,Oi,Mi,fi,Ci,bi,Ei];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ei as AddCommentThreadCommand,Yt as Annotation,jt as AnnotationCollection,Ii as AnnotationCounterButtonView,Kt as AnnotationView,$t as Annotations,Ai as AnnotationsSidebarItemView,_i as AnnotationsSidebarView,pi as AnnotationsUIs,Vt as BaseCommentThreadView,Ft as BaseCommentView,ti as Comment,Zt as CommentThread,It as CommentThreadController,Rt as CommentThreadInputView,Bt as CommentThreadView,Ut as CommentView,Ri as Comments,Oi as CommentsArchive,Mi as CommentsArchiveUI,ci as CommentsEditing,St as CommentsListView,fi as CommentsOnly,Qt as CommentsRepository,mi as CommentsUI,si as EditorAnnotations,Ei as InlineAnnotations,bi as NarrowSidebar,Ti as Sidebar,Ci as WideSidebar,Xt as bindAnnotationCollections};
|