@ckeditor/ckeditor5-comments 46.0.0-alpha.7 → 46.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x2de22a={}){function _0x2f9bec(_0x58bb15){return _0x58bb15['map'](_0x3a3e41=>String['fromCharCode'](_0x3a3e41))['join']('');}(_0x2de22a=Object['assign']({},_0x2de22a))['plugins']||(_0x2de22a['plugins']=Qt['defaultPlugins']),super(_0x2de22a),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2f9bec([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2f9bec([0x76,0x69,0x65,0x77])][_0x2f9bec([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2f9bec([0x61,0x75,0x74,0x6f]),this[_0x2f9bec([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2f9bec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2f9bec([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2f9bec([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2f9bec([0x6f,0x6b])});}['create'](){const _0x6c1cc0=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x6c1cc0))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x131354=>{const _0x2ecd4c=this['model']['document']['getRoot'](),_0x3d5c1e=_0x2ecd4c&&_0x2ecd4c['getChild'](_0x2ecd4c['childCount']-0x1);_0x131354['setSelection'](_0x3d5c1e,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x182847=this['editing']['view'],_0x2add2f=_0x182847['document']['getRoot'](),_0x325280=_0x2add2f['getChild'](0x0);_0x2add2f['childCount']>0x1||!_0x325280||'p'!=_0x325280['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x182847,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x325280['placeholder']=this['placeholder']),St({'view':_0x182847,'element':_0x325280,'keepOnFocus':!0x0}),this['placeholderElement']=_0x325280);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x14f2a0,_0x203c2b={}){super(_0x14f2a0),this['editor']=null,this['_editorConfig']=_0x203c2b,this['set']('value',_0x203c2b['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x14f2a0,'Reply...')),this['set']('submitLabel',N(_0x14f2a0,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1c22e6(),this['focusCycler']=new _0x11c5b9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x218f38,_0x2bb8c1)=>{this['cancelButtonView']['fire']('execute'),_0x2bb8c1();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4ec173,_0x41b85b)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x41b85b());}),this['on']('submit',(_0x1156a3,_0x454890)=>{_0x454890['length']>0xfde8?(alert(N(_0x14f2a0,'TOO_LONG_COMMENT_ALERT',[_0x454890['length'],0xfde8])),_0x1156a3['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x59b19a=this['editor'];this['element']['insertBefore'](_0x59b19a['ui']['element'],this['element']['firstChild']),_0x59b19a['model']['document']['on']('change',()=>this['value']=_0x59b19a['getData']()),_0x59b19a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x59b19a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1a241d){-0x1===_0x1a241d?(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:_0x576a1b}=this,_0x5dc17d=new _0x488b97(_0x576a1b);return _0x5dc17d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5dc17d['withText']=!0x0,_0x5dc17d['bind']('label')['to'](this,'submitLabel'),_0x5dc17d['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5dc17d['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x134fc6,_0x16d2b9)=>!_0x16d2b9&&!!_0x134fc6['trim']()),_0x5dc17d;}['_createCancelButton'](){const {locale:_0x1d5a90}=this,_0x13cc08=new _0x488b97(_0x1d5a90);return _0x13cc08['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x13cc08['label']=N(_0x1d5a90,'Cancel'),_0x13cc08['withText']=!0x0,_0x13cc08['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x13cc08;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x13fd16=>{this['focusTracker']['add'](_0x13fd16['element']);}),this['focusables']['on']('change',(_0x27147b,_0x3ccb6e)=>{for(const _0xe6c678 of Array['from'](_0x3ccb6e['added'])['reverse']())this['focusTracker']['add'](_0xe6c678['element']);});}}class ie extends kt{constructor(_0x274e91,_0x317226,_0x4f3ee6){super(_0x274e91),this['commentInputView']=new es(_0x274e91,_0x4f3ee6),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1b34ac,_0x1ebf33)=>_0x1b34ac||!!_0x1ebf33),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 _0xf34004(_0x274e91,_0x317226),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'](_0xbcf19b){this['commentInputView']['focus'](_0xbcf19b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x21a374,_0xc46806)=>{const {submitButtonView:_0xdcaf50,cancelButtonView:_0x14a6af,editor:_0xf695f2}=this['commentInputView'];[_0xdcaf50['element'],_0x14a6af['element'],_0xf695f2?_0xf695f2['editing']['view']['getDomRoot']():null]['filter'](_0x346100=>_0x346100)['some'](_0x243a4b=>_0x243a4b['contains'](_0xc46806['target']))||(this['focus'](),_0xc46806['preventDefault']());});}}class os extends kt{constructor(_0x2132f2){super(_0x2132f2);const _0x2758e7=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2758e7['to']('count',_0x39db51=>N(_0x2132f2,'NUMBER_OF_COMMENTS',_0x39db51))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xfa4c23,_0x477d76,_0x289636){super(_0xfa4c23);const _0x23ceb3=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x477d76['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x477d76,this['_config']=_0x289636,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1c22e6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11c5b9({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x436189=>this['commentViews']['map'](_0x2e7b3c=>_0x2e7b3c['element'])['includes'](_0x436189['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0xfa4c23),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x218fda=>_0x218fda-this['_config']['maxCommentsWhenCollapsed']);for(const _0xc9f6a5 of _0x477d76['comments'])this['_handleNewCommentModel'](_0xc9f6a5);this['_handleInfoComment'](),this['listenTo'](_0x477d76['comments'],'add',(_0x2b350c,_0x2989f9)=>{const _0x1abff3=this['_calculatePosition'](_0x2989f9);this['length']++,this['_handleNewCommentModel'](_0x2989f9,_0x1abff3),this['refreshVisibleViews']();}),this['listenTo'](_0x477d76['comments'],'remove',(_0x30ebdf,_0x592bec)=>{this['length']--,this['_handleRemoveCommentModel'](_0x592bec),this['refreshVisibleViews']();}),this['listenTo'](_0x477d76,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x477d76,'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',_0x23ceb3['if']('length','ck-hidden',_0x3742d2=>!_0x3742d2)],'aria-label':N(_0xfa4c23,'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'](_0x35fe6c){-0x1===_0x35fe6c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x51a7ed of this['commentViews'])_0x51a7ed['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x588c61,_0x150c5d){const _0x1682a0=new this['_config']['CommentView'](this['locale'],_0x588c61,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1682a0['viewUid']=_0x588c61['id'],_0x1682a0['delegate']('removeComment')['to'](this),_0x1682a0['delegate']('updateComment')['to'](this),_0x1682a0['delegate']('resolveCommentThread')['to'](this),_0x1682a0['delegate']('editorReady')['to'](this),_0x1682a0['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1682a0,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1682a0,_0x150c5d);}['_calculatePosition'](_0x2a000d){const _0x54c6d3=this['_model']['_findOptimalIndex'](_0x2a000d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2a000d['authoredAt']?_0x54c6d3-0x1:_0x54c6d3:_0x54c6d3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3a51e5={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3a51e5,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3a51e5));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3478b4){const _0x575450=this['commentViews']['remove'](_0x3478b4['id']);this['stopListening'](_0x575450),_0x575450['isEditMode']&&this['_updateHasDirtyComment'](),_0x575450['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2ea892=>_0x2ea892['isEditMode']);}['_rearrangeCollapse'](){const _0x4126a5=function(_0x6aacbb){const _0x5d05ab=new _0x1392af();for(const _0x33e7e7 of _0x6aacbb)_0x5d05ab['add'](_0x33e7e7);return _0x5d05ab;}(this['commentViews']),_0x395b5c=this['_collapsedCommentsView']['count'];for(let _0x16adab=0x1;_0x16adab<=_0x395b5c;_0x16adab++)_0x4126a5['remove'](0x1);for(const _0x116496 of _0x4126a5)_0x116496['collapse']();_0x395b5c>0x0&&_0x4126a5['add'](this['_collapsedCommentsView'],0x1),rs(_0x34b6c6(Array['from'](this['visibleViews']),Array['from'](_0x4126a5)),this['visibleViews'],_0x4126a5);}['_rearrangeExpand'](){rs(_0x34b6c6(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x39a231 of this['visibleViews'])_0x39a231['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x31c4cb=>{this['focusTracker']['add'](_0x31c4cb['element']),this['keystrokes']['listenTo'](_0x31c4cb['element']);}),this['commentViews']['on']('change',(_0x31c025,_0x32d1f8)=>{for(const _0x266ccf of _0x32d1f8['removed'])this['focusTracker']['remove'](_0x266ccf['element']),this['keystrokes']['stopListening'](_0x266ccf['element']);for(const _0x4a62be of Array['from'](_0x32d1f8['added'])['reverse']())this['focusTracker']['add'](_0x4a62be['element']),this['keystrokes']['listenTo'](_0x4a62be['element']);});}}function rs(_0x2d5feb,_0x3d532c,_0xba833e){let _0x13b6ea=0x0;for(const _0x269f3e of _0x2d5feb)switch(_0x269f3e){case'insert':_0x3d532c['add'](_0xba833e['get'](_0x13b6ea),_0x13b6ea),_0x13b6ea++;break;case'delete':_0x3d532c['remove'](_0x13b6ea);break;case'equal':_0x13b6ea++;}}class oe extends kt{constructor(_0x24aea5){super(_0x24aea5);const _0x442020=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x442020['to']('contextValue',_0x390118=>N(_0x24aea5,'THREAD_CONTEXT_LABEL',_0x390118)),'tabindex':-0x1},'children':[{'text':_0x442020['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xf0bcc8,_0x102f7a){super(_0xf0bcc8);const _0x811f01=this['bindTemplate'];this['_model']=_0x102f7a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1c22e6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11c5b9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xc2d6c1=>!!_0xc2d6c1),this['bind']('contextValue')['to'](this['_model'],'context',_0x353f72=>_0x353f72&&_0x353f72['value']?this['_trimContextValue'](_0x353f72['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x811f01['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 _0x498574=new _0x488b97(this['locale']);return _0x498574['label']=N(this['locale'],'Reopen'),_0x498574['tooltip']=N(this['locale'],'Reopen'),_0x498574['icon']=_0x45680a,_0x498574['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3b151d=>!_0x3b151d),_0x498574['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x268c8d,_0x1ec357)=>_0x268c8d&&_0x1ec357),_0x498574['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x498574;}['_trimContextValue'](_0x410181){if(_0x410181['length']<0x96)return _0x410181;const _0x18e64b=_0x410181['lastIndexOf']('\x20',0x93);return _0x410181['substring'](0x0,_0x18e64b>-0x1?_0x18e64b:0x93)+'...';}['_attachContextActions'](){const _0x1fe3ac=this['element']['querySelector']('.ck-context'),_0x119c75=_0x1fe3ac['querySelector']('.ck-context__value');this['listenTo'](_0x1fe3ac,'mouseenter',()=>{_0x119c75['offsetWidth']<_0x119c75['scrollWidth']&&_0x1fe3ac['classList']['add']('overlay');}),this['listenTo'](_0x1fe3ac,'mouseleave',()=>{_0x1fe3ac['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5e6fe7 of this['focusables'])this['focusTracker']['add'](_0x5e6fe7['element']),this['keystrokes']['listenTo'](_0x5e6fe7['element']);}['_createContextView'](){const _0x2b8b0d=new oe(this['locale']);return _0x2b8b0d['bind']('contextValue')['to'](this),_0x2b8b0d;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x337813,_0x454d0e,_0x5d6b4b,_0x24369d){super(_0x337813),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x454d0e,this['_localUser']=_0x5d6b4b,this['_config']=_0x24369d,this['commentThreadHeaderView']=new Xt(_0x337813,_0x454d0e),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x337813,N(_0x337813,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x337813,_0x454d0e,Object['assign']({'CommentView':this['_config']['CommentView']},_0x24369d)),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',(_0x2a3100,_0x4a882e)=>_0x2a3100||!!_0x4a882e),this['bind']('isUnlinked')['to'](_0x454d0e,'unlinkedAt',_0x460df8=>!!_0x460df8),this['bind']('ariaLabel')['to'](this,'length',_0x351ff2=>{const _0x5cf8aa=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x351ff2,_0x5cf8aa]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1c22e6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11c5b9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x50535c=>_0x50535c['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x4a1b38=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x309a66=_0x4a1b38['commentInputView'];return _0x4a1b38['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x309a66,'value',(_0x527e2a,_0x404d88,_0x19bea8,_0x184a2d,_0x4e2efa)=>!!_0x4e2efa||!!_0x184a2d&&_0x19bea8&&!_0x404d88||_0x527e2a&&_0x19bea8&&!_0x404d88),_0x309a66['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1d27f9,_0x42fe3a,_0x2ca962)=>{let _0x5f0a40;return _0x5f0a40=_0x2ca962&&_0x42fe3a?'Reply\x20to\x20reopen\x20discussion...':_0x1d27f9?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5f0a40);}),_0x309a66['bind']('submitLabel')['to'](this,'length',_0x5cfe1e=>N(this['locale'],_0x5cfe1e?'Reply':'Comment')),_0x309a66['on']('submit',(_0x12093c,_0x1543e9)=>{this['fire']('addComment',_0x1543e9),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x309a66['on']('cancel',()=>{this['focus']();}),_0x309a66['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x309a66['on']('cancel',_0x5b00e1=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5b00e1['stop']());}),this['on']('change:isActive',(_0x1cdf7c,_0x586c21,_0x26dc70)=>{_0x26dc70||this['length']||_0x309a66['value']||this['fire']('removeCommentThread');}),_0x4a1b38;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x279178(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1e8b5b,target:_0x45ebb8,type:_0x582f03,isVisible:_0x42d6a7=!0x0}){super(),this['view']=_0x1e8b5b,this['view']['element']||this['view']['render'](),this['_type']=_0x582f03,this['_target']=_0x45ebb8,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1392af([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x19cb51,_0xe83639)=>{this['view']['focusTracker']['add'](_0xe83639);}),this['focusableElements']['on']('remove',(_0xdd63c,_0x44f817)=>{this['view']['focusTracker']['remove'](_0x44f817);}),this['set']('isVisible',_0x42d6a7);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xb7b526=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0xb7b526),_0xb7b526;}get['targetRect'](){const _0x128b5e=this['target'];if(null===_0x128b5e)return null;if(_0x128b5e instanceof _0x81943)return _0x128b5e;const _0x3fb63b=_0x128b5e['filter'](_0x34c04d=>function(_0x393a03){const _0x51e1b3=_0x393a03['offsetParent'];if(_0x51e1b3)return!0x0;const _0x2db161=_0x393a03['getClientRects']()['item'](0x0);return!!_0x2db161;}(_0x34c04d));return 0x0===_0x3fb63b['length']?null:new _0x81943(_0x3fb63b[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x50bd7d){this['view']['isActive']=_0x50bd7d,this['view']['mainView']['isActive']=_0x50bd7d;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x320681){if(!(null===_0x320681||_0x320681 instanceof _0x81943||Array['isArray'](_0x320681)&&_0x320681['every'](_0x4fd82c=>fi(_0x4fd82c))))throw new _0x347fe4('annotation-invalid-target',null,{'target':_0x320681});}['_getNormalizedTarget'](){const _0x21cdb4='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x21cdb4)?[_0x21cdb4]:_0x21cdb4;}}function fi(_0x1e2ae7){return null!==_0x1e2ae7&&'object'==typeof _0x1e2ae7&&'nodeType'in _0x1e2ae7&&0x1===_0x1e2ae7['nodeType'];}class S extends _0x1392af{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x31a18d=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1c22e6(),this['_focusTracker']['on']('change:isFocused',(_0x266388,_0x53620c,_0xa5693b)=>{_0xa5693b||this['fire']('blur');});for(const _0xacf26e of _0x31a18d)this['add'](_0xacf26e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4d805a){if(this['has'](_0x4d805a))throw new _0x347fe4('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4d805a['innerView'],_0x4d805a),this['_viewToAnnotation']['set'](_0x4d805a['view'],_0x4d805a);for(const _0x167fe8 of _0x4d805a['focusableElements'])this['_focusTracker']['add'](_0x167fe8);this['listenTo'](_0x4d805a['focusableElements'],'add',(_0x33eded,_0x34b917)=>{this['_focusTracker']['add'](_0x34b917);}),this['listenTo'](_0x4d805a['focusableElements'],'remove',(_0x487690,_0x28972f)=>{this['_focusTracker']['remove'](_0x28972f);}),this['listenTo'](_0x4d805a['view']['focusTracker'],'change:isFocused',(_0x1dac85,_0x382ecc,_0x514f79)=>{_0x514f79&&this['fire']('focus',_0x4d805a);}),_0x4d805a['updateTargetRect']();const _0x4ce772=this['_getOrderInContent'](_0x4d805a['view']['targetRect']);return super['add'](_0x4d805a,_0x4ce772);}['remove'](_0x25d1b0){if(!this['has'](_0x25d1b0))throw new _0x347fe4('annotationcollection-not-existing-item',null);this['stopListening'](_0x25d1b0['view']['focusTracker']),this['stopListening'](_0x25d1b0['focusableElements']);for(const _0x13f4f8 of _0x25d1b0['focusableElements'])this['_focusTracker']['remove'](_0x13f4f8);return this['_viewToAnnotation']['delete'](_0x25d1b0['view']),this['_innerViewToAnnotation']['delete'](_0x25d1b0['innerView']),super['remove'](_0x25d1b0);}['getByInnerView'](_0xddd71){return this['_innerViewToAnnotation']['get'](_0xddd71);}['getByView'](_0x5de2e8){return this['_viewToAnnotation']['get'](_0x5de2e8);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x48400a of this)_0x48400a['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4fd751=Array['from'](this)['sort']((_0x1f8c9d,_0x38ddee)=>w(_0x1f8c9d['view']['targetRect'],_0x38ddee['view']['targetRect']));for(let _0x4d9b8b=_0x4fd751['length']-0x1;_0x4d9b8b>0x0;_0x4d9b8b--){const _0x3f8c64=_0x4fd751[_0x4d9b8b];_0x4d9b8b!==this['getIndex'](_0x3f8c64)&&(this['remove'](_0x3f8c64),this['add'](_0x3f8c64));}}['_getOrderInContent'](_0x4044fa){let _0x1de634=0x0;if(!_0x4044fa)return this['length'];for(const _0x24b596 of this){const _0x39a618=_0x24b596['view']['targetRect'];if(_0x39a618){if(w(_0x4044fa,_0x39a618)<0x0)return _0x1de634;_0x1de634++;}}return _0x1de634;}}function v({source:_0x202305,target:_0x6997a8,filter:_0x13a6ad}){for(const _0x1b2cd5 of _0x202305)_0x13a6ad(_0x1b2cd5)&&_0x6997a8['add'](_0x1b2cd5);_0x6997a8['listenTo'](_0x202305,'add',(_0x35f08d,_0x18016a)=>{_0x13a6ad(_0x18016a)&&_0x6997a8['add'](_0x18016a);}),_0x6997a8['listenTo'](_0x202305,'remove',(_0x1e4438,_0x3e86c4)=>{_0x6997a8['has'](_0x3e86c4)&&_0x6997a8['remove'](_0x3e86c4);});}function w(_0x4ca767,_0x2b8606){if(null===_0x4ca767&&null===_0x2b8606)return 0x0;if(null===_0x4ca767)return-0x1;if(null===_0x2b8606)return 0x1;const _0x944fa3=_0x4ca767['top']-_0x2b8606['top'];return 0x0==_0x944fa3?_0x4ca767['left']-_0x2b8606['left']:_0x944fa3;}class y extends _0x2ec86c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e0870){if(super(_0x3e0870),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3e0870 instanceof _0x556455){const _0x24afa5=_0x3e0870['locale'];_0x3e0870['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2c0d8c){this['collection']['add'](_0x2c0d8c);}['remove'](_0x357f07){this['collection']['remove'](_0x357f07),_0x357f07['destroy']();}['refreshVisibility'](){for(const _0x426fad of this['collection'])_0x426fad['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x229c83){return this['collection']['getByInnerView'](_0x229c83);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x417eee of this['collection'])_0x417eee['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2abbb1){this['fire']('_activateAnnotation',_0x2abbb1);}['createAnnotation'](_0x9967ba){return new T(_0x9967ba);}['createAnnotationView'](_0x4b08d3,_0xefcac8){return new E(_0x4b08d3,_0xefcac8);}['_addActiveAnnotation'](_0x30a535){const _0x64a034=new Set(this['activeAnnotations']);_0x64a034['add'](_0x30a535),this['activeAnnotations']=_0x64a034;}['_removeActiveAnnotation'](_0x570674){const _0x27f1e8=new Set(this['activeAnnotations']);_0x27f1e8['delete'](_0x570674),this['activeAnnotations']=_0x27f1e8;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3935a3=this['collection'],_0x43bf22=this['_visibleAnnotations'];function _0x416776(_0x4ecdbe){const _0x1cb80e=_0x4ecdbe['source'];_0x1cb80e['isVisible']&&!_0x43bf22['has'](_0x1cb80e)?_0x43bf22['add'](_0x1cb80e):!_0x1cb80e['isVisible']&&_0x43bf22['has'](_0x1cb80e)&&_0x43bf22['remove'](_0x1cb80e),_0x1cb80e['view']['focusTracker']['remove'](_0x1cb80e['view']['element']),_0x1cb80e['view']['focusTracker']['add'](_0x1cb80e['view']['element']);}this['listenTo'](_0x3935a3,'add',(_0x1f49ad,_0x56bd26)=>{_0x56bd26['isVisible']&&_0x43bf22['add'](_0x56bd26),this['listenTo'](_0x56bd26,'change:isVisible',_0x416776);}),this['listenTo'](_0x3935a3,'remove',(_0x1cda28,_0x196e37)=>{_0x43bf22['has'](_0x196e37)&&_0x43bf22['remove'](_0x196e37),this['stopListening'](_0x196e37,'change:isVisible',_0x416776);});}['_setupEnterAnnotationKeystroke'](){const _0x2d2d5c=_0x42c41c=>{_0x42c41c['on']('ready',()=>{_0x42c41c['keystrokes']['set'](_0x2a5449,(_0xc663b7,_0x1a2944)=>{const _0x9f8a1e=_0x41ec0b(this['activeAnnotations']['values']());_0x9f8a1e&&(_0x9f8a1e['view']['focus'](),_0x1a2944());});});};this['context']instanceof _0x556455?_0x2d2d5c(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2f1e19,_0x2709ee)=>{_0x2d2d5c(_0x2709ee);});}['_setupEscapeAnnotationHandling'](){const _0x599f6e=_0x4f0be8=>{const _0x3db382=_0x4f0be8['source'],_0x426147=[];let _0x45069f;if(Array['isArray'](_0x3db382['target'])){_0x45069f=_0x3db382['target'][0x0],this['context']instanceof _0x556455?_0x426147['push'](this['context']):this['context']['editors']&&_0x426147['push'](...this['context']['editors']);for(const _0x2e65ec of _0x426147)for(const _0x87b1b9 of _0x2e65ec['editing']['view']['domRoots']['values']())if(_0x87b1b9['contains'](_0x45069f))return void _0x2e65ec['editing']['view']['focus']();_0x45069f['focus']();}};this['listenTo'](this['collection'],'add',(_0x2b9421,_0x286cb6)=>{this['listenTo'](_0x286cb6,'escape',_0x599f6e,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3c9e3b,_0x181b78)=>{this['stopListening'](_0x181b78,'escape',_0x599f6e);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2ec86c{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x558200){super(_0x558200),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x52d1b3=this['context']['config'];_0x52d1b3['define']('comments.maxCommentsWhenCollapsed',0x2),_0x52d1b3['define']('comments.maxThreadTotalWeight',0x1f4),_0x52d1b3['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x52d1b3['define']('comments.CommentThreadView',vt),_0x52d1b3['define']('comments.CommentView',gt),_0x52d1b3['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x48f90a=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3a11b7,_0x5649cf)=>this['_addCommentThread'](_0x5649cf)),this['on']('submitCommentThread',(_0x54b49a,_0x49bb87)=>this['_submitCommentThread'](_0x49bb87)),this['on']('resolveCommentThread',(_0xac19a9,_0x43a9c0)=>this['_resolveCommentThread'](_0x43a9c0)),this['on']('resolveCommentThread',(_0xc0dbc0,_0xd34995)=>this['_updateActiveAnnotation'](_0xd34995),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1c257b,_0x579f89)=>this['_reopenCommentThread'](_0x579f89)),this['on']('reopenCommentThread',(_0x42a9e9,_0x2602f1)=>this['_updateActiveAnnotation'](_0x2602f1),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4df0d0,_0x230676)=>this['_removeCommentThread'](_0x230676)),this['on']('updateCommentThread',(_0x31a83d,_0x138c52)=>this['_updateCommentThread'](_0x138c52)),this['on']('updateCommentThread',(_0x59fb7e,_0x590d58)=>this['_updateActiveAnnotation'](_0x590d58),{'priority':'lowest'}),this['on']('addComment',(_0x3a7419,_0x26ff1b)=>this['_addComment'](_0x26ff1b)),this['on']('updateComment',(_0x4d47e1,_0x521270)=>this['_updateComment'](_0x521270)),this['on']('removeComment',(_0x2d2ae3,_0xa39d2e)=>this['_removeComment'](_0xa39d2e)),this['on']('addComment',(_0x3ddba0,{threadId:_0x50b741,isFromAdapter:_0x1f43a0})=>{if(_0x1f43a0)return;const _0x391f10=this['getCommentThread'](_0x50b741),_0x28254a=_0x391f10&&this['_threadToController']['get'](_0x391f10);_0x28254a&&_0x28254a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x48f90a,'change:activeAnnotations',(_0x2f89c3,_0x591383,_0xec6630)=>{const _0x52cd0c=Array['from'](_0xec6630)['map'](_0x83bfb6=>this['_viewToController']['get'](_0x83bfb6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x52cd0c?_0x52cd0c['model']:null;});}set['adapter'](_0x465d34){if(this['_adapter'])throw new _0x347fe4('commentsrepository-adapter-already-set');this['_adapter']=_0x465d34;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2dbcb6=Tt,threadId:_0x201e36=_0x3cd367(),comments:_0x4a66cb=[],unlinkedAt:_0x1cfeb6=null,resolvedAt:_0x5a33e7=null,resolvedBy:_0x19906a=null,target:_0x494be2=null,context:_0xe83ea=null,attributes:_0xf25c5f={},isResolvable:_0x52a318=!0x0,isSubmitted:_0x3eb23f=!0x1,isFromAdapter:_0x31190b=!0x1}={}){return this['fire'](bt('addCommentThread',_0x2dbcb6),{'channelId':_0x2dbcb6,'threadId':_0x201e36,'comments':_0x4a66cb,'unlinkedAt':_0x1cfeb6,'resolvedAt':_0x5a33e7,'resolvedBy':_0x19906a,'target':_0x494be2,'context':_0xe83ea,'attributes':_0xf25c5f,'isFromAdapter':_0x31190b,'isResolvable':_0x52a318,'isSubmitted':_0x3eb23f}),this['getCommentThread'](_0x201e36);}['openNewCommentThread']({channelId:_0x34b081=Tt,threadId:_0x4243f6=_0x3cd367(),target:_0x1a4948,context:_0x562924=null,isResolvable:_0x2899f0=!0x0}){if(this['_readOnlyChannels']['has'](_0x34b081)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1a4948)throw new _0x347fe4('commentsrepository-missing-target');const _0x3df66f=this['addCommentThread']({'channelId':_0x34b081,'threadId':_0x4243f6,'target':_0x1a4948,'context':_0x562924,'isResolvable':_0x2899f0});if(!_0x3df66f)return null;const _0x2a5b6d=this['_threadToController']['get'](_0x3df66f),_0xee221d=_0x2a5b6d['view']['commentThreadInputView']['commentInputView'],_0x426bd1=this['context']['plugins']['get'](y),_0x1e016e=_0x426bd1['getByInnerView'](_0x2a5b6d['view']);return _0x426bd1['activate'](_0x1e016e),_0xee221d['once']('editorReady',()=>_0xee221d['focus']()),_0x3df66f;}['hasCommentThread'](_0x4cd139){if('string'!=typeof _0x4cd139)throw new _0x347fe4('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4cd139);}['updateCommentThread']({channelId:_0x5a1221=Tt,threadId:_0x39c27a,context:_0x3ac4c8,unlinkedAt:_0x4fed13,attributes:_0x1214af,isFromAdapter:_0x12d763=!0x1}){return this['fire'](bt('updateCommentThread',_0x5a1221),{'channelId':_0x5a1221,'threadId':_0x39c27a,'context':_0x3ac4c8,'unlinkedAt':_0x4fed13,'attributes':_0x1214af,'isFromAdapter':_0x12d763}),this['getCommentThread'](_0x39c27a);}['getCommentThread'](_0x5492d9){if('string'!=typeof _0x5492d9)throw new _0x347fe4('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5492d9);}['fetchCommentThread']({channelId:_0x5964ee,threadId:_0x39baa4}={}){const _0x31b3ed=this['getCommentThread'](_0x39baa4);if(_0x31b3ed)return Promise['resolve'](_0x31b3ed);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x347fe4('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5964ee,'threadId':_0x39baa4})['then'](_0x358513=>this['hasCommentThread'](_0x39baa4)?this['getCommentThread'](_0x39baa4):_0x358513?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5964ee},_0x358513)):void 0x0)['catch'](_0x320fd2=>{throw console['error'](_0x320fd2),new _0x347fe4('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4b0119,skipNotAttached:_0xc443ad=!0x1,skipEmpty:_0x4c4573=!0x1,toJSON:_0x1f7f77=!0x1}={}){const _0x5869df=[];for(const _0x126885 of this['_threads']['values']())_0x4b0119&&_0x126885['channelId']!==_0x4b0119||_0xc443ad&&!_0x126885['isAttached']||_0x4c4573&&0x0===_0x126885['length']||_0x5869df['push'](_0x126885);return _0x1f7f77?_0x5869df['map'](_0x46674d=>_0x46674d['toJSON']()):_0x5869df;}['getAnnotationForCommentThread'](_0x3b7bf5){const _0x5ae1d6=this['_threadToController']['get'](_0x3b7bf5);if(!_0x5ae1d6)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x5ae1d6['view'])||null;}['getCommentThreadForAnnotation'](_0x38bef1){const _0x1ecfef=this['_viewToController']['get'](_0x38bef1['innerView']);return _0x1ecfef?_0x1ecfef['model']:null;}['setActiveCommentThread'](_0x3ac2b4){const _0x360330=this['context']['plugins']['get'](y);if(!_0x3ac2b4)return void(this['activeCommentThread']&&_0x360330['deactivateAll']());const _0x4694cb=this['getCommentThread'](_0x3ac2b4);if(!_0x4694cb)throw new _0x347fe4('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3ac2b4});if(!this['_threadToController']['has'](_0x4694cb))throw new _0x347fe4('commentsrepository-active-not-attached',null,{'threadId':_0x3ac2b4});const _0x3d7e8d=_0x360330['getByInnerView'](this['_threadToController']['get'](_0x4694cb)['view']);_0x360330['activate'](_0x3d7e8d);}['switchReadOnly'](_0x3da386,_0x4467dd){_0x3da386?this['_readOnlyChannels']['add'](_0x4467dd):this['_readOnlyChannels']['delete'](_0x4467dd),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5f008f){return this['_readOnlyChannels']['has'](_0x5f008f)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1cd6c6,_0x2b8c5b){return new yt(_0x1cd6c6,_0x2b8c5b);}['setPermissions'](_0x4fa654,_0x372a53=Tt){this['_permissions']['set'](_0x372a53,_0x4fa654),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3073af=Tt){return this['_permissions']['has'](_0x3073af)?this['_permissions']['get'](_0x3073af):_t;}['_addCommentThread']({channelId:_0x2986df,threadId:_0x3a8893,comments:_0x14b24b,unlinkedAt:_0x3743e4,resolvedAt:_0x4ea3c5,resolvedBy:_0x7bff0c,target:_0x490171,context:_0xe61c8d,attributes:_0x32d439,isFromAdapter:_0x2770ec,isResolvable:_0x144bef,isSubmitted:_0x4f1d28}){if('string'!=typeof _0x3a8893)throw new _0x347fe4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3a8893});if(this['hasCommentThread'](_0x3a8893))throw new _0x347fe4('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3a8893});const _0x119ac7=new pi(this,{'channelId':_0x2986df,'id':_0x3a8893,'context':_0xe61c8d,'attributes':_0x32d439,'unlinkedAt':_0x3743e4,'resolvedAt':_0x4ea3c5,'resolvedBy':_0x7bff0c?this['context']['plugins']['get'](it)['getUser'](_0x7bff0c):null,'isResolvable':_0x144bef,'isSubmitted':_0x4f1d28||_0x2770ec});this['_threads']['set'](_0x3a8893,_0x119ac7);for(const _0x2ff80f of _0x14b24b)_0x119ac7['_add'](this['_createNewComment']({'threadId':_0x3a8893,..._0x2ff80f}));return _0x490171&&_0x119ac7['attachTo'](_0x490171),_0x2770ec||!_0x119ac7['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2986df,'threadId':_0x3a8893});}['_submitCommentThread']({channelId:_0x28ab22,threadId:_0x19bf35}){if(!this['hasCommentThread'](_0x19bf35))throw new _0x347fe4('commentsrepository-missing-comment-thread',this);const _0x55bf65=this['getCommentThread'](_0x19bf35);if(_0x55bf65['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4f61ff,comments:_0x13e132,resolvedAt:_0x23a226,resolvedBy:_0x206d9b,context:_0x48d120,attributes:_0x34dc95}=_0x55bf65,_0x4f993f=this['context']['plugins']['get']('PendingActions'),_0x57b47f=_0x4f993f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x28ab22,'threadId':_0x4f61ff,'comments':_0x13e132['map'](_0x25b090=>_0x25b090['toJSON']()),'resolvedAt':_0x23a226,'resolvedBy':_0x206d9b?_0x206d9b['id']:_0x206d9b,'context':_0x48d120,'attributes':_0x34dc95})['then'](({comments:_0x22b9c2})=>{_0x4f993f['remove'](_0x57b47f);for(const _0x28020d of _0x22b9c2)this['_updateComment']({'channelId':_0x28ab22,'threadId':_0x19bf35,'commentId':_0x28020d['commentId'],'createdAt':_0x28020d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x34aa11=>{throw console['error'](_0x34aa11),new _0x347fe4('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x3ac31b,target:_0x266f7f}){const _0x543e31=this['getCommentThread'](_0x3ac31b);if(!_0x543e31)throw new _0x347fe4('commentsrepository-attach-missing-comment-thread',this);const _0x5e732c=this['context']['plugins']['get']('PendingActions'),_0x4c636e=this['context']['plugins']['get'](y),_0x1d8648=this['_createCommentThreadView'](_0x543e31),_0x2b6ad2=new yt(_0x543e31,_0x1d8648);let _0x1d0f9e=null;_0x1d8648['on']('change:isDirty',(_0x3a6ea3,_0x322219,_0xeee0af)=>{_0xeee0af?_0x1d0f9e=_0x5e732c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1d0f9e&&(_0x5e732c['remove'](_0x1d0f9e),_0x1d0f9e=null);}),this['_threadToController']['set'](_0x543e31,_0x2b6ad2),this['_viewToController']['set'](_0x1d8648,_0x2b6ad2);const _0x943f1e=new E(this['context']['locale'],_0x1d8648);_0x943f1e['bind']('length')['to'](_0x1d8648),_0x943f1e['bind']('isDirty')['to'](_0x1d8648,'isDirty',_0x1d8648,'length',(_0x7a67de,_0x2f7860)=>_0x7a67de||!_0x2f7860),_0x943f1e['bind']('isActive')['to'](_0x1d8648),_0x943f1e['type']='comment';const _0x114814=new T({'view':_0x943f1e,'target':_0x266f7f,'type':'comment','isVisible':!_0x543e31['archivedAt']});return _0x1d8648['on']('escape',()=>{_0x114814['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1d8648,_0x114814),_0x4c636e['add'](_0x114814),_0x114814;}['_bindAnnotationToEditors'](_0x559742,_0x1bfc49){this['listenTo'](_0x559742,'editorReady',(_0x496ccd,_0x4028ed)=>{const _0x560b88=_0x4028ed['ui']['view']['body']['bodyCollectionContainer'];_0x1bfc49['focusableElements']['add'](_0x560b88),this['context']instanceof _0x556455&&this['context']['ui']['focusTracker']['add'](_0x560b88);},{'priority':'highest'}),this['listenTo'](_0x559742,'editorDestroyed',(_0xfaec91,_0x1b9d00)=>{const _0x5d75f0=_0x1b9d00['ui']['view']['body']['bodyCollectionContainer'];_0x1bfc49['focusableElements']['has'](_0x5d75f0)&&_0x1bfc49['focusableElements']['remove'](_0x5d75f0),this['context']instanceof _0x556455&&this['context']['ui']['focusTracker']['remove'](_0x5d75f0);});}['_unbindEditors'](_0x782dc5){this['stopListening'](_0x782dc5,'editorReady'),this['stopListening'](_0x782dc5,'editorDestroyed');}['_createCommentThreadView'](_0x30dbdb){const _0x552448=this['context']['plugins']['get'](it),{config:_0x555b90,locale:_0x24108d}=this['context'],_0xe4da57=lt(_0x555b90['get']('locale'),_0x24108d);return new(0x0,(_0x555b90['get']('comments'))['CommentThreadView'])(_0x24108d,_0x30dbdb,_0x552448['me'],{'editorConfig':{..._0x555b90['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x555b90['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x555b90['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x555b90['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x555b90['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xe4da57,'CommentView':_0x555b90['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x36bc59,channelId:_0x170578,resolvedAt:_0x3e7bdb,resolvedBy:_0x2b58d1,isFromAdapter:_0x1bcd63}){if(!this['hasCommentThread'](_0x36bc59))throw new _0x347fe4('commentsrepository-missing-comment-thread',null,{'threadId':_0x36bc59});const _0x20ca44=this['getCommentThread'](_0x36bc59);if(_0x20ca44['isResolved'])throw new _0x347fe4('commentsrepository-resolved-comment-thread',null,{'threadId':_0x36bc59});const _0x3664af=this['context']['plugins']['get'](it);if(_0x20ca44['resolvedBy']=_0x3664af['getUser'](_0x2b58d1),_0x20ca44['resolvedAt']=_0x3e7bdb,_0x1bcd63||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5594b9=this['context']['plugins']['get']('PendingActions'),_0x3c92f2=_0x5594b9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x170578,'threadId':_0x36bc59})['then'](({resolvedAt:_0x1efc8,resolvedBy:_0x37775b})=>{_0x5594b9['remove'](_0x3c92f2),_0x20ca44['resolvedBy']['id']!==_0x37775b&&(_0x20ca44['resolvedBy']=_0x3664af['getUser'](_0x37775b)),_0x20ca44['resolvedAt']=_0x1efc8;})['catch'](_0x1b9a4b=>{throw console['error'](_0x1b9a4b),new _0x347fe4('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x171e2a,channelId:_0x1801d0,isFromAdapter:_0x3826c0}){if(!this['hasCommentThread'](_0x171e2a))throw new _0x347fe4('commentsrepository-missing-comment-thread',null,{'threadId':_0x171e2a});const _0x14e249=this['getCommentThread'](_0x171e2a);if(!_0x14e249['isResolved'])throw new _0x347fe4('commentsrepository-reopen-comment-thread',null,{'threadId':_0x171e2a});if(_0x14e249['resolvedBy']=null,_0x14e249['resolvedAt']=null,_0x3826c0||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x33a297=this['context']['plugins']['get']('PendingActions'),_0x39224c=_0x33a297['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1801d0,'threadId':_0x171e2a})['then'](()=>_0x33a297['remove'](_0x39224c))['catch'](_0x33d58d=>{throw console['error'](_0x33d58d),new _0x347fe4('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x41288a,isFromAdapter:_0x374e72}){const _0x543be9=this['getCommentThread'](_0x41288a);if(!_0x543be9)throw new _0x347fe4('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x41288a),this['_threads']['delete'](_0x41288a),!_0x543be9['isSubmitted']||_0x374e72||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3198d5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4717a1}=_0x543be9,_0x3ddbca=_0x3198d5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4717a1,'threadId':_0x41288a})['then'](()=>_0x3198d5['remove'](_0x3ddbca))['catch'](_0x2e8c03=>{throw console['error'](_0x2e8c03),new _0x347fe4('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1f2415,unlinkedAt:_0x111be3,context:_0x523e8b,attributes:_0x1332af,isFromAdapter:_0x2dd690}){if('string'!=typeof _0x1f2415)throw new _0x347fe4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1f2415});if(!this['hasCommentThread'](_0x1f2415))throw new _0x347fe4('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f2415});const _0x2d39ba=this['getCommentThread'](_0x1f2415);let _0x27a245=!0x1;if(void 0x0!==_0x523e8b&&_0x2d39ba['context']!==_0x523e8b&&(_0x2d39ba['context']=_0x523e8b,_0x27a245=!0x0),void 0x0!==_0x111be3&&_0x2d39ba['unlinkedAt']!==_0x111be3&&(_0x2d39ba['unlinkedAt']=_0x111be3,_0x27a245=!0x0),_0x1332af&&!wt(_0x1332af,_0x2d39ba['attributes'])&&(_0x2d39ba['attributes']=_0x1332af,_0x27a245=!0x0),!_0x27a245)return Promise['resolve']();if(!_0x2d39ba['isSubmitted']||_0x2dd690||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x94d0f2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x535f1d}=_0x2d39ba,_0x346320=_0x94d0f2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x535f1d,'threadId':_0x1f2415,'context':_0x523e8b,'unlinkedAt':_0x111be3,'attributes':_0x1332af})['then'](()=>_0x94d0f2['remove'](_0x346320))['catch'](_0x35d403=>{throw console['error'](_0x35d403),new _0x347fe4('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x463bde){const _0xd98e4c=this['context']['plugins']['get'](y),_0x5e664a=this['getCommentThread'](_0x463bde);if(_0x5e664a['_isAttached']=!0x1,this['_threadToController']['has'](_0x5e664a)){const _0xa198c5=this['_threadToController']['get'](_0x5e664a),_0x4bee3f=_0xa198c5['view'],_0x5acef2=_0xd98e4c['getByInnerView'](_0x4bee3f);this['_threadToController']['delete'](_0x5e664a),this['_viewToController']['delete'](_0x4bee3f),_0x5acef2&&_0xd98e4c['remove'](_0x5acef2),_0xa198c5['destroy'](),_0x4bee3f['destroy']()['then'](()=>{this['_unbindEditors'](_0x4bee3f);});}}['_updateActiveAnnotation']({threadId:_0x6e7794,resolvedAt:_0x3a13c3,unlinkedAt:_0x50f405}){const _0x2fe86c=!!_0x3a13c3,_0x31d0f4=this['context']['plugins']['get'](y),_0x2e970b=this['getCommentThread'](_0x6e7794);if(this['_threadToController']['has'](_0x2e970b)){const _0x54fc3a=this['_threadToController']['get'](_0x2e970b)['view'],_0x40faca=_0x31d0f4['getByInnerView'](_0x54fc3a);_0x40faca&&(_0x2fe86c&&_0x31d0f4['_removeActiveAnnotation'](_0x40faca),_0x50f405?_0x40faca['isVisible']=!0x1:_0x40faca['refreshVisibility']());}}['_getExternalAuthor'](_0x3dc60d){const _0x4044ec=this['context']['plugins']['get'](it),_0x2db773=pt('external:'+_0x3dc60d),_0x4fdd10=_0x4044ec['getUser'](_0x2db773);return _0x4fdd10||_0x4044ec['addUser']({'id':_0x2db773,'name':_0x3dc60d});}['_createNewComment']({threadId:_0x2f13cb,commentId:_0x5ee66f=_0x3cd367(),content:_0x5c4378,authorId:_0x31f81e,createdAt:_0x242e92,attributes:_0x5d2cd7}){if('string'!=typeof _0x5ee66f)throw new _0x347fe4('commentsrepository-invalid-commentid');if('string'!=typeof _0x31f81e)throw new _0x347fe4('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5c4378||!_0x5c4378['trim']())throw new _0x347fe4('commentsrepository-invalid-comment-content');const _0x3c4a33=this['context']['plugins']['get'](it)['getUser'](_0x31f81e);if(!_0x3c4a33)throw new _0x347fe4('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x31f81e});let _0xe12839=null,_0xa9d85a=_0x242e92;return _0x5d2cd7?.['@external']&&(_0xe12839=this['_getExternalAuthor'](_0x5d2cd7['@external']['authorName']),_0xa9d85a=new Date(_0x5d2cd7['@external']['createdAt'])),new wi(this,{'threadId':_0x2f13cb,'id':_0x5ee66f,'author':_0xe12839||_0x3c4a33,'creator':_0x3c4a33,'content':_0x5c4378,'createdAt':_0x242e92,'authoredAt':_0xa9d85a,'attributes':_0x5d2cd7});}['_addComment'](_0x46baec){let {threadId:_0x23bf78,content:_0x5ef8b0,attributes:_0x44fcef,isFromAdapter:_0x5cd045}=_0x46baec;const _0x1f4426=this['getCommentThread'](_0x46baec['threadId']);if(!_0x1f4426)throw new _0x347fe4('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x19d6e0=this['_createNewComment'](_0x46baec),{id:_0x276f53}=_0x19d6e0;if(_0x1f4426['_add'](_0x19d6e0),_0x5cd045||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1f4426['isSubmitted'])return Promise['resolve']();const _0xe5cac=this['context']['plugins']['get']('PendingActions'),{channelId:_0x229d23}=_0x1f4426,_0x823c24=_0xe5cac['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x44fcef||(_0x44fcef={}),this['adapter']['addComment']({'channelId':_0x229d23,'threadId':_0x23bf78,'commentId':_0x276f53,'content':_0x5ef8b0,'attributes':_0x44fcef})['then'](_0x4c4d81=>{_0xe5cac['remove'](_0x823c24),_0x4c4d81&&this['_updateComment']({'channelId':_0x229d23,'threadId':_0x23bf78,'commentId':_0x276f53,'createdAt':_0x4c4d81['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x188b64=>{throw console['error'](_0x188b64),new _0x347fe4('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x352a09,commentId:_0x165c35,content:_0xe4e82a,createdAt:_0xe2c5d7,attributes:_0x910b,isFromAdapter:_0x116c31}){if(void 0x0!==_0xe4e82a&&('string'!=typeof _0xe4e82a||!_0xe4e82a['trim']()['length']))throw new _0x347fe4('commentsrepository-update-comment-invalid-content');const _0x245814=this['getCommentThread'](_0x352a09),_0x5f0341=_0x245814['getComment'](_0x165c35);if(!_0x5f0341)throw new _0x347fe4('commentsrepository-update-missing-comment',this);let _0x6c591b=!0x1;if(_0xe4e82a&&_0xe4e82a!==_0x5f0341['content']&&(_0x5f0341['isEditable']||_0x116c31)&&(_0x5f0341['content']=_0xe4e82a,_0x6c591b=!0x0),_0xe2c5d7&&_0xe2c5d7!==_0x5f0341['createdAt']&&(_0x5f0341['createdAt']=_0xe2c5d7,_0x5f0341['attributes']&&_0x5f0341['attributes']['@external']||(_0x5f0341['authoredAt']=_0xe2c5d7),_0x6c591b=!0x0),_0x910b&&!wt(_0x910b,_0x5f0341['attributes'])&&(_0x5f0341['attributes']=_0x910b,_0x6c591b=!0x0),!_0x6c591b)return Promise['resolve']();if(_0x245814['fire']('commentUpdated'),_0x116c31||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x48798b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4914ef}=this['getCommentThread'](_0x5f0341['threadId']),_0x4177ab=_0x48798b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4914ef,'threadId':_0x352a09,'commentId':_0x165c35,'content':_0xe4e82a,'attributes':_0x910b})['then'](()=>_0x48798b['remove'](_0x4177ab))['catch'](_0x3c1b14=>{throw console['error'](_0x3c1b14),new _0x347fe4('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x57bead,commentId:_0x5d1629,isFromAdapter:_0x4bccd8}){const _0x4d579b=this['getCommentThread'](_0x57bead),_0x5aed7f=_0x4d579b['getComment'](_0x5d1629);if(!_0x5aed7f)throw new _0x347fe4('commentsrepository-remove-missing-comment',this);if(_0x4d579b['_remove'](_0x5aed7f),_0x4bccd8||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3bc12e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2658b3}=_0x4d579b,_0x31e037=_0x3bc12e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2658b3,'threadId':_0x57bead,'commentId':_0x5d1629})['then'](()=>_0x3bc12e['remove'](_0x31e037))['catch'](_0x22243e=>{throw console['error'](_0x22243e),new _0x347fe4('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x279178(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1b9113,_0x9e9e9c){super();const _0x1534a0=_0x1b9113['context']['plugins']['get'](it)['me'],_0x47a0f7=_0x1b9113['getCommentThread'](_0x9e9e9c['threadId']),_0x4257ea=0x0===_0x47a0f7['comments']['length'],_0x18d549=_0x1534a0===_0x9e9e9c['author'];this['id']=_0x9e9e9c['id'],this['threadId']=_0x9e9e9c['threadId'],this['author']=_0x9e9e9c['author'],this['creator']=_0x9e9e9c['creator'],this['isExternal']=Boolean(_0x9e9e9c['attributes']&&_0x9e9e9c['attributes']['@external']),this['set']('content',_0x9e9e9c['content']),this['createdAt']=_0x9e9e9c['createdAt']||new Date(),this['set']('authoredAt',_0x9e9e9c['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x47a0f7,'resolvedAt'),this['set']('attributes',_0x9e9e9c['attributes']||{}),this['bind']('isEditable')['to'](_0x1b9113,'_permissions',()=>{const _0x1cb71b=_0x1b9113['getPermissions'](_0x47a0f7['channelId'])['write'],_0x1c5432=_0x1b9113['getPermissions'](_0x47a0f7['channelId'])['modifyAll'];return _0x18d549&&_0x1cb71b||!_0x18d549&&_0x1c5432;}),this['bind']('isRemovable')['to'](_0x47a0f7,'isRemovable',_0x1b9113,'_permissions',_0xe17aac=>{const _0x427062=_0x1b9113['getPermissions'](_0x47a0f7['channelId'])['write'],_0x3b7ac1=_0x1b9113['getPermissions'](_0x47a0f7['channelId'])['modifyAll'];return _0x18d549&&_0x427062||_0xe17aac&&_0x4257ea||!_0x18d549&&_0x3b7ac1&&!_0x4257ea;}),this['bind']('isReadOnly')['to'](_0x47a0f7,'isReadOnly'),this['_repository']=_0x1b9113;}get['weight'](){return Math['max'](function(_0x4b4e1d){const _0x5372e9=document['createElement']('div');return _0x5372e9['innerHTML']=_0x4b4e1d,_0x5372e9['textContent']['length'];}(this['content']),0xc8);}['update'](_0x162f3a){const {threadId:_0x5ca670,id:_0x1f2ce7}=this;if(!this['_repository']['hasCommentThread'](_0x5ca670))throw new _0x347fe4('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5dcb93}=this['_repository']['getCommentThread'](_0x5ca670);this['_repository']['fire'](bt('updateComment',_0x5dcb93,_0x5ca670),{'channelId':_0x5dcb93,'threadId':_0x5ca670,'commentId':_0x1f2ce7,..._0x162f3a});}['setAttribute'](_0x4e7ce5,_0x331f61){const _0x15219e=It(this['attributes']);At(_0x15219e,_0x4e7ce5,_0x331f61),this['update']({'attributes':_0x15219e});}['removeAttribute'](_0x6760b3){const _0x40acdf=It(this['attributes']);Ct(_0x40acdf,_0x6760b3),this['update']({'attributes':_0x40acdf});}['remove'](_0x5b812c={}){if(!_0x5b812c['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2a28b9,id:_0x522cde}=this;if(!this['_repository']['hasCommentThread'](_0x2a28b9))throw new _0x347fe4('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x287593}=this['_repository']['getCommentThread'](_0x2a28b9);this['_repository']['fire'](bt('removeComment',_0x287593,_0x2a28b9),{'channelId':_0x287593,'threadId':_0x2a28b9,'commentId':_0x522cde,..._0x5b812c});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x4d650c,..._0x36dbd6){for(const _0xcaaf80 of _0x36dbd6)void 0x0!==_0xcaaf80&&(_0x4d650c+=':'+String(_0xcaaf80));return _0x4d650c;}class rt extends _0x557c6a{constructor(_0x23fc3d){super(_0x23fc3d),this['set']('hasContent',!0x1);}['refresh'](){const _0x4dcab6=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3f4356 of _0x4dcab6['getRanges']())if(this['_hasContent'](_0x3f4356))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x18e124=_0x3cd367(),ranges:_0x56099d,comment:_0x4f33e1}={}){const _0x136a18=this['editor']['model'],_0x548888=_0x56099d??Array['from'](_0x136a18['document']['selection']['getRanges']()),_0x24e982=[];for(const _0x24dcc3 of _0x548888)this['_hasContent'](_0x24dcc3)&&_0x24e982['push'](this['_trimToContent'](_0x24dcc3));if(!_0x24e982['length'])throw new _0x347fe4('addcommentthreadcommand-incorrect-ranges',null);_0x4f33e1&&this['_createCommentThread'](_0x18e124,_0x4f33e1),this['_createMarkersFromRanges'](_0x18e124,_0x24e982,!!_0x4f33e1);}['_createMarkersFromRanges'](_0x1437d1,_0xbbb4f1,_0x2b029e){this['editor']['model']['change'](_0x47b708=>{for(const _0x363870 of _0xbbb4f1){const _0x65dc7c=_0x3cd367()['substr'](0x1,0x5),_0x54ef62='comment:'+_0x1437d1+':'+_0x65dc7c;_0x47b708['addMarker'](_0x54ef62,{'range':_0x363870,'usingOperation':_0x2b029e,'affectsData':_0x2b029e});}});}['_createCommentThread'](_0x3cfb03,_0x122bd1){const _0x327c9b=this['editor']['plugins']['get']('CommentsRepository'),_0x154f67=this['editor']['config']['get']('collaboration.channelId'),_0x598561=this['editor']['plugins']['get']('Users')['me'];if(!_0x598561)throw new _0x347fe4('addcommentthreadcommand-user-not-found',null);_0x327c9b['addCommentThread']({'threadId':_0x3cfb03,'channelId':_0x154f67,'comments':[{'authorId':_0x598561['id'],'content':_0x122bd1,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x234270){for(const _0x5c5f81 of _0x234270['getItems']())if(this['_itemIsContent'](_0x5c5f81))return!0x0;return!0x1;}['_itemIsContent'](_0x291008){return _0x291008['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x291008)&&!_0x291008['is']('element','tableCell');}['_trimToContent'](_0x149ea9){const _0x352338=_0x80872d=>!this['_itemIsContent'](_0x80872d['item']),_0x3c1877=_0x149ea9['start']['getLastMatchingPosition'](_0x352338),_0x2b2095=_0x149ea9['end']['getLastMatchingPosition'](_0x352338,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3c1877,_0x2b2095);}}class b extends _0x329b6e{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31dcb3){super(_0x31dcb3),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x57a6cf=this['editor'],_0x5b58fc=_0x57a6cf['model']['document']['selection'],_0x2bdfa9=_0x465268(()=>this['refreshSelectedViews'](),0xa);_0x5b58fc['on']('change:range',(_0x23d6fc,_0x440123)=>{_0x440123['directChange']&&(_0x2bdfa9['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x57a6cf['editing']['view']['document'],'change:isFocused',(_0x9162cf,_0x36428b,_0x2450dc)=>{_0x2450dc&&_0x2bdfa9();}),this['listenTo'](_0x57a6cf['ui']['focusTracker'],'change:isFocused',(_0x4113fd,_0x412702,_0x55da95)=>{_0x55da95||_0x57a6cf['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x2e05fd=>this['_editorAnnotationsData']['has'](_0x2e05fd['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x33df26){if(this['_editorAnnotations']['has'](_0x33df26['view']))return;this['_editorAnnotations']['add'](_0x33df26['view']),this['editor']['ui']['focusTracker']['add'](_0x33df26['view']['element']);const _0x4d4925=this['editor']['plugins']['get'](y);this['listenTo'](_0x4d4925['collection'],'remove',(_0x59c386,_0x54dbe6)=>{this['editor']['ui']['focusTracker']['remove'](_0x54dbe6['view']['element']),this['_editorAnnotations']['delete'](_0x54dbe6['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xcbdce8){if('function'!=typeof _0xcbdce8)throw new _0x347fe4('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xcbdce8);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3e5677,annotations:_0x52f0d4}){const _0x276f82=[],_0x4b8ee4=this['editor']['model']['document']['selection'],_0x5f38d8=Array['from'](_0x4b8ee4['getRanges']());for(const [_0x5e6c80,_0x135744]of this['_editorAnnotationsData']){const _0x4c6446=_0x33ee2a(_0x135744),_0x53d4ba=_0x52f0d4['getByInnerView'](_0x5e6c80);_0x4c6446&&_0x53d4ba&&_0x276f82['push']({'annotation':_0x53d4ba,'range':_0x4c6446});}function _0x33ee2a(_0x5bb467){for(const _0x1e8246 of _0x5bb467)for(const _0x37fb69 of _0x5f38d8)if(_0x1e8246['containsRange'](_0x37fb69,!_0x4b8ee4['isCollapsed']))return _0x1e8246;return null;}return _0x276f82['sort']((_0x2f7824,_0x336b20)=>{const _0x3e9e8c=_0x2f7824['range'],_0x1d4210=_0x336b20['range'];if(!_0x3e9e8c['isEqual'](_0x1d4210)){if(_0x3e9e8c['containsRange'](_0x1d4210,!0x0))return 0x1;if(_0x1d4210['containsRange'](_0x3e9e8c,!0x0))return-0x1;}return _0x2f7824['annotation']==_0x3e5677?-0x1:_0x336b20['annotation']==_0x3e5677?0x1:0x0;})['map'](_0x1a4467=>_0x1a4467['annotation']);}get['_editorAnnotationsData'](){const _0x4e243c=new Map();for(const _0x4d32b7 of Array['from'](this['_dataCollectors']))for(const [_0x100a15,_0x3b7dd9]of _0x4d32b7())_0x4e243c['set'](_0x100a15,_0x3b7dd9);return _0x4e243c;}}class st extends _0x329b6e{['afterInit'](){const _0x3c7ad6=this['editor'];if(!_0x3c7ad6['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3c7ad6['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x329b6e{constructor(_0x225d6a){super(_0x225d6a),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2ab9d8=this['editor'],_0x5a1c60=_0x2ab9d8['commands']['get']('importWord'),_0x3a1dcd=_0x2ab9d8['plugins']['get'](it);_0x5a1c60&&(_0x5a1c60['on']('execute',(_0x53e30d,[,_0x1ee8e0])=>{_0x1ee8e0['collaboration_features']={'comments':!0x0,'user_id':_0x3a1dcd['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5a1c60,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5c2677,_0x39406a){const {comment_threads:_0x5777e8}=_0x39406a;_0x5777e8&&_0x5777e8['forEach'](({thread_id:_0x1f0481,comments:_0x291434,is_resolved:_0x15efc7})=>{const _0x277098=new Date(),_0x4a9ac6=_0x291434['map'](({author:_0x16fd5c,content:_0x48de9a,created_at:_0x53cb3f})=>({'content':_0x48de9a,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x277098,'attributes':{'@external':{'authorName':_0x16fd5c,'createdAt':_0x53cb3f?new Date(_0x53cb3f):new Date(),'source':'importWord'}}})),_0xec41b3=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xec41b3,'threadId':_0x1f0481,'comments':_0x4a9ac6,'resolvedAt':_0x15efc7?_0x277098:null});});}}class at extends _0x329b6e{constructor(_0xc3d272){super(_0xc3d272),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x4353b5=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4353b5,'contentInsertion',(_0x2de483,_0x11e631)=>this['_removeMarkersWithoutThreads'](_0x11e631['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x5364e2){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5364e2;const _0x176b52=this['editor']['plugins']['get']('CommentsRepository');for(const _0x174a43 of _0x5364e2['keys']()){const [_0x4a5ed4,_0x911a0]=_0x174a43['split'](':');'comment'!=_0x4a5ed4||_0x176b52['hasCommentThread'](_0x911a0)||_0x5364e2['delete'](_0x174a43);}return _0x5364e2;}['_registerMarkerInClipboardPipeline'](){const _0x2c9a4d=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2fba50=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2fba50&&_0x2c9a4d['_registerMarkerToCopy']('comment',_0x2fba50);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x307a72){switch(_0x307a72){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x329b6e{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2af9cd,_0x344cd5)=>{if(!_0x344cd5['options']['showCommentHighlights'])return null;if(_0x344cd5['options']['ignoreResolvedComments']){const {id:_0x182b6c}=er(_0x2af9cd['markerName']),_0x5274e0=this['editor']['plugins']['get'](o);if(_0x5274e0['getCommentThread'](_0x182b6c)?.['isResolved']&&_0x2af9cd['item'])return _0x344cd5['consumable']['consume'](_0x2af9cd['item'],'addMarker:'+_0x2af9cd['markerName']),_0x344cd5['consumable']['consume'](_0x2af9cd['item'],'removeMarker:'+_0x2af9cd['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3c5ca9=>{_0x3c5ca9['on']('addMarker:comment',(_0x1f5144,_0x1c0225,_0x52ce9b)=>{if(!_0x52ce9b['options']['showCommentHighlights'])return;const _0x3cf1dd=_0x1c0225['item'];if(!_0x3cf1dd)return;const _0x52bd45=_0x52ce9b['mapper']['toViewElement'](_0x3cf1dd);this['editor']['model']['schema']['isObject'](_0x3cf1dd)&&_0x52bd45&&!_0x52bd45['getCustomProperty']('widget')&&_0x52bd45['is']('containerElement')&&_0x1fc28a(_0x52bd45,_0x52ce9b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x27b4a8,{writer:_0x28cb29,options:_0x493dff})=>{if(!_0x493dff['showCommentHighlights'])return null;const _0x25f5f7=_0x28cb29['createContainerElement']('div'),_0x188ab2=_0x28cb29['createEmptyElement']('hr');return _0x28cb29['addClass']('ck-horizontal-line',_0x25f5f7),_0x28cb29['insert'](_0x28cb29['createPositionAt'](_0x25f5f7,0x0),_0x188ab2),_0x25f5f7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3b56b2,{writer:_0x5c5143,options:_0x59d1ce})=>{if(!_0x59d1ce['showCommentHighlights'])return null;const _0x3c3ab6=_0x5c5143['createContainerElement']('span'),_0x4fba02=_0x5c5143['createEmptyElement']('img');return _0x5c5143['addClass']('image-inline',_0x3c3ab6),_0x5c5143['insert'](_0x5c5143['createPositionAt'](_0x3c3ab6,0x0),_0x4fba02),_0x3c3ab6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xabf4ce,{writer:_0x153a51,options:_0x987ebd})=>{if(_0x987ebd['showCommentHighlights'])return _0x153a51['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5b822f,_0x57f90a,_0x277346)=>{_0x277346['options']['showCommentHighlights']&&_0x5b822f['stop']();},{'priority':'high'});}}class r extends _0x329b6e{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e34af){super(_0x2e34af),this['set']('isThreadsLoadingPaused',!0x0),_0x2e34af['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x23db6c,_0x193f28,_0x7cfea3,_0x3ee1f9)=>{const _0x3d6a12=_0x2e34af['plugins']['get'](o),_0x55f16b=_0x7cfea3?er(_0x7cfea3)['id']:null;_0x2e34af['model']['change'](()=>{if(_0x55f16b){const _0x258166=this['getAllMarkersForId'](_0x55f16b);for(const _0x277a37 of _0x258166)_0x2e34af['editing']['reconvertMarker'](_0x277a37);}if(_0x3ee1f9){const {id:_0x1dbafa}=er(_0x3ee1f9),_0x119912=_0x3d6a12['getCommentThread'](_0x1dbafa);if(_0x119912&&_0x119912['unlinkedAt'])return;if(_0x119912&&!_0x119912['isAttached'])return;const _0x3f326c=this['getAllMarkersForId'](_0x1dbafa);for(const _0x187e18 of _0x3f326c)_0x2e34af['editing']['reconvertMarker'](_0x187e18);}}),_0x55f16b&&this['scrollToThreadMarker'](_0x55f16b);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x278140=this['editor'],_0x54a01e=_0x278140['plugins']['get'](o),_0xfcbd4a=_0x278140['config']['get']('collaboration.channelId'),_0x5a7b9e=_0x54a01e['getCommentThreads']()['filter'](_0x58855d=>_0x58855d['channelId']!==_0xfcbd4a);_0x278140['commands']['add']('addCommentThread',new rt(_0x278140)),this['listenTo'](_0x278140,'change:isReadOnly',(_0x137e10,_0x29afb1,_0x3ad053)=>{_0x54a01e['switchReadOnly'](_0x3ad053,_0x278140['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x54a01e,ft('addCommentThread',_0xfcbd4a),(_0x909cef,{threadId:_0x4dcb6b})=>{const _0x149fa1=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4dcb6b);_0x149fa1?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4dcb6b);}),this['listenTo'](_0x54a01e,ft('removeCommentThread',_0xfcbd4a),(_0x354cf7,{threadId:_0xaba62f})=>{_0x278140['model']['enqueueChange']({'isUndoable':!0x1},_0x4a32eb=>{const _0x1d3af3=this['getAllMarkersForId'](_0xaba62f);for(const _0x57cdca of _0x1d3af3)_0x4a32eb['removeMarker'](_0x57cdca);});}),this['listenTo'](_0x54a01e,ft('resolveCommentThread',_0xfcbd4a),(_0x58fb7d,{threadId:_0x36c208})=>{(this['_reconvertMarkers'](_0x36c208),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x36c208)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x54a01e,ft('reopenCommentThread',_0xfcbd4a),(_0x11c77b,{threadId:_0x13c450})=>{this['_reconvertMarkers'](_0x13c450);},{'priority':'low'}),this['listenTo'](_0x54a01e,ft('addComment',_0xfcbd4a),(_0xcbabc4,{threadId:_0x398e1f,isFromAdapter:_0x1bccc7})=>{const _0x2e824d=this['getAllMarkersForId'](_0x398e1f);if(_0x1bccc7||0x0==_0x2e824d['length']||!_0x54a01e['hasCommentThread'](_0x398e1f))return;0x1===_0x54a01e['getCommentThread'](_0x398e1f)['length']&&_0x278140['model']['enqueueChange']({'isUndoable':!0x1},_0x373e09=>{for(const _0x258029 of _0x2e824d)_0x373e09['updateMarker'](_0x258029,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5a7b9e);}['afterInit'](){!async function(_0x1f2494){const _0x2c3d87=_0x439e8b([0x53,0x32,0x6d,0x4f,0x4c,0x78,0x30,0x61,0x46,0x48,0x4d,0x76,0x35,0x34,0x38,0x58,0x47,0x55,0x45,0x6b,0x57,0x33,0x68,0x6f,0x69,0x6a,0x67,0x51,0x36,0x52,0x77,0x79,0x50,0x56,0x41,0x54,0x42,0x75,0x31,0x5a,0x4a,0x63,0x72,0x64,0x37,0x59,0x66,0x43,0x6c,0x74,0x7a,0x73,0x6e,0x71,0x4b,0x49,0x39,0x62,0x44,0x70,0x65,0x4e]),_0x5c28c5=0x354ed699,_0x50f62e=0x3549ba61^_0x5c28c5,_0x1f1888=window[_0x439e8b([0x44,0x61,0x74,0x65])][_0x439e8b([0x6e,0x6f,0x77])](),_0x238c47=_0x1f2494[_0x439e8b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1648ca=new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb22859=>{_0x238c47[_0x439e8b([0x6f,0x6e,0x63,0x65])](_0x439e8b([0x72,0x65,0x61,0x64,0x79]),_0xb22859);}),_0x6809eb={[_0x439e8b([0x6b,0x74,0x79])]:_0x439e8b([0x45,0x43]),[_0x439e8b([0x75,0x73,0x65])]:_0x439e8b([0x73,0x69,0x67]),[_0x439e8b([0x63,0x72,0x76])]:_0x439e8b([0x50,0x2d,0x32,0x35,0x36]),[_0x439e8b([0x78])]:_0x439e8b([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]),[_0x439e8b([0x79])]:_0x439e8b([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]),[_0x439e8b([0x61,0x6c,0x67])]:_0x439e8b([0x45,0x53,0x32,0x35,0x36])},_0xcbe886=_0x238c47[_0x439e8b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x439e8b([0x67,0x65,0x74])](_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x37e263(){let _0xbf638d,_0x1d9775=null,_0x302ac3=null;try{if(_0xcbe886==_0x439e8b([0x47,0x50,0x4c]))return _0x439e8b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xbf638d=_0x44c799(),!_0xbf638d)return _0x439e8b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xbf638d[_0x439e8b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x302ac3=_0x306606(_0xbf638d[_0x439e8b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xbf638d[_0x439e8b([0x6a,0x74,0x69])])),await _0x571d69()?_0x3c6235()?_0x38e06a()?_0x439e8b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x40872f()?(_0xbf638d[_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x439e8b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1d9775=_0xadbe43(_0x439e8b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xbf638d[_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x439e8b([0x74,0x72,0x69,0x61,0x6c])&&(_0x1d9775=_0xadbe43(_0x439e8b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5718eb()):_0x439e8b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x439e8b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x439e8b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x439e8b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x38e06a(){const _0x2b748f=[_0x439e8b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x439e8b([0x74,0x72,0x69,0x61,0x6c])][_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbf638d[_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1f1888/0x3e8:0xe10*_0x50f62e;return _0xbf638d[_0x439e8b([0x65,0x78,0x70])]<_0x2b748f;}function _0x3c6235(){const _0x24148e=_0xbf638d[_0x439e8b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x24148e)return!0x1;if(_0x24148e[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x439e8b([0x2a])))return!0x0;if(_0x24148e[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x439e8b([0x43,0x4d,0x54])))return!0x0;if(_0x24148e[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x439e8b([0x52,0x43,0x4d,0x54]))){if(_0x338090())return!0x0;if(_0x3610fb()||_0x7e089f())return!0x0;}return!0x1;}function _0x40872f(){const _0x4e60a7=_0xbf638d[_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4e60a7||0x0==_0x4e60a7[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5476ab}=new URL(window[_0x439e8b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4e60a7[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5476ab))return!0x0;const _0x499f31=_0x5476ab[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])](_0x439e8b([0x2e]));return _0x4e60a7[_0x439e8b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x8c46dd=>_0x8c46dd[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x439e8b([0x2a])))[_0x439e8b([0x6d,0x61,0x70])](_0x4a2ce4=>_0x4a2ce4[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])](_0x439e8b([0x2e])))[_0x439e8b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x58ff65=>_0x58ff65[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x499f31[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x439e8b([0x6d,0x61,0x70])](_0x1e3232=>Array(_0x499f31[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1e3232[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x439e8b([0x66,0x69,0x6c,0x6c])](_0x1e3232[0x0]===_0x439e8b([0x2a])?_0x439e8b([0x2a]):'')[_0x439e8b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1e3232))[_0x439e8b([0x73,0x6f,0x6d,0x65])](_0x2747a4=>_0x499f31[_0x439e8b([0x65,0x76,0x65,0x72,0x79])]((_0x38b9f,_0x33da62)=>_0x2747a4[_0x33da62]===_0x38b9f||_0x2747a4[_0x33da62]===_0x439e8b([0x2a])));}function _0x5718eb(){return _0x1d9775&&_0x302ac3?new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4f2cb9,_0x223278)=>{_0x1d9775[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x4f2cb9,_0x223278),_0x302ac3[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x90a3b2=>{_0x90a3b2!=_0x439e8b([0x56,0x61,0x6c,0x69,0x64])&&_0x4f2cb9(_0x90a3b2);},_0x223278);}):_0x1d9775||_0x302ac3||_0x439e8b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x306606(_0x188d23,_0x137044){return new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5011b7=>{if(_0x3ae157())return _0x5011b7(_0x439e8b([0x56,0x61,0x6c,0x69,0x64]));_0x2beac8(),_0x238c47[_0x439e8b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x439e8b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3153a6=!0x1;const _0x3389f2=_0x3cd367();function _0x35de73(_0x138546){return!!_0x138546&&(typeof _0x138546===_0x439e8b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x138546===_0x439e8b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x138546[_0x439e8b([0x74,0x68,0x65,0x6e])]===_0x439e8b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x138546[_0x439e8b([0x63,0x61,0x74,0x63,0x68])]===_0x439e8b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x34f00e(_0x529dc8){_0x352b2a(_0x529dc8)[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x500231=>{if(!_0x500231||_0x500231[_0x439e8b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x439e8b([0x6f,0x6b]))return _0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x7c9c83(_0xe48b0b(_0x3389f2+_0x137044))!=_0x500231[_0x439e8b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x439e8b([0x56,0x61,0x6c,0x69,0x64]);})[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x28f598=>(_0x8ee64c(),_0x28f598),()=>{const _0x53d667=_0x4c2270();return null==_0x53d667?(_0x8ee64c(),_0x439e8b([0x56,0x61,0x6c,0x69,0x64])):_0x439e8b(_0x1f1888-_0x53d667>(0x11425299^_0x5c28c5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x5011b7)[_0x439e8b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5011b7(_0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x390097=0x35783819^_0x5c28c5;function _0x8ee64c(){const _0x4e02dd=_0x439e8b([0x6c,0x6c,0x63,0x74,0x2d])+_0x7c9c83(_0xe48b0b(_0x188d23)),_0x48cc30=_0x5a8795(_0x7c9c83(window[_0x439e8b([0x4d,0x61,0x74,0x68])][_0x439e8b([0x63,0x65,0x69,0x6c])](_0x1f1888/_0x390097)));window[_0x439e8b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x439e8b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4e02dd,_0x48cc30);}function _0x4c2270(){const _0x411f10=_0x439e8b([0x6c,0x6c,0x63,0x74,0x2d])+_0x7c9c83(_0xe48b0b(_0x188d23)),_0x5744e1=window[_0x439e8b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x439e8b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x411f10);return _0x5744e1?window[_0x439e8b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a8795(_0x5744e1),0x10)*_0x390097:null;}function _0x352b2a(_0xbbe22a){return new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3490d0,_0x441bd5)=>{_0xbbe22a[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x3490d0,_0x441bd5),window[_0x439e8b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x441bd5,0x354f0259^_0x5c28c5);});}}_0x238c47[_0x439e8b([0x6f,0x6e])](_0x439e8b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x49ed52,_0x2093f9)=>{if(_0x2093f9[0x0]!=_0x188d23)return _0x5011b7(_0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2093f9[0x1]={..._0x2093f9[0x1],[_0x439e8b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3389f2};},{[_0x439e8b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x439e8b([0x68,0x69,0x67,0x68])}),_0x238c47[_0x439e8b([0x6f,0x6e])](_0x439e8b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x666ed3=>{_0x35de73(_0x666ed3[_0x439e8b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3153a6=!0x0,_0x34f00e(_0x666ed3[_0x439e8b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x439e8b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x439e8b([0x6c,0x6f,0x77])}),_0x1648ca[_0x439e8b([0x74,0x68,0x65,0x6e])](()=>{_0x3153a6||_0x5011b7(_0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3ae157(){return _0x238c47[_0x439e8b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x439e8b([0x76,0x69,0x65,0x77])][_0x439e8b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x439e8b([0x61,0x75,0x74,0x6f]);}function _0x2beac8(){_0x238c47[_0x439e8b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x439e8b([0x76,0x69,0x65,0x77])][_0x439e8b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x439e8b([0x61,0x75,0x74,0x6f]);}}function _0xadbe43(_0x2652ad){const _0x548740=[new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x681d77=>setTimeout(_0x681d77,0x3547e855^_0x5c28c5)),_0x1648ca[_0x439e8b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20d6e1=>{let _0x34d93b=0x0;_0x238c47[_0x439e8b([0x6d,0x6f,0x64,0x65,0x6c])][_0x439e8b([0x6f,0x6e])](_0x439e8b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4edf22,_0x5024e3)=>{_0x5024e3[0x0][_0x439e8b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x34d93b++,_0x34d93b==(0x354ed761^_0x5c28c5)&&(_0x20d6e1(),_0x4edf22[_0x439e8b([0x6f,0x66,0x66])]());});}))];return window[_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x439e8b([0x72,0x61,0x63,0x65])](_0x548740)[_0x439e8b([0x74,0x68,0x65,0x6e])](()=>_0x2652ad);}async function _0x1c866c(){await _0x1648ca,_0x238c47[_0x439e8b([0x6d,0x6f,0x64,0x65,0x6c])][_0x439e8b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xeb43f9,_0x238c47[_0x439e8b([0x6d,0x6f,0x64,0x65,0x6c])][_0x439e8b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xeb43f9,_0x238c47[_0x439e8b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x439e8b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x338090(){return _0x2b203e(_0x439e8b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x418b5c(_0x439e8b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x439e8b([0x73,0x74,0x61,0x74,0x65])]==_0x439e8b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3610fb(){return _0x2b203e(_0x439e8b([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 _0x7e089f(){return _0x2b203e(_0x439e8b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x129edf(_0x236d98){const _0x431a6d=_0x3d0ef7();_0x238c47[_0x431a6d]=_0x439e8b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x236d98,_0x236d98!=_0x439e8b([0x56,0x61,0x6c,0x69,0x64])&&_0x1c866c();}function _0x3d0ef7(){const _0x4960ed=window[_0x439e8b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x439e8b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x439e8b([0x6e,0x6f,0x77])]())[_0x439e8b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x439e8b([0x2e]),'');let _0x21c9ba=_0x439e8b([0x53]);for(let _0x57043e=0x0;_0x57043e<_0x4960ed[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x57043e+=0x2){let _0x56d9df=window[_0x439e8b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4960ed[_0x439e8b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57043e,_0x57043e+0x2));_0x56d9df>=_0x2c3d87[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x56d9df-=_0x2c3d87[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x21c9ba+=_0x2c3d87[_0x56d9df];}return _0x21c9ba;}function _0x44c799(){const _0x1387e3=_0xcbe886[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])](_0x439e8b([0x2e]));if(0x3!=_0x1387e3[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2fc227(_0x1387e3[0x1]);function _0x2fc227(_0x4fb2cd){const _0x3bb089=_0x48c731(_0x4fb2cd);return _0x3bb089&&_0x3f9099()?_0x3bb089:null;function _0x3f9099(){const _0x3ba348=_0x3bb089[_0x439e8b([0x6a,0x74,0x69])],_0x424673=window[_0x439e8b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3ba348[_0x439e8b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ba348[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x215f14={..._0x3bb089,[_0x439e8b([0x6a,0x74,0x69])]:_0x3ba348[_0x439e8b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3ba348[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x215f14[_0x439e8b([0x76,0x63])],_0xe48b0b(_0x215f14)==_0x424673;}}}async function _0x571d69(){let _0x3d891c=!0x0;try{const _0x45b2a7=_0xcbe886[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])](_0x439e8b([0x2e])),[_0x1a9b95,_0xc724fd,_0x3a450b]=_0x45b2a7;return _0x3074a7(_0x1a9b95),await _0x3e1e7b(_0x1a9b95,_0xc724fd,_0x3a450b),_0x3d891c;}catch{return!0x1;}function _0x3074a7(_0x25fa44){const _0x9d1083=_0x48c731(_0x25fa44);_0x9d1083&&_0x9d1083[_0x439e8b([0x61,0x6c,0x67])]==_0x439e8b([0x45,0x53,0x32,0x35,0x36])||(_0x3d891c=!0x1);}async function _0x3e1e7b(_0x20b9ec,_0x4f83ff,_0x1e4a4f){const _0x2c546c=window[_0x439e8b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x439e8b([0x66,0x72,0x6f,0x6d])](_0x4a763e(_0x1e4a4f),_0x3107ce=>_0x3107ce[_0x439e8b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1e8d10=new window[(_0x439e8b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x439e8b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x20b9ec+_0x439e8b([0x2e])+_0x4f83ff),_0xb03ee4=window[_0x439e8b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x439e8b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xb03ee4)return;const _0x40364f=await _0xb03ee4[_0x439e8b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x439e8b([0x6a,0x77,0x6b]),_0x6809eb,{[_0x439e8b([0x6e,0x61,0x6d,0x65])]:_0x439e8b([0x45,0x43,0x44,0x53,0x41]),[_0x439e8b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x439e8b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x439e8b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xb03ee4[_0x439e8b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x439e8b([0x6e,0x61,0x6d,0x65])]:_0x439e8b([0x45,0x43,0x44,0x53,0x41]),[_0x439e8b([0x68,0x61,0x73,0x68])]:{[_0x439e8b([0x6e,0x61,0x6d,0x65])]:_0x439e8b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x40364f,_0x2c546c,_0x1e8d10)||(_0x3d891c=!0x1);}}function _0x48c731(_0x2c9f58){return _0x2c9f58[_0x439e8b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x439e8b([0x65,0x79]))?JSON[_0x439e8b([0x70,0x61,0x72,0x73,0x65])](_0x4a763e(_0x2c9f58)):null;}function _0x4a763e(_0x3ad52d){return window[_0x439e8b([0x61,0x74,0x6f,0x62])](_0x3ad52d[_0x439e8b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x439e8b([0x2b]))[_0x439e8b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x439e8b([0x2f])));}function _0xe48b0b(_0x462cb7){let _0x273a61=0x1505;function _0x3b23cd(_0x1300bb){for(let _0x194bad=0x0;_0x194bad<_0x1300bb[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x194bad++){const _0x353843=_0x1300bb[_0x439e8b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x194bad);_0x273a61=(_0x273a61<<0x5)+_0x273a61+_0x353843,_0x273a61&=_0x273a61;}}function _0x357087(_0x3f14db){Array[_0x439e8b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3f14db)?_0x3f14db[_0x439e8b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x357087):_0x3f14db&&typeof _0x3f14db==_0x439e8b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x439e8b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3f14db)[_0x439e8b([0x73,0x6f,0x72,0x74])]()[_0x439e8b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x36af1d,_0x387403])=>{_0x3b23cd(_0x36af1d),_0x357087(_0x387403);}):_0x3b23cd(window[_0x439e8b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3f14db));}return _0x357087(_0x462cb7),_0x273a61>>>0x0;}function _0x7c9c83(_0x468878){return _0x468878[_0x439e8b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x439e8b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x439e8b([0x30]));}function _0x5a8795(_0x10b532){return _0x10b532[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x439e8b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x439e8b([0x6a,0x6f,0x69,0x6e])]('');}function _0x2b203e(_0x3b7c9d){return _0x238c47[_0x439e8b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x439e8b([0x68,0x61,0x73])](_0x3b7c9d);}function _0x418b5c(_0x19bffd){return _0x238c47[_0x439e8b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x439e8b([0x67,0x65,0x74])](_0x19bffd);}function _0xeb43f9(){}function _0x439e8b(_0x3072b1){return _0x3072b1['map'](_0x3a2791=>String['fromCharCode'](_0x3a2791))['join']('');}_0x129edf(await _0x37e263());}(this);}['destroy'](){const _0x1f5a12=this['editor']['plugins']['get'](o),_0x1120d7=this['editor']['config']['get']('collaboration.channelId');for(const _0x1782af of _0x1f5a12['getCommentThreads']({'channelId':_0x1120d7}))_0x1f5a12['_detachCommentThread'](_0x1782af['id']),_0x1f5a12['_threads']['delete'](_0x1782af['id']);super['destroy']();}['hasMarkerForId'](_0x32aad0){return this['getAllMarkersForId'](_0x32aad0)['length']>0x0;}['getAllMarkersForId'](_0x5e9d17){const _0x4589b5=[];for(const _0x51914e of this['editor']['model']['markers'])_0x51914e['name']['startsWith']('comment:'+_0x5e9d17)&&_0x4589b5['push'](_0x51914e);return _0x4589b5;}['scrollToThreadMarker'](_0x534891){setTimeout(()=>{const _0x2790dd=this['_getTargetForId'](_0x534891);if(!_0x2790dd)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0x534891&&nt({'target':_0x2790dd[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x281c79){this['editor']['model']['change'](()=>{for(const _0x6ddcb0 of this['getAllMarkersForId'](_0x281c79))this['editor']['editing']['reconvertMarker'](_0x6ddcb0);});}['_attachArchivedThread'](_0x3cfe16){const _0x5e0ee2=this['editor']['plugins']['get'](o),_0x59b481=this['editor']['plugins']['get'](b),_0xacdf97=_0x5e0ee2['getCommentThread'](_0x3cfe16);if(!_0xacdf97['isAttached']){const _0x22f1b9=_0xacdf97['attachTo'](()=>this['_getTargetForId'](_0xacdf97['id']));_0x59b481['registerAnnotation'](_0x22f1b9),_0xacdf97['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x14c728=this['editor'],_0xc7f860=_0x14c728['plugins']['get'](it);_0x14c728['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xb79d05,_0x5b6e7f)=>{const {id:_0x566ebd}=er(_0xb79d05['markerName']),_0xa4064a=_0x14c728['plugins']['get'](o)['getCommentThread'](_0x566ebd),_0x12d3d8=this['activeMarker']&&er(this['activeMarker'])['id']===_0x566ebd;let _0x34388c;if(_0xa4064a&&_0xa4064a['isResolved']&&!_0x12d3d8&&_0xb79d05['item'])return _0x5b6e7f['consumable']['consume'](_0xb79d05['item'],'addMarker:'+_0xb79d05['markerName']),_0x5b6e7f['consumable']['consume'](_0xb79d05['item'],'removeMarker:'+_0xb79d05['markerName']),null;const _0xcc98c2=['ck-comment-marker'];return _0x12d3d8&&_0xcc98c2['push']('ck-comment-marker--active'),_0x34388c=_0xa4064a?.['length']?_0xa4064a['comments']['first']['author']['id']:_0xc7f860['me']['id'],{'classes':_0xcc98c2,'attributes':{'data-comment':_0x566ebd,'data-author-id':_0x34388c}};}}),_0x14c728['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1d010c,{options:_0x31909e})=>{if(_0x31909e['showCommentHighlights'])return null;const _0x24f6e9=_0x14c728['plugins']['get'](o),_0x202a0e=_0x14c728['model']['markers']['get'](_0x1d010c),{id:_0x30191b,part:_0x274866}=er(_0x1d010c);return _0x202a0e&&!_0x202a0e['affectsData']||_0x31909e['ignoreResolvedComments']&&_0x24f6e9['getCommentThread'](_0x30191b)?.['isResolved']?null:{'group':'comment','name':_0x274866?_0x30191b+':'+_0x274866:_0x30191b};}}),_0x14c728['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x208530,{writer:_0x279ef2})=>_0x279ef2['createElement']('$marker',{'data-name':'comment:'+_0x208530['getAttribute']('id')})}),_0x14c728['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x591bf7=this['editor'],_0x2f6d0a=_0x591bf7['plugins']['get'](o),_0x1ffe57=new Set(),_0x327eea=new Set();_0x591bf7['model']['document']['registerPostFixer'](_0x3156cd=>{let _0x34fa33=!0x1;for(const {name:_0x3d1cfc,data:_0x1ef418}of _0x591bf7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d83d3,id:_0xe2dad3}=er(_0x3d1cfc);let _0x401b25=_0x1ef418['newRange'];if('comment'!==_0x3d83d3||!_0x401b25)continue;const _0x32b65e='$graveyard'===_0x401b25['root']['rootName'];_0x32b65e||(_0x401b25=dt(_0x401b25,_0x591bf7['model']),!_0x401b25||_0x401b25['isCollapsed']||!_0x1ef418['newRange']||_0x401b25['isEqual'](_0x1ef418['newRange']))?_0x591bf7['model']['hasContent'](_0x401b25)&&!_0x32b65e?this['isThreadsLoadingPaused']?_0x1ffe57['add'](_0x3d1cfc):this['_handleThreadMarker'](_0x3d1cfc,_0xe2dad3):(_0x327eea['add'](_0x3d1cfc),_0x1ffe57['delete'](_0x3d1cfc),_0x3156cd['removeMarker'](_0x3d1cfc),_0x34fa33=!0x0):(_0x3156cd['updateMarker'](_0x3d1cfc,{'range':_0x401b25}),_0x34fa33=!0x0);}return _0x34fa33;}),this['on']('change:isThreadsLoadingPaused',(_0x597743,_0x59e09b,_0x35c528)=>{if(!_0x35c528&&_0x1ffe57['size'])for(const _0x26e354 of _0x1ffe57){const {id:_0x5a60f5}=er(_0x26e354);_0x1ffe57['delete'](_0x26e354),_0x591bf7['model']['markers']['get'](_0x26e354)&&this['_handleThreadMarker'](_0x26e354,_0x5a60f5);}}),this['listenTo'](_0x591bf7['model']['document'],'change',()=>{for(const {name:_0x2e2358,data:{newRange:_0x9ef290}}of _0x591bf7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x784937,id:_0xfc600c}=er(_0x2e2358);if('comment'!==_0x784937)continue;const _0x2a5424=_0x2f6d0a['getCommentThread'](_0xfc600c),_0x4c94e0=this['hasMarkerForId'](_0xfc600c);_0x2a5424&&(!_0x2a5424['_hasTargetInContent']&&_0x9ef290&&_0x591bf7['editing']['view']['once']('render',()=>{const _0x5a85a3=_0x591bf7['plugins']['get'](y),_0x26e5fa=_0x2f6d0a['_threadToController']['get'](_0x2a5424)['view'];_0x5a85a3['getByInnerView'](_0x26e5fa)['refreshVisibility']();},{'priority':'low'}),_0x2a5424['_hasTargetInContent']=_0x4c94e0||!!_0x9ef290),_0x9ef290||(_0x327eea['add'](_0x2e2358),_0x1ffe57['delete'](_0x2e2358));}for(const _0x42f622 of _0x327eea){const {id:_0x3e7300}=er(_0x42f622),_0x588191=_0x2f6d0a['getCommentThread'](_0x3e7300);if(_0x1ffe57['delete'](_0x42f622),!_0x588191)continue;const _0x54d73f=this['hasMarkerForId'](_0x3e7300);_0x54d73f||_0x588191['isSubmitted']?_0x54d73f||_0x588191['unlinkedAt']||_0x588191['setUnlinkedAt'](new Date()):_0x588191['remove']();}_0x327eea['clear']();});}['_handleInitialThreads'](_0xdea3cf){_0xdea3cf['forEach'](_0x2220e2=>{_0x2220e2['unlinkedAt']&&this['_attachArchivedThread'](_0x2220e2['id']);});}['_getTargetForId'](_0x2a5e62){const _0x35faa8=this['editor'],_0xb60a8a=this['getAllMarkersForId'](_0x2a5e62);return et(_0x35faa8['editing'],_0xb60a8a);}['_getTextContext'](_0x438a7c){const _0x39b0e9=this['getAllMarkersForId'](_0x438a7c);let _0x344e5a='',_0x5525a0=!0x1;for(const _0x1e801f of _0x39b0e9){const _0xc8ef80=_0x1e801f['getRange']();for(const _0x461c11 of Array['from'](_0xc8ef80['getItems']()))_0x461c11['is']('$textProxy')?(_0x344e5a&&_0x5525a0&&(_0x344e5a+='\x20',_0x5525a0=!0x1),_0x344e5a+=_0x461c11['data']):_0x5525a0=!0x0;_0x5525a0=!0x0;}return _0x344e5a['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3712ab,_0x382054){const _0x3259bc=this['editor'],_0x5bb5dc=_0x3259bc['plugins']['get'](o);let _0x4fc140=_0x5bb5dc['getCommentThread'](_0x382054);const _0x6dee2f=_0x3259bc['config']['get']('collaboration.channelId'),_0x1ae778=_0x3259bc['plugins']['get'](b);if(_0x4fc140&&(_0x4fc140['unlinkedAt']&&_0x4fc140['setUnlinkedAt'](null),_0x4fc140['isAttached']))return _0x4fc140;return!this['getAllMarkersForId'](_0x382054)[0x0]['managedUsingOperations']?_0x3259bc['editing']['view']['once']('render',()=>{if(_0x5bb5dc['getCommentThread'](_0x382054))return;const _0x55016f=_0x3259bc['plugins']['get'](y);_0x4fc140=_0x5bb5dc['openNewCommentThread']({'channelId':_0x6dee2f,'threadId':_0x382054,'target':()=>this['_getTargetForId'](_0x382054),'context':{'type':'text','value':this['_getTextContext'](_0x382054)}});const _0x105bb2=_0x5bb5dc['_threadToController']['get'](_0x4fc140)['view'],_0xc1f15=_0x55016f['getByInnerView'](_0x105bb2);_0xc1f15&&_0x1ae778['registerAnnotation'](_0xc1f15);},{'priority':'low'}):_0x5bb5dc['fetchCommentThread']({'channelId':_0x6dee2f,'threadId':_0x382054})['then'](_0x20c386=>{if('destroyed'!==_0x3259bc['state']){if(_0x4fc140=_0x20c386,_0x4fc140&&!_0x4fc140['isAttached']){const _0x59f250=_0x4fc140['attachTo'](()=>this['_getTargetForId'](_0x382054));_0x1ae778['registerAnnotation'](_0x59f250),_0x4fc140['isResolved']&&this['_reconvertMarkers'](_0x382054);}else{if(!_0x4fc140){const _0x2af15d=this['getAllMarkersForId'](_0x382054);_0x3259bc['model']['change'](_0x15019b=>{for(const _0x88c51c of _0x2af15d)_0x15019b['removeMarker'](_0x88c51c);});}}}}),_0x4fc140;}['_handleThreadMarker'](_0xd72e09,_0x43e13c){const _0x4c3aba=this['_attachMarkerToThread'](_0xd72e09,_0x43e13c);_0x4c3aba&&!_0x4c3aba['context']&&_0x4c3aba['setContext']({'type':'text','value':this['_getTextContext'](_0x43e13c)});}['_initAriaMarkerChangeAnnouncements'](){const _0x629267=this['editor'];ot(_0x629267['model'],({left:_0x519eab,entered:_0x24f47f})=>{for(const _0x5319ec of _0x519eab)if(mt(_0x5319ec)){_0x629267['ui']['ariaLiveAnnouncer']['announce'](N(_0x629267['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x494bd3 of _0x24f47f)if(mt(_0x494bd3)){_0x629267['ui']['ariaLiveAnnouncer']['announce'](N(_0x629267['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x29ad06)));break;}});}}function ft(_0xc4d28,_0x3da5c7){return _0x3da5c7?_0xc4d28+':'+_0x3da5c7:_0xc4d28;}function er(_0x5285c4){const _0x4cd670=_0x5285c4['split'](':');return{'group':_0x4cd670[0x0],'id':_0x4cd670[0x1],'part':_0x4cd670[0x2]};}function dt(_0x1e12a2,_0x2860cc){const _0xe74342=_0x2860cc['schema'],_0x165b3c=_0x2860cc['createRange'](_0x1e12a2['start']);for(const _0x2d8dde of _0x1e12a2['getWalker']()){const {type:_0x3d9a73,item:_0x3c2853,nextPosition:_0x8e58bc}=_0x2d8dde;if('text'===_0x3d9a73||_0xe74342['isObject'](_0x3c2853)){const _0x1b6df0=_0x2860cc['createPositionBefore'](_0x3c2853);_0x165b3c['isCollapsed']&&(_0x165b3c['start']=_0x1b6df0),_0x165b3c['end']=_0x8e58bc;}}return _0x165b3c;}function mt(_0x33af7d){return'comment'===er(_0x33af7d['name'])['group'];}class s extends _0x329b6e{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x236b41=this['editor'],_0x206469=_0x236b41['plugins']['get'](o),_0x139280=_0x236b41['plugins']['get'](r),_0x151eb2=_0x236b41['plugins']['get'](y),_0xa0653f=_0x236b41['plugins']['get'](b);_0x236b41['ui']['componentFactory']['add']('comment',()=>{const _0x30e4ea=this['_createUIButton'](_0x488b97);return _0x30e4ea['tooltip']=!0x0,_0x30e4ea;}),_0x236b41['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5d24e6)),_0xa0653f['addSourceCollector'](()=>{const _0x261a00=[];for(const [_0x350ac6,_0x5117c3]of _0x206469['_threadToController']){const _0x9af5f7=_0x139280['getAllMarkersForId'](_0x350ac6['id']),_0x29fca7=_0x9af5f7['map'](_0x4095ab=>_0x4095ab['getRange']());_0x9af5f7['length']>0x0&&_0x261a00['push']([_0x5117c3['view'],_0x29fca7]);}return _0x261a00;}),this['listenTo'](_0x151eb2,'change:activeAnnotations',(_0x2ded52,_0x127bfa,_0x3743cd)=>{const _0x5410e8=Array['from'](_0x3743cd)['map'](_0xea8e40=>_0xea8e40['innerView'])['find'](_0x20d86e=>_0x206469['_viewToController']['has'](_0x20d86e));if(!_0x5410e8)return void(_0x139280['activeMarker']=null);const _0x5e63e1=_0x206469['_viewToController']['get'](_0x5410e8)['model']['id'],_0x50d82e='comment:'+_0x5e63e1;_0x5e63e1&&_0x139280['hasMarkerForId'](_0x5e63e1)?_0x139280['activeMarker']=_0x50d82e:_0x139280['activeMarker']&&(_0x139280['activeMarker']=null);}),this['listenTo'](_0x206469,'removeCommentThread',(_0x1ece46,{threadId:_0x33009a,isFromAdapter:_0x10250c})=>{!_0x10250c&&_0x236b41['ui']['focusTracker']['isFocused']&&_0x139280['hasMarkerForId'](_0x33009a)&&_0x236b41['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x206469,'addComment',(_0x20a1ec,{threadId:_0x414be9,isFromAdapter:_0x3a2c75})=>{if(_0x3a2c75||!_0x139280['hasMarkerForId'](_0x414be9)||!_0x206469['hasCommentThread'](_0x414be9))return;0x1===_0x206469['getCommentThread'](_0x414be9)['length']&&(_0x236b41['editing']['view']['focus'](),_0x20a1ec['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x67897b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x48fad4;for(const _0x24f8db in _0x67897b){const _0x3b1851=_0x24f8db,_0x137013=_0x67897b[_0x3b1851];if('commentsLicenseKeyValid'==_0x137013||'commentsLicenseKeyInvalid'==_0x137013||'commentsLicenseKeyExpired'==_0x137013||'commentsLicenseKeyDomainLimit'==_0x137013||'commentsLicenseKeyNotAllowed'==_0x137013||'commentsLicenseKeyEvaluationLimit'==_0x137013||'commentsLicenseKeyTrialLimit'==_0x137013||'commentsLicenseKeyUsageLimit'==_0x137013){delete _0x67897b[_0x3b1851],_0x48fad4=_0x137013,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x48fad4&&_0x67897b['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x48fad4&&_0x67897b['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x48fad4&&_0x67897b['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x48fad4&&_0x67897b['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x48fad4&&_0x67897b['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x48fad4&&_0x67897b['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x48fad4&&_0x67897b['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2beaab){const _0x2e4043=this['editor'],_0x30b8f2=new _0x2beaab(_0x2e4043['locale']),_0x5d71c6=_0x2e4043['commands']['get']('addCommentThread');return _0x30b8f2['set']({'label':N(_0x2e4043['locale'],'Comment'),'icon':_0x2c05f7}),_0x30b8f2['bind']('isEnabled')['to'](_0x5d71c6,'hasContent'),this['listenTo'](_0x30b8f2,'execute',()=>{_0x5d71c6['execute']();}),_0x30b8f2;}}class i extends _0x329b6e{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2fc8b3){super(_0x2fc8b3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x538587,_0xd6eb65,_0x1ac4a6)=>{_0x1ac4a6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1a0f3c,_0x262342]of this['editor']['commands'])_0x262342['affectsData']&&'addCommentThread'!==_0x1a0f3c&&_0x262342['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1febe2=this['editor']['editing']['view']['document'];this['listenTo'](_0x1febe2,'cut',_0x55455d=>_0x55455d['stop'](),{'priority':'highest'}),this['listenTo'](_0x1febe2,'clipboardInput',_0x5b1de2=>_0x5b1de2['stop'](),{'priority':'highest'}),this['listenTo'](_0x1febe2,'delete',_0x51fde8=>_0x51fde8['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x8d0c57,_0x4caf99]of this['editor']['commands'])_0x4caf99['affectsData']&&'addCommentThread'!==_0x8d0c57&&_0x4caf99['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x2ec86c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c9a33){super(_0x2c9a33),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xba4ebb=this['context']['plugins']['get'](y);this['listenTo'](_0xba4ebb,'_activateAnnotation',(_0x3cebde,_0x295be2)=>{for(const _0x3acefd of this['activeUIs']){const _0x572b5b=this['_uis']['get'](_0x3acefd);(0x0,this['uisData']['get'](_0x3acefd)['filter'])(_0x295be2)&&_0x572b5b['setActiveAnnotation'](_0x295be2);}}),this['listenTo'](_0xba4ebb,'_deactivateAllAnnotations',()=>{for(const _0x35d4cc of this['activeUIs']){this['_uis']['get'](_0x35d4cc)['setActiveAnnotation'](null);}}),this['listenTo'](_0xba4ebb['_visibleAnnotations'],'add',(_0x1660a1,_0xf10d0a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xf10d0a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2d023c){return this['activeUIs']['has'](_0x2d023c);}['activate'](_0x284d0e,_0xea115b=this['defaultFilter']){const _0x30c3b8=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x284d0e))throw new _0x347fe4('annotationsuis-missing-ui',this,{'uiName':_0x284d0e});this['isActive'](_0x284d0e)&&this['deactivate'](_0x284d0e),this['activeUIs']['add'](_0x284d0e);const _0x4108bf=new S();v({'source':_0x30c3b8['_visibleAnnotations'],'target':_0x4108bf,'filter':_0xea115b}),this['uisData']['set'](_0x284d0e,{'collection':_0x4108bf,'filter':_0xea115b});const _0x5bee50=this['_uis']['get'](_0x284d0e);_0x5bee50['attach'](_0x4108bf),this['listenTo'](_0x5bee50,'change:activeAnnotation',(_0x4a12f8,_0x255796,_0x123fb0,_0x466067)=>{_0x466067&&_0x30c3b8['_removeActiveAnnotation'](_0x466067),_0x123fb0&&_0x30c3b8['_addActiveAnnotation'](_0x123fb0);});}['deactivate'](_0x39b46e){if(this['activeUIs']['delete'](_0x39b46e),!this['_uis']['has'](_0x39b46e))throw new _0x347fe4('annotationsuis-missing-ui',this,{'uiName':_0x39b46e});const _0x15db55=this['_uis']['get'](_0x39b46e);_0x15db55['detach'](),this['stopListening'](_0x15db55),this['uisData']['get'](_0x39b46e)['collection']['destroy'](),this['uisData']['delete'](_0x39b46e);}['switchTo'](_0x339a24){if(!this['_uis']['has'](_0x339a24))throw new _0x347fe4('annotationsuis-missing-ui',this,{'uiName':_0x339a24});const _0x2ffa74=this['context']['plugins']['get'](y),_0x40ef06=Array['from'](_0x2ffa74['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x339a24);const _0x5bd871=this['_uis']['get'](_0x339a24);_0x5bd871['setActiveAnnotation'](_0x40ef06),_0x5bd871['_setSelectedAnnotations']&&_0x40ef06&&_0x5bd871['_setSelectedAnnotations']([_0x40ef06]);}['deactivateAll'](){for(const _0x3fea3d of this['activeUIs'])this['deactivate'](_0x3fea3d);}['register'](_0x3d2a1d,_0x24eaa8){if(this['_uis']['has'](_0x3d2a1d))throw new _0x347fe4('annotationsuis-register-already-registered');if('function'!=typeof _0x24eaa8['attach']||'function'!=typeof _0x24eaa8['detach']||'function'!=typeof _0x24eaa8['setActiveAnnotation'])throw new _0x347fe4('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3d2a1d,_0x24eaa8);}['refilterAnnotations'](){const _0x2b4427=this['context']['plugins']['get'](y)['collection'],_0x39ac13=new Map(),_0x34e5e8=Array['from'](this['activeUIs']);for(const _0x1891fd of this['activeUIs']){const _0x1ac84e=this['uisData']['get'](_0x1891fd)['collection'];for(const _0x1b7617 of _0x1ac84e)_0x39ac13['set'](_0x1b7617,_0x1891fd);}for(const _0x28d751 of _0x2b4427){const _0x12f709=_0x39ac13['get'](_0x28d751);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x28d751);const _0x3b5d99=_0x34e5e8['find'](_0x545d60=>this['uisData']['get'](_0x545d60)['filter'](_0x28d751));_0x12f709!==_0x3b5d99&&(_0x12f709&&this['uisData']['get'](_0x12f709)['collection']['remove'](_0x28d751),_0x3b5d99&&this['uisData']['get'](_0x3b5d99)['collection']['add'](_0x28d751));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4b2b9e){const _0x157417=[];for(const _0x3d8ac4 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3d8ac4)['filter'])(_0x4b2b9e)&&_0x157417['push'](_0x3d8ac4);}if(_0x157417['length']>0x1)throw new _0x347fe4('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x157417,'annotationType':_0x4b2b9e['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x595169){super(_0x595169),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x155752,_0x2b9ba4)=>_0x155752+_0x2b9ba4),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x8d4df6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x8d4df6['to']('isAnimationDisabled',_0x3047d2=>_0x3047d2?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x8d4df6['to']('top',_0x41dd16=>Ot(_0x41dd16))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x469196=this['element']['clientHeight'];_0x469196&&(this['height']=_0x469196);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2ec86c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x505764){super(_0x505764),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 _0x3052cc=this['context']['config']['get']('sidebar.container');_0x3052cc&&this['setContainer'](_0x3052cc);}['setContainer'](_0x3cb52b){if(!g(_0x3cb52b))throw new _0x347fe4('sidebar-setcontainer-invalid-element');this['container']=_0x3cb52b;}['_attachToContainer']({viewClass:_0x542e45='',spaceBetweenItems:_0x125340=0x19}={}){if(!g(this['container']))throw new _0x347fe4('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x542e45,this['_spaceBetweenItems']=_0x125340;}['rearrange']({removedAnnotation:_0x482e39,previousAnnotation:_0x2be9f5,nextAnnotation:_0x247b5e}){const _0x59a210=this['getSidebarItemView'](_0x482e39);this['view']['list']['remove'](_0x59a210),this['_destroySidebarItemView'](_0x482e39),_0x2be9f5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2be9f5)),_0x247b5e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x247b5e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x259b2f,activatedAnnotation:_0x43d7d0,disableAnimationOnActivatedAnnotation:_0x36cf45}){if(this['_activeAnnotation']=_0x43d7d0,_0x259b2f){_0x259b2f['isActive']=!0x1;const _0x3adb2e=this['getSidebarItemView'](_0x259b2f);_0x3adb2e&&_0x36cf45&&(_0x3adb2e['isAnimationDisabled']=!0x1);}if(_0x43d7d0){const _0x144fb5=this['getSidebarItemView'](_0x43d7d0);_0x144fb5&&(_0x43d7d0['isActive']=!0x0,_0x36cf45&&(_0x144fb5['isAnimationDisabled']=!0x0,_0x144fb5['top']+=0x1),this['_alignToTargetRect'](_0x144fb5));}}['_detachFromContainer'](_0x3530ba){if(this['view']['element']['remove'](),_0x3530ba){for(const _0x414588 of _0x3530ba)this['_destroySidebarItemView'](_0x414588);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x42a2d7,_0x301bfd){_0x301bfd||(_0x301bfd=_0x42a2d7['view']);const _0x321936=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x321936,_0x42a2d7),this['_annotationToSidebarItemView']['set'](_0x42a2d7,_0x321936),_0x321936['content']['add'](_0x301bfd),this['listenTo'](_0x42a2d7['view'],'change:targetRect',(_0x335eeb,_0x131a14,_0xaa3ee0)=>{const _0x5038a7=this['_getTargetTop'](_0x42a2d7,_0xaa3ee0);_0x321936['_targetTop']!=_0x5038a7&&(_0x321936['_targetTop']=_0x5038a7,this['_setItemTop'](_0x321936,_0x5038a7));}),this['listenTo'](_0x321936,'change:top',()=>{this['_recalculate'](_0x321936,'top');}),this['listenTo'](_0x321936,'change:bottom',()=>{this['_recalculate'](_0x321936,'bottom');}),this['_alignToTargetRect'](_0x321936);const _0x171830=this['_getItemBefore'](_0x321936);if(_0x171830)this['_alignAfterItem'](_0x171830,_0x321936)||this['_alignToTargetRect'](_0x321936);else this['_alignToTargetRect'](_0x321936);return this['_updateLastItem'](),this['view']['list']['add'](_0x321936),_0x321936;}['_alignForTopChange'](_0x47e5d3){if(!_0x47e5d3['content']['length'])return;const _0x27c243=this['_getItemBefore'](_0x47e5d3);if(!_0x27c243)return;const _0x294dba=this['_sidebarItemViewToAnnotation']['get'](_0x27c243),_0xd28903=this['_activeAnnotation'];_0xd28903&&_0xd28903===_0x294dba?this['_alignAfterItem'](_0x27c243,_0x47e5d3):this['_alignBeforeItem'](_0x47e5d3,_0x27c243);}['_alignForBottomChange'](_0x548c27){if(!_0x548c27['content']['length'])return;const _0x905799=this['_getItemAfter'](_0x548c27);if(!_0x905799)return;const _0x2bc314=this['_sidebarItemViewToAnnotation']['get'](_0x905799),_0x1e3a2f=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3293cb=this['_activeAnnotation'];_0x3293cb&&_0x3293cb===_0x2bc314&&_0x1e3a2f?(this['_alignBeforeItem'](_0x905799,_0x548c27),this['_alignAfterItem'](_0x548c27,_0x905799)):_0x3293cb&&_0x3293cb===_0x2bc314?this['_alignBeforeItem'](_0x905799,_0x548c27):this['_alignAfterItem'](_0x548c27,_0x905799);}['_recalculate'](_0x468312,_0x11bbfc){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x18bdad,changedProp:_0x9c5afc}of this['_recalculateBuffer'])'top'===_0x9c5afc?this['_alignForTopChange'](_0x18bdad):this['_alignForBottomChange'](_0x18bdad);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x468312,'changedProp':_0x11bbfc});}['getSidebarItemView'](_0x2c295f){return this['_annotationToSidebarItemView']['get'](_0x2c295f);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x22b5ef){const _0x235cf9=this['getSidebarItemView'](_0x22b5ef);this['stopListening'](_0x235cf9),this['stopListening'](_0x22b5ef['view']),_0x235cf9['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x22b5ef),this['_sidebarItemViewToAnnotation']['delete'](_0x235cf9);}['_createSidebarView'](){const _0x1440be=new H(this['context']['locale']);return _0x1440be['render'](),this['on']('change:_lastItem',(_0x4b7b19,_0x3ac2aa,_0x152cc0,_0x2b9b8b)=>{_0x2b9b8b&&_0x1440be['unbind']('minHeight'),_0x152cc0?_0x1440be['bind']('minHeight')['to'](_0x152cc0,'bottom'):_0x1440be['minHeight']=null;}),_0x1440be;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x32ab15){const _0x283e6b=this['_sidebarItemViewToAnnotation']['get'](_0x32ab15),_0x5935a8=_0x283e6b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x283e6b)-0x1);return _0x5935a8&&this['getSidebarItemView'](_0x5935a8)||null;}['_getItemAfter'](_0x240c1b){const _0x367ae4=this['_sidebarItemViewToAnnotation']['get'](_0x240c1b),_0x2da69a=_0x367ae4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x367ae4)+0x1);return _0x2da69a&&this['getSidebarItemView'](_0x2da69a)||null;}['_alignBeforeItem'](_0x436441,_0x351249){_0x436441['updateHeight']();const _0x45bd0a=G(_0x351249['bottom']+this['_spaceBetweenItems'],_0x436441['top']);return!!_0x45bd0a&&(this['_setItemTop'](_0x351249,_0x351249['top']-_0x45bd0a),!0x0);}['_alignAfterItem'](_0x399ee7,_0x88e38f){_0x399ee7['updateHeight']();const _0x2f26c7=G(_0x399ee7['bottom']+this['_spaceBetweenItems'],_0x88e38f['top']);return!!_0x2f26c7&&(this['_setItemTop'](_0x88e38f,_0x88e38f['top']+_0x2f26c7,!0x1),!0x0);}['_alignToTargetRect'](_0x43b968){const _0x4da82a=this['_sidebarItemViewToAnnotation']['get'](_0x43b968);if(!_0x4da82a||!_0x4da82a['target']||!_0x4da82a['targetRect'])return;const _0xca05a7=this['_getTargetTop'](_0x4da82a,_0x4da82a['targetRect']);this['_setItemTop'](_0x43b968,_0xca05a7);}['_getTargetTop'](_0x56a7ca,_0x3b7b19){if(null===_0x3b7b19)return 0x0;if(_0x56a7ca['target']instanceof _0x81943)return _0x3b7b19['top'];{const _0x33bd32=new _0x81943(this['view']['element'])['top'];return _0x3b7b19['top']-_0x33bd32;}}['_setItemTop'](_0x379047,_0x244dec,_0x1301a4=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1301a4&&(_0x244dec=Math['max'](_0x244dec,this['_getMaxAvailableTop'](_0x379047))),_0x379047['top']=_0x244dec;}['_getMaxAvailableTop'](_0x750ec4){let _0x5066ed=this['_getItemBefore'](_0x750ec4),_0x426148=0x0;for(;_0x5066ed;)_0x5066ed['updateHeight'](),_0x426148+=this['_spaceBetweenItems']+_0x5066ed['height'],_0x5066ed=this['_getItemBefore'](_0x5066ed);return _0x426148;}}function G(_0x2df656,_0x490dd8){return Math['max'](_0x2df656-_0x490dd8,0x0);}function g(_0x5cc833){return null!==_0x5cc833&&'object'==typeof _0x5cc833&&0x1===_0x5cc833['nodeType'];}class e extends _0x2ec86c{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x103ccc){super(_0x103ccc),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1392af(),this['_refreshPositioningDebounced']=_0x465268(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x426d31=this['context']['plugins']['get'](j),_0x1ca648=this['context']['plugins']['get'](z);_0x426d31['register']('wideSidebar',this),_0x1ca648['container']&&_0x426d31['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1cbd50){if(_0x1cbd50===this['activeAnnotation'])return;const _0x11caf7=this['context']['plugins']['get'](z);_0x11caf7['_activeAnnotation']=_0x1cbd50;const _0x8c1f79=this['activeAnnotation'];_0x11caf7['refresh']({'blurredAnnotation':_0x8c1f79,'activatedAnnotation':_0x1cbd50}),this['activeAnnotation']=_0x1cbd50;}['attach'](_0x423c07){this['annotations']=_0x423c07;const _0xeb3a53=this['context']['plugins']['get'](z);if(_0xeb3a53['_annotations']=_0x423c07,this['isAttached'])throw new _0x347fe4('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xeb3a53,'set:container',()=>{this['detach'](),this['listenTo'](_0xeb3a53,'change:container',_0x254762=>{_0x254762['off'](),this['attach'](_0x423c07);});}),_0xeb3a53['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x221adb=_0x52227c=>{_0x52227c['updateTargetRect'](),_0xeb3a53['addAnnotation'](_0x52227c);};for(const _0x3a7830 of _0x423c07)_0x221adb(_0x3a7830);this['listenTo'](_0x423c07,'add',(_0x944acc,_0xd101bb)=>{_0x221adb(_0xd101bb);}),this['listenTo'](_0x423c07,'remove',(_0x2c9a79,_0x284c80,_0x908bb8)=>{_0xeb3a53['rearrange']({'removedAnnotation':_0x284c80,'previousAnnotation':_0x423c07['get'](_0x908bb8-0x1),'nextAnnotation':_0x423c07['get'](_0x908bb8+0x1)}),_0x284c80===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x423c07,'focus',(_0x20ab65,_0x3d380e)=>{this['setActiveAnnotation'](_0x3d380e);}),this['listenTo'](_0x423c07,'blur',()=>{this['setActiveAnnotation'](null);});const _0x451e58=this['context']instanceof _0x385f51?this['context']['editors']:new _0x1392af([this['context']]);for(const _0x2f5442 of _0x451e58)this['_integrateWithEditorAnnotations'](_0x2f5442);this['listenTo'](_0x451e58,'add',(_0x3b3a78,_0x1153e1)=>{this['listenTo'](_0x1153e1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1153e1);});}),this['listenTo'](_0x451e58,'remove',(_0x1dc08,_0xf82c25)=>{_0xf82c25['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xf82c25['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x347fe4('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3e1f83=this['context']['plugins']['get'](z);_0x3e1f83['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3e1f83),this['stopListening'](this['annotations']),this['context']instanceof _0x385f51&&this['stopListening'](this['context']['editors']);for(const _0x5044e9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5044e9);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1790d4){if(!_0x1790d4['plugins']['has']('EditorAnnotations'))return;const _0xe00ab2=_0x1790d4['plugins']['get']('EditorAnnotations'),_0x533cad=()=>{const _0x1ca1e7=_0xe00ab2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1ca1e7[0x0]||null);};this['listenTo'](_0xe00ab2,'refresh',_0x533cad),this['listenTo'](_0xe00ab2,'blur',(_0x3a761e,{isAnnotationTracked:_0x4a8c4e})=>{this['activeAnnotation']&&_0x4a8c4e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe00ab2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4f3604=>{_0xe00ab2['hasDomSelection']()&&(_0x533cad(),_0x4f3604['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xe00ab2);}['_destroyEditorAnnotationsIntegration'](_0x10c45a){this['stopListening'](_0x10c45a),this['_editorAnnotations']['remove'](_0x10c45a);}}class C extends _0x488b97{['counterView'];constructor(_0x1d563b){super(_0x1d563b);const _0x540a22=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3a0fcd,_0x6c79f7)=>_0x3a0fcd?'...':_0x6c79f7['toString']()),this['set']('annotationType',''),this['icon']=_0x2c05f7,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x540a22['to']('annotationType',_0x157f29=>'ck-annotation-counter__badge--'+_0x157f29),_0x540a22['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x540a22['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2ec86c{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x48819c){super(_0x48819c),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x44d67b())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1392af(),this['_refreshPositioningDebounced']=_0x465268(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5d1d61(this['context']['locale']),this['balloonPanelView']=new _0x48dfaf(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x328cbd){this['annotations']=_0x328cbd;const _0x47742f=this['context']['plugins']['get'](z),_0xe79486=this['balloonPanelView'];if(_0x47742f['_annotations']=_0x328cbd,this['isAttached'])throw new _0x347fe4('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x47742f,'set:container',()=>{this['detach'](),this['listenTo'](_0x47742f,'change:container',_0x4b44dc=>{_0x4b44dc['off'](),this['attach'](_0x328cbd);});}),_0x47742f['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2ca862=_0x1e3b5b=>{const _0x2ba5d5=new C(this['context']['locale']);_0x47742f['addAnnotation'](_0x1e3b5b,_0x2ba5d5),this['_annotationToNarrowView']['set'](_0x1e3b5b,_0x2ba5d5),_0x2ba5d5['bind']('isDirty','annotationType','number')['to'](_0x1e3b5b['view'],'isDirty','type','length'),_0x2ba5d5['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xe79486['content']['first']!==_0x1e3b5b['view']?(this['_showBalloon'](_0x1e3b5b),_0x1e3b5b['view']['element']['focus'](),this['setActiveAnnotation'](_0x1e3b5b)):this['setActiveAnnotation'](null);});};for(const _0x5bb324 of _0x328cbd)_0x2ca862(_0x5bb324);this['listenTo'](_0x328cbd,'add',(_0x304ed4,_0x19d39d)=>{_0x2ca862(_0x19d39d);}),this['listenTo'](_0x328cbd,'remove',(_0x67b9a4,_0x480eb7,_0x536a1e)=>{this['_annotationToNarrowView']['get'](_0x480eb7)['destroy'](),this['_annotationToNarrowView']['delete'](_0x480eb7),_0x47742f['rearrange']({'removedAnnotation':_0x480eb7,'previousAnnotation':_0x328cbd['get'](_0x536a1e-0x1),'nextAnnotation':_0x328cbd['get'](_0x536a1e+0x1)}),_0x480eb7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x328cbd,'focus',(_0x27a5f0,_0x3564f2)=>{this['setActiveAnnotation'](_0x3564f2);}),this['listenTo'](_0x328cbd,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x27bd9c,_0x1a9262)=>{_0x1a9262['keyCode']===_0x23a2b3['esc']&&_0xe79486['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xe79486['content']['first']),this['_hideBalloon'](),_0x1a9262['stopPropagation'](),_0x1a9262['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x574b1f,_0x4c679e)=>{const _0xa4606e=_0x4c679e['target'];_0xe79486['isVisible']&&_0xe79486['element']['contains'](_0xa4606e)||_0x47742f['view']['element']['contains'](_0xa4606e)||_0x574b1f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3bb33e=>_0x3bb33e['contains'](_0xa4606e))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x8f02ae=this['context']instanceof _0x385f51?this['context']['editors']:new _0x1392af([this['context']]);for(const _0x5820e8 of _0x8f02ae)this['_integrateWithEditorAnnotations'](_0x5820e8);this['listenTo'](_0x8f02ae,'add',(_0x3797cf,_0x3d912a)=>{this['listenTo'](_0x3d912a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3d912a);});}),this['listenTo'](_0x8f02ae,'remove',(_0x4a77ed,_0x4e11c7)=>{_0x4e11c7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4e11c7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2ce00a){if(_0x2ce00a===this['activeAnnotation'])return;const _0x29226b=this['context']['plugins']['get'](z);if(_0x29226b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2ce00a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2ce00a)_0x29226b['getSidebarItemView'](_0x2ce00a)?this['_showBalloon'](_0x2ce00a):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2ce00a;}['detach'](){if(!this['isAttached'])throw new _0x347fe4('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5bdb01=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x57acaf=>_0x57acaf['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5bdb01['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x385f51&&this['stopListening'](this['context']['editors']);for(const _0x4c21a3 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4c21a3);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'](_0x48d253){if(!_0x48d253['plugins']['has']('EditorAnnotations'))return;const _0x9eda5=_0x48d253['plugins']['get']('EditorAnnotations'),_0x332ca6=this['context']['plugins']['get'](z),_0x2600af=this['annotations'],_0x41effd=this['balloonPanelView'],_0x883f3e=()=>{const _0x4b504f=_0x9eda5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4b504f),this['setActiveAnnotation'](_0x4b504f[0x0]||null);};this['listenTo'](_0x9eda5,'refresh',_0x883f3e),this['listenTo'](_0x9eda5,'blur',(_0x5a37d6,{isAnnotationTracked:_0x1af4bd})=>{this['activeAnnotation']&&_0x1af4bd(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x9eda5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2600af,'blur',_0x162314=>{_0x9eda5['hasDomSelection']()&&_0x162314['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x12b3b5,_0x465b4d)=>{const _0x1d1ae3=_0x465b4d['target'];_0x41effd['isVisible']&&_0x41effd['element']['contains'](_0x1d1ae3)||_0x332ca6['view']['element']['contains'](_0x1d1ae3)||this['activeAnnotation']&&_0x9eda5['hasDomSelection']()&&(_0x883f3e(),_0x12b3b5['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x9eda5);}['_destroyEditorAnnotationsIntegration'](_0x2f3f98){_0x2f3f98&&(this['stopListening'](_0x2f3f98),this['_editorAnnotations']['remove'](_0x2f3f98));}['_setSelectedAnnotations'](_0x546585){for(const _0x31bab0 of this['_selectedAnnotations'])_0x546585['includes'](_0x31bab0)||this['_manuallyClosedAnnotationViews']['delete'](_0x31bab0['view']);this['_selectedAnnotations']=_0x546585;}['_refreshPositioning'](){const _0x2cbe12=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x2cbe12['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3f10d7){if(this['_manuallyClosedAnnotationViews']['has'](_0x3f10d7['view']))return;const _0x393bd4=this['balloonPanelView']['content']['first'];_0x393bd4!==_0x3f10d7['view']?(_0x393bd4&&this['_detachListeners'](_0x393bd4),this['_attachListeners'](_0x3f10d7['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3f10d7['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x31bf6e=this['balloonPanelView']['content']['first'],_0x3e1421=_0x31bf6e&&this['annotations']['getByView'](_0x31bf6e);if(!_0x3e1421||!this['_annotationToNarrowView']['has'](_0x3e1421))return;const _0x2b0bcc=this['_annotationToNarrowView']['get'](_0x3e1421)['element'],_0x2455c5=(function(){const _0x1db76e=_0x48dfaf['defaultPositions'];return[_0x1db76e['southArrowNorthEast'],_0x1db76e['northArrowSouthEast'],_0x1db76e['southArrowNorth'],_0x1db76e['northArrowSouth'],_0x1db76e['southArrowNorthWest'],_0x1db76e['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2b0bcc,'positions':_0x2455c5});}['_hideBalloon'](){const _0x418cf8=this['balloonPanelView'],_0x5a93b3=_0x418cf8['content']['first'];_0x5a93b3&&(this['_detachListeners'](_0x5a93b3),_0x418cf8['unpin'](),_0x418cf8['content']['clear']());}['_attachListeners'](_0x3d845b){this['listenTo'](_0x3d845b,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3d845b,'Esc',(_0x4675b2,_0x14864e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3d845b),this['_hideBalloon'](),_0x14864e();});}['_detachListeners'](_0x3d635d){this['stopListening'](_0x3d635d);}}class c extends _0x329b6e{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x513a27,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x578892){super(_0x578892),_0x578892['editing']['view']['addObserver'](_0x2aa71a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x578892['plugins']['get'](_0x513a27),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x325190=this['editor']['plugins']['get'](j);_0x325190['context']===this['editor']&&(_0x325190['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x9006f,_0x68db1e)=>{const _0xe5e4f2=this['_balloon'];if(this['isAttached']&&_0xe5e4f2['visibleView']){const _0x3b8770=this['annotations']['getByView'](_0xe5e4f2['visibleView']);_0x3b8770&&this['_closeAnnotation'](_0x3b8770),_0x68db1e();}}));}['afterInit'](){const _0x227bc6=this['editor']['plugins']['get'](j);_0x227bc6['context']===this['editor']&&(_0x227bc6['hasActive']()||_0x227bc6['switchTo']('inline'));}['setActiveAnnotation'](_0xc24fd4){_0xc24fd4!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0xc24fd4&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0xc24fd4)&&this['_addAnnotationToBalloon'](_0xc24fd4,!0x0),_0xc24fd4['isActive']=!0x0),_0xc24fd4||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0xc24fd4);}['attach'](_0x589372){this['annotations']=_0x589372;const _0x19ca8d=this['editor']['plugins']['get'](j),_0x59a86a=this['_balloon'];if(this['isAttached'])throw new _0x347fe4('inlineannotations-attach-already-attached',this);if(_0x19ca8d['context']!==this['editor'])throw new _0x347fe4('inlineannotations-not-allowed-with-context',this);const _0x2d5e5e=this['editor']['plugins']['get'](b);this['listenTo'](_0x2d5e5e,'refresh',()=>{const _0xe6a98c=_0x2d5e5e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x189c17,_0x217f93;!this['_forceRefresh']&&(_0x189c17=_0xe6a98c,_0x217f93=this['_selectedAnnotations'],_0x189c17['length']===_0x217f93['length']&&_0x189c17['every'](_0x2de5c1=>_0x217f93['includes'](_0x2de5c1)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xe6a98c),this['setActiveAnnotation'](_0xe6a98c[0x0]||null));}),this['listenTo'](_0x2d5e5e,'blur',(_0x8c1bb7,{isAnnotationTracked:_0xd49946})=>{this['activeAnnotation']&&_0xd49946(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2ca4e9,_0x29c4be,_0x139c74)=>{_0x139c74||this['setActiveAnnotation'](null);}),this['listenTo'](_0x589372,'remove',(_0x2ca76e,_0x502839)=>{this['_removeAnnotationFromBalloon'](_0x502839),_0x502839===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x59a86a,'change:visibleView',(_0x104e39,_0x11061d,_0x26c419,_0x528687)=>{_0x528687&&this['stopListening'](_0x528687);const _0xec124e=_0x589372['getByView'](_0x26c419);_0x26c419&&_0xec124e&&(this['listenTo'](_0x26c419,'change:height',()=>{_0x59a86a['updatePosition']();}),this['listenTo'](_0x26c419,'Esc',()=>{this['_closeAnnotation'](_0xec124e),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xec124e&&this['setActiveAnnotation'](_0xec124e));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x59a86a['visibleView']&&(_0x589372['getByView'](_0x59a86a['visibleView'])&&_0x59a86a['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 _0x347fe4('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x50a132 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x50a132);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x5a8652){for(const _0x2ae433 of this['_selectedAnnotations'])_0x5a8652['includes'](_0x2ae433)||this['_manuallyClosed']['delete'](_0x2ae433);for(const _0x1ed194 of this['annotations'])_0x5a8652['includes'](_0x1ed194)||this['_removeAnnotationFromBalloon'](_0x1ed194);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x178c79 of _0x5a8652)this['_addAnnotationToBalloon'](_0x178c79);}this['_selectedAnnotations']=_0x5a8652;}['_addAnnotationToBalloon'](_0x3544d5,_0x48025a=!0x1){this['_manuallyClosed']['has'](_0x3544d5)||(this['_addedAnnotations']['has'](_0x3544d5)||this['_balloon']['hasView'](_0x3544d5['view'])||(this['_addedAnnotations']['add'](_0x3544d5),this['_balloon']['add']({'stackId':_0x3544d5['view']['id'],'view':_0x3544d5['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3544d5)}})),_0x48025a&&this['_balloon']['showStack'](_0x3544d5['view']['id']));}['_getBalloonTargetForAnnotation'](_0x3708dc){const _0x4b87f9=_0x3708dc['target'],_0x5b8756=this['editor']['editing']['view'],_0x48a9f4=_0x5b8756['document']['selection']['getFirstRange'](),_0x33560c=_0x5b8756['domConverter']['viewRangeToDom'](_0x48a9f4);if(_0x33560c['collapse'](!0x0),_0x4b87f9){if(_0x4b87f9 instanceof _0x81943)return _0x4b87f9;let _0x29d14a=[];for(const _0x3172fd of _0x4b87f9)_0x29d14a['push'](...F(_0x3172fd['getClientRects']()));_0x29d14a=function(_0x461c3f){const _0x32faf0=[];let _0x51e788=_0x461c3f[0x0];for(let _0x47c122=0x1;_0x47c122<_0x461c3f['length'];_0x47c122++)P(_0x51e788,_0x461c3f[_0x47c122])?_0x51e788['width']+=_0x461c3f[_0x47c122]['width']:(_0x32faf0['push'](_0x51e788),_0x51e788=_0x461c3f[_0x47c122]);return _0x32faf0['push'](_0x51e788),_0x32faf0;}(_0x29d14a);const _0x193110=_0x33560c['getBoundingClientRect']();return _0x29d14a['find'](_0x3060c9=>_0x3060c9['top']<=_0x193110['top']&&_0x3060c9['bottom']>=_0x193110['bottom']&&_0x3060c9['left']<=_0x193110['left']&&_0x3060c9['right']>=_0x193110['right'])||_0x29d14a[0x0];}return _0x3708dc['targetRect']||_0x33560c;}['_removeAnnotationFromBalloon'](_0x2f0a81){this['_addedAnnotations']['has'](_0x2f0a81)&&this['_balloon']['hasView'](_0x2f0a81['view'])&&(this['_addedAnnotations']['delete'](_0x2f0a81),this['_balloon']['remove'](_0x2f0a81['view']));}['_closeAnnotation'](_0x40f30d){this['_manuallyClosed']['add'](_0x40f30d),this['_removeAnnotationFromBalloon'](_0x40f30d);}}function F(_0x37c448){return Array['from'](_0x37c448)['map'](DOMRect['fromRect']);}function P(_0x678c78,_0x55576e){return _0x678c78['top']===_0x55576e['top']&&_0x678c78['bottom']===_0x55576e['bottom']&&_0x678c78['right']===_0x55576e['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5cdead,_0x429c63){super(_0x5cdead),this['set']('isEmpty',!_0x429c63['length']),this['focusTracker']=new _0x1c22e6(),this['_annotationViews']=_0x429c63,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x11c5b9({'focusables':_0x429c63,'focusTracker':this['focusTracker']}),this['listenTo'](_0x429c63,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x429c63,'remove',(_0x2e0093,_0x38d977)=>{_0x38d977['isActive']&&this['focus'](),_0x429c63['length']||(this['isEmpty']=!0x0);});const _0x15ae9d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x5cdead,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x429c63},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x15ae9d['if']('isEmpty','ck-hidden',_0x20a0a2=>!_0x20a0a2)]},'children':[{'text':N(_0x5cdead,'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 _0x33ae52 of this['_annotationViews'])this['focusTracker']['add'](_0x33ae52['element']);this['_annotationViews']['on']('change',(_0x520ce2,{added:_0x5cd15e,removed:_0x6d64bd})=>{for(const _0x265b84 of _0x5cd15e)this['focusTracker']['add'](_0x265b84['element']);for(const _0x3c29fa of _0x6d64bd)this['focusTracker']['remove'](_0x3c29fa['element']);});}}class p extends _0x2ec86c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x17c7f7){super(_0x17c7f7),this['archivedThreads']=new _0x1392af();}['init'](){const _0x5ecb35=this['context'],_0x1da9fc=_0x5ecb35['plugins']['get'](o),_0x33c49b=_0x5ecb35['plugins']['get'](y);this['listenTo'](_0x1da9fc,'addCommentThread',(_0x5c069f,{threadId:_0x47c8e8})=>{const _0x125195=_0x1da9fc['getCommentThread'](_0x47c8e8);_0x125195['archivedAt']&&this['archivedThreads']['add'](_0x125195,this['_calculatePosition'](_0x125195['archivedAt'])),this['listenTo'](_0x125195,'change:archivedAt',(_0x569929,_0x3002c2,_0xc7060a)=>{_0xc7060a?this['archivedThreads']['has'](_0x125195)||this['archivedThreads']['add'](_0x125195,this['_calculatePosition'](_0x125195['archivedAt'])):this['archivedThreads']['has'](_0x125195)&&this['archivedThreads']['remove'](_0x125195);});}),this['listenTo'](_0x1da9fc,'removeCommentThread',(_0x3ea126,{threadId:_0x1f7732})=>{const _0x3d068a=_0x1da9fc['getCommentThread'](_0x1f7732);this['stopListening'](_0x3d068a),this['archivedThreads']['has'](_0x3d068a)&&this['archivedThreads']['remove'](_0x3d068a);},{'priority':'highest'}),this['listenTo'](_0x33c49b['collection'],'focus',(_0x3adacd,_0x15a7c3)=>{_0x15a7c3['isVisible']||(_0x15a7c3['isActive']=!0x0,_0x33c49b['activate'](_0x15a7c3));});}['_calculatePosition'](_0x981461){const _0xfe92ec=[...this['archivedThreads']]['findIndex'](_0x24c56d=>_0x24c56d['archivedAt']<_0x981461);return _0xfe92ec>-0x1?_0xfe92ec:this['archivedThreads']['length'];}}class a extends _0x329b6e{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1501c1];}constructor(_0x48d09c){super(_0x48d09c),this['annotationViews']=new _0xae4f8e(),this['_pendingThreads']=[];}['init'](){const _0x22398e=this['editor'],_0x36e211=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x22398e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x488b97,!0x0)),_0x22398e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3b6ab4=this['_createCommentsArchiveButton'](_0x5d24e6);return _0x3b6ab4['set']({'role':'menuitemcheckbox'}),_0x3b6ab4;});const _0x2a2d90=_0x22398e['plugins']['get'](p),_0xe383a0=_0x22398e['plugins']['get']('Annotations'),_0x4d1b78=_0x22398e['plugins']['get']('CommentsRepository');_0x2a2d90['archivedThreads']['forEach'](_0x24ce06=>{this['_handleNewThread'](_0x24ce06);}),this['listenTo'](_0x2a2d90['archivedThreads'],'add',(_0x22d072,_0x84f1e9)=>{this['_handleNewThread'](_0x84f1e9);}),this['listenTo'](_0xe383a0['collection'],'add',(_0x505713,_0x231389)=>{const _0x2ee5fb=this['_pendingThreads']['find'](_0x2218c2=>{const _0xd9d2b9=_0x4d1b78['_threadToController']['get'](_0x2218c2);return _0xd9d2b9&&_0x231389['innerView']===_0xd9d2b9['view'];});if(_0x2ee5fb){const _0x389fa5=this['_calculatePosition'](_0x2ee5fb['archivedAt']);this['annotationViews']['add'](_0x231389['view'],_0x389fa5),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2ee5fb),0x1);}}),this['listenTo'](_0x2a2d90['archivedThreads'],'remove',(_0x2d822a,_0x3e44f5)=>{const _0x1381b5=_0x22398e['config']['get']('collaboration.channelId');if(!_0x1381b5||_0x3e44f5['channelId']===_0x1381b5){if(this['_pendingThreads']['includes'](_0x3e44f5))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3e44f5),0x1);else{const _0xf409ee=_0x4d1b78['_threadToController']['get'](_0x3e44f5),_0x44abe6=_0xe383a0['getByInnerView'](_0xf409ee['view']);this['annotationViews']['remove'](_0x44abe6['view']),this['stopListening'](_0x44abe6['focusableElements']);}}}),this['listenTo'](_0xe383a0['collection'],'add',(_0x1a1e80,_0x39f98b)=>{this['listenTo'](_0x39f98b,'escape',_0x36e211);}),this['listenTo'](_0xe383a0['collection'],'remove',(_0x21b7a3,_0x2d93d2)=>{this['stopListening'](_0x2d93d2,'escape',_0x36e211);});}['_handleNewThread'](_0x2c8e26){const _0xe78a98=this['editor']['plugins']['get']('CommentsRepository'),_0x53217e=this['editor']['plugins']['get']('Annotations'),_0x509ee5=this['editor']['config']['get']('collaboration.channelId');if(!_0x509ee5||_0x2c8e26['channelId']===_0x509ee5){const _0x349e80=_0xe78a98['_threadToController']['get'](_0x2c8e26);if(!_0x349e80)return void this['_pendingThreads']['push'](_0x2c8e26);const _0x4ef72c=this['_calculatePosition'](_0x2c8e26['archivedAt']),_0x111b44=_0x53217e['getByInnerView'](_0x349e80['view']);_0x111b44['isVisible']&&_0x53217e['_visibleAnnotations']['remove'](_0x111b44),this['annotationViews']['add'](_0x111b44['view'],_0x4ef72c);}}['_calculatePosition'](_0x5c4fef){const _0x34de5f=this['editor']['config']['get']('collaboration.channelId'),_0x43f4e2=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x17a041=>_0x17a041['channelId']===_0x34de5f)['findIndex'](_0x5efe63=>_0x5efe63['archivedAt']<_0x5c4fef);return _0x43f4e2<0x0||_0x43f4e2>this['annotationViews']['length']?this['annotationViews']['length']:_0x43f4e2-0x1;}['_toggleDialog'](){const _0x19dbca=this['editor'],_0x2a7c0e=_0x19dbca['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x19dbca['locale'],this['annotationViews'])),'commentsArchive'===_0x2a7c0e['id']?_0x2a7c0e['hide']():_0x2a7c0e['show']({'id':'commentsArchive','title':N(_0x19dbca['locale'],'COMMENTS_ARCHIVE'),'icon':_0x430f4a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3a3406['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3375de,_0x4185c8=!0x1){const _0x18dc53=this['editor']['locale'],_0xb6be39=this['editor']['plugins']['get']('Dialog'),_0x448b3f=new _0x3375de(_0x18dc53);return _0x448b3f['bind']('isEnabled')['to'](this,'isEnabled'),_0x448b3f['bind']('isOn')['to'](_0xb6be39,'id',_0x1d6224=>'commentsArchive'===_0x1d6224),_0x448b3f['set']({'label':N(_0x18dc53,'COMMENTS_ARCHIVE'),'icon':_0x430f4a,'isToggleable':!0x0}),_0x4185c8&&(_0x448b3f['tooltip']=!0x0),this['listenTo'](_0x448b3f,'execute',()=>this['_toggleDialog']()),_0x448b3f;}['_hideDialogOnAnnotationEscape']=_0x3bcc96=>{const _0x5a21da=_0x3bcc96['source'];if(!this['annotationViews']['has'](_0x5a21da['view']))return;const _0x221487=this['editor']['plugins']['get']('Dialog');_0x221487['isOpen']&&'commentsArchive'===_0x221487['id']&&(_0x221487['hide'](),_0x3bcc96['stop']());};}class gi extends _0x329b6e{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x4bc0e5,ContextPlugin as _0x3f106c,PendingActions as ht,Command as _0x7f5ae3,Plugin as _0x1a45c0,Context as _0x41d3ee}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x166ad1,uid as _0x27956d,KeystrokeHandler as jt,FocusTracker as _0x34c795,diff as _0x27fecb,Collection as _0x4550ea,Rect as _0x415c3c,CKEditorError as _0x160abe,first as _0x31f99c,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x3d333e,keyCodes as _0x1fca4c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x54cc69,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1aaf7c,trimHtml as ts,LateFocusDropdownButtonView as _0x1d5b3a,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x332df9}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as Ct,debounce as _0x35cf6e}from'es-toolkit/compat';import{IconUndo as _0x41ae24,IconCheck as _0x2370eb,IconPencil as _0x44cb21,IconRemoveComment as _0x1786d4,IconThreeVerticalDots as _0x5b8bc6,IconAddComment as _0x54774b,IconCommentsArchive as _0x3bc011}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x230040,ButtonView as _0x4cc9f4,ViewCollection as _0x1bac6b,createDropdown as _0x641072,ListView as _0x23c5f3,focusChildOnDropdownOpen as _0xd80ee5,ListItemView as _0x3a773c,MenuBarMenuListItemButtonView as _0x353c38,BodyCollection as _0x394631,BalloonPanelView as _0x7586f9,ContextualBalloon as _0x5a5023,Dialog as _0x3a9f1b,DialogViewPosition as _0x23317a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x96ebaf}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x5f5a8d}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x58281d}from'@ckeditor/ckeditor5-widget/dist/index.js';class yt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x166ad1(){['model'];['view'];constructor(_0xfdbbe2,_0x59ec02){super(),this['model']=_0xfdbbe2,this['model']['_isAttached']=!0x0,this['view']=_0x59ec02,this['listenTo'](_0x59ec02,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x59ec02,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x59ec02,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x59ec02,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x59ec02,'addComment',(_0x575669,_0xde38a8)=>this['addComment'](_0xde38a8)),this['listenTo'](_0x59ec02,'updateComment',(_0xd43ab4,_0x352d73,_0x51bc89)=>this['updateComment'](_0x352d73,_0x51bc89)),this['listenTo'](_0x59ec02,'removeComment',(_0xc3923b,_0x2e91fe)=>this['removeComment'](_0x2e91fe));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x160c1a){this['model']['addComment']({'content':_0x160c1a,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3021d8,_0x5b6381){this['model']['getComment'](_0x3021d8)['update']({'content':_0x5b6381});}['removeComment'](_0xb2de10){this['model']['getComment'](_0xb2de10)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x2a43eb,_0x38cf05,_0x22f375){const t=_0x2a43eb['t'];switch(_0x38cf05){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'},_0x22f375);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x22f375);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'},_0x22f375);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'},_0x22f375);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x22f375);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'},_0x22f375);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'},_0x22f375);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'},_0x22f375);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x2391c9,_0x38ebfe){super(_0x2391c9);const _0x265a13=_0x27956d();this['main']=this['createCollection'](),this['editable']=new Vt(_0x2391c9,_0x38ebfe,void 0x0,{'label':()=>N(_0x2391c9,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x2391c9['uiLanguageDirection'],'lang':_0x2391c9['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x265a13},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x38c7f5){super(_0x38c7f5),this['view']=new Rt(_0x38c7f5['locale'],_0x38c7f5['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x36beca=this['editor']['editing']['view'],_0x41c8ad=this['view']['editable'],_0x55a0c5=_0x36beca['document']['getRoot']();_0x41c8ad['name']=_0x55a0c5['rootName'],this['view']['render']();const _0x544647=_0x41c8ad['element'];this['setEditableElement'](_0x41c8ad['name'],_0x544647),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x36beca['attachDomRoot'](_0x544647),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x166ad1(_0x4bc0e5){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x213574={}){function _0x7eed12(_0x21fe2c){return _0x21fe2c['map'](_0x655f1d=>String['fromCharCode'](_0x655f1d))['join']('');}(_0x213574=Object['assign']({},_0x213574))['plugins']||(_0x213574['plugins']=Qt['defaultPlugins']),super(_0x213574),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x7eed12([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x7eed12([0x76,0x69,0x65,0x77])][_0x7eed12([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x7eed12([0x61,0x75,0x74,0x6f]),this[_0x7eed12([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x7eed12([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x7eed12([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x7eed12([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x7eed12([0x6f,0x6b])});}['create'](){const _0x4262d4=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4262d4))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x547b91=>{const _0x576861=this['model']['document']['getRoot'](),_0x54f6e8=_0x576861&&_0x576861['getChild'](_0x576861['childCount']-0x1);_0x547b91['setSelection'](_0x54f6e8,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xd3d49a=this['editing']['view'],_0x5db9e5=_0xd3d49a['document']['getRoot'](),_0x1e80f4=_0x5db9e5['getChild'](0x0);_0x5db9e5['childCount']>0x1||!_0x1e80f4||'p'!=_0x1e80f4['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0xd3d49a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1e80f4['placeholder']=this['placeholder']),St({'view':_0xd3d49a,'element':_0x1e80f4,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1e80f4);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x46fccc,_0x54afa5={}){super(_0x46fccc),this['editor']=null,this['_editorConfig']=_0x54afa5,this['set']('value',_0x54afa5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x46fccc,'Reply...')),this['set']('submitLabel',N(_0x46fccc,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x34c795(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x2728e5,_0x34c73c)=>{this['cancelButtonView']['fire']('execute'),_0x34c73c();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5e87f0,_0x5212f9)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5212f9());}),this['on']('submit',(_0xbfe02a,_0x36ba51)=>{_0x36ba51['length']>0xfde8?(alert(N(_0x46fccc,'TOO_LONG_COMMENT_ALERT',[_0x36ba51['length'],0xfde8])),_0xbfe02a['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x54da1a=this['editor'];this['element']['insertBefore'](_0x54da1a['ui']['element'],this['element']['firstChild']),_0x54da1a['model']['document']['on']('change',()=>this['value']=_0x54da1a['getData']()),_0x54da1a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x54da1a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5b0b9b){-0x1===_0x5b0b9b?(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:_0x28439a}=this,_0xc2e46c=new _0x4cc9f4(_0x28439a);return _0xc2e46c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xc2e46c['withText']=!0x0,_0xc2e46c['bind']('label')['to'](this,'submitLabel'),_0xc2e46c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xc2e46c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2125f5,_0x23ce49)=>!_0x23ce49&&!!_0x2125f5['trim']()),_0xc2e46c;}['_createCancelButton'](){const {locale:_0x1ce9b}=this,_0x5e4d46=new _0x4cc9f4(_0x1ce9b);return _0x5e4d46['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x5e4d46['label']=N(_0x1ce9b,'Cancel'),_0x5e4d46['withText']=!0x0,_0x5e4d46['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x5e4d46;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3301b8=>{this['focusTracker']['add'](_0x3301b8['element']);}),this['focusables']['on']('change',(_0x13ac12,_0xef00dc)=>{for(const _0x384785 of Array['from'](_0xef00dc['added'])['reverse']())this['focusTracker']['add'](_0x384785['element']);});}}class ie extends kt{constructor(_0x5cb777,_0x4338bc,_0x50f1f9){super(_0x5cb777),this['commentInputView']=new es(_0x5cb777,_0x50f1f9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x297c8c,_0x3791ae)=>_0x297c8c||!!_0x3791ae),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 _0x54cc69(_0x5cb777,_0x4338bc),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'](_0x516f35){this['commentInputView']['focus'](_0x516f35);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2ae627,_0x2d2e34)=>{const {submitButtonView:_0x3ca2e1,cancelButtonView:_0x200c3b,editor:_0x39aad1}=this['commentInputView'];[_0x3ca2e1['element'],_0x200c3b['element'],_0x39aad1?_0x39aad1['editing']['view']['getDomRoot']():null]['filter'](_0x51fc8f=>_0x51fc8f)['some'](_0x290ec6=>_0x290ec6['contains'](_0x2d2e34['target']))||(this['focus'](),_0x2d2e34['preventDefault']());});}}class os extends kt{constructor(_0x167b1f){super(_0x167b1f);const _0x42d07e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x42d07e['to']('count',_0x279e7e=>N(_0x167b1f,'NUMBER_OF_COMMENTS',_0x279e7e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x52bf51,_0x4c4e29,_0x5a17e7){super(_0x52bf51);const _0x5650e0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4c4e29['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4c4e29,this['_config']=_0x5a17e7,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1a8040=>this['commentViews']['map'](_0x1ce1f7=>_0x1ce1f7['element'])['includes'](_0x1a8040['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x52bf51),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x35157c=>_0x35157c-this['_config']['maxCommentsWhenCollapsed']);for(const _0x31948c of _0x4c4e29['comments'])this['_handleNewCommentModel'](_0x31948c);this['_handleInfoComment'](),this['listenTo'](_0x4c4e29['comments'],'add',(_0x171d7f,_0x45f6d1)=>{const _0x8a30d6=this['_calculatePosition'](_0x45f6d1);this['length']++,this['_handleNewCommentModel'](_0x45f6d1,_0x8a30d6),this['refreshVisibleViews']();}),this['listenTo'](_0x4c4e29['comments'],'remove',(_0x5d543c,_0x598b97)=>{this['length']--,this['_handleRemoveCommentModel'](_0x598b97),this['refreshVisibleViews']();}),this['listenTo'](_0x4c4e29,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4c4e29,'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',_0x5650e0['if']('length','ck-hidden',_0x255db3=>!_0x255db3)],'aria-label':N(_0x52bf51,'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'](_0x135f18){-0x1===_0x135f18?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x59eba0 of this['commentViews'])_0x59eba0['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x266c0a,_0x569c2f){const _0x2f9dc8=new this['_config']['CommentView'](this['locale'],_0x266c0a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x2f9dc8['viewUid']=_0x266c0a['id'],_0x2f9dc8['delegate']('removeComment')['to'](this),_0x2f9dc8['delegate']('updateComment')['to'](this),_0x2f9dc8['delegate']('resolveCommentThread')['to'](this),_0x2f9dc8['delegate']('editorReady')['to'](this),_0x2f9dc8['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x2f9dc8,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x2f9dc8,_0x569c2f);}['_calculatePosition'](_0x142540){const _0x3d2051=this['_model']['_findOptimalIndex'](_0x142540);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x142540['authoredAt']?_0x3d2051-0x1:_0x3d2051:_0x3d2051-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x431cdf={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x431cdf,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x431cdf));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5847ec){const _0x549e0d=this['commentViews']['remove'](_0x5847ec['id']);this['stopListening'](_0x549e0d),_0x549e0d['isEditMode']&&this['_updateHasDirtyComment'](),_0x549e0d['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x931953=>_0x931953['isEditMode']);}['_rearrangeCollapse'](){const _0x3f8d65=function(_0x1fc3f9){const _0x52e418=new _0x4550ea();for(const _0x3966d7 of _0x1fc3f9)_0x52e418['add'](_0x3966d7);return _0x52e418;}(this['commentViews']),_0x48a9a6=this['_collapsedCommentsView']['count'];for(let _0x16ee85=0x1;_0x16ee85<=_0x48a9a6;_0x16ee85++)_0x3f8d65['remove'](0x1);for(const _0x2775d5 of _0x3f8d65)_0x2775d5['collapse']();_0x48a9a6>0x0&&_0x3f8d65['add'](this['_collapsedCommentsView'],0x1),rs(_0x27fecb(Array['from'](this['visibleViews']),Array['from'](_0x3f8d65)),this['visibleViews'],_0x3f8d65);}['_rearrangeExpand'](){rs(_0x27fecb(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1e36b1 of this['visibleViews'])_0x1e36b1['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x395999=>{this['focusTracker']['add'](_0x395999['element']),this['keystrokes']['listenTo'](_0x395999['element']);}),this['commentViews']['on']('change',(_0x33356e,_0xc85242)=>{for(const _0x55e5d8 of _0xc85242['removed'])this['focusTracker']['remove'](_0x55e5d8['element']),this['keystrokes']['stopListening'](_0x55e5d8['element']);for(const _0xb6ba0d of Array['from'](_0xc85242['added'])['reverse']())this['focusTracker']['add'](_0xb6ba0d['element']),this['keystrokes']['listenTo'](_0xb6ba0d['element']);});}}function rs(_0xa027a3,_0x5a39ad,_0x3293c8){let _0x2c45d2=0x0;for(const _0x490648 of _0xa027a3)switch(_0x490648){case'insert':_0x5a39ad['add'](_0x3293c8['get'](_0x2c45d2),_0x2c45d2),_0x2c45d2++;break;case'delete':_0x5a39ad['remove'](_0x2c45d2);break;case'equal':_0x2c45d2++;}}class oe extends kt{constructor(_0x24dbd3){super(_0x24dbd3);const _0x63be8c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x63be8c['to']('contextValue',_0x429591=>N(_0x24dbd3,'THREAD_CONTEXT_LABEL',_0x429591)),'tabindex':-0x1},'children':[{'text':_0x63be8c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x44670f,_0x3c0f29){super(_0x44670f);const _0x27c6af=this['bindTemplate'];this['_model']=_0x3c0f29,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x110acc=>!!_0x110acc),this['bind']('contextValue')['to'](this['_model'],'context',_0x190673=>_0x190673&&_0x190673['value']?this['_trimContextValue'](_0x190673['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x27c6af['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 _0x450c38=new _0x4cc9f4(this['locale']);return _0x450c38['label']=N(this['locale'],'Reopen'),_0x450c38['tooltip']=N(this['locale'],'Reopen'),_0x450c38['icon']=_0x41ae24,_0x450c38['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x35daa8=>!_0x35daa8),_0x450c38['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x23728f,_0x2d9c9d)=>_0x23728f&&_0x2d9c9d),_0x450c38['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x450c38;}['_trimContextValue'](_0x30ed6f){if(_0x30ed6f['length']<0x96)return _0x30ed6f;const _0x3cb9b8=_0x30ed6f['lastIndexOf']('\x20',0x93);return _0x30ed6f['substring'](0x0,_0x3cb9b8>-0x1?_0x3cb9b8:0x93)+'...';}['_attachContextActions'](){const _0x9c79a4=this['element']['querySelector']('.ck-context'),_0x2d3270=_0x9c79a4['querySelector']('.ck-context__value');this['listenTo'](_0x9c79a4,'mouseenter',()=>{_0x2d3270['offsetWidth']<_0x2d3270['scrollWidth']&&_0x9c79a4['classList']['add']('overlay');}),this['listenTo'](_0x9c79a4,'mouseleave',()=>{_0x9c79a4['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x373bdc of this['focusables'])this['focusTracker']['add'](_0x373bdc['element']),this['keystrokes']['listenTo'](_0x373bdc['element']);}['_createContextView'](){const _0x38b546=new oe(this['locale']);return _0x38b546['bind']('contextValue')['to'](this),_0x38b546;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1c5595,_0x50e15d,_0xd8985e,_0x4ef892){super(_0x1c5595),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x50e15d,this['_localUser']=_0xd8985e,this['_config']=_0x4ef892,this['commentThreadHeaderView']=new Xt(_0x1c5595,_0x50e15d),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1c5595,N(_0x1c5595,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1c5595,_0x50e15d,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4ef892)),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',(_0x29415d,_0x4eb96f)=>_0x29415d||!!_0x4eb96f),this['bind']('isUnlinked')['to'](_0x50e15d,'unlinkedAt',_0x1d9814=>!!_0x1d9814),this['bind']('ariaLabel')['to'](this,'length',_0x33a302=>{const _0x4099e3=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x33a302,_0x4099e3]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5309d9=>_0x5309d9['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x52da04=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x511fec=_0x52da04['commentInputView'];return _0x52da04['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x511fec,'value',(_0x1909e1,_0x1355e9,_0x17f3aa,_0x5272d3,_0x4feb0c)=>!!_0x4feb0c||!!_0x5272d3&&_0x17f3aa&&!_0x1355e9||_0x1909e1&&_0x17f3aa&&!_0x1355e9),_0x511fec['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x24728a,_0x1af88c,_0x177baf)=>{let _0x126ea0;return _0x126ea0=_0x177baf&&_0x1af88c?'Reply\x20to\x20reopen\x20discussion...':_0x24728a?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x126ea0);}),_0x511fec['bind']('submitLabel')['to'](this,'length',_0x1bbce3=>N(this['locale'],_0x1bbce3?'Reply':'Comment')),_0x511fec['on']('submit',(_0x44d8f8,_0x2781e3)=>{this['fire']('addComment',_0x2781e3),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x511fec['on']('cancel',()=>{this['focus']();}),_0x511fec['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x511fec['on']('cancel',_0x5b2a4b=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5b2a4b['stop']());}),this['on']('change:isActive',(_0x53f833,_0x57a88d,_0x48f16b)=>{_0x48f16b||this['length']||_0x511fec['value']||this['fire']('removeCommentThread');}),_0x52da04;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x13374f,_0x31409f,_0x40c775,_0x2b233e){super(_0x13374f,_0x31409f,_0x40c775,_0x2b233e),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x13374f,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0xc0e74b,_0x17bb17,_0x379b66)=>{_0x379b66||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3cd96d,_0x2e9edd,_0x5309cc)=>{_0x5309cc&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x5e2219=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x5e2219['if']('isActive','ck-thread--active'),_0x5e2219['if']('isUnlinked','ck-thread--unlinked'),_0x5e2219['if']('isConfirm','ck-thread--remove-confirmation'),_0x5e2219['to']('actionIndicator',_0x4a5b43=>_0x4a5b43?'ck-thread--'+_0x4a5b43:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x5e2219['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 _0x3c5d7f of this['commentsListView']['commentViews'])_0x3c5d7f['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x533474}=this,_0x1bab42=this['commentsListView']['commentViews']['get'](0x0);_0x1bab42===this['_boundFirstCommentView']||_0x1bab42['isSystemComment']||(this['_boundFirstCommentView']=_0x1bab42,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1bab42,'actionIndicator',_0x582079=>'remove'===_0x582079?'remove':null),_0x1bab42['placeholder']=N(_0x533474,'Write\x20a\x20comment...'),_0x1bab42['removeButton']['on']('execute',_0x4a3fca=>{_0x4a3fca['stop'](),this['showConfirm'](N(_0x533474,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1bab42['focus']();}),_0x1bab42['actionBar']['add'](this['resolveButton'],0x0),_0x1bab42['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x20d843=new _0x1aaf7c(this['locale']);return _0x20d843['label']=N(this['locale'],'Resolve'),_0x20d843['tooltip']=N(this['locale'],'Resolve'),_0x20d843['icon']=_0x2370eb,_0x20d843['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x20d843['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x409485=>!_0x409485),_0x20d843['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x12a833,_0x4c4609)=>_0x12a833&&!_0x4c4609),_0x20d843['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x20d843;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x11ad18){super(_0x11ad18),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x903501,_0x16431c,_0x141111)=>{this['element']['innerHTML']=_0x141111;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x277e4f,_0x195658,_0x3996e1){super(_0x277e4f),this['_model']=_0x195658,this['_config']=_0x3996e1,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x195658,'content',_0x195658,'authoredAt',(_0x4e5296,_0x2a0f8a)=>N(_0x277e4f,'COMMENT_ARIA_LABEL',[_0x195658['author']['name'],_0x3996e1['formatDateTime'](_0x2a0f8a),new DOMParser()['parseFromString'](_0x4e5296,'text/html')['body']['textContent'],_0x195658['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x277e4f,N(_0x277e4f,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x1bac6b(),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x523dcc=>_0x523dcc['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x5893b2=new is(this['locale']);return _0x5893b2['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x37c76e,_0x410531)=>_0x410531?ts(_0x37c76e,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x37c76e),_0x5893b2;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4c4873=new es(this['locale'],this['_config']['editorConfig']);return _0x4c4873['value']=this['_model']['content'],_0x4c4873['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4c4873['submitLabel']=N(this['locale'],'Save'),_0x4c4873['on']('submit',(_0x39af35,_0x477188)=>{this['fire']('updateComment',this['_model']['id'],_0x477188),this['switchToDisplayMode'](),this['focus']();}),_0x4c4873['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4c4873['once']('editorReady',()=>{_0x4c4873['focus']();}),_0x4c4873['createEditor'](),_0x4c4873['delegate']('editorReady')['to'](this),_0x4c4873['delegate']('editorDestroyed')['to'](this),_0x4c4873;}['_setupKeyboardNavigation'](){const _0x20dd0d=this['element'];this['keystrokes']['listenTo'](_0x20dd0d);for(const _0x11216f of this['focusables'])this['focusTracker']['add'](_0x11216f['element']),this['keystrokes']['listenTo'](_0x11216f['element']);this['focusables']['on']('change',(_0x57e50a,_0x2da2db)=>{for(const _0x4d00d4 of _0x2da2db['removed'])this['focusTracker']['remove'](_0x4d00d4['element']),this['keystrokes']['stopListening'](_0x4d00d4['element']);for(const _0x3c3e53 of _0x2da2db['added'])this['focusTracker']['add'](_0x3c3e53['element']),this['keystrokes']['listenTo'](_0x3c3e53['element']);}),this['keystrokes']['set']('enter',(_0x1c0712,_0x49b695)=>{_0x20dd0d===_0x1c0712['target']&&(this['focusCycler']['focusFirst'](),_0x49b695());}),this['keystrokes']['set']('esc',(_0x5074ee,_0x92684f)=>{_0x20dd0d!==_0x5074ee['target']&&(this['focus'](),_0x92684f());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x6885b4,_0x512f96,_0x1cb3c8){super(_0x6885b4,_0x512f96,_0x1cb3c8),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x6885b4,'Reply...')),this['bind']('authoredAt')['to'](_0x512f96),this['bind']('resolvedAt')['to'](_0x512f96),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 _0x54cc69(_0x6885b4,_0x512f96['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x512f96,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x135345=this['bindTemplate'],_0x8aadc5=[{'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':_0x135345['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x135345['to']('authoredAt',_0x46fca1=>this['_config']['formatDateTime'](_0x46fca1))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x135345['if']('isEditMode','ck-comment__actions--hidden'),_0x135345['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']&&_0x8aadc5['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x135345['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x135345['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x135345['if']('isEditMode','ck-comment--edit'),_0x135345['if']('isSystemComment','ck-comment--info'),_0x135345['to']('actionIndicator',_0x274038=>_0x274038?'ck-comment--'+_0x274038:'')],'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':_0x8aadc5}]}]};}['_createEditButton'](){const _0x5da9ef=new _0x4cc9f4(this['locale']);return _0x5da9ef['label']=N(this['locale'],'Edit'),_0x5da9ef['icon']=_0x44cb21,_0x5da9ef['withText']=!0x0,_0x5da9ef['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5da9ef['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x403302=>!_0x403302),_0x5da9ef['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5da9ef['on']('execute',()=>this['switchToEditMode']()),_0x5da9ef;}['_createRemoveButton'](){const _0x4011ff=new _0x4cc9f4(this['locale']);return _0x4011ff['label']=N(this['locale'],'Remove'),_0x4011ff['icon']=_0x1786d4,_0x4011ff['withText']=!0x0,_0x4011ff['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4011ff['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x595fe0=>!_0x595fe0),_0x4011ff['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4011ff['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4011ff;}['_createDropdown'](){const _0x337002=_0x641072(this['locale'],_0x1d5b3a),_0x270427=_0x337002['panelView']['children'],_0xf78790=new _0x23c5f3(this['locale']),_0x4670ff=_0x337002['bindTemplate'];_0xd80ee5(_0x337002,()=>this['items']['find'](_0x527a39=>_0x527a39['isVisible'])),_0x337002['extendTemplate']({'attributes':{'class':[_0x4670ff['if']('isVisible','ck-hidden',_0x9b58b7=>!_0x9b58b7)]}});const _0x1eb9e2=(_0x4f593d,_0x5220a5=-0x1)=>{const _0x5e887b=new _0x3a773c(this['locale']);_0x5e887b['children']['add'](_0x4f593d);const _0x11aacc=_0x5220a5>-0x1?_0x5220a5:_0xf78790['items']['length'];_0xf78790['items']['add'](_0x5e887b,_0x11aacc);const _0x39f8f6=Array['from'](this['items']);_0x337002['unbind']('isEnabled','isVisible'),_0x337002['bind']('isEnabled')['toMany'](_0x39f8f6,'isEnabled',(..._0x242a48)=>_0x242a48['some'](_0x38f0fe=>_0x38f0fe)),_0x337002['bind']('isVisible')['toMany'](_0x39f8f6,'isVisible',(..._0x29826b)=>_0x29826b['some'](_0x2f3706=>_0x2f3706));};_0x337002['panelPosition']='sw',_0x337002['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x5b8bc6});for(const _0x185647 of this['items'])_0x1eb9e2(_0x185647);return _0x270427['add'](_0xf78790),_0x337002['listenTo'](this['items'],'add',(_0x4ec94b,_0x3859ce,_0x29a1a3)=>{_0x1eb9e2(_0x3859ce,_0x29a1a3);}),_0x337002['listenTo'](this['items'],'remove',(_0x525e14,_0x37eed9,_0x17bf39)=>{_0xf78790['items']['remove'](_0x17bf39);}),_0x337002;}['_attachActions'](_0x3d49aa,_0x36ab19){const _0x28e2d2=_0x3d49aa&&_0x3d49aa['element'];_0x28e2d2&&(this['listenTo'](_0x28e2d2,'mouseenter',()=>this['actionIndicator']=_0x36ab19),this['listenTo'](_0x28e2d2,'focus',()=>this['actionIndicator']=_0x36ab19),this['listenTo'](_0x28e2d2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x28e2d2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x5a4d67=super['_createCommentInputView']();return _0x5a4d67['bind']('placeholder')['to'](this),_0x5a4d67;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x46b725){const _0xe08fd8=Dt(_0x46b725,0x1e),_0x347889=new MutationObserver(_0x144e45=>{for(const _0x1b21db of _0x144e45)('attributes'==_0x1b21db['type']&&'class'==_0x1b21db['attributeName']||'childList'==_0x1b21db['type']||'characterData'==_0x1b21db['type'])&&_0xe08fd8();});return{'attach'(_0x231843){_0x347889['observe'](_0x231843,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x347889['disconnect'](),_0xe08fd8['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x363f76,_0x4b0b15){super(_0x363f76),this['id']=_0x27956d(),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x19606b,_0x4ef155)=>this['fire']('Esc',_0x4ef155)),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'](_0x4b0b15),this['mainView']=_0x4b0b15;const _0x43097e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x43097e['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 _0x1f2ede=this['element']['clientHeight'];_0x1f2ede&&(this['height']=_0x1f2ede);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x166ad1(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x46ec71,target:_0x12c1ad,type:_0x442fc0,isVisible:_0x173073=!0x0}){super(),this['view']=_0x46ec71,this['view']['element']||this['view']['render'](),this['_type']=_0x442fc0,this['_target']=_0x12c1ad,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4550ea([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1410fe,_0x49e086)=>{this['view']['focusTracker']['add'](_0x49e086);}),this['focusableElements']['on']('remove',(_0x1df2f4,_0x30cc21)=>{this['view']['focusTracker']['remove'](_0x30cc21);}),this['set']('isVisible',_0x173073);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x473625=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x473625),_0x473625;}get['targetRect'](){const _0x53ce1c=this['target'];if(null===_0x53ce1c)return null;if(_0x53ce1c instanceof _0x415c3c)return _0x53ce1c;const _0x41d6c8=_0x53ce1c['filter'](_0x684f=>function(_0x30d3ff){const _0x3f7090=_0x30d3ff['offsetParent'];if(_0x3f7090)return!0x0;const _0x4b3b60=_0x30d3ff['getClientRects']()['item'](0x0);return!!_0x4b3b60;}(_0x684f));return 0x0===_0x41d6c8['length']?null:new _0x415c3c(_0x41d6c8[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4193bb){this['view']['isActive']=_0x4193bb,this['view']['mainView']['isActive']=_0x4193bb;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3fd04f){if(!(null===_0x3fd04f||_0x3fd04f instanceof _0x415c3c||Array['isArray'](_0x3fd04f)&&_0x3fd04f['every'](_0x244f21=>fi(_0x244f21))))throw new _0x160abe('annotation-invalid-target',null,{'target':_0x3fd04f});}['_getNormalizedTarget'](){const _0x46c256='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x46c256)?[_0x46c256]:_0x46c256;}}function fi(_0x5a84e1){return null!==_0x5a84e1&&'object'==typeof _0x5a84e1&&'nodeType'in _0x5a84e1&&0x1===_0x5a84e1['nodeType'];}class S extends _0x4550ea{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4391d7=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x34c795(),this['_focusTracker']['on']('change:isFocused',(_0x8d033a,_0xf89188,_0x5f07b3)=>{_0x5f07b3||this['fire']('blur');});for(const _0xe5c56e of _0x4391d7)this['add'](_0xe5c56e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x361c41){if(this['has'](_0x361c41))throw new _0x160abe('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x361c41['innerView'],_0x361c41),this['_viewToAnnotation']['set'](_0x361c41['view'],_0x361c41);for(const _0x27f46b of _0x361c41['focusableElements'])this['_focusTracker']['add'](_0x27f46b);this['listenTo'](_0x361c41['focusableElements'],'add',(_0x5e672b,_0x189475)=>{this['_focusTracker']['add'](_0x189475);}),this['listenTo'](_0x361c41['focusableElements'],'remove',(_0xfdc352,_0x1da963)=>{this['_focusTracker']['remove'](_0x1da963);}),this['listenTo'](_0x361c41['view']['focusTracker'],'change:isFocused',(_0x1036aa,_0x232c14,_0x2ebedd)=>{_0x2ebedd&&this['fire']('focus',_0x361c41);}),_0x361c41['updateTargetRect']();const _0x1c468e=this['_getOrderInContent'](_0x361c41['view']['targetRect']);return super['add'](_0x361c41,_0x1c468e);}['remove'](_0x3aa9e1){if(!this['has'](_0x3aa9e1))throw new _0x160abe('annotationcollection-not-existing-item',null);this['stopListening'](_0x3aa9e1['view']['focusTracker']),this['stopListening'](_0x3aa9e1['focusableElements']);for(const _0x2ec576 of _0x3aa9e1['focusableElements'])this['_focusTracker']['remove'](_0x2ec576);return this['_viewToAnnotation']['delete'](_0x3aa9e1['view']),this['_innerViewToAnnotation']['delete'](_0x3aa9e1['innerView']),super['remove'](_0x3aa9e1);}['getByInnerView'](_0x5edc88){return this['_innerViewToAnnotation']['get'](_0x5edc88);}['getByView'](_0x2106ee){return this['_viewToAnnotation']['get'](_0x2106ee);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1cd0e0 of this)_0x1cd0e0['updateTargetRect']();this['_sort']();}['_sort'](){const _0x410d34=Array['from'](this)['sort']((_0x27a4e9,_0x58911e)=>w(_0x27a4e9['view']['targetRect'],_0x58911e['view']['targetRect']));for(let _0x205a5a=_0x410d34['length']-0x1;_0x205a5a>0x0;_0x205a5a--){const _0x16ca42=_0x410d34[_0x205a5a];_0x205a5a!==this['getIndex'](_0x16ca42)&&(this['remove'](_0x16ca42),this['add'](_0x16ca42));}}['_getOrderInContent'](_0x707393){let _0x168933=0x0;if(!_0x707393)return this['length'];for(const _0x44d4cc of this){const _0x14321a=_0x44d4cc['view']['targetRect'];if(_0x14321a){if(w(_0x707393,_0x14321a)<0x0)return _0x168933;_0x168933++;}}return _0x168933;}}function v({source:_0x1d0462,target:_0x294bc4,filter:_0xdeb797}){for(const _0x2c47c5 of _0x1d0462)_0xdeb797(_0x2c47c5)&&_0x294bc4['add'](_0x2c47c5);_0x294bc4['listenTo'](_0x1d0462,'add',(_0x42e9f0,_0x22ce2a)=>{_0xdeb797(_0x22ce2a)&&_0x294bc4['add'](_0x22ce2a);}),_0x294bc4['listenTo'](_0x1d0462,'remove',(_0x4ecac9,_0x3b0f8c)=>{_0x294bc4['has'](_0x3b0f8c)&&_0x294bc4['remove'](_0x3b0f8c);});}function w(_0x4e02c1,_0x20c38c){if(null===_0x4e02c1&&null===_0x20c38c)return 0x0;if(null===_0x4e02c1)return-0x1;if(null===_0x20c38c)return 0x1;const _0x4a6d84=_0x4e02c1['top']-_0x20c38c['top'];return 0x0==_0x4a6d84?_0x4e02c1['left']-_0x20c38c['left']:_0x4a6d84;}class y extends _0x3f106c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf4bc0c){if(super(_0xf4bc0c),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xf4bc0c instanceof _0x4bc0e5){const _0x3ddd6a=_0xf4bc0c['locale'];_0xf4bc0c['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4a581f){this['collection']['add'](_0x4a581f);}['remove'](_0x3dbdd4){this['collection']['remove'](_0x3dbdd4),_0x3dbdd4['destroy']();}['refreshVisibility'](){for(const _0x3b6c03 of this['collection'])_0x3b6c03['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5ee3e6){return this['collection']['getByInnerView'](_0x5ee3e6);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3b3f6f of this['collection'])_0x3b3f6f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x595a83){this['fire']('_activateAnnotation',_0x595a83);}['createAnnotation'](_0x495eeb){return new T(_0x495eeb);}['createAnnotationView'](_0x5bd808,_0x353b19){return new E(_0x5bd808,_0x353b19);}['_addActiveAnnotation'](_0xfd6e5){const _0x13b1be=new Set(this['activeAnnotations']);_0x13b1be['add'](_0xfd6e5),this['activeAnnotations']=_0x13b1be;}['_removeActiveAnnotation'](_0x183067){const _0x21a6f5=new Set(this['activeAnnotations']);_0x21a6f5['delete'](_0x183067),this['activeAnnotations']=_0x21a6f5;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2f3fa3=this['collection'],_0x9da377=this['_visibleAnnotations'];function _0x3bc53e(_0x409ef2){const _0x3c97cb=_0x409ef2['source'];_0x3c97cb['isVisible']&&!_0x9da377['has'](_0x3c97cb)?_0x9da377['add'](_0x3c97cb):!_0x3c97cb['isVisible']&&_0x9da377['has'](_0x3c97cb)&&_0x9da377['remove'](_0x3c97cb),_0x3c97cb['view']['focusTracker']['remove'](_0x3c97cb['view']['element']),_0x3c97cb['view']['focusTracker']['add'](_0x3c97cb['view']['element']);}this['listenTo'](_0x2f3fa3,'add',(_0x432dd5,_0x24a18a)=>{_0x24a18a['isVisible']&&_0x9da377['add'](_0x24a18a),this['listenTo'](_0x24a18a,'change:isVisible',_0x3bc53e);}),this['listenTo'](_0x2f3fa3,'remove',(_0x220ff2,_0x52183c)=>{_0x9da377['has'](_0x52183c)&&_0x9da377['remove'](_0x52183c),this['stopListening'](_0x52183c,'change:isVisible',_0x3bc53e);});}['_setupEnterAnnotationKeystroke'](){const _0x2f2194=_0x12aaf9=>{_0x12aaf9['on']('ready',()=>{_0x12aaf9['keystrokes']['set'](_0x5f5a8d,(_0x300439,_0x11b32f)=>{const _0x2ed0e1=_0x31f99c(this['activeAnnotations']['values']());_0x2ed0e1&&(_0x2ed0e1['view']['focus'](),_0x11b32f());});});};this['context']instanceof _0x4bc0e5?_0x2f2194(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x526887,_0x50615e)=>{_0x2f2194(_0x50615e);});}['_setupEscapeAnnotationHandling'](){const _0x7dbfbe=_0x561675=>{const _0x2e1479=_0x561675['source'],_0xde24d8=[];let _0xa60435;if(Array['isArray'](_0x2e1479['target'])){_0xa60435=_0x2e1479['target'][0x0],this['context']instanceof _0x4bc0e5?_0xde24d8['push'](this['context']):this['context']['editors']&&_0xde24d8['push'](...this['context']['editors']);for(const _0x12689b of _0xde24d8)for(const _0x4ceaae of _0x12689b['editing']['view']['domRoots']['values']())if(_0x4ceaae['contains'](_0xa60435))return void _0x12689b['editing']['view']['focus']();_0xa60435['focus']();}};this['listenTo'](this['collection'],'add',(_0x2a9246,_0x27d8c7)=>{this['listenTo'](_0x27d8c7,'escape',_0x7dbfbe,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3eaa0f,_0x1e79f8)=>{this['stopListening'](_0x1e79f8,'escape',_0x7dbfbe);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x3f106c{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xa30a1a){super(_0xa30a1a),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x153805=this['context']['config'];_0x153805['define']('comments.maxCommentsWhenCollapsed',0x2),_0x153805['define']('comments.maxThreadTotalWeight',0x1f4),_0x153805['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x153805['define']('comments.CommentThreadView',vt),_0x153805['define']('comments.CommentView',gt),_0x153805['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x29f05c=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3d6c03,_0x12df76)=>this['_addCommentThread'](_0x12df76)),this['on']('submitCommentThread',(_0x17cf2f,_0xacc20c)=>this['_submitCommentThread'](_0xacc20c)),this['on']('resolveCommentThread',(_0x398637,_0x35d481)=>this['_resolveCommentThread'](_0x35d481)),this['on']('resolveCommentThread',(_0x224d8a,_0x4cabd6)=>this['_updateActiveAnnotation'](_0x4cabd6),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x18e861,_0x226edf)=>this['_reopenCommentThread'](_0x226edf)),this['on']('reopenCommentThread',(_0x41320f,_0x27f2a2)=>this['_updateActiveAnnotation'](_0x27f2a2),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1fab84,_0x172761)=>this['_removeCommentThread'](_0x172761)),this['on']('updateCommentThread',(_0x48564b,_0x57793e)=>this['_updateCommentThread'](_0x57793e)),this['on']('updateCommentThread',(_0xeae559,_0xa3083f)=>this['_updateActiveAnnotation'](_0xa3083f),{'priority':'lowest'}),this['on']('addComment',(_0x57b1b7,_0x37f703)=>this['_addComment'](_0x37f703)),this['on']('updateComment',(_0x21b819,_0x53987b)=>this['_updateComment'](_0x53987b)),this['on']('removeComment',(_0x4f2515,_0x3d80d9)=>this['_removeComment'](_0x3d80d9)),this['on']('addComment',(_0x3552a1,{threadId:_0x29be3a,isFromAdapter:_0x579ff7})=>{if(_0x579ff7)return;const _0x49769d=this['getCommentThread'](_0x29be3a),_0x8001ff=_0x49769d&&this['_threadToController']['get'](_0x49769d);_0x8001ff&&_0x8001ff['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x29f05c,'change:activeAnnotations',(_0x2b49db,_0x5c39b5,_0x33ae63)=>{const _0x43bee8=Array['from'](_0x33ae63)['map'](_0x16c689=>this['_viewToController']['get'](_0x16c689['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x43bee8?_0x43bee8['model']:null;});}set['adapter'](_0xfb7064){if(this['_adapter'])throw new _0x160abe('commentsrepository-adapter-already-set');this['_adapter']=_0xfb7064;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x45cdd2=Tt,threadId:_0x258a3b=_0x27956d(),comments:_0x2365dd=[],unlinkedAt:_0x359c45=null,resolvedAt:_0x12ea61=null,resolvedBy:_0x39b751=null,target:_0x6c3150=null,context:_0x3acfd7=null,attributes:_0x29119b={},isResolvable:_0x13e529=!0x0,isSubmitted:_0x399e35=!0x1,isFromAdapter:_0x44a0ad=!0x1}={}){return this['fire'](bt('addCommentThread',_0x45cdd2),{'channelId':_0x45cdd2,'threadId':_0x258a3b,'comments':_0x2365dd,'unlinkedAt':_0x359c45,'resolvedAt':_0x12ea61,'resolvedBy':_0x39b751,'target':_0x6c3150,'context':_0x3acfd7,'attributes':_0x29119b,'isFromAdapter':_0x44a0ad,'isResolvable':_0x13e529,'isSubmitted':_0x399e35}),this['getCommentThread'](_0x258a3b);}['openNewCommentThread']({channelId:_0x226897=Tt,threadId:_0x384e9a=_0x27956d(),target:_0x216420,context:_0x1fd435=null,isResolvable:_0x308479=!0x0}){if(this['_readOnlyChannels']['has'](_0x226897)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x216420)throw new _0x160abe('commentsrepository-missing-target');const _0x91a2a3=this['addCommentThread']({'channelId':_0x226897,'threadId':_0x384e9a,'target':_0x216420,'context':_0x1fd435,'isResolvable':_0x308479});if(!_0x91a2a3)return null;const _0x3b98dc=this['_threadToController']['get'](_0x91a2a3),_0x5f5282=_0x3b98dc['view']['commentThreadInputView']['commentInputView'],_0x2d304a=this['context']['plugins']['get'](y),_0x4de514=_0x2d304a['getByInnerView'](_0x3b98dc['view']);return _0x2d304a['activate'](_0x4de514),_0x5f5282['once']('editorReady',()=>_0x5f5282['focus']()),_0x91a2a3;}['hasCommentThread'](_0x3d248c){if('string'!=typeof _0x3d248c)throw new _0x160abe('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3d248c);}['updateCommentThread']({channelId:_0x40d02f=Tt,threadId:_0x47bc93,context:_0x21cc20,unlinkedAt:_0x38d264,attributes:_0x168236,isFromAdapter:_0x14bcd4=!0x1}){return this['fire'](bt('updateCommentThread',_0x40d02f),{'channelId':_0x40d02f,'threadId':_0x47bc93,'context':_0x21cc20,'unlinkedAt':_0x38d264,'attributes':_0x168236,'isFromAdapter':_0x14bcd4}),this['getCommentThread'](_0x47bc93);}['getCommentThread'](_0x456f4d){if('string'!=typeof _0x456f4d)throw new _0x160abe('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x456f4d);}['fetchCommentThread']({channelId:_0x59a867,threadId:_0x4a65d1}={}){const _0x5d7888=this['getCommentThread'](_0x4a65d1);if(_0x5d7888)return Promise['resolve'](_0x5d7888);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x160abe('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x59a867,'threadId':_0x4a65d1})['then'](_0x2a3c3b=>this['hasCommentThread'](_0x4a65d1)?this['getCommentThread'](_0x4a65d1):_0x2a3c3b?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x59a867},_0x2a3c3b)):void 0x0)['catch'](_0x31445e=>{throw console['error'](_0x31445e),new _0x160abe('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x344ca7,skipNotAttached:_0xa0e035=!0x1,skipEmpty:_0x1a2364=!0x1,toJSON:_0x3d6694=!0x1}={}){const _0x16b16f=[];for(const _0x130bc0 of this['_threads']['values']())_0x344ca7&&_0x130bc0['channelId']!==_0x344ca7||_0xa0e035&&!_0x130bc0['isAttached']||_0x1a2364&&0x0===_0x130bc0['length']||_0x16b16f['push'](_0x130bc0);return _0x3d6694?_0x16b16f['map'](_0x44cb56=>_0x44cb56['toJSON']()):_0x16b16f;}['getAnnotationForCommentThread'](_0x43910e){const _0x33b07c=this['_threadToController']['get'](_0x43910e);if(!_0x33b07c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x33b07c['view'])||null;}['getCommentThreadForAnnotation'](_0x1716d1){const _0x1b23c2=this['_viewToController']['get'](_0x1716d1['innerView']);return _0x1b23c2?_0x1b23c2['model']:null;}['setActiveCommentThread'](_0x74087a){const _0x36bede=this['context']['plugins']['get'](y);if(!_0x74087a)return void(this['activeCommentThread']&&_0x36bede['deactivateAll']());const _0x5d306a=this['getCommentThread'](_0x74087a);if(!_0x5d306a)throw new _0x160abe('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x74087a});if(!this['_threadToController']['has'](_0x5d306a))throw new _0x160abe('commentsrepository-active-not-attached',null,{'threadId':_0x74087a});const _0x3b43a9=_0x36bede['getByInnerView'](this['_threadToController']['get'](_0x5d306a)['view']);_0x36bede['activate'](_0x3b43a9);}['switchReadOnly'](_0x36f9ca,_0x4a3ed8){_0x36f9ca?this['_readOnlyChannels']['add'](_0x4a3ed8):this['_readOnlyChannels']['delete'](_0x4a3ed8),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4f4490){return this['_readOnlyChannels']['has'](_0x4f4490)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x143330,_0x4ba4e0){return new yt(_0x143330,_0x4ba4e0);}['setPermissions'](_0x52a354,_0x3b8a5c=Tt){this['_permissions']['set'](_0x3b8a5c,_0x52a354),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xd4ad09=Tt){return this['_permissions']['has'](_0xd4ad09)?this['_permissions']['get'](_0xd4ad09):_t;}['_addCommentThread']({channelId:_0x33848b,threadId:_0x29c883,comments:_0x548965,unlinkedAt:_0x551207,resolvedAt:_0x4542f0,resolvedBy:_0x241a4d,target:_0x308d81,context:_0x57d643,attributes:_0x5c80b5,isFromAdapter:_0x2e5fef,isResolvable:_0x4be2c7,isSubmitted:_0x1bc8b9}){if('string'!=typeof _0x29c883)throw new _0x160abe('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x29c883});if(this['hasCommentThread'](_0x29c883))throw new _0x160abe('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x29c883});const _0x481767=new pi(this,{'channelId':_0x33848b,'id':_0x29c883,'context':_0x57d643,'attributes':_0x5c80b5,'unlinkedAt':_0x551207,'resolvedAt':_0x4542f0,'resolvedBy':_0x241a4d?this['context']['plugins']['get'](it)['getUser'](_0x241a4d):null,'isResolvable':_0x4be2c7,'isSubmitted':_0x1bc8b9||_0x2e5fef});this['_threads']['set'](_0x29c883,_0x481767);for(const _0x103a85 of _0x548965)_0x481767['_add'](this['_createNewComment']({'threadId':_0x29c883,..._0x103a85}));return _0x308d81&&_0x481767['attachTo'](_0x308d81),_0x2e5fef||!_0x481767['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x33848b,'threadId':_0x29c883});}['_submitCommentThread']({channelId:_0x3d702f,threadId:_0x22c637}){if(!this['hasCommentThread'](_0x22c637))throw new _0x160abe('commentsrepository-missing-comment-thread',this);const _0xd86813=this['getCommentThread'](_0x22c637);if(_0xd86813['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x22473b,comments:_0x5d7e5a,resolvedAt:_0x573f83,resolvedBy:_0xc374fa,context:_0x1a26ca,attributes:_0x4bde46}=_0xd86813,_0x55c1f1=this['context']['plugins']['get']('PendingActions'),_0x5437ad=_0x55c1f1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3d702f,'threadId':_0x22473b,'comments':_0x5d7e5a['map'](_0x2bd44e=>_0x2bd44e['toJSON']()),'resolvedAt':_0x573f83,'resolvedBy':_0xc374fa?_0xc374fa['id']:_0xc374fa,'context':_0x1a26ca,'attributes':_0x4bde46})['then'](({comments:_0x318037})=>{_0x55c1f1['remove'](_0x5437ad);for(const _0x20a07d of _0x318037)this['_updateComment']({'channelId':_0x3d702f,'threadId':_0x22c637,'commentId':_0x20a07d['commentId'],'createdAt':_0x20a07d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x199c7e=>{throw console['error'](_0x199c7e),new _0x160abe('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x34ee6b,target:_0x3cce47}){const _0x1a215e=this['getCommentThread'](_0x34ee6b);if(!_0x1a215e)throw new _0x160abe('commentsrepository-attach-missing-comment-thread',this);const _0x53ac33=this['context']['plugins']['get']('PendingActions'),_0x5120db=this['context']['plugins']['get'](y),_0x3a344d=this['_createCommentThreadView'](_0x1a215e),_0x2593f8=new yt(_0x1a215e,_0x3a344d);let _0xe347d4=null;_0x3a344d['on']('change:isDirty',(_0x17e588,_0x7c9083,_0x57184e)=>{_0x57184e?_0xe347d4=_0x53ac33['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xe347d4&&(_0x53ac33['remove'](_0xe347d4),_0xe347d4=null);}),this['_threadToController']['set'](_0x1a215e,_0x2593f8),this['_viewToController']['set'](_0x3a344d,_0x2593f8);const _0x508332=new E(this['context']['locale'],_0x3a344d);_0x508332['bind']('length')['to'](_0x3a344d),_0x508332['bind']('isDirty')['to'](_0x3a344d,'isDirty',_0x3a344d,'length',(_0x55a60a,_0xc578c5)=>_0x55a60a||!_0xc578c5),_0x508332['bind']('isActive')['to'](_0x3a344d),_0x508332['type']='comment';const _0x75441c=new T({'view':_0x508332,'target':_0x3cce47,'type':'comment','isVisible':!_0x1a215e['archivedAt']});return _0x3a344d['on']('escape',()=>{_0x75441c['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3a344d,_0x75441c),_0x5120db['add'](_0x75441c),_0x75441c;}['_bindAnnotationToEditors'](_0x9da26,_0x11dc29){this['listenTo'](_0x9da26,'editorReady',(_0x1c7250,_0x3d2e50)=>{const _0x52aff3=_0x3d2e50['ui']['view']['body']['bodyCollectionContainer'];_0x11dc29['focusableElements']['add'](_0x52aff3),this['context']instanceof _0x4bc0e5&&this['context']['ui']['focusTracker']['add'](_0x52aff3);},{'priority':'highest'}),this['listenTo'](_0x9da26,'editorDestroyed',(_0x14c181,_0x15be99)=>{const _0x2cefb5=_0x15be99['ui']['view']['body']['bodyCollectionContainer'];_0x11dc29['focusableElements']['has'](_0x2cefb5)&&_0x11dc29['focusableElements']['remove'](_0x2cefb5),this['context']instanceof _0x4bc0e5&&this['context']['ui']['focusTracker']['remove'](_0x2cefb5);});}['_unbindEditors'](_0x515361){this['stopListening'](_0x515361,'editorReady'),this['stopListening'](_0x515361,'editorDestroyed');}['_createCommentThreadView'](_0x36221a){const _0x347cce=this['context']['plugins']['get'](it),{config:_0x57b277,locale:_0x4495b3}=this['context'],_0x1bda99=lt(_0x57b277['get']('locale'),_0x4495b3);return new(0x0,(_0x57b277['get']('comments'))['CommentThreadView'])(_0x4495b3,_0x36221a,_0x347cce['me'],{'editorConfig':{..._0x57b277['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x57b277['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x57b277['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x57b277['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x57b277['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1bda99,'CommentView':_0x57b277['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3bf402,channelId:_0x383675,resolvedAt:_0x12cb1a,resolvedBy:_0x20882e,isFromAdapter:_0x50dfa1}){if(!this['hasCommentThread'](_0x3bf402))throw new _0x160abe('commentsrepository-missing-comment-thread',null,{'threadId':_0x3bf402});const _0x4d88c7=this['getCommentThread'](_0x3bf402);if(_0x4d88c7['isResolved'])throw new _0x160abe('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3bf402});const _0x4868ce=this['context']['plugins']['get'](it);if(_0x4d88c7['resolvedBy']=_0x4868ce['getUser'](_0x20882e),_0x4d88c7['resolvedAt']=_0x12cb1a,_0x50dfa1||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4cf654=this['context']['plugins']['get']('PendingActions'),_0x31050b=_0x4cf654['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x383675,'threadId':_0x3bf402})['then'](({resolvedAt:_0x3eb9e2,resolvedBy:_0xec1844})=>{_0x4cf654['remove'](_0x31050b),_0x4d88c7['resolvedBy']['id']!==_0xec1844&&(_0x4d88c7['resolvedBy']=_0x4868ce['getUser'](_0xec1844)),_0x4d88c7['resolvedAt']=_0x3eb9e2;})['catch'](_0x55366b=>{throw console['error'](_0x55366b),new _0x160abe('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x59a51f,channelId:_0xccd330,isFromAdapter:_0x55ddb9}){if(!this['hasCommentThread'](_0x59a51f))throw new _0x160abe('commentsrepository-missing-comment-thread',null,{'threadId':_0x59a51f});const _0x50710e=this['getCommentThread'](_0x59a51f);if(!_0x50710e['isResolved'])throw new _0x160abe('commentsrepository-reopen-comment-thread',null,{'threadId':_0x59a51f});if(_0x50710e['resolvedBy']=null,_0x50710e['resolvedAt']=null,_0x55ddb9||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xd53c6=this['context']['plugins']['get']('PendingActions'),_0x376f16=_0xd53c6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xccd330,'threadId':_0x59a51f})['then'](()=>_0xd53c6['remove'](_0x376f16))['catch'](_0x149aef=>{throw console['error'](_0x149aef),new _0x160abe('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5da39b,isFromAdapter:_0x813e61}){const _0x9bcbb0=this['getCommentThread'](_0x5da39b);if(!_0x9bcbb0)throw new _0x160abe('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5da39b),this['_threads']['delete'](_0x5da39b),!_0x9bcbb0['isSubmitted']||_0x813e61||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1d6e8b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x45c7c7}=_0x9bcbb0,_0x35b747=_0x1d6e8b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x45c7c7,'threadId':_0x5da39b})['then'](()=>_0x1d6e8b['remove'](_0x35b747))['catch'](_0x410a0c=>{throw console['error'](_0x410a0c),new _0x160abe('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2245f9,unlinkedAt:_0x165a0f,context:_0x1edadf,attributes:_0xc4a684,isFromAdapter:_0x5e9777}){if('string'!=typeof _0x2245f9)throw new _0x160abe('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2245f9});if(!this['hasCommentThread'](_0x2245f9))throw new _0x160abe('commentsrepository-missing-comment-thread',null,{'threadId':_0x2245f9});const _0x1b7487=this['getCommentThread'](_0x2245f9);let _0x300ffb=!0x1;if(void 0x0!==_0x1edadf&&_0x1b7487['context']!==_0x1edadf&&(_0x1b7487['context']=_0x1edadf,_0x300ffb=!0x0),void 0x0!==_0x165a0f&&_0x1b7487['unlinkedAt']!==_0x165a0f&&(_0x1b7487['unlinkedAt']=_0x165a0f,_0x300ffb=!0x0),_0xc4a684&&!wt(_0xc4a684,_0x1b7487['attributes'])&&(_0x1b7487['attributes']=_0xc4a684,_0x300ffb=!0x0),!_0x300ffb)return Promise['resolve']();if(!_0x1b7487['isSubmitted']||_0x5e9777||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x483f6a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1535f8}=_0x1b7487,_0x18fec0=_0x483f6a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1535f8,'threadId':_0x2245f9,'context':_0x1edadf,'unlinkedAt':_0x165a0f,'attributes':_0xc4a684})['then'](()=>_0x483f6a['remove'](_0x18fec0))['catch'](_0x66f279=>{throw console['error'](_0x66f279),new _0x160abe('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x343d56){const _0x2d4809=this['context']['plugins']['get'](y),_0x15a035=this['getCommentThread'](_0x343d56);if(_0x15a035['_isAttached']=!0x1,this['_threadToController']['has'](_0x15a035)){const _0x28c5e2=this['_threadToController']['get'](_0x15a035),_0x5c93fa=_0x28c5e2['view'],_0x144a21=_0x2d4809['getByInnerView'](_0x5c93fa);this['_threadToController']['delete'](_0x15a035),this['_viewToController']['delete'](_0x5c93fa),_0x144a21&&_0x2d4809['remove'](_0x144a21),_0x28c5e2['destroy'](),_0x5c93fa['destroy']()['then'](()=>{this['_unbindEditors'](_0x5c93fa);});}}['_updateActiveAnnotation']({threadId:_0x5d50c7,resolvedAt:_0x4f7823,unlinkedAt:_0x550878}){const _0x1cb243=!!_0x4f7823,_0x2e4571=this['context']['plugins']['get'](y),_0x3548a8=this['getCommentThread'](_0x5d50c7);if(this['_threadToController']['has'](_0x3548a8)){const _0x42ebd6=this['_threadToController']['get'](_0x3548a8)['view'],_0x59e5b4=_0x2e4571['getByInnerView'](_0x42ebd6);_0x59e5b4&&(_0x1cb243&&_0x2e4571['_removeActiveAnnotation'](_0x59e5b4),_0x550878?_0x59e5b4['isVisible']=!0x1:_0x59e5b4['refreshVisibility']());}}['_getExternalAuthor'](_0x4c0e97){const _0x2d569c=this['context']['plugins']['get'](it),_0x515c73=pt('external:'+_0x4c0e97),_0x331b7a=_0x2d569c['getUser'](_0x515c73);return _0x331b7a||_0x2d569c['addUser']({'id':_0x515c73,'name':_0x4c0e97});}['_createNewComment']({threadId:_0x331e19,commentId:_0x735a5=_0x27956d(),content:_0x182f33,authorId:_0x522ad9,createdAt:_0x18f313,attributes:_0x2de2ba}){if('string'!=typeof _0x735a5)throw new _0x160abe('commentsrepository-invalid-commentid');if('string'!=typeof _0x522ad9)throw new _0x160abe('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x182f33||!_0x182f33['trim']())throw new _0x160abe('commentsrepository-invalid-comment-content');const _0xf0b7ba=this['context']['plugins']['get'](it)['getUser'](_0x522ad9);if(!_0xf0b7ba)throw new _0x160abe('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x522ad9});let _0x50221d=null,_0x5f8388=_0x18f313;return _0x2de2ba?.['@external']&&(_0x50221d=this['_getExternalAuthor'](_0x2de2ba['@external']['authorName']),_0x5f8388=new Date(_0x2de2ba['@external']['createdAt'])),new wi(this,{'threadId':_0x331e19,'id':_0x735a5,'author':_0x50221d||_0xf0b7ba,'creator':_0xf0b7ba,'content':_0x182f33,'createdAt':_0x18f313,'authoredAt':_0x5f8388,'attributes':_0x2de2ba});}['_addComment'](_0x431950){let {threadId:_0x26e1d1,content:_0xc311ff,attributes:_0x5e9453,isFromAdapter:_0x561571}=_0x431950;const _0x9957e4=this['getCommentThread'](_0x431950['threadId']);if(!_0x9957e4)throw new _0x160abe('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x230bab=this['_createNewComment'](_0x431950),{id:_0xb5e12b}=_0x230bab;if(_0x9957e4['_add'](_0x230bab),_0x561571||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x9957e4['isSubmitted'])return Promise['resolve']();const _0x59bef9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x233ff3}=_0x9957e4,_0x34ccf2=_0x59bef9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5e9453||(_0x5e9453={}),this['adapter']['addComment']({'channelId':_0x233ff3,'threadId':_0x26e1d1,'commentId':_0xb5e12b,'content':_0xc311ff,'attributes':_0x5e9453})['then'](_0x26874b=>{_0x59bef9['remove'](_0x34ccf2),_0x26874b&&this['_updateComment']({'channelId':_0x233ff3,'threadId':_0x26e1d1,'commentId':_0xb5e12b,'createdAt':_0x26874b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x321cda=>{throw console['error'](_0x321cda),new _0x160abe('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x23fc5d,commentId:_0x2efeaa,content:_0x2cba83,createdAt:_0x14392a,attributes:_0x30af2c,isFromAdapter:_0x1a96dc}){if(void 0x0!==_0x2cba83&&('string'!=typeof _0x2cba83||!_0x2cba83['trim']()['length']))throw new _0x160abe('commentsrepository-update-comment-invalid-content');const _0x6afa0e=this['getCommentThread'](_0x23fc5d),_0x4d0eb0=_0x6afa0e['getComment'](_0x2efeaa);if(!_0x4d0eb0)throw new _0x160abe('commentsrepository-update-missing-comment',this);let _0x337d0c=!0x1;if(_0x2cba83&&_0x2cba83!==_0x4d0eb0['content']&&(_0x4d0eb0['isEditable']||_0x1a96dc)&&(_0x4d0eb0['content']=_0x2cba83,_0x337d0c=!0x0),_0x14392a&&_0x14392a!==_0x4d0eb0['createdAt']&&(_0x4d0eb0['createdAt']=_0x14392a,_0x4d0eb0['attributes']&&_0x4d0eb0['attributes']['@external']||(_0x4d0eb0['authoredAt']=_0x14392a),_0x337d0c=!0x0),_0x30af2c&&!wt(_0x30af2c,_0x4d0eb0['attributes'])&&(_0x4d0eb0['attributes']=_0x30af2c,_0x337d0c=!0x0),!_0x337d0c)return Promise['resolve']();if(_0x6afa0e['fire']('commentUpdated'),_0x1a96dc||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x588f26=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ffeb8}=this['getCommentThread'](_0x4d0eb0['threadId']),_0x37c15f=_0x588f26['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1ffeb8,'threadId':_0x23fc5d,'commentId':_0x2efeaa,'content':_0x2cba83,'attributes':_0x30af2c})['then'](()=>_0x588f26['remove'](_0x37c15f))['catch'](_0x157d4c=>{throw console['error'](_0x157d4c),new _0x160abe('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x49f3ea,commentId:_0x341ae5,isFromAdapter:_0x58b768}){const _0x59bf41=this['getCommentThread'](_0x49f3ea),_0x3c119d=_0x59bf41['getComment'](_0x341ae5);if(!_0x3c119d)throw new _0x160abe('commentsrepository-remove-missing-comment',this);if(_0x59bf41['_remove'](_0x3c119d),_0x58b768||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x9219b8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a7459}=_0x59bf41,_0xcdb0e=_0x9219b8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2a7459,'threadId':_0x49f3ea,'commentId':_0x341ae5})['then'](()=>_0x9219b8['remove'](_0xcdb0e))['catch'](_0x5f28e1=>{throw console['error'](_0x5f28e1),new _0x160abe('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x166ad1(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x48e84f,_0x1fdac0){super();const _0x5578b9=_0x1fdac0['isResolvable'];this['channelId']=_0x1fdac0['channelId'],this['id']=_0x1fdac0['id'],this['comments']=new _0x4550ea(),this['_repository']=_0x48e84f,this['_isAttached']=!0x1,this['_isSubmitted']=_0x1fdac0['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x48e84f,'_permissions',_0x48e84f,'_readOnlyChannels',()=>_0x48e84f['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x48e84f,'_permissions',()=>_0x48e84f['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x48e84f,'_permissions',()=>{const _0x1b50ca=_0x48e84f['getPermissions'](this['channelId']);return _0x1b50ca['write']||_0x1b50ca['admin'];}),this['bind']('isResolvable')['to'](_0x48e84f,'_permissions',()=>_0x5578b9&&_0x48e84f['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x1fdac0['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2fd78c,_0x238284)=>_0x2fd78c?_0x238284?_0x2fd78c<_0x238284?_0x2fd78c:_0x238284:_0x2fd78c:_0x238284),this['set']('unlinkedAt',_0x1fdac0['unlinkedAt']||null),this['set']('resolvedAt',_0x1fdac0['resolvedAt']||null),this['set']('resolvedBy',_0x1fdac0['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x9c0de2=>!!_0x9c0de2),this['set']('attributes',_0x1fdac0['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x38a6f9,_0x515218)=>_0x38a6f9+_0x515218['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x330ec0,id:_0x4eb6f0}=this;this['_repository']['fire'](bt('submitCommentThread',_0x330ec0),{'channelId':_0x330ec0,'threadId':_0x4eb6f0});}['setUnlinkedAt'](_0xb4738f){this['_update']({'unlinkedAt':_0xb4738f});}['resolve']({resolvedAt:_0x2e9fbc=new Date(),resolvedBy:_0x95130f=null,isFromAdapter:_0x5044d5=!0x1}={}){const _0x38e724=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x487d06,id:_0x234935}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x487d06),{'channelId':_0x487d06,'threadId':_0x234935,'resolvedAt':_0x2e9fbc,'resolvedBy':_0x95130f||_0x38e724['id'],'isFromAdapter':_0x5044d5});}['reopen']({isFromAdapter:_0x30e99a=!0x1}={}){const {channelId:_0x2f6a5c,id:_0x373e50}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x2f6a5c),{'channelId':_0x2f6a5c,'threadId':_0x373e50,'isFromAdapter':_0x30e99a});}['setContext'](_0x3621a9){this['context']||this['_update']({'context':_0x3621a9});}['setAttribute'](_0x4be6f1,_0x728e6b){const _0x4a6c11=It(this['attributes']);At(_0x4a6c11,_0x4be6f1,_0x728e6b),this['_update']({'attributes':_0x4a6c11});}['removeAttribute'](_0x286d62){const _0x1f127a=It(this['attributes']);Ct(_0x1f127a,_0x286d62),this['_update']({'attributes':_0x1f127a});}['remove']({isFromAdapter:_0x4697a2=!0x1}={}){const {channelId:_0x390acd,id:_0x658c51}=this;this['_repository']['fire'](bt('removeCommentThread',_0x390acd),{'channelId':_0x390acd,'threadId':_0x658c51,'isFromAdapter':_0x4697a2});}['attachTo'](_0x950100){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x950100});}['addComment'](_0x2c6e18){const {channelId:_0x88a00d,id:_0x390380}=this;this['_repository']['fire'](bt('addComment',_0x88a00d,_0x390380),Object['assign']({'channelId':_0x88a00d,'threadId':_0x390380},_0x2c6e18));}['getComment'](_0x2bb211){if('string'!=typeof _0x2bb211)throw new _0x160abe('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x2bb211});return this['comments']['get'](_0x2bb211);}['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'](_0x2cdaaf=>_0x2cdaaf['toJSON']()),'attributes':this['attributes']};}['_add'](_0x395ba0){return this['listenTo'](_0x395ba0,'change:authoredAt',()=>{const _0x14480a=this['_findOptimalIndex'](_0x395ba0),_0x290436=this['comments'];_0x14480a-0x1!=_0x290436['getIndex'](_0x395ba0)&&_0x14480a+0x1!=_0x290436['getIndex'](_0x395ba0)&&(this['_remove'](_0x395ba0),this['_add'](_0x395ba0));}),this['comments']['add'](_0x395ba0,this['_findOptimalIndex'](_0x395ba0));}['_update'](_0x5ccf66){const {channelId:_0x523fec,id:_0x2a49a8}=this;this['_repository']['fire'](bt('updateCommentThread',_0x523fec),{..._0x5ccf66,'channelId':_0x523fec,'threadId':_0x2a49a8});}['_remove'](_0x49266d){return this['stopListening'](_0x49266d),_0x49266d['destroy'](),this['comments']['remove'](_0x49266d);}['_findOptimalIndex'](_0x4fb89d){const _0x2ee372=this['comments']['find'](_0x430c18=>new Date(_0x430c18['authoredAt'])['getTime']()>new Date(_0x4fb89d['authoredAt'])['getTime']());return _0x2ee372?this['comments']['getIndex'](_0x2ee372):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x166ad1(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x106719,_0x3c5a0a){super();const _0x14983b=_0x106719['context']['plugins']['get'](it)['me'],_0x383fe8=_0x106719['getCommentThread'](_0x3c5a0a['threadId']),_0x1e6837=0x0===_0x383fe8['comments']['length'],_0x234cb1=_0x14983b===_0x3c5a0a['author'];this['id']=_0x3c5a0a['id'],this['threadId']=_0x3c5a0a['threadId'],this['author']=_0x3c5a0a['author'],this['creator']=_0x3c5a0a['creator'],this['isExternal']=Boolean(_0x3c5a0a['attributes']&&_0x3c5a0a['attributes']['@external']),this['set']('content',_0x3c5a0a['content']),this['createdAt']=_0x3c5a0a['createdAt']||new Date(),this['set']('authoredAt',_0x3c5a0a['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x383fe8,'resolvedAt'),this['set']('attributes',_0x3c5a0a['attributes']||{}),this['bind']('isEditable')['to'](_0x106719,'_permissions',()=>{const _0x42836a=_0x106719['getPermissions'](_0x383fe8['channelId'])['write'],_0x3c45cb=_0x106719['getPermissions'](_0x383fe8['channelId'])['modifyAll'];return _0x234cb1&&_0x42836a||!_0x234cb1&&_0x3c45cb;}),this['bind']('isRemovable')['to'](_0x383fe8,'isRemovable',_0x106719,'_permissions',_0x55e3d4=>{const _0x4cd755=_0x106719['getPermissions'](_0x383fe8['channelId'])['write'],_0x5271f2=_0x106719['getPermissions'](_0x383fe8['channelId'])['modifyAll'];return _0x234cb1&&_0x4cd755||_0x55e3d4&&_0x1e6837||!_0x234cb1&&_0x5271f2&&!_0x1e6837;}),this['bind']('isReadOnly')['to'](_0x383fe8,'isReadOnly'),this['_repository']=_0x106719;}get['weight'](){return Math['max'](function(_0x4df7db){const _0x4bad11=document['createElement']('div');return _0x4bad11['innerHTML']=_0x4df7db,_0x4bad11['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1a4cf7){const {threadId:_0x44d43b,id:_0x519ec5}=this;if(!this['_repository']['hasCommentThread'](_0x44d43b))throw new _0x160abe('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x595816}=this['_repository']['getCommentThread'](_0x44d43b);this['_repository']['fire'](bt('updateComment',_0x595816,_0x44d43b),{'channelId':_0x595816,'threadId':_0x44d43b,'commentId':_0x519ec5,..._0x1a4cf7});}['setAttribute'](_0x4a6a15,_0x531af2){const _0xa6c81a=It(this['attributes']);At(_0xa6c81a,_0x4a6a15,_0x531af2),this['update']({'attributes':_0xa6c81a});}['removeAttribute'](_0x81e2ac){const _0x13e629=It(this['attributes']);Ct(_0x13e629,_0x81e2ac),this['update']({'attributes':_0x13e629});}['remove'](_0x139e14={}){if(!_0x139e14['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x43d6f7,id:_0x19db07}=this;if(!this['_repository']['hasCommentThread'](_0x43d6f7))throw new _0x160abe('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4c5293}=this['_repository']['getCommentThread'](_0x43d6f7);this['_repository']['fire'](bt('removeComment',_0x4c5293,_0x43d6f7),{'channelId':_0x4c5293,'threadId':_0x43d6f7,'commentId':_0x19db07,..._0x139e14});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0xd44174,..._0x27cb4c){for(const _0x318ea1 of _0x27cb4c)void 0x0!==_0x318ea1&&(_0xd44174+=':'+String(_0x318ea1));return _0xd44174;}class rt extends _0x7f5ae3{constructor(_0x3d58da){super(_0x3d58da),this['set']('hasContent',!0x1);}['refresh'](){const _0x1c05cd=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x26c5a1 of _0x1c05cd['getRanges']())if(this['_hasContent'](_0x26c5a1))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x2b9108=_0x27956d(),ranges:_0x3187b4,comment:_0x4cd547}={}){const _0x170259=this['editor']['model'],_0x4e7dc6=_0x3187b4??Array['from'](_0x170259['document']['selection']['getRanges']()),_0x1040c4=[];for(const _0x37ce89 of _0x4e7dc6)this['_hasContent'](_0x37ce89)&&_0x1040c4['push'](this['_trimToContent'](_0x37ce89));if(!_0x1040c4['length'])throw new _0x160abe('addcommentthreadcommand-incorrect-ranges',null);_0x4cd547&&this['_createCommentThread'](_0x2b9108,_0x4cd547),this['_createMarkersFromRanges'](_0x2b9108,_0x1040c4,!!_0x4cd547);}['_createMarkersFromRanges'](_0x1119fc,_0x563bfe,_0xa5912d){this['editor']['model']['change'](_0x333423=>{for(const _0xe0b2 of _0x563bfe){const _0x201f38=_0x27956d()['substr'](0x1,0x5),_0x173c9c='comment:'+_0x1119fc+':'+_0x201f38;_0x333423['addMarker'](_0x173c9c,{'range':_0xe0b2,'usingOperation':_0xa5912d,'affectsData':_0xa5912d});}});}['_createCommentThread'](_0x51ac54,_0x361a51){const _0x24f8b4=this['editor']['plugins']['get']('CommentsRepository'),_0x96a359=this['editor']['config']['get']('collaboration.channelId'),_0x2df272=this['editor']['plugins']['get']('Users')['me'];if(!_0x2df272)throw new _0x160abe('addcommentthreadcommand-user-not-found',null);_0x24f8b4['addCommentThread']({'threadId':_0x51ac54,'channelId':_0x96a359,'comments':[{'authorId':_0x2df272['id'],'content':_0x361a51,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1b0cfe){for(const _0x3f96d1 of _0x1b0cfe['getItems']())if(this['_itemIsContent'](_0x3f96d1))return!0x0;return!0x1;}['_itemIsContent'](_0xdd2019){return _0xdd2019['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xdd2019)&&!_0xdd2019['is']('element','tableCell');}['_trimToContent'](_0x4a5ca2){const _0x58254f=_0x5bcb91=>!this['_itemIsContent'](_0x5bcb91['item']),_0x5c85d3=_0x4a5ca2['start']['getLastMatchingPosition'](_0x58254f),_0x26c94e=_0x4a5ca2['end']['getLastMatchingPosition'](_0x58254f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5c85d3,_0x26c94e);}}class b extends _0x1a45c0{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3911c4){super(_0x3911c4),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2121af=this['editor'],_0x3868c7=_0x2121af['model']['document']['selection'],_0x278c8e=_0x35cf6e(()=>this['refreshSelectedViews'](),0xa);_0x3868c7['on']('change:range',(_0x474145,_0x36bace)=>{_0x36bace['directChange']&&(_0x278c8e['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2121af['editing']['view']['document'],'change:isFocused',(_0x2bd9fc,_0x51fbf9,_0x2837fc)=>{_0x2837fc&&_0x278c8e();}),this['listenTo'](_0x2121af['ui']['focusTracker'],'change:isFocused',(_0x355242,_0x65cf49,_0x9cdbd5)=>{_0x9cdbd5||_0x2121af['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x574f86=>this['_editorAnnotationsData']['has'](_0x574f86['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3c8996){if(this['_editorAnnotations']['has'](_0x3c8996['view']))return;this['_editorAnnotations']['add'](_0x3c8996['view']),this['editor']['ui']['focusTracker']['add'](_0x3c8996['view']['element']);const _0x165ef7=this['editor']['plugins']['get'](y);this['listenTo'](_0x165ef7['collection'],'remove',(_0x10acb8,_0x2a5ee3)=>{this['editor']['ui']['focusTracker']['remove'](_0x2a5ee3['view']['element']),this['_editorAnnotations']['delete'](_0x2a5ee3['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x395ed7){if('function'!=typeof _0x395ed7)throw new _0x160abe('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x395ed7);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1e8f07,annotations:_0x298828}){const _0x1d0bb3=[],_0x1e6ae9=this['editor']['model']['document']['selection'],_0x4b375e=Array['from'](_0x1e6ae9['getRanges']());for(const [_0x4782f0,_0x566793]of this['_editorAnnotationsData']){const _0x2ff8c1=_0x9277c5(_0x566793),_0x200c0a=_0x298828['getByInnerView'](_0x4782f0);_0x2ff8c1&&_0x200c0a&&_0x1d0bb3['push']({'annotation':_0x200c0a,'range':_0x2ff8c1});}function _0x9277c5(_0x157a0b){for(const _0x2c76e4 of _0x157a0b)for(const _0x51da6e of _0x4b375e)if(_0x2c76e4['containsRange'](_0x51da6e,!_0x1e6ae9['isCollapsed']))return _0x2c76e4;return null;}return _0x1d0bb3['sort']((_0x56b2f9,_0x44242e)=>{const _0x2b3b7a=_0x56b2f9['range'],_0xf6b5e1=_0x44242e['range'];if(!_0x2b3b7a['isEqual'](_0xf6b5e1)){if(_0x2b3b7a['containsRange'](_0xf6b5e1,!0x0))return 0x1;if(_0xf6b5e1['containsRange'](_0x2b3b7a,!0x0))return-0x1;}return _0x56b2f9['annotation']==_0x1e8f07?-0x1:_0x44242e['annotation']==_0x1e8f07?0x1:0x0;})['map'](_0x51c81f=>_0x51c81f['annotation']);}get['_editorAnnotationsData'](){const _0x10c2ba=new Map();for(const _0x9fd0aa of Array['from'](this['_dataCollectors']))for(const [_0x3a81bb,_0x419e8e]of _0x9fd0aa())_0x10c2ba['set'](_0x3a81bb,_0x419e8e);return _0x10c2ba;}}class st extends _0x1a45c0{['afterInit'](){const _0x304166=this['editor'];if(!_0x304166['plugins']['has']('RestrictedEditingModeEditing'))return;_0x304166['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x1a45c0{constructor(_0xb730c0){super(_0xb730c0),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1b96fa=this['editor'],_0x166969=_0x1b96fa['commands']['get']('importWord'),_0x2c61f2=_0x1b96fa['plugins']['get'](it);_0x166969&&(_0x166969['on']('execute',(_0x3ecdd9,[,_0x572f20])=>{_0x572f20['collaboration_features']={'comments':!0x0,'user_id':_0x2c61f2['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x166969,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x29364f,_0x54bec8){const {comment_threads:_0x5ee849}=_0x54bec8;_0x5ee849&&_0x5ee849['forEach'](({thread_id:_0x196c57,comments:_0x4af727,is_resolved:_0x6e8a4f})=>{const _0xac6175=new Date(),_0x3f77b6=_0x4af727['map'](({author:_0x378be3,content:_0x269d15,created_at:_0x582ca0})=>({'content':_0x269d15,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xac6175,'attributes':{'@external':{'authorName':_0x378be3,'createdAt':_0x582ca0?new Date(_0x582ca0):new Date(),'source':'importWord'}}})),_0x7e1193=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x7e1193,'threadId':_0x196c57,'comments':_0x3f77b6,'resolvedAt':_0x6e8a4f?_0xac6175:null});});}}class at extends _0x1a45c0{constructor(_0x1b5e81){super(_0x1b5e81),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x110a03=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x110a03,'contentInsertion',(_0x4e29c8,_0x57d9d6)=>this['_removeMarkersWithoutThreads'](_0x57d9d6['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3deae3){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3deae3;const _0x800fcb=this['editor']['plugins']['get']('CommentsRepository');for(const _0x394e57 of _0x3deae3['keys']()){const [_0xdfc4f3,_0x484322]=_0x394e57['split'](':');'comment'!=_0xdfc4f3||_0x800fcb['hasCommentThread'](_0x484322)||_0x3deae3['delete'](_0x394e57);}return _0x3deae3;}['_registerMarkerInClipboardPipeline'](){const _0x5b2c66=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3d8e6b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3d8e6b&&_0x5b2c66['_registerMarkerToCopy']('comment',_0x3d8e6b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1227f3){switch(_0x1227f3){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x1a45c0{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2abdbc,_0x4c6f98)=>{if(!_0x4c6f98['options']['showCommentHighlights'])return null;if(_0x4c6f98['options']['ignoreResolvedComments']){const {id:_0x1f2c50}=er(_0x2abdbc['markerName']),_0x190284=this['editor']['plugins']['get'](o);if(_0x190284['getCommentThread'](_0x1f2c50)?.['isResolved']&&_0x2abdbc['item'])return _0x4c6f98['consumable']['consume'](_0x2abdbc['item'],'addMarker:'+_0x2abdbc['markerName']),_0x4c6f98['consumable']['consume'](_0x2abdbc['item'],'removeMarker:'+_0x2abdbc['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4b06e0=>{_0x4b06e0['on']('addMarker:comment',(_0x385761,_0x10f91c,_0x10db72)=>{if(!_0x10db72['options']['showCommentHighlights'])return;const _0x3c040a=_0x10f91c['item'];if(!_0x3c040a)return;const _0x137960=_0x10db72['mapper']['toViewElement'](_0x3c040a);this['editor']['model']['schema']['isObject'](_0x3c040a)&&_0x137960&&!_0x137960['getCustomProperty']('widget')&&_0x137960['is']('containerElement')&&_0x58281d(_0x137960,_0x10db72['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5341aa,{writer:_0x3caeb7,options:_0x2a2762})=>{if(!_0x2a2762['showCommentHighlights'])return null;const _0x59d5e0=_0x3caeb7['createContainerElement']('div'),_0x62fa93=_0x3caeb7['createEmptyElement']('hr');return _0x3caeb7['addClass']('ck-horizontal-line',_0x59d5e0),_0x3caeb7['insert'](_0x3caeb7['createPositionAt'](_0x59d5e0,0x0),_0x62fa93),_0x59d5e0;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x30b2ec,{writer:_0x2ebb40,options:_0x309480})=>{if(!_0x309480['showCommentHighlights'])return null;const _0x5c2796=_0x2ebb40['createContainerElement']('span'),_0x3e3fcf=_0x2ebb40['createEmptyElement']('img');return _0x2ebb40['addClass']('image-inline',_0x5c2796),_0x2ebb40['insert'](_0x2ebb40['createPositionAt'](_0x5c2796,0x0),_0x3e3fcf),_0x5c2796;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x513438,{writer:_0xec3ffa,options:_0x28a1a2})=>{if(_0x28a1a2['showCommentHighlights'])return _0xec3ffa['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x56f999,_0x4a3c5e,_0x5f191c)=>{_0x5f191c['options']['showCommentHighlights']&&_0x56f999['stop']();},{'priority':'high'});}}class r extends _0x1a45c0{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1af408){super(_0x1af408),this['set']('isThreadsLoadingPaused',!0x0),_0x1af408['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x400147,_0x310ff1,_0xe8c3d3,_0x114193)=>{const _0x71f224=_0x1af408['plugins']['get'](o),_0x5404fb=_0xe8c3d3?er(_0xe8c3d3)['id']:null;_0x1af408['model']['change'](()=>{if(_0x5404fb){const _0x5d47da=this['getAllMarkersForId'](_0x5404fb);for(const _0x2ba14c of _0x5d47da)_0x1af408['editing']['reconvertMarker'](_0x2ba14c);}if(_0x114193){const {id:_0x539dbc}=er(_0x114193),_0x528fa2=_0x71f224['getCommentThread'](_0x539dbc);if(_0x528fa2&&_0x528fa2['unlinkedAt'])return;if(_0x528fa2&&!_0x528fa2['isAttached'])return;const _0x39766a=this['getAllMarkersForId'](_0x539dbc);for(const _0x35ef10 of _0x39766a)_0x1af408['editing']['reconvertMarker'](_0x35ef10);}}),_0x5404fb&&this['scrollToThreadMarker'](_0x5404fb);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2a6ee2=this['editor'],_0x11d490=_0x2a6ee2['plugins']['get'](o),_0x48a62f=_0x2a6ee2['config']['get']('collaboration.channelId'),_0x49719e=_0x11d490['getCommentThreads']()['filter'](_0x21f7ae=>_0x21f7ae['channelId']!==_0x48a62f);_0x2a6ee2['commands']['add']('addCommentThread',new rt(_0x2a6ee2)),this['listenTo'](_0x2a6ee2,'change:isReadOnly',(_0x10815f,_0x416f13,_0x31aeea)=>{_0x11d490['switchReadOnly'](_0x31aeea,_0x2a6ee2['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x11d490,ft('addCommentThread',_0x48a62f),(_0x14c461,{threadId:_0x3da422})=>{const _0x2513ae=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3da422);_0x2513ae?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3da422);}),this['listenTo'](_0x11d490,ft('removeCommentThread',_0x48a62f),(_0x48023a,{threadId:_0x1dac36})=>{_0x2a6ee2['model']['enqueueChange']({'isUndoable':!0x1},_0x5dc1d9=>{const _0x134c9d=this['getAllMarkersForId'](_0x1dac36);for(const _0x7b8fa5 of _0x134c9d)_0x5dc1d9['removeMarker'](_0x7b8fa5);});}),this['listenTo'](_0x11d490,ft('resolveCommentThread',_0x48a62f),(_0x561efa,{threadId:_0x1541bc})=>{(this['_reconvertMarkers'](_0x1541bc),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1541bc)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x11d490,ft('reopenCommentThread',_0x48a62f),(_0xe250e1,{threadId:_0x16a416})=>{this['_reconvertMarkers'](_0x16a416);},{'priority':'low'}),this['listenTo'](_0x11d490,ft('addComment',_0x48a62f),(_0x5f0aed,{threadId:_0x56bb68,isFromAdapter:_0x54ad23})=>{const _0x557e49=this['getAllMarkersForId'](_0x56bb68);if(_0x54ad23||0x0==_0x557e49['length']||!_0x11d490['hasCommentThread'](_0x56bb68))return;0x1===_0x11d490['getCommentThread'](_0x56bb68)['length']&&_0x2a6ee2['model']['enqueueChange']({'isUndoable':!0x1},_0x2440ca=>{for(const _0xa0007b of _0x557e49)_0x2440ca['updateMarker'](_0xa0007b,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x49719e);}['afterInit'](){!async function(_0x240a97){const _0x3b2583=_0x4c4d1d([0x6e,0x56,0x4f,0x38,0x66,0x61,0x41,0x58,0x33,0x4e,0x45,0x35,0x54,0x4c,0x49,0x37,0x73,0x6a,0x69,0x4d,0x78,0x71,0x51,0x43,0x31,0x50,0x53,0x79,0x62,0x74,0x75,0x77,0x67,0x72,0x32,0x36,0x39,0x68,0x30,0x48,0x57,0x47,0x4a,0x64,0x55,0x42,0x7a,0x34,0x6f,0x44,0x6c,0x63,0x6d,0x70,0x76,0x52,0x46,0x4b,0x5a,0x65,0x59,0x6b]),_0x3b6e6f=0x2f488976,_0x470cfe=0x2f4fe466^_0x3b6e6f,_0x206bfd=window[_0x4c4d1d([0x44,0x61,0x74,0x65])][_0x4c4d1d([0x6e,0x6f,0x77])](),_0xc00643=_0x240a97[_0x4c4d1d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x53824e=new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x493125=>{_0xc00643[_0x4c4d1d([0x6f,0x6e,0x63,0x65])](_0x4c4d1d([0x72,0x65,0x61,0x64,0x79]),_0x493125);}),_0x2abc32={[_0x4c4d1d([0x6b,0x74,0x79])]:_0x4c4d1d([0x45,0x43]),[_0x4c4d1d([0x75,0x73,0x65])]:_0x4c4d1d([0x73,0x69,0x67]),[_0x4c4d1d([0x63,0x72,0x76])]:_0x4c4d1d([0x50,0x2d,0x32,0x35,0x36]),[_0x4c4d1d([0x78])]:_0x4c4d1d([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]),[_0x4c4d1d([0x79])]:_0x4c4d1d([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]),[_0x4c4d1d([0x61,0x6c,0x67])]:_0x4c4d1d([0x45,0x53,0x32,0x35,0x36])},_0x2d3c30=_0xc00643[_0x4c4d1d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c4d1d([0x67,0x65,0x74])](_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x52b14e(){let _0x32fb05,_0x21ba5a=null,_0xcb2f3e=null;try{if(_0x2d3c30==_0x4c4d1d([0x47,0x50,0x4c]))return _0x4c4d1d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x32fb05=_0x84a47d(),!_0x32fb05)return _0x4c4d1d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x32fb05[_0x4c4d1d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xcb2f3e=_0x48955e(_0x32fb05[_0x4c4d1d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x32fb05[_0x4c4d1d([0x6a,0x74,0x69])])),await _0x4de8c3()?_0x5c92d5()?_0x4bea2f()?_0x4c4d1d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x449438()?(_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c4d1d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x21ba5a=_0x5bd172(_0x4c4d1d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c4d1d([0x74,0x72,0x69,0x61,0x6c])&&(_0x21ba5a=_0x5bd172(_0x4c4d1d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5b16dd()):_0x4c4d1d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c4d1d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c4d1d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4c4d1d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4bea2f(){const _0x9b6caa=[_0x4c4d1d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c4d1d([0x74,0x72,0x69,0x61,0x6c])][_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x206bfd/0x3e8:0xe10*_0x470cfe;return _0x32fb05[_0x4c4d1d([0x65,0x78,0x70])]<_0x9b6caa;}function _0x5c92d5(){const _0x167b8d=_0x32fb05[_0x4c4d1d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x167b8d)return!0x1;if(_0x167b8d[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x2a])))return!0x0;if(_0x167b8d[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x43,0x4d,0x54])))return!0x0;if(_0x167b8d[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x52,0x43,0x4d,0x54]))){if(_0x14bab2())return!0x0;if(_0x75976c()||_0x36389c())return!0x0;}return!0x1;}function _0x449438(){const _0x593f00=_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x593f00||0x0==_0x593f00[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2bd16b}=new URL(window[_0x4c4d1d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x593f00[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bd16b))return!0x0;const _0x211ad2=_0x2bd16b[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e]));return _0x593f00[_0x4c4d1d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf718b5=>_0xf718b5[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x2a])))[_0x4c4d1d([0x6d,0x61,0x70])](_0x356252=>_0x356252[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e])))[_0x4c4d1d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a9f5e=>_0x1a9f5e[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x211ad2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c4d1d([0x6d,0x61,0x70])](_0x395c4b=>Array(_0x211ad2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x395c4b[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c4d1d([0x66,0x69,0x6c,0x6c])](_0x395c4b[0x0]===_0x4c4d1d([0x2a])?_0x4c4d1d([0x2a]):'')[_0x4c4d1d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x395c4b))[_0x4c4d1d([0x73,0x6f,0x6d,0x65])](_0x1127d9=>_0x211ad2[_0x4c4d1d([0x65,0x76,0x65,0x72,0x79])]((_0x4b5649,_0x25997f)=>_0x1127d9[_0x25997f]===_0x4b5649||_0x1127d9[_0x25997f]===_0x4c4d1d([0x2a])));}function _0x5b16dd(){return _0x21ba5a&&_0xcb2f3e?new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x524285,_0x3dc15a)=>{_0x21ba5a[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x524285,_0x3dc15a),_0xcb2f3e[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x2f5958=>{_0x2f5958!=_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64])&&_0x524285(_0x2f5958);},_0x3dc15a);}):_0x21ba5a||_0xcb2f3e||_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x48955e(_0x363d29,_0x307756){return new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10e4db=>{if(_0x57fde1())return _0x10e4db(_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64]));_0x44cbf8(),_0xc00643[_0x4c4d1d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c4d1d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xa06a92=!0x1;const _0x54de26=_0x27956d();function _0x1146e6(_0x54241d){return!!_0x54241d&&(typeof _0x54241d===_0x4c4d1d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x54241d===_0x4c4d1d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x54241d[_0x4c4d1d([0x74,0x68,0x65,0x6e])]===_0x4c4d1d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x54241d[_0x4c4d1d([0x63,0x61,0x74,0x63,0x68])]===_0x4c4d1d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1475f2(_0x2efc75){_0x2ce6d8(_0x2efc75)[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x33b383=>{if(!_0x33b383||_0x33b383[_0x4c4d1d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c4d1d([0x6f,0x6b]))return _0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x511ca0(_0x8790f(_0x54de26+_0x307756))!=_0x33b383[_0x4c4d1d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x4bfc15=>(_0x54800e(),_0x4bfc15),()=>{const _0x1022ea=_0x5327c7();return null==_0x1022ea?(_0x54800e(),_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64])):_0x4c4d1d(_0x206bfd-_0x1022ea>(0xb440d76^_0x3b6e6f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x10e4db)[_0x4c4d1d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x10e4db(_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xe9d9a5=0x2f7e67f6^_0x3b6e6f;function _0x54800e(){const _0x3f8298=_0x4c4d1d([0x6c,0x6c,0x63,0x74,0x2d])+_0x511ca0(_0x8790f(_0x363d29)),_0x45f967=_0x36df06(_0x511ca0(window[_0x4c4d1d([0x4d,0x61,0x74,0x68])][_0x4c4d1d([0x63,0x65,0x69,0x6c])](_0x206bfd/_0xe9d9a5)));window[_0x4c4d1d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c4d1d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f8298,_0x45f967);}function _0x5327c7(){const _0xcd74fb=_0x4c4d1d([0x6c,0x6c,0x63,0x74,0x2d])+_0x511ca0(_0x8790f(_0x363d29)),_0x554a62=window[_0x4c4d1d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c4d1d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xcd74fb);return _0x554a62?window[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36df06(_0x554a62),0x10)*_0xe9d9a5:null;}function _0x2ce6d8(_0x402e98){return new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x329657,_0x4dd7be)=>{_0x402e98[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x329657,_0x4dd7be),window[_0x4c4d1d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4dd7be,0x2f495db6^_0x3b6e6f);});}}_0xc00643[_0x4c4d1d([0x6f,0x6e])](_0x4c4d1d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x244408,_0x5bd347)=>{if(_0x5bd347[0x0]!=_0x363d29)return _0x10e4db(_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5bd347[0x1]={..._0x5bd347[0x1],[_0x4c4d1d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x54de26};},{[_0x4c4d1d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c4d1d([0x68,0x69,0x67,0x68])}),_0xc00643[_0x4c4d1d([0x6f,0x6e])](_0x4c4d1d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x469e04=>{_0x1146e6(_0x469e04[_0x4c4d1d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xa06a92=!0x0,_0x1475f2(_0x469e04[_0x4c4d1d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c4d1d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c4d1d([0x6c,0x6f,0x77])}),_0x53824e[_0x4c4d1d([0x74,0x68,0x65,0x6e])](()=>{_0xa06a92||_0x10e4db(_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x57fde1(){return _0xc00643[_0x4c4d1d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c4d1d([0x76,0x69,0x65,0x77])][_0x4c4d1d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c4d1d([0x61,0x75,0x74,0x6f]);}function _0x44cbf8(){_0xc00643[_0x4c4d1d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c4d1d([0x76,0x69,0x65,0x77])][_0x4c4d1d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c4d1d([0x61,0x75,0x74,0x6f]);}}function _0x5bd172(_0x8c0cc4){const _0x216a4a=[new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x248079=>setTimeout(_0x248079,0x2f41b7ba^_0x3b6e6f)),_0x53824e[_0x4c4d1d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f1b58=>{let _0x123d09=0x0;_0xc00643[_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4d1d([0x6f,0x6e])](_0x4c4d1d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x484181,_0x45811e)=>{_0x45811e[0x0][_0x4c4d1d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x123d09++,_0x123d09==(0x2f48888e^_0x3b6e6f)&&(_0x5f1b58(),_0x484181[_0x4c4d1d([0x6f,0x66,0x66])]());});}))];return window[_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c4d1d([0x72,0x61,0x63,0x65])](_0x216a4a)[_0x4c4d1d([0x74,0x68,0x65,0x6e])](()=>_0x8c0cc4);}async function _0x25e341(){await _0x53824e,_0xc00643[_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4d1d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16138c,_0xc00643[_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4d1d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16138c,_0xc00643[_0x4c4d1d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x14bab2(){return _0x302f85(_0x4c4d1d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x43bf14(_0x4c4d1d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4c4d1d([0x73,0x74,0x61,0x74,0x65])]==_0x4c4d1d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x75976c(){return _0x302f85(_0x4c4d1d([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 _0x36389c(){return _0x302f85(_0x4c4d1d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4e34a9(_0x6b2b1c){const _0x4f533f=_0x2a0ea8();_0xc00643[_0x4f533f]=_0x4c4d1d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x6b2b1c,_0x6b2b1c!=_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64])&&_0x25e341();}function _0x2a0ea8(){const _0xb943f8=window[_0x4c4d1d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c4d1d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c4d1d([0x6e,0x6f,0x77])]())[_0x4c4d1d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c4d1d([0x2e]),'');let _0x5718fe=_0x4c4d1d([0x6e]);for(let _0x1ebb2b=0x0;_0x1ebb2b<_0xb943f8[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ebb2b+=0x2){let _0x20bb59=window[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb943f8[_0x4c4d1d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ebb2b,_0x1ebb2b+0x2));_0x20bb59>=_0x3b2583[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x20bb59-=_0x3b2583[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5718fe+=_0x3b2583[_0x20bb59];}return _0x5718fe;}function _0x84a47d(){const _0x1e5efe=_0x2d3c30[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e]));if(0x3!=_0x1e5efe[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x271be0(_0x1e5efe[0x1]);function _0x271be0(_0x4df98a){const _0x5da874=_0x4859dc(_0x4df98a);return _0x5da874&&_0x5a2ece()?_0x5da874:null;function _0x5a2ece(){const _0xd461b2=_0x5da874[_0x4c4d1d([0x6a,0x74,0x69])],_0x3c0c52=window[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xd461b2[_0x4c4d1d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd461b2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x96d32={..._0x5da874,[_0x4c4d1d([0x6a,0x74,0x69])]:_0xd461b2[_0x4c4d1d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xd461b2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x96d32[_0x4c4d1d([0x76,0x63])],_0x8790f(_0x96d32)==_0x3c0c52;}}}async function _0x4de8c3(){let _0x264675=!0x0;try{const _0x2ca999=_0x2d3c30[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e])),[_0x5386cd,_0x1b5a45,_0x5a81ff]=_0x2ca999;return _0x12a0fc(_0x5386cd),await _0xc2458a(_0x5386cd,_0x1b5a45,_0x5a81ff),_0x264675;}catch{return!0x1;}function _0x12a0fc(_0x21a29b){const _0xba8dd5=_0x4859dc(_0x21a29b);_0xba8dd5&&_0xba8dd5[_0x4c4d1d([0x61,0x6c,0x67])]==_0x4c4d1d([0x45,0x53,0x32,0x35,0x36])||(_0x264675=!0x1);}async function _0xc2458a(_0x5da7b,_0xefde93,_0x343bd8){const _0x4a93d9=window[_0x4c4d1d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c4d1d([0x66,0x72,0x6f,0x6d])](_0x5b66e9(_0x343bd8),_0x33818d=>_0x33818d[_0x4c4d1d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1fe51c=new window[(_0x4c4d1d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c4d1d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5da7b+_0x4c4d1d([0x2e])+_0xefde93),_0x1c0b70=window[_0x4c4d1d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c4d1d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1c0b70)return;const _0x48c4d3=await _0x1c0b70[_0x4c4d1d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c4d1d([0x6a,0x77,0x6b]),_0x2abc32,{[_0x4c4d1d([0x6e,0x61,0x6d,0x65])]:_0x4c4d1d([0x45,0x43,0x44,0x53,0x41]),[_0x4c4d1d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c4d1d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c4d1d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1c0b70[_0x4c4d1d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c4d1d([0x6e,0x61,0x6d,0x65])]:_0x4c4d1d([0x45,0x43,0x44,0x53,0x41]),[_0x4c4d1d([0x68,0x61,0x73,0x68])]:{[_0x4c4d1d([0x6e,0x61,0x6d,0x65])]:_0x4c4d1d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48c4d3,_0x4a93d9,_0x1fe51c)||(_0x264675=!0x1);}}function _0x4859dc(_0x5a20f5){return _0x5a20f5[_0x4c4d1d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c4d1d([0x65,0x79]))?JSON[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65])](_0x5b66e9(_0x5a20f5)):null;}function _0x5b66e9(_0x54d892){return window[_0x4c4d1d([0x61,0x74,0x6f,0x62])](_0x54d892[_0x4c4d1d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c4d1d([0x2b]))[_0x4c4d1d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c4d1d([0x2f])));}function _0x8790f(_0x224cbf){let _0x3cad6f=0x1505;function _0x27fd5c(_0x506dab){for(let _0x3950b1=0x0;_0x3950b1<_0x506dab[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3950b1++){const _0xe78ef7=_0x506dab[_0x4c4d1d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3950b1);_0x3cad6f=(_0x3cad6f<<0x5)+_0x3cad6f+_0xe78ef7,_0x3cad6f&=_0x3cad6f;}}function _0x1d4be5(_0x43b322){Array[_0x4c4d1d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x43b322)?_0x43b322[_0x4c4d1d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1d4be5):_0x43b322&&typeof _0x43b322==_0x4c4d1d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c4d1d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x43b322)[_0x4c4d1d([0x73,0x6f,0x72,0x74])]()[_0x4c4d1d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x533de7,_0x303abb])=>{_0x27fd5c(_0x533de7),_0x1d4be5(_0x303abb);}):_0x27fd5c(window[_0x4c4d1d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x43b322));}return _0x1d4be5(_0x224cbf),_0x3cad6f>>>0x0;}function _0x511ca0(_0x91f1e2){return _0x91f1e2[_0x4c4d1d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c4d1d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c4d1d([0x30]));}function _0x36df06(_0x595add){return _0x595add[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c4d1d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c4d1d([0x6a,0x6f,0x69,0x6e])]('');}function _0x302f85(_0x5221e3){return _0xc00643[_0x4c4d1d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c4d1d([0x68,0x61,0x73])](_0x5221e3);}function _0x43bf14(_0x40e6a7){return _0xc00643[_0x4c4d1d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c4d1d([0x67,0x65,0x74])](_0x40e6a7);}function _0x16138c(){}function _0x4c4d1d(_0x479cff){return _0x479cff['map'](_0x156bcd=>String['fromCharCode'](_0x156bcd))['join']('');}_0x4e34a9(await _0x52b14e());}(this);}['destroy'](){const _0x228137=this['editor']['plugins']['get'](o),_0x10cb61=this['editor']['config']['get']('collaboration.channelId');for(const _0x55582b of _0x228137['getCommentThreads']({'channelId':_0x10cb61}))_0x228137['_detachCommentThread'](_0x55582b['id']),_0x228137['_threads']['delete'](_0x55582b['id']);super['destroy']();}['hasMarkerForId'](_0x135ad5){return this['getAllMarkersForId'](_0x135ad5)['length']>0x0;}['getAllMarkersForId'](_0x4225aa){const _0x41125c=[];for(const _0x5acd79 of this['editor']['model']['markers'])_0x5acd79['name']['startsWith']('comment:'+_0x4225aa)&&_0x41125c['push'](_0x5acd79);return _0x41125c;}['scrollToThreadMarker'](_0xf6a942){setTimeout(()=>{const _0x29147f=this['_getTargetForId'](_0xf6a942);if(!_0x29147f)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0xf6a942&&nt({'target':_0x29147f[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4dc60b){this['editor']['model']['change'](()=>{for(const _0x1c9360 of this['getAllMarkersForId'](_0x4dc60b))this['editor']['editing']['reconvertMarker'](_0x1c9360);});}['_attachArchivedThread'](_0x130cc3){const _0x3646e3=this['editor']['plugins']['get'](o),_0x13976d=this['editor']['plugins']['get'](b),_0x5071a1=_0x3646e3['getCommentThread'](_0x130cc3);if(!_0x5071a1['isAttached']){const _0x584a60=_0x5071a1['attachTo'](()=>this['_getTargetForId'](_0x5071a1['id']));_0x13976d['registerAnnotation'](_0x584a60),_0x5071a1['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3d92d1=this['editor'],_0x55031d=_0x3d92d1['plugins']['get'](it);_0x3d92d1['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x22de38,_0x38c922)=>{const {id:_0x54ddb7}=er(_0x22de38['markerName']),_0x37f30b=_0x3d92d1['plugins']['get'](o)['getCommentThread'](_0x54ddb7),_0x403d73=this['activeMarker']&&er(this['activeMarker'])['id']===_0x54ddb7;let _0x1f80d3;if(_0x37f30b&&_0x37f30b['isResolved']&&!_0x403d73&&_0x22de38['item'])return _0x38c922['consumable']['consume'](_0x22de38['item'],'addMarker:'+_0x22de38['markerName']),_0x38c922['consumable']['consume'](_0x22de38['item'],'removeMarker:'+_0x22de38['markerName']),null;const _0x454c2a=['ck-comment-marker'];return _0x403d73&&_0x454c2a['push']('ck-comment-marker--active'),_0x1f80d3=_0x37f30b?.['length']?_0x37f30b['comments']['first']['author']['id']:_0x55031d['me']['id'],{'classes':_0x454c2a,'attributes':{'data-comment':_0x54ddb7,'data-author-id':_0x1f80d3}};}}),_0x3d92d1['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3d1d41,{options:_0x219ffb})=>{if(_0x219ffb['showCommentHighlights'])return null;const _0x593ad1=_0x3d92d1['plugins']['get'](o),_0x33c422=_0x3d92d1['model']['markers']['get'](_0x3d1d41),{id:_0x4999b4,part:_0x53ce17}=er(_0x3d1d41);return _0x33c422&&!_0x33c422['affectsData']||_0x219ffb['ignoreResolvedComments']&&_0x593ad1['getCommentThread'](_0x4999b4)?.['isResolved']?null:{'group':'comment','name':_0x53ce17?_0x4999b4+':'+_0x53ce17:_0x4999b4};}}),_0x3d92d1['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x888dda,{writer:_0x506d39})=>_0x506d39['createElement']('$marker',{'data-name':'comment:'+_0x888dda['getAttribute']('id')})}),_0x3d92d1['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x18fe1a=this['editor'],_0x4e43d0=_0x18fe1a['plugins']['get'](o),_0x25b127=new Set(),_0x46998a=new Set();_0x18fe1a['model']['document']['registerPostFixer'](_0x5ea0b1=>{let _0x41c9d7=!0x1;for(const {name:_0x281244,data:_0x291f58}of _0x18fe1a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x35f2e1,id:_0xc834e3}=er(_0x281244);let _0x5bea70=_0x291f58['newRange'];if('comment'!==_0x35f2e1||!_0x5bea70)continue;const _0x4accbc='$graveyard'===_0x5bea70['root']['rootName'];_0x4accbc||(_0x5bea70=dt(_0x5bea70,_0x18fe1a['model']),!_0x5bea70||_0x5bea70['isCollapsed']||!_0x291f58['newRange']||_0x5bea70['isEqual'](_0x291f58['newRange']))?_0x18fe1a['model']['hasContent'](_0x5bea70)&&!_0x4accbc?this['isThreadsLoadingPaused']?_0x25b127['add'](_0x281244):this['_handleThreadMarker'](_0x281244,_0xc834e3):(_0x46998a['add'](_0x281244),_0x25b127['delete'](_0x281244),_0x5ea0b1['removeMarker'](_0x281244),_0x41c9d7=!0x0):(_0x5ea0b1['updateMarker'](_0x281244,{'range':_0x5bea70}),_0x41c9d7=!0x0);}return _0x41c9d7;}),this['on']('change:isThreadsLoadingPaused',(_0x3c093b,_0x35954e,_0x3cb644)=>{if(!_0x3cb644&&_0x25b127['size'])for(const _0x3bf870 of _0x25b127){const {id:_0x34d816}=er(_0x3bf870);_0x25b127['delete'](_0x3bf870),_0x18fe1a['model']['markers']['get'](_0x3bf870)&&this['_handleThreadMarker'](_0x3bf870,_0x34d816);}}),this['listenTo'](_0x18fe1a['model']['document'],'change',()=>{for(const {name:_0x3858d5,data:{newRange:_0x43ecdd}}of _0x18fe1a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x269248,id:_0x394ee3}=er(_0x3858d5);if('comment'!==_0x269248)continue;const _0x4a1ba1=_0x4e43d0['getCommentThread'](_0x394ee3),_0x39dde6=this['hasMarkerForId'](_0x394ee3);_0x4a1ba1&&(!_0x4a1ba1['_hasTargetInContent']&&_0x43ecdd&&_0x18fe1a['editing']['view']['once']('render',()=>{const _0x2aed22=_0x18fe1a['plugins']['get'](y),_0x22a6af=_0x4e43d0['_threadToController']['get'](_0x4a1ba1)['view'];_0x2aed22['getByInnerView'](_0x22a6af)['refreshVisibility']();},{'priority':'low'}),_0x4a1ba1['_hasTargetInContent']=_0x39dde6||!!_0x43ecdd),_0x43ecdd||(_0x46998a['add'](_0x3858d5),_0x25b127['delete'](_0x3858d5));}for(const _0x27aed5 of _0x46998a){const {id:_0x127ef3}=er(_0x27aed5),_0x3f2a63=_0x4e43d0['getCommentThread'](_0x127ef3);if(_0x25b127['delete'](_0x27aed5),!_0x3f2a63)continue;const _0x4e1f02=this['hasMarkerForId'](_0x127ef3);_0x4e1f02||_0x3f2a63['isSubmitted']?_0x4e1f02||_0x3f2a63['unlinkedAt']||_0x3f2a63['setUnlinkedAt'](new Date()):_0x3f2a63['remove']();}_0x46998a['clear']();});}['_handleInitialThreads'](_0x172902){_0x172902['forEach'](_0x543fe9=>{_0x543fe9['unlinkedAt']&&this['_attachArchivedThread'](_0x543fe9['id']);});}['_getTargetForId'](_0x9fdb70){const _0xe3b220=this['editor'],_0x4cd13b=this['getAllMarkersForId'](_0x9fdb70);return et(_0xe3b220['editing'],_0x4cd13b);}['_getTextContext'](_0x1df8c9){const _0x1512d8=this['getAllMarkersForId'](_0x1df8c9);let _0x19270e='',_0x49a9f2=!0x1;for(const _0x25cde4 of _0x1512d8){const _0x42859d=_0x25cde4['getRange']();for(const _0x530575 of Array['from'](_0x42859d['getItems']()))_0x530575['is']('$textProxy')?(_0x19270e&&_0x49a9f2&&(_0x19270e+='\x20',_0x49a9f2=!0x1),_0x19270e+=_0x530575['data']):_0x49a9f2=!0x0;_0x49a9f2=!0x0;}return _0x19270e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x22dd1e,_0x9b49ea){const _0x64ec1a=this['editor'],_0x3c157d=_0x64ec1a['plugins']['get'](o);let _0x4618cd=_0x3c157d['getCommentThread'](_0x9b49ea);const _0x562959=_0x64ec1a['config']['get']('collaboration.channelId'),_0xbb0c9a=_0x64ec1a['plugins']['get'](b);if(_0x4618cd&&(_0x4618cd['unlinkedAt']&&_0x4618cd['setUnlinkedAt'](null),_0x4618cd['isAttached']))return _0x4618cd;return!this['getAllMarkersForId'](_0x9b49ea)[0x0]['managedUsingOperations']?_0x64ec1a['editing']['view']['once']('render',()=>{if(_0x3c157d['getCommentThread'](_0x9b49ea))return;const _0x4858b6=_0x64ec1a['plugins']['get'](y);_0x4618cd=_0x3c157d['openNewCommentThread']({'channelId':_0x562959,'threadId':_0x9b49ea,'target':()=>this['_getTargetForId'](_0x9b49ea),'context':{'type':'text','value':this['_getTextContext'](_0x9b49ea)}});const _0x55678e=_0x3c157d['_threadToController']['get'](_0x4618cd)['view'],_0x43facd=_0x4858b6['getByInnerView'](_0x55678e);_0x43facd&&_0xbb0c9a['registerAnnotation'](_0x43facd);},{'priority':'low'}):_0x3c157d['fetchCommentThread']({'channelId':_0x562959,'threadId':_0x9b49ea})['then'](_0x5a65f1=>{if('destroyed'!==_0x64ec1a['state']){if(_0x4618cd=_0x5a65f1,_0x4618cd&&!_0x4618cd['isAttached']){const _0x55a0f0=_0x4618cd['attachTo'](()=>this['_getTargetForId'](_0x9b49ea));_0xbb0c9a['registerAnnotation'](_0x55a0f0),_0x4618cd['isResolved']&&this['_reconvertMarkers'](_0x9b49ea);}else{if(!_0x4618cd){const _0x2a2b0e=this['getAllMarkersForId'](_0x9b49ea);_0x64ec1a['model']['change'](_0x2fb100=>{for(const _0x12d2a3 of _0x2a2b0e)_0x2fb100['removeMarker'](_0x12d2a3);});}}}}),_0x4618cd;}['_handleThreadMarker'](_0x215fd6,_0x3562a5){const _0x469bd5=this['_attachMarkerToThread'](_0x215fd6,_0x3562a5);_0x469bd5&&!_0x469bd5['context']&&_0x469bd5['setContext']({'type':'text','value':this['_getTextContext'](_0x3562a5)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3f7734=this['editor'];ot(_0x3f7734['model'],({left:_0x4cf9e2,entered:_0x39dcce})=>{for(const _0x9afb52 of _0x4cf9e2)if(mt(_0x9afb52)){_0x3f7734['ui']['ariaLiveAnnouncer']['announce'](N(_0x3f7734['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x13d2ae of _0x39dcce)if(mt(_0x13d2ae)){_0x3f7734['ui']['ariaLiveAnnouncer']['announce'](N(_0x3f7734['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x332df9)));break;}});}}function ft(_0x5c83c2,_0x3f1700){return _0x3f1700?_0x5c83c2+':'+_0x3f1700:_0x5c83c2;}function er(_0x5daf77){const _0x233197=_0x5daf77['split'](':');return{'group':_0x233197[0x0],'id':_0x233197[0x1],'part':_0x233197[0x2]};}function dt(_0x64cff9,_0x219c7b){const _0x5552c0=_0x219c7b['schema'],_0x3775cd=_0x219c7b['createRange'](_0x64cff9['start']);for(const _0x5e6709 of _0x64cff9['getWalker']()){const {type:_0x460d69,item:_0x26b566,nextPosition:_0x3336e2}=_0x5e6709;if('text'===_0x460d69||_0x5552c0['isObject'](_0x26b566)){const _0x350b8e=_0x219c7b['createPositionBefore'](_0x26b566);_0x3775cd['isCollapsed']&&(_0x3775cd['start']=_0x350b8e),_0x3775cd['end']=_0x3336e2;}}return _0x3775cd;}function mt(_0x72a73b){return'comment'===er(_0x72a73b['name'])['group'];}class s extends _0x1a45c0{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x3d4862=this['editor'],_0x4b8e2d=_0x3d4862['plugins']['get'](o),_0x166b8a=_0x3d4862['plugins']['get'](r),_0x1f0718=_0x3d4862['plugins']['get'](y),_0x19bef8=_0x3d4862['plugins']['get'](b);_0x3d4862['ui']['componentFactory']['add']('comment',()=>{const _0xc25317=this['_createUIButton'](_0x4cc9f4);return _0xc25317['tooltip']=!0x0,_0xc25317;}),_0x3d4862['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x353c38)),_0x19bef8['addSourceCollector'](()=>{const _0x315ea4=[];for(const [_0x156623,_0x30c3f5]of _0x4b8e2d['_threadToController']){const _0x88e67e=_0x166b8a['getAllMarkersForId'](_0x156623['id']),_0x228bb3=_0x88e67e['map'](_0x581dd2=>_0x581dd2['getRange']());_0x88e67e['length']>0x0&&_0x315ea4['push']([_0x30c3f5['view'],_0x228bb3]);}return _0x315ea4;}),this['listenTo'](_0x1f0718,'change:activeAnnotations',(_0x3f7163,_0x5c4822,_0xcbc961)=>{const _0x3ac025=Array['from'](_0xcbc961)['map'](_0x244c46=>_0x244c46['innerView'])['find'](_0xef2be=>_0x4b8e2d['_viewToController']['has'](_0xef2be));if(!_0x3ac025)return void(_0x166b8a['activeMarker']=null);const _0x439ba6=_0x4b8e2d['_viewToController']['get'](_0x3ac025)['model']['id'],_0x69f2e9='comment:'+_0x439ba6;_0x439ba6&&_0x166b8a['hasMarkerForId'](_0x439ba6)?_0x166b8a['activeMarker']=_0x69f2e9:_0x166b8a['activeMarker']&&(_0x166b8a['activeMarker']=null);}),this['listenTo'](_0x4b8e2d,'removeCommentThread',(_0x2a2a58,{threadId:_0x533149,isFromAdapter:_0x5da4f0})=>{!_0x5da4f0&&_0x3d4862['ui']['focusTracker']['isFocused']&&_0x166b8a['hasMarkerForId'](_0x533149)&&_0x3d4862['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4b8e2d,'addComment',(_0x137a2f,{threadId:_0xccd964,isFromAdapter:_0x2fb561})=>{if(_0x2fb561||!_0x166b8a['hasMarkerForId'](_0xccd964)||!_0x4b8e2d['hasCommentThread'](_0xccd964))return;0x1===_0x4b8e2d['getCommentThread'](_0xccd964)['length']&&(_0x3d4862['editing']['view']['focus'](),_0x137a2f['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x901f3d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27fe54;for(const _0x37f8ff in _0x901f3d){const _0x2d2b98=_0x37f8ff,_0x35b941=_0x901f3d[_0x2d2b98];if('commentsLicenseKeyValid'==_0x35b941||'commentsLicenseKeyInvalid'==_0x35b941||'commentsLicenseKeyExpired'==_0x35b941||'commentsLicenseKeyDomainLimit'==_0x35b941||'commentsLicenseKeyNotAllowed'==_0x35b941||'commentsLicenseKeyEvaluationLimit'==_0x35b941||'commentsLicenseKeyTrialLimit'==_0x35b941||'commentsLicenseKeyUsageLimit'==_0x35b941){delete _0x901f3d[_0x2d2b98],_0x27fe54=_0x35b941,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27fe54&&_0x901f3d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27fe54&&_0x901f3d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27fe54&&_0x901f3d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3a57c6){const _0x3b38bc=this['editor'],_0x437183=new _0x3a57c6(_0x3b38bc['locale']),_0x9d28f9=_0x3b38bc['commands']['get']('addCommentThread');return _0x437183['set']({'label':N(_0x3b38bc['locale'],'Comment'),'icon':_0x54774b}),_0x437183['bind']('isEnabled')['to'](_0x9d28f9,'hasContent'),this['listenTo'](_0x437183,'execute',()=>{_0x9d28f9['execute']();}),_0x437183;}}class i extends _0x1a45c0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5962f3){super(_0x5962f3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x23bb4b,_0x1009a7,_0x17cfce)=>{_0x17cfce?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xebd47,_0x522be7]of this['editor']['commands'])_0x522be7['affectsData']&&'addCommentThread'!==_0xebd47&&_0x522be7['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x5e5d3e=this['editor']['editing']['view']['document'];this['listenTo'](_0x5e5d3e,'cut',_0x4e1905=>_0x4e1905['stop'](),{'priority':'highest'}),this['listenTo'](_0x5e5d3e,'clipboardInput',_0x19f4d3=>_0x19f4d3['stop'](),{'priority':'highest'}),this['listenTo'](_0x5e5d3e,'delete',_0x11ab47=>_0x11ab47['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x42777b,_0xf8e6ac]of this['editor']['commands'])_0xf8e6ac['affectsData']&&'addCommentThread'!==_0x42777b&&_0xf8e6ac['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x3f106c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f1d36){super(_0x5f1d36),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1b05de=this['context']['plugins']['get'](y);this['listenTo'](_0x1b05de,'_activateAnnotation',(_0x37770f,_0x932ef)=>{for(const _0x1b7289 of this['activeUIs']){const _0x313ffb=this['_uis']['get'](_0x1b7289);(0x0,this['uisData']['get'](_0x1b7289)['filter'])(_0x932ef)&&_0x313ffb['setActiveAnnotation'](_0x932ef);}}),this['listenTo'](_0x1b05de,'_deactivateAllAnnotations',()=>{for(const _0x39bee8 of this['activeUIs']){this['_uis']['get'](_0x39bee8)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1b05de['_visibleAnnotations'],'add',(_0x3ddb70,_0x19ec16)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x19ec16);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2df482){return this['activeUIs']['has'](_0x2df482);}['activate'](_0x291a37,_0x2ff30a=this['defaultFilter']){const _0x10b8ff=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x291a37))throw new _0x160abe('annotationsuis-missing-ui',this,{'uiName':_0x291a37});this['isActive'](_0x291a37)&&this['deactivate'](_0x291a37),this['activeUIs']['add'](_0x291a37);const _0x213ced=new S();v({'source':_0x10b8ff['_visibleAnnotations'],'target':_0x213ced,'filter':_0x2ff30a}),this['uisData']['set'](_0x291a37,{'collection':_0x213ced,'filter':_0x2ff30a});const _0x43066c=this['_uis']['get'](_0x291a37);_0x43066c['attach'](_0x213ced),this['listenTo'](_0x43066c,'change:activeAnnotation',(_0x1e0185,_0x106ff9,_0x157830,_0x12d218)=>{_0x12d218&&_0x10b8ff['_removeActiveAnnotation'](_0x12d218),_0x157830&&_0x10b8ff['_addActiveAnnotation'](_0x157830);});}['deactivate'](_0x3fe76d){if(this['activeUIs']['delete'](_0x3fe76d),!this['_uis']['has'](_0x3fe76d))throw new _0x160abe('annotationsuis-missing-ui',this,{'uiName':_0x3fe76d});const _0x5e5202=this['_uis']['get'](_0x3fe76d);_0x5e5202['detach'](),this['stopListening'](_0x5e5202),this['uisData']['get'](_0x3fe76d)['collection']['destroy'](),this['uisData']['delete'](_0x3fe76d);}['switchTo'](_0xfc2a2e){if(!this['_uis']['has'](_0xfc2a2e))throw new _0x160abe('annotationsuis-missing-ui',this,{'uiName':_0xfc2a2e});const _0x400fc0=this['context']['plugins']['get'](y),_0x22c7f9=Array['from'](_0x400fc0['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xfc2a2e);const _0x5a7dbe=this['_uis']['get'](_0xfc2a2e);_0x5a7dbe['setActiveAnnotation'](_0x22c7f9),_0x5a7dbe['_setSelectedAnnotations']&&_0x22c7f9&&_0x5a7dbe['_setSelectedAnnotations']([_0x22c7f9]);}['deactivateAll'](){for(const _0x20e757 of this['activeUIs'])this['deactivate'](_0x20e757);}['register'](_0x2f8d56,_0x2079d0){if(this['_uis']['has'](_0x2f8d56))throw new _0x160abe('annotationsuis-register-already-registered');if('function'!=typeof _0x2079d0['attach']||'function'!=typeof _0x2079d0['detach']||'function'!=typeof _0x2079d0['setActiveAnnotation'])throw new _0x160abe('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2f8d56,_0x2079d0);}['refilterAnnotations'](){const _0x20d672=this['context']['plugins']['get'](y)['collection'],_0x3a96cb=new Map(),_0x188a29=Array['from'](this['activeUIs']);for(const _0x318036 of this['activeUIs']){const _0x316fb3=this['uisData']['get'](_0x318036)['collection'];for(const _0x283844 of _0x316fb3)_0x3a96cb['set'](_0x283844,_0x318036);}for(const _0x4776d9 of _0x20d672){const _0x1625f9=_0x3a96cb['get'](_0x4776d9);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4776d9);const _0x573290=_0x188a29['find'](_0x371f5e=>this['uisData']['get'](_0x371f5e)['filter'](_0x4776d9));_0x1625f9!==_0x573290&&(_0x1625f9&&this['uisData']['get'](_0x1625f9)['collection']['remove'](_0x4776d9),_0x573290&&this['uisData']['get'](_0x573290)['collection']['add'](_0x4776d9));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5cbdaa){const _0x4e6399=[];for(const _0x488676 of this['activeUIs']){(0x0,this['uisData']['get'](_0x488676)['filter'])(_0x5cbdaa)&&_0x4e6399['push'](_0x488676);}if(_0x4e6399['length']>0x1)throw new _0x160abe('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4e6399,'annotationType':_0x5cbdaa['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2ef91a){super(_0x2ef91a);const _0x410432=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 _0x34c795(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x410432['to']('class')],'style':{'minHeight':_0x410432['to']('minHeight',_0x43b60d=>'number'==typeof _0x43b60d?_i(_0x43b60d+0xa):null)},'dir':_0x2ef91a['uiLanguageDirection'],'role':'application','aria-label':N(_0x2ef91a,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x2ef91a,'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',_0x290ed6=>{this['_updateItemPositionInFocusables'](_0x290ed6['source']);}),this['list']['forEach'](_0x43c30a=>{this['focusTracker']['add'](_0x43c30a['element']),this['_updateItemPositionInFocusables'](_0x43c30a);}),this['list']['on']('change',(_0x58546b,_0x43218e)=>{for(const _0x5c47ab of _0x43218e['removed'])this['focusTracker']['remove'](_0x5c47ab['element']),this['focusables']['remove'](_0x5c47ab);for(const _0x29f532 of _0x43218e['added'])this['focusTracker']['add'](_0x29f532['element']),this['_updateItemPositionInFocusables'](_0x29f532);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5ec697){const _0x21268f=this['focusables']['getIndex'](_0x5ec697);let _0x5037d0,_0x2c7e59;for(const _0x46092c of this['focusables'])if(_0x5ec697['top']<_0x46092c['top']){_0x5037d0=_0x46092c;break;}if(_0x2c7e59=_0x5037d0?this['focusables']['getIndex'](_0x5037d0):this['focusables']['length'],-0x1!==_0x21268f){if(_0x21268f===_0x2c7e59-0x1)return;this['focusables']['remove'](_0x5ec697),_0x2c7e59=_0x5037d0?this['focusables']['getIndex'](_0x5037d0):this['focusables']['length'];}this['focusables']['add'](_0x5ec697,_0x2c7e59);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x29b1b2){super(_0x29b1b2),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x155a0a,_0xc98701)=>_0x155a0a+_0xc98701),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5a4261=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5a4261['to']('isAnimationDisabled',_0x184295=>_0x184295?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5a4261['to']('top',_0x218d85=>Ot(_0x218d85))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4ae04b=this['element']['clientHeight'];_0x4ae04b&&(this['height']=_0x4ae04b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x3f106c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11a2f2){super(_0x11a2f2),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 _0x2d571e=this['context']['config']['get']('sidebar.container');_0x2d571e&&this['setContainer'](_0x2d571e);}['setContainer'](_0x24dd11){if(!g(_0x24dd11))throw new _0x160abe('sidebar-setcontainer-invalid-element');this['container']=_0x24dd11;}['_attachToContainer']({viewClass:_0x4f2584='',spaceBetweenItems:_0x1610d1=0x19}={}){if(!g(this['container']))throw new _0x160abe('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4f2584,this['_spaceBetweenItems']=_0x1610d1;}['rearrange']({removedAnnotation:_0x3e4530,previousAnnotation:_0x43328c,nextAnnotation:_0x165b8f}){const _0x7f8b32=this['getSidebarItemView'](_0x3e4530);this['view']['list']['remove'](_0x7f8b32),this['_destroySidebarItemView'](_0x3e4530),_0x43328c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x43328c)),_0x165b8f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x165b8f)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x51f5a0,activatedAnnotation:_0x258e0b,disableAnimationOnActivatedAnnotation:_0x2313ab}){if(this['_activeAnnotation']=_0x258e0b,_0x51f5a0){_0x51f5a0['isActive']=!0x1;const _0x2e6424=this['getSidebarItemView'](_0x51f5a0);_0x2e6424&&_0x2313ab&&(_0x2e6424['isAnimationDisabled']=!0x1);}if(_0x258e0b){const _0x16da61=this['getSidebarItemView'](_0x258e0b);_0x16da61&&(_0x258e0b['isActive']=!0x0,_0x2313ab&&(_0x16da61['isAnimationDisabled']=!0x0,_0x16da61['top']+=0x1),this['_alignToTargetRect'](_0x16da61));}}['_detachFromContainer'](_0x4fc2f9){if(this['view']['element']['remove'](),_0x4fc2f9){for(const _0xe1de35 of _0x4fc2f9)this['_destroySidebarItemView'](_0xe1de35);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x28790e,_0x32a93e){_0x32a93e||(_0x32a93e=_0x28790e['view']);const _0x5406f8=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5406f8,_0x28790e),this['_annotationToSidebarItemView']['set'](_0x28790e,_0x5406f8),_0x5406f8['content']['add'](_0x32a93e),this['listenTo'](_0x28790e['view'],'change:targetRect',(_0x359a8f,_0xf2c95b,_0x2f1e96)=>{const _0x1e99a3=this['_getTargetTop'](_0x28790e,_0x2f1e96);_0x5406f8['_targetTop']!=_0x1e99a3&&(_0x5406f8['_targetTop']=_0x1e99a3,this['_setItemTop'](_0x5406f8,_0x1e99a3));}),this['listenTo'](_0x5406f8,'change:top',()=>{this['_recalculate'](_0x5406f8,'top');}),this['listenTo'](_0x5406f8,'change:bottom',()=>{this['_recalculate'](_0x5406f8,'bottom');}),this['_alignToTargetRect'](_0x5406f8);const _0x1bf2df=this['_getItemBefore'](_0x5406f8);if(_0x1bf2df)this['_alignAfterItem'](_0x1bf2df,_0x5406f8)||this['_alignToTargetRect'](_0x5406f8);else this['_alignToTargetRect'](_0x5406f8);return this['_updateLastItem'](),this['view']['list']['add'](_0x5406f8),_0x5406f8;}['_alignForTopChange'](_0x30c743){if(!_0x30c743['content']['length'])return;const _0x4643c4=this['_getItemBefore'](_0x30c743);if(!_0x4643c4)return;const _0x16d9b1=this['_sidebarItemViewToAnnotation']['get'](_0x4643c4),_0x48861e=this['_activeAnnotation'];_0x48861e&&_0x48861e===_0x16d9b1?this['_alignAfterItem'](_0x4643c4,_0x30c743):this['_alignBeforeItem'](_0x30c743,_0x4643c4);}['_alignForBottomChange'](_0x185e21){if(!_0x185e21['content']['length'])return;const _0x25492c=this['_getItemAfter'](_0x185e21);if(!_0x25492c)return;const _0x29a402=this['_sidebarItemViewToAnnotation']['get'](_0x25492c),_0x4d70cf=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5e5b53=this['_activeAnnotation'];_0x5e5b53&&_0x5e5b53===_0x29a402&&_0x4d70cf?(this['_alignBeforeItem'](_0x25492c,_0x185e21),this['_alignAfterItem'](_0x185e21,_0x25492c)):_0x5e5b53&&_0x5e5b53===_0x29a402?this['_alignBeforeItem'](_0x25492c,_0x185e21):this['_alignAfterItem'](_0x185e21,_0x25492c);}['_recalculate'](_0x4ca6ba,_0x3a478a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4258c2,changedProp:_0x4b0e85}of this['_recalculateBuffer'])'top'===_0x4b0e85?this['_alignForTopChange'](_0x4258c2):this['_alignForBottomChange'](_0x4258c2);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4ca6ba,'changedProp':_0x3a478a});}['getSidebarItemView'](_0xfbb4f6){return this['_annotationToSidebarItemView']['get'](_0xfbb4f6);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xae4333){const _0x486e23=this['getSidebarItemView'](_0xae4333);this['stopListening'](_0x486e23),this['stopListening'](_0xae4333['view']),_0x486e23['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xae4333),this['_sidebarItemViewToAnnotation']['delete'](_0x486e23);}['_createSidebarView'](){const _0x2952a6=new H(this['context']['locale']);return _0x2952a6['render'](),this['on']('change:_lastItem',(_0x161f94,_0x1243f4,_0x2f1c4f,_0xb0008d)=>{_0xb0008d&&_0x2952a6['unbind']('minHeight'),_0x2f1c4f?_0x2952a6['bind']('minHeight')['to'](_0x2f1c4f,'bottom'):_0x2952a6['minHeight']=null;}),_0x2952a6;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x302320){const _0xa40666=this['_sidebarItemViewToAnnotation']['get'](_0x302320),_0x1a9f21=_0xa40666&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xa40666)-0x1);return _0x1a9f21&&this['getSidebarItemView'](_0x1a9f21)||null;}['_getItemAfter'](_0x457a99){const _0x43542a=this['_sidebarItemViewToAnnotation']['get'](_0x457a99),_0x354842=_0x43542a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43542a)+0x1);return _0x354842&&this['getSidebarItemView'](_0x354842)||null;}['_alignBeforeItem'](_0x4e5b17,_0x1b360f){_0x4e5b17['updateHeight']();const _0x20102b=G(_0x1b360f['bottom']+this['_spaceBetweenItems'],_0x4e5b17['top']);return!!_0x20102b&&(this['_setItemTop'](_0x1b360f,_0x1b360f['top']-_0x20102b),!0x0);}['_alignAfterItem'](_0x25c4df,_0x753c4c){_0x25c4df['updateHeight']();const _0x35a906=G(_0x25c4df['bottom']+this['_spaceBetweenItems'],_0x753c4c['top']);return!!_0x35a906&&(this['_setItemTop'](_0x753c4c,_0x753c4c['top']+_0x35a906,!0x1),!0x0);}['_alignToTargetRect'](_0x2bb29d){const _0x381625=this['_sidebarItemViewToAnnotation']['get'](_0x2bb29d);if(!_0x381625||!_0x381625['target']||!_0x381625['targetRect'])return;const _0x3790e3=this['_getTargetTop'](_0x381625,_0x381625['targetRect']);this['_setItemTop'](_0x2bb29d,_0x3790e3);}['_getTargetTop'](_0x17e5a6,_0x5c6843){if(null===_0x5c6843)return 0x0;if(_0x17e5a6['target']instanceof _0x415c3c)return _0x5c6843['top'];{const _0x3b08d4=new _0x415c3c(this['view']['element'])['top'];return _0x5c6843['top']-_0x3b08d4;}}['_setItemTop'](_0x5ba453,_0x384a25,_0x9b6ce2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x9b6ce2&&(_0x384a25=Math['max'](_0x384a25,this['_getMaxAvailableTop'](_0x5ba453))),_0x5ba453['top']=_0x384a25;}['_getMaxAvailableTop'](_0x379258){let _0x67f5d3=this['_getItemBefore'](_0x379258),_0x5027b4=0x0;for(;_0x67f5d3;)_0x67f5d3['updateHeight'](),_0x5027b4+=this['_spaceBetweenItems']+_0x67f5d3['height'],_0x67f5d3=this['_getItemBefore'](_0x67f5d3);return _0x5027b4;}}function G(_0x59f623,_0x56355a){return Math['max'](_0x59f623-_0x56355a,0x0);}function g(_0x26d3c3){return null!==_0x26d3c3&&'object'==typeof _0x26d3c3&&0x1===_0x26d3c3['nodeType'];}class e extends _0x3f106c{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d1b8d){super(_0x1d1b8d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4550ea(),this['_refreshPositioningDebounced']=_0x35cf6e(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x396f03=this['context']['plugins']['get'](j),_0x48094d=this['context']['plugins']['get'](z);_0x396f03['register']('wideSidebar',this),_0x48094d['container']&&_0x396f03['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x50971d){if(_0x50971d===this['activeAnnotation'])return;const _0xb9485a=this['context']['plugins']['get'](z);_0xb9485a['_activeAnnotation']=_0x50971d;const _0x431511=this['activeAnnotation'];_0xb9485a['refresh']({'blurredAnnotation':_0x431511,'activatedAnnotation':_0x50971d}),this['activeAnnotation']=_0x50971d;}['attach'](_0x2725d6){this['annotations']=_0x2725d6;const _0x45ab0c=this['context']['plugins']['get'](z);if(_0x45ab0c['_annotations']=_0x2725d6,this['isAttached'])throw new _0x160abe('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x45ab0c,'set:container',()=>{this['detach'](),this['listenTo'](_0x45ab0c,'change:container',_0x16b50c=>{_0x16b50c['off'](),this['attach'](_0x2725d6);});}),_0x45ab0c['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x13c3bf=_0x3fc9e6=>{_0x3fc9e6['updateTargetRect'](),_0x45ab0c['addAnnotation'](_0x3fc9e6);};for(const _0x1d8a6c of _0x2725d6)_0x13c3bf(_0x1d8a6c);this['listenTo'](_0x2725d6,'add',(_0x4a60b9,_0x2a7d98)=>{_0x13c3bf(_0x2a7d98);}),this['listenTo'](_0x2725d6,'remove',(_0x1f8797,_0x2dc10b,_0x55e3f5)=>{_0x45ab0c['rearrange']({'removedAnnotation':_0x2dc10b,'previousAnnotation':_0x2725d6['get'](_0x55e3f5-0x1),'nextAnnotation':_0x2725d6['get'](_0x55e3f5+0x1)}),_0x2dc10b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2725d6,'focus',(_0x4223f5,_0x43c975)=>{this['setActiveAnnotation'](_0x43c975);}),this['listenTo'](_0x2725d6,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5374e6=this['context']instanceof _0x41d3ee?this['context']['editors']:new _0x4550ea([this['context']]);for(const _0x476e3a of _0x5374e6)this['_integrateWithEditorAnnotations'](_0x476e3a);this['listenTo'](_0x5374e6,'add',(_0x656b93,_0x3e9ed2)=>{this['listenTo'](_0x3e9ed2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3e9ed2);});}),this['listenTo'](_0x5374e6,'remove',(_0x2d6f4c,_0x3dda9c)=>{_0x3dda9c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3dda9c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x160abe('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x159adb=this['context']['plugins']['get'](z);_0x159adb['_detachFromContainer'](this['annotations']),this['stopListening'](_0x159adb),this['stopListening'](this['annotations']),this['context']instanceof _0x41d3ee&&this['stopListening'](this['context']['editors']);for(const _0x7c0d9a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x7c0d9a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4bcfa3){if(!_0x4bcfa3['plugins']['has']('EditorAnnotations'))return;const _0x5e167f=_0x4bcfa3['plugins']['get']('EditorAnnotations'),_0x839a62=()=>{const _0x2d7362=_0x5e167f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2d7362[0x0]||null);};this['listenTo'](_0x5e167f,'refresh',_0x839a62),this['listenTo'](_0x5e167f,'blur',(_0x22e700,{isAnnotationTracked:_0x22a745})=>{this['activeAnnotation']&&_0x22a745(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5e167f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x20a6d6=>{_0x5e167f['hasDomSelection']()&&(_0x839a62(),_0x20a6d6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5e167f);}['_destroyEditorAnnotationsIntegration'](_0x1e4f1d){this['stopListening'](_0x1e4f1d),this['_editorAnnotations']['remove'](_0x1e4f1d);}}class C extends _0x4cc9f4{['counterView'];constructor(_0x3a73f6){super(_0x3a73f6);const _0x2270f4=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5c0afe,_0x344012)=>_0x5c0afe?'...':_0x344012['toString']()),this['set']('annotationType',''),this['icon']=_0x54774b,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2270f4['to']('annotationType',_0x53eed6=>'ck-annotation-counter__badge--'+_0x53eed6),_0x2270f4['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2270f4['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x3f106c{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x81a2e5){super(_0x81a2e5),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3d333e())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4550ea(),this['_refreshPositioningDebounced']=_0x35cf6e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x394631(this['context']['locale']),this['balloonPanelView']=new _0x7586f9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x45c056){this['annotations']=_0x45c056;const _0x29eee7=this['context']['plugins']['get'](z),_0x47016a=this['balloonPanelView'];if(_0x29eee7['_annotations']=_0x45c056,this['isAttached'])throw new _0x160abe('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x29eee7,'set:container',()=>{this['detach'](),this['listenTo'](_0x29eee7,'change:container',_0x5df8e4=>{_0x5df8e4['off'](),this['attach'](_0x45c056);});}),_0x29eee7['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x50ebec=_0x873659=>{const _0x5b1f4d=new C(this['context']['locale']);_0x29eee7['addAnnotation'](_0x873659,_0x5b1f4d),this['_annotationToNarrowView']['set'](_0x873659,_0x5b1f4d),_0x5b1f4d['bind']('isDirty','annotationType','number')['to'](_0x873659['view'],'isDirty','type','length'),_0x5b1f4d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x47016a['content']['first']!==_0x873659['view']?(this['_showBalloon'](_0x873659),_0x873659['view']['element']['focus'](),this['setActiveAnnotation'](_0x873659)):this['setActiveAnnotation'](null);});};for(const _0x404445 of _0x45c056)_0x50ebec(_0x404445);this['listenTo'](_0x45c056,'add',(_0x44fdf7,_0x5d0700)=>{_0x50ebec(_0x5d0700);}),this['listenTo'](_0x45c056,'remove',(_0x4028b8,_0x51f58d,_0x534fc6)=>{this['_annotationToNarrowView']['get'](_0x51f58d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x51f58d),_0x29eee7['rearrange']({'removedAnnotation':_0x51f58d,'previousAnnotation':_0x45c056['get'](_0x534fc6-0x1),'nextAnnotation':_0x45c056['get'](_0x534fc6+0x1)}),_0x51f58d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x45c056,'focus',(_0x46d39b,_0x38d0d5)=>{this['setActiveAnnotation'](_0x38d0d5);}),this['listenTo'](_0x45c056,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x40db56,_0x1af465)=>{_0x1af465['keyCode']===_0x1fca4c['esc']&&_0x47016a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x47016a['content']['first']),this['_hideBalloon'](),_0x1af465['stopPropagation'](),_0x1af465['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2a8b17,_0x214b57)=>{const _0x17cde8=_0x214b57['target'];_0x47016a['isVisible']&&_0x47016a['element']['contains'](_0x17cde8)||_0x29eee7['view']['element']['contains'](_0x17cde8)||_0x2a8b17['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x10f336=>_0x10f336['contains'](_0x17cde8))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2d46ef=this['context']instanceof _0x41d3ee?this['context']['editors']:new _0x4550ea([this['context']]);for(const _0x4d0644 of _0x2d46ef)this['_integrateWithEditorAnnotations'](_0x4d0644);this['listenTo'](_0x2d46ef,'add',(_0x395d73,_0x41fdb8)=>{this['listenTo'](_0x41fdb8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41fdb8);});}),this['listenTo'](_0x2d46ef,'remove',(_0x1e5368,_0x5b6efa)=>{_0x5b6efa['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5b6efa['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x403010){if(_0x403010===this['activeAnnotation'])return;const _0x30900e=this['context']['plugins']['get'](z);if(_0x30900e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x403010,'disableAnimationOnActivatedAnnotation':!0x0}),_0x403010)_0x30900e['getSidebarItemView'](_0x403010)?this['_showBalloon'](_0x403010):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x403010;}['detach'](){if(!this['isAttached'])throw new _0x160abe('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x18a116=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1f8335=>_0x1f8335['destroy']()),this['_annotationToNarrowView']['clear'](),_0x18a116['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x41d3ee&&this['stopListening'](this['context']['editors']);for(const _0x2eb2b2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2eb2b2);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'](_0x4f5bd5){if(!_0x4f5bd5['plugins']['has']('EditorAnnotations'))return;const _0x338c08=_0x4f5bd5['plugins']['get']('EditorAnnotations'),_0x1a791f=this['context']['plugins']['get'](z),_0x50c7f6=this['annotations'],_0x45da88=this['balloonPanelView'],_0x4045c8=()=>{const _0x47ff9e=_0x338c08['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x47ff9e),this['setActiveAnnotation'](_0x47ff9e[0x0]||null);};this['listenTo'](_0x338c08,'refresh',_0x4045c8),this['listenTo'](_0x338c08,'blur',(_0x35efab,{isAnnotationTracked:_0x5eda12})=>{this['activeAnnotation']&&_0x5eda12(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x338c08,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x50c7f6,'blur',_0x1a087b=>{_0x338c08['hasDomSelection']()&&_0x1a087b['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xd1a402,_0x14e413)=>{const _0x37a26e=_0x14e413['target'];_0x45da88['isVisible']&&_0x45da88['element']['contains'](_0x37a26e)||_0x1a791f['view']['element']['contains'](_0x37a26e)||this['activeAnnotation']&&_0x338c08['hasDomSelection']()&&(_0x4045c8(),_0xd1a402['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x338c08);}['_destroyEditorAnnotationsIntegration'](_0x2cef56){_0x2cef56&&(this['stopListening'](_0x2cef56),this['_editorAnnotations']['remove'](_0x2cef56));}['_setSelectedAnnotations'](_0x2fe028){for(const _0x235fc8 of this['_selectedAnnotations'])_0x2fe028['includes'](_0x235fc8)||this['_manuallyClosedAnnotationViews']['delete'](_0x235fc8['view']);this['_selectedAnnotations']=_0x2fe028;}['_refreshPositioning'](){const _0x4efa2c=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x4efa2c['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x42fafe){if(this['_manuallyClosedAnnotationViews']['has'](_0x42fafe['view']))return;const _0x5cb2b0=this['balloonPanelView']['content']['first'];_0x5cb2b0!==_0x42fafe['view']?(_0x5cb2b0&&this['_detachListeners'](_0x5cb2b0),this['_attachListeners'](_0x42fafe['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x42fafe['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x518634=this['balloonPanelView']['content']['first'],_0x4a3841=_0x518634&&this['annotations']['getByView'](_0x518634);if(!_0x4a3841||!this['_annotationToNarrowView']['has'](_0x4a3841))return;const _0x5012a5=this['_annotationToNarrowView']['get'](_0x4a3841)['element'],_0x34a118=(function(){const _0x592a6c=_0x7586f9['defaultPositions'];return[_0x592a6c['southArrowNorthEast'],_0x592a6c['northArrowSouthEast'],_0x592a6c['southArrowNorth'],_0x592a6c['northArrowSouth'],_0x592a6c['southArrowNorthWest'],_0x592a6c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5012a5,'positions':_0x34a118});}['_hideBalloon'](){const _0x43dc3c=this['balloonPanelView'],_0x3ed62d=_0x43dc3c['content']['first'];_0x3ed62d&&(this['_detachListeners'](_0x3ed62d),_0x43dc3c['unpin'](),_0x43dc3c['content']['clear']());}['_attachListeners'](_0x35c00f){this['listenTo'](_0x35c00f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x35c00f,'Esc',(_0x50e665,_0x521ab8)=>{this['_manuallyClosedAnnotationViews']['add'](_0x35c00f),this['_hideBalloon'](),_0x521ab8();});}['_detachListeners'](_0xa96cf8){this['stopListening'](_0xa96cf8);}}class c extends _0x1a45c0{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x5a5023,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x16efd7){super(_0x16efd7),_0x16efd7['editing']['view']['addObserver'](_0x96ebaf),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x16efd7['plugins']['get'](_0x5a5023),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x511f26=this['editor']['plugins']['get'](j);_0x511f26['context']===this['editor']&&(_0x511f26['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x7730fe,_0x25798d)=>{const _0x3d1543=this['_balloon'];if(this['isAttached']&&_0x3d1543['visibleView']){const _0x1df97c=this['annotations']['getByView'](_0x3d1543['visibleView']);_0x1df97c&&this['_closeAnnotation'](_0x1df97c),_0x25798d();}}));}['afterInit'](){const _0x5b5985=this['editor']['plugins']['get'](j);_0x5b5985['context']===this['editor']&&(_0x5b5985['hasActive']()||_0x5b5985['switchTo']('inline'));}['setActiveAnnotation'](_0x4bd8fc){_0x4bd8fc!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4bd8fc&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4bd8fc)&&this['_addAnnotationToBalloon'](_0x4bd8fc,!0x0),_0x4bd8fc['isActive']=!0x0),_0x4bd8fc||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4bd8fc);}['attach'](_0x34f63d){this['annotations']=_0x34f63d;const _0x531e39=this['editor']['plugins']['get'](j),_0x1a35f1=this['_balloon'];if(this['isAttached'])throw new _0x160abe('inlineannotations-attach-already-attached',this);if(_0x531e39['context']!==this['editor'])throw new _0x160abe('inlineannotations-not-allowed-with-context',this);const _0x166cc0=this['editor']['plugins']['get'](b);this['listenTo'](_0x166cc0,'refresh',()=>{const _0x4fcd72=_0x166cc0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1e1be2,_0x256b54;!this['_forceRefresh']&&(_0x1e1be2=_0x4fcd72,_0x256b54=this['_selectedAnnotations'],_0x1e1be2['length']===_0x256b54['length']&&_0x1e1be2['every'](_0x374dea=>_0x256b54['includes'](_0x374dea)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4fcd72),this['setActiveAnnotation'](_0x4fcd72[0x0]||null));}),this['listenTo'](_0x166cc0,'blur',(_0x10a26b,{isAnnotationTracked:_0x348b7e})=>{this['activeAnnotation']&&_0x348b7e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x202b35,_0x410c2c,_0x2d1090)=>{_0x2d1090||this['setActiveAnnotation'](null);}),this['listenTo'](_0x34f63d,'remove',(_0x2716bb,_0x1caf98)=>{this['_removeAnnotationFromBalloon'](_0x1caf98),_0x1caf98===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1a35f1,'change:visibleView',(_0x32cba3,_0x47a172,_0x1c9206,_0x13ff99)=>{_0x13ff99&&this['stopListening'](_0x13ff99);const _0x5d03dc=_0x34f63d['getByView'](_0x1c9206);_0x1c9206&&_0x5d03dc&&(this['listenTo'](_0x1c9206,'change:height',()=>{_0x1a35f1['updatePosition']();}),this['listenTo'](_0x1c9206,'Esc',()=>{this['_closeAnnotation'](_0x5d03dc),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5d03dc&&this['setActiveAnnotation'](_0x5d03dc));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1a35f1['visibleView']&&(_0x34f63d['getByView'](_0x1a35f1['visibleView'])&&_0x1a35f1['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 _0x160abe('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x314fc1 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x314fc1);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x159121){for(const _0x137df2 of this['_selectedAnnotations'])_0x159121['includes'](_0x137df2)||this['_manuallyClosed']['delete'](_0x137df2);for(const _0xb85f95 of this['annotations'])_0x159121['includes'](_0xb85f95)||this['_removeAnnotationFromBalloon'](_0xb85f95);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4c15fb of _0x159121)this['_addAnnotationToBalloon'](_0x4c15fb);}this['_selectedAnnotations']=_0x159121;}['_addAnnotationToBalloon'](_0x547515,_0x7aed29=!0x1){this['_manuallyClosed']['has'](_0x547515)||(this['_addedAnnotations']['has'](_0x547515)||this['_balloon']['hasView'](_0x547515['view'])||(this['_addedAnnotations']['add'](_0x547515),this['_balloon']['add']({'stackId':_0x547515['view']['id'],'view':_0x547515['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x547515)}})),_0x7aed29&&this['_balloon']['showStack'](_0x547515['view']['id']));}['_getBalloonTargetForAnnotation'](_0x540385){const _0x45054e=_0x540385['target'],_0x240308=this['editor']['editing']['view'],_0x5d51d7=_0x240308['document']['selection']['getFirstRange'](),_0x353f34=_0x240308['domConverter']['viewRangeToDom'](_0x5d51d7);if(_0x353f34['collapse'](!0x0),_0x45054e){if(_0x45054e instanceof _0x415c3c)return _0x45054e;let _0x159f16=[];for(const _0x27ad40 of _0x45054e)_0x159f16['push'](...F(_0x27ad40['getClientRects']()));_0x159f16=function(_0x38094f){const _0x349975=[];let _0x75ce84=_0x38094f[0x0];for(let _0x305545=0x1;_0x305545<_0x38094f['length'];_0x305545++)P(_0x75ce84,_0x38094f[_0x305545])?_0x75ce84['width']+=_0x38094f[_0x305545]['width']:(_0x349975['push'](_0x75ce84),_0x75ce84=_0x38094f[_0x305545]);return _0x349975['push'](_0x75ce84),_0x349975;}(_0x159f16);const _0x22eed9=_0x353f34['getBoundingClientRect']();return _0x159f16['find'](_0x52c5b8=>_0x52c5b8['top']<=_0x22eed9['top']&&_0x52c5b8['bottom']>=_0x22eed9['bottom']&&_0x52c5b8['left']<=_0x22eed9['left']&&_0x52c5b8['right']>=_0x22eed9['right'])||_0x159f16[0x0];}return _0x540385['targetRect']||_0x353f34;}['_removeAnnotationFromBalloon'](_0x29e2dc){this['_addedAnnotations']['has'](_0x29e2dc)&&this['_balloon']['hasView'](_0x29e2dc['view'])&&(this['_addedAnnotations']['delete'](_0x29e2dc),this['_balloon']['remove'](_0x29e2dc['view']));}['_closeAnnotation'](_0x52e579){this['_manuallyClosed']['add'](_0x52e579),this['_removeAnnotationFromBalloon'](_0x52e579);}}function F(_0x5d9a7d){return Array['from'](_0x5d9a7d)['map'](DOMRect['fromRect']);}function P(_0x351b84,_0x28cf6d){return _0x351b84['top']===_0x28cf6d['top']&&_0x351b84['bottom']===_0x28cf6d['bottom']&&_0x351b84['right']===_0x28cf6d['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x4ee4f9,_0x436434){super(_0x4ee4f9),this['set']('isEmpty',!_0x436434['length']),this['focusTracker']=new _0x34c795(),this['_annotationViews']=_0x436434,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x230040({'focusables':_0x436434,'focusTracker':this['focusTracker']}),this['listenTo'](_0x436434,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x436434,'remove',(_0x51ccc2,_0x306e9d)=>{_0x306e9d['isActive']&&this['focus'](),_0x436434['length']||(this['isEmpty']=!0x0);});const _0x19cdb8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x4ee4f9,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x436434},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x19cdb8['if']('isEmpty','ck-hidden',_0x23ff7d=>!_0x23ff7d)]},'children':[{'text':N(_0x4ee4f9,'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 _0x467390 of this['_annotationViews'])this['focusTracker']['add'](_0x467390['element']);this['_annotationViews']['on']('change',(_0x1450c4,{added:_0x5e53d7,removed:_0x525983})=>{for(const _0x42b51c of _0x5e53d7)this['focusTracker']['add'](_0x42b51c['element']);for(const _0x9d525d of _0x525983)this['focusTracker']['remove'](_0x9d525d['element']);});}}class p extends _0x3f106c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5a45f2){super(_0x5a45f2),this['archivedThreads']=new _0x4550ea();}['init'](){const _0x2a1ceb=this['context'],_0x5b9f83=_0x2a1ceb['plugins']['get'](o),_0x5cc10e=_0x2a1ceb['plugins']['get'](y);this['listenTo'](_0x5b9f83,'addCommentThread',(_0x188e86,{threadId:_0x190cf5})=>{const _0x3c0a3b=_0x5b9f83['getCommentThread'](_0x190cf5);_0x3c0a3b['archivedAt']&&this['archivedThreads']['add'](_0x3c0a3b,this['_calculatePosition'](_0x3c0a3b['archivedAt'])),this['listenTo'](_0x3c0a3b,'change:archivedAt',(_0x40038f,_0x26c774,_0x305db5)=>{_0x305db5?this['archivedThreads']['has'](_0x3c0a3b)||this['archivedThreads']['add'](_0x3c0a3b,this['_calculatePosition'](_0x3c0a3b['archivedAt'])):this['archivedThreads']['has'](_0x3c0a3b)&&this['archivedThreads']['remove'](_0x3c0a3b);});}),this['listenTo'](_0x5b9f83,'removeCommentThread',(_0x526f11,{threadId:_0x2af60f})=>{const _0x547fc6=_0x5b9f83['getCommentThread'](_0x2af60f);this['stopListening'](_0x547fc6),this['archivedThreads']['has'](_0x547fc6)&&this['archivedThreads']['remove'](_0x547fc6);},{'priority':'highest'}),this['listenTo'](_0x5cc10e['collection'],'focus',(_0xcb22e6,_0x235e07)=>{_0x235e07['isVisible']||(_0x235e07['isActive']=!0x0,_0x5cc10e['activate'](_0x235e07));});}['_calculatePosition'](_0x5ade22){const _0x3dd66e=[...this['archivedThreads']]['findIndex'](_0x42da1c=>_0x42da1c['archivedAt']<_0x5ade22);return _0x3dd66e>-0x1?_0x3dd66e:this['archivedThreads']['length'];}}class a extends _0x1a45c0{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3a9f1b];}constructor(_0x4066a1){super(_0x4066a1),this['annotationViews']=new _0x1bac6b(),this['_pendingThreads']=[];}['init'](){const _0x2a7e2a=this['editor'],_0x348f79=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2a7e2a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4cc9f4,!0x0)),_0x2a7e2a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x553904=this['_createCommentsArchiveButton'](_0x353c38);return _0x553904['set']({'role':'menuitemcheckbox'}),_0x553904;});const _0x4947f0=_0x2a7e2a['plugins']['get'](p),_0x5b2dc4=_0x2a7e2a['plugins']['get']('Annotations'),_0x37882d=_0x2a7e2a['plugins']['get']('CommentsRepository');_0x4947f0['archivedThreads']['forEach'](_0x6923ec=>{this['_handleNewThread'](_0x6923ec);}),this['listenTo'](_0x4947f0['archivedThreads'],'add',(_0x201aaf,_0x3d0284)=>{this['_handleNewThread'](_0x3d0284);}),this['listenTo'](_0x5b2dc4['collection'],'add',(_0x4b2a06,_0xa3a672)=>{const _0x356bc3=this['_pendingThreads']['find'](_0x17c5dc=>{const _0x4ccd4e=_0x37882d['_threadToController']['get'](_0x17c5dc);return _0x4ccd4e&&_0xa3a672['innerView']===_0x4ccd4e['view'];});if(_0x356bc3){const _0x2a680b=this['_calculatePosition'](_0x356bc3['archivedAt']);this['annotationViews']['add'](_0xa3a672['view'],_0x2a680b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x356bc3),0x1);}}),this['listenTo'](_0x4947f0['archivedThreads'],'remove',(_0x592535,_0x5104c1)=>{const _0x15e8ed=_0x2a7e2a['config']['get']('collaboration.channelId');if(!_0x15e8ed||_0x5104c1['channelId']===_0x15e8ed){if(this['_pendingThreads']['includes'](_0x5104c1))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5104c1),0x1);else{const _0x44e6f7=_0x37882d['_threadToController']['get'](_0x5104c1),_0x3e4488=_0x5b2dc4['getByInnerView'](_0x44e6f7['view']);this['annotationViews']['remove'](_0x3e4488['view']),this['stopListening'](_0x3e4488['focusableElements']);}}}),this['listenTo'](_0x5b2dc4['collection'],'add',(_0x71ae18,_0x3e57e9)=>{this['listenTo'](_0x3e57e9,'escape',_0x348f79);}),this['listenTo'](_0x5b2dc4['collection'],'remove',(_0xb81cd0,_0x5f43a6)=>{this['stopListening'](_0x5f43a6,'escape',_0x348f79);});}['_handleNewThread'](_0x7df8e8){const _0x2c4869=this['editor']['plugins']['get']('CommentsRepository'),_0x1dc295=this['editor']['plugins']['get']('Annotations'),_0x3c17de=this['editor']['config']['get']('collaboration.channelId');if(!_0x3c17de||_0x7df8e8['channelId']===_0x3c17de){const _0x18b321=_0x2c4869['_threadToController']['get'](_0x7df8e8);if(!_0x18b321)return void this['_pendingThreads']['push'](_0x7df8e8);const _0x3668b7=this['_calculatePosition'](_0x7df8e8['archivedAt']),_0x38c82b=_0x1dc295['getByInnerView'](_0x18b321['view']);_0x38c82b['isVisible']&&_0x1dc295['_visibleAnnotations']['remove'](_0x38c82b),this['annotationViews']['add'](_0x38c82b['view'],_0x3668b7);}}['_calculatePosition'](_0x3d316e){const _0x36a54c=this['editor']['config']['get']('collaboration.channelId'),_0x21e979=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x18fc35=>_0x18fc35['channelId']===_0x36a54c)['findIndex'](_0x5276ac=>_0x5276ac['archivedAt']<_0x3d316e);return _0x21e979<0x0||_0x21e979>this['annotationViews']['length']?this['annotationViews']['length']:_0x21e979-0x1;}['_toggleDialog'](){const _0x119bc2=this['editor'],_0x25a58f=_0x119bc2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x119bc2['locale'],this['annotationViews'])),'commentsArchive'===_0x25a58f['id']?_0x25a58f['hide']():_0x25a58f['show']({'id':'commentsArchive','title':N(_0x119bc2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3bc011,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x23317a['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3024c1,_0x3f141f=!0x1){const _0x55147b=this['editor']['locale'],_0x346faf=this['editor']['plugins']['get']('Dialog'),_0x5eee80=new _0x3024c1(_0x55147b);return _0x5eee80['bind']('isEnabled')['to'](this,'isEnabled'),_0x5eee80['bind']('isOn')['to'](_0x346faf,'id',_0x153c27=>'commentsArchive'===_0x153c27),_0x5eee80['set']({'label':N(_0x55147b,'COMMENTS_ARCHIVE'),'icon':_0x3bc011,'isToggleable':!0x0}),_0x3f141f&&(_0x5eee80['tooltip']=!0x0),this['listenTo'](_0x5eee80,'execute',()=>this['_toggleDialog']()),_0x5eee80;}['_hideDialogOnAnnotationEscape']=_0x2ab52b=>{const _0x2aaa52=_0x2ab52b['source'];if(!this['annotationViews']['has'](_0x2aaa52['view']))return;const _0x26a34b=this['editor']['plugins']['get']('Dialog');_0x26a34b['isOpen']&&'commentsArchive'===_0x26a34b['id']&&(_0x26a34b['hide'](),_0x2ab52b['stop']());};}class gi extends _0x1a45c0{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|