@ckeditor/ckeditor5-comments 48.4.0-alpha.5 → 48.4.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -11
- package/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 +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Command as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Ot)());constructor(_0x5b3693={}){(_0x5b3693=Object['assign']({},_0x5b3693))['plugins']||(_0x5b3693['plugins']=CommentEditor['defaultPlugins']),super(_0x5b3693),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0x338ac2=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x338ac2))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2250ea=>{const _0xa66e57=this['model']['document']['getRoot'](),_0x3aadf7=_0xa66e57&&_0xa66e57['getChild'](_0xa66e57['childCount']-0x1);_0x2250ea['setSelection'](_0x3aadf7,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x5b6ed7=this['editing']['view'],_0x5df654=_0x5b6ed7['document']['getRoot'](),_0x17729b=_0x5df654['getChild'](0x0);_0x5df654['childCount']>0x1||!_0x17729b||'p'!=_0x17729b['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x5b6ed7,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x17729b['placeholder']=this['placeholder']),ut({'view':_0x5b6ed7,'element':_0x17729b,'keepOnFocus':!0x0}),this['placeholderElement']=_0x17729b);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x4c79a2,_0x1c3a12={}){super(_0x4c79a2),this['editor']=null,this['_editorConfig']=_0x1c3a12,this['set']('value',_0x1c3a12['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x4c79a2,'Reply...')),this['set']('submitLabel',Et(_0x4c79a2,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x5bc581(),this['focusTracker']=new _0x5346a9(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x424587=>!_0x424587['defaultPrevented']},'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',(_0x433efd,_0x38d028)=>{this['cancelButtonView']['fire']('execute'),_0x38d028();}),this['keystrokes']['set']('Ctrl+Enter',(_0x46e023,_0x3c8b6f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3c8b6f());}),this['on']('submit',(_0x1a264f,_0x3653c7)=>{_0x3653c7['length']>0xfde8?(alert(Et(_0x4c79a2,'TOO_LONG_COMMENT_ALERT',[_0x3653c7['length'],0xfde8])),_0x1a264f['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x102256=this['editor'];this['element']['insertBefore'](_0x102256['ui']['element'],this['element']['firstChild']),_0x102256['model']['document']['on']('change',()=>this['value']=_0x102256['getData']()),_0x102256['bind']('placeholder')['to'](this),this['focusables']['add'](_0x102256['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x53bd7b){-0x1===_0x53bd7b?(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:_0x3a7ffe}=this,_0x5aa97d=new _0x282792(_0x3a7ffe);return _0x5aa97d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5aa97d['withText']=!0x0,_0x5aa97d['bind']('label')['to'](this,'submitLabel'),_0x5aa97d['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5aa97d['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5e088b,_0x143c00)=>!_0x143c00&&!!_0x5e088b['trim']()),_0x5aa97d;}_createCancelButton(){const {locale:_0x483d27}=this,_0x3ca61a=new _0x282792(_0x483d27);return _0x3ca61a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3ca61a['label']=Et(_0x483d27,'Cancel'),_0x3ca61a['withText']=!0x0,_0x3ca61a['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3ca61a;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4b179c=>{this['focusTracker']['add'](_0x4b179c['element']);}),this['focusables']['on']('change',(_0x8eb4b2,_0x207c07)=>{for(const _0xcb78f6 of Array['from'](_0x207c07['added'])['reverse']())this['focusTracker']['add'](_0xcb78f6['element']);});}},xt=class extends ht{constructor(_0x95e7f6,_0x49c674,_0x54dc5b){super(_0x95e7f6),this['commentInputView']=new St(_0x95e7f6,_0x54dc5b),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x59d38e,_0x5db2bb)=>_0x59d38e||!!_0x5db2bb),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 _0x295e3a(_0x95e7f6,_0x49c674),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'](_0xad23aa){this['commentInputView']['focus'](_0xad23aa);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x3caecc,_0x27d8f4)=>{const {submitButtonView:_0x4ef63b,cancelButtonView:_0x4591b5,editor:_0x5152e0}=this['commentInputView'];[_0x4ef63b['element'],_0x4591b5['element'],_0x5152e0?_0x5152e0['editing']['view']['getDomRoot']():null]['filter'](_0x372d9e=>_0x372d9e)['some'](_0x41a470=>_0x41a470['contains'](_0x27d8f4['target']))||(this['focus'](),_0x27d8f4['preventDefault']());});}},Pt=class extends ht{constructor(_0x1da9f3){super(_0x1da9f3);const _0x143113=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x143113['to']('count',_0x4e46dd=>Et(_0x1da9f3,'NUMBER_OF_COMMENTS',_0x4e46dd))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x5c66a1,_0x1ac135,_0x8c3ea7){super(_0x5c66a1);const _0x1e5848=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1ac135['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1ac135,this['_config']=_0x8c3ea7,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5346a9(),this['keystrokes']=new _0x5bc581(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x49c1f7=>this['commentViews']['map'](_0x2c4016=>_0x2c4016['element'])['includes'](_0x49c1f7['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x5c66a1),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x11d23c=>_0x11d23c-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2f2939 of _0x1ac135['comments'])this['_handleNewCommentModel'](_0x2f2939);this['_handleInfoComment'](),this['listenTo'](_0x1ac135['comments'],'add',(_0x31f13e,_0x5060a2)=>{const _0x52d36e=this['_calculatePosition'](_0x5060a2);this['length']++,this['_handleNewCommentModel'](_0x5060a2,_0x52d36e),this['refreshVisibleViews']();}),this['listenTo'](_0x1ac135['comments'],'remove',(_0x5d9f50,_0x2d5375)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2d5375),this['refreshVisibleViews']();}),this['listenTo'](_0x1ac135,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1ac135,'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',_0x1e5848['if']('length','ck-hidden',_0x4c9d95=>!_0x4c9d95)],'aria-label':Et(_0x5c66a1,'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'](_0x2ee491){-0x1===_0x2ee491?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x3a351e of this['commentViews'])_0x3a351e['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x3670de,_0x3991ec){const _0x4eb475=new this['_config']['CommentView'](this['locale'],_0x3670de,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4eb475['viewUid']=_0x3670de['id'],_0x4eb475['delegate']('removeComment')['to'](this),_0x4eb475['delegate']('updateComment')['to'](this),_0x4eb475['delegate']('resolveCommentThread')['to'](this),_0x4eb475['delegate']('editorReady')['to'](this),_0x4eb475['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4eb475,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4eb475,_0x3991ec);}_calculatePosition(_0x5c4ebf){const _0xd9a2e3=this['_model']['_findOptimalIndex'](_0x5c4ebf);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5c4ebf['authoredAt']?_0xd9a2e3-0x1:_0xd9a2e3:_0xd9a2e3-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x33f760={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x33f760,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x33f760));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0xf13e8){const _0x29dcbb=this['commentViews']['remove'](_0xf13e8['id']);this['stopListening'](_0x29dcbb),_0x29dcbb['isEditMode']&&this['_updateHasDirtyComment'](),_0x29dcbb['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5655b8=>_0x5655b8['isEditMode']);}['_rearrangeCollapse'](){const _0x17610b=function(_0x2ac451){const _0x452440=new _0x41383a();for(const _0x186312 of _0x2ac451)_0x452440['add'](_0x186312);return _0x452440;}(this['commentViews']),_0x499c5c=this['_collapsedCommentsView']['count'];for(let _0x503789=0x1;_0x503789<=_0x499c5c;_0x503789++)_0x17610b['remove'](0x1);for(const _0x145c0a of _0x17610b)_0x145c0a['collapse']();_0x499c5c>0x0&&_0x17610b['add'](this['_collapsedCommentsView'],0x1),Dt(_0x5ea0eb(Array['from'](this['visibleViews']),Array['from'](_0x17610b)),this['visibleViews'],_0x17610b);}['_rearrangeExpand'](){Dt(_0x5ea0eb(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x51cedf of this['visibleViews'])_0x51cedf['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0xd1298e=>{this['focusTracker']['add'](_0xd1298e['element']),this['keystrokes']['listenTo'](_0xd1298e['element']);}),this['commentViews']['on']('change',(_0x34517d,_0x407a17)=>{for(const _0x56e29b of _0x407a17['removed'])this['focusTracker']['remove'](_0x56e29b['element']),this['keystrokes']['stopListening'](_0x56e29b['element']);for(const _0x481a13 of Array['from'](_0x407a17['added'])['reverse']())this['focusTracker']['add'](_0x481a13['element']),this['keystrokes']['listenTo'](_0x481a13['element']);});}};function Dt(_0x49f318,_0x470793,_0x2f6059){let _0x1e246a=0x0;for(const _0x4704cc of _0x49f318)switch(_0x4704cc){case'insert':_0x470793['add'](_0x2f6059['get'](_0x1e246a),_0x1e246a),_0x1e246a++;break;case'delete':_0x470793['remove'](_0x1e246a);break;case'equal':_0x1e246a++;}}var Vt=class extends ht{constructor(_0x2d71c4){super(_0x2d71c4);const _0x36d351=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x36d351['to']('contextValue',_0x2ad544=>Et(_0x2d71c4,'THREAD_CONTEXT_LABEL',_0x2ad544)),'tabindex':-0x1},'children':[{'text':_0x36d351['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x35006e,_0x5aa177){super(_0x35006e);const _0x25fd17=this['bindTemplate'];this['_model']=_0x5aa177,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5346a9(),this['keystrokes']=new _0x5bc581(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x396669=>!!_0x396669),this['bind']('contextValue')['to'](this['_model'],'context',_0x4d17bd=>_0x4d17bd&&_0x4d17bd['value']?this['_trimContextValue'](_0x4d17bd['value']):Et(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',_0x25fd17['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 _0x8d87b1=new _0x282792(this['locale']);return _0x8d87b1['label']=Et(this['locale'],'Reopen'),_0x8d87b1['tooltip']=Et(this['locale'],'Reopen'),_0x8d87b1['icon']=_0x2d76b8,_0x8d87b1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1500e6=>!_0x1500e6),_0x8d87b1['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1d8708,_0x3ac37b)=>_0x1d8708&&_0x3ac37b),_0x8d87b1['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x8d87b1;}_trimContextValue(_0x5b05c1){if(_0x5b05c1['length']<0x96)return _0x5b05c1;const _0x291609=_0x5b05c1['lastIndexOf']('\x20',0x93);return _0x5b05c1['substring'](0x0,_0x291609>-0x1?_0x291609:0x93)+'...';}_attachContextActions(){const _0x37d868=this['element']['querySelector']('.ck-context'),_0x2ed542=_0x37d868['querySelector']('.ck-context__value');this['listenTo'](_0x37d868,'mouseenter',()=>{_0x2ed542['offsetWidth']<_0x2ed542['scrollWidth']&&_0x37d868['classList']['add']('overlay');}),this['listenTo'](_0x37d868,'mouseleave',()=>{_0x37d868['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x2f9012 of this['focusables'])this['focusTracker']['add'](_0x2f9012['element']),this['keystrokes']['listenTo'](_0x2f9012['element']);}_createContextView(){const _0x120bf7=new Vt(this['locale']);return _0x120bf7['bind']('contextValue')['to'](this),_0x120bf7;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x1a99ae,_0x5739e0,_0x5b5aeb,_0x5c8d2d){super(_0x1a99ae),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5739e0,this['_localUser']=_0x5b5aeb,this['_config']=_0x5c8d2d,this['commentThreadHeaderView']=new Bt(_0x1a99ae,_0x5739e0),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x32b36b(_0x1a99ae,Et(_0x1a99ae,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x1a99ae,_0x5739e0,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5c8d2d)),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',(_0x2175a0,_0xc0fc24)=>_0x2175a0||!!_0xc0fc24),this['bind']('isUnlinked')['to'](_0x5739e0,'unlinkedAt',_0x29c46a=>!!_0x29c46a);let _0xfc8951=null;const _0x39da59=()=>{const _0x32cdbc=this['_model']['comments']['first']||null;_0x32cdbc!==_0xfc8951&&(_0xfc8951&&this['stopListening'](_0xfc8951,'change:content'),_0xfc8951=_0x32cdbc,_0x32cdbc&&this['listenTo'](_0x32cdbc,'change:content',_0x39da59));const _0x1491be=_0x32cdbc?_0x32cdbc['author']['name']:this['_localUser']['name'],_0x173902=_0x32cdbc?new DOMParser()['parseFromString'](_0x2cc80d(_0x32cdbc['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x20466e=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x1491be]);this['set']('ariaLabel',_0x173902?_0x20466e+'\x20'+_0x173902:_0x20466e);};this['listenTo'](this['_model']['comments'],'change',_0x39da59),_0x39da59(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5346a9(),this['keystrokes']=new _0x5bc581(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd48efc=>_0xd48efc['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0xb0a34c(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x3e0be0=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x134573=_0x3e0be0['commentInputView'];return _0x3e0be0['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x134573,'value',(_0xf4ea52,_0xa48297,_0x403070,_0x5bfaef,_0x284e7f)=>!!_0x284e7f||!!_0x5bfaef&&_0x403070&&!_0xa48297||_0xf4ea52&&_0x403070&&!_0xa48297),_0x134573['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1ec7ce,_0x499db9,_0x1c8eb3)=>{let _0x3a7ea0;return _0x3a7ea0=_0x1c8eb3&&_0x499db9?'Reply\x20to\x20reopen\x20discussion...':_0x1ec7ce?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x3a7ea0);}),_0x134573['bind']('submitLabel')['to'](this,'length',_0x38e756=>Et(this['locale'],_0x38e756?'Reply':'Comment')),_0x134573['on']('submit',(_0x44317d,_0x5533b1)=>{this['fire']('addComment',_0x5533b1),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x134573['on']('cancel',()=>{this['focus']();}),_0x134573['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x134573['on']('cancel',_0x2d3fd6=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2d3fd6['stop']());}),this['on']('change:isActive',(_0x40a331,_0x43c90a,_0x3fe4a1)=>{_0x3fe4a1||this['length']||_0x134573['value']||this['fire']('removeCommentThread');}),_0x3e0be0;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x95c419();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x566adf,target:_0x4debe7,type:_0x3b200e,isVisible:_0x3ed589=!0x0}){super(),this['view']=_0x566adf,this['view']['element']||this['view']['render'](),this['_type']=_0x3b200e,this['_target']=_0x4debe7,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x41383a([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x16f905,_0x47f802)=>{this['view']['focusTracker']['add'](_0x47f802);}),this['focusableElements']['on']('remove',(_0x4e03c8,_0x128825)=>{this['view']['focusTracker']['remove'](_0x128825);}),this['set']('isVisible',_0x3ed589);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x120f00=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x120f00),_0x120f00;}get targetRect(){const _0x2821fd=this['target'];if(null===_0x2821fd)return null;if(_0x2821fd instanceof _0x2b2cae)return _0x2821fd;const _0x5de744=_0x2821fd['filter'](_0x3fdc94=>function(_0x41becf){return!!_0x41becf['offsetParent']||!!_0x41becf['getClientRects']()['item'](0x0);}(_0x3fdc94));return 0x0===_0x5de744['length']?null:_0x2b2cae['getDomElementRects'](_0x5de744[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x57f562){this['view']['isActive']=_0x57f562,this['view']['mainView']['isActive']=_0x57f562;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x8dc6e8){if(!(null===_0x8dc6e8||_0x8dc6e8 instanceof _0x2b2cae||Array['isArray'](_0x8dc6e8)&&_0x8dc6e8['every'](_0x5ecd11=>zt(_0x5ecd11))))throw new _0x3ecee7('annotation-invalid-target',null,{'target':_0x8dc6e8});}_getNormalizedTarget(){const _0xac04e6='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0xac04e6)?[_0xac04e6]:_0xac04e6;}};function zt(_0xb0d99a){return null!==_0xb0d99a&&'object'==typeof _0xb0d99a&&'nodeType'in _0xb0d99a&&0x1===_0xb0d99a['nodeType'];}var Jt=class extends _0x41383a{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x4cd3f5=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5346a9(),this['_focusTracker']['on']('change:isFocused',(_0x4b7b9e,_0x3a56e4,_0x3fa1d9)=>{_0x3fa1d9||this['fire']('blur');});for(const _0x35ac7f of _0x4cd3f5)this['add'](_0x35ac7f);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x41c033){if(this['has'](_0x41c033))throw new _0x3ecee7('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x41c033['innerView'],_0x41c033),this['_viewToAnnotation']['set'](_0x41c033['view'],_0x41c033);for(const _0x42fdff of _0x41c033['focusableElements'])this['_focusTracker']['add'](_0x42fdff);if(this['listenTo'](_0x41c033['focusableElements'],'add',(_0x4a430e,_0x2a4b84)=>{this['_focusTracker']['add'](_0x2a4b84);}),this['listenTo'](_0x41c033['focusableElements'],'remove',(_0x328edf,_0x2a7e17)=>{this['_focusTracker']['remove'](_0x2a7e17);}),this['listenTo'](_0x41c033['view']['focusTracker'],'change:isFocused',(_0x136cca,_0x348fea,_0x515a00)=>{_0x515a00&&this['fire']('focus',_0x41c033);}),_0x41c033['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x273a19 of this)_0x273a19['updateTargetRect']();}const _0x598188=this['_getOrderInContent'](_0x41c033['view']['targetRect']);return super['add'](_0x41c033,_0x598188);}['remove'](_0x185adf){if(!this['has'](_0x185adf))throw new _0x3ecee7('annotationcollection-not-existing-item',null);this['stopListening'](_0x185adf['view']['focusTracker']),this['stopListening'](_0x185adf['focusableElements']);for(const _0x339c0f of _0x185adf['focusableElements'])this['_focusTracker']['remove'](_0x339c0f);return this['_viewToAnnotation']['delete'](_0x185adf['view']),this['_innerViewToAnnotation']['delete'](_0x185adf['innerView']),super['remove'](_0x185adf);}getByInnerView(_0x488bce){return this['_innerViewToAnnotation']['get'](_0x488bce);}getByView(_0x530506){return this['_viewToAnnotation']['get'](_0x530506);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x28b275 of this)_0x28b275['updateTargetRect']();this['_sort']();}_sort(){const _0xc1a433=Array['from'](this)['sort']((_0x106803,_0x344f97)=>Zt(_0x106803['view']['targetRect'],_0x344f97['view']['targetRect']));for(let _0x41906e=_0xc1a433['length']-0x1;_0x41906e>0x0;_0x41906e--){const _0x3907b8=_0xc1a433[_0x41906e];_0x41906e!==this['getIndex'](_0x3907b8)&&(this['remove'](_0x3907b8),this['add'](_0x3907b8));}}_getOrderInContent(_0x4b8524){let _0x2a45ab=0x0;if(!_0x4b8524)return this['length'];for(const _0x17d87b of this){const _0x515910=_0x17d87b['view']['targetRect'];if(_0x515910){if(Zt(_0x4b8524,_0x515910)<0x0)return _0x2a45ab;_0x2a45ab++;}}return _0x2a45ab;}_areCachedRectsStale(){const _0x4b5ce8=this['get'](0x0);if(!_0x4b5ce8)return!0x1;const _0x32111c=_0x4b5ce8['view']['targetRect'],_0x5910d9=_0x4b5ce8['targetRect'];return!(!_0x32111c||!_0x5910d9)&&(_0x32111c['top']!==_0x5910d9['top']||_0x32111c['left']!==_0x5910d9['left']);}};function Qt({source:_0x274372,target:_0x1275d3,filter:_0x544b2f}){for(const _0x299208 of _0x274372)_0x544b2f(_0x299208)&&_0x1275d3['add'](_0x299208);_0x1275d3['listenTo'](_0x274372,'add',(_0x40ed72,_0x3d097f)=>{_0x544b2f(_0x3d097f)&&_0x1275d3['add'](_0x3d097f);}),_0x1275d3['listenTo'](_0x274372,'remove',(_0x408a70,_0x527d1c)=>{_0x1275d3['has'](_0x527d1c)&&_0x1275d3['remove'](_0x527d1c);});}function Zt(_0x37c893,_0x317a14){if(null===_0x37c893&&null===_0x317a14)return 0x0;if(null===_0x37c893)return-0x1;if(null===_0x317a14)return 0x1;const _0x5b2415=_0x37c893['top']-_0x317a14['top'];return 0x0==_0x5b2415?_0x37c893['left']-_0x317a14['left']:_0x5b2415;}var ti=class extends _0x2af6e8{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x21b5fa){if(super(_0x21b5fa),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x21b5fa instanceof _0x16c4fd){const _0x42842e=_0x21b5fa['locale'];_0x21b5fa['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x42842e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x42842e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x42842e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x42842e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x42842e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x42842e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x42842e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x303f7e){this['collection']['add'](_0x303f7e);}['remove'](_0x2720e5){this['collection']['remove'](_0x2720e5),_0x2720e5['destroy']();}refreshVisibility(){for(const _0x1d8d35 of this['collection'])_0x1d8d35['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x37126b){return this['collection']['getByInnerView'](_0x37126b);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x1b5f78 of this['collection'])_0x1b5f78['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x1d20e1){this['fire']('_activateAnnotation',_0x1d20e1);}createAnnotation(_0x3c24a6){return new $t(_0x3c24a6);}createAnnotationView(_0x234c0f,_0xd040f0){return new qt(_0x234c0f,_0xd040f0);}_addActiveAnnotation(_0x13f292){const _0x299f0a=new Set(this['activeAnnotations']);_0x299f0a['add'](_0x13f292),this['activeAnnotations']=_0x299f0a;}_removeActiveAnnotation(_0xc9029c){const _0x20929f=new Set(this['activeAnnotations']);_0x20929f['delete'](_0xc9029c),this['activeAnnotations']=_0x20929f;}_bindAnnotationsToVisibleAnnotations(){const _0x2e686a=this['collection'],_0x116b84=this['_visibleAnnotations'];function _0x2e60c1(_0x8029a9){const _0xd3ac88=_0x8029a9['source'];_0xd3ac88['isVisible']&&!_0x116b84['has'](_0xd3ac88)?_0x116b84['add'](_0xd3ac88):!_0xd3ac88['isVisible']&&_0x116b84['has'](_0xd3ac88)&&_0x116b84['remove'](_0xd3ac88),_0xd3ac88['view']['focusTracker']['remove'](_0xd3ac88['view']['element']),_0xd3ac88['view']['focusTracker']['add'](_0xd3ac88['view']['element']);}this['listenTo'](_0x2e686a,'add',(_0x170e7a,_0x28f849)=>{_0x28f849['isVisible']&&_0x116b84['add'](_0x28f849),this['listenTo'](_0x28f849,'change:isVisible',_0x2e60c1);}),this['listenTo'](_0x2e686a,'remove',(_0x18f631,_0x1d2a96)=>{_0x116b84['has'](_0x1d2a96)&&_0x116b84['remove'](_0x1d2a96),this['stopListening'](_0x1d2a96,'change:isVisible',_0x2e60c1);});}_setupEnterAnnotationKeystroke(){const _0x36188d=_0x1602c=>{_0x1602c['on']('ready',()=>{_0x1602c['keystrokes']['set'](_0x2911f2,(_0x4c476a,_0x46a120)=>{const _0x17abe3=_0x48e3cf(this['activeAnnotations']['values']());_0x17abe3&&(_0x17abe3['view']['focus'](),_0x46a120());});});};this['context']instanceof _0x16c4fd?_0x36188d(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x43718e,_0x574743)=>{_0x36188d(_0x574743);});}_setupEscapeAnnotationHandling(){const _0x41d760=_0x2bc0dc=>{const _0x41e88d=_0x2bc0dc['source'],_0x3b7145=[];let _0x3df606;if(Array['isArray'](_0x41e88d['target'])){_0x3df606=_0x41e88d['target'][0x0],this['context']instanceof _0x16c4fd?_0x3b7145['push'](this['context']):this['context']['editors']&&_0x3b7145['push'](...this['context']['editors']);for(const _0x56b990 of _0x3b7145)for(const _0x237be7 of _0x56b990['editing']['view']['domRoots']['values']())if(_0x237be7['contains'](_0x3df606))return void _0x56b990['editing']['view']['focus']();_0x3df606['focus']();}};this['listenTo'](this['collection'],'add',(_0xf5b5d0,_0x3d2b17)=>{this['listenTo'](_0x3d2b17,'escape',_0x41d760,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x511ed5,_0x441c13)=>{this['stopListening'](_0x441c13,'escape',_0x41d760);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x95c419();var oi=class extends _0x2af6e8{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x472903,_0x5b9dfb];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x365d29){super(_0x365d29),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2f925e=this['context']['config'];_0x2f925e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2f925e['define']('comments.maxThreadTotalWeight',0x1f4),_0x2f925e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2f925e['define']('comments.CommentThreadView',Ut),_0x2f925e['define']('comments.CommentView',Yt),_0x2f925e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x1cb84e=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x41c8b8,_0x482210)=>this['_addCommentThread'](_0x482210)),this['on']('submitCommentThread',(_0x23456c,_0x4e77a9)=>this['_submitCommentThread'](_0x4e77a9)),this['on']('resolveCommentThread',(_0x23298a,_0x1e9787)=>this['_resolveCommentThread'](_0x1e9787)),this['on']('resolveCommentThread',(_0x3b0be6,_0x512dfa)=>this['_updateActiveAnnotation'](_0x512dfa),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x298ff7,_0x2ab2d4)=>this['_reopenCommentThread'](_0x2ab2d4)),this['on']('reopenCommentThread',(_0x52127c,_0x5846fe)=>this['_updateActiveAnnotation'](_0x5846fe),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4f8ec3,_0x1097b4)=>this['_removeCommentThread'](_0x1097b4)),this['on']('updateCommentThread',(_0x1a113b,_0xabf121)=>this['_updateCommentThread'](_0xabf121)),this['on']('updateCommentThread',(_0x1b70d1,_0x219d96)=>this['_updateActiveAnnotation'](_0x219d96),{'priority':'lowest'}),this['on']('addComment',(_0x52aa5c,_0x3af70d)=>this['_addComment'](_0x3af70d)),this['on']('updateComment',(_0x21422f,_0x1b25fa)=>this['_updateComment'](_0x1b25fa)),this['on']('removeComment',(_0x1a254b,_0x3b29f2)=>this['_removeComment'](_0x3b29f2)),this['on']('addComment',(_0x409c60,{threadId:_0x374de1,isFromAdapter:_0x219ece})=>{if(_0x219ece)return;const _0x346293=this['getCommentThread'](_0x374de1),_0x4caf39=_0x346293&&this['_threadToController']['get'](_0x346293);_0x4caf39&&_0x4caf39['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1cb84e,'change:activeAnnotations',(_0x2f526b,_0x683067,_0x3dac7)=>{const _0x10712f=Array['from'](_0x3dac7)['map'](_0x4c9934=>this['_viewToController']['get'](_0x4c9934['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x10712f?_0x10712f['model']:null;});}set adapter(_0x2693ed){if(this['_adapter'])throw new _0x3ecee7('commentsrepository-adapter-already-set');this['_adapter']=_0x2693ed;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x2cb467=ii,threadId:_0x2bab7f=_0x2719ef(),comments:_0x31344c=[],unlinkedAt:_0x5f4d9c=null,resolvedAt:_0x3350f2=null,resolvedBy:_0x507240=null,target:_0x2d884f=null,context:_0x331fc2=null,attributes:_0x305ae9={},isResolvable:_0x42fdc6=!0x0,isSubmitted:_0x5af199=!0x1,isFromAdapter:_0x240faa=!0x1}={}){return this['fire'](ai('addCommentThread',_0x2cb467),{'channelId':_0x2cb467,'threadId':_0x2bab7f,'comments':_0x31344c,'unlinkedAt':_0x5f4d9c,'resolvedAt':_0x3350f2,'resolvedBy':_0x507240,'target':_0x2d884f,'context':_0x331fc2,'attributes':_0x305ae9,'isFromAdapter':_0x240faa,'isResolvable':_0x42fdc6,'isSubmitted':_0x5af199}),this['getCommentThread'](_0x2bab7f);}openNewCommentThread({channelId:_0x19a835=ii,threadId:_0x5b4827=_0x2719ef(),target:_0xd185f7,context:_0x318677=null,isResolvable:_0x405266=!0x0}){if(this['_readOnlyChannels']['has'](_0x19a835)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0xd185f7)throw new _0x3ecee7('commentsrepository-missing-target');const _0x4642a1=this['addCommentThread']({'channelId':_0x19a835,'threadId':_0x5b4827,'target':_0xd185f7,'context':_0x318677,'isResolvable':_0x405266});if(!_0x4642a1)return null;const _0x46b302=this['_threadToController']['get'](_0x4642a1),_0x58c743=_0x46b302['view']['commentThreadInputView']['commentInputView'],_0x3e0ca6=this['context']['plugins']['get'](ti),_0x2a82df=_0x3e0ca6['getByInnerView'](_0x46b302['view']);return _0x3e0ca6['activate'](_0x2a82df),_0x58c743['once']('editorReady',()=>_0x58c743['focus']()),_0x4642a1;}hasCommentThread(_0xde75d7){if('string'!=typeof _0xde75d7)throw new _0x3ecee7('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xde75d7);}updateCommentThread({channelId:_0x328aae=ii,threadId:_0x3b691b,context:_0x260583,unlinkedAt:_0x4f420a,attributes:_0x1f2783,isFromAdapter:_0x4538bc=!0x1}){return this['fire'](ai('updateCommentThread',_0x328aae),{'channelId':_0x328aae,'threadId':_0x3b691b,'context':_0x260583,'unlinkedAt':_0x4f420a,'attributes':_0x1f2783,'isFromAdapter':_0x4538bc}),this['getCommentThread'](_0x3b691b);}getCommentThread(_0x250db4){if('string'!=typeof _0x250db4)throw new _0x3ecee7('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x250db4);}fetchCommentThread({channelId:_0x5b3957,threadId:_0x561374}={}){const _0x4ffb5b=this['getCommentThread'](_0x561374);if(_0x4ffb5b)return Promise['resolve'](_0x4ffb5b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3ecee7('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5b3957,'threadId':_0x561374})['then'](_0x32218c=>this['hasCommentThread'](_0x561374)?this['getCommentThread'](_0x561374):_0x32218c?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5b3957},_0x32218c)):void 0x0)['catch'](_0x7745bf=>{throw console['error'](_0x7745bf),new _0x3ecee7('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0xeec165,skipNotAttached:_0x19ccde=!0x1,skipEmpty:_0x19a24a=!0x1,toJSON:_0x15dcdd=!0x1}={}){const _0x1fe022=[];for(const _0x3ad3fe of this['_threads']['values']())_0xeec165&&_0x3ad3fe['channelId']!==_0xeec165||_0x19ccde&&!_0x3ad3fe['isAttached']||_0x19a24a&&0x0===_0x3ad3fe['length']||_0x1fe022['push'](_0x3ad3fe);return _0x15dcdd?_0x1fe022['map'](_0x1d8339=>_0x1d8339['toJSON']()):_0x1fe022;}getAnnotationForCommentThread(_0xebf67d){const _0xf65951=this['_threadToController']['get'](_0xebf67d);return _0xf65951&&this['context']['plugins']['get'](ti)['getByInnerView'](_0xf65951['view'])||null;}getCommentThreadForAnnotation(_0x13cb70){const _0x5497d2=this['_viewToController']['get'](_0x13cb70['innerView']);return _0x5497d2?_0x5497d2['model']:null;}setActiveCommentThread(_0x4d2356){const _0xb38c0e=this['context']['plugins']['get'](ti);if(!_0x4d2356)return void(this['activeCommentThread']&&_0xb38c0e['deactivateAll']());const _0x24c431=this['getCommentThread'](_0x4d2356);if(!_0x24c431)throw new _0x3ecee7('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4d2356});if(!this['_threadToController']['has'](_0x24c431))throw new _0x3ecee7('commentsrepository-active-not-attached',null,{'threadId':_0x4d2356});const _0x58efad=_0xb38c0e['getByInnerView'](this['_threadToController']['get'](_0x24c431)['view']);_0xb38c0e['activate'](_0x58efad);}switchReadOnly(_0x283fe6,_0x2b7d1d){_0x283fe6?this['_readOnlyChannels']['add'](_0x2b7d1d):this['_readOnlyChannels']['delete'](_0x2b7d1d),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2fc96b){return this['_readOnlyChannels']['has'](_0x2fc96b)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0xfd7b1d,_0x3e0814){return new bt(_0xfd7b1d,_0x3e0814);}setPermissions(_0x1c83bf,_0x5767ac=ii){this['_permissions']['set'](_0x5767ac,_0x1c83bf),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x45a272=ii){return this['_permissions']['has'](_0x45a272)?this['_permissions']['get'](_0x45a272):ei;}_addCommentThread({channelId:_0x29ec19,threadId:_0x554e3f,comments:_0x26d464,unlinkedAt:_0x1c7d64,resolvedAt:_0xcef718,resolvedBy:_0x479b85,target:_0x1abc16,context:_0x4b9094,attributes:_0x2f2f33,isFromAdapter:_0x1ae02f,isResolvable:_0x4d240f,isSubmitted:_0x36d6da}){if('string'!=typeof _0x554e3f)throw new _0x3ecee7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x554e3f});if(this['hasCommentThread'](_0x554e3f))throw new _0x3ecee7('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x554e3f});const _0x4b910c=new ri(this,{'channelId':_0x29ec19,'id':_0x554e3f,'context':_0x4b9094,'attributes':_0x2f2f33,'unlinkedAt':_0x1c7d64,'resolvedAt':_0xcef718,'resolvedBy':_0x479b85?this['context']['plugins']['get'](_0x5b9dfb)['getUser'](_0x479b85):null,'isResolvable':_0x4d240f,'isSubmitted':_0x36d6da||_0x1ae02f});this['_threads']['set'](_0x554e3f,_0x4b910c);for(const _0x31324a of _0x26d464)_0x4b910c['_add'](this['_createNewComment']({'threadId':_0x554e3f,..._0x31324a}));return _0x1abc16&&_0x4b910c['attachTo'](_0x1abc16),_0x1ae02f||!_0x4b910c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x29ec19,'threadId':_0x554e3f});}_submitCommentThread({channelId:_0x20c616,threadId:_0x479ef3}){if(!this['hasCommentThread'](_0x479ef3))throw new _0x3ecee7('commentsrepository-missing-comment-thread',this);const _0x4c2f69=this['getCommentThread'](_0x479ef3);if(_0x4c2f69['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x270e06,comments:_0x5cbc98,resolvedAt:_0x49d53f,resolvedBy:_0x5e606f,context:_0x5a0289,attributes:_0x2b0a8c}=_0x4c2f69,_0x2c2c57=this['context']['plugins']['get']('PendingActions'),_0x561e27=_0x2c2c57['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x20c616,'threadId':_0x270e06,'comments':_0x5cbc98['map'](_0x32855c=>_0x32855c['toJSON']()),'resolvedAt':_0x49d53f,'resolvedBy':_0x5e606f?_0x5e606f['id']:_0x5e606f,'context':_0x5a0289,'attributes':_0x2b0a8c})['then'](({comments:_0x5d2e32})=>{_0x2c2c57['remove'](_0x561e27);for(const _0x5405da of _0x5d2e32)this['_updateComment']({'channelId':_0x20c616,'threadId':_0x479ef3,'commentId':_0x5405da['commentId'],'createdAt':_0x5405da['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5c261e=>{throw console['error'](_0x5c261e),new _0x3ecee7('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x1653c5,target:_0x3bbdf6}){const _0x33fe61=this['getCommentThread'](_0x1653c5);if(!_0x33fe61)throw new _0x3ecee7('commentsrepository-attach-missing-comment-thread',this);const _0x8c9b98=this['context']['plugins']['get']('PendingActions'),_0x1e9a88=this['context']['plugins']['get'](ti),_0x5b3d8a=this['_createCommentThreadView'](_0x33fe61),_0x4b9105=new bt(_0x33fe61,_0x5b3d8a);let _0x5ec807=null;_0x5b3d8a['on']('change:isDirty',(_0xf355ef,_0x529ff4,_0xf8f6a2)=>{_0xf8f6a2?_0x5ec807=_0x8c9b98['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5ec807&&(_0x8c9b98['remove'](_0x5ec807),_0x5ec807=null);}),this['_threadToController']['set'](_0x33fe61,_0x4b9105),this['_viewToController']['set'](_0x5b3d8a,_0x4b9105);const _0x48a74e=new qt(this['context']['locale'],_0x5b3d8a);_0x48a74e['bind']('length')['to'](_0x5b3d8a),_0x48a74e['bind']('isDirty')['to'](_0x5b3d8a,'isDirty',_0x5b3d8a,'length',(_0x17342f,_0x979b56)=>_0x17342f||!_0x979b56),_0x48a74e['bind']('isActive')['to'](_0x5b3d8a),_0x48a74e['type']='comment';const _0x1ef161=new $t({'view':_0x48a74e,'target':_0x3bbdf6,'type':'comment','isVisible':!_0x33fe61['archivedAt']&&!!('function'==typeof _0x3bbdf6?_0x3bbdf6():_0x3bbdf6)});return _0x5b3d8a['on']('escape',()=>{_0x1ef161['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5b3d8a,_0x1ef161),_0x1e9a88['add'](_0x1ef161),_0x1ef161;}_bindAnnotationToEditors(_0x5201ec,_0x238167){this['listenTo'](_0x5201ec,'editorReady',(_0x2d16fd,_0x2c0c7e)=>{const _0x36cbed=_0x2c0c7e['ui']['view']['body']['bodyCollectionContainer'];_0x238167['focusableElements']['add'](_0x36cbed),this['context']instanceof _0x16c4fd&&this['context']['ui']['focusTracker']['add'](_0x36cbed);},{'priority':'highest'}),this['listenTo'](_0x5201ec,'editorDestroyed',(_0x233a16,_0x377005)=>{const _0x5ef191=_0x377005['ui']['view']['body']['bodyCollectionContainer'];_0x238167['focusableElements']['has'](_0x5ef191)&&_0x238167['focusableElements']['remove'](_0x5ef191),this['context']instanceof _0x16c4fd&&this['context']['ui']['focusTracker']['remove'](_0x5ef191);});}_unbindEditors(_0x2a1f00){this['stopListening'](_0x2a1f00,'editorReady'),this['stopListening'](_0x2a1f00,'editorDestroyed');}_createCommentThreadView(_0x337321){const _0x563d20=this['context']['plugins']['get'](_0x5b9dfb),{config:_0x50663a,locale:_0x503a85}=this['context'],_0x668e43=_0x58cae0(_0x50663a['get']('locale'),_0x503a85);return new(0x0,(_0x50663a['get']('comments'))['CommentThreadView'])(_0x503a85,_0x337321,_0x563d20['me'],{'editorConfig':{..._0x50663a['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x50663a['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x50663a['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x50663a['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x50663a['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x668e43,'CommentView':_0x50663a['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x5bcd57,channelId:_0x2082a4,resolvedAt:_0x2ae539,resolvedBy:_0x405fd3,isFromAdapter:_0x373689}){if(!this['hasCommentThread'](_0x5bcd57))throw new _0x3ecee7('commentsrepository-missing-comment-thread',null,{'threadId':_0x5bcd57});const _0x4527bc=this['getCommentThread'](_0x5bcd57);if(_0x4527bc['isResolved'])throw new _0x3ecee7('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5bcd57});const _0x21422d=this['context']['plugins']['get'](_0x5b9dfb);if(_0x4527bc['resolvedBy']=_0x21422d['getUser'](_0x405fd3),_0x4527bc['resolvedAt']=_0x2ae539,_0x373689||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x22f78e=this['context']['plugins']['get']('PendingActions'),_0x5bc46d=_0x22f78e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2082a4,'threadId':_0x5bcd57})['then'](({resolvedAt:_0x19c99b,resolvedBy:_0x300763})=>{_0x22f78e['remove'](_0x5bc46d),_0x4527bc['resolvedBy']['id']!==_0x300763&&(_0x4527bc['resolvedBy']=_0x21422d['getUser'](_0x300763)),_0x4527bc['resolvedAt']=_0x19c99b;})['catch'](_0x1e0f6a=>{throw console['error'](_0x1e0f6a),new _0x3ecee7('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x2f97fd,channelId:_0x241382,isFromAdapter:_0x4a9c79}){if(!this['hasCommentThread'](_0x2f97fd))throw new _0x3ecee7('commentsrepository-missing-comment-thread',null,{'threadId':_0x2f97fd});const _0x528d81=this['getCommentThread'](_0x2f97fd);if(!_0x528d81['isResolved'])throw new _0x3ecee7('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2f97fd});if(_0x528d81['resolvedBy']=null,_0x528d81['resolvedAt']=null,_0x4a9c79||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2980f8=this['context']['plugins']['get']('PendingActions'),_0x2b39e0=_0x2980f8['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x241382,'threadId':_0x2f97fd})['then'](()=>_0x2980f8['remove'](_0x2b39e0))['catch'](_0x32a3ad=>{throw console['error'](_0x32a3ad),new _0x3ecee7('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x39e7b1,isFromAdapter:_0x2f3062}){const _0xb0c16e=this['getCommentThread'](_0x39e7b1);if(!_0xb0c16e)throw new _0x3ecee7('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x39e7b1),this['_threads']['delete'](_0x39e7b1),!_0xb0c16e['isSubmitted']||_0x2f3062||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5ecfcc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5e06ff}=_0xb0c16e,_0x51e3a2=_0x5ecfcc['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5e06ff,'threadId':_0x39e7b1})['then'](()=>_0x5ecfcc['remove'](_0x51e3a2))['catch'](_0x3556e9=>{throw console['error'](_0x3556e9),new _0x3ecee7('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x2d21a2,unlinkedAt:_0x260797,context:_0x591197,attributes:_0x41c27c,isFromAdapter:_0x469e2a}){if('string'!=typeof _0x2d21a2)throw new _0x3ecee7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2d21a2});if(!this['hasCommentThread'](_0x2d21a2))throw new _0x3ecee7('commentsrepository-missing-comment-thread',null,{'threadId':_0x2d21a2});const _0x3d1c57=this['getCommentThread'](_0x2d21a2);let _0x505132=!0x1;if(void 0x0!==_0x591197&&_0x3d1c57['context']!==_0x591197&&(_0x3d1c57['context']=_0x591197,_0x505132=!0x0),void 0x0!==_0x260797&&_0x3d1c57['unlinkedAt']!==_0x260797&&(_0x3d1c57['unlinkedAt']=_0x260797,_0x505132=!0x0),_0x41c27c&&!_0x3247e1(_0x41c27c,_0x3d1c57['attributes'])&&(_0x3d1c57['attributes']=_0x41c27c,_0x505132=!0x0),!_0x505132)return Promise['resolve']();if(!_0x3d1c57['isSubmitted']||_0x469e2a||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xe2bde1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x24310d}=_0x3d1c57,_0x22adec=_0xe2bde1['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x24310d,'threadId':_0x2d21a2,'context':_0x591197,'unlinkedAt':_0x260797,'attributes':_0x41c27c})['then'](()=>_0xe2bde1['remove'](_0x22adec))['catch'](_0x48cbde=>{throw console['error'](_0x48cbde),new _0x3ecee7('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x5686d1){const _0x104eed=this['context']['plugins']['get'](ti),_0x348c6f=this['getCommentThread'](_0x5686d1);if(_0x348c6f['_isAttached']=!0x1,this['_threadToController']['has'](_0x348c6f)){const _0x5427da=this['_threadToController']['get'](_0x348c6f),_0x5e2b47=_0x5427da['view'],_0x3cc47d=_0x104eed['getByInnerView'](_0x5e2b47);this['_threadToController']['delete'](_0x348c6f),this['_viewToController']['delete'](_0x5e2b47),_0x3cc47d&&_0x104eed['remove'](_0x3cc47d),_0x5427da['destroy'](),_0x5e2b47['destroy']()['then'](()=>{this['_unbindEditors'](_0x5e2b47);});}}_updateActiveAnnotation({threadId:_0x126155,resolvedAt:_0x1b89ea,unlinkedAt:_0x102ffe}){const _0x2037b6=!!_0x1b89ea,_0x6ff513=this['context']['plugins']['get'](ti),_0x4a6307=this['getCommentThread'](_0x126155);if(this['_threadToController']['has'](_0x4a6307)){const _0x426aa8=this['_threadToController']['get'](_0x4a6307)['view'],_0x4fd3f6=_0x6ff513['getByInnerView'](_0x426aa8);_0x4fd3f6&&(_0x2037b6&&_0x6ff513['_removeActiveAnnotation'](_0x4fd3f6),_0x102ffe?_0x4fd3f6['isVisible']=!0x1:_0x4fd3f6['refreshVisibility']());}}_getExternalAuthor(_0x405b1c){const _0x426ffb=this['context']['plugins']['get'](_0x5b9dfb),_0x4adfd4=_0x27be5c('external:'+_0x405b1c),_0x285008=_0x426ffb['getUser'](_0x4adfd4);return _0x285008||_0x426ffb['addUser']({'id':_0x4adfd4,'name':_0x405b1c});}_createNewComment({threadId:_0x1d74d3,commentId:_0x1166d8=_0x2719ef(),content:_0x5f4ee3,authorId:_0x139bd8,createdAt:_0x4081b0,attributes:_0x3f285f}){if('string'!=typeof _0x1166d8)throw new _0x3ecee7('commentsrepository-invalid-commentid');if('string'!=typeof _0x139bd8)throw new _0x3ecee7('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5f4ee3||!_0x5f4ee3['trim']())throw new _0x3ecee7('commentsrepository-invalid-comment-content');const _0xb51e4=this['context']['plugins']['get'](_0x5b9dfb)['getUser'](_0x139bd8);if(!_0xb51e4)throw new _0x3ecee7('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x139bd8});let _0x1f8026=null,_0x324e39=_0x4081b0;return _0x3f285f?.['@external']&&(_0x1f8026=this['_getExternalAuthor'](_0x3f285f['@external']['authorName']),_0x324e39=new Date(_0x3f285f['@external']['createdAt'])),new hi(this,{'threadId':_0x1d74d3,'id':_0x1166d8,'author':_0x1f8026||_0xb51e4,'creator':_0xb51e4,'content':_0x5f4ee3,'createdAt':_0x4081b0,'authoredAt':_0x324e39,'attributes':_0x3f285f});}_addComment(_0x4f993c){let {threadId:_0x4efb4c,content:_0x19845d,attributes:_0x4deb7c,isFromAdapter:_0x2e38bf}=_0x4f993c;const _0x5d945d=this['getCommentThread'](_0x4f993c['threadId']);if(!_0x5d945d)throw new _0x3ecee7('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4e640c=this['_createNewComment'](_0x4f993c),{id:_0x2e5621}=_0x4e640c;if(_0x5d945d['_add'](_0x4e640c),_0x2e38bf||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5d945d['isSubmitted'])return Promise['resolve']();const _0x16c93f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x40a7e3}=_0x5d945d,_0x5b1feb=_0x16c93f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4deb7c||(_0x4deb7c={}),this['adapter']['addComment']({'channelId':_0x40a7e3,'threadId':_0x4efb4c,'commentId':_0x2e5621,'content':_0x19845d,'attributes':_0x4deb7c})['then'](_0xa82c7c=>{_0x16c93f['remove'](_0x5b1feb),_0xa82c7c&&this['_updateComment']({'channelId':_0x40a7e3,'threadId':_0x4efb4c,'commentId':_0x2e5621,'createdAt':_0xa82c7c['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x372570=>{throw console['error'](_0x372570),new _0x3ecee7('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x54f74a,commentId:_0x2977e5,content:_0x1e8c59,createdAt:_0x16ee3d,attributes:_0x4abd13,isFromAdapter:_0x14ff3c}){if(void 0x0!==_0x1e8c59&&('string'!=typeof _0x1e8c59||!_0x1e8c59['trim']()['length']))throw new _0x3ecee7('commentsrepository-update-comment-invalid-content');const _0x581a31=this['getCommentThread'](_0x54f74a),_0x3e6e9d=_0x581a31['getComment'](_0x2977e5);if(!_0x3e6e9d)throw new _0x3ecee7('commentsrepository-update-missing-comment',this);let _0x4b4688=!0x1;if(_0x1e8c59&&_0x1e8c59!==_0x3e6e9d['content']&&(_0x3e6e9d['isEditable']||_0x14ff3c)&&(_0x3e6e9d['content']=_0x1e8c59,_0x4b4688=!0x0),_0x16ee3d&&_0x16ee3d!==_0x3e6e9d['createdAt']&&(_0x3e6e9d['createdAt']=_0x16ee3d,_0x3e6e9d['isExternal']||(_0x3e6e9d['authoredAt']=_0x16ee3d),_0x4b4688=!0x0),_0x4abd13&&!_0x3247e1(_0x4abd13,_0x3e6e9d['attributes'])&&(_0x3e6e9d['attributes']=_0x4abd13,_0x4b4688=!0x0),!_0x4b4688)return Promise['resolve']();if(_0x581a31['fire']('commentUpdated'),_0x14ff3c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5b6989=this['context']['plugins']['get']('PendingActions'),{channelId:_0x58aefa}=this['getCommentThread'](_0x3e6e9d['threadId']),_0x24c8ac=_0x5b6989['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x58aefa,'threadId':_0x54f74a,'commentId':_0x2977e5,'content':_0x1e8c59,'attributes':_0x4abd13})['then'](()=>_0x5b6989['remove'](_0x24c8ac))['catch'](_0x3db0e8=>{throw console['error'](_0x3db0e8),new _0x3ecee7('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x124c22,commentId:_0xa8bbc9,isFromAdapter:_0x402274}){const _0xd81fb5=this['getCommentThread'](_0x124c22),_0x3008b2=_0xd81fb5['getComment'](_0xa8bbc9);if(!_0x3008b2)throw new _0x3ecee7('commentsrepository-remove-missing-comment',this);if(_0xd81fb5['_remove'](_0x3008b2),_0x402274||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x21efa0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4b829c}=_0xd81fb5,_0x2d1aec=_0x21efa0['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4b829c,'threadId':_0x124c22,'commentId':_0xa8bbc9})['then'](()=>_0x21efa0['remove'](_0x2d1aec))['catch'](_0x20bfe6=>{throw console['error'](_0x20bfe6),new _0x3ecee7('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x11bf36,_0x3d2e7d){super();const _0x56825c=_0x3d2e7d['isResolvable'];this['channelId']=_0x3d2e7d['channelId'],this['id']=_0x3d2e7d['id'],this['comments']=new _0x41383a(),this['_repository']=_0x11bf36,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3d2e7d['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x11bf36,'_permissions',_0x11bf36,'_readOnlyChannels',()=>_0x11bf36['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x11bf36,'_permissions',()=>_0x11bf36['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x11bf36,'_permissions',()=>{const _0x159c87=_0x11bf36['getPermissions'](this['channelId']);return _0x159c87['write']||_0x159c87['admin'];}),this['bind']('isResolvable')['to'](_0x11bf36,'_permissions',()=>_0x56825c&&_0x11bf36['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3d2e7d['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1e565a,_0x414c71)=>_0x1e565a?_0x414c71?_0x1e565a<_0x414c71?_0x1e565a:_0x414c71:_0x1e565a:_0x414c71),this['set']('unlinkedAt',_0x3d2e7d['unlinkedAt']||null),this['set']('resolvedAt',_0x3d2e7d['resolvedAt']||null),this['set']('resolvedBy',_0x3d2e7d['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x53049a=>!!_0x53049a),this['set']('attributes',_0x3d2e7d['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x313591,_0x216159)=>_0x313591+_0x216159['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x5eb18c,id:_0x30c39f}=this;this['_repository']['fire'](ai('submitCommentThread',_0x5eb18c),{'channelId':_0x5eb18c,'threadId':_0x30c39f});}setUnlinkedAt(_0x242728){this['_update']({'unlinkedAt':_0x242728});}['resolve']({resolvedAt:_0x1b6aa5=new Date(),resolvedBy:_0x2a5db5='',isFromAdapter:_0x274960=!0x1}={}){const _0x2d568e=this['_repository']['context']['plugins']['get'](_0x5b9dfb)['me'],{channelId:_0x52b1da,id:_0x3d9837}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x52b1da),{'channelId':_0x52b1da,'threadId':_0x3d9837,'resolvedAt':_0x1b6aa5,'resolvedBy':_0x2a5db5||_0x2d568e['id'],'isFromAdapter':_0x274960});}['reopen']({isFromAdapter:_0x5cec6c=!0x1}={}){const {channelId:_0x2a9db9,id:_0xbc1b9}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x2a9db9),{'channelId':_0x2a9db9,'threadId':_0xbc1b9,'isFromAdapter':_0x5cec6c});}setContext(_0x31b28c){this['context']||this['_update']({'context':_0x31b28c});}setAttribute(_0x1c15b7,_0x41ba93){const _0xd54ee6=_0x1a02ac(this['attributes']);_0x60f067(_0xd54ee6,_0x1c15b7,_0x41ba93),this['_update']({'attributes':_0xd54ee6});}removeAttribute(_0x160489){const _0x1d12f1=_0x1a02ac(this['attributes']);_0x34d578(_0x1d12f1,_0x160489),this['_update']({'attributes':_0x1d12f1});}['remove']({isFromAdapter:_0x591e61=!0x1}={}){const {channelId:_0x202389,id:_0x19a24d}=this;this['_repository']['fire'](ai('removeCommentThread',_0x202389),{'channelId':_0x202389,'threadId':_0x19a24d,'isFromAdapter':_0x591e61});}attachTo(_0x2bedb0){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2bedb0});}addComment(_0x5b3ff4){const {channelId:_0x138a1a,id:_0x5d73cd}=this;this['_repository']['fire'](ai('addComment',_0x138a1a,_0x5d73cd),Object['assign']({'channelId':_0x138a1a,'threadId':_0x5d73cd},_0x5b3ff4));}getComment(_0x5dc658){if('string'!=typeof _0x5dc658)throw new _0x3ecee7('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5dc658});return this['comments']['get'](_0x5dc658);}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'](_0x758c19=>_0x758c19['toJSON']()),'attributes':this['attributes']};}['_add'](_0x1a99f0){return this['listenTo'](_0x1a99f0,'change:authoredAt',()=>{const _0x2f8f02=this['_findOptimalIndex'](_0x1a99f0),_0x5079a1=this['comments'];_0x2f8f02-0x1!=_0x5079a1['getIndex'](_0x1a99f0)&&_0x2f8f02+0x1!=_0x5079a1['getIndex'](_0x1a99f0)&&(this['_remove'](_0x1a99f0),this['_add'](_0x1a99f0));}),this['comments']['add'](_0x1a99f0,this['_findOptimalIndex'](_0x1a99f0));}_update(_0x207b31){const {channelId:_0x57247b,id:_0x1ae56b}=this;this['_repository']['fire'](ai('updateCommentThread',_0x57247b),{..._0x207b31,'channelId':_0x57247b,'threadId':_0x1ae56b});}['_remove'](_0x5a9b60){return this['stopListening'](_0x5a9b60),_0x5a9b60['destroy'](),this['comments']['remove'](_0x5a9b60);}_findOptimalIndex(_0x124442){const _0x5aba3d=this['comments']['find'](_0x21b52e=>new Date(_0x21b52e['authoredAt'])['getTime']()>new Date(_0x124442['authoredAt'])['getTime']());return _0x5aba3d?this['comments']['getIndex'](_0x5aba3d):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x45071d,_0x2eae60){super();const _0x547e40=_0x45071d['context']['plugins']['get'](_0x5b9dfb)['me'],_0x16c828=_0x45071d['getCommentThread'](_0x2eae60['threadId']),_0x3e99b9=0x0===_0x16c828['comments']['length'],_0x1f345a=_0x547e40===_0x2eae60['author'];this['id']=_0x2eae60['id'],this['threadId']=_0x2eae60['threadId'],this['author']=_0x2eae60['author'],this['creator']=_0x2eae60['creator'],this['set']('content',_0x2eae60['content']),this['createdAt']=_0x2eae60['createdAt']||new Date(),this['set']('authoredAt',_0x2eae60['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x16c828,'resolvedAt'),this['set']('attributes',_0x2eae60['attributes']||{}),this['bind']('isEditable')['to'](_0x45071d,'_permissions',()=>{const _0x3f0b40=_0x45071d['getPermissions'](_0x16c828['channelId'])['write'],_0x448b1c=_0x45071d['getPermissions'](_0x16c828['channelId'])['modifyAll'];return _0x1f345a&&_0x3f0b40||!_0x1f345a&&_0x448b1c;}),this['bind']('isRemovable')['to'](_0x16c828,'isRemovable',_0x45071d,'_permissions',_0x434c81=>{const _0x52a609=_0x45071d['getPermissions'](_0x16c828['channelId'])['write'],_0x34f67d=_0x45071d['getPermissions'](_0x16c828['channelId'])['modifyAll'];return _0x1f345a&&_0x52a609||_0x434c81&&_0x3e99b9||!_0x1f345a&&_0x34f67d&&!_0x3e99b9;}),this['bind']('isReadOnly')['to'](_0x16c828,'isReadOnly'),this['_repository']=_0x45071d;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x2ce75a){const _0x2b6f36=document['createElement']('div');return _0x2b6f36['innerHTML']=_0x2ce75a,_0x2b6f36['textContent']['length'];}(this['content']),0xc8);}update(_0x5deb2b){const {threadId:_0x5498cf,id:_0x20e328}=this;if(!this['_repository']['hasCommentThread'](_0x5498cf))throw new _0x3ecee7('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x47b7cf}=this['_repository']['getCommentThread'](_0x5498cf);this['_repository']['fire'](ai('updateComment',_0x47b7cf,_0x5498cf),{'channelId':_0x47b7cf,'threadId':_0x5498cf,'commentId':_0x20e328,..._0x5deb2b});}setAttribute(_0x4173aa,_0x5b7ff3){const _0x803f8=_0x1a02ac(this['attributes']);_0x60f067(_0x803f8,_0x4173aa,_0x5b7ff3),this['update']({'attributes':_0x803f8});}removeAttribute(_0x4a7cb8){const _0x5cdb25=_0x1a02ac(this['attributes']);_0x34d578(_0x5cdb25,_0x4a7cb8),this['update']({'attributes':_0x5cdb25});}['remove'](_0x53d33f={}){if(!_0x53d33f['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x79d500,id:_0x2b1806}=this;if(!this['_repository']['hasCommentThread'](_0x79d500))throw new _0x3ecee7('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xde30b7}=this['_repository']['getCommentThread'](_0x79d500);this['_repository']['fire'](ai('removeComment',_0xde30b7,_0x79d500),{'channelId':_0xde30b7,'threadId':_0x79d500,'commentId':_0x2b1806,..._0x53d33f});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x9f8407,..._0x477da1){for(const _0x5d62b9 of _0x477da1)void 0x0!==_0x5d62b9&&(_0x9f8407+=':'+String(_0x5d62b9));return _0x9f8407;}var ci=class extends _0x15063b{constructor(_0x3ddb42){super(_0x3ddb42),this['set']('hasContent',!0x1);}['refresh'](){const _0x2cfd05=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4f4a55 of _0x2cfd05['getRanges']())if(this['_hasContent'](_0x4f4a55))return void(this['hasContent']=!0x0);}execute({threadId:_0x466ab9=_0x2719ef(),ranges:_0x4e952f,comment:_0x302ea1}={}){const _0x3287a8=this['editor']['model'],_0xa2005f=_0x4e952f??Array['from'](_0x3287a8['document']['selection']['getRanges']()),_0x15d066=[];for(const _0x1afe25 of _0xa2005f)this['_hasContent'](_0x1afe25)&&_0x15d066['push'](this['_trimToContent'](_0x1afe25));if(!_0x15d066['length'])throw new _0x3ecee7('addcommentthreadcommand-incorrect-ranges',null);_0x302ea1&&this['_createCommentThread'](_0x466ab9,_0x302ea1),this['_createMarkersFromRanges'](_0x466ab9,_0x15d066,!!_0x302ea1);}_createMarkersFromRanges(_0x36342b,_0x43d445,_0x6b33e){this['editor']['model']['change'](_0x37a7f1=>{for(const _0x1e57f2 of _0x43d445){const _0x20605c='comment:'+_0x36342b+':'+_0x2719ef()['substr'](0x1,0x5);_0x37a7f1['addMarker'](_0x20605c,{'range':_0x1e57f2,'usingOperation':_0x6b33e,'affectsData':_0x6b33e});}});}_createCommentThread(_0x161d9e,_0x2bfb11){const _0x37e932=this['editor']['plugins']['get']('CommentsRepository'),_0x4ef2e8=this['editor']['config']['get']('collaboration.channelId'),_0x177d92=this['editor']['plugins']['get']('Users')['me'];if(!_0x177d92)throw new _0x3ecee7('addcommentthreadcommand-user-not-found',null);_0x37e932['addCommentThread']({'threadId':_0x161d9e,'channelId':_0x4ef2e8,'comments':[{'authorId':_0x177d92['id'],'content':_0x2bfb11,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x1a63af){for(const _0x294807 of _0x1a63af['getItems']())if(this['_itemIsContent'](_0x294807))return!0x0;return!0x1;}_itemIsContent(_0x143a0d){return _0x143a0d['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x143a0d)&&!_0x143a0d['is']('element','tableCell');}_trimToContent(_0x6069e8){const _0x58412e=_0x4b8253=>!this['_itemIsContent'](_0x4b8253['item']),_0x1abb6c=_0x6069e8['start']['getLastMatchingPosition'](_0x58412e),_0x10f814=_0x6069e8['end']['getLastMatchingPosition'](_0x58412e,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1abb6c,_0x10f814);}},di=class extends _0x1be51f{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x6f86e7){super(_0x6f86e7),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x1debd3=this['editor'],_0x397883=_0x1debd3['model']['document']['selection'],_0x29dd99=_0x2207c0(()=>this['refreshSelectedViews'](),0xa);_0x397883['on']('change:range',(_0x3dd236,_0x2b3e63)=>{_0x2b3e63['directChange']&&(_0x29dd99['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1debd3['editing']['view']['document'],'change:isFocused',(_0x3a69b4,_0x4973c8,_0xa18696)=>{_0xa18696&&_0x29dd99();}),this['listenTo'](_0x1debd3['ui']['focusTracker'],'change:isFocused',(_0x5c6494,_0x200bb0,_0x40bb6d)=>{_0x40bb6d||this['fire']('blur',{'isAnnotationTracked':_0x4c175f=>this['_editorAnnotationsData']['has'](_0x4c175f['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x11658b){if(this['_editorAnnotations']['has'](_0x11658b['view']))return;this['_editorAnnotations']['add'](_0x11658b['view']),this['editor']['ui']['focusTracker']['add'](_0x11658b['view']['element']);const _0x557610=this['editor']['plugins']['get'](ti);this['listenTo'](_0x557610['collection'],'remove',(_0x18a649,_0x49fc69)=>{this['editor']['ui']['focusTracker']['remove'](_0x49fc69['view']['element']),this['_editorAnnotations']['delete'](_0x49fc69['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0xa3d221){if('function'!=typeof _0xa3d221)throw new _0x3ecee7('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xa3d221);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x46c603,annotations:_0x23a9ea}){const _0x3c9a5b=[],_0x197b14=this['editor']['model']['document']['selection'],_0x197781=Array['from'](_0x197b14['getRanges']());for(const [_0x1f8479,_0x3d5720]of this['_editorAnnotationsData']){const _0x10ff80=_0x41b955(_0x3d5720),_0x1dae77=_0x23a9ea['getByInnerView'](_0x1f8479);_0x10ff80&&_0x1dae77&&_0x3c9a5b['push']({'annotation':_0x1dae77,'range':_0x10ff80});}function _0x41b955(_0x4f1a9a){for(const _0x380931 of _0x4f1a9a)for(const _0x4bd593 of _0x197781)if(_0x380931['containsRange'](_0x4bd593,!_0x197b14['isCollapsed']))return _0x380931;return null;}return _0x3c9a5b['sort']((_0x1eeba1,_0x119c9f)=>{const _0x4525ac=_0x1eeba1['range'],_0x1d2fcc=_0x119c9f['range'];if(!_0x4525ac['isEqual'](_0x1d2fcc)){if(_0x4525ac['containsRange'](_0x1d2fcc,!0x0))return 0x1;if(_0x1d2fcc['containsRange'](_0x4525ac,!0x0))return-0x1;}return _0x1eeba1['annotation']==_0x46c603?-0x1:_0x119c9f['annotation']==_0x46c603?0x1:0x0;})['map'](_0x4c6f3b=>_0x4c6f3b['annotation']);}get _editorAnnotationsData(){const _0x584434=new Map();for(const _0x4c799f of Array['from'](this['_dataCollectors']))for(const [_0x4d054e,_0x494c4f]of _0x4c799f())_0x584434['set'](_0x4d054e,_0x494c4f);return _0x584434;}},li=class extends _0x1be51f{afterInit(){const _0x4d2a8e=this['editor'];_0x4d2a8e['plugins']['has']('RestrictedEditingModeEditing')&&_0x4d2a8e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x1be51f{constructor(_0x5e09d7){super(_0x5e09d7),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x3bffc9=this['editor'],_0x3369=_0x3bffc9['commands']['get']('importWord'),_0x18d119=_0x3bffc9['plugins']['get'](_0x5b9dfb);_0x3369&&(_0x3369['on']('execute',(_0x3af4c3,[,_0x4bfa76])=>{_0x4bfa76['collaboration_features']={'comments':!0x0,'user_id':_0x18d119['me']['id']};},{'priority':_0xaff8ee['high']+0xa}),this['listenTo'](_0x3369,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x2bf72d,_0x3e393c){const {comment_threads:_0x2896ed}=_0x3e393c;_0x2896ed&&_0x2896ed['forEach'](({thread_id:_0xbb2b59,comments:_0x5abc2a,is_resolved:_0x639f95})=>{const _0x3b1fc7=new Date(),_0x383bd1=_0x5abc2a['map'](({author:_0x31bff5,content:_0x2c501f,created_at:_0x44fa92})=>({'content':_0x2c501f,'authorId':this['editor']['plugins']['get'](_0x5b9dfb)['me']['id'],'createdAt':_0x3b1fc7,'attributes':{'@external':{'authorName':_0x31bff5,'createdAt':_0x44fa92?new Date(_0x44fa92):new Date(),'source':'importWord'}}})),_0x4057b6=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x4057b6,'threadId':_0xbb2b59,'comments':_0x383bd1,'resolvedAt':_0x639f95?_0x3b1fc7:null});});}},ui=class extends _0x1be51f{constructor(_0x1e4db8){super(_0x1e4db8),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x551e65=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x551e65,'contentInsertion',(_0x65792,_0x3acf59)=>this['_removeMarkersWithoutThreads'](_0x3acf59['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x208503){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x208503;const _0x54ec14=this['editor']['plugins']['get']('CommentsRepository');for(const _0x362b01 of _0x208503['keys']()){const [_0x1376c3,_0x4e6c70]=_0x362b01['split'](':');'comment'!=_0x1376c3||_0x54ec14['hasCommentThread'](_0x4e6c70)||_0x208503['delete'](_0x362b01);}return _0x208503;}_registerMarkerInClipboardPipeline(){const _0x2fbf6f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1bdc0a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1bdc0a&&_0x2fbf6f['_registerMarkerToCopy']('comment',_0x1bdc0a);}_mapCommentsCopyConfigToRegisterConfiguration(_0x42651c){switch(_0x42651c){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x3935a7){const _0x138632=_0x3935a7['split'](':');return{'group':_0x138632[0x0],'id':_0x138632[0x1],'part':_0x138632[0x2]};}var pi=class extends _0x1be51f{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5106b0,_0x2379bb)=>{if(!_0x2379bb['options']['showCommentHighlights'])return null;if(_0x2379bb['options']['ignoreResolvedComments']){const {id:_0x4764b7}=fi(_0x5106b0['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x4764b7)?.['isResolved']&&_0x5106b0['item'])return _0x2379bb['consumable']['consume'](_0x5106b0['item'],'addMarker:'+_0x5106b0['markerName']),_0x2379bb['consumable']['consume'](_0x5106b0['item'],'removeMarker:'+_0x5106b0['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4680e8=>{_0x4680e8['on']('addMarker:comment',(_0x276d39,_0x4ca2c6,_0x198e36)=>{if(!_0x198e36['options']['showCommentHighlights'])return;const _0x3987c3=_0x4ca2c6['item'];if(!_0x3987c3)return;const _0x5b21c7=_0x198e36['mapper']['toViewElement'](_0x3987c3);this['editor']['model']['schema']['isObject'](_0x3987c3)&&_0x5b21c7&&!_0x5b21c7['getCustomProperty']('widget')&&_0x5b21c7['is']('containerElement')&&Ct(_0x5b21c7,_0x198e36['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2e35c6,{writer:_0x34176b,options:_0x554313})=>{if(!_0x554313['showCommentHighlights'])return null;const _0x26214f=_0x34176b['createContainerElement']('div'),_0x3feb21=_0x34176b['createEmptyElement']('hr');return _0x34176b['addClass']('ck-horizontal-line',_0x26214f),_0x34176b['insert'](_0x34176b['createPositionAt'](_0x26214f,0x0),_0x3feb21),_0x26214f;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3cf395,{writer:_0x48d40c,options:_0x163b2b})=>{if(!_0x163b2b['showCommentHighlights'])return null;const _0x3ae5e5=_0x48d40c['createContainerElement']('span'),_0x2586a8=_0x48d40c['createEmptyElement']('img');return _0x48d40c['addClass']('image-inline',_0x3ae5e5),_0x48d40c['insert'](_0x48d40c['createPositionAt'](_0x3ae5e5,0x0),_0x2586a8),_0x3ae5e5;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x17310e,{writer:_0x5c1bab,options:_0x481d7e})=>{if(_0x481d7e['showCommentHighlights'])return _0x5c1bab['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x6b440d,_0x16ee19,_0x4df3c4)=>{_0x4df3c4['options']['showCommentHighlights']&&_0x6b440d['stop']();},{'priority':'high'});}},wi=class extends _0x1be51f{static get requires(){return[oi,di,_0x5b9dfb,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4bf846){super(_0x4bf846),this['set']('isThreadsLoadingPaused',!0x0),_0x4bf846['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xc3758b,_0x1de14f,_0xbb229b,_0x4a585a)=>{const _0x2c700d=_0x4bf846['plugins']['get'](oi),_0xd3864f=_0xbb229b?fi(_0xbb229b)['id']:null;_0x4bf846['model']['change'](()=>{if(_0xd3864f){const _0x2a4158=this['getAllMarkersForId'](_0xd3864f);for(const _0x226cbc of _0x2a4158)_0x4bf846['editing']['reconvertMarker'](_0x226cbc);}if(_0x4a585a){const {id:_0x556a21}=fi(_0x4a585a),_0x303501=_0x2c700d['getCommentThread'](_0x556a21);if(_0x303501&&_0x303501['unlinkedAt'])return;if(_0x303501&&!_0x303501['isAttached'])return;const _0x18882c=this['getAllMarkersForId'](_0x556a21);for(const _0x55b387 of _0x18882c)_0x4bf846['editing']['reconvertMarker'](_0x55b387);}}),_0xd3864f&&this['scrollToThreadMarker'](_0xd3864f);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x4a4017=this['editor'],_0x335b37=_0x4a4017['plugins']['get'](oi),_0x22b073=_0x4a4017['config']['get']('collaboration.channelId'),_0x33b2dd=_0x335b37['getCommentThreads']()['filter'](_0x33288e=>_0x33288e['channelId']!==_0x22b073);_0x4a4017['commands']['add']('addCommentThread',new ci(_0x4a4017)),this['listenTo'](_0x4a4017,'change:isReadOnly',(_0x13fa37,_0x5413fb,_0x138ddf)=>{_0x335b37['switchReadOnly'](_0x138ddf,_0x4a4017['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x335b37,gi('addCommentThread',_0x22b073),(_0x362098,{threadId:_0x352c90})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x352c90)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x352c90);}),this['listenTo'](_0x335b37,gi('removeCommentThread',_0x22b073),(_0x21a7fa,{threadId:_0x5b5ee7})=>{_0x4a4017['model']['enqueueChange']({'isUndoable':!0x1},_0x5c19ca=>{const _0x4634d2=this['getAllMarkersForId'](_0x5b5ee7);for(const _0x83aa47 of _0x4634d2)_0x5c19ca['removeMarker'](_0x83aa47);});}),this['listenTo'](_0x335b37,gi('resolveCommentThread',_0x22b073),(_0x1d6d8d,{threadId:_0x28e918})=>{this['_reconvertMarkers'](_0x28e918);const _0x27b1fc=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x27b1fc['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x28e918)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x335b37,gi('reopenCommentThread',_0x22b073),(_0x1f24e2,{threadId:_0x109093})=>{this['_reconvertMarkers'](_0x109093);},{'priority':'low'}),this['listenTo'](_0x335b37,gi('addComment',_0x22b073),(_0x2dd208,{threadId:_0x1bdc9c,isFromAdapter:_0x1bb89b})=>{const _0x4792d2=this['getAllMarkersForId'](_0x1bdc9c);!_0x1bb89b&&0x0!=_0x4792d2['length']&&_0x335b37['hasCommentThread'](_0x1bdc9c)&&0x1===_0x335b37['getCommentThread'](_0x1bdc9c)['length']&&_0x4a4017['model']['enqueueChange']({'isUndoable':!0x1},_0x1415ae=>{for(const _0x48d3dc of _0x4792d2)_0x1415ae['updateMarker'](_0x48d3dc,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x33b2dd);}afterInit(){!async function(_0x4f0b78){const _0x39c494='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x45de59=0x791a0,_0xe66e05=window['Date']['now'](),_0x54a3e2=_0x4f0b78['editor'],_0x15c9c7=new window['Promise'](_0x290818=>{_0x54a3e2['once']('ready',_0x290818);}),_0x20d2ab={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x900021=_0x54a3e2['config']['get']('licenseKey');async function _0x4d12f7(){let _0xab67a9,_0x4b9858=null,_0x25067e=null;try{return'GPL'==_0x900021?'NotAllowed':(_0xab67a9=_0x1193f0(),_0xab67a9?(_0xab67a9['usageEndpoint']&&(_0x25067e=_0xc2da58(_0xab67a9['usageEndpoint'],_0xab67a9['jti'])),await _0x1dea0c()?_0x88739()?_0x45a887()?'Expired':_0x1d30fd()?('evaluation'==_0xab67a9['licenseType']&&(_0x4b9858=_0x163082('EvaluationLimit')),await _0x142326()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x45a887(){const _0x5c6558=['evaluation','trial']['includes'](_0xab67a9['licenseType'])?_0xe66e05/0x3e8:0xe10*_0x45de59;return _0xab67a9['exp']<_0x5c6558;}function _0x88739(){const _0x1b756a=_0xab67a9['features'];if(!_0x1b756a)return!0x1;if(_0x1b756a['includes']('*'))return!0x0;if(_0x1b756a['includes']('CMT'))return!0x0;if(_0x1b756a['includes']('TRILIUM')&&_0x4bd5fd())return!0x0;if(_0x1b756a['includes']('RCMT')){if(_0x11dc1c())return!0x0;if(_0x322ba6()||_0x4890ce())return!0x0;}return!0x1;}function _0x1d30fd(){const _0x5e14a2=_0xab67a9['licensedHosts'];if(!_0x5e14a2||0x0==_0x5e14a2['length'])return!0x0;const {hostname:_0x3b621f}=new URL(window['location']['href']);if(_0x5e14a2['includes'](_0x3b621f))return!0x0;const _0x58886e=_0x3b621f['split']('.');return _0x5e14a2['filter'](_0x32b10b=>_0x32b10b['includes']('*'))['map'](_0x5533a1=>_0x5533a1['split']('.'))['filter'](_0x260ece=>_0x260ece['length']<=_0x58886e['length'])['map'](_0x130d41=>Array(_0x58886e['length']-_0x130d41['length'])['fill']('*'===_0x130d41[0x0]?'*':'')['concat'](_0x130d41))['some'](_0x145904=>_0x58886e['every']((_0x41283b,_0x21133d)=>_0x145904[_0x21133d]===_0x41283b||'*'===_0x145904[_0x21133d]));}function _0x142326(){return _0x4b9858&&_0x25067e?new window['Promise']((_0x102fe1,_0x2167fa)=>{_0x4b9858['then'](_0x102fe1,_0x2167fa),_0x25067e['then'](_0x37561b=>{'Valid'!=_0x37561b&&_0x102fe1(_0x37561b);},_0x2167fa);}):_0x4b9858||_0x25067e||'Valid';}}function _0xc2da58(_0x27bf5f,_0x15a3b7){return new window['Promise'](_0x2b35cc=>{if(_0x287b4e())return _0x2b35cc('Valid');_0x5c2591(),_0x54a3e2['decorate']('_sendUsageRequest');let _0x2144bf=!0x1;const _0x477586=_0x2719ef();function _0x31dd1c(_0x320499){return!!_0x320499&&('object'==typeof _0x320499||'function'==typeof _0x320499)&&'function'==typeof _0x320499['then']&&'function'==typeof _0x320499['catch'];}function _0x4ce5a1(_0x5b55f6){_0x2a190a(_0x5b55f6)['then'](_0x3949db=>_0x3949db&&'ok'==_0x3949db['status']?_0x11483d(_0x5491e3(_0x477586+_0x15a3b7))!=_0x3949db['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x11b969=>(_0x5633a5(),_0x11b969),()=>{const _0x21c9d7=_0x23079c();return null==_0x21c9d7?(_0x5633a5(),'Valid'):_0xe66e05-_0x21c9d7>0x240c8400?'UsageLimit':'Valid';})['then'](_0x2b35cc)['catch'](()=>{_0x2b35cc('UsageLimit');});const _0xefc57f=0x36ee80;function _0x5633a5(){const _0x508ec6='llct-'+_0x11483d(_0x5491e3(_0x27bf5f)),_0xa3c64=_0x3e030f(_0x11483d(window['Math']['ceil'](_0xe66e05/_0xefc57f)));window['localStorage']['setItem'](_0x508ec6,_0xa3c64);}function _0x23079c(){const _0x48deb7='llct-'+_0x11483d(_0x5491e3(_0x27bf5f)),_0x3200c0=window['localStorage']['getItem'](_0x48deb7);return _0x3200c0?window['parseInt'](_0x3e030f(_0x3200c0),0x10)*_0xefc57f:null;}function _0x2a190a(_0x5ccfb7){return new window['Promise']((_0x35a217,_0x2d085d)=>{_0x5ccfb7['then'](_0x35a217,_0x2d085d),window['setTimeout'](_0x2d085d,0x1d4c0);});}}_0x54a3e2['on']('_sendUsageRequest',(_0xe3d86f,_0x3755a0)=>{if(_0x3755a0[0x0]!=_0x27bf5f)return _0x2b35cc('UsageLimit');_0x3755a0[0x1]={..._0x3755a0[0x1],'requestId':_0x477586};},{'priority':'high'}),_0x54a3e2['on']('_sendUsageRequest',_0x5ea3e4=>{_0x31dd1c(_0x5ea3e4['return'])&&(_0x2144bf=!0x0,_0x4ce5a1(_0x5ea3e4['return']));},{'priority':'low'}),_0x15c9c7['then'](()=>{_0x2144bf||_0x2b35cc('UsageLimit');});});function _0x287b4e(){return'auto'==_0x54a3e2['editing']['view']['_overlayModeHint'];}function _0x5c2591(){_0x54a3e2['editing']['view']['_overlayModeHint']='auto';}}function _0x163082(_0x45670d){const _0x1a8b83=[new window['Promise'](_0x336a30=>setTimeout(_0x336a30,0x93ecc)),_0x15c9c7['then'](()=>new window['Promise'](_0x15954b=>{let _0x1c8f93=0x0;_0x54a3e2['model']['on']('applyOperation',(_0x2ea35e,_0x5b0c39)=>{_0x5b0c39[0x0]['isDocumentOperation']&&_0x1c8f93++,0x5e8==_0x1c8f93&&(_0x15954b(),_0x2ea35e['off']());});}))];return window['Promise']['race'](_0x1a8b83)['then'](()=>_0x45670d);}async function _0x29630a(){await _0x15c9c7,_0x54a3e2['model']['change']=_0x3058d2,_0x54a3e2['model']['enqueueChange']=_0x3058d2,_0x54a3e2['enableReadOnlyMode']('model');}function _0x4bd5fd(){return window['glob']&&window['glob']['triliumVersion'];}function _0x11dc1c(){return _0x4d7831('WebSocketGateway')&&'connected'==_0x58e72a('WebSocketGateway')['state'];}function _0x322ba6(){return _0x4d7831('RevisionViewerIntegration');}function _0x4890ce(){return _0x4d7831('TrackChangesDataGetter');}function _0x24cfce(_0x2b3c8c){const _0xe38f83=_0x8a0c47();_0x54a3e2[_0xe38f83]='commentsLicenseKey'+_0x2b3c8c,'Valid'!=_0x2b3c8c&&_0x29630a();}function _0x8a0c47(){const _0x3e404e=window['String'](window['performance']['now']())['replace']('.','');let _0x3a6aeb='K';for(let _0x36baa2=0x0;_0x36baa2<_0x3e404e['length'];_0x36baa2+=0x2){let _0x2cb603=window['parseInt'](_0x3e404e['substring'](_0x36baa2,_0x36baa2+0x2));_0x2cb603>=0x3e&&(_0x2cb603-=0x3e),_0x3a6aeb+=_0x39c494[_0x2cb603];}return _0x3a6aeb;}function _0x1193f0(){const _0x527cc0=_0x900021['split']('.');if(0x3!=_0x527cc0['length'])return null;return _0x44e3d7(_0x527cc0[0x1]);function _0x44e3d7(_0x2befd7){const _0x575e81=_0x59f3e5(_0x2befd7);return _0x575e81&&_0x538797()?_0x575e81:null;function _0x538797(){const _0x335252=_0x575e81['jti'],_0xfd164a=window['parseInt'](_0x335252['substring'](_0x335252['length']-0x8),0x10),_0x10e175={..._0x575e81,'jti':_0x335252['substring'](0x0,_0x335252['length']-0x8)};return delete _0x10e175['vc'],_0x5491e3(_0x10e175)==_0xfd164a;}}}async function _0x1dea0c(){let _0x4c8e92=!0x0;try{const [_0x4b219c,_0x5e7849,_0x1e40d6]=_0x900021['split']('.');return _0x2fcdc0(_0x4b219c),await _0x28d858(_0x4b219c,_0x5e7849,_0x1e40d6),_0x4c8e92;}catch{return!0x1;}function _0x2fcdc0(_0x44da42){const _0x38d203=_0x59f3e5(_0x44da42);_0x38d203&&'ES256'==_0x38d203['alg']||(_0x4c8e92=!0x1);}async function _0x28d858(_0x2a80d9,_0xece93c,_0x5cb252){const _0x14f58a=window['Uint8Array']['from'](_0x44df5d(_0x5cb252),_0x16e174=>_0x16e174['charCodeAt'](0x0)),_0x410078=new window['TextEncoder']()['encode'](_0x2a80d9+'.'+_0xece93c),_0x178ff2=window['crypto']['subtle'];if(!_0x178ff2)return;const _0x74fb5b=await _0x178ff2['importKey']('jwk',_0x20d2ab,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x178ff2['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x74fb5b,_0x14f58a,_0x410078)||(_0x4c8e92=!0x1);}}function _0x59f3e5(_0x5e3f5e){return _0x5e3f5e['startsWith']('ey')?JSON['parse'](_0x44df5d(_0x5e3f5e)):null;}function _0x44df5d(_0x21be6c){return window['atob'](_0x21be6c['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x5491e3(_0x4cee01){let _0x396cb5=0x1505;function _0x5686a3(_0x409d01){for(let _0x503f3a=0x0;_0x503f3a<_0x409d01['length'];_0x503f3a++){const _0x87dc66=_0x409d01['charCodeAt'](_0x503f3a);_0x396cb5=(_0x396cb5<<0x5)+_0x396cb5+_0x87dc66,_0x396cb5&=_0x396cb5;}}function _0xc7e900(_0x35757a){Array['isArray'](_0x35757a)?_0x35757a['forEach'](_0xc7e900):_0x35757a&&'object'==typeof _0x35757a?Object['entries'](_0x35757a)['sort']()['forEach'](([_0x884ba,_0x11a571])=>{_0x5686a3(_0x884ba),_0xc7e900(_0x11a571);}):_0x5686a3(window['String'](_0x35757a));}return _0xc7e900(_0x4cee01),_0x396cb5>>>0x0;}function _0x11483d(_0xbe2028){return _0xbe2028['toString'](0x10)['padStart'](0x8,'0');}function _0x3e030f(_0x3061a7){return _0x3061a7['split']('')['reverse']()['join']('');}function _0x4d7831(_0x3ea0b4){return _0x54a3e2['plugins']['has'](_0x3ea0b4);}function _0x58e72a(_0x2791cc){return _0x54a3e2['plugins']['get'](_0x2791cc);}function _0x3058d2(){}_0x24cfce(await _0x4d12f7());}(this);}destroy(){const _0x825ec3=this['editor']['plugins']['get'](oi),_0x4a8783=this['editor']['config']['get']('collaboration.channelId');for(const _0x35689e of _0x825ec3['getCommentThreads']({'channelId':_0x4a8783}))_0x825ec3['_detachCommentThread'](_0x35689e['id']),_0x825ec3['_threads']['delete'](_0x35689e['id']);super['destroy']();}['hasMarkerForId'](_0x24e2d9){return this['getAllMarkersForId'](_0x24e2d9)['length']>0x0;}getAllMarkersForId(_0x329b70){const _0x1e3b71=[];for(const _0x41c873 of this['editor']['model']['markers'])_0x41c873['name']['startsWith']('comment:'+_0x329b70)&&_0x1e3b71['push'](_0x41c873);return _0x1e3b71;}['scrollToThreadMarker'](_0x6b960f){setTimeout(()=>{const _0x583381=this['_getTargetForId'](_0x6b960f);_0x583381&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x6b960f&&_0x323d4f({'target':_0x583381[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x378bbd){this['editor']['model']['change'](()=>{for(const _0x1f6a8a of this['getAllMarkersForId'](_0x378bbd))this['editor']['editing']['reconvertMarker'](_0x1f6a8a);});}_attachArchivedThread(_0x276d68){const _0x6eb5b7=this['editor']['plugins']['get'](oi),_0x59cc2b=this['editor']['plugins']['get'](di),_0x36e6f7=_0x6eb5b7['getCommentThread'](_0x276d68);if(!_0x36e6f7['isAttached']){const _0x471a76=_0x36e6f7['attachTo'](()=>this['_getTargetForId'](_0x36e6f7['id']));_0x59cc2b['registerAnnotation'](_0x471a76),_0x36e6f7['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x241e5b=this['editor'],_0x57195d=_0x241e5b['plugins']['get'](_0x5b9dfb);_0x241e5b['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3c5037,_0x46b454)=>{const {id:_0x50afc7}=fi(_0x3c5037['markerName']),_0x29c418=_0x241e5b['plugins']['get'](oi)['getCommentThread'](_0x50afc7),_0x3cf71b=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x50afc7;let _0x4e0f6b;if(_0x29c418&&_0x29c418['isResolved']&&!_0x3cf71b&&_0x3c5037['item'])return _0x46b454['consumable']['consume'](_0x3c5037['item'],'addMarker:'+_0x3c5037['markerName']),_0x46b454['consumable']['consume'](_0x3c5037['item'],'removeMarker:'+_0x3c5037['markerName']),null;const _0x2905ad=['ck-comment-marker'];return _0x3cf71b&&_0x2905ad['push']('ck-comment-marker--active'),_0x4e0f6b=_0x29c418?.['length']?_0x29c418['comments']['first']['author']['id']:_0x57195d['me']['id'],{'classes':_0x2905ad,'attributes':{'data-comment':_0x50afc7,'data-author-id':_0x4e0f6b}};}}),_0x241e5b['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1e4709,{options:_0x1262f3})=>{if(_0x1262f3['showCommentHighlights'])return null;const _0x47a4db=_0x241e5b['plugins']['get'](oi),_0xa4b9e8=_0x241e5b['model']['markers']['get'](_0x1e4709),{id:_0x459833,part:_0x438cea}=fi(_0x1e4709);return _0xa4b9e8&&!_0xa4b9e8['affectsData']||_0x1262f3['ignoreResolvedComments']&&_0x47a4db['getCommentThread'](_0x459833)?.['isResolved']?null:{'group':'comment','name':_0x438cea?_0x459833+':'+_0x438cea:_0x459833};}}),_0x241e5b['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3a0089,{writer:_0x242304})=>_0x242304['createElement']('$marker',{'data-name':'comment:'+_0x3a0089['getAttribute']('id')})}),_0x241e5b['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x239154=this['editor'],_0x358665=_0x239154['plugins']['get'](oi),_0x2f387b=new Set(),_0x325b9a=new Set();_0x239154['model']['document']['registerPostFixer'](_0x442e62=>{let _0x908ba=!0x1;for(const {name:_0x49254f,data:_0x52c8ba}of _0x239154['model']['document']['differ']['getChangedMarkers']()){const {group:_0x549e7d,id:_0x3063a4}=fi(_0x49254f);let _0x3019a8=_0x52c8ba['newRange'];if('comment'!==_0x549e7d||!_0x3019a8)continue;const _0x527f3f='$graveyard'===_0x3019a8['root']['rootName'];_0x527f3f||(_0x3019a8=_i(_0x3019a8,_0x239154['model']),!_0x3019a8||_0x3019a8['isCollapsed']||!_0x52c8ba['newRange']||_0x3019a8['isEqual'](_0x52c8ba['newRange']))?_0x239154['model']['hasContent'](_0x3019a8)&&!_0x527f3f?this['isThreadsLoadingPaused']?_0x2f387b['add'](_0x49254f):this['_handleThreadMarker'](_0x49254f,_0x3063a4):(_0x325b9a['add'](_0x49254f),_0x2f387b['delete'](_0x49254f),_0x442e62['removeMarker'](_0x49254f),_0x908ba=!0x0):(_0x442e62['updateMarker'](_0x49254f,{'range':_0x3019a8}),_0x908ba=!0x0);}return _0x908ba;}),this['on']('change:isThreadsLoadingPaused',(_0x28d28e,_0x29aa6f,_0xb34865)=>{if(!_0xb34865&&_0x2f387b['size'])for(const _0x47ba07 of _0x2f387b){const {id:_0x3106d7}=fi(_0x47ba07);_0x2f387b['delete'](_0x47ba07),_0x239154['model']['markers']['get'](_0x47ba07)&&this['_handleThreadMarker'](_0x47ba07,_0x3106d7);}}),this['listenTo'](_0x239154['model']['document'],'change',()=>{for(const {name:_0x4dac83,data:{newRange:_0x339567}}of _0x239154['model']['document']['differ']['getChangedMarkers']()){const {group:_0x315092,id:_0x21c785}=fi(_0x4dac83);if('comment'!==_0x315092)continue;const _0x409c43=_0x358665['getCommentThread'](_0x21c785),_0x583215=this['hasMarkerForId'](_0x21c785);_0x409c43&&(!_0x409c43['_hasTargetInContent']&&_0x339567&&_0x239154['editing']['view']['once']('render',()=>{const _0x376676=_0x239154['plugins']['get'](ti),_0x3fc4c3=_0x358665['_threadToController']['get'](_0x409c43)['view'];_0x376676['getByInnerView'](_0x3fc4c3)['refreshVisibility']();},{'priority':'low'}),_0x409c43['_hasTargetInContent']=_0x583215||!!_0x339567),_0x339567||(_0x325b9a['add'](_0x4dac83),_0x2f387b['delete'](_0x4dac83));}for(const _0x2d5467 of _0x325b9a){const {id:_0x2a4d43}=fi(_0x2d5467),_0x1c42df=_0x358665['getCommentThread'](_0x2a4d43);if(_0x2f387b['delete'](_0x2d5467),!_0x1c42df)continue;const _0x55713b=this['hasMarkerForId'](_0x2a4d43);_0x55713b||_0x1c42df['isSubmitted']?_0x55713b||_0x1c42df['unlinkedAt']||_0x1c42df['setUnlinkedAt'](new Date()):_0x1c42df['remove']();}_0x325b9a['clear']();});}_handleInitialThreads(_0x5efd62){_0x5efd62['forEach'](_0x5682f8=>{_0x5682f8['unlinkedAt']&&this['_attachArchivedThread'](_0x5682f8['id']);});}_getTargetForId(_0x1599b9){const _0x34827f=this['editor'],_0x296a88=this['getAllMarkersForId'](_0x1599b9);return _0x4d8fce(_0x34827f['editing'],_0x296a88);}_getTextContext(_0x3503a0){const _0x33e956=this['getAllMarkersForId'](_0x3503a0);let _0x435ef5='',_0x58683e=!0x1;for(const _0x2b4808 of _0x33e956){const _0x2e966b=_0x2b4808['getRange']();for(const _0x2e0cbd of Array['from'](_0x2e966b['getItems']()))_0x2e0cbd['is']('$textProxy')?(_0x435ef5&&_0x58683e&&(_0x435ef5+='\x20',_0x58683e=!0x1),_0x435ef5+=_0x2e0cbd['data']):_0x58683e=!0x0;_0x58683e=!0x0;}return _0x435ef5['substring'](0x0,0x96);}_attachMarkerToThread(_0xc8a538,_0x8260f5){const _0x4cdc54=this['editor'],_0x33de08=_0x4cdc54['plugins']['get'](oi);let _0x34f3f0=_0x33de08['getCommentThread'](_0x8260f5);const _0x500a5a=_0x4cdc54['config']['get']('collaboration.channelId'),_0xfef613=_0x4cdc54['plugins']['get'](di);return _0x34f3f0&&(_0x34f3f0['unlinkedAt']&&_0x34f3f0['setUnlinkedAt'](null),_0x34f3f0['isAttached'])||(this['getAllMarkersForId'](_0x8260f5)[0x0]['managedUsingOperations']?_0x33de08['fetchCommentThread']({'channelId':_0x500a5a,'threadId':_0x8260f5})['then'](_0x53a5fb=>{if('destroyed'!==_0x4cdc54['state']){if(_0x34f3f0=_0x53a5fb,_0x34f3f0&&!_0x34f3f0['isAttached']){const _0x36cc51=_0x34f3f0['attachTo'](()=>this['_getTargetForId'](_0x8260f5));_0xfef613['registerAnnotation'](_0x36cc51),_0x34f3f0['isResolved']&&this['_reconvertMarkers'](_0x8260f5);}else{if(!_0x34f3f0){const _0x3bc581=this['getAllMarkersForId'](_0x8260f5);_0x4cdc54['model']['change'](_0x536f0c=>{for(const _0x15e9eb of _0x3bc581)_0x536f0c['removeMarker'](_0x15e9eb);});}}}}):_0x4cdc54['editing']['view']['once']('render',()=>{if(_0x33de08['getCommentThread'](_0x8260f5))return;const _0x26f674=_0x4cdc54['plugins']['get'](ti);_0x34f3f0=_0x33de08['openNewCommentThread']({'channelId':_0x500a5a,'threadId':_0x8260f5,'target':()=>this['_getTargetForId'](_0x8260f5),'context':{'type':'text','value':this['_getTextContext'](_0x8260f5)}});const _0x450026=_0x33de08['_threadToController']['get'](_0x34f3f0)['view'],_0x5ff467=_0x26f674['getByInnerView'](_0x450026);_0x5ff467&&_0xfef613['registerAnnotation'](_0x5ff467);},{'priority':'low'})),_0x34f3f0;}['_handleThreadMarker'](_0x3b0c8c,_0x37210){const _0x16ea63=this['_attachMarkerToThread'](_0x3b0c8c,_0x37210);_0x16ea63&&!_0x16ea63['context']&&_0x16ea63['setContext']({'type':'text','value':this['_getTextContext'](_0x37210)});}_initAriaMarkerChangeAnnouncements(){const _0x1eb04e=this['editor'];_0xc402b0(_0x1eb04e['model'],({left:_0x46a0a5,entered:_0x3efbfe})=>{for(const _0x597b49 of _0x46a0a5)if(Ai(_0x597b49)){_0x1eb04e['ui']['ariaLiveAnnouncer']['announce'](Et(_0x1eb04e['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5eb2f5 of _0x3efbfe)if(Ai(_0x5eb2f5)){_0x1eb04e['ui']['ariaLiveAnnouncer']['announce'](Et(_0x1eb04e['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x763933(_0x2911f2)));break;}});}};function gi(_0x1014fe,_0x3a8bce){return _0x3a8bce?_0x1014fe+':'+_0x3a8bce:_0x1014fe;}function _i(_0x5aee79,_0x528599){const _0x2d8e0e=_0x528599['schema'],_0x5cd6ff=_0x528599['createRange'](_0x5aee79['start']);for(const _0xef23f6 of _0x5aee79['getWalker']()){const {type:_0x2518f1,item:_0x178a00,nextPosition:_0x18ca0f}=_0xef23f6;if('text'===_0x2518f1||_0x2d8e0e['isObject'](_0x178a00)){const _0x305c8b=_0x528599['createPositionBefore'](_0x178a00);_0x5cd6ff['isCollapsed']&&(_0x5cd6ff['start']=_0x305c8b),_0x5cd6ff['end']=_0x18ca0f;}}return _0x5cd6ff;}function Ai(_0x27ea2c){return'comment'===fi(_0x27ea2c['name'])['group'];}var vi=class extends _0x1be51f{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x45920a=this['editor'],_0x4f6e46=_0x45920a['plugins']['get'](oi),_0x34d5f5=_0x45920a['plugins']['get'](wi),_0x5b97a8=_0x45920a['plugins']['get'](ti),_0x242d6d=_0x45920a['plugins']['get'](di);_0x45920a['ui']['componentFactory']['add']('comment',()=>{const _0x23a10a=this['_createUIButton'](_0x282792);return _0x23a10a['tooltip']=!0x0,_0x23a10a;}),_0x45920a['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x242d6d['addSourceCollector'](()=>{const _0x4cee45=[];for(const [_0x50de6b,_0x210551]of _0x4f6e46['_threadToController']){const _0x6f27b4=_0x34d5f5['getAllMarkersForId'](_0x50de6b['id']),_0x45de72=_0x6f27b4['map'](_0x62dac5=>_0x62dac5['getRange']());_0x6f27b4['length']>0x0&&_0x4cee45['push']([_0x210551['view'],_0x45de72]);}return _0x4cee45;}),this['listenTo'](_0x5b97a8,'change:activeAnnotations',(_0x2794ae,_0x10f842,_0xdbcde5)=>{const _0x4786f7=Array['from'](_0xdbcde5)['map'](_0x1cf960=>_0x1cf960['innerView'])['find'](_0x5a7e10=>_0x4f6e46['_viewToController']['has'](_0x5a7e10));if(!_0x4786f7)return void(_0x34d5f5['activeMarker']=null);const _0x35547c=_0x4f6e46['_viewToController']['get'](_0x4786f7)['model']['id'],_0x1dbbf4='comment:'+_0x35547c;_0x35547c&&_0x34d5f5['hasMarkerForId'](_0x35547c)?_0x34d5f5['activeMarker']=_0x1dbbf4:_0x34d5f5['activeMarker']&&(_0x34d5f5['activeMarker']=null);}),this['listenTo'](_0x4f6e46,'removeCommentThread',(_0x10f927,{threadId:_0x41a11d,isFromAdapter:_0x324efa})=>{!_0x324efa&&_0x45920a['ui']['focusTracker']['isFocused']&&_0x34d5f5['hasMarkerForId'](_0x41a11d)&&_0x45920a['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4f6e46,'addComment',(_0x3ee466,{threadId:_0x2daf42,isFromAdapter:_0x539134})=>{!_0x539134&&_0x34d5f5['hasMarkerForId'](_0x2daf42)&&_0x4f6e46['hasCommentThread'](_0x2daf42)&&0x1===_0x4f6e46['getCommentThread'](_0x2daf42)['length']&&(_0x45920a['editing']['view']['focus'](),_0x3ee466['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x74baff=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4926b3;for(const _0x1a6c01 in _0x74baff){const _0x1101f5=_0x1a6c01,_0x2b4526=_0x74baff[_0x1101f5];if('commentsLicenseKeyValid'==_0x2b4526||'commentsLicenseKeyInvalid'==_0x2b4526||'commentsLicenseKeyExpired'==_0x2b4526||'commentsLicenseKeyDomainLimit'==_0x2b4526||'commentsLicenseKeyNotAllowed'==_0x2b4526||'commentsLicenseKeyEvaluationLimit'==_0x2b4526||'commentsLicenseKeyUsageLimit'==_0x2b4526){delete _0x74baff[_0x1101f5],_0x4926b3=_0x2b4526,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4926b3&&_0x74baff['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4926b3&&_0x74baff['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4926b3&&_0x74baff['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4926b3&&_0x74baff['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4926b3&&_0x74baff['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x4926b3&&_0x74baff['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x18e8b1){const _0x13653a=this['editor'],_0x886f36=new _0x18e8b1(_0x13653a['locale']),_0x2cc6e2=_0x13653a['commands']['get']('addCommentThread');return _0x886f36['set']({'label':Et(_0x13653a['locale'],'Comment'),'icon':_0x90a89a}),_0x886f36['bind']('isEnabled')['to'](_0x2cc6e2,'isEnabled',_0x2cc6e2,'hasContent',(_0x5dfa96,_0x5a4181)=>_0x5dfa96&&_0x5a4181),this['listenTo'](_0x886f36,'execute',()=>{_0x2cc6e2['execute']();}),_0x886f36;}},yi=class extends _0x1be51f{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x548646){super(_0x548646),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x427863,_0x46d7b4,_0x764bca)=>{_0x764bca?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x38e84e,_0x41c717]of this['editor']['commands'])_0x41c717['affectsData']&&'addCommentThread'!==_0x38e84e&&_0x41c717['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 _0x4ff153=this['editor']['editing']['view']['document'];this['listenTo'](_0x4ff153,'cut',_0x53783a=>_0x53783a['stop'](),{'priority':'highest'}),this['listenTo'](_0x4ff153,'clipboardInput',_0x3928ff=>_0x3928ff['stop'](),{'priority':'highest'}),this['listenTo'](_0x4ff153,'delete',_0x906c20=>_0x906c20['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x3f07ff,_0x1d7e38]of this['editor']['commands'])_0x1d7e38['affectsData']&&'addCommentThread'!==_0x3f07ff&&_0x1d7e38['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']);}},Ti=class extends _0x2af6e8{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3c64aa){super(_0x3c64aa),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x507f09=this['context']['plugins']['get'](ti);this['listenTo'](_0x507f09,'_activateAnnotation',(_0x263d93,_0x5e8cba)=>{for(const _0xaddc7a of this['activeUIs']){const _0xb9cce=this['_uis']['get'](_0xaddc7a);(0x0,this['uisData']['get'](_0xaddc7a)['filter'])(_0x5e8cba)&&_0xb9cce['setActiveAnnotation'](_0x5e8cba);}}),this['listenTo'](_0x507f09,'_deactivateAllAnnotations',()=>{for(const _0x569b44 of this['activeUIs'])this['_uis']['get'](_0x569b44)['setActiveAnnotation'](null);}),this['listenTo'](_0x507f09['_visibleAnnotations'],'add',(_0x33dafd,_0x376d90)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x376d90);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x23166e){return this['activeUIs']['has'](_0x23166e);}activate(_0x5622df,_0x4b7431=this['defaultFilter']){const _0x178cc2=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x5622df))throw new _0x3ecee7('annotationsuis-missing-ui',this,{'uiName':_0x5622df});this['isActive'](_0x5622df)&&this['deactivate'](_0x5622df),this['activeUIs']['add'](_0x5622df);const _0x3f29fd=new Jt();Qt({'source':_0x178cc2['_visibleAnnotations'],'target':_0x3f29fd,'filter':_0x4b7431}),this['uisData']['set'](_0x5622df,{'collection':_0x3f29fd,'filter':_0x4b7431});const _0x461148=this['_uis']['get'](_0x5622df);_0x461148['attach'](_0x3f29fd),this['listenTo'](_0x461148,'change:activeAnnotation',(_0x224f65,_0x1d850e,_0xea8641,_0x36bcd7)=>{_0x36bcd7&&_0x178cc2['_removeActiveAnnotation'](_0x36bcd7),_0xea8641&&_0x178cc2['_addActiveAnnotation'](_0xea8641);});}deactivate(_0x77c004){if(this['activeUIs']['delete'](_0x77c004),!this['_uis']['has'](_0x77c004))throw new _0x3ecee7('annotationsuis-missing-ui',this,{'uiName':_0x77c004});const _0x999e64=this['_uis']['get'](_0x77c004);_0x999e64['detach'](),this['stopListening'](_0x999e64),this['uisData']['get'](_0x77c004)['collection']['destroy'](),this['uisData']['delete'](_0x77c004);}switchTo(_0x1feb39){if(!this['_uis']['has'](_0x1feb39))throw new _0x3ecee7('annotationsuis-missing-ui',this,{'uiName':_0x1feb39});const _0xc9e6fc=this['context']['plugins']['get'](ti),_0x57674e=Array['from'](_0xc9e6fc['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1feb39);const _0x263511=this['_uis']['get'](_0x1feb39);_0x263511['setActiveAnnotation'](_0x57674e),_0x263511['_setSelectedAnnotations']&&_0x57674e&&_0x263511['_setSelectedAnnotations']([_0x57674e]);}deactivateAll(){for(const _0x4fc397 of this['activeUIs'])this['deactivate'](_0x4fc397);}register(_0x18e117,_0x3d8f5a){if(this['_uis']['has'](_0x18e117))throw new _0x3ecee7('annotationsuis-register-already-registered');if('function'!=typeof _0x3d8f5a['attach']||'function'!=typeof _0x3d8f5a['detach']||'function'!=typeof _0x3d8f5a['setActiveAnnotation'])throw new _0x3ecee7('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x18e117,_0x3d8f5a);}refilterAnnotations(){const _0x4a7d5d=this['context']['plugins']['get'](ti)['collection'],_0x185047=new Map(),_0x39d693=Array['from'](this['activeUIs']);for(const _0x161065 of this['activeUIs']){const _0x4264b8=this['uisData']['get'](_0x161065)['collection'];for(const _0x4c47f6 of _0x4264b8)_0x185047['set'](_0x4c47f6,_0x161065);}for(const _0x1b0e31 of _0x4a7d5d){const _0x5bafc0=_0x185047['get'](_0x1b0e31);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1b0e31);const _0x5d3d6f=_0x39d693['find'](_0x2e45c3=>this['uisData']['get'](_0x2e45c3)['filter'](_0x1b0e31));_0x5bafc0!==_0x5d3d6f&&(_0x5bafc0&&this['uisData']['get'](_0x5bafc0)['collection']['remove'](_0x1b0e31),_0x5d3d6f&&this['uisData']['get'](_0x5d3d6f)['collection']['add'](_0x1b0e31));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x2ca898){const _0x3c1a0d=[];for(const _0x5da871 of this['activeUIs']){(0x0,this['uisData']['get'](_0x5da871)['filter'])(_0x2ca898)&&_0x3c1a0d['push'](_0x5da871);}if(_0x3c1a0d['length']>0x1)throw new _0x3ecee7('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3c1a0d,'annotationType':_0x2ca898['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x3988af('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x2e72c7){super(_0x2e72c7),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x34da60,_0x141840)=>_0x34da60+_0x141840),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x30bbfa=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x30bbfa['to']('isAnimationDisabled',_0x2eb180=>_0x2eb180?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x30bbfa['to']('top',_0xe02fec=>bi(_0xe02fec))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x3b625b=this['element']['clientHeight'];_0x3b625b&&(this['height']=_0x3b625b);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x2af6e8{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2dc7d6){super(_0x2dc7d6),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 _0x1549da=this['context']['config']['get']('sidebar.container');_0x1549da&&this['setContainer'](_0x1549da);}setContainer(_0x4f950a){if(!Oi(_0x4f950a))throw new _0x3ecee7('sidebar-setcontainer-invalid-element');this['container']=_0x4f950a;}_attachToContainer({viewClass:_0x31e63d='',spaceBetweenItems:_0x59bced=0x19}={}){if(!Oi(this['container']))throw new _0x3ecee7('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x31e63d,this['_spaceBetweenItems']=_0x59bced;}['rearrange']({removedAnnotation:_0x1c1d85,previousAnnotation:_0xd977ed,nextAnnotation:_0x5bf942}){const _0x216505=this['getSidebarItemView'](_0x1c1d85);this['view']['list']['remove'](_0x216505),this['_destroySidebarItemView'](_0x1c1d85),_0xd977ed&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xd977ed)),_0x5bf942&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5bf942)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4177a4,activatedAnnotation:_0xce7862,disableAnimationOnActivatedAnnotation:_0xb7b267}){if(this['_activeAnnotation']=_0xce7862,_0x4177a4){_0x4177a4['isActive']=!0x1;const _0x268125=this['getSidebarItemView'](_0x4177a4);_0x268125&&_0xb7b267&&(_0x268125['isAnimationDisabled']=!0x1);}if(_0xce7862){const _0x3b13f7=this['getSidebarItemView'](_0xce7862);_0x3b13f7&&(_0xce7862['isActive']=!0x0,_0xb7b267&&(_0x3b13f7['isAnimationDisabled']=!0x0,_0x3b13f7['top']+=0x1),this['_alignToTargetRect'](_0x3b13f7));}}_detachFromContainer(_0x383e15){if(this['view']['element']['remove'](),_0x383e15){for(const _0x428510 of _0x383e15)this['_destroySidebarItemView'](_0x428510);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x419aeb,_0x4b9c0e){_0x4b9c0e||(_0x4b9c0e=_0x419aeb['view']);const _0x3150d6=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3150d6,_0x419aeb),this['_annotationToSidebarItemView']['set'](_0x419aeb,_0x3150d6),_0x3150d6['content']['add'](_0x4b9c0e),this['listenTo'](_0x419aeb['view'],'change:targetRect',(_0x564157,_0x15d318,_0x3d96b4)=>{const _0x224825=this['_getTargetTop'](_0x419aeb,_0x3d96b4);_0x3150d6['_targetTop']!=_0x224825&&(_0x3150d6['_targetTop']=_0x224825,this['_setItemTop'](_0x3150d6,_0x224825));}),this['listenTo'](_0x3150d6,'change:top',()=>{this['_recalculate'](_0x3150d6,'top');}),this['listenTo'](_0x3150d6,'change:bottom',()=>{this['_recalculate'](_0x3150d6,'bottom');}),this['_alignToTargetRect'](_0x3150d6);const _0x13eb83=this['_getItemBefore'](_0x3150d6);return _0x13eb83&&this['_alignAfterItem'](_0x13eb83,_0x3150d6)||this['_alignToTargetRect'](_0x3150d6),this['_updateLastItem'](),this['view']['list']['add'](_0x3150d6),_0x3150d6;}['_alignForTopChange'](_0xdd4a59){if(!_0xdd4a59['content']['length'])return;const _0x4f646e=this['_getItemBefore'](_0xdd4a59);if(!_0x4f646e)return;const _0x306a8b=this['_sidebarItemViewToAnnotation']['get'](_0x4f646e),_0x354b08=this['_activeAnnotation'];_0x354b08&&_0x354b08===_0x306a8b?this['_alignAfterItem'](_0x4f646e,_0xdd4a59):this['_alignBeforeItem'](_0xdd4a59,_0x4f646e);}_alignForBottomChange(_0x34653a){if(!_0x34653a['content']['length'])return;const _0x602a38=this['_getItemAfter'](_0x34653a);if(!_0x602a38)return;const _0x14300f=this['_sidebarItemViewToAnnotation']['get'](_0x602a38),_0x141869=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xb79b28=this['_activeAnnotation'];_0xb79b28&&_0xb79b28===_0x14300f&&_0x141869?(this['_alignBeforeItem'](_0x602a38,_0x34653a),this['_alignAfterItem'](_0x34653a,_0x602a38)):_0xb79b28&&_0xb79b28===_0x14300f?this['_alignBeforeItem'](_0x602a38,_0x34653a):this['_alignAfterItem'](_0x34653a,_0x602a38);}_recalculate(_0x2c659c,_0x3ea16b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x6612de,changedProp:_0x1907c4}of this['_recalculateBuffer'])'top'===_0x1907c4?this['_alignForTopChange'](_0x6612de):this['_alignForBottomChange'](_0x6612de);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2c659c,'changedProp':_0x3ea16b});}getSidebarItemView(_0x14e172){return this['_annotationToSidebarItemView']['get'](_0x14e172);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x592b12){const _0x59721d=this['getSidebarItemView'](_0x592b12);this['stopListening'](_0x59721d),this['stopListening'](_0x592b12['view']),_0x59721d['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x592b12),this['_sidebarItemViewToAnnotation']['delete'](_0x59721d);}_createSidebarView(){const _0x12615d=new Ii(this['context']['locale']);return _0x12615d['render'](),this['on']('change:_lastItem',(_0x105f5f,_0x562689,_0x5121b8,_0x290337)=>{_0x290337&&_0x12615d['unbind']('minHeight'),_0x5121b8?_0x12615d['bind']('minHeight')['to'](_0x5121b8,'bottom'):_0x12615d['minHeight']=null;}),_0x12615d;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x25206d){const _0x2d7b0a=this['_sidebarItemViewToAnnotation']['get'](_0x25206d),_0x469da2=_0x2d7b0a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2d7b0a)-0x1);return _0x469da2&&this['getSidebarItemView'](_0x469da2)||null;}_getItemAfter(_0x4d73a9){const _0x51b133=this['_sidebarItemViewToAnnotation']['get'](_0x4d73a9),_0x31c72e=_0x51b133&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x51b133)+0x1);return _0x31c72e&&this['getSidebarItemView'](_0x31c72e)||null;}_alignBeforeItem(_0x2f8229,_0x303a27){_0x2f8229['updateHeight']();const _0xdf8a1c=Ni(_0x303a27['bottom']+this['_spaceBetweenItems'],_0x2f8229['top']);return!!_0xdf8a1c&&(this['_setItemTop'](_0x303a27,_0x303a27['top']-_0xdf8a1c),!0x0);}_alignAfterItem(_0x45c107,_0x4add23){_0x45c107['updateHeight']();const _0x3fcf59=Ni(_0x45c107['bottom']+this['_spaceBetweenItems'],_0x4add23['top']);return!!_0x3fcf59&&(this['_setItemTop'](_0x4add23,_0x4add23['top']+_0x3fcf59,!0x1),!0x0);}_alignToTargetRect(_0xa09bf2){const _0x43c2d1=this['_sidebarItemViewToAnnotation']['get'](_0xa09bf2);if(!_0x43c2d1||!_0x43c2d1['target']||!_0x43c2d1['targetRect'])return;const _0x590a83=this['_getTargetTop'](_0x43c2d1,_0x43c2d1['targetRect']);this['_setItemTop'](_0xa09bf2,_0x590a83);}_getTargetTop(_0x2faaac,_0x489114){if(null===_0x489114)return 0x0;if(_0x2faaac['target']instanceof _0x2b2cae)return _0x489114['top'];{const _0x4c5398=new _0x2b2cae(this['view']['element'])['top'];return _0x489114['top']-_0x4c5398;}}_setItemTop(_0x2d685a,_0x4f7f0c,_0x2a4816=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2a4816&&(_0x4f7f0c=Math['max'](_0x4f7f0c,this['_getMaxAvailableTop'](_0x2d685a))),_0x2d685a['top']=_0x4f7f0c;}_getMaxAvailableTop(_0x35930e){let _0x4e9f33=this['_getItemBefore'](_0x35930e),_0x547622=0x0;for(;_0x4e9f33;)_0x4e9f33['updateHeight'](),_0x547622+=this['_spaceBetweenItems']+_0x4e9f33['height'],_0x4e9f33=this['_getItemBefore'](_0x4e9f33);return _0x547622;}};function Ni(_0x3d0b50,_0xe52c51){return Math['max'](_0x3d0b50-_0xe52c51,0x0);}function Oi(_0x37b521){return null!==_0x37b521&&'object'==typeof _0x37b521&&0x1===_0x37b521['nodeType'];}var Mi=class extends _0x2af6e8{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x85230e){super(_0x85230e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x41383a(),this['_refreshPositioningDebounced']=_0x2207c0(()=>{_0x85230e['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x436fb3=this['context']['plugins']['get'](Ti),_0x2e9923=this['context']['plugins']['get'](ki);_0x436fb3['register']('wideSidebar',this),_0x2e9923['container']&&_0x436fb3['switchTo']('wideSidebar');}setActiveAnnotation(_0x382da7){if(_0x382da7===this['activeAnnotation'])return;const _0x4f35eb=this['context']['plugins']['get'](ki);_0x4f35eb['_activeAnnotation']=_0x382da7;const _0x2153f5=this['activeAnnotation'];_0x4f35eb['refresh']({'blurredAnnotation':_0x2153f5,'activatedAnnotation':_0x382da7}),this['activeAnnotation']=_0x382da7;}attach(_0x1b09a7){this['annotations']=_0x1b09a7;const _0x1881aa=this['context']['plugins']['get'](ki);if(_0x1881aa['_annotations']=_0x1b09a7,this['isAttached'])throw new _0x3ecee7('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1881aa,'set:container',()=>{this['detach'](),this['listenTo'](_0x1881aa,'change:container',_0x3bd038=>{_0x3bd038['off'](),this['attach'](_0x1b09a7);});}),_0x1881aa['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x204001=_0x4d1c3d=>{_0x4d1c3d['updateTargetRect'](),_0x1881aa['addAnnotation'](_0x4d1c3d);};for(const _0xa308cb of _0x1b09a7)_0x204001(_0xa308cb);this['listenTo'](_0x1b09a7,'add',(_0x1117f3,_0x479230)=>{_0x204001(_0x479230);}),this['listenTo'](_0x1b09a7,'remove',(_0x1f6d5e,_0x4d2f24,_0x50b944)=>{_0x1881aa['rearrange']({'removedAnnotation':_0x4d2f24,'previousAnnotation':_0x1b09a7['get'](_0x50b944-0x1),'nextAnnotation':_0x1b09a7['get'](_0x50b944+0x1)}),_0x4d2f24===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1b09a7,'focus',(_0x3002ef,_0x325bb2)=>{this['setActiveAnnotation'](_0x325bb2);}),this['listenTo'](_0x1b09a7,'blur',()=>{this['setActiveAnnotation'](null);});const _0x43d9b2=this['context']instanceof _0x11e6d2?this['context']['editors']:new _0x41383a([this['context']]);for(const _0x11a31f of _0x43d9b2)this['_integrateWithEditorAnnotations'](_0x11a31f);this['listenTo'](_0x43d9b2,'add',(_0x2e9895,_0x47db54)=>{this['listenTo'](_0x47db54,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x47db54);});}),this['listenTo'](_0x43d9b2,'remove',(_0x357e72,_0x296a6c)=>{_0x296a6c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x296a6c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x3ecee7('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3cd3d0=this['context']['plugins']['get'](ki);_0x3cd3d0['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3cd3d0),this['stopListening'](this['annotations']),this['context']instanceof _0x11e6d2&&this['stopListening'](this['context']['editors']);for(const _0x2a7375 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2a7375);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x53de58){if(!_0x53de58['plugins']['has']('EditorAnnotations'))return;const _0x25a54a=_0x53de58['plugins']['get']('EditorAnnotations'),_0x4ae58b=()=>{const _0x14c34a=_0x25a54a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x14c34a[0x0]||null);};this['listenTo'](_0x25a54a,'refresh',_0x4ae58b),this['listenTo'](_0x25a54a,'blur',(_0x51a7af,{isAnnotationTracked:_0xc1dcf})=>{this['activeAnnotation']&&_0xc1dcf(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x25a54a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x10950a=>{_0x25a54a['hasDomSelection']()&&(_0x4ae58b(),_0x10950a['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x25a54a);}_destroyEditorAnnotationsIntegration(_0x231b1b){this['stopListening'](_0x231b1b),this['_editorAnnotations']['remove'](_0x231b1b);}},Ri=class extends _0x282792{counterView;constructor(_0x3273b5){super(_0x3273b5);const _0x46a193=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x1df05b,_0x3ea513)=>_0x1df05b?'...':_0x3ea513['toString']()),this['set']('annotationType',''),this['icon']=_0x90a89a,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x46a193['to']('annotationType',_0x11e1b7=>'ck-annotation-counter__badge--'+_0x11e1b7),_0x46a193['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x46a193['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x2af6e8{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59ca09){super(_0x59ca09),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x229f7c())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x41383a(),this['_refreshPositioningDebounced']=_0x2207c0(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x513358(this['context']['locale']),this['balloonPanelView']=new _0x3e0ed6(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x2b449a){this['annotations']=_0x2b449a;const _0xdc2ca8=this['context']['plugins']['get'](ki),_0x49fc97=this['balloonPanelView'];if(_0xdc2ca8['_annotations']=_0x2b449a,this['isAttached'])throw new _0x3ecee7('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xdc2ca8,'set:container',()=>{this['detach'](),this['listenTo'](_0xdc2ca8,'change:container',_0x6f94ae=>{_0x6f94ae['off'](),this['attach'](_0x2b449a);});}),_0xdc2ca8['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x567658=_0x53e195=>{const _0x33ddee=new Ri(this['context']['locale']);_0xdc2ca8['addAnnotation'](_0x53e195,_0x33ddee),this['_annotationToNarrowView']['set'](_0x53e195,_0x33ddee),_0x33ddee['bind']('isDirty','annotationType','number')['to'](_0x53e195['view'],'isDirty','type','length'),_0x33ddee['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x49fc97['content']['first']!==_0x53e195['view']?(this['_showBalloon'](_0x53e195),_0x53e195['view']['element']['focus'](),this['setActiveAnnotation'](_0x53e195)):this['setActiveAnnotation'](null);});};for(const _0x2bcfec of _0x2b449a)_0x567658(_0x2bcfec);this['listenTo'](_0x2b449a,'add',(_0x31fe80,_0x31834e)=>{_0x567658(_0x31834e);}),this['listenTo'](_0x2b449a,'remove',(_0x43ffc4,_0x181374,_0x263e0e)=>{this['_annotationToNarrowView']['get'](_0x181374)['destroy'](),this['_annotationToNarrowView']['delete'](_0x181374),_0xdc2ca8['rearrange']({'removedAnnotation':_0x181374,'previousAnnotation':_0x2b449a['get'](_0x263e0e-0x1),'nextAnnotation':_0x2b449a['get'](_0x263e0e+0x1)}),_0x181374===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2b449a,'focus',(_0x10e442,_0x2343a9)=>{this['setActiveAnnotation'](_0x2343a9);}),this['listenTo'](_0x2b449a,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4afae2,_0x3bef30)=>{_0x3bef30['keyCode']===_0xbcd74f['esc']&&_0x49fc97['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x49fc97['content']['first']),this['_hideBalloon'](),_0x3bef30['stopPropagation'](),_0x3bef30['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x383ced,_0x146482)=>{const _0x32b9cd=_0x146482['target'];_0x49fc97['isVisible']&&_0x49fc97['element']['contains'](_0x32b9cd)||_0xdc2ca8['view']['element']['contains'](_0x32b9cd)||_0x383ced['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3d1491=>_0x3d1491['contains'](_0x32b9cd))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x4623cf=this['context']instanceof _0x11e6d2?this['context']['editors']:new _0x41383a([this['context']]);for(const _0x222bb3 of _0x4623cf)this['_integrateWithEditorAnnotations'](_0x222bb3);this['listenTo'](_0x4623cf,'add',(_0x3481f3,_0x1921c7)=>{this['listenTo'](_0x1921c7,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1921c7);});}),this['listenTo'](_0x4623cf,'remove',(_0x43a4b9,_0x2dbc42)=>{_0x2dbc42['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2dbc42['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x44c911){if(_0x44c911===this['activeAnnotation'])return;const _0xa29059=this['context']['plugins']['get'](ki);_0xa29059['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x44c911,'disableAnimationOnActivatedAnnotation':!0x0}),_0x44c911&&_0xa29059['getSidebarItemView'](_0x44c911)?this['_showBalloon'](_0x44c911):this['_hideBalloon'](),this['activeAnnotation']=_0x44c911;}detach(){if(!this['isAttached'])throw new _0x3ecee7('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5a0494=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5f55aa=>_0x5f55aa['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5a0494['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x11e6d2&&this['stopListening'](this['context']['editors']);for(const _0x4a7ebd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4a7ebd);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(_0x55d3d6){if(!_0x55d3d6['plugins']['has']('EditorAnnotations'))return;const _0x118ffd=_0x55d3d6['plugins']['get']('EditorAnnotations'),_0x4a2bd1=this['context']['plugins']['get'](ki),_0x21553d=this['annotations'],_0x1fa17a=this['balloonPanelView'],_0x5115ab=()=>{const _0x26917a=_0x118ffd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x26917a),this['setActiveAnnotation'](_0x26917a[0x0]||null);};this['listenTo'](_0x118ffd,'refresh',_0x5115ab),this['listenTo'](_0x118ffd,'blur',(_0x4840f7,{isAnnotationTracked:_0x3815dc})=>{this['activeAnnotation']&&_0x3815dc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x118ffd,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x21553d,'blur',_0x52363c=>{_0x118ffd['hasDomSelection']()&&_0x52363c['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5639c7,_0x33b484)=>{const _0x918e04=_0x33b484['target'];_0x1fa17a['isVisible']&&_0x1fa17a['element']['contains'](_0x918e04)||_0x4a2bd1['view']['element']['contains'](_0x918e04)||this['activeAnnotation']&&_0x118ffd['hasDomSelection']()&&(_0x5115ab(),_0x5639c7['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x118ffd);}_destroyEditorAnnotationsIntegration(_0x53081b){_0x53081b&&(this['stopListening'](_0x53081b),this['_editorAnnotations']['remove'](_0x53081b));}_setSelectedAnnotations(_0x1bcac5){for(const _0x522b94 of this['_selectedAnnotations'])_0x1bcac5['includes'](_0x522b94)||this['_manuallyClosedAnnotationViews']['delete'](_0x522b94['view']);this['_selectedAnnotations']=_0x1bcac5;}_refreshPositioning(){const _0xbc71ee=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xbc71ee['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1de34c){if(this['_manuallyClosedAnnotationViews']['has'](_0x1de34c['view']))return;const _0x1c8a81=this['balloonPanelView']['content']['first'];_0x1c8a81!==_0x1de34c['view']?(_0x1c8a81&&this['_detachListeners'](_0x1c8a81),this['_attachListeners'](_0x1de34c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1de34c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0xfe75b2=this['balloonPanelView']['content']['first'],_0x14b954=_0xfe75b2&&this['annotations']['getByView'](_0xfe75b2);if(!_0x14b954||!this['_annotationToNarrowView']['has'](_0x14b954))return;const _0x24c3ae=this['_annotationToNarrowView']['get'](_0x14b954)['element'],_0x49ac02=(function(){const _0x26d360=_0x3e0ed6['defaultPositions'];return[_0x26d360['southArrowNorthEast'],_0x26d360['northArrowSouthEast'],_0x26d360['southArrowNorth'],_0x26d360['northArrowSouth'],_0x26d360['southArrowNorthWest'],_0x26d360['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x24c3ae,'positions':_0x49ac02});}['_hideBalloon'](){const _0x1b61f2=this['balloonPanelView'],_0x196726=_0x1b61f2['content']['first'];_0x196726&&(this['_detachListeners'](_0x196726),_0x1b61f2['unpin'](),_0x1b61f2['content']['clear']());}_attachListeners(_0x4c325f){this['listenTo'](_0x4c325f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4c325f,'Esc',(_0x4289b8,_0x581218)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4c325f),this['_hideBalloon'](),_0x581218();});}_detachListeners(_0x3506dc){this['stopListening'](_0x3506dc);}},xi=class extends _0x1be51f{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x5261c0,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e872b){super(_0x4e872b),_0x4e872b['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4e872b['plugins']['get'](_0x5261c0),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x2207c0(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x3d3460=this['editor']['plugins']['get'](Ti);_0x3d3460['context']===this['editor']&&(_0x3d3460['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x5c0215,_0x3574b9)=>{const _0xbc6b83=this['_balloon'];if(this['isAttached']&&_0xbc6b83['visibleView']){const _0x489ad5=this['annotations']['getByView'](_0xbc6b83['visibleView']);_0x489ad5&&this['_closeAnnotation'](_0x489ad5),_0x3574b9();}}));}afterInit(){const _0xd59331=this['editor']['plugins']['get'](Ti);_0xd59331['context']===this['editor']&&(_0xd59331['hasActive']()||_0xd59331['switchTo']('inline'));}setActiveAnnotation(_0x574a4c){_0x574a4c!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x574a4c&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x574a4c)&&this['_addAnnotationToBalloon'](_0x574a4c,!0x0),_0x574a4c['isActive']=!0x0),_0x574a4c||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x574a4c);}attach(_0x4f4372){this['annotations']=_0x4f4372;const _0x164820=this['editor']['plugins']['get'](Ti),_0x2897be=this['_balloon'];if(this['isAttached'])throw new _0x3ecee7('inlineannotations-attach-already-attached',this);if(_0x164820['context']!==this['editor'])throw new _0x3ecee7('inlineannotations-not-allowed-with-context',this);const _0x382e3e=this['editor']['plugins']['get'](di);this['listenTo'](_0x382e3e,'refresh',()=>{const _0x114b13=_0x382e3e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x56a368,_0x4ecaca;!this['_forceRefresh']&&(_0x56a368=_0x114b13,_0x4ecaca=this['_selectedAnnotations'],_0x56a368['length']===_0x4ecaca['length']&&_0x56a368['every'](_0x30b490=>_0x4ecaca['includes'](_0x30b490)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x114b13),this['setActiveAnnotation'](_0x114b13[0x0]||null));}),this['listenTo'](_0x382e3e,'blur',(_0x2fb6bc,{isAnnotationTracked:_0x1a9993})=>{this['activeAnnotation']&&_0x1a9993(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x382e3e,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x55094e,_0x4cd54d,_0x50f782)=>{_0x50f782||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4f4372,'remove',(_0x41d8ad,_0x1f34f8)=>{this['_removeAnnotationFromBalloon'](_0x1f34f8),_0x1f34f8===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2897be,'change:visibleView',(_0x4e657e,_0x4f2479,_0x1dc9e0,_0x2f635d)=>{_0x2f635d&&this['stopListening'](_0x2f635d);const _0x586a83=_0x4f4372['getByView'](_0x1dc9e0);_0x1dc9e0&&_0x586a83&&(this['listenTo'](_0x1dc9e0,'change:height',()=>{_0x2897be['updatePosition']();}),this['listenTo'](_0x1dc9e0,'Esc',()=>{this['_closeAnnotation'](_0x586a83),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x586a83&&this['setActiveAnnotation'](_0x586a83));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x2897be['visibleView']&&_0x4f4372['getByView'](_0x2897be['visibleView'])&&_0x2897be['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 _0x3ecee7('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x262896 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x262896);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x57abf5){for(const _0x538416 of this['_selectedAnnotations'])_0x57abf5['includes'](_0x538416)||this['_manuallyClosed']['delete'](_0x538416);for(const _0x3fec82 of this['annotations'])_0x57abf5['includes'](_0x3fec82)||this['_removeAnnotationFromBalloon'](_0x3fec82);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5a8c91 of _0x57abf5)this['_addAnnotationToBalloon'](_0x5a8c91);}this['_selectedAnnotations']=_0x57abf5;}_addAnnotationToBalloon(_0x448a0f,_0x104a6b=!0x1){this['_manuallyClosed']['has'](_0x448a0f)||(this['_addedAnnotations']['has'](_0x448a0f)||this['_balloon']['hasView'](_0x448a0f['view'])||(this['_addedAnnotations']['add'](_0x448a0f),this['_balloon']['add']({'stackId':_0x448a0f['view']['id'],'view':_0x448a0f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x448a0f)}})),_0x104a6b&&this['_balloon']['showStack'](_0x448a0f['view']['id']));}_getBalloonTargetForAnnotation(_0x4b7a07){const _0x3109e7=_0x4b7a07['target'],_0x9abba6=this['editor']['editing']['view'],_0x47c5aa=_0x9abba6['document']['selection']['getFirstRange'](),_0xd57110=_0x9abba6['domConverter']['viewRangeToDom'](_0x47c5aa);if(_0xd57110['collapse'](!0x0),_0x3109e7){if(_0x3109e7 instanceof _0x2b2cae)return _0x3109e7;let _0x3e86aa=[];for(const _0x39966a of _0x3109e7)_0x3e86aa['push'](..._0x2b2cae['getDomElementRects'](_0x39966a));_0x3e86aa=function(_0x1651a0){const _0x519668=[];let _0x257d4b=_0x1651a0[0x0];for(let _0x44fad6=0x1;_0x44fad6<_0x1651a0['length'];_0x44fad6++)if(Pi(_0x257d4b,_0x1651a0[_0x44fad6])){const _0x4a764c=_0x1651a0[_0x44fad6]['width'];_0x257d4b['width']+=_0x4a764c,_0x257d4b['right']+=_0x4a764c;}else _0x519668['push'](_0x257d4b),_0x257d4b=_0x1651a0[_0x44fad6];return _0x519668['push'](_0x257d4b),_0x519668;}(_0x3e86aa);const _0x32979f=_0xd57110['getBoundingClientRect']();return _0x3e86aa['find'](_0x151dec=>_0x151dec['top']<=_0x32979f['top']&&_0x151dec['bottom']>=_0x32979f['bottom']&&_0x151dec['left']<=_0x32979f['left']&&_0x151dec['right']>=_0x32979f['right'])||_0x3e86aa[0x0];}return _0x4b7a07['targetRect']||_0xd57110;}_removeAnnotationFromBalloon(_0xf6b4ff){this['_addedAnnotations']['has'](_0xf6b4ff)&&this['_balloon']['hasView'](_0xf6b4ff['view'])&&(this['_addedAnnotations']['delete'](_0xf6b4ff),this['_balloon']['remove'](_0xf6b4ff['view']));}_closeAnnotation(_0x548dbc){this['_manuallyClosed']['add'](_0x548dbc),this['_removeAnnotationFromBalloon'](_0x548dbc);}};function Pi(_0x46af41,_0x1561e6){return _0x46af41['top']===_0x1561e6['top']&&_0x46af41['bottom']===_0x1561e6['bottom']&&_0x46af41['right']===_0x1561e6['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x395788,_0x57179d){super(_0x395788),this['set']('isEmpty',!_0x57179d['length']),this['focusTracker']=new _0x5346a9(),this['_annotationViews']=_0x57179d,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x57179d,'focusTracker':this['focusTracker']}),this['listenTo'](_0x57179d,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x57179d,'remove',(_0x1dbd08,_0x9362d)=>{_0x9362d['isActive']&&this['focus'](),_0x57179d['length']||(this['isEmpty']=!0x0);});const _0x1903d7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x395788,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x57179d},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1903d7['if']('isEmpty','ck-hidden',_0x2d049f=>!_0x2d049f)]},'children':[{'text':Et(_0x395788,'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 _0x319df1 of this['_annotationViews'])this['focusTracker']['add'](_0x319df1['element']);this['_annotationViews']['on']('change',(_0x10251e,{added:_0x19ca94,removed:_0x41f755})=>{for(const _0x41fe67 of _0x19ca94)this['focusTracker']['add'](_0x41fe67['element']);for(const _0x55b63d of _0x41f755)this['focusTracker']['remove'](_0x55b63d['element']);});}},Di=class extends _0x2af6e8{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x19db1b){super(_0x19db1b),this['archivedThreads']=new _0x41383a();}init(){const _0x354865=this['context'],_0xf4795d=_0x354865['plugins']['get'](oi),_0x47b278=_0x354865['plugins']['get'](ti);this['listenTo'](_0xf4795d,'addCommentThread',(_0x1d7bd6,{threadId:_0xf3e958})=>{const _0x4d4931=_0xf4795d['getCommentThread'](_0xf3e958);_0x4d4931['archivedAt']&&this['archivedThreads']['add'](_0x4d4931,this['_calculatePosition'](_0x4d4931['archivedAt'])),this['listenTo'](_0x4d4931,'change:archivedAt',(_0x1d6340,_0x2955ca,_0x3be950)=>{_0x3be950?this['archivedThreads']['has'](_0x4d4931)||this['archivedThreads']['add'](_0x4d4931,this['_calculatePosition'](_0x4d4931['archivedAt'])):this['archivedThreads']['has'](_0x4d4931)&&this['archivedThreads']['remove'](_0x4d4931);});}),this['listenTo'](_0xf4795d,'removeCommentThread',(_0x1be0ee,{threadId:_0x1c6cad})=>{const _0x4b6cfa=_0xf4795d['getCommentThread'](_0x1c6cad);this['stopListening'](_0x4b6cfa),this['archivedThreads']['has'](_0x4b6cfa)&&this['archivedThreads']['remove'](_0x4b6cfa);},{'priority':'highest'}),this['listenTo'](_0x47b278['collection'],'focus',(_0x3d2e1f,_0x26895a)=>{_0x26895a['isVisible']||(_0x26895a['isActive']=!0x0,_0x47b278['activate'](_0x26895a));});}_calculatePosition(_0x5c5271){const _0x5badf3=[...this['archivedThreads']]['findIndex'](_0xcbc72f=>_0xcbc72f['archivedAt']<_0x5c5271);return _0x5badf3>-0x1?_0x5badf3:this['archivedThreads']['length'];}},Vi=class extends _0x1be51f{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x5a3eab];}constructor(_0x1cae93){super(_0x1cae93),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x104397=this['editor'],_0x24ab0a=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x104397['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x282792,!0x0)),_0x104397['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xdc19=this['_createCommentsArchiveButton'](rt);return _0xdc19['set']({'role':'menuitemcheckbox'}),_0xdc19;});const _0x38ea82=_0x104397['plugins']['get'](Di),_0x300cec=_0x104397['plugins']['get']('Annotations'),_0x81115e=_0x104397['plugins']['get']('CommentsRepository');_0x38ea82['archivedThreads']['forEach'](_0x55a958=>{this['_handleNewThread'](_0x55a958);}),this['listenTo'](_0x38ea82['archivedThreads'],'add',(_0x472e6d,_0x2fbb76)=>{this['_handleNewThread'](_0x2fbb76);}),this['listenTo'](_0x300cec['collection'],'add',(_0x35a4b6,_0x4c43d6)=>{const _0x464dab=this['_pendingThreads']['find'](_0x4c0701=>{const _0x234eb5=_0x81115e['_threadToController']['get'](_0x4c0701);return _0x234eb5&&_0x4c43d6['innerView']===_0x234eb5['view'];});if(_0x464dab){const _0x5e5ead=this['_calculatePosition'](_0x464dab['archivedAt']);this['_addAnnotationToArchive'](_0x4c43d6,_0x5e5ead),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x464dab),0x1);}}),this['listenTo'](_0x38ea82['archivedThreads'],'remove',(_0x317ccd,_0xea93ad)=>{const _0x2e7ff7=_0x104397['config']['get']('collaboration.channelId');if(!_0x2e7ff7||_0xea93ad['channelId']===_0x2e7ff7){if(this['_pendingThreads']['includes'](_0xea93ad))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xea93ad),0x1);else{const _0x2c2bc1=_0x81115e['_threadToController']['get'](_0xea93ad),_0x2fe16b=_0x300cec['getByInnerView'](_0x2c2bc1['view']);this['annotationViews']['remove'](_0x2fe16b['view']),this['stopListening'](_0x2fe16b),this['stopListening'](_0x2fe16b['focusableElements']);}}}),this['listenTo'](_0x300cec['collection'],'add',(_0x5cbf28,_0xb4dbec)=>{this['listenTo'](_0xb4dbec,'escape',_0x24ab0a);}),this['listenTo'](_0x300cec['collection'],'remove',(_0xee14cb,_0x452795)=>{this['stopListening'](_0x452795,'escape',_0x24ab0a);});}_addAnnotationToArchive(_0xabae66,_0x28419c){this['listenTo'](_0xabae66,'set:isVisible',_0x275c31=>{_0x275c31['return']=!0x1,_0x275c31['stop']();}),this['annotationViews']['add'](_0xabae66['view'],_0x28419c);}['_handleNewThread'](_0x2cda2c){const _0x27e328=this['editor']['plugins']['get']('CommentsRepository'),_0x370740=this['editor']['plugins']['get']('Annotations'),_0x1499f5=this['editor']['config']['get']('collaboration.channelId');if(!_0x1499f5||_0x2cda2c['channelId']===_0x1499f5){const _0x22a27c=_0x27e328['_threadToController']['get'](_0x2cda2c);if(!_0x22a27c)return void this['_pendingThreads']['push'](_0x2cda2c);const _0x2f3acf=this['_calculatePosition'](_0x2cda2c['archivedAt']),_0x21fe22=_0x370740['getByInnerView'](_0x22a27c['view']);_0x21fe22['isVisible']&&_0x370740['_visibleAnnotations']['remove'](_0x21fe22),this['_addAnnotationToArchive'](_0x21fe22,_0x2f3acf);}}_calculatePosition(_0x17293f){const _0x5382ed=this['editor']['config']['get']('collaboration.channelId'),_0x4e943d=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x303059=>_0x303059['channelId']===_0x5382ed)['findIndex'](_0x1af30e=>_0x1af30e['archivedAt']<_0x17293f);return _0x4e943d<0x0||_0x4e943d>this['annotationViews']['length']?this['annotationViews']['length']:_0x4e943d-0x1;}_toggleDialog(){const _0x123041=this['editor'],_0x5c2f33=_0x123041['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x123041['locale'],this['annotationViews'])),'commentsArchive'===_0x5c2f33['id']?_0x5c2f33['hide']():_0x5c2f33['show']({'id':'commentsArchive','title':Et(_0x123041['locale'],'COMMENTS_ARCHIVE'),'icon':_0x549f8f,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x581f91['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x2a02dd,_0x5a5590=!0x1){const _0x381781=this['editor']['locale'],_0x5502fb=this['editor']['plugins']['get']('Dialog'),_0x52dc48=new _0x2a02dd(_0x381781);return _0x52dc48['bind']('isEnabled')['to'](this,'isEnabled'),_0x52dc48['bind']('isOn')['to'](_0x5502fb,'id',_0x30c2b2=>'commentsArchive'===_0x30c2b2),_0x52dc48['set']({'label':Et(_0x381781,'COMMENTS_ARCHIVE'),'icon':_0x549f8f,'isToggleable':!0x0}),_0x5a5590&&(_0x52dc48['tooltip']=!0x0),this['listenTo'](_0x52dc48,'execute',()=>this['_toggleDialog']()),_0x52dc48;}_hideDialogOnAnnotationEscape=_0xb7d26e=>{const _0x1d7cfa=_0xb7d26e['source'];if(!this['annotationViews']['has'](_0x1d7cfa['view']))return;const _0x2af9ca=this['editor']['plugins']['get']('Dialog');_0x2af9ca['isOpen']&&'commentsArchive'===_0x2af9ca['id']&&(_0x2af9ca['hide'](),_0xb7d26e['stop']());};},Bi=class extends _0x1be51f{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
|
|
23
|
+
import{Command as _0x4b3fde,Context as _0x183b13,ContextPlugin as _0x2c4b59,Editor as _0x5492c1,PendingActions as _0x2980ce,Plugin as _0x58cf6e}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x5747ed,Collection as _0x38ae04,DomEmitterMixin as _0x154718,FocusTracker as _0x2ee4f8,KeystrokeHandler as _0x20b46c,ObservableMixin as _0x341a46,Rect as _0x8c7c9a,diff as _0x17681f,first as _0xddc11,getEnvKeystrokeText as _0x43c020,keyCodes as _0x29ec50,priorities as _0xa1b45f,scrollViewportToShowTarget as _0x6018df,toUnit as _0x49a828,uid as _0x13b8e9}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x5c5c44,ConfirmMixin as _0x300d61,FOCUS_ANNOTATION_KEYSTROKE as _0x4d0567,LateFocusButtonView as _0x846bb4,LateFocusDropdownButtonView as _0x427b7d,UserView as _0x11d570,Users as _0x594727,getAllMarkersDomElementsSorted as _0x30c628,getDateTimeFormatter as _0xb022b2,hashObject as _0x4143fd,setupThreadKeyboardNavigation as _0x1025f3,surroundingMarkersDetector as _0x11c77c,trimHtml as _0x2c99e9}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x2fa8ae,debounce as _0x5cfde8,isEqual as _0x384a28,set as _0x2b800f,throttle as _0x407de3,unset as _0x2c4059}from'es-toolkit/compat';import{IconAddComment as _0xf7c9fb,IconCheck as _0x21f5cc,IconCommentsArchive as _0x340d1a,IconPencil as _0x335095,IconRemoveComment as _0x2494a9,IconThreeVerticalDots as _0x1c6791,IconUndo as _0x571716}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x4c312f,BodyCollection as _0x3fd2af,ButtonView as _0x370cb0,ContextualBalloon as _0xcec574,Dialog as _0x926d32,DialogViewPosition as _0x5d4ce6,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x341a46();var bt=class extends It{['model'];['view'];constructor(_0x2437e8,_0x4e8f8c){super(),this['model']=_0x2437e8,this['model']['_isAttached']=!0x0,this['view']=_0x4e8f8c,this['listenTo'](_0x4e8f8c,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4e8f8c,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4e8f8c,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4e8f8c,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4e8f8c,'addComment',(_0x23d21b,_0x4692ea)=>this['addComment'](_0x4692ea)),this['listenTo'](_0x4e8f8c,'updateComment',(_0x5478f1,_0x162339,_0x3332fe)=>this['updateComment'](_0x162339,_0x3332fe)),this['listenTo'](_0x4e8f8c,'removeComment',(_0x406070,_0x1c9b56)=>this['removeComment'](_0x1c9b56));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x1faf58){this['model']['addComment']({'content':_0x1faf58,'authorId':this['view']['_localUser']['id']});}updateComment(_0x6c681b,_0x3933f5){this['model']['getComment'](_0x6c681b)['update']({'content':_0x3933f5});}removeComment(_0x4e046b){this['model']['getComment'](_0x4e046b)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x24c562,_0x45ead9,_0x1e03d6){const t=_0x24c562['t'];switch(_0x45ead9){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'},_0x1e03d6);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x1e03d6);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'},_0x1e03d6);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'},_0x1e03d6);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1e03d6);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'},_0x1e03d6);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'},_0x1e03d6);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'},_0x1e03d6);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'';}}var kt=class extends it{['main'];editable;constructor(_0x18a1b8,_0x496d70){super(_0x18a1b8);const _0xfb96b8=_0x13b8e9();this['main']=this['createCollection'](),this['editable']=new st(_0x18a1b8,_0x496d70,void 0x0,{'label':()=>Et(_0x18a1b8,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x18a1b8['uiLanguageDirection'],'lang':_0x18a1b8['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xfb96b8},'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']();}},Nt=class extends tt{['view'];constructor(_0x5d3535){super(_0x5d3535),this['view']=new kt(_0x5d3535['locale'],_0x5d3535['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x2af870=this['editor']['editing']['view'],_0x5132b5=this['view']['editable'];_0x5132b5['name']=_0x2af870['document']['getRoot']()['rootName'],this['view']['render']();const _0x3c6c2=_0x5132b5['element'];this['setEditableElement'](_0x5132b5['name'],_0x3c6c2),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2af870['attachDomRoot'](_0x3c6c2),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x341a46(_0x5492c1);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Ot)());constructor(_0x145d2f={}){(_0x145d2f=Object['assign']({},_0x145d2f))['plugins']||(_0x145d2f['plugins']=CommentEditor['defaultPlugins']),super(_0x145d2f),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0xae633e=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xae633e))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x7caee1=>{const _0x4483e0=this['model']['document']['getRoot'](),_0x529fbe=_0x4483e0&&_0x4483e0['getChild'](_0x4483e0['childCount']-0x1);_0x7caee1['setSelection'](_0x529fbe,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x42c880=this['editing']['view'],_0x4a3495=_0x42c880['document']['getRoot'](),_0x3c5ccf=_0x4a3495['getChild'](0x0);_0x4a3495['childCount']>0x1||!_0x3c5ccf||'p'!=_0x3c5ccf['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x42c880,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3c5ccf['placeholder']=this['placeholder']),ut({'view':_0x42c880,'element':_0x3c5ccf,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3c5ccf);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x25997a,_0x4518b2={}){super(_0x25997a),this['editor']=null,this['_editorConfig']=_0x4518b2,this['set']('value',_0x4518b2['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x25997a,'Reply...')),this['set']('submitLabel',Et(_0x25997a,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x20b46c(),this['focusTracker']=new _0x2ee4f8(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3a80e6=>!_0x3a80e6['defaultPrevented']},'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',(_0x3c63e0,_0x16503d)=>{this['cancelButtonView']['fire']('execute'),_0x16503d();}),this['keystrokes']['set']('Ctrl+Enter',(_0x48a5ab,_0xb805f6)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xb805f6());}),this['on']('submit',(_0x198eb6,_0x2f3e73)=>{_0x2f3e73['length']>0xfde8?(alert(Et(_0x25997a,'TOO_LONG_COMMENT_ALERT',[_0x2f3e73['length'],0xfde8])),_0x198eb6['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1e152c=this['editor'];this['element']['insertBefore'](_0x1e152c['ui']['element'],this['element']['firstChild']),_0x1e152c['model']['document']['on']('change',()=>this['value']=_0x1e152c['getData']()),_0x1e152c['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1e152c['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x56fe78){-0x1===_0x56fe78?(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:_0x531f90}=this,_0x4134dc=new _0x370cb0(_0x531f90);return _0x4134dc['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4134dc['withText']=!0x0,_0x4134dc['bind']('label')['to'](this,'submitLabel'),_0x4134dc['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4134dc['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x47c8ec,_0x1e26fe)=>!_0x1e26fe&&!!_0x47c8ec['trim']()),_0x4134dc;}_createCancelButton(){const {locale:_0x6b8329}=this,_0x5257cf=new _0x370cb0(_0x6b8329);return _0x5257cf['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x5257cf['label']=Et(_0x6b8329,'Cancel'),_0x5257cf['withText']=!0x0,_0x5257cf['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x5257cf;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2d70ec=>{this['focusTracker']['add'](_0x2d70ec['element']);}),this['focusables']['on']('change',(_0x2c9844,_0x1c7ca2)=>{for(const _0x55ca04 of Array['from'](_0x1c7ca2['added'])['reverse']())this['focusTracker']['add'](_0x55ca04['element']);});}},xt=class extends ht{constructor(_0x42c767,_0x530441,_0xc6946){super(_0x42c767),this['commentInputView']=new St(_0x42c767,_0xc6946),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5cf608,_0x2c9079)=>_0x5cf608||!!_0x2c9079),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 _0x11d570(_0x42c767,_0x530441),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'](_0x475140){this['commentInputView']['focus'](_0x475140);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x1e8378,_0x18f1b7)=>{const {submitButtonView:_0x39a7a6,cancelButtonView:_0x17f74c,editor:_0x59130c}=this['commentInputView'];[_0x39a7a6['element'],_0x17f74c['element'],_0x59130c?_0x59130c['editing']['view']['getDomRoot']():null]['filter'](_0x3ab5c0=>_0x3ab5c0)['some'](_0x12978c=>_0x12978c['contains'](_0x18f1b7['target']))||(this['focus'](),_0x18f1b7['preventDefault']());});}},Pt=class extends ht{constructor(_0x44f5df){super(_0x44f5df);const _0x4010b7=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4010b7['to']('count',_0x1fd7ef=>Et(_0x44f5df,'NUMBER_OF_COMMENTS',_0x1fd7ef))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0xcaeaa1,_0x3356c7,_0x6908d){super(_0xcaeaa1);const _0x4bcac5=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x3356c7['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x3356c7,this['_config']=_0x6908d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2ee4f8(),this['keystrokes']=new _0x20b46c(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1c38bf=>this['commentViews']['map'](_0x2875b1=>_0x2875b1['element'])['includes'](_0x1c38bf['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0xcaeaa1),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3776c8=>_0x3776c8-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5dfd98 of _0x3356c7['comments'])this['_handleNewCommentModel'](_0x5dfd98);this['_handleInfoComment'](),this['listenTo'](_0x3356c7['comments'],'add',(_0x478ee2,_0x2b716e)=>{const _0x5ac468=this['_calculatePosition'](_0x2b716e);this['length']++,this['_handleNewCommentModel'](_0x2b716e,_0x5ac468),this['refreshVisibleViews']();}),this['listenTo'](_0x3356c7['comments'],'remove',(_0x144210,_0x16cdb)=>{this['length']--,this['_handleRemoveCommentModel'](_0x16cdb),this['refreshVisibleViews']();}),this['listenTo'](_0x3356c7,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x3356c7,'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',_0x4bcac5['if']('length','ck-hidden',_0xb4f6aa=>!_0xb4f6aa)],'aria-label':Et(_0xcaeaa1,'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'](_0x4e8fcc){-0x1===_0x4e8fcc?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x3db5fa of this['commentViews'])_0x3db5fa['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x3d8102,_0x2bf3b7){const _0x4aef8d=new this['_config']['CommentView'](this['locale'],_0x3d8102,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4aef8d['viewUid']=_0x3d8102['id'],_0x4aef8d['delegate']('removeComment')['to'](this),_0x4aef8d['delegate']('updateComment')['to'](this),_0x4aef8d['delegate']('resolveCommentThread')['to'](this),_0x4aef8d['delegate']('editorReady')['to'](this),_0x4aef8d['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4aef8d,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4aef8d,_0x2bf3b7);}_calculatePosition(_0x1dc10e){const _0x29f6d4=this['_model']['_findOptimalIndex'](_0x1dc10e);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1dc10e['authoredAt']?_0x29f6d4-0x1:_0x29f6d4:_0x29f6d4-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x48eb3b={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x48eb3b,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x48eb3b));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0xe1188d){const _0x1b9d7f=this['commentViews']['remove'](_0xe1188d['id']);this['stopListening'](_0x1b9d7f),_0x1b9d7f['isEditMode']&&this['_updateHasDirtyComment'](),_0x1b9d7f['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0xedf423=>_0xedf423['isEditMode']);}['_rearrangeCollapse'](){const _0x525f2d=function(_0x3c2788){const _0x370236=new _0x38ae04();for(const _0x4ab577 of _0x3c2788)_0x370236['add'](_0x4ab577);return _0x370236;}(this['commentViews']),_0x3f2828=this['_collapsedCommentsView']['count'];for(let _0x5366df=0x1;_0x5366df<=_0x3f2828;_0x5366df++)_0x525f2d['remove'](0x1);for(const _0x5e623a of _0x525f2d)_0x5e623a['collapse']();_0x3f2828>0x0&&_0x525f2d['add'](this['_collapsedCommentsView'],0x1),Dt(_0x17681f(Array['from'](this['visibleViews']),Array['from'](_0x525f2d)),this['visibleViews'],_0x525f2d);}['_rearrangeExpand'](){Dt(_0x17681f(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xb0533f of this['visibleViews'])_0xb0533f['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x1be5c7=>{this['focusTracker']['add'](_0x1be5c7['element']),this['keystrokes']['listenTo'](_0x1be5c7['element']);}),this['commentViews']['on']('change',(_0x4a1d0a,_0x21e173)=>{for(const _0x2853af of _0x21e173['removed'])this['focusTracker']['remove'](_0x2853af['element']),this['keystrokes']['stopListening'](_0x2853af['element']);for(const _0x39a707 of Array['from'](_0x21e173['added'])['reverse']())this['focusTracker']['add'](_0x39a707['element']),this['keystrokes']['listenTo'](_0x39a707['element']);});}};function Dt(_0xe36544,_0x2afcb3,_0x57a84b){let _0x50c57a=0x0;for(const _0x1dcce2 of _0xe36544)switch(_0x1dcce2){case'insert':_0x2afcb3['add'](_0x57a84b['get'](_0x50c57a),_0x50c57a),_0x50c57a++;break;case'delete':_0x2afcb3['remove'](_0x50c57a);break;case'equal':_0x50c57a++;}}var Vt=class extends ht{constructor(_0x4e63a5){super(_0x4e63a5);const _0x35589e=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x35589e['to']('contextValue',_0x333a9d=>Et(_0x4e63a5,'THREAD_CONTEXT_LABEL',_0x333a9d)),'tabindex':-0x1},'children':[{'text':_0x35589e['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x46ec83,_0x4e5f7f){super(_0x46ec83);const _0x1a1883=this['bindTemplate'];this['_model']=_0x4e5f7f,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2ee4f8(),this['keystrokes']=new _0x20b46c(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4e5abf=>!!_0x4e5abf),this['bind']('contextValue')['to'](this['_model'],'context',_0x3784e6=>_0x3784e6&&_0x3784e6['value']?this['_trimContextValue'](_0x3784e6['value']):Et(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',_0x1a1883['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 _0xbd924c=new _0x370cb0(this['locale']);return _0xbd924c['label']=Et(this['locale'],'Reopen'),_0xbd924c['tooltip']=Et(this['locale'],'Reopen'),_0xbd924c['icon']=_0x571716,_0xbd924c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x55be6f=>!_0x55be6f),_0xbd924c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2b9ddd,_0x106211)=>_0x2b9ddd&&_0x106211),_0xbd924c['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0xbd924c;}_trimContextValue(_0x23f180){if(_0x23f180['length']<0x96)return _0x23f180;const _0x289da5=_0x23f180['lastIndexOf']('\x20',0x93);return _0x23f180['substring'](0x0,_0x289da5>-0x1?_0x289da5:0x93)+'...';}_attachContextActions(){const _0x3d43f9=this['element']['querySelector']('.ck-context'),_0x4acfd3=_0x3d43f9['querySelector']('.ck-context__value');this['listenTo'](_0x3d43f9,'mouseenter',()=>{_0x4acfd3['offsetWidth']<_0x4acfd3['scrollWidth']&&_0x3d43f9['classList']['add']('overlay');}),this['listenTo'](_0x3d43f9,'mouseleave',()=>{_0x3d43f9['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x1b4d7d of this['focusables'])this['focusTracker']['add'](_0x1b4d7d['element']),this['keystrokes']['listenTo'](_0x1b4d7d['element']);}_createContextView(){const _0x22be6a=new Vt(this['locale']);return _0x22be6a['bind']('contextValue')['to'](this),_0x22be6a;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x512c7c,_0x35761d,_0x44d17c,_0x4cd0da){super(_0x512c7c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x35761d,this['_localUser']=_0x44d17c,this['_config']=_0x4cd0da,this['commentThreadHeaderView']=new Bt(_0x512c7c,_0x35761d),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x5c5c44(_0x512c7c,Et(_0x512c7c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x512c7c,_0x35761d,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4cd0da)),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',(_0x47172e,_0x19b7e3)=>_0x47172e||!!_0x19b7e3),this['bind']('isUnlinked')['to'](_0x35761d,'unlinkedAt',_0x1dd56a=>!!_0x1dd56a);let _0x50c4d8=null;const _0x58a44b=()=>{const _0x5d40d9=this['_model']['comments']['first']||null;_0x5d40d9!==_0x50c4d8&&(_0x50c4d8&&this['stopListening'](_0x50c4d8,'change:content'),_0x50c4d8=_0x5d40d9,_0x5d40d9&&this['listenTo'](_0x5d40d9,'change:content',_0x58a44b));const _0x59324e=_0x5d40d9?_0x5d40d9['author']['name']:this['_localUser']['name'],_0x3bb83d=_0x5d40d9?new DOMParser()['parseFromString'](_0x2c99e9(_0x5d40d9['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x579a9f=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x59324e]);this['set']('ariaLabel',_0x3bb83d?_0x579a9f+'\x20'+_0x3bb83d:_0x579a9f);};this['listenTo'](this['_model']['comments'],'change',_0x58a44b),_0x58a44b(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2ee4f8(),this['keystrokes']=new _0x20b46c(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5af1ec=>_0x5af1ec['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x1025f3(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x2b7cd2=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2f5f22=_0x2b7cd2['commentInputView'];return _0x2b7cd2['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2f5f22,'value',(_0x96d161,_0x3a884f,_0x105b0e,_0x48ee28,_0x148685)=>!!_0x148685||!!_0x48ee28&&_0x105b0e&&!_0x3a884f||_0x96d161&&_0x105b0e&&!_0x3a884f),_0x2f5f22['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3ddd22,_0x443e1b,_0x1f09e3)=>{let _0x412745;return _0x412745=_0x1f09e3&&_0x443e1b?'Reply\x20to\x20reopen\x20discussion...':_0x3ddd22?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x412745);}),_0x2f5f22['bind']('submitLabel')['to'](this,'length',_0x3e634a=>Et(this['locale'],_0x3e634a?'Reply':'Comment')),_0x2f5f22['on']('submit',(_0x24da6e,_0x1ebc78)=>{this['fire']('addComment',_0x1ebc78),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2f5f22['on']('cancel',()=>{this['focus']();}),_0x2f5f22['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2f5f22['on']('cancel',_0x4a9ab5=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4a9ab5['stop']());}),this['on']('change:isActive',(_0x3eae7a,_0x29ff5a,_0x32817b)=>{_0x32817b||this['length']||_0x2f5f22['value']||this['fire']('removeCommentThread');}),_0x2b7cd2;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x300d61(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x5c223c,_0x5023e6,_0x565c32,_0x4e4d87){super(_0x5c223c,_0x5023e6,_0x565c32,_0x4e4d87),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5c223c,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x407457,_0x1bb754,_0x2066f6)=>{_0x2066f6||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x459cad,_0x331a00,_0x2d5e96)=>{_0x2d5e96&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x315f14=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x315f14['if']('isActive','ck-thread--active'),_0x315f14['if']('isUnlinked','ck-thread--unlinked'),_0x315f14['to']('actionIndicator',_0x15190a=>_0x15190a?'ck-thread--'+_0x15190a:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x315f14['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 _0x38fa3f of this['commentsListView']['commentViews'])_0x38fa3f['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x48e4ba}=this,_0x1ae79=this['commentsListView']['commentViews']['get'](0x0);_0x1ae79===this['_boundFirstCommentView']||_0x1ae79['isSystemComment']||(this['_boundFirstCommentView']=_0x1ae79,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1ae79,'actionIndicator',_0x2d8f0=>'remove'===_0x2d8f0?'remove':null),_0x1ae79['placeholder']=Et(_0x48e4ba,'Write\x20a\x20comment...'),_0x1ae79['removeButton']['on']('execute',_0x279f3f=>{_0x279f3f['stop'](),this['showConfirm'](Et(_0x48e4ba,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1ae79['focus']();}),_0x1ae79['actionBar']['add'](this['resolveButton'],0x0),_0x1ae79['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x42e304=new _0x846bb4(this['locale']);return _0x42e304['label']=Et(this['locale'],'Resolve'),_0x42e304['tooltip']=Et(this['locale'],'Resolve'),_0x42e304['icon']=_0x21f5cc,_0x42e304['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x42e304['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x52e95a=>!_0x52e95a),_0x42e304['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xb7c2b3,_0x3b70aa)=>_0xb7c2b3&&!_0x3b70aa),_0x42e304['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x42e304;}_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']));}},Wt=class extends ht{constructor(_0x4e408c){super(_0x4e408c),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x31de43,_0x383a76,_0x1b076f)=>{this['element']['innerHTML']=_0x1b076f;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x3541af,_0x4f518e,_0x36b1bf){super(_0x3541af),this['_model']=_0x4f518e,this['_config']=_0x36b1bf,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4f518e,'content',_0x4f518e,'authoredAt',(_0x33d074,_0x1a2f8c)=>Et(_0x3541af,'COMMENT_ARIA_LABEL',[_0x4f518e['author']['name'],_0x36b1bf['formatDateTime'](_0x1a2f8c),new DOMParser()['parseFromString'](_0x33d074,'text/html')['body']['textContent'],_0x4f518e['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x5c5c44(_0x3541af,Et(_0x3541af,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x2ee4f8(),this['keystrokes']=new _0x20b46c(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x7e1a81=>_0x7e1a81['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x202872=new Wt(this['locale']);return _0x202872['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x31ef61,_0x3a9730)=>_0x3a9730?_0x2c99e9(_0x31ef61,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x31ef61),_0x202872;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2716a5=new St(this['locale'],this['_config']['editorConfig']);return _0x2716a5['value']=this['_model']['content'],_0x2716a5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2716a5['submitLabel']=Et(this['locale'],'Save'),_0x2716a5['on']('submit',(_0x598936,_0x2f7fe3)=>{this['fire']('updateComment',this['_model']['id'],_0x2f7fe3),this['switchToDisplayMode'](),this['focus']();}),_0x2716a5['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2716a5['once']('editorReady',()=>{_0x2716a5['focus']();}),_0x2716a5['createEditor'](),_0x2716a5['delegate']('editorReady')['to'](this),_0x2716a5['delegate']('editorDestroyed')['to'](this),_0x2716a5;}_setupKeyboardNavigation(){const _0x5a51a7=this['element'];this['keystrokes']['listenTo'](_0x5a51a7);for(const _0xea556 of this['focusables'])this['focusTracker']['add'](_0xea556['element']),this['keystrokes']['listenTo'](_0xea556['element']);this['focusables']['on']('change',(_0x34c543,_0x58c8ad)=>{for(const _0x56f481 of _0x58c8ad['removed'])this['focusTracker']['remove'](_0x56f481['element']),this['keystrokes']['stopListening'](_0x56f481['element']);for(const _0x384dcb of _0x58c8ad['added'])this['focusTracker']['add'](_0x384dcb['element']),this['keystrokes']['listenTo'](_0x384dcb['element']);}),this['keystrokes']['set']('enter',(_0x3f9706,_0x470a81)=>{_0x5a51a7===_0x3f9706['target']&&(this['focusCycler']['focusFirst'](),_0x470a81());}),this['keystrokes']['set']('esc',(_0x1449e6,_0x2b00e2)=>{_0x5a51a7!==_0x1449e6['target']&&(this['focus'](),_0x2b00e2());});}};const Gt=/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x300d61(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x3d3b54,_0x2e2541,_0x3af1c8){super(_0x3d3b54,_0x2e2541,_0x3af1c8),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x3d3b54,'Reply...')),this['bind']('authoredAt')['to'](_0x2e2541),this['bind']('resolvedAt')['to'](_0x2e2541),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 _0x11d570(_0x3d3b54,_0x2e2541['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2e2541,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x47a671=this['bindTemplate'],_0x3a0190=[{'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':_0x47a671['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x47a671['to']('authoredAt',_0x4b78f8=>this['_config']['formatDateTime'](_0x4b78f8))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x47a671['if']('isEditMode','ck-comment__actions--hidden'),_0x47a671['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']&&_0x3a0190['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x47a671['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x47a671['if']('isEditMode','ck-comment--edit'),_0x47a671['if']('isSystemComment','ck-comment--info'),_0x47a671['to']('actionIndicator',_0x4e8efd=>_0x4e8efd?'ck-comment--'+_0x4e8efd:'')],'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':_0x3a0190}]}]};}_createEditButton(){const _0x2b17b8=new _0x370cb0(this['locale']);return _0x2b17b8['label']=Et(this['locale'],'Edit'),_0x2b17b8['icon']=_0x335095,_0x2b17b8['withText']=!0x0,_0x2b17b8['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2b17b8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xe5a071=>!_0xe5a071),_0x2b17b8['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2b17b8['on']('execute',()=>this['switchToEditMode']()),_0x2b17b8;}_createRemoveButton(){const _0x25704b=new _0x370cb0(this['locale']);return _0x25704b['label']=Et(this['locale'],'Remove'),_0x25704b['icon']=_0x2494a9,_0x25704b['withText']=!0x0,_0x25704b['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x25704b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3d38f5=>!_0x3d38f5),_0x25704b['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x25704b['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x25704b;}_createDropdown(){const _0x35af7f=ct(this['locale'],_0x427b7d),_0x4d4ca3=_0x35af7f['panelView']['children'],_0x4fac53=new ot(this['locale']),_0x26dfee=_0x35af7f['bindTemplate'];dt(_0x35af7f,()=>this['items']['find'](_0x15fc5c=>_0x15fc5c['isVisible'])),_0x35af7f['extendTemplate']({'attributes':{'class':[_0x26dfee['if']('isVisible','ck-hidden',_0x471f86=>!_0x471f86)]}});const _0x5418c9=(_0x15350f,_0x3d60cd=-0x1)=>{const _0xadfba8=new nt(this['locale']);_0xadfba8['children']['add'](_0x15350f);const _0x2c3f92=_0x3d60cd>-0x1?_0x3d60cd:_0x4fac53['items']['length'];_0x4fac53['items']['add'](_0xadfba8,_0x2c3f92);const _0x37d679=Array['from'](this['items']);_0x35af7f['unbind']('isEnabled','isVisible'),_0x35af7f['bind']('isEnabled')['toMany'](_0x37d679,'isEnabled',(..._0x5b6b52)=>_0x5b6b52['some'](_0x6bf931=>_0x6bf931)),_0x35af7f['bind']('isVisible')['toMany'](_0x37d679,'isVisible',(..._0x39b231)=>_0x39b231['some'](_0x5b4145=>_0x5b4145));};_0x35af7f['panelPosition']='sw',_0x35af7f['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x1c6791});for(const _0x5d17c1 of this['items'])_0x5418c9(_0x5d17c1);return _0x4d4ca3['add'](_0x4fac53),_0x35af7f['listenTo'](this['items'],'add',(_0x544271,_0x4f5e8e,_0x25c3f7)=>{_0x5418c9(_0x4f5e8e,_0x25c3f7);}),_0x35af7f['listenTo'](this['items'],'remove',(_0x361a62,_0x17c7b0,_0xdad060)=>{_0x4fac53['items']['remove'](_0xdad060);}),_0x35af7f;}_attachActions(_0x2efba5,_0x3d3bd3){const _0x4bd1a3=_0x2efba5&&_0x2efba5['element'];_0x4bd1a3&&(this['listenTo'](_0x4bd1a3,'mouseenter',()=>this['actionIndicator']=_0x3d3bd3),this['listenTo'](_0x4bd1a3,'focus',()=>this['actionIndicator']=_0x3d3bd3),this['listenTo'](_0x4bd1a3,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4bd1a3,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x5e685b=super['_createCommentInputView']();return _0x5e685b['bind']('placeholder')['to'](this),_0x5e685b;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x73559e){const _0x279971=_0x407de3(_0x73559e,0x1e),_0x5bffe7=new MutationObserver(_0x381cd7=>{for(const _0x50bcf8 of _0x381cd7)('attributes'==_0x50bcf8['type']&&'class'==_0x50bcf8['attributeName']||'childList'==_0x50bcf8['type']||'characterData'==_0x50bcf8['type'])&&_0x279971();});return{'attach'(_0x5d1173){_0x5bffe7['observe'](_0x5d1173,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5bffe7['disconnect'](),_0x279971['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x20cea7,_0x4a09ce){super(_0x20cea7),this['id']=_0x13b8e9(),this['focusTracker']=new _0x2ee4f8(),this['keystrokes']=new _0x20b46c(),this['keystrokes']['set']('Esc',(_0x50fdbf,_0x479d62)=>this['fire']('Esc',_0x479d62)),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'](_0x4a09ce),this['mainView']=_0x4a09ce;const _0x105cc5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x105cc5['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 _0x36037d=this['element']['clientHeight'];_0x36037d&&(this['height']=_0x36037d);}};const jt=/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x341a46();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x233d44,target:_0x28d1a9,type:_0x2a4740,isVisible:_0x891f05=!0x0}){super(),this['view']=_0x233d44,this['view']['element']||this['view']['render'](),this['_type']=_0x2a4740,this['_target']=_0x28d1a9,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x38ae04([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1e1a89,_0x1a456b)=>{this['view']['focusTracker']['add'](_0x1a456b);}),this['focusableElements']['on']('remove',(_0x2416d5,_0x942bf4)=>{this['view']['focusTracker']['remove'](_0x942bf4);}),this['set']('isVisible',_0x891f05);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x1a3246=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x1a3246),_0x1a3246;}get targetRect(){const _0x4d0a99=this['target'];if(null===_0x4d0a99)return null;if(_0x4d0a99 instanceof _0x8c7c9a)return _0x4d0a99;const _0x74d2d5=_0x4d0a99['filter'](_0x117590=>function(_0x26d9d0){return!!_0x26d9d0['offsetParent']||!!_0x26d9d0['getClientRects']()['item'](0x0);}(_0x117590));return 0x0===_0x74d2d5['length']?null:_0x8c7c9a['getDomElementRects'](_0x74d2d5[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x33f908){this['view']['isActive']=_0x33f908,this['view']['mainView']['isActive']=_0x33f908;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x3375fc){if(!(null===_0x3375fc||_0x3375fc instanceof _0x8c7c9a||Array['isArray'](_0x3375fc)&&_0x3375fc['every'](_0x56f91b=>zt(_0x56f91b))))throw new _0x5747ed('annotation-invalid-target',null,{'target':_0x3375fc});}_getNormalizedTarget(){const _0x516579='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x516579)?[_0x516579]:_0x516579;}};function zt(_0x298b15){return null!==_0x298b15&&'object'==typeof _0x298b15&&'nodeType'in _0x298b15&&0x1===_0x298b15['nodeType'];}var Jt=class extends _0x38ae04{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x2d1ce1=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2ee4f8(),this['_focusTracker']['on']('change:isFocused',(_0x33541f,_0x9bb47e,_0x533472)=>{_0x533472||this['fire']('blur');});for(const _0x123a0d of _0x2d1ce1)this['add'](_0x123a0d);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x249b82){if(this['has'](_0x249b82))throw new _0x5747ed('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x249b82['innerView'],_0x249b82),this['_viewToAnnotation']['set'](_0x249b82['view'],_0x249b82);for(const _0x3341d1 of _0x249b82['focusableElements'])this['_focusTracker']['add'](_0x3341d1);if(this['listenTo'](_0x249b82['focusableElements'],'add',(_0x43e1a4,_0x12af4b)=>{this['_focusTracker']['add'](_0x12af4b);}),this['listenTo'](_0x249b82['focusableElements'],'remove',(_0x220677,_0x3bf6c1)=>{this['_focusTracker']['remove'](_0x3bf6c1);}),this['listenTo'](_0x249b82['view']['focusTracker'],'change:isFocused',(_0x5edd9c,_0x55d0d2,_0x45adcb)=>{_0x45adcb&&this['fire']('focus',_0x249b82);}),_0x249b82['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x32d77d of this)_0x32d77d['updateTargetRect']();}const _0x531cc8=this['_getOrderInContent'](_0x249b82['view']['targetRect']);return super['add'](_0x249b82,_0x531cc8);}['remove'](_0x540837){if(!this['has'](_0x540837))throw new _0x5747ed('annotationcollection-not-existing-item',null);this['stopListening'](_0x540837['view']['focusTracker']),this['stopListening'](_0x540837['focusableElements']);for(const _0x26e55e of _0x540837['focusableElements'])this['_focusTracker']['remove'](_0x26e55e);return this['_viewToAnnotation']['delete'](_0x540837['view']),this['_innerViewToAnnotation']['delete'](_0x540837['innerView']),super['remove'](_0x540837);}getByInnerView(_0x3183d0){return this['_innerViewToAnnotation']['get'](_0x3183d0);}getByView(_0x5a2332){return this['_viewToAnnotation']['get'](_0x5a2332);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x2e5d80 of this)_0x2e5d80['updateTargetRect']();this['_sort']();}_sort(){const _0x123c55=Array['from'](this)['sort']((_0x1157ae,_0x47cd17)=>Zt(_0x1157ae['view']['targetRect'],_0x47cd17['view']['targetRect']));for(let _0x13ec6a=_0x123c55['length']-0x1;_0x13ec6a>0x0;_0x13ec6a--){const _0x5eb37c=_0x123c55[_0x13ec6a];_0x13ec6a!==this['getIndex'](_0x5eb37c)&&(this['remove'](_0x5eb37c),this['add'](_0x5eb37c));}}_getOrderInContent(_0x1d87c3){let _0x4ddc65=0x0;if(!_0x1d87c3)return this['length'];for(const _0x4b4d69 of this){const _0x3532fe=_0x4b4d69['view']['targetRect'];if(_0x3532fe){if(Zt(_0x1d87c3,_0x3532fe)<0x0)return _0x4ddc65;_0x4ddc65++;}}return _0x4ddc65;}_areCachedRectsStale(){const _0x2708bf=this['get'](0x0);if(!_0x2708bf)return!0x1;const _0x273482=_0x2708bf['view']['targetRect'],_0x2160bf=_0x2708bf['targetRect'];return!(!_0x273482||!_0x2160bf)&&(_0x273482['top']!==_0x2160bf['top']||_0x273482['left']!==_0x2160bf['left']);}};function Qt({source:_0x2f41ae,target:_0x35376b,filter:_0x560ee9}){for(const _0x20b8b7 of _0x2f41ae)_0x560ee9(_0x20b8b7)&&_0x35376b['add'](_0x20b8b7);_0x35376b['listenTo'](_0x2f41ae,'add',(_0x5cce4f,_0xaabad1)=>{_0x560ee9(_0xaabad1)&&_0x35376b['add'](_0xaabad1);}),_0x35376b['listenTo'](_0x2f41ae,'remove',(_0x26ef10,_0x38c25d)=>{_0x35376b['has'](_0x38c25d)&&_0x35376b['remove'](_0x38c25d);});}function Zt(_0xaa8d19,_0x4a511b){if(null===_0xaa8d19&&null===_0x4a511b)return 0x0;if(null===_0xaa8d19)return-0x1;if(null===_0x4a511b)return 0x1;const _0x451b4b=_0xaa8d19['top']-_0x4a511b['top'];return 0x0==_0x451b4b?_0xaa8d19['left']-_0x4a511b['left']:_0x451b4b;}var ti=class extends _0x2c4b59{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x257fab){if(super(_0x257fab),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x257fab instanceof _0x5492c1){const _0x4aa959=_0x257fab['locale'];_0x257fab['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x4aa959,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x4aa959,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x4aa959,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x4aa959,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x4aa959,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x4aa959,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x4aa959,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1aff94){this['collection']['add'](_0x1aff94);}['remove'](_0x224153){this['collection']['remove'](_0x224153),_0x224153['destroy']();}refreshVisibility(){for(const _0x1a4e74 of this['collection'])_0x1a4e74['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x127652){return this['collection']['getByInnerView'](_0x127652);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x325991 of this['collection'])_0x325991['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x3969fe){this['fire']('_activateAnnotation',_0x3969fe);}createAnnotation(_0x14ccba){return new $t(_0x14ccba);}createAnnotationView(_0x868b7e,_0x372761){return new qt(_0x868b7e,_0x372761);}_addActiveAnnotation(_0x4d6c7b){const _0xe2a0de=new Set(this['activeAnnotations']);_0xe2a0de['add'](_0x4d6c7b),this['activeAnnotations']=_0xe2a0de;}_removeActiveAnnotation(_0x1da3d4){const _0x46a85c=new Set(this['activeAnnotations']);_0x46a85c['delete'](_0x1da3d4),this['activeAnnotations']=_0x46a85c;}_bindAnnotationsToVisibleAnnotations(){const _0x35e86d=this['collection'],_0x509019=this['_visibleAnnotations'];function _0x109cd8(_0x36f4cc){const _0x3f020f=_0x36f4cc['source'];_0x3f020f['isVisible']&&!_0x509019['has'](_0x3f020f)?_0x509019['add'](_0x3f020f):!_0x3f020f['isVisible']&&_0x509019['has'](_0x3f020f)&&_0x509019['remove'](_0x3f020f),_0x3f020f['view']['focusTracker']['remove'](_0x3f020f['view']['element']),_0x3f020f['view']['focusTracker']['add'](_0x3f020f['view']['element']);}this['listenTo'](_0x35e86d,'add',(_0x4392e5,_0x828736)=>{_0x828736['isVisible']&&_0x509019['add'](_0x828736),this['listenTo'](_0x828736,'change:isVisible',_0x109cd8);}),this['listenTo'](_0x35e86d,'remove',(_0x4da396,_0x4a0568)=>{_0x509019['has'](_0x4a0568)&&_0x509019['remove'](_0x4a0568),this['stopListening'](_0x4a0568,'change:isVisible',_0x109cd8);});}_setupEnterAnnotationKeystroke(){const _0x2b20ba=_0x1a42f4=>{_0x1a42f4['on']('ready',()=>{_0x1a42f4['keystrokes']['set'](_0x4d0567,(_0x5586c8,_0x159af6)=>{const _0x36daef=_0xddc11(this['activeAnnotations']['values']());_0x36daef&&(_0x36daef['view']['focus'](),_0x159af6());});});};this['context']instanceof _0x5492c1?_0x2b20ba(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5d6fa6,_0x219575)=>{_0x2b20ba(_0x219575);});}_setupEscapeAnnotationHandling(){const _0x1a64e5=_0x49e186=>{const _0x29a1e7=_0x49e186['source'],_0x4ef9bd=[];let _0x1d5d0e;if(Array['isArray'](_0x29a1e7['target'])){_0x1d5d0e=_0x29a1e7['target'][0x0],this['context']instanceof _0x5492c1?_0x4ef9bd['push'](this['context']):this['context']['editors']&&_0x4ef9bd['push'](...this['context']['editors']);for(const _0x228541 of _0x4ef9bd)for(const _0x2281cd of _0x228541['editing']['view']['domRoots']['values']())if(_0x2281cd['contains'](_0x1d5d0e))return void _0x228541['editing']['view']['focus']();_0x1d5d0e['focus']();}};this['listenTo'](this['collection'],'add',(_0x327730,_0x5d1c80)=>{this['listenTo'](_0x5d1c80,'escape',_0x1a64e5,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x207ac8,_0x38342b)=>{this['stopListening'](_0x38342b,'escape',_0x1a64e5);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x341a46(),ni=/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x341a46();var oi=class extends _0x2c4b59{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x2980ce,_0x594727];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d152e){super(_0x5d152e),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5bb74f=this['context']['config'];_0x5bb74f['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5bb74f['define']('comments.maxThreadTotalWeight',0x1f4),_0x5bb74f['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5bb74f['define']('comments.CommentThreadView',Ut),_0x5bb74f['define']('comments.CommentView',Yt),_0x5bb74f['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x255ce2=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3495cf,_0x264374)=>this['_addCommentThread'](_0x264374)),this['on']('submitCommentThread',(_0x409a71,_0x4c5bed)=>this['_submitCommentThread'](_0x4c5bed)),this['on']('resolveCommentThread',(_0x22d5a5,_0x5bf845)=>this['_resolveCommentThread'](_0x5bf845)),this['on']('resolveCommentThread',(_0x4a7f87,_0x1f208c)=>this['_updateActiveAnnotation'](_0x1f208c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1a94ba,_0x11df8d)=>this['_reopenCommentThread'](_0x11df8d)),this['on']('reopenCommentThread',(_0x3993b3,_0x2bf1fc)=>this['_updateActiveAnnotation'](_0x2bf1fc),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3c401d,_0x58aa3b)=>this['_removeCommentThread'](_0x58aa3b)),this['on']('updateCommentThread',(_0x5aabb4,_0x4f88b8)=>this['_updateCommentThread'](_0x4f88b8)),this['on']('updateCommentThread',(_0x1c1cf9,_0x502afe)=>this['_updateActiveAnnotation'](_0x502afe),{'priority':'lowest'}),this['on']('addComment',(_0x360a19,_0x18761d)=>this['_addComment'](_0x18761d)),this['on']('updateComment',(_0x234613,_0x2ab846)=>this['_updateComment'](_0x2ab846)),this['on']('removeComment',(_0x59c6ba,_0x41999d)=>this['_removeComment'](_0x41999d)),this['on']('addComment',(_0x3aaa6d,{threadId:_0x6adc26,isFromAdapter:_0x5c0a3b})=>{if(_0x5c0a3b)return;const _0x1dcf12=this['getCommentThread'](_0x6adc26),_0x4d0d6c=_0x1dcf12&&this['_threadToController']['get'](_0x1dcf12);_0x4d0d6c&&_0x4d0d6c['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x255ce2,'change:activeAnnotations',(_0x27d044,_0x2494ca,_0x239fba)=>{const _0x10025c=Array['from'](_0x239fba)['map'](_0x47c8d3=>this['_viewToController']['get'](_0x47c8d3['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x10025c?_0x10025c['model']:null;});}set adapter(_0x2f7448){if(this['_adapter'])throw new _0x5747ed('commentsrepository-adapter-already-set');this['_adapter']=_0x2f7448;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x5697c1=ii,threadId:_0x4696bd=_0x13b8e9(),comments:_0x55518f=[],unlinkedAt:_0x4e2b1b=null,resolvedAt:_0x58cdb2=null,resolvedBy:_0x998e85=null,target:_0x5578b1=null,context:_0x467137=null,attributes:_0xcd506c={},isResolvable:_0x47361f=!0x0,isSubmitted:_0xa01ab8=!0x1,isFromAdapter:_0x100ff9=!0x1}={}){return this['fire'](ai('addCommentThread',_0x5697c1),{'channelId':_0x5697c1,'threadId':_0x4696bd,'comments':_0x55518f,'unlinkedAt':_0x4e2b1b,'resolvedAt':_0x58cdb2,'resolvedBy':_0x998e85,'target':_0x5578b1,'context':_0x467137,'attributes':_0xcd506c,'isFromAdapter':_0x100ff9,'isResolvable':_0x47361f,'isSubmitted':_0xa01ab8}),this['getCommentThread'](_0x4696bd);}openNewCommentThread({channelId:_0x22a6c7=ii,threadId:_0x9fb314=_0x13b8e9(),target:_0x4ad567,context:_0x286835=null,isResolvable:_0x28e69f=!0x0}){if(this['_readOnlyChannels']['has'](_0x22a6c7)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4ad567)throw new _0x5747ed('commentsrepository-missing-target');const _0x3d1e28=this['addCommentThread']({'channelId':_0x22a6c7,'threadId':_0x9fb314,'target':_0x4ad567,'context':_0x286835,'isResolvable':_0x28e69f});if(!_0x3d1e28)return null;const _0x26ef6c=this['_threadToController']['get'](_0x3d1e28),_0x34678a=_0x26ef6c['view']['commentThreadInputView']['commentInputView'],_0x344b06=this['context']['plugins']['get'](ti),_0x257cf8=_0x344b06['getByInnerView'](_0x26ef6c['view']);return _0x344b06['activate'](_0x257cf8),_0x34678a['once']('editorReady',()=>_0x34678a['focus']()),_0x3d1e28;}hasCommentThread(_0x10d8b4){if('string'!=typeof _0x10d8b4)throw new _0x5747ed('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x10d8b4);}updateCommentThread({channelId:_0x5bdf83=ii,threadId:_0x6aff9c,context:_0x877166,unlinkedAt:_0x4105d1,attributes:_0x312b39,isFromAdapter:_0x1a93c2=!0x1}){return this['fire'](ai('updateCommentThread',_0x5bdf83),{'channelId':_0x5bdf83,'threadId':_0x6aff9c,'context':_0x877166,'unlinkedAt':_0x4105d1,'attributes':_0x312b39,'isFromAdapter':_0x1a93c2}),this['getCommentThread'](_0x6aff9c);}getCommentThread(_0x6f1c2e){if('string'!=typeof _0x6f1c2e)throw new _0x5747ed('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x6f1c2e);}fetchCommentThread({channelId:_0x17f0eb,threadId:_0x1fe959}={}){const _0x6dadad=this['getCommentThread'](_0x1fe959);if(_0x6dadad)return Promise['resolve'](_0x6dadad);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x5747ed('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x17f0eb,'threadId':_0x1fe959})['then'](_0x26583f=>this['hasCommentThread'](_0x1fe959)?this['getCommentThread'](_0x1fe959):_0x26583f?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x17f0eb},_0x26583f)):void 0x0)['catch'](_0x5a13fa=>{throw console['error'](_0x5a13fa),new _0x5747ed('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x202120,skipNotAttached:_0x528a17=!0x1,skipEmpty:_0x21bbf3=!0x1,toJSON:_0x496af5=!0x1}={}){const _0x77b7fe=[];for(const _0x142afd of this['_threads']['values']())_0x202120&&_0x142afd['channelId']!==_0x202120||_0x528a17&&!_0x142afd['isAttached']||_0x21bbf3&&0x0===_0x142afd['length']||_0x77b7fe['push'](_0x142afd);return _0x496af5?_0x77b7fe['map'](_0x20c5d6=>_0x20c5d6['toJSON']()):_0x77b7fe;}getAnnotationForCommentThread(_0x2c5902){const _0x4e83d8=this['_threadToController']['get'](_0x2c5902);return _0x4e83d8&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x4e83d8['view'])||null;}getCommentThreadForAnnotation(_0x47b670){const _0x1bd710=this['_viewToController']['get'](_0x47b670['innerView']);return _0x1bd710?_0x1bd710['model']:null;}setActiveCommentThread(_0xc166b3){const _0x217627=this['context']['plugins']['get'](ti);if(!_0xc166b3)return void(this['activeCommentThread']&&_0x217627['deactivateAll']());const _0x64a92f=this['getCommentThread'](_0xc166b3);if(!_0x64a92f)throw new _0x5747ed('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xc166b3});if(!this['_threadToController']['has'](_0x64a92f))throw new _0x5747ed('commentsrepository-active-not-attached',null,{'threadId':_0xc166b3});const _0x46c8ac=_0x217627['getByInnerView'](this['_threadToController']['get'](_0x64a92f)['view']);_0x217627['activate'](_0x46c8ac);}switchReadOnly(_0x3519c4,_0x21c3f){_0x3519c4?this['_readOnlyChannels']['add'](_0x21c3f):this['_readOnlyChannels']['delete'](_0x21c3f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x282da5){return this['_readOnlyChannels']['has'](_0x282da5)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x50f861,_0x5102d6){return new bt(_0x50f861,_0x5102d6);}setPermissions(_0x178239,_0x28dbd4=ii){this['_permissions']['set'](_0x28dbd4,_0x178239),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x5c7f96=ii){return this['_permissions']['has'](_0x5c7f96)?this['_permissions']['get'](_0x5c7f96):ei;}_addCommentThread({channelId:_0xacb212,threadId:_0x22e6a9,comments:_0x5a869b,unlinkedAt:_0x370bfb,resolvedAt:_0x32523c,resolvedBy:_0x1b087a,target:_0x4356eb,context:_0x58e529,attributes:_0x151ac1,isFromAdapter:_0x155ca8,isResolvable:_0x5200f8,isSubmitted:_0x10174d}){if('string'!=typeof _0x22e6a9)throw new _0x5747ed('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x22e6a9});if(this['hasCommentThread'](_0x22e6a9))throw new _0x5747ed('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x22e6a9});const _0x119e60=new ri(this,{'channelId':_0xacb212,'id':_0x22e6a9,'context':_0x58e529,'attributes':_0x151ac1,'unlinkedAt':_0x370bfb,'resolvedAt':_0x32523c,'resolvedBy':_0x1b087a?this['context']['plugins']['get'](_0x594727)['getUser'](_0x1b087a):null,'isResolvable':_0x5200f8,'isSubmitted':_0x10174d||_0x155ca8});this['_threads']['set'](_0x22e6a9,_0x119e60);for(const _0x12e7f5 of _0x5a869b)_0x119e60['_add'](this['_createNewComment']({'threadId':_0x22e6a9,..._0x12e7f5}));return _0x4356eb&&_0x119e60['attachTo'](_0x4356eb),_0x155ca8||!_0x119e60['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0xacb212,'threadId':_0x22e6a9});}_submitCommentThread({channelId:_0x47a9e7,threadId:_0x6c5457}){if(!this['hasCommentThread'](_0x6c5457))throw new _0x5747ed('commentsrepository-missing-comment-thread',this);const _0x19adb8=this['getCommentThread'](_0x6c5457);if(_0x19adb8['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x728cc1,comments:_0x27b986,resolvedAt:_0x308818,resolvedBy:_0x3c0d90,context:_0x23e4e5,attributes:_0x44f00f}=_0x19adb8,_0x4b0ccb=this['context']['plugins']['get']('PendingActions'),_0x4debbd=_0x4b0ccb['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x47a9e7,'threadId':_0x728cc1,'comments':_0x27b986['map'](_0x12fdd4=>_0x12fdd4['toJSON']()),'resolvedAt':_0x308818,'resolvedBy':_0x3c0d90?_0x3c0d90['id']:_0x3c0d90,'context':_0x23e4e5,'attributes':_0x44f00f})['then'](({comments:_0x5dbb72})=>{_0x4b0ccb['remove'](_0x4debbd);for(const _0x2192c5 of _0x5dbb72)this['_updateComment']({'channelId':_0x47a9e7,'threadId':_0x6c5457,'commentId':_0x2192c5['commentId'],'createdAt':_0x2192c5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x45a8a0=>{throw console['error'](_0x45a8a0),new _0x5747ed('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x334075,target:_0x1a0e5e}){const _0x1a0565=this['getCommentThread'](_0x334075);if(!_0x1a0565)throw new _0x5747ed('commentsrepository-attach-missing-comment-thread',this);const _0x2b9135=this['context']['plugins']['get']('PendingActions'),_0x516939=this['context']['plugins']['get'](ti),_0xb39623=this['_createCommentThreadView'](_0x1a0565),_0x52b2dd=new bt(_0x1a0565,_0xb39623);let _0x3bcde2=null;_0xb39623['on']('change:isDirty',(_0x260e14,_0x5d8da5,_0x420c67)=>{_0x420c67?_0x3bcde2=_0x2b9135['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3bcde2&&(_0x2b9135['remove'](_0x3bcde2),_0x3bcde2=null);}),this['_threadToController']['set'](_0x1a0565,_0x52b2dd),this['_viewToController']['set'](_0xb39623,_0x52b2dd);const _0x141aac=new qt(this['context']['locale'],_0xb39623);_0x141aac['bind']('length')['to'](_0xb39623),_0x141aac['bind']('isDirty')['to'](_0xb39623,'isDirty',_0xb39623,'length',(_0x3fff12,_0x205ab6)=>_0x3fff12||!_0x205ab6),_0x141aac['bind']('isActive')['to'](_0xb39623),_0x141aac['type']='comment';const _0x2882ea=new $t({'view':_0x141aac,'target':_0x1a0e5e,'type':'comment','isVisible':!_0x1a0565['archivedAt']&&!!('function'==typeof _0x1a0e5e?_0x1a0e5e():_0x1a0e5e)});return _0xb39623['on']('escape',()=>{_0x2882ea['fire']('escape');}),this['_bindAnnotationToEditors'](_0xb39623,_0x2882ea),_0x516939['add'](_0x2882ea),_0x2882ea;}_bindAnnotationToEditors(_0x5912aa,_0x40ad5f){this['listenTo'](_0x5912aa,'editorReady',(_0x112770,_0x10321c)=>{const _0x4ff1c6=_0x10321c['ui']['view']['body']['bodyCollectionContainer'];_0x40ad5f['focusableElements']['add'](_0x4ff1c6),this['context']instanceof _0x5492c1&&this['context']['ui']['focusTracker']['add'](_0x4ff1c6);},{'priority':'highest'}),this['listenTo'](_0x5912aa,'editorDestroyed',(_0x47c9fb,_0x778cae)=>{const _0x564d5f=_0x778cae['ui']['view']['body']['bodyCollectionContainer'];_0x40ad5f['focusableElements']['has'](_0x564d5f)&&_0x40ad5f['focusableElements']['remove'](_0x564d5f),this['context']instanceof _0x5492c1&&this['context']['ui']['focusTracker']['remove'](_0x564d5f);});}_unbindEditors(_0x5356a6){this['stopListening'](_0x5356a6,'editorReady'),this['stopListening'](_0x5356a6,'editorDestroyed');}_createCommentThreadView(_0x12fbd5){const _0x5dd2ca=this['context']['plugins']['get'](_0x594727),{config:_0xd95991,locale:_0x584c0c}=this['context'],_0x4d2823=_0xb022b2(_0xd95991['get']('locale'),_0x584c0c);return new(0x0,(_0xd95991['get']('comments'))['CommentThreadView'])(_0x584c0c,_0x12fbd5,_0x5dd2ca['me'],{'editorConfig':{..._0xd95991['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xd95991['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xd95991['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xd95991['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xd95991['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4d2823,'CommentView':_0xd95991['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x5f5d44,channelId:_0x3f5335,resolvedAt:_0x196cd3,resolvedBy:_0x1ba606,isFromAdapter:_0x34abad}){if(!this['hasCommentThread'](_0x5f5d44))throw new _0x5747ed('commentsrepository-missing-comment-thread',null,{'threadId':_0x5f5d44});const _0x1eeab2=this['getCommentThread'](_0x5f5d44);if(_0x1eeab2['isResolved'])throw new _0x5747ed('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5f5d44});const _0xf1f133=this['context']['plugins']['get'](_0x594727);if(_0x1eeab2['resolvedBy']=_0xf1f133['getUser'](_0x1ba606),_0x1eeab2['resolvedAt']=_0x196cd3,_0x34abad||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0xe09c48=this['context']['plugins']['get']('PendingActions'),_0x48ad91=_0xe09c48['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3f5335,'threadId':_0x5f5d44})['then'](({resolvedAt:_0x215066,resolvedBy:_0x141ea4})=>{_0xe09c48['remove'](_0x48ad91),_0x1eeab2['resolvedBy']['id']!==_0x141ea4&&(_0x1eeab2['resolvedBy']=_0xf1f133['getUser'](_0x141ea4)),_0x1eeab2['resolvedAt']=_0x215066;})['catch'](_0x1d5e46=>{throw console['error'](_0x1d5e46),new _0x5747ed('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x1479bd,channelId:_0x19caba,isFromAdapter:_0x522652}){if(!this['hasCommentThread'](_0x1479bd))throw new _0x5747ed('commentsrepository-missing-comment-thread',null,{'threadId':_0x1479bd});const _0x479a92=this['getCommentThread'](_0x1479bd);if(!_0x479a92['isResolved'])throw new _0x5747ed('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1479bd});if(_0x479a92['resolvedBy']=null,_0x479a92['resolvedAt']=null,_0x522652||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x70269d=this['context']['plugins']['get']('PendingActions'),_0x4fd59d=_0x70269d['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x19caba,'threadId':_0x1479bd})['then'](()=>_0x70269d['remove'](_0x4fd59d))['catch'](_0xaa32cd=>{throw console['error'](_0xaa32cd),new _0x5747ed('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x5963ec,isFromAdapter:_0xceb3e0}){const _0x5cfa65=this['getCommentThread'](_0x5963ec);if(!_0x5cfa65)throw new _0x5747ed('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5963ec),this['_threads']['delete'](_0x5963ec),!_0x5cfa65['isSubmitted']||_0xceb3e0||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xfae6e1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5a9b5b}=_0x5cfa65,_0x2666a2=_0xfae6e1['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5a9b5b,'threadId':_0x5963ec})['then'](()=>_0xfae6e1['remove'](_0x2666a2))['catch'](_0x114343=>{throw console['error'](_0x114343),new _0x5747ed('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x5ef386,unlinkedAt:_0x1447ee,context:_0x446fb8,attributes:_0x2706a4,isFromAdapter:_0x43593e}){if('string'!=typeof _0x5ef386)throw new _0x5747ed('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5ef386});if(!this['hasCommentThread'](_0x5ef386))throw new _0x5747ed('commentsrepository-missing-comment-thread',null,{'threadId':_0x5ef386});const _0x530ca3=this['getCommentThread'](_0x5ef386);let _0x2417db=!0x1;if(void 0x0!==_0x446fb8&&_0x530ca3['context']!==_0x446fb8&&(_0x530ca3['context']=_0x446fb8,_0x2417db=!0x0),void 0x0!==_0x1447ee&&_0x530ca3['unlinkedAt']!==_0x1447ee&&(_0x530ca3['unlinkedAt']=_0x1447ee,_0x2417db=!0x0),_0x2706a4&&!_0x384a28(_0x2706a4,_0x530ca3['attributes'])&&(_0x530ca3['attributes']=_0x2706a4,_0x2417db=!0x0),!_0x2417db)return Promise['resolve']();if(!_0x530ca3['isSubmitted']||_0x43593e||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x61d8a8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cdbf7}=_0x530ca3,_0x57938c=_0x61d8a8['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5cdbf7,'threadId':_0x5ef386,'context':_0x446fb8,'unlinkedAt':_0x1447ee,'attributes':_0x2706a4})['then'](()=>_0x61d8a8['remove'](_0x57938c))['catch'](_0x33eab0=>{throw console['error'](_0x33eab0),new _0x5747ed('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x29a2c0){const _0x5b6062=this['context']['plugins']['get'](ti),_0x566325=this['getCommentThread'](_0x29a2c0);if(_0x566325['_isAttached']=!0x1,this['_threadToController']['has'](_0x566325)){const _0x2e69cb=this['_threadToController']['get'](_0x566325),_0xefeffb=_0x2e69cb['view'],_0x502f16=_0x5b6062['getByInnerView'](_0xefeffb);this['_threadToController']['delete'](_0x566325),this['_viewToController']['delete'](_0xefeffb),_0x502f16&&_0x5b6062['remove'](_0x502f16),_0x2e69cb['destroy'](),_0xefeffb['destroy']()['then'](()=>{this['_unbindEditors'](_0xefeffb);});}}_updateActiveAnnotation({threadId:_0x327700,resolvedAt:_0x4e0dd5,unlinkedAt:_0x2f7cdf}){const _0x57ab63=!!_0x4e0dd5,_0x8d7621=this['context']['plugins']['get'](ti),_0x4c4224=this['getCommentThread'](_0x327700);if(this['_threadToController']['has'](_0x4c4224)){const _0xd77df=this['_threadToController']['get'](_0x4c4224)['view'],_0x12fda4=_0x8d7621['getByInnerView'](_0xd77df);_0x12fda4&&(_0x57ab63&&_0x8d7621['_removeActiveAnnotation'](_0x12fda4),_0x2f7cdf?_0x12fda4['isVisible']=!0x1:_0x12fda4['refreshVisibility']());}}_getExternalAuthor(_0x4df40a){const _0x33e4f0=this['context']['plugins']['get'](_0x594727),_0x30b5fa=_0x4143fd('external:'+_0x4df40a),_0x234edd=_0x33e4f0['getUser'](_0x30b5fa);return _0x234edd||_0x33e4f0['addUser']({'id':_0x30b5fa,'name':_0x4df40a});}_createNewComment({threadId:_0x109aac,commentId:_0x2096a9=_0x13b8e9(),content:_0x92add0,authorId:_0x435158,createdAt:_0xe8b78a,attributes:_0x34ae19}){if('string'!=typeof _0x2096a9)throw new _0x5747ed('commentsrepository-invalid-commentid');if('string'!=typeof _0x435158)throw new _0x5747ed('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x92add0||!_0x92add0['trim']())throw new _0x5747ed('commentsrepository-invalid-comment-content');const _0x4bf621=this['context']['plugins']['get'](_0x594727)['getUser'](_0x435158);if(!_0x4bf621)throw new _0x5747ed('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x435158});let _0x3fc8c8=null,_0x5d48aa=_0xe8b78a;return _0x34ae19?.['@external']&&(_0x3fc8c8=this['_getExternalAuthor'](_0x34ae19['@external']['authorName']),_0x5d48aa=new Date(_0x34ae19['@external']['createdAt'])),new hi(this,{'threadId':_0x109aac,'id':_0x2096a9,'author':_0x3fc8c8||_0x4bf621,'creator':_0x4bf621,'content':_0x92add0,'createdAt':_0xe8b78a,'authoredAt':_0x5d48aa,'attributes':_0x34ae19});}_addComment(_0x2d079a){let {threadId:_0x47f3c3,content:_0x333174,attributes:_0x5c3db8,isFromAdapter:_0x59a0e9}=_0x2d079a;const _0x493726=this['getCommentThread'](_0x2d079a['threadId']);if(!_0x493726)throw new _0x5747ed('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2f3632=this['_createNewComment'](_0x2d079a),{id:_0x6f362}=_0x2f3632;if(_0x493726['_add'](_0x2f3632),_0x59a0e9||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x493726['isSubmitted'])return Promise['resolve']();const _0x3a1763=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2aae39}=_0x493726,_0x2e573f=_0x3a1763['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5c3db8||(_0x5c3db8={}),this['adapter']['addComment']({'channelId':_0x2aae39,'threadId':_0x47f3c3,'commentId':_0x6f362,'content':_0x333174,'attributes':_0x5c3db8})['then'](_0x3ee626=>{_0x3a1763['remove'](_0x2e573f),_0x3ee626&&this['_updateComment']({'channelId':_0x2aae39,'threadId':_0x47f3c3,'commentId':_0x6f362,'createdAt':_0x3ee626['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x359a9a=>{throw console['error'](_0x359a9a),new _0x5747ed('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0xd82968,commentId:_0x3699d6,content:_0x28915c,createdAt:_0x2bfd1f,attributes:_0x260115,isFromAdapter:_0x16ea74}){if(void 0x0!==_0x28915c&&('string'!=typeof _0x28915c||!_0x28915c['trim']()['length']))throw new _0x5747ed('commentsrepository-update-comment-invalid-content');const _0x1f60f4=this['getCommentThread'](_0xd82968),_0x46763f=_0x1f60f4['getComment'](_0x3699d6);if(!_0x46763f)throw new _0x5747ed('commentsrepository-update-missing-comment',this);let _0x4ac12b=!0x1;if(_0x28915c&&_0x28915c!==_0x46763f['content']&&(_0x46763f['isEditable']||_0x16ea74)&&(_0x46763f['content']=_0x28915c,_0x4ac12b=!0x0),_0x2bfd1f&&_0x2bfd1f!==_0x46763f['createdAt']&&(_0x46763f['createdAt']=_0x2bfd1f,_0x46763f['isExternal']||(_0x46763f['authoredAt']=_0x2bfd1f),_0x4ac12b=!0x0),_0x260115&&!_0x384a28(_0x260115,_0x46763f['attributes'])&&(_0x46763f['attributes']=_0x260115,_0x4ac12b=!0x0),!_0x4ac12b)return Promise['resolve']();if(_0x1f60f4['fire']('commentUpdated'),_0x16ea74||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xa8d7ea=this['context']['plugins']['get']('PendingActions'),{channelId:_0x79edcb}=this['getCommentThread'](_0x46763f['threadId']),_0x16e6ae=_0xa8d7ea['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x79edcb,'threadId':_0xd82968,'commentId':_0x3699d6,'content':_0x28915c,'attributes':_0x260115})['then'](()=>_0xa8d7ea['remove'](_0x16e6ae))['catch'](_0x221a2f=>{throw console['error'](_0x221a2f),new _0x5747ed('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x3f3d2f,commentId:_0x465ce0,isFromAdapter:_0x1fe505}){const _0x409fba=this['getCommentThread'](_0x3f3d2f),_0x1a2232=_0x409fba['getComment'](_0x465ce0);if(!_0x1a2232)throw new _0x5747ed('commentsrepository-remove-missing-comment',this);if(_0x409fba['_remove'](_0x1a2232),_0x1fe505||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x329a73=this['context']['plugins']['get']('PendingActions'),{channelId:_0x362027}=_0x409fba,_0x382f24=_0x329a73['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x362027,'threadId':_0x3f3d2f,'commentId':_0x465ce0})['then'](()=>_0x329a73['remove'](_0x382f24))['catch'](_0x41953a=>{throw console['error'](_0x41953a),new _0x5747ed('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x21769e,_0x3d80fe){super();const _0x261e5f=_0x3d80fe['isResolvable'];this['channelId']=_0x3d80fe['channelId'],this['id']=_0x3d80fe['id'],this['comments']=new _0x38ae04(),this['_repository']=_0x21769e,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3d80fe['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x21769e,'_permissions',_0x21769e,'_readOnlyChannels',()=>_0x21769e['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x21769e,'_permissions',()=>_0x21769e['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x21769e,'_permissions',()=>{const _0x3997dc=_0x21769e['getPermissions'](this['channelId']);return _0x3997dc['write']||_0x3997dc['admin'];}),this['bind']('isResolvable')['to'](_0x21769e,'_permissions',()=>_0x261e5f&&_0x21769e['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3d80fe['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x30a66d,_0x4a1a60)=>_0x30a66d?_0x4a1a60?_0x30a66d<_0x4a1a60?_0x30a66d:_0x4a1a60:_0x30a66d:_0x4a1a60),this['set']('unlinkedAt',_0x3d80fe['unlinkedAt']||null),this['set']('resolvedAt',_0x3d80fe['resolvedAt']||null),this['set']('resolvedBy',_0x3d80fe['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5acd8a=>!!_0x5acd8a),this['set']('attributes',_0x3d80fe['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x597803,_0x127b68)=>_0x597803+_0x127b68['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x31c817,id:_0x214358}=this;this['_repository']['fire'](ai('submitCommentThread',_0x31c817),{'channelId':_0x31c817,'threadId':_0x214358});}setUnlinkedAt(_0x2dbe44){this['_update']({'unlinkedAt':_0x2dbe44});}['resolve']({resolvedAt:_0x40835c=new Date(),resolvedBy:_0x23a67b='',isFromAdapter:_0x5e09ca=!0x1}={}){const _0x3c4c6d=this['_repository']['context']['plugins']['get'](_0x594727)['me'],{channelId:_0x2070ec,id:_0xf5e041}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x2070ec),{'channelId':_0x2070ec,'threadId':_0xf5e041,'resolvedAt':_0x40835c,'resolvedBy':_0x23a67b||_0x3c4c6d['id'],'isFromAdapter':_0x5e09ca});}['reopen']({isFromAdapter:_0x12e010=!0x1}={}){const {channelId:_0x11b69d,id:_0x1f2d83}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x11b69d),{'channelId':_0x11b69d,'threadId':_0x1f2d83,'isFromAdapter':_0x12e010});}setContext(_0x89a030){this['context']||this['_update']({'context':_0x89a030});}setAttribute(_0x37a699,_0x165aae){const _0x260df6=_0x2fa8ae(this['attributes']);_0x2b800f(_0x260df6,_0x37a699,_0x165aae),this['_update']({'attributes':_0x260df6});}removeAttribute(_0x27d653){const _0x2a25d1=_0x2fa8ae(this['attributes']);_0x2c4059(_0x2a25d1,_0x27d653),this['_update']({'attributes':_0x2a25d1});}['remove']({isFromAdapter:_0x3c347e=!0x1}={}){const {channelId:_0x43d4ae,id:_0x403d86}=this;this['_repository']['fire'](ai('removeCommentThread',_0x43d4ae),{'channelId':_0x43d4ae,'threadId':_0x403d86,'isFromAdapter':_0x3c347e});}attachTo(_0x35e96e){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x35e96e});}addComment(_0x513100){const {channelId:_0x2db5a0,id:_0x2af9ff}=this;this['_repository']['fire'](ai('addComment',_0x2db5a0,_0x2af9ff),Object['assign']({'channelId':_0x2db5a0,'threadId':_0x2af9ff},_0x513100));}getComment(_0x14a4d8){if('string'!=typeof _0x14a4d8)throw new _0x5747ed('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x14a4d8});return this['comments']['get'](_0x14a4d8);}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'](_0x179527=>_0x179527['toJSON']()),'attributes':this['attributes']};}['_add'](_0x1bd644){return this['listenTo'](_0x1bd644,'change:authoredAt',()=>{const _0xb5ad53=this['_findOptimalIndex'](_0x1bd644),_0x860c8d=this['comments'];_0xb5ad53-0x1!=_0x860c8d['getIndex'](_0x1bd644)&&_0xb5ad53+0x1!=_0x860c8d['getIndex'](_0x1bd644)&&(this['_remove'](_0x1bd644),this['_add'](_0x1bd644));}),this['comments']['add'](_0x1bd644,this['_findOptimalIndex'](_0x1bd644));}_update(_0x514a34){const {channelId:_0x2916c0,id:_0x6b3dc2}=this;this['_repository']['fire'](ai('updateCommentThread',_0x2916c0),{..._0x514a34,'channelId':_0x2916c0,'threadId':_0x6b3dc2});}['_remove'](_0x29703f){return this['stopListening'](_0x29703f),_0x29703f['destroy'](),this['comments']['remove'](_0x29703f);}_findOptimalIndex(_0x55aec4){const _0x59883f=this['comments']['find'](_0x28f799=>new Date(_0x28f799['authoredAt'])['getTime']()>new Date(_0x55aec4['authoredAt'])['getTime']());return _0x59883f?this['comments']['getIndex'](_0x59883f):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x556302,_0x4e46d1){super();const _0xe31402=_0x556302['context']['plugins']['get'](_0x594727)['me'],_0x3a14ef=_0x556302['getCommentThread'](_0x4e46d1['threadId']),_0x462a6e=0x0===_0x3a14ef['comments']['length'],_0x292a75=_0xe31402===_0x4e46d1['author'];this['id']=_0x4e46d1['id'],this['threadId']=_0x4e46d1['threadId'],this['author']=_0x4e46d1['author'],this['creator']=_0x4e46d1['creator'],this['set']('content',_0x4e46d1['content']),this['createdAt']=_0x4e46d1['createdAt']||new Date(),this['set']('authoredAt',_0x4e46d1['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3a14ef,'resolvedAt'),this['set']('attributes',_0x4e46d1['attributes']||{}),this['bind']('isEditable')['to'](_0x556302,'_permissions',()=>{const _0x552c44=_0x556302['getPermissions'](_0x3a14ef['channelId'])['write'],_0x2e97e7=_0x556302['getPermissions'](_0x3a14ef['channelId'])['modifyAll'];return _0x292a75&&_0x552c44||!_0x292a75&&_0x2e97e7;}),this['bind']('isRemovable')['to'](_0x3a14ef,'isRemovable',_0x556302,'_permissions',_0x59ccc7=>{const _0x955498=_0x556302['getPermissions'](_0x3a14ef['channelId'])['write'],_0x142880=_0x556302['getPermissions'](_0x3a14ef['channelId'])['modifyAll'];return _0x292a75&&_0x955498||_0x59ccc7&&_0x462a6e||!_0x292a75&&_0x142880&&!_0x462a6e;}),this['bind']('isReadOnly')['to'](_0x3a14ef,'isReadOnly'),this['_repository']=_0x556302;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x590ea6){const _0x4c863f=document['createElement']('div');return _0x4c863f['innerHTML']=_0x590ea6,_0x4c863f['textContent']['length'];}(this['content']),0xc8);}update(_0x3f6c29){const {threadId:_0x1b5045,id:_0x4f5e19}=this;if(!this['_repository']['hasCommentThread'](_0x1b5045))throw new _0x5747ed('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x41efac}=this['_repository']['getCommentThread'](_0x1b5045);this['_repository']['fire'](ai('updateComment',_0x41efac,_0x1b5045),{'channelId':_0x41efac,'threadId':_0x1b5045,'commentId':_0x4f5e19,..._0x3f6c29});}setAttribute(_0x4ab505,_0x5d1efb){const _0x425472=_0x2fa8ae(this['attributes']);_0x2b800f(_0x425472,_0x4ab505,_0x5d1efb),this['update']({'attributes':_0x425472});}removeAttribute(_0x57af4a){const _0x1387cf=_0x2fa8ae(this['attributes']);_0x2c4059(_0x1387cf,_0x57af4a),this['update']({'attributes':_0x1387cf});}['remove'](_0x460f78={}){if(!_0x460f78['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x20391a,id:_0xa360b1}=this;if(!this['_repository']['hasCommentThread'](_0x20391a))throw new _0x5747ed('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2957a7}=this['_repository']['getCommentThread'](_0x20391a);this['_repository']['fire'](ai('removeComment',_0x2957a7,_0x20391a),{'channelId':_0x2957a7,'threadId':_0x20391a,'commentId':_0xa360b1,..._0x460f78});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x34eacb,..._0x486650){for(const _0x1c7a88 of _0x486650)void 0x0!==_0x1c7a88&&(_0x34eacb+=':'+String(_0x1c7a88));return _0x34eacb;}var ci=class extends _0x4b3fde{constructor(_0x49a7d2){super(_0x49a7d2),this['set']('hasContent',!0x1);}['refresh'](){const _0x2ca53b=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x17f532 of _0x2ca53b['getRanges']())if(this['_hasContent'](_0x17f532))return void(this['hasContent']=!0x0);}execute({threadId:_0x515aca=_0x13b8e9(),ranges:_0x1e433d,comment:_0x39d2a8}={}){const _0x1fe7d4=this['editor']['model'],_0x5d3dfd=_0x1e433d??Array['from'](_0x1fe7d4['document']['selection']['getRanges']()),_0x373407=[];for(const _0x4dbdfd of _0x5d3dfd)this['_hasContent'](_0x4dbdfd)&&_0x373407['push'](this['_trimToContent'](_0x4dbdfd));if(!_0x373407['length'])throw new _0x5747ed('addcommentthreadcommand-incorrect-ranges',null);_0x39d2a8&&this['_createCommentThread'](_0x515aca,_0x39d2a8),this['_createMarkersFromRanges'](_0x515aca,_0x373407,!!_0x39d2a8);}_createMarkersFromRanges(_0x192328,_0x2565ef,_0x52d67e){this['editor']['model']['change'](_0x228a85=>{for(const _0x1fbce4 of _0x2565ef){const _0x3db88e='comment:'+_0x192328+':'+_0x13b8e9()['substr'](0x1,0x5);_0x228a85['addMarker'](_0x3db88e,{'range':_0x1fbce4,'usingOperation':_0x52d67e,'affectsData':_0x52d67e});}});}_createCommentThread(_0x5af3f9,_0x24a187){const _0x3af558=this['editor']['plugins']['get']('CommentsRepository'),_0x2edf59=this['editor']['config']['get']('collaboration.channelId'),_0x26dc79=this['editor']['plugins']['get']('Users')['me'];if(!_0x26dc79)throw new _0x5747ed('addcommentthreadcommand-user-not-found',null);_0x3af558['addCommentThread']({'threadId':_0x5af3f9,'channelId':_0x2edf59,'comments':[{'authorId':_0x26dc79['id'],'content':_0x24a187,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x471fd8){for(const _0x20276a of _0x471fd8['getItems']())if(this['_itemIsContent'](_0x20276a))return!0x0;return!0x1;}_itemIsContent(_0x3e7e20){return _0x3e7e20['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3e7e20)&&!_0x3e7e20['is']('element','tableCell');}_trimToContent(_0x48741e){const _0x55b81b=_0x3c747f=>!this['_itemIsContent'](_0x3c747f['item']),_0x3c948a=_0x48741e['start']['getLastMatchingPosition'](_0x55b81b),_0x235a68=_0x48741e['end']['getLastMatchingPosition'](_0x55b81b,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3c948a,_0x235a68);}},di=class extends _0x58cf6e{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1779f8){super(_0x1779f8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x41fef9=this['editor'],_0x10f913=_0x41fef9['model']['document']['selection'],_0x2fbab3=_0x5cfde8(()=>this['refreshSelectedViews'](),0xa);_0x10f913['on']('change:range',(_0x52d4bd,_0x2f38c4)=>{_0x2f38c4['directChange']&&(_0x2fbab3['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x41fef9['editing']['view']['document'],'change:isFocused',(_0x3ae9bf,_0x341898,_0x29bb14)=>{_0x29bb14&&_0x2fbab3();}),this['listenTo'](_0x41fef9['ui']['focusTracker'],'change:isFocused',(_0x44ae2b,_0x2afaa1,_0x4fd66b)=>{_0x4fd66b||this['fire']('blur',{'isAnnotationTracked':_0x473b07=>this['_editorAnnotationsData']['has'](_0x473b07['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x683a5f){if(this['_editorAnnotations']['has'](_0x683a5f['view']))return;this['_editorAnnotations']['add'](_0x683a5f['view']),this['editor']['ui']['focusTracker']['add'](_0x683a5f['view']['element']);const _0x2f1773=this['editor']['plugins']['get'](ti);this['listenTo'](_0x2f1773['collection'],'remove',(_0x549af3,_0x12a690)=>{this['editor']['ui']['focusTracker']['remove'](_0x12a690['view']['element']),this['_editorAnnotations']['delete'](_0x12a690['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x4b536e){if('function'!=typeof _0x4b536e)throw new _0x5747ed('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4b536e);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x572a9c,annotations:_0x5102af}){const _0x5613b7=[],_0x244e01=this['editor']['model']['document']['selection'],_0x1a33f9=Array['from'](_0x244e01['getRanges']());for(const [_0x472535,_0x36205c]of this['_editorAnnotationsData']){const _0x71aa45=_0x24c349(_0x36205c),_0xb7c903=_0x5102af['getByInnerView'](_0x472535);_0x71aa45&&_0xb7c903&&_0x5613b7['push']({'annotation':_0xb7c903,'range':_0x71aa45});}function _0x24c349(_0xd0a908){for(const _0x182159 of _0xd0a908)for(const _0x2f4909 of _0x1a33f9)if(_0x182159['containsRange'](_0x2f4909,!_0x244e01['isCollapsed']))return _0x182159;return null;}return _0x5613b7['sort']((_0x5b155b,_0x4e7f34)=>{const _0x133b45=_0x5b155b['range'],_0x3a31f0=_0x4e7f34['range'];if(!_0x133b45['isEqual'](_0x3a31f0)){if(_0x133b45['containsRange'](_0x3a31f0,!0x0))return 0x1;if(_0x3a31f0['containsRange'](_0x133b45,!0x0))return-0x1;}return _0x5b155b['annotation']==_0x572a9c?-0x1:_0x4e7f34['annotation']==_0x572a9c?0x1:0x0;})['map'](_0x10c70a=>_0x10c70a['annotation']);}get _editorAnnotationsData(){const _0x40d1c4=new Map();for(const _0x3caefc of Array['from'](this['_dataCollectors']))for(const [_0x5de9a2,_0x21d47b]of _0x3caefc())_0x40d1c4['set'](_0x5de9a2,_0x21d47b);return _0x40d1c4;}},li=class extends _0x58cf6e{afterInit(){const _0x2a2adc=this['editor'];_0x2a2adc['plugins']['has']('RestrictedEditingModeEditing')&&_0x2a2adc['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x58cf6e{constructor(_0x3a971b){super(_0x3a971b),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x185bab=this['editor'],_0x2abae0=_0x185bab['commands']['get']('importWord'),_0x31140a=_0x185bab['plugins']['get'](_0x594727);_0x2abae0&&(_0x2abae0['on']('execute',(_0x36cbcd,[,_0x49cc9b])=>{_0x49cc9b['collaboration_features']={'comments':!0x0,'user_id':_0x31140a['me']['id']};},{'priority':_0xa1b45f['high']+0xa}),this['listenTo'](_0x2abae0,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x3d67a1,_0x3f885e){const {comment_threads:_0x46e8ec}=_0x3f885e;_0x46e8ec&&_0x46e8ec['forEach'](({thread_id:_0x4de401,comments:_0x2802f7,is_resolved:_0x51ec7b})=>{const _0x231e26=new Date(),_0x5d0faa=_0x2802f7['map'](({author:_0x486662,content:_0x3cc12b,created_at:_0x3920c1})=>({'content':_0x3cc12b,'authorId':this['editor']['plugins']['get'](_0x594727)['me']['id'],'createdAt':_0x231e26,'attributes':{'@external':{'authorName':_0x486662,'createdAt':_0x3920c1?new Date(_0x3920c1):new Date(),'source':'importWord'}}})),_0x5101c3=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x5101c3,'threadId':_0x4de401,'comments':_0x5d0faa,'resolvedAt':_0x51ec7b?_0x231e26:null});});}},ui=class extends _0x58cf6e{constructor(_0x5f1665){super(_0x5f1665),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x32f7aa=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x32f7aa,'contentInsertion',(_0x1a4afc,_0x53f7e0)=>this['_removeMarkersWithoutThreads'](_0x53f7e0['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0xf9861e){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xf9861e;const _0x14d536=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1f119e of _0xf9861e['keys']()){const [_0x5711b3,_0x21c0cc]=_0x1f119e['split'](':');'comment'!=_0x5711b3||_0x14d536['hasCommentThread'](_0x21c0cc)||_0xf9861e['delete'](_0x1f119e);}return _0xf9861e;}_registerMarkerInClipboardPipeline(){const _0x395137=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x31a4e9=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x31a4e9&&_0x395137['_registerMarkerToCopy']('comment',_0x31a4e9);}_mapCommentsCopyConfigToRegisterConfiguration(_0x6acead){switch(_0x6acead){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x181318){const _0x4734cd=_0x181318['split'](':');return{'group':_0x4734cd[0x0],'id':_0x4734cd[0x1],'part':_0x4734cd[0x2]};}var pi=class extends _0x58cf6e{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x25ca7d,_0x5d0fc4)=>{if(!_0x5d0fc4['options']['showCommentHighlights'])return null;if(_0x5d0fc4['options']['ignoreResolvedComments']){const {id:_0x2d54ef}=fi(_0x25ca7d['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2d54ef)?.['isResolved']&&_0x25ca7d['item'])return _0x5d0fc4['consumable']['consume'](_0x25ca7d['item'],'addMarker:'+_0x25ca7d['markerName']),_0x5d0fc4['consumable']['consume'](_0x25ca7d['item'],'removeMarker:'+_0x25ca7d['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x395bac=>{_0x395bac['on']('addMarker:comment',(_0xf518a2,_0x19c72a,_0x786afb)=>{if(!_0x786afb['options']['showCommentHighlights'])return;const _0x438b02=_0x19c72a['item'];if(!_0x438b02)return;const _0x468640=_0x786afb['mapper']['toViewElement'](_0x438b02);this['editor']['model']['schema']['isObject'](_0x438b02)&&_0x468640&&!_0x468640['getCustomProperty']('widget')&&_0x468640['is']('containerElement')&&Ct(_0x468640,_0x786afb['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1de8ff,{writer:_0x3d12de,options:_0x33dbee})=>{if(!_0x33dbee['showCommentHighlights'])return null;const _0xb81fd8=_0x3d12de['createContainerElement']('div'),_0x374f95=_0x3d12de['createEmptyElement']('hr');return _0x3d12de['addClass']('ck-horizontal-line',_0xb81fd8),_0x3d12de['insert'](_0x3d12de['createPositionAt'](_0xb81fd8,0x0),_0x374f95),_0xb81fd8;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x469c60,{writer:_0x3bf767,options:_0x817774})=>{if(!_0x817774['showCommentHighlights'])return null;const _0x54b299=_0x3bf767['createContainerElement']('span'),_0xf37f45=_0x3bf767['createEmptyElement']('img');return _0x3bf767['addClass']('image-inline',_0x54b299),_0x3bf767['insert'](_0x3bf767['createPositionAt'](_0x54b299,0x0),_0xf37f45),_0x54b299;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xbfe28e,{writer:_0x49ab7e,options:_0x517907})=>{if(_0x517907['showCommentHighlights'])return _0x49ab7e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xdbb636,_0x180012,_0x5552a3)=>{_0x5552a3['options']['showCommentHighlights']&&_0xdbb636['stop']();},{'priority':'high'});}},wi=class extends _0x58cf6e{static get requires(){return[oi,di,_0x594727,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1022d4){super(_0x1022d4),this['set']('isThreadsLoadingPaused',!0x0),_0x1022d4['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x38aafa,_0x125a05,_0xd136ce,_0x26d400)=>{const _0x4b02ee=_0x1022d4['plugins']['get'](oi),_0x21da14=_0xd136ce?fi(_0xd136ce)['id']:null;_0x1022d4['model']['change'](()=>{if(_0x21da14){const _0x512b3d=this['getAllMarkersForId'](_0x21da14);for(const _0x463f0d of _0x512b3d)_0x1022d4['editing']['reconvertMarker'](_0x463f0d);}if(_0x26d400){const {id:_0x4cd411}=fi(_0x26d400),_0x5b91ce=_0x4b02ee['getCommentThread'](_0x4cd411);if(_0x5b91ce&&_0x5b91ce['unlinkedAt'])return;if(_0x5b91ce&&!_0x5b91ce['isAttached'])return;const _0x3f4dfa=this['getAllMarkersForId'](_0x4cd411);for(const _0x52043f of _0x3f4dfa)_0x1022d4['editing']['reconvertMarker'](_0x52043f);}}),_0x21da14&&this['scrollToThreadMarker'](_0x21da14);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x5b982a=this['editor'],_0x1d5550=_0x5b982a['plugins']['get'](oi),_0x535f3e=_0x5b982a['config']['get']('collaboration.channelId'),_0x4f57f0=_0x1d5550['getCommentThreads']()['filter'](_0x5be3e4=>_0x5be3e4['channelId']!==_0x535f3e);_0x5b982a['commands']['add']('addCommentThread',new ci(_0x5b982a)),this['listenTo'](_0x5b982a,'change:isReadOnly',(_0xae068c,_0x35e251,_0x1d6f9b)=>{_0x1d5550['switchReadOnly'](_0x1d6f9b,_0x5b982a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1d5550,gi('addCommentThread',_0x535f3e),(_0x13e96e,{threadId:_0x570084})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x570084)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x570084);}),this['listenTo'](_0x1d5550,gi('removeCommentThread',_0x535f3e),(_0x20e2ff,{threadId:_0x3e5e96})=>{_0x5b982a['model']['enqueueChange']({'isUndoable':!0x1},_0x3fed4e=>{const _0x23fa7e=this['getAllMarkersForId'](_0x3e5e96);for(const _0x3a807a of _0x23fa7e)_0x3fed4e['removeMarker'](_0x3a807a);});}),this['listenTo'](_0x1d5550,gi('resolveCommentThread',_0x535f3e),(_0x359628,{threadId:_0x2597a4})=>{this['_reconvertMarkers'](_0x2597a4);const _0x553467=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x553467['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2597a4)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1d5550,gi('reopenCommentThread',_0x535f3e),(_0x16cc44,{threadId:_0xe881f8})=>{this['_reconvertMarkers'](_0xe881f8);},{'priority':'low'}),this['listenTo'](_0x1d5550,gi('addComment',_0x535f3e),(_0x4a1ba3,{threadId:_0x33d55b,isFromAdapter:_0x390cd7})=>{const _0x30af4a=this['getAllMarkersForId'](_0x33d55b);!_0x390cd7&&0x0!=_0x30af4a['length']&&_0x1d5550['hasCommentThread'](_0x33d55b)&&0x1===_0x1d5550['getCommentThread'](_0x33d55b)['length']&&_0x5b982a['model']['enqueueChange']({'isUndoable':!0x1},_0x4a49fb=>{for(const _0x2ad88a of _0x30af4a)_0x4a49fb['updateMarker'](_0x2ad88a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4f57f0);}afterInit(){!async function(_0x1a4326){const _0x47d421='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x441f40=0x791d0,_0x3362f5=window['Date']['now'](),_0x597edb=_0x1a4326['editor'],_0xb9ae09=new window['Promise'](_0x1139fe=>{_0x597edb['once']('ready',_0x1139fe);}),_0x2439cf={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x32e6cf=_0x597edb['config']['get']('licenseKey');async function _0x12eaea(){let _0x271971,_0x237a4c=null,_0x180e72=null;try{return'GPL'==_0x32e6cf?'NotAllowed':(_0x271971=_0x2cff53(),_0x271971?(_0x271971['usageEndpoint']&&(_0x180e72=_0x1111de(_0x271971['usageEndpoint'],_0x271971['jti'])),await _0xb19be5()?_0x39f6f4()?_0x19d295()?'Expired':_0x7aaa15()?('evaluation'==_0x271971['licenseType']&&(_0x237a4c=_0x5241c6('EvaluationLimit')),await _0x47590a()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x19d295(){const _0x4c446c=['evaluation','trial']['includes'](_0x271971['licenseType'])?_0x3362f5/0x3e8:0xe10*_0x441f40;return _0x271971['exp']<_0x4c446c;}function _0x39f6f4(){const _0x10f4c4=_0x271971['features'];if(!_0x10f4c4)return!0x1;if(_0x10f4c4['includes']('*'))return!0x0;if(_0x10f4c4['includes']('CMT'))return!0x0;if(_0x10f4c4['includes']('TRILIUM')&&_0x8b556())return!0x0;if(_0x10f4c4['includes']('RCMT')){if(_0x1baace())return!0x0;if(_0x2bb4be()||_0x38a722())return!0x0;}return!0x1;}function _0x7aaa15(){const _0x4e8cf8=_0x271971['licensedHosts'];if(!_0x4e8cf8||0x0==_0x4e8cf8['length'])return!0x0;const {hostname:_0x5ecebb}=new URL(window['location']['href']);if(_0x4e8cf8['includes'](_0x5ecebb))return!0x0;const _0x22be84=_0x5ecebb['split']('.');return _0x4e8cf8['filter'](_0x590a3e=>_0x590a3e['includes']('*'))['map'](_0x368b46=>_0x368b46['split']('.'))['filter'](_0x3e3056=>_0x3e3056['length']<=_0x22be84['length'])['map'](_0x482e7c=>Array(_0x22be84['length']-_0x482e7c['length'])['fill']('*'===_0x482e7c[0x0]?'*':'')['concat'](_0x482e7c))['some'](_0x2f1ac2=>_0x22be84['every']((_0x223f7c,_0x15abfe)=>_0x2f1ac2[_0x15abfe]===_0x223f7c||'*'===_0x2f1ac2[_0x15abfe]));}function _0x47590a(){return _0x237a4c&&_0x180e72?new window['Promise']((_0xe1baaa,_0x491106)=>{_0x237a4c['then'](_0xe1baaa,_0x491106),_0x180e72['then'](_0x5dffae=>{'Valid'!=_0x5dffae&&_0xe1baaa(_0x5dffae);},_0x491106);}):_0x237a4c||_0x180e72||'Valid';}}function _0x1111de(_0x172704,_0x35519a){return new window['Promise'](_0x1bea0b=>{if(_0x2f2ed9())return _0x1bea0b('Valid');_0x257dcd(),_0x597edb['decorate']('_sendUsageRequest');let _0x55c167=!0x1;const _0x4adb60=_0x13b8e9();function _0x14f7a9(_0x36f577){return!!_0x36f577&&('object'==typeof _0x36f577||'function'==typeof _0x36f577)&&'function'==typeof _0x36f577['then']&&'function'==typeof _0x36f577['catch'];}function _0x59179c(_0x582ecd){_0x4f490a(_0x582ecd)['then'](_0x520ac0=>_0x520ac0&&'ok'==_0x520ac0['status']?_0x1f5ff5(_0x261252(_0x4adb60+_0x35519a))!=_0x520ac0['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x2d25f3=>(_0x3461e6(),_0x2d25f3),()=>{const _0x11936c=_0x606075();return null==_0x11936c?(_0x3461e6(),'Valid'):_0x3362f5-_0x11936c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x1bea0b)['catch'](()=>{_0x1bea0b('UsageLimit');});const _0x177381=0x36ee80;function _0x3461e6(){const _0x370e07='llct-'+_0x1f5ff5(_0x261252(_0x172704)),_0x489193=_0x1c2253(_0x1f5ff5(window['Math']['ceil'](_0x3362f5/_0x177381)));window['localStorage']['setItem'](_0x370e07,_0x489193);}function _0x606075(){const _0x12d707='llct-'+_0x1f5ff5(_0x261252(_0x172704)),_0x2e7dd9=window['localStorage']['getItem'](_0x12d707);return _0x2e7dd9?window['parseInt'](_0x1c2253(_0x2e7dd9),0x10)*_0x177381:null;}function _0x4f490a(_0x1fd8c7){return new window['Promise']((_0x1f5a9b,_0x4547fb)=>{_0x1fd8c7['then'](_0x1f5a9b,_0x4547fb),window['setTimeout'](_0x4547fb,0x1d4c0);});}}_0x597edb['on']('_sendUsageRequest',(_0x4c0a59,_0x286c11)=>{if(_0x286c11[0x0]!=_0x172704)return _0x1bea0b('UsageLimit');_0x286c11[0x1]={..._0x286c11[0x1],'requestId':_0x4adb60};},{'priority':'high'}),_0x597edb['on']('_sendUsageRequest',_0x9f05a4=>{_0x14f7a9(_0x9f05a4['return'])&&(_0x55c167=!0x0,_0x59179c(_0x9f05a4['return']));},{'priority':'low'}),_0xb9ae09['then'](()=>{_0x55c167||_0x1bea0b('UsageLimit');});});function _0x2f2ed9(){return'auto'==_0x597edb['editing']['view']['_overlayModeHint'];}function _0x257dcd(){_0x597edb['editing']['view']['_overlayModeHint']='auto';}}function _0x5241c6(_0x429c62){const _0x1ab422=[new window['Promise'](_0x1463fe=>setTimeout(_0x1463fe,0x93ecc)),_0xb9ae09['then'](()=>new window['Promise'](_0x578dea=>{let _0x45b35d=0x0;_0x597edb['model']['on']('applyOperation',(_0x1ec678,_0xd21266)=>{_0xd21266[0x0]['isDocumentOperation']&&_0x45b35d++,0x5e8==_0x45b35d&&(_0x578dea(),_0x1ec678['off']());});}))];return window['Promise']['race'](_0x1ab422)['then'](()=>_0x429c62);}async function _0x6b9b4f(){await _0xb9ae09,_0x597edb['model']['change']=_0x2ce4fb,_0x597edb['model']['enqueueChange']=_0x2ce4fb,_0x597edb['enableReadOnlyMode']('model');}function _0x8b556(){return window['glob']&&window['glob']['triliumVersion'];}function _0x1baace(){return _0x8e1d61('WebSocketGateway')&&'connected'==_0x136919('WebSocketGateway')['state'];}function _0x2bb4be(){return _0x8e1d61('RevisionViewerIntegration');}function _0x38a722(){return _0x8e1d61('TrackChangesDataGetter');}function _0x57358c(_0x46d010){const _0x1dad51=_0x210d49();_0x597edb[_0x1dad51]='commentsLicenseKey'+_0x46d010,'Valid'!=_0x46d010&&_0x6b9b4f();}function _0x210d49(){const _0x45b655=window['String'](window['performance']['now']())['replace']('.','');let _0x384722='K';for(let _0x4d2dcf=0x0;_0x4d2dcf<_0x45b655['length'];_0x4d2dcf+=0x2){let _0x36367f=window['parseInt'](_0x45b655['substring'](_0x4d2dcf,_0x4d2dcf+0x2));_0x36367f>=0x3e&&(_0x36367f-=0x3e),_0x384722+=_0x47d421[_0x36367f];}return _0x384722;}function _0x2cff53(){const _0x21de82=_0x32e6cf['split']('.');if(0x3!=_0x21de82['length'])return null;return _0x1194c7(_0x21de82[0x1]);function _0x1194c7(_0x251420){const _0x37b556=_0x35fe0b(_0x251420);return _0x37b556&&_0x419d20()?_0x37b556:null;function _0x419d20(){const _0x1d40b3=_0x37b556['jti'],_0x2f37b4=window['parseInt'](_0x1d40b3['substring'](_0x1d40b3['length']-0x8),0x10),_0x5e1b36={..._0x37b556,'jti':_0x1d40b3['substring'](0x0,_0x1d40b3['length']-0x8)};return delete _0x5e1b36['vc'],_0x261252(_0x5e1b36)==_0x2f37b4;}}}async function _0xb19be5(){let _0x275889=!0x0;try{const [_0x3a3d0c,_0x381e6e,_0x18df35]=_0x32e6cf['split']('.');return _0x487ef1(_0x3a3d0c),await _0x542fb2(_0x3a3d0c,_0x381e6e,_0x18df35),_0x275889;}catch{return!0x1;}function _0x487ef1(_0x10427e){const _0x22ad26=_0x35fe0b(_0x10427e);_0x22ad26&&'ES256'==_0x22ad26['alg']||(_0x275889=!0x1);}async function _0x542fb2(_0xff697e,_0x184e9e,_0x2a7d42){const _0x2275a5=window['Uint8Array']['from'](_0x4cd869(_0x2a7d42),_0x1075cb=>_0x1075cb['charCodeAt'](0x0)),_0xb0d265=new window['TextEncoder']()['encode'](_0xff697e+'.'+_0x184e9e),_0x50dd11=window['crypto']['subtle'];if(!_0x50dd11)return;const _0x2f9c91=await _0x50dd11['importKey']('jwk',_0x2439cf,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x50dd11['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x2f9c91,_0x2275a5,_0xb0d265)||(_0x275889=!0x1);}}function _0x35fe0b(_0x31d9e1){return _0x31d9e1['startsWith']('ey')?JSON['parse'](_0x4cd869(_0x31d9e1)):null;}function _0x4cd869(_0x45135e){return window['atob'](_0x45135e['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x261252(_0x58b080){let _0x5c2762=0x1505;function _0x5ddfdc(_0x2686b5){for(let _0x42d58a=0x0;_0x42d58a<_0x2686b5['length'];_0x42d58a++){const _0x13738a=_0x2686b5['charCodeAt'](_0x42d58a);_0x5c2762=(_0x5c2762<<0x5)+_0x5c2762+_0x13738a,_0x5c2762&=_0x5c2762;}}function _0x417be9(_0x2163cd){Array['isArray'](_0x2163cd)?_0x2163cd['forEach'](_0x417be9):_0x2163cd&&'object'==typeof _0x2163cd?Object['entries'](_0x2163cd)['sort']()['forEach'](([_0x1def74,_0xf71d64])=>{_0x5ddfdc(_0x1def74),_0x417be9(_0xf71d64);}):_0x5ddfdc(window['String'](_0x2163cd));}return _0x417be9(_0x58b080),_0x5c2762>>>0x0;}function _0x1f5ff5(_0xdc2e1){return _0xdc2e1['toString'](0x10)['padStart'](0x8,'0');}function _0x1c2253(_0x3a8c9f){return _0x3a8c9f['split']('')['reverse']()['join']('');}function _0x8e1d61(_0x2c3ce4){return _0x597edb['plugins']['has'](_0x2c3ce4);}function _0x136919(_0x3a3527){return _0x597edb['plugins']['get'](_0x3a3527);}function _0x2ce4fb(){}_0x57358c(await _0x12eaea());}(this);}destroy(){const _0x455d8a=this['editor']['plugins']['get'](oi),_0xbedf20=this['editor']['config']['get']('collaboration.channelId');for(const _0x61d272 of _0x455d8a['getCommentThreads']({'channelId':_0xbedf20}))_0x455d8a['_detachCommentThread'](_0x61d272['id']),_0x455d8a['_threads']['delete'](_0x61d272['id']);super['destroy']();}['hasMarkerForId'](_0x412b8c){return this['getAllMarkersForId'](_0x412b8c)['length']>0x0;}getAllMarkersForId(_0x24930a){const _0x4ec595=[];for(const _0x259e72 of this['editor']['model']['markers'])_0x259e72['name']['startsWith']('comment:'+_0x24930a)&&_0x4ec595['push'](_0x259e72);return _0x4ec595;}['scrollToThreadMarker'](_0x551173){setTimeout(()=>{const _0x518acb=this['_getTargetForId'](_0x551173);_0x518acb&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x551173&&_0x6018df({'target':_0x518acb[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x5a2ed5){this['editor']['model']['change'](()=>{for(const _0xc2b41a of this['getAllMarkersForId'](_0x5a2ed5))this['editor']['editing']['reconvertMarker'](_0xc2b41a);});}_attachArchivedThread(_0x2f4f49){const _0x50769b=this['editor']['plugins']['get'](oi),_0x5182f7=this['editor']['plugins']['get'](di),_0x2149b0=_0x50769b['getCommentThread'](_0x2f4f49);if(!_0x2149b0['isAttached']){const _0x2b9469=_0x2149b0['attachTo'](()=>this['_getTargetForId'](_0x2149b0['id']));_0x5182f7['registerAnnotation'](_0x2b9469),_0x2149b0['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x3c097a=this['editor'],_0x310835=_0x3c097a['plugins']['get'](_0x594727);_0x3c097a['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x43a1ac,_0x1e5d93)=>{const {id:_0x358dce}=fi(_0x43a1ac['markerName']),_0x4c0b1f=_0x3c097a['plugins']['get'](oi)['getCommentThread'](_0x358dce),_0x406236=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x358dce;let _0x3f7da6;if(_0x4c0b1f&&_0x4c0b1f['isResolved']&&!_0x406236&&_0x43a1ac['item'])return _0x1e5d93['consumable']['consume'](_0x43a1ac['item'],'addMarker:'+_0x43a1ac['markerName']),_0x1e5d93['consumable']['consume'](_0x43a1ac['item'],'removeMarker:'+_0x43a1ac['markerName']),null;const _0x1bf6f7=['ck-comment-marker'];return _0x406236&&_0x1bf6f7['push']('ck-comment-marker--active'),_0x3f7da6=_0x4c0b1f?.['length']?_0x4c0b1f['comments']['first']['author']['id']:_0x310835['me']['id'],{'classes':_0x1bf6f7,'attributes':{'data-comment':_0x358dce,'data-author-id':_0x3f7da6}};}}),_0x3c097a['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x526000,{options:_0x1ca57c})=>{if(_0x1ca57c['showCommentHighlights'])return null;const _0x2857fa=_0x3c097a['plugins']['get'](oi),_0x2ad943=_0x3c097a['model']['markers']['get'](_0x526000),{id:_0x4628d8,part:_0x487ff1}=fi(_0x526000);return _0x2ad943&&!_0x2ad943['affectsData']||_0x1ca57c['ignoreResolvedComments']&&_0x2857fa['getCommentThread'](_0x4628d8)?.['isResolved']?null:{'group':'comment','name':_0x487ff1?_0x4628d8+':'+_0x487ff1:_0x4628d8};}}),_0x3c097a['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x20e30a,{writer:_0x1ca344})=>_0x1ca344['createElement']('$marker',{'data-name':'comment:'+_0x20e30a['getAttribute']('id')})}),_0x3c097a['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4804f9=this['editor'],_0x32ced8=_0x4804f9['plugins']['get'](oi),_0x29cad8=new Set(),_0x11130a=new Set();_0x4804f9['model']['document']['registerPostFixer'](_0xdc8867=>{let _0x5144d9=!0x1;for(const {name:_0x9df3fc,data:_0x21de67}of _0x4804f9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x28ca82,id:_0xff9616}=fi(_0x9df3fc);let _0x35f2c5=_0x21de67['newRange'];if('comment'!==_0x28ca82||!_0x35f2c5)continue;const _0x5bf106='$graveyard'===_0x35f2c5['root']['rootName'];_0x5bf106||(_0x35f2c5=_i(_0x35f2c5,_0x4804f9['model']),!_0x35f2c5||_0x35f2c5['isCollapsed']||!_0x21de67['newRange']||_0x35f2c5['isEqual'](_0x21de67['newRange']))?_0x4804f9['model']['hasContent'](_0x35f2c5)&&!_0x5bf106?this['isThreadsLoadingPaused']?_0x29cad8['add'](_0x9df3fc):this['_handleThreadMarker'](_0x9df3fc,_0xff9616):(_0x11130a['add'](_0x9df3fc),_0x29cad8['delete'](_0x9df3fc),_0xdc8867['removeMarker'](_0x9df3fc),_0x5144d9=!0x0):(_0xdc8867['updateMarker'](_0x9df3fc,{'range':_0x35f2c5}),_0x5144d9=!0x0);}return _0x5144d9;}),this['on']('change:isThreadsLoadingPaused',(_0x2df87f,_0x4353af,_0x1a952c)=>{if(!_0x1a952c&&_0x29cad8['size'])for(const _0x4b9a47 of _0x29cad8){const {id:_0x2618df}=fi(_0x4b9a47);_0x29cad8['delete'](_0x4b9a47),_0x4804f9['model']['markers']['get'](_0x4b9a47)&&this['_handleThreadMarker'](_0x4b9a47,_0x2618df);}}),this['listenTo'](_0x4804f9['model']['document'],'change',()=>{for(const {name:_0x22dbb7,data:{newRange:_0x1fc0e6}}of _0x4804f9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x529028,id:_0x53ae75}=fi(_0x22dbb7);if('comment'!==_0x529028)continue;const _0x331870=_0x32ced8['getCommentThread'](_0x53ae75),_0x10ec99=this['hasMarkerForId'](_0x53ae75);_0x331870&&(!_0x331870['_hasTargetInContent']&&_0x1fc0e6&&_0x4804f9['editing']['view']['once']('render',()=>{const _0x307a57=_0x4804f9['plugins']['get'](ti),_0x56a340=_0x32ced8['_threadToController']['get'](_0x331870)['view'];_0x307a57['getByInnerView'](_0x56a340)['refreshVisibility']();},{'priority':'low'}),_0x331870['_hasTargetInContent']=_0x10ec99||!!_0x1fc0e6),_0x1fc0e6||(_0x11130a['add'](_0x22dbb7),_0x29cad8['delete'](_0x22dbb7));}for(const _0x454010 of _0x11130a){const {id:_0x9d5a69}=fi(_0x454010),_0x1bc977=_0x32ced8['getCommentThread'](_0x9d5a69);if(_0x29cad8['delete'](_0x454010),!_0x1bc977)continue;const _0x2fd91e=this['hasMarkerForId'](_0x9d5a69);_0x2fd91e||_0x1bc977['isSubmitted']?_0x2fd91e||_0x1bc977['unlinkedAt']||_0x1bc977['setUnlinkedAt'](new Date()):_0x1bc977['remove']();}_0x11130a['clear']();});}_handleInitialThreads(_0x433f9d){_0x433f9d['forEach'](_0x27cd38=>{_0x27cd38['unlinkedAt']&&this['_attachArchivedThread'](_0x27cd38['id']);});}_getTargetForId(_0x11fe71){const _0x581b6f=this['editor'],_0x3a0545=this['getAllMarkersForId'](_0x11fe71);return _0x30c628(_0x581b6f['editing'],_0x3a0545);}_getTextContext(_0x3f652f){const _0x55c1ae=this['getAllMarkersForId'](_0x3f652f);let _0x42e8fb='',_0x3fdb2c=!0x1;for(const _0x1db715 of _0x55c1ae){const _0x49f39=_0x1db715['getRange']();for(const _0x208c0c of Array['from'](_0x49f39['getItems']()))_0x208c0c['is']('$textProxy')?(_0x42e8fb&&_0x3fdb2c&&(_0x42e8fb+='\x20',_0x3fdb2c=!0x1),_0x42e8fb+=_0x208c0c['data']):_0x3fdb2c=!0x0;_0x3fdb2c=!0x0;}return _0x42e8fb['substring'](0x0,0x96);}_attachMarkerToThread(_0x3180d8,_0x1fca04){const _0x4d6fdc=this['editor'],_0xe3f7ef=_0x4d6fdc['plugins']['get'](oi);let _0x289e72=_0xe3f7ef['getCommentThread'](_0x1fca04);const _0x2ee009=_0x4d6fdc['config']['get']('collaboration.channelId'),_0x354dce=_0x4d6fdc['plugins']['get'](di);return _0x289e72&&(_0x289e72['unlinkedAt']&&_0x289e72['setUnlinkedAt'](null),_0x289e72['isAttached'])||(this['getAllMarkersForId'](_0x1fca04)[0x0]['managedUsingOperations']?_0xe3f7ef['fetchCommentThread']({'channelId':_0x2ee009,'threadId':_0x1fca04})['then'](_0x53ed22=>{if('destroyed'!==_0x4d6fdc['state']){if(_0x289e72=_0x53ed22,_0x289e72&&!_0x289e72['isAttached']){const _0x1f3fec=_0x289e72['attachTo'](()=>this['_getTargetForId'](_0x1fca04));_0x354dce['registerAnnotation'](_0x1f3fec),_0x289e72['isResolved']&&this['_reconvertMarkers'](_0x1fca04);}else{if(!_0x289e72){const _0x570146=this['getAllMarkersForId'](_0x1fca04);_0x4d6fdc['model']['change'](_0x42965c=>{for(const _0x2339d1 of _0x570146)_0x42965c['removeMarker'](_0x2339d1);});}}}}):_0x4d6fdc['editing']['view']['once']('render',()=>{if(_0xe3f7ef['getCommentThread'](_0x1fca04))return;const _0x5bb422=_0x4d6fdc['plugins']['get'](ti);_0x289e72=_0xe3f7ef['openNewCommentThread']({'channelId':_0x2ee009,'threadId':_0x1fca04,'target':()=>this['_getTargetForId'](_0x1fca04),'context':{'type':'text','value':this['_getTextContext'](_0x1fca04)}});const _0x415247=_0xe3f7ef['_threadToController']['get'](_0x289e72)['view'],_0x4115b5=_0x5bb422['getByInnerView'](_0x415247);_0x4115b5&&_0x354dce['registerAnnotation'](_0x4115b5);},{'priority':'low'})),_0x289e72;}['_handleThreadMarker'](_0x10c127,_0x3b5577){const _0x446a2b=this['_attachMarkerToThread'](_0x10c127,_0x3b5577);_0x446a2b&&!_0x446a2b['context']&&_0x446a2b['setContext']({'type':'text','value':this['_getTextContext'](_0x3b5577)});}_initAriaMarkerChangeAnnouncements(){const _0x9a67f8=this['editor'];_0x11c77c(_0x9a67f8['model'],({left:_0x55e256,entered:_0x23f3c1})=>{for(const _0x128e34 of _0x55e256)if(Ai(_0x128e34)){_0x9a67f8['ui']['ariaLiveAnnouncer']['announce'](Et(_0x9a67f8['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xfc2cd8 of _0x23f3c1)if(Ai(_0xfc2cd8)){_0x9a67f8['ui']['ariaLiveAnnouncer']['announce'](Et(_0x9a67f8['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x43c020(_0x4d0567)));break;}});}};function gi(_0x1dab5e,_0x1c28fd){return _0x1c28fd?_0x1dab5e+':'+_0x1c28fd:_0x1dab5e;}function _i(_0x14eb7c,_0x5e6a37){const _0x640d20=_0x5e6a37['schema'],_0x1754df=_0x5e6a37['createRange'](_0x14eb7c['start']);for(const _0x5e2b0a of _0x14eb7c['getWalker']()){const {type:_0x136b78,item:_0x999cee,nextPosition:_0x4326c5}=_0x5e2b0a;if('text'===_0x136b78||_0x640d20['isObject'](_0x999cee)){const _0x51cd4c=_0x5e6a37['createPositionBefore'](_0x999cee);_0x1754df['isCollapsed']&&(_0x1754df['start']=_0x51cd4c),_0x1754df['end']=_0x4326c5;}}return _0x1754df;}function Ai(_0x401f03){return'comment'===fi(_0x401f03['name'])['group'];}var vi=class extends _0x58cf6e{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x572429=this['editor'],_0x2cca29=_0x572429['plugins']['get'](oi),_0x540fd4=_0x572429['plugins']['get'](wi),_0x155bad=_0x572429['plugins']['get'](ti),_0x33ddf8=_0x572429['plugins']['get'](di);_0x572429['ui']['componentFactory']['add']('comment',()=>{const _0x488277=this['_createUIButton'](_0x370cb0);return _0x488277['tooltip']=!0x0,_0x488277;}),_0x572429['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x33ddf8['addSourceCollector'](()=>{const _0x3d2a5c=[];for(const [_0x557718,_0x2bad7f]of _0x2cca29['_threadToController']){const _0x20a991=_0x540fd4['getAllMarkersForId'](_0x557718['id']),_0x32dbea=_0x20a991['map'](_0x4db7da=>_0x4db7da['getRange']());_0x20a991['length']>0x0&&_0x3d2a5c['push']([_0x2bad7f['view'],_0x32dbea]);}return _0x3d2a5c;}),this['listenTo'](_0x155bad,'change:activeAnnotations',(_0x2376cd,_0x5ed52d,_0x50e2d9)=>{const _0x1341c3=Array['from'](_0x50e2d9)['map'](_0x5bc064=>_0x5bc064['innerView'])['find'](_0x4271cb=>_0x2cca29['_viewToController']['has'](_0x4271cb));if(!_0x1341c3)return void(_0x540fd4['activeMarker']=null);const _0x1b308e=_0x2cca29['_viewToController']['get'](_0x1341c3)['model']['id'],_0x3999f7='comment:'+_0x1b308e;_0x1b308e&&_0x540fd4['hasMarkerForId'](_0x1b308e)?_0x540fd4['activeMarker']=_0x3999f7:_0x540fd4['activeMarker']&&(_0x540fd4['activeMarker']=null);}),this['listenTo'](_0x2cca29,'removeCommentThread',(_0x393118,{threadId:_0x4635f8,isFromAdapter:_0x1c6c70})=>{!_0x1c6c70&&_0x572429['ui']['focusTracker']['isFocused']&&_0x540fd4['hasMarkerForId'](_0x4635f8)&&_0x572429['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2cca29,'addComment',(_0x100d23,{threadId:_0x396730,isFromAdapter:_0x5c41a3})=>{!_0x5c41a3&&_0x540fd4['hasMarkerForId'](_0x396730)&&_0x2cca29['hasCommentThread'](_0x396730)&&0x1===_0x2cca29['getCommentThread'](_0x396730)['length']&&(_0x572429['editing']['view']['focus'](),_0x100d23['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4614d4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x45b4a1;for(const _0x311e2b in _0x4614d4){const _0x508624=_0x311e2b,_0x77df12=_0x4614d4[_0x508624];if('commentsLicenseKeyValid'==_0x77df12||'commentsLicenseKeyInvalid'==_0x77df12||'commentsLicenseKeyExpired'==_0x77df12||'commentsLicenseKeyDomainLimit'==_0x77df12||'commentsLicenseKeyNotAllowed'==_0x77df12||'commentsLicenseKeyEvaluationLimit'==_0x77df12||'commentsLicenseKeyUsageLimit'==_0x77df12){delete _0x4614d4[_0x508624],_0x45b4a1=_0x77df12,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x45b4a1&&_0x4614d4['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x45b4a1&&_0x4614d4['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x45b4a1&&_0x4614d4['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x45b4a1&&_0x4614d4['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x45b4a1&&_0x4614d4['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x45b4a1&&_0x4614d4['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x291b7c){const _0x403374=this['editor'],_0x3ed7ec=new _0x291b7c(_0x403374['locale']),_0xd2f327=_0x403374['commands']['get']('addCommentThread');return _0x3ed7ec['set']({'label':Et(_0x403374['locale'],'Comment'),'icon':_0xf7c9fb}),_0x3ed7ec['bind']('isEnabled')['to'](_0xd2f327,'isEnabled',_0xd2f327,'hasContent',(_0x95d571,_0x1ebcfd)=>_0x95d571&&_0x1ebcfd),this['listenTo'](_0x3ed7ec,'execute',()=>{_0xd2f327['execute']();}),_0x3ed7ec;}},yi=class extends _0x58cf6e{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x400bc8){super(_0x400bc8),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1761a5,_0x43f0cd,_0x2a337e)=>{_0x2a337e?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x2bd62b,_0xef223e]of this['editor']['commands'])_0xef223e['affectsData']&&'addCommentThread'!==_0x2bd62b&&_0xef223e['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 _0x117e10=this['editor']['editing']['view']['document'];this['listenTo'](_0x117e10,'cut',_0x29e250=>_0x29e250['stop'](),{'priority':'highest'}),this['listenTo'](_0x117e10,'clipboardInput',_0x231f8f=>_0x231f8f['stop'](),{'priority':'highest'}),this['listenTo'](_0x117e10,'delete',_0x346132=>_0x346132['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x5c1322,_0x28f479]of this['editor']['commands'])_0x28f479['affectsData']&&'addCommentThread'!==_0x5c1322&&_0x28f479['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']);}},Ti=class extends _0x2c4b59{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29a0a5){super(_0x29a0a5),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x53e800=this['context']['plugins']['get'](ti);this['listenTo'](_0x53e800,'_activateAnnotation',(_0x4f4043,_0x150f94)=>{for(const _0x572600 of this['activeUIs']){const _0x202491=this['_uis']['get'](_0x572600);(0x0,this['uisData']['get'](_0x572600)['filter'])(_0x150f94)&&_0x202491['setActiveAnnotation'](_0x150f94);}}),this['listenTo'](_0x53e800,'_deactivateAllAnnotations',()=>{for(const _0x4b938c of this['activeUIs'])this['_uis']['get'](_0x4b938c)['setActiveAnnotation'](null);}),this['listenTo'](_0x53e800['_visibleAnnotations'],'add',(_0x5240d7,_0x8c4f9c)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x8c4f9c);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x47d319){return this['activeUIs']['has'](_0x47d319);}activate(_0x4cae8e,_0x808ea5=this['defaultFilter']){const _0x1c9c52=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x4cae8e))throw new _0x5747ed('annotationsuis-missing-ui',this,{'uiName':_0x4cae8e});this['isActive'](_0x4cae8e)&&this['deactivate'](_0x4cae8e),this['activeUIs']['add'](_0x4cae8e);const _0x39a648=new Jt();Qt({'source':_0x1c9c52['_visibleAnnotations'],'target':_0x39a648,'filter':_0x808ea5}),this['uisData']['set'](_0x4cae8e,{'collection':_0x39a648,'filter':_0x808ea5});const _0x48f008=this['_uis']['get'](_0x4cae8e);_0x48f008['attach'](_0x39a648),this['listenTo'](_0x48f008,'change:activeAnnotation',(_0x4691c5,_0x4b8315,_0x28a47b,_0x4237c3)=>{_0x4237c3&&_0x1c9c52['_removeActiveAnnotation'](_0x4237c3),_0x28a47b&&_0x1c9c52['_addActiveAnnotation'](_0x28a47b);});}deactivate(_0x5766d0){if(this['activeUIs']['delete'](_0x5766d0),!this['_uis']['has'](_0x5766d0))throw new _0x5747ed('annotationsuis-missing-ui',this,{'uiName':_0x5766d0});const _0x24f4e1=this['_uis']['get'](_0x5766d0);_0x24f4e1['detach'](),this['stopListening'](_0x24f4e1),this['uisData']['get'](_0x5766d0)['collection']['destroy'](),this['uisData']['delete'](_0x5766d0);}switchTo(_0x25ab70){if(!this['_uis']['has'](_0x25ab70))throw new _0x5747ed('annotationsuis-missing-ui',this,{'uiName':_0x25ab70});const _0x179c5f=this['context']['plugins']['get'](ti),_0x4d8bec=Array['from'](_0x179c5f['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x25ab70);const _0x1eaba3=this['_uis']['get'](_0x25ab70);_0x1eaba3['setActiveAnnotation'](_0x4d8bec),_0x1eaba3['_setSelectedAnnotations']&&_0x4d8bec&&_0x1eaba3['_setSelectedAnnotations']([_0x4d8bec]);}deactivateAll(){for(const _0xda818d of this['activeUIs'])this['deactivate'](_0xda818d);}register(_0x1db6c3,_0x5e2092){if(this['_uis']['has'](_0x1db6c3))throw new _0x5747ed('annotationsuis-register-already-registered');if('function'!=typeof _0x5e2092['attach']||'function'!=typeof _0x5e2092['detach']||'function'!=typeof _0x5e2092['setActiveAnnotation'])throw new _0x5747ed('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1db6c3,_0x5e2092);}refilterAnnotations(){const _0x34eb69=this['context']['plugins']['get'](ti)['collection'],_0x32af09=new Map(),_0x1e36f1=Array['from'](this['activeUIs']);for(const _0x4a3171 of this['activeUIs']){const _0x5aa433=this['uisData']['get'](_0x4a3171)['collection'];for(const _0x4c0223 of _0x5aa433)_0x32af09['set'](_0x4c0223,_0x4a3171);}for(const _0x584e77 of _0x34eb69){const _0x32a73a=_0x32af09['get'](_0x584e77);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x584e77);const _0x376885=_0x1e36f1['find'](_0x1e20c0=>this['uisData']['get'](_0x1e20c0)['filter'](_0x584e77));_0x32a73a!==_0x376885&&(_0x32a73a&&this['uisData']['get'](_0x32a73a)['collection']['remove'](_0x584e77),_0x376885&&this['uisData']['get'](_0x376885)['collection']['add'](_0x584e77));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x50028d){const _0xb978fc=[];for(const _0x221451 of this['activeUIs']){(0x0,this['uisData']['get'](_0x221451)['filter'])(_0x50028d)&&_0xb978fc['push'](_0x221451);}if(_0xb978fc['length']>0x1)throw new _0x5747ed('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xb978fc,'annotationType':_0x50028d['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x49a828('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x81fa5b){super(_0x81fa5b);const _0x4517ee=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 _0x2ee4f8(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4517ee['to']('class')],'style':{'minHeight':_0x4517ee['to']('minHeight',_0x2067ec=>'number'==typeof _0x2067ec?Ci(_0x2067ec+0xa):null)},'dir':_0x81fa5b['uiLanguageDirection'],'role':'application','aria-label':Et(_0x81fa5b,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x81fa5b,'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',_0x1c432b=>{this['_updateItemPositionInFocusables'](_0x1c432b['source']);}),this['list']['forEach'](_0x209146=>{this['focusTracker']['add'](_0x209146['element']),this['_updateItemPositionInFocusables'](_0x209146);}),this['list']['on']('change',(_0x35fe24,_0x70e27d)=>{for(const _0x19aa20 of _0x70e27d['removed'])this['focusTracker']['remove'](_0x19aa20['element']),this['focusables']['remove'](_0x19aa20);for(const _0x2c1cc0 of _0x70e27d['added'])this['focusTracker']['add'](_0x2c1cc0['element']),this['_updateItemPositionInFocusables'](_0x2c1cc0);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x4e440a){const _0x3b7b97=this['focusables']['getIndex'](_0x4e440a);let _0x1dc5f7,_0x6b4ec;for(const _0x9773cb of this['focusables'])if(_0x4e440a['top']<_0x9773cb['top']){_0x1dc5f7=_0x9773cb;break;}if(_0x6b4ec=_0x1dc5f7?this['focusables']['getIndex'](_0x1dc5f7):this['focusables']['length'],-0x1!==_0x3b7b97){if(_0x3b7b97===_0x6b4ec-0x1)return;this['focusables']['remove'](_0x4e440a),_0x6b4ec=_0x1dc5f7?this['focusables']['getIndex'](_0x1dc5f7):this['focusables']['length'];}this['focusables']['add'](_0x4e440a,_0x6b4ec);}};const bi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x49a828('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x595a2d){super(_0x595a2d),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2cb7a6,_0x18f5e1)=>_0x2cb7a6+_0x18f5e1),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5d45b9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5d45b9['to']('isAnimationDisabled',_0x5292c1=>_0x5292c1?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5d45b9['to']('top',_0x1780fe=>bi(_0x1780fe))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x43bb6e=this['element']['clientHeight'];_0x43bb6e&&(this['height']=_0x43bb6e);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x2c4b59{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x229759){super(_0x229759),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 _0x383956=this['context']['config']['get']('sidebar.container');_0x383956&&this['setContainer'](_0x383956);}setContainer(_0x261a84){if(!Oi(_0x261a84))throw new _0x5747ed('sidebar-setcontainer-invalid-element');this['container']=_0x261a84;}_attachToContainer({viewClass:_0x41fff5='',spaceBetweenItems:_0x1d09c6=0x19}={}){if(!Oi(this['container']))throw new _0x5747ed('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x41fff5,this['_spaceBetweenItems']=_0x1d09c6;}['rearrange']({removedAnnotation:_0x2dfa13,previousAnnotation:_0x103ee7,nextAnnotation:_0xf9b970}){const _0x54c9b3=this['getSidebarItemView'](_0x2dfa13);this['view']['list']['remove'](_0x54c9b3),this['_destroySidebarItemView'](_0x2dfa13),_0x103ee7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x103ee7)),_0xf9b970&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xf9b970)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5c17eb,activatedAnnotation:_0x42bc30,disableAnimationOnActivatedAnnotation:_0xf91f8f}){if(this['_activeAnnotation']=_0x42bc30,_0x5c17eb){_0x5c17eb['isActive']=!0x1;const _0xdcd6f0=this['getSidebarItemView'](_0x5c17eb);_0xdcd6f0&&_0xf91f8f&&(_0xdcd6f0['isAnimationDisabled']=!0x1);}if(_0x42bc30){const _0x9fc799=this['getSidebarItemView'](_0x42bc30);_0x9fc799&&(_0x42bc30['isActive']=!0x0,_0xf91f8f&&(_0x9fc799['isAnimationDisabled']=!0x0,_0x9fc799['top']+=0x1),this['_alignToTargetRect'](_0x9fc799));}}_detachFromContainer(_0x2df14b){if(this['view']['element']['remove'](),_0x2df14b){for(const _0x298614 of _0x2df14b)this['_destroySidebarItemView'](_0x298614);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x116b96,_0x2660fd){_0x2660fd||(_0x2660fd=_0x116b96['view']);const _0xdc477f=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xdc477f,_0x116b96),this['_annotationToSidebarItemView']['set'](_0x116b96,_0xdc477f),_0xdc477f['content']['add'](_0x2660fd),this['listenTo'](_0x116b96['view'],'change:targetRect',(_0x536746,_0x19aa2f,_0x4f1636)=>{const _0x1d631e=this['_getTargetTop'](_0x116b96,_0x4f1636);_0xdc477f['_targetTop']!=_0x1d631e&&(_0xdc477f['_targetTop']=_0x1d631e,this['_setItemTop'](_0xdc477f,_0x1d631e));}),this['listenTo'](_0xdc477f,'change:top',()=>{this['_recalculate'](_0xdc477f,'top');}),this['listenTo'](_0xdc477f,'change:bottom',()=>{this['_recalculate'](_0xdc477f,'bottom');}),this['_alignToTargetRect'](_0xdc477f);const _0x158fe5=this['_getItemBefore'](_0xdc477f);return _0x158fe5&&this['_alignAfterItem'](_0x158fe5,_0xdc477f)||this['_alignToTargetRect'](_0xdc477f),this['_updateLastItem'](),this['view']['list']['add'](_0xdc477f),_0xdc477f;}['_alignForTopChange'](_0x11c251){if(!_0x11c251['content']['length'])return;const _0x440f1b=this['_getItemBefore'](_0x11c251);if(!_0x440f1b)return;const _0x257622=this['_sidebarItemViewToAnnotation']['get'](_0x440f1b),_0x4cc057=this['_activeAnnotation'];_0x4cc057&&_0x4cc057===_0x257622?this['_alignAfterItem'](_0x440f1b,_0x11c251):this['_alignBeforeItem'](_0x11c251,_0x440f1b);}_alignForBottomChange(_0x57d980){if(!_0x57d980['content']['length'])return;const _0x28cca2=this['_getItemAfter'](_0x57d980);if(!_0x28cca2)return;const _0x5daf12=this['_sidebarItemViewToAnnotation']['get'](_0x28cca2),_0x1d3766=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x468930=this['_activeAnnotation'];_0x468930&&_0x468930===_0x5daf12&&_0x1d3766?(this['_alignBeforeItem'](_0x28cca2,_0x57d980),this['_alignAfterItem'](_0x57d980,_0x28cca2)):_0x468930&&_0x468930===_0x5daf12?this['_alignBeforeItem'](_0x28cca2,_0x57d980):this['_alignAfterItem'](_0x57d980,_0x28cca2);}_recalculate(_0x5e1e31,_0x14f2b9){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1a11d6,changedProp:_0x572351}of this['_recalculateBuffer'])'top'===_0x572351?this['_alignForTopChange'](_0x1a11d6):this['_alignForBottomChange'](_0x1a11d6);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5e1e31,'changedProp':_0x14f2b9});}getSidebarItemView(_0x44cf22){return this['_annotationToSidebarItemView']['get'](_0x44cf22);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x13e344){const _0x37d531=this['getSidebarItemView'](_0x13e344);this['stopListening'](_0x37d531),this['stopListening'](_0x13e344['view']),_0x37d531['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x13e344),this['_sidebarItemViewToAnnotation']['delete'](_0x37d531);}_createSidebarView(){const _0x519232=new Ii(this['context']['locale']);return _0x519232['render'](),this['on']('change:_lastItem',(_0x4cfd22,_0x4f7b2b,_0x1eba6e,_0x172656)=>{_0x172656&&_0x519232['unbind']('minHeight'),_0x1eba6e?_0x519232['bind']('minHeight')['to'](_0x1eba6e,'bottom'):_0x519232['minHeight']=null;}),_0x519232;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x5f0f0b){const _0x58dce6=this['_sidebarItemViewToAnnotation']['get'](_0x5f0f0b),_0x3dce9e=_0x58dce6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x58dce6)-0x1);return _0x3dce9e&&this['getSidebarItemView'](_0x3dce9e)||null;}_getItemAfter(_0x27b460){const _0x350a86=this['_sidebarItemViewToAnnotation']['get'](_0x27b460),_0x46ae4a=_0x350a86&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x350a86)+0x1);return _0x46ae4a&&this['getSidebarItemView'](_0x46ae4a)||null;}_alignBeforeItem(_0x4f5b66,_0x5e91d0){_0x4f5b66['updateHeight']();const _0x58c1b1=Ni(_0x5e91d0['bottom']+this['_spaceBetweenItems'],_0x4f5b66['top']);return!!_0x58c1b1&&(this['_setItemTop'](_0x5e91d0,_0x5e91d0['top']-_0x58c1b1),!0x0);}_alignAfterItem(_0xeee683,_0x50776a){_0xeee683['updateHeight']();const _0x5c16cf=Ni(_0xeee683['bottom']+this['_spaceBetweenItems'],_0x50776a['top']);return!!_0x5c16cf&&(this['_setItemTop'](_0x50776a,_0x50776a['top']+_0x5c16cf,!0x1),!0x0);}_alignToTargetRect(_0xac8207){const _0x5977a0=this['_sidebarItemViewToAnnotation']['get'](_0xac8207);if(!_0x5977a0||!_0x5977a0['target']||!_0x5977a0['targetRect'])return;const _0x3f75fa=this['_getTargetTop'](_0x5977a0,_0x5977a0['targetRect']);this['_setItemTop'](_0xac8207,_0x3f75fa);}_getTargetTop(_0x2845ab,_0x31dca8){if(null===_0x31dca8)return 0x0;if(_0x2845ab['target']instanceof _0x8c7c9a)return _0x31dca8['top'];{const _0x452ed7=new _0x8c7c9a(this['view']['element'])['top'];return _0x31dca8['top']-_0x452ed7;}}_setItemTop(_0x11ccf9,_0x1e8183,_0x2d8d0d=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2d8d0d&&(_0x1e8183=Math['max'](_0x1e8183,this['_getMaxAvailableTop'](_0x11ccf9))),_0x11ccf9['top']=_0x1e8183;}_getMaxAvailableTop(_0x4be2c0){let _0x58fc33=this['_getItemBefore'](_0x4be2c0),_0x26d058=0x0;for(;_0x58fc33;)_0x58fc33['updateHeight'](),_0x26d058+=this['_spaceBetweenItems']+_0x58fc33['height'],_0x58fc33=this['_getItemBefore'](_0x58fc33);return _0x26d058;}};function Ni(_0x562e0c,_0x4253f8){return Math['max'](_0x562e0c-_0x4253f8,0x0);}function Oi(_0x493bb8){return null!==_0x493bb8&&'object'==typeof _0x493bb8&&0x1===_0x493bb8['nodeType'];}var Mi=class extends _0x2c4b59{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x117b4e){super(_0x117b4e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x38ae04(),this['_refreshPositioningDebounced']=_0x5cfde8(()=>{_0x117b4e['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x1e1cc1=this['context']['plugins']['get'](Ti),_0x241634=this['context']['plugins']['get'](ki);_0x1e1cc1['register']('wideSidebar',this),_0x241634['container']&&_0x1e1cc1['switchTo']('wideSidebar');}setActiveAnnotation(_0x1dacb3){if(_0x1dacb3===this['activeAnnotation'])return;const _0x3746dc=this['context']['plugins']['get'](ki);_0x3746dc['_activeAnnotation']=_0x1dacb3;const _0x42c61e=this['activeAnnotation'];_0x3746dc['refresh']({'blurredAnnotation':_0x42c61e,'activatedAnnotation':_0x1dacb3}),this['activeAnnotation']=_0x1dacb3;}attach(_0xf6fc2b){this['annotations']=_0xf6fc2b;const _0xf6616d=this['context']['plugins']['get'](ki);if(_0xf6616d['_annotations']=_0xf6fc2b,this['isAttached'])throw new _0x5747ed('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xf6616d,'set:container',()=>{this['detach'](),this['listenTo'](_0xf6616d,'change:container',_0x45489d=>{_0x45489d['off'](),this['attach'](_0xf6fc2b);});}),_0xf6616d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x410c3c=_0x2c5911=>{_0x2c5911['updateTargetRect'](),_0xf6616d['addAnnotation'](_0x2c5911);};for(const _0x139c0b of _0xf6fc2b)_0x410c3c(_0x139c0b);this['listenTo'](_0xf6fc2b,'add',(_0x5692c8,_0x14ffd6)=>{_0x410c3c(_0x14ffd6);}),this['listenTo'](_0xf6fc2b,'remove',(_0x360e1d,_0x33f856,_0x15cad2)=>{_0xf6616d['rearrange']({'removedAnnotation':_0x33f856,'previousAnnotation':_0xf6fc2b['get'](_0x15cad2-0x1),'nextAnnotation':_0xf6fc2b['get'](_0x15cad2+0x1)}),_0x33f856===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xf6fc2b,'focus',(_0x4fa723,_0x18c7db)=>{this['setActiveAnnotation'](_0x18c7db);}),this['listenTo'](_0xf6fc2b,'blur',()=>{this['setActiveAnnotation'](null);});const _0x27d86d=this['context']instanceof _0x183b13?this['context']['editors']:new _0x38ae04([this['context']]);for(const _0x10f153 of _0x27d86d)this['_integrateWithEditorAnnotations'](_0x10f153);this['listenTo'](_0x27d86d,'add',(_0x1df654,_0x24d7a0)=>{this['listenTo'](_0x24d7a0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x24d7a0);});}),this['listenTo'](_0x27d86d,'remove',(_0x2cfba6,_0x3d4aeb)=>{_0x3d4aeb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3d4aeb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x5747ed('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x57cac1=this['context']['plugins']['get'](ki);_0x57cac1['_detachFromContainer'](this['annotations']),this['stopListening'](_0x57cac1),this['stopListening'](this['annotations']),this['context']instanceof _0x183b13&&this['stopListening'](this['context']['editors']);for(const _0x433a05 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x433a05);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x97ce21){if(!_0x97ce21['plugins']['has']('EditorAnnotations'))return;const _0x1f54c5=_0x97ce21['plugins']['get']('EditorAnnotations'),_0x4368f0=()=>{const _0x1f6489=_0x1f54c5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1f6489[0x0]||null);};this['listenTo'](_0x1f54c5,'refresh',_0x4368f0),this['listenTo'](_0x1f54c5,'blur',(_0xcc355d,{isAnnotationTracked:_0x46a43d})=>{this['activeAnnotation']&&_0x46a43d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1f54c5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x276bd7=>{_0x1f54c5['hasDomSelection']()&&(_0x4368f0(),_0x276bd7['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1f54c5);}_destroyEditorAnnotationsIntegration(_0xc9a511){this['stopListening'](_0xc9a511),this['_editorAnnotations']['remove'](_0xc9a511);}},Ri=class extends _0x370cb0{counterView;constructor(_0x2438ec){super(_0x2438ec);const _0x9a9cbe=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3f33b7,_0x2faf2e)=>_0x3f33b7?'...':_0x2faf2e['toString']()),this['set']('annotationType',''),this['icon']=_0xf7c9fb,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x9a9cbe['to']('annotationType',_0x13978d=>'ck-annotation-counter__badge--'+_0x13978d),_0x9a9cbe['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x9a9cbe['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x2c4b59{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e42cb){super(_0x3e42cb),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x154718())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x38ae04(),this['_refreshPositioningDebounced']=_0x5cfde8(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3fd2af(this['context']['locale']),this['balloonPanelView']=new _0x4c312f(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x160bfc){this['annotations']=_0x160bfc;const _0x2d009d=this['context']['plugins']['get'](ki),_0x17553e=this['balloonPanelView'];if(_0x2d009d['_annotations']=_0x160bfc,this['isAttached'])throw new _0x5747ed('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2d009d,'set:container',()=>{this['detach'](),this['listenTo'](_0x2d009d,'change:container',_0x2e754c=>{_0x2e754c['off'](),this['attach'](_0x160bfc);});}),_0x2d009d['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5d32ac=_0x152523=>{const _0x4e8948=new Ri(this['context']['locale']);_0x2d009d['addAnnotation'](_0x152523,_0x4e8948),this['_annotationToNarrowView']['set'](_0x152523,_0x4e8948),_0x4e8948['bind']('isDirty','annotationType','number')['to'](_0x152523['view'],'isDirty','type','length'),_0x4e8948['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x17553e['content']['first']!==_0x152523['view']?(this['_showBalloon'](_0x152523),_0x152523['view']['element']['focus'](),this['setActiveAnnotation'](_0x152523)):this['setActiveAnnotation'](null);});};for(const _0x44c54e of _0x160bfc)_0x5d32ac(_0x44c54e);this['listenTo'](_0x160bfc,'add',(_0x2eb6dd,_0x1c0b28)=>{_0x5d32ac(_0x1c0b28);}),this['listenTo'](_0x160bfc,'remove',(_0x40d2a0,_0x266045,_0x20de2d)=>{this['_annotationToNarrowView']['get'](_0x266045)['destroy'](),this['_annotationToNarrowView']['delete'](_0x266045),_0x2d009d['rearrange']({'removedAnnotation':_0x266045,'previousAnnotation':_0x160bfc['get'](_0x20de2d-0x1),'nextAnnotation':_0x160bfc['get'](_0x20de2d+0x1)}),_0x266045===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x160bfc,'focus',(_0x5a6d94,_0x4dea62)=>{this['setActiveAnnotation'](_0x4dea62);}),this['listenTo'](_0x160bfc,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2d03,_0xd7fbd2)=>{_0xd7fbd2['keyCode']===_0x29ec50['esc']&&_0x17553e['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x17553e['content']['first']),this['_hideBalloon'](),_0xd7fbd2['stopPropagation'](),_0xd7fbd2['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5771a8,_0x1d23c1)=>{const _0x1e7f02=_0x1d23c1['target'];_0x17553e['isVisible']&&_0x17553e['element']['contains'](_0x1e7f02)||_0x2d009d['view']['element']['contains'](_0x1e7f02)||_0x5771a8['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x21c41f=>_0x21c41f['contains'](_0x1e7f02))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x557261=this['context']instanceof _0x183b13?this['context']['editors']:new _0x38ae04([this['context']]);for(const _0x265958 of _0x557261)this['_integrateWithEditorAnnotations'](_0x265958);this['listenTo'](_0x557261,'add',(_0x1ca192,_0x150bcd)=>{this['listenTo'](_0x150bcd,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x150bcd);});}),this['listenTo'](_0x557261,'remove',(_0x862d5e,_0x2ebd50)=>{_0x2ebd50['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2ebd50['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x5c1877){if(_0x5c1877===this['activeAnnotation'])return;const _0x3a55c1=this['context']['plugins']['get'](ki);_0x3a55c1['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5c1877,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5c1877&&_0x3a55c1['getSidebarItemView'](_0x5c1877)?this['_showBalloon'](_0x5c1877):this['_hideBalloon'](),this['activeAnnotation']=_0x5c1877;}detach(){if(!this['isAttached'])throw new _0x5747ed('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3e0d7e=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3819ef=>_0x3819ef['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3e0d7e['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x183b13&&this['stopListening'](this['context']['editors']);for(const _0x2676c7 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2676c7);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(_0x9a7841){if(!_0x9a7841['plugins']['has']('EditorAnnotations'))return;const _0x734457=_0x9a7841['plugins']['get']('EditorAnnotations'),_0x5090dd=this['context']['plugins']['get'](ki),_0x2e4c14=this['annotations'],_0x3017de=this['balloonPanelView'],_0xb83887=()=>{const _0xaabb05=_0x734457['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xaabb05),this['setActiveAnnotation'](_0xaabb05[0x0]||null);};this['listenTo'](_0x734457,'refresh',_0xb83887),this['listenTo'](_0x734457,'blur',(_0x23da26,{isAnnotationTracked:_0x17b968})=>{this['activeAnnotation']&&_0x17b968(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x734457,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2e4c14,'blur',_0x9de43c=>{_0x734457['hasDomSelection']()&&_0x9de43c['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x353e9e,_0x2502e9)=>{const _0xbb422e=_0x2502e9['target'];_0x3017de['isVisible']&&_0x3017de['element']['contains'](_0xbb422e)||_0x5090dd['view']['element']['contains'](_0xbb422e)||this['activeAnnotation']&&_0x734457['hasDomSelection']()&&(_0xb83887(),_0x353e9e['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x734457);}_destroyEditorAnnotationsIntegration(_0xdd02a8){_0xdd02a8&&(this['stopListening'](_0xdd02a8),this['_editorAnnotations']['remove'](_0xdd02a8));}_setSelectedAnnotations(_0x5e77fd){for(const _0x5d37ef of this['_selectedAnnotations'])_0x5e77fd['includes'](_0x5d37ef)||this['_manuallyClosedAnnotationViews']['delete'](_0x5d37ef['view']);this['_selectedAnnotations']=_0x5e77fd;}_refreshPositioning(){const _0x1aa6a3=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1aa6a3['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3e94d8){if(this['_manuallyClosedAnnotationViews']['has'](_0x3e94d8['view']))return;const _0x5e9980=this['balloonPanelView']['content']['first'];_0x5e9980!==_0x3e94d8['view']?(_0x5e9980&&this['_detachListeners'](_0x5e9980),this['_attachListeners'](_0x3e94d8['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3e94d8['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x47ca07=this['balloonPanelView']['content']['first'],_0x1b55a5=_0x47ca07&&this['annotations']['getByView'](_0x47ca07);if(!_0x1b55a5||!this['_annotationToNarrowView']['has'](_0x1b55a5))return;const _0x2b4849=this['_annotationToNarrowView']['get'](_0x1b55a5)['element'],_0x330129=(function(){const _0x2da2b8=_0x4c312f['defaultPositions'];return[_0x2da2b8['southArrowNorthEast'],_0x2da2b8['northArrowSouthEast'],_0x2da2b8['southArrowNorth'],_0x2da2b8['northArrowSouth'],_0x2da2b8['southArrowNorthWest'],_0x2da2b8['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2b4849,'positions':_0x330129});}['_hideBalloon'](){const _0x22f8de=this['balloonPanelView'],_0x2e0859=_0x22f8de['content']['first'];_0x2e0859&&(this['_detachListeners'](_0x2e0859),_0x22f8de['unpin'](),_0x22f8de['content']['clear']());}_attachListeners(_0x44842d){this['listenTo'](_0x44842d,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x44842d,'Esc',(_0x589404,_0x262379)=>{this['_manuallyClosedAnnotationViews']['add'](_0x44842d),this['_hideBalloon'](),_0x262379();});}_detachListeners(_0x44d88a){this['stopListening'](_0x44d88a);}},xi=class extends _0x58cf6e{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0xcec574,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f4c58){super(_0x1f4c58),_0x1f4c58['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1f4c58['plugins']['get'](_0xcec574),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5cfde8(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x250d8a=this['editor']['plugins']['get'](Ti);_0x250d8a['context']===this['editor']&&(_0x250d8a['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3c123f,_0x2cb50c)=>{const _0x1b8944=this['_balloon'];if(this['isAttached']&&_0x1b8944['visibleView']){const _0x246068=this['annotations']['getByView'](_0x1b8944['visibleView']);_0x246068&&this['_closeAnnotation'](_0x246068),_0x2cb50c();}}));}afterInit(){const _0x405bb6=this['editor']['plugins']['get'](Ti);_0x405bb6['context']===this['editor']&&(_0x405bb6['hasActive']()||_0x405bb6['switchTo']('inline'));}setActiveAnnotation(_0x507b97){_0x507b97!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x507b97&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x507b97)&&this['_addAnnotationToBalloon'](_0x507b97,!0x0),_0x507b97['isActive']=!0x0),_0x507b97||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x507b97);}attach(_0x277811){this['annotations']=_0x277811;const _0x432564=this['editor']['plugins']['get'](Ti),_0x30690f=this['_balloon'];if(this['isAttached'])throw new _0x5747ed('inlineannotations-attach-already-attached',this);if(_0x432564['context']!==this['editor'])throw new _0x5747ed('inlineannotations-not-allowed-with-context',this);const _0x4db7cb=this['editor']['plugins']['get'](di);this['listenTo'](_0x4db7cb,'refresh',()=>{const _0x48cd21=_0x4db7cb['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x165f35,_0x4c5ba5;!this['_forceRefresh']&&(_0x165f35=_0x48cd21,_0x4c5ba5=this['_selectedAnnotations'],_0x165f35['length']===_0x4c5ba5['length']&&_0x165f35['every'](_0x29f350=>_0x4c5ba5['includes'](_0x29f350)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x48cd21),this['setActiveAnnotation'](_0x48cd21[0x0]||null));}),this['listenTo'](_0x4db7cb,'blur',(_0x3d07ab,{isAnnotationTracked:_0x2b6a9f})=>{this['activeAnnotation']&&_0x2b6a9f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4db7cb,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x52f2e9,_0x36c21f,_0x403803)=>{_0x403803||this['setActiveAnnotation'](null);}),this['listenTo'](_0x277811,'remove',(_0x4043e6,_0x2d90e4)=>{this['_removeAnnotationFromBalloon'](_0x2d90e4),_0x2d90e4===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x30690f,'change:visibleView',(_0x39b849,_0x4a4a89,_0x3c5208,_0x586e60)=>{_0x586e60&&this['stopListening'](_0x586e60);const _0x419d8f=_0x277811['getByView'](_0x3c5208);_0x3c5208&&_0x419d8f&&(this['listenTo'](_0x3c5208,'change:height',()=>{_0x30690f['updatePosition']();}),this['listenTo'](_0x3c5208,'Esc',()=>{this['_closeAnnotation'](_0x419d8f),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x419d8f&&this['setActiveAnnotation'](_0x419d8f));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x30690f['visibleView']&&_0x277811['getByView'](_0x30690f['visibleView'])&&_0x30690f['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 _0x5747ed('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x26ee50 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x26ee50);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0xf60cec){for(const _0x5bbf38 of this['_selectedAnnotations'])_0xf60cec['includes'](_0x5bbf38)||this['_manuallyClosed']['delete'](_0x5bbf38);for(const _0x4743cc of this['annotations'])_0xf60cec['includes'](_0x4743cc)||this['_removeAnnotationFromBalloon'](_0x4743cc);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x50cbb0 of _0xf60cec)this['_addAnnotationToBalloon'](_0x50cbb0);}this['_selectedAnnotations']=_0xf60cec;}_addAnnotationToBalloon(_0x2eefd9,_0x640bfb=!0x1){this['_manuallyClosed']['has'](_0x2eefd9)||(this['_addedAnnotations']['has'](_0x2eefd9)||this['_balloon']['hasView'](_0x2eefd9['view'])||(this['_addedAnnotations']['add'](_0x2eefd9),this['_balloon']['add']({'stackId':_0x2eefd9['view']['id'],'view':_0x2eefd9['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2eefd9)}})),_0x640bfb&&this['_balloon']['showStack'](_0x2eefd9['view']['id']));}_getBalloonTargetForAnnotation(_0x34ed11){const _0x30ce31=_0x34ed11['target'],_0x173d7c=this['editor']['editing']['view'],_0x36a118=_0x173d7c['document']['selection']['getFirstRange'](),_0x102d32=_0x173d7c['domConverter']['viewRangeToDom'](_0x36a118);if(_0x102d32['collapse'](!0x0),_0x30ce31){if(_0x30ce31 instanceof _0x8c7c9a)return _0x30ce31;let _0x515481=[];for(const _0x3729e8 of _0x30ce31)_0x515481['push'](..._0x8c7c9a['getDomElementRects'](_0x3729e8));_0x515481=function(_0xb8dd20){const _0x10c656=[];let _0x16411e=_0xb8dd20[0x0];for(let _0x563af8=0x1;_0x563af8<_0xb8dd20['length'];_0x563af8++)if(Pi(_0x16411e,_0xb8dd20[_0x563af8])){const _0x230380=_0xb8dd20[_0x563af8]['width'];_0x16411e['width']+=_0x230380,_0x16411e['right']+=_0x230380;}else _0x10c656['push'](_0x16411e),_0x16411e=_0xb8dd20[_0x563af8];return _0x10c656['push'](_0x16411e),_0x10c656;}(_0x515481);const _0x37ca63=_0x102d32['getBoundingClientRect']();return _0x515481['find'](_0x192e7e=>_0x192e7e['top']<=_0x37ca63['top']&&_0x192e7e['bottom']>=_0x37ca63['bottom']&&_0x192e7e['left']<=_0x37ca63['left']&&_0x192e7e['right']>=_0x37ca63['right'])||_0x515481[0x0];}return _0x34ed11['targetRect']||_0x102d32;}_removeAnnotationFromBalloon(_0x225c5f){this['_addedAnnotations']['has'](_0x225c5f)&&this['_balloon']['hasView'](_0x225c5f['view'])&&(this['_addedAnnotations']['delete'](_0x225c5f),this['_balloon']['remove'](_0x225c5f['view']));}_closeAnnotation(_0x582cd8){this['_manuallyClosed']['add'](_0x582cd8),this['_removeAnnotationFromBalloon'](_0x582cd8);}};function Pi(_0x351b18,_0x5b9d0c){return _0x351b18['top']===_0x5b9d0c['top']&&_0x351b18['bottom']===_0x5b9d0c['bottom']&&_0x351b18['right']===_0x5b9d0c['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x268ddd,_0x517135){super(_0x268ddd),this['set']('isEmpty',!_0x517135['length']),this['focusTracker']=new _0x2ee4f8(),this['_annotationViews']=_0x517135,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x517135,'focusTracker':this['focusTracker']}),this['listenTo'](_0x517135,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x517135,'remove',(_0x2c3c25,_0x129e1a)=>{_0x129e1a['isActive']&&this['focus'](),_0x517135['length']||(this['isEmpty']=!0x0);});const _0x38fb80=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x268ddd,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x517135},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x38fb80['if']('isEmpty','ck-hidden',_0x375cb0=>!_0x375cb0)]},'children':[{'text':Et(_0x268ddd,'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 _0x33aa51 of this['_annotationViews'])this['focusTracker']['add'](_0x33aa51['element']);this['_annotationViews']['on']('change',(_0x45a149,{added:_0x524e77,removed:_0x1e7e09})=>{for(const _0x385b3c of _0x524e77)this['focusTracker']['add'](_0x385b3c['element']);for(const _0x5c6b31 of _0x1e7e09)this['focusTracker']['remove'](_0x5c6b31['element']);});}},Di=class extends _0x2c4b59{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x1b8921){super(_0x1b8921),this['archivedThreads']=new _0x38ae04();}init(){const _0x4cff2a=this['context'],_0x179a0c=_0x4cff2a['plugins']['get'](oi),_0x236040=_0x4cff2a['plugins']['get'](ti);this['listenTo'](_0x179a0c,'addCommentThread',(_0x44a8cd,{threadId:_0x296a07})=>{const _0x1d5601=_0x179a0c['getCommentThread'](_0x296a07);_0x1d5601['archivedAt']&&this['archivedThreads']['add'](_0x1d5601,this['_calculatePosition'](_0x1d5601['archivedAt'])),this['listenTo'](_0x1d5601,'change:archivedAt',(_0x32ca61,_0x1883cc,_0x1f3009)=>{_0x1f3009?this['archivedThreads']['has'](_0x1d5601)||this['archivedThreads']['add'](_0x1d5601,this['_calculatePosition'](_0x1d5601['archivedAt'])):this['archivedThreads']['has'](_0x1d5601)&&this['archivedThreads']['remove'](_0x1d5601);});}),this['listenTo'](_0x179a0c,'removeCommentThread',(_0x1d4837,{threadId:_0x25e63c})=>{const _0xc75a23=_0x179a0c['getCommentThread'](_0x25e63c);this['stopListening'](_0xc75a23),this['archivedThreads']['has'](_0xc75a23)&&this['archivedThreads']['remove'](_0xc75a23);},{'priority':'highest'}),this['listenTo'](_0x236040['collection'],'focus',(_0x3ef13e,_0x13d4d2)=>{_0x13d4d2['isVisible']||(_0x13d4d2['isActive']=!0x0,_0x236040['activate'](_0x13d4d2));});}_calculatePosition(_0x2381b2){const _0x66c521=[...this['archivedThreads']]['findIndex'](_0x47ce2f=>_0x47ce2f['archivedAt']<_0x2381b2);return _0x66c521>-0x1?_0x66c521:this['archivedThreads']['length'];}},Vi=class extends _0x58cf6e{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x926d32];}constructor(_0x3d72b4){super(_0x3d72b4),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0xf4eba1=this['editor'],_0x40665b=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xf4eba1['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x370cb0,!0x0)),_0xf4eba1['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1ecf19=this['_createCommentsArchiveButton'](rt);return _0x1ecf19['set']({'role':'menuitemcheckbox'}),_0x1ecf19;});const _0x210507=_0xf4eba1['plugins']['get'](Di),_0x8cdd4=_0xf4eba1['plugins']['get']('Annotations'),_0x58dd94=_0xf4eba1['plugins']['get']('CommentsRepository');_0x210507['archivedThreads']['forEach'](_0x3aa0a7=>{this['_handleNewThread'](_0x3aa0a7);}),this['listenTo'](_0x210507['archivedThreads'],'add',(_0x474771,_0x510233)=>{this['_handleNewThread'](_0x510233);}),this['listenTo'](_0x8cdd4['collection'],'add',(_0x50361f,_0x42a9dd)=>{const _0x5793a2=this['_pendingThreads']['find'](_0x5a225b=>{const _0x33f713=_0x58dd94['_threadToController']['get'](_0x5a225b);return _0x33f713&&_0x42a9dd['innerView']===_0x33f713['view'];});if(_0x5793a2){const _0x1ec3ba=this['_calculatePosition'](_0x5793a2['archivedAt']);this['_addAnnotationToArchive'](_0x42a9dd,_0x1ec3ba),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5793a2),0x1);}}),this['listenTo'](_0x210507['archivedThreads'],'remove',(_0x3f5f4c,_0x8e7727)=>{const _0x15430a=_0xf4eba1['config']['get']('collaboration.channelId');if(!_0x15430a||_0x8e7727['channelId']===_0x15430a){if(this['_pendingThreads']['includes'](_0x8e7727))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x8e7727),0x1);else{const _0x5c9d35=_0x58dd94['_threadToController']['get'](_0x8e7727),_0x162403=_0x8cdd4['getByInnerView'](_0x5c9d35['view']);this['annotationViews']['remove'](_0x162403['view']),this['stopListening'](_0x162403),this['stopListening'](_0x162403['focusableElements']);}}}),this['listenTo'](_0x8cdd4['collection'],'add',(_0x1ba938,_0x46db88)=>{this['listenTo'](_0x46db88,'escape',_0x40665b);}),this['listenTo'](_0x8cdd4['collection'],'remove',(_0xb38706,_0x47271c)=>{this['stopListening'](_0x47271c,'escape',_0x40665b);});}_addAnnotationToArchive(_0x5c261e,_0x5cdb6e){this['listenTo'](_0x5c261e,'set:isVisible',_0x327c3b=>{_0x327c3b['return']=!0x1,_0x327c3b['stop']();}),this['annotationViews']['add'](_0x5c261e['view'],_0x5cdb6e);}['_handleNewThread'](_0x1a0e37){const _0x1aa4cd=this['editor']['plugins']['get']('CommentsRepository'),_0x51b047=this['editor']['plugins']['get']('Annotations'),_0xa624e0=this['editor']['config']['get']('collaboration.channelId');if(!_0xa624e0||_0x1a0e37['channelId']===_0xa624e0){const _0x4e8631=_0x1aa4cd['_threadToController']['get'](_0x1a0e37);if(!_0x4e8631)return void this['_pendingThreads']['push'](_0x1a0e37);const _0x2d928f=this['_calculatePosition'](_0x1a0e37['archivedAt']),_0xd781fb=_0x51b047['getByInnerView'](_0x4e8631['view']);_0xd781fb['isVisible']&&_0x51b047['_visibleAnnotations']['remove'](_0xd781fb),this['_addAnnotationToArchive'](_0xd781fb,_0x2d928f);}}_calculatePosition(_0x1810f6){const _0x39df05=this['editor']['config']['get']('collaboration.channelId'),_0x3af1ee=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x16fe59=>_0x16fe59['channelId']===_0x39df05)['findIndex'](_0x4f3a2c=>_0x4f3a2c['archivedAt']<_0x1810f6);return _0x3af1ee<0x0||_0x3af1ee>this['annotationViews']['length']?this['annotationViews']['length']:_0x3af1ee-0x1;}_toggleDialog(){const _0x2da976=this['editor'],_0x4db514=_0x2da976['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x2da976['locale'],this['annotationViews'])),'commentsArchive'===_0x4db514['id']?_0x4db514['hide']():_0x4db514['show']({'id':'commentsArchive','title':Et(_0x2da976['locale'],'COMMENTS_ARCHIVE'),'icon':_0x340d1a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5d4ce6['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x197cba,_0x1e3846=!0x1){const _0x2e0c40=this['editor']['locale'],_0x5ce409=this['editor']['plugins']['get']('Dialog'),_0x5369cf=new _0x197cba(_0x2e0c40);return _0x5369cf['bind']('isEnabled')['to'](this,'isEnabled'),_0x5369cf['bind']('isOn')['to'](_0x5ce409,'id',_0xe4e197=>'commentsArchive'===_0xe4e197),_0x5369cf['set']({'label':Et(_0x2e0c40,'COMMENTS_ARCHIVE'),'icon':_0x340d1a,'isToggleable':!0x0}),_0x1e3846&&(_0x5369cf['tooltip']=!0x0),this['listenTo'](_0x5369cf,'execute',()=>this['_toggleDialog']()),_0x5369cf;}_hideDialogOnAnnotationEscape=_0x1d2934=>{const _0x5c513d=_0x1d2934['source'];if(!this['annotationViews']['has'](_0x5c513d['view']))return;const _0x3b1f3b=this['editor']['plugins']['get']('Dialog');_0x3b1f3b['isOpen']&&'commentsArchive'===_0x3b1f3b['id']&&(_0x3b1f3b['hide'](),_0x1d2934['stop']());};},Bi=class extends _0x58cf6e{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
|