@ckeditor/ckeditor5-comments 48.2.0 → 48.3.0-alpha.1
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/annotations/annotation.d.ts +84 -87
- package/dist/annotations/annotationcollection.d.ts +83 -83
- package/dist/annotations/annotations.d.ts +148 -148
- package/dist/annotations/annotationsuis.d.ts +235 -235
- package/dist/annotations/editorannotations.d.ts +71 -71
- package/dist/annotations/inlineannotations.d.ts +93 -93
- package/dist/annotations/narrowsidebar.d.ts +88 -88
- package/dist/annotations/sidebar.d.ts +105 -105
- package/dist/annotations/view/annotationcounterbuttonview.d.ts +24 -24
- package/dist/annotations/view/annotationview.d.ts +83 -83
- package/dist/annotations/view/sidebaritemview.d.ts +54 -54
- package/dist/annotations/view/sidebarview.d.ts +48 -48
- package/dist/annotations/widesidebar.d.ts +80 -80
- package/dist/augmentation.d.ts +57 -57
- package/dist/comments/addcommentthreadcommand.d.ts +69 -69
- package/dist/comments/commentsarchive.d.ts +34 -34
- package/dist/comments/commentsarchiveui.d.ts +48 -48
- package/dist/comments/commentsediting.d.ts +90 -90
- package/dist/comments/commentsrepository.d.ts +1042 -1054
- package/dist/comments/commentsui.d.ts +40 -40
- package/dist/comments/integrations/clipboard.d.ts +21 -21
- package/dist/comments/integrations/commentsrestrictededitingmode.d.ts +12 -12
- package/dist/comments/integrations/importword.d.ts +16 -16
- package/dist/comments/integrations/showcommenthighlights.d.ts +14 -14
- package/dist/comments/ui/commenteditor/commenteditor.d.ts +33 -32
- package/dist/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
- package/dist/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
- package/dist/comments/ui/commentthreadcontroller.d.ts +62 -60
- package/dist/comments/ui/view/basecommentthreadview.d.ts +134 -134
- package/dist/comments/ui/view/basecommentview.d.ts +136 -136
- package/dist/comments/ui/view/collapsedcommentsview.d.ts +9 -9
- package/dist/comments/ui/view/commentcontentview.d.ts +10 -10
- package/dist/comments/ui/view/commentinputview.d.ts +93 -93
- package/dist/comments/ui/view/commentsarchiveview.d.ts +41 -41
- package/dist/comments/ui/view/commentslistview.d.ts +107 -107
- package/dist/comments/ui/view/commentthreadheadercontextview.d.ts +19 -19
- package/dist/comments/ui/view/commentthreadheaderview.d.ts +67 -67
- package/dist/comments/ui/view/commentthreadinputview.d.ts +51 -51
- package/dist/comments/ui/view/commentthreadview.d.ts +116 -116
- package/dist/comments/ui/view/commentview.d.ts +225 -230
- package/dist/comments.d.ts +38 -38
- package/dist/commentsonly.d.ts +36 -36
- package/dist/config.d.ts +186 -186
- package/dist/index.d.ts +35 -35
- 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/dist/utils/common-translations.d.ts +6 -6
- package/dist/utils/createmutationobserver.d.ts +9 -9
- package/dist/utils/splitmarkername.d.ts +10 -10
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>bt)());constructor(_0x102b11={}){function _0x535737(_0x46edbc){return _0x46edbc['map'](_0xa92c1f=>String['fromCharCode'](_0xa92c1f))['join']('');}(_0x102b11=Object['assign']({},_0x102b11))['plugins']||(_0x102b11['plugins']=CommentEditor['defaultPlugins']),super(_0x102b11),this['ui']=new CommentEditorUI(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x535737([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x535737([0x76,0x69,0x65,0x77])][_0x535737([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x535737([0x61,0x75,0x74,0x6f]),this[_0x535737([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x535737([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x535737([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x535737([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x535737([0x6f,0x6b])});}['create'](){const _0x30aaf2=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x30aaf2))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x49ceb0=>{const _0x1353fd=this['model']['document']['getRoot'](),_0x1c4df5=_0x1353fd&&_0x1353fd['getChild'](_0x1353fd['childCount']-0x1);_0x49ceb0['setSelection'](_0x1c4df5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3e13d3=this['editing']['view'],_0x11f825=_0x3e13d3['document']['getRoot'](),_0x21dfee=_0x11f825['getChild'](0x0);_0x11f825['childCount']>0x1||!_0x21dfee||'p'!=_0x21dfee['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x3e13d3,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x21dfee['placeholder']=this['placeholder']),lt({'view':_0x3e13d3,'element':_0x21dfee,'keepOnFocus':!0x0}),this['placeholderElement']=_0x21dfee);}}class CommentInputView extends _0x4e8972{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x48d42c,_0x4a9b86={}){super(_0x48d42c),this['editor']=null,this['_editorConfig']=_0x4a9b86,this['set']('value',_0x4a9b86['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',vt(_0x48d42c,'Reply...')),this['set']('submitLabel',vt(_0x48d42c,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x846282(),this['focusTracker']=new _0x252bbd(),this['focusCycler']=new _0x10e0b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x466374=>!_0x466374['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',(_0x29679a,_0x31f07c)=>{this['cancelButtonView']['fire']('execute'),_0x31f07c();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3b1325,_0x4f651e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4f651e());}),this['on']('submit',(_0x475b87,_0x8a9449)=>{_0x8a9449['length']>0xfde8?(alert(vt(_0x48d42c,'TOO_LONG_COMMENT_ALERT',[_0x8a9449['length'],0xfde8])),_0x475b87['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new CommentEditor(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x324882=this['editor'];this['element']['insertBefore'](_0x324882['ui']['element'],this['element']['firstChild']),_0x324882['model']['document']['on']('change',()=>this['value']=_0x324882['getData']()),_0x324882['bind']('placeholder')['to'](this),this['focusables']['add'](_0x324882['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x103909){-0x1===_0x103909?(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:_0x4b54b5}=this,_0x2caa9f=new _0x1bde71(_0x4b54b5);return _0x2caa9f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2caa9f['withText']=!0x0,_0x2caa9f['bind']('label')['to'](this,'submitLabel'),_0x2caa9f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2caa9f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4f6cc2,_0x8dff61)=>!_0x8dff61&&!!_0x4f6cc2['trim']()),_0x2caa9f;}['_createCancelButton'](){const {locale:_0x48dcbb}=this,_0x1dbb3e=new _0x1bde71(_0x48dcbb);return _0x1dbb3e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1dbb3e['label']=vt(_0x48dcbb,'Cancel'),_0x1dbb3e['withText']=!0x0,_0x1dbb3e['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1dbb3e;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2ddaf0=>{this['focusTracker']['add'](_0x2ddaf0['element']);}),this['focusables']['on']('change',(_0x2ec0d2,_0x111bc0)=>{for(const _0xf24348 of Array['from'](_0x111bc0['added'])['reverse']())this['focusTracker']['add'](_0xf24348['element']);});}}class CommentThreadInputView extends _0x4e8972{constructor(_0x11f6ed,_0x51799d,_0x35d891){super(_0x11f6ed),this['commentInputView']=new CommentInputView(_0x11f6ed,_0x35d891),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3d89fd,_0x5bd5b7)=>_0x3d89fd||!!_0x5bd5b7),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 _0x159892(_0x11f6ed,_0x51799d),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'](_0x41efa8){this['commentInputView']['focus'](_0x41efa8);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x376ae6,_0x2d22d2)=>{const {submitButtonView:_0x2ed883,cancelButtonView:_0x443b44,editor:_0xb87896}=this['commentInputView'];[_0x2ed883['element'],_0x443b44['element'],_0xb87896?_0xb87896['editing']['view']['getDomRoot']():null]['filter'](_0x523478=>_0x523478)['some'](_0x5d2ec6=>_0x5d2ec6['contains'](_0x2d22d2['target']))||(this['focus'](),_0x2d22d2['preventDefault']());});}}class CollapsedCommentsView extends _0x4e8972{constructor(_0x2b0dbd){super(_0x2b0dbd);const _0x23c1c8=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x23c1c8['to']('count',_0x1fd650=>vt(_0x2b0dbd,'NUMBER_OF_COMMENTS',_0x1fd650))}]});}}class CommentsListView extends _0x4e8972{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1db52b,_0x5cdb49,_0x19230b){super(_0x1db52b);const _0x5b1863=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5cdb49['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5cdb49,this['_config']=_0x19230b,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x252bbd(),this['keystrokes']=new _0x846282(),this['focusCycler']=new _0x10e0b({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x251f96=>this['commentViews']['map'](_0x27635d=>_0x27635d['element'])['includes'](_0x251f96['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new CollapsedCommentsView(_0x1db52b),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x26a0e6=>_0x26a0e6-this['_config']['maxCommentsWhenCollapsed']);for(const _0xcb91f6 of _0x5cdb49['comments'])this['_handleNewCommentModel'](_0xcb91f6);this['_handleInfoComment'](),this['listenTo'](_0x5cdb49['comments'],'add',(_0x5782fe,_0x1980f7)=>{const _0x4bb8a2=this['_calculatePosition'](_0x1980f7);this['length']++,this['_handleNewCommentModel'](_0x1980f7,_0x4bb8a2),this['refreshVisibleViews']();}),this['listenTo'](_0x5cdb49['comments'],'remove',(_0x3aa1b2,_0x2a4cdf)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2a4cdf),this['refreshVisibleViews']();}),this['listenTo'](_0x5cdb49,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5cdb49,'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',_0x5b1863['if']('length','ck-hidden',_0x483684=>!_0x483684)],'aria-label':vt(_0x1db52b,'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'](_0x280128){-0x1===_0x280128?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4b3d4d of this['commentViews'])_0x4b3d4d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x36c004,_0x35e30a){const _0x3a7f38=new this['_config']['CommentView'](this['locale'],_0x36c004,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3a7f38['viewUid']=_0x36c004['id'],_0x3a7f38['delegate']('removeComment')['to'](this),_0x3a7f38['delegate']('updateComment')['to'](this),_0x3a7f38['delegate']('resolveCommentThread')['to'](this),_0x3a7f38['delegate']('editorReady')['to'](this),_0x3a7f38['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3a7f38,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3a7f38,_0x35e30a);}['_calculatePosition'](_0x59ff97){const _0x399c68=this['_model']['_findOptimalIndex'](_0x59ff97);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x59ff97['authoredAt']?_0x399c68-0x1:_0x399c68:_0x399c68-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5df575={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':vt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x5df575,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5df575));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x263c7e){const _0x4d2859=this['commentViews']['remove'](_0x263c7e['id']);this['stopListening'](_0x4d2859),_0x4d2859['isEditMode']&&this['_updateHasDirtyComment'](),_0x4d2859['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x13fc16=>_0x13fc16['isEditMode']);}['_rearrangeCollapse'](){const _0x2bf46b=function(_0x14c195){const _0x6a15d7=new _0x499a27();for(const _0xc6fab1 of _0x14c195)_0x6a15d7['add'](_0xc6fab1);return _0x6a15d7;}(this['commentViews']),_0x1ad04b=this['_collapsedCommentsView']['count'];for(let _0x2efed1=0x1;_0x2efed1<=_0x1ad04b;_0x2efed1++)_0x2bf46b['remove'](0x1);for(const _0x5b7698 of _0x2bf46b)_0x5b7698['collapse']();_0x1ad04b>0x0&&_0x2bf46b['add'](this['_collapsedCommentsView'],0x1),Et(_0xdd14c4(Array['from'](this['visibleViews']),Array['from'](_0x2bf46b)),this['visibleViews'],_0x2bf46b);}['_rearrangeExpand'](){Et(_0xdd14c4(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x42635e of this['visibleViews'])_0x42635e['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4669b7=>{this['focusTracker']['add'](_0x4669b7['element']),this['keystrokes']['listenTo'](_0x4669b7['element']);}),this['commentViews']['on']('change',(_0x5d3745,_0x9cc04f)=>{for(const _0x30a7b9 of _0x9cc04f['removed'])this['focusTracker']['remove'](_0x30a7b9['element']),this['keystrokes']['stopListening'](_0x30a7b9['element']);for(const _0x296f99 of Array['from'](_0x9cc04f['added'])['reverse']())this['focusTracker']['add'](_0x296f99['element']),this['keystrokes']['listenTo'](_0x296f99['element']);});}}function Et(_0x181c70,_0x22537e,_0x46d061){let _0x4884ac=0x0;for(const _0x422e46 of _0x181c70)switch(_0x422e46){case'insert':_0x22537e['add'](_0x46d061['get'](_0x4884ac),_0x4884ac),_0x4884ac++;break;case'delete':_0x22537e['remove'](_0x4884ac);break;case'equal':_0x4884ac++;}}class CommentThreadHeaderContextView extends _0x4e8972{constructor(_0x23cdc3){super(_0x23cdc3);const _0x5abfef=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5abfef['to']('contextValue',_0x473de8=>vt(_0x23cdc3,'THREAD_CONTEXT_LABEL',_0x473de8)),'tabindex':-0x1},'children':[{'text':_0x5abfef['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class CommentThreadHeaderView extends _0x4e8972{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xb0f464,_0xbcb683){super(_0xb0f464);const _0x35b6c5=this['bindTemplate'];this['_model']=_0xbcb683,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x252bbd(),this['keystrokes']=new _0x846282(),this['focusCycler']=new _0x10e0b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x585147=>!!_0x585147),this['bind']('contextValue')['to'](this['_model'],'context',_0x59d9d8=>_0x59d9d8&&_0x59d9d8['value']?this['_trimContextValue'](_0x59d9d8['value']):vt(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',_0x35b6c5['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 _0x3083c3=new _0x1bde71(this['locale']);return _0x3083c3['label']=vt(this['locale'],'Reopen'),_0x3083c3['tooltip']=vt(this['locale'],'Reopen'),_0x3083c3['icon']=_0x15ef58,_0x3083c3['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x16f2ac=>!_0x16f2ac),_0x3083c3['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3cf733,_0x26b526)=>_0x3cf733&&_0x26b526),_0x3083c3['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3083c3;}['_trimContextValue'](_0x3b6c66){if(_0x3b6c66['length']<0x96)return _0x3b6c66;const _0x19a192=_0x3b6c66['lastIndexOf']('\x20',0x93);return _0x3b6c66['substring'](0x0,_0x19a192>-0x1?_0x19a192:0x93)+'...';}['_attachContextActions'](){const _0x20b77c=this['element']['querySelector']('.ck-context'),_0x3d48e5=_0x20b77c['querySelector']('.ck-context__value');this['listenTo'](_0x20b77c,'mouseenter',()=>{_0x3d48e5['offsetWidth']<_0x3d48e5['scrollWidth']&&_0x20b77c['classList']['add']('overlay');}),this['listenTo'](_0x20b77c,'mouseleave',()=>{_0x20b77c['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4d24aa of this['focusables'])this['focusTracker']['add'](_0x4d24aa['element']),this['keystrokes']['listenTo'](_0x4d24aa['element']);}['_createContextView'](){const _0xde9e33=new CommentThreadHeaderContextView(this['locale']);return _0xde9e33['bind']('contextValue')['to'](this),_0xde9e33;}}class BaseCommentThreadView extends _0x4e8972{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5326c8,_0x173032,_0x50bb2a,_0x4e858d){super(_0x5326c8),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x173032,this['_localUser']=_0x50bb2a,this['_config']=_0x4e858d,this['commentThreadHeaderView']=new CommentThreadHeaderView(_0x5326c8,_0x173032),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3182ea(_0x5326c8,vt(_0x5326c8,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new CommentsListView(_0x5326c8,_0x173032,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4e858d)),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',(_0x5cfacf,_0x2d8fcc)=>_0x5cfacf||!!_0x2d8fcc),this['bind']('isUnlinked')['to'](_0x173032,'unlinkedAt',_0x493be1=>!!_0x493be1),this['bind']('ariaLabel')['to'](this,'length',_0x3ed18e=>{const _0x17c70e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return vt(this['locale'],'COMMENT_THREAD_LABEL',[_0x3ed18e,_0x17c70e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x252bbd(),this['keystrokes']=new _0x846282(),this['focusCycler']=new _0x10e0b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x59bb79=>_0x59bb79['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0xa38b70(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x509f57=new CommentThreadInputView(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2af7c5=_0x509f57['commentInputView'];return _0x509f57['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2af7c5,'value',(_0x1383cc,_0x3a8ad5,_0x511a5a,_0x584674,_0x4a33e3)=>!!_0x4a33e3||!!_0x584674&&_0x511a5a&&!_0x3a8ad5||_0x1383cc&&_0x511a5a&&!_0x3a8ad5),_0x2af7c5['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4dc5e2,_0x1aede1,_0x1857e0)=>{let _0x760f8c;return _0x760f8c=_0x1857e0&&_0x1aede1?'Reply\x20to\x20reopen\x20discussion...':_0x4dc5e2?'Reply...':'Write\x20a\x20comment...',vt(this['locale'],_0x760f8c);}),_0x2af7c5['bind']('submitLabel')['to'](this,'length',_0x5ec999=>vt(this['locale'],_0x5ec999?'Reply':'Comment')),_0x2af7c5['on']('submit',(_0x34da39,_0x5bfb8d)=>{this['fire']('addComment',_0x5bfb8d),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2af7c5['on']('cancel',()=>{this['focus']();}),_0x2af7c5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2af7c5['on']('cancel',_0x39cde5=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x39cde5['stop']());}),this['on']('change:isActive',(_0x3391f8,_0x282970,_0x32fbe9)=>{_0x32fbe9||this['length']||_0x2af7c5['value']||this['fire']('removeCommentThread');}),_0x509f57;}}class CommentThreadView extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x1861d7(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xa287ef,target:_0x4850f9,type:_0x14503a,isVisible:_0x1e327c=!0x0}){super(),this['view']=_0xa287ef,this['view']['element']||this['view']['render'](),this['_type']=_0x14503a,this['_target']=_0x4850f9,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x499a27([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1ead53,_0x3fe945)=>{this['view']['focusTracker']['add'](_0x3fe945);}),this['focusableElements']['on']('remove',(_0x5eedf9,_0xa5b248)=>{this['view']['focusTracker']['remove'](_0xa5b248);}),this['set']('isVisible',_0x1e327c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3b5f94=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x3b5f94),_0x3b5f94;}get['targetRect'](){const _0x4e291c=this['target'];if(null===_0x4e291c)return null;if(_0x4e291c instanceof _0x416d7d)return _0x4e291c;const _0x5462e6=_0x4e291c['filter'](_0x1c38c1=>function(_0x428428){const _0x48827d=_0x428428['offsetParent'];if(_0x48827d)return!0x0;const _0x99b676=_0x428428['getClientRects']()['item'](0x0);return!!_0x99b676;}(_0x1c38c1));return 0x0===_0x5462e6['length']?null:_0x416d7d['getDomElementRects'](_0x5462e6[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x534e67){this['view']['isActive']=_0x534e67,this['view']['mainView']['isActive']=_0x534e67;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x5d1645){if(!(null===_0x5d1645||_0x5d1645 instanceof _0x416d7d||Array['isArray'](_0x5d1645)&&_0x5d1645['every'](_0x19e2b7=>kt(_0x19e2b7))))throw new _0x21ce1d('annotation-invalid-target',null,{'target':_0x5d1645});}['_getNormalizedTarget'](){const _0x54950e='function'==typeof this['_target']?this['_target']():this['_target'];return kt(_0x54950e)?[_0x54950e]:_0x54950e;}}function kt(_0x390e58){return null!==_0x390e58&&'object'==typeof _0x390e58&&'nodeType'in _0x390e58&&0x1===_0x390e58['nodeType'];}class AnnotationCollection extends _0x499a27{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0xf7d841=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x252bbd(),this['_focusTracker']['on']('change:isFocused',(_0x42e6a2,_0x1d099c,_0x39fb05)=>{_0x39fb05||this['fire']('blur');});for(const _0x81b0b4 of _0xf7d841)this['add'](_0x81b0b4);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xf9e47f){if(this['has'](_0xf9e47f))throw new _0x21ce1d('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xf9e47f['innerView'],_0xf9e47f),this['_viewToAnnotation']['set'](_0xf9e47f['view'],_0xf9e47f);for(const _0x2d8199 of _0xf9e47f['focusableElements'])this['_focusTracker']['add'](_0x2d8199);if(this['listenTo'](_0xf9e47f['focusableElements'],'add',(_0x353770,_0x1559d7)=>{this['_focusTracker']['add'](_0x1559d7);}),this['listenTo'](_0xf9e47f['focusableElements'],'remove',(_0xfe240e,_0x22455f)=>{this['_focusTracker']['remove'](_0x22455f);}),this['listenTo'](_0xf9e47f['view']['focusTracker'],'change:isFocused',(_0x5e93a6,_0x370c04,_0x1a9aaf)=>{_0x1a9aaf&&this['fire']('focus',_0xf9e47f);}),_0xf9e47f['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x16c714 of this)_0x16c714['updateTargetRect']();}const _0x38bb4f=this['_getOrderInContent'](_0xf9e47f['view']['targetRect']);return super['add'](_0xf9e47f,_0x38bb4f);}['remove'](_0x343763){if(!this['has'](_0x343763))throw new _0x21ce1d('annotationcollection-not-existing-item',null);this['stopListening'](_0x343763['view']['focusTracker']),this['stopListening'](_0x343763['focusableElements']);for(const _0x38fff4 of _0x343763['focusableElements'])this['_focusTracker']['remove'](_0x38fff4);return this['_viewToAnnotation']['delete'](_0x343763['view']),this['_innerViewToAnnotation']['delete'](_0x343763['innerView']),super['remove'](_0x343763);}['getByInnerView'](_0x254c49){return this['_innerViewToAnnotation']['get'](_0x254c49);}['getByView'](_0x4fbed5){return this['_viewToAnnotation']['get'](_0x4fbed5);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2c4735 of this)_0x2c4735['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1f79eb=Array['from'](this)['sort']((_0x425505,_0x1c850d)=>Rt(_0x425505['view']['targetRect'],_0x1c850d['view']['targetRect']));for(let _0x99444c=_0x1f79eb['length']-0x1;_0x99444c>0x0;_0x99444c--){const _0x56cfcb=_0x1f79eb[_0x99444c];_0x99444c!==this['getIndex'](_0x56cfcb)&&(this['remove'](_0x56cfcb),this['add'](_0x56cfcb));}}['_getOrderInContent'](_0x56fe36){let _0x1df83e=0x0;if(!_0x56fe36)return this['length'];for(const _0x1766e8 of this){const _0x31d5ce=_0x1766e8['view']['targetRect'];if(_0x31d5ce){if(Rt(_0x56fe36,_0x31d5ce)<0x0)return _0x1df83e;_0x1df83e++;}}return _0x1df83e;}['_areCachedRectsStale'](){const _0x59ce2b=this['get'](0x0);if(!_0x59ce2b)return!0x1;const _0x53fc2c=_0x59ce2b['view']['targetRect'],_0x144894=_0x59ce2b['targetRect'];return!(!_0x53fc2c||!_0x144894)&&(_0x53fc2c['top']!==_0x144894['top']||_0x53fc2c['left']!==_0x144894['left']);}}function Ot({source:_0x131409,target:_0x290e9f,filter:_0x1bbb68}){for(const _0x270703 of _0x131409)_0x1bbb68(_0x270703)&&_0x290e9f['add'](_0x270703);_0x290e9f['listenTo'](_0x131409,'add',(_0x5cd6f2,_0x3e658e)=>{_0x1bbb68(_0x3e658e)&&_0x290e9f['add'](_0x3e658e);}),_0x290e9f['listenTo'](_0x131409,'remove',(_0x22fc2f,_0x10c0b6)=>{_0x290e9f['has'](_0x10c0b6)&&_0x290e9f['remove'](_0x10c0b6);});}function Rt(_0x511d77,_0xa3497d){if(null===_0x511d77&&null===_0xa3497d)return 0x0;if(null===_0x511d77)return-0x1;if(null===_0xa3497d)return 0x1;const _0x14b4a9=_0x511d77['top']-_0xa3497d['top'];return 0x0==_0x14b4a9?_0x511d77['left']-_0xa3497d['left']:_0x14b4a9;}class Annotations extends _0x283925{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19aabb){if(super(_0x19aabb),this['collection']=new AnnotationCollection(),this['_visibleAnnotations']=new AnnotationCollection(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x19aabb instanceof _0x441226){const _0xab3f56=_0x19aabb['locale'];_0x19aabb['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2cb927){this['collection']['add'](_0x2cb927);}['remove'](_0xd120cf){this['collection']['remove'](_0xd120cf),_0xd120cf['destroy']();}['refreshVisibility'](){for(const _0x63d996 of this['collection'])_0x63d996['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x353243){return this['collection']['getByInnerView'](_0x353243);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xfffa00 of this['collection'])_0xfffa00['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1d46cc){this['fire']('_activateAnnotation',_0x1d46cc);}['createAnnotation'](_0x379575){return new Annotation(_0x379575);}['createAnnotationView'](_0x525505,_0x9b7cc1){return new AnnotationView(_0x525505,_0x9b7cc1);}['_addActiveAnnotation'](_0x2de883){const _0x5708bb=new Set(this['activeAnnotations']);_0x5708bb['add'](_0x2de883),this['activeAnnotations']=_0x5708bb;}['_removeActiveAnnotation'](_0x52b723){const _0x662710=new Set(this['activeAnnotations']);_0x662710['delete'](_0x52b723),this['activeAnnotations']=_0x662710;}['_bindAnnotationsToVisibleAnnotations'](){const _0x396f8a=this['collection'],_0x1a0c98=this['_visibleAnnotations'];function _0x36bdbe(_0x2a294b){const _0x33aca4=_0x2a294b['source'];_0x33aca4['isVisible']&&!_0x1a0c98['has'](_0x33aca4)?_0x1a0c98['add'](_0x33aca4):!_0x33aca4['isVisible']&&_0x1a0c98['has'](_0x33aca4)&&_0x1a0c98['remove'](_0x33aca4),_0x33aca4['view']['focusTracker']['remove'](_0x33aca4['view']['element']),_0x33aca4['view']['focusTracker']['add'](_0x33aca4['view']['element']);}this['listenTo'](_0x396f8a,'add',(_0x2b0077,_0x122512)=>{_0x122512['isVisible']&&_0x1a0c98['add'](_0x122512),this['listenTo'](_0x122512,'change:isVisible',_0x36bdbe);}),this['listenTo'](_0x396f8a,'remove',(_0x4dfd89,_0x49c06c)=>{_0x1a0c98['has'](_0x49c06c)&&_0x1a0c98['remove'](_0x49c06c),this['stopListening'](_0x49c06c,'change:isVisible',_0x36bdbe);});}['_setupEnterAnnotationKeystroke'](){const _0x52f528=_0x16fd43=>{_0x16fd43['on']('ready',()=>{_0x16fd43['keystrokes']['set'](_0x130533,(_0x1e3a93,_0xf4017b)=>{const _0x4e3899=_0x548c32(this['activeAnnotations']['values']());_0x4e3899&&(_0x4e3899['view']['focus'](),_0xf4017b());});});};this['context']instanceof _0x441226?_0x52f528(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5417e1,_0xf9d793)=>{_0x52f528(_0xf9d793);});}['_setupEscapeAnnotationHandling'](){const _0x4f09bf=_0x5595fa=>{const _0x57c0a4=_0x5595fa['source'],_0x2a72c5=[];let _0x441871;if(Array['isArray'](_0x57c0a4['target'])){_0x441871=_0x57c0a4['target'][0x0],this['context']instanceof _0x441226?_0x2a72c5['push'](this['context']):this['context']['editors']&&_0x2a72c5['push'](...this['context']['editors']);for(const _0x85688d of _0x2a72c5)for(const _0xdb0e6e of _0x85688d['editing']['view']['domRoots']['values']())if(_0xdb0e6e['contains'](_0x441871))return void _0x85688d['editing']['view']['focus']();_0x441871['focus']();}};this['listenTo'](this['collection'],'add',(_0x263942,_0x34f6f9)=>{this['listenTo'](_0x34f6f9,'escape',_0x4f09bf,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x326a1d,_0x35ab3f)=>{this['stopListening'](_0x35ab3f,'escape',_0x4f09bf);});}}const Mt=Symbol('noChannel'),St={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class CommentsRepository extends _0x283925{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[Annotations,_0x1dce2a,_0x3bef93];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2d551b){super(_0x2d551b),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3facf8=this['context']['config'];_0x3facf8['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3facf8['define']('comments.maxThreadTotalWeight',0x1f4),_0x3facf8['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3facf8['define']('comments.CommentThreadView',CommentThreadView),_0x3facf8['define']('comments.CommentView',CommentView),_0x3facf8['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5ef50e=this['context']['plugins']['get'](Annotations);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5eeb05,_0x47c089)=>this['_addCommentThread'](_0x47c089)),this['on']('submitCommentThread',(_0x5ad326,_0x3e2c8d)=>this['_submitCommentThread'](_0x3e2c8d)),this['on']('resolveCommentThread',(_0xbf0e13,_0x138944)=>this['_resolveCommentThread'](_0x138944)),this['on']('resolveCommentThread',(_0x447a2f,_0xab248a)=>this['_updateActiveAnnotation'](_0xab248a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x42e987,_0x56d8eb)=>this['_reopenCommentThread'](_0x56d8eb)),this['on']('reopenCommentThread',(_0x538022,_0x4ff1e8)=>this['_updateActiveAnnotation'](_0x4ff1e8),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2c98d0,_0x4f9f37)=>this['_removeCommentThread'](_0x4f9f37)),this['on']('updateCommentThread',(_0x1b5bc0,_0x2df4f3)=>this['_updateCommentThread'](_0x2df4f3)),this['on']('updateCommentThread',(_0x2f03d7,_0x52d1a8)=>this['_updateActiveAnnotation'](_0x52d1a8),{'priority':'lowest'}),this['on']('addComment',(_0x25955d,_0xc49ff)=>this['_addComment'](_0xc49ff)),this['on']('updateComment',(_0x1c6c21,_0x443cc8)=>this['_updateComment'](_0x443cc8)),this['on']('removeComment',(_0x4d1af4,_0x21b6ea)=>this['_removeComment'](_0x21b6ea)),this['on']('addComment',(_0x18f87d,{threadId:_0x48279c,isFromAdapter:_0x1c328a})=>{if(_0x1c328a)return;const _0x1d0e7e=this['getCommentThread'](_0x48279c),_0x37281e=_0x1d0e7e&&this['_threadToController']['get'](_0x1d0e7e);_0x37281e&&_0x37281e['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5ef50e,'change:activeAnnotations',(_0x437327,_0x38262a,_0x2e2214)=>{const _0xcff0d=Array['from'](_0x2e2214)['map'](_0x424068=>this['_viewToController']['get'](_0x424068['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xcff0d?_0xcff0d['model']:null;});}set['adapter'](_0x4cd08c){if(this['_adapter'])throw new _0x21ce1d('commentsrepository-adapter-already-set');this['_adapter']=_0x4cd08c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4848fb=Mt,threadId:_0x4e1f28=_0x308b6(),comments:_0x51ed94=[],unlinkedAt:_0x2c878e=null,resolvedAt:_0x3b2b6a=null,resolvedBy:_0x4f29cb=null,target:_0x6781ec=null,context:_0x219788=null,attributes:_0x98630c={},isResolvable:_0x316c4e=!0x0,isSubmitted:_0x83b52d=!0x1,isFromAdapter:_0x232886=!0x1}={}){return this['fire'](xt('addCommentThread',_0x4848fb),{'channelId':_0x4848fb,'threadId':_0x4e1f28,'comments':_0x51ed94,'unlinkedAt':_0x2c878e,'resolvedAt':_0x3b2b6a,'resolvedBy':_0x4f29cb,'target':_0x6781ec,'context':_0x219788,'attributes':_0x98630c,'isFromAdapter':_0x232886,'isResolvable':_0x316c4e,'isSubmitted':_0x83b52d}),this['getCommentThread'](_0x4e1f28);}['openNewCommentThread']({channelId:_0x2d8bbe=Mt,threadId:_0x5d14d4=_0x308b6(),target:_0x228094,context:_0x472244=null,isResolvable:_0x2b2ff7=!0x0}){if(this['_readOnlyChannels']['has'](_0x2d8bbe)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x228094)throw new _0x21ce1d('commentsrepository-missing-target');const _0x42a7f6=this['addCommentThread']({'channelId':_0x2d8bbe,'threadId':_0x5d14d4,'target':_0x228094,'context':_0x472244,'isResolvable':_0x2b2ff7});if(!_0x42a7f6)return null;const _0x312e60=this['_threadToController']['get'](_0x42a7f6),_0x4803b1=_0x312e60['view']['commentThreadInputView']['commentInputView'],_0x2ecb05=this['context']['plugins']['get'](Annotations),_0x5a6112=_0x2ecb05['getByInnerView'](_0x312e60['view']);return _0x2ecb05['activate'](_0x5a6112),_0x4803b1['once']('editorReady',()=>_0x4803b1['focus']()),_0x42a7f6;}['hasCommentThread'](_0x38ba75){if('string'!=typeof _0x38ba75)throw new _0x21ce1d('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x38ba75);}['updateCommentThread']({channelId:_0x3fed68=Mt,threadId:_0x4e2d49,context:_0x2d5c5c,unlinkedAt:_0x1e35de,attributes:_0x5bdd40,isFromAdapter:_0x4cd7f6=!0x1}){return this['fire'](xt('updateCommentThread',_0x3fed68),{'channelId':_0x3fed68,'threadId':_0x4e2d49,'context':_0x2d5c5c,'unlinkedAt':_0x1e35de,'attributes':_0x5bdd40,'isFromAdapter':_0x4cd7f6}),this['getCommentThread'](_0x4e2d49);}['getCommentThread'](_0x1e115c){if('string'!=typeof _0x1e115c)throw new _0x21ce1d('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1e115c);}['fetchCommentThread']({channelId:_0x44e228,threadId:_0x37a47f}={}){const _0x1a5300=this['getCommentThread'](_0x37a47f);if(_0x1a5300)return Promise['resolve'](_0x1a5300);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x21ce1d('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x44e228,'threadId':_0x37a47f})['then'](_0x2df4a7=>this['hasCommentThread'](_0x37a47f)?this['getCommentThread'](_0x37a47f):_0x2df4a7?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x44e228},_0x2df4a7)):void 0x0)['catch'](_0x5d80c1=>{throw console['error'](_0x5d80c1),new _0x21ce1d('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x267eac,skipNotAttached:_0x3fefeb=!0x1,skipEmpty:_0x2b8df9=!0x1,toJSON:_0x378622=!0x1}={}){const _0x428f3e=[];for(const _0x5d8a6e of this['_threads']['values']())_0x267eac&&_0x5d8a6e['channelId']!==_0x267eac||_0x3fefeb&&!_0x5d8a6e['isAttached']||_0x2b8df9&&0x0===_0x5d8a6e['length']||_0x428f3e['push'](_0x5d8a6e);return _0x378622?_0x428f3e['map'](_0x723a9e=>_0x723a9e['toJSON']()):_0x428f3e;}['getAnnotationForCommentThread'](_0x35f58f){const _0x138e60=this['_threadToController']['get'](_0x35f58f);if(!_0x138e60)return null;return this['context']['plugins']['get'](Annotations)['getByInnerView'](_0x138e60['view'])||null;}['getCommentThreadForAnnotation'](_0x4025d3){const _0x31da9d=this['_viewToController']['get'](_0x4025d3['innerView']);return _0x31da9d?_0x31da9d['model']:null;}['setActiveCommentThread'](_0x28cc8a){const _0x4e6ed5=this['context']['plugins']['get'](Annotations);if(!_0x28cc8a)return void(this['activeCommentThread']&&_0x4e6ed5['deactivateAll']());const _0x1529a9=this['getCommentThread'](_0x28cc8a);if(!_0x1529a9)throw new _0x21ce1d('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x28cc8a});if(!this['_threadToController']['has'](_0x1529a9))throw new _0x21ce1d('commentsrepository-active-not-attached',null,{'threadId':_0x28cc8a});const _0x3efb2d=_0x4e6ed5['getByInnerView'](this['_threadToController']['get'](_0x1529a9)['view']);_0x4e6ed5['activate'](_0x3efb2d);}['switchReadOnly'](_0x444f35,_0x13f673){_0x444f35?this['_readOnlyChannels']['add'](_0x13f673):this['_readOnlyChannels']['delete'](_0x13f673),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1e2f13){return this['_readOnlyChannels']['has'](_0x1e2f13)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2efa08,_0x45aed7){return new CommentThreadController(_0x2efa08,_0x45aed7);}['setPermissions'](_0x43f759,_0x289621=Mt){this['_permissions']['set'](_0x289621,_0x43f759),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x52d692=Mt){return this['_permissions']['has'](_0x52d692)?this['_permissions']['get'](_0x52d692):St;}['_addCommentThread']({channelId:_0x3957d1,threadId:_0x53447b,comments:_0xd0389e,unlinkedAt:_0x5f4e2b,resolvedAt:_0x82b4a1,resolvedBy:_0x40b979,target:_0x4673c4,context:_0x30fb08,attributes:_0x4eeb03,isFromAdapter:_0x13ab22,isResolvable:_0xf96e14,isSubmitted:_0x7aad69}){if('string'!=typeof _0x53447b)throw new _0x21ce1d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x53447b});if(this['hasCommentThread'](_0x53447b))throw new _0x21ce1d('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x53447b});const _0x2f238b=new CommentThread(this,{'channelId':_0x3957d1,'id':_0x53447b,'context':_0x30fb08,'attributes':_0x4eeb03,'unlinkedAt':_0x5f4e2b,'resolvedAt':_0x82b4a1,'resolvedBy':_0x40b979?this['context']['plugins']['get'](_0x3bef93)['getUser'](_0x40b979):null,'isResolvable':_0xf96e14,'isSubmitted':_0x7aad69||_0x13ab22});this['_threads']['set'](_0x53447b,_0x2f238b);for(const _0x266614 of _0xd0389e)_0x2f238b['_add'](this['_createNewComment']({'threadId':_0x53447b,..._0x266614}));return _0x4673c4&&_0x2f238b['attachTo'](_0x4673c4),_0x13ab22||!_0x2f238b['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3957d1,'threadId':_0x53447b});}['_submitCommentThread']({channelId:_0x2894a8,threadId:_0x37c2bd}){if(!this['hasCommentThread'](_0x37c2bd))throw new _0x21ce1d('commentsrepository-missing-comment-thread',this);const _0x299bb9=this['getCommentThread'](_0x37c2bd);if(_0x299bb9['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x18d568,comments:_0x4e8044,resolvedAt:_0x695b17,resolvedBy:_0x2f7b57,context:_0x39109f,attributes:_0x81d4ef}=_0x299bb9,_0x1da6b1=this['context']['plugins']['get']('PendingActions'),_0x15f292=_0x1da6b1['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2894a8,'threadId':_0x18d568,'comments':_0x4e8044['map'](_0xd2619e=>_0xd2619e['toJSON']()),'resolvedAt':_0x695b17,'resolvedBy':_0x2f7b57?_0x2f7b57['id']:_0x2f7b57,'context':_0x39109f,'attributes':_0x81d4ef})['then'](({comments:_0x4c731c})=>{_0x1da6b1['remove'](_0x15f292);for(const _0x1a25dc of _0x4c731c)this['_updateComment']({'channelId':_0x2894a8,'threadId':_0x37c2bd,'commentId':_0x1a25dc['commentId'],'createdAt':_0x1a25dc['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1fb214=>{throw console['error'](_0x1fb214),new _0x21ce1d('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4deaea,target:_0x9d20d0}){const _0x273942=this['getCommentThread'](_0x4deaea);if(!_0x273942)throw new _0x21ce1d('commentsrepository-attach-missing-comment-thread',this);const _0x3a7154=this['context']['plugins']['get']('PendingActions'),_0x350082=this['context']['plugins']['get'](Annotations),_0x282656=this['_createCommentThreadView'](_0x273942),_0x18f56d=new CommentThreadController(_0x273942,_0x282656);let _0x4d8775=null;_0x282656['on']('change:isDirty',(_0x2aeafc,_0x21b349,_0x508a6a)=>{_0x508a6a?_0x4d8775=_0x3a7154['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4d8775&&(_0x3a7154['remove'](_0x4d8775),_0x4d8775=null);}),this['_threadToController']['set'](_0x273942,_0x18f56d),this['_viewToController']['set'](_0x282656,_0x18f56d);const _0x5b3738=new AnnotationView(this['context']['locale'],_0x282656);_0x5b3738['bind']('length')['to'](_0x282656),_0x5b3738['bind']('isDirty')['to'](_0x282656,'isDirty',_0x282656,'length',(_0x47cbff,_0x39ecb4)=>_0x47cbff||!_0x39ecb4),_0x5b3738['bind']('isActive')['to'](_0x282656),_0x5b3738['type']='comment';const _0x553f16=new Annotation({'view':_0x5b3738,'target':_0x9d20d0,'type':'comment','isVisible':!_0x273942['archivedAt']&&!!('function'==typeof _0x9d20d0?_0x9d20d0():_0x9d20d0)});return _0x282656['on']('escape',()=>{_0x553f16['fire']('escape');}),this['_bindAnnotationToEditors'](_0x282656,_0x553f16),_0x350082['add'](_0x553f16),_0x553f16;}['_bindAnnotationToEditors'](_0x544ecb,_0x54818b){this['listenTo'](_0x544ecb,'editorReady',(_0x4b254e,_0x35a500)=>{const _0x3d7097=_0x35a500['ui']['view']['body']['bodyCollectionContainer'];_0x54818b['focusableElements']['add'](_0x3d7097),this['context']instanceof _0x441226&&this['context']['ui']['focusTracker']['add'](_0x3d7097);},{'priority':'highest'}),this['listenTo'](_0x544ecb,'editorDestroyed',(_0x38c14c,_0x5167df)=>{const _0x4bfa8c=_0x5167df['ui']['view']['body']['bodyCollectionContainer'];_0x54818b['focusableElements']['has'](_0x4bfa8c)&&_0x54818b['focusableElements']['remove'](_0x4bfa8c),this['context']instanceof _0x441226&&this['context']['ui']['focusTracker']['remove'](_0x4bfa8c);});}['_unbindEditors'](_0x450969){this['stopListening'](_0x450969,'editorReady'),this['stopListening'](_0x450969,'editorDestroyed');}['_createCommentThreadView'](_0x25daa8){const _0xa8e954=this['context']['plugins']['get'](_0x3bef93),{config:_0x8af9ac,locale:_0x2b4546}=this['context'],_0x48f355=_0x3a40bc(_0x8af9ac['get']('locale'),_0x2b4546);return new(0x0,(_0x8af9ac['get']('comments'))['CommentThreadView'])(_0x2b4546,_0x25daa8,_0xa8e954['me'],{'editorConfig':{..._0x8af9ac['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x8af9ac['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x8af9ac['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x8af9ac['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x8af9ac['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x48f355,'CommentView':_0x8af9ac['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4f63d4,channelId:_0x23cbf5,resolvedAt:_0x964a48,resolvedBy:_0x2fcfe6,isFromAdapter:_0x45907e}){if(!this['hasCommentThread'](_0x4f63d4))throw new _0x21ce1d('commentsrepository-missing-comment-thread',null,{'threadId':_0x4f63d4});const _0x1c865b=this['getCommentThread'](_0x4f63d4);if(_0x1c865b['isResolved'])throw new _0x21ce1d('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4f63d4});const _0x59ec59=this['context']['plugins']['get'](_0x3bef93);if(_0x1c865b['resolvedBy']=_0x59ec59['getUser'](_0x2fcfe6),_0x1c865b['resolvedAt']=_0x964a48,_0x45907e||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2e7f8d=this['context']['plugins']['get']('PendingActions'),_0x5743c8=_0x2e7f8d['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x23cbf5,'threadId':_0x4f63d4})['then'](({resolvedAt:_0x357449,resolvedBy:_0x129ee})=>{_0x2e7f8d['remove'](_0x5743c8),_0x1c865b['resolvedBy']['id']!==_0x129ee&&(_0x1c865b['resolvedBy']=_0x59ec59['getUser'](_0x129ee)),_0x1c865b['resolvedAt']=_0x357449;})['catch'](_0x56addf=>{throw console['error'](_0x56addf),new _0x21ce1d('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2ea4e5,channelId:_0x177074,isFromAdapter:_0x46fd02}){if(!this['hasCommentThread'](_0x2ea4e5))throw new _0x21ce1d('commentsrepository-missing-comment-thread',null,{'threadId':_0x2ea4e5});const _0x352b86=this['getCommentThread'](_0x2ea4e5);if(!_0x352b86['isResolved'])throw new _0x21ce1d('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2ea4e5});if(_0x352b86['resolvedBy']=null,_0x352b86['resolvedAt']=null,_0x46fd02||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4ff93f=this['context']['plugins']['get']('PendingActions'),_0x2cbc52=_0x4ff93f['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x177074,'threadId':_0x2ea4e5})['then'](()=>_0x4ff93f['remove'](_0x2cbc52))['catch'](_0x5242e1=>{throw console['error'](_0x5242e1),new _0x21ce1d('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1b3055,isFromAdapter:_0x3dbb23}){const _0x4a50ad=this['getCommentThread'](_0x1b3055);if(!_0x4a50ad)throw new _0x21ce1d('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1b3055),this['_threads']['delete'](_0x1b3055),!_0x4a50ad['isSubmitted']||_0x3dbb23||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2862ad=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44ce56}=_0x4a50ad,_0x335494=_0x2862ad['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x44ce56,'threadId':_0x1b3055})['then'](()=>_0x2862ad['remove'](_0x335494))['catch'](_0x67f438=>{throw console['error'](_0x67f438),new _0x21ce1d('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4acbd1,unlinkedAt:_0x3d7c43,context:_0x47089d,attributes:_0x3a9b05,isFromAdapter:_0x3dd193}){if('string'!=typeof _0x4acbd1)throw new _0x21ce1d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4acbd1});if(!this['hasCommentThread'](_0x4acbd1))throw new _0x21ce1d('commentsrepository-missing-comment-thread',null,{'threadId':_0x4acbd1});const _0x5d8c3b=this['getCommentThread'](_0x4acbd1);let _0x409a3e=!0x1;if(void 0x0!==_0x47089d&&_0x5d8c3b['context']!==_0x47089d&&(_0x5d8c3b['context']=_0x47089d,_0x409a3e=!0x0),void 0x0!==_0x3d7c43&&_0x5d8c3b['unlinkedAt']!==_0x3d7c43&&(_0x5d8c3b['unlinkedAt']=_0x3d7c43,_0x409a3e=!0x0),_0x3a9b05&&!_0x187522(_0x3a9b05,_0x5d8c3b['attributes'])&&(_0x5d8c3b['attributes']=_0x3a9b05,_0x409a3e=!0x0),!_0x409a3e)return Promise['resolve']();if(!_0x5d8c3b['isSubmitted']||_0x3dd193||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4ab6b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5bf4a3}=_0x5d8c3b,_0x1fc90e=_0x4ab6b2['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5bf4a3,'threadId':_0x4acbd1,'context':_0x47089d,'unlinkedAt':_0x3d7c43,'attributes':_0x3a9b05})['then'](()=>_0x4ab6b2['remove'](_0x1fc90e))['catch'](_0x561b4e=>{throw console['error'](_0x561b4e),new _0x21ce1d('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x8f11e4){const _0x59ef5e=this['context']['plugins']['get'](Annotations),_0x191f6b=this['getCommentThread'](_0x8f11e4);if(_0x191f6b['_isAttached']=!0x1,this['_threadToController']['has'](_0x191f6b)){const _0x3801c1=this['_threadToController']['get'](_0x191f6b),_0xa80ea5=_0x3801c1['view'],_0x519280=_0x59ef5e['getByInnerView'](_0xa80ea5);this['_threadToController']['delete'](_0x191f6b),this['_viewToController']['delete'](_0xa80ea5),_0x519280&&_0x59ef5e['remove'](_0x519280),_0x3801c1['destroy'](),_0xa80ea5['destroy']()['then'](()=>{this['_unbindEditors'](_0xa80ea5);});}}['_updateActiveAnnotation']({threadId:_0x4be2d1,resolvedAt:_0x1da3ae,unlinkedAt:_0x2dda91}){const _0x174c4f=!!_0x1da3ae,_0x465280=this['context']['plugins']['get'](Annotations),_0xe77a73=this['getCommentThread'](_0x4be2d1);if(this['_threadToController']['has'](_0xe77a73)){const _0x2a146b=this['_threadToController']['get'](_0xe77a73)['view'],_0xbc931e=_0x465280['getByInnerView'](_0x2a146b);_0xbc931e&&(_0x174c4f&&_0x465280['_removeActiveAnnotation'](_0xbc931e),_0x2dda91?_0xbc931e['isVisible']=!0x1:_0xbc931e['refreshVisibility']());}}['_getExternalAuthor'](_0x2bc50a){const _0x8bb4ce=this['context']['plugins']['get'](_0x3bef93),_0x144ed4=_0x4a0ba1('external:'+_0x2bc50a),_0x20f632=_0x8bb4ce['getUser'](_0x144ed4);return _0x20f632||_0x8bb4ce['addUser']({'id':_0x144ed4,'name':_0x2bc50a});}['_createNewComment']({threadId:_0x483d3e,commentId:_0x158597=_0x308b6(),content:_0x34ed34,authorId:_0x4d874e,createdAt:_0x359d42,attributes:_0x17d4d3}){if('string'!=typeof _0x158597)throw new _0x21ce1d('commentsrepository-invalid-commentid');if('string'!=typeof _0x4d874e)throw new _0x21ce1d('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x34ed34||!_0x34ed34['trim']())throw new _0x21ce1d('commentsrepository-invalid-comment-content');const _0x11b3f4=this['context']['plugins']['get'](_0x3bef93)['getUser'](_0x4d874e);if(!_0x11b3f4)throw new _0x21ce1d('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4d874e});let _0x456f3c=null,_0x348438=_0x359d42;return _0x17d4d3?.['@external']&&(_0x456f3c=this['_getExternalAuthor'](_0x17d4d3['@external']['authorName']),_0x348438=new Date(_0x17d4d3['@external']['createdAt'])),new Comment(this,{'threadId':_0x483d3e,'id':_0x158597,'author':_0x456f3c||_0x11b3f4,'creator':_0x11b3f4,'content':_0x34ed34,'createdAt':_0x359d42,'authoredAt':_0x348438,'attributes':_0x17d4d3});}['_addComment'](_0x2557d2){let {threadId:_0x36aa6b,content:_0x527a8e,attributes:_0x27cca8,isFromAdapter:_0x430b6c}=_0x2557d2;const _0x2c9787=this['getCommentThread'](_0x2557d2['threadId']);if(!_0x2c9787)throw new _0x21ce1d('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x14132f=this['_createNewComment'](_0x2557d2),{id:_0x94d82}=_0x14132f;if(_0x2c9787['_add'](_0x14132f),_0x430b6c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2c9787['isSubmitted'])return Promise['resolve']();const _0x3e9bb2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x43b0f8}=_0x2c9787,_0x40225f=_0x3e9bb2['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x27cca8||(_0x27cca8={}),this['adapter']['addComment']({'channelId':_0x43b0f8,'threadId':_0x36aa6b,'commentId':_0x94d82,'content':_0x527a8e,'attributes':_0x27cca8})['then'](_0x447e83=>{_0x3e9bb2['remove'](_0x40225f),_0x447e83&&this['_updateComment']({'channelId':_0x43b0f8,'threadId':_0x36aa6b,'commentId':_0x94d82,'createdAt':_0x447e83['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x169acd=>{throw console['error'](_0x169acd),new _0x21ce1d('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4ce2fe,commentId:_0x102835,content:_0x15bb22,createdAt:_0x238716,attributes:_0x177043,isFromAdapter:_0x34b78c}){if(void 0x0!==_0x15bb22&&('string'!=typeof _0x15bb22||!_0x15bb22['trim']()['length']))throw new _0x21ce1d('commentsrepository-update-comment-invalid-content');const _0x11cab0=this['getCommentThread'](_0x4ce2fe),_0x92cb6d=_0x11cab0['getComment'](_0x102835);if(!_0x92cb6d)throw new _0x21ce1d('commentsrepository-update-missing-comment',this);let _0x4e7982=!0x1;if(_0x15bb22&&_0x15bb22!==_0x92cb6d['content']&&(_0x92cb6d['isEditable']||_0x34b78c)&&(_0x92cb6d['content']=_0x15bb22,_0x4e7982=!0x0),_0x238716&&_0x238716!==_0x92cb6d['createdAt']&&(_0x92cb6d['createdAt']=_0x238716,_0x92cb6d['attributes']&&_0x92cb6d['attributes']['@external']||(_0x92cb6d['authoredAt']=_0x238716),_0x4e7982=!0x0),_0x177043&&!_0x187522(_0x177043,_0x92cb6d['attributes'])&&(_0x92cb6d['attributes']=_0x177043,_0x4e7982=!0x0),!_0x4e7982)return Promise['resolve']();if(_0x11cab0['fire']('commentUpdated'),_0x34b78c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1c0d27=this['context']['plugins']['get']('PendingActions'),{channelId:_0x150160}=this['getCommentThread'](_0x92cb6d['threadId']),_0x15f6be=_0x1c0d27['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x150160,'threadId':_0x4ce2fe,'commentId':_0x102835,'content':_0x15bb22,'attributes':_0x177043})['then'](()=>_0x1c0d27['remove'](_0x15f6be))['catch'](_0x218c07=>{throw console['error'](_0x218c07),new _0x21ce1d('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x4ab56e,commentId:_0x44e1d3,isFromAdapter:_0x16aee3}){const _0x5b8cfd=this['getCommentThread'](_0x4ab56e),_0x1dfe3b=_0x5b8cfd['getComment'](_0x44e1d3);if(!_0x1dfe3b)throw new _0x21ce1d('commentsrepository-remove-missing-comment',this);if(_0x5b8cfd['_remove'](_0x1dfe3b),_0x16aee3||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1f666e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x19159d}=_0x5b8cfd,_0x6a3ae5=_0x1f666e['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x19159d,'threadId':_0x4ab56e,'commentId':_0x44e1d3})['then'](()=>_0x1f666e['remove'](_0x6a3ae5))['catch'](_0x39b850=>{throw console['error'](_0x39b850),new _0x21ce1d('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x1861d7(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x241904,_0x3addaf){super();const _0xb7fae4=_0x241904['context']['plugins']['get'](_0x3bef93)['me'],_0x4d1a7f=_0x241904['getCommentThread'](_0x3addaf['threadId']),_0x25d66b=0x0===_0x4d1a7f['comments']['length'],_0x4f275e=_0xb7fae4===_0x3addaf['author'];this['id']=_0x3addaf['id'],this['threadId']=_0x3addaf['threadId'],this['author']=_0x3addaf['author'],this['creator']=_0x3addaf['creator'],this['isExternal']=Boolean(_0x3addaf['attributes']&&_0x3addaf['attributes']['@external']),this['set']('content',_0x3addaf['content']),this['createdAt']=_0x3addaf['createdAt']||new Date(),this['set']('authoredAt',_0x3addaf['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4d1a7f,'resolvedAt'),this['set']('attributes',_0x3addaf['attributes']||{}),this['bind']('isEditable')['to'](_0x241904,'_permissions',()=>{const _0x4bfd8a=_0x241904['getPermissions'](_0x4d1a7f['channelId'])['write'],_0x3c2bf1=_0x241904['getPermissions'](_0x4d1a7f['channelId'])['modifyAll'];return _0x4f275e&&_0x4bfd8a||!_0x4f275e&&_0x3c2bf1;}),this['bind']('isRemovable')['to'](_0x4d1a7f,'isRemovable',_0x241904,'_permissions',_0x2d4e33=>{const _0x5c7c48=_0x241904['getPermissions'](_0x4d1a7f['channelId'])['write'],_0x2f0f8b=_0x241904['getPermissions'](_0x4d1a7f['channelId'])['modifyAll'];return _0x4f275e&&_0x5c7c48||_0x2d4e33&&_0x25d66b||!_0x4f275e&&_0x2f0f8b&&!_0x25d66b;}),this['bind']('isReadOnly')['to'](_0x4d1a7f,'isReadOnly'),this['_repository']=_0x241904;}get['weight'](){return Math['max'](function(_0x89e034){const _0x5987c0=document['createElement']('div');return _0x5987c0['innerHTML']=_0x89e034,_0x5987c0['textContent']['length'];}(this['content']),0xc8);}['update'](_0x22b6d9){const {threadId:_0x4df1b0,id:_0x2a11ac}=this;if(!this['_repository']['hasCommentThread'](_0x4df1b0))throw new _0x21ce1d('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x45e87c}=this['_repository']['getCommentThread'](_0x4df1b0);this['_repository']['fire'](xt('updateComment',_0x45e87c,_0x4df1b0),{'channelId':_0x45e87c,'threadId':_0x4df1b0,'commentId':_0x2a11ac,..._0x22b6d9});}['setAttribute'](_0x23c29f,_0x5207bf){const _0xba3bc5=_0x2211cc(this['attributes']);_0x40cab1(_0xba3bc5,_0x23c29f,_0x5207bf),this['update']({'attributes':_0xba3bc5});}['removeAttribute'](_0x5ecfb9){const _0x5ce07e=_0x2211cc(this['attributes']);_0x27a806(_0x5ce07e,_0x5ecfb9),this['update']({'attributes':_0x5ce07e});}['remove'](_0x3bb1ae={}){if(!_0x3bb1ae['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x247313,id:_0x5a0c86}=this;if(!this['_repository']['hasCommentThread'](_0x247313))throw new _0x21ce1d('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x189a1e}=this['_repository']['getCommentThread'](_0x247313);this['_repository']['fire'](xt('removeComment',_0x189a1e,_0x247313),{'channelId':_0x189a1e,'threadId':_0x247313,'commentId':_0x5a0c86,..._0x3bb1ae});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x1bf6c2,..._0xbdbe88){for(const _0x1333a1 of _0xbdbe88)void 0x0!==_0x1333a1&&(_0x1bf6c2+=':'+String(_0x1333a1));return _0x1bf6c2;}class AddCommentThreadCommand extends _0x11f7ba{constructor(_0x1c7234){super(_0x1c7234),this['set']('hasContent',!0x1);}['refresh'](){const _0x1a42dd=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4dcd37 of _0x1a42dd['getRanges']())if(this['_hasContent'](_0x4dcd37))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x340141=_0x308b6(),ranges:_0x4ed44a,comment:_0x376e10}={}){const _0x312577=this['editor']['model'],_0x3a82bb=_0x4ed44a??Array['from'](_0x312577['document']['selection']['getRanges']()),_0x53486c=[];for(const _0x23f555 of _0x3a82bb)this['_hasContent'](_0x23f555)&&_0x53486c['push'](this['_trimToContent'](_0x23f555));if(!_0x53486c['length'])throw new _0x21ce1d('addcommentthreadcommand-incorrect-ranges',null);_0x376e10&&this['_createCommentThread'](_0x340141,_0x376e10),this['_createMarkersFromRanges'](_0x340141,_0x53486c,!!_0x376e10);}['_createMarkersFromRanges'](_0x240dde,_0x2b8ba3,_0x2bd0b9){this['editor']['model']['change'](_0x203154=>{for(const _0x74dc6a of _0x2b8ba3){const _0x293e71=_0x308b6()['substr'](0x1,0x5),_0x388e19='comment:'+_0x240dde+':'+_0x293e71;_0x203154['addMarker'](_0x388e19,{'range':_0x74dc6a,'usingOperation':_0x2bd0b9,'affectsData':_0x2bd0b9});}});}['_createCommentThread'](_0x29c623,_0x5d8765){const _0x5bc78d=this['editor']['plugins']['get']('CommentsRepository'),_0x2867b0=this['editor']['config']['get']('collaboration.channelId'),_0x3b7b2b=this['editor']['plugins']['get']('Users')['me'];if(!_0x3b7b2b)throw new _0x21ce1d('addcommentthreadcommand-user-not-found',null);_0x5bc78d['addCommentThread']({'threadId':_0x29c623,'channelId':_0x2867b0,'comments':[{'authorId':_0x3b7b2b['id'],'content':_0x5d8765,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4b85ad){for(const _0x3ccfaa of _0x4b85ad['getItems']())if(this['_itemIsContent'](_0x3ccfaa))return!0x0;return!0x1;}['_itemIsContent'](_0x28959c){return _0x28959c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x28959c)&&!_0x28959c['is']('element','tableCell');}['_trimToContent'](_0xed57ea){const _0x18147c=_0x40b9d6=>!this['_itemIsContent'](_0x40b9d6['item']),_0x5dd40b=_0xed57ea['start']['getLastMatchingPosition'](_0x18147c),_0x406bff=_0xed57ea['end']['getLastMatchingPosition'](_0x18147c,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5dd40b,_0x406bff);}}class EditorAnnotations extends _0x4e3a6a{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[Annotations];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a6d21){super(_0x3a6d21),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x715d64=this['editor'],_0x2d51de=_0x715d64['model']['document']['selection'],_0xb42218=_0x4aa75f(()=>this['refreshSelectedViews'](),0xa);_0x2d51de['on']('change:range',(_0x445d7a,_0x250723)=>{_0x250723['directChange']&&(_0xb42218['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x715d64['editing']['view']['document'],'change:isFocused',(_0x2f6987,_0x509da3,_0xc5832d)=>{_0xc5832d&&_0xb42218();}),this['listenTo'](_0x715d64['ui']['focusTracker'],'change:isFocused',(_0x5cbafc,_0x1b52bb,_0x114489)=>{_0x114489||this['fire']('blur',{'isAnnotationTracked':_0x59ae06=>this['_editorAnnotationsData']['has'](_0x59ae06['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x12d34f){if(this['_editorAnnotations']['has'](_0x12d34f['view']))return;this['_editorAnnotations']['add'](_0x12d34f['view']),this['editor']['ui']['focusTracker']['add'](_0x12d34f['view']['element']);const _0x326d0a=this['editor']['plugins']['get'](Annotations);this['listenTo'](_0x326d0a['collection'],'remove',(_0x45f356,_0x211df9)=>{this['editor']['ui']['focusTracker']['remove'](_0x211df9['view']['element']),this['_editorAnnotations']['delete'](_0x211df9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x465fcd){if('function'!=typeof _0x465fcd)throw new _0x21ce1d('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x465fcd);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3ae3ce,annotations:_0x3731ed}){const _0x35a2fc=[],_0x45bc6e=this['editor']['model']['document']['selection'],_0x31e774=Array['from'](_0x45bc6e['getRanges']());for(const [_0x1a4e55,_0x43b56e]of this['_editorAnnotationsData']){const _0x445192=_0x7a6891(_0x43b56e),_0x4f59ed=_0x3731ed['getByInnerView'](_0x1a4e55);_0x445192&&_0x4f59ed&&_0x35a2fc['push']({'annotation':_0x4f59ed,'range':_0x445192});}function _0x7a6891(_0x5279df){for(const _0x35646d of _0x5279df)for(const _0xe79ed1 of _0x31e774)if(_0x35646d['containsRange'](_0xe79ed1,!_0x45bc6e['isCollapsed']))return _0x35646d;return null;}return _0x35a2fc['sort']((_0x5cf34c,_0x3df2f0)=>{const _0x3f5509=_0x5cf34c['range'],_0x367a48=_0x3df2f0['range'];if(!_0x3f5509['isEqual'](_0x367a48)){if(_0x3f5509['containsRange'](_0x367a48,!0x0))return 0x1;if(_0x367a48['containsRange'](_0x3f5509,!0x0))return-0x1;}return _0x5cf34c['annotation']==_0x3ae3ce?-0x1:_0x3df2f0['annotation']==_0x3ae3ce?0x1:0x0;})['map'](_0x43e72f=>_0x43e72f['annotation']);}get['_editorAnnotationsData'](){const _0x164a2f=new Map();for(const _0x1850ad of Array['from'](this['_dataCollectors']))for(const [_0x1d342d,_0x4715b1]of _0x1850ad())_0x164a2f['set'](_0x1d342d,_0x4715b1);return _0x164a2f;}}class CommentsRestrictedEditingMode extends _0x4e3a6a{['afterInit'](){const _0x4e52f1=this['editor'];if(!_0x4e52f1['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4e52f1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class CommentsImportWord extends _0x4e3a6a{constructor(_0x399d08){super(_0x399d08),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2b2e74=this['editor'],_0x37b0c1=_0x2b2e74['commands']['get']('importWord'),_0x1b74c8=_0x2b2e74['plugins']['get'](_0x3bef93);_0x37b0c1&&(_0x37b0c1['on']('execute',(_0x3f294e,[,_0x5c05dd])=>{_0x5c05dd['collaboration_features']={'comments':!0x0,'user_id':_0x1b74c8['me']['id']};},{'priority':_0x45a290['high']+0xa}),this['listenTo'](_0x37b0c1,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2b7956,_0x1e529f){const {comment_threads:_0x14ec0e}=_0x1e529f;_0x14ec0e&&_0x14ec0e['forEach'](({thread_id:_0x56e890,comments:_0x30d725,is_resolved:_0x4d0eca})=>{const _0x15f434=new Date(),_0x37215a=_0x30d725['map'](({author:_0x5c5569,content:_0x4b4284,created_at:_0x3e8c8c})=>({'content':_0x4b4284,'authorId':this['editor']['plugins']['get'](_0x3bef93)['me']['id'],'createdAt':_0x15f434,'attributes':{'@external':{'authorName':_0x5c5569,'createdAt':_0x3e8c8c?new Date(_0x3e8c8c):new Date(),'source':'importWord'}}})),_0x25908a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](CommentsRepository)['addCommentThread']({'channelId':_0x25908a,'threadId':_0x56e890,'comments':_0x37215a,'resolvedAt':_0x4d0eca?_0x15f434:null});});}}class CommentsClipboard extends _0x4e3a6a{constructor(_0x31e906){super(_0x31e906),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x51bbb4=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x51bbb4,'contentInsertion',(_0x4e12a4,_0x9aff)=>this['_removeMarkersWithoutThreads'](_0x9aff['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x29cdc5){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x29cdc5;const _0x57bca0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x552c03 of _0x29cdc5['keys']()){const [_0x35949c,_0x309d46]=_0x552c03['split'](':');'comment'!=_0x35949c||_0x57bca0['hasCommentThread'](_0x309d46)||_0x29cdc5['delete'](_0x552c03);}return _0x29cdc5;}['_registerMarkerInClipboardPipeline'](){const _0x1ba179=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x56bb0e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x56bb0e&&_0x1ba179['_registerMarkerToCopy']('comment',_0x56bb0e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x53e654){switch(_0x53e654){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function Pt(_0x110939){const _0x2981d6=_0x110939['split'](':');return{'group':_0x2981d6[0x0],'id':_0x2981d6[0x1],'part':_0x2981d6[0x2]};}class ShowCommentHighlights extends _0x4e3a6a{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1b880,_0x3bbec7)=>{if(!_0x3bbec7['options']['showCommentHighlights'])return null;if(_0x3bbec7['options']['ignoreResolvedComments']){const {id:_0x36aa72}=Pt(_0x1b880['markerName']),_0x2b36a4=this['editor']['plugins']['get'](CommentsRepository);if(_0x2b36a4['getCommentThread'](_0x36aa72)?.['isResolved']&&_0x1b880['item'])return _0x3bbec7['consumable']['consume'](_0x1b880['item'],'addMarker:'+_0x1b880['markerName']),_0x3bbec7['consumable']['consume'](_0x1b880['item'],'removeMarker:'+_0x1b880['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1caa76=>{_0x1caa76['on']('addMarker:comment',(_0x135746,_0x211908,_0x559658)=>{if(!_0x559658['options']['showCommentHighlights'])return;const _0x448217=_0x211908['item'];if(!_0x448217)return;const _0x532cef=_0x559658['mapper']['toViewElement'](_0x448217);this['editor']['model']['schema']['isObject'](_0x448217)&&_0x532cef&&!_0x532cef['getCustomProperty']('widget')&&_0x532cef['is']('containerElement')&&It(_0x532cef,_0x559658['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2aa54f,{writer:_0x67432,options:_0x229803})=>{if(!_0x229803['showCommentHighlights'])return null;const _0x28b8c0=_0x67432['createContainerElement']('div'),_0x4f8252=_0x67432['createEmptyElement']('hr');return _0x67432['addClass']('ck-horizontal-line',_0x28b8c0),_0x67432['insert'](_0x67432['createPositionAt'](_0x28b8c0,0x0),_0x4f8252),_0x28b8c0;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1c98b3,{writer:_0x1dd5fd,options:_0x15d15e})=>{if(!_0x15d15e['showCommentHighlights'])return null;const _0x1aaa25=_0x1dd5fd['createContainerElement']('span'),_0x5b4e15=_0x1dd5fd['createEmptyElement']('img');return _0x1dd5fd['addClass']('image-inline',_0x1aaa25),_0x1dd5fd['insert'](_0x1dd5fd['createPositionAt'](_0x1aaa25,0x0),_0x5b4e15),_0x1aaa25;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x50ee04,{writer:_0x3fce57,options:_0x76e8d6})=>{if(_0x76e8d6['showCommentHighlights'])return _0x3fce57['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4a7771,_0x13ff6c,_0x545191)=>{_0x545191['options']['showCommentHighlights']&&_0x4a7771['stop']();},{'priority':'high'});}}class CommentsEditing extends _0x4e3a6a{static get['requires'](){return[CommentsRepository,EditorAnnotations,_0x3bef93,CommentsRestrictedEditingMode,CommentsImportWord,CommentsClipboard,ShowCommentHighlights];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d52e6){super(_0x1d52e6),this['set']('isThreadsLoadingPaused',!0x0),_0x1d52e6['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3a2116,_0x1379a1,_0x53e66f,_0x2fde9b)=>{const _0x105304=_0x1d52e6['plugins']['get'](CommentsRepository),_0x2349ce=_0x53e66f?Pt(_0x53e66f)['id']:null;_0x1d52e6['model']['change'](()=>{if(_0x2349ce){const _0xc67567=this['getAllMarkersForId'](_0x2349ce);for(const _0x41affa of _0xc67567)_0x1d52e6['editing']['reconvertMarker'](_0x41affa);}if(_0x2fde9b){const {id:_0x5aff7b}=Pt(_0x2fde9b),_0x38c2e6=_0x105304['getCommentThread'](_0x5aff7b);if(_0x38c2e6&&_0x38c2e6['unlinkedAt'])return;if(_0x38c2e6&&!_0x38c2e6['isAttached'])return;const _0x53bd30=this['getAllMarkersForId'](_0x5aff7b);for(const _0x465f84 of _0x53bd30)_0x1d52e6['editing']['reconvertMarker'](_0x465f84);}}),_0x2349ce&&this['scrollToThreadMarker'](_0x2349ce);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5e2010=this['editor'],_0x78eeb6=_0x5e2010['plugins']['get'](CommentsRepository),_0xe19650=_0x5e2010['config']['get']('collaboration.channelId'),_0x4f1a06=_0x78eeb6['getCommentThreads']()['filter'](_0x1da7e9=>_0x1da7e9['channelId']!==_0xe19650);_0x5e2010['commands']['add']('addCommentThread',new AddCommentThreadCommand(_0x5e2010)),this['listenTo'](_0x5e2010,'change:isReadOnly',(_0x452112,_0x158f42,_0x1b7052)=>{_0x78eeb6['switchReadOnly'](_0x1b7052,_0x5e2010['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x78eeb6,Vt('addCommentThread',_0xe19650),(_0x12862d,{threadId:_0x3a3478})=>{const _0xe40251=this['editor']['plugins']['get'](CommentsRepository)['getCommentThread'](_0x3a3478);_0xe40251?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3a3478);}),this['listenTo'](_0x78eeb6,Vt('removeCommentThread',_0xe19650),(_0x2d1d2c,{threadId:_0x277dce})=>{_0x5e2010['model']['enqueueChange']({'isUndoable':!0x1},_0x5716ed=>{const _0x383e0b=this['getAllMarkersForId'](_0x277dce);for(const _0x53772c of _0x383e0b)_0x5716ed['removeMarker'](_0x53772c);});}),this['listenTo'](_0x78eeb6,Vt('resolveCommentThread',_0xe19650),(_0x30c10d,{threadId:_0x3c754f})=>{this['_reconvertMarkers'](_0x3c754f);const _0x409b3d=this['editor']['plugins']['get'](Annotations);(this['editor']['editing']['view']['hasDomSelection']||_0x409b3d['collection']['isFocused'])&&(this['editor']['plugins']['get'](CommentsRepository)['getCommentThread'](_0x3c754f)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x78eeb6,Vt('reopenCommentThread',_0xe19650),(_0x3a0560,{threadId:_0x416364})=>{this['_reconvertMarkers'](_0x416364);},{'priority':'low'}),this['listenTo'](_0x78eeb6,Vt('addComment',_0xe19650),(_0x10875c,{threadId:_0x180e4d,isFromAdapter:_0x467117})=>{const _0x11c6e5=this['getAllMarkersForId'](_0x180e4d);if(_0x467117||0x0==_0x11c6e5['length']||!_0x78eeb6['hasCommentThread'](_0x180e4d))return;0x1===_0x78eeb6['getCommentThread'](_0x180e4d)['length']&&_0x5e2010['model']['enqueueChange']({'isUndoable':!0x1},_0xba624a=>{for(const _0xadb98 of _0x11c6e5)_0xba624a['updateMarker'](_0xadb98,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4f1a06);}['afterInit'](){!async function(_0x11f8db){const _0x4498cf=_0x395db5([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x5bf90d=0x73460ab3,_0x5504a7=0x73418163^_0x5bf90d,_0x2aaded=window[_0x395db5([0x44,0x61,0x74,0x65])][_0x395db5([0x6e,0x6f,0x77])](),_0x1786dd=_0x11f8db[_0x395db5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x334c46=new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c43d1=>{_0x1786dd[_0x395db5([0x6f,0x6e,0x63,0x65])](_0x395db5([0x72,0x65,0x61,0x64,0x79]),_0x4c43d1);}),_0x3b0fbf={[_0x395db5([0x6b,0x74,0x79])]:_0x395db5([0x45,0x43]),[_0x395db5([0x75,0x73,0x65])]:_0x395db5([0x73,0x69,0x67]),[_0x395db5([0x63,0x72,0x76])]:_0x395db5([0x50,0x2d,0x32,0x35,0x36]),[_0x395db5([0x78])]:_0x395db5([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x395db5([0x79])]:_0x395db5([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x395db5([0x61,0x6c,0x67])]:_0x395db5([0x45,0x53,0x32,0x35,0x36])},_0x3e805b=_0x1786dd[_0x395db5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x395db5([0x67,0x65,0x74])](_0x395db5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1a6d75(){let _0x2c1453,_0x36651a=null,_0x31771f=null;try{if(_0x3e805b==_0x395db5([0x47,0x50,0x4c]))return _0x395db5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2c1453=_0x5d96c7(),!_0x2c1453)return _0x395db5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2c1453[_0x395db5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x31771f=_0x308e78(_0x2c1453[_0x395db5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2c1453[_0x395db5([0x6a,0x74,0x69])])),await _0x2953d7()?_0x3371d5()?_0x389777()?_0x395db5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x27fada()?(_0x2c1453[_0x395db5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x395db5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x36651a=_0x24f84a(_0x395db5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3e6956()):_0x395db5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x395db5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x395db5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x395db5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x389777(){const _0x21469c=[_0x395db5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x395db5([0x74,0x72,0x69,0x61,0x6c])][_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c1453[_0x395db5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2aaded/0x3e8:0xe10*_0x5504a7;return _0x2c1453[_0x395db5([0x65,0x78,0x70])]<_0x21469c;}function _0x3371d5(){const _0xb63b7c=_0x2c1453[_0x395db5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xb63b7c)return!0x1;if(_0xb63b7c[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x2a])))return!0x0;if(_0xb63b7c[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x43,0x4d,0x54])))return!0x0;if(_0xb63b7c[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x403de9())return!0x0;if(_0xb63b7c[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x52,0x43,0x4d,0x54]))){if(_0x3f6b1())return!0x0;if(_0x2f96cf()||_0x3d82b3())return!0x0;}return!0x1;}function _0x27fada(){const _0x7d51db=_0x2c1453[_0x395db5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x7d51db||0x0==_0x7d51db[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1bdf52}=new URL(window[_0x395db5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x7d51db[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1bdf52))return!0x0;const _0x71d7b0=_0x1bdf52[_0x395db5([0x73,0x70,0x6c,0x69,0x74])](_0x395db5([0x2e]));return _0x7d51db[_0x395db5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x6062dc=>_0x6062dc[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x2a])))[_0x395db5([0x6d,0x61,0x70])](_0x265841=>_0x265841[_0x395db5([0x73,0x70,0x6c,0x69,0x74])](_0x395db5([0x2e])))[_0x395db5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x141696=>_0x141696[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x71d7b0[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x395db5([0x6d,0x61,0x70])](_0x34855d=>Array(_0x71d7b0[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x34855d[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x395db5([0x66,0x69,0x6c,0x6c])](_0x34855d[0x0]===_0x395db5([0x2a])?_0x395db5([0x2a]):'')[_0x395db5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x34855d))[_0x395db5([0x73,0x6f,0x6d,0x65])](_0x3ffe2f=>_0x71d7b0[_0x395db5([0x65,0x76,0x65,0x72,0x79])]((_0x146465,_0xce5653)=>_0x3ffe2f[_0xce5653]===_0x146465||_0x3ffe2f[_0xce5653]===_0x395db5([0x2a])));}function _0x3e6956(){return _0x36651a&&_0x31771f?new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57df04,_0x1bb62d)=>{_0x36651a[_0x395db5([0x74,0x68,0x65,0x6e])](_0x57df04,_0x1bb62d),_0x31771f[_0x395db5([0x74,0x68,0x65,0x6e])](_0x473e12=>{_0x473e12!=_0x395db5([0x56,0x61,0x6c,0x69,0x64])&&_0x57df04(_0x473e12);},_0x1bb62d);}):_0x36651a||_0x31771f||_0x395db5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x308e78(_0x479f13,_0x746be7){return new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36b362=>{if(_0x258965())return _0x36b362(_0x395db5([0x56,0x61,0x6c,0x69,0x64]));_0x115ca0(),_0x1786dd[_0x395db5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x395db5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4734d8=!0x1;const _0x5ddfef=_0x308b6();function _0x24d312(_0x11ac55){return!!_0x11ac55&&(typeof _0x11ac55===_0x395db5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x11ac55===_0x395db5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x11ac55[_0x395db5([0x74,0x68,0x65,0x6e])]===_0x395db5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x11ac55[_0x395db5([0x63,0x61,0x74,0x63,0x68])]===_0x395db5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5d66fc(_0x1e2801){_0x4928be(_0x1e2801)[_0x395db5([0x74,0x68,0x65,0x6e])](_0x25fff2=>{if(!_0x25fff2||_0x25fff2[_0x395db5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x395db5([0x6f,0x6b]))return _0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1f8670(_0x212df7(_0x5ddfef+_0x746be7))!=_0x25fff2[_0x395db5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x395db5([0x56,0x61,0x6c,0x69,0x64]);})[_0x395db5([0x74,0x68,0x65,0x6e])](_0x38b65a=>(_0x471400(),_0x38b65a),()=>{const _0x539cac=_0x49edf4();return null==_0x539cac?(_0x471400(),_0x395db5([0x56,0x61,0x6c,0x69,0x64])):_0x395db5(_0x2aaded-_0x539cac>(0x574a8eb3^_0x5bf90d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x395db5([0x74,0x68,0x65,0x6e])](_0x36b362)[_0x395db5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x36b362(_0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2bda8b=0x7370e433^_0x5bf90d;function _0x471400(){const _0x2fabba=_0x395db5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1f8670(_0x212df7(_0x479f13)),_0x7c42be=_0x307cc6(_0x1f8670(window[_0x395db5([0x4d,0x61,0x74,0x68])][_0x395db5([0x63,0x65,0x69,0x6c])](_0x2aaded/_0x2bda8b)));window[_0x395db5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x395db5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2fabba,_0x7c42be);}function _0x49edf4(){const _0x4ba0e0=_0x395db5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1f8670(_0x212df7(_0x479f13)),_0x55d80e=window[_0x395db5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x395db5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4ba0e0);return _0x55d80e?window[_0x395db5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x307cc6(_0x55d80e),0x10)*_0x2bda8b:null;}function _0x4928be(_0x38d552){return new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x31a547,_0x1c01a8)=>{_0x38d552[_0x395db5([0x74,0x68,0x65,0x6e])](_0x31a547,_0x1c01a8),window[_0x395db5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1c01a8,0x7347de73^_0x5bf90d);});}}_0x1786dd[_0x395db5([0x6f,0x6e])](_0x395db5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xe1e9dd,_0x532caf)=>{if(_0x532caf[0x0]!=_0x479f13)return _0x36b362(_0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x532caf[0x1]={..._0x532caf[0x1],[_0x395db5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5ddfef};},{[_0x395db5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x395db5([0x68,0x69,0x67,0x68])}),_0x1786dd[_0x395db5([0x6f,0x6e])](_0x395db5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1ac8ac=>{_0x24d312(_0x1ac8ac[_0x395db5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4734d8=!0x0,_0x5d66fc(_0x1ac8ac[_0x395db5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x395db5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x395db5([0x6c,0x6f,0x77])}),_0x334c46[_0x395db5([0x74,0x68,0x65,0x6e])](()=>{_0x4734d8||_0x36b362(_0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x258965(){return _0x1786dd[_0x395db5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x395db5([0x76,0x69,0x65,0x77])][_0x395db5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x395db5([0x61,0x75,0x74,0x6f]);}function _0x115ca0(){_0x1786dd[_0x395db5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x395db5([0x76,0x69,0x65,0x77])][_0x395db5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x395db5([0x61,0x75,0x74,0x6f]);}}function _0x24f84a(_0x592bd2){const _0x15fe3f=[new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x549e79=>setTimeout(_0x549e79,0x734f347f^_0x5bf90d)),_0x334c46[_0x395db5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x315623=>{let _0x79a3e8=0x0;_0x1786dd[_0x395db5([0x6d,0x6f,0x64,0x65,0x6c])][_0x395db5([0x6f,0x6e])](_0x395db5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1682bf,_0x23abce)=>{_0x23abce[0x0][_0x395db5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x79a3e8++,_0x79a3e8==(0x73460f5b^_0x5bf90d)&&(_0x315623(),_0x1682bf[_0x395db5([0x6f,0x66,0x66])]());});}))];return window[_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x395db5([0x72,0x61,0x63,0x65])](_0x15fe3f)[_0x395db5([0x74,0x68,0x65,0x6e])](()=>_0x592bd2);}async function _0x4cd29a(){await _0x334c46,_0x1786dd[_0x395db5([0x6d,0x6f,0x64,0x65,0x6c])][_0x395db5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x20e812,_0x1786dd[_0x395db5([0x6d,0x6f,0x64,0x65,0x6c])][_0x395db5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x20e812,_0x1786dd[_0x395db5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x395db5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x403de9(){return window[_0x395db5([0x67,0x6c,0x6f,0x62])]&&window[_0x395db5([0x67,0x6c,0x6f,0x62])][_0x395db5([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x3f6b1(){return _0x3f76c0(_0x395db5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x171a09(_0x395db5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x395db5([0x73,0x74,0x61,0x74,0x65])]==_0x395db5([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2f96cf(){return _0x3f76c0(_0x395db5([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x3d82b3(){return _0x3f76c0(_0x395db5([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x302d0e(_0x2f1dda){const _0x4d326f=_0x24d1df();_0x1786dd[_0x4d326f]=_0x395db5([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2f1dda,_0x2f1dda!=_0x395db5([0x56,0x61,0x6c,0x69,0x64])&&_0x4cd29a();}function _0x24d1df(){const _0x1f928e=window[_0x395db5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x395db5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x395db5([0x6e,0x6f,0x77])]())[_0x395db5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x395db5([0x2e]),'');let _0xfde316=_0x395db5([0x4b]);for(let _0x145463=0x0;_0x145463<_0x1f928e[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x145463+=0x2){let _0x1282e6=window[_0x395db5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f928e[_0x395db5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x145463,_0x145463+0x2));_0x1282e6>=_0x4498cf[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1282e6-=_0x4498cf[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xfde316+=_0x4498cf[_0x1282e6];}return _0xfde316;}function _0x5d96c7(){const _0x54bbf5=_0x3e805b[_0x395db5([0x73,0x70,0x6c,0x69,0x74])](_0x395db5([0x2e]));if(0x3!=_0x54bbf5[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3874e9(_0x54bbf5[0x1]);function _0x3874e9(_0x226bb1){const _0x3503ad=_0x23b846(_0x226bb1);return _0x3503ad&&_0x254bd2()?_0x3503ad:null;function _0x254bd2(){const _0x272def=_0x3503ad[_0x395db5([0x6a,0x74,0x69])],_0xcb01ab=window[_0x395db5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x272def[_0x395db5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x272def[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x46e3a1={..._0x3503ad,[_0x395db5([0x6a,0x74,0x69])]:_0x272def[_0x395db5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x272def[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x46e3a1[_0x395db5([0x76,0x63])],_0x212df7(_0x46e3a1)==_0xcb01ab;}}}async function _0x2953d7(){let _0x3886a5=!0x0;try{const _0x1388da=_0x3e805b[_0x395db5([0x73,0x70,0x6c,0x69,0x74])](_0x395db5([0x2e])),[_0xb0438,_0x17514e,_0x5797a1]=_0x1388da;return _0x14abf1(_0xb0438),await _0x21fd33(_0xb0438,_0x17514e,_0x5797a1),_0x3886a5;}catch{return!0x1;}function _0x14abf1(_0x629e2){const _0x26bf09=_0x23b846(_0x629e2);_0x26bf09&&_0x26bf09[_0x395db5([0x61,0x6c,0x67])]==_0x395db5([0x45,0x53,0x32,0x35,0x36])||(_0x3886a5=!0x1);}async function _0x21fd33(_0x477f8c,_0x5d038e,_0x2d0ba2){const _0x18dd94=window[_0x395db5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x395db5([0x66,0x72,0x6f,0x6d])](_0xa95c7f(_0x2d0ba2),_0x1e46df=>_0x1e46df[_0x395db5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x91f7c7=new window[(_0x395db5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x395db5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x477f8c+_0x395db5([0x2e])+_0x5d038e),_0x47f411=window[_0x395db5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x395db5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x47f411)return;const _0x46a0ec=await _0x47f411[_0x395db5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x395db5([0x6a,0x77,0x6b]),_0x3b0fbf,{[_0x395db5([0x6e,0x61,0x6d,0x65])]:_0x395db5([0x45,0x43,0x44,0x53,0x41]),[_0x395db5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x395db5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x395db5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x47f411[_0x395db5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x395db5([0x6e,0x61,0x6d,0x65])]:_0x395db5([0x45,0x43,0x44,0x53,0x41]),[_0x395db5([0x68,0x61,0x73,0x68])]:{[_0x395db5([0x6e,0x61,0x6d,0x65])]:_0x395db5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x46a0ec,_0x18dd94,_0x91f7c7)||(_0x3886a5=!0x1);}}function _0x23b846(_0x1e49c2){return _0x1e49c2[_0x395db5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x395db5([0x65,0x79]))?JSON[_0x395db5([0x70,0x61,0x72,0x73,0x65])](_0xa95c7f(_0x1e49c2)):null;}function _0xa95c7f(_0x9b7efd){return window[_0x395db5([0x61,0x74,0x6f,0x62])](_0x9b7efd[_0x395db5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x395db5([0x2b]))[_0x395db5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x395db5([0x2f])));}function _0x212df7(_0x3d399a){let _0x43e31f=0x1505;function _0x207b73(_0x5e1eec){for(let _0xcdba3=0x0;_0xcdba3<_0x5e1eec[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcdba3++){const _0x569b46=_0x5e1eec[_0x395db5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xcdba3);_0x43e31f=(_0x43e31f<<0x5)+_0x43e31f+_0x569b46,_0x43e31f&=_0x43e31f;}}function _0x11854e(_0x5052cf){Array[_0x395db5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5052cf)?_0x5052cf[_0x395db5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x11854e):_0x5052cf&&typeof _0x5052cf==_0x395db5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x395db5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5052cf)[_0x395db5([0x73,0x6f,0x72,0x74])]()[_0x395db5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4cf97d,_0xa01d18])=>{_0x207b73(_0x4cf97d),_0x11854e(_0xa01d18);}):_0x207b73(window[_0x395db5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5052cf));}return _0x11854e(_0x3d399a),_0x43e31f>>>0x0;}function _0x1f8670(_0xad80d3){return _0xad80d3[_0x395db5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x395db5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x395db5([0x30]));}function _0x307cc6(_0xee7d42){return _0xee7d42[_0x395db5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x395db5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x395db5([0x6a,0x6f,0x69,0x6e])]('');}function _0x3f76c0(_0x4a2101){return _0x1786dd[_0x395db5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x395db5([0x68,0x61,0x73])](_0x4a2101);}function _0x171a09(_0x5e09ee){return _0x1786dd[_0x395db5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x395db5([0x67,0x65,0x74])](_0x5e09ee);}function _0x20e812(){}function _0x395db5(_0x3aa956){return _0x3aa956['map'](_0xc78e1d=>String['fromCharCode'](_0xc78e1d))['join']('');}_0x302d0e(await _0x1a6d75());}(this);}['destroy'](){const _0x494dc2=this['editor']['plugins']['get'](CommentsRepository),_0x5da4df=this['editor']['config']['get']('collaboration.channelId');for(const _0x369b39 of _0x494dc2['getCommentThreads']({'channelId':_0x5da4df}))_0x494dc2['_detachCommentThread'](_0x369b39['id']),_0x494dc2['_threads']['delete'](_0x369b39['id']);super['destroy']();}['hasMarkerForId'](_0x320b3e){return this['getAllMarkersForId'](_0x320b3e)['length']>0x0;}['getAllMarkersForId'](_0x5b98a9){const _0x3f9392=[];for(const _0x197f24 of this['editor']['model']['markers'])_0x197f24['name']['startsWith']('comment:'+_0x5b98a9)&&_0x3f9392['push'](_0x197f24);return _0x3f9392;}['scrollToThreadMarker'](_0x1f9674){setTimeout(()=>{const _0x57f81d=this['_getTargetForId'](_0x1f9674);if(!_0x57f81d)return;this['activeMarker']&&Pt(this['activeMarker'])['id']===_0x1f9674&&_0x590e11({'target':_0x57f81d[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x25efe4){this['editor']['model']['change'](()=>{for(const _0x2b75b4 of this['getAllMarkersForId'](_0x25efe4))this['editor']['editing']['reconvertMarker'](_0x2b75b4);});}['_attachArchivedThread'](_0x5aea04){const _0x4613fd=this['editor']['plugins']['get'](CommentsRepository),_0x39f357=this['editor']['plugins']['get'](EditorAnnotations),_0x56e52b=_0x4613fd['getCommentThread'](_0x5aea04);if(!_0x56e52b['isAttached']){const _0x10a77f=_0x56e52b['attachTo'](()=>this['_getTargetForId'](_0x56e52b['id']));_0x39f357['registerAnnotation'](_0x10a77f),_0x56e52b['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x598c3a=this['editor'],_0x53adda=_0x598c3a['plugins']['get'](_0x3bef93);_0x598c3a['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xe52807,_0x1e24f8)=>{const {id:_0x36fa92}=Pt(_0xe52807['markerName']),_0xf18536=_0x598c3a['plugins']['get'](CommentsRepository)['getCommentThread'](_0x36fa92),_0x374ee0=this['activeMarker']&&Pt(this['activeMarker'])['id']===_0x36fa92;let _0x480592;if(_0xf18536&&_0xf18536['isResolved']&&!_0x374ee0&&_0xe52807['item'])return _0x1e24f8['consumable']['consume'](_0xe52807['item'],'addMarker:'+_0xe52807['markerName']),_0x1e24f8['consumable']['consume'](_0xe52807['item'],'removeMarker:'+_0xe52807['markerName']),null;const _0x51e56d=['ck-comment-marker'];return _0x374ee0&&_0x51e56d['push']('ck-comment-marker--active'),_0x480592=_0xf18536?.['length']?_0xf18536['comments']['first']['author']['id']:_0x53adda['me']['id'],{'classes':_0x51e56d,'attributes':{'data-comment':_0x36fa92,'data-author-id':_0x480592}};}}),_0x598c3a['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x405281,{options:_0x608322})=>{if(_0x608322['showCommentHighlights'])return null;const _0x52467c=_0x598c3a['plugins']['get'](CommentsRepository),_0x15484f=_0x598c3a['model']['markers']['get'](_0x405281),{id:_0x4c44d1,part:_0x291cfb}=Pt(_0x405281);return _0x15484f&&!_0x15484f['affectsData']||_0x608322['ignoreResolvedComments']&&_0x52467c['getCommentThread'](_0x4c44d1)?.['isResolved']?null:{'group':'comment','name':_0x291cfb?_0x4c44d1+':'+_0x291cfb:_0x4c44d1};}}),_0x598c3a['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3dd5d5,{writer:_0x539eb2})=>_0x539eb2['createElement']('$marker',{'data-name':'comment:'+_0x3dd5d5['getAttribute']('id')})}),_0x598c3a['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x8271b4=this['editor'],_0x357487=_0x8271b4['plugins']['get'](CommentsRepository),_0x4fa16e=new Set(),_0x4e1455=new Set();_0x8271b4['model']['document']['registerPostFixer'](_0x3c85a3=>{let _0x381e15=!0x1;for(const {name:_0x3a128c,data:_0x4fb3af}of _0x8271b4['model']['document']['differ']['getChangedMarkers']()){const {group:_0x55fd36,id:_0x2f08cb}=Pt(_0x3a128c);let _0x5193e0=_0x4fb3af['newRange'];if('comment'!==_0x55fd36||!_0x5193e0)continue;const _0x3cdb27='$graveyard'===_0x5193e0['root']['rootName'];_0x3cdb27||(_0x5193e0=Lt(_0x5193e0,_0x8271b4['model']),!_0x5193e0||_0x5193e0['isCollapsed']||!_0x4fb3af['newRange']||_0x5193e0['isEqual'](_0x4fb3af['newRange']))?_0x8271b4['model']['hasContent'](_0x5193e0)&&!_0x3cdb27?this['isThreadsLoadingPaused']?_0x4fa16e['add'](_0x3a128c):this['_handleThreadMarker'](_0x3a128c,_0x2f08cb):(_0x4e1455['add'](_0x3a128c),_0x4fa16e['delete'](_0x3a128c),_0x3c85a3['removeMarker'](_0x3a128c),_0x381e15=!0x0):(_0x3c85a3['updateMarker'](_0x3a128c,{'range':_0x5193e0}),_0x381e15=!0x0);}return _0x381e15;}),this['on']('change:isThreadsLoadingPaused',(_0x28ffed,_0x3ab011,_0x52b8fb)=>{if(!_0x52b8fb&&_0x4fa16e['size'])for(const _0x5be49d of _0x4fa16e){const {id:_0x264540}=Pt(_0x5be49d);_0x4fa16e['delete'](_0x5be49d),_0x8271b4['model']['markers']['get'](_0x5be49d)&&this['_handleThreadMarker'](_0x5be49d,_0x264540);}}),this['listenTo'](_0x8271b4['model']['document'],'change',()=>{for(const {name:_0x5c0ef4,data:{newRange:_0x5371e9}}of _0x8271b4['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d9828,id:_0x17173c}=Pt(_0x5c0ef4);if('comment'!==_0x3d9828)continue;const _0xc962e7=_0x357487['getCommentThread'](_0x17173c),_0x537fed=this['hasMarkerForId'](_0x17173c);_0xc962e7&&(!_0xc962e7['_hasTargetInContent']&&_0x5371e9&&_0x8271b4['editing']['view']['once']('render',()=>{const _0x175e22=_0x8271b4['plugins']['get'](Annotations),_0x236bab=_0x357487['_threadToController']['get'](_0xc962e7)['view'];_0x175e22['getByInnerView'](_0x236bab)['refreshVisibility']();},{'priority':'low'}),_0xc962e7['_hasTargetInContent']=_0x537fed||!!_0x5371e9),_0x5371e9||(_0x4e1455['add'](_0x5c0ef4),_0x4fa16e['delete'](_0x5c0ef4));}for(const _0x4b00b4 of _0x4e1455){const {id:_0x1d35d1}=Pt(_0x4b00b4),_0x139dc3=_0x357487['getCommentThread'](_0x1d35d1);if(_0x4fa16e['delete'](_0x4b00b4),!_0x139dc3)continue;const _0x5dc96c=this['hasMarkerForId'](_0x1d35d1);_0x5dc96c||_0x139dc3['isSubmitted']?_0x5dc96c||_0x139dc3['unlinkedAt']||_0x139dc3['setUnlinkedAt'](new Date()):_0x139dc3['remove']();}_0x4e1455['clear']();});}['_handleInitialThreads'](_0x26e177){_0x26e177['forEach'](_0x502d49=>{_0x502d49['unlinkedAt']&&this['_attachArchivedThread'](_0x502d49['id']);});}['_getTargetForId'](_0x5acb28){const _0x8a15b7=this['editor'],_0x4934ae=this['getAllMarkersForId'](_0x5acb28);return _0x28774f(_0x8a15b7['editing'],_0x4934ae);}['_getTextContext'](_0xdac88a){const _0x5e5c06=this['getAllMarkersForId'](_0xdac88a);let _0x54ba5e='',_0x4d2223=!0x1;for(const _0x3b56c7 of _0x5e5c06){const _0x5ec994=_0x3b56c7['getRange']();for(const _0x9f4b44 of Array['from'](_0x5ec994['getItems']()))_0x9f4b44['is']('$textProxy')?(_0x54ba5e&&_0x4d2223&&(_0x54ba5e+='\x20',_0x4d2223=!0x1),_0x54ba5e+=_0x9f4b44['data']):_0x4d2223=!0x0;_0x4d2223=!0x0;}return _0x54ba5e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x138dfe,_0x266398){const _0x2031ae=this['editor'],_0x43f0cd=_0x2031ae['plugins']['get'](CommentsRepository);let _0x144e60=_0x43f0cd['getCommentThread'](_0x266398);const _0x5e42d9=_0x2031ae['config']['get']('collaboration.channelId'),_0x4c6153=_0x2031ae['plugins']['get'](EditorAnnotations);if(_0x144e60&&(_0x144e60['unlinkedAt']&&_0x144e60['setUnlinkedAt'](null),_0x144e60['isAttached']))return _0x144e60;return!this['getAllMarkersForId'](_0x266398)[0x0]['managedUsingOperations']?_0x2031ae['editing']['view']['once']('render',()=>{if(_0x43f0cd['getCommentThread'](_0x266398))return;const _0xc88859=_0x2031ae['plugins']['get'](Annotations);_0x144e60=_0x43f0cd['openNewCommentThread']({'channelId':_0x5e42d9,'threadId':_0x266398,'target':()=>this['_getTargetForId'](_0x266398),'context':{'type':'text','value':this['_getTextContext'](_0x266398)}});const _0x2879eb=_0x43f0cd['_threadToController']['get'](_0x144e60)['view'],_0x1c26ec=_0xc88859['getByInnerView'](_0x2879eb);_0x1c26ec&&_0x4c6153['registerAnnotation'](_0x1c26ec);},{'priority':'low'}):_0x43f0cd['fetchCommentThread']({'channelId':_0x5e42d9,'threadId':_0x266398})['then'](_0x5041f4=>{if('destroyed'!==_0x2031ae['state']){if(_0x144e60=_0x5041f4,_0x144e60&&!_0x144e60['isAttached']){const _0x105689=_0x144e60['attachTo'](()=>this['_getTargetForId'](_0x266398));_0x4c6153['registerAnnotation'](_0x105689),_0x144e60['isResolved']&&this['_reconvertMarkers'](_0x266398);}else{if(!_0x144e60){const _0xa20d26=this['getAllMarkersForId'](_0x266398);_0x2031ae['model']['change'](_0x2c4096=>{for(const _0x1b6432 of _0xa20d26)_0x2c4096['removeMarker'](_0x1b6432);});}}}}),_0x144e60;}['_handleThreadMarker'](_0x44d281,_0x4882c6){const _0x15fe25=this['_attachMarkerToThread'](_0x44d281,_0x4882c6);_0x15fe25&&!_0x15fe25['context']&&_0x15fe25['setContext']({'type':'text','value':this['_getTextContext'](_0x4882c6)});}['_initAriaMarkerChangeAnnouncements'](){const _0x2f5d99=this['editor'];_0xb7f08d(_0x2f5d99['model'],({left:_0x1a865c,entered:_0x21fa05})=>{for(const _0x537d13 of _0x1a865c)if(Dt(_0x537d13)){_0x2f5d99['ui']['ariaLiveAnnouncer']['announce'](vt(_0x2f5d99['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x220975 of _0x21fa05)if(Dt(_0x220975)){_0x2f5d99['ui']['ariaLiveAnnouncer']['announce'](vt(_0x2f5d99['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x23bd78(_0x130533)));break;}});}}function Vt(_0x4662bd,_0x464bfd){return _0x464bfd?_0x4662bd+':'+_0x464bfd:_0x4662bd;}function Lt(_0x3b7f2d,_0x527636){const _0xaa7d48=_0x527636['schema'],_0x3b31b5=_0x527636['createRange'](_0x3b7f2d['start']);for(const _0x585c5f of _0x3b7f2d['getWalker']()){const {type:_0x4fddac,item:_0x30a782,nextPosition:_0x15f533}=_0x585c5f;if('text'===_0x4fddac||_0xaa7d48['isObject'](_0x30a782)){const _0x34687e=_0x527636['createPositionBefore'](_0x30a782);_0x3b31b5['isCollapsed']&&(_0x3b31b5['start']=_0x34687e),_0x3b31b5['end']=_0x15f533;}}return _0x3b31b5;}function Dt(_0x533acd){return'comment'===Pt(_0x533acd['name'])['group'];}class CommentsUI extends _0x4e3a6a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsRepository,CommentsEditing,EditorAnnotations,Annotations];}get['CommentsListView'](){return CommentsListView;}get['CommentThreadInputView'](){return CommentThreadInputView;}['init'](){const _0x385b57=this['editor'],_0x294c10=_0x385b57['plugins']['get'](CommentsRepository),_0x28cc2d=_0x385b57['plugins']['get'](CommentsEditing),_0x1473e6=_0x385b57['plugins']['get'](Annotations),_0x3a39da=_0x385b57['plugins']['get'](EditorAnnotations);_0x385b57['ui']['componentFactory']['add']('comment',()=>{const _0x410748=this['_createUIButton'](_0x1bde71);return _0x410748['tooltip']=!0x0,_0x410748;}),_0x385b57['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x3a39da['addSourceCollector'](()=>{const _0x412a4b=[];for(const [_0xd118f6,_0x1241df]of _0x294c10['_threadToController']){const _0x45e346=_0x28cc2d['getAllMarkersForId'](_0xd118f6['id']),_0xd0921b=_0x45e346['map'](_0x3dbed2=>_0x3dbed2['getRange']());_0x45e346['length']>0x0&&_0x412a4b['push']([_0x1241df['view'],_0xd0921b]);}return _0x412a4b;}),this['listenTo'](_0x1473e6,'change:activeAnnotations',(_0x368f5a,_0x3b8409,_0x57220a)=>{const _0x5b0d88=Array['from'](_0x57220a)['map'](_0x4c8462=>_0x4c8462['innerView'])['find'](_0x3c5488=>_0x294c10['_viewToController']['has'](_0x3c5488));if(!_0x5b0d88)return void(_0x28cc2d['activeMarker']=null);const _0x49712e=_0x294c10['_viewToController']['get'](_0x5b0d88)['model']['id'],_0x6f3e97='comment:'+_0x49712e;_0x49712e&&_0x28cc2d['hasMarkerForId'](_0x49712e)?_0x28cc2d['activeMarker']=_0x6f3e97:_0x28cc2d['activeMarker']&&(_0x28cc2d['activeMarker']=null);}),this['listenTo'](_0x294c10,'removeCommentThread',(_0x3df038,{threadId:_0x118d14,isFromAdapter:_0x5c1fdd})=>{!_0x5c1fdd&&_0x385b57['ui']['focusTracker']['isFocused']&&_0x28cc2d['hasMarkerForId'](_0x118d14)&&_0x385b57['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x294c10,'addComment',(_0x9de3a4,{threadId:_0x5e321b,isFromAdapter:_0x3c3ba9})=>{if(_0x3c3ba9||!_0x28cc2d['hasMarkerForId'](_0x5e321b)||!_0x294c10['hasCommentThread'](_0x5e321b))return;0x1===_0x294c10['getCommentThread'](_0x5e321b)['length']&&(_0x385b57['editing']['view']['focus'](),_0x9de3a4['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1117f1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x275db8;for(const _0x3e7c5a in _0x1117f1){const _0x33b15c=_0x3e7c5a,_0x4e3570=_0x1117f1[_0x33b15c];if('commentsLicenseKeyValid'==_0x4e3570||'commentsLicenseKeyInvalid'==_0x4e3570||'commentsLicenseKeyExpired'==_0x4e3570||'commentsLicenseKeyDomainLimit'==_0x4e3570||'commentsLicenseKeyNotAllowed'==_0x4e3570||'commentsLicenseKeyEvaluationLimit'==_0x4e3570||'commentsLicenseKeyUsageLimit'==_0x4e3570){delete _0x1117f1[_0x33b15c],_0x275db8=_0x4e3570,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x275db8&&_0x1117f1['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x275db8&&_0x1117f1['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x275db8&&_0x1117f1['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x275db8&&_0x1117f1['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x275db8&&_0x1117f1['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x275db8&&_0x1117f1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2237bd){const _0x53f3e1=this['editor'],_0x14cfc5=new _0x2237bd(_0x53f3e1['locale']),_0x3d466b=_0x53f3e1['commands']['get']('addCommentThread');return _0x14cfc5['set']({'label':vt(_0x53f3e1['locale'],'Comment'),'icon':_0x15a2cf}),_0x14cfc5['bind']('isEnabled')['to'](_0x3d466b,'isEnabled',_0x3d466b,'hasContent',(_0x548cf5,_0x14d2a2)=>_0x548cf5&&_0x14d2a2),this['listenTo'](_0x14cfc5,'execute',()=>{_0x3d466b['execute']();}),_0x14cfc5;}}class CommentsOnly extends _0x4e3a6a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsEditing];}constructor(_0x517dda){super(_0x517dda),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x15c4ac,_0x480d8d,_0x2a1d32)=>{_0x2a1d32?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1185f8,_0x4e853e]of this['editor']['commands'])_0x4e853e['affectsData']&&'addCommentThread'!==_0x1185f8&&_0x4e853e['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 _0xde158b=this['editor']['editing']['view']['document'];this['listenTo'](_0xde158b,'cut',_0x539f72=>_0x539f72['stop'](),{'priority':'highest'}),this['listenTo'](_0xde158b,'clipboardInput',_0x4b960d=>_0x4b960d['stop'](),{'priority':'highest'}),this['listenTo'](_0xde158b,'delete',_0x3d183f=>_0x3d183f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3a59c6,_0x2bc5cc]of this['editor']['commands'])_0x2bc5cc['affectsData']&&'addCommentThread'!==_0x3a59c6&&_0x2bc5cc['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class AnnotationsUIs extends _0x283925{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[Annotations];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x186d50){super(_0x186d50),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x26d5eb=this['context']['plugins']['get'](Annotations);this['listenTo'](_0x26d5eb,'_activateAnnotation',(_0x521fa5,_0x187a7a)=>{for(const _0x39f178 of this['activeUIs']){const _0x41953b=this['_uis']['get'](_0x39f178);(0x0,this['uisData']['get'](_0x39f178)['filter'])(_0x187a7a)&&_0x41953b['setActiveAnnotation'](_0x187a7a);}}),this['listenTo'](_0x26d5eb,'_deactivateAllAnnotations',()=>{for(const _0x237bd9 of this['activeUIs']){this['_uis']['get'](_0x237bd9)['setActiveAnnotation'](null);}}),this['listenTo'](_0x26d5eb['_visibleAnnotations'],'add',(_0x524c48,_0x4f6935)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4f6935);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3fc478){return this['activeUIs']['has'](_0x3fc478);}['activate'](_0x58e486,_0xb78472=this['defaultFilter']){const _0x4c340b=this['context']['plugins']['get'](Annotations);if(!this['_uis']['has'](_0x58e486))throw new _0x21ce1d('annotationsuis-missing-ui',this,{'uiName':_0x58e486});this['isActive'](_0x58e486)&&this['deactivate'](_0x58e486),this['activeUIs']['add'](_0x58e486);const _0x318ce1=new AnnotationCollection();Ot({'source':_0x4c340b['_visibleAnnotations'],'target':_0x318ce1,'filter':_0xb78472}),this['uisData']['set'](_0x58e486,{'collection':_0x318ce1,'filter':_0xb78472});const _0x1474d7=this['_uis']['get'](_0x58e486);_0x1474d7['attach'](_0x318ce1),this['listenTo'](_0x1474d7,'change:activeAnnotation',(_0x502c0a,_0x141f66,_0x2a0fde,_0x1f8d78)=>{_0x1f8d78&&_0x4c340b['_removeActiveAnnotation'](_0x1f8d78),_0x2a0fde&&_0x4c340b['_addActiveAnnotation'](_0x2a0fde);});}['deactivate'](_0x51cd79){if(this['activeUIs']['delete'](_0x51cd79),!this['_uis']['has'](_0x51cd79))throw new _0x21ce1d('annotationsuis-missing-ui',this,{'uiName':_0x51cd79});const _0xc7ff57=this['_uis']['get'](_0x51cd79);_0xc7ff57['detach'](),this['stopListening'](_0xc7ff57),this['uisData']['get'](_0x51cd79)['collection']['destroy'](),this['uisData']['delete'](_0x51cd79);}['switchTo'](_0x209397){if(!this['_uis']['has'](_0x209397))throw new _0x21ce1d('annotationsuis-missing-ui',this,{'uiName':_0x209397});const _0x57a221=this['context']['plugins']['get'](Annotations),_0x498b82=Array['from'](_0x57a221['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x209397);const _0x9133c0=this['_uis']['get'](_0x209397);_0x9133c0['setActiveAnnotation'](_0x498b82),_0x9133c0['_setSelectedAnnotations']&&_0x498b82&&_0x9133c0['_setSelectedAnnotations']([_0x498b82]);}['deactivateAll'](){for(const _0xf39372 of this['activeUIs'])this['deactivate'](_0xf39372);}['register'](_0x32fe89,_0x43af6d){if(this['_uis']['has'](_0x32fe89))throw new _0x21ce1d('annotationsuis-register-already-registered');if('function'!=typeof _0x43af6d['attach']||'function'!=typeof _0x43af6d['detach']||'function'!=typeof _0x43af6d['setActiveAnnotation'])throw new _0x21ce1d('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x32fe89,_0x43af6d);}['refilterAnnotations'](){const _0x5b7c1d=this['context']['plugins']['get'](Annotations)['collection'],_0xcd0a15=new Map(),_0x58f2dc=Array['from'](this['activeUIs']);for(const _0x2a5d51 of this['activeUIs']){const _0x21751b=this['uisData']['get'](_0x2a5d51)['collection'];for(const _0x5116cf of _0x21751b)_0xcd0a15['set'](_0x5116cf,_0x2a5d51);}for(const _0x1b5f19 of _0x5b7c1d){const _0x3ab6e4=_0xcd0a15['get'](_0x1b5f19);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1b5f19);const _0x4e3a39=_0x58f2dc['find'](_0x5e8205=>this['uisData']['get'](_0x5e8205)['filter'](_0x1b5f19));_0x3ab6e4!==_0x4e3a39&&(_0x3ab6e4&&this['uisData']['get'](_0x3ab6e4)['collection']['remove'](_0x1b5f19),_0x4e3a39&&this['uisData']['get'](_0x4e3a39)['collection']['add'](_0x1b5f19));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x413438){const _0x2e821c=[];for(const _0x3c6648 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3c6648)['filter'])(_0x413438)&&_0x2e821c['push'](_0x3c6648);}if(_0x2e821c['length']>0x1)throw new _0x21ce1d('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2e821c,'annotationType':_0x413438['type']});}}const Bt=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x2746e8('px');class AnnotationsSidebarItemView extends _0x4e8972{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x545e21){super(_0x545e21),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4b7ed7,_0x5b6d26)=>_0x4b7ed7+_0x5b6d26),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Nt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4cafae=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4cafae['to']('isAnimationDisabled',_0x248a30=>_0x248a30?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4cafae['to']('top',_0x18ac19=>Ht(_0x18ac19))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x53d30c=this['element']['clientHeight'];_0x53d30c&&(this['height']=_0x53d30c);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Sidebar extends _0x283925{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b19db){super(_0x2b19db),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 _0x219688=this['context']['config']['get']('sidebar.container');_0x219688&&this['setContainer'](_0x219688);}['setContainer'](_0x453b3e){if(!Ft(_0x453b3e))throw new _0x21ce1d('sidebar-setcontainer-invalid-element');this['container']=_0x453b3e;}['_attachToContainer']({viewClass:_0x397de6='',spaceBetweenItems:_0x489e30=0x19}={}){if(!Ft(this['container']))throw new _0x21ce1d('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x397de6,this['_spaceBetweenItems']=_0x489e30;}['rearrange']({removedAnnotation:_0x5374c5,previousAnnotation:_0x39c917,nextAnnotation:_0x27fae8}){const _0x34a20f=this['getSidebarItemView'](_0x5374c5);this['view']['list']['remove'](_0x34a20f),this['_destroySidebarItemView'](_0x5374c5),_0x39c917&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x39c917)),_0x27fae8&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x27fae8)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3a5efb,activatedAnnotation:_0x31a971,disableAnimationOnActivatedAnnotation:_0x47cf80}){if(this['_activeAnnotation']=_0x31a971,_0x3a5efb){_0x3a5efb['isActive']=!0x1;const _0x56af56=this['getSidebarItemView'](_0x3a5efb);_0x56af56&&_0x47cf80&&(_0x56af56['isAnimationDisabled']=!0x1);}if(_0x31a971){const _0x32c6e5=this['getSidebarItemView'](_0x31a971);_0x32c6e5&&(_0x31a971['isActive']=!0x0,_0x47cf80&&(_0x32c6e5['isAnimationDisabled']=!0x0,_0x32c6e5['top']+=0x1),this['_alignToTargetRect'](_0x32c6e5));}}['_detachFromContainer'](_0xb319d3){if(this['view']['element']['remove'](),_0xb319d3){for(const _0x1094f5 of _0xb319d3)this['_destroySidebarItemView'](_0x1094f5);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x4293d8,_0x436c78){_0x436c78||(_0x436c78=_0x4293d8['view']);const _0x437b38=new AnnotationsSidebarItemView(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x437b38,_0x4293d8),this['_annotationToSidebarItemView']['set'](_0x4293d8,_0x437b38),_0x437b38['content']['add'](_0x436c78),this['listenTo'](_0x4293d8['view'],'change:targetRect',(_0x2aac0f,_0x4126b5,_0x17e1f8)=>{const _0x4cd0f7=this['_getTargetTop'](_0x4293d8,_0x17e1f8);_0x437b38['_targetTop']!=_0x4cd0f7&&(_0x437b38['_targetTop']=_0x4cd0f7,this['_setItemTop'](_0x437b38,_0x4cd0f7));}),this['listenTo'](_0x437b38,'change:top',()=>{this['_recalculate'](_0x437b38,'top');}),this['listenTo'](_0x437b38,'change:bottom',()=>{this['_recalculate'](_0x437b38,'bottom');}),this['_alignToTargetRect'](_0x437b38);const _0x4bbf1a=this['_getItemBefore'](_0x437b38);if(_0x4bbf1a)this['_alignAfterItem'](_0x4bbf1a,_0x437b38)||this['_alignToTargetRect'](_0x437b38);else this['_alignToTargetRect'](_0x437b38);return this['_updateLastItem'](),this['view']['list']['add'](_0x437b38),_0x437b38;}['_alignForTopChange'](_0x33136e){if(!_0x33136e['content']['length'])return;const _0x8e2903=this['_getItemBefore'](_0x33136e);if(!_0x8e2903)return;const _0x4a72fa=this['_sidebarItemViewToAnnotation']['get'](_0x8e2903),_0x3f21c1=this['_activeAnnotation'];_0x3f21c1&&_0x3f21c1===_0x4a72fa?this['_alignAfterItem'](_0x8e2903,_0x33136e):this['_alignBeforeItem'](_0x33136e,_0x8e2903);}['_alignForBottomChange'](_0x2b271e){if(!_0x2b271e['content']['length'])return;const _0x1c5a05=this['_getItemAfter'](_0x2b271e);if(!_0x1c5a05)return;const _0x29bffc=this['_sidebarItemViewToAnnotation']['get'](_0x1c5a05),_0xf374a5=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2d397b=this['_activeAnnotation'];_0x2d397b&&_0x2d397b===_0x29bffc&&_0xf374a5?(this['_alignBeforeItem'](_0x1c5a05,_0x2b271e),this['_alignAfterItem'](_0x2b271e,_0x1c5a05)):_0x2d397b&&_0x2d397b===_0x29bffc?this['_alignBeforeItem'](_0x1c5a05,_0x2b271e):this['_alignAfterItem'](_0x2b271e,_0x1c5a05);}['_recalculate'](_0x2412ca,_0x3b2d98){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x8af405,changedProp:_0x3a2ca3}of this['_recalculateBuffer'])'top'===_0x3a2ca3?this['_alignForTopChange'](_0x8af405):this['_alignForBottomChange'](_0x8af405);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2412ca,'changedProp':_0x3b2d98});}['getSidebarItemView'](_0x268cac){return this['_annotationToSidebarItemView']['get'](_0x268cac);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3dd218){const _0x59d71b=this['getSidebarItemView'](_0x3dd218);this['stopListening'](_0x59d71b),this['stopListening'](_0x3dd218['view']),_0x59d71b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3dd218),this['_sidebarItemViewToAnnotation']['delete'](_0x59d71b);}['_createSidebarView'](){const _0x10e177=new AnnotationsSidebarView(this['context']['locale']);return _0x10e177['render'](),this['on']('change:_lastItem',(_0x39e4f9,_0x258920,_0xf4f5bb,_0x334cc6)=>{_0x334cc6&&_0x10e177['unbind']('minHeight'),_0xf4f5bb?_0x10e177['bind']('minHeight')['to'](_0xf4f5bb,'bottom'):_0x10e177['minHeight']=null;}),_0x10e177;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2def78){const _0x196df2=this['_sidebarItemViewToAnnotation']['get'](_0x2def78),_0x3a2585=_0x196df2&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x196df2)-0x1);return _0x3a2585&&this['getSidebarItemView'](_0x3a2585)||null;}['_getItemAfter'](_0x3c658a){const _0x587d24=this['_sidebarItemViewToAnnotation']['get'](_0x3c658a),_0x24d9ec=_0x587d24&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x587d24)+0x1);return _0x24d9ec&&this['getSidebarItemView'](_0x24d9ec)||null;}['_alignBeforeItem'](_0x3bb2c7,_0x499576){_0x3bb2c7['updateHeight']();const _0xa6e2ce=Ut(_0x499576['bottom']+this['_spaceBetweenItems'],_0x3bb2c7['top']);return!!_0xa6e2ce&&(this['_setItemTop'](_0x499576,_0x499576['top']-_0xa6e2ce),!0x0);}['_alignAfterItem'](_0x55ccaa,_0x3567cb){_0x55ccaa['updateHeight']();const _0x22fbbe=Ut(_0x55ccaa['bottom']+this['_spaceBetweenItems'],_0x3567cb['top']);return!!_0x22fbbe&&(this['_setItemTop'](_0x3567cb,_0x3567cb['top']+_0x22fbbe,!0x1),!0x0);}['_alignToTargetRect'](_0x357dcf){const _0x571abb=this['_sidebarItemViewToAnnotation']['get'](_0x357dcf);if(!_0x571abb||!_0x571abb['target']||!_0x571abb['targetRect'])return;const _0x1b3a82=this['_getTargetTop'](_0x571abb,_0x571abb['targetRect']);this['_setItemTop'](_0x357dcf,_0x1b3a82);}['_getTargetTop'](_0x4c9a62,_0xedcefc){if(null===_0xedcefc)return 0x0;if(_0x4c9a62['target']instanceof _0x416d7d)return _0xedcefc['top'];{const _0x52c54a=new _0x416d7d(this['view']['element'])['top'];return _0xedcefc['top']-_0x52c54a;}}['_setItemTop'](_0x5c85bb,_0x3d847f,_0x3b0770=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x3b0770&&(_0x3d847f=Math['max'](_0x3d847f,this['_getMaxAvailableTop'](_0x5c85bb))),_0x5c85bb['top']=_0x3d847f;}['_getMaxAvailableTop'](_0x1192ee){let _0x275a84=this['_getItemBefore'](_0x1192ee),_0x3f78a4=0x0;for(;_0x275a84;)_0x275a84['updateHeight'](),_0x3f78a4+=this['_spaceBetweenItems']+_0x275a84['height'],_0x275a84=this['_getItemBefore'](_0x275a84);return _0x3f78a4;}}function Ut(_0x12b49d,_0x4601c5){return Math['max'](_0x12b49d-_0x4601c5,0x0);}function Ft(_0x642f51){return null!==_0x642f51&&'object'==typeof _0x642f51&&0x1===_0x642f51['nodeType'];}class WideSidebar extends _0x283925{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Sidebar,AnnotationsUIs];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x978f5b){super(_0x978f5b),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x499a27(),this['_refreshPositioningDebounced']=_0x4aa75f(()=>{_0x978f5b['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x56bc8f=this['context']['plugins']['get'](AnnotationsUIs),_0x1874da=this['context']['plugins']['get'](Sidebar);_0x56bc8f['register']('wideSidebar',this),_0x1874da['container']&&_0x56bc8f['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x209ec4){if(_0x209ec4===this['activeAnnotation'])return;const _0x2bbf03=this['context']['plugins']['get'](Sidebar);_0x2bbf03['_activeAnnotation']=_0x209ec4;const _0x3d09d0=this['activeAnnotation'];_0x2bbf03['refresh']({'blurredAnnotation':_0x3d09d0,'activatedAnnotation':_0x209ec4}),this['activeAnnotation']=_0x209ec4;}['attach'](_0x560120){this['annotations']=_0x560120;const _0x55ee83=this['context']['plugins']['get'](Sidebar);if(_0x55ee83['_annotations']=_0x560120,this['isAttached'])throw new _0x21ce1d('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x55ee83,'set:container',()=>{this['detach'](),this['listenTo'](_0x55ee83,'change:container',_0x3bd429=>{_0x3bd429['off'](),this['attach'](_0x560120);});}),_0x55ee83['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4ddc55=_0x25d702=>{_0x25d702['updateTargetRect'](),_0x55ee83['addAnnotation'](_0x25d702);};for(const _0x5003f9 of _0x560120)_0x4ddc55(_0x5003f9);this['listenTo'](_0x560120,'add',(_0x3ef16f,_0x427100)=>{_0x4ddc55(_0x427100);}),this['listenTo'](_0x560120,'remove',(_0x364b97,_0xba62d0,_0x11582c)=>{_0x55ee83['rearrange']({'removedAnnotation':_0xba62d0,'previousAnnotation':_0x560120['get'](_0x11582c-0x1),'nextAnnotation':_0x560120['get'](_0x11582c+0x1)}),_0xba62d0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x560120,'focus',(_0x46e3bb,_0x3fc16f)=>{this['setActiveAnnotation'](_0x3fc16f);}),this['listenTo'](_0x560120,'blur',()=>{this['setActiveAnnotation'](null);});const _0xed9fc3=this['context']instanceof _0x353685?this['context']['editors']:new _0x499a27([this['context']]);for(const _0x314032 of _0xed9fc3)this['_integrateWithEditorAnnotations'](_0x314032);this['listenTo'](_0xed9fc3,'add',(_0x5d2294,_0x35bfcf)=>{this['listenTo'](_0x35bfcf,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x35bfcf);});}),this['listenTo'](_0xed9fc3,'remove',(_0x45c1b5,_0x2e03b1)=>{_0x2e03b1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2e03b1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x21ce1d('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x318f31=this['context']['plugins']['get'](Sidebar);_0x318f31['_detachFromContainer'](this['annotations']),this['stopListening'](_0x318f31),this['stopListening'](this['annotations']),this['context']instanceof _0x353685&&this['stopListening'](this['context']['editors']);for(const _0xad547a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xad547a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x53c70e){if(!_0x53c70e['plugins']['has']('EditorAnnotations'))return;const _0x592ce7=_0x53c70e['plugins']['get']('EditorAnnotations'),_0x4ea467=()=>{const _0x22ac6e=_0x592ce7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x22ac6e[0x0]||null);};this['listenTo'](_0x592ce7,'refresh',_0x4ea467),this['listenTo'](_0x592ce7,'blur',(_0x5926b2,{isAnnotationTracked:_0x23d536})=>{this['activeAnnotation']&&_0x23d536(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x592ce7,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x17c3bb=>{_0x592ce7['hasDomSelection']()&&(_0x4ea467(),_0x17c3bb['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x592ce7);}['_destroyEditorAnnotationsIntegration'](_0x21d3be){this['stopListening'](_0x21d3be),this['_editorAnnotations']['remove'](_0x21d3be);}}class AnnotationCounterButtonView extends _0x1bde71{['counterView'];constructor(_0x1e60ef){super(_0x1e60ef);const _0x5cad9b=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x195b81,_0x22a56c)=>_0x195b81?'...':_0x22a56c['toString']()),this['set']('annotationType',''),this['icon']=_0x15a2cf,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x4e8972(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5cad9b['to']('annotationType',_0xe97998=>'ck-annotation-counter__badge--'+_0xe97998),_0x5cad9b['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5cad9b['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class NarrowSidebar extends _0x283925{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Sidebar,AnnotationsUIs];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d5fd1){super(_0x5d5fd1),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1f5773())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x499a27(),this['_refreshPositioningDebounced']=_0x4aa75f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](AnnotationsUIs)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x10fae3){this['annotations']=_0x10fae3;const _0x5301f9=this['context']['plugins']['get'](Sidebar),_0x1bb9a4=this['balloonPanelView'];if(_0x5301f9['_annotations']=_0x10fae3,this['isAttached'])throw new _0x21ce1d('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5301f9,'set:container',()=>{this['detach'](),this['listenTo'](_0x5301f9,'change:container',_0x563e72=>{_0x563e72['off'](),this['attach'](_0x10fae3);});}),_0x5301f9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1e86ba=_0x4a94f7=>{const _0x205e65=new AnnotationCounterButtonView(this['context']['locale']);_0x5301f9['addAnnotation'](_0x4a94f7,_0x205e65),this['_annotationToNarrowView']['set'](_0x4a94f7,_0x205e65),_0x205e65['bind']('isDirty','annotationType','number')['to'](_0x4a94f7['view'],'isDirty','type','length'),_0x205e65['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1bb9a4['content']['first']!==_0x4a94f7['view']?(this['_showBalloon'](_0x4a94f7),_0x4a94f7['view']['element']['focus'](),this['setActiveAnnotation'](_0x4a94f7)):this['setActiveAnnotation'](null);});};for(const _0x37c31e of _0x10fae3)_0x1e86ba(_0x37c31e);this['listenTo'](_0x10fae3,'add',(_0x4cfa1a,_0x3b2473)=>{_0x1e86ba(_0x3b2473);}),this['listenTo'](_0x10fae3,'remove',(_0x517427,_0x450678,_0x1d6c44)=>{this['_annotationToNarrowView']['get'](_0x450678)['destroy'](),this['_annotationToNarrowView']['delete'](_0x450678),_0x5301f9['rearrange']({'removedAnnotation':_0x450678,'previousAnnotation':_0x10fae3['get'](_0x1d6c44-0x1),'nextAnnotation':_0x10fae3['get'](_0x1d6c44+0x1)}),_0x450678===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x10fae3,'focus',(_0x5db1be,_0x52fa40)=>{this['setActiveAnnotation'](_0x52fa40);}),this['listenTo'](_0x10fae3,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x17faa8,_0x4b6604)=>{_0x4b6604['keyCode']===_0x4350d7['esc']&&_0x1bb9a4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1bb9a4['content']['first']),this['_hideBalloon'](),_0x4b6604['stopPropagation'](),_0x4b6604['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5ec4c2,_0x3e2af1)=>{const _0x12140d=_0x3e2af1['target'];_0x1bb9a4['isVisible']&&_0x1bb9a4['element']['contains'](_0x12140d)||_0x5301f9['view']['element']['contains'](_0x12140d)||_0x5ec4c2['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x498271=>_0x498271['contains'](_0x12140d))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x4750c9=this['context']instanceof _0x353685?this['context']['editors']:new _0x499a27([this['context']]);for(const _0x576952 of _0x4750c9)this['_integrateWithEditorAnnotations'](_0x576952);this['listenTo'](_0x4750c9,'add',(_0x2b7aa8,_0xba7550)=>{this['listenTo'](_0xba7550,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xba7550);});}),this['listenTo'](_0x4750c9,'remove',(_0x13beaa,_0x212a13)=>{_0x212a13['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x212a13['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x11cd1f){if(_0x11cd1f===this['activeAnnotation'])return;const _0xacc491=this['context']['plugins']['get'](Sidebar);if(_0xacc491['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x11cd1f,'disableAnimationOnActivatedAnnotation':!0x0}),_0x11cd1f)_0xacc491['getSidebarItemView'](_0x11cd1f)?this['_showBalloon'](_0x11cd1f):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x11cd1f;}['detach'](){if(!this['isAttached'])throw new _0x21ce1d('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x427103=this['context']['plugins']['get'](Sidebar);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3cf1fc=>_0x3cf1fc['destroy']()),this['_annotationToNarrowView']['clear'](),_0x427103['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x353685&&this['stopListening'](this['context']['editors']);for(const _0x5a599c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5a599c);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'](_0x1967fc){if(!_0x1967fc['plugins']['has']('EditorAnnotations'))return;const _0x2faf70=_0x1967fc['plugins']['get']('EditorAnnotations'),_0x3c59df=this['context']['plugins']['get'](Sidebar),_0x1282a1=this['annotations'],_0x166094=this['balloonPanelView'],_0x3ea66f=()=>{const _0x2eb508=_0x2faf70['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2eb508),this['setActiveAnnotation'](_0x2eb508[0x0]||null);};this['listenTo'](_0x2faf70,'refresh',_0x3ea66f),this['listenTo'](_0x2faf70,'blur',(_0x4197d4,{isAnnotationTracked:_0x50f254})=>{this['activeAnnotation']&&_0x50f254(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2faf70,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1282a1,'blur',_0x5942b3=>{_0x2faf70['hasDomSelection']()&&_0x5942b3['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3be0e9,_0x27ff6c)=>{const _0x342b34=_0x27ff6c['target'];_0x166094['isVisible']&&_0x166094['element']['contains'](_0x342b34)||_0x3c59df['view']['element']['contains'](_0x342b34)||this['activeAnnotation']&&_0x2faf70['hasDomSelection']()&&(_0x3ea66f(),_0x3be0e9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2faf70);}['_destroyEditorAnnotationsIntegration'](_0x4955f1){_0x4955f1&&(this['stopListening'](_0x4955f1),this['_editorAnnotations']['remove'](_0x4955f1));}['_setSelectedAnnotations'](_0xe02ac){for(const _0xe3db4f of this['_selectedAnnotations'])_0xe02ac['includes'](_0xe3db4f)||this['_manuallyClosedAnnotationViews']['delete'](_0xe3db4f['view']);this['_selectedAnnotations']=_0xe02ac;}['_refreshPositioning'](){const _0x45b70d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x45b70d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3e8d38){if(this['_manuallyClosedAnnotationViews']['has'](_0x3e8d38['view']))return;const _0x4a8e27=this['balloonPanelView']['content']['first'];_0x4a8e27!==_0x3e8d38['view']?(_0x4a8e27&&this['_detachListeners'](_0x4a8e27),this['_attachListeners'](_0x3e8d38['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3e8d38['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3e3bbf=this['balloonPanelView']['content']['first'],_0x2ac4e3=_0x3e3bbf&&this['annotations']['getByView'](_0x3e3bbf);if(!_0x2ac4e3||!this['_annotationToNarrowView']['has'](_0x2ac4e3))return;const _0x1ddb8f=this['_annotationToNarrowView']['get'](_0x2ac4e3)['element'],_0x435da2=(function(){const _0x496b43=ht['defaultPositions'];return[_0x496b43['southArrowNorthEast'],_0x496b43['northArrowSouthEast'],_0x496b43['southArrowNorth'],_0x496b43['northArrowSouth'],_0x496b43['southArrowNorthWest'],_0x496b43['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1ddb8f,'positions':_0x435da2});}['_hideBalloon'](){const _0x2299fd=this['balloonPanelView'],_0x2dc201=_0x2299fd['content']['first'];_0x2dc201&&(this['_detachListeners'](_0x2dc201),_0x2299fd['unpin'](),_0x2299fd['content']['clear']());}['_attachListeners'](_0x106e15){this['listenTo'](_0x106e15,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x106e15,'Esc',(_0x34c175,_0x59deca)=>{this['_manuallyClosedAnnotationViews']['add'](_0x106e15),this['_hideBalloon'](),_0x59deca();});}['_detachListeners'](_0x152a81){this['stopListening'](_0x152a81);}}class InlineAnnotations extends _0x4e3a6a{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[EditorAnnotations,at,AnnotationsUIs];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x566443){super(_0x566443),_0x566443['editing']['view']['addObserver'](ut),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x566443['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x4aa75f(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x4417df=this['editor']['plugins']['get'](AnnotationsUIs);_0x4417df['context']===this['editor']&&(_0x4417df['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x22ad60,_0x2db378)=>{const _0x27bbe8=this['_balloon'];if(this['isAttached']&&_0x27bbe8['visibleView']){const _0x1a6dfe=this['annotations']['getByView'](_0x27bbe8['visibleView']);_0x1a6dfe&&this['_closeAnnotation'](_0x1a6dfe),_0x2db378();}}));}['afterInit'](){const _0x308f5c=this['editor']['plugins']['get'](AnnotationsUIs);_0x308f5c['context']===this['editor']&&(_0x308f5c['hasActive']()||_0x308f5c['switchTo']('inline'));}['setActiveAnnotation'](_0x3c29b8){_0x3c29b8!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3c29b8&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3c29b8)&&this['_addAnnotationToBalloon'](_0x3c29b8,!0x0),_0x3c29b8['isActive']=!0x0),_0x3c29b8||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3c29b8);}['attach'](_0x595f0b){this['annotations']=_0x595f0b;const _0x408ecf=this['editor']['plugins']['get'](AnnotationsUIs),_0xaccf7=this['_balloon'];if(this['isAttached'])throw new _0x21ce1d('inlineannotations-attach-already-attached',this);if(_0x408ecf['context']!==this['editor'])throw new _0x21ce1d('inlineannotations-not-allowed-with-context',this);const _0x24c796=this['editor']['plugins']['get'](EditorAnnotations);this['listenTo'](_0x24c796,'refresh',()=>{const _0x9bc794=_0x24c796['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4d591c,_0x47056d;!this['_forceRefresh']&&(_0x4d591c=_0x9bc794,_0x47056d=this['_selectedAnnotations'],_0x4d591c['length']===_0x47056d['length']&&_0x4d591c['every'](_0x1ebdaa=>_0x47056d['includes'](_0x1ebdaa)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x9bc794),this['setActiveAnnotation'](_0x9bc794[0x0]||null));}),this['listenTo'](_0x24c796,'blur',(_0x2da0ab,{isAnnotationTracked:_0x462db5})=>{this['activeAnnotation']&&_0x462db5(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x24c796,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x55ad8b,_0xdd504a,_0x5e4c03)=>{_0x5e4c03||this['setActiveAnnotation'](null);}),this['listenTo'](_0x595f0b,'remove',(_0x14d677,_0x1415a9)=>{this['_removeAnnotationFromBalloon'](_0x1415a9),_0x1415a9===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xaccf7,'change:visibleView',(_0x8de4fd,_0x34cd88,_0x5d91bb,_0x638f9b)=>{_0x638f9b&&this['stopListening'](_0x638f9b);const _0x587bb8=_0x595f0b['getByView'](_0x5d91bb);_0x5d91bb&&_0x587bb8&&(this['listenTo'](_0x5d91bb,'change:height',()=>{_0xaccf7['updatePosition']();}),this['listenTo'](_0x5d91bb,'Esc',()=>{this['_closeAnnotation'](_0x587bb8),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x587bb8&&this['setActiveAnnotation'](_0x587bb8));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xaccf7['visibleView']&&(_0x595f0b['getByView'](_0xaccf7['visibleView'])&&_0xaccf7['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 _0x21ce1d('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x7d7b5a of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x7d7b5a);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x63dbd5){for(const _0x2844c8 of this['_selectedAnnotations'])_0x63dbd5['includes'](_0x2844c8)||this['_manuallyClosed']['delete'](_0x2844c8);for(const _0x352814 of this['annotations'])_0x63dbd5['includes'](_0x352814)||this['_removeAnnotationFromBalloon'](_0x352814);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3741ca of _0x63dbd5)this['_addAnnotationToBalloon'](_0x3741ca);}this['_selectedAnnotations']=_0x63dbd5;}['_addAnnotationToBalloon'](_0x4f371d,_0x3b70a0=!0x1){this['_manuallyClosed']['has'](_0x4f371d)||(this['_addedAnnotations']['has'](_0x4f371d)||this['_balloon']['hasView'](_0x4f371d['view'])||(this['_addedAnnotations']['add'](_0x4f371d),this['_balloon']['add']({'stackId':_0x4f371d['view']['id'],'view':_0x4f371d['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4f371d)}})),_0x3b70a0&&this['_balloon']['showStack'](_0x4f371d['view']['id']));}['_getBalloonTargetForAnnotation'](_0xe37d84){const _0x4e9d71=_0xe37d84['target'],_0x188125=this['editor']['editing']['view'],_0x3f0d09=_0x188125['document']['selection']['getFirstRange'](),_0x2f7d68=_0x188125['domConverter']['viewRangeToDom'](_0x3f0d09);if(_0x2f7d68['collapse'](!0x0),_0x4e9d71){if(_0x4e9d71 instanceof _0x416d7d)return _0x4e9d71;let _0x2c397f=[];for(const _0x325413 of _0x4e9d71)_0x2c397f['push'](..._0x416d7d['getDomElementRects'](_0x325413));_0x2c397f=function(_0x3c26da){const _0x22a45f=[];let _0x222c1b=_0x3c26da[0x0];for(let _0x34e10a=0x1;_0x34e10a<_0x3c26da['length'];_0x34e10a++)if(Wt(_0x222c1b,_0x3c26da[_0x34e10a])){const _0x385cad=_0x3c26da[_0x34e10a]['width'];_0x222c1b['width']+=_0x385cad,_0x222c1b['right']+=_0x385cad;}else _0x22a45f['push'](_0x222c1b),_0x222c1b=_0x3c26da[_0x34e10a];return _0x22a45f['push'](_0x222c1b),_0x22a45f;}(_0x2c397f);const _0x3af51b=_0x2f7d68['getBoundingClientRect']();return _0x2c397f['find'](_0x1715f7=>_0x1715f7['top']<=_0x3af51b['top']&&_0x1715f7['bottom']>=_0x3af51b['bottom']&&_0x1715f7['left']<=_0x3af51b['left']&&_0x1715f7['right']>=_0x3af51b['right'])||_0x2c397f[0x0];}return _0xe37d84['targetRect']||_0x2f7d68;}['_removeAnnotationFromBalloon'](_0x5b613e){this['_addedAnnotations']['has'](_0x5b613e)&&this['_balloon']['hasView'](_0x5b613e['view'])&&(this['_addedAnnotations']['delete'](_0x5b613e),this['_balloon']['remove'](_0x5b613e['view']));}['_closeAnnotation'](_0x13f5f3){this['_manuallyClosed']['add'](_0x13f5f3),this['_removeAnnotationFromBalloon'](_0x13f5f3);}}function Wt(_0x3a9105,_0x264d17){return _0x3a9105['top']===_0x264d17['top']&&_0x3a9105['bottom']===_0x264d17['bottom']&&_0x3a9105['right']===_0x264d17['left'];}class CommentsArchiveView extends _0x4e8972{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0xe5827,_0x54c3f5){super(_0xe5827),this['set']('isEmpty',!_0x54c3f5['length']),this['focusTracker']=new _0x252bbd(),this['_annotationViews']=_0x54c3f5,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x10e0b({'focusables':_0x54c3f5,'focusTracker':this['focusTracker']}),this['listenTo'](_0x54c3f5,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x54c3f5,'remove',(_0x10fbd1,_0x3a5487)=>{_0x3a5487['isActive']&&this['focus'](),_0x54c3f5['length']||(this['isEmpty']=!0x0);});const _0x4cd8c4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':vt(_0xe5827,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x54c3f5},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4cd8c4['if']('isEmpty','ck-hidden',_0x28bcec=>!_0x28bcec)]},'children':[{'text':vt(_0xe5827,'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 _0x46ed45 of this['_annotationViews'])this['focusTracker']['add'](_0x46ed45['element']);this['_annotationViews']['on']('change',(_0x4fb5d5,{added:_0x17b885,removed:_0x41f845})=>{for(const _0x5a1169 of _0x17b885)this['focusTracker']['add'](_0x5a1169['element']);for(const _0x3ad843 of _0x41f845)this['focusTracker']['remove'](_0x3ad843['element']);});}}class CommentsArchive extends _0x283925{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsRepository,Annotations];}constructor(_0x262ea2){super(_0x262ea2),this['archivedThreads']=new _0x499a27();}['init'](){const _0x1afc17=this['context'],_0x5858eb=_0x1afc17['plugins']['get'](CommentsRepository),_0x3adc33=_0x1afc17['plugins']['get'](Annotations);this['listenTo'](_0x5858eb,'addCommentThread',(_0x563fa0,{threadId:_0x59747f})=>{const _0x2159b3=_0x5858eb['getCommentThread'](_0x59747f);_0x2159b3['archivedAt']&&this['archivedThreads']['add'](_0x2159b3,this['_calculatePosition'](_0x2159b3['archivedAt'])),this['listenTo'](_0x2159b3,'change:archivedAt',(_0x35b0ca,_0x2c430d,_0x1110c2)=>{_0x1110c2?this['archivedThreads']['has'](_0x2159b3)||this['archivedThreads']['add'](_0x2159b3,this['_calculatePosition'](_0x2159b3['archivedAt'])):this['archivedThreads']['has'](_0x2159b3)&&this['archivedThreads']['remove'](_0x2159b3);});}),this['listenTo'](_0x5858eb,'removeCommentThread',(_0x1eadb9,{threadId:_0x46df38})=>{const _0x3f30ab=_0x5858eb['getCommentThread'](_0x46df38);this['stopListening'](_0x3f30ab),this['archivedThreads']['has'](_0x3f30ab)&&this['archivedThreads']['remove'](_0x3f30ab);},{'priority':'highest'}),this['listenTo'](_0x3adc33['collection'],'focus',(_0x5d52ca,_0x7ad2c6)=>{_0x7ad2c6['isVisible']||(_0x7ad2c6['isActive']=!0x0,_0x3adc33['activate'](_0x7ad2c6));});}['_calculatePosition'](_0x28c4d0){const _0x31dd1f=[...this['archivedThreads']]['findIndex'](_0x338b17=>_0x338b17['archivedAt']<_0x28c4d0);return _0x31dd1f>-0x1?_0x31dd1f:this['archivedThreads']['length'];}}class CommentsArchiveUI extends _0x4e3a6a{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsArchive,ct];}constructor(_0x2e8517){super(_0x2e8517),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4103c3=this['editor'],_0x3eafb1=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4103c3['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1bde71,!0x0)),_0x4103c3['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4b4b7b=this['_createCommentsArchiveButton'](ot);return _0x4b4b7b['set']({'role':'menuitemcheckbox'}),_0x4b4b7b;});const _0x26f540=_0x4103c3['plugins']['get'](CommentsArchive),_0x1bfa3d=_0x4103c3['plugins']['get']('Annotations'),_0xd80707=_0x4103c3['plugins']['get']('CommentsRepository');_0x26f540['archivedThreads']['forEach'](_0x30d5a7=>{this['_handleNewThread'](_0x30d5a7);}),this['listenTo'](_0x26f540['archivedThreads'],'add',(_0x1e6d10,_0x3c04c7)=>{this['_handleNewThread'](_0x3c04c7);}),this['listenTo'](_0x1bfa3d['collection'],'add',(_0x19b2a1,_0x25e98c)=>{const _0x28f93b=this['_pendingThreads']['find'](_0x5d58fb=>{const _0x20ce4b=_0xd80707['_threadToController']['get'](_0x5d58fb);return _0x20ce4b&&_0x25e98c['innerView']===_0x20ce4b['view'];});if(_0x28f93b){const _0x5eac2e=this['_calculatePosition'](_0x28f93b['archivedAt']);this['_addAnnotationToArchive'](_0x25e98c,_0x5eac2e),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x28f93b),0x1);}}),this['listenTo'](_0x26f540['archivedThreads'],'remove',(_0x53699e,_0x1aa500)=>{const _0x526850=_0x4103c3['config']['get']('collaboration.channelId');if(!_0x526850||_0x1aa500['channelId']===_0x526850){if(this['_pendingThreads']['includes'](_0x1aa500))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1aa500),0x1);else{const _0x58b6f3=_0xd80707['_threadToController']['get'](_0x1aa500),_0x403189=_0x1bfa3d['getByInnerView'](_0x58b6f3['view']);this['annotationViews']['remove'](_0x403189['view']),this['stopListening'](_0x403189),this['stopListening'](_0x403189['focusableElements']);}}}),this['listenTo'](_0x1bfa3d['collection'],'add',(_0x41ec4c,_0x13dbb7)=>{this['listenTo'](_0x13dbb7,'escape',_0x3eafb1);}),this['listenTo'](_0x1bfa3d['collection'],'remove',(_0x3d21a9,_0x1d9064)=>{this['stopListening'](_0x1d9064,'escape',_0x3eafb1);});}['_addAnnotationToArchive'](_0x7b1d4d,_0x13508e){this['listenTo'](_0x7b1d4d,'set:isVisible',_0x1e0122=>{_0x1e0122['return']=!0x1,_0x1e0122['stop']();}),this['annotationViews']['add'](_0x7b1d4d['view'],_0x13508e);}['_handleNewThread'](_0xc9a70){const _0x464194=this['editor']['plugins']['get']('CommentsRepository'),_0xe868c4=this['editor']['plugins']['get']('Annotations'),_0x3506a1=this['editor']['config']['get']('collaboration.channelId');if(!_0x3506a1||_0xc9a70['channelId']===_0x3506a1){const _0x4b1a26=_0x464194['_threadToController']['get'](_0xc9a70);if(!_0x4b1a26)return void this['_pendingThreads']['push'](_0xc9a70);const _0x383c08=this['_calculatePosition'](_0xc9a70['archivedAt']),_0x19f19f=_0xe868c4['getByInnerView'](_0x4b1a26['view']);_0x19f19f['isVisible']&&_0xe868c4['_visibleAnnotations']['remove'](_0x19f19f),this['_addAnnotationToArchive'](_0x19f19f,_0x383c08);}}['_calculatePosition'](_0x1d5880){const _0x188501=this['editor']['config']['get']('collaboration.channelId'),_0x232e51=[...this['editor']['plugins']['get'](CommentsArchive)['archivedThreads']]['filter'](_0x745ae6=>_0x745ae6['channelId']===_0x188501)['findIndex'](_0x331a24=>_0x331a24['archivedAt']<_0x1d5880);return _0x232e51<0x0||_0x232e51>this['annotationViews']['length']?this['annotationViews']['length']:_0x232e51-0x1;}['_toggleDialog'](){const _0x5f15ae=this['editor'],_0x47ebc9=_0x5f15ae['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new CommentsArchiveView(_0x5f15ae['locale'],this['annotationViews'])),'commentsArchive'===_0x47ebc9['id']?_0x47ebc9['hide']():_0x47ebc9['show']({'id':'commentsArchive','title':vt(_0x5f15ae['locale'],'COMMENTS_ARCHIVE'),'icon':_0x56a931,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x8ec7c3,_0x2bd7a8=!0x1){const _0x52d6e0=this['editor']['locale'],_0x22b9f6=this['editor']['plugins']['get']('Dialog'),_0x2a2a14=new _0x8ec7c3(_0x52d6e0);return _0x2a2a14['bind']('isEnabled')['to'](this,'isEnabled'),_0x2a2a14['bind']('isOn')['to'](_0x22b9f6,'id',_0x58629f=>'commentsArchive'===_0x58629f),_0x2a2a14['set']({'label':vt(_0x52d6e0,'COMMENTS_ARCHIVE'),'icon':_0x56a931,'isToggleable':!0x0}),_0x2bd7a8&&(_0x2a2a14['tooltip']=!0x0),this['listenTo'](_0x2a2a14,'execute',()=>this['_toggleDialog']()),_0x2a2a14;}['_hideDialogOnAnnotationEscape']=_0x2df739=>{const _0x59a9f7=_0x2df739['source'];if(!this['annotationViews']['has'](_0x59a9f7['view']))return;const _0x1c399f=this['editor']['plugins']['get']('Dialog');_0x1c399f['isOpen']&&'commentsArchive'===_0x1c399f['id']&&(_0x1c399f['hide'](),_0x2df739['stop']());};}class Comments extends _0x4e3a6a{static get['requires'](){return[CommentsRepository,CommentsEditing,CommentsUI,CommentsArchive,CommentsArchiveUI,CommentsOnly,WideSidebar,NarrowSidebar,InlineAnnotations];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{AddCommentThreadCommand,Annotation,AnnotationCollection,AnnotationCounterButtonView,AnnotationView,Annotations,AnnotationsSidebarItemView,AnnotationsSidebarView,AnnotationsUIs,BaseCommentThreadView,BaseCommentView,Comment,CommentThread,CommentThreadController,CommentThreadInputView,CommentThreadView,CommentView,Comments,CommentsArchive,CommentsArchiveUI,CommentsEditing,CommentsListView,CommentsOnly,CommentsRepository,CommentsUI,EditorAnnotations,InlineAnnotations,NarrowSidebar,Sidebar,WideSidebar,Ot as bindAnnotationCollections};
|
|
23
|
+
import{Command as _0x29bf2e,Context as _0x59fc06,ContextPlugin as _0x41d5ed,Editor as _0x2de2e0,PendingActions as _0x478dcf,Plugin as _0x3d6b36}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x6d6638,Collection as _0x4284a7,DomEmitterMixin as _0x3dfafb,FocusTracker as _0x16deef,KeystrokeHandler as _0x208d02,ObservableMixin as _0x21a2fd,Rect as _0x3d1cc4,diff as _0x37d636,first as _0x214eb1,getEnvKeystrokeText as _0x393c6e,keyCodes as _0xa09830,priorities as _0xa7cdbb,scrollViewportToShowTarget as _0x4c5b31,toUnit as _0x48a5c0,uid as _0x2ff495}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x51d2bf,ConfirmMixin as _0x506786,FOCUS_ANNOTATION_KEYSTROKE as _0x57653d,LateFocusButtonView as _0x1a76a3,LateFocusDropdownButtonView as _0x254c12,UserView as _0x286742,Users as _0x12e146,getAllMarkersDomElementsSorted as _0x4943c8,getDateTimeFormatter as _0x153da0,hashObject as _0xbb7f8f,setupThreadKeyboardNavigation as _0xfba6ca,surroundingMarkersDetector as _0x15978d,trimHtml as _0x588d00}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x25e46d,debounce as _0xb07f85,isEqual as _0x2d7453,set as _0x91f587,throttle as _0x4809c5,unset as _0x1f251b}from'es-toolkit/compat';import{IconAddComment as _0xf9075a,IconCheck as _0x2b117b,IconCommentsArchive as _0x36c51a,IconPencil as _0x2aa1a6,IconRemoveComment as _0x1886b6,IconThreeVerticalDots as _0x4394b5,IconUndo as _0x14b7c8}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x35dc9c,BodyCollection as _0x44c76b,ButtonView as _0x2d6eba,ContextualBalloon as _0x31f7b0,Dialog as _0x1e157e,DialogViewPosition as _0x5207c7,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
|
+
_0x21a2fd();var bt=class extends It{['model'];['view'];constructor(_0x1fede1,_0x355e4f){super(),this['model']=_0x1fede1,this['model']['_isAttached']=!0x0,this['view']=_0x355e4f,this['listenTo'](_0x355e4f,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x355e4f,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x355e4f,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x355e4f,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x355e4f,'addComment',(_0x4a62d0,_0x2a472f)=>this['addComment'](_0x2a472f)),this['listenTo'](_0x355e4f,'updateComment',(_0x4b6daf,_0x536a86,_0x4d2be0)=>this['updateComment'](_0x536a86,_0x4d2be0)),this['listenTo'](_0x355e4f,'removeComment',(_0x545696,_0x38194b)=>this['removeComment'](_0x38194b));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3766fb){this['model']['addComment']({'content':_0x3766fb,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x437e14,_0x512c16){this['model']['getComment'](_0x437e14)['update']({'content':_0x512c16});}['removeComment'](_0x3f2593){this['model']['getComment'](_0x3f2593)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x18abb4,_0x33f03c,_0x38dce6){const t=_0x18abb4['t'];switch(_0x33f03c){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'},_0x38dce6);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'},_0x38dce6);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'},_0x38dce6);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'},_0x38dce6);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x38dce6);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'},_0x38dce6);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'},_0x38dce6);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'},_0x38dce6);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(_0x3c5d9b,_0xabcd1f){super(_0x3c5d9b);const _0x4b6451=_0x2ff495();this['main']=this['createCollection'](),this['editable']=new st(_0x3c5d9b,_0xabcd1f,void 0x0,{'label':()=>Et(_0x3c5d9b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x3c5d9b['uiLanguageDirection'],'lang':_0x3c5d9b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x4b6451},'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(_0x24a163){super(_0x24a163),this['view']=new kt(_0x24a163['locale'],_0x24a163['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x428c7b=this['editor']['editing']['view'],_0x2cb1ce=this['view']['editable'];_0x2cb1ce['name']=_0x428c7b['document']['getRoot']()['rootName'],this['view']['render']();const _0x10526c=_0x2cb1ce['element'];this['setEditableElement'](_0x2cb1ce['name'],_0x10526c),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x428c7b['attachDomRoot'](_0x10526c),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x21a2fd(_0x2de2e0);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Ot)());constructor(_0x2e8ef4={}){(_0x2e8ef4=Object['assign']({},_0x2e8ef4))['plugins']||(_0x2e8ef4['plugins']=CommentEditor['defaultPlugins']),super(_0x2e8ef4),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 _0xf3b062=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xf3b062))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x504f53=>{const _0x13c40a=this['model']['document']['getRoot'](),_0x161679=_0x13c40a&&_0x13c40a['getChild'](_0x13c40a['childCount']-0x1);_0x504f53['setSelection'](_0x161679,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3e5402=this['editing']['view'],_0x46ab39=_0x3e5402['document']['getRoot'](),_0x1084bf=_0x46ab39['getChild'](0x0);_0x46ab39['childCount']>0x1||!_0x1084bf||'p'!=_0x1084bf['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x3e5402,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1084bf['placeholder']=this['placeholder']),ut({'view':_0x3e5402,'element':_0x1084bf,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1084bf);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0xe415ee,_0x32d1d4={}){super(_0xe415ee),this['editor']=null,this['_editorConfig']=_0x32d1d4,this['set']('value',_0x32d1d4['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0xe415ee,'Reply...')),this['set']('submitLabel',Et(_0xe415ee,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x208d02(),this['focusTracker']=new _0x16deef(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x222742=>!_0x222742['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',(_0xf2e8ca,_0x3ef594)=>{this['cancelButtonView']['fire']('execute'),_0x3ef594();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3e79c6,_0x474130)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x474130());}),this['on']('submit',(_0x390bbf,_0x714f53)=>{_0x714f53['length']>0xfde8?(alert(Et(_0xe415ee,'TOO_LONG_COMMENT_ALERT',[_0x714f53['length'],0xfde8])),_0x390bbf['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 _0x3b8717=this['editor'];this['element']['insertBefore'](_0x3b8717['ui']['element'],this['element']['firstChild']),_0x3b8717['model']['document']['on']('change',()=>this['value']=_0x3b8717['getData']()),_0x3b8717['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3b8717['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1b107a){-0x1===_0x1b107a?(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:_0x1baa22}=this,_0x3e4ce2=new _0x2d6eba(_0x1baa22);return _0x3e4ce2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3e4ce2['withText']=!0x0,_0x3e4ce2['bind']('label')['to'](this,'submitLabel'),_0x3e4ce2['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3e4ce2['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5797a4,_0x54b71c)=>!_0x54b71c&&!!_0x5797a4['trim']()),_0x3e4ce2;}['_createCancelButton'](){const {locale:_0xe1a513}=this,_0x2d42e5=new _0x2d6eba(_0xe1a513);return _0x2d42e5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2d42e5['label']=Et(_0xe1a513,'Cancel'),_0x2d42e5['withText']=!0x0,_0x2d42e5['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2d42e5;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x46bcf9=>{this['focusTracker']['add'](_0x46bcf9['element']);}),this['focusables']['on']('change',(_0x1a22b7,_0x3a2677)=>{for(const _0x125708 of Array['from'](_0x3a2677['added'])['reverse']())this['focusTracker']['add'](_0x125708['element']);});}},xt=class extends ht{constructor(_0x34bd44,_0x1c7320,_0x34b5a9){super(_0x34bd44),this['commentInputView']=new St(_0x34bd44,_0x34b5a9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x220359,_0x4344dd)=>_0x220359||!!_0x4344dd),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 _0x286742(_0x34bd44,_0x1c7320),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'](_0x426673){this['commentInputView']['focus'](_0x426673);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3e20fc,_0x2abecd)=>{const {submitButtonView:_0x3f9b69,cancelButtonView:_0x237f87,editor:_0x5db4b5}=this['commentInputView'];[_0x3f9b69['element'],_0x237f87['element'],_0x5db4b5?_0x5db4b5['editing']['view']['getDomRoot']():null]['filter'](_0x59778c=>_0x59778c)['some'](_0x9d9473=>_0x9d9473['contains'](_0x2abecd['target']))||(this['focus'](),_0x2abecd['preventDefault']());});}},Pt=class extends ht{constructor(_0x401e6b){super(_0x401e6b);const _0x2867e7=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2867e7['to']('count',_0x2ccf9e=>Et(_0x401e6b,'NUMBER_OF_COMMENTS',_0x2ccf9e))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5e47be,_0x58095d,_0x3e35f4){super(_0x5e47be);const _0x838e26=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x58095d['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x58095d,this['_config']=_0x3e35f4,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1fc4c7=>this['commentViews']['map'](_0x4fb36a=>_0x4fb36a['element'])['includes'](_0x1fc4c7['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x5e47be),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xc2f989=>_0xc2f989-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1830ea of _0x58095d['comments'])this['_handleNewCommentModel'](_0x1830ea);this['_handleInfoComment'](),this['listenTo'](_0x58095d['comments'],'add',(_0x48c74a,_0x413587)=>{const _0x1b042d=this['_calculatePosition'](_0x413587);this['length']++,this['_handleNewCommentModel'](_0x413587,_0x1b042d),this['refreshVisibleViews']();}),this['listenTo'](_0x58095d['comments'],'remove',(_0x43ddca,_0x5d9909)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5d9909),this['refreshVisibleViews']();}),this['listenTo'](_0x58095d,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x58095d,'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',_0x838e26['if']('length','ck-hidden',_0x4ee26a=>!_0x4ee26a)],'aria-label':Et(_0x5e47be,'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'](_0x826de9){-0x1===_0x826de9?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xa62839 of this['commentViews'])_0xa62839['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x13d42c,_0xc90196){const _0x46ab22=new this['_config']['CommentView'](this['locale'],_0x13d42c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x46ab22['viewUid']=_0x13d42c['id'],_0x46ab22['delegate']('removeComment')['to'](this),_0x46ab22['delegate']('updateComment')['to'](this),_0x46ab22['delegate']('resolveCommentThread')['to'](this),_0x46ab22['delegate']('editorReady')['to'](this),_0x46ab22['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x46ab22,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x46ab22,_0xc90196);}['_calculatePosition'](_0x1d85db){const _0x37fe62=this['_model']['_findOptimalIndex'](_0x1d85db);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1d85db['authoredAt']?_0x37fe62-0x1:_0x37fe62:_0x37fe62-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x8ef611={'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'],_0x8ef611,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x8ef611));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x538feb){const _0x2ab9a4=this['commentViews']['remove'](_0x538feb['id']);this['stopListening'](_0x2ab9a4),_0x2ab9a4['isEditMode']&&this['_updateHasDirtyComment'](),_0x2ab9a4['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x537c85=>_0x537c85['isEditMode']);}['_rearrangeCollapse'](){const _0x1b2c3b=function(_0x3b3453){const _0x3ffdc2=new _0x4284a7();for(const _0x3b9f05 of _0x3b3453)_0x3ffdc2['add'](_0x3b9f05);return _0x3ffdc2;}(this['commentViews']),_0x270316=this['_collapsedCommentsView']['count'];for(let _0x262dfe=0x1;_0x262dfe<=_0x270316;_0x262dfe++)_0x1b2c3b['remove'](0x1);for(const _0xd0b1df of _0x1b2c3b)_0xd0b1df['collapse']();_0x270316>0x0&&_0x1b2c3b['add'](this['_collapsedCommentsView'],0x1),Dt(_0x37d636(Array['from'](this['visibleViews']),Array['from'](_0x1b2c3b)),this['visibleViews'],_0x1b2c3b);}['_rearrangeExpand'](){Dt(_0x37d636(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3ea755 of this['visibleViews'])_0x3ea755['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1c5760=>{this['focusTracker']['add'](_0x1c5760['element']),this['keystrokes']['listenTo'](_0x1c5760['element']);}),this['commentViews']['on']('change',(_0x35768e,_0x3793a4)=>{for(const _0x562d72 of _0x3793a4['removed'])this['focusTracker']['remove'](_0x562d72['element']),this['keystrokes']['stopListening'](_0x562d72['element']);for(const _0x215b27 of Array['from'](_0x3793a4['added'])['reverse']())this['focusTracker']['add'](_0x215b27['element']),this['keystrokes']['listenTo'](_0x215b27['element']);});}};function Dt(_0x3aad7d,_0xb8bb84,_0x24e78a){let _0x45c53e=0x0;for(const _0x44d964 of _0x3aad7d)switch(_0x44d964){case'insert':_0xb8bb84['add'](_0x24e78a['get'](_0x45c53e),_0x45c53e),_0x45c53e++;break;case'delete':_0xb8bb84['remove'](_0x45c53e);break;case'equal':_0x45c53e++;}}var Vt=class extends ht{constructor(_0x2cba1a){super(_0x2cba1a);const _0x38c717=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x38c717['to']('contextValue',_0x22ebe5=>Et(_0x2cba1a,'THREAD_CONTEXT_LABEL',_0x22ebe5)),'tabindex':-0x1},'children':[{'text':_0x38c717['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x533861,_0x5d77fb){super(_0x533861);const _0x2dcf9a=this['bindTemplate'];this['_model']=_0x5d77fb,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),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',_0x52751c=>!!_0x52751c),this['bind']('contextValue')['to'](this['_model'],'context',_0x3ba309=>_0x3ba309&&_0x3ba309['value']?this['_trimContextValue'](_0x3ba309['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',_0x2dcf9a['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 _0x35bb03=new _0x2d6eba(this['locale']);return _0x35bb03['label']=Et(this['locale'],'Reopen'),_0x35bb03['tooltip']=Et(this['locale'],'Reopen'),_0x35bb03['icon']=_0x14b7c8,_0x35bb03['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5ec666=>!_0x5ec666),_0x35bb03['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3f9265,_0x393351)=>_0x3f9265&&_0x393351),_0x35bb03['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x35bb03;}['_trimContextValue'](_0x16d37e){if(_0x16d37e['length']<0x96)return _0x16d37e;const _0x1b4d2d=_0x16d37e['lastIndexOf']('\x20',0x93);return _0x16d37e['substring'](0x0,_0x1b4d2d>-0x1?_0x1b4d2d:0x93)+'...';}['_attachContextActions'](){const _0x3bd4ae=this['element']['querySelector']('.ck-context'),_0x3d89e1=_0x3bd4ae['querySelector']('.ck-context__value');this['listenTo'](_0x3bd4ae,'mouseenter',()=>{_0x3d89e1['offsetWidth']<_0x3d89e1['scrollWidth']&&_0x3bd4ae['classList']['add']('overlay');}),this['listenTo'](_0x3bd4ae,'mouseleave',()=>{_0x3bd4ae['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x466f96 of this['focusables'])this['focusTracker']['add'](_0x466f96['element']),this['keystrokes']['listenTo'](_0x466f96['element']);}['_createContextView'](){const _0x219a03=new Vt(this['locale']);return _0x219a03['bind']('contextValue')['to'](this),_0x219a03;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x582b9c,_0x2caab5,_0x4698c5,_0x6c1694){super(_0x582b9c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2caab5,this['_localUser']=_0x4698c5,this['_config']=_0x6c1694,this['commentThreadHeaderView']=new Bt(_0x582b9c,_0x2caab5),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x51d2bf(_0x582b9c,Et(_0x582b9c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x582b9c,_0x2caab5,Object['assign']({'CommentView':this['_config']['CommentView']},_0x6c1694)),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',(_0x263b43,_0x27b65e)=>_0x263b43||!!_0x27b65e),this['bind']('isUnlinked')['to'](_0x2caab5,'unlinkedAt',_0x26c139=>!!_0x26c139);let _0x4513b4=null;const _0x374d66=()=>{const _0x5a61a9=this['_model']['comments']['first']||null;_0x5a61a9!==_0x4513b4&&(_0x4513b4&&this['stopListening'](_0x4513b4,'change:content'),_0x4513b4=_0x5a61a9,_0x5a61a9&&this['listenTo'](_0x5a61a9,'change:content',_0x374d66));const _0x2f1d1e=_0x5a61a9?_0x5a61a9['author']['name']:this['_localUser']['name'],_0x45a7f7=_0x5a61a9?new DOMParser()['parseFromString'](_0x588d00(_0x5a61a9['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x4cef1d=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x2f1d1e]);this['set']('ariaLabel',_0x45a7f7?_0x4cef1d+'\x20'+_0x45a7f7:_0x4cef1d);};this['listenTo'](this['_model']['comments'],'change',_0x374d66),_0x374d66(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4f85c7=>_0x4f85c7['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0xfba6ca(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xb3b944=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x103624=_0xb3b944['commentInputView'];return _0xb3b944['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x103624,'value',(_0x17c476,_0x560701,_0x4d4737,_0x470500,_0xf1208c)=>!!_0xf1208c||!!_0x470500&&_0x4d4737&&!_0x560701||_0x17c476&&_0x4d4737&&!_0x560701),_0x103624['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3b7db4,_0x4aa7af,_0x5d9844)=>{let _0x1a06ac;return _0x1a06ac=_0x5d9844&&_0x4aa7af?'Reply\x20to\x20reopen\x20discussion...':_0x3b7db4?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x1a06ac);}),_0x103624['bind']('submitLabel')['to'](this,'length',_0x2c5620=>Et(this['locale'],_0x2c5620?'Reply':'Comment')),_0x103624['on']('submit',(_0x42b378,_0x4e9243)=>{this['fire']('addComment',_0x4e9243),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x103624['on']('cancel',()=>{this['focus']();}),_0x103624['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x103624['on']('cancel',_0xa247e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0xa247e['stop']());}),this['on']('change:isActive',(_0x8e5619,_0x2214c4,_0x4c5bd8)=>{_0x4c5bd8||this['length']||_0x103624['value']||this['fire']('removeCommentThread');}),_0xb3b944;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x506786(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x2a8e17,_0x19014f,_0x5ce1f6,_0x11927e){super(_0x2a8e17,_0x19014f,_0x5ce1f6,_0x11927e),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x2a8e17,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x54ad05,_0x347e80,_0x24e84b)=>{_0x24e84b||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x120f06,_0x51a0b2,_0x18d594)=>{_0x18d594&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x44aef5=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x44aef5['if']('isActive','ck-thread--active'),_0x44aef5['if']('isUnlinked','ck-thread--unlinked'),_0x44aef5['to']('actionIndicator',_0x403db3=>_0x403db3?'ck-thread--'+_0x403db3:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x44aef5['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 _0x31e603 of this['commentsListView']['commentViews'])_0x31e603['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x397c8d}=this,_0x3d9efc=this['commentsListView']['commentViews']['get'](0x0);_0x3d9efc===this['_boundFirstCommentView']||_0x3d9efc['isSystemComment']||(this['_boundFirstCommentView']=_0x3d9efc,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3d9efc,'actionIndicator',_0x3e170e=>'remove'===_0x3e170e?'remove':null),_0x3d9efc['placeholder']=Et(_0x397c8d,'Write\x20a\x20comment...'),_0x3d9efc['removeButton']['on']('execute',_0x28f439=>{_0x28f439['stop'](),this['showConfirm'](Et(_0x397c8d,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3d9efc['focus']();}),_0x3d9efc['actionBar']['add'](this['resolveButton'],0x0),_0x3d9efc['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x327059=new _0x1a76a3(this['locale']);return _0x327059['label']=Et(this['locale'],'Resolve'),_0x327059['tooltip']=Et(this['locale'],'Resolve'),_0x327059['icon']=_0x2b117b,_0x327059['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x327059['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2f60fe=>!_0x2f60fe),_0x327059['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x275d58,_0x43ac32)=>_0x275d58&&!_0x43ac32),_0x327059['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x327059;}['_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(_0x3ba9e8){super(_0x3ba9e8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1e1903,_0x3e13ae,_0x17263f)=>{this['element']['innerHTML']=_0x17263f;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x3750ae,_0x50385e,_0x48e0d9){super(_0x3750ae),this['_model']=_0x50385e,this['_config']=_0x48e0d9,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x50385e,'content',_0x50385e,'authoredAt',(_0x2a0ec5,_0x38fc0f)=>Et(_0x3750ae,'COMMENT_ARIA_LABEL',[_0x50385e['author']['name'],_0x48e0d9['formatDateTime'](_0x38fc0f),new DOMParser()['parseFromString'](_0x2a0ec5,'text/html')['body']['textContent'],_0x50385e['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x51d2bf(_0x3750ae,Et(_0x3750ae,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x434e19=>_0x434e19['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 _0x5a3f1a=new Wt(this['locale']);return _0x5a3f1a['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x202296,_0x264b35)=>_0x264b35?_0x588d00(_0x202296,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x202296),_0x5a3f1a;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0xc5da3a=new St(this['locale'],this['_config']['editorConfig']);return _0xc5da3a['value']=this['_model']['content'],_0xc5da3a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xc5da3a['submitLabel']=Et(this['locale'],'Save'),_0xc5da3a['on']('submit',(_0x16ef22,_0x341e39)=>{this['fire']('updateComment',this['_model']['id'],_0x341e39),this['switchToDisplayMode'](),this['focus']();}),_0xc5da3a['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0xc5da3a['once']('editorReady',()=>{_0xc5da3a['focus']();}),_0xc5da3a['createEditor'](),_0xc5da3a['delegate']('editorReady')['to'](this),_0xc5da3a['delegate']('editorDestroyed')['to'](this),_0xc5da3a;}['_setupKeyboardNavigation'](){const _0x1cdb24=this['element'];this['keystrokes']['listenTo'](_0x1cdb24);for(const _0x1dcdaf of this['focusables'])this['focusTracker']['add'](_0x1dcdaf['element']),this['keystrokes']['listenTo'](_0x1dcdaf['element']);this['focusables']['on']('change',(_0x110ff5,_0x922d5)=>{for(const _0x54f3da of _0x922d5['removed'])this['focusTracker']['remove'](_0x54f3da['element']),this['keystrokes']['stopListening'](_0x54f3da['element']);for(const _0x2b2e7c of _0x922d5['added'])this['focusTracker']['add'](_0x2b2e7c['element']),this['keystrokes']['listenTo'](_0x2b2e7c['element']);}),this['keystrokes']['set']('enter',(_0x14b1d2,_0x1b4dd5)=>{_0x1cdb24===_0x14b1d2['target']&&(this['focusCycler']['focusFirst'](),_0x1b4dd5());}),this['keystrokes']['set']('esc',(_0x24329b,_0x5b0a39)=>{_0x1cdb24!==_0x24329b['target']&&(this['focus'](),_0x5b0a39());});}};const Gt=/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x506786(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x3bcc17,_0xf11fbf,_0xddbf9){super(_0x3bcc17,_0xf11fbf,_0xddbf9),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x3bcc17,'Reply...')),this['bind']('authoredAt')['to'](_0xf11fbf),this['bind']('resolvedAt')['to'](_0xf11fbf),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 _0x286742(_0x3bcc17,_0xf11fbf['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xf11fbf,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1b9b01=this['bindTemplate'],_0x343d40=[{'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':_0x1b9b01['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1b9b01['to']('authoredAt',_0x4a176f=>this['_config']['formatDateTime'](_0x4a176f))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1b9b01['if']('isEditMode','ck-comment__actions--hidden'),_0x1b9b01['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']&&_0x343d40['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x1b9b01['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1b9b01['if']('isEditMode','ck-comment--edit'),_0x1b9b01['if']('isSystemComment','ck-comment--info'),_0x1b9b01['to']('actionIndicator',_0x3d57e3=>_0x3d57e3?'ck-comment--'+_0x3d57e3:'')],'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':_0x343d40}]}]};}['_createEditButton'](){const _0x4b8163=new _0x2d6eba(this['locale']);return _0x4b8163['label']=Et(this['locale'],'Edit'),_0x4b8163['icon']=_0x2aa1a6,_0x4b8163['withText']=!0x0,_0x4b8163['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x4b8163['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3ae587=>!_0x3ae587),_0x4b8163['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x4b8163['on']('execute',()=>this['switchToEditMode']()),_0x4b8163;}['_createRemoveButton'](){const _0x47c45d=new _0x2d6eba(this['locale']);return _0x47c45d['label']=Et(this['locale'],'Remove'),_0x47c45d['icon']=_0x1886b6,_0x47c45d['withText']=!0x0,_0x47c45d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x47c45d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2de6d1=>!_0x2de6d1),_0x47c45d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x47c45d['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x47c45d;}['_createDropdown'](){const _0xea68de=ct(this['locale'],_0x254c12),_0x4784eb=_0xea68de['panelView']['children'],_0x322c96=new ot(this['locale']),_0x4ab01a=_0xea68de['bindTemplate'];dt(_0xea68de,()=>this['items']['find'](_0x3851f2=>_0x3851f2['isVisible'])),_0xea68de['extendTemplate']({'attributes':{'class':[_0x4ab01a['if']('isVisible','ck-hidden',_0x2bf4ee=>!_0x2bf4ee)]}});const _0x4eddcf=(_0x861f53,_0x31d2f2=-0x1)=>{const _0x15f6c7=new nt(this['locale']);_0x15f6c7['children']['add'](_0x861f53);const _0x47073c=_0x31d2f2>-0x1?_0x31d2f2:_0x322c96['items']['length'];_0x322c96['items']['add'](_0x15f6c7,_0x47073c);const _0x29f6a5=Array['from'](this['items']);_0xea68de['unbind']('isEnabled','isVisible'),_0xea68de['bind']('isEnabled')['toMany'](_0x29f6a5,'isEnabled',(..._0x16e6bc)=>_0x16e6bc['some'](_0x118743=>_0x118743)),_0xea68de['bind']('isVisible')['toMany'](_0x29f6a5,'isVisible',(..._0x4e8c9e)=>_0x4e8c9e['some'](_0x53e41b=>_0x53e41b));};_0xea68de['panelPosition']='sw',_0xea68de['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x4394b5});for(const _0x4078ba of this['items'])_0x4eddcf(_0x4078ba);return _0x4784eb['add'](_0x322c96),_0xea68de['listenTo'](this['items'],'add',(_0x15cb58,_0x3bbe1f,_0x5d07c3)=>{_0x4eddcf(_0x3bbe1f,_0x5d07c3);}),_0xea68de['listenTo'](this['items'],'remove',(_0x30818e,_0x2b33dc,_0x4623da)=>{_0x322c96['items']['remove'](_0x4623da);}),_0xea68de;}['_attachActions'](_0x16a79c,_0x523f85){const _0x53d510=_0x16a79c&&_0x16a79c['element'];_0x53d510&&(this['listenTo'](_0x53d510,'mouseenter',()=>this['actionIndicator']=_0x523f85),this['listenTo'](_0x53d510,'focus',()=>this['actionIndicator']=_0x523f85),this['listenTo'](_0x53d510,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x53d510,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1c7ab6=super['_createCommentInputView']();return _0x1c7ab6['bind']('placeholder')['to'](this),_0x1c7ab6;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x477137){const _0x5542f0=_0x4809c5(_0x477137,0x1e),_0x37beb7=new MutationObserver(_0xb46eec=>{for(const _0xa7c77f of _0xb46eec)('attributes'==_0xa7c77f['type']&&'class'==_0xa7c77f['attributeName']||'childList'==_0xa7c77f['type']||'characterData'==_0xa7c77f['type'])&&_0x5542f0();});return{'attach'(_0x394e45){_0x37beb7['observe'](_0x394e45,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x37beb7['disconnect'](),_0x5542f0['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x525a7d,_0x81bc50){super(_0x525a7d),this['id']=_0x2ff495(),this['focusTracker']=new _0x16deef(),this['keystrokes']=new _0x208d02(),this['keystrokes']['set']('Esc',(_0x38b161,_0x179f48)=>this['fire']('Esc',_0x179f48)),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'](_0x81bc50),this['mainView']=_0x81bc50;const _0x1dc3c3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1dc3c3['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 _0x4a1cf2=this['element']['clientHeight'];_0x4a1cf2&&(this['height']=_0x4a1cf2);}};const jt=/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x21a2fd();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x209a9e,target:_0x40a99c,type:_0x23405b,isVisible:_0x386024=!0x0}){super(),this['view']=_0x209a9e,this['view']['element']||this['view']['render'](),this['_type']=_0x23405b,this['_target']=_0x40a99c,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4284a7([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x2e1581,_0x4eb506)=>{this['view']['focusTracker']['add'](_0x4eb506);}),this['focusableElements']['on']('remove',(_0x332b0c,_0x36b584)=>{this['view']['focusTracker']['remove'](_0x36b584);}),this['set']('isVisible',_0x386024);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2d2801=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x2d2801),_0x2d2801;}get['targetRect'](){const _0x1db089=this['target'];if(null===_0x1db089)return null;if(_0x1db089 instanceof _0x3d1cc4)return _0x1db089;const _0x32d998=_0x1db089['filter'](_0x2514e=>function(_0x8f88e6){return!!_0x8f88e6['offsetParent']||!!_0x8f88e6['getClientRects']()['item'](0x0);}(_0x2514e));return 0x0===_0x32d998['length']?null:_0x3d1cc4['getDomElementRects'](_0x32d998[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x205542){this['view']['isActive']=_0x205542,this['view']['mainView']['isActive']=_0x205542;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x222ece){if(!(null===_0x222ece||_0x222ece instanceof _0x3d1cc4||Array['isArray'](_0x222ece)&&_0x222ece['every'](_0x57f55b=>zt(_0x57f55b))))throw new _0x6d6638('annotation-invalid-target',null,{'target':_0x222ece});}['_getNormalizedTarget'](){const _0x1d513a='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x1d513a)?[_0x1d513a]:_0x1d513a;}};function zt(_0x1a322e){return null!==_0x1a322e&&'object'==typeof _0x1a322e&&'nodeType'in _0x1a322e&&0x1===_0x1a322e['nodeType'];}var Jt=class extends _0x4284a7{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x50544=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x16deef(),this['_focusTracker']['on']('change:isFocused',(_0x3b53db,_0x46be78,_0x2de3aa)=>{_0x2de3aa||this['fire']('blur');});for(const _0x48e177 of _0x50544)this['add'](_0x48e177);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x885df){if(this['has'](_0x885df))throw new _0x6d6638('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x885df['innerView'],_0x885df),this['_viewToAnnotation']['set'](_0x885df['view'],_0x885df);for(const _0x238a46 of _0x885df['focusableElements'])this['_focusTracker']['add'](_0x238a46);if(this['listenTo'](_0x885df['focusableElements'],'add',(_0x55aac5,_0x2ea8d7)=>{this['_focusTracker']['add'](_0x2ea8d7);}),this['listenTo'](_0x885df['focusableElements'],'remove',(_0x19ae73,_0x4b56d6)=>{this['_focusTracker']['remove'](_0x4b56d6);}),this['listenTo'](_0x885df['view']['focusTracker'],'change:isFocused',(_0x4bc9c8,_0x44f0de,_0x2fb88f)=>{_0x2fb88f&&this['fire']('focus',_0x885df);}),_0x885df['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x17a317 of this)_0x17a317['updateTargetRect']();}const _0x4adf05=this['_getOrderInContent'](_0x885df['view']['targetRect']);return super['add'](_0x885df,_0x4adf05);}['remove'](_0x663378){if(!this['has'](_0x663378))throw new _0x6d6638('annotationcollection-not-existing-item',null);this['stopListening'](_0x663378['view']['focusTracker']),this['stopListening'](_0x663378['focusableElements']);for(const _0x4e579d of _0x663378['focusableElements'])this['_focusTracker']['remove'](_0x4e579d);return this['_viewToAnnotation']['delete'](_0x663378['view']),this['_innerViewToAnnotation']['delete'](_0x663378['innerView']),super['remove'](_0x663378);}['getByInnerView'](_0x34cc00){return this['_innerViewToAnnotation']['get'](_0x34cc00);}['getByView'](_0x484754){return this['_viewToAnnotation']['get'](_0x484754);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x54f9c8 of this)_0x54f9c8['updateTargetRect']();this['_sort']();}['_sort'](){const _0x7047ad=Array['from'](this)['sort']((_0x3318ef,_0x593d39)=>Zt(_0x3318ef['view']['targetRect'],_0x593d39['view']['targetRect']));for(let _0x4d5869=_0x7047ad['length']-0x1;_0x4d5869>0x0;_0x4d5869--){const _0x2e02fb=_0x7047ad[_0x4d5869];_0x4d5869!==this['getIndex'](_0x2e02fb)&&(this['remove'](_0x2e02fb),this['add'](_0x2e02fb));}}['_getOrderInContent'](_0x4d6792){let _0x31843d=0x0;if(!_0x4d6792)return this['length'];for(const _0x2c7bf0 of this){const _0x1295e1=_0x2c7bf0['view']['targetRect'];if(_0x1295e1){if(Zt(_0x4d6792,_0x1295e1)<0x0)return _0x31843d;_0x31843d++;}}return _0x31843d;}['_areCachedRectsStale'](){const _0x4424d4=this['get'](0x0);if(!_0x4424d4)return!0x1;const _0x4b83e9=_0x4424d4['view']['targetRect'],_0x9f1402=_0x4424d4['targetRect'];return!(!_0x4b83e9||!_0x9f1402)&&(_0x4b83e9['top']!==_0x9f1402['top']||_0x4b83e9['left']!==_0x9f1402['left']);}};function Qt({source:_0x1a3f49,target:_0x3027a4,filter:_0x5be5f1}){for(const _0x5020ba of _0x1a3f49)_0x5be5f1(_0x5020ba)&&_0x3027a4['add'](_0x5020ba);_0x3027a4['listenTo'](_0x1a3f49,'add',(_0x2fc5ca,_0x3bebf5)=>{_0x5be5f1(_0x3bebf5)&&_0x3027a4['add'](_0x3bebf5);}),_0x3027a4['listenTo'](_0x1a3f49,'remove',(_0x4a6292,_0x27222d)=>{_0x3027a4['has'](_0x27222d)&&_0x3027a4['remove'](_0x27222d);});}function Zt(_0x30f443,_0x49842b){if(null===_0x30f443&&null===_0x49842b)return 0x0;if(null===_0x30f443)return-0x1;if(null===_0x49842b)return 0x1;const _0x1787a9=_0x30f443['top']-_0x49842b['top'];return 0x0==_0x1787a9?_0x30f443['left']-_0x49842b['left']:_0x1787a9;}var ti=class extends _0x41d5ed{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3843f6){if(super(_0x3843f6),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3843f6 instanceof _0x2de2e0){const _0x49d74c=_0x3843f6['locale'];_0x3843f6['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x49d74c,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3c18c7){this['collection']['add'](_0x3c18c7);}['remove'](_0x54d1d3){this['collection']['remove'](_0x54d1d3),_0x54d1d3['destroy']();}['refreshVisibility'](){for(const _0x39c334 of this['collection'])_0x39c334['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x4b936e){return this['collection']['getByInnerView'](_0x4b936e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x38c2e8 of this['collection'])_0x38c2e8['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4d1cd0){this['fire']('_activateAnnotation',_0x4d1cd0);}['createAnnotation'](_0x3a87bb){return new $t(_0x3a87bb);}['createAnnotationView'](_0x11970f,_0x5e4897){return new qt(_0x11970f,_0x5e4897);}['_addActiveAnnotation'](_0x29ba48){const _0x482a26=new Set(this['activeAnnotations']);_0x482a26['add'](_0x29ba48),this['activeAnnotations']=_0x482a26;}['_removeActiveAnnotation'](_0x3da77b){const _0xb643ee=new Set(this['activeAnnotations']);_0xb643ee['delete'](_0x3da77b),this['activeAnnotations']=_0xb643ee;}['_bindAnnotationsToVisibleAnnotations'](){const _0xa8937c=this['collection'],_0x132f3d=this['_visibleAnnotations'];function _0x599dfb(_0x131940){const _0x57f091=_0x131940['source'];_0x57f091['isVisible']&&!_0x132f3d['has'](_0x57f091)?_0x132f3d['add'](_0x57f091):!_0x57f091['isVisible']&&_0x132f3d['has'](_0x57f091)&&_0x132f3d['remove'](_0x57f091),_0x57f091['view']['focusTracker']['remove'](_0x57f091['view']['element']),_0x57f091['view']['focusTracker']['add'](_0x57f091['view']['element']);}this['listenTo'](_0xa8937c,'add',(_0x25b0af,_0x53e8ab)=>{_0x53e8ab['isVisible']&&_0x132f3d['add'](_0x53e8ab),this['listenTo'](_0x53e8ab,'change:isVisible',_0x599dfb);}),this['listenTo'](_0xa8937c,'remove',(_0x5af4aa,_0x1b3167)=>{_0x132f3d['has'](_0x1b3167)&&_0x132f3d['remove'](_0x1b3167),this['stopListening'](_0x1b3167,'change:isVisible',_0x599dfb);});}['_setupEnterAnnotationKeystroke'](){const _0xda9326=_0x19fb3e=>{_0x19fb3e['on']('ready',()=>{_0x19fb3e['keystrokes']['set'](_0x57653d,(_0x377241,_0x464818)=>{const _0x2feca9=_0x214eb1(this['activeAnnotations']['values']());_0x2feca9&&(_0x2feca9['view']['focus'](),_0x464818());});});};this['context']instanceof _0x2de2e0?_0xda9326(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x26618f,_0xc782f8)=>{_0xda9326(_0xc782f8);});}['_setupEscapeAnnotationHandling'](){const _0x363a5b=_0x55ff22=>{const _0x55edee=_0x55ff22['source'],_0x64fc08=[];let _0xe2cf9b;if(Array['isArray'](_0x55edee['target'])){_0xe2cf9b=_0x55edee['target'][0x0],this['context']instanceof _0x2de2e0?_0x64fc08['push'](this['context']):this['context']['editors']&&_0x64fc08['push'](...this['context']['editors']);for(const _0x30dde7 of _0x64fc08)for(const _0x420fd6 of _0x30dde7['editing']['view']['domRoots']['values']())if(_0x420fd6['contains'](_0xe2cf9b))return void _0x30dde7['editing']['view']['focus']();_0xe2cf9b['focus']();}};this['listenTo'](this['collection'],'add',(_0x29694c,_0x370667)=>{this['listenTo'](_0x370667,'escape',_0x363a5b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x371e6b,_0x102bff)=>{this['stopListening'](_0x102bff,'escape',_0x363a5b);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x21a2fd(),ni=/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x21a2fd();var oi=class extends _0x41d5ed{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x478dcf,_0x12e146];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f3f4b){super(_0x1f3f4b),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4ff595=this['context']['config'];_0x4ff595['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4ff595['define']('comments.maxThreadTotalWeight',0x1f4),_0x4ff595['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4ff595['define']('comments.CommentThreadView',Ut),_0x4ff595['define']('comments.CommentView',Yt),_0x4ff595['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xe6902b=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3bbbe0,_0xc5e4d0)=>this['_addCommentThread'](_0xc5e4d0)),this['on']('submitCommentThread',(_0x2c07e5,_0x564f2e)=>this['_submitCommentThread'](_0x564f2e)),this['on']('resolveCommentThread',(_0x505657,_0x22e9d8)=>this['_resolveCommentThread'](_0x22e9d8)),this['on']('resolveCommentThread',(_0x40b1bb,_0xee002d)=>this['_updateActiveAnnotation'](_0xee002d),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x345091,_0xa4aaf9)=>this['_reopenCommentThread'](_0xa4aaf9)),this['on']('reopenCommentThread',(_0x4c6bbc,_0x477ec1)=>this['_updateActiveAnnotation'](_0x477ec1),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3c8042,_0x3becf8)=>this['_removeCommentThread'](_0x3becf8)),this['on']('updateCommentThread',(_0x2da52e,_0x5bf207)=>this['_updateCommentThread'](_0x5bf207)),this['on']('updateCommentThread',(_0x18283d,_0x361fb5)=>this['_updateActiveAnnotation'](_0x361fb5),{'priority':'lowest'}),this['on']('addComment',(_0x429c85,_0x3e6d5a)=>this['_addComment'](_0x3e6d5a)),this['on']('updateComment',(_0x1c2100,_0x737013)=>this['_updateComment'](_0x737013)),this['on']('removeComment',(_0x3f66a7,_0x48a878)=>this['_removeComment'](_0x48a878)),this['on']('addComment',(_0x44a066,{threadId:_0x4edce5,isFromAdapter:_0x1baaa4})=>{if(_0x1baaa4)return;const _0xbf6fe9=this['getCommentThread'](_0x4edce5),_0x7b70b6=_0xbf6fe9&&this['_threadToController']['get'](_0xbf6fe9);_0x7b70b6&&_0x7b70b6['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xe6902b,'change:activeAnnotations',(_0x343e0a,_0x2a2020,_0x4db876)=>{const _0x5cef97=Array['from'](_0x4db876)['map'](_0x1107cf=>this['_viewToController']['get'](_0x1107cf['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5cef97?_0x5cef97['model']:null;});}set['adapter'](_0xecb3c2){if(this['_adapter'])throw new _0x6d6638('commentsrepository-adapter-already-set');this['_adapter']=_0xecb3c2;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4d1f7e=ii,threadId:_0x21af34=_0x2ff495(),comments:_0x5216b6=[],unlinkedAt:_0x210d6e=null,resolvedAt:_0x1d8633=null,resolvedBy:_0x3d5135=null,target:_0x2e2c65=null,context:_0x428b53=null,attributes:_0x1d8608={},isResolvable:_0x32ecdb=!0x0,isSubmitted:_0xd34ff0=!0x1,isFromAdapter:_0x2abd51=!0x1}={}){return this['fire'](ai('addCommentThread',_0x4d1f7e),{'channelId':_0x4d1f7e,'threadId':_0x21af34,'comments':_0x5216b6,'unlinkedAt':_0x210d6e,'resolvedAt':_0x1d8633,'resolvedBy':_0x3d5135,'target':_0x2e2c65,'context':_0x428b53,'attributes':_0x1d8608,'isFromAdapter':_0x2abd51,'isResolvable':_0x32ecdb,'isSubmitted':_0xd34ff0}),this['getCommentThread'](_0x21af34);}['openNewCommentThread']({channelId:_0x454fea=ii,threadId:_0x27df12=_0x2ff495(),target:_0x204ac9,context:_0x2f5b72=null,isResolvable:_0x60f394=!0x0}){if(this['_readOnlyChannels']['has'](_0x454fea)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x204ac9)throw new _0x6d6638('commentsrepository-missing-target');const _0x5c9af9=this['addCommentThread']({'channelId':_0x454fea,'threadId':_0x27df12,'target':_0x204ac9,'context':_0x2f5b72,'isResolvable':_0x60f394});if(!_0x5c9af9)return null;const _0x598304=this['_threadToController']['get'](_0x5c9af9),_0x54c92c=_0x598304['view']['commentThreadInputView']['commentInputView'],_0x26e9a1=this['context']['plugins']['get'](ti),_0x36d825=_0x26e9a1['getByInnerView'](_0x598304['view']);return _0x26e9a1['activate'](_0x36d825),_0x54c92c['once']('editorReady',()=>_0x54c92c['focus']()),_0x5c9af9;}['hasCommentThread'](_0x328e25){if('string'!=typeof _0x328e25)throw new _0x6d6638('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x328e25);}['updateCommentThread']({channelId:_0x347797=ii,threadId:_0x57c796,context:_0x3079e0,unlinkedAt:_0x2100e8,attributes:_0xfd2d71,isFromAdapter:_0x1af4fc=!0x1}){return this['fire'](ai('updateCommentThread',_0x347797),{'channelId':_0x347797,'threadId':_0x57c796,'context':_0x3079e0,'unlinkedAt':_0x2100e8,'attributes':_0xfd2d71,'isFromAdapter':_0x1af4fc}),this['getCommentThread'](_0x57c796);}['getCommentThread'](_0x51ed8c){if('string'!=typeof _0x51ed8c)throw new _0x6d6638('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x51ed8c);}['fetchCommentThread']({channelId:_0x44f3b3,threadId:_0x1cd5b3}={}){const _0x16b93a=this['getCommentThread'](_0x1cd5b3);if(_0x16b93a)return Promise['resolve'](_0x16b93a);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x6d6638('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x44f3b3,'threadId':_0x1cd5b3})['then'](_0x3e547d=>this['hasCommentThread'](_0x1cd5b3)?this['getCommentThread'](_0x1cd5b3):_0x3e547d?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x44f3b3},_0x3e547d)):void 0x0)['catch'](_0x51525c=>{throw console['error'](_0x51525c),new _0x6d6638('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1f0fd8,skipNotAttached:_0x57762f=!0x1,skipEmpty:_0x24f896=!0x1,toJSON:_0x107499=!0x1}={}){const _0x4e983b=[];for(const _0x152c15 of this['_threads']['values']())_0x1f0fd8&&_0x152c15['channelId']!==_0x1f0fd8||_0x57762f&&!_0x152c15['isAttached']||_0x24f896&&0x0===_0x152c15['length']||_0x4e983b['push'](_0x152c15);return _0x107499?_0x4e983b['map'](_0x573d9=>_0x573d9['toJSON']()):_0x4e983b;}['getAnnotationForCommentThread'](_0x2d1a9f){const _0x3459fe=this['_threadToController']['get'](_0x2d1a9f);return _0x3459fe&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x3459fe['view'])||null;}['getCommentThreadForAnnotation'](_0x51a82e){const _0x372daa=this['_viewToController']['get'](_0x51a82e['innerView']);return _0x372daa?_0x372daa['model']:null;}['setActiveCommentThread'](_0x7cdac9){const _0x5df463=this['context']['plugins']['get'](ti);if(!_0x7cdac9)return void(this['activeCommentThread']&&_0x5df463['deactivateAll']());const _0x4c5bb6=this['getCommentThread'](_0x7cdac9);if(!_0x4c5bb6)throw new _0x6d6638('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x7cdac9});if(!this['_threadToController']['has'](_0x4c5bb6))throw new _0x6d6638('commentsrepository-active-not-attached',null,{'threadId':_0x7cdac9});const _0x49b082=_0x5df463['getByInnerView'](this['_threadToController']['get'](_0x4c5bb6)['view']);_0x5df463['activate'](_0x49b082);}['switchReadOnly'](_0x65295,_0x3c870a){_0x65295?this['_readOnlyChannels']['add'](_0x3c870a):this['_readOnlyChannels']['delete'](_0x3c870a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x137f03){return this['_readOnlyChannels']['has'](_0x137f03)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3c215b,_0x108514){return new bt(_0x3c215b,_0x108514);}['setPermissions'](_0x2f6e00,_0x2c62d5=ii){this['_permissions']['set'](_0x2c62d5,_0x2f6e00),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x45c045=ii){return this['_permissions']['has'](_0x45c045)?this['_permissions']['get'](_0x45c045):ei;}['_addCommentThread']({channelId:_0x5ba530,threadId:_0x1df301,comments:_0x3469fc,unlinkedAt:_0x43ac6e,resolvedAt:_0x314f18,resolvedBy:_0x329394,target:_0x486cd9,context:_0x30c7f4,attributes:_0xa497bb,isFromAdapter:_0x31991e,isResolvable:_0x35d969,isSubmitted:_0x5413fc}){if('string'!=typeof _0x1df301)throw new _0x6d6638('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1df301});if(this['hasCommentThread'](_0x1df301))throw new _0x6d6638('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1df301});const _0x25cd4e=new ri(this,{'channelId':_0x5ba530,'id':_0x1df301,'context':_0x30c7f4,'attributes':_0xa497bb,'unlinkedAt':_0x43ac6e,'resolvedAt':_0x314f18,'resolvedBy':_0x329394?this['context']['plugins']['get'](_0x12e146)['getUser'](_0x329394):null,'isResolvable':_0x35d969,'isSubmitted':_0x5413fc||_0x31991e});this['_threads']['set'](_0x1df301,_0x25cd4e);for(const _0x165946 of _0x3469fc)_0x25cd4e['_add'](this['_createNewComment']({'threadId':_0x1df301,..._0x165946}));return _0x486cd9&&_0x25cd4e['attachTo'](_0x486cd9),_0x31991e||!_0x25cd4e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5ba530,'threadId':_0x1df301});}['_submitCommentThread']({channelId:_0x1e9982,threadId:_0xe88623}){if(!this['hasCommentThread'](_0xe88623))throw new _0x6d6638('commentsrepository-missing-comment-thread',this);const _0x23e0e6=this['getCommentThread'](_0xe88623);if(_0x23e0e6['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x3888a0,comments:_0x31e676,resolvedAt:_0xc26249,resolvedBy:_0x3bcfb7,context:_0x4a611c,attributes:_0x41f03e}=_0x23e0e6,_0x14a3b4=this['context']['plugins']['get']('PendingActions'),_0x4ba5ca=_0x14a3b4['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1e9982,'threadId':_0x3888a0,'comments':_0x31e676['map'](_0x18fdd8=>_0x18fdd8['toJSON']()),'resolvedAt':_0xc26249,'resolvedBy':_0x3bcfb7?_0x3bcfb7['id']:_0x3bcfb7,'context':_0x4a611c,'attributes':_0x41f03e})['then'](({comments:_0x4a360d})=>{_0x14a3b4['remove'](_0x4ba5ca);for(const _0x54a112 of _0x4a360d)this['_updateComment']({'channelId':_0x1e9982,'threadId':_0xe88623,'commentId':_0x54a112['commentId'],'createdAt':_0x54a112['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x538c71=>{throw console['error'](_0x538c71),new _0x6d6638('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0xab2c51,target:_0x2854e3}){const _0x2631c1=this['getCommentThread'](_0xab2c51);if(!_0x2631c1)throw new _0x6d6638('commentsrepository-attach-missing-comment-thread',this);const _0x51be9b=this['context']['plugins']['get']('PendingActions'),_0x2bfc77=this['context']['plugins']['get'](ti),_0x21cfde=this['_createCommentThreadView'](_0x2631c1),_0x13fbf9=new bt(_0x2631c1,_0x21cfde);let _0x310f9a=null;_0x21cfde['on']('change:isDirty',(_0x71e756,_0x28dd62,_0x319fbb)=>{_0x319fbb?_0x310f9a=_0x51be9b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x310f9a&&(_0x51be9b['remove'](_0x310f9a),_0x310f9a=null);}),this['_threadToController']['set'](_0x2631c1,_0x13fbf9),this['_viewToController']['set'](_0x21cfde,_0x13fbf9);const _0x11dff9=new qt(this['context']['locale'],_0x21cfde);_0x11dff9['bind']('length')['to'](_0x21cfde),_0x11dff9['bind']('isDirty')['to'](_0x21cfde,'isDirty',_0x21cfde,'length',(_0x230232,_0x923283)=>_0x230232||!_0x923283),_0x11dff9['bind']('isActive')['to'](_0x21cfde),_0x11dff9['type']='comment';const _0x9b4bdf=new $t({'view':_0x11dff9,'target':_0x2854e3,'type':'comment','isVisible':!_0x2631c1['archivedAt']&&!!('function'==typeof _0x2854e3?_0x2854e3():_0x2854e3)});return _0x21cfde['on']('escape',()=>{_0x9b4bdf['fire']('escape');}),this['_bindAnnotationToEditors'](_0x21cfde,_0x9b4bdf),_0x2bfc77['add'](_0x9b4bdf),_0x9b4bdf;}['_bindAnnotationToEditors'](_0x48898a,_0xfbcbd8){this['listenTo'](_0x48898a,'editorReady',(_0x169397,_0x2e868d)=>{const _0x4f7dde=_0x2e868d['ui']['view']['body']['bodyCollectionContainer'];_0xfbcbd8['focusableElements']['add'](_0x4f7dde),this['context']instanceof _0x2de2e0&&this['context']['ui']['focusTracker']['add'](_0x4f7dde);},{'priority':'highest'}),this['listenTo'](_0x48898a,'editorDestroyed',(_0x209193,_0x125dab)=>{const _0x4e005c=_0x125dab['ui']['view']['body']['bodyCollectionContainer'];_0xfbcbd8['focusableElements']['has'](_0x4e005c)&&_0xfbcbd8['focusableElements']['remove'](_0x4e005c),this['context']instanceof _0x2de2e0&&this['context']['ui']['focusTracker']['remove'](_0x4e005c);});}['_unbindEditors'](_0x24db6c){this['stopListening'](_0x24db6c,'editorReady'),this['stopListening'](_0x24db6c,'editorDestroyed');}['_createCommentThreadView'](_0x577acf){const _0x3da2f8=this['context']['plugins']['get'](_0x12e146),{config:_0x2330d3,locale:_0x15f393}=this['context'],_0x142e3e=_0x153da0(_0x2330d3['get']('locale'),_0x15f393);return new(0x0,(_0x2330d3['get']('comments'))['CommentThreadView'])(_0x15f393,_0x577acf,_0x3da2f8['me'],{'editorConfig':{..._0x2330d3['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2330d3['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2330d3['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2330d3['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2330d3['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x142e3e,'CommentView':_0x2330d3['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2f891c,channelId:_0x40be4d,resolvedAt:_0x53bb4f,resolvedBy:_0x463c60,isFromAdapter:_0x2d7ed0}){if(!this['hasCommentThread'](_0x2f891c))throw new _0x6d6638('commentsrepository-missing-comment-thread',null,{'threadId':_0x2f891c});const _0x574ef9=this['getCommentThread'](_0x2f891c);if(_0x574ef9['isResolved'])throw new _0x6d6638('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2f891c});const _0x50848d=this['context']['plugins']['get'](_0x12e146);if(_0x574ef9['resolvedBy']=_0x50848d['getUser'](_0x463c60),_0x574ef9['resolvedAt']=_0x53bb4f,_0x2d7ed0||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x83119e=this['context']['plugins']['get']('PendingActions'),_0x33189f=_0x83119e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x40be4d,'threadId':_0x2f891c})['then'](({resolvedAt:_0x55dee1,resolvedBy:_0x1b80d9})=>{_0x83119e['remove'](_0x33189f),_0x574ef9['resolvedBy']['id']!==_0x1b80d9&&(_0x574ef9['resolvedBy']=_0x50848d['getUser'](_0x1b80d9)),_0x574ef9['resolvedAt']=_0x55dee1;})['catch'](_0x310baa=>{throw console['error'](_0x310baa),new _0x6d6638('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1abbad,channelId:_0x319061,isFromAdapter:_0x48b851}){if(!this['hasCommentThread'](_0x1abbad))throw new _0x6d6638('commentsrepository-missing-comment-thread',null,{'threadId':_0x1abbad});const _0xf8a413=this['getCommentThread'](_0x1abbad);if(!_0xf8a413['isResolved'])throw new _0x6d6638('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1abbad});if(_0xf8a413['resolvedBy']=null,_0xf8a413['resolvedAt']=null,_0x48b851||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2d5f6f=this['context']['plugins']['get']('PendingActions'),_0x311f39=_0x2d5f6f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x319061,'threadId':_0x1abbad})['then'](()=>_0x2d5f6f['remove'](_0x311f39))['catch'](_0x13cf57=>{throw console['error'](_0x13cf57),new _0x6d6638('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x376dc6,isFromAdapter:_0x1bb60c}){const _0x53ea91=this['getCommentThread'](_0x376dc6);if(!_0x53ea91)throw new _0x6d6638('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x376dc6),this['_threads']['delete'](_0x376dc6),!_0x53ea91['isSubmitted']||_0x1bb60c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3888d6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3b3d57}=_0x53ea91,_0x1154ae=_0x3888d6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3b3d57,'threadId':_0x376dc6})['then'](()=>_0x3888d6['remove'](_0x1154ae))['catch'](_0x3dd487=>{throw console['error'](_0x3dd487),new _0x6d6638('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4c1f4a,unlinkedAt:_0x373fd4,context:_0xa2657b,attributes:_0x2dfe07,isFromAdapter:_0x193bc1}){if('string'!=typeof _0x4c1f4a)throw new _0x6d6638('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4c1f4a});if(!this['hasCommentThread'](_0x4c1f4a))throw new _0x6d6638('commentsrepository-missing-comment-thread',null,{'threadId':_0x4c1f4a});const _0x4ba10a=this['getCommentThread'](_0x4c1f4a);let _0x114d07=!0x1;if(void 0x0!==_0xa2657b&&_0x4ba10a['context']!==_0xa2657b&&(_0x4ba10a['context']=_0xa2657b,_0x114d07=!0x0),void 0x0!==_0x373fd4&&_0x4ba10a['unlinkedAt']!==_0x373fd4&&(_0x4ba10a['unlinkedAt']=_0x373fd4,_0x114d07=!0x0),_0x2dfe07&&!_0x2d7453(_0x2dfe07,_0x4ba10a['attributes'])&&(_0x4ba10a['attributes']=_0x2dfe07,_0x114d07=!0x0),!_0x114d07)return Promise['resolve']();if(!_0x4ba10a['isSubmitted']||_0x193bc1||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x388cf2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a494b}=_0x4ba10a,_0x1ad80a=_0x388cf2['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2a494b,'threadId':_0x4c1f4a,'context':_0xa2657b,'unlinkedAt':_0x373fd4,'attributes':_0x2dfe07})['then'](()=>_0x388cf2['remove'](_0x1ad80a))['catch'](_0x5f05af=>{throw console['error'](_0x5f05af),new _0x6d6638('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xd89b77){const _0xaac101=this['context']['plugins']['get'](ti),_0x59b836=this['getCommentThread'](_0xd89b77);if(_0x59b836['_isAttached']=!0x1,this['_threadToController']['has'](_0x59b836)){const _0x509455=this['_threadToController']['get'](_0x59b836),_0xd4eddd=_0x509455['view'],_0x33d97e=_0xaac101['getByInnerView'](_0xd4eddd);this['_threadToController']['delete'](_0x59b836),this['_viewToController']['delete'](_0xd4eddd),_0x33d97e&&_0xaac101['remove'](_0x33d97e),_0x509455['destroy'](),_0xd4eddd['destroy']()['then'](()=>{this['_unbindEditors'](_0xd4eddd);});}}['_updateActiveAnnotation']({threadId:_0x3ac34f,resolvedAt:_0xc7946d,unlinkedAt:_0x82b0d5}){const _0x4f0b69=!!_0xc7946d,_0x2b8c00=this['context']['plugins']['get'](ti),_0x1f6730=this['getCommentThread'](_0x3ac34f);if(this['_threadToController']['has'](_0x1f6730)){const _0x37ed9e=this['_threadToController']['get'](_0x1f6730)['view'],_0x368b2d=_0x2b8c00['getByInnerView'](_0x37ed9e);_0x368b2d&&(_0x4f0b69&&_0x2b8c00['_removeActiveAnnotation'](_0x368b2d),_0x82b0d5?_0x368b2d['isVisible']=!0x1:_0x368b2d['refreshVisibility']());}}['_getExternalAuthor'](_0xeb63f6){const _0x1220f7=this['context']['plugins']['get'](_0x12e146),_0x2ffd8f=_0xbb7f8f('external:'+_0xeb63f6),_0xe2c867=_0x1220f7['getUser'](_0x2ffd8f);return _0xe2c867||_0x1220f7['addUser']({'id':_0x2ffd8f,'name':_0xeb63f6});}['_createNewComment']({threadId:_0xcc0202,commentId:_0x36d4f4=_0x2ff495(),content:_0x1e2513,authorId:_0x1bc4a8,createdAt:_0x215164,attributes:_0xd981ad}){if('string'!=typeof _0x36d4f4)throw new _0x6d6638('commentsrepository-invalid-commentid');if('string'!=typeof _0x1bc4a8)throw new _0x6d6638('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1e2513||!_0x1e2513['trim']())throw new _0x6d6638('commentsrepository-invalid-comment-content');const _0x3cfd6b=this['context']['plugins']['get'](_0x12e146)['getUser'](_0x1bc4a8);if(!_0x3cfd6b)throw new _0x6d6638('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1bc4a8});let _0x50d8b7=null,_0x933385=_0x215164;return _0xd981ad?.['@external']&&(_0x50d8b7=this['_getExternalAuthor'](_0xd981ad['@external']['authorName']),_0x933385=new Date(_0xd981ad['@external']['createdAt'])),new hi(this,{'threadId':_0xcc0202,'id':_0x36d4f4,'author':_0x50d8b7||_0x3cfd6b,'creator':_0x3cfd6b,'content':_0x1e2513,'createdAt':_0x215164,'authoredAt':_0x933385,'attributes':_0xd981ad});}['_addComment'](_0x1fe5a8){let {threadId:_0xdbb63e,content:_0x30b444,attributes:_0x4f6b4e,isFromAdapter:_0x37fb6c}=_0x1fe5a8;const _0x16e23d=this['getCommentThread'](_0x1fe5a8['threadId']);if(!_0x16e23d)throw new _0x6d6638('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x56357a=this['_createNewComment'](_0x1fe5a8),{id:_0x4d9bf5}=_0x56357a;if(_0x16e23d['_add'](_0x56357a),_0x37fb6c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x16e23d['isSubmitted'])return Promise['resolve']();const _0x1bfeb2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7e2888}=_0x16e23d,_0x4ce675=_0x1bfeb2['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4f6b4e||(_0x4f6b4e={}),this['adapter']['addComment']({'channelId':_0x7e2888,'threadId':_0xdbb63e,'commentId':_0x4d9bf5,'content':_0x30b444,'attributes':_0x4f6b4e})['then'](_0x436a51=>{_0x1bfeb2['remove'](_0x4ce675),_0x436a51&&this['_updateComment']({'channelId':_0x7e2888,'threadId':_0xdbb63e,'commentId':_0x4d9bf5,'createdAt':_0x436a51['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x78bf15=>{throw console['error'](_0x78bf15),new _0x6d6638('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x31a9df,commentId:_0x24cdb7,content:_0x11eaad,createdAt:_0x2a4954,attributes:_0x7acd41,isFromAdapter:_0x241128}){if(void 0x0!==_0x11eaad&&('string'!=typeof _0x11eaad||!_0x11eaad['trim']()['length']))throw new _0x6d6638('commentsrepository-update-comment-invalid-content');const _0x5178b7=this['getCommentThread'](_0x31a9df),_0x501f6d=_0x5178b7['getComment'](_0x24cdb7);if(!_0x501f6d)throw new _0x6d6638('commentsrepository-update-missing-comment',this);let _0x26fc6e=!0x1;if(_0x11eaad&&_0x11eaad!==_0x501f6d['content']&&(_0x501f6d['isEditable']||_0x241128)&&(_0x501f6d['content']=_0x11eaad,_0x26fc6e=!0x0),_0x2a4954&&_0x2a4954!==_0x501f6d['createdAt']&&(_0x501f6d['createdAt']=_0x2a4954,_0x501f6d['isExternal']||(_0x501f6d['authoredAt']=_0x2a4954),_0x26fc6e=!0x0),_0x7acd41&&!_0x2d7453(_0x7acd41,_0x501f6d['attributes'])&&(_0x501f6d['attributes']=_0x7acd41,_0x26fc6e=!0x0),!_0x26fc6e)return Promise['resolve']();if(_0x5178b7['fire']('commentUpdated'),_0x241128||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x931edd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2fb711}=this['getCommentThread'](_0x501f6d['threadId']),_0x5a8d95=_0x931edd['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2fb711,'threadId':_0x31a9df,'commentId':_0x24cdb7,'content':_0x11eaad,'attributes':_0x7acd41})['then'](()=>_0x931edd['remove'](_0x5a8d95))['catch'](_0x49dce2=>{throw console['error'](_0x49dce2),new _0x6d6638('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x2e43c1,commentId:_0x4bc08a,isFromAdapter:_0x119fd6}){const _0x4a74fd=this['getCommentThread'](_0x2e43c1),_0x489141=_0x4a74fd['getComment'](_0x4bc08a);if(!_0x489141)throw new _0x6d6638('commentsrepository-remove-missing-comment',this);if(_0x4a74fd['_remove'](_0x489141),_0x119fd6||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x468f40=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4fce8}=_0x4a74fd,_0x58cf2a=_0x468f40['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4fce8,'threadId':_0x2e43c1,'commentId':_0x4bc08a})['then'](()=>_0x468f40['remove'](_0x58cf2a))['catch'](_0x3f0c3a=>{throw console['error'](_0x3f0c3a),new _0x6d6638('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x33ce08,_0x5eed8c){super();const _0x2b9b70=_0x5eed8c['isResolvable'];this['channelId']=_0x5eed8c['channelId'],this['id']=_0x5eed8c['id'],this['comments']=new _0x4284a7(),this['_repository']=_0x33ce08,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5eed8c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x33ce08,'_permissions',_0x33ce08,'_readOnlyChannels',()=>_0x33ce08['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x33ce08,'_permissions',()=>_0x33ce08['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x33ce08,'_permissions',()=>{const _0xc56f75=_0x33ce08['getPermissions'](this['channelId']);return _0xc56f75['write']||_0xc56f75['admin'];}),this['bind']('isResolvable')['to'](_0x33ce08,'_permissions',()=>_0x2b9b70&&_0x33ce08['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5eed8c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x567e09,_0x3de4d2)=>_0x567e09?_0x3de4d2?_0x567e09<_0x3de4d2?_0x567e09:_0x3de4d2:_0x567e09:_0x3de4d2),this['set']('unlinkedAt',_0x5eed8c['unlinkedAt']||null),this['set']('resolvedAt',_0x5eed8c['resolvedAt']||null),this['set']('resolvedBy',_0x5eed8c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5e82ef=>!!_0x5e82ef),this['set']('attributes',_0x5eed8c['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x191d73,_0x22a513)=>_0x191d73+_0x22a513['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x3570d8,id:_0xbd3f8e}=this;this['_repository']['fire'](ai('submitCommentThread',_0x3570d8),{'channelId':_0x3570d8,'threadId':_0xbd3f8e});}['setUnlinkedAt'](_0x58bd6a){this['_update']({'unlinkedAt':_0x58bd6a});}['resolve']({resolvedAt:_0x2d7036=new Date(),resolvedBy:_0x244ce0='',isFromAdapter:_0x358633=!0x1}={}){const _0x39fa4c=this['_repository']['context']['plugins']['get'](_0x12e146)['me'],{channelId:_0x1ecee9,id:_0x397ed6}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x1ecee9),{'channelId':_0x1ecee9,'threadId':_0x397ed6,'resolvedAt':_0x2d7036,'resolvedBy':_0x244ce0||_0x39fa4c['id'],'isFromAdapter':_0x358633});}['reopen']({isFromAdapter:_0xd1d258=!0x1}={}){const {channelId:_0x13bd1d,id:_0x1ed821}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x13bd1d),{'channelId':_0x13bd1d,'threadId':_0x1ed821,'isFromAdapter':_0xd1d258});}['setContext'](_0x53e833){this['context']||this['_update']({'context':_0x53e833});}['setAttribute'](_0x803b69,_0x10fe56){const _0x5a2a8d=_0x25e46d(this['attributes']);_0x91f587(_0x5a2a8d,_0x803b69,_0x10fe56),this['_update']({'attributes':_0x5a2a8d});}['removeAttribute'](_0x2c6adf){const _0x441508=_0x25e46d(this['attributes']);_0x1f251b(_0x441508,_0x2c6adf),this['_update']({'attributes':_0x441508});}['remove']({isFromAdapter:_0x1b2fd3=!0x1}={}){const {channelId:_0x1e9420,id:_0x74c217}=this;this['_repository']['fire'](ai('removeCommentThread',_0x1e9420),{'channelId':_0x1e9420,'threadId':_0x74c217,'isFromAdapter':_0x1b2fd3});}['attachTo'](_0x46df15){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x46df15});}['addComment'](_0x5bcb64){const {channelId:_0x1c8e3c,id:_0x5bbb35}=this;this['_repository']['fire'](ai('addComment',_0x1c8e3c,_0x5bbb35),Object['assign']({'channelId':_0x1c8e3c,'threadId':_0x5bbb35},_0x5bcb64));}['getComment'](_0x5bb9fd){if('string'!=typeof _0x5bb9fd)throw new _0x6d6638('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5bb9fd});return this['comments']['get'](_0x5bb9fd);}['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'](_0x5e2f40=>_0x5e2f40['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5a9f9d){return this['listenTo'](_0x5a9f9d,'change:authoredAt',()=>{const _0x47b8e5=this['_findOptimalIndex'](_0x5a9f9d),_0xa7dc06=this['comments'];_0x47b8e5-0x1!=_0xa7dc06['getIndex'](_0x5a9f9d)&&_0x47b8e5+0x1!=_0xa7dc06['getIndex'](_0x5a9f9d)&&(this['_remove'](_0x5a9f9d),this['_add'](_0x5a9f9d));}),this['comments']['add'](_0x5a9f9d,this['_findOptimalIndex'](_0x5a9f9d));}['_update'](_0x10ac9c){const {channelId:_0x1a05dd,id:_0x34e6c1}=this;this['_repository']['fire'](ai('updateCommentThread',_0x1a05dd),{..._0x10ac9c,'channelId':_0x1a05dd,'threadId':_0x34e6c1});}['_remove'](_0x5357b8){return this['stopListening'](_0x5357b8),_0x5357b8['destroy'](),this['comments']['remove'](_0x5357b8);}['_findOptimalIndex'](_0x352117){const _0x5d0648=this['comments']['find'](_0x450148=>new Date(_0x450148['authoredAt'])['getTime']()>new Date(_0x352117['authoredAt'])['getTime']());return _0x5d0648?this['comments']['getIndex'](_0x5d0648):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0xed663d,_0x2339c7){super();const _0x11ce8c=_0xed663d['context']['plugins']['get'](_0x12e146)['me'],_0x59be1f=_0xed663d['getCommentThread'](_0x2339c7['threadId']),_0x2db6bc=0x0===_0x59be1f['comments']['length'],_0xccd7da=_0x11ce8c===_0x2339c7['author'];this['id']=_0x2339c7['id'],this['threadId']=_0x2339c7['threadId'],this['author']=_0x2339c7['author'],this['creator']=_0x2339c7['creator'],this['set']('content',_0x2339c7['content']),this['createdAt']=_0x2339c7['createdAt']||new Date(),this['set']('authoredAt',_0x2339c7['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x59be1f,'resolvedAt'),this['set']('attributes',_0x2339c7['attributes']||{}),this['bind']('isEditable')['to'](_0xed663d,'_permissions',()=>{const _0x198581=_0xed663d['getPermissions'](_0x59be1f['channelId'])['write'],_0x1016bd=_0xed663d['getPermissions'](_0x59be1f['channelId'])['modifyAll'];return _0xccd7da&&_0x198581||!_0xccd7da&&_0x1016bd;}),this['bind']('isRemovable')['to'](_0x59be1f,'isRemovable',_0xed663d,'_permissions',_0x37a01b=>{const _0x3e7204=_0xed663d['getPermissions'](_0x59be1f['channelId'])['write'],_0x30c6d0=_0xed663d['getPermissions'](_0x59be1f['channelId'])['modifyAll'];return _0xccd7da&&_0x3e7204||_0x37a01b&&_0x2db6bc||!_0xccd7da&&_0x30c6d0&&!_0x2db6bc;}),this['bind']('isReadOnly')['to'](_0x59be1f,'isReadOnly'),this['_repository']=_0xed663d;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x2b3d62){const _0x3c691a=document['createElement']('div');return _0x3c691a['innerHTML']=_0x2b3d62,_0x3c691a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x533b2d){const {threadId:_0x1d350f,id:_0x327207}=this;if(!this['_repository']['hasCommentThread'](_0x1d350f))throw new _0x6d6638('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xd2676d}=this['_repository']['getCommentThread'](_0x1d350f);this['_repository']['fire'](ai('updateComment',_0xd2676d,_0x1d350f),{'channelId':_0xd2676d,'threadId':_0x1d350f,'commentId':_0x327207,..._0x533b2d});}['setAttribute'](_0x44889c,_0x11f46b){const _0x39c5f4=_0x25e46d(this['attributes']);_0x91f587(_0x39c5f4,_0x44889c,_0x11f46b),this['update']({'attributes':_0x39c5f4});}['removeAttribute'](_0x5100b6){const _0x3a57bf=_0x25e46d(this['attributes']);_0x1f251b(_0x3a57bf,_0x5100b6),this['update']({'attributes':_0x3a57bf});}['remove'](_0x48ea5a={}){if(!_0x48ea5a['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2045d3,id:_0x1a2166}=this;if(!this['_repository']['hasCommentThread'](_0x2045d3))throw new _0x6d6638('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x146605}=this['_repository']['getCommentThread'](_0x2045d3);this['_repository']['fire'](ai('removeComment',_0x146605,_0x2045d3),{'channelId':_0x146605,'threadId':_0x2045d3,'commentId':_0x1a2166,..._0x48ea5a});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x3b5882,..._0x507c48){for(const _0x44f86b of _0x507c48)void 0x0!==_0x44f86b&&(_0x3b5882+=':'+String(_0x44f86b));return _0x3b5882;}var ci=class extends _0x29bf2e{constructor(_0x2cca5b){super(_0x2cca5b),this['set']('hasContent',!0x1);}['refresh'](){const _0x28e5be=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x39a496 of _0x28e5be['getRanges']())if(this['_hasContent'](_0x39a496))return void(this['hasContent']=!0x0);}['execute']({threadId:_0xbb58d6=_0x2ff495(),ranges:_0x562d08,comment:_0x2e7e96}={}){const _0x3d0903=this['editor']['model'],_0x16767f=_0x562d08??Array['from'](_0x3d0903['document']['selection']['getRanges']()),_0x1033d6=[];for(const _0x375df3 of _0x16767f)this['_hasContent'](_0x375df3)&&_0x1033d6['push'](this['_trimToContent'](_0x375df3));if(!_0x1033d6['length'])throw new _0x6d6638('addcommentthreadcommand-incorrect-ranges',null);_0x2e7e96&&this['_createCommentThread'](_0xbb58d6,_0x2e7e96),this['_createMarkersFromRanges'](_0xbb58d6,_0x1033d6,!!_0x2e7e96);}['_createMarkersFromRanges'](_0x7d0eb4,_0xa02778,_0x453d97){this['editor']['model']['change'](_0x2ef80d=>{for(const _0x3e7069 of _0xa02778){const _0x396497='comment:'+_0x7d0eb4+':'+_0x2ff495()['substr'](0x1,0x5);_0x2ef80d['addMarker'](_0x396497,{'range':_0x3e7069,'usingOperation':_0x453d97,'affectsData':_0x453d97});}});}['_createCommentThread'](_0x3cab76,_0x2eed55){const _0x2a0d97=this['editor']['plugins']['get']('CommentsRepository'),_0x4bcabe=this['editor']['config']['get']('collaboration.channelId'),_0x261623=this['editor']['plugins']['get']('Users')['me'];if(!_0x261623)throw new _0x6d6638('addcommentthreadcommand-user-not-found',null);_0x2a0d97['addCommentThread']({'threadId':_0x3cab76,'channelId':_0x4bcabe,'comments':[{'authorId':_0x261623['id'],'content':_0x2eed55,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x2b87eb){for(const _0x1a3981 of _0x2b87eb['getItems']())if(this['_itemIsContent'](_0x1a3981))return!0x0;return!0x1;}['_itemIsContent'](_0x1cc37f){return _0x1cc37f['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1cc37f)&&!_0x1cc37f['is']('element','tableCell');}['_trimToContent'](_0xe8a1ae){const _0x2a53fd=_0x1f55a0=>!this['_itemIsContent'](_0x1f55a0['item']),_0x16681f=_0xe8a1ae['start']['getLastMatchingPosition'](_0x2a53fd),_0x1f8db0=_0xe8a1ae['end']['getLastMatchingPosition'](_0x2a53fd,{'direction':'backward'});return this['editor']['model']['createRange'](_0x16681f,_0x1f8db0);}},di=class extends _0x3d6b36{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x29f5b3){super(_0x29f5b3),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0xaca3ab=this['editor'],_0x397f95=_0xaca3ab['model']['document']['selection'],_0x22915b=_0xb07f85(()=>this['refreshSelectedViews'](),0xa);_0x397f95['on']('change:range',(_0x4d00cb,_0x32f76d)=>{_0x32f76d['directChange']&&(_0x22915b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0xaca3ab['editing']['view']['document'],'change:isFocused',(_0x39117b,_0x3ca784,_0x22ac6f)=>{_0x22ac6f&&_0x22915b();}),this['listenTo'](_0xaca3ab['ui']['focusTracker'],'change:isFocused',(_0x3a2350,_0x25c072,_0x330d9a)=>{_0x330d9a||this['fire']('blur',{'isAnnotationTracked':_0x309e4a=>this['_editorAnnotationsData']['has'](_0x309e4a['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4ed691){if(this['_editorAnnotations']['has'](_0x4ed691['view']))return;this['_editorAnnotations']['add'](_0x4ed691['view']),this['editor']['ui']['focusTracker']['add'](_0x4ed691['view']['element']);const _0x5bd696=this['editor']['plugins']['get'](ti);this['listenTo'](_0x5bd696['collection'],'remove',(_0x439487,_0x1b0b39)=>{this['editor']['ui']['focusTracker']['remove'](_0x1b0b39['view']['element']),this['_editorAnnotations']['delete'](_0x1b0b39['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x3e9339){if('function'!=typeof _0x3e9339)throw new _0x6d6638('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x3e9339);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3f446b,annotations:_0x10423d}){const _0x5c43fa=[],_0x33940a=this['editor']['model']['document']['selection'],_0x4f2c30=Array['from'](_0x33940a['getRanges']());for(const [_0x141672,_0x3b303a]of this['_editorAnnotationsData']){const _0x189fdc=_0x251b4c(_0x3b303a),_0x5bd711=_0x10423d['getByInnerView'](_0x141672);_0x189fdc&&_0x5bd711&&_0x5c43fa['push']({'annotation':_0x5bd711,'range':_0x189fdc});}function _0x251b4c(_0x16aa73){for(const _0x3d51f3 of _0x16aa73)for(const _0x289908 of _0x4f2c30)if(_0x3d51f3['containsRange'](_0x289908,!_0x33940a['isCollapsed']))return _0x3d51f3;return null;}return _0x5c43fa['sort']((_0x5abcd6,_0x4f1786)=>{const _0x322f14=_0x5abcd6['range'],_0xe127c0=_0x4f1786['range'];if(!_0x322f14['isEqual'](_0xe127c0)){if(_0x322f14['containsRange'](_0xe127c0,!0x0))return 0x1;if(_0xe127c0['containsRange'](_0x322f14,!0x0))return-0x1;}return _0x5abcd6['annotation']==_0x3f446b?-0x1:_0x4f1786['annotation']==_0x3f446b?0x1:0x0;})['map'](_0x3a0df0=>_0x3a0df0['annotation']);}get['_editorAnnotationsData'](){const _0x391dda=new Map();for(const _0x144f30 of Array['from'](this['_dataCollectors']))for(const [_0x2cc630,_0x418a8a]of _0x144f30())_0x391dda['set'](_0x2cc630,_0x418a8a);return _0x391dda;}},li=class extends _0x3d6b36{['afterInit'](){const _0x2312ea=this['editor'];_0x2312ea['plugins']['has']('RestrictedEditingModeEditing')&&_0x2312ea['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x3d6b36{constructor(_0x2bca10){super(_0x2bca10),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x233d8c=this['editor'],_0x583de0=_0x233d8c['commands']['get']('importWord'),_0x3e7bed=_0x233d8c['plugins']['get'](_0x12e146);_0x583de0&&(_0x583de0['on']('execute',(_0x96386f,[,_0x6edf66])=>{_0x6edf66['collaboration_features']={'comments':!0x0,'user_id':_0x3e7bed['me']['id']};},{'priority':_0xa7cdbb['high']+0xa}),this['listenTo'](_0x583de0,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x585357,_0x4fcf07){const {comment_threads:_0x3537ef}=_0x4fcf07;_0x3537ef&&_0x3537ef['forEach'](({thread_id:_0x1438c5,comments:_0x19fe93,is_resolved:_0x51a0f4})=>{const _0x5042d9=new Date(),_0x181b06=_0x19fe93['map'](({author:_0x2fa1cd,content:_0x1e4d46,created_at:_0xa30612})=>({'content':_0x1e4d46,'authorId':this['editor']['plugins']['get'](_0x12e146)['me']['id'],'createdAt':_0x5042d9,'attributes':{'@external':{'authorName':_0x2fa1cd,'createdAt':_0xa30612?new Date(_0xa30612):new Date(),'source':'importWord'}}})),_0x1f7722=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x1f7722,'threadId':_0x1438c5,'comments':_0x181b06,'resolvedAt':_0x51a0f4?_0x5042d9:null});});}},ui=class extends _0x3d6b36{constructor(_0x187b95){super(_0x187b95),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x53d534=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x53d534,'contentInsertion',(_0x27f569,_0x42c1e8)=>this['_removeMarkersWithoutThreads'](_0x42c1e8['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x47bd88){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x47bd88;const _0x380400=this['editor']['plugins']['get']('CommentsRepository');for(const _0x53b52c of _0x47bd88['keys']()){const [_0x508a5c,_0x3934a8]=_0x53b52c['split'](':');'comment'!=_0x508a5c||_0x380400['hasCommentThread'](_0x3934a8)||_0x47bd88['delete'](_0x53b52c);}return _0x47bd88;}['_registerMarkerInClipboardPipeline'](){const _0x459a8a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xd1d7ec=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xd1d7ec&&_0x459a8a['_registerMarkerToCopy']('comment',_0xd1d7ec);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xe1c352){switch(_0xe1c352){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0xc5c969){const _0x1139a8=_0xc5c969['split'](':');return{'group':_0x1139a8[0x0],'id':_0x1139a8[0x1],'part':_0x1139a8[0x2]};}var pi=class extends _0x3d6b36{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x334d57,_0x289127)=>{if(!_0x289127['options']['showCommentHighlights'])return null;if(_0x289127['options']['ignoreResolvedComments']){const {id:_0x1e1b23}=fi(_0x334d57['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1e1b23)?.['isResolved']&&_0x334d57['item'])return _0x289127['consumable']['consume'](_0x334d57['item'],'addMarker:'+_0x334d57['markerName']),_0x289127['consumable']['consume'](_0x334d57['item'],'removeMarker:'+_0x334d57['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xb291fc=>{_0xb291fc['on']('addMarker:comment',(_0x49acf3,_0x30707d,_0x503970)=>{if(!_0x503970['options']['showCommentHighlights'])return;const _0x231826=_0x30707d['item'];if(!_0x231826)return;const _0x351270=_0x503970['mapper']['toViewElement'](_0x231826);this['editor']['model']['schema']['isObject'](_0x231826)&&_0x351270&&!_0x351270['getCustomProperty']('widget')&&_0x351270['is']('containerElement')&&Ct(_0x351270,_0x503970['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x58fca5,{writer:_0x9a9e5c,options:_0x17b671})=>{if(!_0x17b671['showCommentHighlights'])return null;const _0x52feb0=_0x9a9e5c['createContainerElement']('div'),_0x487a2f=_0x9a9e5c['createEmptyElement']('hr');return _0x9a9e5c['addClass']('ck-horizontal-line',_0x52feb0),_0x9a9e5c['insert'](_0x9a9e5c['createPositionAt'](_0x52feb0,0x0),_0x487a2f),_0x52feb0;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x479b60,{writer:_0x1e0301,options:_0x58360f})=>{if(!_0x58360f['showCommentHighlights'])return null;const _0x4d3ca8=_0x1e0301['createContainerElement']('span'),_0x27aca3=_0x1e0301['createEmptyElement']('img');return _0x1e0301['addClass']('image-inline',_0x4d3ca8),_0x1e0301['insert'](_0x1e0301['createPositionAt'](_0x4d3ca8,0x0),_0x27aca3),_0x4d3ca8;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x32a43b,{writer:_0x1e74bb,options:_0x5d40cc})=>{if(_0x5d40cc['showCommentHighlights'])return _0x1e74bb['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4a55ab,_0x1fe833,_0x38448b)=>{_0x38448b['options']['showCommentHighlights']&&_0x4a55ab['stop']();},{'priority':'high'});}},wi=class extends _0x3d6b36{static get['requires'](){return[oi,di,_0x12e146,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x289fde){super(_0x289fde),this['set']('isThreadsLoadingPaused',!0x0),_0x289fde['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5c9d74,_0x103cae,_0x48604d,_0x281cd4)=>{const _0x5fa890=_0x289fde['plugins']['get'](oi),_0x547dc6=_0x48604d?fi(_0x48604d)['id']:null;_0x289fde['model']['change'](()=>{if(_0x547dc6){const _0x4aa7d5=this['getAllMarkersForId'](_0x547dc6);for(const _0x2575ae of _0x4aa7d5)_0x289fde['editing']['reconvertMarker'](_0x2575ae);}if(_0x281cd4){const {id:_0x406092}=fi(_0x281cd4),_0x5193ed=_0x5fa890['getCommentThread'](_0x406092);if(_0x5193ed&&_0x5193ed['unlinkedAt'])return;if(_0x5193ed&&!_0x5193ed['isAttached'])return;const _0x45499b=this['getAllMarkersForId'](_0x406092);for(const _0x3f93b3 of _0x45499b)_0x289fde['editing']['reconvertMarker'](_0x3f93b3);}}),_0x547dc6&&this['scrollToThreadMarker'](_0x547dc6);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xb8ffec=this['editor'],_0x3a34eb=_0xb8ffec['plugins']['get'](oi),_0x4ce6f1=_0xb8ffec['config']['get']('collaboration.channelId'),_0xb9e579=_0x3a34eb['getCommentThreads']()['filter'](_0x5f1fcd=>_0x5f1fcd['channelId']!==_0x4ce6f1);_0xb8ffec['commands']['add']('addCommentThread',new ci(_0xb8ffec)),this['listenTo'](_0xb8ffec,'change:isReadOnly',(_0x1bee67,_0x415dbf,_0x3f42bf)=>{_0x3a34eb['switchReadOnly'](_0x3f42bf,_0xb8ffec['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3a34eb,gi('addCommentThread',_0x4ce6f1),(_0x56a74f,{threadId:_0x412699})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x412699)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x412699);}),this['listenTo'](_0x3a34eb,gi('removeCommentThread',_0x4ce6f1),(_0x572342,{threadId:_0x48826f})=>{_0xb8ffec['model']['enqueueChange']({'isUndoable':!0x1},_0x2fce84=>{const _0x470489=this['getAllMarkersForId'](_0x48826f);for(const _0x7bfa5d of _0x470489)_0x2fce84['removeMarker'](_0x7bfa5d);});}),this['listenTo'](_0x3a34eb,gi('resolveCommentThread',_0x4ce6f1),(_0x681c11,{threadId:_0x5712dc})=>{this['_reconvertMarkers'](_0x5712dc);const _0x1dce33=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x1dce33['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5712dc)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3a34eb,gi('reopenCommentThread',_0x4ce6f1),(_0x2388a9,{threadId:_0x5d6569})=>{this['_reconvertMarkers'](_0x5d6569);},{'priority':'low'}),this['listenTo'](_0x3a34eb,gi('addComment',_0x4ce6f1),(_0x5b3521,{threadId:_0x3f14cb,isFromAdapter:_0x1300ae})=>{const _0x2a9695=this['getAllMarkersForId'](_0x3f14cb);!_0x1300ae&&0x0!=_0x2a9695['length']&&_0x3a34eb['hasCommentThread'](_0x3f14cb)&&0x1===_0x3a34eb['getCommentThread'](_0x3f14cb)['length']&&_0xb8ffec['model']['enqueueChange']({'isUndoable':!0x1},_0x375293=>{for(const _0x45ab6f of _0x2a9695)_0x375293['updateMarker'](_0x45ab6f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xb9e579);}['afterInit'](){!async function(_0x341a66){const _0xbea766='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0xdb90a2=0x78df8,_0x50d608=window['Date']['now'](),_0x4a39db=_0x341a66['editor'],_0x478313=new window['Promise'](_0x10d325=>{_0x4a39db['once']('ready',_0x10d325);}),_0x555126={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x36c625=_0x4a39db['config']['get']('licenseKey');async function _0x3e55de(){let _0xd14ce3,_0x30c533=null,_0x3275c3=null;try{return'GPL'==_0x36c625?'NotAllowed':(_0xd14ce3=_0x300a56(),_0xd14ce3?(_0xd14ce3['usageEndpoint']&&(_0x3275c3=_0x34c272(_0xd14ce3['usageEndpoint'],_0xd14ce3['jti'])),await _0x342858()?_0x22b82d()?_0x2c5539()?'Expired':_0x230ef9()?('evaluation'==_0xd14ce3['licenseType']&&(_0x30c533=_0x9d6a1b('EvaluationLimit')),await _0x2db3d7()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x2c5539(){const _0x3659d9=['evaluation','trial']['includes'](_0xd14ce3['licenseType'])?_0x50d608/0x3e8:0xe10*_0xdb90a2;return _0xd14ce3['exp']<_0x3659d9;}function _0x22b82d(){const _0xfcb6c6=_0xd14ce3['features'];if(!_0xfcb6c6)return!0x1;if(_0xfcb6c6['includes']('*'))return!0x0;if(_0xfcb6c6['includes']('CMT'))return!0x0;if(_0xfcb6c6['includes']('TRILIUM')&&_0x34bbd3())return!0x0;if(_0xfcb6c6['includes']('RCMT')){if(_0x478b0b())return!0x0;if(_0x1a8ce4()||_0x54a746())return!0x0;}return!0x1;}function _0x230ef9(){const _0x48a4f4=_0xd14ce3['licensedHosts'];if(!_0x48a4f4||0x0==_0x48a4f4['length'])return!0x0;const {hostname:_0x8f93c1}=new URL(window['location']['href']);if(_0x48a4f4['includes'](_0x8f93c1))return!0x0;const _0xe2a5f2=_0x8f93c1['split']('.');return _0x48a4f4['filter'](_0x5a9b86=>_0x5a9b86['includes']('*'))['map'](_0x211c4b=>_0x211c4b['split']('.'))['filter'](_0x2b2e8c=>_0x2b2e8c['length']<=_0xe2a5f2['length'])['map'](_0x376093=>Array(_0xe2a5f2['length']-_0x376093['length'])['fill']('*'===_0x376093[0x0]?'*':'')['concat'](_0x376093))['some'](_0x8649ca=>_0xe2a5f2['every']((_0x4b4f07,_0x46294e)=>_0x8649ca[_0x46294e]===_0x4b4f07||'*'===_0x8649ca[_0x46294e]));}function _0x2db3d7(){return _0x30c533&&_0x3275c3?new window['Promise']((_0x32846d,_0xeca1e0)=>{_0x30c533['then'](_0x32846d,_0xeca1e0),_0x3275c3['then'](_0x2bab16=>{'Valid'!=_0x2bab16&&_0x32846d(_0x2bab16);},_0xeca1e0);}):_0x30c533||_0x3275c3||'Valid';}}function _0x34c272(_0x110140,_0x158913){return new window['Promise'](_0x24e99b=>{if(_0x213e5f())return _0x24e99b('Valid');_0x547736(),_0x4a39db['decorate']('_sendUsageRequest');let _0x57d377=!0x1;const _0x14c4da=_0x2ff495();function _0x152262(_0x2b7d73){return!!_0x2b7d73&&('object'==typeof _0x2b7d73||'function'==typeof _0x2b7d73)&&'function'==typeof _0x2b7d73['then']&&'function'==typeof _0x2b7d73['catch'];}function _0x2c1f6a(_0x49c289){_0x419a05(_0x49c289)['then'](_0x4e3188=>_0x4e3188&&'ok'==_0x4e3188['status']?_0x1b7e81(_0x1c8492(_0x14c4da+_0x158913))!=_0x4e3188['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4bf011=>(_0x2575a1(),_0x4bf011),()=>{const _0x173e4d=_0x563409();return null==_0x173e4d?(_0x2575a1(),'Valid'):_0x50d608-_0x173e4d>0x240c8400?'UsageLimit':'Valid';})['then'](_0x24e99b)['catch'](()=>{_0x24e99b('UsageLimit');});const _0x3e8f6a=0x36ee80;function _0x2575a1(){const _0x3355cc='llct-'+_0x1b7e81(_0x1c8492(_0x110140)),_0x40acd7=_0x5dd94f(_0x1b7e81(window['Math']['ceil'](_0x50d608/_0x3e8f6a)));window['localStorage']['setItem'](_0x3355cc,_0x40acd7);}function _0x563409(){const _0x3ae38f='llct-'+_0x1b7e81(_0x1c8492(_0x110140)),_0x3effa9=window['localStorage']['getItem'](_0x3ae38f);return _0x3effa9?window['parseInt'](_0x5dd94f(_0x3effa9),0x10)*_0x3e8f6a:null;}function _0x419a05(_0x4b9bb7){return new window['Promise']((_0x38ce71,_0x39c1d3)=>{_0x4b9bb7['then'](_0x38ce71,_0x39c1d3),window['setTimeout'](_0x39c1d3,0x1d4c0);});}}_0x4a39db['on']('_sendUsageRequest',(_0x5f87be,_0x2710f9)=>{if(_0x2710f9[0x0]!=_0x110140)return _0x24e99b('UsageLimit');_0x2710f9[0x1]={..._0x2710f9[0x1],'requestId':_0x14c4da};},{'priority':'high'}),_0x4a39db['on']('_sendUsageRequest',_0x4969a9=>{_0x152262(_0x4969a9['return'])&&(_0x57d377=!0x0,_0x2c1f6a(_0x4969a9['return']));},{'priority':'low'}),_0x478313['then'](()=>{_0x57d377||_0x24e99b('UsageLimit');});});function _0x213e5f(){return'auto'==_0x4a39db['editing']['view']['_overlayModeHint'];}function _0x547736(){_0x4a39db['editing']['view']['_overlayModeHint']='auto';}}function _0x9d6a1b(_0x303932){const _0x1e97ba=[new window['Promise'](_0x45da31=>setTimeout(_0x45da31,0x93ecc)),_0x478313['then'](()=>new window['Promise'](_0x26283f=>{let _0x463909=0x0;_0x4a39db['model']['on']('applyOperation',(_0x5c170f,_0x5aefcd)=>{_0x5aefcd[0x0]['isDocumentOperation']&&_0x463909++,0x5e8==_0x463909&&(_0x26283f(),_0x5c170f['off']());});}))];return window['Promise']['race'](_0x1e97ba)['then'](()=>_0x303932);}async function _0x489527(){await _0x478313,_0x4a39db['model']['change']=_0x42b88a,_0x4a39db['model']['enqueueChange']=_0x42b88a,_0x4a39db['enableReadOnlyMode']('model');}function _0x34bbd3(){return window['glob']&&window['glob']['triliumVersion'];}function _0x478b0b(){return _0x3ce44c('WebSocketGateway')&&'connected'==_0x2f3a37('WebSocketGateway')['state'];}function _0x1a8ce4(){return _0x3ce44c('RevisionViewerIntegration');}function _0x54a746(){return _0x3ce44c('TrackChangesDataGetter');}function _0x24b9f0(_0x262ef8){const _0x1b0114=_0x2de3d7();_0x4a39db[_0x1b0114]='commentsLicenseKey'+_0x262ef8,'Valid'!=_0x262ef8&&_0x489527();}function _0x2de3d7(){const _0x1dc87b=window['String'](window['performance']['now']())['replace']('.','');let _0x5c5655='K';for(let _0x1964a1=0x0;_0x1964a1<_0x1dc87b['length'];_0x1964a1+=0x2){let _0x205aa1=window['parseInt'](_0x1dc87b['substring'](_0x1964a1,_0x1964a1+0x2));_0x205aa1>=0x3e&&(_0x205aa1-=0x3e),_0x5c5655+=_0xbea766[_0x205aa1];}return _0x5c5655;}function _0x300a56(){const _0xb9c5c3=_0x36c625['split']('.');if(0x3!=_0xb9c5c3['length'])return null;return _0x4da4c1(_0xb9c5c3[0x1]);function _0x4da4c1(_0x368441){const _0x2d9407=_0x4fb931(_0x368441);return _0x2d9407&&_0x35bb02()?_0x2d9407:null;function _0x35bb02(){const _0x52fd6f=_0x2d9407['jti'],_0x49f21b=window['parseInt'](_0x52fd6f['substring'](_0x52fd6f['length']-0x8),0x10),_0x431709={..._0x2d9407,'jti':_0x52fd6f['substring'](0x0,_0x52fd6f['length']-0x8)};return delete _0x431709['vc'],_0x1c8492(_0x431709)==_0x49f21b;}}}async function _0x342858(){let _0x503a83=!0x0;try{const [_0x5b45d0,_0x467464,_0x8b4805]=_0x36c625['split']('.');return _0x17a3f0(_0x5b45d0),await _0x4f54d5(_0x5b45d0,_0x467464,_0x8b4805),_0x503a83;}catch{return!0x1;}function _0x17a3f0(_0x327549){const _0x29be55=_0x4fb931(_0x327549);_0x29be55&&'ES256'==_0x29be55['alg']||(_0x503a83=!0x1);}async function _0x4f54d5(_0x203d37,_0x148a3c,_0x457358){const _0x155a5d=window['Uint8Array']['from'](_0x4b9da0(_0x457358),_0x276f4f=>_0x276f4f['charCodeAt'](0x0)),_0x47c9bf=new window['TextEncoder']()['encode'](_0x203d37+'.'+_0x148a3c),_0x1803c7=window['crypto']['subtle'];if(!_0x1803c7)return;const _0x3f37da=await _0x1803c7['importKey']('jwk',_0x555126,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x1803c7['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3f37da,_0x155a5d,_0x47c9bf)||(_0x503a83=!0x1);}}function _0x4fb931(_0x51474a){return _0x51474a['startsWith']('ey')?JSON['parse'](_0x4b9da0(_0x51474a)):null;}function _0x4b9da0(_0x13abaf){return window['atob'](_0x13abaf['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1c8492(_0x5273da){let _0x5a693e=0x1505;function _0x1d89b1(_0x163da8){for(let _0x472ec6=0x0;_0x472ec6<_0x163da8['length'];_0x472ec6++){const _0x38a4c6=_0x163da8['charCodeAt'](_0x472ec6);_0x5a693e=(_0x5a693e<<0x5)+_0x5a693e+_0x38a4c6,_0x5a693e&=_0x5a693e;}}function _0x4de3a8(_0x31ee89){Array['isArray'](_0x31ee89)?_0x31ee89['forEach'](_0x4de3a8):_0x31ee89&&'object'==typeof _0x31ee89?Object['entries'](_0x31ee89)['sort']()['forEach'](([_0x5aeab5,_0x52cd64])=>{_0x1d89b1(_0x5aeab5),_0x4de3a8(_0x52cd64);}):_0x1d89b1(window['String'](_0x31ee89));}return _0x4de3a8(_0x5273da),_0x5a693e>>>0x0;}function _0x1b7e81(_0x38a345){return _0x38a345['toString'](0x10)['padStart'](0x8,'0');}function _0x5dd94f(_0x457d86){return _0x457d86['split']('')['reverse']()['join']('');}function _0x3ce44c(_0x4a915f){return _0x4a39db['plugins']['has'](_0x4a915f);}function _0x2f3a37(_0x23dbef){return _0x4a39db['plugins']['get'](_0x23dbef);}function _0x42b88a(){}_0x24b9f0(await _0x3e55de());}(this);}['destroy'](){const _0x89ac03=this['editor']['plugins']['get'](oi),_0x1a832b=this['editor']['config']['get']('collaboration.channelId');for(const _0x41c420 of _0x89ac03['getCommentThreads']({'channelId':_0x1a832b}))_0x89ac03['_detachCommentThread'](_0x41c420['id']),_0x89ac03['_threads']['delete'](_0x41c420['id']);super['destroy']();}['hasMarkerForId'](_0x1c3950){return this['getAllMarkersForId'](_0x1c3950)['length']>0x0;}['getAllMarkersForId'](_0x1656b2){const _0x53156b=[];for(const _0x474c99 of this['editor']['model']['markers'])_0x474c99['name']['startsWith']('comment:'+_0x1656b2)&&_0x53156b['push'](_0x474c99);return _0x53156b;}['scrollToThreadMarker'](_0x40c6e1){setTimeout(()=>{const _0x3202de=this['_getTargetForId'](_0x40c6e1);_0x3202de&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x40c6e1&&_0x4c5b31({'target':_0x3202de[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x50fe1d){this['editor']['model']['change'](()=>{for(const _0x101423 of this['getAllMarkersForId'](_0x50fe1d))this['editor']['editing']['reconvertMarker'](_0x101423);});}['_attachArchivedThread'](_0x515187){const _0x42c11f=this['editor']['plugins']['get'](oi),_0x8c4947=this['editor']['plugins']['get'](di),_0x1f8424=_0x42c11f['getCommentThread'](_0x515187);if(!_0x1f8424['isAttached']){const _0x2814ff=_0x1f8424['attachTo'](()=>this['_getTargetForId'](_0x1f8424['id']));_0x8c4947['registerAnnotation'](_0x2814ff),_0x1f8424['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x30c767=this['editor'],_0x32a335=_0x30c767['plugins']['get'](_0x12e146);_0x30c767['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1ef5e0,_0x34a36d)=>{const {id:_0xcaa3e6}=fi(_0x1ef5e0['markerName']),_0x4650a6=_0x30c767['plugins']['get'](oi)['getCommentThread'](_0xcaa3e6),_0xd893f8=this['activeMarker']&&fi(this['activeMarker'])['id']===_0xcaa3e6;let _0x37d530;if(_0x4650a6&&_0x4650a6['isResolved']&&!_0xd893f8&&_0x1ef5e0['item'])return _0x34a36d['consumable']['consume'](_0x1ef5e0['item'],'addMarker:'+_0x1ef5e0['markerName']),_0x34a36d['consumable']['consume'](_0x1ef5e0['item'],'removeMarker:'+_0x1ef5e0['markerName']),null;const _0x2df288=['ck-comment-marker'];return _0xd893f8&&_0x2df288['push']('ck-comment-marker--active'),_0x37d530=_0x4650a6?.['length']?_0x4650a6['comments']['first']['author']['id']:_0x32a335['me']['id'],{'classes':_0x2df288,'attributes':{'data-comment':_0xcaa3e6,'data-author-id':_0x37d530}};}}),_0x30c767['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x13a6a4,{options:_0x4d2406})=>{if(_0x4d2406['showCommentHighlights'])return null;const _0x23bf22=_0x30c767['plugins']['get'](oi),_0x5dbf4b=_0x30c767['model']['markers']['get'](_0x13a6a4),{id:_0x5dd302,part:_0x1775c2}=fi(_0x13a6a4);return _0x5dbf4b&&!_0x5dbf4b['affectsData']||_0x4d2406['ignoreResolvedComments']&&_0x23bf22['getCommentThread'](_0x5dd302)?.['isResolved']?null:{'group':'comment','name':_0x1775c2?_0x5dd302+':'+_0x1775c2:_0x5dd302};}}),_0x30c767['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x570201,{writer:_0x2fb5d5})=>_0x2fb5d5['createElement']('$marker',{'data-name':'comment:'+_0x570201['getAttribute']('id')})}),_0x30c767['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5df7f5=this['editor'],_0x41a5c0=_0x5df7f5['plugins']['get'](oi),_0x50340b=new Set(),_0x3b4e2e=new Set();_0x5df7f5['model']['document']['registerPostFixer'](_0x26c3c8=>{let _0x2c0655=!0x1;for(const {name:_0x4e3d79,data:_0x123d5a}of _0x5df7f5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x23c4df,id:_0x27a1c6}=fi(_0x4e3d79);let _0x394eed=_0x123d5a['newRange'];if('comment'!==_0x23c4df||!_0x394eed)continue;const _0x5555ed='$graveyard'===_0x394eed['root']['rootName'];_0x5555ed||(_0x394eed=_i(_0x394eed,_0x5df7f5['model']),!_0x394eed||_0x394eed['isCollapsed']||!_0x123d5a['newRange']||_0x394eed['isEqual'](_0x123d5a['newRange']))?_0x5df7f5['model']['hasContent'](_0x394eed)&&!_0x5555ed?this['isThreadsLoadingPaused']?_0x50340b['add'](_0x4e3d79):this['_handleThreadMarker'](_0x4e3d79,_0x27a1c6):(_0x3b4e2e['add'](_0x4e3d79),_0x50340b['delete'](_0x4e3d79),_0x26c3c8['removeMarker'](_0x4e3d79),_0x2c0655=!0x0):(_0x26c3c8['updateMarker'](_0x4e3d79,{'range':_0x394eed}),_0x2c0655=!0x0);}return _0x2c0655;}),this['on']('change:isThreadsLoadingPaused',(_0x461961,_0x2406f3,_0x3869fb)=>{if(!_0x3869fb&&_0x50340b['size'])for(const _0x37cd1a of _0x50340b){const {id:_0x539a5e}=fi(_0x37cd1a);_0x50340b['delete'](_0x37cd1a),_0x5df7f5['model']['markers']['get'](_0x37cd1a)&&this['_handleThreadMarker'](_0x37cd1a,_0x539a5e);}}),this['listenTo'](_0x5df7f5['model']['document'],'change',()=>{for(const {name:_0xb90bd7,data:{newRange:_0x41d8a7}}of _0x5df7f5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x101da5,id:_0x47342b}=fi(_0xb90bd7);if('comment'!==_0x101da5)continue;const _0x294b29=_0x41a5c0['getCommentThread'](_0x47342b),_0x345261=this['hasMarkerForId'](_0x47342b);_0x294b29&&(!_0x294b29['_hasTargetInContent']&&_0x41d8a7&&_0x5df7f5['editing']['view']['once']('render',()=>{const _0x1474a0=_0x5df7f5['plugins']['get'](ti),_0x4b3d63=_0x41a5c0['_threadToController']['get'](_0x294b29)['view'];_0x1474a0['getByInnerView'](_0x4b3d63)['refreshVisibility']();},{'priority':'low'}),_0x294b29['_hasTargetInContent']=_0x345261||!!_0x41d8a7),_0x41d8a7||(_0x3b4e2e['add'](_0xb90bd7),_0x50340b['delete'](_0xb90bd7));}for(const _0x214611 of _0x3b4e2e){const {id:_0x526351}=fi(_0x214611),_0x4c83bd=_0x41a5c0['getCommentThread'](_0x526351);if(_0x50340b['delete'](_0x214611),!_0x4c83bd)continue;const _0x298376=this['hasMarkerForId'](_0x526351);_0x298376||_0x4c83bd['isSubmitted']?_0x298376||_0x4c83bd['unlinkedAt']||_0x4c83bd['setUnlinkedAt'](new Date()):_0x4c83bd['remove']();}_0x3b4e2e['clear']();});}['_handleInitialThreads'](_0x1a8a13){_0x1a8a13['forEach'](_0x2bcef2=>{_0x2bcef2['unlinkedAt']&&this['_attachArchivedThread'](_0x2bcef2['id']);});}['_getTargetForId'](_0x5bd815){const _0x3123e2=this['editor'],_0x15d850=this['getAllMarkersForId'](_0x5bd815);return _0x4943c8(_0x3123e2['editing'],_0x15d850);}['_getTextContext'](_0x2ebb47){const _0x1fd9c1=this['getAllMarkersForId'](_0x2ebb47);let _0x56d03f='',_0x38f578=!0x1;for(const _0x41365f of _0x1fd9c1){const _0x1a698e=_0x41365f['getRange']();for(const _0x1a5932 of Array['from'](_0x1a698e['getItems']()))_0x1a5932['is']('$textProxy')?(_0x56d03f&&_0x38f578&&(_0x56d03f+='\x20',_0x38f578=!0x1),_0x56d03f+=_0x1a5932['data']):_0x38f578=!0x0;_0x38f578=!0x0;}return _0x56d03f['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x333503,_0x365a73){const _0x3d62ad=this['editor'],_0x6a7819=_0x3d62ad['plugins']['get'](oi);let _0x534b82=_0x6a7819['getCommentThread'](_0x365a73);const _0x2be662=_0x3d62ad['config']['get']('collaboration.channelId'),_0xbdcb4=_0x3d62ad['plugins']['get'](di);return _0x534b82&&(_0x534b82['unlinkedAt']&&_0x534b82['setUnlinkedAt'](null),_0x534b82['isAttached'])||(this['getAllMarkersForId'](_0x365a73)[0x0]['managedUsingOperations']?_0x6a7819['fetchCommentThread']({'channelId':_0x2be662,'threadId':_0x365a73})['then'](_0x33fc13=>{if('destroyed'!==_0x3d62ad['state']){if(_0x534b82=_0x33fc13,_0x534b82&&!_0x534b82['isAttached']){const _0xfe03c3=_0x534b82['attachTo'](()=>this['_getTargetForId'](_0x365a73));_0xbdcb4['registerAnnotation'](_0xfe03c3),_0x534b82['isResolved']&&this['_reconvertMarkers'](_0x365a73);}else{if(!_0x534b82){const _0x5735f0=this['getAllMarkersForId'](_0x365a73);_0x3d62ad['model']['change'](_0x3aab2d=>{for(const _0x1b6d07 of _0x5735f0)_0x3aab2d['removeMarker'](_0x1b6d07);});}}}}):_0x3d62ad['editing']['view']['once']('render',()=>{if(_0x6a7819['getCommentThread'](_0x365a73))return;const _0x5c4efc=_0x3d62ad['plugins']['get'](ti);_0x534b82=_0x6a7819['openNewCommentThread']({'channelId':_0x2be662,'threadId':_0x365a73,'target':()=>this['_getTargetForId'](_0x365a73),'context':{'type':'text','value':this['_getTextContext'](_0x365a73)}});const _0x165913=_0x6a7819['_threadToController']['get'](_0x534b82)['view'],_0x55a837=_0x5c4efc['getByInnerView'](_0x165913);_0x55a837&&_0xbdcb4['registerAnnotation'](_0x55a837);},{'priority':'low'})),_0x534b82;}['_handleThreadMarker'](_0x5ec930,_0xd81317){const _0x262e96=this['_attachMarkerToThread'](_0x5ec930,_0xd81317);_0x262e96&&!_0x262e96['context']&&_0x262e96['setContext']({'type':'text','value':this['_getTextContext'](_0xd81317)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1c6dea=this['editor'];_0x15978d(_0x1c6dea['model'],({left:_0x4782af,entered:_0x1d2fa0})=>{for(const _0x236c76 of _0x4782af)if(Ai(_0x236c76)){_0x1c6dea['ui']['ariaLiveAnnouncer']['announce'](Et(_0x1c6dea['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x24eaeb of _0x1d2fa0)if(Ai(_0x24eaeb)){_0x1c6dea['ui']['ariaLiveAnnouncer']['announce'](Et(_0x1c6dea['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x393c6e(_0x57653d)));break;}});}};function gi(_0x1b8704,_0x4e7de0){return _0x4e7de0?_0x1b8704+':'+_0x4e7de0:_0x1b8704;}function _i(_0x2b4f0f,_0x1ff514){const _0x448f57=_0x1ff514['schema'],_0x274db4=_0x1ff514['createRange'](_0x2b4f0f['start']);for(const _0x855aa7 of _0x2b4f0f['getWalker']()){const {type:_0x6b90f0,item:_0x175f5d,nextPosition:_0x34bcc7}=_0x855aa7;if('text'===_0x6b90f0||_0x448f57['isObject'](_0x175f5d)){const _0x5e8eca=_0x1ff514['createPositionBefore'](_0x175f5d);_0x274db4['isCollapsed']&&(_0x274db4['start']=_0x5e8eca),_0x274db4['end']=_0x34bcc7;}}return _0x274db4;}function Ai(_0x3990e7){return'comment'===fi(_0x3990e7['name'])['group'];}var vi=class extends _0x3d6b36{['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 _0x4b8f76=this['editor'],_0x389788=_0x4b8f76['plugins']['get'](oi),_0x26192f=_0x4b8f76['plugins']['get'](wi),_0x2904ed=_0x4b8f76['plugins']['get'](ti),_0x3a8049=_0x4b8f76['plugins']['get'](di);_0x4b8f76['ui']['componentFactory']['add']('comment',()=>{const _0x16620d=this['_createUIButton'](_0x2d6eba);return _0x16620d['tooltip']=!0x0,_0x16620d;}),_0x4b8f76['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x3a8049['addSourceCollector'](()=>{const _0x2004af=[];for(const [_0x25e1b9,_0x4fb74c]of _0x389788['_threadToController']){const _0x337c81=_0x26192f['getAllMarkersForId'](_0x25e1b9['id']),_0x4a2b2b=_0x337c81['map'](_0xda799d=>_0xda799d['getRange']());_0x337c81['length']>0x0&&_0x2004af['push']([_0x4fb74c['view'],_0x4a2b2b]);}return _0x2004af;}),this['listenTo'](_0x2904ed,'change:activeAnnotations',(_0x59a21f,_0x444c13,_0x283989)=>{const _0x7a944e=Array['from'](_0x283989)['map'](_0xcfb80f=>_0xcfb80f['innerView'])['find'](_0x5478b5=>_0x389788['_viewToController']['has'](_0x5478b5));if(!_0x7a944e)return void(_0x26192f['activeMarker']=null);const _0x2bd0be=_0x389788['_viewToController']['get'](_0x7a944e)['model']['id'],_0x59f646='comment:'+_0x2bd0be;_0x2bd0be&&_0x26192f['hasMarkerForId'](_0x2bd0be)?_0x26192f['activeMarker']=_0x59f646:_0x26192f['activeMarker']&&(_0x26192f['activeMarker']=null);}),this['listenTo'](_0x389788,'removeCommentThread',(_0x4a08be,{threadId:_0x25cdeb,isFromAdapter:_0x56a566})=>{!_0x56a566&&_0x4b8f76['ui']['focusTracker']['isFocused']&&_0x26192f['hasMarkerForId'](_0x25cdeb)&&_0x4b8f76['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x389788,'addComment',(_0x1bf3ff,{threadId:_0x4e997d,isFromAdapter:_0x20b105})=>{!_0x20b105&&_0x26192f['hasMarkerForId'](_0x4e997d)&&_0x389788['hasCommentThread'](_0x4e997d)&&0x1===_0x389788['getCommentThread'](_0x4e997d)['length']&&(_0x4b8f76['editing']['view']['focus'](),_0x1bf3ff['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x17b8cc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x22b8b8;for(const _0x192ec9 in _0x17b8cc){const _0x5c5397=_0x192ec9,_0x13e14b=_0x17b8cc[_0x5c5397];if('commentsLicenseKeyValid'==_0x13e14b||'commentsLicenseKeyInvalid'==_0x13e14b||'commentsLicenseKeyExpired'==_0x13e14b||'commentsLicenseKeyDomainLimit'==_0x13e14b||'commentsLicenseKeyNotAllowed'==_0x13e14b||'commentsLicenseKeyEvaluationLimit'==_0x13e14b||'commentsLicenseKeyUsageLimit'==_0x13e14b){delete _0x17b8cc[_0x5c5397],_0x22b8b8=_0x13e14b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x22b8b8&&_0x17b8cc['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x160659){const _0x3cb776=this['editor'],_0x1e15b3=new _0x160659(_0x3cb776['locale']),_0x1fb318=_0x3cb776['commands']['get']('addCommentThread');return _0x1e15b3['set']({'label':Et(_0x3cb776['locale'],'Comment'),'icon':_0xf9075a}),_0x1e15b3['bind']('isEnabled')['to'](_0x1fb318,'isEnabled',_0x1fb318,'hasContent',(_0x23c633,_0x20aba6)=>_0x23c633&&_0x20aba6),this['listenTo'](_0x1e15b3,'execute',()=>{_0x1fb318['execute']();}),_0x1e15b3;}},yi=class extends _0x3d6b36{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x37b291){super(_0x37b291),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5813fb,_0x1cedec,_0x594988)=>{_0x594988?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x57e8bb,_0x27cd04]of this['editor']['commands'])_0x27cd04['affectsData']&&'addCommentThread'!==_0x57e8bb&&_0x27cd04['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 _0x22bced=this['editor']['editing']['view']['document'];this['listenTo'](_0x22bced,'cut',_0x2af4c9=>_0x2af4c9['stop'](),{'priority':'highest'}),this['listenTo'](_0x22bced,'clipboardInput',_0x1a1512=>_0x1a1512['stop'](),{'priority':'highest'}),this['listenTo'](_0x22bced,'delete',_0x4dee9a=>_0x4dee9a['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4b34d6,_0x291f77]of this['editor']['commands'])_0x291f77['affectsData']&&'addCommentThread'!==_0x4b34d6&&_0x291f77['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 _0x41d5ed{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xca429e){super(_0xca429e),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2c2fb6=this['context']['plugins']['get'](ti);this['listenTo'](_0x2c2fb6,'_activateAnnotation',(_0x578ee5,_0x162aaf)=>{for(const _0x7965f1 of this['activeUIs']){const _0x1b44a7=this['_uis']['get'](_0x7965f1);(0x0,this['uisData']['get'](_0x7965f1)['filter'])(_0x162aaf)&&_0x1b44a7['setActiveAnnotation'](_0x162aaf);}}),this['listenTo'](_0x2c2fb6,'_deactivateAllAnnotations',()=>{for(const _0x364029 of this['activeUIs'])this['_uis']['get'](_0x364029)['setActiveAnnotation'](null);}),this['listenTo'](_0x2c2fb6['_visibleAnnotations'],'add',(_0x53fc77,_0x1f5e59)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1f5e59);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4ad181){return this['activeUIs']['has'](_0x4ad181);}['activate'](_0x4d6f83,_0x3a0c87=this['defaultFilter']){const _0x37e0b4=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x4d6f83))throw new _0x6d6638('annotationsuis-missing-ui',this,{'uiName':_0x4d6f83});this['isActive'](_0x4d6f83)&&this['deactivate'](_0x4d6f83),this['activeUIs']['add'](_0x4d6f83);const _0x2749fb=new Jt();Qt({'source':_0x37e0b4['_visibleAnnotations'],'target':_0x2749fb,'filter':_0x3a0c87}),this['uisData']['set'](_0x4d6f83,{'collection':_0x2749fb,'filter':_0x3a0c87});const _0x1753a1=this['_uis']['get'](_0x4d6f83);_0x1753a1['attach'](_0x2749fb),this['listenTo'](_0x1753a1,'change:activeAnnotation',(_0x4e576a,_0x3b8e13,_0x5c79e2,_0x43b4fd)=>{_0x43b4fd&&_0x37e0b4['_removeActiveAnnotation'](_0x43b4fd),_0x5c79e2&&_0x37e0b4['_addActiveAnnotation'](_0x5c79e2);});}['deactivate'](_0x299fa3){if(this['activeUIs']['delete'](_0x299fa3),!this['_uis']['has'](_0x299fa3))throw new _0x6d6638('annotationsuis-missing-ui',this,{'uiName':_0x299fa3});const _0xe38945=this['_uis']['get'](_0x299fa3);_0xe38945['detach'](),this['stopListening'](_0xe38945),this['uisData']['get'](_0x299fa3)['collection']['destroy'](),this['uisData']['delete'](_0x299fa3);}['switchTo'](_0x3ca5b2){if(!this['_uis']['has'](_0x3ca5b2))throw new _0x6d6638('annotationsuis-missing-ui',this,{'uiName':_0x3ca5b2});const _0x340311=this['context']['plugins']['get'](ti),_0x533d1a=Array['from'](_0x340311['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3ca5b2);const _0x3c7d43=this['_uis']['get'](_0x3ca5b2);_0x3c7d43['setActiveAnnotation'](_0x533d1a),_0x3c7d43['_setSelectedAnnotations']&&_0x533d1a&&_0x3c7d43['_setSelectedAnnotations']([_0x533d1a]);}['deactivateAll'](){for(const _0x1ef4cf of this['activeUIs'])this['deactivate'](_0x1ef4cf);}['register'](_0x94ec66,_0x3bcf23){if(this['_uis']['has'](_0x94ec66))throw new _0x6d6638('annotationsuis-register-already-registered');if('function'!=typeof _0x3bcf23['attach']||'function'!=typeof _0x3bcf23['detach']||'function'!=typeof _0x3bcf23['setActiveAnnotation'])throw new _0x6d6638('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x94ec66,_0x3bcf23);}['refilterAnnotations'](){const _0x5e7764=this['context']['plugins']['get'](ti)['collection'],_0x1b3398=new Map(),_0x516711=Array['from'](this['activeUIs']);for(const _0x38b952 of this['activeUIs']){const _0x2acb2f=this['uisData']['get'](_0x38b952)['collection'];for(const _0x4bdb3c of _0x2acb2f)_0x1b3398['set'](_0x4bdb3c,_0x38b952);}for(const _0x4ce132 of _0x5e7764){const _0x409ef1=_0x1b3398['get'](_0x4ce132);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4ce132);const _0x38fc5c=_0x516711['find'](_0x5531b9=>this['uisData']['get'](_0x5531b9)['filter'](_0x4ce132));_0x409ef1!==_0x38fc5c&&(_0x409ef1&&this['uisData']['get'](_0x409ef1)['collection']['remove'](_0x4ce132),_0x38fc5c&&this['uisData']['get'](_0x38fc5c)['collection']['add'](_0x4ce132));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x488c3c){const _0x103473=[];for(const _0x12dab of this['activeUIs']){(0x0,this['uisData']['get'](_0x12dab)['filter'])(_0x488c3c)&&_0x103473['push'](_0x12dab);}if(_0x103473['length']>0x1)throw new _0x6d6638('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x103473,'annotationType':_0x488c3c['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x48a5c0('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0xcf7cb7){super(_0xcf7cb7);const _0x40cd25=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 _0x16deef(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x40cd25['to']('class')],'style':{'minHeight':_0x40cd25['to']('minHeight',_0x1698e4=>'number'==typeof _0x1698e4?Ci(_0x1698e4+0xa):null)},'dir':_0xcf7cb7['uiLanguageDirection'],'role':'application','aria-label':Et(_0xcf7cb7,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0xcf7cb7,'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',_0x2f78a0=>{this['_updateItemPositionInFocusables'](_0x2f78a0['source']);}),this['list']['forEach'](_0x47f0e9=>{this['focusTracker']['add'](_0x47f0e9['element']),this['_updateItemPositionInFocusables'](_0x47f0e9);}),this['list']['on']('change',(_0x2fe90c,_0x1cbeb7)=>{for(const _0x4ee23a of _0x1cbeb7['removed'])this['focusTracker']['remove'](_0x4ee23a['element']),this['focusables']['remove'](_0x4ee23a);for(const _0x2b1419 of _0x1cbeb7['added'])this['focusTracker']['add'](_0x2b1419['element']),this['_updateItemPositionInFocusables'](_0x2b1419);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x422640){const _0x3f4928=this['focusables']['getIndex'](_0x422640);let _0x1de49a,_0x4d9e7a;for(const _0x1699c1 of this['focusables'])if(_0x422640['top']<_0x1699c1['top']){_0x1de49a=_0x1699c1;break;}if(_0x4d9e7a=_0x1de49a?this['focusables']['getIndex'](_0x1de49a):this['focusables']['length'],-0x1!==_0x3f4928){if(_0x3f4928===_0x4d9e7a-0x1)return;this['focusables']['remove'](_0x422640),_0x4d9e7a=_0x1de49a?this['focusables']['getIndex'](_0x1de49a):this['focusables']['length'];}this['focusables']['add'](_0x422640,_0x4d9e7a);}};const bi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x48a5c0('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3ee364){super(_0x3ee364),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x1a5289,_0x4567d9)=>_0x1a5289+_0x4567d9),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4c088e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4c088e['to']('isAnimationDisabled',_0x544fcb=>_0x544fcb?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4c088e['to']('top',_0x50c2d4=>bi(_0x50c2d4))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xb07754=this['element']['clientHeight'];_0xb07754&&(this['height']=_0xb07754);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x41d5ed{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5bc979){super(_0x5bc979),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 _0x1a594f=this['context']['config']['get']('sidebar.container');_0x1a594f&&this['setContainer'](_0x1a594f);}['setContainer'](_0x11254c){if(!Oi(_0x11254c))throw new _0x6d6638('sidebar-setcontainer-invalid-element');this['container']=_0x11254c;}['_attachToContainer']({viewClass:_0x28ce66='',spaceBetweenItems:_0x16c91c=0x19}={}){if(!Oi(this['container']))throw new _0x6d6638('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x28ce66,this['_spaceBetweenItems']=_0x16c91c;}['rearrange']({removedAnnotation:_0x380017,previousAnnotation:_0x4faefd,nextAnnotation:_0x243fc9}){const _0x208a0c=this['getSidebarItemView'](_0x380017);this['view']['list']['remove'](_0x208a0c),this['_destroySidebarItemView'](_0x380017),_0x4faefd&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4faefd)),_0x243fc9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x243fc9)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3005c2,activatedAnnotation:_0xb690d8,disableAnimationOnActivatedAnnotation:_0x893c7}){if(this['_activeAnnotation']=_0xb690d8,_0x3005c2){_0x3005c2['isActive']=!0x1;const _0x489dc=this['getSidebarItemView'](_0x3005c2);_0x489dc&&_0x893c7&&(_0x489dc['isAnimationDisabled']=!0x1);}if(_0xb690d8){const _0x56b645=this['getSidebarItemView'](_0xb690d8);_0x56b645&&(_0xb690d8['isActive']=!0x0,_0x893c7&&(_0x56b645['isAnimationDisabled']=!0x0,_0x56b645['top']+=0x1),this['_alignToTargetRect'](_0x56b645));}}['_detachFromContainer'](_0x207e19){if(this['view']['element']['remove'](),_0x207e19){for(const _0x1a3adf of _0x207e19)this['_destroySidebarItemView'](_0x1a3adf);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x390fd1,_0xefa00){_0xefa00||(_0xefa00=_0x390fd1['view']);const _0x3a7a3d=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3a7a3d,_0x390fd1),this['_annotationToSidebarItemView']['set'](_0x390fd1,_0x3a7a3d),_0x3a7a3d['content']['add'](_0xefa00),this['listenTo'](_0x390fd1['view'],'change:targetRect',(_0x2e710b,_0x577fff,_0x5b4db2)=>{const _0x515854=this['_getTargetTop'](_0x390fd1,_0x5b4db2);_0x3a7a3d['_targetTop']!=_0x515854&&(_0x3a7a3d['_targetTop']=_0x515854,this['_setItemTop'](_0x3a7a3d,_0x515854));}),this['listenTo'](_0x3a7a3d,'change:top',()=>{this['_recalculate'](_0x3a7a3d,'top');}),this['listenTo'](_0x3a7a3d,'change:bottom',()=>{this['_recalculate'](_0x3a7a3d,'bottom');}),this['_alignToTargetRect'](_0x3a7a3d);const _0x36ad83=this['_getItemBefore'](_0x3a7a3d);return _0x36ad83&&this['_alignAfterItem'](_0x36ad83,_0x3a7a3d)||this['_alignToTargetRect'](_0x3a7a3d),this['_updateLastItem'](),this['view']['list']['add'](_0x3a7a3d),_0x3a7a3d;}['_alignForTopChange'](_0x2675a7){if(!_0x2675a7['content']['length'])return;const _0x4b707e=this['_getItemBefore'](_0x2675a7);if(!_0x4b707e)return;const _0x3055bb=this['_sidebarItemViewToAnnotation']['get'](_0x4b707e),_0x1d068a=this['_activeAnnotation'];_0x1d068a&&_0x1d068a===_0x3055bb?this['_alignAfterItem'](_0x4b707e,_0x2675a7):this['_alignBeforeItem'](_0x2675a7,_0x4b707e);}['_alignForBottomChange'](_0x2bdf51){if(!_0x2bdf51['content']['length'])return;const _0x356ed0=this['_getItemAfter'](_0x2bdf51);if(!_0x356ed0)return;const _0x582219=this['_sidebarItemViewToAnnotation']['get'](_0x356ed0),_0x4d35a3=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x354c30=this['_activeAnnotation'];_0x354c30&&_0x354c30===_0x582219&&_0x4d35a3?(this['_alignBeforeItem'](_0x356ed0,_0x2bdf51),this['_alignAfterItem'](_0x2bdf51,_0x356ed0)):_0x354c30&&_0x354c30===_0x582219?this['_alignBeforeItem'](_0x356ed0,_0x2bdf51):this['_alignAfterItem'](_0x2bdf51,_0x356ed0);}['_recalculate'](_0x3ec7fd,_0x5d3d92){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3824dd,changedProp:_0x142c3a}of this['_recalculateBuffer'])'top'===_0x142c3a?this['_alignForTopChange'](_0x3824dd):this['_alignForBottomChange'](_0x3824dd);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3ec7fd,'changedProp':_0x5d3d92});}['getSidebarItemView'](_0x58e238){return this['_annotationToSidebarItemView']['get'](_0x58e238);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xd56d44){const _0x398645=this['getSidebarItemView'](_0xd56d44);this['stopListening'](_0x398645),this['stopListening'](_0xd56d44['view']),_0x398645['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xd56d44),this['_sidebarItemViewToAnnotation']['delete'](_0x398645);}['_createSidebarView'](){const _0x5b8489=new Ii(this['context']['locale']);return _0x5b8489['render'](),this['on']('change:_lastItem',(_0x357426,_0x1f979e,_0x2567a5,_0x4dc082)=>{_0x4dc082&&_0x5b8489['unbind']('minHeight'),_0x2567a5?_0x5b8489['bind']('minHeight')['to'](_0x2567a5,'bottom'):_0x5b8489['minHeight']=null;}),_0x5b8489;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x46caf0){const _0x1f3750=this['_sidebarItemViewToAnnotation']['get'](_0x46caf0),_0x48c2cf=_0x1f3750&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1f3750)-0x1);return _0x48c2cf&&this['getSidebarItemView'](_0x48c2cf)||null;}['_getItemAfter'](_0x39427d){const _0x579848=this['_sidebarItemViewToAnnotation']['get'](_0x39427d),_0x425f50=_0x579848&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x579848)+0x1);return _0x425f50&&this['getSidebarItemView'](_0x425f50)||null;}['_alignBeforeItem'](_0x5cb43e,_0x5db2ca){_0x5cb43e['updateHeight']();const _0x4542e4=Ni(_0x5db2ca['bottom']+this['_spaceBetweenItems'],_0x5cb43e['top']);return!!_0x4542e4&&(this['_setItemTop'](_0x5db2ca,_0x5db2ca['top']-_0x4542e4),!0x0);}['_alignAfterItem'](_0x32087b,_0x2868f5){_0x32087b['updateHeight']();const _0x4abbd6=Ni(_0x32087b['bottom']+this['_spaceBetweenItems'],_0x2868f5['top']);return!!_0x4abbd6&&(this['_setItemTop'](_0x2868f5,_0x2868f5['top']+_0x4abbd6,!0x1),!0x0);}['_alignToTargetRect'](_0xddee3c){const _0x38e844=this['_sidebarItemViewToAnnotation']['get'](_0xddee3c);if(!_0x38e844||!_0x38e844['target']||!_0x38e844['targetRect'])return;const _0x4ce71d=this['_getTargetTop'](_0x38e844,_0x38e844['targetRect']);this['_setItemTop'](_0xddee3c,_0x4ce71d);}['_getTargetTop'](_0x32bc9f,_0xca01db){if(null===_0xca01db)return 0x0;if(_0x32bc9f['target']instanceof _0x3d1cc4)return _0xca01db['top'];{const _0x17f06a=new _0x3d1cc4(this['view']['element'])['top'];return _0xca01db['top']-_0x17f06a;}}['_setItemTop'](_0x5e2a67,_0x169183,_0x224770=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x224770&&(_0x169183=Math['max'](_0x169183,this['_getMaxAvailableTop'](_0x5e2a67))),_0x5e2a67['top']=_0x169183;}['_getMaxAvailableTop'](_0x3c9fb1){let _0x4b9c0c=this['_getItemBefore'](_0x3c9fb1),_0x593b9d=0x0;for(;_0x4b9c0c;)_0x4b9c0c['updateHeight'](),_0x593b9d+=this['_spaceBetweenItems']+_0x4b9c0c['height'],_0x4b9c0c=this['_getItemBefore'](_0x4b9c0c);return _0x593b9d;}};function Ni(_0x1b95b0,_0x369ef3){return Math['max'](_0x1b95b0-_0x369ef3,0x0);}function Oi(_0x54fd2d){return null!==_0x54fd2d&&'object'==typeof _0x54fd2d&&0x1===_0x54fd2d['nodeType'];}var Mi=class extends _0x41d5ed{['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(_0x277c20){super(_0x277c20),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4284a7(),this['_refreshPositioningDebounced']=_0xb07f85(()=>{_0x277c20['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x413ff0=this['context']['plugins']['get'](Ti),_0xde9028=this['context']['plugins']['get'](ki);_0x413ff0['register']('wideSidebar',this),_0xde9028['container']&&_0x413ff0['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x466489){if(_0x466489===this['activeAnnotation'])return;const _0x2e20e5=this['context']['plugins']['get'](ki);_0x2e20e5['_activeAnnotation']=_0x466489;const _0x3df33a=this['activeAnnotation'];_0x2e20e5['refresh']({'blurredAnnotation':_0x3df33a,'activatedAnnotation':_0x466489}),this['activeAnnotation']=_0x466489;}['attach'](_0x3f6f00){this['annotations']=_0x3f6f00;const _0x53ab51=this['context']['plugins']['get'](ki);if(_0x53ab51['_annotations']=_0x3f6f00,this['isAttached'])throw new _0x6d6638('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x53ab51,'set:container',()=>{this['detach'](),this['listenTo'](_0x53ab51,'change:container',_0x265b8a=>{_0x265b8a['off'](),this['attach'](_0x3f6f00);});}),_0x53ab51['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x49ba7b=_0x53f65b=>{_0x53f65b['updateTargetRect'](),_0x53ab51['addAnnotation'](_0x53f65b);};for(const _0x36187b of _0x3f6f00)_0x49ba7b(_0x36187b);this['listenTo'](_0x3f6f00,'add',(_0x5f4bd5,_0x36a5ff)=>{_0x49ba7b(_0x36a5ff);}),this['listenTo'](_0x3f6f00,'remove',(_0x323700,_0x1570df,_0x5ca55d)=>{_0x53ab51['rearrange']({'removedAnnotation':_0x1570df,'previousAnnotation':_0x3f6f00['get'](_0x5ca55d-0x1),'nextAnnotation':_0x3f6f00['get'](_0x5ca55d+0x1)}),_0x1570df===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3f6f00,'focus',(_0x56ef55,_0x1d814f)=>{this['setActiveAnnotation'](_0x1d814f);}),this['listenTo'](_0x3f6f00,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1b09ad=this['context']instanceof _0x59fc06?this['context']['editors']:new _0x4284a7([this['context']]);for(const _0x23596f of _0x1b09ad)this['_integrateWithEditorAnnotations'](_0x23596f);this['listenTo'](_0x1b09ad,'add',(_0x2ad225,_0x1dafa9)=>{this['listenTo'](_0x1dafa9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1dafa9);});}),this['listenTo'](_0x1b09ad,'remove',(_0x494bdc,_0xfe041a)=>{_0xfe041a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xfe041a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x6d6638('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x557ec7=this['context']['plugins']['get'](ki);_0x557ec7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x557ec7),this['stopListening'](this['annotations']),this['context']instanceof _0x59fc06&&this['stopListening'](this['context']['editors']);for(const _0x364359 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x364359);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5c818c){if(!_0x5c818c['plugins']['has']('EditorAnnotations'))return;const _0x17fed3=_0x5c818c['plugins']['get']('EditorAnnotations'),_0x5b78b5=()=>{const _0x45fdbf=_0x17fed3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x45fdbf[0x0]||null);};this['listenTo'](_0x17fed3,'refresh',_0x5b78b5),this['listenTo'](_0x17fed3,'blur',(_0x23433d,{isAnnotationTracked:_0x2d4fb8})=>{this['activeAnnotation']&&_0x2d4fb8(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x17fed3,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5c45b5=>{_0x17fed3['hasDomSelection']()&&(_0x5b78b5(),_0x5c45b5['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x17fed3);}['_destroyEditorAnnotationsIntegration'](_0x1fcfeb){this['stopListening'](_0x1fcfeb),this['_editorAnnotations']['remove'](_0x1fcfeb);}},Ri=class extends _0x2d6eba{['counterView'];constructor(_0x4bad61){super(_0x4bad61);const _0x53a17e=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x479669,_0x4cd65d)=>_0x479669?'...':_0x4cd65d['toString']()),this['set']('annotationType',''),this['icon']=_0xf9075a,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x53a17e['to']('annotationType',_0x1e06b1=>'ck-annotation-counter__badge--'+_0x1e06b1),_0x53a17e['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x53a17e['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x41d5ed{['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(_0x1af2dd){super(_0x1af2dd),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3dfafb())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4284a7(),this['_refreshPositioningDebounced']=_0xb07f85(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x44c76b(this['context']['locale']),this['balloonPanelView']=new _0x35dc9c(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5258d5){this['annotations']=_0x5258d5;const _0x3af9bc=this['context']['plugins']['get'](ki),_0x5b33dd=this['balloonPanelView'];if(_0x3af9bc['_annotations']=_0x5258d5,this['isAttached'])throw new _0x6d6638('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3af9bc,'set:container',()=>{this['detach'](),this['listenTo'](_0x3af9bc,'change:container',_0x5325b8=>{_0x5325b8['off'](),this['attach'](_0x5258d5);});}),_0x3af9bc['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x443d9f=_0x149be4=>{const _0x33cb0b=new Ri(this['context']['locale']);_0x3af9bc['addAnnotation'](_0x149be4,_0x33cb0b),this['_annotationToNarrowView']['set'](_0x149be4,_0x33cb0b),_0x33cb0b['bind']('isDirty','annotationType','number')['to'](_0x149be4['view'],'isDirty','type','length'),_0x33cb0b['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5b33dd['content']['first']!==_0x149be4['view']?(this['_showBalloon'](_0x149be4),_0x149be4['view']['element']['focus'](),this['setActiveAnnotation'](_0x149be4)):this['setActiveAnnotation'](null);});};for(const _0x2a7b8c of _0x5258d5)_0x443d9f(_0x2a7b8c);this['listenTo'](_0x5258d5,'add',(_0x33bf24,_0x27473a)=>{_0x443d9f(_0x27473a);}),this['listenTo'](_0x5258d5,'remove',(_0x8390f7,_0x5f0e1d,_0x160ce3)=>{this['_annotationToNarrowView']['get'](_0x5f0e1d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5f0e1d),_0x3af9bc['rearrange']({'removedAnnotation':_0x5f0e1d,'previousAnnotation':_0x5258d5['get'](_0x160ce3-0x1),'nextAnnotation':_0x5258d5['get'](_0x160ce3+0x1)}),_0x5f0e1d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5258d5,'focus',(_0x177234,_0x261a0d)=>{this['setActiveAnnotation'](_0x261a0d);}),this['listenTo'](_0x5258d5,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x50cad9,_0x5c3719)=>{_0x5c3719['keyCode']===_0xa09830['esc']&&_0x5b33dd['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5b33dd['content']['first']),this['_hideBalloon'](),_0x5c3719['stopPropagation'](),_0x5c3719['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x270bb5,_0x1dd60e)=>{const _0x7b7395=_0x1dd60e['target'];_0x5b33dd['isVisible']&&_0x5b33dd['element']['contains'](_0x7b7395)||_0x3af9bc['view']['element']['contains'](_0x7b7395)||_0x270bb5['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x495952=>_0x495952['contains'](_0x7b7395))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xc472db=this['context']instanceof _0x59fc06?this['context']['editors']:new _0x4284a7([this['context']]);for(const _0x417fbd of _0xc472db)this['_integrateWithEditorAnnotations'](_0x417fbd);this['listenTo'](_0xc472db,'add',(_0x35287c,_0x3bfe6a)=>{this['listenTo'](_0x3bfe6a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3bfe6a);});}),this['listenTo'](_0xc472db,'remove',(_0x433810,_0x4aa95f)=>{_0x4aa95f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4aa95f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x21695d){if(_0x21695d===this['activeAnnotation'])return;const _0x2f73fa=this['context']['plugins']['get'](ki);_0x2f73fa['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x21695d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x21695d&&_0x2f73fa['getSidebarItemView'](_0x21695d)?this['_showBalloon'](_0x21695d):this['_hideBalloon'](),this['activeAnnotation']=_0x21695d;}['detach'](){if(!this['isAttached'])throw new _0x6d6638('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xf3d8fa=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5dfbc5=>_0x5dfbc5['destroy']()),this['_annotationToNarrowView']['clear'](),_0xf3d8fa['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x59fc06&&this['stopListening'](this['context']['editors']);for(const _0x568f8a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x568f8a);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'](_0x49a4b4){if(!_0x49a4b4['plugins']['has']('EditorAnnotations'))return;const _0xaf4c52=_0x49a4b4['plugins']['get']('EditorAnnotations'),_0x5667eb=this['context']['plugins']['get'](ki),_0x4c6fd6=this['annotations'],_0x2dc10d=this['balloonPanelView'],_0x5be6fd=()=>{const _0x4b0d6b=_0xaf4c52['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4b0d6b),this['setActiveAnnotation'](_0x4b0d6b[0x0]||null);};this['listenTo'](_0xaf4c52,'refresh',_0x5be6fd),this['listenTo'](_0xaf4c52,'blur',(_0x54bdc8,{isAnnotationTracked:_0x50b178})=>{this['activeAnnotation']&&_0x50b178(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xaf4c52,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4c6fd6,'blur',_0x4c2d9e=>{_0xaf4c52['hasDomSelection']()&&_0x4c2d9e['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x210dbd,_0xe69d61)=>{const _0x2cff5f=_0xe69d61['target'];_0x2dc10d['isVisible']&&_0x2dc10d['element']['contains'](_0x2cff5f)||_0x5667eb['view']['element']['contains'](_0x2cff5f)||this['activeAnnotation']&&_0xaf4c52['hasDomSelection']()&&(_0x5be6fd(),_0x210dbd['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0xaf4c52);}['_destroyEditorAnnotationsIntegration'](_0x1413fc){_0x1413fc&&(this['stopListening'](_0x1413fc),this['_editorAnnotations']['remove'](_0x1413fc));}['_setSelectedAnnotations'](_0x49d1c4){for(const _0x2ef7ba of this['_selectedAnnotations'])_0x49d1c4['includes'](_0x2ef7ba)||this['_manuallyClosedAnnotationViews']['delete'](_0x2ef7ba['view']);this['_selectedAnnotations']=_0x49d1c4;}['_refreshPositioning'](){const _0x4ae5f8=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4ae5f8['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x101f05){if(this['_manuallyClosedAnnotationViews']['has'](_0x101f05['view']))return;const _0x56d7d2=this['balloonPanelView']['content']['first'];_0x56d7d2!==_0x101f05['view']?(_0x56d7d2&&this['_detachListeners'](_0x56d7d2),this['_attachListeners'](_0x101f05['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x101f05['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1ec94e=this['balloonPanelView']['content']['first'],_0x454dd4=_0x1ec94e&&this['annotations']['getByView'](_0x1ec94e);if(!_0x454dd4||!this['_annotationToNarrowView']['has'](_0x454dd4))return;const _0x25425b=this['_annotationToNarrowView']['get'](_0x454dd4)['element'],_0x193187=(function(){const _0x16e327=_0x35dc9c['defaultPositions'];return[_0x16e327['southArrowNorthEast'],_0x16e327['northArrowSouthEast'],_0x16e327['southArrowNorth'],_0x16e327['northArrowSouth'],_0x16e327['southArrowNorthWest'],_0x16e327['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x25425b,'positions':_0x193187});}['_hideBalloon'](){const _0x56a9b0=this['balloonPanelView'],_0x1df9b0=_0x56a9b0['content']['first'];_0x1df9b0&&(this['_detachListeners'](_0x1df9b0),_0x56a9b0['unpin'](),_0x56a9b0['content']['clear']());}['_attachListeners'](_0x2e92b4){this['listenTo'](_0x2e92b4,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2e92b4,'Esc',(_0x310c9e,_0x54c909)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2e92b4),this['_hideBalloon'](),_0x54c909();});}['_detachListeners'](_0x4cfeef){this['stopListening'](_0x4cfeef);}},xi=class extends _0x3d6b36{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x31f7b0,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59ade4){super(_0x59ade4),_0x59ade4['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x59ade4['plugins']['get'](_0x31f7b0),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0xb07f85(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x16ca91=this['editor']['plugins']['get'](Ti);_0x16ca91['context']===this['editor']&&(_0x16ca91['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xfb56a6,_0x1038af)=>{const _0x568e23=this['_balloon'];if(this['isAttached']&&_0x568e23['visibleView']){const _0x4e0467=this['annotations']['getByView'](_0x568e23['visibleView']);_0x4e0467&&this['_closeAnnotation'](_0x4e0467),_0x1038af();}}));}['afterInit'](){const _0x4aadac=this['editor']['plugins']['get'](Ti);_0x4aadac['context']===this['editor']&&(_0x4aadac['hasActive']()||_0x4aadac['switchTo']('inline'));}['setActiveAnnotation'](_0x5850cd){_0x5850cd!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5850cd&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5850cd)&&this['_addAnnotationToBalloon'](_0x5850cd,!0x0),_0x5850cd['isActive']=!0x0),_0x5850cd||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5850cd);}['attach'](_0x3db74b){this['annotations']=_0x3db74b;const _0x3f107e=this['editor']['plugins']['get'](Ti),_0x1b766f=this['_balloon'];if(this['isAttached'])throw new _0x6d6638('inlineannotations-attach-already-attached',this);if(_0x3f107e['context']!==this['editor'])throw new _0x6d6638('inlineannotations-not-allowed-with-context',this);const _0x3312a5=this['editor']['plugins']['get'](di);this['listenTo'](_0x3312a5,'refresh',()=>{const _0x469602=_0x3312a5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x19e4b6,_0x121405;!this['_forceRefresh']&&(_0x19e4b6=_0x469602,_0x121405=this['_selectedAnnotations'],_0x19e4b6['length']===_0x121405['length']&&_0x19e4b6['every'](_0x48d541=>_0x121405['includes'](_0x48d541)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x469602),this['setActiveAnnotation'](_0x469602[0x0]||null));}),this['listenTo'](_0x3312a5,'blur',(_0xb940e2,{isAnnotationTracked:_0x1770a9})=>{this['activeAnnotation']&&_0x1770a9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3312a5,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x533463,_0x204d96,_0xe68267)=>{_0xe68267||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3db74b,'remove',(_0x232f45,_0x23557e)=>{this['_removeAnnotationFromBalloon'](_0x23557e),_0x23557e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b766f,'change:visibleView',(_0x5416a7,_0x4613b9,_0x953dd3,_0x25dd32)=>{_0x25dd32&&this['stopListening'](_0x25dd32);const _0x46f5f4=_0x3db74b['getByView'](_0x953dd3);_0x953dd3&&_0x46f5f4&&(this['listenTo'](_0x953dd3,'change:height',()=>{_0x1b766f['updatePosition']();}),this['listenTo'](_0x953dd3,'Esc',()=>{this['_closeAnnotation'](_0x46f5f4),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x46f5f4&&this['setActiveAnnotation'](_0x46f5f4));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1b766f['visibleView']&&_0x3db74b['getByView'](_0x1b766f['visibleView'])&&_0x1b766f['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 _0x6d6638('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2a3257 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2a3257);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3c9f32){for(const _0x4f53f7 of this['_selectedAnnotations'])_0x3c9f32['includes'](_0x4f53f7)||this['_manuallyClosed']['delete'](_0x4f53f7);for(const _0xf89822 of this['annotations'])_0x3c9f32['includes'](_0xf89822)||this['_removeAnnotationFromBalloon'](_0xf89822);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x46e30c of _0x3c9f32)this['_addAnnotationToBalloon'](_0x46e30c);}this['_selectedAnnotations']=_0x3c9f32;}['_addAnnotationToBalloon'](_0x56596f,_0x3d505e=!0x1){this['_manuallyClosed']['has'](_0x56596f)||(this['_addedAnnotations']['has'](_0x56596f)||this['_balloon']['hasView'](_0x56596f['view'])||(this['_addedAnnotations']['add'](_0x56596f),this['_balloon']['add']({'stackId':_0x56596f['view']['id'],'view':_0x56596f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x56596f)}})),_0x3d505e&&this['_balloon']['showStack'](_0x56596f['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5153f0){const _0x235f18=_0x5153f0['target'],_0x1d9903=this['editor']['editing']['view'],_0x34c07b=_0x1d9903['document']['selection']['getFirstRange'](),_0x303802=_0x1d9903['domConverter']['viewRangeToDom'](_0x34c07b);if(_0x303802['collapse'](!0x0),_0x235f18){if(_0x235f18 instanceof _0x3d1cc4)return _0x235f18;let _0x4447e5=[];for(const _0x76714a of _0x235f18)_0x4447e5['push'](..._0x3d1cc4['getDomElementRects'](_0x76714a));_0x4447e5=function(_0x1be39a){const _0x433280=[];let _0x33e438=_0x1be39a[0x0];for(let _0x4653e=0x1;_0x4653e<_0x1be39a['length'];_0x4653e++)if(Pi(_0x33e438,_0x1be39a[_0x4653e])){const _0x4335c7=_0x1be39a[_0x4653e]['width'];_0x33e438['width']+=_0x4335c7,_0x33e438['right']+=_0x4335c7;}else _0x433280['push'](_0x33e438),_0x33e438=_0x1be39a[_0x4653e];return _0x433280['push'](_0x33e438),_0x433280;}(_0x4447e5);const _0x18c7f5=_0x303802['getBoundingClientRect']();return _0x4447e5['find'](_0x357168=>_0x357168['top']<=_0x18c7f5['top']&&_0x357168['bottom']>=_0x18c7f5['bottom']&&_0x357168['left']<=_0x18c7f5['left']&&_0x357168['right']>=_0x18c7f5['right'])||_0x4447e5[0x0];}return _0x5153f0['targetRect']||_0x303802;}['_removeAnnotationFromBalloon'](_0x4c3371){this['_addedAnnotations']['has'](_0x4c3371)&&this['_balloon']['hasView'](_0x4c3371['view'])&&(this['_addedAnnotations']['delete'](_0x4c3371),this['_balloon']['remove'](_0x4c3371['view']));}['_closeAnnotation'](_0x39a2e4){this['_manuallyClosed']['add'](_0x39a2e4),this['_removeAnnotationFromBalloon'](_0x39a2e4);}};function Pi(_0x4809bf,_0x3688a5){return _0x4809bf['top']===_0x3688a5['top']&&_0x4809bf['bottom']===_0x3688a5['bottom']&&_0x4809bf['right']===_0x3688a5['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x57ac1a,_0x897642){super(_0x57ac1a),this['set']('isEmpty',!_0x897642['length']),this['focusTracker']=new _0x16deef(),this['_annotationViews']=_0x897642,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x897642,'focusTracker':this['focusTracker']}),this['listenTo'](_0x897642,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x897642,'remove',(_0x368743,_0x2e8e03)=>{_0x2e8e03['isActive']&&this['focus'](),_0x897642['length']||(this['isEmpty']=!0x0);});const _0x38b314=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x57ac1a,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x897642},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x38b314['if']('isEmpty','ck-hidden',_0x2d1216=>!_0x2d1216)]},'children':[{'text':Et(_0x57ac1a,'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 _0x45ed91 of this['_annotationViews'])this['focusTracker']['add'](_0x45ed91['element']);this['_annotationViews']['on']('change',(_0x163306,{added:_0x4eb8f0,removed:_0xb7ff98})=>{for(const _0x25876b of _0x4eb8f0)this['focusTracker']['add'](_0x25876b['element']);for(const _0xc86cd8 of _0xb7ff98)this['focusTracker']['remove'](_0xc86cd8['element']);});}},Di=class extends _0x41d5ed{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0xe72326){super(_0xe72326),this['archivedThreads']=new _0x4284a7();}['init'](){const _0xfadc75=this['context'],_0x7024a4=_0xfadc75['plugins']['get'](oi),_0x2292f4=_0xfadc75['plugins']['get'](ti);this['listenTo'](_0x7024a4,'addCommentThread',(_0x1bd7f6,{threadId:_0x3ca80a})=>{const _0x7c8aa5=_0x7024a4['getCommentThread'](_0x3ca80a);_0x7c8aa5['archivedAt']&&this['archivedThreads']['add'](_0x7c8aa5,this['_calculatePosition'](_0x7c8aa5['archivedAt'])),this['listenTo'](_0x7c8aa5,'change:archivedAt',(_0x2d0274,_0xe56e35,_0x5cbd58)=>{_0x5cbd58?this['archivedThreads']['has'](_0x7c8aa5)||this['archivedThreads']['add'](_0x7c8aa5,this['_calculatePosition'](_0x7c8aa5['archivedAt'])):this['archivedThreads']['has'](_0x7c8aa5)&&this['archivedThreads']['remove'](_0x7c8aa5);});}),this['listenTo'](_0x7024a4,'removeCommentThread',(_0x905751,{threadId:_0x52218f})=>{const _0x1752a5=_0x7024a4['getCommentThread'](_0x52218f);this['stopListening'](_0x1752a5),this['archivedThreads']['has'](_0x1752a5)&&this['archivedThreads']['remove'](_0x1752a5);},{'priority':'highest'}),this['listenTo'](_0x2292f4['collection'],'focus',(_0x31a1b7,_0x59e63a)=>{_0x59e63a['isVisible']||(_0x59e63a['isActive']=!0x0,_0x2292f4['activate'](_0x59e63a));});}['_calculatePosition'](_0xd4d60b){const _0x292717=[...this['archivedThreads']]['findIndex'](_0x5c6b0b=>_0x5c6b0b['archivedAt']<_0xd4d60b);return _0x292717>-0x1?_0x292717:this['archivedThreads']['length'];}},Vi=class extends _0x3d6b36{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x1e157e];}constructor(_0x207f8c){super(_0x207f8c),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x31ba32=this['editor'],_0xd90420=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x31ba32['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2d6eba,!0x0)),_0x31ba32['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4b48e7=this['_createCommentsArchiveButton'](rt);return _0x4b48e7['set']({'role':'menuitemcheckbox'}),_0x4b48e7;});const _0x54c2af=_0x31ba32['plugins']['get'](Di),_0x4b71eb=_0x31ba32['plugins']['get']('Annotations'),_0x10aec2=_0x31ba32['plugins']['get']('CommentsRepository');_0x54c2af['archivedThreads']['forEach'](_0x3d7531=>{this['_handleNewThread'](_0x3d7531);}),this['listenTo'](_0x54c2af['archivedThreads'],'add',(_0x4993a5,_0x280481)=>{this['_handleNewThread'](_0x280481);}),this['listenTo'](_0x4b71eb['collection'],'add',(_0x2411ad,_0x85ebe2)=>{const _0x5164d2=this['_pendingThreads']['find'](_0x5a705b=>{const _0x165eda=_0x10aec2['_threadToController']['get'](_0x5a705b);return _0x165eda&&_0x85ebe2['innerView']===_0x165eda['view'];});if(_0x5164d2){const _0x5da8f4=this['_calculatePosition'](_0x5164d2['archivedAt']);this['_addAnnotationToArchive'](_0x85ebe2,_0x5da8f4),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5164d2),0x1);}}),this['listenTo'](_0x54c2af['archivedThreads'],'remove',(_0x3eba52,_0x31d169)=>{const _0x8e9505=_0x31ba32['config']['get']('collaboration.channelId');if(!_0x8e9505||_0x31d169['channelId']===_0x8e9505){if(this['_pendingThreads']['includes'](_0x31d169))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x31d169),0x1);else{const _0x2d1bde=_0x10aec2['_threadToController']['get'](_0x31d169),_0x87d312=_0x4b71eb['getByInnerView'](_0x2d1bde['view']);this['annotationViews']['remove'](_0x87d312['view']),this['stopListening'](_0x87d312),this['stopListening'](_0x87d312['focusableElements']);}}}),this['listenTo'](_0x4b71eb['collection'],'add',(_0x3b2bce,_0x302b25)=>{this['listenTo'](_0x302b25,'escape',_0xd90420);}),this['listenTo'](_0x4b71eb['collection'],'remove',(_0x24c828,_0x3af56e)=>{this['stopListening'](_0x3af56e,'escape',_0xd90420);});}['_addAnnotationToArchive'](_0x439404,_0x5c077d){this['listenTo'](_0x439404,'set:isVisible',_0x38fe02=>{_0x38fe02['return']=!0x1,_0x38fe02['stop']();}),this['annotationViews']['add'](_0x439404['view'],_0x5c077d);}['_handleNewThread'](_0xe21562){const _0x3f1122=this['editor']['plugins']['get']('CommentsRepository'),_0x1c7f96=this['editor']['plugins']['get']('Annotations'),_0x58d73b=this['editor']['config']['get']('collaboration.channelId');if(!_0x58d73b||_0xe21562['channelId']===_0x58d73b){const _0x1c8c75=_0x3f1122['_threadToController']['get'](_0xe21562);if(!_0x1c8c75)return void this['_pendingThreads']['push'](_0xe21562);const _0x3cc67b=this['_calculatePosition'](_0xe21562['archivedAt']),_0x5ed0ee=_0x1c7f96['getByInnerView'](_0x1c8c75['view']);_0x5ed0ee['isVisible']&&_0x1c7f96['_visibleAnnotations']['remove'](_0x5ed0ee),this['_addAnnotationToArchive'](_0x5ed0ee,_0x3cc67b);}}['_calculatePosition'](_0x3f8660){const _0x10dd39=this['editor']['config']['get']('collaboration.channelId'),_0x47f030=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x819684=>_0x819684['channelId']===_0x10dd39)['findIndex'](_0x378f49=>_0x378f49['archivedAt']<_0x3f8660);return _0x47f030<0x0||_0x47f030>this['annotationViews']['length']?this['annotationViews']['length']:_0x47f030-0x1;}['_toggleDialog'](){const _0x34a648=this['editor'],_0x515915=_0x34a648['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x34a648['locale'],this['annotationViews'])),'commentsArchive'===_0x515915['id']?_0x515915['hide']():_0x515915['show']({'id':'commentsArchive','title':Et(_0x34a648['locale'],'COMMENTS_ARCHIVE'),'icon':_0x36c51a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5207c7['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x111213,_0x53db51=!0x1){const _0x237277=this['editor']['locale'],_0x40fb9e=this['editor']['plugins']['get']('Dialog'),_0x59500b=new _0x111213(_0x237277);return _0x59500b['bind']('isEnabled')['to'](this,'isEnabled'),_0x59500b['bind']('isOn')['to'](_0x40fb9e,'id',_0x5d1929=>'commentsArchive'===_0x5d1929),_0x59500b['set']({'label':Et(_0x237277,'COMMENTS_ARCHIVE'),'icon':_0x36c51a,'isToggleable':!0x0}),_0x53db51&&(_0x59500b['tooltip']=!0x0),this['listenTo'](_0x59500b,'execute',()=>this['_toggleDialog']()),_0x59500b;}['_hideDialogOnAnnotationEscape']=_0x3ba7fd=>{const _0x446312=_0x3ba7fd['source'];if(!this['annotationViews']['has'](_0x446312['view']))return;const _0x35123b=this['editor']['plugins']['get']('Dialog');_0x35123b['isOpen']&&'commentsArchive'===_0x35123b['id']&&(_0x35123b['hide'](),_0x3ba7fd['stop']());};},Bi=class extends _0x3d6b36{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};
|