@ckeditor/ckeditor5-comments 47.3.0-alpha.1 → 47.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- 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 +19 -19
- 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.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.js +2 -2
- 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/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x511654={}){function _0x5f5053(_0x2a3a11){return _0x2a3a11['map'](_0x3ab273=>String['fromCharCode'](_0x3ab273))['join']('');}(_0x511654=Object['assign']({},_0x511654))['plugins']||(_0x511654['plugins']=hs['defaultPlugins']),super(_0x511654),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x5f5053([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5f5053([0x76,0x69,0x65,0x77])][_0x5f5053([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5f5053([0x61,0x75,0x74,0x6f]),this[_0x5f5053([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5f5053([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5f5053([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5f5053([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5f5053([0x6f,0x6b])});}['create'](){const _0x76ce43=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x76ce43))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x399280=>{const _0x550100=this['model']['document']['getRoot'](),_0x14b54d=_0x550100&&_0x550100['getChild'](_0x550100['childCount']-0x1);_0x399280['setSelection'](_0x14b54d,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x549e4c=this['editing']['view'],_0x485d4e=_0x549e4c['document']['getRoot'](),_0x1a53a3=_0x485d4e['getChild'](0x0);_0x485d4e['childCount']>0x1||!_0x1a53a3||'p'!=_0x1a53a3['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x549e4c,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1a53a3['placeholder']=this['placeholder']),Ft({'view':_0x549e4c,'element':_0x1a53a3,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1a53a3);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4a9e,_0x40bea3={}){super(_0x4a9e),this['editor']=null,this['_editorConfig']=_0x40bea3,this['set']('value',_0x40bea3['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x4a9e,'Reply...')),this['set']('submitLabel',N(_0x4a9e,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x7e52ae(),this['focusCycler']=new _0x8a5706({'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',(_0x595ca7,_0x537626)=>{this['cancelButtonView']['fire']('execute'),_0x537626();}),this['keystrokes']['set']('Ctrl+Enter',(_0xb3681d,_0x31fed9)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x31fed9());}),this['on']('submit',(_0x34a27b,_0x7fb777)=>{_0x7fb777['length']>0xfde8?(alert(N(_0x4a9e,'TOO_LONG_COMMENT_ALERT',[_0x7fb777['length'],0xfde8])),_0x34a27b['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 _0x27b866=this['editor'];this['element']['insertBefore'](_0x27b866['ui']['element'],this['element']['firstChild']),_0x27b866['model']['document']['on']('change',()=>this['value']=_0x27b866['getData']()),_0x27b866['bind']('placeholder')['to'](this),this['focusables']['add'](_0x27b866['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4b855e){-0x1===_0x4b855e?(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:_0x26ab30}=this,_0x52911d=new _0x1f4f59(_0x26ab30);return _0x52911d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x52911d['withText']=!0x0,_0x52911d['bind']('label')['to'](this,'submitLabel'),_0x52911d['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x52911d['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x537b09,_0xfa51ca)=>!_0xfa51ca&&!!_0x537b09['trim']()),_0x52911d;}['_createCancelButton'](){const {locale:_0x400bcc}=this,_0x4b3cbc=new _0x1f4f59(_0x400bcc);return _0x4b3cbc['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4b3cbc['label']=N(_0x400bcc,'Cancel'),_0x4b3cbc['withText']=!0x0,_0x4b3cbc['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4b3cbc;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x11bb01=>{this['focusTracker']['add'](_0x11bb01['element']);}),this['focusables']['on']('change',(_0xeeb3cd,_0x1ce512)=>{for(const _0x3f8826 of Array['from'](_0x1ce512['added'])['reverse']())this['focusTracker']['add'](_0x3f8826['element']);});}}class ie extends kt{constructor(_0x5702e7,_0x5592c2,_0x9e1f4c){super(_0x5702e7),this['commentInputView']=new es(_0x5702e7,_0x9e1f4c),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x37c275,_0x45521d)=>_0x37c275||!!_0x45521d),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 _0x19baf2(_0x5702e7,_0x5592c2),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'](_0x5d85c3){this['commentInputView']['focus'](_0x5d85c3);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x28d418,_0x5c683c)=>{const {submitButtonView:_0x33a7f1,cancelButtonView:_0xb7d648,editor:_0x287d16}=this['commentInputView'];[_0x33a7f1['element'],_0xb7d648['element'],_0x287d16?_0x287d16['editing']['view']['getDomRoot']():null]['filter'](_0x214ca6=>_0x214ca6)['some'](_0x5302f0=>_0x5302f0['contains'](_0x5c683c['target']))||(this['focus'](),_0x5c683c['preventDefault']());});}}class rs extends kt{constructor(_0x34c0c4){super(_0x34c0c4);const _0x1e5be3=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1e5be3['to']('count',_0x257962=>N(_0x34c0c4,'NUMBER_OF_COMMENTS',_0x257962))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5717ba,_0x1c7b75,_0x121712){super(_0x5717ba);const _0x355b8d=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1c7b75['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1c7b75,this['_config']=_0x121712,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x7e52ae(),this['keystrokes']=new jt(),this['focusCycler']=new _0x8a5706({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x17a47e=>this['commentViews']['map'](_0x41b4fd=>_0x41b4fd['element'])['includes'](_0x17a47e['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5717ba),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5d77bf=>_0x5d77bf-this['_config']['maxCommentsWhenCollapsed']);for(const _0x297180 of _0x1c7b75['comments'])this['_handleNewCommentModel'](_0x297180);this['_handleInfoComment'](),this['listenTo'](_0x1c7b75['comments'],'add',(_0x51b7f4,_0x5ce40f)=>{const _0x2db236=this['_calculatePosition'](_0x5ce40f);this['length']++,this['_handleNewCommentModel'](_0x5ce40f,_0x2db236),this['refreshVisibleViews']();}),this['listenTo'](_0x1c7b75['comments'],'remove',(_0x5c7506,_0x11fe3a)=>{this['length']--,this['_handleRemoveCommentModel'](_0x11fe3a),this['refreshVisibleViews']();}),this['listenTo'](_0x1c7b75,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1c7b75,'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',_0x355b8d['if']('length','ck-hidden',_0x4aa3ee=>!_0x4aa3ee)],'aria-label':N(_0x5717ba,'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'](_0x22cb1e){-0x1===_0x22cb1e?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x38e238 of this['commentViews'])_0x38e238['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4417d5,_0x17d314){const _0x1c8ef7=new this['_config']['CommentView'](this['locale'],_0x4417d5,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1c8ef7['viewUid']=_0x4417d5['id'],_0x1c8ef7['delegate']('removeComment')['to'](this),_0x1c8ef7['delegate']('updateComment')['to'](this),_0x1c8ef7['delegate']('resolveCommentThread')['to'](this),_0x1c8ef7['delegate']('editorReady')['to'](this),_0x1c8ef7['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1c8ef7,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1c8ef7,_0x17d314);}['_calculatePosition'](_0x56dc42){const _0x30e4bd=this['_model']['_findOptimalIndex'](_0x56dc42);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x56dc42['authoredAt']?_0x30e4bd-0x1:_0x30e4bd:_0x30e4bd-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x262d6b={'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'],_0x262d6b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x262d6b));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x43aecc){const _0x11bfa5=this['commentViews']['remove'](_0x43aecc['id']);this['stopListening'](_0x11bfa5),_0x11bfa5['isEditMode']&&this['_updateHasDirtyComment'](),_0x11bfa5['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2405d1=>_0x2405d1['isEditMode']);}['_rearrangeCollapse'](){const _0x439456=function(_0x59580b){const _0x200d85=new _0x30c328();for(const _0x115d77 of _0x59580b)_0x200d85['add'](_0x115d77);return _0x200d85;}(this['commentViews']),_0x3eeb34=this['_collapsedCommentsView']['count'];for(let _0x36a0c2=0x1;_0x36a0c2<=_0x3eeb34;_0x36a0c2++)_0x439456['remove'](0x1);for(const _0x5dc1b6 of _0x439456)_0x5dc1b6['collapse']();_0x3eeb34>0x0&&_0x439456['add'](this['_collapsedCommentsView'],0x1),ns(_0x21093d(Array['from'](this['visibleViews']),Array['from'](_0x439456)),this['visibleViews'],_0x439456);}['_rearrangeExpand'](){ns(_0x21093d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x494704 of this['visibleViews'])_0x494704['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x57674d=>{this['focusTracker']['add'](_0x57674d['element']),this['keystrokes']['listenTo'](_0x57674d['element']);}),this['commentViews']['on']('change',(_0x177af0,_0x4e494e)=>{for(const _0x22ddb8 of _0x4e494e['removed'])this['focusTracker']['remove'](_0x22ddb8['element']),this['keystrokes']['stopListening'](_0x22ddb8['element']);for(const _0x338471 of Array['from'](_0x4e494e['added'])['reverse']())this['focusTracker']['add'](_0x338471['element']),this['keystrokes']['listenTo'](_0x338471['element']);});}}function ns(_0x383c1d,_0x158b24,_0x3f81aa){let _0x616b47=0x0;for(const _0x348edd of _0x383c1d)switch(_0x348edd){case'insert':_0x158b24['add'](_0x3f81aa['get'](_0x616b47),_0x616b47),_0x616b47++;break;case'delete':_0x158b24['remove'](_0x616b47);break;case'equal':_0x616b47++;}}class oe extends kt{constructor(_0x445516){super(_0x445516);const _0x1eeb23=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1eeb23['to']('contextValue',_0x528359=>N(_0x445516,'THREAD_CONTEXT_LABEL',_0x528359)),'tabindex':-0x1},'children':[{'text':_0x1eeb23['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x30cadd,_0x2caa15){super(_0x30cadd);const _0x445dab=this['bindTemplate'];this['_model']=_0x2caa15,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x7e52ae(),this['keystrokes']=new jt(),this['focusCycler']=new _0x8a5706({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2dc366=>!!_0x2dc366),this['bind']('contextValue')['to'](this['_model'],'context',_0x49b626=>_0x49b626&&_0x49b626['value']?this['_trimContextValue'](_0x49b626['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',_0x445dab['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 _0x31ecd8=new _0x1f4f59(this['locale']);return _0x31ecd8['label']=N(this['locale'],'Reopen'),_0x31ecd8['tooltip']=N(this['locale'],'Reopen'),_0x31ecd8['icon']=_0x305c99,_0x31ecd8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1b0bb7=>!_0x1b0bb7),_0x31ecd8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x45f531,_0xda7de6)=>_0x45f531&&_0xda7de6),_0x31ecd8['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x31ecd8;}['_trimContextValue'](_0x3a1b24){if(_0x3a1b24['length']<0x96)return _0x3a1b24;const _0x5a84a9=_0x3a1b24['lastIndexOf']('\x20',0x93);return _0x3a1b24['substring'](0x0,_0x5a84a9>-0x1?_0x5a84a9:0x93)+'...';}['_attachContextActions'](){const _0x1c34dd=this['element']['querySelector']('.ck-context'),_0x52f834=_0x1c34dd['querySelector']('.ck-context__value');this['listenTo'](_0x1c34dd,'mouseenter',()=>{_0x52f834['offsetWidth']<_0x52f834['scrollWidth']&&_0x1c34dd['classList']['add']('overlay');}),this['listenTo'](_0x1c34dd,'mouseleave',()=>{_0x1c34dd['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x24b639 of this['focusables'])this['focusTracker']['add'](_0x24b639['element']),this['keystrokes']['listenTo'](_0x24b639['element']);}['_createContextView'](){const _0x45cc4c=new oe(this['locale']);return _0x45cc4c['bind']('contextValue')['to'](this),_0x45cc4c;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x46f866,_0x55f52e,_0x1682ae,_0x35c4ca){super(_0x46f866),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x55f52e,this['_localUser']=_0x1682ae,this['_config']=_0x35c4ca,this['commentThreadHeaderView']=new Xt(_0x46f866,_0x55f52e),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x46f866,N(_0x46f866,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x46f866,_0x55f52e,Object['assign']({'CommentView':this['_config']['CommentView']},_0x35c4ca)),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',(_0x5f0637,_0x65be2c)=>_0x5f0637||!!_0x65be2c),this['bind']('isUnlinked')['to'](_0x55f52e,'unlinkedAt',_0x222dd7=>!!_0x222dd7),this['bind']('ariaLabel')['to'](this,'length',_0x256fb4=>{const _0x4d5867=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x256fb4,_0x4d5867]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x7e52ae(),this['keystrokes']=new jt(),this['focusCycler']=new _0x8a5706({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3dc23f=>_0x3dc23f['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 _0x2f2b1e=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3e6857=_0x2f2b1e['commentInputView'];return _0x2f2b1e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3e6857,'value',(_0x53fbf5,_0x18b435,_0x4e033b,_0x50e80c,_0x52d3cc)=>!!_0x52d3cc||!!_0x50e80c&&_0x4e033b&&!_0x18b435||_0x53fbf5&&_0x4e033b&&!_0x18b435),_0x3e6857['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xc6a3e1,_0x4225dd,_0x2fa598)=>{let _0x2308ef;return _0x2308ef=_0x2fa598&&_0x4225dd?'Reply\x20to\x20reopen\x20discussion...':_0xc6a3e1?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x2308ef);}),_0x3e6857['bind']('submitLabel')['to'](this,'length',_0x279c9e=>N(this['locale'],_0x279c9e?'Reply':'Comment')),_0x3e6857['on']('submit',(_0x45cf34,_0x94ca0c)=>{this['fire']('addComment',_0x94ca0c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3e6857['on']('cancel',()=>{this['focus']();}),_0x3e6857['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3e6857['on']('cancel',_0x35b76b=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x35b76b['stop']());}),this['on']('change:isActive',(_0x2f2b01,_0x439807,_0x1c35d2)=>{_0x1c35d2||this['length']||_0x3e6857['value']||this['fire']('removeCommentThread');}),_0x2f2b1e;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x5af2cf(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x37718c,target:_0x23002d,type:_0x49f384,isVisible:_0x5e5ede=!0x0}){super(),this['view']=_0x37718c,this['view']['element']||this['view']['render'](),this['_type']=_0x49f384,this['_target']=_0x23002d,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x30c328([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x11bc0c,_0x394c41)=>{this['view']['focusTracker']['add'](_0x394c41);}),this['focusableElements']['on']('remove',(_0x12c71d,_0x3e26c0)=>{this['view']['focusTracker']['remove'](_0x3e26c0);}),this['set']('isVisible',_0x5e5ede);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x47976c=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x47976c),_0x47976c;}get['targetRect'](){const _0x2fe710=this['target'];if(null===_0x2fe710)return null;if(_0x2fe710 instanceof _0x15797d)return _0x2fe710;const _0xaab3d9=_0x2fe710['filter'](_0x13fa8b=>function(_0x19680d){const _0x4b416a=_0x19680d['offsetParent'];if(_0x4b416a)return!0x0;const _0x1dbfa3=_0x19680d['getClientRects']()['item'](0x0);return!!_0x1dbfa3;}(_0x13fa8b));return 0x0===_0xaab3d9['length']?null:new _0x15797d(_0xaab3d9[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x452f86){this['view']['isActive']=_0x452f86,this['view']['mainView']['isActive']=_0x452f86;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x37b31c){if(!(null===_0x37b31c||_0x37b31c instanceof _0x15797d||Array['isArray'](_0x37b31c)&&_0x37b31c['every'](_0x42272a=>fi(_0x42272a))))throw new _0xb3df69('annotation-invalid-target',null,{'target':_0x37b31c});}['_getNormalizedTarget'](){const _0x2f2bc7='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x2f2bc7)?[_0x2f2bc7]:_0x2f2bc7;}}function fi(_0x4c7c94){return null!==_0x4c7c94&&'object'==typeof _0x4c7c94&&'nodeType'in _0x4c7c94&&0x1===_0x4c7c94['nodeType'];}class S extends _0x30c328{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x37557a=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x7e52ae(),this['_focusTracker']['on']('change:isFocused',(_0x1bca1b,_0x296069,_0x2e5404)=>{_0x2e5404||this['fire']('blur');});for(const _0x4b0360 of _0x37557a)this['add'](_0x4b0360);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x30337a){if(this['has'](_0x30337a))throw new _0xb3df69('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x30337a['innerView'],_0x30337a),this['_viewToAnnotation']['set'](_0x30337a['view'],_0x30337a);for(const _0x559b2b of _0x30337a['focusableElements'])this['_focusTracker']['add'](_0x559b2b);this['listenTo'](_0x30337a['focusableElements'],'add',(_0x1ba42d,_0x284178)=>{this['_focusTracker']['add'](_0x284178);}),this['listenTo'](_0x30337a['focusableElements'],'remove',(_0x445b22,_0x1b9d2d)=>{this['_focusTracker']['remove'](_0x1b9d2d);}),this['listenTo'](_0x30337a['view']['focusTracker'],'change:isFocused',(_0x2ac05d,_0x55c604,_0x4edcf0)=>{_0x4edcf0&&this['fire']('focus',_0x30337a);}),_0x30337a['updateTargetRect']();const _0x226ad9=this['_getOrderInContent'](_0x30337a['view']['targetRect']);return super['add'](_0x30337a,_0x226ad9);}['remove'](_0x60bd3d){if(!this['has'](_0x60bd3d))throw new _0xb3df69('annotationcollection-not-existing-item',null);this['stopListening'](_0x60bd3d['view']['focusTracker']),this['stopListening'](_0x60bd3d['focusableElements']);for(const _0x4f6330 of _0x60bd3d['focusableElements'])this['_focusTracker']['remove'](_0x4f6330);return this['_viewToAnnotation']['delete'](_0x60bd3d['view']),this['_innerViewToAnnotation']['delete'](_0x60bd3d['innerView']),super['remove'](_0x60bd3d);}['getByInnerView'](_0x2ab9e8){return this['_innerViewToAnnotation']['get'](_0x2ab9e8);}['getByView'](_0x4eb11b){return this['_viewToAnnotation']['get'](_0x4eb11b);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x674db3 of this)_0x674db3['updateTargetRect']();this['_sort']();}['_sort'](){const _0x15aecf=Array['from'](this)['sort']((_0x5e8325,_0x12d1cd)=>w(_0x5e8325['view']['targetRect'],_0x12d1cd['view']['targetRect']));for(let _0xb490ab=_0x15aecf['length']-0x1;_0xb490ab>0x0;_0xb490ab--){const _0x493b61=_0x15aecf[_0xb490ab];_0xb490ab!==this['getIndex'](_0x493b61)&&(this['remove'](_0x493b61),this['add'](_0x493b61));}}['_getOrderInContent'](_0x27a74b){let _0x5be0d2=0x0;if(!_0x27a74b)return this['length'];for(const _0x23293f of this){const _0x2ee2a4=_0x23293f['view']['targetRect'];if(_0x2ee2a4){if(w(_0x27a74b,_0x2ee2a4)<0x0)return _0x5be0d2;_0x5be0d2++;}}return _0x5be0d2;}}function v({source:_0x47a6fd,target:_0x3222f6,filter:_0x57b852}){for(const _0x141a6b of _0x47a6fd)_0x57b852(_0x141a6b)&&_0x3222f6['add'](_0x141a6b);_0x3222f6['listenTo'](_0x47a6fd,'add',(_0x56c57e,_0x4c3f9d)=>{_0x57b852(_0x4c3f9d)&&_0x3222f6['add'](_0x4c3f9d);}),_0x3222f6['listenTo'](_0x47a6fd,'remove',(_0x21ff44,_0x2e710e)=>{_0x3222f6['has'](_0x2e710e)&&_0x3222f6['remove'](_0x2e710e);});}function w(_0x20266b,_0x3dd3e9){if(null===_0x20266b&&null===_0x3dd3e9)return 0x0;if(null===_0x20266b)return-0x1;if(null===_0x3dd3e9)return 0x1;const _0x1f0e2a=_0x20266b['top']-_0x3dd3e9['top'];return 0x0==_0x1f0e2a?_0x20266b['left']-_0x3dd3e9['left']:_0x1f0e2a;}class y extends _0x189fac{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x575468){if(super(_0x575468),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x575468 instanceof _0x464556){const _0x562a44=_0x575468['locale'];_0x575468['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x562a44,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x562a44,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x562a44,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x562a44,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x562a44,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x562a44,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x562a44,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x5ccad1){this['collection']['add'](_0x5ccad1);}['remove'](_0x24c98f){this['collection']['remove'](_0x24c98f),_0x24c98f['destroy']();}['refreshVisibility'](){for(const _0x4bbc95 of this['collection'])_0x4bbc95['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x41a679){return this['collection']['getByInnerView'](_0x41a679);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xf24d71 of this['collection'])_0xf24d71['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1618e2){this['fire']('_activateAnnotation',_0x1618e2);}['createAnnotation'](_0x1a6f5c){return new T(_0x1a6f5c);}['createAnnotationView'](_0x9636f1,_0x1b8331){return new E(_0x9636f1,_0x1b8331);}['_addActiveAnnotation'](_0x37fd2a){const _0xe4f0a6=new Set(this['activeAnnotations']);_0xe4f0a6['add'](_0x37fd2a),this['activeAnnotations']=_0xe4f0a6;}['_removeActiveAnnotation'](_0x484b26){const _0xd2eb1d=new Set(this['activeAnnotations']);_0xd2eb1d['delete'](_0x484b26),this['activeAnnotations']=_0xd2eb1d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x74ff85=this['collection'],_0x2761b0=this['_visibleAnnotations'];function _0x1d3619(_0x489b3c){const _0x23fede=_0x489b3c['source'];_0x23fede['isVisible']&&!_0x2761b0['has'](_0x23fede)?_0x2761b0['add'](_0x23fede):!_0x23fede['isVisible']&&_0x2761b0['has'](_0x23fede)&&_0x2761b0['remove'](_0x23fede),_0x23fede['view']['focusTracker']['remove'](_0x23fede['view']['element']),_0x23fede['view']['focusTracker']['add'](_0x23fede['view']['element']);}this['listenTo'](_0x74ff85,'add',(_0x2fe747,_0x399af7)=>{_0x399af7['isVisible']&&_0x2761b0['add'](_0x399af7),this['listenTo'](_0x399af7,'change:isVisible',_0x1d3619);}),this['listenTo'](_0x74ff85,'remove',(_0x2cafb3,_0x3f686d)=>{_0x2761b0['has'](_0x3f686d)&&_0x2761b0['remove'](_0x3f686d),this['stopListening'](_0x3f686d,'change:isVisible',_0x1d3619);});}['_setupEnterAnnotationKeystroke'](){const _0xaca39c=_0x26f6ba=>{_0x26f6ba['on']('ready',()=>{_0x26f6ba['keystrokes']['set'](_0x5313d5,(_0x1f3da0,_0xb54351)=>{const _0x470c25=_0x479281(this['activeAnnotations']['values']());_0x470c25&&(_0x470c25['view']['focus'](),_0xb54351());});});};this['context']instanceof _0x464556?_0xaca39c(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x28e1d3,_0x38aa8f)=>{_0xaca39c(_0x38aa8f);});}['_setupEscapeAnnotationHandling'](){const _0x462b63=_0x2b170a=>{const _0x3524b5=_0x2b170a['source'],_0x15a749=[];let _0x503cf7;if(Array['isArray'](_0x3524b5['target'])){_0x503cf7=_0x3524b5['target'][0x0],this['context']instanceof _0x464556?_0x15a749['push'](this['context']):this['context']['editors']&&_0x15a749['push'](...this['context']['editors']);for(const _0x182826 of _0x15a749)for(const _0x54df5f of _0x182826['editing']['view']['domRoots']['values']())if(_0x54df5f['contains'](_0x503cf7))return void _0x182826['editing']['view']['focus']();_0x503cf7['focus']();}};this['listenTo'](this['collection'],'add',(_0x4b6d55,_0x431634)=>{this['listenTo'](_0x431634,'escape',_0x462b63,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x117098,_0x193da6)=>{this['stopListening'](_0x193da6,'escape',_0x462b63);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x189fac{['_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(_0x586699){super(_0x586699),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5f091a=this['context']['config'];_0x5f091a['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5f091a['define']('comments.maxThreadTotalWeight',0x1f4),_0x5f091a['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5f091a['define']('comments.CommentThreadView',gt),_0x5f091a['define']('comments.CommentView',Tt),_0x5f091a['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1748ed=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x465af3,_0x3c16dc)=>this['_addCommentThread'](_0x3c16dc)),this['on']('submitCommentThread',(_0x2b31fe,_0x138a97)=>this['_submitCommentThread'](_0x138a97)),this['on']('resolveCommentThread',(_0x33aca7,_0x3766e4)=>this['_resolveCommentThread'](_0x3766e4)),this['on']('resolveCommentThread',(_0x2bfea4,_0x11be84)=>this['_updateActiveAnnotation'](_0x11be84),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x541027,_0x4d74ec)=>this['_reopenCommentThread'](_0x4d74ec)),this['on']('reopenCommentThread',(_0x4367ee,_0x4ea534)=>this['_updateActiveAnnotation'](_0x4ea534),{'priority':'lowest'}),this['on']('removeCommentThread',(_0xfe6aa,_0x1ba2b0)=>this['_removeCommentThread'](_0x1ba2b0)),this['on']('updateCommentThread',(_0xa32b96,_0x4951f6)=>this['_updateCommentThread'](_0x4951f6)),this['on']('updateCommentThread',(_0x5d588b,_0x142c69)=>this['_updateActiveAnnotation'](_0x142c69),{'priority':'lowest'}),this['on']('addComment',(_0x3fbc23,_0xc92d5e)=>this['_addComment'](_0xc92d5e)),this['on']('updateComment',(_0x1e8619,_0x228ac1)=>this['_updateComment'](_0x228ac1)),this['on']('removeComment',(_0x44d187,_0x2f778f)=>this['_removeComment'](_0x2f778f)),this['on']('addComment',(_0x1a24d8,{threadId:_0xe43b01,isFromAdapter:_0x3cfd35})=>{if(_0x3cfd35)return;const _0xde99d3=this['getCommentThread'](_0xe43b01),_0x12cf9e=_0xde99d3&&this['_threadToController']['get'](_0xde99d3);_0x12cf9e&&_0x12cf9e['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1748ed,'change:activeAnnotations',(_0x442f7f,_0x3cdc44,_0x142f76)=>{const _0x1bcf37=Array['from'](_0x142f76)['map'](_0x19b1bf=>this['_viewToController']['get'](_0x19b1bf['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1bcf37?_0x1bcf37['model']:null;});}set['adapter'](_0x25cb9b){if(this['_adapter'])throw new _0xb3df69('commentsrepository-adapter-already-set');this['_adapter']=_0x25cb9b;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2fda68=_t,threadId:_0x331ca0=_0x58d165(),comments:_0x503b31=[],unlinkedAt:_0x22eb23=null,resolvedAt:_0x48dd12=null,resolvedBy:_0x1a0da5=null,target:_0x1797e2=null,context:_0x576d20=null,attributes:_0x428ee8={},isResolvable:_0x46da8a=!0x0,isSubmitted:_0x2089be=!0x1,isFromAdapter:_0x42d61c=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x2fda68),{'channelId':_0x2fda68,'threadId':_0x331ca0,'comments':_0x503b31,'unlinkedAt':_0x22eb23,'resolvedAt':_0x48dd12,'resolvedBy':_0x1a0da5,'target':_0x1797e2,'context':_0x576d20,'attributes':_0x428ee8,'isFromAdapter':_0x42d61c,'isResolvable':_0x46da8a,'isSubmitted':_0x2089be}),this['getCommentThread'](_0x331ca0);}['openNewCommentThread']({channelId:_0x4b8ede=_t,threadId:_0x22a0b5=_0x58d165(),target:_0x311110,context:_0x38aca9=null,isResolvable:_0xecc077=!0x0}){if(this['_readOnlyChannels']['has'](_0x4b8ede)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x311110)throw new _0xb3df69('commentsrepository-missing-target');const _0x1f2cb8=this['addCommentThread']({'channelId':_0x4b8ede,'threadId':_0x22a0b5,'target':_0x311110,'context':_0x38aca9,'isResolvable':_0xecc077});if(!_0x1f2cb8)return null;const _0x4022c7=this['_threadToController']['get'](_0x1f2cb8),_0x3bca0e=_0x4022c7['view']['commentThreadInputView']['commentInputView'],_0x5c0b19=this['context']['plugins']['get'](y),_0xa00fb1=_0x5c0b19['getByInnerView'](_0x4022c7['view']);return _0x5c0b19['activate'](_0xa00fb1),_0x3bca0e['once']('editorReady',()=>_0x3bca0e['focus']()),_0x1f2cb8;}['hasCommentThread'](_0x45a236){if('string'!=typeof _0x45a236)throw new _0xb3df69('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x45a236);}['updateCommentThread']({channelId:_0x23eece=_t,threadId:_0x4f0679,context:_0x63d331,unlinkedAt:_0x446f4b,attributes:_0x44439d,isFromAdapter:_0x4cb217=!0x1}){return this['fire'](Nt('updateCommentThread',_0x23eece),{'channelId':_0x23eece,'threadId':_0x4f0679,'context':_0x63d331,'unlinkedAt':_0x446f4b,'attributes':_0x44439d,'isFromAdapter':_0x4cb217}),this['getCommentThread'](_0x4f0679);}['getCommentThread'](_0x28976b){if('string'!=typeof _0x28976b)throw new _0xb3df69('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x28976b);}['fetchCommentThread']({channelId:_0x3b3257,threadId:_0x23bef3}={}){const _0x960a62=this['getCommentThread'](_0x23bef3);if(_0x960a62)return Promise['resolve'](_0x960a62);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xb3df69('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3b3257,'threadId':_0x23bef3})['then'](_0x53805f=>this['hasCommentThread'](_0x23bef3)?this['getCommentThread'](_0x23bef3):_0x53805f?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3b3257},_0x53805f)):void 0x0)['catch'](_0x143a04=>{throw console['error'](_0x143a04),new _0xb3df69('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4e2290,skipNotAttached:_0x277eba=!0x1,skipEmpty:_0x169e66=!0x1,toJSON:_0x245161=!0x1}={}){const _0x59a340=[];for(const _0x4f4492 of this['_threads']['values']())_0x4e2290&&_0x4f4492['channelId']!==_0x4e2290||_0x277eba&&!_0x4f4492['isAttached']||_0x169e66&&0x0===_0x4f4492['length']||_0x59a340['push'](_0x4f4492);return _0x245161?_0x59a340['map'](_0x1e3c99=>_0x1e3c99['toJSON']()):_0x59a340;}['getAnnotationForCommentThread'](_0x496dc6){const _0x20d402=this['_threadToController']['get'](_0x496dc6);if(!_0x20d402)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x20d402['view'])||null;}['getCommentThreadForAnnotation'](_0x3acc45){const _0x29a6ac=this['_viewToController']['get'](_0x3acc45['innerView']);return _0x29a6ac?_0x29a6ac['model']:null;}['setActiveCommentThread'](_0x56aab9){const _0x2ff1eb=this['context']['plugins']['get'](y);if(!_0x56aab9)return void(this['activeCommentThread']&&_0x2ff1eb['deactivateAll']());const _0x2d3ddb=this['getCommentThread'](_0x56aab9);if(!_0x2d3ddb)throw new _0xb3df69('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x56aab9});if(!this['_threadToController']['has'](_0x2d3ddb))throw new _0xb3df69('commentsrepository-active-not-attached',null,{'threadId':_0x56aab9});const _0x33fbe3=_0x2ff1eb['getByInnerView'](this['_threadToController']['get'](_0x2d3ddb)['view']);_0x2ff1eb['activate'](_0x33fbe3);}['switchReadOnly'](_0x4abdd8,_0x423398){_0x4abdd8?this['_readOnlyChannels']['add'](_0x423398):this['_readOnlyChannels']['delete'](_0x423398),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x518a47){return this['_readOnlyChannels']['has'](_0x518a47)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x269ab7,_0xccafb3){return new vt(_0x269ab7,_0xccafb3);}['setPermissions'](_0x5b097d,_0x3e42e3=_t){this['_permissions']['set'](_0x3e42e3,_0x5b097d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3cf1ea=_t){return this['_permissions']['has'](_0x3cf1ea)?this['_permissions']['get'](_0x3cf1ea):bt;}['_addCommentThread']({channelId:_0x517ff5,threadId:_0xa039ef,comments:_0x1cced7,unlinkedAt:_0x4b887e,resolvedAt:_0x579099,resolvedBy:_0x1d3b00,target:_0x1da856,context:_0x4a0646,attributes:_0x4af667,isFromAdapter:_0xb51553,isResolvable:_0x494459,isSubmitted:_0x16da7a}){if('string'!=typeof _0xa039ef)throw new _0xb3df69('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xa039ef});if(this['hasCommentThread'](_0xa039ef))throw new _0xb3df69('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xa039ef});const _0x4208ea=new pi(this,{'channelId':_0x517ff5,'id':_0xa039ef,'context':_0x4a0646,'attributes':_0x4af667,'unlinkedAt':_0x4b887e,'resolvedAt':_0x579099,'resolvedBy':_0x1d3b00?this['context']['plugins']['get'](it)['getUser'](_0x1d3b00):null,'isResolvable':_0x494459,'isSubmitted':_0x16da7a||_0xb51553});this['_threads']['set'](_0xa039ef,_0x4208ea);for(const _0x2f2d48 of _0x1cced7)_0x4208ea['_add'](this['_createNewComment']({'threadId':_0xa039ef,..._0x2f2d48}));return _0x1da856&&_0x4208ea['attachTo'](_0x1da856),_0xb51553||!_0x4208ea['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x517ff5,'threadId':_0xa039ef});}['_submitCommentThread']({channelId:_0x1dacec,threadId:_0x3f859d}){if(!this['hasCommentThread'](_0x3f859d))throw new _0xb3df69('commentsrepository-missing-comment-thread',this);const _0x13dc3f=this['getCommentThread'](_0x3f859d);if(_0x13dc3f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x21df63,comments:_0x13f94a,resolvedAt:_0x6cad5,resolvedBy:_0x5c67e8,context:_0xfb5659,attributes:_0x5cf704}=_0x13dc3f,_0x32cb99=this['context']['plugins']['get']('PendingActions'),_0x488530=_0x32cb99['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1dacec,'threadId':_0x21df63,'comments':_0x13f94a['map'](_0x36b03f=>_0x36b03f['toJSON']()),'resolvedAt':_0x6cad5,'resolvedBy':_0x5c67e8?_0x5c67e8['id']:_0x5c67e8,'context':_0xfb5659,'attributes':_0x5cf704})['then'](({comments:_0x47e47b})=>{_0x32cb99['remove'](_0x488530);for(const _0x2f0a79 of _0x47e47b)this['_updateComment']({'channelId':_0x1dacec,'threadId':_0x3f859d,'commentId':_0x2f0a79['commentId'],'createdAt':_0x2f0a79['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1370f9=>{throw console['error'](_0x1370f9),new _0xb3df69('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x54616a,target:_0x52eee9}){const _0x127016=this['getCommentThread'](_0x54616a);if(!_0x127016)throw new _0xb3df69('commentsrepository-attach-missing-comment-thread',this);const _0x453726=this['context']['plugins']['get']('PendingActions'),_0x3011ce=this['context']['plugins']['get'](y),_0x7c6fe2=this['_createCommentThreadView'](_0x127016),_0x2bc96f=new vt(_0x127016,_0x7c6fe2);let _0x409f2d=null;_0x7c6fe2['on']('change:isDirty',(_0x398e44,_0x44cb52,_0xdb45a5)=>{_0xdb45a5?_0x409f2d=_0x453726['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x409f2d&&(_0x453726['remove'](_0x409f2d),_0x409f2d=null);}),this['_threadToController']['set'](_0x127016,_0x2bc96f),this['_viewToController']['set'](_0x7c6fe2,_0x2bc96f);const _0x1020cf=new E(this['context']['locale'],_0x7c6fe2);_0x1020cf['bind']('length')['to'](_0x7c6fe2),_0x1020cf['bind']('isDirty')['to'](_0x7c6fe2,'isDirty',_0x7c6fe2,'length',(_0x1fbcbe,_0x1fb527)=>_0x1fbcbe||!_0x1fb527),_0x1020cf['bind']('isActive')['to'](_0x7c6fe2),_0x1020cf['type']='comment';const _0x6f869d=new T({'view':_0x1020cf,'target':_0x52eee9,'type':'comment','isVisible':!_0x127016['archivedAt']&&!!('function'==typeof _0x52eee9?_0x52eee9():_0x52eee9)});return _0x7c6fe2['on']('escape',()=>{_0x6f869d['fire']('escape');}),this['_bindAnnotationToEditors'](_0x7c6fe2,_0x6f869d),_0x3011ce['add'](_0x6f869d),_0x6f869d;}['_bindAnnotationToEditors'](_0x53acd3,_0x133cbf){this['listenTo'](_0x53acd3,'editorReady',(_0x4db559,_0x2a022e)=>{const _0x39c551=_0x2a022e['ui']['view']['body']['bodyCollectionContainer'];_0x133cbf['focusableElements']['add'](_0x39c551),this['context']instanceof _0x464556&&this['context']['ui']['focusTracker']['add'](_0x39c551);},{'priority':'highest'}),this['listenTo'](_0x53acd3,'editorDestroyed',(_0x50a89a,_0x297b99)=>{const _0x428151=_0x297b99['ui']['view']['body']['bodyCollectionContainer'];_0x133cbf['focusableElements']['has'](_0x428151)&&_0x133cbf['focusableElements']['remove'](_0x428151),this['context']instanceof _0x464556&&this['context']['ui']['focusTracker']['remove'](_0x428151);});}['_unbindEditors'](_0x1cc14d){this['stopListening'](_0x1cc14d,'editorReady'),this['stopListening'](_0x1cc14d,'editorDestroyed');}['_createCommentThreadView'](_0x4e828c){const _0x5dd40d=this['context']['plugins']['get'](it),{config:_0x5491c9,locale:_0x528278}=this['context'],_0xae61fa=pt(_0x5491c9['get']('locale'),_0x528278);return new(0x0,(_0x5491c9['get']('comments'))['CommentThreadView'])(_0x528278,_0x4e828c,_0x5dd40d['me'],{'editorConfig':{..._0x5491c9['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x5491c9['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x5491c9['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5491c9['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5491c9['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xae61fa,'CommentView':_0x5491c9['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3c6f61,channelId:_0x4e669d,resolvedAt:_0x1261b4,resolvedBy:_0x250e76,isFromAdapter:_0x175b67}){if(!this['hasCommentThread'](_0x3c6f61))throw new _0xb3df69('commentsrepository-missing-comment-thread',null,{'threadId':_0x3c6f61});const _0x535a62=this['getCommentThread'](_0x3c6f61);if(_0x535a62['isResolved'])throw new _0xb3df69('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3c6f61});const _0x2e3399=this['context']['plugins']['get'](it);if(_0x535a62['resolvedBy']=_0x2e3399['getUser'](_0x250e76),_0x535a62['resolvedAt']=_0x1261b4,_0x175b67||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x270848=this['context']['plugins']['get']('PendingActions'),_0x1caf8e=_0x270848['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4e669d,'threadId':_0x3c6f61})['then'](({resolvedAt:_0x81e7f,resolvedBy:_0x2d9149})=>{_0x270848['remove'](_0x1caf8e),_0x535a62['resolvedBy']['id']!==_0x2d9149&&(_0x535a62['resolvedBy']=_0x2e3399['getUser'](_0x2d9149)),_0x535a62['resolvedAt']=_0x81e7f;})['catch'](_0x4af2ea=>{throw console['error'](_0x4af2ea),new _0xb3df69('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4cdb5f,channelId:_0x169eaa,isFromAdapter:_0x29fecc}){if(!this['hasCommentThread'](_0x4cdb5f))throw new _0xb3df69('commentsrepository-missing-comment-thread',null,{'threadId':_0x4cdb5f});const _0x28edf4=this['getCommentThread'](_0x4cdb5f);if(!_0x28edf4['isResolved'])throw new _0xb3df69('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4cdb5f});if(_0x28edf4['resolvedBy']=null,_0x28edf4['resolvedAt']=null,_0x29fecc||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5638e4=this['context']['plugins']['get']('PendingActions'),_0xd49e16=_0x5638e4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x169eaa,'threadId':_0x4cdb5f})['then'](()=>_0x5638e4['remove'](_0xd49e16))['catch'](_0x1ed77a=>{throw console['error'](_0x1ed77a),new _0xb3df69('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x103156,isFromAdapter:_0x43b533}){const _0x15f564=this['getCommentThread'](_0x103156);if(!_0x15f564)throw new _0xb3df69('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x103156),this['_threads']['delete'](_0x103156),!_0x15f564['isSubmitted']||_0x43b533||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x583fa1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4a69b4}=_0x15f564,_0x17b174=_0x583fa1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4a69b4,'threadId':_0x103156})['then'](()=>_0x583fa1['remove'](_0x17b174))['catch'](_0x4f14ca=>{throw console['error'](_0x4f14ca),new _0xb3df69('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x23b24d,unlinkedAt:_0x2fd871,context:_0x2a36e2,attributes:_0x4c4fd5,isFromAdapter:_0x4a49e8}){if('string'!=typeof _0x23b24d)throw new _0xb3df69('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x23b24d});if(!this['hasCommentThread'](_0x23b24d))throw new _0xb3df69('commentsrepository-missing-comment-thread',null,{'threadId':_0x23b24d});const _0xf88a8a=this['getCommentThread'](_0x23b24d);let _0x3c7f2c=!0x1;if(void 0x0!==_0x2a36e2&&_0xf88a8a['context']!==_0x2a36e2&&(_0xf88a8a['context']=_0x2a36e2,_0x3c7f2c=!0x0),void 0x0!==_0x2fd871&&_0xf88a8a['unlinkedAt']!==_0x2fd871&&(_0xf88a8a['unlinkedAt']=_0x2fd871,_0x3c7f2c=!0x0),_0x4c4fd5&&!At(_0x4c4fd5,_0xf88a8a['attributes'])&&(_0xf88a8a['attributes']=_0x4c4fd5,_0x3c7f2c=!0x0),!_0x3c7f2c)return Promise['resolve']();if(!_0xf88a8a['isSubmitted']||_0x4a49e8||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x257cdc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a97ac}=_0xf88a8a,_0x5b20b5=_0x257cdc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2a97ac,'threadId':_0x23b24d,'context':_0x2a36e2,'unlinkedAt':_0x2fd871,'attributes':_0x4c4fd5})['then'](()=>_0x257cdc['remove'](_0x5b20b5))['catch'](_0x2bacc0=>{throw console['error'](_0x2bacc0),new _0xb3df69('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x29d404){const _0x9ee148=this['context']['plugins']['get'](y),_0x70928f=this['getCommentThread'](_0x29d404);if(_0x70928f['_isAttached']=!0x1,this['_threadToController']['has'](_0x70928f)){const _0x30f1dd=this['_threadToController']['get'](_0x70928f),_0x52d5f8=_0x30f1dd['view'],_0x195a6f=_0x9ee148['getByInnerView'](_0x52d5f8);this['_threadToController']['delete'](_0x70928f),this['_viewToController']['delete'](_0x52d5f8),_0x195a6f&&_0x9ee148['remove'](_0x195a6f),_0x30f1dd['destroy'](),_0x52d5f8['destroy']()['then'](()=>{this['_unbindEditors'](_0x52d5f8);});}}['_updateActiveAnnotation']({threadId:_0x4490e7,resolvedAt:_0x34b4b3,unlinkedAt:_0x11ef2e}){const _0x511be2=!!_0x34b4b3,_0x5e836e=this['context']['plugins']['get'](y),_0x2119bd=this['getCommentThread'](_0x4490e7);if(this['_threadToController']['has'](_0x2119bd)){const _0xcd79a7=this['_threadToController']['get'](_0x2119bd)['view'],_0x56a791=_0x5e836e['getByInnerView'](_0xcd79a7);_0x56a791&&(_0x511be2&&_0x5e836e['_removeActiveAnnotation'](_0x56a791),_0x11ef2e?_0x56a791['isVisible']=!0x1:_0x56a791['refreshVisibility']());}}['_getExternalAuthor'](_0x56e601){const _0x55714d=this['context']['plugins']['get'](it),_0x23f036=It('external:'+_0x56e601),_0x5ee754=_0x55714d['getUser'](_0x23f036);return _0x5ee754||_0x55714d['addUser']({'id':_0x23f036,'name':_0x56e601});}['_createNewComment']({threadId:_0x39a045,commentId:_0x2016bf=_0x58d165(),content:_0x40f12a,authorId:_0x12dfab,createdAt:_0x110497,attributes:_0x575740}){if('string'!=typeof _0x2016bf)throw new _0xb3df69('commentsrepository-invalid-commentid');if('string'!=typeof _0x12dfab)throw new _0xb3df69('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x40f12a||!_0x40f12a['trim']())throw new _0xb3df69('commentsrepository-invalid-comment-content');const _0x596c5f=this['context']['plugins']['get'](it)['getUser'](_0x12dfab);if(!_0x596c5f)throw new _0xb3df69('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x12dfab});let _0x294797=null,_0x261d9d=_0x110497;return _0x575740?.['@external']&&(_0x294797=this['_getExternalAuthor'](_0x575740['@external']['authorName']),_0x261d9d=new Date(_0x575740['@external']['createdAt'])),new wi(this,{'threadId':_0x39a045,'id':_0x2016bf,'author':_0x294797||_0x596c5f,'creator':_0x596c5f,'content':_0x40f12a,'createdAt':_0x110497,'authoredAt':_0x261d9d,'attributes':_0x575740});}['_addComment'](_0x5dcfd9){let {threadId:_0x58af8b,content:_0x4af4ec,attributes:_0x32a209,isFromAdapter:_0x1552e6}=_0x5dcfd9;const _0x4a9c97=this['getCommentThread'](_0x5dcfd9['threadId']);if(!_0x4a9c97)throw new _0xb3df69('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xc809e9=this['_createNewComment'](_0x5dcfd9),{id:_0x56e26e}=_0xc809e9;if(_0x4a9c97['_add'](_0xc809e9),_0x1552e6||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4a9c97['isSubmitted'])return Promise['resolve']();const _0x48c5c3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x47bc3d}=_0x4a9c97,_0x4d1ed1=_0x48c5c3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x32a209||(_0x32a209={}),this['adapter']['addComment']({'channelId':_0x47bc3d,'threadId':_0x58af8b,'commentId':_0x56e26e,'content':_0x4af4ec,'attributes':_0x32a209})['then'](_0x5061cb=>{_0x48c5c3['remove'](_0x4d1ed1),_0x5061cb&&this['_updateComment']({'channelId':_0x47bc3d,'threadId':_0x58af8b,'commentId':_0x56e26e,'createdAt':_0x5061cb['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3bf3d0=>{throw console['error'](_0x3bf3d0),new _0xb3df69('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x293928,commentId:_0xab4eb3,content:_0x33d059,createdAt:_0x4f5ea9,attributes:_0x37200e,isFromAdapter:_0x15f7c3}){if(void 0x0!==_0x33d059&&('string'!=typeof _0x33d059||!_0x33d059['trim']()['length']))throw new _0xb3df69('commentsrepository-update-comment-invalid-content');const _0x448203=this['getCommentThread'](_0x293928),_0x2085ee=_0x448203['getComment'](_0xab4eb3);if(!_0x2085ee)throw new _0xb3df69('commentsrepository-update-missing-comment',this);let _0x267086=!0x1;if(_0x33d059&&_0x33d059!==_0x2085ee['content']&&(_0x2085ee['isEditable']||_0x15f7c3)&&(_0x2085ee['content']=_0x33d059,_0x267086=!0x0),_0x4f5ea9&&_0x4f5ea9!==_0x2085ee['createdAt']&&(_0x2085ee['createdAt']=_0x4f5ea9,_0x2085ee['attributes']&&_0x2085ee['attributes']['@external']||(_0x2085ee['authoredAt']=_0x4f5ea9),_0x267086=!0x0),_0x37200e&&!At(_0x37200e,_0x2085ee['attributes'])&&(_0x2085ee['attributes']=_0x37200e,_0x267086=!0x0),!_0x267086)return Promise['resolve']();if(_0x448203['fire']('commentUpdated'),_0x15f7c3||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x9f323a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3bd872}=this['getCommentThread'](_0x2085ee['threadId']),_0x2635a3=_0x9f323a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3bd872,'threadId':_0x293928,'commentId':_0xab4eb3,'content':_0x33d059,'attributes':_0x37200e})['then'](()=>_0x9f323a['remove'](_0x2635a3))['catch'](_0x391a10=>{throw console['error'](_0x391a10),new _0xb3df69('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1809c3,commentId:_0x409e90,isFromAdapter:_0x516cb5}){const _0x41ea4c=this['getCommentThread'](_0x1809c3),_0x410701=_0x41ea4c['getComment'](_0x409e90);if(!_0x410701)throw new _0xb3df69('commentsrepository-remove-missing-comment',this);if(_0x41ea4c['_remove'](_0x410701),_0x516cb5||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3a7188=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4fc702}=_0x41ea4c,_0x7edb1e=_0x3a7188['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4fc702,'threadId':_0x1809c3,'commentId':_0x409e90})['then'](()=>_0x3a7188['remove'](_0x7edb1e))['catch'](_0x2e846a=>{throw console['error'](_0x2e846a),new _0xb3df69('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x5af2cf(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x57636e,_0x402c98){super();const _0x42dab4=_0x57636e['context']['plugins']['get'](it)['me'],_0x5b39f2=_0x57636e['getCommentThread'](_0x402c98['threadId']),_0x131b13=0x0===_0x5b39f2['comments']['length'],_0x51f830=_0x42dab4===_0x402c98['author'];this['id']=_0x402c98['id'],this['threadId']=_0x402c98['threadId'],this['author']=_0x402c98['author'],this['creator']=_0x402c98['creator'],this['isExternal']=Boolean(_0x402c98['attributes']&&_0x402c98['attributes']['@external']),this['set']('content',_0x402c98['content']),this['createdAt']=_0x402c98['createdAt']||new Date(),this['set']('authoredAt',_0x402c98['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5b39f2,'resolvedAt'),this['set']('attributes',_0x402c98['attributes']||{}),this['bind']('isEditable')['to'](_0x57636e,'_permissions',()=>{const _0x5ebf03=_0x57636e['getPermissions'](_0x5b39f2['channelId'])['write'],_0x5d4483=_0x57636e['getPermissions'](_0x5b39f2['channelId'])['modifyAll'];return _0x51f830&&_0x5ebf03||!_0x51f830&&_0x5d4483;}),this['bind']('isRemovable')['to'](_0x5b39f2,'isRemovable',_0x57636e,'_permissions',_0x4ecd20=>{const _0x2f1d8a=_0x57636e['getPermissions'](_0x5b39f2['channelId'])['write'],_0x5b304d=_0x57636e['getPermissions'](_0x5b39f2['channelId'])['modifyAll'];return _0x51f830&&_0x2f1d8a||_0x4ecd20&&_0x131b13||!_0x51f830&&_0x5b304d&&!_0x131b13;}),this['bind']('isReadOnly')['to'](_0x5b39f2,'isReadOnly'),this['_repository']=_0x57636e;}get['weight'](){return Math['max'](function(_0x338c47){const _0x519bc8=document['createElement']('div');return _0x519bc8['innerHTML']=_0x338c47,_0x519bc8['textContent']['length'];}(this['content']),0xc8);}['update'](_0x408598){const {threadId:_0x1f3d86,id:_0x129e3d}=this;if(!this['_repository']['hasCommentThread'](_0x1f3d86))throw new _0xb3df69('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3c4507}=this['_repository']['getCommentThread'](_0x1f3d86);this['_repository']['fire'](Nt('updateComment',_0x3c4507,_0x1f3d86),{'channelId':_0x3c4507,'threadId':_0x1f3d86,'commentId':_0x129e3d,..._0x408598});}['setAttribute'](_0x30b203,_0x29d458){const _0x3621cb=wt(this['attributes']);yt(_0x3621cb,_0x30b203,_0x29d458),this['update']({'attributes':_0x3621cb});}['removeAttribute'](_0x1ea10c){const _0x45676a=wt(this['attributes']);Ct(_0x45676a,_0x1ea10c),this['update']({'attributes':_0x45676a});}['remove'](_0x2c1533={}){if(!_0x2c1533['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x220109,id:_0x5a00b2}=this;if(!this['_repository']['hasCommentThread'](_0x220109))throw new _0xb3df69('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4059ca}=this['_repository']['getCommentThread'](_0x220109);this['_repository']['fire'](Nt('removeComment',_0x4059ca,_0x220109),{'channelId':_0x4059ca,'threadId':_0x220109,'commentId':_0x5a00b2,..._0x2c1533});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x10b6d9,..._0x3c28dd){for(const _0x151e76 of _0x3c28dd)void 0x0!==_0x151e76&&(_0x10b6d9+=':'+String(_0x151e76));return _0x10b6d9;}class ot extends _0x3cddc1{constructor(_0x2e12f0){super(_0x2e12f0),this['set']('hasContent',!0x1);}['refresh'](){const _0x33d38b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4a0003 of _0x33d38b['getRanges']())if(this['_hasContent'](_0x4a0003))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x422e97=_0x58d165(),ranges:_0x59e8ee,comment:_0x4df0a8}={}){const _0x2d3b60=this['editor']['model'],_0x15b5a4=_0x59e8ee??Array['from'](_0x2d3b60['document']['selection']['getRanges']()),_0x393a6c=[];for(const _0x421b44 of _0x15b5a4)this['_hasContent'](_0x421b44)&&_0x393a6c['push'](this['_trimToContent'](_0x421b44));if(!_0x393a6c['length'])throw new _0xb3df69('addcommentthreadcommand-incorrect-ranges',null);_0x4df0a8&&this['_createCommentThread'](_0x422e97,_0x4df0a8),this['_createMarkersFromRanges'](_0x422e97,_0x393a6c,!!_0x4df0a8);}['_createMarkersFromRanges'](_0x5594d5,_0x1d0499,_0x50b1cf){this['editor']['model']['change'](_0x141452=>{for(const _0x5919f6 of _0x1d0499){const _0x5b1e3f=_0x58d165()['substr'](0x1,0x5),_0x1f5a08='comment:'+_0x5594d5+':'+_0x5b1e3f;_0x141452['addMarker'](_0x1f5a08,{'range':_0x5919f6,'usingOperation':_0x50b1cf,'affectsData':_0x50b1cf});}});}['_createCommentThread'](_0x585ea8,_0x8a6535){const _0x56dee5=this['editor']['plugins']['get']('CommentsRepository'),_0x4e47c=this['editor']['config']['get']('collaboration.channelId'),_0xd2c1d3=this['editor']['plugins']['get']('Users')['me'];if(!_0xd2c1d3)throw new _0xb3df69('addcommentthreadcommand-user-not-found',null);_0x56dee5['addCommentThread']({'threadId':_0x585ea8,'channelId':_0x4e47c,'comments':[{'authorId':_0xd2c1d3['id'],'content':_0x8a6535,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3419c8){for(const _0x19fdd4 of _0x3419c8['getItems']())if(this['_itemIsContent'](_0x19fdd4))return!0x0;return!0x1;}['_itemIsContent'](_0x36f653){return _0x36f653['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x36f653)&&!_0x36f653['is']('element','tableCell');}['_trimToContent'](_0x6f4722){const _0x33422d=_0x25b39c=>!this['_itemIsContent'](_0x25b39c['item']),_0x344f37=_0x6f4722['start']['getLastMatchingPosition'](_0x33422d),_0x3b5593=_0x6f4722['end']['getLastMatchingPosition'](_0x33422d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x344f37,_0x3b5593);}}class b extends _0x121eca{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56d729){super(_0x56d729),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3a451d=this['editor'],_0xc094d3=_0x3a451d['model']['document']['selection'],_0x46a667=_0x36a098(()=>this['refreshSelectedViews'](),0xa);_0xc094d3['on']('change:range',(_0x20a63c,_0xfb0eed)=>{_0xfb0eed['directChange']&&(_0x46a667['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3a451d['editing']['view']['document'],'change:isFocused',(_0x4dc180,_0x359201,_0x2fad1f)=>{_0x2fad1f&&_0x46a667();}),this['listenTo'](_0x3a451d['ui']['focusTracker'],'change:isFocused',(_0x5c4b31,_0x2686f2,_0x4a409f)=>{_0x4a409f||this['fire']('blur',{'isAnnotationTracked':_0x164ba3=>this['_editorAnnotationsData']['has'](_0x164ba3['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x44dc7b){if(this['_editorAnnotations']['has'](_0x44dc7b['view']))return;this['_editorAnnotations']['add'](_0x44dc7b['view']),this['editor']['ui']['focusTracker']['add'](_0x44dc7b['view']['element']);const _0x24032f=this['editor']['plugins']['get'](y);this['listenTo'](_0x24032f['collection'],'remove',(_0x5f589d,_0x6649b6)=>{this['editor']['ui']['focusTracker']['remove'](_0x6649b6['view']['element']),this['_editorAnnotations']['delete'](_0x6649b6['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x448b9e){if('function'!=typeof _0x448b9e)throw new _0xb3df69('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x448b9e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x115107,annotations:_0x4d4bf2}){const _0x3eac39=[],_0x53f57f=this['editor']['model']['document']['selection'],_0x4e0358=Array['from'](_0x53f57f['getRanges']());for(const [_0x157a01,_0x4c0586]of this['_editorAnnotationsData']){const _0xc44249=_0x538631(_0x4c0586),_0x46afae=_0x4d4bf2['getByInnerView'](_0x157a01);_0xc44249&&_0x46afae&&_0x3eac39['push']({'annotation':_0x46afae,'range':_0xc44249});}function _0x538631(_0x249a19){for(const _0x5dbe20 of _0x249a19)for(const _0x565cc1 of _0x4e0358)if(_0x5dbe20['containsRange'](_0x565cc1,!_0x53f57f['isCollapsed']))return _0x5dbe20;return null;}return _0x3eac39['sort']((_0x54c1bf,_0x19db01)=>{const _0xd5053c=_0x54c1bf['range'],_0x3b0425=_0x19db01['range'];if(!_0xd5053c['isEqual'](_0x3b0425)){if(_0xd5053c['containsRange'](_0x3b0425,!0x0))return 0x1;if(_0x3b0425['containsRange'](_0xd5053c,!0x0))return-0x1;}return _0x54c1bf['annotation']==_0x115107?-0x1:_0x19db01['annotation']==_0x115107?0x1:0x0;})['map'](_0x449af7=>_0x449af7['annotation']);}get['_editorAnnotationsData'](){const _0x3e5077=new Map();for(const _0x43a369 of Array['from'](this['_dataCollectors']))for(const [_0x3e8e31,_0x2a0cc0]of _0x43a369())_0x3e5077['set'](_0x3e8e31,_0x2a0cc0);return _0x3e5077;}}class st extends _0x121eca{['afterInit'](){const _0x33dda9=this['editor'];if(!_0x33dda9['plugins']['has']('RestrictedEditingModeEditing'))return;_0x33dda9['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x121eca{constructor(_0x1b5836){super(_0x1b5836),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x525ece=this['editor'],_0x590560=_0x525ece['commands']['get']('importWord'),_0x1377a7=_0x525ece['plugins']['get'](it);_0x590560&&(_0x590560['on']('execute',(_0x248e54,[,_0x1a575d])=>{_0x1a575d['collaboration_features']={'comments':!0x0,'user_id':_0x1377a7['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x590560,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x45191c,_0x5db715){const {comment_threads:_0x36c6b3}=_0x5db715;_0x36c6b3&&_0x36c6b3['forEach'](({thread_id:_0x6453fa,comments:_0xcdbd3e,is_resolved:_0x171dd8})=>{const _0x196de2=new Date(),_0x264d9d=_0xcdbd3e['map'](({author:_0x43adb2,content:_0x26d3e9,created_at:_0x18a9e0})=>({'content':_0x26d3e9,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x196de2,'attributes':{'@external':{'authorName':_0x43adb2,'createdAt':_0x18a9e0?new Date(_0x18a9e0):new Date(),'source':'importWord'}}})),_0x19c83d=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x19c83d,'threadId':_0x6453fa,'comments':_0x264d9d,'resolvedAt':_0x171dd8?_0x196de2:null});});}}class at extends _0x121eca{constructor(_0x3d5272){super(_0x3d5272),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2eda4f=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2eda4f,'contentInsertion',(_0x3e558b,_0x32b502)=>this['_removeMarkersWithoutThreads'](_0x32b502['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2a595e){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2a595e;const _0x5a0a65=this['editor']['plugins']['get']('CommentsRepository');for(const _0x41dea1 of _0x2a595e['keys']()){const [_0x24e583,_0x1c78ea]=_0x41dea1['split'](':');'comment'!=_0x24e583||_0x5a0a65['hasCommentThread'](_0x1c78ea)||_0x2a595e['delete'](_0x41dea1);}return _0x2a595e;}['_registerMarkerInClipboardPipeline'](){const _0x1dd04f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x57a065=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x57a065&&_0x1dd04f['_registerMarkerToCopy']('comment',_0x57a065);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x12f3c6){switch(_0x12f3c6){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5c02cc){const _0x4b9f62=_0x5c02cc['split'](':');return{'group':_0x4b9f62[0x0],'id':_0x4b9f62[0x1],'part':_0x4b9f62[0x2]};}class ut extends _0x121eca{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1dcffa,_0x120ca0)=>{if(!_0x120ca0['options']['showCommentHighlights'])return null;if(_0x120ca0['options']['ignoreResolvedComments']){const {id:_0x545130}=ft(_0x1dcffa['markerName']),_0x5e1754=this['editor']['plugins']['get'](o);if(_0x5e1754['getCommentThread'](_0x545130)?.['isResolved']&&_0x1dcffa['item'])return _0x120ca0['consumable']['consume'](_0x1dcffa['item'],'addMarker:'+_0x1dcffa['markerName']),_0x120ca0['consumable']['consume'](_0x1dcffa['item'],'removeMarker:'+_0x1dcffa['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5bcfc1=>{_0x5bcfc1['on']('addMarker:comment',(_0x3d1154,_0x36e909,_0x24b2be)=>{if(!_0x24b2be['options']['showCommentHighlights'])return;const _0x34e61c=_0x36e909['item'];if(!_0x34e61c)return;const _0x526e46=_0x24b2be['mapper']['toViewElement'](_0x34e61c);this['editor']['model']['schema']['isObject'](_0x34e61c)&&_0x526e46&&!_0x526e46['getCustomProperty']('widget')&&_0x526e46['is']('containerElement')&&_0x5dda3a(_0x526e46,_0x24b2be['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x76e4fa,{writer:_0x28f819,options:_0x699fbd})=>{if(!_0x699fbd['showCommentHighlights'])return null;const _0x52696c=_0x28f819['createContainerElement']('div'),_0xc9ccb=_0x28f819['createEmptyElement']('hr');return _0x28f819['addClass']('ck-horizontal-line',_0x52696c),_0x28f819['insert'](_0x28f819['createPositionAt'](_0x52696c,0x0),_0xc9ccb),_0x52696c;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5abadc,{writer:_0x4eba3e,options:_0x27c5f8})=>{if(!_0x27c5f8['showCommentHighlights'])return null;const _0x34496f=_0x4eba3e['createContainerElement']('span'),_0x1b6e45=_0x4eba3e['createEmptyElement']('img');return _0x4eba3e['addClass']('image-inline',_0x34496f),_0x4eba3e['insert'](_0x4eba3e['createPositionAt'](_0x34496f,0x0),_0x1b6e45),_0x34496f;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2e7536,{writer:_0x12131f,options:_0x19be93})=>{if(_0x19be93['showCommentHighlights'])return _0x12131f['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x24f9a2,_0x47a0ed,_0x3437f6)=>{_0x3437f6['options']['showCommentHighlights']&&_0x24f9a2['stop']();},{'priority':'high'});}}class r extends _0x121eca{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(_0x20f0eb){super(_0x20f0eb),this['set']('isThreadsLoadingPaused',!0x0),_0x20f0eb['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x19306b,_0x44838e,_0x19ff6c,_0x141909)=>{const _0x198cf1=_0x20f0eb['plugins']['get'](o),_0x34b580=_0x19ff6c?ft(_0x19ff6c)['id']:null;_0x20f0eb['model']['change'](()=>{if(_0x34b580){const _0x4b9673=this['getAllMarkersForId'](_0x34b580);for(const _0x4517dc of _0x4b9673)_0x20f0eb['editing']['reconvertMarker'](_0x4517dc);}if(_0x141909){const {id:_0x2b63de}=ft(_0x141909),_0x4214de=_0x198cf1['getCommentThread'](_0x2b63de);if(_0x4214de&&_0x4214de['unlinkedAt'])return;if(_0x4214de&&!_0x4214de['isAttached'])return;const _0x399d69=this['getAllMarkersForId'](_0x2b63de);for(const _0x5bfba9 of _0x399d69)_0x20f0eb['editing']['reconvertMarker'](_0x5bfba9);}}),_0x34b580&&this['scrollToThreadMarker'](_0x34b580);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x57df0d=this['editor'],_0x28b02b=_0x57df0d['plugins']['get'](o),_0x3c9f49=_0x57df0d['config']['get']('collaboration.channelId'),_0x3fd8c5=_0x28b02b['getCommentThreads']()['filter'](_0x49eda0=>_0x49eda0['channelId']!==_0x3c9f49);_0x57df0d['commands']['add']('addCommentThread',new ot(_0x57df0d)),this['listenTo'](_0x57df0d,'change:isReadOnly',(_0x587d20,_0x2e9c43,_0x215d76)=>{_0x28b02b['switchReadOnly'](_0x215d76,_0x57df0d['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x28b02b,dt('addCommentThread',_0x3c9f49),(_0x99c402,{threadId:_0x10b4c1})=>{const _0x25dd90=this['editor']['plugins']['get'](o)['getCommentThread'](_0x10b4c1);_0x25dd90?.['unlinkedAt']&&this['_attachArchivedThread'](_0x10b4c1);}),this['listenTo'](_0x28b02b,dt('removeCommentThread',_0x3c9f49),(_0x440b48,{threadId:_0xbbbbac})=>{_0x57df0d['model']['enqueueChange']({'isUndoable':!0x1},_0x49ee27=>{const _0x159852=this['getAllMarkersForId'](_0xbbbbac);for(const _0x129a12 of _0x159852)_0x49ee27['removeMarker'](_0x129a12);});}),this['listenTo'](_0x28b02b,dt('resolveCommentThread',_0x3c9f49),(_0x386416,{threadId:_0x56a688})=>{(this['_reconvertMarkers'](_0x56a688),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x56a688)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x28b02b,dt('reopenCommentThread',_0x3c9f49),(_0x1cbcf0,{threadId:_0x303533})=>{this['_reconvertMarkers'](_0x303533);},{'priority':'low'}),this['listenTo'](_0x28b02b,dt('addComment',_0x3c9f49),(_0x2350b0,{threadId:_0x55d2c6,isFromAdapter:_0x34a933})=>{const _0x5dadfa=this['getAllMarkersForId'](_0x55d2c6);if(_0x34a933||0x0==_0x5dadfa['length']||!_0x28b02b['hasCommentThread'](_0x55d2c6))return;0x1===_0x28b02b['getCommentThread'](_0x55d2c6)['length']&&_0x57df0d['model']['enqueueChange']({'isUndoable':!0x1},_0x296902=>{for(const _0x4a04c9 of _0x5dadfa)_0x296902['updateMarker'](_0x4a04c9,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3fd8c5);}['afterInit'](){!async function(_0x45ed51){const _0x408e35=_0x281c80([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]),_0x1ae6d5=0x73460ab3,_0x11225f=0x734170fb^_0x1ae6d5,_0x2539a2=window[_0x281c80([0x44,0x61,0x74,0x65])][_0x281c80([0x6e,0x6f,0x77])](),_0x32e5fd=_0x45ed51[_0x281c80([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5dd371=new window[(_0x281c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3a238e=>{_0x32e5fd[_0x281c80([0x6f,0x6e,0x63,0x65])](_0x281c80([0x72,0x65,0x61,0x64,0x79]),_0x3a238e);}),_0x3361c2={[_0x281c80([0x6b,0x74,0x79])]:_0x281c80([0x45,0x43]),[_0x281c80([0x75,0x73,0x65])]:_0x281c80([0x73,0x69,0x67]),[_0x281c80([0x63,0x72,0x76])]:_0x281c80([0x50,0x2d,0x32,0x35,0x36]),[_0x281c80([0x78])]:_0x281c80([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]),[_0x281c80([0x79])]:_0x281c80([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]),[_0x281c80([0x61,0x6c,0x67])]:_0x281c80([0x45,0x53,0x32,0x35,0x36])},_0x251b27=_0x32e5fd[_0x281c80([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x281c80([0x67,0x65,0x74])](_0x281c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x225763(){let _0x778d35,_0x5c639f=null,_0x3be6ea=null;try{if(_0x251b27==_0x281c80([0x47,0x50,0x4c]))return _0x281c80([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x778d35=_0x1ab159(),!_0x778d35)return _0x281c80([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x778d35[_0x281c80([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3be6ea=_0xa2573f(_0x778d35[_0x281c80([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x778d35[_0x281c80([0x6a,0x74,0x69])])),await _0x18a8e9()?_0x5234a8()?_0x4bf84b()?_0x281c80([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x50db22()?(_0x778d35[_0x281c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x281c80([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5c639f=_0x424fac(_0x281c80([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x778d35[_0x281c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x281c80([0x74,0x72,0x69,0x61,0x6c])&&(_0x5c639f=_0x424fac(_0x281c80([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x20eb2e()):_0x281c80([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x281c80([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x281c80([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x281c80([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4bf84b(){const _0x3189b7=[_0x281c80([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x281c80([0x74,0x72,0x69,0x61,0x6c])][_0x281c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x778d35[_0x281c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2539a2/0x3e8:0xe10*_0x11225f;return _0x778d35[_0x281c80([0x65,0x78,0x70])]<_0x3189b7;}function _0x5234a8(){const _0x276963=_0x778d35[_0x281c80([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x276963)return!0x1;if(_0x276963[_0x281c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x281c80([0x2a])))return!0x0;if(_0x276963[_0x281c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x281c80([0x43,0x4d,0x54])))return!0x0;if(_0x276963[_0x281c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x281c80([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x1f0c85())return!0x0;if(_0x276963[_0x281c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x281c80([0x52,0x43,0x4d,0x54]))){if(_0x23519f())return!0x0;if(_0x1bb921()||_0x433c11())return!0x0;}return!0x1;}function _0x50db22(){const _0xfb6417=_0x778d35[_0x281c80([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xfb6417||0x0==_0xfb6417[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x193278}=new URL(window[_0x281c80([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xfb6417[_0x281c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x193278))return!0x0;const _0x1737bd=_0x193278[_0x281c80([0x73,0x70,0x6c,0x69,0x74])](_0x281c80([0x2e]));return _0xfb6417[_0x281c80([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1f50ef=>_0x1f50ef[_0x281c80([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x281c80([0x2a])))[_0x281c80([0x6d,0x61,0x70])](_0x332302=>_0x332302[_0x281c80([0x73,0x70,0x6c,0x69,0x74])](_0x281c80([0x2e])))[_0x281c80([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x28c92e=>_0x28c92e[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1737bd[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x281c80([0x6d,0x61,0x70])](_0x48cba5=>Array(_0x1737bd[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x48cba5[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x281c80([0x66,0x69,0x6c,0x6c])](_0x48cba5[0x0]===_0x281c80([0x2a])?_0x281c80([0x2a]):'')[_0x281c80([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x48cba5))[_0x281c80([0x73,0x6f,0x6d,0x65])](_0x32dd97=>_0x1737bd[_0x281c80([0x65,0x76,0x65,0x72,0x79])]((_0x3b6ad5,_0x207b31)=>_0x32dd97[_0x207b31]===_0x3b6ad5||_0x32dd97[_0x207b31]===_0x281c80([0x2a])));}function _0x20eb2e(){return _0x5c639f&&_0x3be6ea?new window[(_0x281c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f5c20,_0x3be787)=>{_0x5c639f[_0x281c80([0x74,0x68,0x65,0x6e])](_0x3f5c20,_0x3be787),_0x3be6ea[_0x281c80([0x74,0x68,0x65,0x6e])](_0x3a9e8b=>{_0x3a9e8b!=_0x281c80([0x56,0x61,0x6c,0x69,0x64])&&_0x3f5c20(_0x3a9e8b);},_0x3be787);}):_0x5c639f||_0x3be6ea||_0x281c80([0x56,0x61,0x6c,0x69,0x64]);}}function _0xa2573f(_0x422cd1,_0x549975){return new window[(_0x281c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x129952=>{if(_0x51c743())return _0x129952(_0x281c80([0x56,0x61,0x6c,0x69,0x64]));_0x31bbc8(),_0x32e5fd[_0x281c80([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x281c80([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x1ccfda=!0x1;const _0x3e7c35=_0x58d165();function _0x48a1e7(_0x1f3450){return!!_0x1f3450&&(typeof _0x1f3450===_0x281c80([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1f3450===_0x281c80([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1f3450[_0x281c80([0x74,0x68,0x65,0x6e])]===_0x281c80([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1f3450[_0x281c80([0x63,0x61,0x74,0x63,0x68])]===_0x281c80([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x51850a(_0x2f2078){_0x530ad9(_0x2f2078)[_0x281c80([0x74,0x68,0x65,0x6e])](_0x52939f=>{if(!_0x52939f||_0x52939f[_0x281c80([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x281c80([0x6f,0x6b]))return _0x281c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1bb185(_0x49348b(_0x3e7c35+_0x549975))!=_0x52939f[_0x281c80([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x281c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x281c80([0x56,0x61,0x6c,0x69,0x64]);})[_0x281c80([0x74,0x68,0x65,0x6e])](_0x555b85=>(_0x48f570(),_0x555b85),()=>{const _0x34b9cc=_0x28daa4();return null==_0x34b9cc?(_0x48f570(),_0x281c80([0x56,0x61,0x6c,0x69,0x64])):_0x281c80(_0x2539a2-_0x34b9cc>(0x574a8eb3^_0x1ae6d5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x281c80([0x74,0x68,0x65,0x6e])](_0x129952)[_0x281c80([0x63,0x61,0x74,0x63,0x68])](()=>{_0x129952(_0x281c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x59e805=0x7370e433^_0x1ae6d5;function _0x48f570(){const _0x1cdb0b=_0x281c80([0x6c,0x6c,0x63,0x74,0x2d])+_0x1bb185(_0x49348b(_0x422cd1)),_0x20cf4a=_0xc66098(_0x1bb185(window[_0x281c80([0x4d,0x61,0x74,0x68])][_0x281c80([0x63,0x65,0x69,0x6c])](_0x2539a2/_0x59e805)));window[_0x281c80([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x281c80([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1cdb0b,_0x20cf4a);}function _0x28daa4(){const _0x487130=_0x281c80([0x6c,0x6c,0x63,0x74,0x2d])+_0x1bb185(_0x49348b(_0x422cd1)),_0x7700d9=window[_0x281c80([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x281c80([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x487130);return _0x7700d9?window[_0x281c80([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc66098(_0x7700d9),0x10)*_0x59e805:null;}function _0x530ad9(_0x2cb0b7){return new window[(_0x281c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xa07683,_0x25e955)=>{_0x2cb0b7[_0x281c80([0x74,0x68,0x65,0x6e])](_0xa07683,_0x25e955),window[_0x281c80([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x25e955,0x7347de73^_0x1ae6d5);});}}_0x32e5fd[_0x281c80([0x6f,0x6e])](_0x281c80([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3feb4e,_0x1baeff)=>{if(_0x1baeff[0x0]!=_0x422cd1)return _0x129952(_0x281c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1baeff[0x1]={..._0x1baeff[0x1],[_0x281c80([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3e7c35};},{[_0x281c80([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x281c80([0x68,0x69,0x67,0x68])}),_0x32e5fd[_0x281c80([0x6f,0x6e])](_0x281c80([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x377ba2=>{_0x48a1e7(_0x377ba2[_0x281c80([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x1ccfda=!0x0,_0x51850a(_0x377ba2[_0x281c80([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x281c80([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x281c80([0x6c,0x6f,0x77])}),_0x5dd371[_0x281c80([0x74,0x68,0x65,0x6e])](()=>{_0x1ccfda||_0x129952(_0x281c80([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x51c743(){return _0x32e5fd[_0x281c80([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x281c80([0x76,0x69,0x65,0x77])][_0x281c80([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x281c80([0x61,0x75,0x74,0x6f]);}function _0x31bbc8(){_0x32e5fd[_0x281c80([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x281c80([0x76,0x69,0x65,0x77])][_0x281c80([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x281c80([0x61,0x75,0x74,0x6f]);}}function _0x424fac(_0x1660cb){const _0x30a955=[new window[(_0x281c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26ce7e=>setTimeout(_0x26ce7e,0x734f347f^_0x1ae6d5)),_0x5dd371[_0x281c80([0x74,0x68,0x65,0x6e])](()=>new window[(_0x281c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x198520=>{let _0x4e3d19=0x0;_0x32e5fd[_0x281c80([0x6d,0x6f,0x64,0x65,0x6c])][_0x281c80([0x6f,0x6e])](_0x281c80([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x20ce91,_0x120a94)=>{_0x120a94[0x0][_0x281c80([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4e3d19++,_0x4e3d19==(0x73460b4b^_0x1ae6d5)&&(_0x198520(),_0x20ce91[_0x281c80([0x6f,0x66,0x66])]());});}))];return window[_0x281c80([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x281c80([0x72,0x61,0x63,0x65])](_0x30a955)[_0x281c80([0x74,0x68,0x65,0x6e])](()=>_0x1660cb);}async function _0x3ccc44(){await _0x5dd371,_0x32e5fd[_0x281c80([0x6d,0x6f,0x64,0x65,0x6c])][_0x281c80([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x6a10e9,_0x32e5fd[_0x281c80([0x6d,0x6f,0x64,0x65,0x6c])][_0x281c80([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x6a10e9,_0x32e5fd[_0x281c80([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x281c80([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1f0c85(){return window[_0x281c80([0x67,0x6c,0x6f,0x62])]&&window[_0x281c80([0x67,0x6c,0x6f,0x62])][_0x281c80([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x23519f(){return _0x3e20b5(_0x281c80([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1758a2(_0x281c80([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x281c80([0x73,0x74,0x61,0x74,0x65])]==_0x281c80([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1bb921(){return _0x3e20b5(_0x281c80([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 _0x433c11(){return _0x3e20b5(_0x281c80([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x404404(_0x58abe1){const _0x4a83f8=_0x9e9af6();_0x32e5fd[_0x4a83f8]=_0x281c80([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x58abe1,_0x58abe1!=_0x281c80([0x56,0x61,0x6c,0x69,0x64])&&_0x3ccc44();}function _0x9e9af6(){const _0x4149fd=window[_0x281c80([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x281c80([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x281c80([0x6e,0x6f,0x77])]())[_0x281c80([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x281c80([0x2e]),'');let _0x5f0f7f=_0x281c80([0x4b]);for(let _0x24fe9e=0x0;_0x24fe9e<_0x4149fd[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24fe9e+=0x2){let _0x5b92cf=window[_0x281c80([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4149fd[_0x281c80([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x24fe9e,_0x24fe9e+0x2));_0x5b92cf>=_0x408e35[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5b92cf-=_0x408e35[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5f0f7f+=_0x408e35[_0x5b92cf];}return _0x5f0f7f;}function _0x1ab159(){const _0x6d7d23=_0x251b27[_0x281c80([0x73,0x70,0x6c,0x69,0x74])](_0x281c80([0x2e]));if(0x3!=_0x6d7d23[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x239c9e(_0x6d7d23[0x1]);function _0x239c9e(_0x16f352){const _0x58f0a7=_0x38177c(_0x16f352);return _0x58f0a7&&_0x35b5e1()?_0x58f0a7:null;function _0x35b5e1(){const _0x564434=_0x58f0a7[_0x281c80([0x6a,0x74,0x69])],_0x8c0021=window[_0x281c80([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x564434[_0x281c80([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x564434[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3b43ac={..._0x58f0a7,[_0x281c80([0x6a,0x74,0x69])]:_0x564434[_0x281c80([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x564434[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3b43ac[_0x281c80([0x76,0x63])],_0x49348b(_0x3b43ac)==_0x8c0021;}}}async function _0x18a8e9(){let _0x416550=!0x0;try{const _0x322e45=_0x251b27[_0x281c80([0x73,0x70,0x6c,0x69,0x74])](_0x281c80([0x2e])),[_0x28b3c2,_0x166e24,_0x1ed974]=_0x322e45;return _0xdaf5f9(_0x28b3c2),await _0x5b2a6f(_0x28b3c2,_0x166e24,_0x1ed974),_0x416550;}catch{return!0x1;}function _0xdaf5f9(_0x1f4784){const _0x3a517a=_0x38177c(_0x1f4784);_0x3a517a&&_0x3a517a[_0x281c80([0x61,0x6c,0x67])]==_0x281c80([0x45,0x53,0x32,0x35,0x36])||(_0x416550=!0x1);}async function _0x5b2a6f(_0x345312,_0x304aa2,_0x5d5aad){const _0x1fa3e3=window[_0x281c80([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x281c80([0x66,0x72,0x6f,0x6d])](_0x383288(_0x5d5aad),_0x4e9c60=>_0x4e9c60[_0x281c80([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x11ffc6=new window[(_0x281c80([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x281c80([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x345312+_0x281c80([0x2e])+_0x304aa2),_0x2e3533=window[_0x281c80([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x281c80([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2e3533)return;const _0x1ae7ae=await _0x2e3533[_0x281c80([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x281c80([0x6a,0x77,0x6b]),_0x3361c2,{[_0x281c80([0x6e,0x61,0x6d,0x65])]:_0x281c80([0x45,0x43,0x44,0x53,0x41]),[_0x281c80([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x281c80([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x281c80([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2e3533[_0x281c80([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x281c80([0x6e,0x61,0x6d,0x65])]:_0x281c80([0x45,0x43,0x44,0x53,0x41]),[_0x281c80([0x68,0x61,0x73,0x68])]:{[_0x281c80([0x6e,0x61,0x6d,0x65])]:_0x281c80([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1ae7ae,_0x1fa3e3,_0x11ffc6)||(_0x416550=!0x1);}}function _0x38177c(_0x3659a6){return _0x3659a6[_0x281c80([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x281c80([0x65,0x79]))?JSON[_0x281c80([0x70,0x61,0x72,0x73,0x65])](_0x383288(_0x3659a6)):null;}function _0x383288(_0x1a5dff){return window[_0x281c80([0x61,0x74,0x6f,0x62])](_0x1a5dff[_0x281c80([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x281c80([0x2b]))[_0x281c80([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x281c80([0x2f])));}function _0x49348b(_0x43076b){let _0x431dbc=0x1505;function _0x427dba(_0x2f7730){for(let _0x19ad49=0x0;_0x19ad49<_0x2f7730[_0x281c80([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x19ad49++){const _0x13960e=_0x2f7730[_0x281c80([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x19ad49);_0x431dbc=(_0x431dbc<<0x5)+_0x431dbc+_0x13960e,_0x431dbc&=_0x431dbc;}}function _0x48755d(_0x538154){Array[_0x281c80([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x538154)?_0x538154[_0x281c80([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x48755d):_0x538154&&typeof _0x538154==_0x281c80([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x281c80([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x538154)[_0x281c80([0x73,0x6f,0x72,0x74])]()[_0x281c80([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2b2c87,_0xd2b146])=>{_0x427dba(_0x2b2c87),_0x48755d(_0xd2b146);}):_0x427dba(window[_0x281c80([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x538154));}return _0x48755d(_0x43076b),_0x431dbc>>>0x0;}function _0x1bb185(_0x6beb09){return _0x6beb09[_0x281c80([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x281c80([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x281c80([0x30]));}function _0xc66098(_0x25cab0){return _0x25cab0[_0x281c80([0x73,0x70,0x6c,0x69,0x74])]('')[_0x281c80([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x281c80([0x6a,0x6f,0x69,0x6e])]('');}function _0x3e20b5(_0x2add1d){return _0x32e5fd[_0x281c80([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x281c80([0x68,0x61,0x73])](_0x2add1d);}function _0x1758a2(_0x3d0008){return _0x32e5fd[_0x281c80([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x281c80([0x67,0x65,0x74])](_0x3d0008);}function _0x6a10e9(){}function _0x281c80(_0xd77173){return _0xd77173['map'](_0x488adb=>String['fromCharCode'](_0x488adb))['join']('');}_0x404404(await _0x225763());}(this);}['destroy'](){const _0x1814d0=this['editor']['plugins']['get'](o),_0x19fc5b=this['editor']['config']['get']('collaboration.channelId');for(const _0x177ee7 of _0x1814d0['getCommentThreads']({'channelId':_0x19fc5b}))_0x1814d0['_detachCommentThread'](_0x177ee7['id']),_0x1814d0['_threads']['delete'](_0x177ee7['id']);super['destroy']();}['hasMarkerForId'](_0x208acd){return this['getAllMarkersForId'](_0x208acd)['length']>0x0;}['getAllMarkersForId'](_0x51c6f5){const _0x9eb4f1=[];for(const _0x540753 of this['editor']['model']['markers'])_0x540753['name']['startsWith']('comment:'+_0x51c6f5)&&_0x9eb4f1['push'](_0x540753);return _0x9eb4f1;}['scrollToThreadMarker'](_0x518697){setTimeout(()=>{const _0x3a5b64=this['_getTargetForId'](_0x518697);if(!_0x3a5b64)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x518697&&nt({'target':_0x3a5b64[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x242d72){this['editor']['model']['change'](()=>{for(const _0x24cfdd of this['getAllMarkersForId'](_0x242d72))this['editor']['editing']['reconvertMarker'](_0x24cfdd);});}['_attachArchivedThread'](_0x582118){const _0x139fe8=this['editor']['plugins']['get'](o),_0x132259=this['editor']['plugins']['get'](b),_0x3e2155=_0x139fe8['getCommentThread'](_0x582118);if(!_0x3e2155['isAttached']){const _0x5d8f12=_0x3e2155['attachTo'](()=>this['_getTargetForId'](_0x3e2155['id']));_0x132259['registerAnnotation'](_0x5d8f12),_0x3e2155['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1829be=this['editor'],_0x5102d5=_0x1829be['plugins']['get'](it);_0x1829be['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x19a3ca,_0x2eab30)=>{const {id:_0x4115d6}=ft(_0x19a3ca['markerName']),_0x5f566e=_0x1829be['plugins']['get'](o)['getCommentThread'](_0x4115d6),_0x38e532=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4115d6;let _0x5a1699;if(_0x5f566e&&_0x5f566e['isResolved']&&!_0x38e532&&_0x19a3ca['item'])return _0x2eab30['consumable']['consume'](_0x19a3ca['item'],'addMarker:'+_0x19a3ca['markerName']),_0x2eab30['consumable']['consume'](_0x19a3ca['item'],'removeMarker:'+_0x19a3ca['markerName']),null;const _0x2ea251=['ck-comment-marker'];return _0x38e532&&_0x2ea251['push']('ck-comment-marker--active'),_0x5a1699=_0x5f566e?.['length']?_0x5f566e['comments']['first']['author']['id']:_0x5102d5['me']['id'],{'classes':_0x2ea251,'attributes':{'data-comment':_0x4115d6,'data-author-id':_0x5a1699}};}}),_0x1829be['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1688a,{options:_0x4008d7})=>{if(_0x4008d7['showCommentHighlights'])return null;const _0x1fd254=_0x1829be['plugins']['get'](o),_0x3a4f73=_0x1829be['model']['markers']['get'](_0x1688a),{id:_0x2d864a,part:_0xe88776}=ft(_0x1688a);return _0x3a4f73&&!_0x3a4f73['affectsData']||_0x4008d7['ignoreResolvedComments']&&_0x1fd254['getCommentThread'](_0x2d864a)?.['isResolved']?null:{'group':'comment','name':_0xe88776?_0x2d864a+':'+_0xe88776:_0x2d864a};}}),_0x1829be['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x593bad,{writer:_0x3e7ca9})=>_0x3e7ca9['createElement']('$marker',{'data-name':'comment:'+_0x593bad['getAttribute']('id')})}),_0x1829be['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x144b01=this['editor'],_0x21824f=_0x144b01['plugins']['get'](o),_0x2059a7=new Set(),_0x2cef34=new Set();_0x144b01['model']['document']['registerPostFixer'](_0x23c23b=>{let _0x148f98=!0x1;for(const {name:_0x341d2c,data:_0x25bd75}of _0x144b01['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2fa22c,id:_0x10f805}=ft(_0x341d2c);let _0x35ef38=_0x25bd75['newRange'];if('comment'!==_0x2fa22c||!_0x35ef38)continue;const _0x4d35da='$graveyard'===_0x35ef38['root']['rootName'];_0x4d35da||(_0x35ef38=ht(_0x35ef38,_0x144b01['model']),!_0x35ef38||_0x35ef38['isCollapsed']||!_0x25bd75['newRange']||_0x35ef38['isEqual'](_0x25bd75['newRange']))?_0x144b01['model']['hasContent'](_0x35ef38)&&!_0x4d35da?this['isThreadsLoadingPaused']?_0x2059a7['add'](_0x341d2c):this['_handleThreadMarker'](_0x341d2c,_0x10f805):(_0x2cef34['add'](_0x341d2c),_0x2059a7['delete'](_0x341d2c),_0x23c23b['removeMarker'](_0x341d2c),_0x148f98=!0x0):(_0x23c23b['updateMarker'](_0x341d2c,{'range':_0x35ef38}),_0x148f98=!0x0);}return _0x148f98;}),this['on']('change:isThreadsLoadingPaused',(_0x28e2db,_0x2c42fa,_0x5c54c9)=>{if(!_0x5c54c9&&_0x2059a7['size'])for(const _0x56f2c6 of _0x2059a7){const {id:_0x25f126}=ft(_0x56f2c6);_0x2059a7['delete'](_0x56f2c6),_0x144b01['model']['markers']['get'](_0x56f2c6)&&this['_handleThreadMarker'](_0x56f2c6,_0x25f126);}}),this['listenTo'](_0x144b01['model']['document'],'change',()=>{for(const {name:_0x11a95c,data:{newRange:_0x11e684}}of _0x144b01['model']['document']['differ']['getChangedMarkers']()){const {group:_0x868d7a,id:_0x59f140}=ft(_0x11a95c);if('comment'!==_0x868d7a)continue;const _0x217244=_0x21824f['getCommentThread'](_0x59f140),_0x773ddc=this['hasMarkerForId'](_0x59f140);_0x217244&&(!_0x217244['_hasTargetInContent']&&_0x11e684&&_0x144b01['editing']['view']['once']('render',()=>{const _0x413c69=_0x144b01['plugins']['get'](y),_0x20f0f0=_0x21824f['_threadToController']['get'](_0x217244)['view'];_0x413c69['getByInnerView'](_0x20f0f0)['refreshVisibility']();},{'priority':'low'}),_0x217244['_hasTargetInContent']=_0x773ddc||!!_0x11e684),_0x11e684||(_0x2cef34['add'](_0x11a95c),_0x2059a7['delete'](_0x11a95c));}for(const _0x18b11c of _0x2cef34){const {id:_0xf2da94}=ft(_0x18b11c),_0x569ebd=_0x21824f['getCommentThread'](_0xf2da94);if(_0x2059a7['delete'](_0x18b11c),!_0x569ebd)continue;const _0x507413=this['hasMarkerForId'](_0xf2da94);_0x507413||_0x569ebd['isSubmitted']?_0x507413||_0x569ebd['unlinkedAt']||_0x569ebd['setUnlinkedAt'](new Date()):_0x569ebd['remove']();}_0x2cef34['clear']();});}['_handleInitialThreads'](_0x388ae6){_0x388ae6['forEach'](_0x4d7920=>{_0x4d7920['unlinkedAt']&&this['_attachArchivedThread'](_0x4d7920['id']);});}['_getTargetForId'](_0x2931e3){const _0x4def46=this['editor'],_0x50b8dc=this['getAllMarkersForId'](_0x2931e3);return et(_0x4def46['editing'],_0x50b8dc);}['_getTextContext'](_0x2f3116){const _0x1245da=this['getAllMarkersForId'](_0x2f3116);let _0x2accf7='',_0xe444cf=!0x1;for(const _0x5e6c65 of _0x1245da){const _0x3a0a23=_0x5e6c65['getRange']();for(const _0x3a61e1 of Array['from'](_0x3a0a23['getItems']()))_0x3a61e1['is']('$textProxy')?(_0x2accf7&&_0xe444cf&&(_0x2accf7+='\x20',_0xe444cf=!0x1),_0x2accf7+=_0x3a61e1['data']):_0xe444cf=!0x0;_0xe444cf=!0x0;}return _0x2accf7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4c626f,_0x5c79ee){const _0x14b104=this['editor'],_0xa1fe1e=_0x14b104['plugins']['get'](o);let _0x13eb0f=_0xa1fe1e['getCommentThread'](_0x5c79ee);const _0x2cf120=_0x14b104['config']['get']('collaboration.channelId'),_0x4c9753=_0x14b104['plugins']['get'](b);if(_0x13eb0f&&(_0x13eb0f['unlinkedAt']&&_0x13eb0f['setUnlinkedAt'](null),_0x13eb0f['isAttached']))return _0x13eb0f;return!this['getAllMarkersForId'](_0x5c79ee)[0x0]['managedUsingOperations']?_0x14b104['editing']['view']['once']('render',()=>{if(_0xa1fe1e['getCommentThread'](_0x5c79ee))return;const _0x5baa14=_0x14b104['plugins']['get'](y);_0x13eb0f=_0xa1fe1e['openNewCommentThread']({'channelId':_0x2cf120,'threadId':_0x5c79ee,'target':()=>this['_getTargetForId'](_0x5c79ee),'context':{'type':'text','value':this['_getTextContext'](_0x5c79ee)}});const _0x3104db=_0xa1fe1e['_threadToController']['get'](_0x13eb0f)['view'],_0x1c2b72=_0x5baa14['getByInnerView'](_0x3104db);_0x1c2b72&&_0x4c9753['registerAnnotation'](_0x1c2b72);},{'priority':'low'}):_0xa1fe1e['fetchCommentThread']({'channelId':_0x2cf120,'threadId':_0x5c79ee})['then'](_0x5e54e7=>{if('destroyed'!==_0x14b104['state']){if(_0x13eb0f=_0x5e54e7,_0x13eb0f&&!_0x13eb0f['isAttached']){const _0x1d9a0f=_0x13eb0f['attachTo'](()=>this['_getTargetForId'](_0x5c79ee));_0x4c9753['registerAnnotation'](_0x1d9a0f),_0x13eb0f['isResolved']&&this['_reconvertMarkers'](_0x5c79ee);}else{if(!_0x13eb0f){const _0x1c2492=this['getAllMarkersForId'](_0x5c79ee);_0x14b104['model']['change'](_0x474317=>{for(const _0x24048c of _0x1c2492)_0x474317['removeMarker'](_0x24048c);});}}}}),_0x13eb0f;}['_handleThreadMarker'](_0x2cbced,_0x5ead80){const _0xcc9446=this['_attachMarkerToThread'](_0x2cbced,_0x5ead80);_0xcc9446&&!_0xcc9446['context']&&_0xcc9446['setContext']({'type':'text','value':this['_getTextContext'](_0x5ead80)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4375e1=this['editor'];rt(_0x4375e1['model'],({left:_0x3c2ca7,entered:_0x15026d})=>{for(const _0x2fa4c3 of _0x3c2ca7)if(mt(_0x2fa4c3)){_0x4375e1['ui']['ariaLiveAnnouncer']['announce'](N(_0x4375e1['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3849c3 of _0x15026d)if(mt(_0x3849c3)){_0x4375e1['ui']['ariaLiveAnnouncer']['announce'](N(_0x4375e1['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x215ef6)));break;}});}}function dt(_0x2808bf,_0x51ebc1){return _0x51ebc1?_0x2808bf+':'+_0x51ebc1:_0x2808bf;}function ht(_0x43a9ab,_0x11f831){const _0x465ab5=_0x11f831['schema'],_0x1cf9ae=_0x11f831['createRange'](_0x43a9ab['start']);for(const _0x27cf32 of _0x43a9ab['getWalker']()){const {type:_0x550710,item:_0x1d2935,nextPosition:_0x2dc12e}=_0x27cf32;if('text'===_0x550710||_0x465ab5['isObject'](_0x1d2935)){const _0x51efac=_0x11f831['createPositionBefore'](_0x1d2935);_0x1cf9ae['isCollapsed']&&(_0x1cf9ae['start']=_0x51efac),_0x1cf9ae['end']=_0x2dc12e;}}return _0x1cf9ae;}function mt(_0x2b4c41){return'comment'===ft(_0x2b4c41['name'])['group'];}class s extends _0x121eca{['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 _0x1204ff=this['editor'],_0xd3b9c4=_0x1204ff['plugins']['get'](o),_0x18c851=_0x1204ff['plugins']['get'](r),_0x24bfe0=_0x1204ff['plugins']['get'](y),_0x1b5e4a=_0x1204ff['plugins']['get'](b);_0x1204ff['ui']['componentFactory']['add']('comment',()=>{const _0x389994=this['_createUIButton'](_0x1f4f59);return _0x389994['tooltip']=!0x0,_0x389994;}),_0x1204ff['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0xd685a4)),_0x1b5e4a['addSourceCollector'](()=>{const _0xa73556=[];for(const [_0x3b3ed4,_0x882332]of _0xd3b9c4['_threadToController']){const _0x1c2cf6=_0x18c851['getAllMarkersForId'](_0x3b3ed4['id']),_0x47b613=_0x1c2cf6['map'](_0x38f635=>_0x38f635['getRange']());_0x1c2cf6['length']>0x0&&_0xa73556['push']([_0x882332['view'],_0x47b613]);}return _0xa73556;}),this['listenTo'](_0x24bfe0,'change:activeAnnotations',(_0x418db4,_0x5a752a,_0x17bf90)=>{const _0x2ec133=Array['from'](_0x17bf90)['map'](_0x432572=>_0x432572['innerView'])['find'](_0x36564c=>_0xd3b9c4['_viewToController']['has'](_0x36564c));if(!_0x2ec133)return void(_0x18c851['activeMarker']=null);const _0x544db7=_0xd3b9c4['_viewToController']['get'](_0x2ec133)['model']['id'],_0xc0b01b='comment:'+_0x544db7;_0x544db7&&_0x18c851['hasMarkerForId'](_0x544db7)?_0x18c851['activeMarker']=_0xc0b01b:_0x18c851['activeMarker']&&(_0x18c851['activeMarker']=null);}),this['listenTo'](_0xd3b9c4,'removeCommentThread',(_0x551a1a,{threadId:_0x29daa2,isFromAdapter:_0xd3ee1d})=>{!_0xd3ee1d&&_0x1204ff['ui']['focusTracker']['isFocused']&&_0x18c851['hasMarkerForId'](_0x29daa2)&&_0x1204ff['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xd3b9c4,'addComment',(_0x130c6d,{threadId:_0x19dc7f,isFromAdapter:_0x15e92f})=>{if(_0x15e92f||!_0x18c851['hasMarkerForId'](_0x19dc7f)||!_0xd3b9c4['hasCommentThread'](_0x19dc7f))return;0x1===_0xd3b9c4['getCommentThread'](_0x19dc7f)['length']&&(_0x1204ff['editing']['view']['focus'](),_0x130c6d['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x44c907=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1ed8cf;for(const _0x417e18 in _0x44c907){const _0x4279f1=_0x417e18,_0x471d07=_0x44c907[_0x4279f1];if('commentsLicenseKeyValid'==_0x471d07||'commentsLicenseKeyInvalid'==_0x471d07||'commentsLicenseKeyExpired'==_0x471d07||'commentsLicenseKeyDomainLimit'==_0x471d07||'commentsLicenseKeyNotAllowed'==_0x471d07||'commentsLicenseKeyEvaluationLimit'==_0x471d07||'commentsLicenseKeyTrialLimit'==_0x471d07||'commentsLicenseKeyUsageLimit'==_0x471d07){delete _0x44c907[_0x4279f1],_0x1ed8cf=_0x471d07,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1ed8cf&&_0x44c907['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1ed8cf&&_0x44c907['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1ed8cf&&_0x44c907['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1ed8cf&&_0x44c907['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1ed8cf&&_0x44c907['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1ed8cf&&_0x44c907['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1ed8cf&&_0x44c907['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xb26315){const _0x3ff0d3=this['editor'],_0x2a05e2=new _0xb26315(_0x3ff0d3['locale']),_0x5b4605=_0x3ff0d3['commands']['get']('addCommentThread');return _0x2a05e2['set']({'label':N(_0x3ff0d3['locale'],'Comment'),'icon':_0x30e8bb}),_0x2a05e2['bind']('isEnabled')['to'](_0x5b4605,'isEnabled',_0x5b4605,'hasContent',(_0x380693,_0x55b284)=>_0x380693&&_0x55b284),this['listenTo'](_0x2a05e2,'execute',()=>{_0x5b4605['execute']();}),_0x2a05e2;}}class i extends _0x121eca{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1059ca){super(_0x1059ca),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x67807b,_0x102d50,_0x1b92b6)=>{_0x1b92b6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x7a7a2c,_0x28c782]of this['editor']['commands'])_0x28c782['affectsData']&&'addCommentThread'!==_0x7a7a2c&&_0x28c782['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x46fe45=this['editor']['editing']['view']['document'];this['listenTo'](_0x46fe45,'cut',_0x1fb916=>_0x1fb916['stop'](),{'priority':'highest'}),this['listenTo'](_0x46fe45,'clipboardInput',_0x4f2308=>_0x4f2308['stop'](),{'priority':'highest'}),this['listenTo'](_0x46fe45,'delete',_0x220570=>_0x220570['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5bd0ac,_0x31b4ce]of this['editor']['commands'])_0x31b4ce['affectsData']&&'addCommentThread'!==_0x5bd0ac&&_0x31b4ce['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x189fac{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x10e051){super(_0x10e051),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1bf71e=this['context']['plugins']['get'](y);this['listenTo'](_0x1bf71e,'_activateAnnotation',(_0x1a31ed,_0x19e09d)=>{for(const _0x442d2b of this['activeUIs']){const _0x4860ba=this['_uis']['get'](_0x442d2b);(0x0,this['uisData']['get'](_0x442d2b)['filter'])(_0x19e09d)&&_0x4860ba['setActiveAnnotation'](_0x19e09d);}}),this['listenTo'](_0x1bf71e,'_deactivateAllAnnotations',()=>{for(const _0x1ac216 of this['activeUIs']){this['_uis']['get'](_0x1ac216)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1bf71e['_visibleAnnotations'],'add',(_0x39eac8,_0xa5d5c9)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xa5d5c9);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2b6341){return this['activeUIs']['has'](_0x2b6341);}['activate'](_0x1a0539,_0x2ae3e6=this['defaultFilter']){const _0x78303f=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1a0539))throw new _0xb3df69('annotationsuis-missing-ui',this,{'uiName':_0x1a0539});this['isActive'](_0x1a0539)&&this['deactivate'](_0x1a0539),this['activeUIs']['add'](_0x1a0539);const _0x534b01=new S();v({'source':_0x78303f['_visibleAnnotations'],'target':_0x534b01,'filter':_0x2ae3e6}),this['uisData']['set'](_0x1a0539,{'collection':_0x534b01,'filter':_0x2ae3e6});const _0x5d7ef3=this['_uis']['get'](_0x1a0539);_0x5d7ef3['attach'](_0x534b01),this['listenTo'](_0x5d7ef3,'change:activeAnnotation',(_0x38d429,_0x2cb1f2,_0x138d20,_0x81fdf3)=>{_0x81fdf3&&_0x78303f['_removeActiveAnnotation'](_0x81fdf3),_0x138d20&&_0x78303f['_addActiveAnnotation'](_0x138d20);});}['deactivate'](_0x3e38dd){if(this['activeUIs']['delete'](_0x3e38dd),!this['_uis']['has'](_0x3e38dd))throw new _0xb3df69('annotationsuis-missing-ui',this,{'uiName':_0x3e38dd});const _0x4d16fb=this['_uis']['get'](_0x3e38dd);_0x4d16fb['detach'](),this['stopListening'](_0x4d16fb),this['uisData']['get'](_0x3e38dd)['collection']['destroy'](),this['uisData']['delete'](_0x3e38dd);}['switchTo'](_0x4d1e2f){if(!this['_uis']['has'](_0x4d1e2f))throw new _0xb3df69('annotationsuis-missing-ui',this,{'uiName':_0x4d1e2f});const _0x173e11=this['context']['plugins']['get'](y),_0x322a1c=Array['from'](_0x173e11['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4d1e2f);const _0x19fb87=this['_uis']['get'](_0x4d1e2f);_0x19fb87['setActiveAnnotation'](_0x322a1c),_0x19fb87['_setSelectedAnnotations']&&_0x322a1c&&_0x19fb87['_setSelectedAnnotations']([_0x322a1c]);}['deactivateAll'](){for(const _0x630aa3 of this['activeUIs'])this['deactivate'](_0x630aa3);}['register'](_0x4c3edf,_0x4e8810){if(this['_uis']['has'](_0x4c3edf))throw new _0xb3df69('annotationsuis-register-already-registered');if('function'!=typeof _0x4e8810['attach']||'function'!=typeof _0x4e8810['detach']||'function'!=typeof _0x4e8810['setActiveAnnotation'])throw new _0xb3df69('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4c3edf,_0x4e8810);}['refilterAnnotations'](){const _0xa95c96=this['context']['plugins']['get'](y)['collection'],_0x1567a1=new Map(),_0x10e55e=Array['from'](this['activeUIs']);for(const _0x559e60 of this['activeUIs']){const _0x3205f1=this['uisData']['get'](_0x559e60)['collection'];for(const _0x467b40 of _0x3205f1)_0x1567a1['set'](_0x467b40,_0x559e60);}for(const _0x122417 of _0xa95c96){const _0x58db07=_0x1567a1['get'](_0x122417);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x122417);const _0x7d37d0=_0x10e55e['find'](_0x3a30df=>this['uisData']['get'](_0x3a30df)['filter'](_0x122417));_0x58db07!==_0x7d37d0&&(_0x58db07&&this['uisData']['get'](_0x58db07)['collection']['remove'](_0x122417),_0x7d37d0&&this['uisData']['get'](_0x7d37d0)['collection']['add'](_0x122417));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2d28a0){const _0x1abaef=[];for(const _0x58745f of this['activeUIs']){(0x0,this['uisData']['get'](_0x58745f)['filter'])(_0x2d28a0)&&_0x1abaef['push'](_0x58745f);}if(_0x1abaef['length']>0x1)throw new _0xb3df69('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1abaef,'annotationType':_0x2d28a0['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x343ab9){super(_0x343ab9),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4e2608,_0x33b445)=>_0x4e2608+_0x33b445),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x51a103=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x51a103['to']('isAnimationDisabled',_0x4e5fcf=>_0x4e5fcf?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x51a103['to']('top',_0x38d5fa=>Ot(_0x38d5fa))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3effce=this['element']['clientHeight'];_0x3effce&&(this['height']=_0x3effce);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x189fac{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7ea6e6){super(_0x7ea6e6),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 _0x1faa28=this['context']['config']['get']('sidebar.container');_0x1faa28&&this['setContainer'](_0x1faa28);}['setContainer'](_0x4f832d){if(!g(_0x4f832d))throw new _0xb3df69('sidebar-setcontainer-invalid-element');this['container']=_0x4f832d;}['_attachToContainer']({viewClass:_0x193b45='',spaceBetweenItems:_0x960f0a=0x19}={}){if(!g(this['container']))throw new _0xb3df69('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x193b45,this['_spaceBetweenItems']=_0x960f0a;}['rearrange']({removedAnnotation:_0x23e48a,previousAnnotation:_0x4e6532,nextAnnotation:_0x253f6c}){const _0x4e61b8=this['getSidebarItemView'](_0x23e48a);this['view']['list']['remove'](_0x4e61b8),this['_destroySidebarItemView'](_0x23e48a),_0x4e6532&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4e6532)),_0x253f6c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x253f6c)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3f8292,activatedAnnotation:_0x2abd7e,disableAnimationOnActivatedAnnotation:_0x17c6f3}){if(this['_activeAnnotation']=_0x2abd7e,_0x3f8292){_0x3f8292['isActive']=!0x1;const _0x59f4f3=this['getSidebarItemView'](_0x3f8292);_0x59f4f3&&_0x17c6f3&&(_0x59f4f3['isAnimationDisabled']=!0x1);}if(_0x2abd7e){const _0x1a4b3c=this['getSidebarItemView'](_0x2abd7e);_0x1a4b3c&&(_0x2abd7e['isActive']=!0x0,_0x17c6f3&&(_0x1a4b3c['isAnimationDisabled']=!0x0,_0x1a4b3c['top']+=0x1),this['_alignToTargetRect'](_0x1a4b3c));}}['_detachFromContainer'](_0x42664e){if(this['view']['element']['remove'](),_0x42664e){for(const _0x30b2ab of _0x42664e)this['_destroySidebarItemView'](_0x30b2ab);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x15a64c,_0x1569ab){_0x1569ab||(_0x1569ab=_0x15a64c['view']);const _0x89117f=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x89117f,_0x15a64c),this['_annotationToSidebarItemView']['set'](_0x15a64c,_0x89117f),_0x89117f['content']['add'](_0x1569ab),this['listenTo'](_0x15a64c['view'],'change:targetRect',(_0x497c44,_0xbb8dfd,_0x10637f)=>{const _0x5bb9a2=this['_getTargetTop'](_0x15a64c,_0x10637f);_0x89117f['_targetTop']!=_0x5bb9a2&&(_0x89117f['_targetTop']=_0x5bb9a2,this['_setItemTop'](_0x89117f,_0x5bb9a2));}),this['listenTo'](_0x89117f,'change:top',()=>{this['_recalculate'](_0x89117f,'top');}),this['listenTo'](_0x89117f,'change:bottom',()=>{this['_recalculate'](_0x89117f,'bottom');}),this['_alignToTargetRect'](_0x89117f);const _0x8d8882=this['_getItemBefore'](_0x89117f);if(_0x8d8882)this['_alignAfterItem'](_0x8d8882,_0x89117f)||this['_alignToTargetRect'](_0x89117f);else this['_alignToTargetRect'](_0x89117f);return this['_updateLastItem'](),this['view']['list']['add'](_0x89117f),_0x89117f;}['_alignForTopChange'](_0x438c2c){if(!_0x438c2c['content']['length'])return;const _0x420717=this['_getItemBefore'](_0x438c2c);if(!_0x420717)return;const _0x395fda=this['_sidebarItemViewToAnnotation']['get'](_0x420717),_0x2b4174=this['_activeAnnotation'];_0x2b4174&&_0x2b4174===_0x395fda?this['_alignAfterItem'](_0x420717,_0x438c2c):this['_alignBeforeItem'](_0x438c2c,_0x420717);}['_alignForBottomChange'](_0x29f642){if(!_0x29f642['content']['length'])return;const _0xe5e611=this['_getItemAfter'](_0x29f642);if(!_0xe5e611)return;const _0x56ae3a=this['_sidebarItemViewToAnnotation']['get'](_0xe5e611),_0x350670=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4635a8=this['_activeAnnotation'];_0x4635a8&&_0x4635a8===_0x56ae3a&&_0x350670?(this['_alignBeforeItem'](_0xe5e611,_0x29f642),this['_alignAfterItem'](_0x29f642,_0xe5e611)):_0x4635a8&&_0x4635a8===_0x56ae3a?this['_alignBeforeItem'](_0xe5e611,_0x29f642):this['_alignAfterItem'](_0x29f642,_0xe5e611);}['_recalculate'](_0x5add4c,_0x21e66c){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x11df11,changedProp:_0x3ea0ca}of this['_recalculateBuffer'])'top'===_0x3ea0ca?this['_alignForTopChange'](_0x11df11):this['_alignForBottomChange'](_0x11df11);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5add4c,'changedProp':_0x21e66c});}['getSidebarItemView'](_0x2a61c9){return this['_annotationToSidebarItemView']['get'](_0x2a61c9);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x299172){const _0x225fc9=this['getSidebarItemView'](_0x299172);this['stopListening'](_0x225fc9),this['stopListening'](_0x299172['view']),_0x225fc9['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x299172),this['_sidebarItemViewToAnnotation']['delete'](_0x225fc9);}['_createSidebarView'](){const _0x33da02=new H(this['context']['locale']);return _0x33da02['render'](),this['on']('change:_lastItem',(_0xf0d98,_0x80acef,_0xe510c,_0x248d6d)=>{_0x248d6d&&_0x33da02['unbind']('minHeight'),_0xe510c?_0x33da02['bind']('minHeight')['to'](_0xe510c,'bottom'):_0x33da02['minHeight']=null;}),_0x33da02;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x36f514){const _0x7c5e96=this['_sidebarItemViewToAnnotation']['get'](_0x36f514),_0x4641cb=_0x7c5e96&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x7c5e96)-0x1);return _0x4641cb&&this['getSidebarItemView'](_0x4641cb)||null;}['_getItemAfter'](_0x5557e1){const _0x484f07=this['_sidebarItemViewToAnnotation']['get'](_0x5557e1),_0x5393de=_0x484f07&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x484f07)+0x1);return _0x5393de&&this['getSidebarItemView'](_0x5393de)||null;}['_alignBeforeItem'](_0xb235d1,_0x192569){_0xb235d1['updateHeight']();const _0x16ca02=G(_0x192569['bottom']+this['_spaceBetweenItems'],_0xb235d1['top']);return!!_0x16ca02&&(this['_setItemTop'](_0x192569,_0x192569['top']-_0x16ca02),!0x0);}['_alignAfterItem'](_0x5bc727,_0x2d6a84){_0x5bc727['updateHeight']();const _0x683005=G(_0x5bc727['bottom']+this['_spaceBetweenItems'],_0x2d6a84['top']);return!!_0x683005&&(this['_setItemTop'](_0x2d6a84,_0x2d6a84['top']+_0x683005,!0x1),!0x0);}['_alignToTargetRect'](_0x31be7c){const _0xe79c25=this['_sidebarItemViewToAnnotation']['get'](_0x31be7c);if(!_0xe79c25||!_0xe79c25['target']||!_0xe79c25['targetRect'])return;const _0x49ba41=this['_getTargetTop'](_0xe79c25,_0xe79c25['targetRect']);this['_setItemTop'](_0x31be7c,_0x49ba41);}['_getTargetTop'](_0x3769b8,_0x4968d1){if(null===_0x4968d1)return 0x0;if(_0x3769b8['target']instanceof _0x15797d)return _0x4968d1['top'];{const _0x5582c3=new _0x15797d(this['view']['element'])['top'];return _0x4968d1['top']-_0x5582c3;}}['_setItemTop'](_0x585c20,_0x2ab36b,_0x2fd56d=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2fd56d&&(_0x2ab36b=Math['max'](_0x2ab36b,this['_getMaxAvailableTop'](_0x585c20))),_0x585c20['top']=_0x2ab36b;}['_getMaxAvailableTop'](_0x1acef6){let _0x4a75ff=this['_getItemBefore'](_0x1acef6),_0x29fa43=0x0;for(;_0x4a75ff;)_0x4a75ff['updateHeight'](),_0x29fa43+=this['_spaceBetweenItems']+_0x4a75ff['height'],_0x4a75ff=this['_getItemBefore'](_0x4a75ff);return _0x29fa43;}}function G(_0x237e3f,_0x31ceb2){return Math['max'](_0x237e3f-_0x31ceb2,0x0);}function g(_0xa00e52){return null!==_0xa00e52&&'object'==typeof _0xa00e52&&0x1===_0xa00e52['nodeType'];}class e extends _0x189fac{['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(_0x2e895e){super(_0x2e895e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x30c328(),this['_refreshPositioningDebounced']=_0x36a098(()=>{_0x2e895e['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3a3bfe=this['context']['plugins']['get'](j),_0x4157d2=this['context']['plugins']['get'](z);_0x3a3bfe['register']('wideSidebar',this),_0x4157d2['container']&&_0x3a3bfe['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5d9162){if(_0x5d9162===this['activeAnnotation'])return;const _0x41e408=this['context']['plugins']['get'](z);_0x41e408['_activeAnnotation']=_0x5d9162;const _0x451aa5=this['activeAnnotation'];_0x41e408['refresh']({'blurredAnnotation':_0x451aa5,'activatedAnnotation':_0x5d9162}),this['activeAnnotation']=_0x5d9162;}['attach'](_0x57af75){this['annotations']=_0x57af75;const _0x4747fc=this['context']['plugins']['get'](z);if(_0x4747fc['_annotations']=_0x57af75,this['isAttached'])throw new _0xb3df69('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4747fc,'set:container',()=>{this['detach'](),this['listenTo'](_0x4747fc,'change:container',_0x2eddf3=>{_0x2eddf3['off'](),this['attach'](_0x57af75);});}),_0x4747fc['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4a00a6=_0x551064=>{_0x551064['updateTargetRect'](),_0x4747fc['addAnnotation'](_0x551064);};for(const _0x49c2f6 of _0x57af75)_0x4a00a6(_0x49c2f6);this['listenTo'](_0x57af75,'add',(_0x246a60,_0x3e5aca)=>{_0x4a00a6(_0x3e5aca);}),this['listenTo'](_0x57af75,'remove',(_0x41032a,_0x130719,_0x1a9c9f)=>{_0x4747fc['rearrange']({'removedAnnotation':_0x130719,'previousAnnotation':_0x57af75['get'](_0x1a9c9f-0x1),'nextAnnotation':_0x57af75['get'](_0x1a9c9f+0x1)}),_0x130719===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x57af75,'focus',(_0x580f9b,_0x3a447d)=>{this['setActiveAnnotation'](_0x3a447d);}),this['listenTo'](_0x57af75,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3cd564=this['context']instanceof _0x1e908b?this['context']['editors']:new _0x30c328([this['context']]);for(const _0x33f899 of _0x3cd564)this['_integrateWithEditorAnnotations'](_0x33f899);this['listenTo'](_0x3cd564,'add',(_0x53c0e5,_0x3a2af4)=>{this['listenTo'](_0x3a2af4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3a2af4);});}),this['listenTo'](_0x3cd564,'remove',(_0x50a69c,_0x30d995)=>{_0x30d995['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x30d995['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xb3df69('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x50adfd=this['context']['plugins']['get'](z);_0x50adfd['_detachFromContainer'](this['annotations']),this['stopListening'](_0x50adfd),this['stopListening'](this['annotations']),this['context']instanceof _0x1e908b&&this['stopListening'](this['context']['editors']);for(const _0x2d9b0e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2d9b0e);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x32224f){if(!_0x32224f['plugins']['has']('EditorAnnotations'))return;const _0x338b85=_0x32224f['plugins']['get']('EditorAnnotations'),_0x387665=()=>{const _0x9d01c6=_0x338b85['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x9d01c6[0x0]||null);};this['listenTo'](_0x338b85,'refresh',_0x387665),this['listenTo'](_0x338b85,'blur',(_0x274bdd,{isAnnotationTracked:_0x88670})=>{this['activeAnnotation']&&_0x88670(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x338b85,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x343b27=>{_0x338b85['hasDomSelection']()&&(_0x387665(),_0x343b27['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x338b85);}['_destroyEditorAnnotationsIntegration'](_0x2f0101){this['stopListening'](_0x2f0101),this['_editorAnnotations']['remove'](_0x2f0101);}}class C extends _0x1f4f59{['counterView'];constructor(_0x759a0f){super(_0x759a0f);const _0x277518=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x547bb4,_0x240659)=>_0x547bb4?'...':_0x240659['toString']()),this['set']('annotationType',''),this['icon']=_0x30e8bb,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x277518['to']('annotationType',_0x2e6c4a=>'ck-annotation-counter__badge--'+_0x2e6c4a),_0x277518['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x277518['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x189fac{['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(_0x53c1af){super(_0x53c1af),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x8f08())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x30c328(),this['_refreshPositioningDebounced']=_0x36a098(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x8470e9(this['context']['locale']),this['balloonPanelView']=new _0x117ea7(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3e6650){this['annotations']=_0x3e6650;const _0x48e5e1=this['context']['plugins']['get'](z),_0x3ed67b=this['balloonPanelView'];if(_0x48e5e1['_annotations']=_0x3e6650,this['isAttached'])throw new _0xb3df69('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x48e5e1,'set:container',()=>{this['detach'](),this['listenTo'](_0x48e5e1,'change:container',_0x329512=>{_0x329512['off'](),this['attach'](_0x3e6650);});}),_0x48e5e1['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x409a5a=_0x352361=>{const _0xc5d12e=new C(this['context']['locale']);_0x48e5e1['addAnnotation'](_0x352361,_0xc5d12e),this['_annotationToNarrowView']['set'](_0x352361,_0xc5d12e),_0xc5d12e['bind']('isDirty','annotationType','number')['to'](_0x352361['view'],'isDirty','type','length'),_0xc5d12e['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3ed67b['content']['first']!==_0x352361['view']?(this['_showBalloon'](_0x352361),_0x352361['view']['element']['focus'](),this['setActiveAnnotation'](_0x352361)):this['setActiveAnnotation'](null);});};for(const _0x43c90a of _0x3e6650)_0x409a5a(_0x43c90a);this['listenTo'](_0x3e6650,'add',(_0x436e1b,_0x53d6f7)=>{_0x409a5a(_0x53d6f7);}),this['listenTo'](_0x3e6650,'remove',(_0x4cc18b,_0x4bcef6,_0x104aff)=>{this['_annotationToNarrowView']['get'](_0x4bcef6)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4bcef6),_0x48e5e1['rearrange']({'removedAnnotation':_0x4bcef6,'previousAnnotation':_0x3e6650['get'](_0x104aff-0x1),'nextAnnotation':_0x3e6650['get'](_0x104aff+0x1)}),_0x4bcef6===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3e6650,'focus',(_0xe82fdb,_0x2d1a21)=>{this['setActiveAnnotation'](_0x2d1a21);}),this['listenTo'](_0x3e6650,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xe5bd4,_0x12dc2d)=>{_0x12dc2d['keyCode']===_0x48b3ac['esc']&&_0x3ed67b['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3ed67b['content']['first']),this['_hideBalloon'](),_0x12dc2d['stopPropagation'](),_0x12dc2d['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x127376,_0x54fc55)=>{const _0x411153=_0x54fc55['target'];_0x3ed67b['isVisible']&&_0x3ed67b['element']['contains'](_0x411153)||_0x48e5e1['view']['element']['contains'](_0x411153)||_0x127376['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x599640=>_0x599640['contains'](_0x411153))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3f4013=this['context']instanceof _0x1e908b?this['context']['editors']:new _0x30c328([this['context']]);for(const _0x2c986a of _0x3f4013)this['_integrateWithEditorAnnotations'](_0x2c986a);this['listenTo'](_0x3f4013,'add',(_0x40cf9f,_0xa67c9b)=>{this['listenTo'](_0xa67c9b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xa67c9b);});}),this['listenTo'](_0x3f4013,'remove',(_0x4d0cdd,_0x5c8571)=>{_0x5c8571['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5c8571['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2c65c6){if(_0x2c65c6===this['activeAnnotation'])return;const _0x301640=this['context']['plugins']['get'](z);if(_0x301640['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2c65c6,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2c65c6)_0x301640['getSidebarItemView'](_0x2c65c6)?this['_showBalloon'](_0x2c65c6):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2c65c6;}['detach'](){if(!this['isAttached'])throw new _0xb3df69('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3c7e3d=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x14145f=>_0x14145f['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3c7e3d['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1e908b&&this['stopListening'](this['context']['editors']);for(const _0x2e48ba of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2e48ba);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'](_0x3c71e3){if(!_0x3c71e3['plugins']['has']('EditorAnnotations'))return;const _0x253991=_0x3c71e3['plugins']['get']('EditorAnnotations'),_0x165656=this['context']['plugins']['get'](z),_0x520706=this['annotations'],_0x46a132=this['balloonPanelView'],_0x564bb3=()=>{const _0x4617c0=_0x253991['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4617c0),this['setActiveAnnotation'](_0x4617c0[0x0]||null);};this['listenTo'](_0x253991,'refresh',_0x564bb3),this['listenTo'](_0x253991,'blur',(_0x29d521,{isAnnotationTracked:_0x577105})=>{this['activeAnnotation']&&_0x577105(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x253991,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x520706,'blur',_0x3c5640=>{_0x253991['hasDomSelection']()&&_0x3c5640['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3d7087,_0x18da7f)=>{const _0x2900fc=_0x18da7f['target'];_0x46a132['isVisible']&&_0x46a132['element']['contains'](_0x2900fc)||_0x165656['view']['element']['contains'](_0x2900fc)||this['activeAnnotation']&&_0x253991['hasDomSelection']()&&(_0x564bb3(),_0x3d7087['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x253991);}['_destroyEditorAnnotationsIntegration'](_0x14dc9a){_0x14dc9a&&(this['stopListening'](_0x14dc9a),this['_editorAnnotations']['remove'](_0x14dc9a));}['_setSelectedAnnotations'](_0x3c21d8){for(const _0x25e160 of this['_selectedAnnotations'])_0x3c21d8['includes'](_0x25e160)||this['_manuallyClosedAnnotationViews']['delete'](_0x25e160['view']);this['_selectedAnnotations']=_0x3c21d8;}['_refreshPositioning'](){const _0x10208b=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x10208b['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1d44e9){if(this['_manuallyClosedAnnotationViews']['has'](_0x1d44e9['view']))return;const _0x1d37cd=this['balloonPanelView']['content']['first'];_0x1d37cd!==_0x1d44e9['view']?(_0x1d37cd&&this['_detachListeners'](_0x1d37cd),this['_attachListeners'](_0x1d44e9['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1d44e9['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x188e39=this['balloonPanelView']['content']['first'],_0x20d09f=_0x188e39&&this['annotations']['getByView'](_0x188e39);if(!_0x20d09f||!this['_annotationToNarrowView']['has'](_0x20d09f))return;const _0x4c744d=this['_annotationToNarrowView']['get'](_0x20d09f)['element'],_0x1d53b6=(function(){const _0x326aee=_0x117ea7['defaultPositions'];return[_0x326aee['southArrowNorthEast'],_0x326aee['northArrowSouthEast'],_0x326aee['southArrowNorth'],_0x326aee['northArrowSouth'],_0x326aee['southArrowNorthWest'],_0x326aee['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x4c744d,'positions':_0x1d53b6});}['_hideBalloon'](){const _0x1979a4=this['balloonPanelView'],_0x14bd16=_0x1979a4['content']['first'];_0x14bd16&&(this['_detachListeners'](_0x14bd16),_0x1979a4['unpin'](),_0x1979a4['content']['clear']());}['_attachListeners'](_0x4cc363){this['listenTo'](_0x4cc363,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4cc363,'Esc',(_0x3014e9,_0x3116b0)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4cc363),this['_hideBalloon'](),_0x3116b0();});}['_detachListeners'](_0x34edc6){this['stopListening'](_0x34edc6);}}class c extends _0x121eca{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x33c363,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x30eeba){super(_0x30eeba),_0x30eeba['editing']['view']['addObserver'](_0x3611d4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x30eeba['plugins']['get'](_0x33c363),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xba6573=this['editor']['plugins']['get'](j);_0xba6573['context']===this['editor']&&(_0xba6573['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1a14c2,_0x30dde8)=>{const _0x253485=this['_balloon'];if(this['isAttached']&&_0x253485['visibleView']){const _0x4daa00=this['annotations']['getByView'](_0x253485['visibleView']);_0x4daa00&&this['_closeAnnotation'](_0x4daa00),_0x30dde8();}}));}['afterInit'](){const _0x6e3313=this['editor']['plugins']['get'](j);_0x6e3313['context']===this['editor']&&(_0x6e3313['hasActive']()||_0x6e3313['switchTo']('inline'));}['setActiveAnnotation'](_0x31010f){_0x31010f!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x31010f&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x31010f)&&this['_addAnnotationToBalloon'](_0x31010f,!0x0),_0x31010f['isActive']=!0x0),_0x31010f||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x31010f);}['attach'](_0x8dec4e){this['annotations']=_0x8dec4e;const _0x2f3b95=this['editor']['plugins']['get'](j),_0x249297=this['_balloon'];if(this['isAttached'])throw new _0xb3df69('inlineannotations-attach-already-attached',this);if(_0x2f3b95['context']!==this['editor'])throw new _0xb3df69('inlineannotations-not-allowed-with-context',this);const _0x4675b1=this['editor']['plugins']['get'](b);this['listenTo'](_0x4675b1,'refresh',()=>{const _0x19d068=_0x4675b1['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3c6c1d,_0x3119c0;!this['_forceRefresh']&&(_0x3c6c1d=_0x19d068,_0x3119c0=this['_selectedAnnotations'],_0x3c6c1d['length']===_0x3119c0['length']&&_0x3c6c1d['every'](_0x184109=>_0x3119c0['includes'](_0x184109)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x19d068),this['setActiveAnnotation'](_0x19d068[0x0]||null));}),this['listenTo'](_0x4675b1,'blur',(_0x207a18,{isAnnotationTracked:_0x1afcdc})=>{this['activeAnnotation']&&_0x1afcdc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x167df5,_0x13b561,_0x135b2b)=>{_0x135b2b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x8dec4e,'remove',(_0x52cc5b,_0x4dd0e3)=>{this['_removeAnnotationFromBalloon'](_0x4dd0e3),_0x4dd0e3===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x249297,'change:visibleView',(_0x5c262f,_0x3623a2,_0x592bf4,_0xf7dffc)=>{_0xf7dffc&&this['stopListening'](_0xf7dffc);const _0x35cc70=_0x8dec4e['getByView'](_0x592bf4);_0x592bf4&&_0x35cc70&&(this['listenTo'](_0x592bf4,'change:height',()=>{_0x249297['updatePosition']();}),this['listenTo'](_0x592bf4,'Esc',()=>{this['_closeAnnotation'](_0x35cc70),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x35cc70&&this['setActiveAnnotation'](_0x35cc70));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x249297['visibleView']&&(_0x8dec4e['getByView'](_0x249297['visibleView'])&&_0x249297['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 _0xb3df69('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2ea22d of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2ea22d);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x107624){for(const _0x2fa969 of this['_selectedAnnotations'])_0x107624['includes'](_0x2fa969)||this['_manuallyClosed']['delete'](_0x2fa969);for(const _0x25cbbd of this['annotations'])_0x107624['includes'](_0x25cbbd)||this['_removeAnnotationFromBalloon'](_0x25cbbd);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x24a484 of _0x107624)this['_addAnnotationToBalloon'](_0x24a484);}this['_selectedAnnotations']=_0x107624;}['_addAnnotationToBalloon'](_0x485a80,_0x5af4b6=!0x1){this['_manuallyClosed']['has'](_0x485a80)||(this['_addedAnnotations']['has'](_0x485a80)||this['_balloon']['hasView'](_0x485a80['view'])||(this['_addedAnnotations']['add'](_0x485a80),this['_balloon']['add']({'stackId':_0x485a80['view']['id'],'view':_0x485a80['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x485a80)}})),_0x5af4b6&&this['_balloon']['showStack'](_0x485a80['view']['id']));}['_getBalloonTargetForAnnotation'](_0x1d8a9b){const _0x1cb5be=_0x1d8a9b['target'],_0x2a6757=this['editor']['editing']['view'],_0x1c502d=_0x2a6757['document']['selection']['getFirstRange'](),_0x2ec18b=_0x2a6757['domConverter']['viewRangeToDom'](_0x1c502d);if(_0x2ec18b['collapse'](!0x0),_0x1cb5be){if(_0x1cb5be instanceof _0x15797d)return _0x1cb5be;let _0x3a7a17=[];for(const _0x3d416c of _0x1cb5be)_0x3a7a17['push'](...F(_0x3d416c['getClientRects']()));_0x3a7a17=function(_0x436406){const _0x5708a6=[];let _0x439568=_0x436406[0x0];for(let _0x49351b=0x1;_0x49351b<_0x436406['length'];_0x49351b++)P(_0x439568,_0x436406[_0x49351b])?_0x439568['width']+=_0x436406[_0x49351b]['width']:(_0x5708a6['push'](_0x439568),_0x439568=_0x436406[_0x49351b]);return _0x5708a6['push'](_0x439568),_0x5708a6;}(_0x3a7a17);const _0x2968f6=_0x2ec18b['getBoundingClientRect']();return _0x3a7a17['find'](_0x4e5bea=>_0x4e5bea['top']<=_0x2968f6['top']&&_0x4e5bea['bottom']>=_0x2968f6['bottom']&&_0x4e5bea['left']<=_0x2968f6['left']&&_0x4e5bea['right']>=_0x2968f6['right'])||_0x3a7a17[0x0];}return _0x1d8a9b['targetRect']||_0x2ec18b;}['_removeAnnotationFromBalloon'](_0x3ed6d9){this['_addedAnnotations']['has'](_0x3ed6d9)&&this['_balloon']['hasView'](_0x3ed6d9['view'])&&(this['_addedAnnotations']['delete'](_0x3ed6d9),this['_balloon']['remove'](_0x3ed6d9['view']));}['_closeAnnotation'](_0x29a221){this['_manuallyClosed']['add'](_0x29a221),this['_removeAnnotationFromBalloon'](_0x29a221);}}function F(_0x478c49){return Array['from'](_0x478c49)['map'](DOMRect['fromRect']);}function P(_0x432d7e,_0x1545f3){return _0x432d7e['top']===_0x1545f3['top']&&_0x432d7e['bottom']===_0x1545f3['bottom']&&_0x432d7e['right']===_0x1545f3['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x36d9de,_0xdb896d){super(_0x36d9de),this['set']('isEmpty',!_0xdb896d['length']),this['focusTracker']=new _0x7e52ae(),this['_annotationViews']=_0xdb896d,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x8a5706({'focusables':_0xdb896d,'focusTracker':this['focusTracker']}),this['listenTo'](_0xdb896d,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xdb896d,'remove',(_0x219d4f,_0x19a7a7)=>{_0x19a7a7['isActive']&&this['focus'](),_0xdb896d['length']||(this['isEmpty']=!0x0);});const _0x557203=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x36d9de,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xdb896d},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x557203['if']('isEmpty','ck-hidden',_0x5e39d4=>!_0x5e39d4)]},'children':[{'text':N(_0x36d9de,'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 _0x2f09cd of this['_annotationViews'])this['focusTracker']['add'](_0x2f09cd['element']);this['_annotationViews']['on']('change',(_0x183916,{added:_0x48426f,removed:_0x3a63fb})=>{for(const _0x4661ae of _0x48426f)this['focusTracker']['add'](_0x4661ae['element']);for(const _0x100db3 of _0x3a63fb)this['focusTracker']['remove'](_0x100db3['element']);});}}class p extends _0x189fac{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4d9b11){super(_0x4d9b11),this['archivedThreads']=new _0x30c328();}['init'](){const _0xcea930=this['context'],_0x35c25a=_0xcea930['plugins']['get'](o),_0x5a1ffc=_0xcea930['plugins']['get'](y);this['listenTo'](_0x35c25a,'addCommentThread',(_0x16766a,{threadId:_0x46a19d})=>{const _0x48001c=_0x35c25a['getCommentThread'](_0x46a19d);_0x48001c['archivedAt']&&this['archivedThreads']['add'](_0x48001c,this['_calculatePosition'](_0x48001c['archivedAt'])),this['listenTo'](_0x48001c,'change:archivedAt',(_0x31800f,_0x33da37,_0x47a23a)=>{_0x47a23a?this['archivedThreads']['has'](_0x48001c)||this['archivedThreads']['add'](_0x48001c,this['_calculatePosition'](_0x48001c['archivedAt'])):this['archivedThreads']['has'](_0x48001c)&&this['archivedThreads']['remove'](_0x48001c);});}),this['listenTo'](_0x35c25a,'removeCommentThread',(_0x1ec4a8,{threadId:_0x441353})=>{const _0x47feea=_0x35c25a['getCommentThread'](_0x441353);this['stopListening'](_0x47feea),this['archivedThreads']['has'](_0x47feea)&&this['archivedThreads']['remove'](_0x47feea);},{'priority':'highest'}),this['listenTo'](_0x5a1ffc['collection'],'focus',(_0x416f4f,_0x160d02)=>{_0x160d02['isVisible']||(_0x160d02['isActive']=!0x0,_0x5a1ffc['activate'](_0x160d02));});}['_calculatePosition'](_0x16fa3d){const _0x253b4f=[...this['archivedThreads']]['findIndex'](_0x235e1a=>_0x235e1a['archivedAt']<_0x16fa3d);return _0x253b4f>-0x1?_0x253b4f:this['archivedThreads']['length'];}}class a extends _0x121eca{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x29f3ca];}constructor(_0x49d2e6){super(_0x49d2e6),this['annotationViews']=new _0x471ebe(),this['_pendingThreads']=[];}['init'](){const _0x1d3de9=this['editor'],_0x4d3bfc=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1d3de9['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1f4f59,!0x0)),_0x1d3de9['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4fa256=this['_createCommentsArchiveButton'](_0xd685a4);return _0x4fa256['set']({'role':'menuitemcheckbox'}),_0x4fa256;});const _0x280dc8=_0x1d3de9['plugins']['get'](p),_0x21c06c=_0x1d3de9['plugins']['get']('Annotations'),_0x4d4580=_0x1d3de9['plugins']['get']('CommentsRepository');_0x280dc8['archivedThreads']['forEach'](_0x1e3bfe=>{this['_handleNewThread'](_0x1e3bfe);}),this['listenTo'](_0x280dc8['archivedThreads'],'add',(_0xdf5ef6,_0x3f0220)=>{this['_handleNewThread'](_0x3f0220);}),this['listenTo'](_0x21c06c['collection'],'add',(_0xce6a25,_0x10be6f)=>{const _0x1202bb=this['_pendingThreads']['find'](_0x4d0838=>{const _0x5ebdd9=_0x4d4580['_threadToController']['get'](_0x4d0838);return _0x5ebdd9&&_0x10be6f['innerView']===_0x5ebdd9['view'];});if(_0x1202bb){const _0x8f791b=this['_calculatePosition'](_0x1202bb['archivedAt']);this['_addAnnotationToArchive'](_0x10be6f,_0x8f791b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1202bb),0x1);}}),this['listenTo'](_0x280dc8['archivedThreads'],'remove',(_0x3faaeb,_0x3a1396)=>{const _0x4bb18b=_0x1d3de9['config']['get']('collaboration.channelId');if(!_0x4bb18b||_0x3a1396['channelId']===_0x4bb18b){if(this['_pendingThreads']['includes'](_0x3a1396))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3a1396),0x1);else{const _0xb07518=_0x4d4580['_threadToController']['get'](_0x3a1396),_0x8de939=_0x21c06c['getByInnerView'](_0xb07518['view']);this['annotationViews']['remove'](_0x8de939['view']),this['stopListening'](_0x8de939),this['stopListening'](_0x8de939['focusableElements']);}}}),this['listenTo'](_0x21c06c['collection'],'add',(_0x1e1db8,_0x5a0b51)=>{this['listenTo'](_0x5a0b51,'escape',_0x4d3bfc);}),this['listenTo'](_0x21c06c['collection'],'remove',(_0x23ef27,_0xf214de)=>{this['stopListening'](_0xf214de,'escape',_0x4d3bfc);});}['_addAnnotationToArchive'](_0xeaee00,_0x392c03){this['listenTo'](_0xeaee00,'set:isVisible',_0x128afc=>{_0x128afc['return']=!0x1,_0x128afc['stop']();}),this['annotationViews']['add'](_0xeaee00['view'],_0x392c03);}['_handleNewThread'](_0x535ef7){const _0x444893=this['editor']['plugins']['get']('CommentsRepository'),_0x184bd8=this['editor']['plugins']['get']('Annotations'),_0x12936a=this['editor']['config']['get']('collaboration.channelId');if(!_0x12936a||_0x535ef7['channelId']===_0x12936a){const _0x42dca8=_0x444893['_threadToController']['get'](_0x535ef7);if(!_0x42dca8)return void this['_pendingThreads']['push'](_0x535ef7);const _0x5ed111=this['_calculatePosition'](_0x535ef7['archivedAt']),_0xca2547=_0x184bd8['getByInnerView'](_0x42dca8['view']);_0xca2547['isVisible']&&_0x184bd8['_visibleAnnotations']['remove'](_0xca2547),this['_addAnnotationToArchive'](_0xca2547,_0x5ed111);}}['_calculatePosition'](_0x4e559f){const _0x3b83b2=this['editor']['config']['get']('collaboration.channelId'),_0x2a3f34=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x40d129=>_0x40d129['channelId']===_0x3b83b2)['findIndex'](_0x5f1bb1=>_0x5f1bb1['archivedAt']<_0x4e559f);return _0x2a3f34<0x0||_0x2a3f34>this['annotationViews']['length']?this['annotationViews']['length']:_0x2a3f34-0x1;}['_toggleDialog'](){const _0x2227ea=this['editor'],_0x4b7e8d=_0x2227ea['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x2227ea['locale'],this['annotationViews'])),'commentsArchive'===_0x4b7e8d['id']?_0x4b7e8d['hide']():_0x4b7e8d['show']({'id':'commentsArchive','title':N(_0x2227ea['locale'],'COMMENTS_ARCHIVE'),'icon':_0xcd87b6,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x7d0719['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x26c19b,_0x13a668=!0x1){const _0x5b2029=this['editor']['locale'],_0x349c5b=this['editor']['plugins']['get']('Dialog'),_0x1b9e7c=new _0x26c19b(_0x5b2029);return _0x1b9e7c['bind']('isEnabled')['to'](this,'isEnabled'),_0x1b9e7c['bind']('isOn')['to'](_0x349c5b,'id',_0x2ffa61=>'commentsArchive'===_0x2ffa61),_0x1b9e7c['set']({'label':N(_0x5b2029,'COMMENTS_ARCHIVE'),'icon':_0xcd87b6,'isToggleable':!0x0}),_0x13a668&&(_0x1b9e7c['tooltip']=!0x0),this['listenTo'](_0x1b9e7c,'execute',()=>this['_toggleDialog']()),_0x1b9e7c;}['_hideDialogOnAnnotationEscape']=_0x19af5b=>{const _0x5a1f2f=_0x19af5b['source'];if(!this['annotationViews']['has'](_0x5a1f2f['view']))return;const _0x436611=this['editor']['plugins']['get']('Dialog');_0x436611['isOpen']&&'commentsArchive'===_0x436611['id']&&(_0x436611['hide'](),_0x19af5b['stop']());};}class gi extends _0x121eca{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 _0x15bb05,ContextPlugin as _0x35dfc2,PendingActions as lt,Command as _0x445992,Plugin as _0x3732d9,Context as _0x55e756}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1d2f19,uid as _0x1684c5,KeystrokeHandler as jt,FocusTracker as _0x242e0a,diff as _0x1b3644,Collection as _0x22714a,Rect as _0x5f3a0a,CKEditorError as _0x29e429,first as _0x1b9b5e,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x10f0fb,keyCodes as _0x39b093}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x32d2d9,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x54e09b,trimHtml as ts,LateFocusDropdownButtonView as _0x58b89e,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x333141}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x340747}from'es-toolkit/compat';import{IconUndo as _0x5c7493,IconCheck as _0xfcd11b,IconPencil as _0x2b6859,IconRemoveComment as _0x2395f3,IconThreeVerticalDots as _0x5f16e5,IconAddComment as _0x10df15,IconCommentsArchive as _0x43bc8d}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x470c60,ButtonView as _0x222733,ViewCollection as _0xd5b2d1,createDropdown as _0x1e7d35,ListView as _0x25995c,focusChildOnDropdownOpen as _0x1626d8,ListItemView as _0x2937d3,MenuBarMenuListItemButtonView as _0x59a680,BodyCollection as _0x2dc30b,BalloonPanelView as _0x318538,ContextualBalloon as _0x3d3d3f,Dialog as _0x2561e8,DialogViewPosition as _0x9c172b}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x3d1846}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 _0x59830c}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x46b3bf}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1d2f19(){['model'];['view'];constructor(_0x5bd10b,_0x4d6028){super(),this['model']=_0x5bd10b,this['model']['_isAttached']=!0x0,this['view']=_0x4d6028,this['listenTo'](_0x4d6028,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4d6028,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4d6028,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4d6028,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4d6028,'addComment',(_0x538c5b,_0x3718f8)=>this['addComment'](_0x3718f8)),this['listenTo'](_0x4d6028,'updateComment',(_0x3c1c0e,_0x2ab555,_0x3064d3)=>this['updateComment'](_0x2ab555,_0x3064d3)),this['listenTo'](_0x4d6028,'removeComment',(_0x3583ec,_0x402e76)=>this['removeComment'](_0x402e76));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x357289){this['model']['addComment']({'content':_0x357289,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2c313e,_0x4b5bc6){this['model']['getComment'](_0x2c313e)['update']({'content':_0x4b5bc6});}['removeComment'](_0x237d4b){this['model']['getComment'](_0x237d4b)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x48cb0d,_0x3f6b8b,_0x246c23){const t=_0x48cb0d['t'];switch(_0x3f6b8b){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'},_0x246c23);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'},_0x246c23);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'},_0x246c23);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'},_0x246c23);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x246c23);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'},_0x246c23);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'},_0x246c23);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'},_0x246c23);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(_0x3c96dd,_0x50b514){super(_0x3c96dd);const _0x46bbe2=_0x1684c5();this['main']=this['createCollection'](),this['editable']=new Vt(_0x3c96dd,_0x50b514,void 0x0,{'label':()=>N(_0x3c96dd,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3c96dd['uiLanguageDirection'],'lang':_0x3c96dd['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x46bbe2},'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 Et extends Ut{['view'];constructor(_0x6d546a){super(_0x6d546a),this['view']=new Rt(_0x6d546a['locale'],_0x6d546a['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x4ed6cc=this['editor']['editing']['view'],_0x1d28ff=this['view']['editable'],_0x13e52f=_0x4ed6cc['document']['getRoot']();_0x1d28ff['name']=_0x13e52f['rootName'],this['view']['render']();const _0x35ca69=_0x1d28ff['element'];this['setEditableElement'](_0x1d28ff['name'],_0x35ca69),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4ed6cc['attachDomRoot'](_0x35ca69),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1d2f19(_0x15bb05){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x1a1cdb={}){function _0x4e168d(_0x18da2a){return _0x18da2a['map'](_0x2be1a1=>String['fromCharCode'](_0x2be1a1))['join']('');}(_0x1a1cdb=Object['assign']({},_0x1a1cdb))['plugins']||(_0x1a1cdb['plugins']=hs['defaultPlugins']),super(_0x1a1cdb),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4e168d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e168d([0x76,0x69,0x65,0x77])][_0x4e168d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4e168d([0x61,0x75,0x74,0x6f]),this[_0x4e168d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4e168d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4e168d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4e168d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4e168d([0x6f,0x6b])});}['create'](){const _0xc9147=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xc9147))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3d3633=>{const _0x1f357d=this['model']['document']['getRoot'](),_0x1d6575=_0x1f357d&&_0x1f357d['getChild'](_0x1f357d['childCount']-0x1);_0x3d3633['setSelection'](_0x1d6575,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2d6e93=this['editing']['view'],_0x47db0f=_0x2d6e93['document']['getRoot'](),_0x1ead01=_0x47db0f['getChild'](0x0);_0x47db0f['childCount']>0x1||!_0x1ead01||'p'!=_0x1ead01['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x2d6e93,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1ead01['placeholder']=this['placeholder']),Ft({'view':_0x2d6e93,'element':_0x1ead01,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1ead01);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x35c7d2,_0x2a64ce={}){super(_0x35c7d2),this['editor']=null,this['_editorConfig']=_0x2a64ce,this['set']('value',_0x2a64ce['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x35c7d2,'Reply...')),this['set']('submitLabel',N(_0x35c7d2,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x242e0a(),this['focusCycler']=new _0x470c60({'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',(_0x2c2aad,_0x2cd3b7)=>{this['cancelButtonView']['fire']('execute'),_0x2cd3b7();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2eb027,_0x5b7135)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5b7135());}),this['on']('submit',(_0xb4bde0,_0x4e8698)=>{_0x4e8698['length']>0xfde8?(alert(N(_0x35c7d2,'TOO_LONG_COMMENT_ALERT',[_0x4e8698['length'],0xfde8])),_0xb4bde0['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 _0x46998d=this['editor'];this['element']['insertBefore'](_0x46998d['ui']['element'],this['element']['firstChild']),_0x46998d['model']['document']['on']('change',()=>this['value']=_0x46998d['getData']()),_0x46998d['bind']('placeholder')['to'](this),this['focusables']['add'](_0x46998d['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xe4575){-0x1===_0xe4575?(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:_0xa1c306}=this,_0x55616c=new _0x222733(_0xa1c306);return _0x55616c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x55616c['withText']=!0x0,_0x55616c['bind']('label')['to'](this,'submitLabel'),_0x55616c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x55616c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1ab701,_0x368f80)=>!_0x368f80&&!!_0x1ab701['trim']()),_0x55616c;}['_createCancelButton'](){const {locale:_0x54e0b4}=this,_0x3cb205=new _0x222733(_0x54e0b4);return _0x3cb205['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3cb205['label']=N(_0x54e0b4,'Cancel'),_0x3cb205['withText']=!0x0,_0x3cb205['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3cb205;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2facde=>{this['focusTracker']['add'](_0x2facde['element']);}),this['focusables']['on']('change',(_0x5cca09,_0x53dffa)=>{for(const _0x52c6ef of Array['from'](_0x53dffa['added'])['reverse']())this['focusTracker']['add'](_0x52c6ef['element']);});}}class ie extends kt{constructor(_0x37a5e1,_0x117dbe,_0x154715){super(_0x37a5e1),this['commentInputView']=new es(_0x37a5e1,_0x154715),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2b00c6,_0x57e02c)=>_0x2b00c6||!!_0x57e02c),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 _0x32d2d9(_0x37a5e1,_0x117dbe),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'](_0x50ca0a){this['commentInputView']['focus'](_0x50ca0a);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xb5d4b4,_0x393e42)=>{const {submitButtonView:_0x35aac9,cancelButtonView:_0x949d59,editor:_0x332253}=this['commentInputView'];[_0x35aac9['element'],_0x949d59['element'],_0x332253?_0x332253['editing']['view']['getDomRoot']():null]['filter'](_0xe8c435=>_0xe8c435)['some'](_0x172d2b=>_0x172d2b['contains'](_0x393e42['target']))||(this['focus'](),_0x393e42['preventDefault']());});}}class rs extends kt{constructor(_0x50915f){super(_0x50915f);const _0x280492=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x280492['to']('count',_0x4d588a=>N(_0x50915f,'NUMBER_OF_COMMENTS',_0x4d588a))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2f2101,_0x5c9b3b,_0x29c862){super(_0x2f2101);const _0x59dcb2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5c9b3b['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5c9b3b,this['_config']=_0x29c862,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x242e0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x470c60({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xb88673=>this['commentViews']['map'](_0xd79fba=>_0xd79fba['element'])['includes'](_0xb88673['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x2f2101),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x41957d=>_0x41957d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x441392 of _0x5c9b3b['comments'])this['_handleNewCommentModel'](_0x441392);this['_handleInfoComment'](),this['listenTo'](_0x5c9b3b['comments'],'add',(_0x459e70,_0x3f4ecd)=>{const _0x3b8b8f=this['_calculatePosition'](_0x3f4ecd);this['length']++,this['_handleNewCommentModel'](_0x3f4ecd,_0x3b8b8f),this['refreshVisibleViews']();}),this['listenTo'](_0x5c9b3b['comments'],'remove',(_0x4973dd,_0x1e440e)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1e440e),this['refreshVisibleViews']();}),this['listenTo'](_0x5c9b3b,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5c9b3b,'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',_0x59dcb2['if']('length','ck-hidden',_0x552c82=>!_0x552c82)],'aria-label':N(_0x2f2101,'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'](_0x24e541){-0x1===_0x24e541?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x22af77 of this['commentViews'])_0x22af77['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1be304,_0x3a9dde){const _0x3e2131=new this['_config']['CommentView'](this['locale'],_0x1be304,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3e2131['viewUid']=_0x1be304['id'],_0x3e2131['delegate']('removeComment')['to'](this),_0x3e2131['delegate']('updateComment')['to'](this),_0x3e2131['delegate']('resolveCommentThread')['to'](this),_0x3e2131['delegate']('editorReady')['to'](this),_0x3e2131['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3e2131,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3e2131,_0x3a9dde);}['_calculatePosition'](_0x5058fe){const _0x1f4d3f=this['_model']['_findOptimalIndex'](_0x5058fe);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5058fe['authoredAt']?_0x1f4d3f-0x1:_0x1f4d3f:_0x1f4d3f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x10b346={'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'],_0x10b346,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x10b346));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x18439f){const _0x28fca2=this['commentViews']['remove'](_0x18439f['id']);this['stopListening'](_0x28fca2),_0x28fca2['isEditMode']&&this['_updateHasDirtyComment'](),_0x28fca2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x286f9c=>_0x286f9c['isEditMode']);}['_rearrangeCollapse'](){const _0x5ce691=function(_0x5bd4c8){const _0x52ea3e=new _0x22714a();for(const _0x41905d of _0x5bd4c8)_0x52ea3e['add'](_0x41905d);return _0x52ea3e;}(this['commentViews']),_0x13d9af=this['_collapsedCommentsView']['count'];for(let _0x338493=0x1;_0x338493<=_0x13d9af;_0x338493++)_0x5ce691['remove'](0x1);for(const _0x5eefaa of _0x5ce691)_0x5eefaa['collapse']();_0x13d9af>0x0&&_0x5ce691['add'](this['_collapsedCommentsView'],0x1),ns(_0x1b3644(Array['from'](this['visibleViews']),Array['from'](_0x5ce691)),this['visibleViews'],_0x5ce691);}['_rearrangeExpand'](){ns(_0x1b3644(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1ff63b of this['visibleViews'])_0x1ff63b['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x28564a=>{this['focusTracker']['add'](_0x28564a['element']),this['keystrokes']['listenTo'](_0x28564a['element']);}),this['commentViews']['on']('change',(_0xc0b8bc,_0x51ecc6)=>{for(const _0x4e41c7 of _0x51ecc6['removed'])this['focusTracker']['remove'](_0x4e41c7['element']),this['keystrokes']['stopListening'](_0x4e41c7['element']);for(const _0x2d058b of Array['from'](_0x51ecc6['added'])['reverse']())this['focusTracker']['add'](_0x2d058b['element']),this['keystrokes']['listenTo'](_0x2d058b['element']);});}}function ns(_0x7516f7,_0x36d1ab,_0x12d99d){let _0x20fc15=0x0;for(const _0x3dc7b1 of _0x7516f7)switch(_0x3dc7b1){case'insert':_0x36d1ab['add'](_0x12d99d['get'](_0x20fc15),_0x20fc15),_0x20fc15++;break;case'delete':_0x36d1ab['remove'](_0x20fc15);break;case'equal':_0x20fc15++;}}class oe extends kt{constructor(_0x5828a7){super(_0x5828a7);const _0x5737e1=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5737e1['to']('contextValue',_0x2c9f7a=>N(_0x5828a7,'THREAD_CONTEXT_LABEL',_0x2c9f7a)),'tabindex':-0x1},'children':[{'text':_0x5737e1['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2704be,_0x3c594f){super(_0x2704be);const _0x32d36f=this['bindTemplate'];this['_model']=_0x3c594f,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x242e0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x470c60({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x40799e=>!!_0x40799e),this['bind']('contextValue')['to'](this['_model'],'context',_0x72b1e3=>_0x72b1e3&&_0x72b1e3['value']?this['_trimContextValue'](_0x72b1e3['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',_0x32d36f['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 _0x3e4604=new _0x222733(this['locale']);return _0x3e4604['label']=N(this['locale'],'Reopen'),_0x3e4604['tooltip']=N(this['locale'],'Reopen'),_0x3e4604['icon']=_0x5c7493,_0x3e4604['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x26f7da=>!_0x26f7da),_0x3e4604['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x16cfcd,_0x3b747b)=>_0x16cfcd&&_0x3b747b),_0x3e4604['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3e4604;}['_trimContextValue'](_0x4e153c){if(_0x4e153c['length']<0x96)return _0x4e153c;const _0x1bf133=_0x4e153c['lastIndexOf']('\x20',0x93);return _0x4e153c['substring'](0x0,_0x1bf133>-0x1?_0x1bf133:0x93)+'...';}['_attachContextActions'](){const _0x5033f2=this['element']['querySelector']('.ck-context'),_0x13823a=_0x5033f2['querySelector']('.ck-context__value');this['listenTo'](_0x5033f2,'mouseenter',()=>{_0x13823a['offsetWidth']<_0x13823a['scrollWidth']&&_0x5033f2['classList']['add']('overlay');}),this['listenTo'](_0x5033f2,'mouseleave',()=>{_0x5033f2['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xbbb896 of this['focusables'])this['focusTracker']['add'](_0xbbb896['element']),this['keystrokes']['listenTo'](_0xbbb896['element']);}['_createContextView'](){const _0x3e07d5=new oe(this['locale']);return _0x3e07d5['bind']('contextValue')['to'](this),_0x3e07d5;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1e57e9,_0xa6a4a4,_0x5567f4,_0x3efe99){super(_0x1e57e9),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xa6a4a4,this['_localUser']=_0x5567f4,this['_config']=_0x3efe99,this['commentThreadHeaderView']=new Xt(_0x1e57e9,_0xa6a4a4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1e57e9,N(_0x1e57e9,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1e57e9,_0xa6a4a4,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3efe99)),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',(_0x24a8a6,_0x1683bd)=>_0x24a8a6||!!_0x1683bd),this['bind']('isUnlinked')['to'](_0xa6a4a4,'unlinkedAt',_0x377307=>!!_0x377307),this['bind']('ariaLabel')['to'](this,'length',_0x43d02d=>{const _0x510a8a=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x43d02d,_0x510a8a]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x242e0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x470c60({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4ed622=>_0x4ed622['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 _0x2ab9=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x8aa457=_0x2ab9['commentInputView'];return _0x2ab9['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x8aa457,'value',(_0x24e272,_0xb67687,_0x461593,_0xb22d1e,_0x3dbd0c)=>!!_0x3dbd0c||!!_0xb22d1e&&_0x461593&&!_0xb67687||_0x24e272&&_0x461593&&!_0xb67687),_0x8aa457['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x300eb5,_0x5d1589,_0x110185)=>{let _0x3131c1;return _0x3131c1=_0x110185&&_0x5d1589?'Reply\x20to\x20reopen\x20discussion...':_0x300eb5?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3131c1);}),_0x8aa457['bind']('submitLabel')['to'](this,'length',_0x30af8f=>N(this['locale'],_0x30af8f?'Reply':'Comment')),_0x8aa457['on']('submit',(_0x596cd1,_0x4d8985)=>{this['fire']('addComment',_0x4d8985),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x8aa457['on']('cancel',()=>{this['focus']();}),_0x8aa457['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x8aa457['on']('cancel',_0x12327d=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x12327d['stop']());}),this['on']('change:isActive',(_0x12b61d,_0x406e01,_0x3bd3d5)=>{_0x3bd3d5||this['length']||_0x8aa457['value']||this['fire']('removeCommentThread');}),_0x2ab9;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x34cb24,_0x217b77,_0x3e87cc,_0x6049c6){super(_0x34cb24,_0x217b77,_0x3e87cc,_0x6049c6),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x34cb24,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x5a2351,_0x15139f,_0x478c6f)=>{_0x478c6f||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x10fcef,_0x53fee7,_0x459a17)=>{_0x459a17&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x39d724=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x39d724['if']('isActive','ck-thread--active'),_0x39d724['if']('isUnlinked','ck-thread--unlinked'),_0x39d724['to']('actionIndicator',_0x229e00=>_0x229e00?'ck-thread--'+_0x229e00:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x39d724['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 _0x320f75 of this['commentsListView']['commentViews'])_0x320f75['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x28dd2c}=this,_0x3e4828=this['commentsListView']['commentViews']['get'](0x0);_0x3e4828===this['_boundFirstCommentView']||_0x3e4828['isSystemComment']||(this['_boundFirstCommentView']=_0x3e4828,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3e4828,'actionIndicator',_0x52b984=>'remove'===_0x52b984?'remove':null),_0x3e4828['placeholder']=N(_0x28dd2c,'Write\x20a\x20comment...'),_0x3e4828['removeButton']['on']('execute',_0x360609=>{_0x360609['stop'](),this['showConfirm'](N(_0x28dd2c,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3e4828['focus']();}),_0x3e4828['actionBar']['add'](this['resolveButton'],0x0),_0x3e4828['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x488ce5=new _0x54e09b(this['locale']);return _0x488ce5['label']=N(this['locale'],'Resolve'),_0x488ce5['tooltip']=N(this['locale'],'Resolve'),_0x488ce5['icon']=_0xfcd11b,_0x488ce5['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x488ce5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x8e492c=>!_0x8e492c),_0x488ce5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x27950d,_0x439528)=>_0x27950d&&!_0x439528),_0x488ce5['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x488ce5;}['_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(_0x55761b){super(_0x55761b),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x56de2c,_0x1ed984,_0x151eb3)=>{this['element']['innerHTML']=_0x151eb3;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x4740a6,_0xdd3fa6,_0x3af06e){super(_0x4740a6),this['_model']=_0xdd3fa6,this['_config']=_0x3af06e,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0xdd3fa6,'content',_0xdd3fa6,'authoredAt',(_0x2d23ea,_0x5a8af9)=>N(_0x4740a6,'COMMENT_ARIA_LABEL',[_0xdd3fa6['author']['name'],_0x3af06e['formatDateTime'](_0x5a8af9),new DOMParser()['parseFromString'](_0x2d23ea,'text/html')['body']['textContent'],_0xdd3fa6['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x4740a6,N(_0x4740a6,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xd5b2d1(),this['focusTracker']=new _0x242e0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x470c60({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2ac730=>_0x2ac730['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 _0x40f2b8=new is(this['locale']);return _0x40f2b8['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x47cfe8,_0x4403fd)=>_0x4403fd?ts(_0x47cfe8,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x47cfe8),_0x40f2b8;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4b37b9=new es(this['locale'],this['_config']['editorConfig']);return _0x4b37b9['value']=this['_model']['content'],_0x4b37b9['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4b37b9['submitLabel']=N(this['locale'],'Save'),_0x4b37b9['on']('submit',(_0x55ac0e,_0x588812)=>{this['fire']('updateComment',this['_model']['id'],_0x588812),this['switchToDisplayMode'](),this['focus']();}),_0x4b37b9['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4b37b9['once']('editorReady',()=>{_0x4b37b9['focus']();}),_0x4b37b9['createEditor'](),_0x4b37b9['delegate']('editorReady')['to'](this),_0x4b37b9['delegate']('editorDestroyed')['to'](this),_0x4b37b9;}['_setupKeyboardNavigation'](){const _0x5e3dbb=this['element'];this['keystrokes']['listenTo'](_0x5e3dbb);for(const _0x3c9ff9 of this['focusables'])this['focusTracker']['add'](_0x3c9ff9['element']),this['keystrokes']['listenTo'](_0x3c9ff9['element']);this['focusables']['on']('change',(_0x182aee,_0x3c153f)=>{for(const _0x35a4b2 of _0x3c153f['removed'])this['focusTracker']['remove'](_0x35a4b2['element']),this['keystrokes']['stopListening'](_0x35a4b2['element']);for(const _0x497944 of _0x3c153f['added'])this['focusTracker']['add'](_0x497944['element']),this['keystrokes']['listenTo'](_0x497944['element']);}),this['keystrokes']['set']('enter',(_0xfe7e9c,_0x16cfb6)=>{_0x5e3dbb===_0xfe7e9c['target']&&(this['focusCycler']['focusFirst'](),_0x16cfb6());}),this['keystrokes']['set']('esc',(_0x2be29a,_0xe8ce62)=>{_0x5e3dbb!==_0x2be29a['target']&&(this['focus'](),_0xe8ce62());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x5193d1,_0x3b26b9,_0x52187d){super(_0x5193d1,_0x3b26b9,_0x52187d),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x5193d1,'Reply...')),this['bind']('authoredAt')['to'](_0x3b26b9),this['bind']('resolvedAt')['to'](_0x3b26b9),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 _0x32d2d9(_0x5193d1,_0x3b26b9['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x3b26b9,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x46e05e=this['bindTemplate'],_0x2d95fc=[{'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':_0x46e05e['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x46e05e['to']('authoredAt',_0x3bc6ce=>this['_config']['formatDateTime'](_0x3bc6ce))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x46e05e['if']('isEditMode','ck-comment__actions--hidden'),_0x46e05e['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']&&_0x2d95fc['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x46e05e['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x46e05e['if']('isEditMode','ck-comment--edit'),_0x46e05e['if']('isSystemComment','ck-comment--info'),_0x46e05e['to']('actionIndicator',_0x3e4ade=>_0x3e4ade?'ck-comment--'+_0x3e4ade:'')],'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':_0x2d95fc}]}]};}['_createEditButton'](){const _0xb96adc=new _0x222733(this['locale']);return _0xb96adc['label']=N(this['locale'],'Edit'),_0xb96adc['icon']=_0x2b6859,_0xb96adc['withText']=!0x0,_0xb96adc['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xb96adc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xfd2666=>!_0xfd2666),_0xb96adc['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xb96adc['on']('execute',()=>this['switchToEditMode']()),_0xb96adc;}['_createRemoveButton'](){const _0x1eef63=new _0x222733(this['locale']);return _0x1eef63['label']=N(this['locale'],'Remove'),_0x1eef63['icon']=_0x2395f3,_0x1eef63['withText']=!0x0,_0x1eef63['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1eef63['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5c1cce=>!_0x5c1cce),_0x1eef63['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1eef63['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1eef63;}['_createDropdown'](){const _0x42a6a6=_0x1e7d35(this['locale'],_0x58b89e),_0x2c60c4=_0x42a6a6['panelView']['children'],_0x201ba4=new _0x25995c(this['locale']),_0x13acab=_0x42a6a6['bindTemplate'];_0x1626d8(_0x42a6a6,()=>this['items']['find'](_0x1d3ada=>_0x1d3ada['isVisible'])),_0x42a6a6['extendTemplate']({'attributes':{'class':[_0x13acab['if']('isVisible','ck-hidden',_0x46411c=>!_0x46411c)]}});const _0x5e2b6d=(_0x3a00d5,_0x2cd24a=-0x1)=>{const _0x4e40a8=new _0x2937d3(this['locale']);_0x4e40a8['children']['add'](_0x3a00d5);const _0xdfc502=_0x2cd24a>-0x1?_0x2cd24a:_0x201ba4['items']['length'];_0x201ba4['items']['add'](_0x4e40a8,_0xdfc502);const _0x53d0dc=Array['from'](this['items']);_0x42a6a6['unbind']('isEnabled','isVisible'),_0x42a6a6['bind']('isEnabled')['toMany'](_0x53d0dc,'isEnabled',(..._0x24b9a5)=>_0x24b9a5['some'](_0x3b97fe=>_0x3b97fe)),_0x42a6a6['bind']('isVisible')['toMany'](_0x53d0dc,'isVisible',(..._0x45e734)=>_0x45e734['some'](_0x5ec05b=>_0x5ec05b));};_0x42a6a6['panelPosition']='sw',_0x42a6a6['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x5f16e5});for(const _0x53ecc8 of this['items'])_0x5e2b6d(_0x53ecc8);return _0x2c60c4['add'](_0x201ba4),_0x42a6a6['listenTo'](this['items'],'add',(_0x2cd40e,_0x59c7f8,_0x32827b)=>{_0x5e2b6d(_0x59c7f8,_0x32827b);}),_0x42a6a6['listenTo'](this['items'],'remove',(_0x825a9a,_0x293daa,_0x33064c)=>{_0x201ba4['items']['remove'](_0x33064c);}),_0x42a6a6;}['_attachActions'](_0x3b6dd1,_0x3ea82b){const _0x54782b=_0x3b6dd1&&_0x3b6dd1['element'];_0x54782b&&(this['listenTo'](_0x54782b,'mouseenter',()=>this['actionIndicator']=_0x3ea82b),this['listenTo'](_0x54782b,'focus',()=>this['actionIndicator']=_0x3ea82b),this['listenTo'](_0x54782b,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x54782b,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x57bdf7=super['_createCommentInputView']();return _0x57bdf7['bind']('placeholder')['to'](this),_0x57bdf7;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x2c08d6){const _0xe4f9cb=Dt(_0x2c08d6,0x1e),_0x3ff573=new MutationObserver(_0x4abb25=>{for(const _0x59ac56 of _0x4abb25)('attributes'==_0x59ac56['type']&&'class'==_0x59ac56['attributeName']||'childList'==_0x59ac56['type']||'characterData'==_0x59ac56['type'])&&_0xe4f9cb();});return{'attach'(_0x43c9f4){_0x3ff573['observe'](_0x43c9f4,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x3ff573['disconnect'](),_0xe4f9cb['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x1f7daa,_0x319661){super(_0x1f7daa),this['id']=_0x1684c5(),this['focusTracker']=new _0x242e0a(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x2421c2,_0x3d71ef)=>this['fire']('Esc',_0x3d71ef)),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']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x319661),this['mainView']=_0x319661;const _0x93f89a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x93f89a['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 _0x586ee5=this['element']['clientHeight'];_0x586ee5&&(this['height']=_0x586ee5);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1d2f19(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x475759,target:_0x4e27c3,type:_0x342890,isVisible:_0x41c6b2=!0x0}){super(),this['view']=_0x475759,this['view']['element']||this['view']['render'](),this['_type']=_0x342890,this['_target']=_0x4e27c3,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x22714a([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x478620,_0x5dcfb2)=>{this['view']['focusTracker']['add'](_0x5dcfb2);}),this['focusableElements']['on']('remove',(_0x35a1c4,_0x458dbd)=>{this['view']['focusTracker']['remove'](_0x458dbd);}),this['set']('isVisible',_0x41c6b2);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1b1b69=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x1b1b69),_0x1b1b69;}get['targetRect'](){const _0x2d7515=this['target'];if(null===_0x2d7515)return null;if(_0x2d7515 instanceof _0x5f3a0a)return _0x2d7515;const _0x234a26=_0x2d7515['filter'](_0x533dab=>function(_0x184002){const _0x4304db=_0x184002['offsetParent'];if(_0x4304db)return!0x0;const _0x4cbc2a=_0x184002['getClientRects']()['item'](0x0);return!!_0x4cbc2a;}(_0x533dab));return 0x0===_0x234a26['length']?null:new _0x5f3a0a(_0x234a26[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x51081b){this['view']['isActive']=_0x51081b,this['view']['mainView']['isActive']=_0x51081b;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3e4ebc){if(!(null===_0x3e4ebc||_0x3e4ebc instanceof _0x5f3a0a||Array['isArray'](_0x3e4ebc)&&_0x3e4ebc['every'](_0x1dba6d=>fi(_0x1dba6d))))throw new _0x29e429('annotation-invalid-target',null,{'target':_0x3e4ebc});}['_getNormalizedTarget'](){const _0x35ecf8='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x35ecf8)?[_0x35ecf8]:_0x35ecf8;}}function fi(_0x297c30){return null!==_0x297c30&&'object'==typeof _0x297c30&&'nodeType'in _0x297c30&&0x1===_0x297c30['nodeType'];}class S extends _0x22714a{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x571531=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x242e0a(),this['_focusTracker']['on']('change:isFocused',(_0x45630d,_0x271f71,_0x3e324b)=>{_0x3e324b||this['fire']('blur');});for(const _0x4f6d99 of _0x571531)this['add'](_0x4f6d99);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x491f6a){if(this['has'](_0x491f6a))throw new _0x29e429('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x491f6a['innerView'],_0x491f6a),this['_viewToAnnotation']['set'](_0x491f6a['view'],_0x491f6a);for(const _0x4ba22e of _0x491f6a['focusableElements'])this['_focusTracker']['add'](_0x4ba22e);this['listenTo'](_0x491f6a['focusableElements'],'add',(_0x5ffee0,_0x2a354a)=>{this['_focusTracker']['add'](_0x2a354a);}),this['listenTo'](_0x491f6a['focusableElements'],'remove',(_0x7440ec,_0x3685c5)=>{this['_focusTracker']['remove'](_0x3685c5);}),this['listenTo'](_0x491f6a['view']['focusTracker'],'change:isFocused',(_0x1bfd22,_0x29beaf,_0xa9834)=>{_0xa9834&&this['fire']('focus',_0x491f6a);}),_0x491f6a['updateTargetRect']();const _0x53d425=this['_getOrderInContent'](_0x491f6a['view']['targetRect']);return super['add'](_0x491f6a,_0x53d425);}['remove'](_0x13105c){if(!this['has'](_0x13105c))throw new _0x29e429('annotationcollection-not-existing-item',null);this['stopListening'](_0x13105c['view']['focusTracker']),this['stopListening'](_0x13105c['focusableElements']);for(const _0x193f66 of _0x13105c['focusableElements'])this['_focusTracker']['remove'](_0x193f66);return this['_viewToAnnotation']['delete'](_0x13105c['view']),this['_innerViewToAnnotation']['delete'](_0x13105c['innerView']),super['remove'](_0x13105c);}['getByInnerView'](_0x311587){return this['_innerViewToAnnotation']['get'](_0x311587);}['getByView'](_0xf1d10d){return this['_viewToAnnotation']['get'](_0xf1d10d);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x5f15d4 of this)_0x5f15d4['updateTargetRect']();this['_sort']();}['_sort'](){const _0x5a3667=Array['from'](this)['sort']((_0x3315d5,_0x4b0b62)=>w(_0x3315d5['view']['targetRect'],_0x4b0b62['view']['targetRect']));for(let _0x3010d9=_0x5a3667['length']-0x1;_0x3010d9>0x0;_0x3010d9--){const _0x163a47=_0x5a3667[_0x3010d9];_0x3010d9!==this['getIndex'](_0x163a47)&&(this['remove'](_0x163a47),this['add'](_0x163a47));}}['_getOrderInContent'](_0x279ae8){let _0x476451=0x0;if(!_0x279ae8)return this['length'];for(const _0x29af88 of this){const _0x3e8dee=_0x29af88['view']['targetRect'];if(_0x3e8dee){if(w(_0x279ae8,_0x3e8dee)<0x0)return _0x476451;_0x476451++;}}return _0x476451;}}function v({source:_0x8f42e5,target:_0x309cc2,filter:_0x5ccce3}){for(const _0x96fd98 of _0x8f42e5)_0x5ccce3(_0x96fd98)&&_0x309cc2['add'](_0x96fd98);_0x309cc2['listenTo'](_0x8f42e5,'add',(_0x98f593,_0x2133c4)=>{_0x5ccce3(_0x2133c4)&&_0x309cc2['add'](_0x2133c4);}),_0x309cc2['listenTo'](_0x8f42e5,'remove',(_0xde6c4c,_0x2475c3)=>{_0x309cc2['has'](_0x2475c3)&&_0x309cc2['remove'](_0x2475c3);});}function w(_0x151975,_0x188b40){if(null===_0x151975&&null===_0x188b40)return 0x0;if(null===_0x151975)return-0x1;if(null===_0x188b40)return 0x1;const _0x16bdc5=_0x151975['top']-_0x188b40['top'];return 0x0==_0x16bdc5?_0x151975['left']-_0x188b40['left']:_0x16bdc5;}class y extends _0x35dfc2{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x66640){if(super(_0x66640),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x66640 instanceof _0x15bb05){const _0x48f900=_0x66640['locale'];_0x66640['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2dcc4c){this['collection']['add'](_0x2dcc4c);}['remove'](_0x2257e5){this['collection']['remove'](_0x2257e5),_0x2257e5['destroy']();}['refreshVisibility'](){for(const _0x5a2d86 of this['collection'])_0x5a2d86['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3eed44){return this['collection']['getByInnerView'](_0x3eed44);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x57f578 of this['collection'])_0x57f578['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4241df){this['fire']('_activateAnnotation',_0x4241df);}['createAnnotation'](_0xe2c3d8){return new T(_0xe2c3d8);}['createAnnotationView'](_0x4308d6,_0x1a6457){return new E(_0x4308d6,_0x1a6457);}['_addActiveAnnotation'](_0x440eb5){const _0x3b4483=new Set(this['activeAnnotations']);_0x3b4483['add'](_0x440eb5),this['activeAnnotations']=_0x3b4483;}['_removeActiveAnnotation'](_0x1783aa){const _0x5e8a2c=new Set(this['activeAnnotations']);_0x5e8a2c['delete'](_0x1783aa),this['activeAnnotations']=_0x5e8a2c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x32eef3=this['collection'],_0x2ec07d=this['_visibleAnnotations'];function _0x288a1c(_0x4a9149){const _0x125e9f=_0x4a9149['source'];_0x125e9f['isVisible']&&!_0x2ec07d['has'](_0x125e9f)?_0x2ec07d['add'](_0x125e9f):!_0x125e9f['isVisible']&&_0x2ec07d['has'](_0x125e9f)&&_0x2ec07d['remove'](_0x125e9f),_0x125e9f['view']['focusTracker']['remove'](_0x125e9f['view']['element']),_0x125e9f['view']['focusTracker']['add'](_0x125e9f['view']['element']);}this['listenTo'](_0x32eef3,'add',(_0xa58c7,_0x412fea)=>{_0x412fea['isVisible']&&_0x2ec07d['add'](_0x412fea),this['listenTo'](_0x412fea,'change:isVisible',_0x288a1c);}),this['listenTo'](_0x32eef3,'remove',(_0x55ad37,_0x10f5dc)=>{_0x2ec07d['has'](_0x10f5dc)&&_0x2ec07d['remove'](_0x10f5dc),this['stopListening'](_0x10f5dc,'change:isVisible',_0x288a1c);});}['_setupEnterAnnotationKeystroke'](){const _0xe47a89=_0x573fba=>{_0x573fba['on']('ready',()=>{_0x573fba['keystrokes']['set'](_0x59830c,(_0x49778d,_0x16cd47)=>{const _0x4e8f80=_0x1b9b5e(this['activeAnnotations']['values']());_0x4e8f80&&(_0x4e8f80['view']['focus'](),_0x16cd47());});});};this['context']instanceof _0x15bb05?_0xe47a89(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1ad7b9,_0x385e64)=>{_0xe47a89(_0x385e64);});}['_setupEscapeAnnotationHandling'](){const _0xe2065d=_0x108021=>{const _0x1080e4=_0x108021['source'],_0xddafca=[];let _0x1ffe7d;if(Array['isArray'](_0x1080e4['target'])){_0x1ffe7d=_0x1080e4['target'][0x0],this['context']instanceof _0x15bb05?_0xddafca['push'](this['context']):this['context']['editors']&&_0xddafca['push'](...this['context']['editors']);for(const _0x186f8c of _0xddafca)for(const _0xa36665 of _0x186f8c['editing']['view']['domRoots']['values']())if(_0xa36665['contains'](_0x1ffe7d))return void _0x186f8c['editing']['view']['focus']();_0x1ffe7d['focus']();}};this['listenTo'](this['collection'],'add',(_0x5b0c82,_0x21503b)=>{this['listenTo'](_0x21503b,'escape',_0xe2065d,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x492cf6,_0x932763)=>{this['stopListening'](_0x932763,'escape',_0xe2065d);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x35dfc2{['_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(_0x378ca8){super(_0x378ca8),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5127a9=this['context']['config'];_0x5127a9['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5127a9['define']('comments.maxThreadTotalWeight',0x1f4),_0x5127a9['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5127a9['define']('comments.CommentThreadView',gt),_0x5127a9['define']('comments.CommentView',Tt),_0x5127a9['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x38f883=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5462dd,_0x1c02cb)=>this['_addCommentThread'](_0x1c02cb)),this['on']('submitCommentThread',(_0x3c34e7,_0x3e0ee6)=>this['_submitCommentThread'](_0x3e0ee6)),this['on']('resolveCommentThread',(_0x55dbdd,_0x1858bb)=>this['_resolveCommentThread'](_0x1858bb)),this['on']('resolveCommentThread',(_0x31f38a,_0x5b9ce9)=>this['_updateActiveAnnotation'](_0x5b9ce9),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3863a5,_0x113d2e)=>this['_reopenCommentThread'](_0x113d2e)),this['on']('reopenCommentThread',(_0x1ca13d,_0x209cb6)=>this['_updateActiveAnnotation'](_0x209cb6),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x18a949,_0x31f443)=>this['_removeCommentThread'](_0x31f443)),this['on']('updateCommentThread',(_0x3f501a,_0x21852d)=>this['_updateCommentThread'](_0x21852d)),this['on']('updateCommentThread',(_0x454acf,_0x4550e5)=>this['_updateActiveAnnotation'](_0x4550e5),{'priority':'lowest'}),this['on']('addComment',(_0x5d7773,_0x4d689b)=>this['_addComment'](_0x4d689b)),this['on']('updateComment',(_0x312121,_0x109cd0)=>this['_updateComment'](_0x109cd0)),this['on']('removeComment',(_0x37452f,_0x485d92)=>this['_removeComment'](_0x485d92)),this['on']('addComment',(_0x1b1d05,{threadId:_0x474cb1,isFromAdapter:_0x495448})=>{if(_0x495448)return;const _0x4ec203=this['getCommentThread'](_0x474cb1),_0x15665a=_0x4ec203&&this['_threadToController']['get'](_0x4ec203);_0x15665a&&_0x15665a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x38f883,'change:activeAnnotations',(_0x2593ae,_0x20c669,_0x58d2a1)=>{const _0x148e1e=Array['from'](_0x58d2a1)['map'](_0x46bd72=>this['_viewToController']['get'](_0x46bd72['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x148e1e?_0x148e1e['model']:null;});}set['adapter'](_0x2431bf){if(this['_adapter'])throw new _0x29e429('commentsrepository-adapter-already-set');this['_adapter']=_0x2431bf;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4cdd6f=_t,threadId:_0x2997b8=_0x1684c5(),comments:_0x3a5992=[],unlinkedAt:_0x477da5=null,resolvedAt:_0x2c421a=null,resolvedBy:_0x3b820c=null,target:_0x13ac63=null,context:_0x2e3ebb=null,attributes:_0x33fefd={},isResolvable:_0x367101=!0x0,isSubmitted:_0x4f9fdb=!0x1,isFromAdapter:_0x7ee213=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4cdd6f),{'channelId':_0x4cdd6f,'threadId':_0x2997b8,'comments':_0x3a5992,'unlinkedAt':_0x477da5,'resolvedAt':_0x2c421a,'resolvedBy':_0x3b820c,'target':_0x13ac63,'context':_0x2e3ebb,'attributes':_0x33fefd,'isFromAdapter':_0x7ee213,'isResolvable':_0x367101,'isSubmitted':_0x4f9fdb}),this['getCommentThread'](_0x2997b8);}['openNewCommentThread']({channelId:_0x25d2d7=_t,threadId:_0x2200cd=_0x1684c5(),target:_0x13eeff,context:_0x1caeb9=null,isResolvable:_0x2cffd7=!0x0}){if(this['_readOnlyChannels']['has'](_0x25d2d7)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x13eeff)throw new _0x29e429('commentsrepository-missing-target');const _0x48e739=this['addCommentThread']({'channelId':_0x25d2d7,'threadId':_0x2200cd,'target':_0x13eeff,'context':_0x1caeb9,'isResolvable':_0x2cffd7});if(!_0x48e739)return null;const _0x2ca53b=this['_threadToController']['get'](_0x48e739),_0x4e6117=_0x2ca53b['view']['commentThreadInputView']['commentInputView'],_0x9f2650=this['context']['plugins']['get'](y),_0x3e4fe3=_0x9f2650['getByInnerView'](_0x2ca53b['view']);return _0x9f2650['activate'](_0x3e4fe3),_0x4e6117['once']('editorReady',()=>_0x4e6117['focus']()),_0x48e739;}['hasCommentThread'](_0x5ac5b5){if('string'!=typeof _0x5ac5b5)throw new _0x29e429('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x5ac5b5);}['updateCommentThread']({channelId:_0x1b9707=_t,threadId:_0x32ccb8,context:_0x3609fb,unlinkedAt:_0x2534be,attributes:_0x544fb5,isFromAdapter:_0x57d861=!0x1}){return this['fire'](Nt('updateCommentThread',_0x1b9707),{'channelId':_0x1b9707,'threadId':_0x32ccb8,'context':_0x3609fb,'unlinkedAt':_0x2534be,'attributes':_0x544fb5,'isFromAdapter':_0x57d861}),this['getCommentThread'](_0x32ccb8);}['getCommentThread'](_0x1fb34a){if('string'!=typeof _0x1fb34a)throw new _0x29e429('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1fb34a);}['fetchCommentThread']({channelId:_0x198ad1,threadId:_0x542140}={}){const _0x4f49c6=this['getCommentThread'](_0x542140);if(_0x4f49c6)return Promise['resolve'](_0x4f49c6);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x29e429('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x198ad1,'threadId':_0x542140})['then'](_0x308aff=>this['hasCommentThread'](_0x542140)?this['getCommentThread'](_0x542140):_0x308aff?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x198ad1},_0x308aff)):void 0x0)['catch'](_0x5db6b2=>{throw console['error'](_0x5db6b2),new _0x29e429('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5830be,skipNotAttached:_0x3140d9=!0x1,skipEmpty:_0x1b00b7=!0x1,toJSON:_0x2b538e=!0x1}={}){const _0x1198c6=[];for(const _0xf43a36 of this['_threads']['values']())_0x5830be&&_0xf43a36['channelId']!==_0x5830be||_0x3140d9&&!_0xf43a36['isAttached']||_0x1b00b7&&0x0===_0xf43a36['length']||_0x1198c6['push'](_0xf43a36);return _0x2b538e?_0x1198c6['map'](_0x5603a8=>_0x5603a8['toJSON']()):_0x1198c6;}['getAnnotationForCommentThread'](_0x5c76af){const _0x2e37bf=this['_threadToController']['get'](_0x5c76af);if(!_0x2e37bf)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2e37bf['view'])||null;}['getCommentThreadForAnnotation'](_0x58df89){const _0x42a334=this['_viewToController']['get'](_0x58df89['innerView']);return _0x42a334?_0x42a334['model']:null;}['setActiveCommentThread'](_0x3bf568){const _0x47fcd5=this['context']['plugins']['get'](y);if(!_0x3bf568)return void(this['activeCommentThread']&&_0x47fcd5['deactivateAll']());const _0x466862=this['getCommentThread'](_0x3bf568);if(!_0x466862)throw new _0x29e429('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3bf568});if(!this['_threadToController']['has'](_0x466862))throw new _0x29e429('commentsrepository-active-not-attached',null,{'threadId':_0x3bf568});const _0x225237=_0x47fcd5['getByInnerView'](this['_threadToController']['get'](_0x466862)['view']);_0x47fcd5['activate'](_0x225237);}['switchReadOnly'](_0x5227d3,_0x599bc4){_0x5227d3?this['_readOnlyChannels']['add'](_0x599bc4):this['_readOnlyChannels']['delete'](_0x599bc4),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2da56e){return this['_readOnlyChannels']['has'](_0x2da56e)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x501062,_0x1f5971){return new vt(_0x501062,_0x1f5971);}['setPermissions'](_0x360f0e,_0x13754e=_t){this['_permissions']['set'](_0x13754e,_0x360f0e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x11dee8=_t){return this['_permissions']['has'](_0x11dee8)?this['_permissions']['get'](_0x11dee8):bt;}['_addCommentThread']({channelId:_0x4b603e,threadId:_0x4fb3bc,comments:_0xf97549,unlinkedAt:_0x213ac6,resolvedAt:_0x1bf8f9,resolvedBy:_0xc2f64b,target:_0x310fa6,context:_0x37f6a5,attributes:_0x5965af,isFromAdapter:_0x2f360f,isResolvable:_0x360ee6,isSubmitted:_0x3ed32e}){if('string'!=typeof _0x4fb3bc)throw new _0x29e429('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4fb3bc});if(this['hasCommentThread'](_0x4fb3bc))throw new _0x29e429('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4fb3bc});const _0x18bc8a=new pi(this,{'channelId':_0x4b603e,'id':_0x4fb3bc,'context':_0x37f6a5,'attributes':_0x5965af,'unlinkedAt':_0x213ac6,'resolvedAt':_0x1bf8f9,'resolvedBy':_0xc2f64b?this['context']['plugins']['get'](it)['getUser'](_0xc2f64b):null,'isResolvable':_0x360ee6,'isSubmitted':_0x3ed32e||_0x2f360f});this['_threads']['set'](_0x4fb3bc,_0x18bc8a);for(const _0x33e2a2 of _0xf97549)_0x18bc8a['_add'](this['_createNewComment']({'threadId':_0x4fb3bc,..._0x33e2a2}));return _0x310fa6&&_0x18bc8a['attachTo'](_0x310fa6),_0x2f360f||!_0x18bc8a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4b603e,'threadId':_0x4fb3bc});}['_submitCommentThread']({channelId:_0x57a407,threadId:_0x4817d5}){if(!this['hasCommentThread'](_0x4817d5))throw new _0x29e429('commentsrepository-missing-comment-thread',this);const _0x350eb2=this['getCommentThread'](_0x4817d5);if(_0x350eb2['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x206951,comments:_0x558f2c,resolvedAt:_0xb5169f,resolvedBy:_0x494ed4,context:_0x32dc99,attributes:_0x4dbf46}=_0x350eb2,_0x4a8939=this['context']['plugins']['get']('PendingActions'),_0x4ab284=_0x4a8939['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x57a407,'threadId':_0x206951,'comments':_0x558f2c['map'](_0x587e5d=>_0x587e5d['toJSON']()),'resolvedAt':_0xb5169f,'resolvedBy':_0x494ed4?_0x494ed4['id']:_0x494ed4,'context':_0x32dc99,'attributes':_0x4dbf46})['then'](({comments:_0x2a9f70})=>{_0x4a8939['remove'](_0x4ab284);for(const _0x1c2038 of _0x2a9f70)this['_updateComment']({'channelId':_0x57a407,'threadId':_0x4817d5,'commentId':_0x1c2038['commentId'],'createdAt':_0x1c2038['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4dddaa=>{throw console['error'](_0x4dddaa),new _0x29e429('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x115c42,target:_0x36cf94}){const _0x39c542=this['getCommentThread'](_0x115c42);if(!_0x39c542)throw new _0x29e429('commentsrepository-attach-missing-comment-thread',this);const _0x3f8ec2=this['context']['plugins']['get']('PendingActions'),_0x4a291f=this['context']['plugins']['get'](y),_0x6ea954=this['_createCommentThreadView'](_0x39c542),_0x586a7e=new vt(_0x39c542,_0x6ea954);let _0x4db6f5=null;_0x6ea954['on']('change:isDirty',(_0x2fdc20,_0x3a1cab,_0x1c4975)=>{_0x1c4975?_0x4db6f5=_0x3f8ec2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4db6f5&&(_0x3f8ec2['remove'](_0x4db6f5),_0x4db6f5=null);}),this['_threadToController']['set'](_0x39c542,_0x586a7e),this['_viewToController']['set'](_0x6ea954,_0x586a7e);const _0x43c2ae=new E(this['context']['locale'],_0x6ea954);_0x43c2ae['bind']('length')['to'](_0x6ea954),_0x43c2ae['bind']('isDirty')['to'](_0x6ea954,'isDirty',_0x6ea954,'length',(_0x1a84e5,_0x347384)=>_0x1a84e5||!_0x347384),_0x43c2ae['bind']('isActive')['to'](_0x6ea954),_0x43c2ae['type']='comment';const _0x51675e=new T({'view':_0x43c2ae,'target':_0x36cf94,'type':'comment','isVisible':!_0x39c542['archivedAt']&&!!('function'==typeof _0x36cf94?_0x36cf94():_0x36cf94)});return _0x6ea954['on']('escape',()=>{_0x51675e['fire']('escape');}),this['_bindAnnotationToEditors'](_0x6ea954,_0x51675e),_0x4a291f['add'](_0x51675e),_0x51675e;}['_bindAnnotationToEditors'](_0x5852a5,_0x86d4dc){this['listenTo'](_0x5852a5,'editorReady',(_0x402c47,_0x55372a)=>{const _0x24c3a9=_0x55372a['ui']['view']['body']['bodyCollectionContainer'];_0x86d4dc['focusableElements']['add'](_0x24c3a9),this['context']instanceof _0x15bb05&&this['context']['ui']['focusTracker']['add'](_0x24c3a9);},{'priority':'highest'}),this['listenTo'](_0x5852a5,'editorDestroyed',(_0x131df7,_0x542a6f)=>{const _0x3c75b4=_0x542a6f['ui']['view']['body']['bodyCollectionContainer'];_0x86d4dc['focusableElements']['has'](_0x3c75b4)&&_0x86d4dc['focusableElements']['remove'](_0x3c75b4),this['context']instanceof _0x15bb05&&this['context']['ui']['focusTracker']['remove'](_0x3c75b4);});}['_unbindEditors'](_0x43530f){this['stopListening'](_0x43530f,'editorReady'),this['stopListening'](_0x43530f,'editorDestroyed');}['_createCommentThreadView'](_0x51f798){const _0x138942=this['context']['plugins']['get'](it),{config:_0x38e89e,locale:_0x345d64}=this['context'],_0x1787c0=pt(_0x38e89e['get']('locale'),_0x345d64);return new(0x0,(_0x38e89e['get']('comments'))['CommentThreadView'])(_0x345d64,_0x51f798,_0x138942['me'],{'editorConfig':{..._0x38e89e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x38e89e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x38e89e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x38e89e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x38e89e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1787c0,'CommentView':_0x38e89e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2f918d,channelId:_0x2043b0,resolvedAt:_0x9194bb,resolvedBy:_0x5d99ca,isFromAdapter:_0xd075ce}){if(!this['hasCommentThread'](_0x2f918d))throw new _0x29e429('commentsrepository-missing-comment-thread',null,{'threadId':_0x2f918d});const _0x30ebb9=this['getCommentThread'](_0x2f918d);if(_0x30ebb9['isResolved'])throw new _0x29e429('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2f918d});const _0x27499d=this['context']['plugins']['get'](it);if(_0x30ebb9['resolvedBy']=_0x27499d['getUser'](_0x5d99ca),_0x30ebb9['resolvedAt']=_0x9194bb,_0xd075ce||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3c6f3f=this['context']['plugins']['get']('PendingActions'),_0x3e9eb0=_0x3c6f3f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2043b0,'threadId':_0x2f918d})['then'](({resolvedAt:_0x1b1a8b,resolvedBy:_0xc1bb78})=>{_0x3c6f3f['remove'](_0x3e9eb0),_0x30ebb9['resolvedBy']['id']!==_0xc1bb78&&(_0x30ebb9['resolvedBy']=_0x27499d['getUser'](_0xc1bb78)),_0x30ebb9['resolvedAt']=_0x1b1a8b;})['catch'](_0x34bff2=>{throw console['error'](_0x34bff2),new _0x29e429('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4b2a4f,channelId:_0x5b2822,isFromAdapter:_0xc0cc56}){if(!this['hasCommentThread'](_0x4b2a4f))throw new _0x29e429('commentsrepository-missing-comment-thread',null,{'threadId':_0x4b2a4f});const _0x157129=this['getCommentThread'](_0x4b2a4f);if(!_0x157129['isResolved'])throw new _0x29e429('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4b2a4f});if(_0x157129['resolvedBy']=null,_0x157129['resolvedAt']=null,_0xc0cc56||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x116db4=this['context']['plugins']['get']('PendingActions'),_0x4f9d10=_0x116db4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5b2822,'threadId':_0x4b2a4f})['then'](()=>_0x116db4['remove'](_0x4f9d10))['catch'](_0x163285=>{throw console['error'](_0x163285),new _0x29e429('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x161b55,isFromAdapter:_0x48067c}){const _0x53a9e5=this['getCommentThread'](_0x161b55);if(!_0x53a9e5)throw new _0x29e429('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x161b55),this['_threads']['delete'](_0x161b55),!_0x53a9e5['isSubmitted']||_0x48067c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x86832c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ef680}=_0x53a9e5,_0x2efd5c=_0x86832c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1ef680,'threadId':_0x161b55})['then'](()=>_0x86832c['remove'](_0x2efd5c))['catch'](_0x56d279=>{throw console['error'](_0x56d279),new _0x29e429('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x44c4d8,unlinkedAt:_0xc63c63,context:_0x1b61f8,attributes:_0xdb4bba,isFromAdapter:_0x3b3a0c}){if('string'!=typeof _0x44c4d8)throw new _0x29e429('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x44c4d8});if(!this['hasCommentThread'](_0x44c4d8))throw new _0x29e429('commentsrepository-missing-comment-thread',null,{'threadId':_0x44c4d8});const _0x56e8a3=this['getCommentThread'](_0x44c4d8);let _0x29d568=!0x1;if(void 0x0!==_0x1b61f8&&_0x56e8a3['context']!==_0x1b61f8&&(_0x56e8a3['context']=_0x1b61f8,_0x29d568=!0x0),void 0x0!==_0xc63c63&&_0x56e8a3['unlinkedAt']!==_0xc63c63&&(_0x56e8a3['unlinkedAt']=_0xc63c63,_0x29d568=!0x0),_0xdb4bba&&!At(_0xdb4bba,_0x56e8a3['attributes'])&&(_0x56e8a3['attributes']=_0xdb4bba,_0x29d568=!0x0),!_0x29d568)return Promise['resolve']();if(!_0x56e8a3['isSubmitted']||_0x3b3a0c||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1571f1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x359561}=_0x56e8a3,_0x281dd6=_0x1571f1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x359561,'threadId':_0x44c4d8,'context':_0x1b61f8,'unlinkedAt':_0xc63c63,'attributes':_0xdb4bba})['then'](()=>_0x1571f1['remove'](_0x281dd6))['catch'](_0x1224f8=>{throw console['error'](_0x1224f8),new _0x29e429('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xecf025){const _0x1d50c1=this['context']['plugins']['get'](y),_0x1c1849=this['getCommentThread'](_0xecf025);if(_0x1c1849['_isAttached']=!0x1,this['_threadToController']['has'](_0x1c1849)){const _0x43e8a1=this['_threadToController']['get'](_0x1c1849),_0xc374a2=_0x43e8a1['view'],_0x586ace=_0x1d50c1['getByInnerView'](_0xc374a2);this['_threadToController']['delete'](_0x1c1849),this['_viewToController']['delete'](_0xc374a2),_0x586ace&&_0x1d50c1['remove'](_0x586ace),_0x43e8a1['destroy'](),_0xc374a2['destroy']()['then'](()=>{this['_unbindEditors'](_0xc374a2);});}}['_updateActiveAnnotation']({threadId:_0xabb278,resolvedAt:_0x29aeae,unlinkedAt:_0x198aa5}){const _0x145ae1=!!_0x29aeae,_0xca62bc=this['context']['plugins']['get'](y),_0x452900=this['getCommentThread'](_0xabb278);if(this['_threadToController']['has'](_0x452900)){const _0x30cdb4=this['_threadToController']['get'](_0x452900)['view'],_0x3c31a3=_0xca62bc['getByInnerView'](_0x30cdb4);_0x3c31a3&&(_0x145ae1&&_0xca62bc['_removeActiveAnnotation'](_0x3c31a3),_0x198aa5?_0x3c31a3['isVisible']=!0x1:_0x3c31a3['refreshVisibility']());}}['_getExternalAuthor'](_0xffdea7){const _0x2121a2=this['context']['plugins']['get'](it),_0x54ab28=It('external:'+_0xffdea7),_0x216fb7=_0x2121a2['getUser'](_0x54ab28);return _0x216fb7||_0x2121a2['addUser']({'id':_0x54ab28,'name':_0xffdea7});}['_createNewComment']({threadId:_0xdc39e1,commentId:_0x3053d5=_0x1684c5(),content:_0x547536,authorId:_0x3f756c,createdAt:_0x206c4d,attributes:_0x31f93e}){if('string'!=typeof _0x3053d5)throw new _0x29e429('commentsrepository-invalid-commentid');if('string'!=typeof _0x3f756c)throw new _0x29e429('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x547536||!_0x547536['trim']())throw new _0x29e429('commentsrepository-invalid-comment-content');const _0x50be35=this['context']['plugins']['get'](it)['getUser'](_0x3f756c);if(!_0x50be35)throw new _0x29e429('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3f756c});let _0x5b2865=null,_0x55138a=_0x206c4d;return _0x31f93e?.['@external']&&(_0x5b2865=this['_getExternalAuthor'](_0x31f93e['@external']['authorName']),_0x55138a=new Date(_0x31f93e['@external']['createdAt'])),new wi(this,{'threadId':_0xdc39e1,'id':_0x3053d5,'author':_0x5b2865||_0x50be35,'creator':_0x50be35,'content':_0x547536,'createdAt':_0x206c4d,'authoredAt':_0x55138a,'attributes':_0x31f93e});}['_addComment'](_0x350b83){let {threadId:_0x1baa02,content:_0x287969,attributes:_0x1f9a6c,isFromAdapter:_0x153a76}=_0x350b83;const _0x208719=this['getCommentThread'](_0x350b83['threadId']);if(!_0x208719)throw new _0x29e429('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3ca48a=this['_createNewComment'](_0x350b83),{id:_0x39fdd7}=_0x3ca48a;if(_0x208719['_add'](_0x3ca48a),_0x153a76||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x208719['isSubmitted'])return Promise['resolve']();const _0x123874=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2cf856}=_0x208719,_0x1412c7=_0x123874['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1f9a6c||(_0x1f9a6c={}),this['adapter']['addComment']({'channelId':_0x2cf856,'threadId':_0x1baa02,'commentId':_0x39fdd7,'content':_0x287969,'attributes':_0x1f9a6c})['then'](_0x29b7d6=>{_0x123874['remove'](_0x1412c7),_0x29b7d6&&this['_updateComment']({'channelId':_0x2cf856,'threadId':_0x1baa02,'commentId':_0x39fdd7,'createdAt':_0x29b7d6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5b35d4=>{throw console['error'](_0x5b35d4),new _0x29e429('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4d482f,commentId:_0x485c18,content:_0x1a66d3,createdAt:_0x433a5a,attributes:_0x1dba1b,isFromAdapter:_0x128bfd}){if(void 0x0!==_0x1a66d3&&('string'!=typeof _0x1a66d3||!_0x1a66d3['trim']()['length']))throw new _0x29e429('commentsrepository-update-comment-invalid-content');const _0x2990a8=this['getCommentThread'](_0x4d482f),_0x35c00a=_0x2990a8['getComment'](_0x485c18);if(!_0x35c00a)throw new _0x29e429('commentsrepository-update-missing-comment',this);let _0x575808=!0x1;if(_0x1a66d3&&_0x1a66d3!==_0x35c00a['content']&&(_0x35c00a['isEditable']||_0x128bfd)&&(_0x35c00a['content']=_0x1a66d3,_0x575808=!0x0),_0x433a5a&&_0x433a5a!==_0x35c00a['createdAt']&&(_0x35c00a['createdAt']=_0x433a5a,_0x35c00a['attributes']&&_0x35c00a['attributes']['@external']||(_0x35c00a['authoredAt']=_0x433a5a),_0x575808=!0x0),_0x1dba1b&&!At(_0x1dba1b,_0x35c00a['attributes'])&&(_0x35c00a['attributes']=_0x1dba1b,_0x575808=!0x0),!_0x575808)return Promise['resolve']();if(_0x2990a8['fire']('commentUpdated'),_0x128bfd||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x55ca04=this['context']['plugins']['get']('PendingActions'),{channelId:_0x442605}=this['getCommentThread'](_0x35c00a['threadId']),_0x3a9004=_0x55ca04['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x442605,'threadId':_0x4d482f,'commentId':_0x485c18,'content':_0x1a66d3,'attributes':_0x1dba1b})['then'](()=>_0x55ca04['remove'](_0x3a9004))['catch'](_0x26ac16=>{throw console['error'](_0x26ac16),new _0x29e429('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x166ac5,commentId:_0x11fca8,isFromAdapter:_0x2c66df}){const _0x555ddf=this['getCommentThread'](_0x166ac5),_0x3bde6c=_0x555ddf['getComment'](_0x11fca8);if(!_0x3bde6c)throw new _0x29e429('commentsrepository-remove-missing-comment',this);if(_0x555ddf['_remove'](_0x3bde6c),_0x2c66df||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x322485=this['context']['plugins']['get']('PendingActions'),{channelId:_0x13f9af}=_0x555ddf,_0x2b4c75=_0x322485['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x13f9af,'threadId':_0x166ac5,'commentId':_0x11fca8})['then'](()=>_0x322485['remove'](_0x2b4c75))['catch'](_0x3265e1=>{throw console['error'](_0x3265e1),new _0x29e429('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1d2f19(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x40d829,_0x3a4104){super();const _0x3cc356=_0x3a4104['isResolvable'];this['channelId']=_0x3a4104['channelId'],this['id']=_0x3a4104['id'],this['comments']=new _0x22714a(),this['_repository']=_0x40d829,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3a4104['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x40d829,'_permissions',_0x40d829,'_readOnlyChannels',()=>_0x40d829['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x40d829,'_permissions',()=>_0x40d829['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x40d829,'_permissions',()=>{const _0x5de796=_0x40d829['getPermissions'](this['channelId']);return _0x5de796['write']||_0x5de796['admin'];}),this['bind']('isResolvable')['to'](_0x40d829,'_permissions',()=>_0x3cc356&&_0x40d829['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3a4104['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x480e51,_0x4af44e)=>_0x480e51?_0x4af44e?_0x480e51<_0x4af44e?_0x480e51:_0x4af44e:_0x480e51:_0x4af44e),this['set']('unlinkedAt',_0x3a4104['unlinkedAt']||null),this['set']('resolvedAt',_0x3a4104['resolvedAt']||null),this['set']('resolvedBy',_0x3a4104['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x2f1adc=>!!_0x2f1adc),this['set']('attributes',_0x3a4104['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xc51a3e,_0x3a8fee)=>_0xc51a3e+_0x3a8fee['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5bc1fd,id:_0x3a123b}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x5bc1fd),{'channelId':_0x5bc1fd,'threadId':_0x3a123b});}['setUnlinkedAt'](_0x3ab556){this['_update']({'unlinkedAt':_0x3ab556});}['resolve']({resolvedAt:_0x594c1e=new Date(),resolvedBy:_0xa6f6ef='',isFromAdapter:_0x401f9b=!0x1}={}){const _0x2f9cc2=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4ca547,id:_0x5c6f31}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4ca547),{'channelId':_0x4ca547,'threadId':_0x5c6f31,'resolvedAt':_0x594c1e,'resolvedBy':_0xa6f6ef||_0x2f9cc2['id'],'isFromAdapter':_0x401f9b});}['reopen']({isFromAdapter:_0x231811=!0x1}={}){const {channelId:_0x331a4e,id:_0x57469d}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x331a4e),{'channelId':_0x331a4e,'threadId':_0x57469d,'isFromAdapter':_0x231811});}['setContext'](_0x131de7){this['context']||this['_update']({'context':_0x131de7});}['setAttribute'](_0x2d0522,_0x255b44){const _0x332122=wt(this['attributes']);yt(_0x332122,_0x2d0522,_0x255b44),this['_update']({'attributes':_0x332122});}['removeAttribute'](_0x1b9aab){const _0x477474=wt(this['attributes']);Ct(_0x477474,_0x1b9aab),this['_update']({'attributes':_0x477474});}['remove']({isFromAdapter:_0x2ffc65=!0x1}={}){const {channelId:_0x3fef0c,id:_0x21c3e6}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x3fef0c),{'channelId':_0x3fef0c,'threadId':_0x21c3e6,'isFromAdapter':_0x2ffc65});}['attachTo'](_0x1cfd71){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x1cfd71});}['addComment'](_0x7ab713){const {channelId:_0xfa2a68,id:_0x579136}=this;this['_repository']['fire'](Nt('addComment',_0xfa2a68,_0x579136),Object['assign']({'channelId':_0xfa2a68,'threadId':_0x579136},_0x7ab713));}['getComment'](_0x1f2e24){if('string'!=typeof _0x1f2e24)throw new _0x29e429('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x1f2e24});return this['comments']['get'](_0x1f2e24);}['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'](_0x238341=>_0x238341['toJSON']()),'attributes':this['attributes']};}['_add'](_0x3518d0){return this['listenTo'](_0x3518d0,'change:authoredAt',()=>{const _0x295376=this['_findOptimalIndex'](_0x3518d0),_0x222bcf=this['comments'];_0x295376-0x1!=_0x222bcf['getIndex'](_0x3518d0)&&_0x295376+0x1!=_0x222bcf['getIndex'](_0x3518d0)&&(this['_remove'](_0x3518d0),this['_add'](_0x3518d0));}),this['comments']['add'](_0x3518d0,this['_findOptimalIndex'](_0x3518d0));}['_update'](_0x2d0a8c){const {channelId:_0x47bbf3,id:_0x218b1b}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x47bbf3),{..._0x2d0a8c,'channelId':_0x47bbf3,'threadId':_0x218b1b});}['_remove'](_0x346a6d){return this['stopListening'](_0x346a6d),_0x346a6d['destroy'](),this['comments']['remove'](_0x346a6d);}['_findOptimalIndex'](_0xdbccaa){const _0x3c8dbf=this['comments']['find'](_0x14a11b=>new Date(_0x14a11b['authoredAt'])['getTime']()>new Date(_0xdbccaa['authoredAt'])['getTime']());return _0x3c8dbf?this['comments']['getIndex'](_0x3c8dbf):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1d2f19(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x29c99d,_0x55ae09){super();const _0x2e489c=_0x29c99d['context']['plugins']['get'](it)['me'],_0x3ed136=_0x29c99d['getCommentThread'](_0x55ae09['threadId']),_0x116f64=0x0===_0x3ed136['comments']['length'],_0x3c2827=_0x2e489c===_0x55ae09['author'];this['id']=_0x55ae09['id'],this['threadId']=_0x55ae09['threadId'],this['author']=_0x55ae09['author'],this['creator']=_0x55ae09['creator'],this['isExternal']=Boolean(_0x55ae09['attributes']&&_0x55ae09['attributes']['@external']),this['set']('content',_0x55ae09['content']),this['createdAt']=_0x55ae09['createdAt']||new Date(),this['set']('authoredAt',_0x55ae09['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3ed136,'resolvedAt'),this['set']('attributes',_0x55ae09['attributes']||{}),this['bind']('isEditable')['to'](_0x29c99d,'_permissions',()=>{const _0x51c774=_0x29c99d['getPermissions'](_0x3ed136['channelId'])['write'],_0x37db8f=_0x29c99d['getPermissions'](_0x3ed136['channelId'])['modifyAll'];return _0x3c2827&&_0x51c774||!_0x3c2827&&_0x37db8f;}),this['bind']('isRemovable')['to'](_0x3ed136,'isRemovable',_0x29c99d,'_permissions',_0x1d9b5e=>{const _0x14d3c3=_0x29c99d['getPermissions'](_0x3ed136['channelId'])['write'],_0x4dc627=_0x29c99d['getPermissions'](_0x3ed136['channelId'])['modifyAll'];return _0x3c2827&&_0x14d3c3||_0x1d9b5e&&_0x116f64||!_0x3c2827&&_0x4dc627&&!_0x116f64;}),this['bind']('isReadOnly')['to'](_0x3ed136,'isReadOnly'),this['_repository']=_0x29c99d;}get['weight'](){return Math['max'](function(_0x29839c){const _0x334e17=document['createElement']('div');return _0x334e17['innerHTML']=_0x29839c,_0x334e17['textContent']['length'];}(this['content']),0xc8);}['update'](_0x5b369a){const {threadId:_0x302c47,id:_0x57297d}=this;if(!this['_repository']['hasCommentThread'](_0x302c47))throw new _0x29e429('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x27f247}=this['_repository']['getCommentThread'](_0x302c47);this['_repository']['fire'](Nt('updateComment',_0x27f247,_0x302c47),{'channelId':_0x27f247,'threadId':_0x302c47,'commentId':_0x57297d,..._0x5b369a});}['setAttribute'](_0x34f280,_0x46c40f){const _0x519c48=wt(this['attributes']);yt(_0x519c48,_0x34f280,_0x46c40f),this['update']({'attributes':_0x519c48});}['removeAttribute'](_0xe53021){const _0x219764=wt(this['attributes']);Ct(_0x219764,_0xe53021),this['update']({'attributes':_0x219764});}['remove'](_0x49ca51={}){if(!_0x49ca51['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x14601f,id:_0x4b0b43}=this;if(!this['_repository']['hasCommentThread'](_0x14601f))throw new _0x29e429('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x40a6a7}=this['_repository']['getCommentThread'](_0x14601f);this['_repository']['fire'](Nt('removeComment',_0x40a6a7,_0x14601f),{'channelId':_0x40a6a7,'threadId':_0x14601f,'commentId':_0x4b0b43,..._0x49ca51});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3e3e10,..._0x5693d3){for(const _0x28560c of _0x5693d3)void 0x0!==_0x28560c&&(_0x3e3e10+=':'+String(_0x28560c));return _0x3e3e10;}class ot extends _0x445992{constructor(_0xc91e5c){super(_0xc91e5c),this['set']('hasContent',!0x1);}['refresh'](){const _0x26ce93=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5bc93d of _0x26ce93['getRanges']())if(this['_hasContent'](_0x5bc93d))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x46cbff=_0x1684c5(),ranges:_0x49f3fd,comment:_0x3fbdaa}={}){const _0x2ed229=this['editor']['model'],_0x380f6f=_0x49f3fd??Array['from'](_0x2ed229['document']['selection']['getRanges']()),_0xc9ef73=[];for(const _0x1f41ea of _0x380f6f)this['_hasContent'](_0x1f41ea)&&_0xc9ef73['push'](this['_trimToContent'](_0x1f41ea));if(!_0xc9ef73['length'])throw new _0x29e429('addcommentthreadcommand-incorrect-ranges',null);_0x3fbdaa&&this['_createCommentThread'](_0x46cbff,_0x3fbdaa),this['_createMarkersFromRanges'](_0x46cbff,_0xc9ef73,!!_0x3fbdaa);}['_createMarkersFromRanges'](_0x163e1e,_0x303ab8,_0x346674){this['editor']['model']['change'](_0x35f664=>{for(const _0x1b1d44 of _0x303ab8){const _0x3fdd87=_0x1684c5()['substr'](0x1,0x5),_0x5d2204='comment:'+_0x163e1e+':'+_0x3fdd87;_0x35f664['addMarker'](_0x5d2204,{'range':_0x1b1d44,'usingOperation':_0x346674,'affectsData':_0x346674});}});}['_createCommentThread'](_0xbaf0b4,_0x63f4bf){const _0x6f5fea=this['editor']['plugins']['get']('CommentsRepository'),_0x20bc41=this['editor']['config']['get']('collaboration.channelId'),_0xc8c038=this['editor']['plugins']['get']('Users')['me'];if(!_0xc8c038)throw new _0x29e429('addcommentthreadcommand-user-not-found',null);_0x6f5fea['addCommentThread']({'threadId':_0xbaf0b4,'channelId':_0x20bc41,'comments':[{'authorId':_0xc8c038['id'],'content':_0x63f4bf,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x6ccb18){for(const _0x3f3b05 of _0x6ccb18['getItems']())if(this['_itemIsContent'](_0x3f3b05))return!0x0;return!0x1;}['_itemIsContent'](_0x5bbbad){return _0x5bbbad['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5bbbad)&&!_0x5bbbad['is']('element','tableCell');}['_trimToContent'](_0x336bc9){const _0x2673c0=_0x2667f0=>!this['_itemIsContent'](_0x2667f0['item']),_0x15842a=_0x336bc9['start']['getLastMatchingPosition'](_0x2673c0),_0x3befad=_0x336bc9['end']['getLastMatchingPosition'](_0x2673c0,{'direction':'backward'});return this['editor']['model']['createRange'](_0x15842a,_0x3befad);}}class b extends _0x3732d9{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b08f8){super(_0x2b08f8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5e02fa=this['editor'],_0x27fb0b=_0x5e02fa['model']['document']['selection'],_0x501d4a=_0x340747(()=>this['refreshSelectedViews'](),0xa);_0x27fb0b['on']('change:range',(_0x264f60,_0x10dcac)=>{_0x10dcac['directChange']&&(_0x501d4a['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5e02fa['editing']['view']['document'],'change:isFocused',(_0x3e413c,_0xae52f7,_0x1047ad)=>{_0x1047ad&&_0x501d4a();}),this['listenTo'](_0x5e02fa['ui']['focusTracker'],'change:isFocused',(_0x12e24d,_0x1f268e,_0x18ae6b)=>{_0x18ae6b||this['fire']('blur',{'isAnnotationTracked':_0x3edb45=>this['_editorAnnotationsData']['has'](_0x3edb45['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1f375c){if(this['_editorAnnotations']['has'](_0x1f375c['view']))return;this['_editorAnnotations']['add'](_0x1f375c['view']),this['editor']['ui']['focusTracker']['add'](_0x1f375c['view']['element']);const _0x79959c=this['editor']['plugins']['get'](y);this['listenTo'](_0x79959c['collection'],'remove',(_0x1ed863,_0x1b34e2)=>{this['editor']['ui']['focusTracker']['remove'](_0x1b34e2['view']['element']),this['_editorAnnotations']['delete'](_0x1b34e2['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x11490b){if('function'!=typeof _0x11490b)throw new _0x29e429('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x11490b);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x5270c1,annotations:_0x2fdcb6}){const _0x46eaa8=[],_0x2c627e=this['editor']['model']['document']['selection'],_0x45d8c1=Array['from'](_0x2c627e['getRanges']());for(const [_0x4f2c11,_0x150b29]of this['_editorAnnotationsData']){const _0x390702=_0x45f1a9(_0x150b29),_0x32c2a9=_0x2fdcb6['getByInnerView'](_0x4f2c11);_0x390702&&_0x32c2a9&&_0x46eaa8['push']({'annotation':_0x32c2a9,'range':_0x390702});}function _0x45f1a9(_0x2132fb){for(const _0x4e9c53 of _0x2132fb)for(const _0x44d830 of _0x45d8c1)if(_0x4e9c53['containsRange'](_0x44d830,!_0x2c627e['isCollapsed']))return _0x4e9c53;return null;}return _0x46eaa8['sort']((_0x7642e,_0x1dd6ec)=>{const _0x4c6c19=_0x7642e['range'],_0x429b77=_0x1dd6ec['range'];if(!_0x4c6c19['isEqual'](_0x429b77)){if(_0x4c6c19['containsRange'](_0x429b77,!0x0))return 0x1;if(_0x429b77['containsRange'](_0x4c6c19,!0x0))return-0x1;}return _0x7642e['annotation']==_0x5270c1?-0x1:_0x1dd6ec['annotation']==_0x5270c1?0x1:0x0;})['map'](_0x5186b8=>_0x5186b8['annotation']);}get['_editorAnnotationsData'](){const _0x363dd0=new Map();for(const _0x2cfe99 of Array['from'](this['_dataCollectors']))for(const [_0x84d8ec,_0x330465]of _0x2cfe99())_0x363dd0['set'](_0x84d8ec,_0x330465);return _0x363dd0;}}class st extends _0x3732d9{['afterInit'](){const _0x3f8c3e=this['editor'];if(!_0x3f8c3e['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3f8c3e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3732d9{constructor(_0x41c6de){super(_0x41c6de),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x32ba02=this['editor'],_0x58e587=_0x32ba02['commands']['get']('importWord'),_0x4caf3c=_0x32ba02['plugins']['get'](it);_0x58e587&&(_0x58e587['on']('execute',(_0x20f717,[,_0x25793d])=>{_0x25793d['collaboration_features']={'comments':!0x0,'user_id':_0x4caf3c['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x58e587,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0xe169aa,_0x3e7d8f){const {comment_threads:_0x58db26}=_0x3e7d8f;_0x58db26&&_0x58db26['forEach'](({thread_id:_0x591541,comments:_0x2b0e24,is_resolved:_0x122497})=>{const _0x57c6b7=new Date(),_0xd71b80=_0x2b0e24['map'](({author:_0x970922,content:_0x3c4cb4,created_at:_0x4dd203})=>({'content':_0x3c4cb4,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x57c6b7,'attributes':{'@external':{'authorName':_0x970922,'createdAt':_0x4dd203?new Date(_0x4dd203):new Date(),'source':'importWord'}}})),_0x4b566a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4b566a,'threadId':_0x591541,'comments':_0xd71b80,'resolvedAt':_0x122497?_0x57c6b7:null});});}}class at extends _0x3732d9{constructor(_0x3e3f36){super(_0x3e3f36),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x414939=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x414939,'contentInsertion',(_0x17540c,_0x4599cd)=>this['_removeMarkersWithoutThreads'](_0x4599cd['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2b0386){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2b0386;const _0x9bc9f0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x6ec00a of _0x2b0386['keys']()){const [_0x3a15a7,_0x118930]=_0x6ec00a['split'](':');'comment'!=_0x3a15a7||_0x9bc9f0['hasCommentThread'](_0x118930)||_0x2b0386['delete'](_0x6ec00a);}return _0x2b0386;}['_registerMarkerInClipboardPipeline'](){const _0x18ebb9=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x51f4f6=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x51f4f6&&_0x18ebb9['_registerMarkerToCopy']('comment',_0x51f4f6);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x590400){switch(_0x590400){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x9e2f87){const _0x123916=_0x9e2f87['split'](':');return{'group':_0x123916[0x0],'id':_0x123916[0x1],'part':_0x123916[0x2]};}class ut extends _0x3732d9{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x26c40e,_0x5e8693)=>{if(!_0x5e8693['options']['showCommentHighlights'])return null;if(_0x5e8693['options']['ignoreResolvedComments']){const {id:_0x41e9bf}=ft(_0x26c40e['markerName']),_0x2226f2=this['editor']['plugins']['get'](o);if(_0x2226f2['getCommentThread'](_0x41e9bf)?.['isResolved']&&_0x26c40e['item'])return _0x5e8693['consumable']['consume'](_0x26c40e['item'],'addMarker:'+_0x26c40e['markerName']),_0x5e8693['consumable']['consume'](_0x26c40e['item'],'removeMarker:'+_0x26c40e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x43bd51=>{_0x43bd51['on']('addMarker:comment',(_0x24e32d,_0x443a4f,_0x5b5428)=>{if(!_0x5b5428['options']['showCommentHighlights'])return;const _0x10740d=_0x443a4f['item'];if(!_0x10740d)return;const _0x1f9a7b=_0x5b5428['mapper']['toViewElement'](_0x10740d);this['editor']['model']['schema']['isObject'](_0x10740d)&&_0x1f9a7b&&!_0x1f9a7b['getCustomProperty']('widget')&&_0x1f9a7b['is']('containerElement')&&_0x46b3bf(_0x1f9a7b,_0x5b5428['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x325985,{writer:_0x5b7c5c,options:_0xaab2db})=>{if(!_0xaab2db['showCommentHighlights'])return null;const _0x399772=_0x5b7c5c['createContainerElement']('div'),_0x47c2e2=_0x5b7c5c['createEmptyElement']('hr');return _0x5b7c5c['addClass']('ck-horizontal-line',_0x399772),_0x5b7c5c['insert'](_0x5b7c5c['createPositionAt'](_0x399772,0x0),_0x47c2e2),_0x399772;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2e8ac4,{writer:_0x259be1,options:_0x590024})=>{if(!_0x590024['showCommentHighlights'])return null;const _0x3e0dad=_0x259be1['createContainerElement']('span'),_0x149881=_0x259be1['createEmptyElement']('img');return _0x259be1['addClass']('image-inline',_0x3e0dad),_0x259be1['insert'](_0x259be1['createPositionAt'](_0x3e0dad,0x0),_0x149881),_0x3e0dad;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xf5e417,{writer:_0x597adb,options:_0x47a470})=>{if(_0x47a470['showCommentHighlights'])return _0x597adb['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x58358e,_0x1a89bc,_0x2f42fd)=>{_0x2f42fd['options']['showCommentHighlights']&&_0x58358e['stop']();},{'priority':'high'});}}class r extends _0x3732d9{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(_0xdb192){super(_0xdb192),this['set']('isThreadsLoadingPaused',!0x0),_0xdb192['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1dd8cd,_0x17c8ec,_0x9520e2,_0x220696)=>{const _0x1f83be=_0xdb192['plugins']['get'](o),_0x11781a=_0x9520e2?ft(_0x9520e2)['id']:null;_0xdb192['model']['change'](()=>{if(_0x11781a){const _0x50cd0c=this['getAllMarkersForId'](_0x11781a);for(const _0x3cebff of _0x50cd0c)_0xdb192['editing']['reconvertMarker'](_0x3cebff);}if(_0x220696){const {id:_0x98931b}=ft(_0x220696),_0x587aab=_0x1f83be['getCommentThread'](_0x98931b);if(_0x587aab&&_0x587aab['unlinkedAt'])return;if(_0x587aab&&!_0x587aab['isAttached'])return;const _0x420519=this['getAllMarkersForId'](_0x98931b);for(const _0x26f1ed of _0x420519)_0xdb192['editing']['reconvertMarker'](_0x26f1ed);}}),_0x11781a&&this['scrollToThreadMarker'](_0x11781a);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x199682=this['editor'],_0x154ec6=_0x199682['plugins']['get'](o),_0xab42bb=_0x199682['config']['get']('collaboration.channelId'),_0x10f21b=_0x154ec6['getCommentThreads']()['filter'](_0x541877=>_0x541877['channelId']!==_0xab42bb);_0x199682['commands']['add']('addCommentThread',new ot(_0x199682)),this['listenTo'](_0x199682,'change:isReadOnly',(_0x4e294b,_0x239aad,_0x388e4f)=>{_0x154ec6['switchReadOnly'](_0x388e4f,_0x199682['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x154ec6,dt('addCommentThread',_0xab42bb),(_0x1e88c8,{threadId:_0xe2efde})=>{const _0x297657=this['editor']['plugins']['get'](o)['getCommentThread'](_0xe2efde);_0x297657?.['unlinkedAt']&&this['_attachArchivedThread'](_0xe2efde);}),this['listenTo'](_0x154ec6,dt('removeCommentThread',_0xab42bb),(_0xc85ecc,{threadId:_0x4bf05b})=>{_0x199682['model']['enqueueChange']({'isUndoable':!0x1},_0x47b572=>{const _0x1e723e=this['getAllMarkersForId'](_0x4bf05b);for(const _0x48d1ed of _0x1e723e)_0x47b572['removeMarker'](_0x48d1ed);});}),this['listenTo'](_0x154ec6,dt('resolveCommentThread',_0xab42bb),(_0x5aea2d,{threadId:_0x13d8a2})=>{(this['_reconvertMarkers'](_0x13d8a2),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x13d8a2)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x154ec6,dt('reopenCommentThread',_0xab42bb),(_0x297e97,{threadId:_0x1636c3})=>{this['_reconvertMarkers'](_0x1636c3);},{'priority':'low'}),this['listenTo'](_0x154ec6,dt('addComment',_0xab42bb),(_0x540daf,{threadId:_0x2b9671,isFromAdapter:_0x5c54b1})=>{const _0x5c5257=this['getAllMarkersForId'](_0x2b9671);if(_0x5c54b1||0x0==_0x5c5257['length']||!_0x154ec6['hasCommentThread'](_0x2b9671))return;0x1===_0x154ec6['getCommentThread'](_0x2b9671)['length']&&_0x199682['model']['enqueueChange']({'isUndoable':!0x1},_0x1cac3e=>{for(const _0x3eda8e of _0x5c5257)_0x1cac3e['updateMarker'](_0x3eda8e,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x10f21b);}['afterInit'](){!async function(_0x363ae0){const _0x1f7ce9=_0x2dd28b([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]),_0x3e028e=0x73460ab3,_0x1632c8=0x734170d3^_0x3e028e,_0x2dca6f=window[_0x2dd28b([0x44,0x61,0x74,0x65])][_0x2dd28b([0x6e,0x6f,0x77])](),_0x4c4828=_0x363ae0[_0x2dd28b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2cdf93=new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10de62=>{_0x4c4828[_0x2dd28b([0x6f,0x6e,0x63,0x65])](_0x2dd28b([0x72,0x65,0x61,0x64,0x79]),_0x10de62);}),_0x3be36d={[_0x2dd28b([0x6b,0x74,0x79])]:_0x2dd28b([0x45,0x43]),[_0x2dd28b([0x75,0x73,0x65])]:_0x2dd28b([0x73,0x69,0x67]),[_0x2dd28b([0x63,0x72,0x76])]:_0x2dd28b([0x50,0x2d,0x32,0x35,0x36]),[_0x2dd28b([0x78])]:_0x2dd28b([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]),[_0x2dd28b([0x79])]:_0x2dd28b([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]),[_0x2dd28b([0x61,0x6c,0x67])]:_0x2dd28b([0x45,0x53,0x32,0x35,0x36])},_0x5506c0=_0x4c4828[_0x2dd28b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2dd28b([0x67,0x65,0x74])](_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x18ac9a(){let _0x296438,_0x566c58=null,_0x295882=null;try{if(_0x5506c0==_0x2dd28b([0x47,0x50,0x4c]))return _0x2dd28b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x296438=_0x21c29b(),!_0x296438)return _0x2dd28b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x296438[_0x2dd28b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x295882=_0x35ea6a(_0x296438[_0x2dd28b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x296438[_0x2dd28b([0x6a,0x74,0x69])])),await _0x206fa7()?_0x525d68()?_0x438372()?_0x2dd28b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5ce111()?(_0x296438[_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dd28b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x566c58=_0xa15a63(_0x2dd28b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x296438[_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dd28b([0x74,0x72,0x69,0x61,0x6c])&&(_0x566c58=_0xa15a63(_0x2dd28b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x30d58d()):_0x2dd28b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2dd28b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2dd28b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2dd28b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x438372(){const _0x4c283f=[_0x2dd28b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2dd28b([0x74,0x72,0x69,0x61,0x6c])][_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x296438[_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2dca6f/0x3e8:0xe10*_0x1632c8;return _0x296438[_0x2dd28b([0x65,0x78,0x70])]<_0x4c283f;}function _0x525d68(){const _0x31cc87=_0x296438[_0x2dd28b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x31cc87)return!0x1;if(_0x31cc87[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x2a])))return!0x0;if(_0x31cc87[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x43,0x4d,0x54])))return!0x0;if(_0x31cc87[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x5e416d())return!0x0;if(_0x31cc87[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x52,0x43,0x4d,0x54]))){if(_0x1c731e())return!0x0;if(_0xd21f67()||_0x30837a())return!0x0;}return!0x1;}function _0x5ce111(){const _0x3a1c0a=_0x296438[_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a1c0a||0x0==_0x3a1c0a[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5dd372}=new URL(window[_0x2dd28b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3a1c0a[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5dd372))return!0x0;const _0x3ff293=_0x5dd372[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])](_0x2dd28b([0x2e]));return _0x3a1c0a[_0x2dd28b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x373078=>_0x373078[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x2a])))[_0x2dd28b([0x6d,0x61,0x70])](_0x147787=>_0x147787[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])](_0x2dd28b([0x2e])))[_0x2dd28b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x47dbb6=>_0x47dbb6[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3ff293[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2dd28b([0x6d,0x61,0x70])](_0x17fe3c=>Array(_0x3ff293[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x17fe3c[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2dd28b([0x66,0x69,0x6c,0x6c])](_0x17fe3c[0x0]===_0x2dd28b([0x2a])?_0x2dd28b([0x2a]):'')[_0x2dd28b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x17fe3c))[_0x2dd28b([0x73,0x6f,0x6d,0x65])](_0x31e0cd=>_0x3ff293[_0x2dd28b([0x65,0x76,0x65,0x72,0x79])]((_0x40001c,_0x5067fc)=>_0x31e0cd[_0x5067fc]===_0x40001c||_0x31e0cd[_0x5067fc]===_0x2dd28b([0x2a])));}function _0x30d58d(){return _0x566c58&&_0x295882?new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5b042e,_0x425a28)=>{_0x566c58[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0x5b042e,_0x425a28),_0x295882[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0xfbf95a=>{_0xfbf95a!=_0x2dd28b([0x56,0x61,0x6c,0x69,0x64])&&_0x5b042e(_0xfbf95a);},_0x425a28);}):_0x566c58||_0x295882||_0x2dd28b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x35ea6a(_0x17d8d8,_0x57e8e7){return new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb857a=>{if(_0x2b994a())return _0xb857a(_0x2dd28b([0x56,0x61,0x6c,0x69,0x64]));_0x4cdaf7(),_0x4c4828[_0x2dd28b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2dd28b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x23b672=!0x1;const _0x483b0d=_0x1684c5();function _0x202dc7(_0xb6dbb5){return!!_0xb6dbb5&&(typeof _0xb6dbb5===_0x2dd28b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xb6dbb5===_0x2dd28b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xb6dbb5[_0x2dd28b([0x74,0x68,0x65,0x6e])]===_0x2dd28b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xb6dbb5[_0x2dd28b([0x63,0x61,0x74,0x63,0x68])]===_0x2dd28b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x347495(_0x44a5a0){_0x269c3c(_0x44a5a0)[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0x588776=>{if(!_0x588776||_0x588776[_0x2dd28b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2dd28b([0x6f,0x6b]))return _0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4671b1(_0x2de16f(_0x483b0d+_0x57e8e7))!=_0x588776[_0x2dd28b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2dd28b([0x56,0x61,0x6c,0x69,0x64]);})[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0x7e8926=>(_0x367690(),_0x7e8926),()=>{const _0x56bfec=_0x2e9a94();return null==_0x56bfec?(_0x367690(),_0x2dd28b([0x56,0x61,0x6c,0x69,0x64])):_0x2dd28b(_0x2dca6f-_0x56bfec>(0x574a8eb3^_0x3e028e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0xb857a)[_0x2dd28b([0x63,0x61,0x74,0x63,0x68])](()=>{_0xb857a(_0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xbacc69=0x7370e433^_0x3e028e;function _0x367690(){const _0x35b6a5=_0x2dd28b([0x6c,0x6c,0x63,0x74,0x2d])+_0x4671b1(_0x2de16f(_0x17d8d8)),_0x4715e8=_0x349ab7(_0x4671b1(window[_0x2dd28b([0x4d,0x61,0x74,0x68])][_0x2dd28b([0x63,0x65,0x69,0x6c])](_0x2dca6f/_0xbacc69)));window[_0x2dd28b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dd28b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35b6a5,_0x4715e8);}function _0x2e9a94(){const _0x2e4d46=_0x2dd28b([0x6c,0x6c,0x63,0x74,0x2d])+_0x4671b1(_0x2de16f(_0x17d8d8)),_0x1bf631=window[_0x2dd28b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dd28b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2e4d46);return _0x1bf631?window[_0x2dd28b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x349ab7(_0x1bf631),0x10)*_0xbacc69:null;}function _0x269c3c(_0x183a21){return new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x42d2c4,_0x11549f)=>{_0x183a21[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0x42d2c4,_0x11549f),window[_0x2dd28b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x11549f,0x7347de73^_0x3e028e);});}}_0x4c4828[_0x2dd28b([0x6f,0x6e])](_0x2dd28b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x34a67f,_0x1c7693)=>{if(_0x1c7693[0x0]!=_0x17d8d8)return _0xb857a(_0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1c7693[0x1]={..._0x1c7693[0x1],[_0x2dd28b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x483b0d};},{[_0x2dd28b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dd28b([0x68,0x69,0x67,0x68])}),_0x4c4828[_0x2dd28b([0x6f,0x6e])](_0x2dd28b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58a4c3=>{_0x202dc7(_0x58a4c3[_0x2dd28b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x23b672=!0x0,_0x347495(_0x58a4c3[_0x2dd28b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2dd28b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dd28b([0x6c,0x6f,0x77])}),_0x2cdf93[_0x2dd28b([0x74,0x68,0x65,0x6e])](()=>{_0x23b672||_0xb857a(_0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2b994a(){return _0x4c4828[_0x2dd28b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dd28b([0x76,0x69,0x65,0x77])][_0x2dd28b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2dd28b([0x61,0x75,0x74,0x6f]);}function _0x4cdaf7(){_0x4c4828[_0x2dd28b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dd28b([0x76,0x69,0x65,0x77])][_0x2dd28b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2dd28b([0x61,0x75,0x74,0x6f]);}}function _0xa15a63(_0xb5366){const _0x556348=[new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d79c0=>setTimeout(_0x4d79c0,0x734f347f^_0x3e028e)),_0x2cdf93[_0x2dd28b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f6756=>{let _0x2a1ba5=0x0;_0x4c4828[_0x2dd28b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dd28b([0x6f,0x6e])](_0x2dd28b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4788df,_0x30558e)=>{_0x30558e[0x0][_0x2dd28b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2a1ba5++,_0x2a1ba5==(0x73460b4b^_0x3e028e)&&(_0x2f6756(),_0x4788df[_0x2dd28b([0x6f,0x66,0x66])]());});}))];return window[_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2dd28b([0x72,0x61,0x63,0x65])](_0x556348)[_0x2dd28b([0x74,0x68,0x65,0x6e])](()=>_0xb5366);}async function _0x3472b5(){await _0x2cdf93,_0x4c4828[_0x2dd28b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dd28b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2e2fec,_0x4c4828[_0x2dd28b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dd28b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2e2fec,_0x4c4828[_0x2dd28b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2dd28b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5e416d(){return window[_0x2dd28b([0x67,0x6c,0x6f,0x62])]&&window[_0x2dd28b([0x67,0x6c,0x6f,0x62])][_0x2dd28b([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1c731e(){return _0x2ec815(_0x2dd28b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x124407(_0x2dd28b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2dd28b([0x73,0x74,0x61,0x74,0x65])]==_0x2dd28b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xd21f67(){return _0x2ec815(_0x2dd28b([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 _0x30837a(){return _0x2ec815(_0x2dd28b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x25da3c(_0x43e74e){const _0xc0ad9d=_0x30daef();_0x4c4828[_0xc0ad9d]=_0x2dd28b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x43e74e,_0x43e74e!=_0x2dd28b([0x56,0x61,0x6c,0x69,0x64])&&_0x3472b5();}function _0x30daef(){const _0x49c091=window[_0x2dd28b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2dd28b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2dd28b([0x6e,0x6f,0x77])]())[_0x2dd28b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2dd28b([0x2e]),'');let _0x5615ea=_0x2dd28b([0x4b]);for(let _0xbb91e7=0x0;_0xbb91e7<_0x49c091[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xbb91e7+=0x2){let _0x5d5bd2=window[_0x2dd28b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x49c091[_0x2dd28b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xbb91e7,_0xbb91e7+0x2));_0x5d5bd2>=_0x1f7ce9[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5d5bd2-=_0x1f7ce9[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5615ea+=_0x1f7ce9[_0x5d5bd2];}return _0x5615ea;}function _0x21c29b(){const _0x27d967=_0x5506c0[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])](_0x2dd28b([0x2e]));if(0x3!=_0x27d967[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x68f0c1(_0x27d967[0x1]);function _0x68f0c1(_0x4a28de){const _0x4bb004=_0x22c2b5(_0x4a28de);return _0x4bb004&&_0x2b35b4()?_0x4bb004:null;function _0x2b35b4(){const _0x46f7b1=_0x4bb004[_0x2dd28b([0x6a,0x74,0x69])],_0x15c9d2=window[_0x2dd28b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x46f7b1[_0x2dd28b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x46f7b1[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x400379={..._0x4bb004,[_0x2dd28b([0x6a,0x74,0x69])]:_0x46f7b1[_0x2dd28b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x46f7b1[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x400379[_0x2dd28b([0x76,0x63])],_0x2de16f(_0x400379)==_0x15c9d2;}}}async function _0x206fa7(){let _0x2d561f=!0x0;try{const _0x1e32da=_0x5506c0[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])](_0x2dd28b([0x2e])),[_0x13c6ff,_0x5b9664,_0x550bb3]=_0x1e32da;return _0x1f2e0e(_0x13c6ff),await _0x1c29f0(_0x13c6ff,_0x5b9664,_0x550bb3),_0x2d561f;}catch{return!0x1;}function _0x1f2e0e(_0x272888){const _0x1d1047=_0x22c2b5(_0x272888);_0x1d1047&&_0x1d1047[_0x2dd28b([0x61,0x6c,0x67])]==_0x2dd28b([0x45,0x53,0x32,0x35,0x36])||(_0x2d561f=!0x1);}async function _0x1c29f0(_0x54ceb5,_0x3b7483,_0x3446b0){const _0x3ec528=window[_0x2dd28b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2dd28b([0x66,0x72,0x6f,0x6d])](_0x5e9424(_0x3446b0),_0x584c59=>_0x584c59[_0x2dd28b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x9b0251=new window[(_0x2dd28b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2dd28b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x54ceb5+_0x2dd28b([0x2e])+_0x3b7483),_0x37599b=window[_0x2dd28b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2dd28b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x37599b)return;const _0x29b32f=await _0x37599b[_0x2dd28b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2dd28b([0x6a,0x77,0x6b]),_0x3be36d,{[_0x2dd28b([0x6e,0x61,0x6d,0x65])]:_0x2dd28b([0x45,0x43,0x44,0x53,0x41]),[_0x2dd28b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2dd28b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2dd28b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x37599b[_0x2dd28b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2dd28b([0x6e,0x61,0x6d,0x65])]:_0x2dd28b([0x45,0x43,0x44,0x53,0x41]),[_0x2dd28b([0x68,0x61,0x73,0x68])]:{[_0x2dd28b([0x6e,0x61,0x6d,0x65])]:_0x2dd28b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x29b32f,_0x3ec528,_0x9b0251)||(_0x2d561f=!0x1);}}function _0x22c2b5(_0x5aa52f){return _0x5aa52f[_0x2dd28b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2dd28b([0x65,0x79]))?JSON[_0x2dd28b([0x70,0x61,0x72,0x73,0x65])](_0x5e9424(_0x5aa52f)):null;}function _0x5e9424(_0x59a0f4){return window[_0x2dd28b([0x61,0x74,0x6f,0x62])](_0x59a0f4[_0x2dd28b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2dd28b([0x2b]))[_0x2dd28b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2dd28b([0x2f])));}function _0x2de16f(_0x186885){let _0x8dba=0x1505;function _0x52ea8(_0x1e472e){for(let _0xd6a47c=0x0;_0xd6a47c<_0x1e472e[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd6a47c++){const _0x1a7e69=_0x1e472e[_0x2dd28b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xd6a47c);_0x8dba=(_0x8dba<<0x5)+_0x8dba+_0x1a7e69,_0x8dba&=_0x8dba;}}function _0x1623b1(_0x572344){Array[_0x2dd28b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x572344)?_0x572344[_0x2dd28b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1623b1):_0x572344&&typeof _0x572344==_0x2dd28b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2dd28b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x572344)[_0x2dd28b([0x73,0x6f,0x72,0x74])]()[_0x2dd28b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x208cfa,_0x5ccb7c])=>{_0x52ea8(_0x208cfa),_0x1623b1(_0x5ccb7c);}):_0x52ea8(window[_0x2dd28b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x572344));}return _0x1623b1(_0x186885),_0x8dba>>>0x0;}function _0x4671b1(_0x5464aa){return _0x5464aa[_0x2dd28b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2dd28b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2dd28b([0x30]));}function _0x349ab7(_0x30cb6e){return _0x30cb6e[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2dd28b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2dd28b([0x6a,0x6f,0x69,0x6e])]('');}function _0x2ec815(_0x1d3845){return _0x4c4828[_0x2dd28b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2dd28b([0x68,0x61,0x73])](_0x1d3845);}function _0x124407(_0x23fe39){return _0x4c4828[_0x2dd28b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2dd28b([0x67,0x65,0x74])](_0x23fe39);}function _0x2e2fec(){}function _0x2dd28b(_0x3b031f){return _0x3b031f['map'](_0x543abc=>String['fromCharCode'](_0x543abc))['join']('');}_0x25da3c(await _0x18ac9a());}(this);}['destroy'](){const _0x3f9a02=this['editor']['plugins']['get'](o),_0x40db8d=this['editor']['config']['get']('collaboration.channelId');for(const _0x56689a of _0x3f9a02['getCommentThreads']({'channelId':_0x40db8d}))_0x3f9a02['_detachCommentThread'](_0x56689a['id']),_0x3f9a02['_threads']['delete'](_0x56689a['id']);super['destroy']();}['hasMarkerForId'](_0xfbdba3){return this['getAllMarkersForId'](_0xfbdba3)['length']>0x0;}['getAllMarkersForId'](_0x314f0c){const _0x304ab0=[];for(const _0x12cb22 of this['editor']['model']['markers'])_0x12cb22['name']['startsWith']('comment:'+_0x314f0c)&&_0x304ab0['push'](_0x12cb22);return _0x304ab0;}['scrollToThreadMarker'](_0x5492b1){setTimeout(()=>{const _0x387dab=this['_getTargetForId'](_0x5492b1);if(!_0x387dab)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5492b1&&nt({'target':_0x387dab[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2cac90){this['editor']['model']['change'](()=>{for(const _0x50229f of this['getAllMarkersForId'](_0x2cac90))this['editor']['editing']['reconvertMarker'](_0x50229f);});}['_attachArchivedThread'](_0x4e8741){const _0x269276=this['editor']['plugins']['get'](o),_0x480f69=this['editor']['plugins']['get'](b),_0x10b0ef=_0x269276['getCommentThread'](_0x4e8741);if(!_0x10b0ef['isAttached']){const _0x2a8e05=_0x10b0ef['attachTo'](()=>this['_getTargetForId'](_0x10b0ef['id']));_0x480f69['registerAnnotation'](_0x2a8e05),_0x10b0ef['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x287250=this['editor'],_0x348e59=_0x287250['plugins']['get'](it);_0x287250['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3461e4,_0xedeb3a)=>{const {id:_0x5ebd16}=ft(_0x3461e4['markerName']),_0x5d4210=_0x287250['plugins']['get'](o)['getCommentThread'](_0x5ebd16),_0x282a1a=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5ebd16;let _0x2985ed;if(_0x5d4210&&_0x5d4210['isResolved']&&!_0x282a1a&&_0x3461e4['item'])return _0xedeb3a['consumable']['consume'](_0x3461e4['item'],'addMarker:'+_0x3461e4['markerName']),_0xedeb3a['consumable']['consume'](_0x3461e4['item'],'removeMarker:'+_0x3461e4['markerName']),null;const _0x54fea1=['ck-comment-marker'];return _0x282a1a&&_0x54fea1['push']('ck-comment-marker--active'),_0x2985ed=_0x5d4210?.['length']?_0x5d4210['comments']['first']['author']['id']:_0x348e59['me']['id'],{'classes':_0x54fea1,'attributes':{'data-comment':_0x5ebd16,'data-author-id':_0x2985ed}};}}),_0x287250['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x682cf9,{options:_0x33f253})=>{if(_0x33f253['showCommentHighlights'])return null;const _0x246075=_0x287250['plugins']['get'](o),_0x5a14a9=_0x287250['model']['markers']['get'](_0x682cf9),{id:_0x3c187a,part:_0x19c428}=ft(_0x682cf9);return _0x5a14a9&&!_0x5a14a9['affectsData']||_0x33f253['ignoreResolvedComments']&&_0x246075['getCommentThread'](_0x3c187a)?.['isResolved']?null:{'group':'comment','name':_0x19c428?_0x3c187a+':'+_0x19c428:_0x3c187a};}}),_0x287250['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2aa2ed,{writer:_0x4621e5})=>_0x4621e5['createElement']('$marker',{'data-name':'comment:'+_0x2aa2ed['getAttribute']('id')})}),_0x287250['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x320193=this['editor'],_0x3333eb=_0x320193['plugins']['get'](o),_0x481ee1=new Set(),_0x4bc1a5=new Set();_0x320193['model']['document']['registerPostFixer'](_0xbf72b7=>{let _0x47e8e2=!0x1;for(const {name:_0x1ae8c4,data:_0x47092d}of _0x320193['model']['document']['differ']['getChangedMarkers']()){const {group:_0x43415f,id:_0x46471}=ft(_0x1ae8c4);let _0x38f80d=_0x47092d['newRange'];if('comment'!==_0x43415f||!_0x38f80d)continue;const _0x495565='$graveyard'===_0x38f80d['root']['rootName'];_0x495565||(_0x38f80d=ht(_0x38f80d,_0x320193['model']),!_0x38f80d||_0x38f80d['isCollapsed']||!_0x47092d['newRange']||_0x38f80d['isEqual'](_0x47092d['newRange']))?_0x320193['model']['hasContent'](_0x38f80d)&&!_0x495565?this['isThreadsLoadingPaused']?_0x481ee1['add'](_0x1ae8c4):this['_handleThreadMarker'](_0x1ae8c4,_0x46471):(_0x4bc1a5['add'](_0x1ae8c4),_0x481ee1['delete'](_0x1ae8c4),_0xbf72b7['removeMarker'](_0x1ae8c4),_0x47e8e2=!0x0):(_0xbf72b7['updateMarker'](_0x1ae8c4,{'range':_0x38f80d}),_0x47e8e2=!0x0);}return _0x47e8e2;}),this['on']('change:isThreadsLoadingPaused',(_0x55a96f,_0xf0e647,_0x22eba9)=>{if(!_0x22eba9&&_0x481ee1['size'])for(const _0x5b8d39 of _0x481ee1){const {id:_0x1deb14}=ft(_0x5b8d39);_0x481ee1['delete'](_0x5b8d39),_0x320193['model']['markers']['get'](_0x5b8d39)&&this['_handleThreadMarker'](_0x5b8d39,_0x1deb14);}}),this['listenTo'](_0x320193['model']['document'],'change',()=>{for(const {name:_0x1f0338,data:{newRange:_0x2490c5}}of _0x320193['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3188ff,id:_0x2391a6}=ft(_0x1f0338);if('comment'!==_0x3188ff)continue;const _0x37bb44=_0x3333eb['getCommentThread'](_0x2391a6),_0x4d32a7=this['hasMarkerForId'](_0x2391a6);_0x37bb44&&(!_0x37bb44['_hasTargetInContent']&&_0x2490c5&&_0x320193['editing']['view']['once']('render',()=>{const _0x402ec6=_0x320193['plugins']['get'](y),_0x309ffb=_0x3333eb['_threadToController']['get'](_0x37bb44)['view'];_0x402ec6['getByInnerView'](_0x309ffb)['refreshVisibility']();},{'priority':'low'}),_0x37bb44['_hasTargetInContent']=_0x4d32a7||!!_0x2490c5),_0x2490c5||(_0x4bc1a5['add'](_0x1f0338),_0x481ee1['delete'](_0x1f0338));}for(const _0x9c9af8 of _0x4bc1a5){const {id:_0x3f297a}=ft(_0x9c9af8),_0x41b065=_0x3333eb['getCommentThread'](_0x3f297a);if(_0x481ee1['delete'](_0x9c9af8),!_0x41b065)continue;const _0x487af7=this['hasMarkerForId'](_0x3f297a);_0x487af7||_0x41b065['isSubmitted']?_0x487af7||_0x41b065['unlinkedAt']||_0x41b065['setUnlinkedAt'](new Date()):_0x41b065['remove']();}_0x4bc1a5['clear']();});}['_handleInitialThreads'](_0x28fd6f){_0x28fd6f['forEach'](_0x3625a9=>{_0x3625a9['unlinkedAt']&&this['_attachArchivedThread'](_0x3625a9['id']);});}['_getTargetForId'](_0x2d27e3){const _0x1a6b1a=this['editor'],_0x75b36d=this['getAllMarkersForId'](_0x2d27e3);return et(_0x1a6b1a['editing'],_0x75b36d);}['_getTextContext'](_0x4ec770){const _0x11db6e=this['getAllMarkersForId'](_0x4ec770);let _0x4229a5='',_0x6e9c20=!0x1;for(const _0x411c60 of _0x11db6e){const _0x5d8ab1=_0x411c60['getRange']();for(const _0x16804c of Array['from'](_0x5d8ab1['getItems']()))_0x16804c['is']('$textProxy')?(_0x4229a5&&_0x6e9c20&&(_0x4229a5+='\x20',_0x6e9c20=!0x1),_0x4229a5+=_0x16804c['data']):_0x6e9c20=!0x0;_0x6e9c20=!0x0;}return _0x4229a5['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x46e61f,_0x17e567){const _0x4f9715=this['editor'],_0x4a80e9=_0x4f9715['plugins']['get'](o);let _0x2c4928=_0x4a80e9['getCommentThread'](_0x17e567);const _0xbe414d=_0x4f9715['config']['get']('collaboration.channelId'),_0x46b9b7=_0x4f9715['plugins']['get'](b);if(_0x2c4928&&(_0x2c4928['unlinkedAt']&&_0x2c4928['setUnlinkedAt'](null),_0x2c4928['isAttached']))return _0x2c4928;return!this['getAllMarkersForId'](_0x17e567)[0x0]['managedUsingOperations']?_0x4f9715['editing']['view']['once']('render',()=>{if(_0x4a80e9['getCommentThread'](_0x17e567))return;const _0x3176d1=_0x4f9715['plugins']['get'](y);_0x2c4928=_0x4a80e9['openNewCommentThread']({'channelId':_0xbe414d,'threadId':_0x17e567,'target':()=>this['_getTargetForId'](_0x17e567),'context':{'type':'text','value':this['_getTextContext'](_0x17e567)}});const _0x3e8e72=_0x4a80e9['_threadToController']['get'](_0x2c4928)['view'],_0x8c4868=_0x3176d1['getByInnerView'](_0x3e8e72);_0x8c4868&&_0x46b9b7['registerAnnotation'](_0x8c4868);},{'priority':'low'}):_0x4a80e9['fetchCommentThread']({'channelId':_0xbe414d,'threadId':_0x17e567})['then'](_0x4a528a=>{if('destroyed'!==_0x4f9715['state']){if(_0x2c4928=_0x4a528a,_0x2c4928&&!_0x2c4928['isAttached']){const _0x22516a=_0x2c4928['attachTo'](()=>this['_getTargetForId'](_0x17e567));_0x46b9b7['registerAnnotation'](_0x22516a),_0x2c4928['isResolved']&&this['_reconvertMarkers'](_0x17e567);}else{if(!_0x2c4928){const _0x2e4f66=this['getAllMarkersForId'](_0x17e567);_0x4f9715['model']['change'](_0x141f3d=>{for(const _0x4b0565 of _0x2e4f66)_0x141f3d['removeMarker'](_0x4b0565);});}}}}),_0x2c4928;}['_handleThreadMarker'](_0x433b82,_0x3045e3){const _0x5f158a=this['_attachMarkerToThread'](_0x433b82,_0x3045e3);_0x5f158a&&!_0x5f158a['context']&&_0x5f158a['setContext']({'type':'text','value':this['_getTextContext'](_0x3045e3)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5cd4d4=this['editor'];rt(_0x5cd4d4['model'],({left:_0x139fe3,entered:_0x24cbe7})=>{for(const _0x230388 of _0x139fe3)if(mt(_0x230388)){_0x5cd4d4['ui']['ariaLiveAnnouncer']['announce'](N(_0x5cd4d4['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x33e2ac of _0x24cbe7)if(mt(_0x33e2ac)){_0x5cd4d4['ui']['ariaLiveAnnouncer']['announce'](N(_0x5cd4d4['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x333141)));break;}});}}function dt(_0x155075,_0x1bcc1a){return _0x1bcc1a?_0x155075+':'+_0x1bcc1a:_0x155075;}function ht(_0x34c578,_0x185632){const _0xa1c423=_0x185632['schema'],_0x333c35=_0x185632['createRange'](_0x34c578['start']);for(const _0x591994 of _0x34c578['getWalker']()){const {type:_0x54bf38,item:_0x59d5ff,nextPosition:_0x47d9c2}=_0x591994;if('text'===_0x54bf38||_0xa1c423['isObject'](_0x59d5ff)){const _0x14cb7c=_0x185632['createPositionBefore'](_0x59d5ff);_0x333c35['isCollapsed']&&(_0x333c35['start']=_0x14cb7c),_0x333c35['end']=_0x47d9c2;}}return _0x333c35;}function mt(_0x45dd05){return'comment'===ft(_0x45dd05['name'])['group'];}class s extends _0x3732d9{['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 _0x19d357=this['editor'],_0x4c58cb=_0x19d357['plugins']['get'](o),_0x356c9e=_0x19d357['plugins']['get'](r),_0x24bf37=_0x19d357['plugins']['get'](y),_0x47f87c=_0x19d357['plugins']['get'](b);_0x19d357['ui']['componentFactory']['add']('comment',()=>{const _0x15bff9=this['_createUIButton'](_0x222733);return _0x15bff9['tooltip']=!0x0,_0x15bff9;}),_0x19d357['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x59a680)),_0x47f87c['addSourceCollector'](()=>{const _0x181765=[];for(const [_0x185779,_0x293ce3]of _0x4c58cb['_threadToController']){const _0xe003f4=_0x356c9e['getAllMarkersForId'](_0x185779['id']),_0x177f57=_0xe003f4['map'](_0x2bc304=>_0x2bc304['getRange']());_0xe003f4['length']>0x0&&_0x181765['push']([_0x293ce3['view'],_0x177f57]);}return _0x181765;}),this['listenTo'](_0x24bf37,'change:activeAnnotations',(_0x3a0582,_0x3e8dce,_0x1d6d98)=>{const _0x169dcd=Array['from'](_0x1d6d98)['map'](_0x5ca93f=>_0x5ca93f['innerView'])['find'](_0xac4f00=>_0x4c58cb['_viewToController']['has'](_0xac4f00));if(!_0x169dcd)return void(_0x356c9e['activeMarker']=null);const _0x237a7c=_0x4c58cb['_viewToController']['get'](_0x169dcd)['model']['id'],_0x463d6f='comment:'+_0x237a7c;_0x237a7c&&_0x356c9e['hasMarkerForId'](_0x237a7c)?_0x356c9e['activeMarker']=_0x463d6f:_0x356c9e['activeMarker']&&(_0x356c9e['activeMarker']=null);}),this['listenTo'](_0x4c58cb,'removeCommentThread',(_0x1fa112,{threadId:_0x4f951b,isFromAdapter:_0x3ec240})=>{!_0x3ec240&&_0x19d357['ui']['focusTracker']['isFocused']&&_0x356c9e['hasMarkerForId'](_0x4f951b)&&_0x19d357['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4c58cb,'addComment',(_0x586a41,{threadId:_0x4c3c02,isFromAdapter:_0x352042})=>{if(_0x352042||!_0x356c9e['hasMarkerForId'](_0x4c3c02)||!_0x4c58cb['hasCommentThread'](_0x4c3c02))return;0x1===_0x4c58cb['getCommentThread'](_0x4c3c02)['length']&&(_0x19d357['editing']['view']['focus'](),_0x586a41['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2c12d1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2dfe02;for(const _0x1d0077 in _0x2c12d1){const _0x104ef4=_0x1d0077,_0x3f605c=_0x2c12d1[_0x104ef4];if('commentsLicenseKeyValid'==_0x3f605c||'commentsLicenseKeyInvalid'==_0x3f605c||'commentsLicenseKeyExpired'==_0x3f605c||'commentsLicenseKeyDomainLimit'==_0x3f605c||'commentsLicenseKeyNotAllowed'==_0x3f605c||'commentsLicenseKeyEvaluationLimit'==_0x3f605c||'commentsLicenseKeyTrialLimit'==_0x3f605c||'commentsLicenseKeyUsageLimit'==_0x3f605c){delete _0x2c12d1[_0x104ef4],_0x2dfe02=_0x3f605c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x424f7f){const _0x5f3db6=this['editor'],_0x579021=new _0x424f7f(_0x5f3db6['locale']),_0x5be39b=_0x5f3db6['commands']['get']('addCommentThread');return _0x579021['set']({'label':N(_0x5f3db6['locale'],'Comment'),'icon':_0x10df15}),_0x579021['bind']('isEnabled')['to'](_0x5be39b,'isEnabled',_0x5be39b,'hasContent',(_0x409c77,_0x3f3057)=>_0x409c77&&_0x3f3057),this['listenTo'](_0x579021,'execute',()=>{_0x5be39b['execute']();}),_0x579021;}}class i extends _0x3732d9{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x9063f1){super(_0x9063f1),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x324aca,_0x26704b,_0x1a36ae)=>{_0x1a36ae?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5f5416,_0x32aa15]of this['editor']['commands'])_0x32aa15['affectsData']&&'addCommentThread'!==_0x5f5416&&_0x32aa15['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x305b42=this['editor']['editing']['view']['document'];this['listenTo'](_0x305b42,'cut',_0x49fa51=>_0x49fa51['stop'](),{'priority':'highest'}),this['listenTo'](_0x305b42,'clipboardInput',_0x1fa567=>_0x1fa567['stop'](),{'priority':'highest'}),this['listenTo'](_0x305b42,'delete',_0x3eaeac=>_0x3eaeac['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x229457,_0x4016e7]of this['editor']['commands'])_0x4016e7['affectsData']&&'addCommentThread'!==_0x229457&&_0x4016e7['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x35dfc2{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35f59b){super(_0x35f59b),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x14f506=this['context']['plugins']['get'](y);this['listenTo'](_0x14f506,'_activateAnnotation',(_0x45f1fc,_0x57c65d)=>{for(const _0x4cb4fd of this['activeUIs']){const _0x535573=this['_uis']['get'](_0x4cb4fd);(0x0,this['uisData']['get'](_0x4cb4fd)['filter'])(_0x57c65d)&&_0x535573['setActiveAnnotation'](_0x57c65d);}}),this['listenTo'](_0x14f506,'_deactivateAllAnnotations',()=>{for(const _0x4af139 of this['activeUIs']){this['_uis']['get'](_0x4af139)['setActiveAnnotation'](null);}}),this['listenTo'](_0x14f506['_visibleAnnotations'],'add',(_0x4f6d45,_0x4b53aa)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4b53aa);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x422b12){return this['activeUIs']['has'](_0x422b12);}['activate'](_0x616c65,_0x455aec=this['defaultFilter']){const _0x3a9e39=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x616c65))throw new _0x29e429('annotationsuis-missing-ui',this,{'uiName':_0x616c65});this['isActive'](_0x616c65)&&this['deactivate'](_0x616c65),this['activeUIs']['add'](_0x616c65);const _0x3bdc33=new S();v({'source':_0x3a9e39['_visibleAnnotations'],'target':_0x3bdc33,'filter':_0x455aec}),this['uisData']['set'](_0x616c65,{'collection':_0x3bdc33,'filter':_0x455aec});const _0x24b200=this['_uis']['get'](_0x616c65);_0x24b200['attach'](_0x3bdc33),this['listenTo'](_0x24b200,'change:activeAnnotation',(_0x24ba0b,_0x5cd1b9,_0x25ec7e,_0x489c8d)=>{_0x489c8d&&_0x3a9e39['_removeActiveAnnotation'](_0x489c8d),_0x25ec7e&&_0x3a9e39['_addActiveAnnotation'](_0x25ec7e);});}['deactivate'](_0x5b3ef3){if(this['activeUIs']['delete'](_0x5b3ef3),!this['_uis']['has'](_0x5b3ef3))throw new _0x29e429('annotationsuis-missing-ui',this,{'uiName':_0x5b3ef3});const _0x2d9cf9=this['_uis']['get'](_0x5b3ef3);_0x2d9cf9['detach'](),this['stopListening'](_0x2d9cf9),this['uisData']['get'](_0x5b3ef3)['collection']['destroy'](),this['uisData']['delete'](_0x5b3ef3);}['switchTo'](_0xb00135){if(!this['_uis']['has'](_0xb00135))throw new _0x29e429('annotationsuis-missing-ui',this,{'uiName':_0xb00135});const _0x33fa37=this['context']['plugins']['get'](y),_0x552023=Array['from'](_0x33fa37['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xb00135);const _0x3ab45e=this['_uis']['get'](_0xb00135);_0x3ab45e['setActiveAnnotation'](_0x552023),_0x3ab45e['_setSelectedAnnotations']&&_0x552023&&_0x3ab45e['_setSelectedAnnotations']([_0x552023]);}['deactivateAll'](){for(const _0x3ea0df of this['activeUIs'])this['deactivate'](_0x3ea0df);}['register'](_0x3985ec,_0x28aa54){if(this['_uis']['has'](_0x3985ec))throw new _0x29e429('annotationsuis-register-already-registered');if('function'!=typeof _0x28aa54['attach']||'function'!=typeof _0x28aa54['detach']||'function'!=typeof _0x28aa54['setActiveAnnotation'])throw new _0x29e429('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3985ec,_0x28aa54);}['refilterAnnotations'](){const _0x1f1934=this['context']['plugins']['get'](y)['collection'],_0x56c86d=new Map(),_0x5a2c7c=Array['from'](this['activeUIs']);for(const _0x29be84 of this['activeUIs']){const _0x40a6fb=this['uisData']['get'](_0x29be84)['collection'];for(const _0x2b159a of _0x40a6fb)_0x56c86d['set'](_0x2b159a,_0x29be84);}for(const _0x20d6db of _0x1f1934){const _0xad8db2=_0x56c86d['get'](_0x20d6db);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x20d6db);const _0x176ef3=_0x5a2c7c['find'](_0x3ba540=>this['uisData']['get'](_0x3ba540)['filter'](_0x20d6db));_0xad8db2!==_0x176ef3&&(_0xad8db2&&this['uisData']['get'](_0xad8db2)['collection']['remove'](_0x20d6db),_0x176ef3&&this['uisData']['get'](_0x176ef3)['collection']['add'](_0x20d6db));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4a37bc){const _0x1be069=[];for(const _0x710338 of this['activeUIs']){(0x0,this['uisData']['get'](_0x710338)['filter'])(_0x4a37bc)&&_0x1be069['push'](_0x710338);}if(_0x1be069['length']>0x1)throw new _0x29e429('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1be069,'annotationType':_0x4a37bc['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4ab863){super(_0x4ab863);const _0x2560a0=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 _0x242e0a(),this['focusCycler']=new _0x470c60({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2560a0['to']('class')],'style':{'minHeight':_0x2560a0['to']('minHeight',_0x1a770b=>'number'==typeof _0x1a770b?_i(_0x1a770b+0xa):null)},'dir':_0x4ab863['uiLanguageDirection'],'role':'application','aria-label':N(_0x4ab863,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x4ab863,'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',_0x3ee6b8=>{this['_updateItemPositionInFocusables'](_0x3ee6b8['source']);}),this['list']['forEach'](_0x426207=>{this['focusTracker']['add'](_0x426207['element']),this['_updateItemPositionInFocusables'](_0x426207);}),this['list']['on']('change',(_0x4244fa,_0x1b48c8)=>{for(const _0x435f1f of _0x1b48c8['removed'])this['focusTracker']['remove'](_0x435f1f['element']),this['focusables']['remove'](_0x435f1f);for(const _0x34200 of _0x1b48c8['added'])this['focusTracker']['add'](_0x34200['element']),this['_updateItemPositionInFocusables'](_0x34200);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x52717a){const _0x45eb04=this['focusables']['getIndex'](_0x52717a);let _0x9af0bd,_0x1a4a95;for(const _0x4cbe7f of this['focusables'])if(_0x52717a['top']<_0x4cbe7f['top']){_0x9af0bd=_0x4cbe7f;break;}if(_0x1a4a95=_0x9af0bd?this['focusables']['getIndex'](_0x9af0bd):this['focusables']['length'],-0x1!==_0x45eb04){if(_0x45eb04===_0x1a4a95-0x1)return;this['focusables']['remove'](_0x52717a),_0x1a4a95=_0x9af0bd?this['focusables']['getIndex'](_0x9af0bd):this['focusables']['length'];}this['focusables']['add'](_0x52717a,_0x1a4a95);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x8f3d3c){super(_0x8f3d3c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x334f05,_0x304602)=>_0x334f05+_0x304602),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x20b63b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x20b63b['to']('isAnimationDisabled',_0x32db31=>_0x32db31?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x20b63b['to']('top',_0x1df32b=>Ot(_0x1df32b))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x24d71b=this['element']['clientHeight'];_0x24d71b&&(this['height']=_0x24d71b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x35dfc2{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x349af2){super(_0x349af2),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 _0x6a0baa=this['context']['config']['get']('sidebar.container');_0x6a0baa&&this['setContainer'](_0x6a0baa);}['setContainer'](_0x16f57a){if(!g(_0x16f57a))throw new _0x29e429('sidebar-setcontainer-invalid-element');this['container']=_0x16f57a;}['_attachToContainer']({viewClass:_0x84ee8e='',spaceBetweenItems:_0x1a700a=0x19}={}){if(!g(this['container']))throw new _0x29e429('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x84ee8e,this['_spaceBetweenItems']=_0x1a700a;}['rearrange']({removedAnnotation:_0x56478a,previousAnnotation:_0x3ff94b,nextAnnotation:_0x330a61}){const _0x482554=this['getSidebarItemView'](_0x56478a);this['view']['list']['remove'](_0x482554),this['_destroySidebarItemView'](_0x56478a),_0x3ff94b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3ff94b)),_0x330a61&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x330a61)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x11dd04,activatedAnnotation:_0x486185,disableAnimationOnActivatedAnnotation:_0x5b725e}){if(this['_activeAnnotation']=_0x486185,_0x11dd04){_0x11dd04['isActive']=!0x1;const _0x5cadc0=this['getSidebarItemView'](_0x11dd04);_0x5cadc0&&_0x5b725e&&(_0x5cadc0['isAnimationDisabled']=!0x1);}if(_0x486185){const _0x21bff9=this['getSidebarItemView'](_0x486185);_0x21bff9&&(_0x486185['isActive']=!0x0,_0x5b725e&&(_0x21bff9['isAnimationDisabled']=!0x0,_0x21bff9['top']+=0x1),this['_alignToTargetRect'](_0x21bff9));}}['_detachFromContainer'](_0x287f3b){if(this['view']['element']['remove'](),_0x287f3b){for(const _0x5d2620 of _0x287f3b)this['_destroySidebarItemView'](_0x5d2620);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x58254e,_0x30ec9a){_0x30ec9a||(_0x30ec9a=_0x58254e['view']);const _0x46055a=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x46055a,_0x58254e),this['_annotationToSidebarItemView']['set'](_0x58254e,_0x46055a),_0x46055a['content']['add'](_0x30ec9a),this['listenTo'](_0x58254e['view'],'change:targetRect',(_0x3a7de8,_0xa1cbca,_0x12ec34)=>{const _0x150ef0=this['_getTargetTop'](_0x58254e,_0x12ec34);_0x46055a['_targetTop']!=_0x150ef0&&(_0x46055a['_targetTop']=_0x150ef0,this['_setItemTop'](_0x46055a,_0x150ef0));}),this['listenTo'](_0x46055a,'change:top',()=>{this['_recalculate'](_0x46055a,'top');}),this['listenTo'](_0x46055a,'change:bottom',()=>{this['_recalculate'](_0x46055a,'bottom');}),this['_alignToTargetRect'](_0x46055a);const _0x594337=this['_getItemBefore'](_0x46055a);if(_0x594337)this['_alignAfterItem'](_0x594337,_0x46055a)||this['_alignToTargetRect'](_0x46055a);else this['_alignToTargetRect'](_0x46055a);return this['_updateLastItem'](),this['view']['list']['add'](_0x46055a),_0x46055a;}['_alignForTopChange'](_0x55053b){if(!_0x55053b['content']['length'])return;const _0x13d2c4=this['_getItemBefore'](_0x55053b);if(!_0x13d2c4)return;const _0x163c7d=this['_sidebarItemViewToAnnotation']['get'](_0x13d2c4),_0x3c7ee7=this['_activeAnnotation'];_0x3c7ee7&&_0x3c7ee7===_0x163c7d?this['_alignAfterItem'](_0x13d2c4,_0x55053b):this['_alignBeforeItem'](_0x55053b,_0x13d2c4);}['_alignForBottomChange'](_0x5e9cad){if(!_0x5e9cad['content']['length'])return;const _0x94ad88=this['_getItemAfter'](_0x5e9cad);if(!_0x94ad88)return;const _0xdc6141=this['_sidebarItemViewToAnnotation']['get'](_0x94ad88),_0x5a7a05=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3b8a24=this['_activeAnnotation'];_0x3b8a24&&_0x3b8a24===_0xdc6141&&_0x5a7a05?(this['_alignBeforeItem'](_0x94ad88,_0x5e9cad),this['_alignAfterItem'](_0x5e9cad,_0x94ad88)):_0x3b8a24&&_0x3b8a24===_0xdc6141?this['_alignBeforeItem'](_0x94ad88,_0x5e9cad):this['_alignAfterItem'](_0x5e9cad,_0x94ad88);}['_recalculate'](_0x1d4c01,_0x25aaf2){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5555b0,changedProp:_0x4915c5}of this['_recalculateBuffer'])'top'===_0x4915c5?this['_alignForTopChange'](_0x5555b0):this['_alignForBottomChange'](_0x5555b0);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1d4c01,'changedProp':_0x25aaf2});}['getSidebarItemView'](_0x129ab3){return this['_annotationToSidebarItemView']['get'](_0x129ab3);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x252827){const _0x33c235=this['getSidebarItemView'](_0x252827);this['stopListening'](_0x33c235),this['stopListening'](_0x252827['view']),_0x33c235['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x252827),this['_sidebarItemViewToAnnotation']['delete'](_0x33c235);}['_createSidebarView'](){const _0x29d1ee=new H(this['context']['locale']);return _0x29d1ee['render'](),this['on']('change:_lastItem',(_0x190073,_0x3b60be,_0x99c24a,_0x46fde5)=>{_0x46fde5&&_0x29d1ee['unbind']('minHeight'),_0x99c24a?_0x29d1ee['bind']('minHeight')['to'](_0x99c24a,'bottom'):_0x29d1ee['minHeight']=null;}),_0x29d1ee;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x18f978){const _0x9ad9e5=this['_sidebarItemViewToAnnotation']['get'](_0x18f978),_0x16907d=_0x9ad9e5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x9ad9e5)-0x1);return _0x16907d&&this['getSidebarItemView'](_0x16907d)||null;}['_getItemAfter'](_0xea61b1){const _0x2daf02=this['_sidebarItemViewToAnnotation']['get'](_0xea61b1),_0x16e959=_0x2daf02&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2daf02)+0x1);return _0x16e959&&this['getSidebarItemView'](_0x16e959)||null;}['_alignBeforeItem'](_0x48d677,_0x44a8b7){_0x48d677['updateHeight']();const _0x46ee8b=G(_0x44a8b7['bottom']+this['_spaceBetweenItems'],_0x48d677['top']);return!!_0x46ee8b&&(this['_setItemTop'](_0x44a8b7,_0x44a8b7['top']-_0x46ee8b),!0x0);}['_alignAfterItem'](_0x19b6d3,_0x1bdf69){_0x19b6d3['updateHeight']();const _0x110c05=G(_0x19b6d3['bottom']+this['_spaceBetweenItems'],_0x1bdf69['top']);return!!_0x110c05&&(this['_setItemTop'](_0x1bdf69,_0x1bdf69['top']+_0x110c05,!0x1),!0x0);}['_alignToTargetRect'](_0x148176){const _0x8c56f8=this['_sidebarItemViewToAnnotation']['get'](_0x148176);if(!_0x8c56f8||!_0x8c56f8['target']||!_0x8c56f8['targetRect'])return;const _0x4b2af3=this['_getTargetTop'](_0x8c56f8,_0x8c56f8['targetRect']);this['_setItemTop'](_0x148176,_0x4b2af3);}['_getTargetTop'](_0xb3b15c,_0x52d888){if(null===_0x52d888)return 0x0;if(_0xb3b15c['target']instanceof _0x5f3a0a)return _0x52d888['top'];{const _0xbfa193=new _0x5f3a0a(this['view']['element'])['top'];return _0x52d888['top']-_0xbfa193;}}['_setItemTop'](_0x5e3edb,_0x5597d6,_0x2b5706=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2b5706&&(_0x5597d6=Math['max'](_0x5597d6,this['_getMaxAvailableTop'](_0x5e3edb))),_0x5e3edb['top']=_0x5597d6;}['_getMaxAvailableTop'](_0xffee03){let _0x31eed7=this['_getItemBefore'](_0xffee03),_0x5a9a19=0x0;for(;_0x31eed7;)_0x31eed7['updateHeight'](),_0x5a9a19+=this['_spaceBetweenItems']+_0x31eed7['height'],_0x31eed7=this['_getItemBefore'](_0x31eed7);return _0x5a9a19;}}function G(_0x432f14,_0x9f6e98){return Math['max'](_0x432f14-_0x9f6e98,0x0);}function g(_0x25cbed){return null!==_0x25cbed&&'object'==typeof _0x25cbed&&0x1===_0x25cbed['nodeType'];}class e extends _0x35dfc2{['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(_0xd0d51a){super(_0xd0d51a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x22714a(),this['_refreshPositioningDebounced']=_0x340747(()=>{_0xd0d51a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2ddd65=this['context']['plugins']['get'](j),_0x2164e1=this['context']['plugins']['get'](z);_0x2ddd65['register']('wideSidebar',this),_0x2164e1['container']&&_0x2ddd65['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4918ef){if(_0x4918ef===this['activeAnnotation'])return;const _0x12460b=this['context']['plugins']['get'](z);_0x12460b['_activeAnnotation']=_0x4918ef;const _0x779ddb=this['activeAnnotation'];_0x12460b['refresh']({'blurredAnnotation':_0x779ddb,'activatedAnnotation':_0x4918ef}),this['activeAnnotation']=_0x4918ef;}['attach'](_0x562a5c){this['annotations']=_0x562a5c;const _0x4c9aa3=this['context']['plugins']['get'](z);if(_0x4c9aa3['_annotations']=_0x562a5c,this['isAttached'])throw new _0x29e429('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4c9aa3,'set:container',()=>{this['detach'](),this['listenTo'](_0x4c9aa3,'change:container',_0x23b064=>{_0x23b064['off'](),this['attach'](_0x562a5c);});}),_0x4c9aa3['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1867bc=_0x55934f=>{_0x55934f['updateTargetRect'](),_0x4c9aa3['addAnnotation'](_0x55934f);};for(const _0x22e11a of _0x562a5c)_0x1867bc(_0x22e11a);this['listenTo'](_0x562a5c,'add',(_0xa8f8dc,_0xb46171)=>{_0x1867bc(_0xb46171);}),this['listenTo'](_0x562a5c,'remove',(_0xc8ff91,_0x53ba4a,_0x29a8f7)=>{_0x4c9aa3['rearrange']({'removedAnnotation':_0x53ba4a,'previousAnnotation':_0x562a5c['get'](_0x29a8f7-0x1),'nextAnnotation':_0x562a5c['get'](_0x29a8f7+0x1)}),_0x53ba4a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x562a5c,'focus',(_0x3cb638,_0x4a43ad)=>{this['setActiveAnnotation'](_0x4a43ad);}),this['listenTo'](_0x562a5c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x22018d=this['context']instanceof _0x55e756?this['context']['editors']:new _0x22714a([this['context']]);for(const _0x5b3070 of _0x22018d)this['_integrateWithEditorAnnotations'](_0x5b3070);this['listenTo'](_0x22018d,'add',(_0x15df1a,_0x1681b2)=>{this['listenTo'](_0x1681b2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1681b2);});}),this['listenTo'](_0x22018d,'remove',(_0x4df974,_0x368e5f)=>{_0x368e5f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x368e5f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x29e429('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3fd5b7=this['context']['plugins']['get'](z);_0x3fd5b7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3fd5b7),this['stopListening'](this['annotations']),this['context']instanceof _0x55e756&&this['stopListening'](this['context']['editors']);for(const _0x44ab88 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x44ab88);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x11ce55){if(!_0x11ce55['plugins']['has']('EditorAnnotations'))return;const _0x534544=_0x11ce55['plugins']['get']('EditorAnnotations'),_0x896d2d=()=>{const _0x13cafd=_0x534544['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x13cafd[0x0]||null);};this['listenTo'](_0x534544,'refresh',_0x896d2d),this['listenTo'](_0x534544,'blur',(_0x28f467,{isAnnotationTracked:_0x37407e})=>{this['activeAnnotation']&&_0x37407e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x534544,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2e45aa=>{_0x534544['hasDomSelection']()&&(_0x896d2d(),_0x2e45aa['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x534544);}['_destroyEditorAnnotationsIntegration'](_0x1c44dc){this['stopListening'](_0x1c44dc),this['_editorAnnotations']['remove'](_0x1c44dc);}}class C extends _0x222733{['counterView'];constructor(_0x4196f9){super(_0x4196f9);const _0x4d9ac7=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x1edc87,_0x5f524d)=>_0x1edc87?'...':_0x5f524d['toString']()),this['set']('annotationType',''),this['icon']=_0x10df15,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4d9ac7['to']('annotationType',_0x266980=>'ck-annotation-counter__badge--'+_0x266980),_0x4d9ac7['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4d9ac7['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x35dfc2{['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(_0x9dd79f){super(_0x9dd79f),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x10f0fb())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x22714a(),this['_refreshPositioningDebounced']=_0x340747(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2dc30b(this['context']['locale']),this['balloonPanelView']=new _0x318538(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3b42ba){this['annotations']=_0x3b42ba;const _0x3a9bba=this['context']['plugins']['get'](z),_0xd409c1=this['balloonPanelView'];if(_0x3a9bba['_annotations']=_0x3b42ba,this['isAttached'])throw new _0x29e429('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3a9bba,'set:container',()=>{this['detach'](),this['listenTo'](_0x3a9bba,'change:container',_0xb8ac6a=>{_0xb8ac6a['off'](),this['attach'](_0x3b42ba);});}),_0x3a9bba['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x555cbf=_0x3d4ce7=>{const _0x2fc754=new C(this['context']['locale']);_0x3a9bba['addAnnotation'](_0x3d4ce7,_0x2fc754),this['_annotationToNarrowView']['set'](_0x3d4ce7,_0x2fc754),_0x2fc754['bind']('isDirty','annotationType','number')['to'](_0x3d4ce7['view'],'isDirty','type','length'),_0x2fc754['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xd409c1['content']['first']!==_0x3d4ce7['view']?(this['_showBalloon'](_0x3d4ce7),_0x3d4ce7['view']['element']['focus'](),this['setActiveAnnotation'](_0x3d4ce7)):this['setActiveAnnotation'](null);});};for(const _0x8070a5 of _0x3b42ba)_0x555cbf(_0x8070a5);this['listenTo'](_0x3b42ba,'add',(_0x2a9f7a,_0x1dbf1d)=>{_0x555cbf(_0x1dbf1d);}),this['listenTo'](_0x3b42ba,'remove',(_0xeeec30,_0x5c3675,_0x256f48)=>{this['_annotationToNarrowView']['get'](_0x5c3675)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5c3675),_0x3a9bba['rearrange']({'removedAnnotation':_0x5c3675,'previousAnnotation':_0x3b42ba['get'](_0x256f48-0x1),'nextAnnotation':_0x3b42ba['get'](_0x256f48+0x1)}),_0x5c3675===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3b42ba,'focus',(_0x24674a,_0x533ad3)=>{this['setActiveAnnotation'](_0x533ad3);}),this['listenTo'](_0x3b42ba,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x57d0a9,_0x4a2a5c)=>{_0x4a2a5c['keyCode']===_0x39b093['esc']&&_0xd409c1['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xd409c1['content']['first']),this['_hideBalloon'](),_0x4a2a5c['stopPropagation'](),_0x4a2a5c['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x6735cb,_0x43666e)=>{const _0x1115e2=_0x43666e['target'];_0xd409c1['isVisible']&&_0xd409c1['element']['contains'](_0x1115e2)||_0x3a9bba['view']['element']['contains'](_0x1115e2)||_0x6735cb['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x395b12=>_0x395b12['contains'](_0x1115e2))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x353954=this['context']instanceof _0x55e756?this['context']['editors']:new _0x22714a([this['context']]);for(const _0x524926 of _0x353954)this['_integrateWithEditorAnnotations'](_0x524926);this['listenTo'](_0x353954,'add',(_0x40c81b,_0x356701)=>{this['listenTo'](_0x356701,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x356701);});}),this['listenTo'](_0x353954,'remove',(_0x46c989,_0x5adbf6)=>{_0x5adbf6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5adbf6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2be07d){if(_0x2be07d===this['activeAnnotation'])return;const _0x35d67f=this['context']['plugins']['get'](z);if(_0x35d67f['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2be07d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2be07d)_0x35d67f['getSidebarItemView'](_0x2be07d)?this['_showBalloon'](_0x2be07d):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2be07d;}['detach'](){if(!this['isAttached'])throw new _0x29e429('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x469194=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3ec5a3=>_0x3ec5a3['destroy']()),this['_annotationToNarrowView']['clear'](),_0x469194['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x55e756&&this['stopListening'](this['context']['editors']);for(const _0x549533 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x549533);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'](_0xdb28df){if(!_0xdb28df['plugins']['has']('EditorAnnotations'))return;const _0x381d4d=_0xdb28df['plugins']['get']('EditorAnnotations'),_0x26fa49=this['context']['plugins']['get'](z),_0x3ee1ea=this['annotations'],_0x2f4eed=this['balloonPanelView'],_0x567316=()=>{const _0x1c9e1a=_0x381d4d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1c9e1a),this['setActiveAnnotation'](_0x1c9e1a[0x0]||null);};this['listenTo'](_0x381d4d,'refresh',_0x567316),this['listenTo'](_0x381d4d,'blur',(_0x315096,{isAnnotationTracked:_0x2e4e38})=>{this['activeAnnotation']&&_0x2e4e38(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x381d4d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3ee1ea,'blur',_0x1f6dfc=>{_0x381d4d['hasDomSelection']()&&_0x1f6dfc['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1f2c6d,_0x4f9533)=>{const _0xb453eb=_0x4f9533['target'];_0x2f4eed['isVisible']&&_0x2f4eed['element']['contains'](_0xb453eb)||_0x26fa49['view']['element']['contains'](_0xb453eb)||this['activeAnnotation']&&_0x381d4d['hasDomSelection']()&&(_0x567316(),_0x1f2c6d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x381d4d);}['_destroyEditorAnnotationsIntegration'](_0x228c4a){_0x228c4a&&(this['stopListening'](_0x228c4a),this['_editorAnnotations']['remove'](_0x228c4a));}['_setSelectedAnnotations'](_0x5d95d8){for(const _0x58a604 of this['_selectedAnnotations'])_0x5d95d8['includes'](_0x58a604)||this['_manuallyClosedAnnotationViews']['delete'](_0x58a604['view']);this['_selectedAnnotations']=_0x5d95d8;}['_refreshPositioning'](){const _0x538e75=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x538e75['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x11d73b){if(this['_manuallyClosedAnnotationViews']['has'](_0x11d73b['view']))return;const _0x567e0c=this['balloonPanelView']['content']['first'];_0x567e0c!==_0x11d73b['view']?(_0x567e0c&&this['_detachListeners'](_0x567e0c),this['_attachListeners'](_0x11d73b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x11d73b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4c39d1=this['balloonPanelView']['content']['first'],_0x5c95c3=_0x4c39d1&&this['annotations']['getByView'](_0x4c39d1);if(!_0x5c95c3||!this['_annotationToNarrowView']['has'](_0x5c95c3))return;const _0x5b061e=this['_annotationToNarrowView']['get'](_0x5c95c3)['element'],_0x508ec9=(function(){const _0x1459c1=_0x318538['defaultPositions'];return[_0x1459c1['southArrowNorthEast'],_0x1459c1['northArrowSouthEast'],_0x1459c1['southArrowNorth'],_0x1459c1['northArrowSouth'],_0x1459c1['southArrowNorthWest'],_0x1459c1['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5b061e,'positions':_0x508ec9});}['_hideBalloon'](){const _0x14d290=this['balloonPanelView'],_0x51458c=_0x14d290['content']['first'];_0x51458c&&(this['_detachListeners'](_0x51458c),_0x14d290['unpin'](),_0x14d290['content']['clear']());}['_attachListeners'](_0x5ec958){this['listenTo'](_0x5ec958,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5ec958,'Esc',(_0x19ab9a,_0x1deb75)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5ec958),this['_hideBalloon'](),_0x1deb75();});}['_detachListeners'](_0x54bc9d){this['stopListening'](_0x54bc9d);}}class c extends _0x3732d9{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x3d3d3f,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x246210){super(_0x246210),_0x246210['editing']['view']['addObserver'](_0x3d1846),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x246210['plugins']['get'](_0x3d3d3f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x332620=this['editor']['plugins']['get'](j);_0x332620['context']===this['editor']&&(_0x332620['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x26e307,_0x37fcbb)=>{const _0x4dd978=this['_balloon'];if(this['isAttached']&&_0x4dd978['visibleView']){const _0xe8f768=this['annotations']['getByView'](_0x4dd978['visibleView']);_0xe8f768&&this['_closeAnnotation'](_0xe8f768),_0x37fcbb();}}));}['afterInit'](){const _0x4cd17b=this['editor']['plugins']['get'](j);_0x4cd17b['context']===this['editor']&&(_0x4cd17b['hasActive']()||_0x4cd17b['switchTo']('inline'));}['setActiveAnnotation'](_0x3b4d9a){_0x3b4d9a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3b4d9a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3b4d9a)&&this['_addAnnotationToBalloon'](_0x3b4d9a,!0x0),_0x3b4d9a['isActive']=!0x0),_0x3b4d9a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3b4d9a);}['attach'](_0x15a53d){this['annotations']=_0x15a53d;const _0x459a86=this['editor']['plugins']['get'](j),_0x3885f5=this['_balloon'];if(this['isAttached'])throw new _0x29e429('inlineannotations-attach-already-attached',this);if(_0x459a86['context']!==this['editor'])throw new _0x29e429('inlineannotations-not-allowed-with-context',this);const _0x524f32=this['editor']['plugins']['get'](b);this['listenTo'](_0x524f32,'refresh',()=>{const _0x2c24fc=_0x524f32['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x16137d,_0x2fca43;!this['_forceRefresh']&&(_0x16137d=_0x2c24fc,_0x2fca43=this['_selectedAnnotations'],_0x16137d['length']===_0x2fca43['length']&&_0x16137d['every'](_0x303d3f=>_0x2fca43['includes'](_0x303d3f)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2c24fc),this['setActiveAnnotation'](_0x2c24fc[0x0]||null));}),this['listenTo'](_0x524f32,'blur',(_0x109aa2,{isAnnotationTracked:_0x41d025})=>{this['activeAnnotation']&&_0x41d025(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x414f1c,_0x52fd32,_0x10ebc2)=>{_0x10ebc2||this['setActiveAnnotation'](null);}),this['listenTo'](_0x15a53d,'remove',(_0xe4b72b,_0x322a51)=>{this['_removeAnnotationFromBalloon'](_0x322a51),_0x322a51===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3885f5,'change:visibleView',(_0x18dd66,_0x142c64,_0x2793d8,_0x59abf0)=>{_0x59abf0&&this['stopListening'](_0x59abf0);const _0x134532=_0x15a53d['getByView'](_0x2793d8);_0x2793d8&&_0x134532&&(this['listenTo'](_0x2793d8,'change:height',()=>{_0x3885f5['updatePosition']();}),this['listenTo'](_0x2793d8,'Esc',()=>{this['_closeAnnotation'](_0x134532),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x134532&&this['setActiveAnnotation'](_0x134532));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3885f5['visibleView']&&(_0x15a53d['getByView'](_0x3885f5['visibleView'])&&_0x3885f5['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 _0x29e429('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x21044d of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x21044d);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0xfc5cbf){for(const _0x6c320e of this['_selectedAnnotations'])_0xfc5cbf['includes'](_0x6c320e)||this['_manuallyClosed']['delete'](_0x6c320e);for(const _0x192062 of this['annotations'])_0xfc5cbf['includes'](_0x192062)||this['_removeAnnotationFromBalloon'](_0x192062);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2fc22b of _0xfc5cbf)this['_addAnnotationToBalloon'](_0x2fc22b);}this['_selectedAnnotations']=_0xfc5cbf;}['_addAnnotationToBalloon'](_0x3379e0,_0xc6a626=!0x1){this['_manuallyClosed']['has'](_0x3379e0)||(this['_addedAnnotations']['has'](_0x3379e0)||this['_balloon']['hasView'](_0x3379e0['view'])||(this['_addedAnnotations']['add'](_0x3379e0),this['_balloon']['add']({'stackId':_0x3379e0['view']['id'],'view':_0x3379e0['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3379e0)}})),_0xc6a626&&this['_balloon']['showStack'](_0x3379e0['view']['id']));}['_getBalloonTargetForAnnotation'](_0x57ba0a){const _0x3689ff=_0x57ba0a['target'],_0x32639a=this['editor']['editing']['view'],_0x55f8fc=_0x32639a['document']['selection']['getFirstRange'](),_0x4984e1=_0x32639a['domConverter']['viewRangeToDom'](_0x55f8fc);if(_0x4984e1['collapse'](!0x0),_0x3689ff){if(_0x3689ff instanceof _0x5f3a0a)return _0x3689ff;let _0x13f5b7=[];for(const _0x4e376a of _0x3689ff)_0x13f5b7['push'](...F(_0x4e376a['getClientRects']()));_0x13f5b7=function(_0x4a11dc){const _0x17683a=[];let _0x382354=_0x4a11dc[0x0];for(let _0x311496=0x1;_0x311496<_0x4a11dc['length'];_0x311496++)P(_0x382354,_0x4a11dc[_0x311496])?_0x382354['width']+=_0x4a11dc[_0x311496]['width']:(_0x17683a['push'](_0x382354),_0x382354=_0x4a11dc[_0x311496]);return _0x17683a['push'](_0x382354),_0x17683a;}(_0x13f5b7);const _0xd86a96=_0x4984e1['getBoundingClientRect']();return _0x13f5b7['find'](_0x3176a7=>_0x3176a7['top']<=_0xd86a96['top']&&_0x3176a7['bottom']>=_0xd86a96['bottom']&&_0x3176a7['left']<=_0xd86a96['left']&&_0x3176a7['right']>=_0xd86a96['right'])||_0x13f5b7[0x0];}return _0x57ba0a['targetRect']||_0x4984e1;}['_removeAnnotationFromBalloon'](_0x34b73c){this['_addedAnnotations']['has'](_0x34b73c)&&this['_balloon']['hasView'](_0x34b73c['view'])&&(this['_addedAnnotations']['delete'](_0x34b73c),this['_balloon']['remove'](_0x34b73c['view']));}['_closeAnnotation'](_0x6ae19a){this['_manuallyClosed']['add'](_0x6ae19a),this['_removeAnnotationFromBalloon'](_0x6ae19a);}}function F(_0x1d85bb){return Array['from'](_0x1d85bb)['map'](DOMRect['fromRect']);}function P(_0x48415e,_0x32c825){return _0x48415e['top']===_0x32c825['top']&&_0x48415e['bottom']===_0x32c825['bottom']&&_0x48415e['right']===_0x32c825['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x45a4d6,_0x38a80e){super(_0x45a4d6),this['set']('isEmpty',!_0x38a80e['length']),this['focusTracker']=new _0x242e0a(),this['_annotationViews']=_0x38a80e,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x470c60({'focusables':_0x38a80e,'focusTracker':this['focusTracker']}),this['listenTo'](_0x38a80e,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x38a80e,'remove',(_0x120d2e,_0x28a795)=>{_0x28a795['isActive']&&this['focus'](),_0x38a80e['length']||(this['isEmpty']=!0x0);});const _0x5850ae=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x45a4d6,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x38a80e},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5850ae['if']('isEmpty','ck-hidden',_0x49907c=>!_0x49907c)]},'children':[{'text':N(_0x45a4d6,'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 _0x2549c6 of this['_annotationViews'])this['focusTracker']['add'](_0x2549c6['element']);this['_annotationViews']['on']('change',(_0x5a2b27,{added:_0x227cd2,removed:_0x469a9f})=>{for(const _0x23b6f3 of _0x227cd2)this['focusTracker']['add'](_0x23b6f3['element']);for(const _0x961cab of _0x469a9f)this['focusTracker']['remove'](_0x961cab['element']);});}}class p extends _0x35dfc2{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x2abc82){super(_0x2abc82),this['archivedThreads']=new _0x22714a();}['init'](){const _0x1987e9=this['context'],_0x36badc=_0x1987e9['plugins']['get'](o),_0x2825ac=_0x1987e9['plugins']['get'](y);this['listenTo'](_0x36badc,'addCommentThread',(_0x12bb07,{threadId:_0x4cbf30})=>{const _0x3c0f84=_0x36badc['getCommentThread'](_0x4cbf30);_0x3c0f84['archivedAt']&&this['archivedThreads']['add'](_0x3c0f84,this['_calculatePosition'](_0x3c0f84['archivedAt'])),this['listenTo'](_0x3c0f84,'change:archivedAt',(_0x4090bd,_0xd8b7f8,_0x46f789)=>{_0x46f789?this['archivedThreads']['has'](_0x3c0f84)||this['archivedThreads']['add'](_0x3c0f84,this['_calculatePosition'](_0x3c0f84['archivedAt'])):this['archivedThreads']['has'](_0x3c0f84)&&this['archivedThreads']['remove'](_0x3c0f84);});}),this['listenTo'](_0x36badc,'removeCommentThread',(_0x1f176b,{threadId:_0x22e4d2})=>{const _0x292c3c=_0x36badc['getCommentThread'](_0x22e4d2);this['stopListening'](_0x292c3c),this['archivedThreads']['has'](_0x292c3c)&&this['archivedThreads']['remove'](_0x292c3c);},{'priority':'highest'}),this['listenTo'](_0x2825ac['collection'],'focus',(_0xcf3028,_0x356e0d)=>{_0x356e0d['isVisible']||(_0x356e0d['isActive']=!0x0,_0x2825ac['activate'](_0x356e0d));});}['_calculatePosition'](_0x1ef76f){const _0x9b89fc=[...this['archivedThreads']]['findIndex'](_0x3bb935=>_0x3bb935['archivedAt']<_0x1ef76f);return _0x9b89fc>-0x1?_0x9b89fc:this['archivedThreads']['length'];}}class a extends _0x3732d9{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x2561e8];}constructor(_0x77fb7d){super(_0x77fb7d),this['annotationViews']=new _0xd5b2d1(),this['_pendingThreads']=[];}['init'](){const _0x1ac508=this['editor'],_0x39ca99=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1ac508['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x222733,!0x0)),_0x1ac508['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x201f4f=this['_createCommentsArchiveButton'](_0x59a680);return _0x201f4f['set']({'role':'menuitemcheckbox'}),_0x201f4f;});const _0x45f849=_0x1ac508['plugins']['get'](p),_0x27f97e=_0x1ac508['plugins']['get']('Annotations'),_0x22abc7=_0x1ac508['plugins']['get']('CommentsRepository');_0x45f849['archivedThreads']['forEach'](_0x58fcb2=>{this['_handleNewThread'](_0x58fcb2);}),this['listenTo'](_0x45f849['archivedThreads'],'add',(_0x410d8f,_0xdc3ec0)=>{this['_handleNewThread'](_0xdc3ec0);}),this['listenTo'](_0x27f97e['collection'],'add',(_0x716873,_0x1c40ae)=>{const _0x277768=this['_pendingThreads']['find'](_0x2bb8f3=>{const _0x26413f=_0x22abc7['_threadToController']['get'](_0x2bb8f3);return _0x26413f&&_0x1c40ae['innerView']===_0x26413f['view'];});if(_0x277768){const _0x159667=this['_calculatePosition'](_0x277768['archivedAt']);this['_addAnnotationToArchive'](_0x1c40ae,_0x159667),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x277768),0x1);}}),this['listenTo'](_0x45f849['archivedThreads'],'remove',(_0x151e2f,_0x452fca)=>{const _0x16ce8e=_0x1ac508['config']['get']('collaboration.channelId');if(!_0x16ce8e||_0x452fca['channelId']===_0x16ce8e){if(this['_pendingThreads']['includes'](_0x452fca))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x452fca),0x1);else{const _0x336a25=_0x22abc7['_threadToController']['get'](_0x452fca),_0x27b810=_0x27f97e['getByInnerView'](_0x336a25['view']);this['annotationViews']['remove'](_0x27b810['view']),this['stopListening'](_0x27b810),this['stopListening'](_0x27b810['focusableElements']);}}}),this['listenTo'](_0x27f97e['collection'],'add',(_0x537aa8,_0x289768)=>{this['listenTo'](_0x289768,'escape',_0x39ca99);}),this['listenTo'](_0x27f97e['collection'],'remove',(_0x5e9ecf,_0x2e257e)=>{this['stopListening'](_0x2e257e,'escape',_0x39ca99);});}['_addAnnotationToArchive'](_0x3ef9d2,_0x3937ad){this['listenTo'](_0x3ef9d2,'set:isVisible',_0x423e31=>{_0x423e31['return']=!0x1,_0x423e31['stop']();}),this['annotationViews']['add'](_0x3ef9d2['view'],_0x3937ad);}['_handleNewThread'](_0x227933){const _0x258a14=this['editor']['plugins']['get']('CommentsRepository'),_0x22f549=this['editor']['plugins']['get']('Annotations'),_0x273969=this['editor']['config']['get']('collaboration.channelId');if(!_0x273969||_0x227933['channelId']===_0x273969){const _0x2ecba2=_0x258a14['_threadToController']['get'](_0x227933);if(!_0x2ecba2)return void this['_pendingThreads']['push'](_0x227933);const _0xe242fc=this['_calculatePosition'](_0x227933['archivedAt']),_0x458ee0=_0x22f549['getByInnerView'](_0x2ecba2['view']);_0x458ee0['isVisible']&&_0x22f549['_visibleAnnotations']['remove'](_0x458ee0),this['_addAnnotationToArchive'](_0x458ee0,_0xe242fc);}}['_calculatePosition'](_0x1d4224){const _0x502762=this['editor']['config']['get']('collaboration.channelId'),_0x430044=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x56347e=>_0x56347e['channelId']===_0x502762)['findIndex'](_0x58a2f3=>_0x58a2f3['archivedAt']<_0x1d4224);return _0x430044<0x0||_0x430044>this['annotationViews']['length']?this['annotationViews']['length']:_0x430044-0x1;}['_toggleDialog'](){const _0x15de41=this['editor'],_0x31566e=_0x15de41['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x15de41['locale'],this['annotationViews'])),'commentsArchive'===_0x31566e['id']?_0x31566e['hide']():_0x31566e['show']({'id':'commentsArchive','title':N(_0x15de41['locale'],'COMMENTS_ARCHIVE'),'icon':_0x43bc8d,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x9c172b['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4062ef,_0x10e2db=!0x1){const _0x4a5c69=this['editor']['locale'],_0x5a624b=this['editor']['plugins']['get']('Dialog'),_0x30d814=new _0x4062ef(_0x4a5c69);return _0x30d814['bind']('isEnabled')['to'](this,'isEnabled'),_0x30d814['bind']('isOn')['to'](_0x5a624b,'id',_0xf108c1=>'commentsArchive'===_0xf108c1),_0x30d814['set']({'label':N(_0x4a5c69,'COMMENTS_ARCHIVE'),'icon':_0x43bc8d,'isToggleable':!0x0}),_0x10e2db&&(_0x30d814['tooltip']=!0x0),this['listenTo'](_0x30d814,'execute',()=>this['_toggleDialog']()),_0x30d814;}['_hideDialogOnAnnotationEscape']=_0xe829cc=>{const _0x1e01e8=_0xe829cc['source'];if(!this['annotationViews']['has'](_0x1e01e8['view']))return;const _0x360207=this['editor']['plugins']['get']('Dialog');_0x360207['isOpen']&&'commentsArchive'===_0x360207['id']&&(_0x360207['hide'](),_0xe829cc['stop']());};}class gi extends _0x3732d9{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};
|