@ckeditor/ckeditor5-comments 48.4.0-alpha.5 → 48.4.0-alpha.6
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 _0x9a91,Context as _0xe59758,ContextPlugin as _0x2edf68,Editor as _0x1ee667,PendingActions as _0x2c6b3e,Plugin as _0x4e5c7f}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x3a2103,Collection as _0x5391c7,DomEmitterMixin as _0x2a3945,FocusTracker as _0x45d472,KeystrokeHandler as _0x2a7095,ObservableMixin as _0x4b8baa,Rect as _0x465231,diff as _0x16770d,first as _0x24068,getEnvKeystrokeText as _0x383d3a,keyCodes as _0x4abf55,priorities as _0x20645b,scrollViewportToShowTarget as _0xa4b2b7,toUnit as _0x5978f6,uid as _0x2a19ec}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x493c41,ConfirmMixin as _0x39943b,FOCUS_ANNOTATION_KEYSTROKE as _0x2e34f3,LateFocusButtonView as _0xe5b6cb,LateFocusDropdownButtonView as _0xe60e7b,UserView as _0x272316,Users as _0xd67d2e,getAllMarkersDomElementsSorted as _0x219df1,getDateTimeFormatter as _0x27b0bf,hashObject as _0x5afde6,setupThreadKeyboardNavigation as _0x17bbb7,surroundingMarkersDetector as _0x5da32e,trimHtml as _0x1699cd}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x252241,debounce as _0xbb2184,isEqual as _0x4d1d34,set as _0x53c6f0,throttle as _0x4f9922,unset as _0x481a8f}from'es-toolkit/compat';import{IconAddComment as _0x431467,IconCheck as _0x4cc79c,IconCommentsArchive as _0x26eb26,IconPencil as _0x68065d,IconRemoveComment as _0x37851b,IconThreeVerticalDots as _0x6f113b,IconUndo as _0x1e71fe}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x4da12d,BodyCollection as _0x5e1938,ButtonView as _0x98026e,ContextualBalloon as _0x564301,Dialog as _0x1f6fd3,DialogViewPosition as _0x2bdb8f,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
|
+
_0x4b8baa();var bt=class extends It{['model'];['view'];constructor(_0x32a4c7,_0x2f961c){super(),this['model']=_0x32a4c7,this['model']['_isAttached']=!0x0,this['view']=_0x2f961c,this['listenTo'](_0x2f961c,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x2f961c,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x2f961c,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x2f961c,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x2f961c,'addComment',(_0x4d74d9,_0x3fd621)=>this['addComment'](_0x3fd621)),this['listenTo'](_0x2f961c,'updateComment',(_0x78a05b,_0x42c7af,_0x10edeb)=>this['updateComment'](_0x42c7af,_0x10edeb)),this['listenTo'](_0x2f961c,'removeComment',(_0x300fd9,_0x3689c6)=>this['removeComment'](_0x3689c6));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x12556d){this['model']['addComment']({'content':_0x12556d,'authorId':this['view']['_localUser']['id']});}updateComment(_0x41d57d,_0x42a14e){this['model']['getComment'](_0x41d57d)['update']({'content':_0x42a14e});}removeComment(_0x507e5d){this['model']['getComment'](_0x507e5d)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x4da195,_0x54b936,_0x4e7363){const t=_0x4da195['t'];switch(_0x54b936){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'},_0x4e7363);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'},_0x4e7363);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'},_0x4e7363);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'},_0x4e7363);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x4e7363);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'},_0x4e7363);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'},_0x4e7363);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'},_0x4e7363);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(_0x217738,_0x1d7758){super(_0x217738);const _0x43cdbe=_0x2a19ec();this['main']=this['createCollection'](),this['editable']=new st(_0x217738,_0x1d7758,void 0x0,{'label':()=>Et(_0x217738,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x217738['uiLanguageDirection'],'lang':_0x217738['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x43cdbe},'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(_0x47c036){super(_0x47c036),this['view']=new kt(_0x47c036['locale'],_0x47c036['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x33d18f=this['editor']['editing']['view'],_0x11de5c=this['view']['editable'];_0x11de5c['name']=_0x33d18f['document']['getRoot']()['rootName'],this['view']['render']();const _0xdbfd06=_0x11de5c['element'];this['setEditableElement'](_0x11de5c['name'],_0xdbfd06),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x33d18f['attachDomRoot'](_0xdbfd06),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4b8baa(_0x1ee667);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Ot)());constructor(_0x70037c={}){(_0x70037c=Object['assign']({},_0x70037c))['plugins']||(_0x70037c['plugins']=CommentEditor['defaultPlugins']),super(_0x70037c),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 _0x57d2ef=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x57d2ef))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x172fda=>{const _0xaa1784=this['model']['document']['getRoot'](),_0x5ebe4c=_0xaa1784&&_0xaa1784['getChild'](_0xaa1784['childCount']-0x1);_0x172fda['setSelection'](_0x5ebe4c,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x5c6b4e=this['editing']['view'],_0x4e7459=_0x5c6b4e['document']['getRoot'](),_0x4a2487=_0x4e7459['getChild'](0x0);_0x4e7459['childCount']>0x1||!_0x4a2487||'p'!=_0x4a2487['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x5c6b4e,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4a2487['placeholder']=this['placeholder']),ut({'view':_0x5c6b4e,'element':_0x4a2487,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4a2487);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x1ec0ed,_0xb8366f={}){super(_0x1ec0ed),this['editor']=null,this['_editorConfig']=_0xb8366f,this['set']('value',_0xb8366f['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x1ec0ed,'Reply...')),this['set']('submitLabel',Et(_0x1ec0ed,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x2a7095(),this['focusTracker']=new _0x45d472(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x32c09f=>!_0x32c09f['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',(_0x2eff07,_0x3d80d0)=>{this['cancelButtonView']['fire']('execute'),_0x3d80d0();}),this['keystrokes']['set']('Ctrl+Enter',(_0x564c78,_0x1c68cc)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1c68cc());}),this['on']('submit',(_0x96cd60,_0x581186)=>{_0x581186['length']>0xfde8?(alert(Et(_0x1ec0ed,'TOO_LONG_COMMENT_ALERT',[_0x581186['length'],0xfde8])),_0x96cd60['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 _0xb527f0=this['editor'];this['element']['insertBefore'](_0xb527f0['ui']['element'],this['element']['firstChild']),_0xb527f0['model']['document']['on']('change',()=>this['value']=_0xb527f0['getData']()),_0xb527f0['bind']('placeholder')['to'](this),this['focusables']['add'](_0xb527f0['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x55ce4b){-0x1===_0x55ce4b?(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:_0xe7cd}=this,_0x2658b9=new _0x98026e(_0xe7cd);return _0x2658b9['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2658b9['withText']=!0x0,_0x2658b9['bind']('label')['to'](this,'submitLabel'),_0x2658b9['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2658b9['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x46ace6,_0x59158d)=>!_0x59158d&&!!_0x46ace6['trim']()),_0x2658b9;}_createCancelButton(){const {locale:_0x2a4dd9}=this,_0x42cd65=new _0x98026e(_0x2a4dd9);return _0x42cd65['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x42cd65['label']=Et(_0x2a4dd9,'Cancel'),_0x42cd65['withText']=!0x0,_0x42cd65['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x42cd65;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4f792e=>{this['focusTracker']['add'](_0x4f792e['element']);}),this['focusables']['on']('change',(_0x1624c2,_0x489f0c)=>{for(const _0x132775 of Array['from'](_0x489f0c['added'])['reverse']())this['focusTracker']['add'](_0x132775['element']);});}},xt=class extends ht{constructor(_0x3df08a,_0x2d6962,_0x1850a6){super(_0x3df08a),this['commentInputView']=new St(_0x3df08a,_0x1850a6),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x59c4de,_0xd3d89a)=>_0x59c4de||!!_0xd3d89a),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 _0x272316(_0x3df08a,_0x2d6962),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'](_0x344df2){this['commentInputView']['focus'](_0x344df2);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x2b6275,_0x312665)=>{const {submitButtonView:_0x29b5e6,cancelButtonView:_0x3464ef,editor:_0x10941c}=this['commentInputView'];[_0x29b5e6['element'],_0x3464ef['element'],_0x10941c?_0x10941c['editing']['view']['getDomRoot']():null]['filter'](_0x3ba93e=>_0x3ba93e)['some'](_0x54c61d=>_0x54c61d['contains'](_0x312665['target']))||(this['focus'](),_0x312665['preventDefault']());});}},Pt=class extends ht{constructor(_0x5e8f6a){super(_0x5e8f6a);const _0x3e2ff1=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3e2ff1['to']('count',_0x168736=>Et(_0x5e8f6a,'NUMBER_OF_COMMENTS',_0x168736))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x283149,_0x10e049,_0x2adb7d){super(_0x283149);const _0x876bea=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x10e049['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x10e049,this['_config']=_0x2adb7d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x45d472(),this['keystrokes']=new _0x2a7095(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x42060a=>this['commentViews']['map'](_0x441992=>_0x441992['element'])['includes'](_0x42060a['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x283149),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1a9a26=>_0x1a9a26-this['_config']['maxCommentsWhenCollapsed']);for(const _0x479594 of _0x10e049['comments'])this['_handleNewCommentModel'](_0x479594);this['_handleInfoComment'](),this['listenTo'](_0x10e049['comments'],'add',(_0x1eb19b,_0x522ba9)=>{const _0x18ecd3=this['_calculatePosition'](_0x522ba9);this['length']++,this['_handleNewCommentModel'](_0x522ba9,_0x18ecd3),this['refreshVisibleViews']();}),this['listenTo'](_0x10e049['comments'],'remove',(_0x4204cb,_0x595e79)=>{this['length']--,this['_handleRemoveCommentModel'](_0x595e79),this['refreshVisibleViews']();}),this['listenTo'](_0x10e049,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x10e049,'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',_0x876bea['if']('length','ck-hidden',_0x597841=>!_0x597841)],'aria-label':Et(_0x283149,'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'](_0x21ada7){-0x1===_0x21ada7?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x44e0e3 of this['commentViews'])_0x44e0e3['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x13e9b8,_0x391078){const _0x1570f9=new this['_config']['CommentView'](this['locale'],_0x13e9b8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1570f9['viewUid']=_0x13e9b8['id'],_0x1570f9['delegate']('removeComment')['to'](this),_0x1570f9['delegate']('updateComment')['to'](this),_0x1570f9['delegate']('resolveCommentThread')['to'](this),_0x1570f9['delegate']('editorReady')['to'](this),_0x1570f9['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1570f9,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1570f9,_0x391078);}_calculatePosition(_0x512b26){const _0x21b737=this['_model']['_findOptimalIndex'](_0x512b26);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x512b26['authoredAt']?_0x21b737-0x1:_0x21b737:_0x21b737-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4bd342={'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'],_0x4bd342,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4bd342));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x472e1a){const _0x468158=this['commentViews']['remove'](_0x472e1a['id']);this['stopListening'](_0x468158),_0x468158['isEditMode']&&this['_updateHasDirtyComment'](),_0x468158['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x450546=>_0x450546['isEditMode']);}['_rearrangeCollapse'](){const _0x458d4b=function(_0x1235bf){const _0x2777ce=new _0x5391c7();for(const _0x3c7044 of _0x1235bf)_0x2777ce['add'](_0x3c7044);return _0x2777ce;}(this['commentViews']),_0x4319d2=this['_collapsedCommentsView']['count'];for(let _0x201013=0x1;_0x201013<=_0x4319d2;_0x201013++)_0x458d4b['remove'](0x1);for(const _0x5cf050 of _0x458d4b)_0x5cf050['collapse']();_0x4319d2>0x0&&_0x458d4b['add'](this['_collapsedCommentsView'],0x1),Dt(_0x16770d(Array['from'](this['visibleViews']),Array['from'](_0x458d4b)),this['visibleViews'],_0x458d4b);}['_rearrangeExpand'](){Dt(_0x16770d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x40baf0 of this['visibleViews'])_0x40baf0['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x45b140=>{this['focusTracker']['add'](_0x45b140['element']),this['keystrokes']['listenTo'](_0x45b140['element']);}),this['commentViews']['on']('change',(_0x4f4e5f,_0x112274)=>{for(const _0x29ceef of _0x112274['removed'])this['focusTracker']['remove'](_0x29ceef['element']),this['keystrokes']['stopListening'](_0x29ceef['element']);for(const _0x4c621d of Array['from'](_0x112274['added'])['reverse']())this['focusTracker']['add'](_0x4c621d['element']),this['keystrokes']['listenTo'](_0x4c621d['element']);});}};function Dt(_0x307778,_0x418c67,_0x46a01c){let _0x29668a=0x0;for(const _0x47f01f of _0x307778)switch(_0x47f01f){case'insert':_0x418c67['add'](_0x46a01c['get'](_0x29668a),_0x29668a),_0x29668a++;break;case'delete':_0x418c67['remove'](_0x29668a);break;case'equal':_0x29668a++;}}var Vt=class extends ht{constructor(_0x298381){super(_0x298381);const _0x1fd41d=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1fd41d['to']('contextValue',_0x21cae0=>Et(_0x298381,'THREAD_CONTEXT_LABEL',_0x21cae0)),'tabindex':-0x1},'children':[{'text':_0x1fd41d['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x4a5698,_0x43a566){super(_0x4a5698);const _0x53282d=this['bindTemplate'];this['_model']=_0x43a566,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x45d472(),this['keystrokes']=new _0x2a7095(),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',_0x5361e8=>!!_0x5361e8),this['bind']('contextValue')['to'](this['_model'],'context',_0x5dafb6=>_0x5dafb6&&_0x5dafb6['value']?this['_trimContextValue'](_0x5dafb6['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',_0x53282d['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 _0x453a53=new _0x98026e(this['locale']);return _0x453a53['label']=Et(this['locale'],'Reopen'),_0x453a53['tooltip']=Et(this['locale'],'Reopen'),_0x453a53['icon']=_0x1e71fe,_0x453a53['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x19d127=>!_0x19d127),_0x453a53['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5d7990,_0x5ced48)=>_0x5d7990&&_0x5ced48),_0x453a53['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x453a53;}_trimContextValue(_0x412cd1){if(_0x412cd1['length']<0x96)return _0x412cd1;const _0x225330=_0x412cd1['lastIndexOf']('\x20',0x93);return _0x412cd1['substring'](0x0,_0x225330>-0x1?_0x225330:0x93)+'...';}_attachContextActions(){const _0x542cf4=this['element']['querySelector']('.ck-context'),_0x531678=_0x542cf4['querySelector']('.ck-context__value');this['listenTo'](_0x542cf4,'mouseenter',()=>{_0x531678['offsetWidth']<_0x531678['scrollWidth']&&_0x542cf4['classList']['add']('overlay');}),this['listenTo'](_0x542cf4,'mouseleave',()=>{_0x542cf4['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0xb2f7ac of this['focusables'])this['focusTracker']['add'](_0xb2f7ac['element']),this['keystrokes']['listenTo'](_0xb2f7ac['element']);}_createContextView(){const _0x5f0a04=new Vt(this['locale']);return _0x5f0a04['bind']('contextValue')['to'](this),_0x5f0a04;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x9296d0,_0x1255a1,_0x41982b,_0x49269e){super(_0x9296d0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1255a1,this['_localUser']=_0x41982b,this['_config']=_0x49269e,this['commentThreadHeaderView']=new Bt(_0x9296d0,_0x1255a1),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x493c41(_0x9296d0,Et(_0x9296d0,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x9296d0,_0x1255a1,Object['assign']({'CommentView':this['_config']['CommentView']},_0x49269e)),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',(_0x397cc9,_0x3235b9)=>_0x397cc9||!!_0x3235b9),this['bind']('isUnlinked')['to'](_0x1255a1,'unlinkedAt',_0x7c64bf=>!!_0x7c64bf);let _0xddf792=null;const _0x390594=()=>{const _0x4f20f3=this['_model']['comments']['first']||null;_0x4f20f3!==_0xddf792&&(_0xddf792&&this['stopListening'](_0xddf792,'change:content'),_0xddf792=_0x4f20f3,_0x4f20f3&&this['listenTo'](_0x4f20f3,'change:content',_0x390594));const _0x415661=_0x4f20f3?_0x4f20f3['author']['name']:this['_localUser']['name'],_0x4e8004=_0x4f20f3?new DOMParser()['parseFromString'](_0x1699cd(_0x4f20f3['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x89c1f2=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x415661]);this['set']('ariaLabel',_0x4e8004?_0x89c1f2+'\x20'+_0x4e8004:_0x89c1f2);};this['listenTo'](this['_model']['comments'],'change',_0x390594),_0x390594(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x45d472(),this['keystrokes']=new _0x2a7095(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xb5417=>_0xb5417['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x17bbb7(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x4ede0d=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x253068=_0x4ede0d['commentInputView'];return _0x4ede0d['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x253068,'value',(_0x3abf70,_0x4e4141,_0x361ded,_0x296d67,_0x8867b7)=>!!_0x8867b7||!!_0x296d67&&_0x361ded&&!_0x4e4141||_0x3abf70&&_0x361ded&&!_0x4e4141),_0x253068['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1ce5b0,_0x296d5f,_0x52173c)=>{let _0x67dacb;return _0x67dacb=_0x52173c&&_0x296d5f?'Reply\x20to\x20reopen\x20discussion...':_0x1ce5b0?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x67dacb);}),_0x253068['bind']('submitLabel')['to'](this,'length',_0x7f2805=>Et(this['locale'],_0x7f2805?'Reply':'Comment')),_0x253068['on']('submit',(_0x7696a5,_0x27edb6)=>{this['fire']('addComment',_0x27edb6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x253068['on']('cancel',()=>{this['focus']();}),_0x253068['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x253068['on']('cancel',_0x4a7bdc=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4a7bdc['stop']());}),this['on']('change:isActive',(_0x3c3608,_0x6e1ecf,_0x37066a)=>{_0x37066a||this['length']||_0x253068['value']||this['fire']('removeCommentThread');}),_0x4ede0d;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x39943b(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0xf04fc5,_0x505f6e,_0x561970,_0x506873){super(_0xf04fc5,_0x505f6e,_0x561970,_0x506873),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xf04fc5,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3be895,_0x495b16,_0x533e27)=>{_0x533e27||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x2b6b12,_0x4b8770,_0x5f07c4)=>{_0x5f07c4&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0xe259b0=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0xe259b0['if']('isActive','ck-thread--active'),_0xe259b0['if']('isUnlinked','ck-thread--unlinked'),_0xe259b0['to']('actionIndicator',_0x558f91=>_0x558f91?'ck-thread--'+_0x558f91:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0xe259b0['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 _0x1bf193 of this['commentsListView']['commentViews'])_0x1bf193['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x3a74e0}=this,_0x557e9e=this['commentsListView']['commentViews']['get'](0x0);_0x557e9e===this['_boundFirstCommentView']||_0x557e9e['isSystemComment']||(this['_boundFirstCommentView']=_0x557e9e,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x557e9e,'actionIndicator',_0x5aa2ee=>'remove'===_0x5aa2ee?'remove':null),_0x557e9e['placeholder']=Et(_0x3a74e0,'Write\x20a\x20comment...'),_0x557e9e['removeButton']['on']('execute',_0x324576=>{_0x324576['stop'](),this['showConfirm'](Et(_0x3a74e0,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x557e9e['focus']();}),_0x557e9e['actionBar']['add'](this['resolveButton'],0x0),_0x557e9e['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x4cc12e=new _0xe5b6cb(this['locale']);return _0x4cc12e['label']=Et(this['locale'],'Resolve'),_0x4cc12e['tooltip']=Et(this['locale'],'Resolve'),_0x4cc12e['icon']=_0x4cc79c,_0x4cc12e['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4cc12e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1eef1a=>!_0x1eef1a),_0x4cc12e['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x358a05,_0x3a54ce)=>_0x358a05&&!_0x3a54ce),_0x4cc12e['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4cc12e;}_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(_0x447ca8){super(_0x447ca8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x157bae,_0x3faa7e,_0x32d9cc)=>{this['element']['innerHTML']=_0x32d9cc;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x6d3fdf,_0x4b600d,_0x1600a7){super(_0x6d3fdf),this['_model']=_0x4b600d,this['_config']=_0x1600a7,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4b600d,'content',_0x4b600d,'authoredAt',(_0x14235d,_0xe18e1a)=>Et(_0x6d3fdf,'COMMENT_ARIA_LABEL',[_0x4b600d['author']['name'],_0x1600a7['formatDateTime'](_0xe18e1a),new DOMParser()['parseFromString'](_0x14235d,'text/html')['body']['textContent'],_0x4b600d['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x493c41(_0x6d3fdf,Et(_0x6d3fdf,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x45d472(),this['keystrokes']=new _0x2a7095(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x276323=>_0x276323['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 _0x19aa83=new Wt(this['locale']);return _0x19aa83['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x239710,_0x41b9d7)=>_0x41b9d7?_0x1699cd(_0x239710,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x239710),_0x19aa83;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x277e10=new St(this['locale'],this['_config']['editorConfig']);return _0x277e10['value']=this['_model']['content'],_0x277e10['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x277e10['submitLabel']=Et(this['locale'],'Save'),_0x277e10['on']('submit',(_0x1db3c2,_0x3e39e1)=>{this['fire']('updateComment',this['_model']['id'],_0x3e39e1),this['switchToDisplayMode'](),this['focus']();}),_0x277e10['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x277e10['once']('editorReady',()=>{_0x277e10['focus']();}),_0x277e10['createEditor'](),_0x277e10['delegate']('editorReady')['to'](this),_0x277e10['delegate']('editorDestroyed')['to'](this),_0x277e10;}_setupKeyboardNavigation(){const _0x22c1f5=this['element'];this['keystrokes']['listenTo'](_0x22c1f5);for(const _0x2d2f63 of this['focusables'])this['focusTracker']['add'](_0x2d2f63['element']),this['keystrokes']['listenTo'](_0x2d2f63['element']);this['focusables']['on']('change',(_0x24cc99,_0x20a477)=>{for(const _0x1bebff of _0x20a477['removed'])this['focusTracker']['remove'](_0x1bebff['element']),this['keystrokes']['stopListening'](_0x1bebff['element']);for(const _0x51e4d0 of _0x20a477['added'])this['focusTracker']['add'](_0x51e4d0['element']),this['keystrokes']['listenTo'](_0x51e4d0['element']);}),this['keystrokes']['set']('enter',(_0x3b13b3,_0xe5dc2)=>{_0x22c1f5===_0x3b13b3['target']&&(this['focusCycler']['focusFirst'](),_0xe5dc2());}),this['keystrokes']['set']('esc',(_0x59ddc1,_0x41508e)=>{_0x22c1f5!==_0x59ddc1['target']&&(this['focus'](),_0x41508e());});}};const Gt=/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x39943b(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x16984f,_0x1de2a5,_0xa2efbf){super(_0x16984f,_0x1de2a5,_0xa2efbf),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x16984f,'Reply...')),this['bind']('authoredAt')['to'](_0x1de2a5),this['bind']('resolvedAt')['to'](_0x1de2a5),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 _0x272316(_0x16984f,_0x1de2a5['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x1de2a5,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x345818=this['bindTemplate'],_0x5c0b03=[{'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':_0x345818['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x345818['to']('authoredAt',_0x5c45e8=>this['_config']['formatDateTime'](_0x5c45e8))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x345818['if']('isEditMode','ck-comment__actions--hidden'),_0x345818['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']&&_0x5c0b03['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x345818['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x345818['if']('isEditMode','ck-comment--edit'),_0x345818['if']('isSystemComment','ck-comment--info'),_0x345818['to']('actionIndicator',_0x5503c6=>_0x5503c6?'ck-comment--'+_0x5503c6:'')],'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':_0x5c0b03}]}]};}_createEditButton(){const _0x2a85f9=new _0x98026e(this['locale']);return _0x2a85f9['label']=Et(this['locale'],'Edit'),_0x2a85f9['icon']=_0x68065d,_0x2a85f9['withText']=!0x0,_0x2a85f9['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2a85f9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3a50b6=>!_0x3a50b6),_0x2a85f9['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2a85f9['on']('execute',()=>this['switchToEditMode']()),_0x2a85f9;}_createRemoveButton(){const _0x23ca95=new _0x98026e(this['locale']);return _0x23ca95['label']=Et(this['locale'],'Remove'),_0x23ca95['icon']=_0x37851b,_0x23ca95['withText']=!0x0,_0x23ca95['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x23ca95['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2fc17f=>!_0x2fc17f),_0x23ca95['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x23ca95['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x23ca95;}_createDropdown(){const _0x26b370=ct(this['locale'],_0xe60e7b),_0x321aa6=_0x26b370['panelView']['children'],_0x55c143=new ot(this['locale']),_0xa0cb5=_0x26b370['bindTemplate'];dt(_0x26b370,()=>this['items']['find'](_0x3079dc=>_0x3079dc['isVisible'])),_0x26b370['extendTemplate']({'attributes':{'class':[_0xa0cb5['if']('isVisible','ck-hidden',_0x32e79d=>!_0x32e79d)]}});const _0x116f1e=(_0x3a2fdb,_0x2483fa=-0x1)=>{const _0x10c5c3=new nt(this['locale']);_0x10c5c3['children']['add'](_0x3a2fdb);const _0x2a8c63=_0x2483fa>-0x1?_0x2483fa:_0x55c143['items']['length'];_0x55c143['items']['add'](_0x10c5c3,_0x2a8c63);const _0x5cdbfc=Array['from'](this['items']);_0x26b370['unbind']('isEnabled','isVisible'),_0x26b370['bind']('isEnabled')['toMany'](_0x5cdbfc,'isEnabled',(..._0x5697)=>_0x5697['some'](_0x3ceea7=>_0x3ceea7)),_0x26b370['bind']('isVisible')['toMany'](_0x5cdbfc,'isVisible',(..._0x5778e5)=>_0x5778e5['some'](_0x316580=>_0x316580));};_0x26b370['panelPosition']='sw',_0x26b370['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x6f113b});for(const _0x31d7cc of this['items'])_0x116f1e(_0x31d7cc);return _0x321aa6['add'](_0x55c143),_0x26b370['listenTo'](this['items'],'add',(_0x98490,_0x1c6c5c,_0x5baa1b)=>{_0x116f1e(_0x1c6c5c,_0x5baa1b);}),_0x26b370['listenTo'](this['items'],'remove',(_0x3af9a2,_0xe5fee8,_0x573c1a)=>{_0x55c143['items']['remove'](_0x573c1a);}),_0x26b370;}_attachActions(_0x404284,_0x2dc450){const _0x28c5e9=_0x404284&&_0x404284['element'];_0x28c5e9&&(this['listenTo'](_0x28c5e9,'mouseenter',()=>this['actionIndicator']=_0x2dc450),this['listenTo'](_0x28c5e9,'focus',()=>this['actionIndicator']=_0x2dc450),this['listenTo'](_0x28c5e9,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x28c5e9,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x1e7af7=super['_createCommentInputView']();return _0x1e7af7['bind']('placeholder')['to'](this),_0x1e7af7;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x539883){const _0x29fdec=_0x4f9922(_0x539883,0x1e),_0x1623e3=new MutationObserver(_0x3667de=>{for(const _0x2c53ff of _0x3667de)('attributes'==_0x2c53ff['type']&&'class'==_0x2c53ff['attributeName']||'childList'==_0x2c53ff['type']||'characterData'==_0x2c53ff['type'])&&_0x29fdec();});return{'attach'(_0x195072){_0x1623e3['observe'](_0x195072,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x1623e3['disconnect'](),_0x29fdec['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x142382,_0x3b95c9){super(_0x142382),this['id']=_0x2a19ec(),this['focusTracker']=new _0x45d472(),this['keystrokes']=new _0x2a7095(),this['keystrokes']['set']('Esc',(_0x88dea6,_0x2b1fe4)=>this['fire']('Esc',_0x2b1fe4)),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'](_0x3b95c9),this['mainView']=_0x3b95c9;const _0x3089d9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3089d9['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 _0x136b17=this['element']['clientHeight'];_0x136b17&&(this['height']=_0x136b17);}};const jt=/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x4b8baa();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0xd68ff2,target:_0x6b6b95,type:_0x88d019,isVisible:_0xb90579=!0x0}){super(),this['view']=_0xd68ff2,this['view']['element']||this['view']['render'](),this['_type']=_0x88d019,this['_target']=_0x6b6b95,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5391c7([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3cc685,_0x2d1749)=>{this['view']['focusTracker']['add'](_0x2d1749);}),this['focusableElements']['on']('remove',(_0x4b5ca2,_0x3cfe55)=>{this['view']['focusTracker']['remove'](_0x3cfe55);}),this['set']('isVisible',_0xb90579);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x284f46=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x284f46),_0x284f46;}get targetRect(){const _0x2b6e56=this['target'];if(null===_0x2b6e56)return null;if(_0x2b6e56 instanceof _0x465231)return _0x2b6e56;const _0x5bd2fb=_0x2b6e56['filter'](_0xff78c1=>function(_0x4b1f34){return!!_0x4b1f34['offsetParent']||!!_0x4b1f34['getClientRects']()['item'](0x0);}(_0xff78c1));return 0x0===_0x5bd2fb['length']?null:_0x465231['getDomElementRects'](_0x5bd2fb[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x559f50){this['view']['isActive']=_0x559f50,this['view']['mainView']['isActive']=_0x559f50;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x55158f){if(!(null===_0x55158f||_0x55158f instanceof _0x465231||Array['isArray'](_0x55158f)&&_0x55158f['every'](_0x30e1bf=>zt(_0x30e1bf))))throw new _0x3a2103('annotation-invalid-target',null,{'target':_0x55158f});}_getNormalizedTarget(){const _0x73c65='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x73c65)?[_0x73c65]:_0x73c65;}};function zt(_0x345351){return null!==_0x345351&&'object'==typeof _0x345351&&'nodeType'in _0x345351&&0x1===_0x345351['nodeType'];}var Jt=class extends _0x5391c7{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x45ce61=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x45d472(),this['_focusTracker']['on']('change:isFocused',(_0x5d68b5,_0x41bd7b,_0x372093)=>{_0x372093||this['fire']('blur');});for(const _0x35e134 of _0x45ce61)this['add'](_0x35e134);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x34492a){if(this['has'](_0x34492a))throw new _0x3a2103('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x34492a['innerView'],_0x34492a),this['_viewToAnnotation']['set'](_0x34492a['view'],_0x34492a);for(const _0x1b514b of _0x34492a['focusableElements'])this['_focusTracker']['add'](_0x1b514b);if(this['listenTo'](_0x34492a['focusableElements'],'add',(_0x5b76c0,_0x1cdac9)=>{this['_focusTracker']['add'](_0x1cdac9);}),this['listenTo'](_0x34492a['focusableElements'],'remove',(_0x178689,_0x239902)=>{this['_focusTracker']['remove'](_0x239902);}),this['listenTo'](_0x34492a['view']['focusTracker'],'change:isFocused',(_0x4709b2,_0x372698,_0x1434e4)=>{_0x1434e4&&this['fire']('focus',_0x34492a);}),_0x34492a['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x324d0e of this)_0x324d0e['updateTargetRect']();}const _0x509f47=this['_getOrderInContent'](_0x34492a['view']['targetRect']);return super['add'](_0x34492a,_0x509f47);}['remove'](_0x175bd8){if(!this['has'](_0x175bd8))throw new _0x3a2103('annotationcollection-not-existing-item',null);this['stopListening'](_0x175bd8['view']['focusTracker']),this['stopListening'](_0x175bd8['focusableElements']);for(const _0x13c72f of _0x175bd8['focusableElements'])this['_focusTracker']['remove'](_0x13c72f);return this['_viewToAnnotation']['delete'](_0x175bd8['view']),this['_innerViewToAnnotation']['delete'](_0x175bd8['innerView']),super['remove'](_0x175bd8);}getByInnerView(_0x2e5f35){return this['_innerViewToAnnotation']['get'](_0x2e5f35);}getByView(_0x257696){return this['_viewToAnnotation']['get'](_0x257696);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x40f831 of this)_0x40f831['updateTargetRect']();this['_sort']();}_sort(){const _0x30e920=Array['from'](this)['sort']((_0x31716b,_0x1c7390)=>Zt(_0x31716b['view']['targetRect'],_0x1c7390['view']['targetRect']));for(let _0x5099d9=_0x30e920['length']-0x1;_0x5099d9>0x0;_0x5099d9--){const _0x2618fb=_0x30e920[_0x5099d9];_0x5099d9!==this['getIndex'](_0x2618fb)&&(this['remove'](_0x2618fb),this['add'](_0x2618fb));}}_getOrderInContent(_0x15c825){let _0x43c862=0x0;if(!_0x15c825)return this['length'];for(const _0x4e7e42 of this){const _0x34a490=_0x4e7e42['view']['targetRect'];if(_0x34a490){if(Zt(_0x15c825,_0x34a490)<0x0)return _0x43c862;_0x43c862++;}}return _0x43c862;}_areCachedRectsStale(){const _0x1d6972=this['get'](0x0);if(!_0x1d6972)return!0x1;const _0x39d68d=_0x1d6972['view']['targetRect'],_0x19fc10=_0x1d6972['targetRect'];return!(!_0x39d68d||!_0x19fc10)&&(_0x39d68d['top']!==_0x19fc10['top']||_0x39d68d['left']!==_0x19fc10['left']);}};function Qt({source:_0x230ca5,target:_0x51567c,filter:_0x26a637}){for(const _0x3f0482 of _0x230ca5)_0x26a637(_0x3f0482)&&_0x51567c['add'](_0x3f0482);_0x51567c['listenTo'](_0x230ca5,'add',(_0x535c1d,_0x589076)=>{_0x26a637(_0x589076)&&_0x51567c['add'](_0x589076);}),_0x51567c['listenTo'](_0x230ca5,'remove',(_0x44044a,_0x4f139c)=>{_0x51567c['has'](_0x4f139c)&&_0x51567c['remove'](_0x4f139c);});}function Zt(_0x1350df,_0x169b77){if(null===_0x1350df&&null===_0x169b77)return 0x0;if(null===_0x1350df)return-0x1;if(null===_0x169b77)return 0x1;const _0x5df477=_0x1350df['top']-_0x169b77['top'];return 0x0==_0x5df477?_0x1350df['left']-_0x169b77['left']:_0x5df477;}var ti=class extends _0x2edf68{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x468284){if(super(_0x468284),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x468284 instanceof _0x1ee667){const _0x3f3ce0=_0x468284['locale'];_0x468284['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x3f3ce0,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x3f3ce0,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x3f3ce0,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x3f3ce0,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x3f3ce0,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x3f3ce0,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x3f3ce0,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x15e450){this['collection']['add'](_0x15e450);}['remove'](_0x483239){this['collection']['remove'](_0x483239),_0x483239['destroy']();}refreshVisibility(){for(const _0x4ecf98 of this['collection'])_0x4ecf98['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x570f26){return this['collection']['getByInnerView'](_0x570f26);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x149464 of this['collection'])_0x149464['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0xa95219){this['fire']('_activateAnnotation',_0xa95219);}createAnnotation(_0x32e9c9){return new $t(_0x32e9c9);}createAnnotationView(_0x1e37a4,_0x58273d){return new qt(_0x1e37a4,_0x58273d);}_addActiveAnnotation(_0x2d9b3f){const _0x41dd5b=new Set(this['activeAnnotations']);_0x41dd5b['add'](_0x2d9b3f),this['activeAnnotations']=_0x41dd5b;}_removeActiveAnnotation(_0x1cfe6d){const _0x2724c7=new Set(this['activeAnnotations']);_0x2724c7['delete'](_0x1cfe6d),this['activeAnnotations']=_0x2724c7;}_bindAnnotationsToVisibleAnnotations(){const _0x43eea9=this['collection'],_0x180a12=this['_visibleAnnotations'];function _0xedafad(_0x295153){const _0x55f9dd=_0x295153['source'];_0x55f9dd['isVisible']&&!_0x180a12['has'](_0x55f9dd)?_0x180a12['add'](_0x55f9dd):!_0x55f9dd['isVisible']&&_0x180a12['has'](_0x55f9dd)&&_0x180a12['remove'](_0x55f9dd),_0x55f9dd['view']['focusTracker']['remove'](_0x55f9dd['view']['element']),_0x55f9dd['view']['focusTracker']['add'](_0x55f9dd['view']['element']);}this['listenTo'](_0x43eea9,'add',(_0x496d6b,_0x2e446c)=>{_0x2e446c['isVisible']&&_0x180a12['add'](_0x2e446c),this['listenTo'](_0x2e446c,'change:isVisible',_0xedafad);}),this['listenTo'](_0x43eea9,'remove',(_0x492d89,_0x52468c)=>{_0x180a12['has'](_0x52468c)&&_0x180a12['remove'](_0x52468c),this['stopListening'](_0x52468c,'change:isVisible',_0xedafad);});}_setupEnterAnnotationKeystroke(){const _0x59f644=_0x5ee7e3=>{_0x5ee7e3['on']('ready',()=>{_0x5ee7e3['keystrokes']['set'](_0x2e34f3,(_0x146801,_0x42edc6)=>{const _0x103d27=_0x24068(this['activeAnnotations']['values']());_0x103d27&&(_0x103d27['view']['focus'](),_0x42edc6());});});};this['context']instanceof _0x1ee667?_0x59f644(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1aee5d,_0x23d382)=>{_0x59f644(_0x23d382);});}_setupEscapeAnnotationHandling(){const _0x19c70f=_0x39d01d=>{const _0x2704ef=_0x39d01d['source'],_0xc52adb=[];let _0xa73876;if(Array['isArray'](_0x2704ef['target'])){_0xa73876=_0x2704ef['target'][0x0],this['context']instanceof _0x1ee667?_0xc52adb['push'](this['context']):this['context']['editors']&&_0xc52adb['push'](...this['context']['editors']);for(const _0x361254 of _0xc52adb)for(const _0x15cf5e of _0x361254['editing']['view']['domRoots']['values']())if(_0x15cf5e['contains'](_0xa73876))return void _0x361254['editing']['view']['focus']();_0xa73876['focus']();}};this['listenTo'](this['collection'],'add',(_0x196ace,_0x195b34)=>{this['listenTo'](_0x195b34,'escape',_0x19c70f,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3e4c63,_0x4370eb)=>{this['stopListening'](_0x4370eb,'escape',_0x19c70f);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4b8baa(),ni=/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x4b8baa();var oi=class extends _0x2edf68{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x2c6b3e,_0xd67d2e];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1db2c7){super(_0x1db2c7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x32dce8=this['context']['config'];_0x32dce8['define']('comments.maxCommentsWhenCollapsed',0x2),_0x32dce8['define']('comments.maxThreadTotalWeight',0x1f4),_0x32dce8['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x32dce8['define']('comments.CommentThreadView',Ut),_0x32dce8['define']('comments.CommentView',Yt),_0x32dce8['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x1a7891=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x22ae00,_0x2d7aa1)=>this['_addCommentThread'](_0x2d7aa1)),this['on']('submitCommentThread',(_0x1aa99a,_0x213273)=>this['_submitCommentThread'](_0x213273)),this['on']('resolveCommentThread',(_0x4065dc,_0x4ba6c9)=>this['_resolveCommentThread'](_0x4ba6c9)),this['on']('resolveCommentThread',(_0x3ca659,_0x6a2b73)=>this['_updateActiveAnnotation'](_0x6a2b73),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5aea71,_0x4fda06)=>this['_reopenCommentThread'](_0x4fda06)),this['on']('reopenCommentThread',(_0x4be7d8,_0x41795a)=>this['_updateActiveAnnotation'](_0x41795a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5f45c7,_0x3af6a1)=>this['_removeCommentThread'](_0x3af6a1)),this['on']('updateCommentThread',(_0x500a56,_0x1f014f)=>this['_updateCommentThread'](_0x1f014f)),this['on']('updateCommentThread',(_0x35949a,_0x1d8d12)=>this['_updateActiveAnnotation'](_0x1d8d12),{'priority':'lowest'}),this['on']('addComment',(_0x10c011,_0x8c3efd)=>this['_addComment'](_0x8c3efd)),this['on']('updateComment',(_0x131d51,_0x263a64)=>this['_updateComment'](_0x263a64)),this['on']('removeComment',(_0x9d42eb,_0x4333ec)=>this['_removeComment'](_0x4333ec)),this['on']('addComment',(_0x51178f,{threadId:_0x35c512,isFromAdapter:_0x4416c8})=>{if(_0x4416c8)return;const _0x32a1f3=this['getCommentThread'](_0x35c512),_0x8a8597=_0x32a1f3&&this['_threadToController']['get'](_0x32a1f3);_0x8a8597&&_0x8a8597['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1a7891,'change:activeAnnotations',(_0x57e338,_0x273c5a,_0x4b74c1)=>{const _0x42514a=Array['from'](_0x4b74c1)['map'](_0x530911=>this['_viewToController']['get'](_0x530911['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x42514a?_0x42514a['model']:null;});}set adapter(_0x1bff42){if(this['_adapter'])throw new _0x3a2103('commentsrepository-adapter-already-set');this['_adapter']=_0x1bff42;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x317da2=ii,threadId:_0xaeea81=_0x2a19ec(),comments:_0x52a98f=[],unlinkedAt:_0xd8cd9e=null,resolvedAt:_0x152cc1=null,resolvedBy:_0x15d8c2=null,target:_0x1820a0=null,context:_0x16aafe=null,attributes:_0x126ac1={},isResolvable:_0x47b417=!0x0,isSubmitted:_0x5b4f15=!0x1,isFromAdapter:_0x50c0d8=!0x1}={}){return this['fire'](ai('addCommentThread',_0x317da2),{'channelId':_0x317da2,'threadId':_0xaeea81,'comments':_0x52a98f,'unlinkedAt':_0xd8cd9e,'resolvedAt':_0x152cc1,'resolvedBy':_0x15d8c2,'target':_0x1820a0,'context':_0x16aafe,'attributes':_0x126ac1,'isFromAdapter':_0x50c0d8,'isResolvable':_0x47b417,'isSubmitted':_0x5b4f15}),this['getCommentThread'](_0xaeea81);}openNewCommentThread({channelId:_0x3a7e0c=ii,threadId:_0x269bac=_0x2a19ec(),target:_0x1052cc,context:_0x1348d2=null,isResolvable:_0x335f75=!0x0}){if(this['_readOnlyChannels']['has'](_0x3a7e0c)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1052cc)throw new _0x3a2103('commentsrepository-missing-target');const _0x291b35=this['addCommentThread']({'channelId':_0x3a7e0c,'threadId':_0x269bac,'target':_0x1052cc,'context':_0x1348d2,'isResolvable':_0x335f75});if(!_0x291b35)return null;const _0x111738=this['_threadToController']['get'](_0x291b35),_0x219c43=_0x111738['view']['commentThreadInputView']['commentInputView'],_0x55eeeb=this['context']['plugins']['get'](ti),_0x45f6fc=_0x55eeeb['getByInnerView'](_0x111738['view']);return _0x55eeeb['activate'](_0x45f6fc),_0x219c43['once']('editorReady',()=>_0x219c43['focus']()),_0x291b35;}hasCommentThread(_0x2b057d){if('string'!=typeof _0x2b057d)throw new _0x3a2103('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2b057d);}updateCommentThread({channelId:_0x35c0a4=ii,threadId:_0x44c968,context:_0x92977b,unlinkedAt:_0x2a1f96,attributes:_0x441f95,isFromAdapter:_0x3abcf6=!0x1}){return this['fire'](ai('updateCommentThread',_0x35c0a4),{'channelId':_0x35c0a4,'threadId':_0x44c968,'context':_0x92977b,'unlinkedAt':_0x2a1f96,'attributes':_0x441f95,'isFromAdapter':_0x3abcf6}),this['getCommentThread'](_0x44c968);}getCommentThread(_0x5cb7d0){if('string'!=typeof _0x5cb7d0)throw new _0x3a2103('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5cb7d0);}fetchCommentThread({channelId:_0x183f23,threadId:_0x12ed28}={}){const _0x31acf0=this['getCommentThread'](_0x12ed28);if(_0x31acf0)return Promise['resolve'](_0x31acf0);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3a2103('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x183f23,'threadId':_0x12ed28})['then'](_0x5423bf=>this['hasCommentThread'](_0x12ed28)?this['getCommentThread'](_0x12ed28):_0x5423bf?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x183f23},_0x5423bf)):void 0x0)['catch'](_0xa1c780=>{throw console['error'](_0xa1c780),new _0x3a2103('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x5bafbe,skipNotAttached:_0x324b4e=!0x1,skipEmpty:_0x11bde3=!0x1,toJSON:_0x12fde5=!0x1}={}){const _0x2d98b2=[];for(const _0x16b833 of this['_threads']['values']())_0x5bafbe&&_0x16b833['channelId']!==_0x5bafbe||_0x324b4e&&!_0x16b833['isAttached']||_0x11bde3&&0x0===_0x16b833['length']||_0x2d98b2['push'](_0x16b833);return _0x12fde5?_0x2d98b2['map'](_0x13b7ce=>_0x13b7ce['toJSON']()):_0x2d98b2;}getAnnotationForCommentThread(_0x31e34e){const _0x2c23dd=this['_threadToController']['get'](_0x31e34e);return _0x2c23dd&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x2c23dd['view'])||null;}getCommentThreadForAnnotation(_0x2bbfc0){const _0x54415c=this['_viewToController']['get'](_0x2bbfc0['innerView']);return _0x54415c?_0x54415c['model']:null;}setActiveCommentThread(_0x264d09){const _0xcf39b9=this['context']['plugins']['get'](ti);if(!_0x264d09)return void(this['activeCommentThread']&&_0xcf39b9['deactivateAll']());const _0x382309=this['getCommentThread'](_0x264d09);if(!_0x382309)throw new _0x3a2103('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x264d09});if(!this['_threadToController']['has'](_0x382309))throw new _0x3a2103('commentsrepository-active-not-attached',null,{'threadId':_0x264d09});const _0x45ba5a=_0xcf39b9['getByInnerView'](this['_threadToController']['get'](_0x382309)['view']);_0xcf39b9['activate'](_0x45ba5a);}switchReadOnly(_0x45a6a0,_0x47de13){_0x45a6a0?this['_readOnlyChannels']['add'](_0x47de13):this['_readOnlyChannels']['delete'](_0x47de13),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x353a3d){return this['_readOnlyChannels']['has'](_0x353a3d)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x39f233,_0x5755b0){return new bt(_0x39f233,_0x5755b0);}setPermissions(_0x21f25c,_0x233e69=ii){this['_permissions']['set'](_0x233e69,_0x21f25c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x4647b0=ii){return this['_permissions']['has'](_0x4647b0)?this['_permissions']['get'](_0x4647b0):ei;}_addCommentThread({channelId:_0x3db338,threadId:_0x277878,comments:_0x3f6cd8,unlinkedAt:_0x557443,resolvedAt:_0x786550,resolvedBy:_0x1a8771,target:_0xf7b4a3,context:_0x4b7c39,attributes:_0x593452,isFromAdapter:_0x48492e,isResolvable:_0x539e81,isSubmitted:_0x241b5f}){if('string'!=typeof _0x277878)throw new _0x3a2103('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x277878});if(this['hasCommentThread'](_0x277878))throw new _0x3a2103('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x277878});const _0x3ff484=new ri(this,{'channelId':_0x3db338,'id':_0x277878,'context':_0x4b7c39,'attributes':_0x593452,'unlinkedAt':_0x557443,'resolvedAt':_0x786550,'resolvedBy':_0x1a8771?this['context']['plugins']['get'](_0xd67d2e)['getUser'](_0x1a8771):null,'isResolvable':_0x539e81,'isSubmitted':_0x241b5f||_0x48492e});this['_threads']['set'](_0x277878,_0x3ff484);for(const _0x3b2160 of _0x3f6cd8)_0x3ff484['_add'](this['_createNewComment']({'threadId':_0x277878,..._0x3b2160}));return _0xf7b4a3&&_0x3ff484['attachTo'](_0xf7b4a3),_0x48492e||!_0x3ff484['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3db338,'threadId':_0x277878});}_submitCommentThread({channelId:_0x805b2a,threadId:_0x1e8241}){if(!this['hasCommentThread'](_0x1e8241))throw new _0x3a2103('commentsrepository-missing-comment-thread',this);const _0x30b012=this['getCommentThread'](_0x1e8241);if(_0x30b012['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xb14ce6,comments:_0x106977,resolvedAt:_0x46892b,resolvedBy:_0x2d899a,context:_0x3e9e63,attributes:_0x6df7e4}=_0x30b012,_0x1ec3b0=this['context']['plugins']['get']('PendingActions'),_0x250918=_0x1ec3b0['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x805b2a,'threadId':_0xb14ce6,'comments':_0x106977['map'](_0x417473=>_0x417473['toJSON']()),'resolvedAt':_0x46892b,'resolvedBy':_0x2d899a?_0x2d899a['id']:_0x2d899a,'context':_0x3e9e63,'attributes':_0x6df7e4})['then'](({comments:_0x3185f2})=>{_0x1ec3b0['remove'](_0x250918);for(const _0x32cfee of _0x3185f2)this['_updateComment']({'channelId':_0x805b2a,'threadId':_0x1e8241,'commentId':_0x32cfee['commentId'],'createdAt':_0x32cfee['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3ad39b=>{throw console['error'](_0x3ad39b),new _0x3a2103('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0xfbb849,target:_0x2f2c97}){const _0x3da4a6=this['getCommentThread'](_0xfbb849);if(!_0x3da4a6)throw new _0x3a2103('commentsrepository-attach-missing-comment-thread',this);const _0x14b78e=this['context']['plugins']['get']('PendingActions'),_0x411a35=this['context']['plugins']['get'](ti),_0x4f3bb0=this['_createCommentThreadView'](_0x3da4a6),_0xbdc27=new bt(_0x3da4a6,_0x4f3bb0);let _0x2c4abe=null;_0x4f3bb0['on']('change:isDirty',(_0x46015b,_0x5f2aeb,_0x2dfb35)=>{_0x2dfb35?_0x2c4abe=_0x14b78e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2c4abe&&(_0x14b78e['remove'](_0x2c4abe),_0x2c4abe=null);}),this['_threadToController']['set'](_0x3da4a6,_0xbdc27),this['_viewToController']['set'](_0x4f3bb0,_0xbdc27);const _0x5a2a16=new qt(this['context']['locale'],_0x4f3bb0);_0x5a2a16['bind']('length')['to'](_0x4f3bb0),_0x5a2a16['bind']('isDirty')['to'](_0x4f3bb0,'isDirty',_0x4f3bb0,'length',(_0x1cb9ee,_0x2e5542)=>_0x1cb9ee||!_0x2e5542),_0x5a2a16['bind']('isActive')['to'](_0x4f3bb0),_0x5a2a16['type']='comment';const _0x54c178=new $t({'view':_0x5a2a16,'target':_0x2f2c97,'type':'comment','isVisible':!_0x3da4a6['archivedAt']&&!!('function'==typeof _0x2f2c97?_0x2f2c97():_0x2f2c97)});return _0x4f3bb0['on']('escape',()=>{_0x54c178['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4f3bb0,_0x54c178),_0x411a35['add'](_0x54c178),_0x54c178;}_bindAnnotationToEditors(_0x5e1fd1,_0x42f2cb){this['listenTo'](_0x5e1fd1,'editorReady',(_0x2acb26,_0x4c41ca)=>{const _0x524a7a=_0x4c41ca['ui']['view']['body']['bodyCollectionContainer'];_0x42f2cb['focusableElements']['add'](_0x524a7a),this['context']instanceof _0x1ee667&&this['context']['ui']['focusTracker']['add'](_0x524a7a);},{'priority':'highest'}),this['listenTo'](_0x5e1fd1,'editorDestroyed',(_0x554036,_0x3bf9f)=>{const _0xaedeb7=_0x3bf9f['ui']['view']['body']['bodyCollectionContainer'];_0x42f2cb['focusableElements']['has'](_0xaedeb7)&&_0x42f2cb['focusableElements']['remove'](_0xaedeb7),this['context']instanceof _0x1ee667&&this['context']['ui']['focusTracker']['remove'](_0xaedeb7);});}_unbindEditors(_0x55811f){this['stopListening'](_0x55811f,'editorReady'),this['stopListening'](_0x55811f,'editorDestroyed');}_createCommentThreadView(_0x59b272){const _0x5d988d=this['context']['plugins']['get'](_0xd67d2e),{config:_0x584038,locale:_0x104bb8}=this['context'],_0x4a9a1a=_0x27b0bf(_0x584038['get']('locale'),_0x104bb8);return new(0x0,(_0x584038['get']('comments'))['CommentThreadView'])(_0x104bb8,_0x59b272,_0x5d988d['me'],{'editorConfig':{..._0x584038['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x584038['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x584038['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x584038['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x584038['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4a9a1a,'CommentView':_0x584038['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0xecd548,channelId:_0x10d880,resolvedAt:_0x24c806,resolvedBy:_0x3dc455,isFromAdapter:_0xcf2bfe}){if(!this['hasCommentThread'](_0xecd548))throw new _0x3a2103('commentsrepository-missing-comment-thread',null,{'threadId':_0xecd548});const _0x4e0315=this['getCommentThread'](_0xecd548);if(_0x4e0315['isResolved'])throw new _0x3a2103('commentsrepository-resolved-comment-thread',null,{'threadId':_0xecd548});const _0x4a178b=this['context']['plugins']['get'](_0xd67d2e);if(_0x4e0315['resolvedBy']=_0x4a178b['getUser'](_0x3dc455),_0x4e0315['resolvedAt']=_0x24c806,_0xcf2bfe||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5daf13=this['context']['plugins']['get']('PendingActions'),_0x43386c=_0x5daf13['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x10d880,'threadId':_0xecd548})['then'](({resolvedAt:_0x496e91,resolvedBy:_0x2e24d1})=>{_0x5daf13['remove'](_0x43386c),_0x4e0315['resolvedBy']['id']!==_0x2e24d1&&(_0x4e0315['resolvedBy']=_0x4a178b['getUser'](_0x2e24d1)),_0x4e0315['resolvedAt']=_0x496e91;})['catch'](_0x54951e=>{throw console['error'](_0x54951e),new _0x3a2103('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x9fab14,channelId:_0x4ceed0,isFromAdapter:_0x37d5d5}){if(!this['hasCommentThread'](_0x9fab14))throw new _0x3a2103('commentsrepository-missing-comment-thread',null,{'threadId':_0x9fab14});const _0x184695=this['getCommentThread'](_0x9fab14);if(!_0x184695['isResolved'])throw new _0x3a2103('commentsrepository-reopen-comment-thread',null,{'threadId':_0x9fab14});if(_0x184695['resolvedBy']=null,_0x184695['resolvedAt']=null,_0x37d5d5||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x55d3e0=this['context']['plugins']['get']('PendingActions'),_0x5349bc=_0x55d3e0['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4ceed0,'threadId':_0x9fab14})['then'](()=>_0x55d3e0['remove'](_0x5349bc))['catch'](_0x24d557=>{throw console['error'](_0x24d557),new _0x3a2103('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x587faa,isFromAdapter:_0xc379e}){const _0x184d62=this['getCommentThread'](_0x587faa);if(!_0x184d62)throw new _0x3a2103('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x587faa),this['_threads']['delete'](_0x587faa),!_0x184d62['isSubmitted']||_0xc379e||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x38ef6f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16dc66}=_0x184d62,_0x11fe3f=_0x38ef6f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x16dc66,'threadId':_0x587faa})['then'](()=>_0x38ef6f['remove'](_0x11fe3f))['catch'](_0x4091ea=>{throw console['error'](_0x4091ea),new _0x3a2103('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x5280f8,unlinkedAt:_0xfefe09,context:_0x5815d1,attributes:_0x34efd9,isFromAdapter:_0x2e1db6}){if('string'!=typeof _0x5280f8)throw new _0x3a2103('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5280f8});if(!this['hasCommentThread'](_0x5280f8))throw new _0x3a2103('commentsrepository-missing-comment-thread',null,{'threadId':_0x5280f8});const _0x5e1649=this['getCommentThread'](_0x5280f8);let _0x531a48=!0x1;if(void 0x0!==_0x5815d1&&_0x5e1649['context']!==_0x5815d1&&(_0x5e1649['context']=_0x5815d1,_0x531a48=!0x0),void 0x0!==_0xfefe09&&_0x5e1649['unlinkedAt']!==_0xfefe09&&(_0x5e1649['unlinkedAt']=_0xfefe09,_0x531a48=!0x0),_0x34efd9&&!_0x4d1d34(_0x34efd9,_0x5e1649['attributes'])&&(_0x5e1649['attributes']=_0x34efd9,_0x531a48=!0x0),!_0x531a48)return Promise['resolve']();if(!_0x5e1649['isSubmitted']||_0x2e1db6||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2445a0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x38cb12}=_0x5e1649,_0x4ed5a9=_0x2445a0['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x38cb12,'threadId':_0x5280f8,'context':_0x5815d1,'unlinkedAt':_0xfefe09,'attributes':_0x34efd9})['then'](()=>_0x2445a0['remove'](_0x4ed5a9))['catch'](_0xe771b7=>{throw console['error'](_0xe771b7),new _0x3a2103('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x42e3ec){const _0x537fc1=this['context']['plugins']['get'](ti),_0x2290d5=this['getCommentThread'](_0x42e3ec);if(_0x2290d5['_isAttached']=!0x1,this['_threadToController']['has'](_0x2290d5)){const _0x5f4f66=this['_threadToController']['get'](_0x2290d5),_0x92014f=_0x5f4f66['view'],_0x568d1c=_0x537fc1['getByInnerView'](_0x92014f);this['_threadToController']['delete'](_0x2290d5),this['_viewToController']['delete'](_0x92014f),_0x568d1c&&_0x537fc1['remove'](_0x568d1c),_0x5f4f66['destroy'](),_0x92014f['destroy']()['then'](()=>{this['_unbindEditors'](_0x92014f);});}}_updateActiveAnnotation({threadId:_0x3d06af,resolvedAt:_0x32ba9b,unlinkedAt:_0x2fdc85}){const _0xb5477d=!!_0x32ba9b,_0x3bcfc8=this['context']['plugins']['get'](ti),_0x516535=this['getCommentThread'](_0x3d06af);if(this['_threadToController']['has'](_0x516535)){const _0x3c6f6b=this['_threadToController']['get'](_0x516535)['view'],_0x3ab5d6=_0x3bcfc8['getByInnerView'](_0x3c6f6b);_0x3ab5d6&&(_0xb5477d&&_0x3bcfc8['_removeActiveAnnotation'](_0x3ab5d6),_0x2fdc85?_0x3ab5d6['isVisible']=!0x1:_0x3ab5d6['refreshVisibility']());}}_getExternalAuthor(_0x519d23){const _0x52bfc1=this['context']['plugins']['get'](_0xd67d2e),_0x3f945d=_0x5afde6('external:'+_0x519d23),_0x4e0f0a=_0x52bfc1['getUser'](_0x3f945d);return _0x4e0f0a||_0x52bfc1['addUser']({'id':_0x3f945d,'name':_0x519d23});}_createNewComment({threadId:_0xb0dfc3,commentId:_0x239136=_0x2a19ec(),content:_0x39d167,authorId:_0x329aaa,createdAt:_0x5cfb73,attributes:_0xd01206}){if('string'!=typeof _0x239136)throw new _0x3a2103('commentsrepository-invalid-commentid');if('string'!=typeof _0x329aaa)throw new _0x3a2103('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x39d167||!_0x39d167['trim']())throw new _0x3a2103('commentsrepository-invalid-comment-content');const _0x4ca1bb=this['context']['plugins']['get'](_0xd67d2e)['getUser'](_0x329aaa);if(!_0x4ca1bb)throw new _0x3a2103('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x329aaa});let _0x313790=null,_0x8a21fc=_0x5cfb73;return _0xd01206?.['@external']&&(_0x313790=this['_getExternalAuthor'](_0xd01206['@external']['authorName']),_0x8a21fc=new Date(_0xd01206['@external']['createdAt'])),new hi(this,{'threadId':_0xb0dfc3,'id':_0x239136,'author':_0x313790||_0x4ca1bb,'creator':_0x4ca1bb,'content':_0x39d167,'createdAt':_0x5cfb73,'authoredAt':_0x8a21fc,'attributes':_0xd01206});}_addComment(_0x4e0e29){let {threadId:_0x4fdcd9,content:_0x5e7615,attributes:_0x2553a9,isFromAdapter:_0x5d18a9}=_0x4e0e29;const _0x5b7343=this['getCommentThread'](_0x4e0e29['threadId']);if(!_0x5b7343)throw new _0x3a2103('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xb94691=this['_createNewComment'](_0x4e0e29),{id:_0xa7a810}=_0xb94691;if(_0x5b7343['_add'](_0xb94691),_0x5d18a9||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5b7343['isSubmitted'])return Promise['resolve']();const _0x2efb91=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1b5552}=_0x5b7343,_0x716ea6=_0x2efb91['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2553a9||(_0x2553a9={}),this['adapter']['addComment']({'channelId':_0x1b5552,'threadId':_0x4fdcd9,'commentId':_0xa7a810,'content':_0x5e7615,'attributes':_0x2553a9})['then'](_0x1c2b82=>{_0x2efb91['remove'](_0x716ea6),_0x1c2b82&&this['_updateComment']({'channelId':_0x1b5552,'threadId':_0x4fdcd9,'commentId':_0xa7a810,'createdAt':_0x1c2b82['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1bb35f=>{throw console['error'](_0x1bb35f),new _0x3a2103('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x2c790b,commentId:_0x59e82d,content:_0x56cded,createdAt:_0x203381,attributes:_0x45bd49,isFromAdapter:_0x37418b}){if(void 0x0!==_0x56cded&&('string'!=typeof _0x56cded||!_0x56cded['trim']()['length']))throw new _0x3a2103('commentsrepository-update-comment-invalid-content');const _0x25abd8=this['getCommentThread'](_0x2c790b),_0x2c8976=_0x25abd8['getComment'](_0x59e82d);if(!_0x2c8976)throw new _0x3a2103('commentsrepository-update-missing-comment',this);let _0x4453d7=!0x1;if(_0x56cded&&_0x56cded!==_0x2c8976['content']&&(_0x2c8976['isEditable']||_0x37418b)&&(_0x2c8976['content']=_0x56cded,_0x4453d7=!0x0),_0x203381&&_0x203381!==_0x2c8976['createdAt']&&(_0x2c8976['createdAt']=_0x203381,_0x2c8976['isExternal']||(_0x2c8976['authoredAt']=_0x203381),_0x4453d7=!0x0),_0x45bd49&&!_0x4d1d34(_0x45bd49,_0x2c8976['attributes'])&&(_0x2c8976['attributes']=_0x45bd49,_0x4453d7=!0x0),!_0x4453d7)return Promise['resolve']();if(_0x25abd8['fire']('commentUpdated'),_0x37418b||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x7c27dc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2789ab}=this['getCommentThread'](_0x2c8976['threadId']),_0x5b301b=_0x7c27dc['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2789ab,'threadId':_0x2c790b,'commentId':_0x59e82d,'content':_0x56cded,'attributes':_0x45bd49})['then'](()=>_0x7c27dc['remove'](_0x5b301b))['catch'](_0x58af3d=>{throw console['error'](_0x58af3d),new _0x3a2103('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x51b3e4,commentId:_0x521701,isFromAdapter:_0x7a917b}){const _0x461312=this['getCommentThread'](_0x51b3e4),_0x4f6431=_0x461312['getComment'](_0x521701);if(!_0x4f6431)throw new _0x3a2103('commentsrepository-remove-missing-comment',this);if(_0x461312['_remove'](_0x4f6431),_0x7a917b||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x15db0c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1045ae}=_0x461312,_0x24eddb=_0x15db0c['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1045ae,'threadId':_0x51b3e4,'commentId':_0x521701})['then'](()=>_0x15db0c['remove'](_0x24eddb))['catch'](_0x13f355=>{throw console['error'](_0x13f355),new _0x3a2103('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0xf66d6c,_0xa375dd){super();const _0x194b4e=_0xa375dd['isResolvable'];this['channelId']=_0xa375dd['channelId'],this['id']=_0xa375dd['id'],this['comments']=new _0x5391c7(),this['_repository']=_0xf66d6c,this['_isAttached']=!0x1,this['_isSubmitted']=_0xa375dd['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0xf66d6c,'_permissions',_0xf66d6c,'_readOnlyChannels',()=>_0xf66d6c['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0xf66d6c,'_permissions',()=>_0xf66d6c['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0xf66d6c,'_permissions',()=>{const _0xba2c11=_0xf66d6c['getPermissions'](this['channelId']);return _0xba2c11['write']||_0xba2c11['admin'];}),this['bind']('isResolvable')['to'](_0xf66d6c,'_permissions',()=>_0x194b4e&&_0xf66d6c['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xa375dd['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1ddf49,_0x3fb5c1)=>_0x1ddf49?_0x3fb5c1?_0x1ddf49<_0x3fb5c1?_0x1ddf49:_0x3fb5c1:_0x1ddf49:_0x3fb5c1),this['set']('unlinkedAt',_0xa375dd['unlinkedAt']||null),this['set']('resolvedAt',_0xa375dd['resolvedAt']||null),this['set']('resolvedBy',_0xa375dd['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x2c1388=>!!_0x2c1388),this['set']('attributes',_0xa375dd['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x45fffe,_0x3a1ecf)=>_0x45fffe+_0x3a1ecf['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x5a9208,id:_0x189890}=this;this['_repository']['fire'](ai('submitCommentThread',_0x5a9208),{'channelId':_0x5a9208,'threadId':_0x189890});}setUnlinkedAt(_0x33222d){this['_update']({'unlinkedAt':_0x33222d});}['resolve']({resolvedAt:_0x490b35=new Date(),resolvedBy:_0x1a2773='',isFromAdapter:_0x530733=!0x1}={}){const _0x473d5a=this['_repository']['context']['plugins']['get'](_0xd67d2e)['me'],{channelId:_0x1d64ea,id:_0x50365c}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x1d64ea),{'channelId':_0x1d64ea,'threadId':_0x50365c,'resolvedAt':_0x490b35,'resolvedBy':_0x1a2773||_0x473d5a['id'],'isFromAdapter':_0x530733});}['reopen']({isFromAdapter:_0x360124=!0x1}={}){const {channelId:_0x301c0e,id:_0x4517b5}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x301c0e),{'channelId':_0x301c0e,'threadId':_0x4517b5,'isFromAdapter':_0x360124});}setContext(_0x45ca94){this['context']||this['_update']({'context':_0x45ca94});}setAttribute(_0x32d2b8,_0x1edb74){const _0x488b1c=_0x252241(this['attributes']);_0x53c6f0(_0x488b1c,_0x32d2b8,_0x1edb74),this['_update']({'attributes':_0x488b1c});}removeAttribute(_0x5779ed){const _0x498884=_0x252241(this['attributes']);_0x481a8f(_0x498884,_0x5779ed),this['_update']({'attributes':_0x498884});}['remove']({isFromAdapter:_0x545783=!0x1}={}){const {channelId:_0xfcc535,id:_0x502eea}=this;this['_repository']['fire'](ai('removeCommentThread',_0xfcc535),{'channelId':_0xfcc535,'threadId':_0x502eea,'isFromAdapter':_0x545783});}attachTo(_0x563c53){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x563c53});}addComment(_0x48e4a9){const {channelId:_0xbc0488,id:_0x507beb}=this;this['_repository']['fire'](ai('addComment',_0xbc0488,_0x507beb),Object['assign']({'channelId':_0xbc0488,'threadId':_0x507beb},_0x48e4a9));}getComment(_0x486623){if('string'!=typeof _0x486623)throw new _0x3a2103('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x486623});return this['comments']['get'](_0x486623);}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'](_0x40c20a=>_0x40c20a['toJSON']()),'attributes':this['attributes']};}['_add'](_0x353c78){return this['listenTo'](_0x353c78,'change:authoredAt',()=>{const _0x56bb56=this['_findOptimalIndex'](_0x353c78),_0x28f014=this['comments'];_0x56bb56-0x1!=_0x28f014['getIndex'](_0x353c78)&&_0x56bb56+0x1!=_0x28f014['getIndex'](_0x353c78)&&(this['_remove'](_0x353c78),this['_add'](_0x353c78));}),this['comments']['add'](_0x353c78,this['_findOptimalIndex'](_0x353c78));}_update(_0x147c15){const {channelId:_0x12b45f,id:_0x3164ba}=this;this['_repository']['fire'](ai('updateCommentThread',_0x12b45f),{..._0x147c15,'channelId':_0x12b45f,'threadId':_0x3164ba});}['_remove'](_0x53826c){return this['stopListening'](_0x53826c),_0x53826c['destroy'](),this['comments']['remove'](_0x53826c);}_findOptimalIndex(_0x32401c){const _0x124eeb=this['comments']['find'](_0x572838=>new Date(_0x572838['authoredAt'])['getTime']()>new Date(_0x32401c['authoredAt'])['getTime']());return _0x124eeb?this['comments']['getIndex'](_0x124eeb):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x12df57,_0x47572d){super();const _0x58bbce=_0x12df57['context']['plugins']['get'](_0xd67d2e)['me'],_0x4ebc3f=_0x12df57['getCommentThread'](_0x47572d['threadId']),_0x47a626=0x0===_0x4ebc3f['comments']['length'],_0x5a2e2f=_0x58bbce===_0x47572d['author'];this['id']=_0x47572d['id'],this['threadId']=_0x47572d['threadId'],this['author']=_0x47572d['author'],this['creator']=_0x47572d['creator'],this['set']('content',_0x47572d['content']),this['createdAt']=_0x47572d['createdAt']||new Date(),this['set']('authoredAt',_0x47572d['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4ebc3f,'resolvedAt'),this['set']('attributes',_0x47572d['attributes']||{}),this['bind']('isEditable')['to'](_0x12df57,'_permissions',()=>{const _0x3d1e76=_0x12df57['getPermissions'](_0x4ebc3f['channelId'])['write'],_0x231c0b=_0x12df57['getPermissions'](_0x4ebc3f['channelId'])['modifyAll'];return _0x5a2e2f&&_0x3d1e76||!_0x5a2e2f&&_0x231c0b;}),this['bind']('isRemovable')['to'](_0x4ebc3f,'isRemovable',_0x12df57,'_permissions',_0x3acb33=>{const _0x43ee2c=_0x12df57['getPermissions'](_0x4ebc3f['channelId'])['write'],_0x3065f4=_0x12df57['getPermissions'](_0x4ebc3f['channelId'])['modifyAll'];return _0x5a2e2f&&_0x43ee2c||_0x3acb33&&_0x47a626||!_0x5a2e2f&&_0x3065f4&&!_0x47a626;}),this['bind']('isReadOnly')['to'](_0x4ebc3f,'isReadOnly'),this['_repository']=_0x12df57;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x144f66){const _0x1c690a=document['createElement']('div');return _0x1c690a['innerHTML']=_0x144f66,_0x1c690a['textContent']['length'];}(this['content']),0xc8);}update(_0x5b4444){const {threadId:_0xd74a49,id:_0x45091f}=this;if(!this['_repository']['hasCommentThread'](_0xd74a49))throw new _0x3a2103('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x210a1a}=this['_repository']['getCommentThread'](_0xd74a49);this['_repository']['fire'](ai('updateComment',_0x210a1a,_0xd74a49),{'channelId':_0x210a1a,'threadId':_0xd74a49,'commentId':_0x45091f,..._0x5b4444});}setAttribute(_0x262024,_0x1246bf){const _0x38c1a4=_0x252241(this['attributes']);_0x53c6f0(_0x38c1a4,_0x262024,_0x1246bf),this['update']({'attributes':_0x38c1a4});}removeAttribute(_0x2d19d2){const _0x1f7612=_0x252241(this['attributes']);_0x481a8f(_0x1f7612,_0x2d19d2),this['update']({'attributes':_0x1f7612});}['remove'](_0x2917e0={}){if(!_0x2917e0['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xf00bb2,id:_0x16e08c}=this;if(!this['_repository']['hasCommentThread'](_0xf00bb2))throw new _0x3a2103('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5eb4c6}=this['_repository']['getCommentThread'](_0xf00bb2);this['_repository']['fire'](ai('removeComment',_0x5eb4c6,_0xf00bb2),{'channelId':_0x5eb4c6,'threadId':_0xf00bb2,'commentId':_0x16e08c,..._0x2917e0});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x293650,..._0x11c2bb){for(const _0x47e58f of _0x11c2bb)void 0x0!==_0x47e58f&&(_0x293650+=':'+String(_0x47e58f));return _0x293650;}var ci=class extends _0x9a91{constructor(_0x29798e){super(_0x29798e),this['set']('hasContent',!0x1);}['refresh'](){const _0x38cc25=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xf538a9 of _0x38cc25['getRanges']())if(this['_hasContent'](_0xf538a9))return void(this['hasContent']=!0x0);}execute({threadId:_0x590f3a=_0x2a19ec(),ranges:_0x18fb46,comment:_0x11ceea}={}){const _0x3ec83f=this['editor']['model'],_0x2e929c=_0x18fb46??Array['from'](_0x3ec83f['document']['selection']['getRanges']()),_0x42e1a9=[];for(const _0x4e8e31 of _0x2e929c)this['_hasContent'](_0x4e8e31)&&_0x42e1a9['push'](this['_trimToContent'](_0x4e8e31));if(!_0x42e1a9['length'])throw new _0x3a2103('addcommentthreadcommand-incorrect-ranges',null);_0x11ceea&&this['_createCommentThread'](_0x590f3a,_0x11ceea),this['_createMarkersFromRanges'](_0x590f3a,_0x42e1a9,!!_0x11ceea);}_createMarkersFromRanges(_0x594413,_0x8862dd,_0x1d1b79){this['editor']['model']['change'](_0x3cab6d=>{for(const _0x4f1e63 of _0x8862dd){const _0x237342='comment:'+_0x594413+':'+_0x2a19ec()['substr'](0x1,0x5);_0x3cab6d['addMarker'](_0x237342,{'range':_0x4f1e63,'usingOperation':_0x1d1b79,'affectsData':_0x1d1b79});}});}_createCommentThread(_0x211812,_0x5a3ee7){const _0x11efac=this['editor']['plugins']['get']('CommentsRepository'),_0x188dbf=this['editor']['config']['get']('collaboration.channelId'),_0x3509b0=this['editor']['plugins']['get']('Users')['me'];if(!_0x3509b0)throw new _0x3a2103('addcommentthreadcommand-user-not-found',null);_0x11efac['addCommentThread']({'threadId':_0x211812,'channelId':_0x188dbf,'comments':[{'authorId':_0x3509b0['id'],'content':_0x5a3ee7,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x79e65e){for(const _0x36c720 of _0x79e65e['getItems']())if(this['_itemIsContent'](_0x36c720))return!0x0;return!0x1;}_itemIsContent(_0x3ae74e){return _0x3ae74e['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3ae74e)&&!_0x3ae74e['is']('element','tableCell');}_trimToContent(_0x206561){const _0x561467=_0x78a274=>!this['_itemIsContent'](_0x78a274['item']),_0x4d2088=_0x206561['start']['getLastMatchingPosition'](_0x561467),_0x5e87ea=_0x206561['end']['getLastMatchingPosition'](_0x561467,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4d2088,_0x5e87ea);}},di=class extends _0x4e5c7f{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47bd78){super(_0x47bd78),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x3b9865=this['editor'],_0x3c91b6=_0x3b9865['model']['document']['selection'],_0x3ac701=_0xbb2184(()=>this['refreshSelectedViews'](),0xa);_0x3c91b6['on']('change:range',(_0x315d32,_0x32c28d)=>{_0x32c28d['directChange']&&(_0x3ac701['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3b9865['editing']['view']['document'],'change:isFocused',(_0x22858b,_0x147e73,_0x108946)=>{_0x108946&&_0x3ac701();}),this['listenTo'](_0x3b9865['ui']['focusTracker'],'change:isFocused',(_0x25decb,_0x2045be,_0x194164)=>{_0x194164||this['fire']('blur',{'isAnnotationTracked':_0x354ed0=>this['_editorAnnotationsData']['has'](_0x354ed0['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x11025d){if(this['_editorAnnotations']['has'](_0x11025d['view']))return;this['_editorAnnotations']['add'](_0x11025d['view']),this['editor']['ui']['focusTracker']['add'](_0x11025d['view']['element']);const _0x3c1535=this['editor']['plugins']['get'](ti);this['listenTo'](_0x3c1535['collection'],'remove',(_0x10bc96,_0x16cc97)=>{this['editor']['ui']['focusTracker']['remove'](_0x16cc97['view']['element']),this['_editorAnnotations']['delete'](_0x16cc97['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x4f5c74){if('function'!=typeof _0x4f5c74)throw new _0x3a2103('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4f5c74);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x308bbf,annotations:_0x4c820b}){const _0x530f44=[],_0x15e8c7=this['editor']['model']['document']['selection'],_0x2816e6=Array['from'](_0x15e8c7['getRanges']());for(const [_0x478ae6,_0x2a07b8]of this['_editorAnnotationsData']){const _0x3fcbd1=_0x82c027(_0x2a07b8),_0x3c752c=_0x4c820b['getByInnerView'](_0x478ae6);_0x3fcbd1&&_0x3c752c&&_0x530f44['push']({'annotation':_0x3c752c,'range':_0x3fcbd1});}function _0x82c027(_0x116df0){for(const _0x46c007 of _0x116df0)for(const _0x13860a of _0x2816e6)if(_0x46c007['containsRange'](_0x13860a,!_0x15e8c7['isCollapsed']))return _0x46c007;return null;}return _0x530f44['sort']((_0x1b19a7,_0x38d570)=>{const _0x2b1f59=_0x1b19a7['range'],_0x447573=_0x38d570['range'];if(!_0x2b1f59['isEqual'](_0x447573)){if(_0x2b1f59['containsRange'](_0x447573,!0x0))return 0x1;if(_0x447573['containsRange'](_0x2b1f59,!0x0))return-0x1;}return _0x1b19a7['annotation']==_0x308bbf?-0x1:_0x38d570['annotation']==_0x308bbf?0x1:0x0;})['map'](_0xdd4785=>_0xdd4785['annotation']);}get _editorAnnotationsData(){const _0x2ccc40=new Map();for(const _0x265e81 of Array['from'](this['_dataCollectors']))for(const [_0x57d33e,_0x5584c1]of _0x265e81())_0x2ccc40['set'](_0x57d33e,_0x5584c1);return _0x2ccc40;}},li=class extends _0x4e5c7f{afterInit(){const _0x26b30a=this['editor'];_0x26b30a['plugins']['has']('RestrictedEditingModeEditing')&&_0x26b30a['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x4e5c7f{constructor(_0x3a3947){super(_0x3a3947),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x45a858=this['editor'],_0x1c5a7c=_0x45a858['commands']['get']('importWord'),_0x23ae45=_0x45a858['plugins']['get'](_0xd67d2e);_0x1c5a7c&&(_0x1c5a7c['on']('execute',(_0x1ca9a8,[,_0x38422f])=>{_0x38422f['collaboration_features']={'comments':!0x0,'user_id':_0x23ae45['me']['id']};},{'priority':_0x20645b['high']+0xa}),this['listenTo'](_0x1c5a7c,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x31858a,_0x2c9686){const {comment_threads:_0x46593f}=_0x2c9686;_0x46593f&&_0x46593f['forEach'](({thread_id:_0x5f3e63,comments:_0x3caaaa,is_resolved:_0xcdc522})=>{const _0x56d8d1=new Date(),_0x5c56f7=_0x3caaaa['map'](({author:_0x4e9bf3,content:_0x230562,created_at:_0x26d2ef})=>({'content':_0x230562,'authorId':this['editor']['plugins']['get'](_0xd67d2e)['me']['id'],'createdAt':_0x56d8d1,'attributes':{'@external':{'authorName':_0x4e9bf3,'createdAt':_0x26d2ef?new Date(_0x26d2ef):new Date(),'source':'importWord'}}})),_0x18b957=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x18b957,'threadId':_0x5f3e63,'comments':_0x5c56f7,'resolvedAt':_0xcdc522?_0x56d8d1:null});});}},ui=class extends _0x4e5c7f{constructor(_0x2a7ec9){super(_0x2a7ec9),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0xc0c895=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0xc0c895,'contentInsertion',(_0x9d0cf,_0x171d04)=>this['_removeMarkersWithoutThreads'](_0x171d04['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x2c0b10){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2c0b10;const _0x450093=this['editor']['plugins']['get']('CommentsRepository');for(const _0x17b75d of _0x2c0b10['keys']()){const [_0x36bae1,_0x5a64f1]=_0x17b75d['split'](':');'comment'!=_0x36bae1||_0x450093['hasCommentThread'](_0x5a64f1)||_0x2c0b10['delete'](_0x17b75d);}return _0x2c0b10;}_registerMarkerInClipboardPipeline(){const _0x454765=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x106938=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x106938&&_0x454765['_registerMarkerToCopy']('comment',_0x106938);}_mapCommentsCopyConfigToRegisterConfiguration(_0x1c8ea5){switch(_0x1c8ea5){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x386063){const _0x4a9873=_0x386063['split'](':');return{'group':_0x4a9873[0x0],'id':_0x4a9873[0x1],'part':_0x4a9873[0x2]};}var pi=class extends _0x4e5c7f{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2fbc66,_0xd38f4b)=>{if(!_0xd38f4b['options']['showCommentHighlights'])return null;if(_0xd38f4b['options']['ignoreResolvedComments']){const {id:_0x549cba}=fi(_0x2fbc66['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x549cba)?.['isResolved']&&_0x2fbc66['item'])return _0xd38f4b['consumable']['consume'](_0x2fbc66['item'],'addMarker:'+_0x2fbc66['markerName']),_0xd38f4b['consumable']['consume'](_0x2fbc66['item'],'removeMarker:'+_0x2fbc66['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1ca679=>{_0x1ca679['on']('addMarker:comment',(_0x58f993,_0x2f2d4b,_0x17dafe)=>{if(!_0x17dafe['options']['showCommentHighlights'])return;const _0x45cd7c=_0x2f2d4b['item'];if(!_0x45cd7c)return;const _0x27b00c=_0x17dafe['mapper']['toViewElement'](_0x45cd7c);this['editor']['model']['schema']['isObject'](_0x45cd7c)&&_0x27b00c&&!_0x27b00c['getCustomProperty']('widget')&&_0x27b00c['is']('containerElement')&&Ct(_0x27b00c,_0x17dafe['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x32bd6b,{writer:_0x18c8b7,options:_0x493821})=>{if(!_0x493821['showCommentHighlights'])return null;const _0x30071d=_0x18c8b7['createContainerElement']('div'),_0xcd7705=_0x18c8b7['createEmptyElement']('hr');return _0x18c8b7['addClass']('ck-horizontal-line',_0x30071d),_0x18c8b7['insert'](_0x18c8b7['createPositionAt'](_0x30071d,0x0),_0xcd7705),_0x30071d;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x6ac948,{writer:_0x5636e9,options:_0x9adcf})=>{if(!_0x9adcf['showCommentHighlights'])return null;const _0x4eb526=_0x5636e9['createContainerElement']('span'),_0x4670bc=_0x5636e9['createEmptyElement']('img');return _0x5636e9['addClass']('image-inline',_0x4eb526),_0x5636e9['insert'](_0x5636e9['createPositionAt'](_0x4eb526,0x0),_0x4670bc),_0x4eb526;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x56cc37,{writer:_0x15685a,options:_0x31fd61})=>{if(_0x31fd61['showCommentHighlights'])return _0x15685a['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1a154d,_0x13cb80,_0x372a65)=>{_0x372a65['options']['showCommentHighlights']&&_0x1a154d['stop']();},{'priority':'high'});}},wi=class extends _0x4e5c7f{static get requires(){return[oi,di,_0xd67d2e,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7154c2){super(_0x7154c2),this['set']('isThreadsLoadingPaused',!0x0),_0x7154c2['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xb0127c,_0x2dcfae,_0x1e5bc9,_0x1ee051)=>{const _0x8a0b70=_0x7154c2['plugins']['get'](oi),_0x1f64de=_0x1e5bc9?fi(_0x1e5bc9)['id']:null;_0x7154c2['model']['change'](()=>{if(_0x1f64de){const _0x45908d=this['getAllMarkersForId'](_0x1f64de);for(const _0x55cec6 of _0x45908d)_0x7154c2['editing']['reconvertMarker'](_0x55cec6);}if(_0x1ee051){const {id:_0x4fad55}=fi(_0x1ee051),_0x1da711=_0x8a0b70['getCommentThread'](_0x4fad55);if(_0x1da711&&_0x1da711['unlinkedAt'])return;if(_0x1da711&&!_0x1da711['isAttached'])return;const _0x5d1438=this['getAllMarkersForId'](_0x4fad55);for(const _0x30032d of _0x5d1438)_0x7154c2['editing']['reconvertMarker'](_0x30032d);}}),_0x1f64de&&this['scrollToThreadMarker'](_0x1f64de);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x33a914=this['editor'],_0x4ae397=_0x33a914['plugins']['get'](oi),_0xe3719c=_0x33a914['config']['get']('collaboration.channelId'),_0x1b96ac=_0x4ae397['getCommentThreads']()['filter'](_0x2d7ca7=>_0x2d7ca7['channelId']!==_0xe3719c);_0x33a914['commands']['add']('addCommentThread',new ci(_0x33a914)),this['listenTo'](_0x33a914,'change:isReadOnly',(_0x4b97d3,_0x566ad2,_0x8e633b)=>{_0x4ae397['switchReadOnly'](_0x8e633b,_0x33a914['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4ae397,gi('addCommentThread',_0xe3719c),(_0x4d9ffc,{threadId:_0x2ec332})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2ec332)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2ec332);}),this['listenTo'](_0x4ae397,gi('removeCommentThread',_0xe3719c),(_0x2e82aa,{threadId:_0xd0845c})=>{_0x33a914['model']['enqueueChange']({'isUndoable':!0x1},_0x3eac62=>{const _0x2a0b7e=this['getAllMarkersForId'](_0xd0845c);for(const _0x47a746 of _0x2a0b7e)_0x3eac62['removeMarker'](_0x47a746);});}),this['listenTo'](_0x4ae397,gi('resolveCommentThread',_0xe3719c),(_0x58616d,{threadId:_0x2e491c})=>{this['_reconvertMarkers'](_0x2e491c);const _0x17c78d=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x17c78d['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2e491c)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4ae397,gi('reopenCommentThread',_0xe3719c),(_0x4dfec9,{threadId:_0x39ee3c})=>{this['_reconvertMarkers'](_0x39ee3c);},{'priority':'low'}),this['listenTo'](_0x4ae397,gi('addComment',_0xe3719c),(_0x51447d,{threadId:_0x5eaf52,isFromAdapter:_0x1fa854})=>{const _0x21be41=this['getAllMarkersForId'](_0x5eaf52);!_0x1fa854&&0x0!=_0x21be41['length']&&_0x4ae397['hasCommentThread'](_0x5eaf52)&&0x1===_0x4ae397['getCommentThread'](_0x5eaf52)['length']&&_0x33a914['model']['enqueueChange']({'isUndoable':!0x1},_0x115daa=>{for(const _0x19e294 of _0x21be41)_0x115daa['updateMarker'](_0x19e294,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1b96ac);}afterInit(){!async function(_0x512bc9){const _0x4360af='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x4a2df5=0x791b8,_0x354a18=window['Date']['now'](),_0x1f2a29=_0x512bc9['editor'],_0x54dca1=new window['Promise'](_0x201955=>{_0x1f2a29['once']('ready',_0x201955);}),_0x4dd04c={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x44868b=_0x1f2a29['config']['get']('licenseKey');async function _0x66b319(){let _0x30a414,_0x345ac1=null,_0x589c30=null;try{return'GPL'==_0x44868b?'NotAllowed':(_0x30a414=_0x253a18(),_0x30a414?(_0x30a414['usageEndpoint']&&(_0x589c30=_0x56702e(_0x30a414['usageEndpoint'],_0x30a414['jti'])),await _0x596a84()?_0x2e9c4c()?_0x410084()?'Expired':_0x198008()?('evaluation'==_0x30a414['licenseType']&&(_0x345ac1=_0x50cda9('EvaluationLimit')),await _0x1816c6()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x410084(){const _0x51da61=['evaluation','trial']['includes'](_0x30a414['licenseType'])?_0x354a18/0x3e8:0xe10*_0x4a2df5;return _0x30a414['exp']<_0x51da61;}function _0x2e9c4c(){const _0x4d5a3c=_0x30a414['features'];if(!_0x4d5a3c)return!0x1;if(_0x4d5a3c['includes']('*'))return!0x0;if(_0x4d5a3c['includes']('CMT'))return!0x0;if(_0x4d5a3c['includes']('TRILIUM')&&_0x3de604())return!0x0;if(_0x4d5a3c['includes']('RCMT')){if(_0x396ddf())return!0x0;if(_0x1f779e()||_0x1efb2b())return!0x0;}return!0x1;}function _0x198008(){const _0x4c21c9=_0x30a414['licensedHosts'];if(!_0x4c21c9||0x0==_0x4c21c9['length'])return!0x0;const {hostname:_0x5c5e4d}=new URL(window['location']['href']);if(_0x4c21c9['includes'](_0x5c5e4d))return!0x0;const _0x2c955a=_0x5c5e4d['split']('.');return _0x4c21c9['filter'](_0x773a6f=>_0x773a6f['includes']('*'))['map'](_0x4d978c=>_0x4d978c['split']('.'))['filter'](_0x39c854=>_0x39c854['length']<=_0x2c955a['length'])['map'](_0x3cee42=>Array(_0x2c955a['length']-_0x3cee42['length'])['fill']('*'===_0x3cee42[0x0]?'*':'')['concat'](_0x3cee42))['some'](_0x480413=>_0x2c955a['every']((_0x1f5afe,_0x41b8fe)=>_0x480413[_0x41b8fe]===_0x1f5afe||'*'===_0x480413[_0x41b8fe]));}function _0x1816c6(){return _0x345ac1&&_0x589c30?new window['Promise']((_0x571ad6,_0x2ddde9)=>{_0x345ac1['then'](_0x571ad6,_0x2ddde9),_0x589c30['then'](_0x3d08d6=>{'Valid'!=_0x3d08d6&&_0x571ad6(_0x3d08d6);},_0x2ddde9);}):_0x345ac1||_0x589c30||'Valid';}}function _0x56702e(_0x47fbea,_0x3edc8f){return new window['Promise'](_0x209d78=>{if(_0x42bae6())return _0x209d78('Valid');_0x2fe7b8(),_0x1f2a29['decorate']('_sendUsageRequest');let _0x280b5c=!0x1;const _0x1a73c9=_0x2a19ec();function _0x1abc49(_0x311c5b){return!!_0x311c5b&&('object'==typeof _0x311c5b||'function'==typeof _0x311c5b)&&'function'==typeof _0x311c5b['then']&&'function'==typeof _0x311c5b['catch'];}function _0x58e6f0(_0x1d1afc){_0xaaaa66(_0x1d1afc)['then'](_0x37aeb7=>_0x37aeb7&&'ok'==_0x37aeb7['status']?_0xd1aa18(_0x150141(_0x1a73c9+_0x3edc8f))!=_0x37aeb7['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x481b16=>(_0x3b534e(),_0x481b16),()=>{const _0x5ba6be=_0xecb26e();return null==_0x5ba6be?(_0x3b534e(),'Valid'):_0x354a18-_0x5ba6be>0x240c8400?'UsageLimit':'Valid';})['then'](_0x209d78)['catch'](()=>{_0x209d78('UsageLimit');});const _0x555af2=0x36ee80;function _0x3b534e(){const _0xe00f5a='llct-'+_0xd1aa18(_0x150141(_0x47fbea)),_0x4f0172=_0x431be5(_0xd1aa18(window['Math']['ceil'](_0x354a18/_0x555af2)));window['localStorage']['setItem'](_0xe00f5a,_0x4f0172);}function _0xecb26e(){const _0x4d91ac='llct-'+_0xd1aa18(_0x150141(_0x47fbea)),_0x13692a=window['localStorage']['getItem'](_0x4d91ac);return _0x13692a?window['parseInt'](_0x431be5(_0x13692a),0x10)*_0x555af2:null;}function _0xaaaa66(_0x10d2e9){return new window['Promise']((_0x5329ab,_0xf6d046)=>{_0x10d2e9['then'](_0x5329ab,_0xf6d046),window['setTimeout'](_0xf6d046,0x1d4c0);});}}_0x1f2a29['on']('_sendUsageRequest',(_0x3d8a7f,_0x1af073)=>{if(_0x1af073[0x0]!=_0x47fbea)return _0x209d78('UsageLimit');_0x1af073[0x1]={..._0x1af073[0x1],'requestId':_0x1a73c9};},{'priority':'high'}),_0x1f2a29['on']('_sendUsageRequest',_0x2e905b=>{_0x1abc49(_0x2e905b['return'])&&(_0x280b5c=!0x0,_0x58e6f0(_0x2e905b['return']));},{'priority':'low'}),_0x54dca1['then'](()=>{_0x280b5c||_0x209d78('UsageLimit');});});function _0x42bae6(){return'auto'==_0x1f2a29['editing']['view']['_overlayModeHint'];}function _0x2fe7b8(){_0x1f2a29['editing']['view']['_overlayModeHint']='auto';}}function _0x50cda9(_0x5dc0c5){const _0x2a3526=[new window['Promise'](_0x551830=>setTimeout(_0x551830,0x93ecc)),_0x54dca1['then'](()=>new window['Promise'](_0x132765=>{let _0x508b9e=0x0;_0x1f2a29['model']['on']('applyOperation',(_0x1914f4,_0x46f062)=>{_0x46f062[0x0]['isDocumentOperation']&&_0x508b9e++,0x5e8==_0x508b9e&&(_0x132765(),_0x1914f4['off']());});}))];return window['Promise']['race'](_0x2a3526)['then'](()=>_0x5dc0c5);}async function _0x41677a(){await _0x54dca1,_0x1f2a29['model']['change']=_0xe65633,_0x1f2a29['model']['enqueueChange']=_0xe65633,_0x1f2a29['enableReadOnlyMode']('model');}function _0x3de604(){return window['glob']&&window['glob']['triliumVersion'];}function _0x396ddf(){return _0x2b2b1c('WebSocketGateway')&&'connected'==_0x274d0c('WebSocketGateway')['state'];}function _0x1f779e(){return _0x2b2b1c('RevisionViewerIntegration');}function _0x1efb2b(){return _0x2b2b1c('TrackChangesDataGetter');}function _0x1f849c(_0x5aa9c0){const _0x8303c8=_0x5c0ca5();_0x1f2a29[_0x8303c8]='commentsLicenseKey'+_0x5aa9c0,'Valid'!=_0x5aa9c0&&_0x41677a();}function _0x5c0ca5(){const _0x340909=window['String'](window['performance']['now']())['replace']('.','');let _0x1f0993='K';for(let _0x3c3d1d=0x0;_0x3c3d1d<_0x340909['length'];_0x3c3d1d+=0x2){let _0x39633e=window['parseInt'](_0x340909['substring'](_0x3c3d1d,_0x3c3d1d+0x2));_0x39633e>=0x3e&&(_0x39633e-=0x3e),_0x1f0993+=_0x4360af[_0x39633e];}return _0x1f0993;}function _0x253a18(){const _0x302766=_0x44868b['split']('.');if(0x3!=_0x302766['length'])return null;return _0x486369(_0x302766[0x1]);function _0x486369(_0x2d1fbe){const _0x18ffe7=_0x3fc46f(_0x2d1fbe);return _0x18ffe7&&_0x18c3ec()?_0x18ffe7:null;function _0x18c3ec(){const _0x47e1ff=_0x18ffe7['jti'],_0x50b724=window['parseInt'](_0x47e1ff['substring'](_0x47e1ff['length']-0x8),0x10),_0x17e06a={..._0x18ffe7,'jti':_0x47e1ff['substring'](0x0,_0x47e1ff['length']-0x8)};return delete _0x17e06a['vc'],_0x150141(_0x17e06a)==_0x50b724;}}}async function _0x596a84(){let _0x34dd6d=!0x0;try{const [_0x1c3f4b,_0x149a2b,_0x116c37]=_0x44868b['split']('.');return _0x45c26d(_0x1c3f4b),await _0x3cc71f(_0x1c3f4b,_0x149a2b,_0x116c37),_0x34dd6d;}catch{return!0x1;}function _0x45c26d(_0x3d1116){const _0x428c12=_0x3fc46f(_0x3d1116);_0x428c12&&'ES256'==_0x428c12['alg']||(_0x34dd6d=!0x1);}async function _0x3cc71f(_0x146212,_0x506ae6,_0xfe2ff4){const _0x41cc25=window['Uint8Array']['from'](_0x530eee(_0xfe2ff4),_0x15273e=>_0x15273e['charCodeAt'](0x0)),_0x31e642=new window['TextEncoder']()['encode'](_0x146212+'.'+_0x506ae6),_0x534368=window['crypto']['subtle'];if(!_0x534368)return;const _0xd346e=await _0x534368['importKey']('jwk',_0x4dd04c,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x534368['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0xd346e,_0x41cc25,_0x31e642)||(_0x34dd6d=!0x1);}}function _0x3fc46f(_0x2b24c1){return _0x2b24c1['startsWith']('ey')?JSON['parse'](_0x530eee(_0x2b24c1)):null;}function _0x530eee(_0x148083){return window['atob'](_0x148083['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x150141(_0x25f4f4){let _0x3f8990=0x1505;function _0x381f44(_0x10e404){for(let _0x36ab75=0x0;_0x36ab75<_0x10e404['length'];_0x36ab75++){const _0x361671=_0x10e404['charCodeAt'](_0x36ab75);_0x3f8990=(_0x3f8990<<0x5)+_0x3f8990+_0x361671,_0x3f8990&=_0x3f8990;}}function _0x25f764(_0x8a9272){Array['isArray'](_0x8a9272)?_0x8a9272['forEach'](_0x25f764):_0x8a9272&&'object'==typeof _0x8a9272?Object['entries'](_0x8a9272)['sort']()['forEach'](([_0x42a863,_0x2a0ccd])=>{_0x381f44(_0x42a863),_0x25f764(_0x2a0ccd);}):_0x381f44(window['String'](_0x8a9272));}return _0x25f764(_0x25f4f4),_0x3f8990>>>0x0;}function _0xd1aa18(_0x324bc7){return _0x324bc7['toString'](0x10)['padStart'](0x8,'0');}function _0x431be5(_0x6dbd1d){return _0x6dbd1d['split']('')['reverse']()['join']('');}function _0x2b2b1c(_0x1e1964){return _0x1f2a29['plugins']['has'](_0x1e1964);}function _0x274d0c(_0x53d42b){return _0x1f2a29['plugins']['get'](_0x53d42b);}function _0xe65633(){}_0x1f849c(await _0x66b319());}(this);}destroy(){const _0x3b88dc=this['editor']['plugins']['get'](oi),_0x664f41=this['editor']['config']['get']('collaboration.channelId');for(const _0x765c61 of _0x3b88dc['getCommentThreads']({'channelId':_0x664f41}))_0x3b88dc['_detachCommentThread'](_0x765c61['id']),_0x3b88dc['_threads']['delete'](_0x765c61['id']);super['destroy']();}['hasMarkerForId'](_0xcb11f3){return this['getAllMarkersForId'](_0xcb11f3)['length']>0x0;}getAllMarkersForId(_0x28757c){const _0x5c2748=[];for(const _0x2d75f3 of this['editor']['model']['markers'])_0x2d75f3['name']['startsWith']('comment:'+_0x28757c)&&_0x5c2748['push'](_0x2d75f3);return _0x5c2748;}['scrollToThreadMarker'](_0x587b84){setTimeout(()=>{const _0x3c2b12=this['_getTargetForId'](_0x587b84);_0x3c2b12&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x587b84&&_0xa4b2b7({'target':_0x3c2b12[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x3b00fb){this['editor']['model']['change'](()=>{for(const _0x76d071 of this['getAllMarkersForId'](_0x3b00fb))this['editor']['editing']['reconvertMarker'](_0x76d071);});}_attachArchivedThread(_0x41e4ec){const _0x556544=this['editor']['plugins']['get'](oi),_0x235550=this['editor']['plugins']['get'](di),_0x59e46a=_0x556544['getCommentThread'](_0x41e4ec);if(!_0x59e46a['isAttached']){const _0x48c3bb=_0x59e46a['attachTo'](()=>this['_getTargetForId'](_0x59e46a['id']));_0x235550['registerAnnotation'](_0x48c3bb),_0x59e46a['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x2bb31f=this['editor'],_0x425913=_0x2bb31f['plugins']['get'](_0xd67d2e);_0x2bb31f['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2b6b94,_0x353658)=>{const {id:_0x4778ef}=fi(_0x2b6b94['markerName']),_0x7ae148=_0x2bb31f['plugins']['get'](oi)['getCommentThread'](_0x4778ef),_0x3061d9=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4778ef;let _0x22e790;if(_0x7ae148&&_0x7ae148['isResolved']&&!_0x3061d9&&_0x2b6b94['item'])return _0x353658['consumable']['consume'](_0x2b6b94['item'],'addMarker:'+_0x2b6b94['markerName']),_0x353658['consumable']['consume'](_0x2b6b94['item'],'removeMarker:'+_0x2b6b94['markerName']),null;const _0x527942=['ck-comment-marker'];return _0x3061d9&&_0x527942['push']('ck-comment-marker--active'),_0x22e790=_0x7ae148?.['length']?_0x7ae148['comments']['first']['author']['id']:_0x425913['me']['id'],{'classes':_0x527942,'attributes':{'data-comment':_0x4778ef,'data-author-id':_0x22e790}};}}),_0x2bb31f['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x24f7ff,{options:_0x4629a7})=>{if(_0x4629a7['showCommentHighlights'])return null;const _0x1404fe=_0x2bb31f['plugins']['get'](oi),_0x17d55a=_0x2bb31f['model']['markers']['get'](_0x24f7ff),{id:_0x1f2dd6,part:_0x1f69d6}=fi(_0x24f7ff);return _0x17d55a&&!_0x17d55a['affectsData']||_0x4629a7['ignoreResolvedComments']&&_0x1404fe['getCommentThread'](_0x1f2dd6)?.['isResolved']?null:{'group':'comment','name':_0x1f69d6?_0x1f2dd6+':'+_0x1f69d6:_0x1f2dd6};}}),_0x2bb31f['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x309838,{writer:_0x1dd23f})=>_0x1dd23f['createElement']('$marker',{'data-name':'comment:'+_0x309838['getAttribute']('id')})}),_0x2bb31f['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x417152=this['editor'],_0x2ae50b=_0x417152['plugins']['get'](oi),_0x1b645d=new Set(),_0x4c5252=new Set();_0x417152['model']['document']['registerPostFixer'](_0x22ffea=>{let _0x2eb2e6=!0x1;for(const {name:_0x29bce0,data:_0x2a5d84}of _0x417152['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3a8602,id:_0xcf8aef}=fi(_0x29bce0);let _0x5ec290=_0x2a5d84['newRange'];if('comment'!==_0x3a8602||!_0x5ec290)continue;const _0x239fa3='$graveyard'===_0x5ec290['root']['rootName'];_0x239fa3||(_0x5ec290=_i(_0x5ec290,_0x417152['model']),!_0x5ec290||_0x5ec290['isCollapsed']||!_0x2a5d84['newRange']||_0x5ec290['isEqual'](_0x2a5d84['newRange']))?_0x417152['model']['hasContent'](_0x5ec290)&&!_0x239fa3?this['isThreadsLoadingPaused']?_0x1b645d['add'](_0x29bce0):this['_handleThreadMarker'](_0x29bce0,_0xcf8aef):(_0x4c5252['add'](_0x29bce0),_0x1b645d['delete'](_0x29bce0),_0x22ffea['removeMarker'](_0x29bce0),_0x2eb2e6=!0x0):(_0x22ffea['updateMarker'](_0x29bce0,{'range':_0x5ec290}),_0x2eb2e6=!0x0);}return _0x2eb2e6;}),this['on']('change:isThreadsLoadingPaused',(_0x15f584,_0x5cdbe8,_0x1fd56c)=>{if(!_0x1fd56c&&_0x1b645d['size'])for(const _0x1ea822 of _0x1b645d){const {id:_0x107ede}=fi(_0x1ea822);_0x1b645d['delete'](_0x1ea822),_0x417152['model']['markers']['get'](_0x1ea822)&&this['_handleThreadMarker'](_0x1ea822,_0x107ede);}}),this['listenTo'](_0x417152['model']['document'],'change',()=>{for(const {name:_0x571815,data:{newRange:_0x54be55}}of _0x417152['model']['document']['differ']['getChangedMarkers']()){const {group:_0x557594,id:_0x5b1794}=fi(_0x571815);if('comment'!==_0x557594)continue;const _0x1e561a=_0x2ae50b['getCommentThread'](_0x5b1794),_0x359192=this['hasMarkerForId'](_0x5b1794);_0x1e561a&&(!_0x1e561a['_hasTargetInContent']&&_0x54be55&&_0x417152['editing']['view']['once']('render',()=>{const _0x2fd139=_0x417152['plugins']['get'](ti),_0xb74614=_0x2ae50b['_threadToController']['get'](_0x1e561a)['view'];_0x2fd139['getByInnerView'](_0xb74614)['refreshVisibility']();},{'priority':'low'}),_0x1e561a['_hasTargetInContent']=_0x359192||!!_0x54be55),_0x54be55||(_0x4c5252['add'](_0x571815),_0x1b645d['delete'](_0x571815));}for(const _0x526c6d of _0x4c5252){const {id:_0x2bde1f}=fi(_0x526c6d),_0x212fd3=_0x2ae50b['getCommentThread'](_0x2bde1f);if(_0x1b645d['delete'](_0x526c6d),!_0x212fd3)continue;const _0x302d63=this['hasMarkerForId'](_0x2bde1f);_0x302d63||_0x212fd3['isSubmitted']?_0x302d63||_0x212fd3['unlinkedAt']||_0x212fd3['setUnlinkedAt'](new Date()):_0x212fd3['remove']();}_0x4c5252['clear']();});}_handleInitialThreads(_0x3c4fde){_0x3c4fde['forEach'](_0x4876a0=>{_0x4876a0['unlinkedAt']&&this['_attachArchivedThread'](_0x4876a0['id']);});}_getTargetForId(_0x42dbb8){const _0x5cf8f0=this['editor'],_0x144da6=this['getAllMarkersForId'](_0x42dbb8);return _0x219df1(_0x5cf8f0['editing'],_0x144da6);}_getTextContext(_0x1763bb){const _0x115869=this['getAllMarkersForId'](_0x1763bb);let _0x40e228='',_0x336bb9=!0x1;for(const _0x5a744b of _0x115869){const _0x305715=_0x5a744b['getRange']();for(const _0x552e26 of Array['from'](_0x305715['getItems']()))_0x552e26['is']('$textProxy')?(_0x40e228&&_0x336bb9&&(_0x40e228+='\x20',_0x336bb9=!0x1),_0x40e228+=_0x552e26['data']):_0x336bb9=!0x0;_0x336bb9=!0x0;}return _0x40e228['substring'](0x0,0x96);}_attachMarkerToThread(_0x2ca1ca,_0x59ef0d){const _0xb8e7f1=this['editor'],_0x1c14e4=_0xb8e7f1['plugins']['get'](oi);let _0x483067=_0x1c14e4['getCommentThread'](_0x59ef0d);const _0x5dc447=_0xb8e7f1['config']['get']('collaboration.channelId'),_0x457334=_0xb8e7f1['plugins']['get'](di);return _0x483067&&(_0x483067['unlinkedAt']&&_0x483067['setUnlinkedAt'](null),_0x483067['isAttached'])||(this['getAllMarkersForId'](_0x59ef0d)[0x0]['managedUsingOperations']?_0x1c14e4['fetchCommentThread']({'channelId':_0x5dc447,'threadId':_0x59ef0d})['then'](_0x32dad1=>{if('destroyed'!==_0xb8e7f1['state']){if(_0x483067=_0x32dad1,_0x483067&&!_0x483067['isAttached']){const _0x30a0ca=_0x483067['attachTo'](()=>this['_getTargetForId'](_0x59ef0d));_0x457334['registerAnnotation'](_0x30a0ca),_0x483067['isResolved']&&this['_reconvertMarkers'](_0x59ef0d);}else{if(!_0x483067){const _0x56b280=this['getAllMarkersForId'](_0x59ef0d);_0xb8e7f1['model']['change'](_0x4fcbb2=>{for(const _0x34f8fa of _0x56b280)_0x4fcbb2['removeMarker'](_0x34f8fa);});}}}}):_0xb8e7f1['editing']['view']['once']('render',()=>{if(_0x1c14e4['getCommentThread'](_0x59ef0d))return;const _0x4b2a95=_0xb8e7f1['plugins']['get'](ti);_0x483067=_0x1c14e4['openNewCommentThread']({'channelId':_0x5dc447,'threadId':_0x59ef0d,'target':()=>this['_getTargetForId'](_0x59ef0d),'context':{'type':'text','value':this['_getTextContext'](_0x59ef0d)}});const _0x39f785=_0x1c14e4['_threadToController']['get'](_0x483067)['view'],_0x5c4ba2=_0x4b2a95['getByInnerView'](_0x39f785);_0x5c4ba2&&_0x457334['registerAnnotation'](_0x5c4ba2);},{'priority':'low'})),_0x483067;}['_handleThreadMarker'](_0x251b29,_0x3b46fc){const _0x1744c0=this['_attachMarkerToThread'](_0x251b29,_0x3b46fc);_0x1744c0&&!_0x1744c0['context']&&_0x1744c0['setContext']({'type':'text','value':this['_getTextContext'](_0x3b46fc)});}_initAriaMarkerChangeAnnouncements(){const _0x329485=this['editor'];_0x5da32e(_0x329485['model'],({left:_0x268214,entered:_0x18489e})=>{for(const _0x24e809 of _0x268214)if(Ai(_0x24e809)){_0x329485['ui']['ariaLiveAnnouncer']['announce'](Et(_0x329485['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xbde323 of _0x18489e)if(Ai(_0xbde323)){_0x329485['ui']['ariaLiveAnnouncer']['announce'](Et(_0x329485['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x383d3a(_0x2e34f3)));break;}});}};function gi(_0x14c871,_0x38048a){return _0x38048a?_0x14c871+':'+_0x38048a:_0x14c871;}function _i(_0x114457,_0x2889ba){const _0x4e9033=_0x2889ba['schema'],_0x11b726=_0x2889ba['createRange'](_0x114457['start']);for(const _0x1c9afd of _0x114457['getWalker']()){const {type:_0x28c116,item:_0x223c9e,nextPosition:_0x408711}=_0x1c9afd;if('text'===_0x28c116||_0x4e9033['isObject'](_0x223c9e)){const _0x20a71f=_0x2889ba['createPositionBefore'](_0x223c9e);_0x11b726['isCollapsed']&&(_0x11b726['start']=_0x20a71f),_0x11b726['end']=_0x408711;}}return _0x11b726;}function Ai(_0x5940cf){return'comment'===fi(_0x5940cf['name'])['group'];}var vi=class extends _0x4e5c7f{['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 _0x3de72f=this['editor'],_0x4901d7=_0x3de72f['plugins']['get'](oi),_0x48338f=_0x3de72f['plugins']['get'](wi),_0x59915c=_0x3de72f['plugins']['get'](ti),_0x4d3ab1=_0x3de72f['plugins']['get'](di);_0x3de72f['ui']['componentFactory']['add']('comment',()=>{const _0x3784d4=this['_createUIButton'](_0x98026e);return _0x3784d4['tooltip']=!0x0,_0x3784d4;}),_0x3de72f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x4d3ab1['addSourceCollector'](()=>{const _0x7367ad=[];for(const [_0x19832f,_0x488dbd]of _0x4901d7['_threadToController']){const _0x2880f8=_0x48338f['getAllMarkersForId'](_0x19832f['id']),_0x11704d=_0x2880f8['map'](_0x529aa2=>_0x529aa2['getRange']());_0x2880f8['length']>0x0&&_0x7367ad['push']([_0x488dbd['view'],_0x11704d]);}return _0x7367ad;}),this['listenTo'](_0x59915c,'change:activeAnnotations',(_0x3d5825,_0x2947ad,_0x7ccb69)=>{const _0x35c575=Array['from'](_0x7ccb69)['map'](_0x3c4527=>_0x3c4527['innerView'])['find'](_0x416d87=>_0x4901d7['_viewToController']['has'](_0x416d87));if(!_0x35c575)return void(_0x48338f['activeMarker']=null);const _0x397cfe=_0x4901d7['_viewToController']['get'](_0x35c575)['model']['id'],_0x59510b='comment:'+_0x397cfe;_0x397cfe&&_0x48338f['hasMarkerForId'](_0x397cfe)?_0x48338f['activeMarker']=_0x59510b:_0x48338f['activeMarker']&&(_0x48338f['activeMarker']=null);}),this['listenTo'](_0x4901d7,'removeCommentThread',(_0x228bbc,{threadId:_0x49892e,isFromAdapter:_0x52f841})=>{!_0x52f841&&_0x3de72f['ui']['focusTracker']['isFocused']&&_0x48338f['hasMarkerForId'](_0x49892e)&&_0x3de72f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4901d7,'addComment',(_0x1e0318,{threadId:_0x3392de,isFromAdapter:_0x1bb97a})=>{!_0x1bb97a&&_0x48338f['hasMarkerForId'](_0x3392de)&&_0x4901d7['hasCommentThread'](_0x3392de)&&0x1===_0x4901d7['getCommentThread'](_0x3392de)['length']&&(_0x3de72f['editing']['view']['focus'](),_0x1e0318['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4154e1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3fc590;for(const _0x3f4177 in _0x4154e1){const _0x4d9013=_0x3f4177,_0x5b8763=_0x4154e1[_0x4d9013];if('commentsLicenseKeyValid'==_0x5b8763||'commentsLicenseKeyInvalid'==_0x5b8763||'commentsLicenseKeyExpired'==_0x5b8763||'commentsLicenseKeyDomainLimit'==_0x5b8763||'commentsLicenseKeyNotAllowed'==_0x5b8763||'commentsLicenseKeyEvaluationLimit'==_0x5b8763||'commentsLicenseKeyUsageLimit'==_0x5b8763){delete _0x4154e1[_0x4d9013],_0x3fc590=_0x5b8763,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3fc590&&_0x4154e1['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3fc590&&_0x4154e1['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3fc590&&_0x4154e1['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3fc590&&_0x4154e1['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3fc590&&_0x4154e1['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3fc590&&_0x4154e1['_showLicenseError']('usageLimit');},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x3965c7){const _0x5f3042=this['editor'],_0x18b87a=new _0x3965c7(_0x5f3042['locale']),_0x5b3d4b=_0x5f3042['commands']['get']('addCommentThread');return _0x18b87a['set']({'label':Et(_0x5f3042['locale'],'Comment'),'icon':_0x431467}),_0x18b87a['bind']('isEnabled')['to'](_0x5b3d4b,'isEnabled',_0x5b3d4b,'hasContent',(_0x3c169b,_0x3f56b2)=>_0x3c169b&&_0x3f56b2),this['listenTo'](_0x18b87a,'execute',()=>{_0x5b3d4b['execute']();}),_0x18b87a;}},yi=class extends _0x4e5c7f{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0xed27e3){super(_0xed27e3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1f629a,_0x18906f,_0x518bc6)=>{_0x518bc6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x17547,_0x1a0069]of this['editor']['commands'])_0x1a0069['affectsData']&&'addCommentThread'!==_0x17547&&_0x1a0069['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 _0x132246=this['editor']['editing']['view']['document'];this['listenTo'](_0x132246,'cut',_0x4e7b6f=>_0x4e7b6f['stop'](),{'priority':'highest'}),this['listenTo'](_0x132246,'clipboardInput',_0x409230=>_0x409230['stop'](),{'priority':'highest'}),this['listenTo'](_0x132246,'delete',_0xb71a3c=>_0xb71a3c['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x20f19a,_0x36cc1a]of this['editor']['commands'])_0x36cc1a['affectsData']&&'addCommentThread'!==_0x20f19a&&_0x36cc1a['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 _0x2edf68{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x48b98f){super(_0x48b98f),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x56fdf0=this['context']['plugins']['get'](ti);this['listenTo'](_0x56fdf0,'_activateAnnotation',(_0x46804b,_0xcf4de4)=>{for(const _0x4d1948 of this['activeUIs']){const _0x5a9455=this['_uis']['get'](_0x4d1948);(0x0,this['uisData']['get'](_0x4d1948)['filter'])(_0xcf4de4)&&_0x5a9455['setActiveAnnotation'](_0xcf4de4);}}),this['listenTo'](_0x56fdf0,'_deactivateAllAnnotations',()=>{for(const _0x4acd03 of this['activeUIs'])this['_uis']['get'](_0x4acd03)['setActiveAnnotation'](null);}),this['listenTo'](_0x56fdf0['_visibleAnnotations'],'add',(_0xd7aee5,_0x518760)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x518760);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x3e50d3){return this['activeUIs']['has'](_0x3e50d3);}activate(_0x304509,_0x22a955=this['defaultFilter']){const _0xe5596a=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x304509))throw new _0x3a2103('annotationsuis-missing-ui',this,{'uiName':_0x304509});this['isActive'](_0x304509)&&this['deactivate'](_0x304509),this['activeUIs']['add'](_0x304509);const _0x3524ca=new Jt();Qt({'source':_0xe5596a['_visibleAnnotations'],'target':_0x3524ca,'filter':_0x22a955}),this['uisData']['set'](_0x304509,{'collection':_0x3524ca,'filter':_0x22a955});const _0x5ccbf5=this['_uis']['get'](_0x304509);_0x5ccbf5['attach'](_0x3524ca),this['listenTo'](_0x5ccbf5,'change:activeAnnotation',(_0x31cc9b,_0x326115,_0x168306,_0x21b4d5)=>{_0x21b4d5&&_0xe5596a['_removeActiveAnnotation'](_0x21b4d5),_0x168306&&_0xe5596a['_addActiveAnnotation'](_0x168306);});}deactivate(_0x1b1c89){if(this['activeUIs']['delete'](_0x1b1c89),!this['_uis']['has'](_0x1b1c89))throw new _0x3a2103('annotationsuis-missing-ui',this,{'uiName':_0x1b1c89});const _0x450bd6=this['_uis']['get'](_0x1b1c89);_0x450bd6['detach'](),this['stopListening'](_0x450bd6),this['uisData']['get'](_0x1b1c89)['collection']['destroy'](),this['uisData']['delete'](_0x1b1c89);}switchTo(_0x5e2ff3){if(!this['_uis']['has'](_0x5e2ff3))throw new _0x3a2103('annotationsuis-missing-ui',this,{'uiName':_0x5e2ff3});const _0x3b22f7=this['context']['plugins']['get'](ti),_0x2d77e4=Array['from'](_0x3b22f7['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5e2ff3);const _0x25a01d=this['_uis']['get'](_0x5e2ff3);_0x25a01d['setActiveAnnotation'](_0x2d77e4),_0x25a01d['_setSelectedAnnotations']&&_0x2d77e4&&_0x25a01d['_setSelectedAnnotations']([_0x2d77e4]);}deactivateAll(){for(const _0x280033 of this['activeUIs'])this['deactivate'](_0x280033);}register(_0x3e528c,_0x3f6c1f){if(this['_uis']['has'](_0x3e528c))throw new _0x3a2103('annotationsuis-register-already-registered');if('function'!=typeof _0x3f6c1f['attach']||'function'!=typeof _0x3f6c1f['detach']||'function'!=typeof _0x3f6c1f['setActiveAnnotation'])throw new _0x3a2103('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3e528c,_0x3f6c1f);}refilterAnnotations(){const _0x539f36=this['context']['plugins']['get'](ti)['collection'],_0x157ef2=new Map(),_0x5e5945=Array['from'](this['activeUIs']);for(const _0x42fa3c of this['activeUIs']){const _0x393610=this['uisData']['get'](_0x42fa3c)['collection'];for(const _0x421d7e of _0x393610)_0x157ef2['set'](_0x421d7e,_0x42fa3c);}for(const _0x31ef66 of _0x539f36){const _0x5c89e1=_0x157ef2['get'](_0x31ef66);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x31ef66);const _0x4e2444=_0x5e5945['find'](_0x30a92d=>this['uisData']['get'](_0x30a92d)['filter'](_0x31ef66));_0x5c89e1!==_0x4e2444&&(_0x5c89e1&&this['uisData']['get'](_0x5c89e1)['collection']['remove'](_0x31ef66),_0x4e2444&&this['uisData']['get'](_0x4e2444)['collection']['add'](_0x31ef66));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0xbf5724){const _0x2a38c7=[];for(const _0x5a2f4e of this['activeUIs']){(0x0,this['uisData']['get'](_0x5a2f4e)['filter'])(_0xbf5724)&&_0x2a38c7['push'](_0x5a2f4e);}if(_0x2a38c7['length']>0x1)throw new _0x3a2103('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2a38c7,'annotationType':_0xbf5724['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x5978f6('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1be92c){super(_0x1be92c);const _0x4dce2d=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 _0x45d472(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4dce2d['to']('class')],'style':{'minHeight':_0x4dce2d['to']('minHeight',_0x44bb7b=>'number'==typeof _0x44bb7b?Ci(_0x44bb7b+0xa):null)},'dir':_0x1be92c['uiLanguageDirection'],'role':'application','aria-label':Et(_0x1be92c,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x1be92c,'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',_0x3fb60c=>{this['_updateItemPositionInFocusables'](_0x3fb60c['source']);}),this['list']['forEach'](_0x29b1eb=>{this['focusTracker']['add'](_0x29b1eb['element']),this['_updateItemPositionInFocusables'](_0x29b1eb);}),this['list']['on']('change',(_0x26c71b,_0x84d3d0)=>{for(const _0x5d5d12 of _0x84d3d0['removed'])this['focusTracker']['remove'](_0x5d5d12['element']),this['focusables']['remove'](_0x5d5d12);for(const _0x463dcc of _0x84d3d0['added'])this['focusTracker']['add'](_0x463dcc['element']),this['_updateItemPositionInFocusables'](_0x463dcc);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x3544ce){const _0x4839f1=this['focusables']['getIndex'](_0x3544ce);let _0x5c4137,_0x668c2e;for(const _0x2f750e of this['focusables'])if(_0x3544ce['top']<_0x2f750e['top']){_0x5c4137=_0x2f750e;break;}if(_0x668c2e=_0x5c4137?this['focusables']['getIndex'](_0x5c4137):this['focusables']['length'],-0x1!==_0x4839f1){if(_0x4839f1===_0x668c2e-0x1)return;this['focusables']['remove'](_0x3544ce),_0x668c2e=_0x5c4137?this['focusables']['getIndex'](_0x5c4137):this['focusables']['length'];}this['focusables']['add'](_0x3544ce,_0x668c2e);}};const bi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x5978f6('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x1ffbc4){super(_0x1ffbc4),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x18846b,_0x5c77e5)=>_0x18846b+_0x5c77e5),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2ed72a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2ed72a['to']('isAnimationDisabled',_0x1c15a2=>_0x1c15a2?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2ed72a['to']('top',_0xfe079c=>bi(_0xfe079c))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x5b21b5=this['element']['clientHeight'];_0x5b21b5&&(this['height']=_0x5b21b5);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x2edf68{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d8463){super(_0x5d8463),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 _0x331d0d=this['context']['config']['get']('sidebar.container');_0x331d0d&&this['setContainer'](_0x331d0d);}setContainer(_0x21de7c){if(!Oi(_0x21de7c))throw new _0x3a2103('sidebar-setcontainer-invalid-element');this['container']=_0x21de7c;}_attachToContainer({viewClass:_0x1a981e='',spaceBetweenItems:_0x272c92=0x19}={}){if(!Oi(this['container']))throw new _0x3a2103('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1a981e,this['_spaceBetweenItems']=_0x272c92;}['rearrange']({removedAnnotation:_0x65bb0d,previousAnnotation:_0xbb820b,nextAnnotation:_0x1475fc}){const _0xb471c9=this['getSidebarItemView'](_0x65bb0d);this['view']['list']['remove'](_0xb471c9),this['_destroySidebarItemView'](_0x65bb0d),_0xbb820b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xbb820b)),_0x1475fc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1475fc)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2f10b5,activatedAnnotation:_0x131bcf,disableAnimationOnActivatedAnnotation:_0x40a843}){if(this['_activeAnnotation']=_0x131bcf,_0x2f10b5){_0x2f10b5['isActive']=!0x1;const _0x49619d=this['getSidebarItemView'](_0x2f10b5);_0x49619d&&_0x40a843&&(_0x49619d['isAnimationDisabled']=!0x1);}if(_0x131bcf){const _0x56bc73=this['getSidebarItemView'](_0x131bcf);_0x56bc73&&(_0x131bcf['isActive']=!0x0,_0x40a843&&(_0x56bc73['isAnimationDisabled']=!0x0,_0x56bc73['top']+=0x1),this['_alignToTargetRect'](_0x56bc73));}}_detachFromContainer(_0xed3023){if(this['view']['element']['remove'](),_0xed3023){for(const _0x5f3847 of _0xed3023)this['_destroySidebarItemView'](_0x5f3847);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x5019f4,_0x35c8f2){_0x35c8f2||(_0x35c8f2=_0x5019f4['view']);const _0x1971a2=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1971a2,_0x5019f4),this['_annotationToSidebarItemView']['set'](_0x5019f4,_0x1971a2),_0x1971a2['content']['add'](_0x35c8f2),this['listenTo'](_0x5019f4['view'],'change:targetRect',(_0x4c1ad4,_0x190819,_0x5e05f7)=>{const _0x225ba2=this['_getTargetTop'](_0x5019f4,_0x5e05f7);_0x1971a2['_targetTop']!=_0x225ba2&&(_0x1971a2['_targetTop']=_0x225ba2,this['_setItemTop'](_0x1971a2,_0x225ba2));}),this['listenTo'](_0x1971a2,'change:top',()=>{this['_recalculate'](_0x1971a2,'top');}),this['listenTo'](_0x1971a2,'change:bottom',()=>{this['_recalculate'](_0x1971a2,'bottom');}),this['_alignToTargetRect'](_0x1971a2);const _0x229735=this['_getItemBefore'](_0x1971a2);return _0x229735&&this['_alignAfterItem'](_0x229735,_0x1971a2)||this['_alignToTargetRect'](_0x1971a2),this['_updateLastItem'](),this['view']['list']['add'](_0x1971a2),_0x1971a2;}['_alignForTopChange'](_0x2b6bab){if(!_0x2b6bab['content']['length'])return;const _0x2c022f=this['_getItemBefore'](_0x2b6bab);if(!_0x2c022f)return;const _0x44e1d5=this['_sidebarItemViewToAnnotation']['get'](_0x2c022f),_0x8741f2=this['_activeAnnotation'];_0x8741f2&&_0x8741f2===_0x44e1d5?this['_alignAfterItem'](_0x2c022f,_0x2b6bab):this['_alignBeforeItem'](_0x2b6bab,_0x2c022f);}_alignForBottomChange(_0x34c5bb){if(!_0x34c5bb['content']['length'])return;const _0x1a90fb=this['_getItemAfter'](_0x34c5bb);if(!_0x1a90fb)return;const _0xa73b1b=this['_sidebarItemViewToAnnotation']['get'](_0x1a90fb),_0x400232=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1d54ea=this['_activeAnnotation'];_0x1d54ea&&_0x1d54ea===_0xa73b1b&&_0x400232?(this['_alignBeforeItem'](_0x1a90fb,_0x34c5bb),this['_alignAfterItem'](_0x34c5bb,_0x1a90fb)):_0x1d54ea&&_0x1d54ea===_0xa73b1b?this['_alignBeforeItem'](_0x1a90fb,_0x34c5bb):this['_alignAfterItem'](_0x34c5bb,_0x1a90fb);}_recalculate(_0x1837ae,_0x52cded){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1877d1,changedProp:_0x45a3b2}of this['_recalculateBuffer'])'top'===_0x45a3b2?this['_alignForTopChange'](_0x1877d1):this['_alignForBottomChange'](_0x1877d1);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1837ae,'changedProp':_0x52cded});}getSidebarItemView(_0x678419){return this['_annotationToSidebarItemView']['get'](_0x678419);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x22950a){const _0x401cfa=this['getSidebarItemView'](_0x22950a);this['stopListening'](_0x401cfa),this['stopListening'](_0x22950a['view']),_0x401cfa['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x22950a),this['_sidebarItemViewToAnnotation']['delete'](_0x401cfa);}_createSidebarView(){const _0x1c661b=new Ii(this['context']['locale']);return _0x1c661b['render'](),this['on']('change:_lastItem',(_0x1b26a8,_0x33a24f,_0x2acf63,_0x3db0be)=>{_0x3db0be&&_0x1c661b['unbind']('minHeight'),_0x2acf63?_0x1c661b['bind']('minHeight')['to'](_0x2acf63,'bottom'):_0x1c661b['minHeight']=null;}),_0x1c661b;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x1797ff){const _0x234f0d=this['_sidebarItemViewToAnnotation']['get'](_0x1797ff),_0x4f9dd7=_0x234f0d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x234f0d)-0x1);return _0x4f9dd7&&this['getSidebarItemView'](_0x4f9dd7)||null;}_getItemAfter(_0x57846b){const _0x123d10=this['_sidebarItemViewToAnnotation']['get'](_0x57846b),_0x230229=_0x123d10&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x123d10)+0x1);return _0x230229&&this['getSidebarItemView'](_0x230229)||null;}_alignBeforeItem(_0x132eaf,_0x382634){_0x132eaf['updateHeight']();const _0x2e0d00=Ni(_0x382634['bottom']+this['_spaceBetweenItems'],_0x132eaf['top']);return!!_0x2e0d00&&(this['_setItemTop'](_0x382634,_0x382634['top']-_0x2e0d00),!0x0);}_alignAfterItem(_0x979f6a,_0x2c251d){_0x979f6a['updateHeight']();const _0x18f5e7=Ni(_0x979f6a['bottom']+this['_spaceBetweenItems'],_0x2c251d['top']);return!!_0x18f5e7&&(this['_setItemTop'](_0x2c251d,_0x2c251d['top']+_0x18f5e7,!0x1),!0x0);}_alignToTargetRect(_0x3566ca){const _0x30a297=this['_sidebarItemViewToAnnotation']['get'](_0x3566ca);if(!_0x30a297||!_0x30a297['target']||!_0x30a297['targetRect'])return;const _0x12643a=this['_getTargetTop'](_0x30a297,_0x30a297['targetRect']);this['_setItemTop'](_0x3566ca,_0x12643a);}_getTargetTop(_0x8c6588,_0x2c3de3){if(null===_0x2c3de3)return 0x0;if(_0x8c6588['target']instanceof _0x465231)return _0x2c3de3['top'];{const _0x3f2c5f=new _0x465231(this['view']['element'])['top'];return _0x2c3de3['top']-_0x3f2c5f;}}_setItemTop(_0x5e5f2e,_0xc62b3d,_0x3dfb7a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x3dfb7a&&(_0xc62b3d=Math['max'](_0xc62b3d,this['_getMaxAvailableTop'](_0x5e5f2e))),_0x5e5f2e['top']=_0xc62b3d;}_getMaxAvailableTop(_0x2a362c){let _0x1dafb2=this['_getItemBefore'](_0x2a362c),_0x2229e4=0x0;for(;_0x1dafb2;)_0x1dafb2['updateHeight'](),_0x2229e4+=this['_spaceBetweenItems']+_0x1dafb2['height'],_0x1dafb2=this['_getItemBefore'](_0x1dafb2);return _0x2229e4;}};function Ni(_0x207929,_0x190556){return Math['max'](_0x207929-_0x190556,0x0);}function Oi(_0x3357ae){return null!==_0x3357ae&&'object'==typeof _0x3357ae&&0x1===_0x3357ae['nodeType'];}var Mi=class extends _0x2edf68{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(_0x166a0c){super(_0x166a0c),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5391c7(),this['_refreshPositioningDebounced']=_0xbb2184(()=>{_0x166a0c['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x50cc29=this['context']['plugins']['get'](Ti),_0x562d36=this['context']['plugins']['get'](ki);_0x50cc29['register']('wideSidebar',this),_0x562d36['container']&&_0x50cc29['switchTo']('wideSidebar');}setActiveAnnotation(_0x253d11){if(_0x253d11===this['activeAnnotation'])return;const _0xc5f96a=this['context']['plugins']['get'](ki);_0xc5f96a['_activeAnnotation']=_0x253d11;const _0x14fc9d=this['activeAnnotation'];_0xc5f96a['refresh']({'blurredAnnotation':_0x14fc9d,'activatedAnnotation':_0x253d11}),this['activeAnnotation']=_0x253d11;}attach(_0x4d5625){this['annotations']=_0x4d5625;const _0x58fbf5=this['context']['plugins']['get'](ki);if(_0x58fbf5['_annotations']=_0x4d5625,this['isAttached'])throw new _0x3a2103('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x58fbf5,'set:container',()=>{this['detach'](),this['listenTo'](_0x58fbf5,'change:container',_0x24cf28=>{_0x24cf28['off'](),this['attach'](_0x4d5625);});}),_0x58fbf5['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1b47bc=_0x40a0e6=>{_0x40a0e6['updateTargetRect'](),_0x58fbf5['addAnnotation'](_0x40a0e6);};for(const _0x2125ee of _0x4d5625)_0x1b47bc(_0x2125ee);this['listenTo'](_0x4d5625,'add',(_0x21e300,_0x1f808c)=>{_0x1b47bc(_0x1f808c);}),this['listenTo'](_0x4d5625,'remove',(_0x4f2b3a,_0xc898f5,_0xf1548f)=>{_0x58fbf5['rearrange']({'removedAnnotation':_0xc898f5,'previousAnnotation':_0x4d5625['get'](_0xf1548f-0x1),'nextAnnotation':_0x4d5625['get'](_0xf1548f+0x1)}),_0xc898f5===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4d5625,'focus',(_0x59a861,_0x3adeb8)=>{this['setActiveAnnotation'](_0x3adeb8);}),this['listenTo'](_0x4d5625,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1070d5=this['context']instanceof _0xe59758?this['context']['editors']:new _0x5391c7([this['context']]);for(const _0x46203a of _0x1070d5)this['_integrateWithEditorAnnotations'](_0x46203a);this['listenTo'](_0x1070d5,'add',(_0x12fc0f,_0x169e68)=>{this['listenTo'](_0x169e68,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x169e68);});}),this['listenTo'](_0x1070d5,'remove',(_0x37ee2b,_0x364c7d)=>{_0x364c7d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x364c7d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x3a2103('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1de63e=this['context']['plugins']['get'](ki);_0x1de63e['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1de63e),this['stopListening'](this['annotations']),this['context']instanceof _0xe59758&&this['stopListening'](this['context']['editors']);for(const _0x3f6cde of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3f6cde);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x52f4d3){if(!_0x52f4d3['plugins']['has']('EditorAnnotations'))return;const _0x4d12a4=_0x52f4d3['plugins']['get']('EditorAnnotations'),_0x4530e7=()=>{const _0x383e78=_0x4d12a4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x383e78[0x0]||null);};this['listenTo'](_0x4d12a4,'refresh',_0x4530e7),this['listenTo'](_0x4d12a4,'blur',(_0x279f13,{isAnnotationTracked:_0x11afb7})=>{this['activeAnnotation']&&_0x11afb7(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4d12a4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2b0441=>{_0x4d12a4['hasDomSelection']()&&(_0x4530e7(),_0x2b0441['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4d12a4);}_destroyEditorAnnotationsIntegration(_0x309ee1){this['stopListening'](_0x309ee1),this['_editorAnnotations']['remove'](_0x309ee1);}},Ri=class extends _0x98026e{counterView;constructor(_0x4d0a76){super(_0x4d0a76);const _0x5c0458=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4cda7d,_0x14aff0)=>_0x4cda7d?'...':_0x14aff0['toString']()),this['set']('annotationType',''),this['icon']=_0x431467,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5c0458['to']('annotationType',_0x30490c=>'ck-annotation-counter__badge--'+_0x30490c),_0x5c0458['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5c0458['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x2edf68{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(_0x44e258){super(_0x44e258),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x2a3945())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5391c7(),this['_refreshPositioningDebounced']=_0xbb2184(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5e1938(this['context']['locale']),this['balloonPanelView']=new _0x4da12d(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x2f68fc){this['annotations']=_0x2f68fc;const _0xd25a35=this['context']['plugins']['get'](ki),_0x24d26c=this['balloonPanelView'];if(_0xd25a35['_annotations']=_0x2f68fc,this['isAttached'])throw new _0x3a2103('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xd25a35,'set:container',()=>{this['detach'](),this['listenTo'](_0xd25a35,'change:container',_0x42ef36=>{_0x42ef36['off'](),this['attach'](_0x2f68fc);});}),_0xd25a35['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3b6dc1=_0x58a3d9=>{const _0x410dfc=new Ri(this['context']['locale']);_0xd25a35['addAnnotation'](_0x58a3d9,_0x410dfc),this['_annotationToNarrowView']['set'](_0x58a3d9,_0x410dfc),_0x410dfc['bind']('isDirty','annotationType','number')['to'](_0x58a3d9['view'],'isDirty','type','length'),_0x410dfc['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x24d26c['content']['first']!==_0x58a3d9['view']?(this['_showBalloon'](_0x58a3d9),_0x58a3d9['view']['element']['focus'](),this['setActiveAnnotation'](_0x58a3d9)):this['setActiveAnnotation'](null);});};for(const _0x3dbde6 of _0x2f68fc)_0x3b6dc1(_0x3dbde6);this['listenTo'](_0x2f68fc,'add',(_0x3a5521,_0x355c6b)=>{_0x3b6dc1(_0x355c6b);}),this['listenTo'](_0x2f68fc,'remove',(_0x388747,_0x5dd1f4,_0x4784e8)=>{this['_annotationToNarrowView']['get'](_0x5dd1f4)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5dd1f4),_0xd25a35['rearrange']({'removedAnnotation':_0x5dd1f4,'previousAnnotation':_0x2f68fc['get'](_0x4784e8-0x1),'nextAnnotation':_0x2f68fc['get'](_0x4784e8+0x1)}),_0x5dd1f4===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2f68fc,'focus',(_0x198444,_0x2a7474)=>{this['setActiveAnnotation'](_0x2a7474);}),this['listenTo'](_0x2f68fc,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2cc07a,_0x45ff00)=>{_0x45ff00['keyCode']===_0x4abf55['esc']&&_0x24d26c['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x24d26c['content']['first']),this['_hideBalloon'](),_0x45ff00['stopPropagation'](),_0x45ff00['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x4735ec,_0x12d8ae)=>{const _0x205d7b=_0x12d8ae['target'];_0x24d26c['isVisible']&&_0x24d26c['element']['contains'](_0x205d7b)||_0xd25a35['view']['element']['contains'](_0x205d7b)||_0x4735ec['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x50b757=>_0x50b757['contains'](_0x205d7b))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2f3d44=this['context']instanceof _0xe59758?this['context']['editors']:new _0x5391c7([this['context']]);for(const _0x241320 of _0x2f3d44)this['_integrateWithEditorAnnotations'](_0x241320);this['listenTo'](_0x2f3d44,'add',(_0x1cc35a,_0x412b0d)=>{this['listenTo'](_0x412b0d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x412b0d);});}),this['listenTo'](_0x2f3d44,'remove',(_0x1ff18e,_0x3ab0d3)=>{_0x3ab0d3['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3ab0d3['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x220ba2){if(_0x220ba2===this['activeAnnotation'])return;const _0x54bfa9=this['context']['plugins']['get'](ki);_0x54bfa9['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x220ba2,'disableAnimationOnActivatedAnnotation':!0x0}),_0x220ba2&&_0x54bfa9['getSidebarItemView'](_0x220ba2)?this['_showBalloon'](_0x220ba2):this['_hideBalloon'](),this['activeAnnotation']=_0x220ba2;}detach(){if(!this['isAttached'])throw new _0x3a2103('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5f54b5=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x39ef70=>_0x39ef70['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5f54b5['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xe59758&&this['stopListening'](this['context']['editors']);for(const _0x159984 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x159984);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(_0xa8be0c){if(!_0xa8be0c['plugins']['has']('EditorAnnotations'))return;const _0x2fce9d=_0xa8be0c['plugins']['get']('EditorAnnotations'),_0xa29bb6=this['context']['plugins']['get'](ki),_0x4eb447=this['annotations'],_0xc73d5=this['balloonPanelView'],_0x35a849=()=>{const _0x26ea2f=_0x2fce9d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x26ea2f),this['setActiveAnnotation'](_0x26ea2f[0x0]||null);};this['listenTo'](_0x2fce9d,'refresh',_0x35a849),this['listenTo'](_0x2fce9d,'blur',(_0x1ce1a6,{isAnnotationTracked:_0x33c41e})=>{this['activeAnnotation']&&_0x33c41e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2fce9d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4eb447,'blur',_0x5e243a=>{_0x2fce9d['hasDomSelection']()&&_0x5e243a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2c90ed,_0x36d5d9)=>{const _0x5c09d6=_0x36d5d9['target'];_0xc73d5['isVisible']&&_0xc73d5['element']['contains'](_0x5c09d6)||_0xa29bb6['view']['element']['contains'](_0x5c09d6)||this['activeAnnotation']&&_0x2fce9d['hasDomSelection']()&&(_0x35a849(),_0x2c90ed['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2fce9d);}_destroyEditorAnnotationsIntegration(_0x4d8922){_0x4d8922&&(this['stopListening'](_0x4d8922),this['_editorAnnotations']['remove'](_0x4d8922));}_setSelectedAnnotations(_0x576427){for(const _0xd4866f of this['_selectedAnnotations'])_0x576427['includes'](_0xd4866f)||this['_manuallyClosedAnnotationViews']['delete'](_0xd4866f['view']);this['_selectedAnnotations']=_0x576427;}_refreshPositioning(){const _0xc2d3e4=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xc2d3e4['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x238d1b){if(this['_manuallyClosedAnnotationViews']['has'](_0x238d1b['view']))return;const _0x49199f=this['balloonPanelView']['content']['first'];_0x49199f!==_0x238d1b['view']?(_0x49199f&&this['_detachListeners'](_0x49199f),this['_attachListeners'](_0x238d1b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x238d1b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x100add=this['balloonPanelView']['content']['first'],_0x36f06=_0x100add&&this['annotations']['getByView'](_0x100add);if(!_0x36f06||!this['_annotationToNarrowView']['has'](_0x36f06))return;const _0x26881a=this['_annotationToNarrowView']['get'](_0x36f06)['element'],_0x376be3=(function(){const _0x82e340=_0x4da12d['defaultPositions'];return[_0x82e340['southArrowNorthEast'],_0x82e340['northArrowSouthEast'],_0x82e340['southArrowNorth'],_0x82e340['northArrowSouth'],_0x82e340['southArrowNorthWest'],_0x82e340['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x26881a,'positions':_0x376be3});}['_hideBalloon'](){const _0x3c196b=this['balloonPanelView'],_0x34cecd=_0x3c196b['content']['first'];_0x34cecd&&(this['_detachListeners'](_0x34cecd),_0x3c196b['unpin'](),_0x3c196b['content']['clear']());}_attachListeners(_0x5fb5fc){this['listenTo'](_0x5fb5fc,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5fb5fc,'Esc',(_0x5deeda,_0x65e09d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5fb5fc),this['_hideBalloon'](),_0x65e09d();});}_detachListeners(_0x2042e5){this['stopListening'](_0x2042e5);}},xi=class extends _0x4e5c7f{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x564301,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56fcae){super(_0x56fcae),_0x56fcae['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x56fcae['plugins']['get'](_0x564301),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0xbb2184(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x233442=this['editor']['plugins']['get'](Ti);_0x233442['context']===this['editor']&&(_0x233442['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x2048b8,_0x138488)=>{const _0xd2cec5=this['_balloon'];if(this['isAttached']&&_0xd2cec5['visibleView']){const _0x4ad452=this['annotations']['getByView'](_0xd2cec5['visibleView']);_0x4ad452&&this['_closeAnnotation'](_0x4ad452),_0x138488();}}));}afterInit(){const _0x37bae2=this['editor']['plugins']['get'](Ti);_0x37bae2['context']===this['editor']&&(_0x37bae2['hasActive']()||_0x37bae2['switchTo']('inline'));}setActiveAnnotation(_0x393312){_0x393312!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x393312&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x393312)&&this['_addAnnotationToBalloon'](_0x393312,!0x0),_0x393312['isActive']=!0x0),_0x393312||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x393312);}attach(_0x31b217){this['annotations']=_0x31b217;const _0x157401=this['editor']['plugins']['get'](Ti),_0x564bf6=this['_balloon'];if(this['isAttached'])throw new _0x3a2103('inlineannotations-attach-already-attached',this);if(_0x157401['context']!==this['editor'])throw new _0x3a2103('inlineannotations-not-allowed-with-context',this);const _0x471e69=this['editor']['plugins']['get'](di);this['listenTo'](_0x471e69,'refresh',()=>{const _0x1b43d2=_0x471e69['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4f70a5,_0x4cea8a;!this['_forceRefresh']&&(_0x4f70a5=_0x1b43d2,_0x4cea8a=this['_selectedAnnotations'],_0x4f70a5['length']===_0x4cea8a['length']&&_0x4f70a5['every'](_0x17b894=>_0x4cea8a['includes'](_0x17b894)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1b43d2),this['setActiveAnnotation'](_0x1b43d2[0x0]||null));}),this['listenTo'](_0x471e69,'blur',(_0x5efc75,{isAnnotationTracked:_0x359ec1})=>{this['activeAnnotation']&&_0x359ec1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x471e69,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x370b8f,_0x170c91,_0x264e09)=>{_0x264e09||this['setActiveAnnotation'](null);}),this['listenTo'](_0x31b217,'remove',(_0x2a605b,_0x2df0e3)=>{this['_removeAnnotationFromBalloon'](_0x2df0e3),_0x2df0e3===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x564bf6,'change:visibleView',(_0x1c560d,_0x37fea0,_0x5651aa,_0x3a4920)=>{_0x3a4920&&this['stopListening'](_0x3a4920);const _0x3a962d=_0x31b217['getByView'](_0x5651aa);_0x5651aa&&_0x3a962d&&(this['listenTo'](_0x5651aa,'change:height',()=>{_0x564bf6['updatePosition']();}),this['listenTo'](_0x5651aa,'Esc',()=>{this['_closeAnnotation'](_0x3a962d),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3a962d&&this['setActiveAnnotation'](_0x3a962d));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x564bf6['visibleView']&&_0x31b217['getByView'](_0x564bf6['visibleView'])&&_0x564bf6['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 _0x3a2103('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x126030 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x126030);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x2cdfd1){for(const _0x7d236c of this['_selectedAnnotations'])_0x2cdfd1['includes'](_0x7d236c)||this['_manuallyClosed']['delete'](_0x7d236c);for(const _0x43ca48 of this['annotations'])_0x2cdfd1['includes'](_0x43ca48)||this['_removeAnnotationFromBalloon'](_0x43ca48);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4c73a0 of _0x2cdfd1)this['_addAnnotationToBalloon'](_0x4c73a0);}this['_selectedAnnotations']=_0x2cdfd1;}_addAnnotationToBalloon(_0x6cce3a,_0x53e801=!0x1){this['_manuallyClosed']['has'](_0x6cce3a)||(this['_addedAnnotations']['has'](_0x6cce3a)||this['_balloon']['hasView'](_0x6cce3a['view'])||(this['_addedAnnotations']['add'](_0x6cce3a),this['_balloon']['add']({'stackId':_0x6cce3a['view']['id'],'view':_0x6cce3a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x6cce3a)}})),_0x53e801&&this['_balloon']['showStack'](_0x6cce3a['view']['id']));}_getBalloonTargetForAnnotation(_0x392ab5){const _0x481d19=_0x392ab5['target'],_0xce14bd=this['editor']['editing']['view'],_0x3b394b=_0xce14bd['document']['selection']['getFirstRange'](),_0x38c5cb=_0xce14bd['domConverter']['viewRangeToDom'](_0x3b394b);if(_0x38c5cb['collapse'](!0x0),_0x481d19){if(_0x481d19 instanceof _0x465231)return _0x481d19;let _0x4abdef=[];for(const _0xcc462a of _0x481d19)_0x4abdef['push'](..._0x465231['getDomElementRects'](_0xcc462a));_0x4abdef=function(_0x4401e3){const _0x2c062d=[];let _0x47ea96=_0x4401e3[0x0];for(let _0xd9040e=0x1;_0xd9040e<_0x4401e3['length'];_0xd9040e++)if(Pi(_0x47ea96,_0x4401e3[_0xd9040e])){const _0x18f1fb=_0x4401e3[_0xd9040e]['width'];_0x47ea96['width']+=_0x18f1fb,_0x47ea96['right']+=_0x18f1fb;}else _0x2c062d['push'](_0x47ea96),_0x47ea96=_0x4401e3[_0xd9040e];return _0x2c062d['push'](_0x47ea96),_0x2c062d;}(_0x4abdef);const _0x3a1ef3=_0x38c5cb['getBoundingClientRect']();return _0x4abdef['find'](_0x2e3900=>_0x2e3900['top']<=_0x3a1ef3['top']&&_0x2e3900['bottom']>=_0x3a1ef3['bottom']&&_0x2e3900['left']<=_0x3a1ef3['left']&&_0x2e3900['right']>=_0x3a1ef3['right'])||_0x4abdef[0x0];}return _0x392ab5['targetRect']||_0x38c5cb;}_removeAnnotationFromBalloon(_0x158338){this['_addedAnnotations']['has'](_0x158338)&&this['_balloon']['hasView'](_0x158338['view'])&&(this['_addedAnnotations']['delete'](_0x158338),this['_balloon']['remove'](_0x158338['view']));}_closeAnnotation(_0x23d01b){this['_manuallyClosed']['add'](_0x23d01b),this['_removeAnnotationFromBalloon'](_0x23d01b);}};function Pi(_0x18de9c,_0x453e57){return _0x18de9c['top']===_0x453e57['top']&&_0x18de9c['bottom']===_0x453e57['bottom']&&_0x18de9c['right']===_0x453e57['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x2aef77,_0x134f1a){super(_0x2aef77),this['set']('isEmpty',!_0x134f1a['length']),this['focusTracker']=new _0x45d472(),this['_annotationViews']=_0x134f1a,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x134f1a,'focusTracker':this['focusTracker']}),this['listenTo'](_0x134f1a,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x134f1a,'remove',(_0x1d78a5,_0x1fe243)=>{_0x1fe243['isActive']&&this['focus'](),_0x134f1a['length']||(this['isEmpty']=!0x0);});const _0x33e7b9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x2aef77,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x134f1a},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x33e7b9['if']('isEmpty','ck-hidden',_0xecb3d7=>!_0xecb3d7)]},'children':[{'text':Et(_0x2aef77,'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 _0x5531e8 of this['_annotationViews'])this['focusTracker']['add'](_0x5531e8['element']);this['_annotationViews']['on']('change',(_0x3dbda4,{added:_0x221145,removed:_0x36a9b3})=>{for(const _0x4a4319 of _0x221145)this['focusTracker']['add'](_0x4a4319['element']);for(const _0x1ff082 of _0x36a9b3)this['focusTracker']['remove'](_0x1ff082['element']);});}},Di=class extends _0x2edf68{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x568610){super(_0x568610),this['archivedThreads']=new _0x5391c7();}init(){const _0x4768af=this['context'],_0x4ecb1c=_0x4768af['plugins']['get'](oi),_0x4f0c7b=_0x4768af['plugins']['get'](ti);this['listenTo'](_0x4ecb1c,'addCommentThread',(_0x24982c,{threadId:_0x30c875})=>{const _0x634a33=_0x4ecb1c['getCommentThread'](_0x30c875);_0x634a33['archivedAt']&&this['archivedThreads']['add'](_0x634a33,this['_calculatePosition'](_0x634a33['archivedAt'])),this['listenTo'](_0x634a33,'change:archivedAt',(_0x1b9041,_0x3b7645,_0x4170bd)=>{_0x4170bd?this['archivedThreads']['has'](_0x634a33)||this['archivedThreads']['add'](_0x634a33,this['_calculatePosition'](_0x634a33['archivedAt'])):this['archivedThreads']['has'](_0x634a33)&&this['archivedThreads']['remove'](_0x634a33);});}),this['listenTo'](_0x4ecb1c,'removeCommentThread',(_0x4e8bcd,{threadId:_0x246577})=>{const _0x14d9b4=_0x4ecb1c['getCommentThread'](_0x246577);this['stopListening'](_0x14d9b4),this['archivedThreads']['has'](_0x14d9b4)&&this['archivedThreads']['remove'](_0x14d9b4);},{'priority':'highest'}),this['listenTo'](_0x4f0c7b['collection'],'focus',(_0x5d6aa5,_0x1dd3af)=>{_0x1dd3af['isVisible']||(_0x1dd3af['isActive']=!0x0,_0x4f0c7b['activate'](_0x1dd3af));});}_calculatePosition(_0x55d696){const _0x2502af=[...this['archivedThreads']]['findIndex'](_0x4e2539=>_0x4e2539['archivedAt']<_0x55d696);return _0x2502af>-0x1?_0x2502af:this['archivedThreads']['length'];}},Vi=class extends _0x4e5c7f{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x1f6fd3];}constructor(_0x1429ff){super(_0x1429ff),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x587765=this['editor'],_0x56dfd3=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x587765['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x98026e,!0x0)),_0x587765['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3e228b=this['_createCommentsArchiveButton'](rt);return _0x3e228b['set']({'role':'menuitemcheckbox'}),_0x3e228b;});const _0x29323c=_0x587765['plugins']['get'](Di),_0x44ddb9=_0x587765['plugins']['get']('Annotations'),_0x86d7b=_0x587765['plugins']['get']('CommentsRepository');_0x29323c['archivedThreads']['forEach'](_0x512e59=>{this['_handleNewThread'](_0x512e59);}),this['listenTo'](_0x29323c['archivedThreads'],'add',(_0x15d225,_0x32da2e)=>{this['_handleNewThread'](_0x32da2e);}),this['listenTo'](_0x44ddb9['collection'],'add',(_0x4e2a9a,_0xe1a5b3)=>{const _0x54545a=this['_pendingThreads']['find'](_0x5db789=>{const _0x435800=_0x86d7b['_threadToController']['get'](_0x5db789);return _0x435800&&_0xe1a5b3['innerView']===_0x435800['view'];});if(_0x54545a){const _0x101c9b=this['_calculatePosition'](_0x54545a['archivedAt']);this['_addAnnotationToArchive'](_0xe1a5b3,_0x101c9b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x54545a),0x1);}}),this['listenTo'](_0x29323c['archivedThreads'],'remove',(_0x52570c,_0x2e3b60)=>{const _0x1caaaa=_0x587765['config']['get']('collaboration.channelId');if(!_0x1caaaa||_0x2e3b60['channelId']===_0x1caaaa){if(this['_pendingThreads']['includes'](_0x2e3b60))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2e3b60),0x1);else{const _0x3edd0a=_0x86d7b['_threadToController']['get'](_0x2e3b60),_0x31a155=_0x44ddb9['getByInnerView'](_0x3edd0a['view']);this['annotationViews']['remove'](_0x31a155['view']),this['stopListening'](_0x31a155),this['stopListening'](_0x31a155['focusableElements']);}}}),this['listenTo'](_0x44ddb9['collection'],'add',(_0xcc8e5a,_0xb096bb)=>{this['listenTo'](_0xb096bb,'escape',_0x56dfd3);}),this['listenTo'](_0x44ddb9['collection'],'remove',(_0x5e10db,_0x5e59cb)=>{this['stopListening'](_0x5e59cb,'escape',_0x56dfd3);});}_addAnnotationToArchive(_0x18a0ed,_0x503fd4){this['listenTo'](_0x18a0ed,'set:isVisible',_0x1da6ab=>{_0x1da6ab['return']=!0x1,_0x1da6ab['stop']();}),this['annotationViews']['add'](_0x18a0ed['view'],_0x503fd4);}['_handleNewThread'](_0x463daf){const _0x5f1412=this['editor']['plugins']['get']('CommentsRepository'),_0x40b460=this['editor']['plugins']['get']('Annotations'),_0x267fe2=this['editor']['config']['get']('collaboration.channelId');if(!_0x267fe2||_0x463daf['channelId']===_0x267fe2){const _0x2affc9=_0x5f1412['_threadToController']['get'](_0x463daf);if(!_0x2affc9)return void this['_pendingThreads']['push'](_0x463daf);const _0x54590f=this['_calculatePosition'](_0x463daf['archivedAt']),_0x4d29b7=_0x40b460['getByInnerView'](_0x2affc9['view']);_0x4d29b7['isVisible']&&_0x40b460['_visibleAnnotations']['remove'](_0x4d29b7),this['_addAnnotationToArchive'](_0x4d29b7,_0x54590f);}}_calculatePosition(_0x4c251b){const _0x3b62b6=this['editor']['config']['get']('collaboration.channelId'),_0x2c75ab=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x470816=>_0x470816['channelId']===_0x3b62b6)['findIndex'](_0x1b6b37=>_0x1b6b37['archivedAt']<_0x4c251b);return _0x2c75ab<0x0||_0x2c75ab>this['annotationViews']['length']?this['annotationViews']['length']:_0x2c75ab-0x1;}_toggleDialog(){const _0x4ada1c=this['editor'],_0x4dea71=_0x4ada1c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x4ada1c['locale'],this['annotationViews'])),'commentsArchive'===_0x4dea71['id']?_0x4dea71['hide']():_0x4dea71['show']({'id':'commentsArchive','title':Et(_0x4ada1c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x26eb26,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x2bdb8f['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x5ac742,_0x54454b=!0x1){const _0x1ae288=this['editor']['locale'],_0x28179b=this['editor']['plugins']['get']('Dialog'),_0x1c9736=new _0x5ac742(_0x1ae288);return _0x1c9736['bind']('isEnabled')['to'](this,'isEnabled'),_0x1c9736['bind']('isOn')['to'](_0x28179b,'id',_0x4315b=>'commentsArchive'===_0x4315b),_0x1c9736['set']({'label':Et(_0x1ae288,'COMMENTS_ARCHIVE'),'icon':_0x26eb26,'isToggleable':!0x0}),_0x54454b&&(_0x1c9736['tooltip']=!0x0),this['listenTo'](_0x1c9736,'execute',()=>this['_toggleDialog']()),_0x1c9736;}_hideDialogOnAnnotationEscape=_0x194098=>{const _0x50f417=_0x194098['source'];if(!this['annotationViews']['has'](_0x50f417['view']))return;const _0xde3767=this['editor']['plugins']['get']('Dialog');_0xde3767['isOpen']&&'commentsArchive'===_0xde3767['id']&&(_0xde3767['hide'](),_0x194098['stop']());};},Bi=class extends _0x4e5c7f{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};
|