@ckeditor/ckeditor5-comments 46.1.1-alpha.3 → 47.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index-editor.css +2 -46
- package/dist/index.css +2 -48
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.d.ts +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.d.ts +0 -2
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.d.ts +1 -5
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.js +1 -1
- package/theme/comment.css +0 -12
- package/theme/commentthread.css +2 -38
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x48b531={}){function _0x376618(_0x2d71c5){return _0x2d71c5['map'](_0x24b717=>String['fromCharCode'](_0x24b717))['join']('');}(_0x48b531=Object['assign']({},_0x48b531))['plugins']||(_0x48b531['plugins']=Rt['defaultPlugins']),super(_0x48b531),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x376618([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x376618([0x76,0x69,0x65,0x77])][_0x376618([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x376618([0x61,0x75,0x74,0x6f]),this[_0x376618([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x376618([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x376618([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x376618([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x376618([0x6f,0x6b])});}['create'](){const _0x4a4bd5=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4a4bd5))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x56fb31=>{const _0x10e2b7=this['model']['document']['getRoot'](),_0x34b0ab=_0x10e2b7&&_0x10e2b7['getChild'](_0x10e2b7['childCount']-0x1);_0x56fb31['setSelection'](_0x34b0ab,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x5693a6=this['editing']['view'],_0x267665=_0x5693a6['document']['getRoot'](),_0x2f29b5=_0x267665['getChild'](0x0);_0x267665['childCount']>0x1||!_0x2f29b5||'p'!=_0x2f29b5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x5693a6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2f29b5['placeholder']=this['placeholder']),St({'view':_0x5693a6,'element':_0x2f29b5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2f29b5);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x52498b,_0x42a2c3={}){super(_0x52498b),this['editor']=null,this['_editorConfig']=_0x42a2c3,this['set']('value',_0x42a2c3['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x52498b,'Reply...')),this['set']('submitLabel',N(_0x52498b,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x2a4010(),this['focusCycler']=new _0x4babae({'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',(_0x1d488a,_0x3ccd40)=>{this['cancelButtonView']['fire']('execute'),_0x3ccd40();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4d59cf,_0xcecb46)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xcecb46());}),this['on']('submit',(_0x3ff66b,_0x2862a2)=>{_0x2862a2['length']>0xfde8?(alert(N(_0x52498b,'TOO_LONG_COMMENT_ALERT',[_0x2862a2['length'],0xfde8])),_0x3ff66b['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4c7bcd=this['editor'];this['element']['insertBefore'](_0x4c7bcd['ui']['element'],this['element']['firstChild']),_0x4c7bcd['model']['document']['on']('change',()=>this['value']=_0x4c7bcd['getData']()),_0x4c7bcd['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4c7bcd['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1a814e){-0x1===_0x1a814e?(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:_0x4ffbe8}=this,_0x12b1d3=new _0x3252f0(_0x4ffbe8);return _0x12b1d3['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x12b1d3['withText']=!0x0,_0x12b1d3['bind']('label')['to'](this,'submitLabel'),_0x12b1d3['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x12b1d3['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x52760f,_0x1eea3f)=>!_0x1eea3f&&!!_0x52760f['trim']()),_0x12b1d3;}['_createCancelButton'](){const {locale:_0x418cdb}=this,_0x243d63=new _0x3252f0(_0x418cdb);return _0x243d63['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x243d63['label']=N(_0x418cdb,'Cancel'),_0x243d63['withText']=!0x0,_0x243d63['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x243d63;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x518c6d=>{this['focusTracker']['add'](_0x518c6d['element']);}),this['focusables']['on']('change',(_0x4dd930,_0xda34ee)=>{for(const _0x2485e8 of Array['from'](_0xda34ee['added'])['reverse']())this['focusTracker']['add'](_0x2485e8['element']);});}}class ie extends kt{constructor(_0x7be9de,_0x253b02,_0x21262e){super(_0x7be9de),this['commentInputView']=new os(_0x7be9de,_0x21262e),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x45bec3,_0x41f0a0)=>_0x45bec3||!!_0x41f0a0),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 _0x2a1515(_0x7be9de,_0x253b02),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'](_0x1b5452){this['commentInputView']['focus'](_0x1b5452);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xbcfa38,_0x2c49bb)=>{const {submitButtonView:_0x56358c,cancelButtonView:_0x1f5b38,editor:_0x30a7a7}=this['commentInputView'];[_0x56358c['element'],_0x1f5b38['element'],_0x30a7a7?_0x30a7a7['editing']['view']['getDomRoot']():null]['filter'](_0x47092f=>_0x47092f)['some'](_0xa44453=>_0xa44453['contains'](_0x2c49bb['target']))||(this['focus'](),_0x2c49bb['preventDefault']());});}}class rs extends kt{constructor(_0x4e8a66){super(_0x4e8a66);const _0x53c76b=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x53c76b['to']('count',_0x200309=>N(_0x4e8a66,'NUMBER_OF_COMMENTS',_0x200309))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x451974,_0x4e6de6,_0x159d40){super(_0x451974);const _0xd629bf=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4e6de6['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4e6de6,this['_config']=_0x159d40,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2a4010(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4babae({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd9c4b9=>this['commentViews']['map'](_0x4a4c3c=>_0x4a4c3c['element'])['includes'](_0xd9c4b9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x451974),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2f827a=>_0x2f827a-this['_config']['maxCommentsWhenCollapsed']);for(const _0x24516a of _0x4e6de6['comments'])this['_handleNewCommentModel'](_0x24516a);this['_handleInfoComment'](),this['listenTo'](_0x4e6de6['comments'],'add',(_0x203d13,_0x10ce0c)=>{const _0x50dc72=this['_calculatePosition'](_0x10ce0c);this['length']++,this['_handleNewCommentModel'](_0x10ce0c,_0x50dc72),this['refreshVisibleViews']();}),this['listenTo'](_0x4e6de6['comments'],'remove',(_0x12daac,_0x29a556)=>{this['length']--,this['_handleRemoveCommentModel'](_0x29a556),this['refreshVisibleViews']();}),this['listenTo'](_0x4e6de6,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4e6de6,'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',_0xd629bf['if']('length','ck-hidden',_0x2cffbd=>!_0x2cffbd)],'aria-label':N(_0x451974,'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'](_0x1bb58a){-0x1===_0x1bb58a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2567df of this['commentViews'])_0x2567df['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x27f90e,_0x41892e){const _0x526e15=new this['_config']['CommentView'](this['locale'],_0x27f90e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x526e15['viewUid']=_0x27f90e['id'],_0x526e15['delegate']('removeComment')['to'](this),_0x526e15['delegate']('updateComment')['to'](this),_0x526e15['delegate']('resolveCommentThread')['to'](this),_0x526e15['delegate']('editorReady')['to'](this),_0x526e15['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x526e15,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x526e15,_0x41892e);}['_calculatePosition'](_0x38e742){const _0x181215=this['_model']['_findOptimalIndex'](_0x38e742);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x38e742['authoredAt']?_0x181215-0x1:_0x181215:_0x181215-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2d16dc={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x2d16dc,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2d16dc));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x445006){const _0x4121be=this['commentViews']['remove'](_0x445006['id']);this['stopListening'](_0x4121be),_0x4121be['isEditMode']&&this['_updateHasDirtyComment'](),_0x4121be['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2d70a1=>_0x2d70a1['isEditMode']);}['_rearrangeCollapse'](){const _0x475d3b=function(_0x364ba1){const _0x293709=new _0x39f167();for(const _0x5847d2 of _0x364ba1)_0x293709['add'](_0x5847d2);return _0x293709;}(this['commentViews']),_0x4dfaa7=this['_collapsedCommentsView']['count'];for(let _0x2449ca=0x1;_0x2449ca<=_0x4dfaa7;_0x2449ca++)_0x475d3b['remove'](0x1);for(const _0x5f178a of _0x475d3b)_0x5f178a['collapse']();_0x4dfaa7>0x0&&_0x475d3b['add'](this['_collapsedCommentsView'],0x1),ns(_0x417a3a(Array['from'](this['visibleViews']),Array['from'](_0x475d3b)),this['visibleViews'],_0x475d3b);}['_rearrangeExpand'](){ns(_0x417a3a(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3c45b9 of this['visibleViews'])_0x3c45b9['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x387df5=>{this['focusTracker']['add'](_0x387df5['element']),this['keystrokes']['listenTo'](_0x387df5['element']);}),this['commentViews']['on']('change',(_0x314ad0,_0x49458e)=>{for(const _0x46ec14 of _0x49458e['removed'])this['focusTracker']['remove'](_0x46ec14['element']),this['keystrokes']['stopListening'](_0x46ec14['element']);for(const _0x3c676f of Array['from'](_0x49458e['added'])['reverse']())this['focusTracker']['add'](_0x3c676f['element']),this['keystrokes']['listenTo'](_0x3c676f['element']);});}}function ns(_0x59e28f,_0x3046ef,_0x34935a){let _0x564381=0x0;for(const _0x7e3e1d of _0x59e28f)switch(_0x7e3e1d){case'insert':_0x3046ef['add'](_0x34935a['get'](_0x564381),_0x564381),_0x564381++;break;case'delete':_0x3046ef['remove'](_0x564381);break;case'equal':_0x564381++;}}class oe extends kt{constructor(_0x26b30e){super(_0x26b30e);const _0x4e7f03=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4e7f03['to']('contextValue',_0x1ec3d4=>N(_0x26b30e,'THREAD_CONTEXT_LABEL',_0x1ec3d4)),'tabindex':-0x1},'children':[{'text':_0x4e7f03['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xe70201,_0x3afb4b){super(_0xe70201);const _0x16b66e=this['bindTemplate'];this['_model']=_0x3afb4b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2a4010(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4babae({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x218163=>!!_0x218163),this['bind']('contextValue')['to'](this['_model'],'context',_0x93963=>_0x93963&&_0x93963['value']?this['_trimContextValue'](_0x93963['value']):N(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',_0x16b66e['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 _0x52d1b0=new _0x3252f0(this['locale']);return _0x52d1b0['label']=N(this['locale'],'Reopen'),_0x52d1b0['tooltip']=N(this['locale'],'Reopen'),_0x52d1b0['icon']=_0x22fc39,_0x52d1b0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1cecf8=>!_0x1cecf8),_0x52d1b0['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5595d7,_0x520bfe)=>_0x5595d7&&_0x520bfe),_0x52d1b0['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x52d1b0;}['_trimContextValue'](_0x4e6373){if(_0x4e6373['length']<0x96)return _0x4e6373;const _0x510542=_0x4e6373['lastIndexOf']('\x20',0x93);return _0x4e6373['substring'](0x0,_0x510542>-0x1?_0x510542:0x93)+'...';}['_attachContextActions'](){const _0x574e17=this['element']['querySelector']('.ck-context'),_0x2b529b=_0x574e17['querySelector']('.ck-context__value');this['listenTo'](_0x574e17,'mouseenter',()=>{_0x2b529b['offsetWidth']<_0x2b529b['scrollWidth']&&_0x574e17['classList']['add']('overlay');}),this['listenTo'](_0x574e17,'mouseleave',()=>{_0x574e17['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x629868 of this['focusables'])this['focusTracker']['add'](_0x629868['element']),this['keystrokes']['listenTo'](_0x629868['element']);}['_createContextView'](){const _0x22c7ee=new oe(this['locale']);return _0x22c7ee['bind']('contextValue')['to'](this),_0x22c7ee;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1de2ac,_0x3cd281,_0x490509,_0x2d4c2e){super(_0x1de2ac),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3cd281,this['_localUser']=_0x490509,this['_config']=_0x2d4c2e,this['commentThreadHeaderView']=new Yt(_0x1de2ac,_0x3cd281),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x1de2ac,N(_0x1de2ac,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1de2ac,_0x3cd281,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2d4c2e)),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',(_0x777871,_0x34feff)=>_0x777871||!!_0x34feff),this['bind']('isUnlinked')['to'](_0x3cd281,'unlinkedAt',_0x1f9e6b=>!!_0x1f9e6b),this['bind']('ariaLabel')['to'](this,'length',_0x49714b=>{const _0x1e14ff=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x49714b,_0x1e14ff]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2a4010(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4babae({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2945ca=>_0x2945ca['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x8fad=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x112f8a=_0x8fad['commentInputView'];return _0x8fad['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x112f8a,'value',(_0x4f88ed,_0x57f41f,_0x50fde4,_0x2ee2be,_0x221517)=>!!_0x221517||!!_0x2ee2be&&_0x50fde4&&!_0x57f41f||_0x4f88ed&&_0x50fde4&&!_0x57f41f),_0x112f8a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x32eeb3,_0x2ef090,_0xc05ac9)=>{let _0x194d5b;return _0x194d5b=_0xc05ac9&&_0x2ef090?'Reply\x20to\x20reopen\x20discussion...':_0x32eeb3?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x194d5b);}),_0x112f8a['bind']('submitLabel')['to'](this,'length',_0x5d814f=>N(this['locale'],_0x5d814f?'Reply':'Comment')),_0x112f8a['on']('submit',(_0x4c1f91,_0x4b44dd)=>{this['fire']('addComment',_0x4b44dd),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x112f8a['on']('cancel',()=>{this['focus']();}),_0x112f8a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x112f8a['on']('cancel',_0x4ffa6e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4ffa6e['stop']());}),this['on']('change:isActive',(_0x27e302,_0xbada49,_0x5df32c)=>{_0x5df32c||this['length']||_0x112f8a['value']||this['fire']('removeCommentThread');}),_0x8fad;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x22e9b3(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2a95a0,target:_0x28bc39,type:_0x3f6685,isVisible:_0x3da7b5=!0x0}){super(),this['view']=_0x2a95a0,this['view']['element']||this['view']['render'](),this['_type']=_0x3f6685,this['_target']=_0x28bc39,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x39f167([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x57bf01,_0x1b6194)=>{this['view']['focusTracker']['add'](_0x1b6194);}),this['focusableElements']['on']('remove',(_0x258ff9,_0x3ee087)=>{this['view']['focusTracker']['remove'](_0x3ee087);}),this['set']('isVisible',_0x3da7b5);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2a428e=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2a428e),_0x2a428e;}get['targetRect'](){const _0x3429f8=this['target'];if(null===_0x3429f8)return null;if(_0x3429f8 instanceof _0x2a219f)return _0x3429f8;const _0x279425=_0x3429f8['filter'](_0x5cc173=>function(_0x5191fc){const _0x2d8c7e=_0x5191fc['offsetParent'];if(_0x2d8c7e)return!0x0;const _0x4cf3bb=_0x5191fc['getClientRects']()['item'](0x0);return!!_0x4cf3bb;}(_0x5cc173));return 0x0===_0x279425['length']?null:new _0x2a219f(_0x279425[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x6fe676){this['view']['isActive']=_0x6fe676,this['view']['mainView']['isActive']=_0x6fe676;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x1cb3bf){if(!(null===_0x1cb3bf||_0x1cb3bf instanceof _0x2a219f||Array['isArray'](_0x1cb3bf)&&_0x1cb3bf['every'](_0x1005df=>fi(_0x1005df))))throw new _0x5d3b6b('annotation-invalid-target',null,{'target':_0x1cb3bf});}['_getNormalizedTarget'](){const _0x1856e1='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x1856e1)?[_0x1856e1]:_0x1856e1;}}function fi(_0x1e7ab7){return null!==_0x1e7ab7&&'object'==typeof _0x1e7ab7&&'nodeType'in _0x1e7ab7&&0x1===_0x1e7ab7['nodeType'];}class S extends _0x39f167{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x567aa8=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2a4010(),this['_focusTracker']['on']('change:isFocused',(_0x58e900,_0xe4f8f5,_0x3f5e73)=>{_0x3f5e73||this['fire']('blur');});for(const _0x3a22cd of _0x567aa8)this['add'](_0x3a22cd);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1bb391){if(this['has'](_0x1bb391))throw new _0x5d3b6b('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1bb391['innerView'],_0x1bb391),this['_viewToAnnotation']['set'](_0x1bb391['view'],_0x1bb391);for(const _0x275740 of _0x1bb391['focusableElements'])this['_focusTracker']['add'](_0x275740);this['listenTo'](_0x1bb391['focusableElements'],'add',(_0x1353c9,_0x33447b)=>{this['_focusTracker']['add'](_0x33447b);}),this['listenTo'](_0x1bb391['focusableElements'],'remove',(_0x41612e,_0x4e75ad)=>{this['_focusTracker']['remove'](_0x4e75ad);}),this['listenTo'](_0x1bb391['view']['focusTracker'],'change:isFocused',(_0x382303,_0x2aa3c7,_0x1b12d7)=>{_0x1b12d7&&this['fire']('focus',_0x1bb391);}),_0x1bb391['updateTargetRect']();const _0x2982c1=this['_getOrderInContent'](_0x1bb391['view']['targetRect']);return super['add'](_0x1bb391,_0x2982c1);}['remove'](_0x133981){if(!this['has'](_0x133981))throw new _0x5d3b6b('annotationcollection-not-existing-item',null);this['stopListening'](_0x133981['view']['focusTracker']),this['stopListening'](_0x133981['focusableElements']);for(const _0x582660 of _0x133981['focusableElements'])this['_focusTracker']['remove'](_0x582660);return this['_viewToAnnotation']['delete'](_0x133981['view']),this['_innerViewToAnnotation']['delete'](_0x133981['innerView']),super['remove'](_0x133981);}['getByInnerView'](_0x301e2b){return this['_innerViewToAnnotation']['get'](_0x301e2b);}['getByView'](_0x58ccf5){return this['_viewToAnnotation']['get'](_0x58ccf5);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x14edd3 of this)_0x14edd3['updateTargetRect']();this['_sort']();}['_sort'](){const _0x29960c=Array['from'](this)['sort']((_0x53c348,_0x4298d6)=>w(_0x53c348['view']['targetRect'],_0x4298d6['view']['targetRect']));for(let _0x2524cb=_0x29960c['length']-0x1;_0x2524cb>0x0;_0x2524cb--){const _0x2e827d=_0x29960c[_0x2524cb];_0x2524cb!==this['getIndex'](_0x2e827d)&&(this['remove'](_0x2e827d),this['add'](_0x2e827d));}}['_getOrderInContent'](_0x22fe2){let _0x1a0550=0x0;if(!_0x22fe2)return this['length'];for(const _0x283102 of this){const _0x297915=_0x283102['view']['targetRect'];if(_0x297915){if(w(_0x22fe2,_0x297915)<0x0)return _0x1a0550;_0x1a0550++;}}return _0x1a0550;}}function v({source:_0x2745db,target:_0x384c48,filter:_0x5e19c3}){for(const _0x574be5 of _0x2745db)_0x5e19c3(_0x574be5)&&_0x384c48['add'](_0x574be5);_0x384c48['listenTo'](_0x2745db,'add',(_0x5ceae2,_0x4c1871)=>{_0x5e19c3(_0x4c1871)&&_0x384c48['add'](_0x4c1871);}),_0x384c48['listenTo'](_0x2745db,'remove',(_0x40f282,_0x20fe25)=>{_0x384c48['has'](_0x20fe25)&&_0x384c48['remove'](_0x20fe25);});}function w(_0x5deb58,_0x39f6a1){if(null===_0x5deb58&&null===_0x39f6a1)return 0x0;if(null===_0x5deb58)return-0x1;if(null===_0x39f6a1)return 0x1;const _0x1d5f9c=_0x5deb58['top']-_0x39f6a1['top'];return 0x0==_0x1d5f9c?_0x5deb58['left']-_0x39f6a1['left']:_0x1d5f9c;}class y extends _0x1057fb{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x411574){if(super(_0x411574),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x411574 instanceof _0x43a56a){const _0xbc2def=_0x411574['locale'];_0x411574['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0xbc2def,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x11d0f6){this['collection']['add'](_0x11d0f6);}['remove'](_0x1cafe7){this['collection']['remove'](_0x1cafe7),_0x1cafe7['destroy']();}['refreshVisibility'](){for(const _0x5cbed5 of this['collection'])_0x5cbed5['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x54974c){return this['collection']['getByInnerView'](_0x54974c);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x10f99f of this['collection'])_0x10f99f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x19739f){this['fire']('_activateAnnotation',_0x19739f);}['createAnnotation'](_0x14deee){return new T(_0x14deee);}['createAnnotationView'](_0x4f4229,_0x45fef9){return new E(_0x4f4229,_0x45fef9);}['_addActiveAnnotation'](_0x5593df){const _0x4c68db=new Set(this['activeAnnotations']);_0x4c68db['add'](_0x5593df),this['activeAnnotations']=_0x4c68db;}['_removeActiveAnnotation'](_0x37e152){const _0x51c46b=new Set(this['activeAnnotations']);_0x51c46b['delete'](_0x37e152),this['activeAnnotations']=_0x51c46b;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4f395f=this['collection'],_0x7d8c27=this['_visibleAnnotations'];function _0x5c2ce3(_0xb04837){const _0x1d235f=_0xb04837['source'];_0x1d235f['isVisible']&&!_0x7d8c27['has'](_0x1d235f)?_0x7d8c27['add'](_0x1d235f):!_0x1d235f['isVisible']&&_0x7d8c27['has'](_0x1d235f)&&_0x7d8c27['remove'](_0x1d235f),_0x1d235f['view']['focusTracker']['remove'](_0x1d235f['view']['element']),_0x1d235f['view']['focusTracker']['add'](_0x1d235f['view']['element']);}this['listenTo'](_0x4f395f,'add',(_0xe0c820,_0x161a97)=>{_0x161a97['isVisible']&&_0x7d8c27['add'](_0x161a97),this['listenTo'](_0x161a97,'change:isVisible',_0x5c2ce3);}),this['listenTo'](_0x4f395f,'remove',(_0x21e2c0,_0x300568)=>{_0x7d8c27['has'](_0x300568)&&_0x7d8c27['remove'](_0x300568),this['stopListening'](_0x300568,'change:isVisible',_0x5c2ce3);});}['_setupEnterAnnotationKeystroke'](){const _0x19a6b5=_0x4e91ea=>{_0x4e91ea['on']('ready',()=>{_0x4e91ea['keystrokes']['set'](_0x40e3f8,(_0x358c9b,_0x11e567)=>{const _0x281286=_0x4f8be7(this['activeAnnotations']['values']());_0x281286&&(_0x281286['view']['focus'](),_0x11e567());});});};this['context']instanceof _0x43a56a?_0x19a6b5(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xfe21fe,_0x2434a6)=>{_0x19a6b5(_0x2434a6);});}['_setupEscapeAnnotationHandling'](){const _0x47d72c=_0x26a881=>{const _0x1884db=_0x26a881['source'],_0x54858b=[];let _0x19d49b;if(Array['isArray'](_0x1884db['target'])){_0x19d49b=_0x1884db['target'][0x0],this['context']instanceof _0x43a56a?_0x54858b['push'](this['context']):this['context']['editors']&&_0x54858b['push'](...this['context']['editors']);for(const _0xdd2431 of _0x54858b)for(const _0x2ef8e6 of _0xdd2431['editing']['view']['domRoots']['values']())if(_0x2ef8e6['contains'](_0x19d49b))return void _0xdd2431['editing']['view']['focus']();_0x19d49b['focus']();}};this['listenTo'](this['collection'],'add',(_0x2ca68d,_0x39d537)=>{this['listenTo'](_0x39d537,'escape',_0x47d72c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4d00e4,_0x3ddd7b)=>{this['stopListening'](_0x3ddd7b,'escape',_0x47d72c);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1057fb{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ff481){super(_0x2ff481),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3ffb3c=this['context']['config'];_0x3ffb3c['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3ffb3c['define']('comments.maxThreadTotalWeight',0x1f4),_0x3ffb3c['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3ffb3c['define']('comments.CommentThreadView',gt),_0x3ffb3c['define']('comments.CommentView',Tt),_0x3ffb3c['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4558dd=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5187c0,_0x3ddbba)=>this['_addCommentThread'](_0x3ddbba)),this['on']('submitCommentThread',(_0x684193,_0x2a5a42)=>this['_submitCommentThread'](_0x2a5a42)),this['on']('resolveCommentThread',(_0x4724c3,_0x66f75d)=>this['_resolveCommentThread'](_0x66f75d)),this['on']('resolveCommentThread',(_0x20c6f0,_0xdd5e8b)=>this['_updateActiveAnnotation'](_0xdd5e8b),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x421168,_0x439d05)=>this['_reopenCommentThread'](_0x439d05)),this['on']('reopenCommentThread',(_0x4e6ac7,_0x541980)=>this['_updateActiveAnnotation'](_0x541980),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x47aa3,_0x256456)=>this['_removeCommentThread'](_0x256456)),this['on']('updateCommentThread',(_0x27fea6,_0x4c997d)=>this['_updateCommentThread'](_0x4c997d)),this['on']('updateCommentThread',(_0x46a5ac,_0x205793)=>this['_updateActiveAnnotation'](_0x205793),{'priority':'lowest'}),this['on']('addComment',(_0x3a1e50,_0x50a532)=>this['_addComment'](_0x50a532)),this['on']('updateComment',(_0x37a7b3,_0x28c254)=>this['_updateComment'](_0x28c254)),this['on']('removeComment',(_0x1c0062,_0x56ecde)=>this['_removeComment'](_0x56ecde)),this['on']('addComment',(_0x51375d,{threadId:_0x1bb2b9,isFromAdapter:_0xff39e2})=>{if(_0xff39e2)return;const _0xd2f04e=this['getCommentThread'](_0x1bb2b9),_0x1d49ae=_0xd2f04e&&this['_threadToController']['get'](_0xd2f04e);_0x1d49ae&&_0x1d49ae['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4558dd,'change:activeAnnotations',(_0x2815d0,_0x2a28d3,_0xe1f211)=>{const _0x56669c=Array['from'](_0xe1f211)['map'](_0x4de162=>this['_viewToController']['get'](_0x4de162['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x56669c?_0x56669c['model']:null;});}set['adapter'](_0x4c657b){if(this['_adapter'])throw new _0x5d3b6b('commentsrepository-adapter-already-set');this['_adapter']=_0x4c657b;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x38c5ef=_t,threadId:_0x1a5a12=_0x4606c5(),comments:_0x1ec50f=[],unlinkedAt:_0x19f1a7=null,resolvedAt:_0x3aed3a=null,resolvedBy:_0xce521d=null,target:_0x3e4766=null,context:_0x20862e=null,attributes:_0x492ec5={},isResolvable:_0x27efac=!0x0,isSubmitted:_0x3bc6ba=!0x1,isFromAdapter:_0x2401ad=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x38c5ef),{'channelId':_0x38c5ef,'threadId':_0x1a5a12,'comments':_0x1ec50f,'unlinkedAt':_0x19f1a7,'resolvedAt':_0x3aed3a,'resolvedBy':_0xce521d,'target':_0x3e4766,'context':_0x20862e,'attributes':_0x492ec5,'isFromAdapter':_0x2401ad,'isResolvable':_0x27efac,'isSubmitted':_0x3bc6ba}),this['getCommentThread'](_0x1a5a12);}['openNewCommentThread']({channelId:_0x50822b=_t,threadId:_0x5a715c=_0x4606c5(),target:_0xcfc8a6,context:_0x325282=null,isResolvable:_0x460462=!0x0}){if(this['_readOnlyChannels']['has'](_0x50822b)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0xcfc8a6)throw new _0x5d3b6b('commentsrepository-missing-target');const _0x5d9a4a=this['addCommentThread']({'channelId':_0x50822b,'threadId':_0x5a715c,'target':_0xcfc8a6,'context':_0x325282,'isResolvable':_0x460462});if(!_0x5d9a4a)return null;const _0x473ec1=this['_threadToController']['get'](_0x5d9a4a),_0x9a3a61=_0x473ec1['view']['commentThreadInputView']['commentInputView'],_0x38bb93=this['context']['plugins']['get'](y),_0x43ec7a=_0x38bb93['getByInnerView'](_0x473ec1['view']);return _0x38bb93['activate'](_0x43ec7a),_0x9a3a61['once']('editorReady',()=>_0x9a3a61['focus']()),_0x5d9a4a;}['hasCommentThread'](_0x20cd7b){if('string'!=typeof _0x20cd7b)throw new _0x5d3b6b('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x20cd7b);}['updateCommentThread']({channelId:_0x55bf22=_t,threadId:_0x4797f3,context:_0xc84221,unlinkedAt:_0x316caa,attributes:_0x35e471,isFromAdapter:_0x4312ee=!0x1}){return this['fire'](Nt('updateCommentThread',_0x55bf22),{'channelId':_0x55bf22,'threadId':_0x4797f3,'context':_0xc84221,'unlinkedAt':_0x316caa,'attributes':_0x35e471,'isFromAdapter':_0x4312ee}),this['getCommentThread'](_0x4797f3);}['getCommentThread'](_0x84c71d){if('string'!=typeof _0x84c71d)throw new _0x5d3b6b('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x84c71d);}['fetchCommentThread']({channelId:_0xb242f6,threadId:_0x559150}={}){const _0x266d30=this['getCommentThread'](_0x559150);if(_0x266d30)return Promise['resolve'](_0x266d30);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5d3b6b('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0xb242f6,'threadId':_0x559150})['then'](_0x560ce2=>this['hasCommentThread'](_0x559150)?this['getCommentThread'](_0x559150):_0x560ce2?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0xb242f6},_0x560ce2)):void 0x0)['catch'](_0x345729=>{throw console['error'](_0x345729),new _0x5d3b6b('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3c65e6,skipNotAttached:_0x23efd2=!0x1,skipEmpty:_0xad39a4=!0x1,toJSON:_0x468ed4=!0x1}={}){const _0x4cca45=[];for(const _0x4d7f9b of this['_threads']['values']())_0x3c65e6&&_0x4d7f9b['channelId']!==_0x3c65e6||_0x23efd2&&!_0x4d7f9b['isAttached']||_0xad39a4&&0x0===_0x4d7f9b['length']||_0x4cca45['push'](_0x4d7f9b);return _0x468ed4?_0x4cca45['map'](_0x3888a3=>_0x3888a3['toJSON']()):_0x4cca45;}['getAnnotationForCommentThread'](_0x39feb8){const _0x20046a=this['_threadToController']['get'](_0x39feb8);if(!_0x20046a)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x20046a['view'])||null;}['getCommentThreadForAnnotation'](_0x34d9ca){const _0xc87e8f=this['_viewToController']['get'](_0x34d9ca['innerView']);return _0xc87e8f?_0xc87e8f['model']:null;}['setActiveCommentThread'](_0x327630){const _0x202113=this['context']['plugins']['get'](y);if(!_0x327630)return void(this['activeCommentThread']&&_0x202113['deactivateAll']());const _0x5e031a=this['getCommentThread'](_0x327630);if(!_0x5e031a)throw new _0x5d3b6b('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x327630});if(!this['_threadToController']['has'](_0x5e031a))throw new _0x5d3b6b('commentsrepository-active-not-attached',null,{'threadId':_0x327630});const _0x53f032=_0x202113['getByInnerView'](this['_threadToController']['get'](_0x5e031a)['view']);_0x202113['activate'](_0x53f032);}['switchReadOnly'](_0x23088c,_0x418a67){_0x23088c?this['_readOnlyChannels']['add'](_0x418a67):this['_readOnlyChannels']['delete'](_0x418a67),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x26c364){return this['_readOnlyChannels']['has'](_0x26c364)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x37d4e1,_0x3b844c){return new vt(_0x37d4e1,_0x3b844c);}['setPermissions'](_0x4d1369,_0x19c5b2=_t){this['_permissions']['set'](_0x19c5b2,_0x4d1369),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5ab2fa=_t){return this['_permissions']['has'](_0x5ab2fa)?this['_permissions']['get'](_0x5ab2fa):bt;}['_addCommentThread']({channelId:_0x25e755,threadId:_0x2ecc7e,comments:_0x55d722,unlinkedAt:_0x5debff,resolvedAt:_0x20bc65,resolvedBy:_0x49f34f,target:_0x52d87d,context:_0x4dcfd6,attributes:_0x5064d7,isFromAdapter:_0x210828,isResolvable:_0xf09e3f,isSubmitted:_0x371864}){if('string'!=typeof _0x2ecc7e)throw new _0x5d3b6b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2ecc7e});if(this['hasCommentThread'](_0x2ecc7e))throw new _0x5d3b6b('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2ecc7e});const _0x3322e2=new pi(this,{'channelId':_0x25e755,'id':_0x2ecc7e,'context':_0x4dcfd6,'attributes':_0x5064d7,'unlinkedAt':_0x5debff,'resolvedAt':_0x20bc65,'resolvedBy':_0x49f34f?this['context']['plugins']['get'](it)['getUser'](_0x49f34f):null,'isResolvable':_0xf09e3f,'isSubmitted':_0x371864||_0x210828});this['_threads']['set'](_0x2ecc7e,_0x3322e2);for(const _0x1867b7 of _0x55d722)_0x3322e2['_add'](this['_createNewComment']({'threadId':_0x2ecc7e,..._0x1867b7}));return _0x52d87d&&_0x3322e2['attachTo'](_0x52d87d),_0x210828||!_0x3322e2['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x25e755,'threadId':_0x2ecc7e});}['_submitCommentThread']({channelId:_0x189782,threadId:_0x2001cf}){if(!this['hasCommentThread'](_0x2001cf))throw new _0x5d3b6b('commentsrepository-missing-comment-thread',this);const _0x4ee4ba=this['getCommentThread'](_0x2001cf);if(_0x4ee4ba['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x8d629,comments:_0x294a67,resolvedAt:_0x4ba994,resolvedBy:_0x3ecea8,context:_0x17df71,attributes:_0x14f847}=_0x4ee4ba,_0x1037ca=this['context']['plugins']['get']('PendingActions'),_0x5a3886=_0x1037ca['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x189782,'threadId':_0x8d629,'comments':_0x294a67['map'](_0x2dcd49=>_0x2dcd49['toJSON']()),'resolvedAt':_0x4ba994,'resolvedBy':_0x3ecea8?_0x3ecea8['id']:_0x3ecea8,'context':_0x17df71,'attributes':_0x14f847})['then'](({comments:_0x3aea3a})=>{_0x1037ca['remove'](_0x5a3886);for(const _0x2016fd of _0x3aea3a)this['_updateComment']({'channelId':_0x189782,'threadId':_0x2001cf,'commentId':_0x2016fd['commentId'],'createdAt':_0x2016fd['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x42f211=>{throw console['error'](_0x42f211),new _0x5d3b6b('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4d4e7f,target:_0x24ead3}){const _0x236475=this['getCommentThread'](_0x4d4e7f);if(!_0x236475)throw new _0x5d3b6b('commentsrepository-attach-missing-comment-thread',this);const _0x306b5c=this['context']['plugins']['get']('PendingActions'),_0x309095=this['context']['plugins']['get'](y),_0xa1a84a=this['_createCommentThreadView'](_0x236475),_0x4138a5=new vt(_0x236475,_0xa1a84a);let _0x2a0e05=null;_0xa1a84a['on']('change:isDirty',(_0x328e7e,_0x394be7,_0x5efeb1)=>{_0x5efeb1?_0x2a0e05=_0x306b5c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2a0e05&&(_0x306b5c['remove'](_0x2a0e05),_0x2a0e05=null);}),this['_threadToController']['set'](_0x236475,_0x4138a5),this['_viewToController']['set'](_0xa1a84a,_0x4138a5);const _0x4593d4=new E(this['context']['locale'],_0xa1a84a);_0x4593d4['bind']('length')['to'](_0xa1a84a),_0x4593d4['bind']('isDirty')['to'](_0xa1a84a,'isDirty',_0xa1a84a,'length',(_0x555f75,_0x7ae3a7)=>_0x555f75||!_0x7ae3a7),_0x4593d4['bind']('isActive')['to'](_0xa1a84a),_0x4593d4['type']='comment';const _0x5097d0=new T({'view':_0x4593d4,'target':_0x24ead3,'type':'comment','isVisible':!_0x236475['archivedAt']&&!!('function'==typeof _0x24ead3?_0x24ead3():_0x24ead3)});return _0xa1a84a['on']('escape',()=>{_0x5097d0['fire']('escape');}),this['_bindAnnotationToEditors'](_0xa1a84a,_0x5097d0),_0x309095['add'](_0x5097d0),_0x5097d0;}['_bindAnnotationToEditors'](_0x4f9699,_0x19fae1){this['listenTo'](_0x4f9699,'editorReady',(_0x114319,_0x5b1218)=>{const _0x1fbc06=_0x5b1218['ui']['view']['body']['bodyCollectionContainer'];_0x19fae1['focusableElements']['add'](_0x1fbc06),this['context']instanceof _0x43a56a&&this['context']['ui']['focusTracker']['add'](_0x1fbc06);},{'priority':'highest'}),this['listenTo'](_0x4f9699,'editorDestroyed',(_0x35b746,_0x59e4d1)=>{const _0x88961c=_0x59e4d1['ui']['view']['body']['bodyCollectionContainer'];_0x19fae1['focusableElements']['has'](_0x88961c)&&_0x19fae1['focusableElements']['remove'](_0x88961c),this['context']instanceof _0x43a56a&&this['context']['ui']['focusTracker']['remove'](_0x88961c);});}['_unbindEditors'](_0x1e0500){this['stopListening'](_0x1e0500,'editorReady'),this['stopListening'](_0x1e0500,'editorDestroyed');}['_createCommentThreadView'](_0x109924){const _0x300fc0=this['context']['plugins']['get'](it),{config:_0x2988ab,locale:_0x41df0b}=this['context'],_0x1746b7=pt(_0x2988ab['get']('locale'),_0x41df0b);return new(0x0,(_0x2988ab['get']('comments'))['CommentThreadView'])(_0x41df0b,_0x109924,_0x300fc0['me'],{'editorConfig':{..._0x2988ab['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2988ab['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2988ab['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2988ab['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2988ab['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1746b7,'CommentView':_0x2988ab['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x49e313,channelId:_0x92ab84,resolvedAt:_0x2939da,resolvedBy:_0x8eaa7a,isFromAdapter:_0x35c341}){if(!this['hasCommentThread'](_0x49e313))throw new _0x5d3b6b('commentsrepository-missing-comment-thread',null,{'threadId':_0x49e313});const _0x5b85e5=this['getCommentThread'](_0x49e313);if(_0x5b85e5['isResolved'])throw new _0x5d3b6b('commentsrepository-resolved-comment-thread',null,{'threadId':_0x49e313});const _0x53c973=this['context']['plugins']['get'](it);if(_0x5b85e5['resolvedBy']=_0x53c973['getUser'](_0x8eaa7a),_0x5b85e5['resolvedAt']=_0x2939da,_0x35c341||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5a6166=this['context']['plugins']['get']('PendingActions'),_0x5882d6=_0x5a6166['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x92ab84,'threadId':_0x49e313})['then'](({resolvedAt:_0x4642e3,resolvedBy:_0x256b8a})=>{_0x5a6166['remove'](_0x5882d6),_0x5b85e5['resolvedBy']['id']!==_0x256b8a&&(_0x5b85e5['resolvedBy']=_0x53c973['getUser'](_0x256b8a)),_0x5b85e5['resolvedAt']=_0x4642e3;})['catch'](_0xe34219=>{throw console['error'](_0xe34219),new _0x5d3b6b('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1d2d95,channelId:_0x80eab0,isFromAdapter:_0x5377f4}){if(!this['hasCommentThread'](_0x1d2d95))throw new _0x5d3b6b('commentsrepository-missing-comment-thread',null,{'threadId':_0x1d2d95});const _0x319ee2=this['getCommentThread'](_0x1d2d95);if(!_0x319ee2['isResolved'])throw new _0x5d3b6b('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1d2d95});if(_0x319ee2['resolvedBy']=null,_0x319ee2['resolvedAt']=null,_0x5377f4||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2249b4=this['context']['plugins']['get']('PendingActions'),_0x3bd775=_0x2249b4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x80eab0,'threadId':_0x1d2d95})['then'](()=>_0x2249b4['remove'](_0x3bd775))['catch'](_0x30f84b=>{throw console['error'](_0x30f84b),new _0x5d3b6b('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x18e1f6,isFromAdapter:_0x362872}){const _0x5a822a=this['getCommentThread'](_0x18e1f6);if(!_0x5a822a)throw new _0x5d3b6b('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x18e1f6),this['_threads']['delete'](_0x18e1f6),!_0x5a822a['isSubmitted']||_0x362872||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x46d21d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cc579}=_0x5a822a,_0x19b878=_0x46d21d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5cc579,'threadId':_0x18e1f6})['then'](()=>_0x46d21d['remove'](_0x19b878))['catch'](_0x33b7d5=>{throw console['error'](_0x33b7d5),new _0x5d3b6b('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x23dc40,unlinkedAt:_0x556f58,context:_0x47a274,attributes:_0x1264fd,isFromAdapter:_0x20c847}){if('string'!=typeof _0x23dc40)throw new _0x5d3b6b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x23dc40});if(!this['hasCommentThread'](_0x23dc40))throw new _0x5d3b6b('commentsrepository-missing-comment-thread',null,{'threadId':_0x23dc40});const _0x55cad7=this['getCommentThread'](_0x23dc40);let _0x2a8c61=!0x1;if(void 0x0!==_0x47a274&&_0x55cad7['context']!==_0x47a274&&(_0x55cad7['context']=_0x47a274,_0x2a8c61=!0x0),void 0x0!==_0x556f58&&_0x55cad7['unlinkedAt']!==_0x556f58&&(_0x55cad7['unlinkedAt']=_0x556f58,_0x2a8c61=!0x0),_0x1264fd&&!At(_0x1264fd,_0x55cad7['attributes'])&&(_0x55cad7['attributes']=_0x1264fd,_0x2a8c61=!0x0),!_0x2a8c61)return Promise['resolve']();if(!_0x55cad7['isSubmitted']||_0x20c847||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3b2cef=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d9b77}=_0x55cad7,_0x4b3643=_0x3b2cef['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3d9b77,'threadId':_0x23dc40,'context':_0x47a274,'unlinkedAt':_0x556f58,'attributes':_0x1264fd})['then'](()=>_0x3b2cef['remove'](_0x4b3643))['catch'](_0x5e42f5=>{throw console['error'](_0x5e42f5),new _0x5d3b6b('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2006fe){const _0x317d8e=this['context']['plugins']['get'](y),_0x548e35=this['getCommentThread'](_0x2006fe);if(_0x548e35['_isAttached']=!0x1,this['_threadToController']['has'](_0x548e35)){const _0x59deb6=this['_threadToController']['get'](_0x548e35),_0x32a9af=_0x59deb6['view'],_0x344085=_0x317d8e['getByInnerView'](_0x32a9af);this['_threadToController']['delete'](_0x548e35),this['_viewToController']['delete'](_0x32a9af),_0x344085&&_0x317d8e['remove'](_0x344085),_0x59deb6['destroy'](),_0x32a9af['destroy']()['then'](()=>{this['_unbindEditors'](_0x32a9af);});}}['_updateActiveAnnotation']({threadId:_0x3237a6,resolvedAt:_0x25759c,unlinkedAt:_0x3d1063}){const _0x125a57=!!_0x25759c,_0x49cd4c=this['context']['plugins']['get'](y),_0x5ab3fe=this['getCommentThread'](_0x3237a6);if(this['_threadToController']['has'](_0x5ab3fe)){const _0x4e1536=this['_threadToController']['get'](_0x5ab3fe)['view'],_0x344cf4=_0x49cd4c['getByInnerView'](_0x4e1536);_0x344cf4&&(_0x125a57&&_0x49cd4c['_removeActiveAnnotation'](_0x344cf4),_0x3d1063?_0x344cf4['isVisible']=!0x1:_0x344cf4['refreshVisibility']());}}['_getExternalAuthor'](_0x195ef1){const _0x11293e=this['context']['plugins']['get'](it),_0x28fd6f=It('external:'+_0x195ef1),_0x776455=_0x11293e['getUser'](_0x28fd6f);return _0x776455||_0x11293e['addUser']({'id':_0x28fd6f,'name':_0x195ef1});}['_createNewComment']({threadId:_0x2f4d49,commentId:_0x1a2c1e=_0x4606c5(),content:_0x1fb3e7,authorId:_0x5b2597,createdAt:_0x5bc23d,attributes:_0x427fd9}){if('string'!=typeof _0x1a2c1e)throw new _0x5d3b6b('commentsrepository-invalid-commentid');if('string'!=typeof _0x5b2597)throw new _0x5d3b6b('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1fb3e7||!_0x1fb3e7['trim']())throw new _0x5d3b6b('commentsrepository-invalid-comment-content');const _0x2127a5=this['context']['plugins']['get'](it)['getUser'](_0x5b2597);if(!_0x2127a5)throw new _0x5d3b6b('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5b2597});let _0x1151a8=null,_0x6a47ea=_0x5bc23d;return _0x427fd9?.['@external']&&(_0x1151a8=this['_getExternalAuthor'](_0x427fd9['@external']['authorName']),_0x6a47ea=new Date(_0x427fd9['@external']['createdAt'])),new wi(this,{'threadId':_0x2f4d49,'id':_0x1a2c1e,'author':_0x1151a8||_0x2127a5,'creator':_0x2127a5,'content':_0x1fb3e7,'createdAt':_0x5bc23d,'authoredAt':_0x6a47ea,'attributes':_0x427fd9});}['_addComment'](_0x139dcb){let {threadId:_0xa98c72,content:_0x43457e,attributes:_0x4d036d,isFromAdapter:_0x1062a1}=_0x139dcb;const _0x259229=this['getCommentThread'](_0x139dcb['threadId']);if(!_0x259229)throw new _0x5d3b6b('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5d99fa=this['_createNewComment'](_0x139dcb),{id:_0x1645dd}=_0x5d99fa;if(_0x259229['_add'](_0x5d99fa),_0x1062a1||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x259229['isSubmitted'])return Promise['resolve']();const _0x2cef8b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4bbd2f}=_0x259229,_0x378cd9=_0x2cef8b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4d036d||(_0x4d036d={}),this['adapter']['addComment']({'channelId':_0x4bbd2f,'threadId':_0xa98c72,'commentId':_0x1645dd,'content':_0x43457e,'attributes':_0x4d036d})['then'](_0x1720ee=>{_0x2cef8b['remove'](_0x378cd9),_0x1720ee&&this['_updateComment']({'channelId':_0x4bbd2f,'threadId':_0xa98c72,'commentId':_0x1645dd,'createdAt':_0x1720ee['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4eee4e=>{throw console['error'](_0x4eee4e),new _0x5d3b6b('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x494137,commentId:_0x19d4ef,content:_0x4ff0bd,createdAt:_0x3e2fc1,attributes:_0x2684e9,isFromAdapter:_0x4c3802}){if(void 0x0!==_0x4ff0bd&&('string'!=typeof _0x4ff0bd||!_0x4ff0bd['trim']()['length']))throw new _0x5d3b6b('commentsrepository-update-comment-invalid-content');const _0x3aa31e=this['getCommentThread'](_0x494137),_0x498f54=_0x3aa31e['getComment'](_0x19d4ef);if(!_0x498f54)throw new _0x5d3b6b('commentsrepository-update-missing-comment',this);let _0xf88306=!0x1;if(_0x4ff0bd&&_0x4ff0bd!==_0x498f54['content']&&(_0x498f54['isEditable']||_0x4c3802)&&(_0x498f54['content']=_0x4ff0bd,_0xf88306=!0x0),_0x3e2fc1&&_0x3e2fc1!==_0x498f54['createdAt']&&(_0x498f54['createdAt']=_0x3e2fc1,_0x498f54['attributes']&&_0x498f54['attributes']['@external']||(_0x498f54['authoredAt']=_0x3e2fc1),_0xf88306=!0x0),_0x2684e9&&!At(_0x2684e9,_0x498f54['attributes'])&&(_0x498f54['attributes']=_0x2684e9,_0xf88306=!0x0),!_0xf88306)return Promise['resolve']();if(_0x3aa31e['fire']('commentUpdated'),_0x4c3802||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4dfb1b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x29c23f}=this['getCommentThread'](_0x498f54['threadId']),_0x2708aa=_0x4dfb1b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x29c23f,'threadId':_0x494137,'commentId':_0x19d4ef,'content':_0x4ff0bd,'attributes':_0x2684e9})['then'](()=>_0x4dfb1b['remove'](_0x2708aa))['catch'](_0x2450d3=>{throw console['error'](_0x2450d3),new _0x5d3b6b('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5e7097,commentId:_0xdc809f,isFromAdapter:_0x3a8785}){const _0x5216cb=this['getCommentThread'](_0x5e7097),_0x29c52e=_0x5216cb['getComment'](_0xdc809f);if(!_0x29c52e)throw new _0x5d3b6b('commentsrepository-remove-missing-comment',this);if(_0x5216cb['_remove'](_0x29c52e),_0x3a8785||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x38f74e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x14561e}=_0x5216cb,_0x291362=_0x38f74e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x14561e,'threadId':_0x5e7097,'commentId':_0xdc809f})['then'](()=>_0x38f74e['remove'](_0x291362))['catch'](_0xb44acb=>{throw console['error'](_0xb44acb),new _0x5d3b6b('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x22e9b3(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x55c146,_0xb39a37){super();const _0x138319=_0x55c146['context']['plugins']['get'](it)['me'],_0xd67c7c=_0x55c146['getCommentThread'](_0xb39a37['threadId']),_0x4f5c50=0x0===_0xd67c7c['comments']['length'],_0x4342e8=_0x138319===_0xb39a37['author'];this['id']=_0xb39a37['id'],this['threadId']=_0xb39a37['threadId'],this['author']=_0xb39a37['author'],this['creator']=_0xb39a37['creator'],this['isExternal']=Boolean(_0xb39a37['attributes']&&_0xb39a37['attributes']['@external']),this['set']('content',_0xb39a37['content']),this['createdAt']=_0xb39a37['createdAt']||new Date(),this['set']('authoredAt',_0xb39a37['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xd67c7c,'resolvedAt'),this['set']('attributes',_0xb39a37['attributes']||{}),this['bind']('isEditable')['to'](_0x55c146,'_permissions',()=>{const _0x1baec3=_0x55c146['getPermissions'](_0xd67c7c['channelId'])['write'],_0xdb2962=_0x55c146['getPermissions'](_0xd67c7c['channelId'])['modifyAll'];return _0x4342e8&&_0x1baec3||!_0x4342e8&&_0xdb2962;}),this['bind']('isRemovable')['to'](_0xd67c7c,'isRemovable',_0x55c146,'_permissions',_0x1d736b=>{const _0x23d7df=_0x55c146['getPermissions'](_0xd67c7c['channelId'])['write'],_0x3f6914=_0x55c146['getPermissions'](_0xd67c7c['channelId'])['modifyAll'];return _0x4342e8&&_0x23d7df||_0x1d736b&&_0x4f5c50||!_0x4342e8&&_0x3f6914&&!_0x4f5c50;}),this['bind']('isReadOnly')['to'](_0xd67c7c,'isReadOnly'),this['_repository']=_0x55c146;}get['weight'](){return Math['max'](function(_0x487cfc){const _0xe1ef10=document['createElement']('div');return _0xe1ef10['innerHTML']=_0x487cfc,_0xe1ef10['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3b2a42){const {threadId:_0x1e757b,id:_0x5c8a27}=this;if(!this['_repository']['hasCommentThread'](_0x1e757b))throw new _0x5d3b6b('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3d70f4}=this['_repository']['getCommentThread'](_0x1e757b);this['_repository']['fire'](Nt('updateComment',_0x3d70f4,_0x1e757b),{'channelId':_0x3d70f4,'threadId':_0x1e757b,'commentId':_0x5c8a27,..._0x3b2a42});}['setAttribute'](_0x11e6d7,_0x35eafd){const _0x3c2131=wt(this['attributes']);yt(_0x3c2131,_0x11e6d7,_0x35eafd),this['update']({'attributes':_0x3c2131});}['removeAttribute'](_0x2393d5){const _0x167511=wt(this['attributes']);Ct(_0x167511,_0x2393d5),this['update']({'attributes':_0x167511});}['remove'](_0x3a3676={}){if(!_0x3a3676['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x5bc0c9,id:_0x4ccce7}=this;if(!this['_repository']['hasCommentThread'](_0x5bc0c9))throw new _0x5d3b6b('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x51bc26}=this['_repository']['getCommentThread'](_0x5bc0c9);this['_repository']['fire'](Nt('removeComment',_0x51bc26,_0x5bc0c9),{'channelId':_0x51bc26,'threadId':_0x5bc0c9,'commentId':_0x4ccce7,..._0x3a3676});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x282573,..._0x314552){for(const _0x4faf6a of _0x314552)void 0x0!==_0x4faf6a&&(_0x282573+=':'+String(_0x4faf6a));return _0x282573;}class ot extends _0x1974c9{constructor(_0x50241a){super(_0x50241a),this['set']('hasContent',!0x1);}['refresh'](){const _0xac23b0=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2ed155 of _0xac23b0['getRanges']())if(this['_hasContent'](_0x2ed155))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x259aaa=_0x4606c5(),ranges:_0x5e80ec,comment:_0x3b2ea5}={}){const _0x3fc96a=this['editor']['model'],_0x5873dc=_0x5e80ec??Array['from'](_0x3fc96a['document']['selection']['getRanges']()),_0x2b68b2=[];for(const _0xbfe020 of _0x5873dc)this['_hasContent'](_0xbfe020)&&_0x2b68b2['push'](this['_trimToContent'](_0xbfe020));if(!_0x2b68b2['length'])throw new _0x5d3b6b('addcommentthreadcommand-incorrect-ranges',null);_0x3b2ea5&&this['_createCommentThread'](_0x259aaa,_0x3b2ea5),this['_createMarkersFromRanges'](_0x259aaa,_0x2b68b2,!!_0x3b2ea5);}['_createMarkersFromRanges'](_0x1a51a4,_0x513b83,_0x205391){this['editor']['model']['change'](_0x499f29=>{for(const _0x1e82e7 of _0x513b83){const _0x45ee2b=_0x4606c5()['substr'](0x1,0x5),_0x3c6df3='comment:'+_0x1a51a4+':'+_0x45ee2b;_0x499f29['addMarker'](_0x3c6df3,{'range':_0x1e82e7,'usingOperation':_0x205391,'affectsData':_0x205391});}});}['_createCommentThread'](_0x52a552,_0x3f4032){const _0xe55b38=this['editor']['plugins']['get']('CommentsRepository'),_0x38f26b=this['editor']['config']['get']('collaboration.channelId'),_0x438bfe=this['editor']['plugins']['get']('Users')['me'];if(!_0x438bfe)throw new _0x5d3b6b('addcommentthreadcommand-user-not-found',null);_0xe55b38['addCommentThread']({'threadId':_0x52a552,'channelId':_0x38f26b,'comments':[{'authorId':_0x438bfe['id'],'content':_0x3f4032,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x2aed8a){for(const _0x1f81fa of _0x2aed8a['getItems']())if(this['_itemIsContent'](_0x1f81fa))return!0x0;return!0x1;}['_itemIsContent'](_0x3ae3ed){return _0x3ae3ed['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3ae3ed)&&!_0x3ae3ed['is']('element','tableCell');}['_trimToContent'](_0xc2dc37){const _0x8d1eb5=_0x21d911=>!this['_itemIsContent'](_0x21d911['item']),_0x5539f4=_0xc2dc37['start']['getLastMatchingPosition'](_0x8d1eb5),_0x74da2=_0xc2dc37['end']['getLastMatchingPosition'](_0x8d1eb5,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5539f4,_0x74da2);}}class b extends _0x22838b{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b8d47){super(_0x2b8d47),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x55783b=this['editor'],_0x2405e6=_0x55783b['model']['document']['selection'],_0xe8531=_0x44edca(()=>this['refreshSelectedViews'](),0xa);_0x2405e6['on']('change:range',(_0x5d2fc9,_0x3e314d)=>{_0x3e314d['directChange']&&(_0xe8531['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x55783b['editing']['view']['document'],'change:isFocused',(_0x3536b3,_0x21341c,_0x2f7a8b)=>{_0x2f7a8b&&_0xe8531();}),this['listenTo'](_0x55783b['ui']['focusTracker'],'change:isFocused',(_0x1575e3,_0x245468,_0x4606e0)=>{_0x4606e0||this['fire']('blur',{'isAnnotationTracked':_0x46f959=>this['_editorAnnotationsData']['has'](_0x46f959['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2009f2){if(this['_editorAnnotations']['has'](_0x2009f2['view']))return;this['_editorAnnotations']['add'](_0x2009f2['view']),this['editor']['ui']['focusTracker']['add'](_0x2009f2['view']['element']);const _0x30b573=this['editor']['plugins']['get'](y);this['listenTo'](_0x30b573['collection'],'remove',(_0x1c85d4,_0x3a9abd)=>{this['editor']['ui']['focusTracker']['remove'](_0x3a9abd['view']['element']),this['_editorAnnotations']['delete'](_0x3a9abd['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x311969){if('function'!=typeof _0x311969)throw new _0x5d3b6b('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x311969);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x123716,annotations:_0x13e3b2}){const _0x1b5524=[],_0x24878c=this['editor']['model']['document']['selection'],_0x1632a0=Array['from'](_0x24878c['getRanges']());for(const [_0x460a17,_0x3ea113]of this['_editorAnnotationsData']){const _0x503063=_0xf16f34(_0x3ea113),_0x43b513=_0x13e3b2['getByInnerView'](_0x460a17);_0x503063&&_0x43b513&&_0x1b5524['push']({'annotation':_0x43b513,'range':_0x503063});}function _0xf16f34(_0xefa97d){for(const _0xa79256 of _0xefa97d)for(const _0x1cb4bf of _0x1632a0)if(_0xa79256['containsRange'](_0x1cb4bf,!_0x24878c['isCollapsed']))return _0xa79256;return null;}return _0x1b5524['sort']((_0x4c95b3,_0x5d1dcf)=>{const _0x405c94=_0x4c95b3['range'],_0x18a0ad=_0x5d1dcf['range'];if(!_0x405c94['isEqual'](_0x18a0ad)){if(_0x405c94['containsRange'](_0x18a0ad,!0x0))return 0x1;if(_0x18a0ad['containsRange'](_0x405c94,!0x0))return-0x1;}return _0x4c95b3['annotation']==_0x123716?-0x1:_0x5d1dcf['annotation']==_0x123716?0x1:0x0;})['map'](_0x257140=>_0x257140['annotation']);}get['_editorAnnotationsData'](){const _0x105681=new Map();for(const _0x56bd72 of Array['from'](this['_dataCollectors']))for(const [_0x3eb431,_0x1ed540]of _0x56bd72())_0x105681['set'](_0x3eb431,_0x1ed540);return _0x105681;}}class st extends _0x22838b{['afterInit'](){const _0x3c7481=this['editor'];if(!_0x3c7481['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3c7481['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x22838b{constructor(_0x6fd211){super(_0x6fd211),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x32e6b1=this['editor'],_0x1da479=_0x32e6b1['commands']['get']('importWord'),_0x3a0b92=_0x32e6b1['plugins']['get'](it);_0x1da479&&(_0x1da479['on']('execute',(_0x4d9c33,[,_0x3f9cf9])=>{_0x3f9cf9['collaboration_features']={'comments':!0x0,'user_id':_0x3a0b92['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1da479,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x51d95e,_0x2ce68d){const {comment_threads:_0x1e6fc1}=_0x2ce68d;_0x1e6fc1&&_0x1e6fc1['forEach'](({thread_id:_0x4a1dd8,comments:_0x14a355,is_resolved:_0x4be2e8})=>{const _0x11c5e9=new Date(),_0x2aafa9=_0x14a355['map'](({author:_0x22e8f4,content:_0x304cda,created_at:_0x236abf})=>({'content':_0x304cda,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x11c5e9,'attributes':{'@external':{'authorName':_0x22e8f4,'createdAt':_0x236abf?new Date(_0x236abf):new Date(),'source':'importWord'}}})),_0x13e061=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x13e061,'threadId':_0x4a1dd8,'comments':_0x2aafa9,'resolvedAt':_0x4be2e8?_0x11c5e9:null});});}}class at extends _0x22838b{constructor(_0x1b9efd){super(_0x1b9efd),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x13bae0=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x13bae0,'contentInsertion',(_0x55714b,_0xc6633f)=>this['_removeMarkersWithoutThreads'](_0xc6633f['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3b792a){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3b792a;const _0x5bdcc9=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4fc009 of _0x3b792a['keys']()){const [_0x4a00b1,_0x5e91de]=_0x4fc009['split'](':');'comment'!=_0x4a00b1||_0x5bdcc9['hasCommentThread'](_0x5e91de)||_0x3b792a['delete'](_0x4fc009);}return _0x3b792a;}['_registerMarkerInClipboardPipeline'](){const _0x3337bf=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5945b6=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5945b6&&_0x3337bf['_registerMarkerToCopy']('comment',_0x5945b6);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x54c732){switch(_0x54c732){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x4c0151){const _0x12772b=_0x4c0151['split'](':');return{'group':_0x12772b[0x0],'id':_0x12772b[0x1],'part':_0x12772b[0x2]};}class ut extends _0x22838b{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x28b08e,_0x2a4e5a)=>{if(!_0x2a4e5a['options']['showCommentHighlights'])return null;if(_0x2a4e5a['options']['ignoreResolvedComments']){const {id:_0x298e63}=ft(_0x28b08e['markerName']),_0x5190a3=this['editor']['plugins']['get'](o);if(_0x5190a3['getCommentThread'](_0x298e63)?.['isResolved']&&_0x28b08e['item'])return _0x2a4e5a['consumable']['consume'](_0x28b08e['item'],'addMarker:'+_0x28b08e['markerName']),_0x2a4e5a['consumable']['consume'](_0x28b08e['item'],'removeMarker:'+_0x28b08e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x56a127=>{_0x56a127['on']('addMarker:comment',(_0x47ce00,_0x4e4c45,_0x136b12)=>{if(!_0x136b12['options']['showCommentHighlights'])return;const _0x3b0364=_0x4e4c45['item'];if(!_0x3b0364)return;const _0x3c3794=_0x136b12['mapper']['toViewElement'](_0x3b0364);this['editor']['model']['schema']['isObject'](_0x3b0364)&&_0x3c3794&&!_0x3c3794['getCustomProperty']('widget')&&_0x3c3794['is']('containerElement')&&_0x5e5f33(_0x3c3794,_0x136b12['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5c5faf,{writer:_0x5e3078,options:_0x3bb8ad})=>{if(!_0x3bb8ad['showCommentHighlights'])return null;const _0x52dc75=_0x5e3078['createContainerElement']('div'),_0x475588=_0x5e3078['createEmptyElement']('hr');return _0x5e3078['addClass']('ck-horizontal-line',_0x52dc75),_0x5e3078['insert'](_0x5e3078['createPositionAt'](_0x52dc75,0x0),_0x475588),_0x52dc75;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x284b7d,{writer:_0x5bb232,options:_0x593c66})=>{if(!_0x593c66['showCommentHighlights'])return null;const _0x1e69a6=_0x5bb232['createContainerElement']('span'),_0x3e666a=_0x5bb232['createEmptyElement']('img');return _0x5bb232['addClass']('image-inline',_0x1e69a6),_0x5bb232['insert'](_0x5bb232['createPositionAt'](_0x1e69a6,0x0),_0x3e666a),_0x1e69a6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2bda73,{writer:_0x248565,options:_0x4d25ef})=>{if(_0x4d25ef['showCommentHighlights'])return _0x248565['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x16f2ee,_0x16b322,_0x5d7948)=>{_0x5d7948['options']['showCommentHighlights']&&_0x16f2ee['stop']();},{'priority':'high'});}}class r extends _0x22838b{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x163a88){super(_0x163a88),this['set']('isThreadsLoadingPaused',!0x0),_0x163a88['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3f358d,_0x146de0,_0x2d2501,_0x3f57a2)=>{const _0x1fc5f2=_0x163a88['plugins']['get'](o),_0x3eb3d4=_0x2d2501?ft(_0x2d2501)['id']:null;_0x163a88['model']['change'](()=>{if(_0x3eb3d4){const _0x3d57c7=this['getAllMarkersForId'](_0x3eb3d4);for(const _0xf4f4b0 of _0x3d57c7)_0x163a88['editing']['reconvertMarker'](_0xf4f4b0);}if(_0x3f57a2){const {id:_0x230696}=ft(_0x3f57a2),_0x201467=_0x1fc5f2['getCommentThread'](_0x230696);if(_0x201467&&_0x201467['unlinkedAt'])return;if(_0x201467&&!_0x201467['isAttached'])return;const _0x276344=this['getAllMarkersForId'](_0x230696);for(const _0x300f0c of _0x276344)_0x163a88['editing']['reconvertMarker'](_0x300f0c);}}),_0x3eb3d4&&this['scrollToThreadMarker'](_0x3eb3d4);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x230cf7=this['editor'],_0x5e3fd5=_0x230cf7['plugins']['get'](o),_0x116a43=_0x230cf7['config']['get']('collaboration.channelId'),_0x5eb7ef=_0x5e3fd5['getCommentThreads']()['filter'](_0x52c20c=>_0x52c20c['channelId']!==_0x116a43);_0x230cf7['commands']['add']('addCommentThread',new ot(_0x230cf7)),this['listenTo'](_0x230cf7,'change:isReadOnly',(_0x4c6897,_0x43b647,_0x4021f2)=>{_0x5e3fd5['switchReadOnly'](_0x4021f2,_0x230cf7['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5e3fd5,dt('addCommentThread',_0x116a43),(_0x2debd0,{threadId:_0x1a6903})=>{const _0x5167c9=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1a6903);_0x5167c9?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1a6903);}),this['listenTo'](_0x5e3fd5,dt('removeCommentThread',_0x116a43),(_0x3bd136,{threadId:_0x120191})=>{_0x230cf7['model']['enqueueChange']({'isUndoable':!0x1},_0x238eb5=>{const _0xb5f572=this['getAllMarkersForId'](_0x120191);for(const _0x2f37ed of _0xb5f572)_0x238eb5['removeMarker'](_0x2f37ed);});}),this['listenTo'](_0x5e3fd5,dt('resolveCommentThread',_0x116a43),(_0x34fee4,{threadId:_0x24e448})=>{(this['_reconvertMarkers'](_0x24e448),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x24e448)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5e3fd5,dt('reopenCommentThread',_0x116a43),(_0xc8f152,{threadId:_0x2a98c5})=>{this['_reconvertMarkers'](_0x2a98c5);},{'priority':'low'}),this['listenTo'](_0x5e3fd5,dt('addComment',_0x116a43),(_0x12c4d2,{threadId:_0x1b958a,isFromAdapter:_0x27b2ab})=>{const _0x2ee311=this['getAllMarkersForId'](_0x1b958a);if(_0x27b2ab||0x0==_0x2ee311['length']||!_0x5e3fd5['hasCommentThread'](_0x1b958a))return;0x1===_0x5e3fd5['getCommentThread'](_0x1b958a)['length']&&_0x230cf7['model']['enqueueChange']({'isUndoable':!0x1},_0x179ede=>{for(const _0x335e12 of _0x2ee311)_0x179ede['updateMarker'](_0x335e12,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5eb7ef);}['afterInit'](){!async function(_0x37854d){const _0x2d030a=_0xf72225([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]),_0x1a71de=0x73460ab3,_0x2b50ed=0x734179c3^_0x1a71de,_0x53ea0c=window[_0xf72225([0x44,0x61,0x74,0x65])][_0xf72225([0x6e,0x6f,0x77])](),_0x3d9f10=_0x37854d[_0xf72225([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x171ba5=new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2bc17e=>{_0x3d9f10[_0xf72225([0x6f,0x6e,0x63,0x65])](_0xf72225([0x72,0x65,0x61,0x64,0x79]),_0x2bc17e);}),_0x257da7={[_0xf72225([0x6b,0x74,0x79])]:_0xf72225([0x45,0x43]),[_0xf72225([0x75,0x73,0x65])]:_0xf72225([0x73,0x69,0x67]),[_0xf72225([0x63,0x72,0x76])]:_0xf72225([0x50,0x2d,0x32,0x35,0x36]),[_0xf72225([0x78])]:_0xf72225([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]),[_0xf72225([0x79])]:_0xf72225([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]),[_0xf72225([0x61,0x6c,0x67])]:_0xf72225([0x45,0x53,0x32,0x35,0x36])},_0xd8baf9=_0x3d9f10[_0xf72225([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xf72225([0x67,0x65,0x74])](_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x279448(){let _0x37ea61,_0x2a6b88=null,_0x18f8e7=null;try{if(_0xd8baf9==_0xf72225([0x47,0x50,0x4c]))return _0xf72225([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x37ea61=_0x4838d5(),!_0x37ea61)return _0xf72225([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x37ea61[_0xf72225([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x18f8e7=_0x2b9d48(_0x37ea61[_0xf72225([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x37ea61[_0xf72225([0x6a,0x74,0x69])])),await _0x20ccb5()?_0x4ef699()?_0x54110e()?_0xf72225([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1130b2()?(_0x37ea61[_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xf72225([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2a6b88=_0x5ddf09(_0xf72225([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x37ea61[_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xf72225([0x74,0x72,0x69,0x61,0x6c])&&(_0x2a6b88=_0x5ddf09(_0xf72225([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x14e9c3()):_0xf72225([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xf72225([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xf72225([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0xf72225([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x54110e(){const _0x4da228=[_0xf72225([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xf72225([0x74,0x72,0x69,0x61,0x6c])][_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37ea61[_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x53ea0c/0x3e8:0xe10*_0x2b50ed;return _0x37ea61[_0xf72225([0x65,0x78,0x70])]<_0x4da228;}function _0x4ef699(){const _0x1492e4=_0x37ea61[_0xf72225([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1492e4)return!0x1;if(_0x1492e4[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x2a])))return!0x0;if(_0x1492e4[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x43,0x4d,0x54])))return!0x0;if(_0x1492e4[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4e00bb())return!0x0;if(_0x1492e4[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x52,0x43,0x4d,0x54]))){if(_0xf27df9())return!0x0;if(_0xdccc8f()||_0x2edec8())return!0x0;}return!0x1;}function _0x1130b2(){const _0x34f3ad=_0x37ea61[_0xf72225([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x34f3ad||0x0==_0x34f3ad[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x311f42}=new URL(window[_0xf72225([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x34f3ad[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x311f42))return!0x0;const _0x3b72a4=_0x311f42[_0xf72225([0x73,0x70,0x6c,0x69,0x74])](_0xf72225([0x2e]));return _0x34f3ad[_0xf72225([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5ddfaa=>_0x5ddfaa[_0xf72225([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf72225([0x2a])))[_0xf72225([0x6d,0x61,0x70])](_0x4ec48b=>_0x4ec48b[_0xf72225([0x73,0x70,0x6c,0x69,0x74])](_0xf72225([0x2e])))[_0xf72225([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x8d909a=>_0x8d909a[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3b72a4[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xf72225([0x6d,0x61,0x70])](_0x5db50e=>Array(_0x3b72a4[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5db50e[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0xf72225([0x66,0x69,0x6c,0x6c])](_0x5db50e[0x0]===_0xf72225([0x2a])?_0xf72225([0x2a]):'')[_0xf72225([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5db50e))[_0xf72225([0x73,0x6f,0x6d,0x65])](_0x1f888d=>_0x3b72a4[_0xf72225([0x65,0x76,0x65,0x72,0x79])]((_0x263032,_0x2cb443)=>_0x1f888d[_0x2cb443]===_0x263032||_0x1f888d[_0x2cb443]===_0xf72225([0x2a])));}function _0x14e9c3(){return _0x2a6b88&&_0x18f8e7?new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x50c47c,_0x43633a)=>{_0x2a6b88[_0xf72225([0x74,0x68,0x65,0x6e])](_0x50c47c,_0x43633a),_0x18f8e7[_0xf72225([0x74,0x68,0x65,0x6e])](_0x1fbb12=>{_0x1fbb12!=_0xf72225([0x56,0x61,0x6c,0x69,0x64])&&_0x50c47c(_0x1fbb12);},_0x43633a);}):_0x2a6b88||_0x18f8e7||_0xf72225([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2b9d48(_0x282066,_0xf4681d){return new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21b07a=>{if(_0x10ceb7())return _0x21b07a(_0xf72225([0x56,0x61,0x6c,0x69,0x64]));_0xf249be(),_0x3d9f10[_0xf72225([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xf72225([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x273149=!0x1;const _0x753f16=_0x4606c5();function _0x3b2e22(_0x1dcb9f){return!!_0x1dcb9f&&(typeof _0x1dcb9f===_0xf72225([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1dcb9f===_0xf72225([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1dcb9f[_0xf72225([0x74,0x68,0x65,0x6e])]===_0xf72225([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1dcb9f[_0xf72225([0x63,0x61,0x74,0x63,0x68])]===_0xf72225([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x505306(_0x41ac5f){_0x128bfb(_0x41ac5f)[_0xf72225([0x74,0x68,0x65,0x6e])](_0x58dd81=>{if(!_0x58dd81||_0x58dd81[_0xf72225([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xf72225([0x6f,0x6b]))return _0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1123eb(_0x5bc746(_0x753f16+_0xf4681d))!=_0x58dd81[_0xf72225([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xf72225([0x56,0x61,0x6c,0x69,0x64]);})[_0xf72225([0x74,0x68,0x65,0x6e])](_0x5ee486=>(_0x51def2(),_0x5ee486),()=>{const _0x17e9f1=_0x16d7cd();return null==_0x17e9f1?(_0x51def2(),_0xf72225([0x56,0x61,0x6c,0x69,0x64])):_0xf72225(_0x53ea0c-_0x17e9f1>(0x574a8eb3^_0x1a71de)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xf72225([0x74,0x68,0x65,0x6e])](_0x21b07a)[_0xf72225([0x63,0x61,0x74,0x63,0x68])](()=>{_0x21b07a(_0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x123b1b=0x7370e433^_0x1a71de;function _0x51def2(){const _0x4f2779=_0xf72225([0x6c,0x6c,0x63,0x74,0x2d])+_0x1123eb(_0x5bc746(_0x282066)),_0x1afae0=_0x5e2a23(_0x1123eb(window[_0xf72225([0x4d,0x61,0x74,0x68])][_0xf72225([0x63,0x65,0x69,0x6c])](_0x53ea0c/_0x123b1b)));window[_0xf72225([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xf72225([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4f2779,_0x1afae0);}function _0x16d7cd(){const _0x62ae63=_0xf72225([0x6c,0x6c,0x63,0x74,0x2d])+_0x1123eb(_0x5bc746(_0x282066)),_0x1285fc=window[_0xf72225([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xf72225([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x62ae63);return _0x1285fc?window[_0xf72225([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e2a23(_0x1285fc),0x10)*_0x123b1b:null;}function _0x128bfb(_0x37bd6a){return new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x273ead,_0x3fcc7c)=>{_0x37bd6a[_0xf72225([0x74,0x68,0x65,0x6e])](_0x273ead,_0x3fcc7c),window[_0xf72225([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3fcc7c,0x7347de73^_0x1a71de);});}}_0x3d9f10[_0xf72225([0x6f,0x6e])](_0xf72225([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1e80c6,_0x9cdf72)=>{if(_0x9cdf72[0x0]!=_0x282066)return _0x21b07a(_0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x9cdf72[0x1]={..._0x9cdf72[0x1],[_0xf72225([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x753f16};},{[_0xf72225([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xf72225([0x68,0x69,0x67,0x68])}),_0x3d9f10[_0xf72225([0x6f,0x6e])](_0xf72225([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x327f5e=>{_0x3b2e22(_0x327f5e[_0xf72225([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x273149=!0x0,_0x505306(_0x327f5e[_0xf72225([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xf72225([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xf72225([0x6c,0x6f,0x77])}),_0x171ba5[_0xf72225([0x74,0x68,0x65,0x6e])](()=>{_0x273149||_0x21b07a(_0xf72225([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x10ceb7(){return _0x3d9f10[_0xf72225([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xf72225([0x76,0x69,0x65,0x77])][_0xf72225([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xf72225([0x61,0x75,0x74,0x6f]);}function _0xf249be(){_0x3d9f10[_0xf72225([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xf72225([0x76,0x69,0x65,0x77])][_0xf72225([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xf72225([0x61,0x75,0x74,0x6f]);}}function _0x5ddf09(_0x44c17c){const _0x56a77c=[new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c97f5=>setTimeout(_0x4c97f5,0x734f347f^_0x1a71de)),_0x171ba5[_0xf72225([0x74,0x68,0x65,0x6e])](()=>new window[(_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x495c82=>{let _0x323b65=0x0;_0x3d9f10[_0xf72225([0x6d,0x6f,0x64,0x65,0x6c])][_0xf72225([0x6f,0x6e])](_0xf72225([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x41aa8b,_0x455528)=>{_0x455528[0x0][_0xf72225([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x323b65++,_0x323b65==(0x73460b4b^_0x1a71de)&&(_0x495c82(),_0x41aa8b[_0xf72225([0x6f,0x66,0x66])]());});}))];return window[_0xf72225([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xf72225([0x72,0x61,0x63,0x65])](_0x56a77c)[_0xf72225([0x74,0x68,0x65,0x6e])](()=>_0x44c17c);}async function _0x4eded1(){await _0x171ba5,_0x3d9f10[_0xf72225([0x6d,0x6f,0x64,0x65,0x6c])][_0xf72225([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4f4286,_0x3d9f10[_0xf72225([0x6d,0x6f,0x64,0x65,0x6c])][_0xf72225([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4f4286,_0x3d9f10[_0xf72225([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xf72225([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4e00bb(){return window[_0xf72225([0x67,0x6c,0x6f,0x62])]&&window[_0xf72225([0x67,0x6c,0x6f,0x62])][_0xf72225([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0xf27df9(){return _0x4949e9(_0xf72225([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5b6f3e(_0xf72225([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xf72225([0x73,0x74,0x61,0x74,0x65])]==_0xf72225([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xdccc8f(){return _0x4949e9(_0xf72225([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 _0x2edec8(){return _0x4949e9(_0xf72225([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4cc34a(_0x92c0f8){const _0x4d834e=_0x1bf800();_0x3d9f10[_0x4d834e]=_0xf72225([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x92c0f8,_0x92c0f8!=_0xf72225([0x56,0x61,0x6c,0x69,0x64])&&_0x4eded1();}function _0x1bf800(){const _0x407ce7=window[_0xf72225([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xf72225([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xf72225([0x6e,0x6f,0x77])]())[_0xf72225([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xf72225([0x2e]),'');let _0x3b23e0=_0xf72225([0x4b]);for(let _0x340efb=0x0;_0x340efb<_0x407ce7[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x340efb+=0x2){let _0x19e5cf=window[_0xf72225([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x407ce7[_0xf72225([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x340efb,_0x340efb+0x2));_0x19e5cf>=_0x2d030a[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x19e5cf-=_0x2d030a[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b23e0+=_0x2d030a[_0x19e5cf];}return _0x3b23e0;}function _0x4838d5(){const _0x2e69fd=_0xd8baf9[_0xf72225([0x73,0x70,0x6c,0x69,0x74])](_0xf72225([0x2e]));if(0x3!=_0x2e69fd[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x28b4ae(_0x2e69fd[0x1]);function _0x28b4ae(_0x4cd999){const _0x2eddfa=_0x57c363(_0x4cd999);return _0x2eddfa&&_0x466b83()?_0x2eddfa:null;function _0x466b83(){const _0x57a97c=_0x2eddfa[_0xf72225([0x6a,0x74,0x69])],_0x3f3452=window[_0xf72225([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57a97c[_0xf72225([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57a97c[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x33cb4f={..._0x2eddfa,[_0xf72225([0x6a,0x74,0x69])]:_0x57a97c[_0xf72225([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x57a97c[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x33cb4f[_0xf72225([0x76,0x63])],_0x5bc746(_0x33cb4f)==_0x3f3452;}}}async function _0x20ccb5(){let _0x39848a=!0x0;try{const _0x3205b8=_0xd8baf9[_0xf72225([0x73,0x70,0x6c,0x69,0x74])](_0xf72225([0x2e])),[_0x3429fc,_0x24fa0c,_0x483a03]=_0x3205b8;return _0x4959fa(_0x3429fc),await _0x16d580(_0x3429fc,_0x24fa0c,_0x483a03),_0x39848a;}catch{return!0x1;}function _0x4959fa(_0xeeeb6a){const _0x3b5046=_0x57c363(_0xeeeb6a);_0x3b5046&&_0x3b5046[_0xf72225([0x61,0x6c,0x67])]==_0xf72225([0x45,0x53,0x32,0x35,0x36])||(_0x39848a=!0x1);}async function _0x16d580(_0x217b76,_0x24636f,_0x2fb733){const _0x299f66=window[_0xf72225([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xf72225([0x66,0x72,0x6f,0x6d])](_0x133996(_0x2fb733),_0x1cdbfa=>_0x1cdbfa[_0xf72225([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3d114e=new window[(_0xf72225([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xf72225([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x217b76+_0xf72225([0x2e])+_0x24636f),_0x512255=window[_0xf72225([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xf72225([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x512255)return;const _0x1b8470=await _0x512255[_0xf72225([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xf72225([0x6a,0x77,0x6b]),_0x257da7,{[_0xf72225([0x6e,0x61,0x6d,0x65])]:_0xf72225([0x45,0x43,0x44,0x53,0x41]),[_0xf72225([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xf72225([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xf72225([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x512255[_0xf72225([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xf72225([0x6e,0x61,0x6d,0x65])]:_0xf72225([0x45,0x43,0x44,0x53,0x41]),[_0xf72225([0x68,0x61,0x73,0x68])]:{[_0xf72225([0x6e,0x61,0x6d,0x65])]:_0xf72225([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1b8470,_0x299f66,_0x3d114e)||(_0x39848a=!0x1);}}function _0x57c363(_0x3122a3){return _0x3122a3[_0xf72225([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xf72225([0x65,0x79]))?JSON[_0xf72225([0x70,0x61,0x72,0x73,0x65])](_0x133996(_0x3122a3)):null;}function _0x133996(_0x3a074b){return window[_0xf72225([0x61,0x74,0x6f,0x62])](_0x3a074b[_0xf72225([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xf72225([0x2b]))[_0xf72225([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xf72225([0x2f])));}function _0x5bc746(_0xdbf442){let _0x177ba0=0x1505;function _0x5666d9(_0x1a725){for(let _0x517912=0x0;_0x517912<_0x1a725[_0xf72225([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x517912++){const _0x28b75b=_0x1a725[_0xf72225([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x517912);_0x177ba0=(_0x177ba0<<0x5)+_0x177ba0+_0x28b75b,_0x177ba0&=_0x177ba0;}}function _0x1f5195(_0x38541d){Array[_0xf72225([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x38541d)?_0x38541d[_0xf72225([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1f5195):_0x38541d&&typeof _0x38541d==_0xf72225([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xf72225([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x38541d)[_0xf72225([0x73,0x6f,0x72,0x74])]()[_0xf72225([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xdf1463,_0x1d2e0e])=>{_0x5666d9(_0xdf1463),_0x1f5195(_0x1d2e0e);}):_0x5666d9(window[_0xf72225([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x38541d));}return _0x1f5195(_0xdbf442),_0x177ba0>>>0x0;}function _0x1123eb(_0x578835){return _0x578835[_0xf72225([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xf72225([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xf72225([0x30]));}function _0x5e2a23(_0x5eed3a){return _0x5eed3a[_0xf72225([0x73,0x70,0x6c,0x69,0x74])]('')[_0xf72225([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xf72225([0x6a,0x6f,0x69,0x6e])]('');}function _0x4949e9(_0x536619){return _0x3d9f10[_0xf72225([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xf72225([0x68,0x61,0x73])](_0x536619);}function _0x5b6f3e(_0x141838){return _0x3d9f10[_0xf72225([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xf72225([0x67,0x65,0x74])](_0x141838);}function _0x4f4286(){}function _0xf72225(_0x45407f){return _0x45407f['map'](_0x14dee1=>String['fromCharCode'](_0x14dee1))['join']('');}_0x4cc34a(await _0x279448());}(this);}['destroy'](){const _0x56fb26=this['editor']['plugins']['get'](o),_0x1965b9=this['editor']['config']['get']('collaboration.channelId');for(const _0x2a0f74 of _0x56fb26['getCommentThreads']({'channelId':_0x1965b9}))_0x56fb26['_detachCommentThread'](_0x2a0f74['id']),_0x56fb26['_threads']['delete'](_0x2a0f74['id']);super['destroy']();}['hasMarkerForId'](_0x331484){return this['getAllMarkersForId'](_0x331484)['length']>0x0;}['getAllMarkersForId'](_0x5602da){const _0x38b4fc=[];for(const _0xd0ba0a of this['editor']['model']['markers'])_0xd0ba0a['name']['startsWith']('comment:'+_0x5602da)&&_0x38b4fc['push'](_0xd0ba0a);return _0x38b4fc;}['scrollToThreadMarker'](_0x174880){setTimeout(()=>{const _0x4eb5d2=this['_getTargetForId'](_0x174880);if(!_0x4eb5d2)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x174880&&nt({'target':_0x4eb5d2[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x412e1d){this['editor']['model']['change'](()=>{for(const _0x5d2a22 of this['getAllMarkersForId'](_0x412e1d))this['editor']['editing']['reconvertMarker'](_0x5d2a22);});}['_attachArchivedThread'](_0x4353fe){const _0x11a405=this['editor']['plugins']['get'](o),_0x102a5b=this['editor']['plugins']['get'](b),_0x2fa4d8=_0x11a405['getCommentThread'](_0x4353fe);if(!_0x2fa4d8['isAttached']){const _0x41524c=_0x2fa4d8['attachTo'](()=>this['_getTargetForId'](_0x2fa4d8['id']));_0x102a5b['registerAnnotation'](_0x41524c),_0x2fa4d8['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x52c0a5=this['editor'],_0x26d3de=_0x52c0a5['plugins']['get'](it);_0x52c0a5['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xf5fec9,_0x31d04f)=>{const {id:_0x24270e}=ft(_0xf5fec9['markerName']),_0x112f6d=_0x52c0a5['plugins']['get'](o)['getCommentThread'](_0x24270e),_0x5cc12c=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x24270e;let _0x2fb31a;if(_0x112f6d&&_0x112f6d['isResolved']&&!_0x5cc12c&&_0xf5fec9['item'])return _0x31d04f['consumable']['consume'](_0xf5fec9['item'],'addMarker:'+_0xf5fec9['markerName']),_0x31d04f['consumable']['consume'](_0xf5fec9['item'],'removeMarker:'+_0xf5fec9['markerName']),null;const _0x248d28=['ck-comment-marker'];return _0x5cc12c&&_0x248d28['push']('ck-comment-marker--active'),_0x2fb31a=_0x112f6d?.['length']?_0x112f6d['comments']['first']['author']['id']:_0x26d3de['me']['id'],{'classes':_0x248d28,'attributes':{'data-comment':_0x24270e,'data-author-id':_0x2fb31a}};}}),_0x52c0a5['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3f5ad6,{options:_0x4248a1})=>{if(_0x4248a1['showCommentHighlights'])return null;const _0x5e89db=_0x52c0a5['plugins']['get'](o),_0x115dfa=_0x52c0a5['model']['markers']['get'](_0x3f5ad6),{id:_0x20f2ef,part:_0x1fc818}=ft(_0x3f5ad6);return _0x115dfa&&!_0x115dfa['affectsData']||_0x4248a1['ignoreResolvedComments']&&_0x5e89db['getCommentThread'](_0x20f2ef)?.['isResolved']?null:{'group':'comment','name':_0x1fc818?_0x20f2ef+':'+_0x1fc818:_0x20f2ef};}}),_0x52c0a5['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x324271,{writer:_0x3fed45})=>_0x3fed45['createElement']('$marker',{'data-name':'comment:'+_0x324271['getAttribute']('id')})}),_0x52c0a5['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x58f62d=this['editor'],_0x359fd7=_0x58f62d['plugins']['get'](o),_0x384b42=new Set(),_0x1ab544=new Set();_0x58f62d['model']['document']['registerPostFixer'](_0x5546f9=>{let _0x5ba1f5=!0x1;for(const {name:_0x456adf,data:_0x5c123e}of _0x58f62d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1e6c67,id:_0x2b23ca}=ft(_0x456adf);let _0x4e73ca=_0x5c123e['newRange'];if('comment'!==_0x1e6c67||!_0x4e73ca)continue;const _0x37d42f='$graveyard'===_0x4e73ca['root']['rootName'];_0x37d42f||(_0x4e73ca=ht(_0x4e73ca,_0x58f62d['model']),!_0x4e73ca||_0x4e73ca['isCollapsed']||!_0x5c123e['newRange']||_0x4e73ca['isEqual'](_0x5c123e['newRange']))?_0x58f62d['model']['hasContent'](_0x4e73ca)&&!_0x37d42f?this['isThreadsLoadingPaused']?_0x384b42['add'](_0x456adf):this['_handleThreadMarker'](_0x456adf,_0x2b23ca):(_0x1ab544['add'](_0x456adf),_0x384b42['delete'](_0x456adf),_0x5546f9['removeMarker'](_0x456adf),_0x5ba1f5=!0x0):(_0x5546f9['updateMarker'](_0x456adf,{'range':_0x4e73ca}),_0x5ba1f5=!0x0);}return _0x5ba1f5;}),this['on']('change:isThreadsLoadingPaused',(_0x561251,_0x524d45,_0x431d5a)=>{if(!_0x431d5a&&_0x384b42['size'])for(const _0x4a0a42 of _0x384b42){const {id:_0x3f8e38}=ft(_0x4a0a42);_0x384b42['delete'](_0x4a0a42),_0x58f62d['model']['markers']['get'](_0x4a0a42)&&this['_handleThreadMarker'](_0x4a0a42,_0x3f8e38);}}),this['listenTo'](_0x58f62d['model']['document'],'change',()=>{for(const {name:_0x2c7d58,data:{newRange:_0x146758}}of _0x58f62d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2cf51f,id:_0x187b27}=ft(_0x2c7d58);if('comment'!==_0x2cf51f)continue;const _0x5cf1df=_0x359fd7['getCommentThread'](_0x187b27),_0x572851=this['hasMarkerForId'](_0x187b27);_0x5cf1df&&(!_0x5cf1df['_hasTargetInContent']&&_0x146758&&_0x58f62d['editing']['view']['once']('render',()=>{const _0x42d086=_0x58f62d['plugins']['get'](y),_0x30c5d1=_0x359fd7['_threadToController']['get'](_0x5cf1df)['view'];_0x42d086['getByInnerView'](_0x30c5d1)['refreshVisibility']();},{'priority':'low'}),_0x5cf1df['_hasTargetInContent']=_0x572851||!!_0x146758),_0x146758||(_0x1ab544['add'](_0x2c7d58),_0x384b42['delete'](_0x2c7d58));}for(const _0x4037fe of _0x1ab544){const {id:_0x5887e5}=ft(_0x4037fe),_0x3bea84=_0x359fd7['getCommentThread'](_0x5887e5);if(_0x384b42['delete'](_0x4037fe),!_0x3bea84)continue;const _0x206e29=this['hasMarkerForId'](_0x5887e5);_0x206e29||_0x3bea84['isSubmitted']?_0x206e29||_0x3bea84['unlinkedAt']||_0x3bea84['setUnlinkedAt'](new Date()):_0x3bea84['remove']();}_0x1ab544['clear']();});}['_handleInitialThreads'](_0x4ac8c5){_0x4ac8c5['forEach'](_0x2fc2c3=>{_0x2fc2c3['unlinkedAt']&&this['_attachArchivedThread'](_0x2fc2c3['id']);});}['_getTargetForId'](_0x1f7f0b){const _0x192142=this['editor'],_0x7dbfa6=this['getAllMarkersForId'](_0x1f7f0b);return et(_0x192142['editing'],_0x7dbfa6);}['_getTextContext'](_0x2b0fae){const _0x47e308=this['getAllMarkersForId'](_0x2b0fae);let _0x1333a3='',_0x3a3f76=!0x1;for(const _0x5e84e1 of _0x47e308){const _0x368deb=_0x5e84e1['getRange']();for(const _0x4391f0 of Array['from'](_0x368deb['getItems']()))_0x4391f0['is']('$textProxy')?(_0x1333a3&&_0x3a3f76&&(_0x1333a3+='\x20',_0x3a3f76=!0x1),_0x1333a3+=_0x4391f0['data']):_0x3a3f76=!0x0;_0x3a3f76=!0x0;}return _0x1333a3['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5ebd13,_0x4093ce){const _0x2e4fff=this['editor'],_0x53d601=_0x2e4fff['plugins']['get'](o);let _0x261ed6=_0x53d601['getCommentThread'](_0x4093ce);const _0x2a7b3f=_0x2e4fff['config']['get']('collaboration.channelId'),_0x4d979b=_0x2e4fff['plugins']['get'](b);if(_0x261ed6&&(_0x261ed6['unlinkedAt']&&_0x261ed6['setUnlinkedAt'](null),_0x261ed6['isAttached']))return _0x261ed6;return!this['getAllMarkersForId'](_0x4093ce)[0x0]['managedUsingOperations']?_0x2e4fff['editing']['view']['once']('render',()=>{if(_0x53d601['getCommentThread'](_0x4093ce))return;const _0x56cf89=_0x2e4fff['plugins']['get'](y);_0x261ed6=_0x53d601['openNewCommentThread']({'channelId':_0x2a7b3f,'threadId':_0x4093ce,'target':()=>this['_getTargetForId'](_0x4093ce),'context':{'type':'text','value':this['_getTextContext'](_0x4093ce)}});const _0x364917=_0x53d601['_threadToController']['get'](_0x261ed6)['view'],_0x250d27=_0x56cf89['getByInnerView'](_0x364917);_0x250d27&&_0x4d979b['registerAnnotation'](_0x250d27);},{'priority':'low'}):_0x53d601['fetchCommentThread']({'channelId':_0x2a7b3f,'threadId':_0x4093ce})['then'](_0x33c7cc=>{if('destroyed'!==_0x2e4fff['state']){if(_0x261ed6=_0x33c7cc,_0x261ed6&&!_0x261ed6['isAttached']){const _0x3fda52=_0x261ed6['attachTo'](()=>this['_getTargetForId'](_0x4093ce));_0x4d979b['registerAnnotation'](_0x3fda52),_0x261ed6['isResolved']&&this['_reconvertMarkers'](_0x4093ce);}else{if(!_0x261ed6){const _0x1309b9=this['getAllMarkersForId'](_0x4093ce);_0x2e4fff['model']['change'](_0x26b5e3=>{for(const _0xa9349e of _0x1309b9)_0x26b5e3['removeMarker'](_0xa9349e);});}}}}),_0x261ed6;}['_handleThreadMarker'](_0x5db3d8,_0x1f7e0e){const _0xc82432=this['_attachMarkerToThread'](_0x5db3d8,_0x1f7e0e);_0xc82432&&!_0xc82432['context']&&_0xc82432['setContext']({'type':'text','value':this['_getTextContext'](_0x1f7e0e)});}['_initAriaMarkerChangeAnnouncements'](){const _0x36a836=this['editor'];rt(_0x36a836['model'],({left:_0x64d1d7,entered:_0x1e7b8c})=>{for(const _0x140ec6 of _0x64d1d7)if(mt(_0x140ec6)){_0x36a836['ui']['ariaLiveAnnouncer']['announce'](N(_0x36a836['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x175381 of _0x1e7b8c)if(mt(_0x175381)){_0x36a836['ui']['ariaLiveAnnouncer']['announce'](N(_0x36a836['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x2a23c3)));break;}});}}function dt(_0x62df3b,_0x1bc052){return _0x1bc052?_0x62df3b+':'+_0x1bc052:_0x62df3b;}function ht(_0x11ddde,_0x4186e2){const _0xb2b922=_0x4186e2['schema'],_0x873ccd=_0x4186e2['createRange'](_0x11ddde['start']);for(const _0x18d67c of _0x11ddde['getWalker']()){const {type:_0x110a97,item:_0x1dbdff,nextPosition:_0x4bb16c}=_0x18d67c;if('text'===_0x110a97||_0xb2b922['isObject'](_0x1dbdff)){const _0x3e1cd3=_0x4186e2['createPositionBefore'](_0x1dbdff);_0x873ccd['isCollapsed']&&(_0x873ccd['start']=_0x3e1cd3),_0x873ccd['end']=_0x4bb16c;}}return _0x873ccd;}function mt(_0x3216ca){return'comment'===ft(_0x3216ca['name'])['group'];}class s extends _0x22838b{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x51b32c=this['editor'],_0x59d033=_0x51b32c['plugins']['get'](o),_0x252e53=_0x51b32c['plugins']['get'](r),_0x26d50b=_0x51b32c['plugins']['get'](y),_0xf531f4=_0x51b32c['plugins']['get'](b);_0x51b32c['ui']['componentFactory']['add']('comment',()=>{const _0x4a6fe5=this['_createUIButton'](_0x3252f0);return _0x4a6fe5['tooltip']=!0x0,_0x4a6fe5;}),_0x51b32c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x489c6e)),_0xf531f4['addSourceCollector'](()=>{const _0x12a0a6=[];for(const [_0x280bed,_0x33c612]of _0x59d033['_threadToController']){const _0x182e91=_0x252e53['getAllMarkersForId'](_0x280bed['id']),_0x1f1f0c=_0x182e91['map'](_0x4c6d3a=>_0x4c6d3a['getRange']());_0x182e91['length']>0x0&&_0x12a0a6['push']([_0x33c612['view'],_0x1f1f0c]);}return _0x12a0a6;}),this['listenTo'](_0x26d50b,'change:activeAnnotations',(_0x252b30,_0x1319e3,_0x8fcc8d)=>{const _0x5f4ea7=Array['from'](_0x8fcc8d)['map'](_0x1626ab=>_0x1626ab['innerView'])['find'](_0x2ec8f9=>_0x59d033['_viewToController']['has'](_0x2ec8f9));if(!_0x5f4ea7)return void(_0x252e53['activeMarker']=null);const _0x4317f6=_0x59d033['_viewToController']['get'](_0x5f4ea7)['model']['id'],_0x452e69='comment:'+_0x4317f6;_0x4317f6&&_0x252e53['hasMarkerForId'](_0x4317f6)?_0x252e53['activeMarker']=_0x452e69:_0x252e53['activeMarker']&&(_0x252e53['activeMarker']=null);}),this['listenTo'](_0x59d033,'removeCommentThread',(_0x3f142c,{threadId:_0x1cd0ce,isFromAdapter:_0x45678f})=>{!_0x45678f&&_0x51b32c['ui']['focusTracker']['isFocused']&&_0x252e53['hasMarkerForId'](_0x1cd0ce)&&_0x51b32c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x59d033,'addComment',(_0x59bf64,{threadId:_0x3ecec2,isFromAdapter:_0x343930})=>{if(_0x343930||!_0x252e53['hasMarkerForId'](_0x3ecec2)||!_0x59d033['hasCommentThread'](_0x3ecec2))return;0x1===_0x59d033['getCommentThread'](_0x3ecec2)['length']&&(_0x51b32c['editing']['view']['focus'](),_0x59bf64['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x532cc2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1507ce;for(const _0x148039 in _0x532cc2){const _0x4f23c9=_0x148039,_0x8a6ac6=_0x532cc2[_0x4f23c9];if('commentsLicenseKeyValid'==_0x8a6ac6||'commentsLicenseKeyInvalid'==_0x8a6ac6||'commentsLicenseKeyExpired'==_0x8a6ac6||'commentsLicenseKeyDomainLimit'==_0x8a6ac6||'commentsLicenseKeyNotAllowed'==_0x8a6ac6||'commentsLicenseKeyEvaluationLimit'==_0x8a6ac6||'commentsLicenseKeyTrialLimit'==_0x8a6ac6||'commentsLicenseKeyUsageLimit'==_0x8a6ac6){delete _0x532cc2[_0x4f23c9],_0x1507ce=_0x8a6ac6,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1507ce&&_0x532cc2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1507ce&&_0x532cc2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1507ce&&_0x532cc2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1507ce&&_0x532cc2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1507ce&&_0x532cc2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1507ce&&_0x532cc2['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1507ce&&_0x532cc2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x5f2497){const _0x40c96a=this['editor'],_0x4626b6=new _0x5f2497(_0x40c96a['locale']),_0x370552=_0x40c96a['commands']['get']('addCommentThread');return _0x4626b6['set']({'label':N(_0x40c96a['locale'],'Comment'),'icon':_0x4c1049}),_0x4626b6['bind']('isEnabled')['to'](_0x370552,'hasContent'),this['listenTo'](_0x4626b6,'execute',()=>{_0x370552['execute']();}),_0x4626b6;}}class i extends _0x22838b{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x193222){super(_0x193222),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x263071,_0x36510a,_0x2a7365)=>{_0x2a7365?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1f5134,_0x5803b9]of this['editor']['commands'])_0x5803b9['affectsData']&&'addCommentThread'!==_0x1f5134&&_0x5803b9['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1eed80=this['editor']['editing']['view']['document'];this['listenTo'](_0x1eed80,'cut',_0xad8f4f=>_0xad8f4f['stop'](),{'priority':'highest'}),this['listenTo'](_0x1eed80,'clipboardInput',_0x57d4b7=>_0x57d4b7['stop'](),{'priority':'highest'}),this['listenTo'](_0x1eed80,'delete',_0x579a03=>_0x579a03['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2af041,_0x102ac3]of this['editor']['commands'])_0x102ac3['affectsData']&&'addCommentThread'!==_0x2af041&&_0x102ac3['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 j extends _0x1057fb{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x50a933){super(_0x50a933),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x391717=this['context']['plugins']['get'](y);this['listenTo'](_0x391717,'_activateAnnotation',(_0x2554c6,_0x1d9987)=>{for(const _0x50a650 of this['activeUIs']){const _0x3d900f=this['_uis']['get'](_0x50a650);(0x0,this['uisData']['get'](_0x50a650)['filter'])(_0x1d9987)&&_0x3d900f['setActiveAnnotation'](_0x1d9987);}}),this['listenTo'](_0x391717,'_deactivateAllAnnotations',()=>{for(const _0x287be7 of this['activeUIs']){this['_uis']['get'](_0x287be7)['setActiveAnnotation'](null);}}),this['listenTo'](_0x391717['_visibleAnnotations'],'add',(_0x21aa2e,_0x418f9b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x418f9b);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4ef633){return this['activeUIs']['has'](_0x4ef633);}['activate'](_0x40f831,_0x39db93=this['defaultFilter']){const _0x53f4a1=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x40f831))throw new _0x5d3b6b('annotationsuis-missing-ui',this,{'uiName':_0x40f831});this['isActive'](_0x40f831)&&this['deactivate'](_0x40f831),this['activeUIs']['add'](_0x40f831);const _0x15e062=new S();v({'source':_0x53f4a1['_visibleAnnotations'],'target':_0x15e062,'filter':_0x39db93}),this['uisData']['set'](_0x40f831,{'collection':_0x15e062,'filter':_0x39db93});const _0x586c56=this['_uis']['get'](_0x40f831);_0x586c56['attach'](_0x15e062),this['listenTo'](_0x586c56,'change:activeAnnotation',(_0x907d4d,_0x28776e,_0x4d9c9f,_0x345209)=>{_0x345209&&_0x53f4a1['_removeActiveAnnotation'](_0x345209),_0x4d9c9f&&_0x53f4a1['_addActiveAnnotation'](_0x4d9c9f);});}['deactivate'](_0x5d7482){if(this['activeUIs']['delete'](_0x5d7482),!this['_uis']['has'](_0x5d7482))throw new _0x5d3b6b('annotationsuis-missing-ui',this,{'uiName':_0x5d7482});const _0x32d03a=this['_uis']['get'](_0x5d7482);_0x32d03a['detach'](),this['stopListening'](_0x32d03a),this['uisData']['get'](_0x5d7482)['collection']['destroy'](),this['uisData']['delete'](_0x5d7482);}['switchTo'](_0x32655e){if(!this['_uis']['has'](_0x32655e))throw new _0x5d3b6b('annotationsuis-missing-ui',this,{'uiName':_0x32655e});const _0x44e3f4=this['context']['plugins']['get'](y),_0x3a90b9=Array['from'](_0x44e3f4['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x32655e);const _0x24d9fc=this['_uis']['get'](_0x32655e);_0x24d9fc['setActiveAnnotation'](_0x3a90b9),_0x24d9fc['_setSelectedAnnotations']&&_0x3a90b9&&_0x24d9fc['_setSelectedAnnotations']([_0x3a90b9]);}['deactivateAll'](){for(const _0x52dd05 of this['activeUIs'])this['deactivate'](_0x52dd05);}['register'](_0x10305a,_0x1012a2){if(this['_uis']['has'](_0x10305a))throw new _0x5d3b6b('annotationsuis-register-already-registered');if('function'!=typeof _0x1012a2['attach']||'function'!=typeof _0x1012a2['detach']||'function'!=typeof _0x1012a2['setActiveAnnotation'])throw new _0x5d3b6b('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x10305a,_0x1012a2);}['refilterAnnotations'](){const _0x1c6617=this['context']['plugins']['get'](y)['collection'],_0x4fdac8=new Map(),_0x45cc0b=Array['from'](this['activeUIs']);for(const _0x32b5b2 of this['activeUIs']){const _0x2eaa45=this['uisData']['get'](_0x32b5b2)['collection'];for(const _0x51f43f of _0x2eaa45)_0x4fdac8['set'](_0x51f43f,_0x32b5b2);}for(const _0x33f714 of _0x1c6617){const _0x2463b=_0x4fdac8['get'](_0x33f714);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x33f714);const _0x1d4757=_0x45cc0b['find'](_0x1dfc78=>this['uisData']['get'](_0x1dfc78)['filter'](_0x33f714));_0x2463b!==_0x1d4757&&(_0x2463b&&this['uisData']['get'](_0x2463b)['collection']['remove'](_0x33f714),_0x1d4757&&this['uisData']['get'](_0x1d4757)['collection']['add'](_0x33f714));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x350479){const _0x1872da=[];for(const _0x2dd80a of this['activeUIs']){(0x0,this['uisData']['get'](_0x2dd80a)['filter'])(_0x350479)&&_0x1872da['push'](_0x2dd80a);}if(_0x1872da['length']>0x1)throw new _0x5d3b6b('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1872da,'annotationType':_0x350479['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4ccbab){super(_0x4ccbab),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x44f41f,_0xc6a389)=>_0x44f41f+_0xc6a389),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xef577d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xef577d['to']('isAnimationDisabled',_0x1dc712=>_0x1dc712?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xef577d['to']('top',_0x4685af=>Ot(_0x4685af))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1af77e=this['element']['clientHeight'];_0x1af77e&&(this['height']=_0x1af77e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1057fb{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3b8b64){super(_0x3b8b64),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 _0x486237=this['context']['config']['get']('sidebar.container');_0x486237&&this['setContainer'](_0x486237);}['setContainer'](_0x43159d){if(!g(_0x43159d))throw new _0x5d3b6b('sidebar-setcontainer-invalid-element');this['container']=_0x43159d;}['_attachToContainer']({viewClass:_0x437470='',spaceBetweenItems:_0x469863=0x19}={}){if(!g(this['container']))throw new _0x5d3b6b('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x437470,this['_spaceBetweenItems']=_0x469863;}['rearrange']({removedAnnotation:_0x3a3e50,previousAnnotation:_0x286698,nextAnnotation:_0x5db9b9}){const _0xddd304=this['getSidebarItemView'](_0x3a3e50);this['view']['list']['remove'](_0xddd304),this['_destroySidebarItemView'](_0x3a3e50),_0x286698&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x286698)),_0x5db9b9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5db9b9)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x45ee29,activatedAnnotation:_0x25ee83,disableAnimationOnActivatedAnnotation:_0x227b45}){if(this['_activeAnnotation']=_0x25ee83,_0x45ee29){_0x45ee29['isActive']=!0x1;const _0xc66ad4=this['getSidebarItemView'](_0x45ee29);_0xc66ad4&&_0x227b45&&(_0xc66ad4['isAnimationDisabled']=!0x1);}if(_0x25ee83){const _0x1a5b09=this['getSidebarItemView'](_0x25ee83);_0x1a5b09&&(_0x25ee83['isActive']=!0x0,_0x227b45&&(_0x1a5b09['isAnimationDisabled']=!0x0,_0x1a5b09['top']+=0x1),this['_alignToTargetRect'](_0x1a5b09));}}['_detachFromContainer'](_0x4386d6){if(this['view']['element']['remove'](),_0x4386d6){for(const _0x45dc37 of _0x4386d6)this['_destroySidebarItemView'](_0x45dc37);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xb02d95,_0x2b9a85){_0x2b9a85||(_0x2b9a85=_0xb02d95['view']);const _0x129276=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x129276,_0xb02d95),this['_annotationToSidebarItemView']['set'](_0xb02d95,_0x129276),_0x129276['content']['add'](_0x2b9a85),this['listenTo'](_0xb02d95['view'],'change:targetRect',(_0x5e6ff3,_0x5dd4b7,_0x2e07a8)=>{const _0x82d10d=this['_getTargetTop'](_0xb02d95,_0x2e07a8);_0x129276['_targetTop']!=_0x82d10d&&(_0x129276['_targetTop']=_0x82d10d,this['_setItemTop'](_0x129276,_0x82d10d));}),this['listenTo'](_0x129276,'change:top',()=>{this['_recalculate'](_0x129276,'top');}),this['listenTo'](_0x129276,'change:bottom',()=>{this['_recalculate'](_0x129276,'bottom');}),this['_alignToTargetRect'](_0x129276);const _0x3beb9d=this['_getItemBefore'](_0x129276);if(_0x3beb9d)this['_alignAfterItem'](_0x3beb9d,_0x129276)||this['_alignToTargetRect'](_0x129276);else this['_alignToTargetRect'](_0x129276);return this['_updateLastItem'](),this['view']['list']['add'](_0x129276),_0x129276;}['_alignForTopChange'](_0x4bc4e8){if(!_0x4bc4e8['content']['length'])return;const _0x1562d5=this['_getItemBefore'](_0x4bc4e8);if(!_0x1562d5)return;const _0x3b20f9=this['_sidebarItemViewToAnnotation']['get'](_0x1562d5),_0x3ec77c=this['_activeAnnotation'];_0x3ec77c&&_0x3ec77c===_0x3b20f9?this['_alignAfterItem'](_0x1562d5,_0x4bc4e8):this['_alignBeforeItem'](_0x4bc4e8,_0x1562d5);}['_alignForBottomChange'](_0x346cd4){if(!_0x346cd4['content']['length'])return;const _0xe43359=this['_getItemAfter'](_0x346cd4);if(!_0xe43359)return;const _0x2cc3ef=this['_sidebarItemViewToAnnotation']['get'](_0xe43359),_0x1d940c=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x543295=this['_activeAnnotation'];_0x543295&&_0x543295===_0x2cc3ef&&_0x1d940c?(this['_alignBeforeItem'](_0xe43359,_0x346cd4),this['_alignAfterItem'](_0x346cd4,_0xe43359)):_0x543295&&_0x543295===_0x2cc3ef?this['_alignBeforeItem'](_0xe43359,_0x346cd4):this['_alignAfterItem'](_0x346cd4,_0xe43359);}['_recalculate'](_0xff2693,_0x2d9a8a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x229e32,changedProp:_0x3ea68a}of this['_recalculateBuffer'])'top'===_0x3ea68a?this['_alignForTopChange'](_0x229e32):this['_alignForBottomChange'](_0x229e32);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xff2693,'changedProp':_0x2d9a8a});}['getSidebarItemView'](_0x34ea95){return this['_annotationToSidebarItemView']['get'](_0x34ea95);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4902de){const _0x26d6e4=this['getSidebarItemView'](_0x4902de);this['stopListening'](_0x26d6e4),this['stopListening'](_0x4902de['view']),_0x26d6e4['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4902de),this['_sidebarItemViewToAnnotation']['delete'](_0x26d6e4);}['_createSidebarView'](){const _0x586ead=new H(this['context']['locale']);return _0x586ead['render'](),this['on']('change:_lastItem',(_0x10a738,_0x5852ae,_0x2ced7f,_0x4fd924)=>{_0x4fd924&&_0x586ead['unbind']('minHeight'),_0x2ced7f?_0x586ead['bind']('minHeight')['to'](_0x2ced7f,'bottom'):_0x586ead['minHeight']=null;}),_0x586ead;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x13ba9c){const _0x449c14=this['_sidebarItemViewToAnnotation']['get'](_0x13ba9c),_0x56b43a=_0x449c14&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x449c14)-0x1);return _0x56b43a&&this['getSidebarItemView'](_0x56b43a)||null;}['_getItemAfter'](_0x133de0){const _0x2179c9=this['_sidebarItemViewToAnnotation']['get'](_0x133de0),_0x54abbc=_0x2179c9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2179c9)+0x1);return _0x54abbc&&this['getSidebarItemView'](_0x54abbc)||null;}['_alignBeforeItem'](_0x3d52c6,_0x5644d0){_0x3d52c6['updateHeight']();const _0x1c4d85=G(_0x5644d0['bottom']+this['_spaceBetweenItems'],_0x3d52c6['top']);return!!_0x1c4d85&&(this['_setItemTop'](_0x5644d0,_0x5644d0['top']-_0x1c4d85),!0x0);}['_alignAfterItem'](_0x13499f,_0x242382){_0x13499f['updateHeight']();const _0x4db825=G(_0x13499f['bottom']+this['_spaceBetweenItems'],_0x242382['top']);return!!_0x4db825&&(this['_setItemTop'](_0x242382,_0x242382['top']+_0x4db825,!0x1),!0x0);}['_alignToTargetRect'](_0x301a10){const _0x246692=this['_sidebarItemViewToAnnotation']['get'](_0x301a10);if(!_0x246692||!_0x246692['target']||!_0x246692['targetRect'])return;const _0x1b4fc7=this['_getTargetTop'](_0x246692,_0x246692['targetRect']);this['_setItemTop'](_0x301a10,_0x1b4fc7);}['_getTargetTop'](_0x3b0b2c,_0x1452fc){if(null===_0x1452fc)return 0x0;if(_0x3b0b2c['target']instanceof _0x2a219f)return _0x1452fc['top'];{const _0x472227=new _0x2a219f(this['view']['element'])['top'];return _0x1452fc['top']-_0x472227;}}['_setItemTop'](_0x49aab4,_0x2f2229,_0x9ec1a1=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x9ec1a1&&(_0x2f2229=Math['max'](_0x2f2229,this['_getMaxAvailableTop'](_0x49aab4))),_0x49aab4['top']=_0x2f2229;}['_getMaxAvailableTop'](_0x496715){let _0x8efde9=this['_getItemBefore'](_0x496715),_0x4216f0=0x0;for(;_0x8efde9;)_0x8efde9['updateHeight'](),_0x4216f0+=this['_spaceBetweenItems']+_0x8efde9['height'],_0x8efde9=this['_getItemBefore'](_0x8efde9);return _0x4216f0;}}function G(_0x172e52,_0xa491f0){return Math['max'](_0x172e52-_0xa491f0,0x0);}function g(_0x50bacd){return null!==_0x50bacd&&'object'==typeof _0x50bacd&&0x1===_0x50bacd['nodeType'];}class e extends _0x1057fb{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f3118){super(_0x3f3118),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x39f167(),this['_refreshPositioningDebounced']=_0x44edca(()=>{_0x3f3118['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x357995=this['context']['plugins']['get'](j),_0x387e8f=this['context']['plugins']['get'](z);_0x357995['register']('wideSidebar',this),_0x387e8f['container']&&_0x357995['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1c29c4){if(_0x1c29c4===this['activeAnnotation'])return;const _0x36364c=this['context']['plugins']['get'](z);_0x36364c['_activeAnnotation']=_0x1c29c4;const _0x3f1631=this['activeAnnotation'];_0x36364c['refresh']({'blurredAnnotation':_0x3f1631,'activatedAnnotation':_0x1c29c4}),this['activeAnnotation']=_0x1c29c4;}['attach'](_0x1232cd){this['annotations']=_0x1232cd;const _0x26519b=this['context']['plugins']['get'](z);if(_0x26519b['_annotations']=_0x1232cd,this['isAttached'])throw new _0x5d3b6b('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x26519b,'set:container',()=>{this['detach'](),this['listenTo'](_0x26519b,'change:container',_0x143376=>{_0x143376['off'](),this['attach'](_0x1232cd);});}),_0x26519b['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4afe32=_0x373d15=>{_0x373d15['updateTargetRect'](),_0x26519b['addAnnotation'](_0x373d15);};for(const _0x15dcba of _0x1232cd)_0x4afe32(_0x15dcba);this['listenTo'](_0x1232cd,'add',(_0x156965,_0x42de2e)=>{_0x4afe32(_0x42de2e);}),this['listenTo'](_0x1232cd,'remove',(_0x16da38,_0x4cb5db,_0x504f0b)=>{_0x26519b['rearrange']({'removedAnnotation':_0x4cb5db,'previousAnnotation':_0x1232cd['get'](_0x504f0b-0x1),'nextAnnotation':_0x1232cd['get'](_0x504f0b+0x1)}),_0x4cb5db===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1232cd,'focus',(_0x1cfb4d,_0x1d6c61)=>{this['setActiveAnnotation'](_0x1d6c61);}),this['listenTo'](_0x1232cd,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3a4726=this['context']instanceof _0x153b8d?this['context']['editors']:new _0x39f167([this['context']]);for(const _0x24c6bb of _0x3a4726)this['_integrateWithEditorAnnotations'](_0x24c6bb);this['listenTo'](_0x3a4726,'add',(_0x56eae9,_0x1bc7ed)=>{this['listenTo'](_0x1bc7ed,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1bc7ed);});}),this['listenTo'](_0x3a4726,'remove',(_0x4af89e,_0x4c30a7)=>{_0x4c30a7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4c30a7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x5d3b6b('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x50e087=this['context']['plugins']['get'](z);_0x50e087['_detachFromContainer'](this['annotations']),this['stopListening'](_0x50e087),this['stopListening'](this['annotations']),this['context']instanceof _0x153b8d&&this['stopListening'](this['context']['editors']);for(const _0x3d7ee9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3d7ee9);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x514109){if(!_0x514109['plugins']['has']('EditorAnnotations'))return;const _0x1ef435=_0x514109['plugins']['get']('EditorAnnotations'),_0x6d7724=()=>{const _0x52f6e7=_0x1ef435['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x52f6e7[0x0]||null);};this['listenTo'](_0x1ef435,'refresh',_0x6d7724),this['listenTo'](_0x1ef435,'blur',(_0x341020,{isAnnotationTracked:_0x49f094})=>{this['activeAnnotation']&&_0x49f094(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1ef435,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x33daf6=>{_0x1ef435['hasDomSelection']()&&(_0x6d7724(),_0x33daf6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1ef435);}['_destroyEditorAnnotationsIntegration'](_0x4c421a){this['stopListening'](_0x4c421a),this['_editorAnnotations']['remove'](_0x4c421a);}}class C extends _0x3252f0{['counterView'];constructor(_0x1822a7){super(_0x1822a7);const _0xd92d73=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x126534,_0x578937)=>_0x126534?'...':_0x578937['toString']()),this['set']('annotationType',''),this['icon']=_0x4c1049,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xd92d73['to']('annotationType',_0x79de7d=>'ck-annotation-counter__badge--'+_0x79de7d),_0xd92d73['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xd92d73['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1057fb{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a4af2){super(_0x5a4af2),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x281b79())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x39f167(),this['_refreshPositioningDebounced']=_0x44edca(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2ed1a9(this['context']['locale']),this['balloonPanelView']=new _0x6bac08(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2549f7){this['annotations']=_0x2549f7;const _0x32499d=this['context']['plugins']['get'](z),_0x2629df=this['balloonPanelView'];if(_0x32499d['_annotations']=_0x2549f7,this['isAttached'])throw new _0x5d3b6b('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x32499d,'set:container',()=>{this['detach'](),this['listenTo'](_0x32499d,'change:container',_0x968898=>{_0x968898['off'](),this['attach'](_0x2549f7);});}),_0x32499d['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x50217a=_0x198f03=>{const _0xfc3627=new C(this['context']['locale']);_0x32499d['addAnnotation'](_0x198f03,_0xfc3627),this['_annotationToNarrowView']['set'](_0x198f03,_0xfc3627),_0xfc3627['bind']('isDirty','annotationType','number')['to'](_0x198f03['view'],'isDirty','type','length'),_0xfc3627['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2629df['content']['first']!==_0x198f03['view']?(this['_showBalloon'](_0x198f03),_0x198f03['view']['element']['focus'](),this['setActiveAnnotation'](_0x198f03)):this['setActiveAnnotation'](null);});};for(const _0x544136 of _0x2549f7)_0x50217a(_0x544136);this['listenTo'](_0x2549f7,'add',(_0x5924c7,_0x3be361)=>{_0x50217a(_0x3be361);}),this['listenTo'](_0x2549f7,'remove',(_0x205cea,_0x43b0dc,_0x45d75f)=>{this['_annotationToNarrowView']['get'](_0x43b0dc)['destroy'](),this['_annotationToNarrowView']['delete'](_0x43b0dc),_0x32499d['rearrange']({'removedAnnotation':_0x43b0dc,'previousAnnotation':_0x2549f7['get'](_0x45d75f-0x1),'nextAnnotation':_0x2549f7['get'](_0x45d75f+0x1)}),_0x43b0dc===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2549f7,'focus',(_0x16dfbf,_0x59a8fe)=>{this['setActiveAnnotation'](_0x59a8fe);}),this['listenTo'](_0x2549f7,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1ecd7d,_0x492243)=>{_0x492243['keyCode']===_0x175d78['esc']&&_0x2629df['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2629df['content']['first']),this['_hideBalloon'](),_0x492243['stopPropagation'](),_0x492243['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x4d882c,_0x147f3f)=>{const _0xf865e0=_0x147f3f['target'];_0x2629df['isVisible']&&_0x2629df['element']['contains'](_0xf865e0)||_0x32499d['view']['element']['contains'](_0xf865e0)||_0x4d882c['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x232349=>_0x232349['contains'](_0xf865e0))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1de8e7=this['context']instanceof _0x153b8d?this['context']['editors']:new _0x39f167([this['context']]);for(const _0x3c64d1 of _0x1de8e7)this['_integrateWithEditorAnnotations'](_0x3c64d1);this['listenTo'](_0x1de8e7,'add',(_0x354a8d,_0x349e94)=>{this['listenTo'](_0x349e94,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x349e94);});}),this['listenTo'](_0x1de8e7,'remove',(_0x3974bb,_0x2075ee)=>{_0x2075ee['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2075ee['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x299d64){if(_0x299d64===this['activeAnnotation'])return;const _0x20f7a9=this['context']['plugins']['get'](z);if(_0x20f7a9['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x299d64,'disableAnimationOnActivatedAnnotation':!0x0}),_0x299d64)_0x20f7a9['getSidebarItemView'](_0x299d64)?this['_showBalloon'](_0x299d64):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x299d64;}['detach'](){if(!this['isAttached'])throw new _0x5d3b6b('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x507c26=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x15999c=>_0x15999c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x507c26['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x153b8d&&this['stopListening'](this['context']['editors']);for(const _0x38c24b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x38c24b);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'](_0x34487c){if(!_0x34487c['plugins']['has']('EditorAnnotations'))return;const _0x539f82=_0x34487c['plugins']['get']('EditorAnnotations'),_0x16c444=this['context']['plugins']['get'](z),_0x22b4af=this['annotations'],_0x5bdfda=this['balloonPanelView'],_0x3790ae=()=>{const _0x46e981=_0x539f82['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x46e981),this['setActiveAnnotation'](_0x46e981[0x0]||null);};this['listenTo'](_0x539f82,'refresh',_0x3790ae),this['listenTo'](_0x539f82,'blur',(_0x5afb49,{isAnnotationTracked:_0x42fa9f})=>{this['activeAnnotation']&&_0x42fa9f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x539f82,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x22b4af,'blur',_0x213d04=>{_0x539f82['hasDomSelection']()&&_0x213d04['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4411c9,_0x2edfcd)=>{const _0x39df97=_0x2edfcd['target'];_0x5bdfda['isVisible']&&_0x5bdfda['element']['contains'](_0x39df97)||_0x16c444['view']['element']['contains'](_0x39df97)||this['activeAnnotation']&&_0x539f82['hasDomSelection']()&&(_0x3790ae(),_0x4411c9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x539f82);}['_destroyEditorAnnotationsIntegration'](_0x6f57ed){_0x6f57ed&&(this['stopListening'](_0x6f57ed),this['_editorAnnotations']['remove'](_0x6f57ed));}['_setSelectedAnnotations'](_0xe44c88){for(const _0x5188bb of this['_selectedAnnotations'])_0xe44c88['includes'](_0x5188bb)||this['_manuallyClosedAnnotationViews']['delete'](_0x5188bb['view']);this['_selectedAnnotations']=_0xe44c88;}['_refreshPositioning'](){const _0xfbbb2f=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xfbbb2f['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1e1099){if(this['_manuallyClosedAnnotationViews']['has'](_0x1e1099['view']))return;const _0x4c8e56=this['balloonPanelView']['content']['first'];_0x4c8e56!==_0x1e1099['view']?(_0x4c8e56&&this['_detachListeners'](_0x4c8e56),this['_attachListeners'](_0x1e1099['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1e1099['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x197b46=this['balloonPanelView']['content']['first'],_0x30821a=_0x197b46&&this['annotations']['getByView'](_0x197b46);if(!_0x30821a||!this['_annotationToNarrowView']['has'](_0x30821a))return;const _0x35c7cd=this['_annotationToNarrowView']['get'](_0x30821a)['element'],_0xe68544=(function(){const _0x58e8d7=_0x6bac08['defaultPositions'];return[_0x58e8d7['southArrowNorthEast'],_0x58e8d7['northArrowSouthEast'],_0x58e8d7['southArrowNorth'],_0x58e8d7['northArrowSouth'],_0x58e8d7['southArrowNorthWest'],_0x58e8d7['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x35c7cd,'positions':_0xe68544});}['_hideBalloon'](){const _0x4fe421=this['balloonPanelView'],_0x207a03=_0x4fe421['content']['first'];_0x207a03&&(this['_detachListeners'](_0x207a03),_0x4fe421['unpin'](),_0x4fe421['content']['clear']());}['_attachListeners'](_0x415ffc){this['listenTo'](_0x415ffc,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x415ffc,'Esc',(_0x20e998,_0xf94434)=>{this['_manuallyClosedAnnotationViews']['add'](_0x415ffc),this['_hideBalloon'](),_0xf94434();});}['_detachListeners'](_0x185df8){this['stopListening'](_0x185df8);}}class c extends _0x22838b{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x586269,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x184efd){super(_0x184efd),_0x184efd['editing']['view']['addObserver'](_0x4e119d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x184efd['plugins']['get'](_0x586269),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x49385d=this['editor']['plugins']['get'](j);_0x49385d['context']===this['editor']&&(_0x49385d['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4cd9d4,_0x324507)=>{const _0x2bb6fd=this['_balloon'];if(this['isAttached']&&_0x2bb6fd['visibleView']){const _0x5436bf=this['annotations']['getByView'](_0x2bb6fd['visibleView']);_0x5436bf&&this['_closeAnnotation'](_0x5436bf),_0x324507();}}));}['afterInit'](){const _0x5a7153=this['editor']['plugins']['get'](j);_0x5a7153['context']===this['editor']&&(_0x5a7153['hasActive']()||_0x5a7153['switchTo']('inline'));}['setActiveAnnotation'](_0x44a88b){_0x44a88b!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x44a88b&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x44a88b)&&this['_addAnnotationToBalloon'](_0x44a88b,!0x0),_0x44a88b['isActive']=!0x0),_0x44a88b||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x44a88b);}['attach'](_0x3a97b){this['annotations']=_0x3a97b;const _0x370ced=this['editor']['plugins']['get'](j),_0xe0dd66=this['_balloon'];if(this['isAttached'])throw new _0x5d3b6b('inlineannotations-attach-already-attached',this);if(_0x370ced['context']!==this['editor'])throw new _0x5d3b6b('inlineannotations-not-allowed-with-context',this);const _0x14d032=this['editor']['plugins']['get'](b);this['listenTo'](_0x14d032,'refresh',()=>{const _0x3198e8=_0x14d032['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x40c123,_0x16fdd5;!this['_forceRefresh']&&(_0x40c123=_0x3198e8,_0x16fdd5=this['_selectedAnnotations'],_0x40c123['length']===_0x16fdd5['length']&&_0x40c123['every'](_0x25174a=>_0x16fdd5['includes'](_0x25174a)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3198e8),this['setActiveAnnotation'](_0x3198e8[0x0]||null));}),this['listenTo'](_0x14d032,'blur',(_0x5db2b1,{isAnnotationTracked:_0x2a994b})=>{this['activeAnnotation']&&_0x2a994b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x55ae99,_0x45fcfa,_0xe15eb9)=>{_0xe15eb9||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3a97b,'remove',(_0x51f813,_0xe3f2f5)=>{this['_removeAnnotationFromBalloon'](_0xe3f2f5),_0xe3f2f5===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe0dd66,'change:visibleView',(_0x1cfa87,_0x4bd497,_0x57c3f1,_0x38ff7d)=>{_0x38ff7d&&this['stopListening'](_0x38ff7d);const _0x1f4052=_0x3a97b['getByView'](_0x57c3f1);_0x57c3f1&&_0x1f4052&&(this['listenTo'](_0x57c3f1,'change:height',()=>{_0xe0dd66['updatePosition']();}),this['listenTo'](_0x57c3f1,'Esc',()=>{this['_closeAnnotation'](_0x1f4052),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1f4052&&this['setActiveAnnotation'](_0x1f4052));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xe0dd66['visibleView']&&(_0x3a97b['getByView'](_0xe0dd66['visibleView'])&&_0xe0dd66['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 _0x5d3b6b('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x427adc of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x427adc);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0xe13a7f){for(const _0x532344 of this['_selectedAnnotations'])_0xe13a7f['includes'](_0x532344)||this['_manuallyClosed']['delete'](_0x532344);for(const _0x290d26 of this['annotations'])_0xe13a7f['includes'](_0x290d26)||this['_removeAnnotationFromBalloon'](_0x290d26);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3251fc of _0xe13a7f)this['_addAnnotationToBalloon'](_0x3251fc);}this['_selectedAnnotations']=_0xe13a7f;}['_addAnnotationToBalloon'](_0x21f1ed,_0x3c88cf=!0x1){this['_manuallyClosed']['has'](_0x21f1ed)||(this['_addedAnnotations']['has'](_0x21f1ed)||this['_balloon']['hasView'](_0x21f1ed['view'])||(this['_addedAnnotations']['add'](_0x21f1ed),this['_balloon']['add']({'stackId':_0x21f1ed['view']['id'],'view':_0x21f1ed['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x21f1ed)}})),_0x3c88cf&&this['_balloon']['showStack'](_0x21f1ed['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4eaf9d){const _0x528f0b=_0x4eaf9d['target'],_0x24ae9f=this['editor']['editing']['view'],_0x39dd02=_0x24ae9f['document']['selection']['getFirstRange'](),_0xdae817=_0x24ae9f['domConverter']['viewRangeToDom'](_0x39dd02);if(_0xdae817['collapse'](!0x0),_0x528f0b){if(_0x528f0b instanceof _0x2a219f)return _0x528f0b;let _0x2f291e=[];for(const _0xa349d5 of _0x528f0b)_0x2f291e['push'](...F(_0xa349d5['getClientRects']()));_0x2f291e=function(_0x1350fb){const _0x51aef5=[];let _0x41e646=_0x1350fb[0x0];for(let _0x517607=0x1;_0x517607<_0x1350fb['length'];_0x517607++)P(_0x41e646,_0x1350fb[_0x517607])?_0x41e646['width']+=_0x1350fb[_0x517607]['width']:(_0x51aef5['push'](_0x41e646),_0x41e646=_0x1350fb[_0x517607]);return _0x51aef5['push'](_0x41e646),_0x51aef5;}(_0x2f291e);const _0x22b947=_0xdae817['getBoundingClientRect']();return _0x2f291e['find'](_0x2d9158=>_0x2d9158['top']<=_0x22b947['top']&&_0x2d9158['bottom']>=_0x22b947['bottom']&&_0x2d9158['left']<=_0x22b947['left']&&_0x2d9158['right']>=_0x22b947['right'])||_0x2f291e[0x0];}return _0x4eaf9d['targetRect']||_0xdae817;}['_removeAnnotationFromBalloon'](_0x166186){this['_addedAnnotations']['has'](_0x166186)&&this['_balloon']['hasView'](_0x166186['view'])&&(this['_addedAnnotations']['delete'](_0x166186),this['_balloon']['remove'](_0x166186['view']));}['_closeAnnotation'](_0x5c80ba){this['_manuallyClosed']['add'](_0x5c80ba),this['_removeAnnotationFromBalloon'](_0x5c80ba);}}function F(_0x2ef127){return Array['from'](_0x2ef127)['map'](DOMRect['fromRect']);}function P(_0x1b9837,_0x6d81f8){return _0x1b9837['top']===_0x6d81f8['top']&&_0x1b9837['bottom']===_0x6d81f8['bottom']&&_0x1b9837['right']===_0x6d81f8['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x595db1,_0x541495){super(_0x595db1),this['set']('isEmpty',!_0x541495['length']),this['focusTracker']=new _0x2a4010(),this['_annotationViews']=_0x541495,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4babae({'focusables':_0x541495,'focusTracker':this['focusTracker']}),this['listenTo'](_0x541495,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x541495,'remove',(_0x42cd8b,_0x247ff3)=>{_0x247ff3['isActive']&&this['focus'](),_0x541495['length']||(this['isEmpty']=!0x0);});const _0x5a83be=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x595db1,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x541495},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5a83be['if']('isEmpty','ck-hidden',_0x196d2b=>!_0x196d2b)]},'children':[{'text':N(_0x595db1,'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 _0x1542fd of this['_annotationViews'])this['focusTracker']['add'](_0x1542fd['element']);this['_annotationViews']['on']('change',(_0x1fd2f8,{added:_0x101ded,removed:_0x21b05f})=>{for(const _0x136853 of _0x101ded)this['focusTracker']['add'](_0x136853['element']);for(const _0x3ce0b4 of _0x21b05f)this['focusTracker']['remove'](_0x3ce0b4['element']);});}}class p extends _0x1057fb{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x2a9102){super(_0x2a9102),this['archivedThreads']=new _0x39f167();}['init'](){const _0x24cb93=this['context'],_0x4f9c96=_0x24cb93['plugins']['get'](o),_0x4e6078=_0x24cb93['plugins']['get'](y);this['listenTo'](_0x4f9c96,'addCommentThread',(_0x460ead,{threadId:_0x2a7a6c})=>{const _0x382aa0=_0x4f9c96['getCommentThread'](_0x2a7a6c);_0x382aa0['archivedAt']&&this['archivedThreads']['add'](_0x382aa0,this['_calculatePosition'](_0x382aa0['archivedAt'])),this['listenTo'](_0x382aa0,'change:archivedAt',(_0x1d6291,_0x444e86,_0x21690a)=>{_0x21690a?this['archivedThreads']['has'](_0x382aa0)||this['archivedThreads']['add'](_0x382aa0,this['_calculatePosition'](_0x382aa0['archivedAt'])):this['archivedThreads']['has'](_0x382aa0)&&this['archivedThreads']['remove'](_0x382aa0);});}),this['listenTo'](_0x4f9c96,'removeCommentThread',(_0x485ada,{threadId:_0x3c156f})=>{const _0x40d957=_0x4f9c96['getCommentThread'](_0x3c156f);this['stopListening'](_0x40d957),this['archivedThreads']['has'](_0x40d957)&&this['archivedThreads']['remove'](_0x40d957);},{'priority':'highest'}),this['listenTo'](_0x4e6078['collection'],'focus',(_0x32de0a,_0x55805a)=>{_0x55805a['isVisible']||(_0x55805a['isActive']=!0x0,_0x4e6078['activate'](_0x55805a));});}['_calculatePosition'](_0x3dafd7){const _0x351959=[...this['archivedThreads']]['findIndex'](_0x2ed9f3=>_0x2ed9f3['archivedAt']<_0x3dafd7);return _0x351959>-0x1?_0x351959:this['archivedThreads']['length'];}}class a extends _0x22838b{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x48c1d1];}constructor(_0x4b2449){super(_0x4b2449),this['annotationViews']=new _0x1c7545(),this['_pendingThreads']=[];}['init'](){const _0x1e8d26=this['editor'],_0x2635f8=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1e8d26['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3252f0,!0x0)),_0x1e8d26['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x170be4=this['_createCommentsArchiveButton'](_0x489c6e);return _0x170be4['set']({'role':'menuitemcheckbox'}),_0x170be4;});const _0x312269=_0x1e8d26['plugins']['get'](p),_0x5ec895=_0x1e8d26['plugins']['get']('Annotations'),_0x5a69f8=_0x1e8d26['plugins']['get']('CommentsRepository');_0x312269['archivedThreads']['forEach'](_0x46cc90=>{this['_handleNewThread'](_0x46cc90);}),this['listenTo'](_0x312269['archivedThreads'],'add',(_0x2089ae,_0x56356b)=>{this['_handleNewThread'](_0x56356b);}),this['listenTo'](_0x5ec895['collection'],'add',(_0x58acb8,_0x341c07)=>{const _0x4afb88=this['_pendingThreads']['find'](_0x2d1367=>{const _0x4a9402=_0x5a69f8['_threadToController']['get'](_0x2d1367);return _0x4a9402&&_0x341c07['innerView']===_0x4a9402['view'];});if(_0x4afb88){const _0xe5c571=this['_calculatePosition'](_0x4afb88['archivedAt']);this['_addAnnotationToArchive'](_0x341c07,_0xe5c571),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4afb88),0x1);}}),this['listenTo'](_0x312269['archivedThreads'],'remove',(_0x4ed909,_0x34fdd2)=>{const _0x4c46dd=_0x1e8d26['config']['get']('collaboration.channelId');if(!_0x4c46dd||_0x34fdd2['channelId']===_0x4c46dd){if(this['_pendingThreads']['includes'](_0x34fdd2))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x34fdd2),0x1);else{const _0x3fd419=_0x5a69f8['_threadToController']['get'](_0x34fdd2),_0x14ae73=_0x5ec895['getByInnerView'](_0x3fd419['view']);this['annotationViews']['remove'](_0x14ae73['view']),this['stopListening'](_0x14ae73),this['stopListening'](_0x14ae73['focusableElements']);}}}),this['listenTo'](_0x5ec895['collection'],'add',(_0x1a4c29,_0x3764f2)=>{this['listenTo'](_0x3764f2,'escape',_0x2635f8);}),this['listenTo'](_0x5ec895['collection'],'remove',(_0x4dcb72,_0x20e343)=>{this['stopListening'](_0x20e343,'escape',_0x2635f8);});}['_addAnnotationToArchive'](_0x53e9bb,_0x4ec18e){this['listenTo'](_0x53e9bb,'set:isVisible',_0x593734=>{_0x593734['return']=!0x1,_0x593734['stop']();}),this['annotationViews']['add'](_0x53e9bb['view'],_0x4ec18e);}['_handleNewThread'](_0x57566b){const _0x54f41a=this['editor']['plugins']['get']('CommentsRepository'),_0x2da199=this['editor']['plugins']['get']('Annotations'),_0xba06a8=this['editor']['config']['get']('collaboration.channelId');if(!_0xba06a8||_0x57566b['channelId']===_0xba06a8){const _0x3d0ed8=_0x54f41a['_threadToController']['get'](_0x57566b);if(!_0x3d0ed8)return void this['_pendingThreads']['push'](_0x57566b);const _0x119aa8=this['_calculatePosition'](_0x57566b['archivedAt']),_0x26fb47=_0x2da199['getByInnerView'](_0x3d0ed8['view']);_0x26fb47['isVisible']&&_0x2da199['_visibleAnnotations']['remove'](_0x26fb47),this['_addAnnotationToArchive'](_0x26fb47,_0x119aa8);}}['_calculatePosition'](_0x3c8068){const _0x3de43b=this['editor']['config']['get']('collaboration.channelId'),_0x536663=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x9d9c83=>_0x9d9c83['channelId']===_0x3de43b)['findIndex'](_0x4bfcd9=>_0x4bfcd9['archivedAt']<_0x3c8068);return _0x536663<0x0||_0x536663>this['annotationViews']['length']?this['annotationViews']['length']:_0x536663-0x1;}['_toggleDialog'](){const _0xec6777=this['editor'],_0x2a8c11=_0xec6777['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0xec6777['locale'],this['annotationViews'])),'commentsArchive'===_0x2a8c11['id']?_0x2a8c11['hide']():_0x2a8c11['show']({'id':'commentsArchive','title':N(_0xec6777['locale'],'COMMENTS_ARCHIVE'),'icon':_0x39f3b8,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x301d4b['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x36e0b5,_0x5d4803=!0x1){const _0x528e89=this['editor']['locale'],_0x325ef8=this['editor']['plugins']['get']('Dialog'),_0x527eb9=new _0x36e0b5(_0x528e89);return _0x527eb9['bind']('isEnabled')['to'](this,'isEnabled'),_0x527eb9['bind']('isOn')['to'](_0x325ef8,'id',_0x39f17b=>'commentsArchive'===_0x39f17b),_0x527eb9['set']({'label':N(_0x528e89,'COMMENTS_ARCHIVE'),'icon':_0x39f3b8,'isToggleable':!0x0}),_0x5d4803&&(_0x527eb9['tooltip']=!0x0),this['listenTo'](_0x527eb9,'execute',()=>this['_toggleDialog']()),_0x527eb9;}['_hideDialogOnAnnotationEscape']=_0x18cb75=>{const _0x1ae549=_0x18cb75['source'];if(!this['annotationViews']['has'](_0x1ae549['view']))return;const _0x13edc7=this['editor']['plugins']['get']('Dialog');_0x13edc7['isOpen']&&'commentsArchive'===_0x13edc7['id']&&(_0x13edc7['hide'](),_0x18cb75['stop']());};}class gi extends _0x22838b{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x31fba6,ContextPlugin as _0x50de75,PendingActions as pt,Command as _0x309e95,Plugin as _0x1ca286,Context as _0x25692d}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1cf973,uid as _0x546680,KeystrokeHandler as jt,FocusTracker as _0x59f96f,diff as _0x187618,Collection as _0x28f05f,Rect as _0xee8513,CKEditorError as _0x4a98c7,first as _0x3197a7,priorities as Wt,scrollViewportToShowTarget as ot,getEnvKeystrokeText as nt,toUnit as Dt,DomEmitterMixin as _0x19fe3e,keyCodes as _0x2ec312}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2ebef2,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x181b7d,trimHtml as ts,LateFocusDropdownButtonView as _0x3ced31,Users as st,getDateTimeFormatter as It,hashObject as wt,getAllMarkersDomElementsSorted as it,surroundingMarkersDetector as et,FOCUS_ANNOTATION_KEYSTROKE as _0x4d5d1c}from'ckeditor5-collaboration/dist/index.js';import{throttle as _0xa05dc1,isEqual as yt,cloneDeep as At,set as Ct,unset as vt,debounce as _0x3eac1b}from'es-toolkit/compat';import{IconUndo as _0x4e3383,IconCheck as _0x138e93,IconPencil as _0x3c2bef,IconRemoveComment as _0x987fa5,IconThreeVerticalDots as _0x387aa9,IconAddComment as _0x2a550c,IconCommentsArchive as _0x107bc7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0xa1a196,ButtonView as _0x5b9b26,ViewCollection as _0xd11430,createDropdown as _0x57483d,ListView as _0x3f39f9,focusChildOnDropdownOpen as _0x2254bc,ListItemView as _0x4bb42b,MenuBarMenuListItemButtonView as _0xade49,BodyCollection as _0x32a128,BalloonPanelView as _0x48bf6d,ContextualBalloon as _0x17c45f,Dialog as _0x72ed32,DialogViewPosition as _0x20de5a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x1a2798}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x3850a3}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x21c384}from'@ckeditor/ckeditor5-widget/dist/index.js';class gt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1cf973(){['model'];['view'];constructor(_0x47a3d9,_0x385a4b){super(),this['model']=_0x47a3d9,this['model']['_isAttached']=!0x0,this['view']=_0x385a4b,this['listenTo'](_0x385a4b,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x385a4b,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x385a4b,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x385a4b,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x385a4b,'addComment',(_0x49ab7c,_0x15c17d)=>this['addComment'](_0x15c17d)),this['listenTo'](_0x385a4b,'updateComment',(_0x5a79ee,_0x4f1a64,_0x13c250)=>this['updateComment'](_0x4f1a64,_0x13c250)),this['listenTo'](_0x385a4b,'removeComment',(_0x1e453c,_0xf1a1c5)=>this['removeComment'](_0xf1a1c5));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1bfccd){this['model']['addComment']({'content':_0x1bfccd,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3639ef,_0x540674){this['model']['getComment'](_0x3639ef)['update']({'content':_0x540674});}['removeComment'](_0x374620){this['model']['getComment'](_0x374620)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x5edcf6,_0x5e53a8,_0x403665){const t=_0x5edcf6['t'];switch(_0x5e53a8){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'},_0x403665);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'},_0x403665);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'},_0x403665);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'},_0x403665);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x403665);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'},_0x403665);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'},_0x403665);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'},_0x403665);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 Rt extends $t{['main'];['editable'];constructor(_0x29386e,_0x657ddb){super(_0x29386e);const _0x1139bb=_0x546680();this['main']=this['createCollection'](),this['editable']=new Vt(_0x29386e,_0x657ddb,void 0x0,{'label':()=>N(_0x29386e,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x29386e['uiLanguageDirection'],'lang':_0x29386e['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x1139bb},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Ut{['view'];constructor(_0x51f236){super(_0x51f236),this['view']=new Rt(_0x51f236['locale'],_0x51f236['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x274fe8=this['editor']['editing']['view'],_0x3bed8d=this['view']['editable'],_0x115dd5=_0x274fe8['document']['getRoot']();_0x3bed8d['name']=_0x115dd5['rootName'],this['view']['render']();const _0x256d36=_0x3bed8d['element'];this['setEditableElement'](_0x3bed8d['name'],_0x256d36),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x274fe8['attachDomRoot'](_0x256d36),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1cf973(_0x31fba6){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x557936={}){function _0x3f9ae0(_0x2adcf0){return _0x2adcf0['map'](_0x479c36=>String['fromCharCode'](_0x479c36))['join']('');}(_0x557936=Object['assign']({},_0x557936))['plugins']||(_0x557936['plugins']=hs['defaultPlugins']),super(_0x557936),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3f9ae0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3f9ae0([0x76,0x69,0x65,0x77])][_0x3f9ae0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3f9ae0([0x61,0x75,0x74,0x6f]),this[_0x3f9ae0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3f9ae0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3f9ae0([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3f9ae0([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3f9ae0([0x6f,0x6b])});}['create'](){const _0x5c0f57=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5c0f57))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3d07d5=>{const _0xb8dd54=this['model']['document']['getRoot'](),_0x4ee8c0=_0xb8dd54&&_0xb8dd54['getChild'](_0xb8dd54['childCount']-0x1);_0x3d07d5['setSelection'](_0x4ee8c0,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3ca4fa=this['editing']['view'],_0x99fcc4=_0x3ca4fa['document']['getRoot'](),_0x3764c4=_0x99fcc4['getChild'](0x0);_0x99fcc4['childCount']>0x1||!_0x3764c4||'p'!=_0x3764c4['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x3ca4fa,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3764c4['placeholder']=this['placeholder']),Ft({'view':_0x3ca4fa,'element':_0x3764c4,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3764c4);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x29d72f,_0x3d4c49={}){super(_0x29d72f),this['editor']=null,this['_editorConfig']=_0x3d4c49,this['set']('value',_0x3d4c49['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x29d72f,'Reply...')),this['set']('submitLabel',N(_0x29d72f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x59f96f(),this['focusCycler']=new _0xa1a196({'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',(_0x53f7b0,_0x215d04)=>{this['cancelButtonView']['fire']('execute'),_0x215d04();}),this['keystrokes']['set']('Ctrl+Enter',(_0x377c90,_0x5d3de7)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5d3de7());}),this['on']('submit',(_0x90a0cb,_0x1da47e)=>{_0x1da47e['length']>0xfde8?(alert(N(_0x29d72f,'TOO_LONG_COMMENT_ALERT',[_0x1da47e['length'],0xfde8])),_0x90a0cb['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2a3e94=this['editor'];this['element']['insertBefore'](_0x2a3e94['ui']['element'],this['element']['firstChild']),_0x2a3e94['model']['document']['on']('change',()=>this['value']=_0x2a3e94['getData']()),_0x2a3e94['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2a3e94['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4fe251){-0x1===_0x4fe251?(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:_0x196e20}=this,_0xdb8156=new _0x5b9b26(_0x196e20);return _0xdb8156['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xdb8156['withText']=!0x0,_0xdb8156['bind']('label')['to'](this,'submitLabel'),_0xdb8156['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xdb8156['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x34e611,_0x2f07fd)=>!_0x2f07fd&&!!_0x34e611['trim']()),_0xdb8156;}['_createCancelButton'](){const {locale:_0x561aac}=this,_0x5bb491=new _0x5b9b26(_0x561aac);return _0x5bb491['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x5bb491['label']=N(_0x561aac,'Cancel'),_0x5bb491['withText']=!0x0,_0x5bb491['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x5bb491;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x29eaf0=>{this['focusTracker']['add'](_0x29eaf0['element']);}),this['focusables']['on']('change',(_0x4ee435,_0x379f02)=>{for(const _0x3fe5df of Array['from'](_0x379f02['added'])['reverse']())this['focusTracker']['add'](_0x3fe5df['element']);});}}class ie extends kt{constructor(_0x2f9805,_0x16e7d4,_0x1426b2){super(_0x2f9805),this['commentInputView']=new es(_0x2f9805,_0x1426b2),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x9606bb,_0x1d213b)=>_0x9606bb||!!_0x1d213b),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 _0x2ebef2(_0x2f9805,_0x16e7d4),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'](_0x30c04e){this['commentInputView']['focus'](_0x30c04e);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x1c4ee8,_0x125b91)=>{const {submitButtonView:_0x384ae7,cancelButtonView:_0xff3060,editor:_0x1d7a64}=this['commentInputView'];[_0x384ae7['element'],_0xff3060['element'],_0x1d7a64?_0x1d7a64['editing']['view']['getDomRoot']():null]['filter'](_0x896a49=>_0x896a49)['some'](_0x304b50=>_0x304b50['contains'](_0x125b91['target']))||(this['focus'](),_0x125b91['preventDefault']());});}}class rs extends kt{constructor(_0x4fc1c2){super(_0x4fc1c2);const _0x3336fb=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3336fb['to']('count',_0xf995d0=>N(_0x4fc1c2,'NUMBER_OF_COMMENTS',_0xf995d0))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x57d767,_0x1bad4e,_0x29caac){super(_0x57d767);const _0xcec217=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1bad4e['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1bad4e,this['_config']=_0x29caac,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x59f96f(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa1a196({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x549962=>this['commentViews']['map'](_0x590ea3=>_0x590ea3['element'])['includes'](_0x549962['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x57d767),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x32a3d5=>_0x32a3d5-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2a658c of _0x1bad4e['comments'])this['_handleNewCommentModel'](_0x2a658c);this['_handleInfoComment'](),this['listenTo'](_0x1bad4e['comments'],'add',(_0x315e6c,_0x24f17a)=>{const _0x1a110e=this['_calculatePosition'](_0x24f17a);this['length']++,this['_handleNewCommentModel'](_0x24f17a,_0x1a110e),this['refreshVisibleViews']();}),this['listenTo'](_0x1bad4e['comments'],'remove',(_0x543077,_0x4d3771)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4d3771),this['refreshVisibleViews']();}),this['listenTo'](_0x1bad4e,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1bad4e,'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',_0xcec217['if']('length','ck-hidden',_0xd6904=>!_0xd6904)],'aria-label':N(_0x57d767,'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'](_0x387bd2){-0x1===_0x387bd2?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x458e40 of this['commentViews'])_0x458e40['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x172460,_0x287fab){const _0x23a0ea=new this['_config']['CommentView'](this['locale'],_0x172460,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x23a0ea['viewUid']=_0x172460['id'],_0x23a0ea['delegate']('removeComment')['to'](this),_0x23a0ea['delegate']('updateComment')['to'](this),_0x23a0ea['delegate']('resolveCommentThread')['to'](this),_0x23a0ea['delegate']('editorReady')['to'](this),_0x23a0ea['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x23a0ea,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x23a0ea,_0x287fab);}['_calculatePosition'](_0xadced1){const _0x228724=this['_model']['_findOptimalIndex'](_0xadced1);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xadced1['authoredAt']?_0x228724-0x1:_0x228724:_0x228724-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x24aac7={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x24aac7,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x24aac7));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x38d3c6){const _0x32054f=this['commentViews']['remove'](_0x38d3c6['id']);this['stopListening'](_0x32054f),_0x32054f['isEditMode']&&this['_updateHasDirtyComment'](),_0x32054f['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x305807=>_0x305807['isEditMode']);}['_rearrangeCollapse'](){const _0x537a7f=function(_0x1187da){const _0x2c7745=new _0x28f05f();for(const _0x554946 of _0x1187da)_0x2c7745['add'](_0x554946);return _0x2c7745;}(this['commentViews']),_0x591d84=this['_collapsedCommentsView']['count'];for(let _0x5035d6=0x1;_0x5035d6<=_0x591d84;_0x5035d6++)_0x537a7f['remove'](0x1);for(const _0x420d7a of _0x537a7f)_0x420d7a['collapse']();_0x591d84>0x0&&_0x537a7f['add'](this['_collapsedCommentsView'],0x1),ns(_0x187618(Array['from'](this['visibleViews']),Array['from'](_0x537a7f)),this['visibleViews'],_0x537a7f);}['_rearrangeExpand'](){ns(_0x187618(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x59a846 of this['visibleViews'])_0x59a846['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2eddc7=>{this['focusTracker']['add'](_0x2eddc7['element']),this['keystrokes']['listenTo'](_0x2eddc7['element']);}),this['commentViews']['on']('change',(_0x2e69c7,_0x2a928e)=>{for(const _0x37c9d4 of _0x2a928e['removed'])this['focusTracker']['remove'](_0x37c9d4['element']),this['keystrokes']['stopListening'](_0x37c9d4['element']);for(const _0xaef0fd of Array['from'](_0x2a928e['added'])['reverse']())this['focusTracker']['add'](_0xaef0fd['element']),this['keystrokes']['listenTo'](_0xaef0fd['element']);});}}function ns(_0xbd9ff,_0x16d8f5,_0x10ae3c){let _0x4fc913=0x0;for(const _0x56272e of _0xbd9ff)switch(_0x56272e){case'insert':_0x16d8f5['add'](_0x10ae3c['get'](_0x4fc913),_0x4fc913),_0x4fc913++;break;case'delete':_0x16d8f5['remove'](_0x4fc913);break;case'equal':_0x4fc913++;}}class oe extends kt{constructor(_0x4aed6f){super(_0x4aed6f);const _0x472253=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x472253['to']('contextValue',_0x51439a=>N(_0x4aed6f,'THREAD_CONTEXT_LABEL',_0x51439a)),'tabindex':-0x1},'children':[{'text':_0x472253['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x49d95e,_0x422d48){super(_0x49d95e);const _0x482879=this['bindTemplate'];this['_model']=_0x422d48,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x59f96f(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa1a196({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x45c1aa=>!!_0x45c1aa),this['bind']('contextValue')['to'](this['_model'],'context',_0x455f14=>_0x455f14&&_0x455f14['value']?this['_trimContextValue'](_0x455f14['value']):N(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',_0x482879['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 _0x3046ce=new _0x5b9b26(this['locale']);return _0x3046ce['label']=N(this['locale'],'Reopen'),_0x3046ce['tooltip']=N(this['locale'],'Reopen'),_0x3046ce['icon']=_0x4e3383,_0x3046ce['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x331032=>!_0x331032),_0x3046ce['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5e2905,_0x3ef39a)=>_0x5e2905&&_0x3ef39a),_0x3046ce['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3046ce;}['_trimContextValue'](_0xbb9e24){if(_0xbb9e24['length']<0x96)return _0xbb9e24;const _0x987e95=_0xbb9e24['lastIndexOf']('\x20',0x93);return _0xbb9e24['substring'](0x0,_0x987e95>-0x1?_0x987e95:0x93)+'...';}['_attachContextActions'](){const _0x5c716e=this['element']['querySelector']('.ck-context'),_0x4cf422=_0x5c716e['querySelector']('.ck-context__value');this['listenTo'](_0x5c716e,'mouseenter',()=>{_0x4cf422['offsetWidth']<_0x4cf422['scrollWidth']&&_0x5c716e['classList']['add']('overlay');}),this['listenTo'](_0x5c716e,'mouseleave',()=>{_0x5c716e['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x42a1e6 of this['focusables'])this['focusTracker']['add'](_0x42a1e6['element']),this['keystrokes']['listenTo'](_0x42a1e6['element']);}['_createContextView'](){const _0x1f9009=new oe(this['locale']);return _0x1f9009['bind']('contextValue')['to'](this),_0x1f9009;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x50350a,_0x3361ce,_0x1401ba,_0x29d26b){super(_0x50350a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3361ce,this['_localUser']=_0x1401ba,this['_config']=_0x29d26b,this['commentThreadHeaderView']=new Xt(_0x50350a,_0x3361ce),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x50350a,N(_0x50350a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x50350a,_0x3361ce,Object['assign']({'CommentView':this['_config']['CommentView']},_0x29d26b)),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',(_0x4bdceb,_0x54cc4c)=>_0x4bdceb||!!_0x54cc4c),this['bind']('isUnlinked')['to'](_0x3361ce,'unlinkedAt',_0x5647fd=>!!_0x5647fd),this['bind']('ariaLabel')['to'](this,'length',_0x370288=>{const _0x325f9f=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x370288,_0x325f9f]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x59f96f(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa1a196({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4a6bec=>_0x4a6bec['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x5d56cc=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x301131=_0x5d56cc['commentInputView'];return _0x5d56cc['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x301131,'value',(_0x10a864,_0x24fbe5,_0x17f2d7,_0x5b8e12,_0x4b8913)=>!!_0x4b8913||!!_0x5b8e12&&_0x17f2d7&&!_0x24fbe5||_0x10a864&&_0x17f2d7&&!_0x24fbe5),_0x301131['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xdc3f8c,_0x289db2,_0x5f6f43)=>{let _0x4614e8;return _0x4614e8=_0x5f6f43&&_0x289db2?'Reply\x20to\x20reopen\x20discussion...':_0xdc3f8c?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x4614e8);}),_0x301131['bind']('submitLabel')['to'](this,'length',_0x3349f0=>N(this['locale'],_0x3349f0?'Reply':'Comment')),_0x301131['on']('submit',(_0x39c39d,_0xdb23c1)=>{this['fire']('addComment',_0xdb23c1),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x301131['on']('cancel',()=>{this['focus']();}),_0x301131['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x301131['on']('cancel',_0x155d0c=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x155d0c['stop']());}),this['on']('change:isActive',(_0x144bf4,_0xdf8607,_0x5da608)=>{_0x5da608||this['length']||_0x301131['value']||this['fire']('removeCommentThread');}),_0x5d56cc;}}class Tt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1fab7f,_0x37ae2d,_0xc84daa,_0x17c4b4){super(_0x1fab7f,_0x37ae2d,_0xc84daa,_0x17c4b4),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1fab7f,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3c37c9,_0x15051f,_0x4656cf)=>{_0x4656cf||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xb0399d,_0x40f001,_0x12ace7)=>{_0x12ace7&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x1739a3=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1739a3['if']('isActive','ck-thread--active'),_0x1739a3['if']('isUnlinked','ck-thread--unlinked'),_0x1739a3['to']('actionIndicator',_0x41f2fa=>_0x41f2fa?'ck-thread--'+_0x41f2fa:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1739a3['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 _0x4fc75b of this['commentsListView']['commentViews'])_0x4fc75b['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x586aab}=this,_0x2c6003=this['commentsListView']['commentViews']['get'](0x0);_0x2c6003===this['_boundFirstCommentView']||_0x2c6003['isSystemComment']||(this['_boundFirstCommentView']=_0x2c6003,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2c6003,'actionIndicator',_0x1c51ad=>'remove'===_0x1c51ad?'remove':null),_0x2c6003['placeholder']=N(_0x586aab,'Write\x20a\x20comment...'),_0x2c6003['removeButton']['on']('execute',_0x49fe75=>{_0x49fe75['stop'](),this['showConfirm'](N(_0x586aab,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2c6003['focus']();}),_0x2c6003['actionBar']['add'](this['resolveButton'],0x0),_0x2c6003['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2926b4=new _0x181b7d(this['locale']);return _0x2926b4['label']=N(this['locale'],'Resolve'),_0x2926b4['tooltip']=N(this['locale'],'Resolve'),_0x2926b4['icon']=_0x138e93,_0x2926b4['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2926b4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xc57adc=>!_0xc57adc),_0x2926b4['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x495a06,_0x56411d)=>_0x495a06&&!_0x56411d),_0x2926b4['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2926b4;}['_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 is extends kt{constructor(_0x4c60ed){super(_0x4c60ed),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x4d3ff2,_0x35631c,_0xe99197)=>{this['element']['innerHTML']=_0xe99197;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1386a2,_0x204809,_0xab87e0){super(_0x1386a2),this['_model']=_0x204809,this['_config']=_0xab87e0,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x204809,'content',_0x204809,'authoredAt',(_0x57f511,_0x60c10e)=>N(_0x1386a2,'COMMENT_ARIA_LABEL',[_0x204809['author']['name'],_0xab87e0['formatDateTime'](_0x60c10e),new DOMParser()['parseFromString'](_0x57f511,'text/html')['body']['textContent'],_0x204809['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x1386a2,N(_0x1386a2,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xd11430(),this['focusTracker']=new _0x59f96f(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa1a196({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x54f8bb=>_0x54f8bb['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']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x125b38=new is(this['locale']);return _0x125b38['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x24209f,_0xede155)=>_0xede155?ts(_0x24209f,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x24209f),_0x125b38;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4cd5f3=new es(this['locale'],this['_config']['editorConfig']);return _0x4cd5f3['value']=this['_model']['content'],_0x4cd5f3['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4cd5f3['submitLabel']=N(this['locale'],'Save'),_0x4cd5f3['on']('submit',(_0x565f11,_0x525d3e)=>{this['fire']('updateComment',this['_model']['id'],_0x525d3e),this['switchToDisplayMode'](),this['focus']();}),_0x4cd5f3['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4cd5f3['once']('editorReady',()=>{_0x4cd5f3['focus']();}),_0x4cd5f3['createEditor'](),_0x4cd5f3['delegate']('editorReady')['to'](this),_0x4cd5f3['delegate']('editorDestroyed')['to'](this),_0x4cd5f3;}['_setupKeyboardNavigation'](){const _0x2ce7e8=this['element'];this['keystrokes']['listenTo'](_0x2ce7e8);for(const _0x4761a2 of this['focusables'])this['focusTracker']['add'](_0x4761a2['element']),this['keystrokes']['listenTo'](_0x4761a2['element']);this['focusables']['on']('change',(_0x47db94,_0x2356e2)=>{for(const _0x3f430 of _0x2356e2['removed'])this['focusTracker']['remove'](_0x3f430['element']),this['keystrokes']['stopListening'](_0x3f430['element']);for(const _0x5a6926 of _0x2356e2['added'])this['focusTracker']['add'](_0x5a6926['element']),this['keystrokes']['listenTo'](_0x5a6926['element']);}),this['keystrokes']['set']('enter',(_0x551279,_0x5aa16e)=>{_0x2ce7e8===_0x551279['target']&&(this['focusCycler']['focusFirst'](),_0x5aa16e());}),this['keystrokes']['set']('esc',(_0x2c40fd,_0x56886e)=>{_0x2ce7e8!==_0x2c40fd['target']&&(this['focus'](),_0x56886e());});}}class _t extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x235450,_0x14f4c6,_0x299fae){super(_0x235450,_0x14f4c6,_0x299fae),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x235450,'Reply...')),this['bind']('authoredAt')['to'](_0x14f4c6),this['bind']('resolvedAt')['to'](_0x14f4c6),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 _0x2ebef2(_0x235450,_0x14f4c6['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x14f4c6,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x4d9e99=this['bindTemplate'],_0x42d6cf=[{'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':_0x4d9e99['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x4d9e99['to']('authoredAt',_0x26bb63=>this['_config']['formatDateTime'](_0x26bb63))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x4d9e99['if']('isEditMode','ck-comment__actions--hidden'),_0x4d9e99['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']&&_0x42d6cf['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x4d9e99['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x4d9e99['if']('isEditMode','ck-comment--edit'),_0x4d9e99['if']('isSystemComment','ck-comment--info'),_0x4d9e99['to']('actionIndicator',_0x290172=>_0x290172?'ck-comment--'+_0x290172:'')],'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':_0x42d6cf}]}]};}['_createEditButton'](){const _0x8e91fd=new _0x5b9b26(this['locale']);return _0x8e91fd['label']=N(this['locale'],'Edit'),_0x8e91fd['icon']=_0x3c2bef,_0x8e91fd['withText']=!0x0,_0x8e91fd['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x8e91fd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4999bb=>!_0x4999bb),_0x8e91fd['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x8e91fd['on']('execute',()=>this['switchToEditMode']()),_0x8e91fd;}['_createRemoveButton'](){const _0x3b8de0=new _0x5b9b26(this['locale']);return _0x3b8de0['label']=N(this['locale'],'Remove'),_0x3b8de0['icon']=_0x987fa5,_0x3b8de0['withText']=!0x0,_0x3b8de0['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x3b8de0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xe1ad4c=>!_0xe1ad4c),_0x3b8de0['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x3b8de0['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x3b8de0;}['_createDropdown'](){const _0x2d66f5=_0x57483d(this['locale'],_0x3ced31),_0x457ec7=_0x2d66f5['panelView']['children'],_0x3ab828=new _0x3f39f9(this['locale']),_0x1c100d=_0x2d66f5['bindTemplate'];_0x2254bc(_0x2d66f5,()=>this['items']['find'](_0x139f7a=>_0x139f7a['isVisible'])),_0x2d66f5['extendTemplate']({'attributes':{'class':[_0x1c100d['if']('isVisible','ck-hidden',_0x116b99=>!_0x116b99)]}});const _0x217ed7=(_0x1a2dac,_0x275e33=-0x1)=>{const _0x17cd0a=new _0x4bb42b(this['locale']);_0x17cd0a['children']['add'](_0x1a2dac);const _0x13e096=_0x275e33>-0x1?_0x275e33:_0x3ab828['items']['length'];_0x3ab828['items']['add'](_0x17cd0a,_0x13e096);const _0x2add63=Array['from'](this['items']);_0x2d66f5['unbind']('isEnabled','isVisible'),_0x2d66f5['bind']('isEnabled')['toMany'](_0x2add63,'isEnabled',(..._0x46404b)=>_0x46404b['some'](_0x280e4f=>_0x280e4f)),_0x2d66f5['bind']('isVisible')['toMany'](_0x2add63,'isVisible',(..._0x57dbfb)=>_0x57dbfb['some'](_0x5a4060=>_0x5a4060));};_0x2d66f5['panelPosition']='sw',_0x2d66f5['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x387aa9});for(const _0x494acd of this['items'])_0x217ed7(_0x494acd);return _0x457ec7['add'](_0x3ab828),_0x2d66f5['listenTo'](this['items'],'add',(_0x39d717,_0x2d7e90,_0x29a490)=>{_0x217ed7(_0x2d7e90,_0x29a490);}),_0x2d66f5['listenTo'](this['items'],'remove',(_0x5d294f,_0x5cd3d6,_0x5650e5)=>{_0x3ab828['items']['remove'](_0x5650e5);}),_0x2d66f5;}['_attachActions'](_0x227ca9,_0x798c2f){const _0x5c7b6f=_0x227ca9&&_0x227ca9['element'];_0x5c7b6f&&(this['listenTo'](_0x5c7b6f,'mouseenter',()=>this['actionIndicator']=_0x798c2f),this['listenTo'](_0x5c7b6f,'focus',()=>this['actionIndicator']=_0x798c2f),this['listenTo'](_0x5c7b6f,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5c7b6f,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x404f6a=super['_createCommentInputView']();return _0x404f6a['bind']('placeholder')['to'](this),_0x404f6a;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Et(_0x382e09){const _0x3fe758=_0xa05dc1(_0x382e09,0x1e),_0x4f4161=new MutationObserver(_0x2bacd7=>{for(const _0x57f768 of _0x2bacd7)('attributes'==_0x57f768['type']&&'class'==_0x57f768['attributeName']||'childList'==_0x57f768['type']||'characterData'==_0x57f768['type'])&&_0x3fe758();});return{'attach'(_0x1bf9b4){_0x4f4161['observe'](_0x1bf9b4,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4f4161['disconnect'](),_0x3fe758['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5e295e,_0x1f09af){super(_0x5e295e),this['id']=_0x546680(),this['focusTracker']=new _0x59f96f(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x358b13,_0x334246)=>this['fire']('Esc',_0x334246)),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']=Et(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x1f09af),this['mainView']=_0x1f09af;const _0x475b38=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x475b38['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 _0x4a1c66=this['element']['clientHeight'];_0x4a1c66&&(this['height']=_0x4a1c66);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1cf973(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x168a33,target:_0x156a8f,type:_0x3ffed9,isVisible:_0x2f1823=!0x0}){super(),this['view']=_0x168a33,this['view']['element']||this['view']['render'](),this['_type']=_0x3ffed9,this['_target']=_0x156a8f,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x28f05f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5817c6,_0x30fc0a)=>{this['view']['focusTracker']['add'](_0x30fc0a);}),this['focusableElements']['on']('remove',(_0x2a2500,_0x2833fb)=>{this['view']['focusTracker']['remove'](_0x2833fb);}),this['set']('isVisible',_0x2f1823);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xf8c9eb=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0xf8c9eb),_0xf8c9eb;}get['targetRect'](){const _0x29777e=this['target'];if(null===_0x29777e)return null;if(_0x29777e instanceof _0xee8513)return _0x29777e;const _0x5d51c9=_0x29777e['filter'](_0x1d6784=>function(_0x5da2c2){const _0x2c5033=_0x5da2c2['offsetParent'];if(_0x2c5033)return!0x0;const _0x41716b=_0x5da2c2['getClientRects']()['item'](0x0);return!!_0x41716b;}(_0x1d6784));return 0x0===_0x5d51c9['length']?null:new _0xee8513(_0x5d51c9[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2cfb17){this['view']['isActive']=_0x2cfb17,this['view']['mainView']['isActive']=_0x2cfb17;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x1ac4cc){if(!(null===_0x1ac4cc||_0x1ac4cc instanceof _0xee8513||Array['isArray'](_0x1ac4cc)&&_0x1ac4cc['every'](_0x5c5803=>fi(_0x5c5803))))throw new _0x4a98c7('annotation-invalid-target',null,{'target':_0x1ac4cc});}['_getNormalizedTarget'](){const _0x33ff94='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x33ff94)?[_0x33ff94]:_0x33ff94;}}function fi(_0x1da829){return null!==_0x1da829&&'object'==typeof _0x1da829&&'nodeType'in _0x1da829&&0x1===_0x1da829['nodeType'];}class S extends _0x28f05f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x46068e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x59f96f(),this['_focusTracker']['on']('change:isFocused',(_0xc683a3,_0x14daad,_0x5f31fd)=>{_0x5f31fd||this['fire']('blur');});for(const _0x3ff3e5 of _0x46068e)this['add'](_0x3ff3e5);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x38ed27){if(this['has'](_0x38ed27))throw new _0x4a98c7('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x38ed27['innerView'],_0x38ed27),this['_viewToAnnotation']['set'](_0x38ed27['view'],_0x38ed27);for(const _0x39c55b of _0x38ed27['focusableElements'])this['_focusTracker']['add'](_0x39c55b);this['listenTo'](_0x38ed27['focusableElements'],'add',(_0x41254b,_0xed2f6f)=>{this['_focusTracker']['add'](_0xed2f6f);}),this['listenTo'](_0x38ed27['focusableElements'],'remove',(_0x4f5f8a,_0x3d808e)=>{this['_focusTracker']['remove'](_0x3d808e);}),this['listenTo'](_0x38ed27['view']['focusTracker'],'change:isFocused',(_0x74ad13,_0x6d18fc,_0x5e0828)=>{_0x5e0828&&this['fire']('focus',_0x38ed27);}),_0x38ed27['updateTargetRect']();const _0x4cf07a=this['_getOrderInContent'](_0x38ed27['view']['targetRect']);return super['add'](_0x38ed27,_0x4cf07a);}['remove'](_0xdf53c){if(!this['has'](_0xdf53c))throw new _0x4a98c7('annotationcollection-not-existing-item',null);this['stopListening'](_0xdf53c['view']['focusTracker']),this['stopListening'](_0xdf53c['focusableElements']);for(const _0x3e762a of _0xdf53c['focusableElements'])this['_focusTracker']['remove'](_0x3e762a);return this['_viewToAnnotation']['delete'](_0xdf53c['view']),this['_innerViewToAnnotation']['delete'](_0xdf53c['innerView']),super['remove'](_0xdf53c);}['getByInnerView'](_0x3efcf8){return this['_innerViewToAnnotation']['get'](_0x3efcf8);}['getByView'](_0x1ca08e){return this['_viewToAnnotation']['get'](_0x1ca08e);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3964d4 of this)_0x3964d4['updateTargetRect']();this['_sort']();}['_sort'](){const _0x5bd95a=Array['from'](this)['sort']((_0x4fa69b,_0x54e5e9)=>w(_0x4fa69b['view']['targetRect'],_0x54e5e9['view']['targetRect']));for(let _0x480b4a=_0x5bd95a['length']-0x1;_0x480b4a>0x0;_0x480b4a--){const _0xa80b19=_0x5bd95a[_0x480b4a];_0x480b4a!==this['getIndex'](_0xa80b19)&&(this['remove'](_0xa80b19),this['add'](_0xa80b19));}}['_getOrderInContent'](_0x5d46f3){let _0x53ff7a=0x0;if(!_0x5d46f3)return this['length'];for(const _0x2d7548 of this){const _0x568bd6=_0x2d7548['view']['targetRect'];if(_0x568bd6){if(w(_0x5d46f3,_0x568bd6)<0x0)return _0x53ff7a;_0x53ff7a++;}}return _0x53ff7a;}}function v({source:_0x2a6896,target:_0x22496c,filter:_0x293e5b}){for(const _0x3f49a2 of _0x2a6896)_0x293e5b(_0x3f49a2)&&_0x22496c['add'](_0x3f49a2);_0x22496c['listenTo'](_0x2a6896,'add',(_0x2d3989,_0x596c18)=>{_0x293e5b(_0x596c18)&&_0x22496c['add'](_0x596c18);}),_0x22496c['listenTo'](_0x2a6896,'remove',(_0x11c9cc,_0x2089ea)=>{_0x22496c['has'](_0x2089ea)&&_0x22496c['remove'](_0x2089ea);});}function w(_0x5ab9e7,_0x44490e){if(null===_0x5ab9e7&&null===_0x44490e)return 0x0;if(null===_0x5ab9e7)return-0x1;if(null===_0x44490e)return 0x1;const _0x3c3d7f=_0x5ab9e7['top']-_0x44490e['top'];return 0x0==_0x3c3d7f?_0x5ab9e7['left']-_0x44490e['left']:_0x3c3d7f;}class y extends _0x50de75{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xd880ed){if(super(_0xd880ed),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xd880ed instanceof _0x31fba6){const _0x31420c=_0xd880ed['locale'];_0xd880ed['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x31420c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x31420c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x31420c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x31420c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x31420c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x31420c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x31420c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1a6f58){this['collection']['add'](_0x1a6f58);}['remove'](_0x3c80e8){this['collection']['remove'](_0x3c80e8),_0x3c80e8['destroy']();}['refreshVisibility'](){for(const _0x4409fb of this['collection'])_0x4409fb['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x42b1f4){return this['collection']['getByInnerView'](_0x42b1f4);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xd44887 of this['collection'])_0xd44887['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x273e7d){this['fire']('_activateAnnotation',_0x273e7d);}['createAnnotation'](_0x3755f4){return new T(_0x3755f4);}['createAnnotationView'](_0x42ff80,_0x3a0044){return new E(_0x42ff80,_0x3a0044);}['_addActiveAnnotation'](_0x10b167){const _0xf4551f=new Set(this['activeAnnotations']);_0xf4551f['add'](_0x10b167),this['activeAnnotations']=_0xf4551f;}['_removeActiveAnnotation'](_0x5680e3){const _0x471ce1=new Set(this['activeAnnotations']);_0x471ce1['delete'](_0x5680e3),this['activeAnnotations']=_0x471ce1;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5332e2=this['collection'],_0x2cbde3=this['_visibleAnnotations'];function _0xa5a7a9(_0x371daa){const _0x7f7899=_0x371daa['source'];_0x7f7899['isVisible']&&!_0x2cbde3['has'](_0x7f7899)?_0x2cbde3['add'](_0x7f7899):!_0x7f7899['isVisible']&&_0x2cbde3['has'](_0x7f7899)&&_0x2cbde3['remove'](_0x7f7899),_0x7f7899['view']['focusTracker']['remove'](_0x7f7899['view']['element']),_0x7f7899['view']['focusTracker']['add'](_0x7f7899['view']['element']);}this['listenTo'](_0x5332e2,'add',(_0x5a73b8,_0x15a6da)=>{_0x15a6da['isVisible']&&_0x2cbde3['add'](_0x15a6da),this['listenTo'](_0x15a6da,'change:isVisible',_0xa5a7a9);}),this['listenTo'](_0x5332e2,'remove',(_0x3007d3,_0x20fe97)=>{_0x2cbde3['has'](_0x20fe97)&&_0x2cbde3['remove'](_0x20fe97),this['stopListening'](_0x20fe97,'change:isVisible',_0xa5a7a9);});}['_setupEnterAnnotationKeystroke'](){const _0x3ef937=_0x4d8bb1=>{_0x4d8bb1['on']('ready',()=>{_0x4d8bb1['keystrokes']['set'](_0x3850a3,(_0x40eb5c,_0x4e21e1)=>{const _0x18fe20=_0x3197a7(this['activeAnnotations']['values']());_0x18fe20&&(_0x18fe20['view']['focus'](),_0x4e21e1());});});};this['context']instanceof _0x31fba6?_0x3ef937(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2b8b0f,_0x24b0ee)=>{_0x3ef937(_0x24b0ee);});}['_setupEscapeAnnotationHandling'](){const _0xffc78c=_0x8bb7a4=>{const _0x150470=_0x8bb7a4['source'],_0x1934f8=[];let _0x5761da;if(Array['isArray'](_0x150470['target'])){_0x5761da=_0x150470['target'][0x0],this['context']instanceof _0x31fba6?_0x1934f8['push'](this['context']):this['context']['editors']&&_0x1934f8['push'](...this['context']['editors']);for(const _0x2d525b of _0x1934f8)for(const _0x1fff46 of _0x2d525b['editing']['view']['domRoots']['values']())if(_0x1fff46['contains'](_0x5761da))return void _0x2d525b['editing']['view']['focus']();_0x5761da['focus']();}};this['listenTo'](this['collection'],'add',(_0x32ae28,_0x5b8360)=>{this['listenTo'](_0x5b8360,'escape',_0xffc78c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0xd65c93,_0x575bbb)=>{this['stopListening'](_0x575bbb,'escape',_0xffc78c);});}}const bt=Symbol('noChannel'),Nt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x50de75{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,pt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5c4cc9){super(_0x5c4cc9),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x411c8e=this['context']['config'];_0x411c8e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x411c8e['define']('comments.maxThreadTotalWeight',0x1f4),_0x411c8e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x411c8e['define']('comments.CommentThreadView',Tt),_0x411c8e['define']('comments.CommentView',_t),_0x411c8e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x6cb60b=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x38adb4,_0x512902)=>this['_addCommentThread'](_0x512902)),this['on']('submitCommentThread',(_0x2dd7aa,_0x1ed199)=>this['_submitCommentThread'](_0x1ed199)),this['on']('resolveCommentThread',(_0x41425c,_0x53faf3)=>this['_resolveCommentThread'](_0x53faf3)),this['on']('resolveCommentThread',(_0x6d323c,_0x1b3747)=>this['_updateActiveAnnotation'](_0x1b3747),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x21c297,_0x1786c3)=>this['_reopenCommentThread'](_0x1786c3)),this['on']('reopenCommentThread',(_0x58c21e,_0x3aed2f)=>this['_updateActiveAnnotation'](_0x3aed2f),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x6a9dde,_0x162c0a)=>this['_removeCommentThread'](_0x162c0a)),this['on']('updateCommentThread',(_0x54a20c,_0x69f43a)=>this['_updateCommentThread'](_0x69f43a)),this['on']('updateCommentThread',(_0x459a70,_0x43814f)=>this['_updateActiveAnnotation'](_0x43814f),{'priority':'lowest'}),this['on']('addComment',(_0x71280,_0x2563c7)=>this['_addComment'](_0x2563c7)),this['on']('updateComment',(_0x1335d4,_0x4938d5)=>this['_updateComment'](_0x4938d5)),this['on']('removeComment',(_0x4c07ab,_0x2031e0)=>this['_removeComment'](_0x2031e0)),this['on']('addComment',(_0x14450a,{threadId:_0x2b35fc,isFromAdapter:_0x33cf79})=>{if(_0x33cf79)return;const _0x2da95f=this['getCommentThread'](_0x2b35fc),_0xf833cf=_0x2da95f&&this['_threadToController']['get'](_0x2da95f);_0xf833cf&&_0xf833cf['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x6cb60b,'change:activeAnnotations',(_0x5ddef3,_0x213713,_0x153f12)=>{const _0x33bb01=Array['from'](_0x153f12)['map'](_0x14d848=>this['_viewToController']['get'](_0x14d848['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x33bb01?_0x33bb01['model']:null;});}set['adapter'](_0x3f32f9){if(this['_adapter'])throw new _0x4a98c7('commentsrepository-adapter-already-set');this['_adapter']=_0x3f32f9;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3ef8a1=bt,threadId:_0x4aff36=_0x546680(),comments:_0xd50b27=[],unlinkedAt:_0x23d10a=null,resolvedAt:_0x3d53d2=null,resolvedBy:_0x1f27c7=null,target:_0x99bcc9=null,context:_0x23b941=null,attributes:_0x50f984={},isResolvable:_0xfbdf87=!0x0,isSubmitted:_0x21692a=!0x1,isFromAdapter:_0x5f4388=!0x1}={}){return this['fire'](xt('addCommentThread',_0x3ef8a1),{'channelId':_0x3ef8a1,'threadId':_0x4aff36,'comments':_0xd50b27,'unlinkedAt':_0x23d10a,'resolvedAt':_0x3d53d2,'resolvedBy':_0x1f27c7,'target':_0x99bcc9,'context':_0x23b941,'attributes':_0x50f984,'isFromAdapter':_0x5f4388,'isResolvable':_0xfbdf87,'isSubmitted':_0x21692a}),this['getCommentThread'](_0x4aff36);}['openNewCommentThread']({channelId:_0x406255=bt,threadId:_0x2fa311=_0x546680(),target:_0x5040b1,context:_0x2da56b=null,isResolvable:_0x417e9a=!0x0}){if(this['_readOnlyChannels']['has'](_0x406255)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5040b1)throw new _0x4a98c7('commentsrepository-missing-target');const _0x3d1b90=this['addCommentThread']({'channelId':_0x406255,'threadId':_0x2fa311,'target':_0x5040b1,'context':_0x2da56b,'isResolvable':_0x417e9a});if(!_0x3d1b90)return null;const _0x4e3632=this['_threadToController']['get'](_0x3d1b90),_0x11ab80=_0x4e3632['view']['commentThreadInputView']['commentInputView'],_0x372225=this['context']['plugins']['get'](y),_0x4503ee=_0x372225['getByInnerView'](_0x4e3632['view']);return _0x372225['activate'](_0x4503ee),_0x11ab80['once']('editorReady',()=>_0x11ab80['focus']()),_0x3d1b90;}['hasCommentThread'](_0x3bf248){if('string'!=typeof _0x3bf248)throw new _0x4a98c7('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3bf248);}['updateCommentThread']({channelId:_0x3d768a=bt,threadId:_0x55b96d,context:_0x43a9f8,unlinkedAt:_0x341603,attributes:_0xe30d79,isFromAdapter:_0x3ec8e9=!0x1}){return this['fire'](xt('updateCommentThread',_0x3d768a),{'channelId':_0x3d768a,'threadId':_0x55b96d,'context':_0x43a9f8,'unlinkedAt':_0x341603,'attributes':_0xe30d79,'isFromAdapter':_0x3ec8e9}),this['getCommentThread'](_0x55b96d);}['getCommentThread'](_0x4d6a69){if('string'!=typeof _0x4d6a69)throw new _0x4a98c7('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4d6a69);}['fetchCommentThread']({channelId:_0x248c16,threadId:_0x2d0f89}={}){const _0x52fbb4=this['getCommentThread'](_0x2d0f89);if(_0x52fbb4)return Promise['resolve'](_0x52fbb4);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4a98c7('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x248c16,'threadId':_0x2d0f89})['then'](_0x253ee6=>this['hasCommentThread'](_0x2d0f89)?this['getCommentThread'](_0x2d0f89):_0x253ee6?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x248c16},_0x253ee6)):void 0x0)['catch'](_0x10173e=>{throw console['error'](_0x10173e),new _0x4a98c7('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x59670c,skipNotAttached:_0x2d8b1a=!0x1,skipEmpty:_0x2903e3=!0x1,toJSON:_0x2f9e68=!0x1}={}){const _0x56f851=[];for(const _0x7a0d84 of this['_threads']['values']())_0x59670c&&_0x7a0d84['channelId']!==_0x59670c||_0x2d8b1a&&!_0x7a0d84['isAttached']||_0x2903e3&&0x0===_0x7a0d84['length']||_0x56f851['push'](_0x7a0d84);return _0x2f9e68?_0x56f851['map'](_0x3e4af4=>_0x3e4af4['toJSON']()):_0x56f851;}['getAnnotationForCommentThread'](_0x499586){const _0x4a429b=this['_threadToController']['get'](_0x499586);if(!_0x4a429b)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x4a429b['view'])||null;}['getCommentThreadForAnnotation'](_0x5d5f4f){const _0x18cba1=this['_viewToController']['get'](_0x5d5f4f['innerView']);return _0x18cba1?_0x18cba1['model']:null;}['setActiveCommentThread'](_0x356c96){const _0x358a32=this['context']['plugins']['get'](y);if(!_0x356c96)return void(this['activeCommentThread']&&_0x358a32['deactivateAll']());const _0x3b68c4=this['getCommentThread'](_0x356c96);if(!_0x3b68c4)throw new _0x4a98c7('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x356c96});if(!this['_threadToController']['has'](_0x3b68c4))throw new _0x4a98c7('commentsrepository-active-not-attached',null,{'threadId':_0x356c96});const _0x11544b=_0x358a32['getByInnerView'](this['_threadToController']['get'](_0x3b68c4)['view']);_0x358a32['activate'](_0x11544b);}['switchReadOnly'](_0x4b6949,_0x4dff8d){_0x4b6949?this['_readOnlyChannels']['add'](_0x4dff8d):this['_readOnlyChannels']['delete'](_0x4dff8d),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x266d75){return this['_readOnlyChannels']['has'](_0x266d75)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x27413d,_0x1d6d06){return new gt(_0x27413d,_0x1d6d06);}['setPermissions'](_0x4866dd,_0x55436a=bt){this['_permissions']['set'](_0x55436a,_0x4866dd),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x877a5f=bt){return this['_permissions']['has'](_0x877a5f)?this['_permissions']['get'](_0x877a5f):Nt;}['_addCommentThread']({channelId:_0x3089b2,threadId:_0x386c16,comments:_0xb8351f,unlinkedAt:_0x271bdd,resolvedAt:_0x312f2b,resolvedBy:_0x34ab0b,target:_0x1db111,context:_0x466585,attributes:_0x1e9fdc,isFromAdapter:_0x9dd1ed,isResolvable:_0x2b5a9a,isSubmitted:_0x52779a}){if('string'!=typeof _0x386c16)throw new _0x4a98c7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x386c16});if(this['hasCommentThread'](_0x386c16))throw new _0x4a98c7('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x386c16});const _0x4cc991=new pi(this,{'channelId':_0x3089b2,'id':_0x386c16,'context':_0x466585,'attributes':_0x1e9fdc,'unlinkedAt':_0x271bdd,'resolvedAt':_0x312f2b,'resolvedBy':_0x34ab0b?this['context']['plugins']['get'](st)['getUser'](_0x34ab0b):null,'isResolvable':_0x2b5a9a,'isSubmitted':_0x52779a||_0x9dd1ed});this['_threads']['set'](_0x386c16,_0x4cc991);for(const _0x137ed7 of _0xb8351f)_0x4cc991['_add'](this['_createNewComment']({'threadId':_0x386c16,..._0x137ed7}));return _0x1db111&&_0x4cc991['attachTo'](_0x1db111),_0x9dd1ed||!_0x4cc991['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3089b2,'threadId':_0x386c16});}['_submitCommentThread']({channelId:_0x148e49,threadId:_0x60c0d0}){if(!this['hasCommentThread'](_0x60c0d0))throw new _0x4a98c7('commentsrepository-missing-comment-thread',this);const _0x467d03=this['getCommentThread'](_0x60c0d0);if(_0x467d03['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x33e753,comments:_0x55a70f,resolvedAt:_0xec453c,resolvedBy:_0xddfd56,context:_0x2cf94c,attributes:_0x200309}=_0x467d03,_0x5b88fa=this['context']['plugins']['get']('PendingActions'),_0x5e76fd=_0x5b88fa['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x148e49,'threadId':_0x33e753,'comments':_0x55a70f['map'](_0x1d92b9=>_0x1d92b9['toJSON']()),'resolvedAt':_0xec453c,'resolvedBy':_0xddfd56?_0xddfd56['id']:_0xddfd56,'context':_0x2cf94c,'attributes':_0x200309})['then'](({comments:_0x5740b1})=>{_0x5b88fa['remove'](_0x5e76fd);for(const _0x561e29 of _0x5740b1)this['_updateComment']({'channelId':_0x148e49,'threadId':_0x60c0d0,'commentId':_0x561e29['commentId'],'createdAt':_0x561e29['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x329b3a=>{throw console['error'](_0x329b3a),new _0x4a98c7('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x19a6c4,target:_0x208959}){const _0x58ebdd=this['getCommentThread'](_0x19a6c4);if(!_0x58ebdd)throw new _0x4a98c7('commentsrepository-attach-missing-comment-thread',this);const _0x1b80d8=this['context']['plugins']['get']('PendingActions'),_0x5eedbf=this['context']['plugins']['get'](y),_0x348a1e=this['_createCommentThreadView'](_0x58ebdd),_0x4a84e3=new gt(_0x58ebdd,_0x348a1e);let _0x489c21=null;_0x348a1e['on']('change:isDirty',(_0x369807,_0x1fa8f9,_0x40de87)=>{_0x40de87?_0x489c21=_0x1b80d8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x489c21&&(_0x1b80d8['remove'](_0x489c21),_0x489c21=null);}),this['_threadToController']['set'](_0x58ebdd,_0x4a84e3),this['_viewToController']['set'](_0x348a1e,_0x4a84e3);const _0x582f15=new E(this['context']['locale'],_0x348a1e);_0x582f15['bind']('length')['to'](_0x348a1e),_0x582f15['bind']('isDirty')['to'](_0x348a1e,'isDirty',_0x348a1e,'length',(_0x44c7fe,_0x30c179)=>_0x44c7fe||!_0x30c179),_0x582f15['bind']('isActive')['to'](_0x348a1e),_0x582f15['type']='comment';const _0x3914d0=new T({'view':_0x582f15,'target':_0x208959,'type':'comment','isVisible':!_0x58ebdd['archivedAt']&&!!('function'==typeof _0x208959?_0x208959():_0x208959)});return _0x348a1e['on']('escape',()=>{_0x3914d0['fire']('escape');}),this['_bindAnnotationToEditors'](_0x348a1e,_0x3914d0),_0x5eedbf['add'](_0x3914d0),_0x3914d0;}['_bindAnnotationToEditors'](_0x590c9b,_0x308929){this['listenTo'](_0x590c9b,'editorReady',(_0x5a83fc,_0xf614f8)=>{const _0x3a0986=_0xf614f8['ui']['view']['body']['bodyCollectionContainer'];_0x308929['focusableElements']['add'](_0x3a0986),this['context']instanceof _0x31fba6&&this['context']['ui']['focusTracker']['add'](_0x3a0986);},{'priority':'highest'}),this['listenTo'](_0x590c9b,'editorDestroyed',(_0x4f7d93,_0x317aaf)=>{const _0x26ef6e=_0x317aaf['ui']['view']['body']['bodyCollectionContainer'];_0x308929['focusableElements']['has'](_0x26ef6e)&&_0x308929['focusableElements']['remove'](_0x26ef6e),this['context']instanceof _0x31fba6&&this['context']['ui']['focusTracker']['remove'](_0x26ef6e);});}['_unbindEditors'](_0x54f7e3){this['stopListening'](_0x54f7e3,'editorReady'),this['stopListening'](_0x54f7e3,'editorDestroyed');}['_createCommentThreadView'](_0x3821f6){const _0x5ed2c1=this['context']['plugins']['get'](st),{config:_0x3f0719,locale:_0x11e612}=this['context'],_0x3a41c9=It(_0x3f0719['get']('locale'),_0x11e612);return new(0x0,(_0x3f0719['get']('comments'))['CommentThreadView'])(_0x11e612,_0x3821f6,_0x5ed2c1['me'],{'editorConfig':{..._0x3f0719['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3f0719['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3f0719['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3f0719['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3f0719['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3a41c9,'CommentView':_0x3f0719['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1d16d8,channelId:_0x3c61a3,resolvedAt:_0x501ed1,resolvedBy:_0x14259b,isFromAdapter:_0x421118}){if(!this['hasCommentThread'](_0x1d16d8))throw new _0x4a98c7('commentsrepository-missing-comment-thread',null,{'threadId':_0x1d16d8});const _0x11b6ac=this['getCommentThread'](_0x1d16d8);if(_0x11b6ac['isResolved'])throw new _0x4a98c7('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1d16d8});const _0x3afb62=this['context']['plugins']['get'](st);if(_0x11b6ac['resolvedBy']=_0x3afb62['getUser'](_0x14259b),_0x11b6ac['resolvedAt']=_0x501ed1,_0x421118||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1a54d7=this['context']['plugins']['get']('PendingActions'),_0x53364f=_0x1a54d7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3c61a3,'threadId':_0x1d16d8})['then'](({resolvedAt:_0xac8560,resolvedBy:_0x4406d1})=>{_0x1a54d7['remove'](_0x53364f),_0x11b6ac['resolvedBy']['id']!==_0x4406d1&&(_0x11b6ac['resolvedBy']=_0x3afb62['getUser'](_0x4406d1)),_0x11b6ac['resolvedAt']=_0xac8560;})['catch'](_0x149b3a=>{throw console['error'](_0x149b3a),new _0x4a98c7('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0xef6a81,channelId:_0x275bef,isFromAdapter:_0xc8486f}){if(!this['hasCommentThread'](_0xef6a81))throw new _0x4a98c7('commentsrepository-missing-comment-thread',null,{'threadId':_0xef6a81});const _0x191fe0=this['getCommentThread'](_0xef6a81);if(!_0x191fe0['isResolved'])throw new _0x4a98c7('commentsrepository-reopen-comment-thread',null,{'threadId':_0xef6a81});if(_0x191fe0['resolvedBy']=null,_0x191fe0['resolvedAt']=null,_0xc8486f||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4c632c=this['context']['plugins']['get']('PendingActions'),_0xb7a86f=_0x4c632c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x275bef,'threadId':_0xef6a81})['then'](()=>_0x4c632c['remove'](_0xb7a86f))['catch'](_0x15584a=>{throw console['error'](_0x15584a),new _0x4a98c7('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3f67a8,isFromAdapter:_0x3188cb}){const _0x58a668=this['getCommentThread'](_0x3f67a8);if(!_0x58a668)throw new _0x4a98c7('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3f67a8),this['_threads']['delete'](_0x3f67a8),!_0x58a668['isSubmitted']||_0x3188cb||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4f4de1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x307e31}=_0x58a668,_0x21cbbf=_0x4f4de1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x307e31,'threadId':_0x3f67a8})['then'](()=>_0x4f4de1['remove'](_0x21cbbf))['catch'](_0x5de986=>{throw console['error'](_0x5de986),new _0x4a98c7('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2db554,unlinkedAt:_0x54cfda,context:_0x134f3b,attributes:_0xf0869e,isFromAdapter:_0x5c0636}){if('string'!=typeof _0x2db554)throw new _0x4a98c7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2db554});if(!this['hasCommentThread'](_0x2db554))throw new _0x4a98c7('commentsrepository-missing-comment-thread',null,{'threadId':_0x2db554});const _0x4b8a95=this['getCommentThread'](_0x2db554);let _0x2ed72e=!0x1;if(void 0x0!==_0x134f3b&&_0x4b8a95['context']!==_0x134f3b&&(_0x4b8a95['context']=_0x134f3b,_0x2ed72e=!0x0),void 0x0!==_0x54cfda&&_0x4b8a95['unlinkedAt']!==_0x54cfda&&(_0x4b8a95['unlinkedAt']=_0x54cfda,_0x2ed72e=!0x0),_0xf0869e&&!yt(_0xf0869e,_0x4b8a95['attributes'])&&(_0x4b8a95['attributes']=_0xf0869e,_0x2ed72e=!0x0),!_0x2ed72e)return Promise['resolve']();if(!_0x4b8a95['isSubmitted']||_0x5c0636||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x26dd93=this['context']['plugins']['get']('PendingActions'),{channelId:_0x498193}=_0x4b8a95,_0x53cc05=_0x26dd93['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x498193,'threadId':_0x2db554,'context':_0x134f3b,'unlinkedAt':_0x54cfda,'attributes':_0xf0869e})['then'](()=>_0x26dd93['remove'](_0x53cc05))['catch'](_0x142726=>{throw console['error'](_0x142726),new _0x4a98c7('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x59cddf){const _0x26276c=this['context']['plugins']['get'](y),_0x4e8f62=this['getCommentThread'](_0x59cddf);if(_0x4e8f62['_isAttached']=!0x1,this['_threadToController']['has'](_0x4e8f62)){const _0xd80ae4=this['_threadToController']['get'](_0x4e8f62),_0x344b51=_0xd80ae4['view'],_0x4b156f=_0x26276c['getByInnerView'](_0x344b51);this['_threadToController']['delete'](_0x4e8f62),this['_viewToController']['delete'](_0x344b51),_0x4b156f&&_0x26276c['remove'](_0x4b156f),_0xd80ae4['destroy'](),_0x344b51['destroy']()['then'](()=>{this['_unbindEditors'](_0x344b51);});}}['_updateActiveAnnotation']({threadId:_0x4db042,resolvedAt:_0x3fad96,unlinkedAt:_0x31bf74}){const _0x36c7cb=!!_0x3fad96,_0x2c14ce=this['context']['plugins']['get'](y),_0x3b7bf0=this['getCommentThread'](_0x4db042);if(this['_threadToController']['has'](_0x3b7bf0)){const _0x351486=this['_threadToController']['get'](_0x3b7bf0)['view'],_0x4f3b74=_0x2c14ce['getByInnerView'](_0x351486);_0x4f3b74&&(_0x36c7cb&&_0x2c14ce['_removeActiveAnnotation'](_0x4f3b74),_0x31bf74?_0x4f3b74['isVisible']=!0x1:_0x4f3b74['refreshVisibility']());}}['_getExternalAuthor'](_0x270129){const _0x49e1f2=this['context']['plugins']['get'](st),_0x438691=wt('external:'+_0x270129),_0x4232a5=_0x49e1f2['getUser'](_0x438691);return _0x4232a5||_0x49e1f2['addUser']({'id':_0x438691,'name':_0x270129});}['_createNewComment']({threadId:_0x288a3c,commentId:_0xfcb7f4=_0x546680(),content:_0xbb2c64,authorId:_0xe341b4,createdAt:_0x3bfd28,attributes:_0x1ff97e}){if('string'!=typeof _0xfcb7f4)throw new _0x4a98c7('commentsrepository-invalid-commentid');if('string'!=typeof _0xe341b4)throw new _0x4a98c7('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xbb2c64||!_0xbb2c64['trim']())throw new _0x4a98c7('commentsrepository-invalid-comment-content');const _0x556f7a=this['context']['plugins']['get'](st)['getUser'](_0xe341b4);if(!_0x556f7a)throw new _0x4a98c7('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xe341b4});let _0x28dea5=null,_0x1cf37d=_0x3bfd28;return _0x1ff97e?.['@external']&&(_0x28dea5=this['_getExternalAuthor'](_0x1ff97e['@external']['authorName']),_0x1cf37d=new Date(_0x1ff97e['@external']['createdAt'])),new wi(this,{'threadId':_0x288a3c,'id':_0xfcb7f4,'author':_0x28dea5||_0x556f7a,'creator':_0x556f7a,'content':_0xbb2c64,'createdAt':_0x3bfd28,'authoredAt':_0x1cf37d,'attributes':_0x1ff97e});}['_addComment'](_0x104a2e){let {threadId:_0x427d2d,content:_0x3e73d9,attributes:_0x502ebd,isFromAdapter:_0x33eff1}=_0x104a2e;const _0x1b1902=this['getCommentThread'](_0x104a2e['threadId']);if(!_0x1b1902)throw new _0x4a98c7('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4cc17e=this['_createNewComment'](_0x104a2e),{id:_0x3607d9}=_0x4cc17e;if(_0x1b1902['_add'](_0x4cc17e),_0x33eff1||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1b1902['isSubmitted'])return Promise['resolve']();const _0x3a1968=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3bcf7a}=_0x1b1902,_0x315ead=_0x3a1968['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x502ebd||(_0x502ebd={}),this['adapter']['addComment']({'channelId':_0x3bcf7a,'threadId':_0x427d2d,'commentId':_0x3607d9,'content':_0x3e73d9,'attributes':_0x502ebd})['then'](_0x16d8af=>{_0x3a1968['remove'](_0x315ead),_0x16d8af&&this['_updateComment']({'channelId':_0x3bcf7a,'threadId':_0x427d2d,'commentId':_0x3607d9,'createdAt':_0x16d8af['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5dd69d=>{throw console['error'](_0x5dd69d),new _0x4a98c7('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x37f61b,commentId:_0x52f227,content:_0xa89a95,createdAt:_0x569169,attributes:_0x5efefe,isFromAdapter:_0x37d20f}){if(void 0x0!==_0xa89a95&&('string'!=typeof _0xa89a95||!_0xa89a95['trim']()['length']))throw new _0x4a98c7('commentsrepository-update-comment-invalid-content');const _0x32fbac=this['getCommentThread'](_0x37f61b),_0x38ddd5=_0x32fbac['getComment'](_0x52f227);if(!_0x38ddd5)throw new _0x4a98c7('commentsrepository-update-missing-comment',this);let _0x53c815=!0x1;if(_0xa89a95&&_0xa89a95!==_0x38ddd5['content']&&(_0x38ddd5['isEditable']||_0x37d20f)&&(_0x38ddd5['content']=_0xa89a95,_0x53c815=!0x0),_0x569169&&_0x569169!==_0x38ddd5['createdAt']&&(_0x38ddd5['createdAt']=_0x569169,_0x38ddd5['attributes']&&_0x38ddd5['attributes']['@external']||(_0x38ddd5['authoredAt']=_0x569169),_0x53c815=!0x0),_0x5efefe&&!yt(_0x5efefe,_0x38ddd5['attributes'])&&(_0x38ddd5['attributes']=_0x5efefe,_0x53c815=!0x0),!_0x53c815)return Promise['resolve']();if(_0x32fbac['fire']('commentUpdated'),_0x37d20f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2d7c5d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2af0f4}=this['getCommentThread'](_0x38ddd5['threadId']),_0x5b70d0=_0x2d7c5d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2af0f4,'threadId':_0x37f61b,'commentId':_0x52f227,'content':_0xa89a95,'attributes':_0x5efefe})['then'](()=>_0x2d7c5d['remove'](_0x5b70d0))['catch'](_0x520f21=>{throw console['error'](_0x520f21),new _0x4a98c7('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1bb7e2,commentId:_0x1333d9,isFromAdapter:_0x2ba13f}){const _0x1cd871=this['getCommentThread'](_0x1bb7e2),_0x6c3bcd=_0x1cd871['getComment'](_0x1333d9);if(!_0x6c3bcd)throw new _0x4a98c7('commentsrepository-remove-missing-comment',this);if(_0x1cd871['_remove'](_0x6c3bcd),_0x2ba13f||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2a9cb3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x479a88}=_0x1cd871,_0x45b80f=_0x2a9cb3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x479a88,'threadId':_0x1bb7e2,'commentId':_0x1333d9})['then'](()=>_0x2a9cb3['remove'](_0x45b80f))['catch'](_0x289f7e=>{throw console['error'](_0x289f7e),new _0x4a98c7('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1cf973(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0xce1f16,_0x587cc6){super();const _0x437110=_0x587cc6['isResolvable'];this['channelId']=_0x587cc6['channelId'],this['id']=_0x587cc6['id'],this['comments']=new _0x28f05f(),this['_repository']=_0xce1f16,this['_isAttached']=!0x1,this['_isSubmitted']=_0x587cc6['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0xce1f16,'_permissions',_0xce1f16,'_readOnlyChannels',()=>_0xce1f16['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0xce1f16,'_permissions',()=>_0xce1f16['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0xce1f16,'_permissions',()=>{const _0x4a191f=_0xce1f16['getPermissions'](this['channelId']);return _0x4a191f['write']||_0x4a191f['admin'];}),this['bind']('isResolvable')['to'](_0xce1f16,'_permissions',()=>_0x437110&&_0xce1f16['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x587cc6['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5093e4,_0x3c6d06)=>_0x5093e4?_0x3c6d06?_0x5093e4<_0x3c6d06?_0x5093e4:_0x3c6d06:_0x5093e4:_0x3c6d06),this['set']('unlinkedAt',_0x587cc6['unlinkedAt']||null),this['set']('resolvedAt',_0x587cc6['resolvedAt']||null),this['set']('resolvedBy',_0x587cc6['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x53ea89=>!!_0x53ea89),this['set']('attributes',_0x587cc6['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x4b4ecc,_0x2d65ef)=>_0x4b4ecc+_0x2d65ef['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x25f28b,id:_0x1dc43d}=this;this['_repository']['fire'](xt('submitCommentThread',_0x25f28b),{'channelId':_0x25f28b,'threadId':_0x1dc43d});}['setUnlinkedAt'](_0x572641){this['_update']({'unlinkedAt':_0x572641});}['resolve']({resolvedAt:_0x54fef7=new Date(),resolvedBy:_0x39f3da='',isFromAdapter:_0x36d10a=!0x1}={}){const _0x2b24e3=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x5ece3b,id:_0xdafe12}=this;this['_repository']['fire'](xt('resolveCommentThread',_0x5ece3b),{'channelId':_0x5ece3b,'threadId':_0xdafe12,'resolvedAt':_0x54fef7,'resolvedBy':_0x39f3da||_0x2b24e3['id'],'isFromAdapter':_0x36d10a});}['reopen']({isFromAdapter:_0xae8004=!0x1}={}){const {channelId:_0x2af833,id:_0x182ad3}=this;this['_repository']['fire'](xt('reopenCommentThread',_0x2af833),{'channelId':_0x2af833,'threadId':_0x182ad3,'isFromAdapter':_0xae8004});}['setContext'](_0x16f384){this['context']||this['_update']({'context':_0x16f384});}['setAttribute'](_0x27f301,_0x1c164e){const _0x2a6083=At(this['attributes']);Ct(_0x2a6083,_0x27f301,_0x1c164e),this['_update']({'attributes':_0x2a6083});}['removeAttribute'](_0x1146b3){const _0x4c455b=At(this['attributes']);vt(_0x4c455b,_0x1146b3),this['_update']({'attributes':_0x4c455b});}['remove']({isFromAdapter:_0x149e92=!0x1}={}){const {channelId:_0x33e1ec,id:_0x5b2f53}=this;this['_repository']['fire'](xt('removeCommentThread',_0x33e1ec),{'channelId':_0x33e1ec,'threadId':_0x5b2f53,'isFromAdapter':_0x149e92});}['attachTo'](_0x1aecd5){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x1aecd5});}['addComment'](_0x161e90){const {channelId:_0x4e0383,id:_0x208f18}=this;this['_repository']['fire'](xt('addComment',_0x4e0383,_0x208f18),Object['assign']({'channelId':_0x4e0383,'threadId':_0x208f18},_0x161e90));}['getComment'](_0x5578f9){if('string'!=typeof _0x5578f9)throw new _0x4a98c7('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5578f9});return this['comments']['get'](_0x5578f9);}['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'](_0x6befde=>_0x6befde['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2fff1f){return this['listenTo'](_0x2fff1f,'change:authoredAt',()=>{const _0x4dc2bf=this['_findOptimalIndex'](_0x2fff1f),_0x46a182=this['comments'];_0x4dc2bf-0x1!=_0x46a182['getIndex'](_0x2fff1f)&&_0x4dc2bf+0x1!=_0x46a182['getIndex'](_0x2fff1f)&&(this['_remove'](_0x2fff1f),this['_add'](_0x2fff1f));}),this['comments']['add'](_0x2fff1f,this['_findOptimalIndex'](_0x2fff1f));}['_update'](_0x1713c2){const {channelId:_0x594f8c,id:_0x2d2be0}=this;this['_repository']['fire'](xt('updateCommentThread',_0x594f8c),{..._0x1713c2,'channelId':_0x594f8c,'threadId':_0x2d2be0});}['_remove'](_0x3786d8){return this['stopListening'](_0x3786d8),_0x3786d8['destroy'](),this['comments']['remove'](_0x3786d8);}['_findOptimalIndex'](_0x35dc25){const _0x408be9=this['comments']['find'](_0x4ba951=>new Date(_0x4ba951['authoredAt'])['getTime']()>new Date(_0x35dc25['authoredAt'])['getTime']());return _0x408be9?this['comments']['getIndex'](_0x408be9):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1cf973(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0xf52fae,_0x6cc654){super();const _0x4bcc44=_0xf52fae['context']['plugins']['get'](st)['me'],_0x46b6ff=_0xf52fae['getCommentThread'](_0x6cc654['threadId']),_0x30a5f0=0x0===_0x46b6ff['comments']['length'],_0x464c32=_0x4bcc44===_0x6cc654['author'];this['id']=_0x6cc654['id'],this['threadId']=_0x6cc654['threadId'],this['author']=_0x6cc654['author'],this['creator']=_0x6cc654['creator'],this['isExternal']=Boolean(_0x6cc654['attributes']&&_0x6cc654['attributes']['@external']),this['set']('content',_0x6cc654['content']),this['createdAt']=_0x6cc654['createdAt']||new Date(),this['set']('authoredAt',_0x6cc654['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x46b6ff,'resolvedAt'),this['set']('attributes',_0x6cc654['attributes']||{}),this['bind']('isEditable')['to'](_0xf52fae,'_permissions',()=>{const _0x1274f0=_0xf52fae['getPermissions'](_0x46b6ff['channelId'])['write'],_0x19e059=_0xf52fae['getPermissions'](_0x46b6ff['channelId'])['modifyAll'];return _0x464c32&&_0x1274f0||!_0x464c32&&_0x19e059;}),this['bind']('isRemovable')['to'](_0x46b6ff,'isRemovable',_0xf52fae,'_permissions',_0x18ce81=>{const _0x273de3=_0xf52fae['getPermissions'](_0x46b6ff['channelId'])['write'],_0x4d1294=_0xf52fae['getPermissions'](_0x46b6ff['channelId'])['modifyAll'];return _0x464c32&&_0x273de3||_0x18ce81&&_0x30a5f0||!_0x464c32&&_0x4d1294&&!_0x30a5f0;}),this['bind']('isReadOnly')['to'](_0x46b6ff,'isReadOnly'),this['_repository']=_0xf52fae;}get['weight'](){return Math['max'](function(_0x321fc5){const _0x21f630=document['createElement']('div');return _0x21f630['innerHTML']=_0x321fc5,_0x21f630['textContent']['length'];}(this['content']),0xc8);}['update'](_0x34e271){const {threadId:_0x519d04,id:_0x4721bf}=this;if(!this['_repository']['hasCommentThread'](_0x519d04))throw new _0x4a98c7('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x48c68b}=this['_repository']['getCommentThread'](_0x519d04);this['_repository']['fire'](xt('updateComment',_0x48c68b,_0x519d04),{'channelId':_0x48c68b,'threadId':_0x519d04,'commentId':_0x4721bf,..._0x34e271});}['setAttribute'](_0x4bd4f1,_0x5a1b82){const _0xd69070=At(this['attributes']);Ct(_0xd69070,_0x4bd4f1,_0x5a1b82),this['update']({'attributes':_0xd69070});}['removeAttribute'](_0x5258c0){const _0x4d9422=At(this['attributes']);vt(_0x4d9422,_0x5258c0),this['update']({'attributes':_0x4d9422});}['remove'](_0x86d0ce={}){if(!_0x86d0ce['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3f7f1b,id:_0x423789}=this;if(!this['_repository']['hasCommentThread'](_0x3f7f1b))throw new _0x4a98c7('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1b712b}=this['_repository']['getCommentThread'](_0x3f7f1b);this['_repository']['fire'](xt('removeComment',_0x1b712b,_0x3f7f1b),{'channelId':_0x1b712b,'threadId':_0x3f7f1b,'commentId':_0x423789,..._0x86d0ce});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x3359f5,..._0xb115d){for(const _0x2f60c6 of _0xb115d)void 0x0!==_0x2f60c6&&(_0x3359f5+=':'+String(_0x2f60c6));return _0x3359f5;}class rt extends _0x309e95{constructor(_0x5041f5){super(_0x5041f5),this['set']('hasContent',!0x1);}['refresh'](){const _0x2a4753=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5b2cca of _0x2a4753['getRanges']())if(this['_hasContent'](_0x5b2cca))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x4f8c33=_0x546680(),ranges:_0x23947a,comment:_0x31fea2}={}){const _0x2ac588=this['editor']['model'],_0x48a4bb=_0x23947a??Array['from'](_0x2ac588['document']['selection']['getRanges']()),_0x1d2bf3=[];for(const _0x4dbb89 of _0x48a4bb)this['_hasContent'](_0x4dbb89)&&_0x1d2bf3['push'](this['_trimToContent'](_0x4dbb89));if(!_0x1d2bf3['length'])throw new _0x4a98c7('addcommentthreadcommand-incorrect-ranges',null);_0x31fea2&&this['_createCommentThread'](_0x4f8c33,_0x31fea2),this['_createMarkersFromRanges'](_0x4f8c33,_0x1d2bf3,!!_0x31fea2);}['_createMarkersFromRanges'](_0x226743,_0x260229,_0x5633d7){this['editor']['model']['change'](_0xb6924a=>{for(const _0x594f4a of _0x260229){const _0x21794c=_0x546680()['substr'](0x1,0x5),_0x36ee52='comment:'+_0x226743+':'+_0x21794c;_0xb6924a['addMarker'](_0x36ee52,{'range':_0x594f4a,'usingOperation':_0x5633d7,'affectsData':_0x5633d7});}});}['_createCommentThread'](_0x2e422c,_0x4282d9){const _0x3c9bd7=this['editor']['plugins']['get']('CommentsRepository'),_0x17272c=this['editor']['config']['get']('collaboration.channelId'),_0x169a3c=this['editor']['plugins']['get']('Users')['me'];if(!_0x169a3c)throw new _0x4a98c7('addcommentthreadcommand-user-not-found',null);_0x3c9bd7['addCommentThread']({'threadId':_0x2e422c,'channelId':_0x17272c,'comments':[{'authorId':_0x169a3c['id'],'content':_0x4282d9,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3c0c5d){for(const _0x1c209f of _0x3c0c5d['getItems']())if(this['_itemIsContent'](_0x1c209f))return!0x0;return!0x1;}['_itemIsContent'](_0x5cec32){return _0x5cec32['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5cec32)&&!_0x5cec32['is']('element','tableCell');}['_trimToContent'](_0x9275e1){const _0x20e089=_0x1ba61b=>!this['_itemIsContent'](_0x1ba61b['item']),_0x4fa8ba=_0x9275e1['start']['getLastMatchingPosition'](_0x20e089),_0x516117=_0x9275e1['end']['getLastMatchingPosition'](_0x20e089,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4fa8ba,_0x516117);}}class b extends _0x1ca286{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4372b8){super(_0x4372b8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2d8847=this['editor'],_0x4bb740=_0x2d8847['model']['document']['selection'],_0x4c8e5d=_0x3eac1b(()=>this['refreshSelectedViews'](),0xa);_0x4bb740['on']('change:range',(_0x250d6f,_0x142196)=>{_0x142196['directChange']&&(_0x4c8e5d['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2d8847['editing']['view']['document'],'change:isFocused',(_0x4ebb59,_0x3c8f25,_0x95d1f5)=>{_0x95d1f5&&_0x4c8e5d();}),this['listenTo'](_0x2d8847['ui']['focusTracker'],'change:isFocused',(_0x4eb384,_0x587409,_0x1b304d)=>{_0x1b304d||this['fire']('blur',{'isAnnotationTracked':_0x42dc05=>this['_editorAnnotationsData']['has'](_0x42dc05['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4cb30e){if(this['_editorAnnotations']['has'](_0x4cb30e['view']))return;this['_editorAnnotations']['add'](_0x4cb30e['view']),this['editor']['ui']['focusTracker']['add'](_0x4cb30e['view']['element']);const _0x5845f3=this['editor']['plugins']['get'](y);this['listenTo'](_0x5845f3['collection'],'remove',(_0x1f7e05,_0x1b20ce)=>{this['editor']['ui']['focusTracker']['remove'](_0x1b20ce['view']['element']),this['_editorAnnotations']['delete'](_0x1b20ce['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x44c2c0){if('function'!=typeof _0x44c2c0)throw new _0x4a98c7('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x44c2c0);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x11e249,annotations:_0x4f9e93}){const _0x3016c=[],_0x262d4c=this['editor']['model']['document']['selection'],_0x2932e3=Array['from'](_0x262d4c['getRanges']());for(const [_0x1185dc,_0x5c8b38]of this['_editorAnnotationsData']){const _0x513768=_0x1094be(_0x5c8b38),_0x5e2546=_0x4f9e93['getByInnerView'](_0x1185dc);_0x513768&&_0x5e2546&&_0x3016c['push']({'annotation':_0x5e2546,'range':_0x513768});}function _0x1094be(_0x10e73e){for(const _0x2c6b6d of _0x10e73e)for(const _0x1d8638 of _0x2932e3)if(_0x2c6b6d['containsRange'](_0x1d8638,!_0x262d4c['isCollapsed']))return _0x2c6b6d;return null;}return _0x3016c['sort']((_0x1a7e14,_0x197e91)=>{const _0x30e4e7=_0x1a7e14['range'],_0x171cc3=_0x197e91['range'];if(!_0x30e4e7['isEqual'](_0x171cc3)){if(_0x30e4e7['containsRange'](_0x171cc3,!0x0))return 0x1;if(_0x171cc3['containsRange'](_0x30e4e7,!0x0))return-0x1;}return _0x1a7e14['annotation']==_0x11e249?-0x1:_0x197e91['annotation']==_0x11e249?0x1:0x0;})['map'](_0x14275e=>_0x14275e['annotation']);}get['_editorAnnotationsData'](){const _0x55bb79=new Map();for(const _0x468da2 of Array['from'](this['_dataCollectors']))for(const [_0x11819c,_0x2cd78c]of _0x468da2())_0x55bb79['set'](_0x11819c,_0x2cd78c);return _0x55bb79;}}class ct extends _0x1ca286{['afterInit'](){const _0x2cdec0=this['editor'];if(!_0x2cdec0['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2cdec0['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x1ca286{constructor(_0x4c1758){super(_0x4c1758),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1b95dd=this['editor'],_0x578d43=_0x1b95dd['commands']['get']('importWord'),_0x3f5291=_0x1b95dd['plugins']['get'](st);_0x578d43&&(_0x578d43['on']('execute',(_0x5eaf7a,[,_0x532ce8])=>{_0x532ce8['collaboration_features']={'comments':!0x0,'user_id':_0x3f5291['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x578d43,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x7bca4f,_0x56d73){const {comment_threads:_0xc1c87f}=_0x56d73;_0xc1c87f&&_0xc1c87f['forEach'](({thread_id:_0x1a3441,comments:_0x3a12fb,is_resolved:_0x258fbc})=>{const _0x121f05=new Date(),_0x426766=_0x3a12fb['map'](({author:_0x3805ce,content:_0x394f17,created_at:_0x4e6282})=>({'content':_0x394f17,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x121f05,'attributes':{'@external':{'authorName':_0x3805ce,'createdAt':_0x4e6282?new Date(_0x4e6282):new Date(),'source':'importWord'}}})),_0xe804bd=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xe804bd,'threadId':_0x1a3441,'comments':_0x426766,'resolvedAt':_0x258fbc?_0x121f05:null});});}}class ut extends _0x1ca286{constructor(_0x3e90c6){super(_0x3e90c6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x59041b=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x59041b,'contentInsertion',(_0x509fdf,_0x25898b)=>this['_removeMarkersWithoutThreads'](_0x25898b['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1844d2){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1844d2;const _0x47a569=this['editor']['plugins']['get']('CommentsRepository');for(const _0xd36761 of _0x1844d2['keys']()){const [_0x4e9d98,_0x158e35]=_0xd36761['split'](':');'comment'!=_0x4e9d98||_0x47a569['hasCommentThread'](_0x158e35)||_0x1844d2['delete'](_0xd36761);}return _0x1844d2;}['_registerMarkerInClipboardPipeline'](){const _0xb5f53a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xdd08a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xdd08a&&_0xb5f53a['_registerMarkerToCopy']('comment',_0xdd08a);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1f7757){switch(_0x1f7757){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function dt(_0x24fdbe){const _0x210631=_0x24fdbe['split'](':');return{'group':_0x210631[0x0],'id':_0x210631[0x1],'part':_0x210631[0x2]};}class ft extends _0x1ca286{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2c1f4c,_0x5b98f1)=>{if(!_0x5b98f1['options']['showCommentHighlights'])return null;if(_0x5b98f1['options']['ignoreResolvedComments']){const {id:_0x3a4f62}=dt(_0x2c1f4c['markerName']),_0x14c5ce=this['editor']['plugins']['get'](o);if(_0x14c5ce['getCommentThread'](_0x3a4f62)?.['isResolved']&&_0x2c1f4c['item'])return _0x5b98f1['consumable']['consume'](_0x2c1f4c['item'],'addMarker:'+_0x2c1f4c['markerName']),_0x5b98f1['consumable']['consume'](_0x2c1f4c['item'],'removeMarker:'+_0x2c1f4c['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2f5b69=>{_0x2f5b69['on']('addMarker:comment',(_0x4a0f32,_0x2e6388,_0x311ec2)=>{if(!_0x311ec2['options']['showCommentHighlights'])return;const _0x6c33ad=_0x2e6388['item'];if(!_0x6c33ad)return;const _0x36c6c6=_0x311ec2['mapper']['toViewElement'](_0x6c33ad);this['editor']['model']['schema']['isObject'](_0x6c33ad)&&_0x36c6c6&&!_0x36c6c6['getCustomProperty']('widget')&&_0x36c6c6['is']('containerElement')&&_0x21c384(_0x36c6c6,_0x311ec2['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x925b2c,{writer:_0xcbe1db,options:_0x59d8d4})=>{if(!_0x59d8d4['showCommentHighlights'])return null;const _0x32ad8f=_0xcbe1db['createContainerElement']('div'),_0x3747c9=_0xcbe1db['createEmptyElement']('hr');return _0xcbe1db['addClass']('ck-horizontal-line',_0x32ad8f),_0xcbe1db['insert'](_0xcbe1db['createPositionAt'](_0x32ad8f,0x0),_0x3747c9),_0x32ad8f;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x314a3e,{writer:_0x197a64,options:_0x335b21})=>{if(!_0x335b21['showCommentHighlights'])return null;const _0x17ae09=_0x197a64['createContainerElement']('span'),_0x1e7d65=_0x197a64['createEmptyElement']('img');return _0x197a64['addClass']('image-inline',_0x17ae09),_0x197a64['insert'](_0x197a64['createPositionAt'](_0x17ae09,0x0),_0x1e7d65),_0x17ae09;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x13a7ad,{writer:_0x64b40e,options:_0x39ccfd})=>{if(_0x39ccfd['showCommentHighlights'])return _0x64b40e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3ed5b4,_0x3c4709,_0x342495)=>{_0x342495['options']['showCommentHighlights']&&_0x3ed5b4['stop']();},{'priority':'high'});}}class r extends _0x1ca286{static get['requires'](){return[o,b,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53551d){super(_0x53551d),this['set']('isThreadsLoadingPaused',!0x0),_0x53551d['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x20f4cf,_0x1bb409,_0x4d0580,_0x580cf4)=>{const _0x1b1f4d=_0x53551d['plugins']['get'](o),_0x4194db=_0x4d0580?dt(_0x4d0580)['id']:null;_0x53551d['model']['change'](()=>{if(_0x4194db){const _0x18a92f=this['getAllMarkersForId'](_0x4194db);for(const _0x5f1bda of _0x18a92f)_0x53551d['editing']['reconvertMarker'](_0x5f1bda);}if(_0x580cf4){const {id:_0x1ec653}=dt(_0x580cf4),_0x1d34de=_0x1b1f4d['getCommentThread'](_0x1ec653);if(_0x1d34de&&_0x1d34de['unlinkedAt'])return;if(_0x1d34de&&!_0x1d34de['isAttached'])return;const _0x18b8bb=this['getAllMarkersForId'](_0x1ec653);for(const _0x51b8e4 of _0x18b8bb)_0x53551d['editing']['reconvertMarker'](_0x51b8e4);}}),_0x4194db&&this['scrollToThreadMarker'](_0x4194db);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3e3738=this['editor'],_0x283f81=_0x3e3738['plugins']['get'](o),_0x7eb627=_0x3e3738['config']['get']('collaboration.channelId'),_0x185936=_0x283f81['getCommentThreads']()['filter'](_0x3a18a8=>_0x3a18a8['channelId']!==_0x7eb627);_0x3e3738['commands']['add']('addCommentThread',new rt(_0x3e3738)),this['listenTo'](_0x3e3738,'change:isReadOnly',(_0x13803a,_0x1b4d8f,_0x264a28)=>{_0x283f81['switchReadOnly'](_0x264a28,_0x3e3738['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x283f81,ht('addCommentThread',_0x7eb627),(_0x33706e,{threadId:_0x2a492e})=>{const _0x3329e8=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2a492e);_0x3329e8?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2a492e);}),this['listenTo'](_0x283f81,ht('removeCommentThread',_0x7eb627),(_0x23b609,{threadId:_0x359d00})=>{_0x3e3738['model']['enqueueChange']({'isUndoable':!0x1},_0x50ecb6=>{const _0x23545a=this['getAllMarkersForId'](_0x359d00);for(const _0x532b81 of _0x23545a)_0x50ecb6['removeMarker'](_0x532b81);});}),this['listenTo'](_0x283f81,ht('resolveCommentThread',_0x7eb627),(_0x74c0d5,{threadId:_0x29ea49})=>{(this['_reconvertMarkers'](_0x29ea49),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x29ea49)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x283f81,ht('reopenCommentThread',_0x7eb627),(_0x56613d,{threadId:_0x356b05})=>{this['_reconvertMarkers'](_0x356b05);},{'priority':'low'}),this['listenTo'](_0x283f81,ht('addComment',_0x7eb627),(_0x2123fe,{threadId:_0x4e8f80,isFromAdapter:_0x24f4c3})=>{const _0x4bbdf7=this['getAllMarkersForId'](_0x4e8f80);if(_0x24f4c3||0x0==_0x4bbdf7['length']||!_0x283f81['hasCommentThread'](_0x4e8f80))return;0x1===_0x283f81['getCommentThread'](_0x4e8f80)['length']&&_0x3e3738['model']['enqueueChange']({'isUndoable':!0x1},_0x23eef7=>{for(const _0x3c9a60 of _0x4bbdf7)_0x23eef7['updateMarker'](_0x3c9a60,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x185936);}['afterInit'](){!async function(_0x24aeb2){const _0x2262f4=_0x41a7bf([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]),_0x2465ba=0x73460ab3,_0x87bee2=0x73417efb^_0x2465ba,_0x3d4f38=window[_0x41a7bf([0x44,0x61,0x74,0x65])][_0x41a7bf([0x6e,0x6f,0x77])](),_0x4904c3=_0x24aeb2[_0x41a7bf([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4eb6b1=new window[(_0x41a7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42cb92=>{_0x4904c3[_0x41a7bf([0x6f,0x6e,0x63,0x65])](_0x41a7bf([0x72,0x65,0x61,0x64,0x79]),_0x42cb92);}),_0x4ea138={[_0x41a7bf([0x6b,0x74,0x79])]:_0x41a7bf([0x45,0x43]),[_0x41a7bf([0x75,0x73,0x65])]:_0x41a7bf([0x73,0x69,0x67]),[_0x41a7bf([0x63,0x72,0x76])]:_0x41a7bf([0x50,0x2d,0x32,0x35,0x36]),[_0x41a7bf([0x78])]:_0x41a7bf([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]),[_0x41a7bf([0x79])]:_0x41a7bf([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]),[_0x41a7bf([0x61,0x6c,0x67])]:_0x41a7bf([0x45,0x53,0x32,0x35,0x36])},_0x5e4bdf=_0x4904c3[_0x41a7bf([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x41a7bf([0x67,0x65,0x74])](_0x41a7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2f369c(){let _0x1511f0,_0x53aca3=null,_0x51592d=null;try{if(_0x5e4bdf==_0x41a7bf([0x47,0x50,0x4c]))return _0x41a7bf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1511f0=_0x4113a1(),!_0x1511f0)return _0x41a7bf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1511f0[_0x41a7bf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x51592d=_0x4174da(_0x1511f0[_0x41a7bf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1511f0[_0x41a7bf([0x6a,0x74,0x69])])),await _0x320818()?_0x5ea3ce()?_0x327041()?_0x41a7bf([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2ef584()?(_0x1511f0[_0x41a7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41a7bf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x53aca3=_0x277d49(_0x41a7bf([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1511f0[_0x41a7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x41a7bf([0x74,0x72,0x69,0x61,0x6c])&&(_0x53aca3=_0x277d49(_0x41a7bf([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1eed43()):_0x41a7bf([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x41a7bf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x41a7bf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x41a7bf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x327041(){const _0x2d14f0=[_0x41a7bf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x41a7bf([0x74,0x72,0x69,0x61,0x6c])][_0x41a7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1511f0[_0x41a7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3d4f38/0x3e8:0xe10*_0x87bee2;return _0x1511f0[_0x41a7bf([0x65,0x78,0x70])]<_0x2d14f0;}function _0x5ea3ce(){const _0x513e25=_0x1511f0[_0x41a7bf([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x513e25)return!0x1;if(_0x513e25[_0x41a7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41a7bf([0x2a])))return!0x0;if(_0x513e25[_0x41a7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41a7bf([0x43,0x4d,0x54])))return!0x0;if(_0x513e25[_0x41a7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41a7bf([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x195d4a())return!0x0;if(_0x513e25[_0x41a7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41a7bf([0x52,0x43,0x4d,0x54]))){if(_0x1b17b5())return!0x0;if(_0x3cf824()||_0x1f8498())return!0x0;}return!0x1;}function _0x2ef584(){const _0x2eb8ee=_0x1511f0[_0x41a7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2eb8ee||0x0==_0x2eb8ee[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4e4f25}=new URL(window[_0x41a7bf([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2eb8ee[_0x41a7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e4f25))return!0x0;const _0x269e1e=_0x4e4f25[_0x41a7bf([0x73,0x70,0x6c,0x69,0x74])](_0x41a7bf([0x2e]));return _0x2eb8ee[_0x41a7bf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3100f0=>_0x3100f0[_0x41a7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x41a7bf([0x2a])))[_0x41a7bf([0x6d,0x61,0x70])](_0x2e5c61=>_0x2e5c61[_0x41a7bf([0x73,0x70,0x6c,0x69,0x74])](_0x41a7bf([0x2e])))[_0x41a7bf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5759f9=>_0x5759f9[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x269e1e[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41a7bf([0x6d,0x61,0x70])](_0x303f32=>Array(_0x269e1e[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x303f32[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x41a7bf([0x66,0x69,0x6c,0x6c])](_0x303f32[0x0]===_0x41a7bf([0x2a])?_0x41a7bf([0x2a]):'')[_0x41a7bf([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x303f32))[_0x41a7bf([0x73,0x6f,0x6d,0x65])](_0x5cd352=>_0x269e1e[_0x41a7bf([0x65,0x76,0x65,0x72,0x79])]((_0x376d51,_0x52fc1a)=>_0x5cd352[_0x52fc1a]===_0x376d51||_0x5cd352[_0x52fc1a]===_0x41a7bf([0x2a])));}function _0x1eed43(){return _0x53aca3&&_0x51592d?new window[(_0x41a7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xd3688c,_0x3c6f08)=>{_0x53aca3[_0x41a7bf([0x74,0x68,0x65,0x6e])](_0xd3688c,_0x3c6f08),_0x51592d[_0x41a7bf([0x74,0x68,0x65,0x6e])](_0x3b4f54=>{_0x3b4f54!=_0x41a7bf([0x56,0x61,0x6c,0x69,0x64])&&_0xd3688c(_0x3b4f54);},_0x3c6f08);}):_0x53aca3||_0x51592d||_0x41a7bf([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4174da(_0x464df6,_0x5b7e6f){return new window[(_0x41a7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c80e6=>{if(_0x43a6b9())return _0x2c80e6(_0x41a7bf([0x56,0x61,0x6c,0x69,0x64]));_0x44f957(),_0x4904c3[_0x41a7bf([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x41a7bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x722c2d=!0x1;const _0x308a4b=_0x546680();function _0x1682cc(_0x4b1ce9){return!!_0x4b1ce9&&(typeof _0x4b1ce9===_0x41a7bf([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4b1ce9===_0x41a7bf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4b1ce9[_0x41a7bf([0x74,0x68,0x65,0x6e])]===_0x41a7bf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4b1ce9[_0x41a7bf([0x63,0x61,0x74,0x63,0x68])]===_0x41a7bf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2987f2(_0x1157e4){_0x283bba(_0x1157e4)[_0x41a7bf([0x74,0x68,0x65,0x6e])](_0x242f4f=>{if(!_0x242f4f||_0x242f4f[_0x41a7bf([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x41a7bf([0x6f,0x6b]))return _0x41a7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x32cf94(_0x20b974(_0x308a4b+_0x5b7e6f))!=_0x242f4f[_0x41a7bf([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x41a7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x41a7bf([0x56,0x61,0x6c,0x69,0x64]);})[_0x41a7bf([0x74,0x68,0x65,0x6e])](_0x4dd24b=>(_0x544684(),_0x4dd24b),()=>{const _0xd35bc9=_0x5efa31();return null==_0xd35bc9?(_0x544684(),_0x41a7bf([0x56,0x61,0x6c,0x69,0x64])):_0x41a7bf(_0x3d4f38-_0xd35bc9>(0x574a8eb3^_0x2465ba)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x41a7bf([0x74,0x68,0x65,0x6e])](_0x2c80e6)[_0x41a7bf([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2c80e6(_0x41a7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4af2fd=0x7370e433^_0x2465ba;function _0x544684(){const _0x385091=_0x41a7bf([0x6c,0x6c,0x63,0x74,0x2d])+_0x32cf94(_0x20b974(_0x464df6)),_0x27dce5=_0x40955c(_0x32cf94(window[_0x41a7bf([0x4d,0x61,0x74,0x68])][_0x41a7bf([0x63,0x65,0x69,0x6c])](_0x3d4f38/_0x4af2fd)));window[_0x41a7bf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41a7bf([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x385091,_0x27dce5);}function _0x5efa31(){const _0x4ec4f0=_0x41a7bf([0x6c,0x6c,0x63,0x74,0x2d])+_0x32cf94(_0x20b974(_0x464df6)),_0x2daafc=window[_0x41a7bf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x41a7bf([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4ec4f0);return _0x2daafc?window[_0x41a7bf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x40955c(_0x2daafc),0x10)*_0x4af2fd:null;}function _0x283bba(_0x54bd44){return new window[(_0x41a7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x58e125,_0x3fe55c)=>{_0x54bd44[_0x41a7bf([0x74,0x68,0x65,0x6e])](_0x58e125,_0x3fe55c),window[_0x41a7bf([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3fe55c,0x7347de73^_0x2465ba);});}}_0x4904c3[_0x41a7bf([0x6f,0x6e])](_0x41a7bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4eb530,_0x16b225)=>{if(_0x16b225[0x0]!=_0x464df6)return _0x2c80e6(_0x41a7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x16b225[0x1]={..._0x16b225[0x1],[_0x41a7bf([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x308a4b};},{[_0x41a7bf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41a7bf([0x68,0x69,0x67,0x68])}),_0x4904c3[_0x41a7bf([0x6f,0x6e])](_0x41a7bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x245f64=>{_0x1682cc(_0x245f64[_0x41a7bf([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x722c2d=!0x0,_0x2987f2(_0x245f64[_0x41a7bf([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x41a7bf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x41a7bf([0x6c,0x6f,0x77])}),_0x4eb6b1[_0x41a7bf([0x74,0x68,0x65,0x6e])](()=>{_0x722c2d||_0x2c80e6(_0x41a7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x43a6b9(){return _0x4904c3[_0x41a7bf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41a7bf([0x76,0x69,0x65,0x77])][_0x41a7bf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x41a7bf([0x61,0x75,0x74,0x6f]);}function _0x44f957(){_0x4904c3[_0x41a7bf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41a7bf([0x76,0x69,0x65,0x77])][_0x41a7bf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x41a7bf([0x61,0x75,0x74,0x6f]);}}function _0x277d49(_0x227280){const _0x2ab1c8=[new window[(_0x41a7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x160b3f=>setTimeout(_0x160b3f,0x734f347f^_0x2465ba)),_0x4eb6b1[_0x41a7bf([0x74,0x68,0x65,0x6e])](()=>new window[(_0x41a7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x102101=>{let _0x4f551a=0x0;_0x4904c3[_0x41a7bf([0x6d,0x6f,0x64,0x65,0x6c])][_0x41a7bf([0x6f,0x6e])](_0x41a7bf([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x49e5b5,_0x4a07e8)=>{_0x4a07e8[0x0][_0x41a7bf([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4f551a++,_0x4f551a==(0x73460b4b^_0x2465ba)&&(_0x102101(),_0x49e5b5[_0x41a7bf([0x6f,0x66,0x66])]());});}))];return window[_0x41a7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x41a7bf([0x72,0x61,0x63,0x65])](_0x2ab1c8)[_0x41a7bf([0x74,0x68,0x65,0x6e])](()=>_0x227280);}async function _0x34043b(){await _0x4eb6b1,_0x4904c3[_0x41a7bf([0x6d,0x6f,0x64,0x65,0x6c])][_0x41a7bf([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x53aa4a,_0x4904c3[_0x41a7bf([0x6d,0x6f,0x64,0x65,0x6c])][_0x41a7bf([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x53aa4a,_0x4904c3[_0x41a7bf([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x41a7bf([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x195d4a(){return window[_0x41a7bf([0x67,0x6c,0x6f,0x62])]&&window[_0x41a7bf([0x67,0x6c,0x6f,0x62])][_0x41a7bf([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1b17b5(){return _0x472adc(_0x41a7bf([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x35a79e(_0x41a7bf([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x41a7bf([0x73,0x74,0x61,0x74,0x65])]==_0x41a7bf([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3cf824(){return _0x472adc(_0x41a7bf([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 _0x1f8498(){return _0x472adc(_0x41a7bf([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3e7893(_0x2fcfc2){const _0x40feed=_0x59e289();_0x4904c3[_0x40feed]=_0x41a7bf([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2fcfc2,_0x2fcfc2!=_0x41a7bf([0x56,0x61,0x6c,0x69,0x64])&&_0x34043b();}function _0x59e289(){const _0xdac1f2=window[_0x41a7bf([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x41a7bf([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x41a7bf([0x6e,0x6f,0x77])]())[_0x41a7bf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x41a7bf([0x2e]),'');let _0x1c8f92=_0x41a7bf([0x4b]);for(let _0x21d9c8=0x0;_0x21d9c8<_0xdac1f2[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x21d9c8+=0x2){let _0x4f1bf8=window[_0x41a7bf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xdac1f2[_0x41a7bf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x21d9c8,_0x21d9c8+0x2));_0x4f1bf8>=_0x2262f4[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4f1bf8-=_0x2262f4[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1c8f92+=_0x2262f4[_0x4f1bf8];}return _0x1c8f92;}function _0x4113a1(){const _0xa9502d=_0x5e4bdf[_0x41a7bf([0x73,0x70,0x6c,0x69,0x74])](_0x41a7bf([0x2e]));if(0x3!=_0xa9502d[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x433a18(_0xa9502d[0x1]);function _0x433a18(_0x4e6e49){const _0x54b630=_0x11dec4(_0x4e6e49);return _0x54b630&&_0x359cc1()?_0x54b630:null;function _0x359cc1(){const _0x42a29a=_0x54b630[_0x41a7bf([0x6a,0x74,0x69])],_0x3fa07a=window[_0x41a7bf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x42a29a[_0x41a7bf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x42a29a[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x296304={..._0x54b630,[_0x41a7bf([0x6a,0x74,0x69])]:_0x42a29a[_0x41a7bf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x42a29a[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x296304[_0x41a7bf([0x76,0x63])],_0x20b974(_0x296304)==_0x3fa07a;}}}async function _0x320818(){let _0x21e736=!0x0;try{const _0x2daa3f=_0x5e4bdf[_0x41a7bf([0x73,0x70,0x6c,0x69,0x74])](_0x41a7bf([0x2e])),[_0x3ee09f,_0x1b1ebb,_0x5dc3e9]=_0x2daa3f;return _0x4abd93(_0x3ee09f),await _0x44218c(_0x3ee09f,_0x1b1ebb,_0x5dc3e9),_0x21e736;}catch{return!0x1;}function _0x4abd93(_0x25d951){const _0x596473=_0x11dec4(_0x25d951);_0x596473&&_0x596473[_0x41a7bf([0x61,0x6c,0x67])]==_0x41a7bf([0x45,0x53,0x32,0x35,0x36])||(_0x21e736=!0x1);}async function _0x44218c(_0x165494,_0x5c0a26,_0x2cdb0b){const _0x30b0d1=window[_0x41a7bf([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x41a7bf([0x66,0x72,0x6f,0x6d])](_0x50ebc0(_0x2cdb0b),_0x109e7d=>_0x109e7d[_0x41a7bf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x414a62=new window[(_0x41a7bf([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x41a7bf([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x165494+_0x41a7bf([0x2e])+_0x5c0a26),_0x128c21=window[_0x41a7bf([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x41a7bf([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x128c21)return;const _0xee7299=await _0x128c21[_0x41a7bf([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x41a7bf([0x6a,0x77,0x6b]),_0x4ea138,{[_0x41a7bf([0x6e,0x61,0x6d,0x65])]:_0x41a7bf([0x45,0x43,0x44,0x53,0x41]),[_0x41a7bf([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x41a7bf([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x41a7bf([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x128c21[_0x41a7bf([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x41a7bf([0x6e,0x61,0x6d,0x65])]:_0x41a7bf([0x45,0x43,0x44,0x53,0x41]),[_0x41a7bf([0x68,0x61,0x73,0x68])]:{[_0x41a7bf([0x6e,0x61,0x6d,0x65])]:_0x41a7bf([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xee7299,_0x30b0d1,_0x414a62)||(_0x21e736=!0x1);}}function _0x11dec4(_0x2b0e8d){return _0x2b0e8d[_0x41a7bf([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x41a7bf([0x65,0x79]))?JSON[_0x41a7bf([0x70,0x61,0x72,0x73,0x65])](_0x50ebc0(_0x2b0e8d)):null;}function _0x50ebc0(_0xdb6e23){return window[_0x41a7bf([0x61,0x74,0x6f,0x62])](_0xdb6e23[_0x41a7bf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x41a7bf([0x2b]))[_0x41a7bf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x41a7bf([0x2f])));}function _0x20b974(_0x1a14c3){let _0x399f1c=0x1505;function _0x46e79f(_0x1e991a){for(let _0x1bbcd0=0x0;_0x1bbcd0<_0x1e991a[_0x41a7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1bbcd0++){const _0x5352ff=_0x1e991a[_0x41a7bf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1bbcd0);_0x399f1c=(_0x399f1c<<0x5)+_0x399f1c+_0x5352ff,_0x399f1c&=_0x399f1c;}}function _0x1ddf0c(_0x4f2af8){Array[_0x41a7bf([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f2af8)?_0x4f2af8[_0x41a7bf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1ddf0c):_0x4f2af8&&typeof _0x4f2af8==_0x41a7bf([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x41a7bf([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f2af8)[_0x41a7bf([0x73,0x6f,0x72,0x74])]()[_0x41a7bf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2e19b4,_0x2fd969])=>{_0x46e79f(_0x2e19b4),_0x1ddf0c(_0x2fd969);}):_0x46e79f(window[_0x41a7bf([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f2af8));}return _0x1ddf0c(_0x1a14c3),_0x399f1c>>>0x0;}function _0x32cf94(_0x2eb6c5){return _0x2eb6c5[_0x41a7bf([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x41a7bf([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x41a7bf([0x30]));}function _0x40955c(_0x234012){return _0x234012[_0x41a7bf([0x73,0x70,0x6c,0x69,0x74])]('')[_0x41a7bf([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x41a7bf([0x6a,0x6f,0x69,0x6e])]('');}function _0x472adc(_0x40c20b){return _0x4904c3[_0x41a7bf([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x41a7bf([0x68,0x61,0x73])](_0x40c20b);}function _0x35a79e(_0x2de9b6){return _0x4904c3[_0x41a7bf([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x41a7bf([0x67,0x65,0x74])](_0x2de9b6);}function _0x53aa4a(){}function _0x41a7bf(_0x2821b1){return _0x2821b1['map'](_0x55692d=>String['fromCharCode'](_0x55692d))['join']('');}_0x3e7893(await _0x2f369c());}(this);}['destroy'](){const _0x50d463=this['editor']['plugins']['get'](o),_0x230b10=this['editor']['config']['get']('collaboration.channelId');for(const _0xbf3e8a of _0x50d463['getCommentThreads']({'channelId':_0x230b10}))_0x50d463['_detachCommentThread'](_0xbf3e8a['id']),_0x50d463['_threads']['delete'](_0xbf3e8a['id']);super['destroy']();}['hasMarkerForId'](_0x533d98){return this['getAllMarkersForId'](_0x533d98)['length']>0x0;}['getAllMarkersForId'](_0x2456e0){const _0xeb60ee=[];for(const _0x1ec01f of this['editor']['model']['markers'])_0x1ec01f['name']['startsWith']('comment:'+_0x2456e0)&&_0xeb60ee['push'](_0x1ec01f);return _0xeb60ee;}['scrollToThreadMarker'](_0x38db52){setTimeout(()=>{const _0x4d39ed=this['_getTargetForId'](_0x38db52);if(!_0x4d39ed)return;this['activeMarker']&&dt(this['activeMarker'])['id']===_0x38db52&&ot({'target':_0x4d39ed[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x57783a){this['editor']['model']['change'](()=>{for(const _0x1ede66 of this['getAllMarkersForId'](_0x57783a))this['editor']['editing']['reconvertMarker'](_0x1ede66);});}['_attachArchivedThread'](_0x5740a0){const _0x3730bb=this['editor']['plugins']['get'](o),_0xd868a=this['editor']['plugins']['get'](b),_0x55bd21=_0x3730bb['getCommentThread'](_0x5740a0);if(!_0x55bd21['isAttached']){const _0x4e222a=_0x55bd21['attachTo'](()=>this['_getTargetForId'](_0x55bd21['id']));_0xd868a['registerAnnotation'](_0x4e222a),_0x55bd21['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4e7f36=this['editor'],_0x5143a5=_0x4e7f36['plugins']['get'](st);_0x4e7f36['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d7c69,_0x5bc09d)=>{const {id:_0x155071}=dt(_0x5d7c69['markerName']),_0x3b3e25=_0x4e7f36['plugins']['get'](o)['getCommentThread'](_0x155071),_0x2b44d9=this['activeMarker']&&dt(this['activeMarker'])['id']===_0x155071;let _0x5158c9;if(_0x3b3e25&&_0x3b3e25['isResolved']&&!_0x2b44d9&&_0x5d7c69['item'])return _0x5bc09d['consumable']['consume'](_0x5d7c69['item'],'addMarker:'+_0x5d7c69['markerName']),_0x5bc09d['consumable']['consume'](_0x5d7c69['item'],'removeMarker:'+_0x5d7c69['markerName']),null;const _0xf812cf=['ck-comment-marker'];return _0x2b44d9&&_0xf812cf['push']('ck-comment-marker--active'),_0x5158c9=_0x3b3e25?.['length']?_0x3b3e25['comments']['first']['author']['id']:_0x5143a5['me']['id'],{'classes':_0xf812cf,'attributes':{'data-comment':_0x155071,'data-author-id':_0x5158c9}};}}),_0x4e7f36['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xfedff3,{options:_0xb12795})=>{if(_0xb12795['showCommentHighlights'])return null;const _0xf74c3d=_0x4e7f36['plugins']['get'](o),_0x3144f6=_0x4e7f36['model']['markers']['get'](_0xfedff3),{id:_0x3b8cce,part:_0x3c5c1d}=dt(_0xfedff3);return _0x3144f6&&!_0x3144f6['affectsData']||_0xb12795['ignoreResolvedComments']&&_0xf74c3d['getCommentThread'](_0x3b8cce)?.['isResolved']?null:{'group':'comment','name':_0x3c5c1d?_0x3b8cce+':'+_0x3c5c1d:_0x3b8cce};}}),_0x4e7f36['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3abea7,{writer:_0x29fe12})=>_0x29fe12['createElement']('$marker',{'data-name':'comment:'+_0x3abea7['getAttribute']('id')})}),_0x4e7f36['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x10cb27=this['editor'],_0x29e68c=_0x10cb27['plugins']['get'](o),_0x264c39=new Set(),_0x43cfe0=new Set();_0x10cb27['model']['document']['registerPostFixer'](_0x58eb6f=>{let _0x389c59=!0x1;for(const {name:_0x27dc30,data:_0x28188f}of _0x10cb27['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4720a2,id:_0x23b4ee}=dt(_0x27dc30);let _0x2a6754=_0x28188f['newRange'];if('comment'!==_0x4720a2||!_0x2a6754)continue;const _0x390418='$graveyard'===_0x2a6754['root']['rootName'];_0x390418||(_0x2a6754=mt(_0x2a6754,_0x10cb27['model']),!_0x2a6754||_0x2a6754['isCollapsed']||!_0x28188f['newRange']||_0x2a6754['isEqual'](_0x28188f['newRange']))?_0x10cb27['model']['hasContent'](_0x2a6754)&&!_0x390418?this['isThreadsLoadingPaused']?_0x264c39['add'](_0x27dc30):this['_handleThreadMarker'](_0x27dc30,_0x23b4ee):(_0x43cfe0['add'](_0x27dc30),_0x264c39['delete'](_0x27dc30),_0x58eb6f['removeMarker'](_0x27dc30),_0x389c59=!0x0):(_0x58eb6f['updateMarker'](_0x27dc30,{'range':_0x2a6754}),_0x389c59=!0x0);}return _0x389c59;}),this['on']('change:isThreadsLoadingPaused',(_0x31e4a7,_0x418c44,_0x7f37f9)=>{if(!_0x7f37f9&&_0x264c39['size'])for(const _0x2e8184 of _0x264c39){const {id:_0x224615}=dt(_0x2e8184);_0x264c39['delete'](_0x2e8184),_0x10cb27['model']['markers']['get'](_0x2e8184)&&this['_handleThreadMarker'](_0x2e8184,_0x224615);}}),this['listenTo'](_0x10cb27['model']['document'],'change',()=>{for(const {name:_0x4941cb,data:{newRange:_0x1d006c}}of _0x10cb27['model']['document']['differ']['getChangedMarkers']()){const {group:_0x39ca5a,id:_0x4d2e75}=dt(_0x4941cb);if('comment'!==_0x39ca5a)continue;const _0x47daf7=_0x29e68c['getCommentThread'](_0x4d2e75),_0x50f8d5=this['hasMarkerForId'](_0x4d2e75);_0x47daf7&&(!_0x47daf7['_hasTargetInContent']&&_0x1d006c&&_0x10cb27['editing']['view']['once']('render',()=>{const _0xe78cb=_0x10cb27['plugins']['get'](y),_0xe36b3d=_0x29e68c['_threadToController']['get'](_0x47daf7)['view'];_0xe78cb['getByInnerView'](_0xe36b3d)['refreshVisibility']();},{'priority':'low'}),_0x47daf7['_hasTargetInContent']=_0x50f8d5||!!_0x1d006c),_0x1d006c||(_0x43cfe0['add'](_0x4941cb),_0x264c39['delete'](_0x4941cb));}for(const _0x9559b of _0x43cfe0){const {id:_0x448839}=dt(_0x9559b),_0x57ebb2=_0x29e68c['getCommentThread'](_0x448839);if(_0x264c39['delete'](_0x9559b),!_0x57ebb2)continue;const _0x5827ad=this['hasMarkerForId'](_0x448839);_0x5827ad||_0x57ebb2['isSubmitted']?_0x5827ad||_0x57ebb2['unlinkedAt']||_0x57ebb2['setUnlinkedAt'](new Date()):_0x57ebb2['remove']();}_0x43cfe0['clear']();});}['_handleInitialThreads'](_0x352eac){_0x352eac['forEach'](_0x48287b=>{_0x48287b['unlinkedAt']&&this['_attachArchivedThread'](_0x48287b['id']);});}['_getTargetForId'](_0x415ff1){const _0x4775ea=this['editor'],_0x400b82=this['getAllMarkersForId'](_0x415ff1);return it(_0x4775ea['editing'],_0x400b82);}['_getTextContext'](_0x4b5710){const _0x45c35d=this['getAllMarkersForId'](_0x4b5710);let _0x47be0e='',_0xf7380=!0x1;for(const _0x5b083 of _0x45c35d){const _0x5ee5a9=_0x5b083['getRange']();for(const _0x248573 of Array['from'](_0x5ee5a9['getItems']()))_0x248573['is']('$textProxy')?(_0x47be0e&&_0xf7380&&(_0x47be0e+='\x20',_0xf7380=!0x1),_0x47be0e+=_0x248573['data']):_0xf7380=!0x0;_0xf7380=!0x0;}return _0x47be0e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5721cb,_0x34ec12){const _0x5bc3a1=this['editor'],_0x46940b=_0x5bc3a1['plugins']['get'](o);let _0x182030=_0x46940b['getCommentThread'](_0x34ec12);const _0x29db71=_0x5bc3a1['config']['get']('collaboration.channelId'),_0x3b8945=_0x5bc3a1['plugins']['get'](b);if(_0x182030&&(_0x182030['unlinkedAt']&&_0x182030['setUnlinkedAt'](null),_0x182030['isAttached']))return _0x182030;return!this['getAllMarkersForId'](_0x34ec12)[0x0]['managedUsingOperations']?_0x5bc3a1['editing']['view']['once']('render',()=>{if(_0x46940b['getCommentThread'](_0x34ec12))return;const _0x19db21=_0x5bc3a1['plugins']['get'](y);_0x182030=_0x46940b['openNewCommentThread']({'channelId':_0x29db71,'threadId':_0x34ec12,'target':()=>this['_getTargetForId'](_0x34ec12),'context':{'type':'text','value':this['_getTextContext'](_0x34ec12)}});const _0x2c5944=_0x46940b['_threadToController']['get'](_0x182030)['view'],_0x56c93f=_0x19db21['getByInnerView'](_0x2c5944);_0x56c93f&&_0x3b8945['registerAnnotation'](_0x56c93f);},{'priority':'low'}):_0x46940b['fetchCommentThread']({'channelId':_0x29db71,'threadId':_0x34ec12})['then'](_0x234317=>{if('destroyed'!==_0x5bc3a1['state']){if(_0x182030=_0x234317,_0x182030&&!_0x182030['isAttached']){const _0x4c8fbd=_0x182030['attachTo'](()=>this['_getTargetForId'](_0x34ec12));_0x3b8945['registerAnnotation'](_0x4c8fbd),_0x182030['isResolved']&&this['_reconvertMarkers'](_0x34ec12);}else{if(!_0x182030){const _0x2c458d=this['getAllMarkersForId'](_0x34ec12);_0x5bc3a1['model']['change'](_0x34ab08=>{for(const _0xc733b0 of _0x2c458d)_0x34ab08['removeMarker'](_0xc733b0);});}}}}),_0x182030;}['_handleThreadMarker'](_0x4b2f2a,_0x110510){const _0x3e7158=this['_attachMarkerToThread'](_0x4b2f2a,_0x110510);_0x3e7158&&!_0x3e7158['context']&&_0x3e7158['setContext']({'type':'text','value':this['_getTextContext'](_0x110510)});}['_initAriaMarkerChangeAnnouncements'](){const _0x21a9d4=this['editor'];et(_0x21a9d4['model'],({left:_0x4294f6,entered:_0x60a012})=>{for(const _0x166779 of _0x4294f6)if(lt(_0x166779)){_0x21a9d4['ui']['ariaLiveAnnouncer']['announce'](N(_0x21a9d4['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2f9d0e of _0x60a012)if(lt(_0x2f9d0e)){_0x21a9d4['ui']['ariaLiveAnnouncer']['announce'](N(_0x21a9d4['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x4d5d1c)));break;}});}}function ht(_0x65a5b5,_0x85103d){return _0x85103d?_0x65a5b5+':'+_0x85103d:_0x65a5b5;}function mt(_0x4ad182,_0x48f5a2){const _0x511e8c=_0x48f5a2['schema'],_0x217b91=_0x48f5a2['createRange'](_0x4ad182['start']);for(const _0x27c404 of _0x4ad182['getWalker']()){const {type:_0x5f4bae,item:_0x558768,nextPosition:_0x2161ed}=_0x27c404;if('text'===_0x5f4bae||_0x511e8c['isObject'](_0x558768)){const _0xbd3d1c=_0x48f5a2['createPositionBefore'](_0x558768);_0x217b91['isCollapsed']&&(_0x217b91['start']=_0xbd3d1c),_0x217b91['end']=_0x2161ed;}}return _0x217b91;}function lt(_0x296f75){return'comment'===dt(_0x296f75['name'])['group'];}class s extends _0x1ca286{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x4bd636=this['editor'],_0x489cd4=_0x4bd636['plugins']['get'](o),_0x3ee1bf=_0x4bd636['plugins']['get'](r),_0x494073=_0x4bd636['plugins']['get'](y),_0x2abe4b=_0x4bd636['plugins']['get'](b);_0x4bd636['ui']['componentFactory']['add']('comment',()=>{const _0x1f3bca=this['_createUIButton'](_0x5b9b26);return _0x1f3bca['tooltip']=!0x0,_0x1f3bca;}),_0x4bd636['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0xade49)),_0x2abe4b['addSourceCollector'](()=>{const _0x1f3680=[];for(const [_0xc42197,_0x58cbe6]of _0x489cd4['_threadToController']){const _0xab48ab=_0x3ee1bf['getAllMarkersForId'](_0xc42197['id']),_0x40de47=_0xab48ab['map'](_0x13a959=>_0x13a959['getRange']());_0xab48ab['length']>0x0&&_0x1f3680['push']([_0x58cbe6['view'],_0x40de47]);}return _0x1f3680;}),this['listenTo'](_0x494073,'change:activeAnnotations',(_0x80eeb8,_0x57bf97,_0x1d6591)=>{const _0x2feb10=Array['from'](_0x1d6591)['map'](_0x575a47=>_0x575a47['innerView'])['find'](_0x44985a=>_0x489cd4['_viewToController']['has'](_0x44985a));if(!_0x2feb10)return void(_0x3ee1bf['activeMarker']=null);const _0x2ea884=_0x489cd4['_viewToController']['get'](_0x2feb10)['model']['id'],_0x3195af='comment:'+_0x2ea884;_0x2ea884&&_0x3ee1bf['hasMarkerForId'](_0x2ea884)?_0x3ee1bf['activeMarker']=_0x3195af:_0x3ee1bf['activeMarker']&&(_0x3ee1bf['activeMarker']=null);}),this['listenTo'](_0x489cd4,'removeCommentThread',(_0x87f0c,{threadId:_0x1b9247,isFromAdapter:_0x1f63e2})=>{!_0x1f63e2&&_0x4bd636['ui']['focusTracker']['isFocused']&&_0x3ee1bf['hasMarkerForId'](_0x1b9247)&&_0x4bd636['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x489cd4,'addComment',(_0x18c9a2,{threadId:_0x3a0cb6,isFromAdapter:_0x428e9f})=>{if(_0x428e9f||!_0x3ee1bf['hasMarkerForId'](_0x3a0cb6)||!_0x489cd4['hasCommentThread'](_0x3a0cb6))return;0x1===_0x489cd4['getCommentThread'](_0x3a0cb6)['length']&&(_0x4bd636['editing']['view']['focus'](),_0x18c9a2['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3bd15e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x404c8d;for(const _0x4edc07 in _0x3bd15e){const _0x218709=_0x4edc07,_0x157301=_0x3bd15e[_0x218709];if('commentsLicenseKeyValid'==_0x157301||'commentsLicenseKeyInvalid'==_0x157301||'commentsLicenseKeyExpired'==_0x157301||'commentsLicenseKeyDomainLimit'==_0x157301||'commentsLicenseKeyNotAllowed'==_0x157301||'commentsLicenseKeyEvaluationLimit'==_0x157301||'commentsLicenseKeyTrialLimit'==_0x157301||'commentsLicenseKeyUsageLimit'==_0x157301){delete _0x3bd15e[_0x218709],_0x404c8d=_0x157301,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x404c8d&&_0x3bd15e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x404c8d&&_0x3bd15e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x404c8d&&_0x3bd15e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x404c8d&&_0x3bd15e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x404c8d&&_0x3bd15e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x404c8d&&_0x3bd15e['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x404c8d&&_0x3bd15e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1095ec){const _0x566f77=this['editor'],_0x52d04b=new _0x1095ec(_0x566f77['locale']),_0x1ca2fd=_0x566f77['commands']['get']('addCommentThread');return _0x52d04b['set']({'label':N(_0x566f77['locale'],'Comment'),'icon':_0x2a550c}),_0x52d04b['bind']('isEnabled')['to'](_0x1ca2fd,'hasContent'),this['listenTo'](_0x52d04b,'execute',()=>{_0x1ca2fd['execute']();}),_0x52d04b;}}class i extends _0x1ca286{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x4668bf){super(_0x4668bf),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4fd877,_0x4a29ab,_0x3c6d8e)=>{_0x3c6d8e?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x3bd87e,_0x5714ca]of this['editor']['commands'])_0x5714ca['affectsData']&&'addCommentThread'!==_0x3bd87e&&_0x5714ca['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4350c9=this['editor']['editing']['view']['document'];this['listenTo'](_0x4350c9,'cut',_0x1688f1=>_0x1688f1['stop'](),{'priority':'highest'}),this['listenTo'](_0x4350c9,'clipboardInput',_0x275a93=>_0x275a93['stop'](),{'priority':'highest'}),this['listenTo'](_0x4350c9,'delete',_0x477286=>_0x477286['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x145cf9,_0x28a9a2]of this['editor']['commands'])_0x28a9a2['affectsData']&&'addCommentThread'!==_0x145cf9&&_0x28a9a2['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 j extends _0x50de75{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b8dbf){super(_0x2b8dbf),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1d4f25=this['context']['plugins']['get'](y);this['listenTo'](_0x1d4f25,'_activateAnnotation',(_0x497704,_0x57ba24)=>{for(const _0x1a7022 of this['activeUIs']){const _0x5f3816=this['_uis']['get'](_0x1a7022);(0x0,this['uisData']['get'](_0x1a7022)['filter'])(_0x57ba24)&&_0x5f3816['setActiveAnnotation'](_0x57ba24);}}),this['listenTo'](_0x1d4f25,'_deactivateAllAnnotations',()=>{for(const _0x14417b of this['activeUIs']){this['_uis']['get'](_0x14417b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1d4f25['_visibleAnnotations'],'add',(_0x279b87,_0x1e0d61)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1e0d61);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1604ee){return this['activeUIs']['has'](_0x1604ee);}['activate'](_0x13f4b5,_0x1b7da0=this['defaultFilter']){const _0x252f2b=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x13f4b5))throw new _0x4a98c7('annotationsuis-missing-ui',this,{'uiName':_0x13f4b5});this['isActive'](_0x13f4b5)&&this['deactivate'](_0x13f4b5),this['activeUIs']['add'](_0x13f4b5);const _0x345097=new S();v({'source':_0x252f2b['_visibleAnnotations'],'target':_0x345097,'filter':_0x1b7da0}),this['uisData']['set'](_0x13f4b5,{'collection':_0x345097,'filter':_0x1b7da0});const _0x4bc41b=this['_uis']['get'](_0x13f4b5);_0x4bc41b['attach'](_0x345097),this['listenTo'](_0x4bc41b,'change:activeAnnotation',(_0x238624,_0x552af6,_0x36a63d,_0x35512c)=>{_0x35512c&&_0x252f2b['_removeActiveAnnotation'](_0x35512c),_0x36a63d&&_0x252f2b['_addActiveAnnotation'](_0x36a63d);});}['deactivate'](_0x81c40e){if(this['activeUIs']['delete'](_0x81c40e),!this['_uis']['has'](_0x81c40e))throw new _0x4a98c7('annotationsuis-missing-ui',this,{'uiName':_0x81c40e});const _0x5bbfd3=this['_uis']['get'](_0x81c40e);_0x5bbfd3['detach'](),this['stopListening'](_0x5bbfd3),this['uisData']['get'](_0x81c40e)['collection']['destroy'](),this['uisData']['delete'](_0x81c40e);}['switchTo'](_0x312b42){if(!this['_uis']['has'](_0x312b42))throw new _0x4a98c7('annotationsuis-missing-ui',this,{'uiName':_0x312b42});const _0x5da22e=this['context']['plugins']['get'](y),_0xba1cab=Array['from'](_0x5da22e['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x312b42);const _0x1ad57b=this['_uis']['get'](_0x312b42);_0x1ad57b['setActiveAnnotation'](_0xba1cab),_0x1ad57b['_setSelectedAnnotations']&&_0xba1cab&&_0x1ad57b['_setSelectedAnnotations']([_0xba1cab]);}['deactivateAll'](){for(const _0xa9be4d of this['activeUIs'])this['deactivate'](_0xa9be4d);}['register'](_0x14148e,_0x24f93b){if(this['_uis']['has'](_0x14148e))throw new _0x4a98c7('annotationsuis-register-already-registered');if('function'!=typeof _0x24f93b['attach']||'function'!=typeof _0x24f93b['detach']||'function'!=typeof _0x24f93b['setActiveAnnotation'])throw new _0x4a98c7('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x14148e,_0x24f93b);}['refilterAnnotations'](){const _0x375e47=this['context']['plugins']['get'](y)['collection'],_0x352f9f=new Map(),_0x26200b=Array['from'](this['activeUIs']);for(const _0x101857 of this['activeUIs']){const _0x4cd307=this['uisData']['get'](_0x101857)['collection'];for(const _0x1b3e0d of _0x4cd307)_0x352f9f['set'](_0x1b3e0d,_0x101857);}for(const _0x24f7e3 of _0x375e47){const _0x4b163f=_0x352f9f['get'](_0x24f7e3);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x24f7e3);const _0x380d63=_0x26200b['find'](_0x2d03c5=>this['uisData']['get'](_0x2d03c5)['filter'](_0x24f7e3));_0x4b163f!==_0x380d63&&(_0x4b163f&&this['uisData']['get'](_0x4b163f)['collection']['remove'](_0x24f7e3),_0x380d63&&this['uisData']['get'](_0x380d63)['collection']['add'](_0x24f7e3));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5f38ad){const _0x2f6198=[];for(const _0x4f37ed of this['activeUIs']){(0x0,this['uisData']['get'](_0x4f37ed)['filter'])(_0x5f38ad)&&_0x2f6198['push'](_0x4f37ed);}if(_0x2f6198['length']>0x1)throw new _0x4a98c7('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2f6198,'annotationType':_0x5f38ad['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Dt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x228fb2){super(_0x228fb2);const _0x3d9ac7=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 _0x59f96f(),this['focusCycler']=new _0xa1a196({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x3d9ac7['to']('class')],'style':{'minHeight':_0x3d9ac7['to']('minHeight',_0x930b92=>'number'==typeof _0x930b92?_i(_0x930b92+0xa):null)},'dir':_0x228fb2['uiLanguageDirection'],'role':'application','aria-label':N(_0x228fb2,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x228fb2,'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',_0x1baacb=>{this['_updateItemPositionInFocusables'](_0x1baacb['source']);}),this['list']['forEach'](_0x24908b=>{this['focusTracker']['add'](_0x24908b['element']),this['_updateItemPositionInFocusables'](_0x24908b);}),this['list']['on']('change',(_0x24e15b,_0x39df00)=>{for(const _0x5689c4 of _0x39df00['removed'])this['focusTracker']['remove'](_0x5689c4['element']),this['focusables']['remove'](_0x5689c4);for(const _0x3d41c8 of _0x39df00['added'])this['focusTracker']['add'](_0x3d41c8['element']),this['_updateItemPositionInFocusables'](_0x3d41c8);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x28075e){const _0x26b5c=this['focusables']['getIndex'](_0x28075e);let _0x429496,_0xcebe65;for(const _0x59458c of this['focusables'])if(_0x28075e['top']<_0x59458c['top']){_0x429496=_0x59458c;break;}if(_0xcebe65=_0x429496?this['focusables']['getIndex'](_0x429496):this['focusables']['length'],-0x1!==_0x26b5c){if(_0x26b5c===_0xcebe65-0x1)return;this['focusables']['remove'](_0x28075e),_0xcebe65=_0x429496?this['focusables']['getIndex'](_0x429496):this['focusables']['length'];}this['focusables']['add'](_0x28075e,_0xcebe65);}}const Ht=/* #__PURE__ -- @preserve */
|
|
33
|
+
Dt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1a6298){super(_0x1a6298),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x22d80d,_0x5d47c1)=>_0x22d80d+_0x5d47c1),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Et(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3656f7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3656f7['to']('isAnimationDisabled',_0x23f8f1=>_0x23f8f1?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3656f7['to']('top',_0x4e9e55=>Ht(_0x4e9e55))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x53919=this['element']['clientHeight'];_0x53919&&(this['height']=_0x53919);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x50de75{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x427e5c){super(_0x427e5c),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 _0x674fa4=this['context']['config']['get']('sidebar.container');_0x674fa4&&this['setContainer'](_0x674fa4);}['setContainer'](_0x4e2902){if(!g(_0x4e2902))throw new _0x4a98c7('sidebar-setcontainer-invalid-element');this['container']=_0x4e2902;}['_attachToContainer']({viewClass:_0x6bd75a='',spaceBetweenItems:_0x1bb9d3=0x19}={}){if(!g(this['container']))throw new _0x4a98c7('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x6bd75a,this['_spaceBetweenItems']=_0x1bb9d3;}['rearrange']({removedAnnotation:_0x149b4d,previousAnnotation:_0x65caf,nextAnnotation:_0x11f4e2}){const _0x5b68db=this['getSidebarItemView'](_0x149b4d);this['view']['list']['remove'](_0x5b68db),this['_destroySidebarItemView'](_0x149b4d),_0x65caf&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x65caf)),_0x11f4e2&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x11f4e2)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2ca846,activatedAnnotation:_0x9346bc,disableAnimationOnActivatedAnnotation:_0x2fb7e3}){if(this['_activeAnnotation']=_0x9346bc,_0x2ca846){_0x2ca846['isActive']=!0x1;const _0x29648d=this['getSidebarItemView'](_0x2ca846);_0x29648d&&_0x2fb7e3&&(_0x29648d['isAnimationDisabled']=!0x1);}if(_0x9346bc){const _0x131916=this['getSidebarItemView'](_0x9346bc);_0x131916&&(_0x9346bc['isActive']=!0x0,_0x2fb7e3&&(_0x131916['isAnimationDisabled']=!0x0,_0x131916['top']+=0x1),this['_alignToTargetRect'](_0x131916));}}['_detachFromContainer'](_0x3c966b){if(this['view']['element']['remove'](),_0x3c966b){for(const _0x12bda2 of _0x3c966b)this['_destroySidebarItemView'](_0x12bda2);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3e2188,_0x2e493d){_0x2e493d||(_0x2e493d=_0x3e2188['view']);const _0x3415b1=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3415b1,_0x3e2188),this['_annotationToSidebarItemView']['set'](_0x3e2188,_0x3415b1),_0x3415b1['content']['add'](_0x2e493d),this['listenTo'](_0x3e2188['view'],'change:targetRect',(_0x32d08c,_0x1d661b,_0x547ec9)=>{const _0x4b1977=this['_getTargetTop'](_0x3e2188,_0x547ec9);_0x3415b1['_targetTop']!=_0x4b1977&&(_0x3415b1['_targetTop']=_0x4b1977,this['_setItemTop'](_0x3415b1,_0x4b1977));}),this['listenTo'](_0x3415b1,'change:top',()=>{this['_recalculate'](_0x3415b1,'top');}),this['listenTo'](_0x3415b1,'change:bottom',()=>{this['_recalculate'](_0x3415b1,'bottom');}),this['_alignToTargetRect'](_0x3415b1);const _0x1c791e=this['_getItemBefore'](_0x3415b1);if(_0x1c791e)this['_alignAfterItem'](_0x1c791e,_0x3415b1)||this['_alignToTargetRect'](_0x3415b1);else this['_alignToTargetRect'](_0x3415b1);return this['_updateLastItem'](),this['view']['list']['add'](_0x3415b1),_0x3415b1;}['_alignForTopChange'](_0x13df28){if(!_0x13df28['content']['length'])return;const _0x54c01a=this['_getItemBefore'](_0x13df28);if(!_0x54c01a)return;const _0x111ea6=this['_sidebarItemViewToAnnotation']['get'](_0x54c01a),_0x2bd53c=this['_activeAnnotation'];_0x2bd53c&&_0x2bd53c===_0x111ea6?this['_alignAfterItem'](_0x54c01a,_0x13df28):this['_alignBeforeItem'](_0x13df28,_0x54c01a);}['_alignForBottomChange'](_0x2ddd48){if(!_0x2ddd48['content']['length'])return;const _0x556f07=this['_getItemAfter'](_0x2ddd48);if(!_0x556f07)return;const _0x547f02=this['_sidebarItemViewToAnnotation']['get'](_0x556f07),_0x594955=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5964c5=this['_activeAnnotation'];_0x5964c5&&_0x5964c5===_0x547f02&&_0x594955?(this['_alignBeforeItem'](_0x556f07,_0x2ddd48),this['_alignAfterItem'](_0x2ddd48,_0x556f07)):_0x5964c5&&_0x5964c5===_0x547f02?this['_alignBeforeItem'](_0x556f07,_0x2ddd48):this['_alignAfterItem'](_0x2ddd48,_0x556f07);}['_recalculate'](_0x56fe00,_0x4d814a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x160655,changedProp:_0xaed6b5}of this['_recalculateBuffer'])'top'===_0xaed6b5?this['_alignForTopChange'](_0x160655):this['_alignForBottomChange'](_0x160655);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x56fe00,'changedProp':_0x4d814a});}['getSidebarItemView'](_0x1abc29){return this['_annotationToSidebarItemView']['get'](_0x1abc29);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3d36da){const _0x2c473b=this['getSidebarItemView'](_0x3d36da);this['stopListening'](_0x2c473b),this['stopListening'](_0x3d36da['view']),_0x2c473b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3d36da),this['_sidebarItemViewToAnnotation']['delete'](_0x2c473b);}['_createSidebarView'](){const _0x6ba200=new H(this['context']['locale']);return _0x6ba200['render'](),this['on']('change:_lastItem',(_0x330167,_0x2c38d7,_0x13c1de,_0x29ac3a)=>{_0x29ac3a&&_0x6ba200['unbind']('minHeight'),_0x13c1de?_0x6ba200['bind']('minHeight')['to'](_0x13c1de,'bottom'):_0x6ba200['minHeight']=null;}),_0x6ba200;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x42b0bb){const _0x5bfa76=this['_sidebarItemViewToAnnotation']['get'](_0x42b0bb),_0x268549=_0x5bfa76&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5bfa76)-0x1);return _0x268549&&this['getSidebarItemView'](_0x268549)||null;}['_getItemAfter'](_0x1cab73){const _0x397be6=this['_sidebarItemViewToAnnotation']['get'](_0x1cab73),_0x3f9977=_0x397be6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x397be6)+0x1);return _0x3f9977&&this['getSidebarItemView'](_0x3f9977)||null;}['_alignBeforeItem'](_0x5b1e69,_0x30a26e){_0x5b1e69['updateHeight']();const _0x150368=G(_0x30a26e['bottom']+this['_spaceBetweenItems'],_0x5b1e69['top']);return!!_0x150368&&(this['_setItemTop'](_0x30a26e,_0x30a26e['top']-_0x150368),!0x0);}['_alignAfterItem'](_0x47ff3c,_0x444c68){_0x47ff3c['updateHeight']();const _0x4c712d=G(_0x47ff3c['bottom']+this['_spaceBetweenItems'],_0x444c68['top']);return!!_0x4c712d&&(this['_setItemTop'](_0x444c68,_0x444c68['top']+_0x4c712d,!0x1),!0x0);}['_alignToTargetRect'](_0x595921){const _0xec2a74=this['_sidebarItemViewToAnnotation']['get'](_0x595921);if(!_0xec2a74||!_0xec2a74['target']||!_0xec2a74['targetRect'])return;const _0x39cfcb=this['_getTargetTop'](_0xec2a74,_0xec2a74['targetRect']);this['_setItemTop'](_0x595921,_0x39cfcb);}['_getTargetTop'](_0xf58934,_0x58d922){if(null===_0x58d922)return 0x0;if(_0xf58934['target']instanceof _0xee8513)return _0x58d922['top'];{const _0x1d9394=new _0xee8513(this['view']['element'])['top'];return _0x58d922['top']-_0x1d9394;}}['_setItemTop'](_0x193d3d,_0x218d46,_0x4c0764=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x4c0764&&(_0x218d46=Math['max'](_0x218d46,this['_getMaxAvailableTop'](_0x193d3d))),_0x193d3d['top']=_0x218d46;}['_getMaxAvailableTop'](_0x18f143){let _0x38e630=this['_getItemBefore'](_0x18f143),_0x21c13c=0x0;for(;_0x38e630;)_0x38e630['updateHeight'](),_0x21c13c+=this['_spaceBetweenItems']+_0x38e630['height'],_0x38e630=this['_getItemBefore'](_0x38e630);return _0x21c13c;}}function G(_0xaddb04,_0x26962b){return Math['max'](_0xaddb04-_0x26962b,0x0);}function g(_0x45bcc9){return null!==_0x45bcc9&&'object'==typeof _0x45bcc9&&0x1===_0x45bcc9['nodeType'];}class e extends _0x50de75{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x283709){super(_0x283709),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x28f05f(),this['_refreshPositioningDebounced']=_0x3eac1b(()=>{_0x283709['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2e85ba=this['context']['plugins']['get'](j),_0x226b50=this['context']['plugins']['get'](z);_0x2e85ba['register']('wideSidebar',this),_0x226b50['container']&&_0x2e85ba['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3f55a3){if(_0x3f55a3===this['activeAnnotation'])return;const _0x2be209=this['context']['plugins']['get'](z);_0x2be209['_activeAnnotation']=_0x3f55a3;const _0x412f4b=this['activeAnnotation'];_0x2be209['refresh']({'blurredAnnotation':_0x412f4b,'activatedAnnotation':_0x3f55a3}),this['activeAnnotation']=_0x3f55a3;}['attach'](_0x5f04a4){this['annotations']=_0x5f04a4;const _0x3e2d57=this['context']['plugins']['get'](z);if(_0x3e2d57['_annotations']=_0x5f04a4,this['isAttached'])throw new _0x4a98c7('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3e2d57,'set:container',()=>{this['detach'](),this['listenTo'](_0x3e2d57,'change:container',_0xd0d0c6=>{_0xd0d0c6['off'](),this['attach'](_0x5f04a4);});}),_0x3e2d57['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x443114=_0x35bb14=>{_0x35bb14['updateTargetRect'](),_0x3e2d57['addAnnotation'](_0x35bb14);};for(const _0x4adb09 of _0x5f04a4)_0x443114(_0x4adb09);this['listenTo'](_0x5f04a4,'add',(_0x328c6d,_0x361ab0)=>{_0x443114(_0x361ab0);}),this['listenTo'](_0x5f04a4,'remove',(_0x1493e3,_0x28b63f,_0x25fbf4)=>{_0x3e2d57['rearrange']({'removedAnnotation':_0x28b63f,'previousAnnotation':_0x5f04a4['get'](_0x25fbf4-0x1),'nextAnnotation':_0x5f04a4['get'](_0x25fbf4+0x1)}),_0x28b63f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5f04a4,'focus',(_0x50ce5c,_0x4777d6)=>{this['setActiveAnnotation'](_0x4777d6);}),this['listenTo'](_0x5f04a4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x24330a=this['context']instanceof _0x25692d?this['context']['editors']:new _0x28f05f([this['context']]);for(const _0x5c3414 of _0x24330a)this['_integrateWithEditorAnnotations'](_0x5c3414);this['listenTo'](_0x24330a,'add',(_0x59a068,_0x24efcb)=>{this['listenTo'](_0x24efcb,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x24efcb);});}),this['listenTo'](_0x24330a,'remove',(_0x446809,_0x3e4627)=>{_0x3e4627['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3e4627['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4a98c7('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xfb7078=this['context']['plugins']['get'](z);_0xfb7078['_detachFromContainer'](this['annotations']),this['stopListening'](_0xfb7078),this['stopListening'](this['annotations']),this['context']instanceof _0x25692d&&this['stopListening'](this['context']['editors']);for(const _0x1c53bb of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1c53bb);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3671e2){if(!_0x3671e2['plugins']['has']('EditorAnnotations'))return;const _0x196fdc=_0x3671e2['plugins']['get']('EditorAnnotations'),_0x4ac144=()=>{const _0x5dd279=_0x196fdc['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x5dd279[0x0]||null);};this['listenTo'](_0x196fdc,'refresh',_0x4ac144),this['listenTo'](_0x196fdc,'blur',(_0x5116c8,{isAnnotationTracked:_0xcf4722})=>{this['activeAnnotation']&&_0xcf4722(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x196fdc,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5e8dee=>{_0x196fdc['hasDomSelection']()&&(_0x4ac144(),_0x5e8dee['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x196fdc);}['_destroyEditorAnnotationsIntegration'](_0x574b03){this['stopListening'](_0x574b03),this['_editorAnnotations']['remove'](_0x574b03);}}class C extends _0x5b9b26{['counterView'];constructor(_0x3099ff){super(_0x3099ff);const _0x188d7a=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3ec7a5,_0x40eb81)=>_0x3ec7a5?'...':_0x40eb81['toString']()),this['set']('annotationType',''),this['icon']=_0x2a550c,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x188d7a['to']('annotationType',_0x8534b9=>'ck-annotation-counter__badge--'+_0x8534b9),_0x188d7a['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x188d7a['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x50de75{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c5973){super(_0x2c5973),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x19fe3e())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x28f05f(),this['_refreshPositioningDebounced']=_0x3eac1b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x32a128(this['context']['locale']),this['balloonPanelView']=new _0x48bf6d(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x4da3aa){this['annotations']=_0x4da3aa;const _0xf350ea=this['context']['plugins']['get'](z),_0x69f810=this['balloonPanelView'];if(_0xf350ea['_annotations']=_0x4da3aa,this['isAttached'])throw new _0x4a98c7('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xf350ea,'set:container',()=>{this['detach'](),this['listenTo'](_0xf350ea,'change:container',_0x1bb3a2=>{_0x1bb3a2['off'](),this['attach'](_0x4da3aa);});}),_0xf350ea['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x13682b=_0x19879c=>{const _0x3117d1=new C(this['context']['locale']);_0xf350ea['addAnnotation'](_0x19879c,_0x3117d1),this['_annotationToNarrowView']['set'](_0x19879c,_0x3117d1),_0x3117d1['bind']('isDirty','annotationType','number')['to'](_0x19879c['view'],'isDirty','type','length'),_0x3117d1['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x69f810['content']['first']!==_0x19879c['view']?(this['_showBalloon'](_0x19879c),_0x19879c['view']['element']['focus'](),this['setActiveAnnotation'](_0x19879c)):this['setActiveAnnotation'](null);});};for(const _0x385d12 of _0x4da3aa)_0x13682b(_0x385d12);this['listenTo'](_0x4da3aa,'add',(_0x145e82,_0x145d89)=>{_0x13682b(_0x145d89);}),this['listenTo'](_0x4da3aa,'remove',(_0x34f5e0,_0x5cbaa5,_0x37e458)=>{this['_annotationToNarrowView']['get'](_0x5cbaa5)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5cbaa5),_0xf350ea['rearrange']({'removedAnnotation':_0x5cbaa5,'previousAnnotation':_0x4da3aa['get'](_0x37e458-0x1),'nextAnnotation':_0x4da3aa['get'](_0x37e458+0x1)}),_0x5cbaa5===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x4da3aa,'focus',(_0x49ef7d,_0x4de217)=>{this['setActiveAnnotation'](_0x4de217);}),this['listenTo'](_0x4da3aa,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x56c80f,_0x31e724)=>{_0x31e724['keyCode']===_0x2ec312['esc']&&_0x69f810['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x69f810['content']['first']),this['_hideBalloon'](),_0x31e724['stopPropagation'](),_0x31e724['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x51de2e,_0x4ccea5)=>{const _0x7b7a3f=_0x4ccea5['target'];_0x69f810['isVisible']&&_0x69f810['element']['contains'](_0x7b7a3f)||_0xf350ea['view']['element']['contains'](_0x7b7a3f)||_0x51de2e['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x2936fd=>_0x2936fd['contains'](_0x7b7a3f))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2c2046=this['context']instanceof _0x25692d?this['context']['editors']:new _0x28f05f([this['context']]);for(const _0x28ca81 of _0x2c2046)this['_integrateWithEditorAnnotations'](_0x28ca81);this['listenTo'](_0x2c2046,'add',(_0x389460,_0x4f052a)=>{this['listenTo'](_0x4f052a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4f052a);});}),this['listenTo'](_0x2c2046,'remove',(_0x42f233,_0xe7ffae)=>{_0xe7ffae['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xe7ffae['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4ee7e8){if(_0x4ee7e8===this['activeAnnotation'])return;const _0x16f997=this['context']['plugins']['get'](z);if(_0x16f997['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4ee7e8,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4ee7e8)_0x16f997['getSidebarItemView'](_0x4ee7e8)?this['_showBalloon'](_0x4ee7e8):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4ee7e8;}['detach'](){if(!this['isAttached'])throw new _0x4a98c7('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x419b27=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x15d156=>_0x15d156['destroy']()),this['_annotationToNarrowView']['clear'](),_0x419b27['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x25692d&&this['stopListening'](this['context']['editors']);for(const _0xefee01 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xefee01);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'](_0x124d89){if(!_0x124d89['plugins']['has']('EditorAnnotations'))return;const _0x15b4fd=_0x124d89['plugins']['get']('EditorAnnotations'),_0x5d2421=this['context']['plugins']['get'](z),_0x31a113=this['annotations'],_0x42feba=this['balloonPanelView'],_0x484125=()=>{const _0x1fa7af=_0x15b4fd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1fa7af),this['setActiveAnnotation'](_0x1fa7af[0x0]||null);};this['listenTo'](_0x15b4fd,'refresh',_0x484125),this['listenTo'](_0x15b4fd,'blur',(_0x4de0b5,{isAnnotationTracked:_0x1bb02b})=>{this['activeAnnotation']&&_0x1bb02b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x15b4fd,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x31a113,'blur',_0x43de9a=>{_0x15b4fd['hasDomSelection']()&&_0x43de9a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2cd283,_0x468995)=>{const _0x5b4140=_0x468995['target'];_0x42feba['isVisible']&&_0x42feba['element']['contains'](_0x5b4140)||_0x5d2421['view']['element']['contains'](_0x5b4140)||this['activeAnnotation']&&_0x15b4fd['hasDomSelection']()&&(_0x484125(),_0x2cd283['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x15b4fd);}['_destroyEditorAnnotationsIntegration'](_0x57e4f8){_0x57e4f8&&(this['stopListening'](_0x57e4f8),this['_editorAnnotations']['remove'](_0x57e4f8));}['_setSelectedAnnotations'](_0x311345){for(const _0x105efd of this['_selectedAnnotations'])_0x311345['includes'](_0x105efd)||this['_manuallyClosedAnnotationViews']['delete'](_0x105efd['view']);this['_selectedAnnotations']=_0x311345;}['_refreshPositioning'](){const _0x289dd9=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x289dd9['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x378a84){if(this['_manuallyClosedAnnotationViews']['has'](_0x378a84['view']))return;const _0x3fea25=this['balloonPanelView']['content']['first'];_0x3fea25!==_0x378a84['view']?(_0x3fea25&&this['_detachListeners'](_0x3fea25),this['_attachListeners'](_0x378a84['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x378a84['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x269595=this['balloonPanelView']['content']['first'],_0x1eec71=_0x269595&&this['annotations']['getByView'](_0x269595);if(!_0x1eec71||!this['_annotationToNarrowView']['has'](_0x1eec71))return;const _0x576b38=this['_annotationToNarrowView']['get'](_0x1eec71)['element'],_0x4d5a16=(function(){const _0x968610=_0x48bf6d['defaultPositions'];return[_0x968610['southArrowNorthEast'],_0x968610['northArrowSouthEast'],_0x968610['southArrowNorth'],_0x968610['northArrowSouth'],_0x968610['southArrowNorthWest'],_0x968610['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x576b38,'positions':_0x4d5a16});}['_hideBalloon'](){const _0x2699a6=this['balloonPanelView'],_0x484c72=_0x2699a6['content']['first'];_0x484c72&&(this['_detachListeners'](_0x484c72),_0x2699a6['unpin'](),_0x2699a6['content']['clear']());}['_attachListeners'](_0xf5582a){this['listenTo'](_0xf5582a,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xf5582a,'Esc',(_0x3c71a7,_0x52db2c)=>{this['_manuallyClosedAnnotationViews']['add'](_0xf5582a),this['_hideBalloon'](),_0x52db2c();});}['_detachListeners'](_0x261a1d){this['stopListening'](_0x261a1d);}}class c extends _0x1ca286{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x17c45f,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x228d85){super(_0x228d85),_0x228d85['editing']['view']['addObserver'](_0x1a2798),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x228d85['plugins']['get'](_0x17c45f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x11da04=this['editor']['plugins']['get'](j);_0x11da04['context']===this['editor']&&(_0x11da04['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1dd2c0,_0x874554)=>{const _0x302dd6=this['_balloon'];if(this['isAttached']&&_0x302dd6['visibleView']){const _0x4d5138=this['annotations']['getByView'](_0x302dd6['visibleView']);_0x4d5138&&this['_closeAnnotation'](_0x4d5138),_0x874554();}}));}['afterInit'](){const _0x48855a=this['editor']['plugins']['get'](j);_0x48855a['context']===this['editor']&&(_0x48855a['hasActive']()||_0x48855a['switchTo']('inline'));}['setActiveAnnotation'](_0x53a3eb){_0x53a3eb!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x53a3eb&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x53a3eb)&&this['_addAnnotationToBalloon'](_0x53a3eb,!0x0),_0x53a3eb['isActive']=!0x0),_0x53a3eb||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x53a3eb);}['attach'](_0x539b36){this['annotations']=_0x539b36;const _0x4925e5=this['editor']['plugins']['get'](j),_0x48bd95=this['_balloon'];if(this['isAttached'])throw new _0x4a98c7('inlineannotations-attach-already-attached',this);if(_0x4925e5['context']!==this['editor'])throw new _0x4a98c7('inlineannotations-not-allowed-with-context',this);const _0x16976c=this['editor']['plugins']['get'](b);this['listenTo'](_0x16976c,'refresh',()=>{const _0x3499c6=_0x16976c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x56b6f1,_0x1243f8;!this['_forceRefresh']&&(_0x56b6f1=_0x3499c6,_0x1243f8=this['_selectedAnnotations'],_0x56b6f1['length']===_0x1243f8['length']&&_0x56b6f1['every'](_0x438868=>_0x1243f8['includes'](_0x438868)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3499c6),this['setActiveAnnotation'](_0x3499c6[0x0]||null));}),this['listenTo'](_0x16976c,'blur',(_0x24736c,{isAnnotationTracked:_0x1ff512})=>{this['activeAnnotation']&&_0x1ff512(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3e8333,_0x4a2f61,_0x34593f)=>{_0x34593f||this['setActiveAnnotation'](null);}),this['listenTo'](_0x539b36,'remove',(_0x35be6f,_0x4053b3)=>{this['_removeAnnotationFromBalloon'](_0x4053b3),_0x4053b3===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x48bd95,'change:visibleView',(_0x2eca92,_0x20dce1,_0x299832,_0x1df984)=>{_0x1df984&&this['stopListening'](_0x1df984);const _0x35bade=_0x539b36['getByView'](_0x299832);_0x299832&&_0x35bade&&(this['listenTo'](_0x299832,'change:height',()=>{_0x48bd95['updatePosition']();}),this['listenTo'](_0x299832,'Esc',()=>{this['_closeAnnotation'](_0x35bade),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x35bade&&this['setActiveAnnotation'](_0x35bade));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x48bd95['visibleView']&&(_0x539b36['getByView'](_0x48bd95['visibleView'])&&_0x48bd95['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 _0x4a98c7('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3e20ab of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3e20ab);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x3e3dbb){for(const _0x36f839 of this['_selectedAnnotations'])_0x3e3dbb['includes'](_0x36f839)||this['_manuallyClosed']['delete'](_0x36f839);for(const _0x3483f8 of this['annotations'])_0x3e3dbb['includes'](_0x3483f8)||this['_removeAnnotationFromBalloon'](_0x3483f8);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x429ede of _0x3e3dbb)this['_addAnnotationToBalloon'](_0x429ede);}this['_selectedAnnotations']=_0x3e3dbb;}['_addAnnotationToBalloon'](_0x3b41a6,_0xb3e59b=!0x1){this['_manuallyClosed']['has'](_0x3b41a6)||(this['_addedAnnotations']['has'](_0x3b41a6)||this['_balloon']['hasView'](_0x3b41a6['view'])||(this['_addedAnnotations']['add'](_0x3b41a6),this['_balloon']['add']({'stackId':_0x3b41a6['view']['id'],'view':_0x3b41a6['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3b41a6)}})),_0xb3e59b&&this['_balloon']['showStack'](_0x3b41a6['view']['id']));}['_getBalloonTargetForAnnotation'](_0x410a6e){const _0x5baf76=_0x410a6e['target'],_0x5bf273=this['editor']['editing']['view'],_0xe066cf=_0x5bf273['document']['selection']['getFirstRange'](),_0x1f8d52=_0x5bf273['domConverter']['viewRangeToDom'](_0xe066cf);if(_0x1f8d52['collapse'](!0x0),_0x5baf76){if(_0x5baf76 instanceof _0xee8513)return _0x5baf76;let _0x55b18e=[];for(const _0x1af236 of _0x5baf76)_0x55b18e['push'](...F(_0x1af236['getClientRects']()));_0x55b18e=function(_0x3c9de4){const _0x55a375=[];let _0x29f6fe=_0x3c9de4[0x0];for(let _0x217acf=0x1;_0x217acf<_0x3c9de4['length'];_0x217acf++)P(_0x29f6fe,_0x3c9de4[_0x217acf])?_0x29f6fe['width']+=_0x3c9de4[_0x217acf]['width']:(_0x55a375['push'](_0x29f6fe),_0x29f6fe=_0x3c9de4[_0x217acf]);return _0x55a375['push'](_0x29f6fe),_0x55a375;}(_0x55b18e);const _0x375fd6=_0x1f8d52['getBoundingClientRect']();return _0x55b18e['find'](_0x4b2467=>_0x4b2467['top']<=_0x375fd6['top']&&_0x4b2467['bottom']>=_0x375fd6['bottom']&&_0x4b2467['left']<=_0x375fd6['left']&&_0x4b2467['right']>=_0x375fd6['right'])||_0x55b18e[0x0];}return _0x410a6e['targetRect']||_0x1f8d52;}['_removeAnnotationFromBalloon'](_0x1bb1e7){this['_addedAnnotations']['has'](_0x1bb1e7)&&this['_balloon']['hasView'](_0x1bb1e7['view'])&&(this['_addedAnnotations']['delete'](_0x1bb1e7),this['_balloon']['remove'](_0x1bb1e7['view']));}['_closeAnnotation'](_0x3147cd){this['_manuallyClosed']['add'](_0x3147cd),this['_removeAnnotationFromBalloon'](_0x3147cd);}}function F(_0x393af5){return Array['from'](_0x393af5)['map'](DOMRect['fromRect']);}function P(_0x4c2ae6,_0xa8c3b3){return _0x4c2ae6['top']===_0xa8c3b3['top']&&_0x4c2ae6['bottom']===_0xa8c3b3['bottom']&&_0x4c2ae6['right']===_0xa8c3b3['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x4601d3,_0x18e6f2){super(_0x4601d3),this['set']('isEmpty',!_0x18e6f2['length']),this['focusTracker']=new _0x59f96f(),this['_annotationViews']=_0x18e6f2,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xa1a196({'focusables':_0x18e6f2,'focusTracker':this['focusTracker']}),this['listenTo'](_0x18e6f2,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x18e6f2,'remove',(_0xf58913,_0x1c8899)=>{_0x1c8899['isActive']&&this['focus'](),_0x18e6f2['length']||(this['isEmpty']=!0x0);});const _0x271869=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x4601d3,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x18e6f2},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x271869['if']('isEmpty','ck-hidden',_0x45c452=>!_0x45c452)]},'children':[{'text':N(_0x4601d3,'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 _0x2c606d of this['_annotationViews'])this['focusTracker']['add'](_0x2c606d['element']);this['_annotationViews']['on']('change',(_0x2949a7,{added:_0x131096,removed:_0x4ef862})=>{for(const _0x3e0d3e of _0x131096)this['focusTracker']['add'](_0x3e0d3e['element']);for(const _0x42ab33 of _0x4ef862)this['focusTracker']['remove'](_0x42ab33['element']);});}}class p extends _0x50de75{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x11a1a2){super(_0x11a1a2),this['archivedThreads']=new _0x28f05f();}['init'](){const _0x116c2e=this['context'],_0x1d21d5=_0x116c2e['plugins']['get'](o),_0x36e09c=_0x116c2e['plugins']['get'](y);this['listenTo'](_0x1d21d5,'addCommentThread',(_0x24cbd3,{threadId:_0xf27405})=>{const _0xf893f4=_0x1d21d5['getCommentThread'](_0xf27405);_0xf893f4['archivedAt']&&this['archivedThreads']['add'](_0xf893f4,this['_calculatePosition'](_0xf893f4['archivedAt'])),this['listenTo'](_0xf893f4,'change:archivedAt',(_0x588bcf,_0x2af76d,_0x410a2b)=>{_0x410a2b?this['archivedThreads']['has'](_0xf893f4)||this['archivedThreads']['add'](_0xf893f4,this['_calculatePosition'](_0xf893f4['archivedAt'])):this['archivedThreads']['has'](_0xf893f4)&&this['archivedThreads']['remove'](_0xf893f4);});}),this['listenTo'](_0x1d21d5,'removeCommentThread',(_0x17dd69,{threadId:_0x474d4c})=>{const _0x5b13bd=_0x1d21d5['getCommentThread'](_0x474d4c);this['stopListening'](_0x5b13bd),this['archivedThreads']['has'](_0x5b13bd)&&this['archivedThreads']['remove'](_0x5b13bd);},{'priority':'highest'}),this['listenTo'](_0x36e09c['collection'],'focus',(_0x1b9a6b,_0x192ecf)=>{_0x192ecf['isVisible']||(_0x192ecf['isActive']=!0x0,_0x36e09c['activate'](_0x192ecf));});}['_calculatePosition'](_0x40fbc3){const _0x4af3b9=[...this['archivedThreads']]['findIndex'](_0x4db624=>_0x4db624['archivedAt']<_0x40fbc3);return _0x4af3b9>-0x1?_0x4af3b9:this['archivedThreads']['length'];}}class a extends _0x1ca286{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x72ed32];}constructor(_0x3b7796){super(_0x3b7796),this['annotationViews']=new _0xd11430(),this['_pendingThreads']=[];}['init'](){const _0xe3db02=this['editor'],_0x5bdb9b=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xe3db02['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5b9b26,!0x0)),_0xe3db02['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x11e21b=this['_createCommentsArchiveButton'](_0xade49);return _0x11e21b['set']({'role':'menuitemcheckbox'}),_0x11e21b;});const _0x17c090=_0xe3db02['plugins']['get'](p),_0xfd8a72=_0xe3db02['plugins']['get']('Annotations'),_0x1925dc=_0xe3db02['plugins']['get']('CommentsRepository');_0x17c090['archivedThreads']['forEach'](_0x5b8c2c=>{this['_handleNewThread'](_0x5b8c2c);}),this['listenTo'](_0x17c090['archivedThreads'],'add',(_0x237d75,_0x1ddbb5)=>{this['_handleNewThread'](_0x1ddbb5);}),this['listenTo'](_0xfd8a72['collection'],'add',(_0x483b74,_0x4a0409)=>{const _0x6d6a3f=this['_pendingThreads']['find'](_0x167375=>{const _0x54f839=_0x1925dc['_threadToController']['get'](_0x167375);return _0x54f839&&_0x4a0409['innerView']===_0x54f839['view'];});if(_0x6d6a3f){const _0x615a4=this['_calculatePosition'](_0x6d6a3f['archivedAt']);this['_addAnnotationToArchive'](_0x4a0409,_0x615a4),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x6d6a3f),0x1);}}),this['listenTo'](_0x17c090['archivedThreads'],'remove',(_0x127465,_0x392254)=>{const _0xc68cd3=_0xe3db02['config']['get']('collaboration.channelId');if(!_0xc68cd3||_0x392254['channelId']===_0xc68cd3){if(this['_pendingThreads']['includes'](_0x392254))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x392254),0x1);else{const _0x5d53bd=_0x1925dc['_threadToController']['get'](_0x392254),_0x3d0fa9=_0xfd8a72['getByInnerView'](_0x5d53bd['view']);this['annotationViews']['remove'](_0x3d0fa9['view']),this['stopListening'](_0x3d0fa9),this['stopListening'](_0x3d0fa9['focusableElements']);}}}),this['listenTo'](_0xfd8a72['collection'],'add',(_0x4a59ea,_0x321d66)=>{this['listenTo'](_0x321d66,'escape',_0x5bdb9b);}),this['listenTo'](_0xfd8a72['collection'],'remove',(_0x4eff02,_0x5e5ab2)=>{this['stopListening'](_0x5e5ab2,'escape',_0x5bdb9b);});}['_addAnnotationToArchive'](_0x43efb9,_0x1e985b){this['listenTo'](_0x43efb9,'set:isVisible',_0x89e771=>{_0x89e771['return']=!0x1,_0x89e771['stop']();}),this['annotationViews']['add'](_0x43efb9['view'],_0x1e985b);}['_handleNewThread'](_0x1fbcd2){const _0x29f1be=this['editor']['plugins']['get']('CommentsRepository'),_0x206bde=this['editor']['plugins']['get']('Annotations'),_0x540e4b=this['editor']['config']['get']('collaboration.channelId');if(!_0x540e4b||_0x1fbcd2['channelId']===_0x540e4b){const _0x55849b=_0x29f1be['_threadToController']['get'](_0x1fbcd2);if(!_0x55849b)return void this['_pendingThreads']['push'](_0x1fbcd2);const _0x541c26=this['_calculatePosition'](_0x1fbcd2['archivedAt']),_0x26b4f9=_0x206bde['getByInnerView'](_0x55849b['view']);_0x26b4f9['isVisible']&&_0x206bde['_visibleAnnotations']['remove'](_0x26b4f9),this['_addAnnotationToArchive'](_0x26b4f9,_0x541c26);}}['_calculatePosition'](_0x207701){const _0x4aaaa4=this['editor']['config']['get']('collaboration.channelId'),_0x55d641=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x45822d=>_0x45822d['channelId']===_0x4aaaa4)['findIndex'](_0x46672d=>_0x46672d['archivedAt']<_0x207701);return _0x55d641<0x0||_0x55d641>this['annotationViews']['length']?this['annotationViews']['length']:_0x55d641-0x1;}['_toggleDialog'](){const _0x578854=this['editor'],_0x29ea3b=_0x578854['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x578854['locale'],this['annotationViews'])),'commentsArchive'===_0x29ea3b['id']?_0x29ea3b['hide']():_0x29ea3b['show']({'id':'commentsArchive','title':N(_0x578854['locale'],'COMMENTS_ARCHIVE'),'icon':_0x107bc7,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x20de5a['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x457163,_0xc2f9a7=!0x1){const _0x42b13a=this['editor']['locale'],_0x41c007=this['editor']['plugins']['get']('Dialog'),_0x1a9ed5=new _0x457163(_0x42b13a);return _0x1a9ed5['bind']('isEnabled')['to'](this,'isEnabled'),_0x1a9ed5['bind']('isOn')['to'](_0x41c007,'id',_0x3846cf=>'commentsArchive'===_0x3846cf),_0x1a9ed5['set']({'label':N(_0x42b13a,'COMMENTS_ARCHIVE'),'icon':_0x107bc7,'isToggleable':!0x0}),_0xc2f9a7&&(_0x1a9ed5['tooltip']=!0x0),this['listenTo'](_0x1a9ed5,'execute',()=>this['_toggleDialog']()),_0x1a9ed5;}['_hideDialogOnAnnotationEscape']=_0x2d5662=>{const _0x4383e0=_0x2d5662['source'];if(!this['annotationViews']['has'](_0x4383e0['view']))return;const _0x36a36b=this['editor']['plugins']['get']('Dialog');_0x36a36b['isOpen']&&'commentsArchive'===_0x36a36b['id']&&(_0x36a36b['hide'](),_0x2d5662['stop']());};}class gi extends _0x1ca286{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,gt as CommentThreadController,ie as CommentThreadInputView,Tt as CommentThreadView,_t as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|