@ckeditor/ckeditor5-comments 47.6.2-alpha.0 → 47.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/package.json +19 -19
- 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
|
-
((()=>Qt)());constructor(_0x406b10={}){function _0x278f6c(_0x247ace){return _0x247ace['map'](_0x454f98=>String['fromCharCode'](_0x454f98))['join']('');}(_0x406b10=Object['assign']({},_0x406b10))['plugins']||(_0x406b10['plugins']=hs['defaultPlugins']),super(_0x406b10),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x278f6c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x278f6c([0x76,0x69,0x65,0x77])][_0x278f6c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x278f6c([0x61,0x75,0x74,0x6f]),this[_0x278f6c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x278f6c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x278f6c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x278f6c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x278f6c([0x6f,0x6b])});}['create'](){const _0x1d1273=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x1d1273))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5786d0=>{const _0xb9b8ff=this['model']['document']['getRoot'](),_0x493c81=_0xb9b8ff&&_0xb9b8ff['getChild'](_0xb9b8ff['childCount']-0x1);_0x5786d0['setSelection'](_0x493c81,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x5cd420=this['editing']['view'],_0x3309ff=_0x5cd420['document']['getRoot'](),_0x27b303=_0x3309ff['getChild'](0x0);_0x3309ff['childCount']>0x1||!_0x27b303||'p'!=_0x27b303['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x5cd420,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x27b303['placeholder']=this['placeholder']),Ft({'view':_0x5cd420,'element':_0x27b303,'keepOnFocus':!0x0}),this['placeholderElement']=_0x27b303);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x124cc0,_0x2dddad={}){super(_0x124cc0),this['editor']=null,this['_editorConfig']=_0x2dddad,this['set']('value',_0x2dddad['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x124cc0,'Reply...')),this['set']('submitLabel',N(_0x124cc0,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x144d0f(),this['focusCycler']=new _0x37e2ac({'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',(_0x5d56c3,_0x5b6a0b)=>{this['cancelButtonView']['fire']('execute'),_0x5b6a0b();}),this['keystrokes']['set']('Ctrl+Enter',(_0x37f2dc,_0x27e103)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x27e103());}),this['on']('submit',(_0x4675f9,_0x4759fb)=>{_0x4759fb['length']>0xfde8?(alert(N(_0x124cc0,'TOO_LONG_COMMENT_ALERT',[_0x4759fb['length'],0xfde8])),_0x4675f9['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x5860f6=this['editor'];this['element']['insertBefore'](_0x5860f6['ui']['element'],this['element']['firstChild']),_0x5860f6['model']['document']['on']('change',()=>this['value']=_0x5860f6['getData']()),_0x5860f6['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5860f6['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x36da9d){-0x1===_0x36da9d?(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:_0x44f534}=this,_0x49c06b=new _0x6b909b(_0x44f534);return _0x49c06b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x49c06b['withText']=!0x0,_0x49c06b['bind']('label')['to'](this,'submitLabel'),_0x49c06b['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x49c06b['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x101692,_0x7d3800)=>!_0x7d3800&&!!_0x101692['trim']()),_0x49c06b;}['_createCancelButton'](){const {locale:_0x1e7b93}=this,_0x20fcdd=new _0x6b909b(_0x1e7b93);return _0x20fcdd['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x20fcdd['label']=N(_0x1e7b93,'Cancel'),_0x20fcdd['withText']=!0x0,_0x20fcdd['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x20fcdd;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x29b639=>{this['focusTracker']['add'](_0x29b639['element']);}),this['focusables']['on']('change',(_0x2e06cf,_0xcc8d1b)=>{for(const _0x2171d3 of Array['from'](_0xcc8d1b['added'])['reverse']())this['focusTracker']['add'](_0x2171d3['element']);});}}class ie extends kt{constructor(_0x4ae157,_0x10f545,_0x4e7a8a){super(_0x4ae157),this['commentInputView']=new es(_0x4ae157,_0x4e7a8a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x42bcf0,_0x5560fc)=>_0x42bcf0||!!_0x5560fc),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 _0x25fda7(_0x4ae157,_0x10f545),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'](_0x11518b){this['commentInputView']['focus'](_0x11518b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2ce640,_0x1c6a77)=>{const {submitButtonView:_0x4047dc,cancelButtonView:_0x149b0c,editor:_0x280d34}=this['commentInputView'];[_0x4047dc['element'],_0x149b0c['element'],_0x280d34?_0x280d34['editing']['view']['getDomRoot']():null]['filter'](_0x4efb26=>_0x4efb26)['some'](_0x4c5dc9=>_0x4c5dc9['contains'](_0x1c6a77['target']))||(this['focus'](),_0x1c6a77['preventDefault']());});}}class rs extends kt{constructor(_0x3d4f00){super(_0x3d4f00);const _0x161f69=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x161f69['to']('count',_0xce2b4f=>N(_0x3d4f00,'NUMBER_OF_COMMENTS',_0xce2b4f))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3e802b,_0x26ee3f,_0x4bd6a2){super(_0x3e802b);const _0x9b4741=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x26ee3f['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x26ee3f,this['_config']=_0x4bd6a2,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x144d0f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x37e2ac({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x270a55=>this['commentViews']['map'](_0x45211b=>_0x45211b['element'])['includes'](_0x270a55['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x3e802b),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3f052f=>_0x3f052f-this['_config']['maxCommentsWhenCollapsed']);for(const _0x452ecd of _0x26ee3f['comments'])this['_handleNewCommentModel'](_0x452ecd);this['_handleInfoComment'](),this['listenTo'](_0x26ee3f['comments'],'add',(_0x4e8f66,_0x28c91e)=>{const _0x4b8d6a=this['_calculatePosition'](_0x28c91e);this['length']++,this['_handleNewCommentModel'](_0x28c91e,_0x4b8d6a),this['refreshVisibleViews']();}),this['listenTo'](_0x26ee3f['comments'],'remove',(_0x22de1e,_0x51e1ea)=>{this['length']--,this['_handleRemoveCommentModel'](_0x51e1ea),this['refreshVisibleViews']();}),this['listenTo'](_0x26ee3f,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x26ee3f,'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',_0x9b4741['if']('length','ck-hidden',_0x2ae94b=>!_0x2ae94b)],'aria-label':N(_0x3e802b,'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'](_0x2931d0){-0x1===_0x2931d0?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2f02d3 of this['commentViews'])_0x2f02d3['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x313f40,_0x3e7eca){const _0x1b0966=new this['_config']['CommentView'](this['locale'],_0x313f40,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1b0966['viewUid']=_0x313f40['id'],_0x1b0966['delegate']('removeComment')['to'](this),_0x1b0966['delegate']('updateComment')['to'](this),_0x1b0966['delegate']('resolveCommentThread')['to'](this),_0x1b0966['delegate']('editorReady')['to'](this),_0x1b0966['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1b0966,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1b0966,_0x3e7eca);}['_calculatePosition'](_0x548668){const _0x14e4de=this['_model']['_findOptimalIndex'](_0x548668);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x548668['authoredAt']?_0x14e4de-0x1:_0x14e4de:_0x14e4de-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4e4c15={'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'],_0x4e4c15,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4e4c15));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x57ca63){const _0x4913da=this['commentViews']['remove'](_0x57ca63['id']);this['stopListening'](_0x4913da),_0x4913da['isEditMode']&&this['_updateHasDirtyComment'](),_0x4913da['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x52a699=>_0x52a699['isEditMode']);}['_rearrangeCollapse'](){const _0x13d3f8=function(_0x11a56c){const _0x3d975b=new _0x1b1267();for(const _0x4bab16 of _0x11a56c)_0x3d975b['add'](_0x4bab16);return _0x3d975b;}(this['commentViews']),_0x3c1c93=this['_collapsedCommentsView']['count'];for(let _0x4d5dec=0x1;_0x4d5dec<=_0x3c1c93;_0x4d5dec++)_0x13d3f8['remove'](0x1);for(const _0x4f50c6 of _0x13d3f8)_0x4f50c6['collapse']();_0x3c1c93>0x0&&_0x13d3f8['add'](this['_collapsedCommentsView'],0x1),ns(_0x24f995(Array['from'](this['visibleViews']),Array['from'](_0x13d3f8)),this['visibleViews'],_0x13d3f8);}['_rearrangeExpand'](){ns(_0x24f995(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x57ea27 of this['visibleViews'])_0x57ea27['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x57e449=>{this['focusTracker']['add'](_0x57e449['element']),this['keystrokes']['listenTo'](_0x57e449['element']);}),this['commentViews']['on']('change',(_0x187682,_0xa037)=>{for(const _0x3a4bcc of _0xa037['removed'])this['focusTracker']['remove'](_0x3a4bcc['element']),this['keystrokes']['stopListening'](_0x3a4bcc['element']);for(const _0x428338 of Array['from'](_0xa037['added'])['reverse']())this['focusTracker']['add'](_0x428338['element']),this['keystrokes']['listenTo'](_0x428338['element']);});}}function ns(_0x537255,_0x18685b,_0x5b5a9e){let _0xccf250=0x0;for(const _0x44b28a of _0x537255)switch(_0x44b28a){case'insert':_0x18685b['add'](_0x5b5a9e['get'](_0xccf250),_0xccf250),_0xccf250++;break;case'delete':_0x18685b['remove'](_0xccf250);break;case'equal':_0xccf250++;}}class oe extends kt{constructor(_0x2ce1b4){super(_0x2ce1b4);const _0x4283e1=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4283e1['to']('contextValue',_0x459c9a=>N(_0x2ce1b4,'THREAD_CONTEXT_LABEL',_0x459c9a)),'tabindex':-0x1},'children':[{'text':_0x4283e1['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x27fdf4,_0x10a5a0){super(_0x27fdf4);const _0x53bdf2=this['bindTemplate'];this['_model']=_0x10a5a0,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x144d0f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x37e2ac({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2fda67=>!!_0x2fda67),this['bind']('contextValue')['to'](this['_model'],'context',_0xf6ac6a=>_0xf6ac6a&&_0xf6ac6a['value']?this['_trimContextValue'](_0xf6ac6a['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',_0x53bdf2['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 _0x2e3efa=new _0x6b909b(this['locale']);return _0x2e3efa['label']=N(this['locale'],'Reopen'),_0x2e3efa['tooltip']=N(this['locale'],'Reopen'),_0x2e3efa['icon']=_0x355170,_0x2e3efa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5b5d0c=>!_0x5b5d0c),_0x2e3efa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x126c89,_0xc65720)=>_0x126c89&&_0xc65720),_0x2e3efa['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2e3efa;}['_trimContextValue'](_0x5231c1){if(_0x5231c1['length']<0x96)return _0x5231c1;const _0x5b7581=_0x5231c1['lastIndexOf']('\x20',0x93);return _0x5231c1['substring'](0x0,_0x5b7581>-0x1?_0x5b7581:0x93)+'...';}['_attachContextActions'](){const _0x39fcb6=this['element']['querySelector']('.ck-context'),_0x20f76f=_0x39fcb6['querySelector']('.ck-context__value');this['listenTo'](_0x39fcb6,'mouseenter',()=>{_0x20f76f['offsetWidth']<_0x20f76f['scrollWidth']&&_0x39fcb6['classList']['add']('overlay');}),this['listenTo'](_0x39fcb6,'mouseleave',()=>{_0x39fcb6['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x28cc48 of this['focusables'])this['focusTracker']['add'](_0x28cc48['element']),this['keystrokes']['listenTo'](_0x28cc48['element']);}['_createContextView'](){const _0x15b39e=new oe(this['locale']);return _0x15b39e['bind']('contextValue')['to'](this),_0x15b39e;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x80776c,_0x223c7b,_0x4f605b,_0x3f2a57){super(_0x80776c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x223c7b,this['_localUser']=_0x4f605b,this['_config']=_0x3f2a57,this['commentThreadHeaderView']=new Xt(_0x80776c,_0x223c7b),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x80776c,N(_0x80776c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x80776c,_0x223c7b,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3f2a57)),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',(_0x17e29c,_0x55ab4a)=>_0x17e29c||!!_0x55ab4a),this['bind']('isUnlinked')['to'](_0x223c7b,'unlinkedAt',_0x42a98e=>!!_0x42a98e),this['bind']('ariaLabel')['to'](this,'length',_0x59bd88=>{const _0x1dbe66=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x59bd88,_0x1dbe66]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x144d0f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x37e2ac({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x355761=>_0x355761['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 _0x15597d=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3b5142=_0x15597d['commentInputView'];return _0x15597d['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3b5142,'value',(_0xd67c4d,_0x270731,_0x5d9914,_0x14d4c7,_0x133397)=>!!_0x133397||!!_0x14d4c7&&_0x5d9914&&!_0x270731||_0xd67c4d&&_0x5d9914&&!_0x270731),_0x3b5142['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x53ba42,_0x29f43b,_0x48fbe3)=>{let _0x407429;return _0x407429=_0x48fbe3&&_0x29f43b?'Reply\x20to\x20reopen\x20discussion...':_0x53ba42?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x407429);}),_0x3b5142['bind']('submitLabel')['to'](this,'length',_0x4c3d2d=>N(this['locale'],_0x4c3d2d?'Reply':'Comment')),_0x3b5142['on']('submit',(_0x44e50c,_0x529b82)=>{this['fire']('addComment',_0x529b82),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3b5142['on']('cancel',()=>{this['focus']();}),_0x3b5142['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3b5142['on']('cancel',_0x19213a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x19213a['stop']());}),this['on']('change:isActive',(_0x5e9a3c,_0x154d14,_0x3b800d)=>{_0x3b800d||this['length']||_0x3b5142['value']||this['fire']('removeCommentThread');}),_0x15597d;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x22b275(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x50da0e,target:_0x5314c0,type:_0x51a9d0,isVisible:_0x2d1890=!0x0}){super(),this['view']=_0x50da0e,this['view']['element']||this['view']['render'](),this['_type']=_0x51a9d0,this['_target']=_0x5314c0,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1b1267([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x29636a,_0x5bb920)=>{this['view']['focusTracker']['add'](_0x5bb920);}),this['focusableElements']['on']('remove',(_0x291c03,_0x2bb2d0)=>{this['view']['focusTracker']['remove'](_0x2bb2d0);}),this['set']('isVisible',_0x2d1890);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1e2752=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x1e2752),_0x1e2752;}get['targetRect'](){const _0x249ad1=this['target'];if(null===_0x249ad1)return null;if(_0x249ad1 instanceof _0x2227f5)return _0x249ad1;const _0x2c390e=_0x249ad1['filter'](_0x590b75=>function(_0x454949){const _0x3b797c=_0x454949['offsetParent'];if(_0x3b797c)return!0x0;const _0x9bee3d=_0x454949['getClientRects']()['item'](0x0);return!!_0x9bee3d;}(_0x590b75));return 0x0===_0x2c390e['length']?null:new _0x2227f5(_0x2c390e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5f1ad2){this['view']['isActive']=_0x5f1ad2,this['view']['mainView']['isActive']=_0x5f1ad2;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3281b5){if(!(null===_0x3281b5||_0x3281b5 instanceof _0x2227f5||Array['isArray'](_0x3281b5)&&_0x3281b5['every'](_0x232b38=>fi(_0x232b38))))throw new _0x498a52('annotation-invalid-target',null,{'target':_0x3281b5});}['_getNormalizedTarget'](){const _0x4dd6be='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x4dd6be)?[_0x4dd6be]:_0x4dd6be;}}function fi(_0x12379a){return null!==_0x12379a&&'object'==typeof _0x12379a&&'nodeType'in _0x12379a&&0x1===_0x12379a['nodeType'];}class S extends _0x1b1267{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x162460=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x144d0f(),this['_focusTracker']['on']('change:isFocused',(_0x4fe347,_0xbf9371,_0x376f76)=>{_0x376f76||this['fire']('blur');});for(const _0x3fce19 of _0x162460)this['add'](_0x3fce19);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4622d1){if(this['has'](_0x4622d1))throw new _0x498a52('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4622d1['innerView'],_0x4622d1),this['_viewToAnnotation']['set'](_0x4622d1['view'],_0x4622d1);for(const _0x30dc4c of _0x4622d1['focusableElements'])this['_focusTracker']['add'](_0x30dc4c);this['listenTo'](_0x4622d1['focusableElements'],'add',(_0x40c804,_0x2ddabb)=>{this['_focusTracker']['add'](_0x2ddabb);}),this['listenTo'](_0x4622d1['focusableElements'],'remove',(_0x4cd3d2,_0x4e59f6)=>{this['_focusTracker']['remove'](_0x4e59f6);}),this['listenTo'](_0x4622d1['view']['focusTracker'],'change:isFocused',(_0xf0d777,_0x308177,_0x4e1795)=>{_0x4e1795&&this['fire']('focus',_0x4622d1);}),_0x4622d1['updateTargetRect']();const _0x152716=this['_getOrderInContent'](_0x4622d1['view']['targetRect']);return super['add'](_0x4622d1,_0x152716);}['remove'](_0x1b3da5){if(!this['has'](_0x1b3da5))throw new _0x498a52('annotationcollection-not-existing-item',null);this['stopListening'](_0x1b3da5['view']['focusTracker']),this['stopListening'](_0x1b3da5['focusableElements']);for(const _0x1a54c3 of _0x1b3da5['focusableElements'])this['_focusTracker']['remove'](_0x1a54c3);return this['_viewToAnnotation']['delete'](_0x1b3da5['view']),this['_innerViewToAnnotation']['delete'](_0x1b3da5['innerView']),super['remove'](_0x1b3da5);}['getByInnerView'](_0x47f15f){return this['_innerViewToAnnotation']['get'](_0x47f15f);}['getByView'](_0x359d7d){return this['_viewToAnnotation']['get'](_0x359d7d);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x383289 of this)_0x383289['updateTargetRect']();this['_sort']();}['_sort'](){const _0x232f93=Array['from'](this)['sort']((_0x3ea454,_0x4ac61b)=>w(_0x3ea454['view']['targetRect'],_0x4ac61b['view']['targetRect']));for(let _0x1d2cb1=_0x232f93['length']-0x1;_0x1d2cb1>0x0;_0x1d2cb1--){const _0x268393=_0x232f93[_0x1d2cb1];_0x1d2cb1!==this['getIndex'](_0x268393)&&(this['remove'](_0x268393),this['add'](_0x268393));}}['_getOrderInContent'](_0x5affe9){let _0x54872b=0x0;if(!_0x5affe9)return this['length'];for(const _0x37dd18 of this){const _0x2f2075=_0x37dd18['view']['targetRect'];if(_0x2f2075){if(w(_0x5affe9,_0x2f2075)<0x0)return _0x54872b;_0x54872b++;}}return _0x54872b;}}function v({source:_0x38f325,target:_0x2ef6b4,filter:_0x52293f}){for(const _0x3a316a of _0x38f325)_0x52293f(_0x3a316a)&&_0x2ef6b4['add'](_0x3a316a);_0x2ef6b4['listenTo'](_0x38f325,'add',(_0x1cb50e,_0x4cd757)=>{_0x52293f(_0x4cd757)&&_0x2ef6b4['add'](_0x4cd757);}),_0x2ef6b4['listenTo'](_0x38f325,'remove',(_0x163f18,_0x59367d)=>{_0x2ef6b4['has'](_0x59367d)&&_0x2ef6b4['remove'](_0x59367d);});}function w(_0x177aa7,_0x156ad8){if(null===_0x177aa7&&null===_0x156ad8)return 0x0;if(null===_0x177aa7)return-0x1;if(null===_0x156ad8)return 0x1;const _0x510b50=_0x177aa7['top']-_0x156ad8['top'];return 0x0==_0x510b50?_0x177aa7['left']-_0x156ad8['left']:_0x510b50;}class y extends _0x51795f{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43129f){if(super(_0x43129f),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x43129f instanceof _0x1e4091){const _0x4111d9=_0x43129f['locale'];_0x43129f['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x4111d9,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x4111d9,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x4111d9,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x4111d9,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x4111d9,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x4111d9,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x4111d9,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2246dc){this['collection']['add'](_0x2246dc);}['remove'](_0x59ed77){this['collection']['remove'](_0x59ed77),_0x59ed77['destroy']();}['refreshVisibility'](){for(const _0x1ad943 of this['collection'])_0x1ad943['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3f18d8){return this['collection']['getByInnerView'](_0x3f18d8);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x32d615 of this['collection'])_0x32d615['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3c3272){this['fire']('_activateAnnotation',_0x3c3272);}['createAnnotation'](_0x286e67){return new T(_0x286e67);}['createAnnotationView'](_0x508970,_0xadd02b){return new E(_0x508970,_0xadd02b);}['_addActiveAnnotation'](_0x7a30b8){const _0x3a3f34=new Set(this['activeAnnotations']);_0x3a3f34['add'](_0x7a30b8),this['activeAnnotations']=_0x3a3f34;}['_removeActiveAnnotation'](_0x299340){const _0x4e469e=new Set(this['activeAnnotations']);_0x4e469e['delete'](_0x299340),this['activeAnnotations']=_0x4e469e;}['_bindAnnotationsToVisibleAnnotations'](){const _0x11ec00=this['collection'],_0x41323a=this['_visibleAnnotations'];function _0x5a93fc(_0xc8b83e){const _0x107e7f=_0xc8b83e['source'];_0x107e7f['isVisible']&&!_0x41323a['has'](_0x107e7f)?_0x41323a['add'](_0x107e7f):!_0x107e7f['isVisible']&&_0x41323a['has'](_0x107e7f)&&_0x41323a['remove'](_0x107e7f),_0x107e7f['view']['focusTracker']['remove'](_0x107e7f['view']['element']),_0x107e7f['view']['focusTracker']['add'](_0x107e7f['view']['element']);}this['listenTo'](_0x11ec00,'add',(_0x2c18a5,_0x1113b5)=>{_0x1113b5['isVisible']&&_0x41323a['add'](_0x1113b5),this['listenTo'](_0x1113b5,'change:isVisible',_0x5a93fc);}),this['listenTo'](_0x11ec00,'remove',(_0x371031,_0x3c7478)=>{_0x41323a['has'](_0x3c7478)&&_0x41323a['remove'](_0x3c7478),this['stopListening'](_0x3c7478,'change:isVisible',_0x5a93fc);});}['_setupEnterAnnotationKeystroke'](){const _0x366f0a=_0x46db9b=>{_0x46db9b['on']('ready',()=>{_0x46db9b['keystrokes']['set'](_0x2c7af9,(_0x3f82ec,_0x55879c)=>{const _0x436be5=_0x31b8b0(this['activeAnnotations']['values']());_0x436be5&&(_0x436be5['view']['focus'](),_0x55879c());});});};this['context']instanceof _0x1e4091?_0x366f0a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x240428,_0x38185c)=>{_0x366f0a(_0x38185c);});}['_setupEscapeAnnotationHandling'](){const _0x5845f6=_0x3a2a5d=>{const _0x50848e=_0x3a2a5d['source'],_0x50d6b3=[];let _0x4b5ee1;if(Array['isArray'](_0x50848e['target'])){_0x4b5ee1=_0x50848e['target'][0x0],this['context']instanceof _0x1e4091?_0x50d6b3['push'](this['context']):this['context']['editors']&&_0x50d6b3['push'](...this['context']['editors']);for(const _0x2e718e of _0x50d6b3)for(const _0x53f727 of _0x2e718e['editing']['view']['domRoots']['values']())if(_0x53f727['contains'](_0x4b5ee1))return void _0x2e718e['editing']['view']['focus']();_0x4b5ee1['focus']();}};this['listenTo'](this['collection'],'add',(_0x2daf09,_0x500714)=>{this['listenTo'](_0x500714,'escape',_0x5845f6,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3d0b47,_0x102244)=>{this['stopListening'](_0x102244,'escape',_0x5845f6);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x51795f{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59a8f7){super(_0x59a8f7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x74aaa9=this['context']['config'];_0x74aaa9['define']('comments.maxCommentsWhenCollapsed',0x2),_0x74aaa9['define']('comments.maxThreadTotalWeight',0x1f4),_0x74aaa9['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x74aaa9['define']('comments.CommentThreadView',gt),_0x74aaa9['define']('comments.CommentView',Tt),_0x74aaa9['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x154903=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x148aea,_0x40f42f)=>this['_addCommentThread'](_0x40f42f)),this['on']('submitCommentThread',(_0x1078dd,_0x184648)=>this['_submitCommentThread'](_0x184648)),this['on']('resolveCommentThread',(_0x319d32,_0xf09bdf)=>this['_resolveCommentThread'](_0xf09bdf)),this['on']('resolveCommentThread',(_0x100bb5,_0x554d90)=>this['_updateActiveAnnotation'](_0x554d90),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x25a3ec,_0x3336b9)=>this['_reopenCommentThread'](_0x3336b9)),this['on']('reopenCommentThread',(_0xb7d401,_0x13b8ab)=>this['_updateActiveAnnotation'](_0x13b8ab),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x519601,_0xd7bed4)=>this['_removeCommentThread'](_0xd7bed4)),this['on']('updateCommentThread',(_0x38b977,_0x564628)=>this['_updateCommentThread'](_0x564628)),this['on']('updateCommentThread',(_0x3537f0,_0x1e6a02)=>this['_updateActiveAnnotation'](_0x1e6a02),{'priority':'lowest'}),this['on']('addComment',(_0x49e91d,_0x3edbcf)=>this['_addComment'](_0x3edbcf)),this['on']('updateComment',(_0x4bee8e,_0x420a92)=>this['_updateComment'](_0x420a92)),this['on']('removeComment',(_0x1ac1ff,_0x2242d0)=>this['_removeComment'](_0x2242d0)),this['on']('addComment',(_0x57d88f,{threadId:_0x5a58da,isFromAdapter:_0x3a06a7})=>{if(_0x3a06a7)return;const _0x5badb0=this['getCommentThread'](_0x5a58da),_0x3e8aa3=_0x5badb0&&this['_threadToController']['get'](_0x5badb0);_0x3e8aa3&&_0x3e8aa3['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x154903,'change:activeAnnotations',(_0x331b5f,_0x189e9a,_0x3eb351)=>{const _0x5eb95d=Array['from'](_0x3eb351)['map'](_0x2d2543=>this['_viewToController']['get'](_0x2d2543['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5eb95d?_0x5eb95d['model']:null;});}set['adapter'](_0x12984c){if(this['_adapter'])throw new _0x498a52('commentsrepository-adapter-already-set');this['_adapter']=_0x12984c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x1609e8=_t,threadId:_0x4d096b=_0x114214(),comments:_0xcaa349=[],unlinkedAt:_0x14bdc1=null,resolvedAt:_0x26b3da=null,resolvedBy:_0x5f024e=null,target:_0x4fa4f3=null,context:_0x557167=null,attributes:_0xdb126b={},isResolvable:_0x4b7df0=!0x0,isSubmitted:_0x48aa8e=!0x1,isFromAdapter:_0x2636c2=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x1609e8),{'channelId':_0x1609e8,'threadId':_0x4d096b,'comments':_0xcaa349,'unlinkedAt':_0x14bdc1,'resolvedAt':_0x26b3da,'resolvedBy':_0x5f024e,'target':_0x4fa4f3,'context':_0x557167,'attributes':_0xdb126b,'isFromAdapter':_0x2636c2,'isResolvable':_0x4b7df0,'isSubmitted':_0x48aa8e}),this['getCommentThread'](_0x4d096b);}['openNewCommentThread']({channelId:_0x5e9dd9=_t,threadId:_0x2e36f0=_0x114214(),target:_0x28600b,context:_0x1ad317=null,isResolvable:_0x18cdc6=!0x0}){if(this['_readOnlyChannels']['has'](_0x5e9dd9)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x28600b)throw new _0x498a52('commentsrepository-missing-target');const _0xd2ad24=this['addCommentThread']({'channelId':_0x5e9dd9,'threadId':_0x2e36f0,'target':_0x28600b,'context':_0x1ad317,'isResolvable':_0x18cdc6});if(!_0xd2ad24)return null;const _0x1c6ae0=this['_threadToController']['get'](_0xd2ad24),_0x83f61=_0x1c6ae0['view']['commentThreadInputView']['commentInputView'],_0x4a2e08=this['context']['plugins']['get'](y),_0xfda713=_0x4a2e08['getByInnerView'](_0x1c6ae0['view']);return _0x4a2e08['activate'](_0xfda713),_0x83f61['once']('editorReady',()=>_0x83f61['focus']()),_0xd2ad24;}['hasCommentThread'](_0x57f859){if('string'!=typeof _0x57f859)throw new _0x498a52('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x57f859);}['updateCommentThread']({channelId:_0x4c4750=_t,threadId:_0xf18fae,context:_0x2ac1ca,unlinkedAt:_0x4d2152,attributes:_0x3c6de9,isFromAdapter:_0x407f3d=!0x1}){return this['fire'](Nt('updateCommentThread',_0x4c4750),{'channelId':_0x4c4750,'threadId':_0xf18fae,'context':_0x2ac1ca,'unlinkedAt':_0x4d2152,'attributes':_0x3c6de9,'isFromAdapter':_0x407f3d}),this['getCommentThread'](_0xf18fae);}['getCommentThread'](_0x1ecc52){if('string'!=typeof _0x1ecc52)throw new _0x498a52('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1ecc52);}['fetchCommentThread']({channelId:_0x4f8788,threadId:_0x1e882f}={}){const _0xa196a6=this['getCommentThread'](_0x1e882f);if(_0xa196a6)return Promise['resolve'](_0xa196a6);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x498a52('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4f8788,'threadId':_0x1e882f})['then'](_0x3a3e60=>this['hasCommentThread'](_0x1e882f)?this['getCommentThread'](_0x1e882f):_0x3a3e60?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4f8788},_0x3a3e60)):void 0x0)['catch'](_0x5d10cb=>{throw console['error'](_0x5d10cb),new _0x498a52('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2c956d,skipNotAttached:_0x20c4e7=!0x1,skipEmpty:_0x2793ba=!0x1,toJSON:_0x1869f6=!0x1}={}){const _0x284d24=[];for(const _0x1bf13b of this['_threads']['values']())_0x2c956d&&_0x1bf13b['channelId']!==_0x2c956d||_0x20c4e7&&!_0x1bf13b['isAttached']||_0x2793ba&&0x0===_0x1bf13b['length']||_0x284d24['push'](_0x1bf13b);return _0x1869f6?_0x284d24['map'](_0x2355fe=>_0x2355fe['toJSON']()):_0x284d24;}['getAnnotationForCommentThread'](_0x3fe167){const _0x484757=this['_threadToController']['get'](_0x3fe167);if(!_0x484757)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x484757['view'])||null;}['getCommentThreadForAnnotation'](_0x3c5749){const _0x53158b=this['_viewToController']['get'](_0x3c5749['innerView']);return _0x53158b?_0x53158b['model']:null;}['setActiveCommentThread'](_0x1ef977){const _0x5775a6=this['context']['plugins']['get'](y);if(!_0x1ef977)return void(this['activeCommentThread']&&_0x5775a6['deactivateAll']());const _0x48d3de=this['getCommentThread'](_0x1ef977);if(!_0x48d3de)throw new _0x498a52('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1ef977});if(!this['_threadToController']['has'](_0x48d3de))throw new _0x498a52('commentsrepository-active-not-attached',null,{'threadId':_0x1ef977});const _0x3472e5=_0x5775a6['getByInnerView'](this['_threadToController']['get'](_0x48d3de)['view']);_0x5775a6['activate'](_0x3472e5);}['switchReadOnly'](_0x4929d2,_0x2e6b0e){_0x4929d2?this['_readOnlyChannels']['add'](_0x2e6b0e):this['_readOnlyChannels']['delete'](_0x2e6b0e),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4028e9){return this['_readOnlyChannels']['has'](_0x4028e9)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4b9732,_0x36e2ee){return new vt(_0x4b9732,_0x36e2ee);}['setPermissions'](_0x21d020,_0x43e506=_t){this['_permissions']['set'](_0x43e506,_0x21d020),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3c8d81=_t){return this['_permissions']['has'](_0x3c8d81)?this['_permissions']['get'](_0x3c8d81):bt;}['_addCommentThread']({channelId:_0x5a8797,threadId:_0x19feb6,comments:_0x4f7d29,unlinkedAt:_0x78d275,resolvedAt:_0x46c4d1,resolvedBy:_0x5a40f6,target:_0xb33154,context:_0x36dd38,attributes:_0x26d69f,isFromAdapter:_0x574a31,isResolvable:_0x2896c2,isSubmitted:_0x20ec26}){if('string'!=typeof _0x19feb6)throw new _0x498a52('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x19feb6});if(this['hasCommentThread'](_0x19feb6))throw new _0x498a52('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x19feb6});const _0x27cb08=new pi(this,{'channelId':_0x5a8797,'id':_0x19feb6,'context':_0x36dd38,'attributes':_0x26d69f,'unlinkedAt':_0x78d275,'resolvedAt':_0x46c4d1,'resolvedBy':_0x5a40f6?this['context']['plugins']['get'](it)['getUser'](_0x5a40f6):null,'isResolvable':_0x2896c2,'isSubmitted':_0x20ec26||_0x574a31});this['_threads']['set'](_0x19feb6,_0x27cb08);for(const _0xd9cd0 of _0x4f7d29)_0x27cb08['_add'](this['_createNewComment']({'threadId':_0x19feb6,..._0xd9cd0}));return _0xb33154&&_0x27cb08['attachTo'](_0xb33154),_0x574a31||!_0x27cb08['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5a8797,'threadId':_0x19feb6});}['_submitCommentThread']({channelId:_0x1ce81d,threadId:_0x39444a}){if(!this['hasCommentThread'](_0x39444a))throw new _0x498a52('commentsrepository-missing-comment-thread',this);const _0x24d58b=this['getCommentThread'](_0x39444a);if(_0x24d58b['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x1ac1e1,comments:_0x4d8e83,resolvedAt:_0x3c6f52,resolvedBy:_0xb2932f,context:_0x1a4c2a,attributes:_0x294e28}=_0x24d58b,_0xa53ea=this['context']['plugins']['get']('PendingActions'),_0x4a2884=_0xa53ea['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1ce81d,'threadId':_0x1ac1e1,'comments':_0x4d8e83['map'](_0x1269be=>_0x1269be['toJSON']()),'resolvedAt':_0x3c6f52,'resolvedBy':_0xb2932f?_0xb2932f['id']:_0xb2932f,'context':_0x1a4c2a,'attributes':_0x294e28})['then'](({comments:_0x3f979a})=>{_0xa53ea['remove'](_0x4a2884);for(const _0x2bb655 of _0x3f979a)this['_updateComment']({'channelId':_0x1ce81d,'threadId':_0x39444a,'commentId':_0x2bb655['commentId'],'createdAt':_0x2bb655['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xd21ae5=>{throw console['error'](_0xd21ae5),new _0x498a52('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x3928e6,target:_0x4d8f75}){const _0x27f302=this['getCommentThread'](_0x3928e6);if(!_0x27f302)throw new _0x498a52('commentsrepository-attach-missing-comment-thread',this);const _0x5233ff=this['context']['plugins']['get']('PendingActions'),_0x59d670=this['context']['plugins']['get'](y),_0x4fde67=this['_createCommentThreadView'](_0x27f302),_0x49e80b=new vt(_0x27f302,_0x4fde67);let _0x13345c=null;_0x4fde67['on']('change:isDirty',(_0x58ede1,_0x4cfebe,_0x450d8a)=>{_0x450d8a?_0x13345c=_0x5233ff['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x13345c&&(_0x5233ff['remove'](_0x13345c),_0x13345c=null);}),this['_threadToController']['set'](_0x27f302,_0x49e80b),this['_viewToController']['set'](_0x4fde67,_0x49e80b);const _0x3c7018=new E(this['context']['locale'],_0x4fde67);_0x3c7018['bind']('length')['to'](_0x4fde67),_0x3c7018['bind']('isDirty')['to'](_0x4fde67,'isDirty',_0x4fde67,'length',(_0x329d84,_0x24e4b3)=>_0x329d84||!_0x24e4b3),_0x3c7018['bind']('isActive')['to'](_0x4fde67),_0x3c7018['type']='comment';const _0x5dfba1=new T({'view':_0x3c7018,'target':_0x4d8f75,'type':'comment','isVisible':!_0x27f302['archivedAt']&&!!('function'==typeof _0x4d8f75?_0x4d8f75():_0x4d8f75)});return _0x4fde67['on']('escape',()=>{_0x5dfba1['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4fde67,_0x5dfba1),_0x59d670['add'](_0x5dfba1),_0x5dfba1;}['_bindAnnotationToEditors'](_0x1cd267,_0x2c9308){this['listenTo'](_0x1cd267,'editorReady',(_0x32513f,_0x521c43)=>{const _0x23d63c=_0x521c43['ui']['view']['body']['bodyCollectionContainer'];_0x2c9308['focusableElements']['add'](_0x23d63c),this['context']instanceof _0x1e4091&&this['context']['ui']['focusTracker']['add'](_0x23d63c);},{'priority':'highest'}),this['listenTo'](_0x1cd267,'editorDestroyed',(_0x131d83,_0x595c13)=>{const _0x5eff5c=_0x595c13['ui']['view']['body']['bodyCollectionContainer'];_0x2c9308['focusableElements']['has'](_0x5eff5c)&&_0x2c9308['focusableElements']['remove'](_0x5eff5c),this['context']instanceof _0x1e4091&&this['context']['ui']['focusTracker']['remove'](_0x5eff5c);});}['_unbindEditors'](_0x39a707){this['stopListening'](_0x39a707,'editorReady'),this['stopListening'](_0x39a707,'editorDestroyed');}['_createCommentThreadView'](_0xf13e79){const _0x4693e4=this['context']['plugins']['get'](it),{config:_0x3dbdab,locale:_0x69ff76}=this['context'],_0x28f09d=pt(_0x3dbdab['get']('locale'),_0x69ff76);return new(0x0,(_0x3dbdab['get']('comments'))['CommentThreadView'])(_0x69ff76,_0xf13e79,_0x4693e4['me'],{'editorConfig':{..._0x3dbdab['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3dbdab['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3dbdab['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3dbdab['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3dbdab['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x28f09d,'CommentView':_0x3dbdab['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x28f85d,channelId:_0x3de923,resolvedAt:_0x23d207,resolvedBy:_0x38f7b3,isFromAdapter:_0x4359da}){if(!this['hasCommentThread'](_0x28f85d))throw new _0x498a52('commentsrepository-missing-comment-thread',null,{'threadId':_0x28f85d});const _0x1e8891=this['getCommentThread'](_0x28f85d);if(_0x1e8891['isResolved'])throw new _0x498a52('commentsrepository-resolved-comment-thread',null,{'threadId':_0x28f85d});const _0x111434=this['context']['plugins']['get'](it);if(_0x1e8891['resolvedBy']=_0x111434['getUser'](_0x38f7b3),_0x1e8891['resolvedAt']=_0x23d207,_0x4359da||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3bc3da=this['context']['plugins']['get']('PendingActions'),_0x96dab2=_0x3bc3da['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3de923,'threadId':_0x28f85d})['then'](({resolvedAt:_0x1dbc2a,resolvedBy:_0x37a395})=>{_0x3bc3da['remove'](_0x96dab2),_0x1e8891['resolvedBy']['id']!==_0x37a395&&(_0x1e8891['resolvedBy']=_0x111434['getUser'](_0x37a395)),_0x1e8891['resolvedAt']=_0x1dbc2a;})['catch'](_0x3543ba=>{throw console['error'](_0x3543ba),new _0x498a52('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2fc97c,channelId:_0x1be498,isFromAdapter:_0x210bb3}){if(!this['hasCommentThread'](_0x2fc97c))throw new _0x498a52('commentsrepository-missing-comment-thread',null,{'threadId':_0x2fc97c});const _0x423810=this['getCommentThread'](_0x2fc97c);if(!_0x423810['isResolved'])throw new _0x498a52('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2fc97c});if(_0x423810['resolvedBy']=null,_0x423810['resolvedAt']=null,_0x210bb3||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2d681b=this['context']['plugins']['get']('PendingActions'),_0xf078e5=_0x2d681b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1be498,'threadId':_0x2fc97c})['then'](()=>_0x2d681b['remove'](_0xf078e5))['catch'](_0x346c52=>{throw console['error'](_0x346c52),new _0x498a52('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3c3720,isFromAdapter:_0x5e0ad6}){const _0x54a55a=this['getCommentThread'](_0x3c3720);if(!_0x54a55a)throw new _0x498a52('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3c3720),this['_threads']['delete'](_0x3c3720),!_0x54a55a['isSubmitted']||_0x5e0ad6||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2ea401=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5d32da}=_0x54a55a,_0x802d3b=_0x2ea401['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5d32da,'threadId':_0x3c3720})['then'](()=>_0x2ea401['remove'](_0x802d3b))['catch'](_0x4286fb=>{throw console['error'](_0x4286fb),new _0x498a52('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3b7bc5,unlinkedAt:_0x4ddc0f,context:_0x121dce,attributes:_0x5a5feb,isFromAdapter:_0x42fa87}){if('string'!=typeof _0x3b7bc5)throw new _0x498a52('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3b7bc5});if(!this['hasCommentThread'](_0x3b7bc5))throw new _0x498a52('commentsrepository-missing-comment-thread',null,{'threadId':_0x3b7bc5});const _0x429d69=this['getCommentThread'](_0x3b7bc5);let _0x5f63a4=!0x1;if(void 0x0!==_0x121dce&&_0x429d69['context']!==_0x121dce&&(_0x429d69['context']=_0x121dce,_0x5f63a4=!0x0),void 0x0!==_0x4ddc0f&&_0x429d69['unlinkedAt']!==_0x4ddc0f&&(_0x429d69['unlinkedAt']=_0x4ddc0f,_0x5f63a4=!0x0),_0x5a5feb&&!At(_0x5a5feb,_0x429d69['attributes'])&&(_0x429d69['attributes']=_0x5a5feb,_0x5f63a4=!0x0),!_0x5f63a4)return Promise['resolve']();if(!_0x429d69['isSubmitted']||_0x42fa87||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1ddf74=this['context']['plugins']['get']('PendingActions'),{channelId:_0x43cf52}=_0x429d69,_0x37fcef=_0x1ddf74['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x43cf52,'threadId':_0x3b7bc5,'context':_0x121dce,'unlinkedAt':_0x4ddc0f,'attributes':_0x5a5feb})['then'](()=>_0x1ddf74['remove'](_0x37fcef))['catch'](_0x380947=>{throw console['error'](_0x380947),new _0x498a52('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x366165){const _0x4c14b1=this['context']['plugins']['get'](y),_0x53745e=this['getCommentThread'](_0x366165);if(_0x53745e['_isAttached']=!0x1,this['_threadToController']['has'](_0x53745e)){const _0x406e7c=this['_threadToController']['get'](_0x53745e),_0x290d5d=_0x406e7c['view'],_0x8f4a0c=_0x4c14b1['getByInnerView'](_0x290d5d);this['_threadToController']['delete'](_0x53745e),this['_viewToController']['delete'](_0x290d5d),_0x8f4a0c&&_0x4c14b1['remove'](_0x8f4a0c),_0x406e7c['destroy'](),_0x290d5d['destroy']()['then'](()=>{this['_unbindEditors'](_0x290d5d);});}}['_updateActiveAnnotation']({threadId:_0x125295,resolvedAt:_0x2722be,unlinkedAt:_0x2f257b}){const _0x21c545=!!_0x2722be,_0x2c6359=this['context']['plugins']['get'](y),_0x5c61c9=this['getCommentThread'](_0x125295);if(this['_threadToController']['has'](_0x5c61c9)){const _0x47eef2=this['_threadToController']['get'](_0x5c61c9)['view'],_0x4e0c56=_0x2c6359['getByInnerView'](_0x47eef2);_0x4e0c56&&(_0x21c545&&_0x2c6359['_removeActiveAnnotation'](_0x4e0c56),_0x2f257b?_0x4e0c56['isVisible']=!0x1:_0x4e0c56['refreshVisibility']());}}['_getExternalAuthor'](_0x53b708){const _0x51ecb4=this['context']['plugins']['get'](it),_0x4e59dd=It('external:'+_0x53b708),_0x129490=_0x51ecb4['getUser'](_0x4e59dd);return _0x129490||_0x51ecb4['addUser']({'id':_0x4e59dd,'name':_0x53b708});}['_createNewComment']({threadId:_0x7cbe03,commentId:_0x1ce08c=_0x114214(),content:_0x4303c3,authorId:_0x325180,createdAt:_0x4ba788,attributes:_0x5c0e86}){if('string'!=typeof _0x1ce08c)throw new _0x498a52('commentsrepository-invalid-commentid');if('string'!=typeof _0x325180)throw new _0x498a52('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4303c3||!_0x4303c3['trim']())throw new _0x498a52('commentsrepository-invalid-comment-content');const _0x42f374=this['context']['plugins']['get'](it)['getUser'](_0x325180);if(!_0x42f374)throw new _0x498a52('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x325180});let _0x5719b=null,_0x5c1f57=_0x4ba788;return _0x5c0e86?.['@external']&&(_0x5719b=this['_getExternalAuthor'](_0x5c0e86['@external']['authorName']),_0x5c1f57=new Date(_0x5c0e86['@external']['createdAt'])),new wi(this,{'threadId':_0x7cbe03,'id':_0x1ce08c,'author':_0x5719b||_0x42f374,'creator':_0x42f374,'content':_0x4303c3,'createdAt':_0x4ba788,'authoredAt':_0x5c1f57,'attributes':_0x5c0e86});}['_addComment'](_0x595046){let {threadId:_0x58e700,content:_0x2a73b8,attributes:_0xaf1070,isFromAdapter:_0x33bde3}=_0x595046;const _0x28f63c=this['getCommentThread'](_0x595046['threadId']);if(!_0x28f63c)throw new _0x498a52('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x266b14=this['_createNewComment'](_0x595046),{id:_0x1cfb88}=_0x266b14;if(_0x28f63c['_add'](_0x266b14),_0x33bde3||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x28f63c['isSubmitted'])return Promise['resolve']();const _0x2895f2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x45796e}=_0x28f63c,_0x2da2df=_0x2895f2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xaf1070||(_0xaf1070={}),this['adapter']['addComment']({'channelId':_0x45796e,'threadId':_0x58e700,'commentId':_0x1cfb88,'content':_0x2a73b8,'attributes':_0xaf1070})['then'](_0x3fb47d=>{_0x2895f2['remove'](_0x2da2df),_0x3fb47d&&this['_updateComment']({'channelId':_0x45796e,'threadId':_0x58e700,'commentId':_0x1cfb88,'createdAt':_0x3fb47d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3dd966=>{throw console['error'](_0x3dd966),new _0x498a52('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3c1257,commentId:_0x39b9b7,content:_0x906254,createdAt:_0x18ebc8,attributes:_0x1cec89,isFromAdapter:_0x6f5d67}){if(void 0x0!==_0x906254&&('string'!=typeof _0x906254||!_0x906254['trim']()['length']))throw new _0x498a52('commentsrepository-update-comment-invalid-content');const _0x48a372=this['getCommentThread'](_0x3c1257),_0x490631=_0x48a372['getComment'](_0x39b9b7);if(!_0x490631)throw new _0x498a52('commentsrepository-update-missing-comment',this);let _0x31d310=!0x1;if(_0x906254&&_0x906254!==_0x490631['content']&&(_0x490631['isEditable']||_0x6f5d67)&&(_0x490631['content']=_0x906254,_0x31d310=!0x0),_0x18ebc8&&_0x18ebc8!==_0x490631['createdAt']&&(_0x490631['createdAt']=_0x18ebc8,_0x490631['attributes']&&_0x490631['attributes']['@external']||(_0x490631['authoredAt']=_0x18ebc8),_0x31d310=!0x0),_0x1cec89&&!At(_0x1cec89,_0x490631['attributes'])&&(_0x490631['attributes']=_0x1cec89,_0x31d310=!0x0),!_0x31d310)return Promise['resolve']();if(_0x48a372['fire']('commentUpdated'),_0x6f5d67||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x13814a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x8473e5}=this['getCommentThread'](_0x490631['threadId']),_0x4df4c2=_0x13814a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x8473e5,'threadId':_0x3c1257,'commentId':_0x39b9b7,'content':_0x906254,'attributes':_0x1cec89})['then'](()=>_0x13814a['remove'](_0x4df4c2))['catch'](_0x2f4dc8=>{throw console['error'](_0x2f4dc8),new _0x498a52('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x297e76,commentId:_0x62c25a,isFromAdapter:_0x77a77d}){const _0xc59fd3=this['getCommentThread'](_0x297e76),_0x3d6ec7=_0xc59fd3['getComment'](_0x62c25a);if(!_0x3d6ec7)throw new _0x498a52('commentsrepository-remove-missing-comment',this);if(_0xc59fd3['_remove'](_0x3d6ec7),_0x77a77d||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4c084c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x301df1}=_0xc59fd3,_0x2c155f=_0x4c084c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x301df1,'threadId':_0x297e76,'commentId':_0x62c25a})['then'](()=>_0x4c084c['remove'](_0x2c155f))['catch'](_0x1c6d7b=>{throw console['error'](_0x1c6d7b),new _0x498a52('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x22b275(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2095e4,_0x31c3af){super();const _0x5b7f10=_0x2095e4['context']['plugins']['get'](it)['me'],_0x24c5da=_0x2095e4['getCommentThread'](_0x31c3af['threadId']),_0x337cc9=0x0===_0x24c5da['comments']['length'],_0xe3e002=_0x5b7f10===_0x31c3af['author'];this['id']=_0x31c3af['id'],this['threadId']=_0x31c3af['threadId'],this['author']=_0x31c3af['author'],this['creator']=_0x31c3af['creator'],this['isExternal']=Boolean(_0x31c3af['attributes']&&_0x31c3af['attributes']['@external']),this['set']('content',_0x31c3af['content']),this['createdAt']=_0x31c3af['createdAt']||new Date(),this['set']('authoredAt',_0x31c3af['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x24c5da,'resolvedAt'),this['set']('attributes',_0x31c3af['attributes']||{}),this['bind']('isEditable')['to'](_0x2095e4,'_permissions',()=>{const _0x297873=_0x2095e4['getPermissions'](_0x24c5da['channelId'])['write'],_0x3fc030=_0x2095e4['getPermissions'](_0x24c5da['channelId'])['modifyAll'];return _0xe3e002&&_0x297873||!_0xe3e002&&_0x3fc030;}),this['bind']('isRemovable')['to'](_0x24c5da,'isRemovable',_0x2095e4,'_permissions',_0x3ae27c=>{const _0x1ffb06=_0x2095e4['getPermissions'](_0x24c5da['channelId'])['write'],_0x3d638c=_0x2095e4['getPermissions'](_0x24c5da['channelId'])['modifyAll'];return _0xe3e002&&_0x1ffb06||_0x3ae27c&&_0x337cc9||!_0xe3e002&&_0x3d638c&&!_0x337cc9;}),this['bind']('isReadOnly')['to'](_0x24c5da,'isReadOnly'),this['_repository']=_0x2095e4;}get['weight'](){return Math['max'](function(_0x340b7b){const _0x4d40f8=document['createElement']('div');return _0x4d40f8['innerHTML']=_0x340b7b,_0x4d40f8['textContent']['length'];}(this['content']),0xc8);}['update'](_0x5cc32d){const {threadId:_0x95a813,id:_0x5dd09c}=this;if(!this['_repository']['hasCommentThread'](_0x95a813))throw new _0x498a52('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5427f7}=this['_repository']['getCommentThread'](_0x95a813);this['_repository']['fire'](Nt('updateComment',_0x5427f7,_0x95a813),{'channelId':_0x5427f7,'threadId':_0x95a813,'commentId':_0x5dd09c,..._0x5cc32d});}['setAttribute'](_0x28d9e1,_0x51c911){const _0x532eb2=wt(this['attributes']);yt(_0x532eb2,_0x28d9e1,_0x51c911),this['update']({'attributes':_0x532eb2});}['removeAttribute'](_0x3d4f6e){const _0x52c20b=wt(this['attributes']);Ct(_0x52c20b,_0x3d4f6e),this['update']({'attributes':_0x52c20b});}['remove'](_0x140dab={}){if(!_0x140dab['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x36b99e,id:_0x28bd8b}=this;if(!this['_repository']['hasCommentThread'](_0x36b99e))throw new _0x498a52('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xfd1b33}=this['_repository']['getCommentThread'](_0x36b99e);this['_repository']['fire'](Nt('removeComment',_0xfd1b33,_0x36b99e),{'channelId':_0xfd1b33,'threadId':_0x36b99e,'commentId':_0x28bd8b,..._0x140dab});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x4abd6f,..._0x291404){for(const _0x4e9911 of _0x291404)void 0x0!==_0x4e9911&&(_0x4abd6f+=':'+String(_0x4e9911));return _0x4abd6f;}class ot extends _0x3ab548{constructor(_0x826ef){super(_0x826ef),this['set']('hasContent',!0x1);}['refresh'](){const _0x5443e2=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x43f9eb of _0x5443e2['getRanges']())if(this['_hasContent'](_0x43f9eb))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3c5350=_0x114214(),ranges:_0x570faa,comment:_0x3daf96}={}){const _0x350acd=this['editor']['model'],_0x45dd1b=_0x570faa??Array['from'](_0x350acd['document']['selection']['getRanges']()),_0x5c51f4=[];for(const _0xa28926 of _0x45dd1b)this['_hasContent'](_0xa28926)&&_0x5c51f4['push'](this['_trimToContent'](_0xa28926));if(!_0x5c51f4['length'])throw new _0x498a52('addcommentthreadcommand-incorrect-ranges',null);_0x3daf96&&this['_createCommentThread'](_0x3c5350,_0x3daf96),this['_createMarkersFromRanges'](_0x3c5350,_0x5c51f4,!!_0x3daf96);}['_createMarkersFromRanges'](_0x507cbf,_0x37c3a6,_0x2e3dec){this['editor']['model']['change'](_0x346855=>{for(const _0x79c3fd of _0x37c3a6){const _0x4000dd=_0x114214()['substr'](0x1,0x5),_0x122ca8='comment:'+_0x507cbf+':'+_0x4000dd;_0x346855['addMarker'](_0x122ca8,{'range':_0x79c3fd,'usingOperation':_0x2e3dec,'affectsData':_0x2e3dec});}});}['_createCommentThread'](_0x479755,_0x36577d){const _0x24e261=this['editor']['plugins']['get']('CommentsRepository'),_0x1ff978=this['editor']['config']['get']('collaboration.channelId'),_0x15d9ec=this['editor']['plugins']['get']('Users')['me'];if(!_0x15d9ec)throw new _0x498a52('addcommentthreadcommand-user-not-found',null);_0x24e261['addCommentThread']({'threadId':_0x479755,'channelId':_0x1ff978,'comments':[{'authorId':_0x15d9ec['id'],'content':_0x36577d,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x350aa1){for(const _0x17311c of _0x350aa1['getItems']())if(this['_itemIsContent'](_0x17311c))return!0x0;return!0x1;}['_itemIsContent'](_0x231de8){return _0x231de8['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x231de8)&&!_0x231de8['is']('element','tableCell');}['_trimToContent'](_0x124b30){const _0x5cc558=_0x35773a=>!this['_itemIsContent'](_0x35773a['item']),_0x326e49=_0x124b30['start']['getLastMatchingPosition'](_0x5cc558),_0x39b39d=_0x124b30['end']['getLastMatchingPosition'](_0x5cc558,{'direction':'backward'});return this['editor']['model']['createRange'](_0x326e49,_0x39b39d);}}class b extends _0x2d240e{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20ad52){super(_0x20ad52),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x354597=this['editor'],_0x21d9e7=_0x354597['model']['document']['selection'],_0x26e79a=_0x4916fd(()=>this['refreshSelectedViews'](),0xa);_0x21d9e7['on']('change:range',(_0x5f15ba,_0x1699a8)=>{_0x1699a8['directChange']&&(_0x26e79a['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x354597['editing']['view']['document'],'change:isFocused',(_0x56be76,_0x34a74b,_0x25fb04)=>{_0x25fb04&&_0x26e79a();}),this['listenTo'](_0x354597['ui']['focusTracker'],'change:isFocused',(_0x2f28da,_0xa37339,_0x3a24cd)=>{_0x3a24cd||this['fire']('blur',{'isAnnotationTracked':_0x1347ba=>this['_editorAnnotationsData']['has'](_0x1347ba['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x7ad4c8){if(this['_editorAnnotations']['has'](_0x7ad4c8['view']))return;this['_editorAnnotations']['add'](_0x7ad4c8['view']),this['editor']['ui']['focusTracker']['add'](_0x7ad4c8['view']['element']);const _0x336db0=this['editor']['plugins']['get'](y);this['listenTo'](_0x336db0['collection'],'remove',(_0x2f49ec,_0x583672)=>{this['editor']['ui']['focusTracker']['remove'](_0x583672['view']['element']),this['_editorAnnotations']['delete'](_0x583672['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x25869f){if('function'!=typeof _0x25869f)throw new _0x498a52('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x25869f);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x218617,annotations:_0xdbae91}){const _0x67fad9=[],_0x107fb1=this['editor']['model']['document']['selection'],_0xa3cbaa=Array['from'](_0x107fb1['getRanges']());for(const [_0x1a18af,_0x583b50]of this['_editorAnnotationsData']){const _0xd99b12=_0x10e6b5(_0x583b50),_0xbb990c=_0xdbae91['getByInnerView'](_0x1a18af);_0xd99b12&&_0xbb990c&&_0x67fad9['push']({'annotation':_0xbb990c,'range':_0xd99b12});}function _0x10e6b5(_0x124274){for(const _0x476592 of _0x124274)for(const _0x3e598d of _0xa3cbaa)if(_0x476592['containsRange'](_0x3e598d,!_0x107fb1['isCollapsed']))return _0x476592;return null;}return _0x67fad9['sort']((_0x20d512,_0x4a0b0c)=>{const _0x2bb9b4=_0x20d512['range'],_0x5b8b92=_0x4a0b0c['range'];if(!_0x2bb9b4['isEqual'](_0x5b8b92)){if(_0x2bb9b4['containsRange'](_0x5b8b92,!0x0))return 0x1;if(_0x5b8b92['containsRange'](_0x2bb9b4,!0x0))return-0x1;}return _0x20d512['annotation']==_0x218617?-0x1:_0x4a0b0c['annotation']==_0x218617?0x1:0x0;})['map'](_0xe37756=>_0xe37756['annotation']);}get['_editorAnnotationsData'](){const _0x40165b=new Map();for(const _0x1db065 of Array['from'](this['_dataCollectors']))for(const [_0x48c452,_0x42f0f0]of _0x1db065())_0x40165b['set'](_0x48c452,_0x42f0f0);return _0x40165b;}}class st extends _0x2d240e{['afterInit'](){const _0x3c2b8b=this['editor'];if(!_0x3c2b8b['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3c2b8b['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x2d240e{constructor(_0x5a6393){super(_0x5a6393),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1332a7=this['editor'],_0x1a5687=_0x1332a7['commands']['get']('importWord'),_0x22dc94=_0x1332a7['plugins']['get'](it);_0x1a5687&&(_0x1a5687['on']('execute',(_0x5dcb8a,[,_0x4d5e18])=>{_0x4d5e18['collaboration_features']={'comments':!0x0,'user_id':_0x22dc94['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1a5687,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x333c82,_0x161978){const {comment_threads:_0x12e35e}=_0x161978;_0x12e35e&&_0x12e35e['forEach'](({thread_id:_0x21f164,comments:_0x303c91,is_resolved:_0x47327d})=>{const _0x27ddfe=new Date(),_0x49c75e=_0x303c91['map'](({author:_0x2b89ba,content:_0x40741b,created_at:_0x26c39c})=>({'content':_0x40741b,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x27ddfe,'attributes':{'@external':{'authorName':_0x2b89ba,'createdAt':_0x26c39c?new Date(_0x26c39c):new Date(),'source':'importWord'}}})),_0x1434cb=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1434cb,'threadId':_0x21f164,'comments':_0x49c75e,'resolvedAt':_0x47327d?_0x27ddfe:null});});}}class at extends _0x2d240e{constructor(_0x2a851e){super(_0x2a851e),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x590835=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x590835,'contentInsertion',(_0x5f2b94,_0x20bfd0)=>this['_removeMarkersWithoutThreads'](_0x20bfd0['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x5cf812){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5cf812;const _0x1ac19a=this['editor']['plugins']['get']('CommentsRepository');for(const _0x405522 of _0x5cf812['keys']()){const [_0x3dc5d9,_0x13fb0c]=_0x405522['split'](':');'comment'!=_0x3dc5d9||_0x1ac19a['hasCommentThread'](_0x13fb0c)||_0x5cf812['delete'](_0x405522);}return _0x5cf812;}['_registerMarkerInClipboardPipeline'](){const _0x2866de=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4576cc=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4576cc&&_0x2866de['_registerMarkerToCopy']('comment',_0x4576cc);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x55f495){switch(_0x55f495){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0xdbf443){const _0x2762ac=_0xdbf443['split'](':');return{'group':_0x2762ac[0x0],'id':_0x2762ac[0x1],'part':_0x2762ac[0x2]};}class ut extends _0x2d240e{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x39c48e,_0x4e2af1)=>{if(!_0x4e2af1['options']['showCommentHighlights'])return null;if(_0x4e2af1['options']['ignoreResolvedComments']){const {id:_0x27f170}=ft(_0x39c48e['markerName']),_0x16b0bd=this['editor']['plugins']['get'](o);if(_0x16b0bd['getCommentThread'](_0x27f170)?.['isResolved']&&_0x39c48e['item'])return _0x4e2af1['consumable']['consume'](_0x39c48e['item'],'addMarker:'+_0x39c48e['markerName']),_0x4e2af1['consumable']['consume'](_0x39c48e['item'],'removeMarker:'+_0x39c48e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x473206=>{_0x473206['on']('addMarker:comment',(_0x5af9b5,_0x4f5123,_0x5f4479)=>{if(!_0x5f4479['options']['showCommentHighlights'])return;const _0x59fdba=_0x4f5123['item'];if(!_0x59fdba)return;const _0x33ed13=_0x5f4479['mapper']['toViewElement'](_0x59fdba);this['editor']['model']['schema']['isObject'](_0x59fdba)&&_0x33ed13&&!_0x33ed13['getCustomProperty']('widget')&&_0x33ed13['is']('containerElement')&&_0x2134c4(_0x33ed13,_0x5f4479['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x13ecaa,{writer:_0x207804,options:_0x49ce4c})=>{if(!_0x49ce4c['showCommentHighlights'])return null;const _0x1e4b53=_0x207804['createContainerElement']('div'),_0x3c2b85=_0x207804['createEmptyElement']('hr');return _0x207804['addClass']('ck-horizontal-line',_0x1e4b53),_0x207804['insert'](_0x207804['createPositionAt'](_0x1e4b53,0x0),_0x3c2b85),_0x1e4b53;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0xfc3f1b,{writer:_0x1b777a,options:_0x5108f0})=>{if(!_0x5108f0['showCommentHighlights'])return null;const _0xbcb516=_0x1b777a['createContainerElement']('span'),_0x4227a9=_0x1b777a['createEmptyElement']('img');return _0x1b777a['addClass']('image-inline',_0xbcb516),_0x1b777a['insert'](_0x1b777a['createPositionAt'](_0xbcb516,0x0),_0x4227a9),_0xbcb516;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x547c3e,{writer:_0x38a546,options:_0x4eb90a})=>{if(_0x4eb90a['showCommentHighlights'])return _0x38a546['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5b5dea,_0x4c4da4,_0x56735a)=>{_0x56735a['options']['showCommentHighlights']&&_0x5b5dea['stop']();},{'priority':'high'});}}class r extends _0x2d240e{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(_0x330264){super(_0x330264),this['set']('isThreadsLoadingPaused',!0x0),_0x330264['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x52cf6e,_0x312a7d,_0x575fae,_0x1be464)=>{const _0x2cb7c4=_0x330264['plugins']['get'](o),_0x576b7c=_0x575fae?ft(_0x575fae)['id']:null;_0x330264['model']['change'](()=>{if(_0x576b7c){const _0x48510f=this['getAllMarkersForId'](_0x576b7c);for(const _0x342833 of _0x48510f)_0x330264['editing']['reconvertMarker'](_0x342833);}if(_0x1be464){const {id:_0x496b04}=ft(_0x1be464),_0xe12fa7=_0x2cb7c4['getCommentThread'](_0x496b04);if(_0xe12fa7&&_0xe12fa7['unlinkedAt'])return;if(_0xe12fa7&&!_0xe12fa7['isAttached'])return;const _0x230229=this['getAllMarkersForId'](_0x496b04);for(const _0x39ec9a of _0x230229)_0x330264['editing']['reconvertMarker'](_0x39ec9a);}}),_0x576b7c&&this['scrollToThreadMarker'](_0x576b7c);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xb7d24f=this['editor'],_0x27f933=_0xb7d24f['plugins']['get'](o),_0x5737e8=_0xb7d24f['config']['get']('collaboration.channelId'),_0x3030d9=_0x27f933['getCommentThreads']()['filter'](_0x5af4c1=>_0x5af4c1['channelId']!==_0x5737e8);_0xb7d24f['commands']['add']('addCommentThread',new ot(_0xb7d24f)),this['listenTo'](_0xb7d24f,'change:isReadOnly',(_0x2e8da2,_0x1a9623,_0x4cb12f)=>{_0x27f933['switchReadOnly'](_0x4cb12f,_0xb7d24f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x27f933,dt('addCommentThread',_0x5737e8),(_0x41086b,{threadId:_0x2fafed})=>{const _0x4c4a06=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2fafed);_0x4c4a06?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2fafed);}),this['listenTo'](_0x27f933,dt('removeCommentThread',_0x5737e8),(_0x3dc2fd,{threadId:_0x3cca27})=>{_0xb7d24f['model']['enqueueChange']({'isUndoable':!0x1},_0x38864c=>{const _0x461163=this['getAllMarkersForId'](_0x3cca27);for(const _0x2fc07f of _0x461163)_0x38864c['removeMarker'](_0x2fc07f);});}),this['listenTo'](_0x27f933,dt('resolveCommentThread',_0x5737e8),(_0x2b4163,{threadId:_0x14ee90})=>{(this['_reconvertMarkers'](_0x14ee90),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x14ee90)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x27f933,dt('reopenCommentThread',_0x5737e8),(_0x3419fa,{threadId:_0x3a08f8})=>{this['_reconvertMarkers'](_0x3a08f8);},{'priority':'low'}),this['listenTo'](_0x27f933,dt('addComment',_0x5737e8),(_0x5eb3e0,{threadId:_0x38f0fd,isFromAdapter:_0x3f43e6})=>{const _0x44230e=this['getAllMarkersForId'](_0x38f0fd);if(_0x3f43e6||0x0==_0x44230e['length']||!_0x27f933['hasCommentThread'](_0x38f0fd))return;0x1===_0x27f933['getCommentThread'](_0x38f0fd)['length']&&_0xb7d24f['model']['enqueueChange']({'isUndoable':!0x1},_0x3dc77c=>{for(const _0x1e9ede of _0x44230e)_0x3dc77c['updateMarker'](_0x1e9ede,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3030d9);}['afterInit'](){!async function(_0x4f3666){const _0x2cb3cf=_0x4a814f([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0xe59349=0x73460ab3,_0x522a26=0x73418c23^_0xe59349,_0x1716c6=window[_0x4a814f([0x44,0x61,0x74,0x65])][_0x4a814f([0x6e,0x6f,0x77])](),_0x154810=_0x4f3666[_0x4a814f([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x15a1f3=new window[(_0x4a814f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x170d75=>{_0x154810[_0x4a814f([0x6f,0x6e,0x63,0x65])](_0x4a814f([0x72,0x65,0x61,0x64,0x79]),_0x170d75);}),_0x2cded8={[_0x4a814f([0x6b,0x74,0x79])]:_0x4a814f([0x45,0x43]),[_0x4a814f([0x75,0x73,0x65])]:_0x4a814f([0x73,0x69,0x67]),[_0x4a814f([0x63,0x72,0x76])]:_0x4a814f([0x50,0x2d,0x32,0x35,0x36]),[_0x4a814f([0x78])]:_0x4a814f([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]),[_0x4a814f([0x79])]:_0x4a814f([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]),[_0x4a814f([0x61,0x6c,0x67])]:_0x4a814f([0x45,0x53,0x32,0x35,0x36])},_0x5ac0b1=_0x154810[_0x4a814f([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4a814f([0x67,0x65,0x74])](_0x4a814f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x24d456(){let _0x382e4b,_0x198c55=null,_0x25043a=null;try{if(_0x5ac0b1==_0x4a814f([0x47,0x50,0x4c]))return _0x4a814f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x382e4b=_0xae17c0(),!_0x382e4b)return _0x4a814f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x382e4b[_0x4a814f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x25043a=_0x509bb9(_0x382e4b[_0x4a814f([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x382e4b[_0x4a814f([0x6a,0x74,0x69])])),await _0x2a6b9c()?_0xad103a()?_0x4b382a()?_0x4a814f([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x330dca()?(_0x382e4b[_0x4a814f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4a814f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x198c55=_0x58fb77(_0x4a814f([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3b67ed()):_0x4a814f([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4a814f([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4a814f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4a814f([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4b382a(){const _0x392e33=[_0x4a814f([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4a814f([0x74,0x72,0x69,0x61,0x6c])][_0x4a814f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x382e4b[_0x4a814f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1716c6/0x3e8:0xe10*_0x522a26;return _0x382e4b[_0x4a814f([0x65,0x78,0x70])]<_0x392e33;}function _0xad103a(){const _0x47151c=_0x382e4b[_0x4a814f([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x47151c)return!0x1;if(_0x47151c[_0x4a814f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a814f([0x2a])))return!0x0;if(_0x47151c[_0x4a814f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a814f([0x43,0x4d,0x54])))return!0x0;if(_0x47151c[_0x4a814f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a814f([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x2a2cfb())return!0x0;if(_0x47151c[_0x4a814f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a814f([0x52,0x43,0x4d,0x54]))){if(_0x4e8baa())return!0x0;if(_0x39e80f()||_0x26dab3())return!0x0;}return!0x1;}function _0x330dca(){const _0x2acf58=_0x382e4b[_0x4a814f([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2acf58||0x0==_0x2acf58[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x192ad9}=new URL(window[_0x4a814f([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2acf58[_0x4a814f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x192ad9))return!0x0;const _0x28fb6a=_0x192ad9[_0x4a814f([0x73,0x70,0x6c,0x69,0x74])](_0x4a814f([0x2e]));return _0x2acf58[_0x4a814f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb983e3=>_0xb983e3[_0x4a814f([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a814f([0x2a])))[_0x4a814f([0x6d,0x61,0x70])](_0x3ac10c=>_0x3ac10c[_0x4a814f([0x73,0x70,0x6c,0x69,0x74])](_0x4a814f([0x2e])))[_0x4a814f([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x81a911=>_0x81a911[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x28fb6a[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4a814f([0x6d,0x61,0x70])](_0x49f798=>Array(_0x28fb6a[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x49f798[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4a814f([0x66,0x69,0x6c,0x6c])](_0x49f798[0x0]===_0x4a814f([0x2a])?_0x4a814f([0x2a]):'')[_0x4a814f([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x49f798))[_0x4a814f([0x73,0x6f,0x6d,0x65])](_0x4b7136=>_0x28fb6a[_0x4a814f([0x65,0x76,0x65,0x72,0x79])]((_0xedeaca,_0x2ede17)=>_0x4b7136[_0x2ede17]===_0xedeaca||_0x4b7136[_0x2ede17]===_0x4a814f([0x2a])));}function _0x3b67ed(){return _0x198c55&&_0x25043a?new window[(_0x4a814f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xf1ab8c,_0x28f506)=>{_0x198c55[_0x4a814f([0x74,0x68,0x65,0x6e])](_0xf1ab8c,_0x28f506),_0x25043a[_0x4a814f([0x74,0x68,0x65,0x6e])](_0x1a3822=>{_0x1a3822!=_0x4a814f([0x56,0x61,0x6c,0x69,0x64])&&_0xf1ab8c(_0x1a3822);},_0x28f506);}):_0x198c55||_0x25043a||_0x4a814f([0x56,0x61,0x6c,0x69,0x64]);}}function _0x509bb9(_0xce6037,_0x156e35){return new window[(_0x4a814f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x43e632=>{if(_0x41baf8())return _0x43e632(_0x4a814f([0x56,0x61,0x6c,0x69,0x64]));_0x4617cf(),_0x154810[_0x4a814f([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4a814f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x111f1a=!0x1;const _0x3b796c=_0x114214();function _0x19eb06(_0x56b889){return!!_0x56b889&&(typeof _0x56b889===_0x4a814f([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x56b889===_0x4a814f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x56b889[_0x4a814f([0x74,0x68,0x65,0x6e])]===_0x4a814f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x56b889[_0x4a814f([0x63,0x61,0x74,0x63,0x68])]===_0x4a814f([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x55b372(_0xf5c995){_0x55af35(_0xf5c995)[_0x4a814f([0x74,0x68,0x65,0x6e])](_0x19ae3d=>{if(!_0x19ae3d||_0x19ae3d[_0x4a814f([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4a814f([0x6f,0x6b]))return _0x4a814f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x508798(_0x58420d(_0x3b796c+_0x156e35))!=_0x19ae3d[_0x4a814f([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4a814f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4a814f([0x56,0x61,0x6c,0x69,0x64]);})[_0x4a814f([0x74,0x68,0x65,0x6e])](_0x1fc434=>(_0x4e6e88(),_0x1fc434),()=>{const _0x4ddd84=_0x206505();return null==_0x4ddd84?(_0x4e6e88(),_0x4a814f([0x56,0x61,0x6c,0x69,0x64])):_0x4a814f(_0x1716c6-_0x4ddd84>(0x574a8eb3^_0xe59349)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4a814f([0x74,0x68,0x65,0x6e])](_0x43e632)[_0x4a814f([0x63,0x61,0x74,0x63,0x68])](()=>{_0x43e632(_0x4a814f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5d8df9=0x7370e433^_0xe59349;function _0x4e6e88(){const _0x2ee044=_0x4a814f([0x6c,0x6c,0x63,0x74,0x2d])+_0x508798(_0x58420d(_0xce6037)),_0x338004=_0x1c051f(_0x508798(window[_0x4a814f([0x4d,0x61,0x74,0x68])][_0x4a814f([0x63,0x65,0x69,0x6c])](_0x1716c6/_0x5d8df9)));window[_0x4a814f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4a814f([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2ee044,_0x338004);}function _0x206505(){const _0x1cc4e0=_0x4a814f([0x6c,0x6c,0x63,0x74,0x2d])+_0x508798(_0x58420d(_0xce6037)),_0x12e0d3=window[_0x4a814f([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4a814f([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1cc4e0);return _0x12e0d3?window[_0x4a814f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1c051f(_0x12e0d3),0x10)*_0x5d8df9:null;}function _0x55af35(_0xc7bd4c){return new window[(_0x4a814f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f1301,_0x19153b)=>{_0xc7bd4c[_0x4a814f([0x74,0x68,0x65,0x6e])](_0x3f1301,_0x19153b),window[_0x4a814f([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x19153b,0x7347de73^_0xe59349);});}}_0x154810[_0x4a814f([0x6f,0x6e])](_0x4a814f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xaf5970,_0x554923)=>{if(_0x554923[0x0]!=_0xce6037)return _0x43e632(_0x4a814f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x554923[0x1]={..._0x554923[0x1],[_0x4a814f([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3b796c};},{[_0x4a814f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4a814f([0x68,0x69,0x67,0x68])}),_0x154810[_0x4a814f([0x6f,0x6e])](_0x4a814f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x22bfdf=>{_0x19eb06(_0x22bfdf[_0x4a814f([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x111f1a=!0x0,_0x55b372(_0x22bfdf[_0x4a814f([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4a814f([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4a814f([0x6c,0x6f,0x77])}),_0x15a1f3[_0x4a814f([0x74,0x68,0x65,0x6e])](()=>{_0x111f1a||_0x43e632(_0x4a814f([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x41baf8(){return _0x154810[_0x4a814f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4a814f([0x76,0x69,0x65,0x77])][_0x4a814f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4a814f([0x61,0x75,0x74,0x6f]);}function _0x4617cf(){_0x154810[_0x4a814f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4a814f([0x76,0x69,0x65,0x77])][_0x4a814f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4a814f([0x61,0x75,0x74,0x6f]);}}function _0x58fb77(_0x12e833){const _0x443b89=[new window[(_0x4a814f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f9c0c=>setTimeout(_0x3f9c0c,0x734f347f^_0xe59349)),_0x15a1f3[_0x4a814f([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4a814f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x29e36b=>{let _0x321ce2=0x0;_0x154810[_0x4a814f([0x6d,0x6f,0x64,0x65,0x6c])][_0x4a814f([0x6f,0x6e])](_0x4a814f([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x533e7f,_0x5ee964)=>{_0x5ee964[0x0][_0x4a814f([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x321ce2++,_0x321ce2==(0x73460f5b^_0xe59349)&&(_0x29e36b(),_0x533e7f[_0x4a814f([0x6f,0x66,0x66])]());});}))];return window[_0x4a814f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4a814f([0x72,0x61,0x63,0x65])](_0x443b89)[_0x4a814f([0x74,0x68,0x65,0x6e])](()=>_0x12e833);}async function _0x472084(){await _0x15a1f3,_0x154810[_0x4a814f([0x6d,0x6f,0x64,0x65,0x6c])][_0x4a814f([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xa4d316,_0x154810[_0x4a814f([0x6d,0x6f,0x64,0x65,0x6c])][_0x4a814f([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xa4d316,_0x154810[_0x4a814f([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4a814f([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2a2cfb(){return window[_0x4a814f([0x67,0x6c,0x6f,0x62])]&&window[_0x4a814f([0x67,0x6c,0x6f,0x62])][_0x4a814f([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x4e8baa(){return _0x4e85ee(_0x4a814f([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4074d6(_0x4a814f([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4a814f([0x73,0x74,0x61,0x74,0x65])]==_0x4a814f([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x39e80f(){return _0x4e85ee(_0x4a814f([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 _0x26dab3(){return _0x4e85ee(_0x4a814f([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x94db45(_0x354a8c){const _0x86c14d=_0x40ef91();_0x154810[_0x86c14d]=_0x4a814f([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x354a8c,_0x354a8c!=_0x4a814f([0x56,0x61,0x6c,0x69,0x64])&&_0x472084();}function _0x40ef91(){const _0x514893=window[_0x4a814f([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4a814f([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4a814f([0x6e,0x6f,0x77])]())[_0x4a814f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4a814f([0x2e]),'');let _0x504738=_0x4a814f([0x4b]);for(let _0x76956a=0x0;_0x76956a<_0x514893[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x76956a+=0x2){let _0x346b66=window[_0x4a814f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x514893[_0x4a814f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x76956a,_0x76956a+0x2));_0x346b66>=_0x2cb3cf[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x346b66-=_0x2cb3cf[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x504738+=_0x2cb3cf[_0x346b66];}return _0x504738;}function _0xae17c0(){const _0x1c7bb0=_0x5ac0b1[_0x4a814f([0x73,0x70,0x6c,0x69,0x74])](_0x4a814f([0x2e]));if(0x3!=_0x1c7bb0[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1cb174(_0x1c7bb0[0x1]);function _0x1cb174(_0x53e82c){const _0x2dca3c=_0x169b49(_0x53e82c);return _0x2dca3c&&_0x5f2e7c()?_0x2dca3c:null;function _0x5f2e7c(){const _0x46431b=_0x2dca3c[_0x4a814f([0x6a,0x74,0x69])],_0x22104d=window[_0x4a814f([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x46431b[_0x4a814f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x46431b[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2c1c61={..._0x2dca3c,[_0x4a814f([0x6a,0x74,0x69])]:_0x46431b[_0x4a814f([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x46431b[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2c1c61[_0x4a814f([0x76,0x63])],_0x58420d(_0x2c1c61)==_0x22104d;}}}async function _0x2a6b9c(){let _0x2a717b=!0x0;try{const _0x116d5f=_0x5ac0b1[_0x4a814f([0x73,0x70,0x6c,0x69,0x74])](_0x4a814f([0x2e])),[_0x541087,_0x53e853,_0xbdd393]=_0x116d5f;return _0x1379d6(_0x541087),await _0x13fb5f(_0x541087,_0x53e853,_0xbdd393),_0x2a717b;}catch{return!0x1;}function _0x1379d6(_0x515664){const _0x27cd44=_0x169b49(_0x515664);_0x27cd44&&_0x27cd44[_0x4a814f([0x61,0x6c,0x67])]==_0x4a814f([0x45,0x53,0x32,0x35,0x36])||(_0x2a717b=!0x1);}async function _0x13fb5f(_0x31b292,_0x4727a0,_0x351056){const _0x1a9e2b=window[_0x4a814f([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4a814f([0x66,0x72,0x6f,0x6d])](_0x458c07(_0x351056),_0x3f794b=>_0x3f794b[_0x4a814f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2c5677=new window[(_0x4a814f([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4a814f([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x31b292+_0x4a814f([0x2e])+_0x4727a0),_0x4a44db=window[_0x4a814f([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4a814f([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4a44db)return;const _0x4cb99f=await _0x4a44db[_0x4a814f([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4a814f([0x6a,0x77,0x6b]),_0x2cded8,{[_0x4a814f([0x6e,0x61,0x6d,0x65])]:_0x4a814f([0x45,0x43,0x44,0x53,0x41]),[_0x4a814f([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4a814f([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4a814f([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4a44db[_0x4a814f([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4a814f([0x6e,0x61,0x6d,0x65])]:_0x4a814f([0x45,0x43,0x44,0x53,0x41]),[_0x4a814f([0x68,0x61,0x73,0x68])]:{[_0x4a814f([0x6e,0x61,0x6d,0x65])]:_0x4a814f([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4cb99f,_0x1a9e2b,_0x2c5677)||(_0x2a717b=!0x1);}}function _0x169b49(_0x29c1d1){return _0x29c1d1[_0x4a814f([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4a814f([0x65,0x79]))?JSON[_0x4a814f([0x70,0x61,0x72,0x73,0x65])](_0x458c07(_0x29c1d1)):null;}function _0x458c07(_0x525252){return window[_0x4a814f([0x61,0x74,0x6f,0x62])](_0x525252[_0x4a814f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4a814f([0x2b]))[_0x4a814f([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4a814f([0x2f])));}function _0x58420d(_0x53e024){let _0x12f96c=0x1505;function _0x34f7af(_0x3e43e1){for(let _0x3048f7=0x0;_0x3048f7<_0x3e43e1[_0x4a814f([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3048f7++){const _0x473d99=_0x3e43e1[_0x4a814f([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3048f7);_0x12f96c=(_0x12f96c<<0x5)+_0x12f96c+_0x473d99,_0x12f96c&=_0x12f96c;}}function _0x2023dd(_0x270da4){Array[_0x4a814f([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x270da4)?_0x270da4[_0x4a814f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2023dd):_0x270da4&&typeof _0x270da4==_0x4a814f([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4a814f([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x270da4)[_0x4a814f([0x73,0x6f,0x72,0x74])]()[_0x4a814f([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x44d03d,_0x4d32ef])=>{_0x34f7af(_0x44d03d),_0x2023dd(_0x4d32ef);}):_0x34f7af(window[_0x4a814f([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x270da4));}return _0x2023dd(_0x53e024),_0x12f96c>>>0x0;}function _0x508798(_0x3ffefd){return _0x3ffefd[_0x4a814f([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4a814f([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4a814f([0x30]));}function _0x1c051f(_0x154a80){return _0x154a80[_0x4a814f([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4a814f([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4a814f([0x6a,0x6f,0x69,0x6e])]('');}function _0x4e85ee(_0x27e80d){return _0x154810[_0x4a814f([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4a814f([0x68,0x61,0x73])](_0x27e80d);}function _0x4074d6(_0x533645){return _0x154810[_0x4a814f([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4a814f([0x67,0x65,0x74])](_0x533645);}function _0xa4d316(){}function _0x4a814f(_0x624c0d){return _0x624c0d['map'](_0x480c71=>String['fromCharCode'](_0x480c71))['join']('');}_0x94db45(await _0x24d456());}(this);}['destroy'](){const _0x5cc1f9=this['editor']['plugins']['get'](o),_0x5c08cb=this['editor']['config']['get']('collaboration.channelId');for(const _0x3f8f38 of _0x5cc1f9['getCommentThreads']({'channelId':_0x5c08cb}))_0x5cc1f9['_detachCommentThread'](_0x3f8f38['id']),_0x5cc1f9['_threads']['delete'](_0x3f8f38['id']);super['destroy']();}['hasMarkerForId'](_0x7c5460){return this['getAllMarkersForId'](_0x7c5460)['length']>0x0;}['getAllMarkersForId'](_0x20b81f){const _0xc68d3f=[];for(const _0x3cf709 of this['editor']['model']['markers'])_0x3cf709['name']['startsWith']('comment:'+_0x20b81f)&&_0xc68d3f['push'](_0x3cf709);return _0xc68d3f;}['scrollToThreadMarker'](_0x971e8e){setTimeout(()=>{const _0x7c7031=this['_getTargetForId'](_0x971e8e);if(!_0x7c7031)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x971e8e&&nt({'target':_0x7c7031[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2d88bc){this['editor']['model']['change'](()=>{for(const _0x45fa5a of this['getAllMarkersForId'](_0x2d88bc))this['editor']['editing']['reconvertMarker'](_0x45fa5a);});}['_attachArchivedThread'](_0x51ccce){const _0x5ea2eb=this['editor']['plugins']['get'](o),_0x4ef43d=this['editor']['plugins']['get'](b),_0xeadb61=_0x5ea2eb['getCommentThread'](_0x51ccce);if(!_0xeadb61['isAttached']){const _0x552cef=_0xeadb61['attachTo'](()=>this['_getTargetForId'](_0xeadb61['id']));_0x4ef43d['registerAnnotation'](_0x552cef),_0xeadb61['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3f2e2b=this['editor'],_0x116011=_0x3f2e2b['plugins']['get'](it);_0x3f2e2b['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x46095b,_0x13f594)=>{const {id:_0x76d656}=ft(_0x46095b['markerName']),_0x19e57f=_0x3f2e2b['plugins']['get'](o)['getCommentThread'](_0x76d656),_0x42d5d8=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x76d656;let _0x4e9121;if(_0x19e57f&&_0x19e57f['isResolved']&&!_0x42d5d8&&_0x46095b['item'])return _0x13f594['consumable']['consume'](_0x46095b['item'],'addMarker:'+_0x46095b['markerName']),_0x13f594['consumable']['consume'](_0x46095b['item'],'removeMarker:'+_0x46095b['markerName']),null;const _0x5346af=['ck-comment-marker'];return _0x42d5d8&&_0x5346af['push']('ck-comment-marker--active'),_0x4e9121=_0x19e57f?.['length']?_0x19e57f['comments']['first']['author']['id']:_0x116011['me']['id'],{'classes':_0x5346af,'attributes':{'data-comment':_0x76d656,'data-author-id':_0x4e9121}};}}),_0x3f2e2b['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3cb38a,{options:_0xfd6286})=>{if(_0xfd6286['showCommentHighlights'])return null;const _0x49d741=_0x3f2e2b['plugins']['get'](o),_0x2c2da9=_0x3f2e2b['model']['markers']['get'](_0x3cb38a),{id:_0x2da90b,part:_0x878e09}=ft(_0x3cb38a);return _0x2c2da9&&!_0x2c2da9['affectsData']||_0xfd6286['ignoreResolvedComments']&&_0x49d741['getCommentThread'](_0x2da90b)?.['isResolved']?null:{'group':'comment','name':_0x878e09?_0x2da90b+':'+_0x878e09:_0x2da90b};}}),_0x3f2e2b['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4c6d6a,{writer:_0x3697b3})=>_0x3697b3['createElement']('$marker',{'data-name':'comment:'+_0x4c6d6a['getAttribute']('id')})}),_0x3f2e2b['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x16d952=this['editor'],_0xe28798=_0x16d952['plugins']['get'](o),_0x113015=new Set(),_0xf80af5=new Set();_0x16d952['model']['document']['registerPostFixer'](_0x1110ce=>{let _0x44391b=!0x1;for(const {name:_0x3a8721,data:_0x4bccfc}of _0x16d952['model']['document']['differ']['getChangedMarkers']()){const {group:_0x44b9bb,id:_0x57dc70}=ft(_0x3a8721);let _0x4598b1=_0x4bccfc['newRange'];if('comment'!==_0x44b9bb||!_0x4598b1)continue;const _0x4ae11f='$graveyard'===_0x4598b1['root']['rootName'];_0x4ae11f||(_0x4598b1=ht(_0x4598b1,_0x16d952['model']),!_0x4598b1||_0x4598b1['isCollapsed']||!_0x4bccfc['newRange']||_0x4598b1['isEqual'](_0x4bccfc['newRange']))?_0x16d952['model']['hasContent'](_0x4598b1)&&!_0x4ae11f?this['isThreadsLoadingPaused']?_0x113015['add'](_0x3a8721):this['_handleThreadMarker'](_0x3a8721,_0x57dc70):(_0xf80af5['add'](_0x3a8721),_0x113015['delete'](_0x3a8721),_0x1110ce['removeMarker'](_0x3a8721),_0x44391b=!0x0):(_0x1110ce['updateMarker'](_0x3a8721,{'range':_0x4598b1}),_0x44391b=!0x0);}return _0x44391b;}),this['on']('change:isThreadsLoadingPaused',(_0xe3a3b,_0x5af6ba,_0x271cc5)=>{if(!_0x271cc5&&_0x113015['size'])for(const _0xa1dba6 of _0x113015){const {id:_0x4c6822}=ft(_0xa1dba6);_0x113015['delete'](_0xa1dba6),_0x16d952['model']['markers']['get'](_0xa1dba6)&&this['_handleThreadMarker'](_0xa1dba6,_0x4c6822);}}),this['listenTo'](_0x16d952['model']['document'],'change',()=>{for(const {name:_0x200fa3,data:{newRange:_0x49617b}}of _0x16d952['model']['document']['differ']['getChangedMarkers']()){const {group:_0x76a63d,id:_0x41731f}=ft(_0x200fa3);if('comment'!==_0x76a63d)continue;const _0x22cf84=_0xe28798['getCommentThread'](_0x41731f),_0xed5619=this['hasMarkerForId'](_0x41731f);_0x22cf84&&(!_0x22cf84['_hasTargetInContent']&&_0x49617b&&_0x16d952['editing']['view']['once']('render',()=>{const _0xee0349=_0x16d952['plugins']['get'](y),_0x4fba27=_0xe28798['_threadToController']['get'](_0x22cf84)['view'];_0xee0349['getByInnerView'](_0x4fba27)['refreshVisibility']();},{'priority':'low'}),_0x22cf84['_hasTargetInContent']=_0xed5619||!!_0x49617b),_0x49617b||(_0xf80af5['add'](_0x200fa3),_0x113015['delete'](_0x200fa3));}for(const _0x376bd6 of _0xf80af5){const {id:_0x3e5db5}=ft(_0x376bd6),_0x167f22=_0xe28798['getCommentThread'](_0x3e5db5);if(_0x113015['delete'](_0x376bd6),!_0x167f22)continue;const _0x2f1ea7=this['hasMarkerForId'](_0x3e5db5);_0x2f1ea7||_0x167f22['isSubmitted']?_0x2f1ea7||_0x167f22['unlinkedAt']||_0x167f22['setUnlinkedAt'](new Date()):_0x167f22['remove']();}_0xf80af5['clear']();});}['_handleInitialThreads'](_0x34bdef){_0x34bdef['forEach'](_0x1a8778=>{_0x1a8778['unlinkedAt']&&this['_attachArchivedThread'](_0x1a8778['id']);});}['_getTargetForId'](_0x3f6961){const _0x3937f0=this['editor'],_0x4a8fc7=this['getAllMarkersForId'](_0x3f6961);return et(_0x3937f0['editing'],_0x4a8fc7);}['_getTextContext'](_0x5af931){const _0x5c3d55=this['getAllMarkersForId'](_0x5af931);let _0x11d118='',_0x5c9ab4=!0x1;for(const _0x11d989 of _0x5c3d55){const _0x267a6f=_0x11d989['getRange']();for(const _0x532e07 of Array['from'](_0x267a6f['getItems']()))_0x532e07['is']('$textProxy')?(_0x11d118&&_0x5c9ab4&&(_0x11d118+='\x20',_0x5c9ab4=!0x1),_0x11d118+=_0x532e07['data']):_0x5c9ab4=!0x0;_0x5c9ab4=!0x0;}return _0x11d118['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5a5401,_0x1af0df){const _0x41f652=this['editor'],_0xb506c8=_0x41f652['plugins']['get'](o);let _0x552574=_0xb506c8['getCommentThread'](_0x1af0df);const _0x3e8801=_0x41f652['config']['get']('collaboration.channelId'),_0x1a1f44=_0x41f652['plugins']['get'](b);if(_0x552574&&(_0x552574['unlinkedAt']&&_0x552574['setUnlinkedAt'](null),_0x552574['isAttached']))return _0x552574;return!this['getAllMarkersForId'](_0x1af0df)[0x0]['managedUsingOperations']?_0x41f652['editing']['view']['once']('render',()=>{if(_0xb506c8['getCommentThread'](_0x1af0df))return;const _0x10c3fa=_0x41f652['plugins']['get'](y);_0x552574=_0xb506c8['openNewCommentThread']({'channelId':_0x3e8801,'threadId':_0x1af0df,'target':()=>this['_getTargetForId'](_0x1af0df),'context':{'type':'text','value':this['_getTextContext'](_0x1af0df)}});const _0x3ad590=_0xb506c8['_threadToController']['get'](_0x552574)['view'],_0x58de46=_0x10c3fa['getByInnerView'](_0x3ad590);_0x58de46&&_0x1a1f44['registerAnnotation'](_0x58de46);},{'priority':'low'}):_0xb506c8['fetchCommentThread']({'channelId':_0x3e8801,'threadId':_0x1af0df})['then'](_0x37f1a2=>{if('destroyed'!==_0x41f652['state']){if(_0x552574=_0x37f1a2,_0x552574&&!_0x552574['isAttached']){const _0x4e19e7=_0x552574['attachTo'](()=>this['_getTargetForId'](_0x1af0df));_0x1a1f44['registerAnnotation'](_0x4e19e7),_0x552574['isResolved']&&this['_reconvertMarkers'](_0x1af0df);}else{if(!_0x552574){const _0x5db782=this['getAllMarkersForId'](_0x1af0df);_0x41f652['model']['change'](_0xbe25b5=>{for(const _0x28e279 of _0x5db782)_0xbe25b5['removeMarker'](_0x28e279);});}}}}),_0x552574;}['_handleThreadMarker'](_0x3e2ad2,_0x962b7f){const _0x49f9c5=this['_attachMarkerToThread'](_0x3e2ad2,_0x962b7f);_0x49f9c5&&!_0x49f9c5['context']&&_0x49f9c5['setContext']({'type':'text','value':this['_getTextContext'](_0x962b7f)});}['_initAriaMarkerChangeAnnouncements'](){const _0x311976=this['editor'];rt(_0x311976['model'],({left:_0x4dda52,entered:_0x3aa151})=>{for(const _0x8ec359 of _0x4dda52)if(mt(_0x8ec359)){_0x311976['ui']['ariaLiveAnnouncer']['announce'](N(_0x311976['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x10f78f of _0x3aa151)if(mt(_0x10f78f)){_0x311976['ui']['ariaLiveAnnouncer']['announce'](N(_0x311976['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x4c478d)));break;}});}}function dt(_0x2a9c5a,_0x2a17f6){return _0x2a17f6?_0x2a9c5a+':'+_0x2a17f6:_0x2a9c5a;}function ht(_0x4d76fa,_0x7ac424){const _0x382391=_0x7ac424['schema'],_0x4a0a96=_0x7ac424['createRange'](_0x4d76fa['start']);for(const _0x917974 of _0x4d76fa['getWalker']()){const {type:_0x345d4b,item:_0x3f8f9f,nextPosition:_0x4e09c4}=_0x917974;if('text'===_0x345d4b||_0x382391['isObject'](_0x3f8f9f)){const _0x148f2c=_0x7ac424['createPositionBefore'](_0x3f8f9f);_0x4a0a96['isCollapsed']&&(_0x4a0a96['start']=_0x148f2c),_0x4a0a96['end']=_0x4e09c4;}}return _0x4a0a96;}function mt(_0x561bcd){return'comment'===ft(_0x561bcd['name'])['group'];}class s extends _0x2d240e{['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 _0x12c443=this['editor'],_0x3baffb=_0x12c443['plugins']['get'](o),_0x4089bf=_0x12c443['plugins']['get'](r),_0x22a55f=_0x12c443['plugins']['get'](y),_0x4e06b0=_0x12c443['plugins']['get'](b);_0x12c443['ui']['componentFactory']['add']('comment',()=>{const _0x3ea3ea=this['_createUIButton'](_0x6b909b);return _0x3ea3ea['tooltip']=!0x0,_0x3ea3ea;}),_0x12c443['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1d6833)),_0x4e06b0['addSourceCollector'](()=>{const _0x47ef59=[];for(const [_0x3c7bc3,_0x23aa11]of _0x3baffb['_threadToController']){const _0x38e954=_0x4089bf['getAllMarkersForId'](_0x3c7bc3['id']),_0x463322=_0x38e954['map'](_0x23122e=>_0x23122e['getRange']());_0x38e954['length']>0x0&&_0x47ef59['push']([_0x23aa11['view'],_0x463322]);}return _0x47ef59;}),this['listenTo'](_0x22a55f,'change:activeAnnotations',(_0xe040c8,_0x5a031f,_0x4d8e6d)=>{const _0x6aa8dd=Array['from'](_0x4d8e6d)['map'](_0x3e82e0=>_0x3e82e0['innerView'])['find'](_0x1d2f77=>_0x3baffb['_viewToController']['has'](_0x1d2f77));if(!_0x6aa8dd)return void(_0x4089bf['activeMarker']=null);const _0x351f55=_0x3baffb['_viewToController']['get'](_0x6aa8dd)['model']['id'],_0x5c493c='comment:'+_0x351f55;_0x351f55&&_0x4089bf['hasMarkerForId'](_0x351f55)?_0x4089bf['activeMarker']=_0x5c493c:_0x4089bf['activeMarker']&&(_0x4089bf['activeMarker']=null);}),this['listenTo'](_0x3baffb,'removeCommentThread',(_0x2d2f55,{threadId:_0x1514ca,isFromAdapter:_0x440d8b})=>{!_0x440d8b&&_0x12c443['ui']['focusTracker']['isFocused']&&_0x4089bf['hasMarkerForId'](_0x1514ca)&&_0x12c443['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3baffb,'addComment',(_0x12fcc6,{threadId:_0x3c8572,isFromAdapter:_0x34f7f9})=>{if(_0x34f7f9||!_0x4089bf['hasMarkerForId'](_0x3c8572)||!_0x3baffb['hasCommentThread'](_0x3c8572))return;0x1===_0x3baffb['getCommentThread'](_0x3c8572)['length']&&(_0x12c443['editing']['view']['focus'](),_0x12fcc6['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4ec312=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3029b5;for(const _0x402043 in _0x4ec312){const _0x3c09a8=_0x402043,_0x362b11=_0x4ec312[_0x3c09a8];if('commentsLicenseKeyValid'==_0x362b11||'commentsLicenseKeyInvalid'==_0x362b11||'commentsLicenseKeyExpired'==_0x362b11||'commentsLicenseKeyDomainLimit'==_0x362b11||'commentsLicenseKeyNotAllowed'==_0x362b11||'commentsLicenseKeyEvaluationLimit'==_0x362b11||'commentsLicenseKeyUsageLimit'==_0x362b11){delete _0x4ec312[_0x3c09a8],_0x3029b5=_0x362b11,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3029b5&&_0x4ec312['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3029b5&&_0x4ec312['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3029b5&&_0x4ec312['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3029b5&&_0x4ec312['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3029b5&&_0x4ec312['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3029b5&&_0x4ec312['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x22bd45){const _0x52a8ac=this['editor'],_0x4c73d6=new _0x22bd45(_0x52a8ac['locale']),_0x5482f5=_0x52a8ac['commands']['get']('addCommentThread');return _0x4c73d6['set']({'label':N(_0x52a8ac['locale'],'Comment'),'icon':_0x59b8c2}),_0x4c73d6['bind']('isEnabled')['to'](_0x5482f5,'isEnabled',_0x5482f5,'hasContent',(_0x2eba85,_0xd1a8b7)=>_0x2eba85&&_0xd1a8b7),this['listenTo'](_0x4c73d6,'execute',()=>{_0x5482f5['execute']();}),_0x4c73d6;}}class i extends _0x2d240e{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x198c0d){super(_0x198c0d),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4c4f4e,_0x1eb1fe,_0x5b6ac0)=>{_0x5b6ac0?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x17724d,_0x154a90]of this['editor']['commands'])_0x154a90['affectsData']&&'addCommentThread'!==_0x17724d&&_0x154a90['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x532b02=this['editor']['editing']['view']['document'];this['listenTo'](_0x532b02,'cut',_0x386ee6=>_0x386ee6['stop'](),{'priority':'highest'}),this['listenTo'](_0x532b02,'clipboardInput',_0x2e8651=>_0x2e8651['stop'](),{'priority':'highest'}),this['listenTo'](_0x532b02,'delete',_0x1a137b=>_0x1a137b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5487e,_0xc8c7e8]of this['editor']['commands'])_0xc8c7e8['affectsData']&&'addCommentThread'!==_0x5487e&&_0xc8c7e8['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x51795f{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x229f9a){super(_0x229f9a),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x145ce1=this['context']['plugins']['get'](y);this['listenTo'](_0x145ce1,'_activateAnnotation',(_0x4af6d2,_0x10d347)=>{for(const _0x130987 of this['activeUIs']){const _0x4b1f95=this['_uis']['get'](_0x130987);(0x0,this['uisData']['get'](_0x130987)['filter'])(_0x10d347)&&_0x4b1f95['setActiveAnnotation'](_0x10d347);}}),this['listenTo'](_0x145ce1,'_deactivateAllAnnotations',()=>{for(const _0x4bf2f4 of this['activeUIs']){this['_uis']['get'](_0x4bf2f4)['setActiveAnnotation'](null);}}),this['listenTo'](_0x145ce1['_visibleAnnotations'],'add',(_0x56bb17,_0x420dbd)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x420dbd);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x1d9606){return this['activeUIs']['has'](_0x1d9606);}['activate'](_0x4ac2f2,_0x16d23a=this['defaultFilter']){const _0x4b5011=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x4ac2f2))throw new _0x498a52('annotationsuis-missing-ui',this,{'uiName':_0x4ac2f2});this['isActive'](_0x4ac2f2)&&this['deactivate'](_0x4ac2f2),this['activeUIs']['add'](_0x4ac2f2);const _0x539e34=new S();v({'source':_0x4b5011['_visibleAnnotations'],'target':_0x539e34,'filter':_0x16d23a}),this['uisData']['set'](_0x4ac2f2,{'collection':_0x539e34,'filter':_0x16d23a});const _0x5d8b59=this['_uis']['get'](_0x4ac2f2);_0x5d8b59['attach'](_0x539e34),this['listenTo'](_0x5d8b59,'change:activeAnnotation',(_0x5c32e1,_0x119324,_0x38eafc,_0x47994e)=>{_0x47994e&&_0x4b5011['_removeActiveAnnotation'](_0x47994e),_0x38eafc&&_0x4b5011['_addActiveAnnotation'](_0x38eafc);});}['deactivate'](_0x1d03eb){if(this['activeUIs']['delete'](_0x1d03eb),!this['_uis']['has'](_0x1d03eb))throw new _0x498a52('annotationsuis-missing-ui',this,{'uiName':_0x1d03eb});const _0x34428f=this['_uis']['get'](_0x1d03eb);_0x34428f['detach'](),this['stopListening'](_0x34428f),this['uisData']['get'](_0x1d03eb)['collection']['destroy'](),this['uisData']['delete'](_0x1d03eb);}['switchTo'](_0x4e9312){if(!this['_uis']['has'](_0x4e9312))throw new _0x498a52('annotationsuis-missing-ui',this,{'uiName':_0x4e9312});const _0x2695a9=this['context']['plugins']['get'](y),_0x3e9158=Array['from'](_0x2695a9['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4e9312);const _0x4b45b6=this['_uis']['get'](_0x4e9312);_0x4b45b6['setActiveAnnotation'](_0x3e9158),_0x4b45b6['_setSelectedAnnotations']&&_0x3e9158&&_0x4b45b6['_setSelectedAnnotations']([_0x3e9158]);}['deactivateAll'](){for(const _0x54082f of this['activeUIs'])this['deactivate'](_0x54082f);}['register'](_0x94b329,_0x4b370c){if(this['_uis']['has'](_0x94b329))throw new _0x498a52('annotationsuis-register-already-registered');if('function'!=typeof _0x4b370c['attach']||'function'!=typeof _0x4b370c['detach']||'function'!=typeof _0x4b370c['setActiveAnnotation'])throw new _0x498a52('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x94b329,_0x4b370c);}['refilterAnnotations'](){const _0x1412c2=this['context']['plugins']['get'](y)['collection'],_0x149f22=new Map(),_0x59141e=Array['from'](this['activeUIs']);for(const _0x4ac1cd of this['activeUIs']){const _0x146a03=this['uisData']['get'](_0x4ac1cd)['collection'];for(const _0x15206a of _0x146a03)_0x149f22['set'](_0x15206a,_0x4ac1cd);}for(const _0x1ce850 of _0x1412c2){const _0x52ff19=_0x149f22['get'](_0x1ce850);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1ce850);const _0x2d1501=_0x59141e['find'](_0x5339bf=>this['uisData']['get'](_0x5339bf)['filter'](_0x1ce850));_0x52ff19!==_0x2d1501&&(_0x52ff19&&this['uisData']['get'](_0x52ff19)['collection']['remove'](_0x1ce850),_0x2d1501&&this['uisData']['get'](_0x2d1501)['collection']['add'](_0x1ce850));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x883a21){const _0x2cd09a=[];for(const _0x3e5b77 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3e5b77)['filter'])(_0x883a21)&&_0x2cd09a['push'](_0x3e5b77);}if(_0x2cd09a['length']>0x1)throw new _0x498a52('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2cd09a,'annotationType':_0x883a21['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(_0x157e82){super(_0x157e82),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x3997e3,_0x28cabf)=>_0x3997e3+_0x28cabf),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x328b70=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x328b70['to']('isAnimationDisabled',_0x7494a6=>_0x7494a6?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x328b70['to']('top',_0x430a4d=>Ot(_0x430a4d))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x178d99=this['element']['clientHeight'];_0x178d99&&(this['height']=_0x178d99);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x51795f{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43f1bf){super(_0x43f1bf),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 _0x812b5f=this['context']['config']['get']('sidebar.container');_0x812b5f&&this['setContainer'](_0x812b5f);}['setContainer'](_0x468886){if(!g(_0x468886))throw new _0x498a52('sidebar-setcontainer-invalid-element');this['container']=_0x468886;}['_attachToContainer']({viewClass:_0x28200a='',spaceBetweenItems:_0x1b7fc3=0x19}={}){if(!g(this['container']))throw new _0x498a52('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x28200a,this['_spaceBetweenItems']=_0x1b7fc3;}['rearrange']({removedAnnotation:_0x35ca2f,previousAnnotation:_0xbaf777,nextAnnotation:_0x33c4e6}){const _0x3d8dbd=this['getSidebarItemView'](_0x35ca2f);this['view']['list']['remove'](_0x3d8dbd),this['_destroySidebarItemView'](_0x35ca2f),_0xbaf777&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xbaf777)),_0x33c4e6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x33c4e6)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3da057,activatedAnnotation:_0x5cc821,disableAnimationOnActivatedAnnotation:_0x354d06}){if(this['_activeAnnotation']=_0x5cc821,_0x3da057){_0x3da057['isActive']=!0x1;const _0x1e2864=this['getSidebarItemView'](_0x3da057);_0x1e2864&&_0x354d06&&(_0x1e2864['isAnimationDisabled']=!0x1);}if(_0x5cc821){const _0x58f852=this['getSidebarItemView'](_0x5cc821);_0x58f852&&(_0x5cc821['isActive']=!0x0,_0x354d06&&(_0x58f852['isAnimationDisabled']=!0x0,_0x58f852['top']+=0x1),this['_alignToTargetRect'](_0x58f852));}}['_detachFromContainer'](_0x11c591){if(this['view']['element']['remove'](),_0x11c591){for(const _0x41b534 of _0x11c591)this['_destroySidebarItemView'](_0x41b534);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x589194,_0x4e3a6d){_0x4e3a6d||(_0x4e3a6d=_0x589194['view']);const _0x587b79=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x587b79,_0x589194),this['_annotationToSidebarItemView']['set'](_0x589194,_0x587b79),_0x587b79['content']['add'](_0x4e3a6d),this['listenTo'](_0x589194['view'],'change:targetRect',(_0x12b4c4,_0x4dacaf,_0x55a3e3)=>{const _0x371c51=this['_getTargetTop'](_0x589194,_0x55a3e3);_0x587b79['_targetTop']!=_0x371c51&&(_0x587b79['_targetTop']=_0x371c51,this['_setItemTop'](_0x587b79,_0x371c51));}),this['listenTo'](_0x587b79,'change:top',()=>{this['_recalculate'](_0x587b79,'top');}),this['listenTo'](_0x587b79,'change:bottom',()=>{this['_recalculate'](_0x587b79,'bottom');}),this['_alignToTargetRect'](_0x587b79);const _0x3b6836=this['_getItemBefore'](_0x587b79);if(_0x3b6836)this['_alignAfterItem'](_0x3b6836,_0x587b79)||this['_alignToTargetRect'](_0x587b79);else this['_alignToTargetRect'](_0x587b79);return this['_updateLastItem'](),this['view']['list']['add'](_0x587b79),_0x587b79;}['_alignForTopChange'](_0x462671){if(!_0x462671['content']['length'])return;const _0x20f419=this['_getItemBefore'](_0x462671);if(!_0x20f419)return;const _0x276799=this['_sidebarItemViewToAnnotation']['get'](_0x20f419),_0x4c3b61=this['_activeAnnotation'];_0x4c3b61&&_0x4c3b61===_0x276799?this['_alignAfterItem'](_0x20f419,_0x462671):this['_alignBeforeItem'](_0x462671,_0x20f419);}['_alignForBottomChange'](_0x3b3e78){if(!_0x3b3e78['content']['length'])return;const _0x128523=this['_getItemAfter'](_0x3b3e78);if(!_0x128523)return;const _0x5228f4=this['_sidebarItemViewToAnnotation']['get'](_0x128523),_0x506108=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1f654e=this['_activeAnnotation'];_0x1f654e&&_0x1f654e===_0x5228f4&&_0x506108?(this['_alignBeforeItem'](_0x128523,_0x3b3e78),this['_alignAfterItem'](_0x3b3e78,_0x128523)):_0x1f654e&&_0x1f654e===_0x5228f4?this['_alignBeforeItem'](_0x128523,_0x3b3e78):this['_alignAfterItem'](_0x3b3e78,_0x128523);}['_recalculate'](_0xaa5bef,_0x15ed59){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4e5662,changedProp:_0x32da35}of this['_recalculateBuffer'])'top'===_0x32da35?this['_alignForTopChange'](_0x4e5662):this['_alignForBottomChange'](_0x4e5662);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xaa5bef,'changedProp':_0x15ed59});}['getSidebarItemView'](_0x34f41a){return this['_annotationToSidebarItemView']['get'](_0x34f41a);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3fde7a){const _0x436f52=this['getSidebarItemView'](_0x3fde7a);this['stopListening'](_0x436f52),this['stopListening'](_0x3fde7a['view']),_0x436f52['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3fde7a),this['_sidebarItemViewToAnnotation']['delete'](_0x436f52);}['_createSidebarView'](){const _0x2c179f=new H(this['context']['locale']);return _0x2c179f['render'](),this['on']('change:_lastItem',(_0xfbf2bf,_0x42cf38,_0x5e560f,_0x4f5d0e)=>{_0x4f5d0e&&_0x2c179f['unbind']('minHeight'),_0x5e560f?_0x2c179f['bind']('minHeight')['to'](_0x5e560f,'bottom'):_0x2c179f['minHeight']=null;}),_0x2c179f;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2fc455){const _0x58e26a=this['_sidebarItemViewToAnnotation']['get'](_0x2fc455),_0x9dfae=_0x58e26a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x58e26a)-0x1);return _0x9dfae&&this['getSidebarItemView'](_0x9dfae)||null;}['_getItemAfter'](_0x5ea53a){const _0x144ae6=this['_sidebarItemViewToAnnotation']['get'](_0x5ea53a),_0x412a0b=_0x144ae6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x144ae6)+0x1);return _0x412a0b&&this['getSidebarItemView'](_0x412a0b)||null;}['_alignBeforeItem'](_0x406d0a,_0x4d7738){_0x406d0a['updateHeight']();const _0x47d924=G(_0x4d7738['bottom']+this['_spaceBetweenItems'],_0x406d0a['top']);return!!_0x47d924&&(this['_setItemTop'](_0x4d7738,_0x4d7738['top']-_0x47d924),!0x0);}['_alignAfterItem'](_0x5bd9d2,_0x535b6e){_0x5bd9d2['updateHeight']();const _0x242763=G(_0x5bd9d2['bottom']+this['_spaceBetweenItems'],_0x535b6e['top']);return!!_0x242763&&(this['_setItemTop'](_0x535b6e,_0x535b6e['top']+_0x242763,!0x1),!0x0);}['_alignToTargetRect'](_0x56f440){const _0x5221c0=this['_sidebarItemViewToAnnotation']['get'](_0x56f440);if(!_0x5221c0||!_0x5221c0['target']||!_0x5221c0['targetRect'])return;const _0x525168=this['_getTargetTop'](_0x5221c0,_0x5221c0['targetRect']);this['_setItemTop'](_0x56f440,_0x525168);}['_getTargetTop'](_0x347ba6,_0x4e6e1c){if(null===_0x4e6e1c)return 0x0;if(_0x347ba6['target']instanceof _0x2227f5)return _0x4e6e1c['top'];{const _0x163382=new _0x2227f5(this['view']['element'])['top'];return _0x4e6e1c['top']-_0x163382;}}['_setItemTop'](_0x287c46,_0x542bf1,_0x55c195=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x55c195&&(_0x542bf1=Math['max'](_0x542bf1,this['_getMaxAvailableTop'](_0x287c46))),_0x287c46['top']=_0x542bf1;}['_getMaxAvailableTop'](_0x394c7d){let _0x106368=this['_getItemBefore'](_0x394c7d),_0x2b42db=0x0;for(;_0x106368;)_0x106368['updateHeight'](),_0x2b42db+=this['_spaceBetweenItems']+_0x106368['height'],_0x106368=this['_getItemBefore'](_0x106368);return _0x2b42db;}}function G(_0x41d5c8,_0x35dc6e){return Math['max'](_0x41d5c8-_0x35dc6e,0x0);}function g(_0x1870d4){return null!==_0x1870d4&&'object'==typeof _0x1870d4&&0x1===_0x1870d4['nodeType'];}class e extends _0x51795f{['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(_0x36ad14){super(_0x36ad14),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1b1267(),this['_refreshPositioningDebounced']=_0x4916fd(()=>{_0x36ad14['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5b79f2=this['context']['plugins']['get'](j),_0x44ff50=this['context']['plugins']['get'](z);_0x5b79f2['register']('wideSidebar',this),_0x44ff50['container']&&_0x5b79f2['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x578f92){if(_0x578f92===this['activeAnnotation'])return;const _0xbf911=this['context']['plugins']['get'](z);_0xbf911['_activeAnnotation']=_0x578f92;const _0x198b2a=this['activeAnnotation'];_0xbf911['refresh']({'blurredAnnotation':_0x198b2a,'activatedAnnotation':_0x578f92}),this['activeAnnotation']=_0x578f92;}['attach'](_0x285d6d){this['annotations']=_0x285d6d;const _0x30f82e=this['context']['plugins']['get'](z);if(_0x30f82e['_annotations']=_0x285d6d,this['isAttached'])throw new _0x498a52('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x30f82e,'set:container',()=>{this['detach'](),this['listenTo'](_0x30f82e,'change:container',_0xeaccb=>{_0xeaccb['off'](),this['attach'](_0x285d6d);});}),_0x30f82e['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5283ad=_0x3d6307=>{_0x3d6307['updateTargetRect'](),_0x30f82e['addAnnotation'](_0x3d6307);};for(const _0x6d7fe1 of _0x285d6d)_0x5283ad(_0x6d7fe1);this['listenTo'](_0x285d6d,'add',(_0x4dc3c6,_0x188b0d)=>{_0x5283ad(_0x188b0d);}),this['listenTo'](_0x285d6d,'remove',(_0x2ee125,_0x137782,_0x3308bf)=>{_0x30f82e['rearrange']({'removedAnnotation':_0x137782,'previousAnnotation':_0x285d6d['get'](_0x3308bf-0x1),'nextAnnotation':_0x285d6d['get'](_0x3308bf+0x1)}),_0x137782===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x285d6d,'focus',(_0x2c18b4,_0x2bc0c2)=>{this['setActiveAnnotation'](_0x2bc0c2);}),this['listenTo'](_0x285d6d,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3f5ec8=this['context']instanceof _0x5ed2a5?this['context']['editors']:new _0x1b1267([this['context']]);for(const _0x225602 of _0x3f5ec8)this['_integrateWithEditorAnnotations'](_0x225602);this['listenTo'](_0x3f5ec8,'add',(_0x3d985f,_0x3026bc)=>{this['listenTo'](_0x3026bc,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3026bc);});}),this['listenTo'](_0x3f5ec8,'remove',(_0x17a439,_0x3d6f95)=>{_0x3d6f95['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3d6f95['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x498a52('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4625ba=this['context']['plugins']['get'](z);_0x4625ba['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4625ba),this['stopListening'](this['annotations']),this['context']instanceof _0x5ed2a5&&this['stopListening'](this['context']['editors']);for(const _0x28a27a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x28a27a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1f3768){if(!_0x1f3768['plugins']['has']('EditorAnnotations'))return;const _0x4d8779=_0x1f3768['plugins']['get']('EditorAnnotations'),_0x2512e1=()=>{const _0x2e8643=_0x4d8779['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2e8643[0x0]||null);};this['listenTo'](_0x4d8779,'refresh',_0x2512e1),this['listenTo'](_0x4d8779,'blur',(_0x1cf526,{isAnnotationTracked:_0x3cddb4})=>{this['activeAnnotation']&&_0x3cddb4(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4d8779,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4b1be3=>{_0x4d8779['hasDomSelection']()&&(_0x2512e1(),_0x4b1be3['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4d8779);}['_destroyEditorAnnotationsIntegration'](_0x18b21d){this['stopListening'](_0x18b21d),this['_editorAnnotations']['remove'](_0x18b21d);}}class C extends _0x6b909b{['counterView'];constructor(_0x35841d){super(_0x35841d);const _0x552e4f=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3951eb,_0x1c8818)=>_0x3951eb?'...':_0x1c8818['toString']()),this['set']('annotationType',''),this['icon']=_0x59b8c2,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x552e4f['to']('annotationType',_0x3dcc36=>'ck-annotation-counter__badge--'+_0x3dcc36),_0x552e4f['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x552e4f['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x51795f{['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(_0x548579){super(_0x548579),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x128deb())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1b1267(),this['_refreshPositioningDebounced']=_0x4916fd(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3adbc2(this['context']['locale']),this['balloonPanelView']=new _0x59086b(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xe3f238){this['annotations']=_0xe3f238;const _0xa74ae2=this['context']['plugins']['get'](z),_0x202c46=this['balloonPanelView'];if(_0xa74ae2['_annotations']=_0xe3f238,this['isAttached'])throw new _0x498a52('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xa74ae2,'set:container',()=>{this['detach'](),this['listenTo'](_0xa74ae2,'change:container',_0x424700=>{_0x424700['off'](),this['attach'](_0xe3f238);});}),_0xa74ae2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2c3979=_0x2fada6=>{const _0x2d57b4=new C(this['context']['locale']);_0xa74ae2['addAnnotation'](_0x2fada6,_0x2d57b4),this['_annotationToNarrowView']['set'](_0x2fada6,_0x2d57b4),_0x2d57b4['bind']('isDirty','annotationType','number')['to'](_0x2fada6['view'],'isDirty','type','length'),_0x2d57b4['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x202c46['content']['first']!==_0x2fada6['view']?(this['_showBalloon'](_0x2fada6),_0x2fada6['view']['element']['focus'](),this['setActiveAnnotation'](_0x2fada6)):this['setActiveAnnotation'](null);});};for(const _0x4dd4fc of _0xe3f238)_0x2c3979(_0x4dd4fc);this['listenTo'](_0xe3f238,'add',(_0x5caf5a,_0x337eed)=>{_0x2c3979(_0x337eed);}),this['listenTo'](_0xe3f238,'remove',(_0x31ef14,_0x2b696d,_0x31c746)=>{this['_annotationToNarrowView']['get'](_0x2b696d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2b696d),_0xa74ae2['rearrange']({'removedAnnotation':_0x2b696d,'previousAnnotation':_0xe3f238['get'](_0x31c746-0x1),'nextAnnotation':_0xe3f238['get'](_0x31c746+0x1)}),_0x2b696d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xe3f238,'focus',(_0x13033a,_0x3ff4a)=>{this['setActiveAnnotation'](_0x3ff4a);}),this['listenTo'](_0xe3f238,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3e13cb,_0x2049de)=>{_0x2049de['keyCode']===_0x54f57c['esc']&&_0x202c46['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x202c46['content']['first']),this['_hideBalloon'](),_0x2049de['stopPropagation'](),_0x2049de['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3c771d,_0x35a585)=>{const _0x204089=_0x35a585['target'];_0x202c46['isVisible']&&_0x202c46['element']['contains'](_0x204089)||_0xa74ae2['view']['element']['contains'](_0x204089)||_0x3c771d['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4665ef=>_0x4665ef['contains'](_0x204089))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3bf53c=this['context']instanceof _0x5ed2a5?this['context']['editors']:new _0x1b1267([this['context']]);for(const _0x5a7cef of _0x3bf53c)this['_integrateWithEditorAnnotations'](_0x5a7cef);this['listenTo'](_0x3bf53c,'add',(_0x4afbee,_0x472958)=>{this['listenTo'](_0x472958,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x472958);});}),this['listenTo'](_0x3bf53c,'remove',(_0x157bfd,_0xfc9acf)=>{_0xfc9acf['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xfc9acf['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2cf891){if(_0x2cf891===this['activeAnnotation'])return;const _0x31a5b7=this['context']['plugins']['get'](z);if(_0x31a5b7['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2cf891,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2cf891)_0x31a5b7['getSidebarItemView'](_0x2cf891)?this['_showBalloon'](_0x2cf891):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2cf891;}['detach'](){if(!this['isAttached'])throw new _0x498a52('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3a29a6=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x118b89=>_0x118b89['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3a29a6['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5ed2a5&&this['stopListening'](this['context']['editors']);for(const _0x5199f1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5199f1);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'](_0x2bcd84){if(!_0x2bcd84['plugins']['has']('EditorAnnotations'))return;const _0x3240de=_0x2bcd84['plugins']['get']('EditorAnnotations'),_0x4c7e41=this['context']['plugins']['get'](z),_0x4303ce=this['annotations'],_0x4e56c2=this['balloonPanelView'],_0x4f0bd1=()=>{const _0x29c87b=_0x3240de['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x29c87b),this['setActiveAnnotation'](_0x29c87b[0x0]||null);};this['listenTo'](_0x3240de,'refresh',_0x4f0bd1),this['listenTo'](_0x3240de,'blur',(_0x45138d,{isAnnotationTracked:_0x875334})=>{this['activeAnnotation']&&_0x875334(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3240de,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4303ce,'blur',_0x2b9d29=>{_0x3240de['hasDomSelection']()&&_0x2b9d29['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x50b78f,_0x230328)=>{const _0x11dd71=_0x230328['target'];_0x4e56c2['isVisible']&&_0x4e56c2['element']['contains'](_0x11dd71)||_0x4c7e41['view']['element']['contains'](_0x11dd71)||this['activeAnnotation']&&_0x3240de['hasDomSelection']()&&(_0x4f0bd1(),_0x50b78f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3240de);}['_destroyEditorAnnotationsIntegration'](_0x2cd28a){_0x2cd28a&&(this['stopListening'](_0x2cd28a),this['_editorAnnotations']['remove'](_0x2cd28a));}['_setSelectedAnnotations'](_0x5853d1){for(const _0x4b0e08 of this['_selectedAnnotations'])_0x5853d1['includes'](_0x4b0e08)||this['_manuallyClosedAnnotationViews']['delete'](_0x4b0e08['view']);this['_selectedAnnotations']=_0x5853d1;}['_refreshPositioning'](){const _0x162b38=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x162b38['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x213f71){if(this['_manuallyClosedAnnotationViews']['has'](_0x213f71['view']))return;const _0x316fc2=this['balloonPanelView']['content']['first'];_0x316fc2!==_0x213f71['view']?(_0x316fc2&&this['_detachListeners'](_0x316fc2),this['_attachListeners'](_0x213f71['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x213f71['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4c1073=this['balloonPanelView']['content']['first'],_0x1ca663=_0x4c1073&&this['annotations']['getByView'](_0x4c1073);if(!_0x1ca663||!this['_annotationToNarrowView']['has'](_0x1ca663))return;const _0x5dbba7=this['_annotationToNarrowView']['get'](_0x1ca663)['element'],_0xd3086e=(function(){const _0x16920b=_0x59086b['defaultPositions'];return[_0x16920b['southArrowNorthEast'],_0x16920b['northArrowSouthEast'],_0x16920b['southArrowNorth'],_0x16920b['northArrowSouth'],_0x16920b['southArrowNorthWest'],_0x16920b['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5dbba7,'positions':_0xd3086e});}['_hideBalloon'](){const _0x43e3e9=this['balloonPanelView'],_0x4584c7=_0x43e3e9['content']['first'];_0x4584c7&&(this['_detachListeners'](_0x4584c7),_0x43e3e9['unpin'](),_0x43e3e9['content']['clear']());}['_attachListeners'](_0x1dda64){this['listenTo'](_0x1dda64,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1dda64,'Esc',(_0x568282,_0x5ea3af)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1dda64),this['_hideBalloon'](),_0x5ea3af();});}['_detachListeners'](_0x57ee3a){this['stopListening'](_0x57ee3a);}}class c extends _0x2d240e{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x2d4f82,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f5441){super(_0x4f5441),_0x4f5441['editing']['view']['addObserver'](_0x3b6d41),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4f5441['plugins']['get'](_0x2d4f82),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x4916fd(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x5edf2f=this['editor']['plugins']['get'](j);_0x5edf2f['context']===this['editor']&&(_0x5edf2f['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3a8c20,_0x356896)=>{const _0x53ae03=this['_balloon'];if(this['isAttached']&&_0x53ae03['visibleView']){const _0x27a6d9=this['annotations']['getByView'](_0x53ae03['visibleView']);_0x27a6d9&&this['_closeAnnotation'](_0x27a6d9),_0x356896();}}));}['afterInit'](){const _0x1fd965=this['editor']['plugins']['get'](j);_0x1fd965['context']===this['editor']&&(_0x1fd965['hasActive']()||_0x1fd965['switchTo']('inline'));}['setActiveAnnotation'](_0x3f0371){_0x3f0371!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3f0371&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3f0371)&&this['_addAnnotationToBalloon'](_0x3f0371,!0x0),_0x3f0371['isActive']=!0x0),_0x3f0371||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3f0371);}['attach'](_0x17042c){this['annotations']=_0x17042c;const _0x5f2d68=this['editor']['plugins']['get'](j),_0x2c6aa2=this['_balloon'];if(this['isAttached'])throw new _0x498a52('inlineannotations-attach-already-attached',this);if(_0x5f2d68['context']!==this['editor'])throw new _0x498a52('inlineannotations-not-allowed-with-context',this);const _0x425d02=this['editor']['plugins']['get'](b);this['listenTo'](_0x425d02,'refresh',()=>{const _0x1868d9=_0x425d02['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1c7e32,_0x4e3a86;!this['_forceRefresh']&&(_0x1c7e32=_0x1868d9,_0x4e3a86=this['_selectedAnnotations'],_0x1c7e32['length']===_0x4e3a86['length']&&_0x1c7e32['every'](_0x1481ae=>_0x4e3a86['includes'](_0x1481ae)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1868d9),this['setActiveAnnotation'](_0x1868d9[0x0]||null));}),this['listenTo'](_0x425d02,'blur',(_0x211e93,{isAnnotationTracked:_0x27d616})=>{this['activeAnnotation']&&_0x27d616(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x425d02,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1e1cc0,_0x123aa7,_0x3bc4ad)=>{_0x3bc4ad||this['setActiveAnnotation'](null);}),this['listenTo'](_0x17042c,'remove',(_0x4003ab,_0x132638)=>{this['_removeAnnotationFromBalloon'](_0x132638),_0x132638===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2c6aa2,'change:visibleView',(_0x195b12,_0x2c58a2,_0xa5860e,_0x5522f5)=>{_0x5522f5&&this['stopListening'](_0x5522f5);const _0x11d605=_0x17042c['getByView'](_0xa5860e);_0xa5860e&&_0x11d605&&(this['listenTo'](_0xa5860e,'change:height',()=>{_0x2c6aa2['updatePosition']();}),this['listenTo'](_0xa5860e,'Esc',()=>{this['_closeAnnotation'](_0x11d605),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x11d605&&this['setActiveAnnotation'](_0x11d605));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x2c6aa2['visibleView']&&(_0x17042c['getByView'](_0x2c6aa2['visibleView'])&&_0x2c6aa2['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 _0x498a52('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x101ee8 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x101ee8);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x398ed5){for(const _0x2a374e of this['_selectedAnnotations'])_0x398ed5['includes'](_0x2a374e)||this['_manuallyClosed']['delete'](_0x2a374e);for(const _0x1761f8 of this['annotations'])_0x398ed5['includes'](_0x1761f8)||this['_removeAnnotationFromBalloon'](_0x1761f8);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xd12c19 of _0x398ed5)this['_addAnnotationToBalloon'](_0xd12c19);}this['_selectedAnnotations']=_0x398ed5;}['_addAnnotationToBalloon'](_0x398d74,_0x2e6544=!0x1){this['_manuallyClosed']['has'](_0x398d74)||(this['_addedAnnotations']['has'](_0x398d74)||this['_balloon']['hasView'](_0x398d74['view'])||(this['_addedAnnotations']['add'](_0x398d74),this['_balloon']['add']({'stackId':_0x398d74['view']['id'],'view':_0x398d74['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x398d74)}})),_0x2e6544&&this['_balloon']['showStack'](_0x398d74['view']['id']));}['_getBalloonTargetForAnnotation'](_0x234e64){const _0x49f398=_0x234e64['target'],_0x532914=this['editor']['editing']['view'],_0xebad59=_0x532914['document']['selection']['getFirstRange'](),_0x126cb7=_0x532914['domConverter']['viewRangeToDom'](_0xebad59);if(_0x126cb7['collapse'](!0x0),_0x49f398){if(_0x49f398 instanceof _0x2227f5)return _0x49f398;let _0x55aa03=[];for(const _0x6aa118 of _0x49f398)_0x55aa03['push'](...F(_0x6aa118['getClientRects']()));_0x55aa03=function(_0x3bd4eb){const _0x41df22=[];let _0xd3c6fd=_0x3bd4eb[0x0];for(let _0x24ce20=0x1;_0x24ce20<_0x3bd4eb['length'];_0x24ce20++)P(_0xd3c6fd,_0x3bd4eb[_0x24ce20])?_0xd3c6fd['width']+=_0x3bd4eb[_0x24ce20]['width']:(_0x41df22['push'](_0xd3c6fd),_0xd3c6fd=_0x3bd4eb[_0x24ce20]);return _0x41df22['push'](_0xd3c6fd),_0x41df22;}(_0x55aa03);const _0x41770e=_0x126cb7['getBoundingClientRect']();return _0x55aa03['find'](_0x110e91=>_0x110e91['top']<=_0x41770e['top']&&_0x110e91['bottom']>=_0x41770e['bottom']&&_0x110e91['left']<=_0x41770e['left']&&_0x110e91['right']>=_0x41770e['right'])||_0x55aa03[0x0];}return _0x234e64['targetRect']||_0x126cb7;}['_removeAnnotationFromBalloon'](_0x891cba){this['_addedAnnotations']['has'](_0x891cba)&&this['_balloon']['hasView'](_0x891cba['view'])&&(this['_addedAnnotations']['delete'](_0x891cba),this['_balloon']['remove'](_0x891cba['view']));}['_closeAnnotation'](_0x5c1b43){this['_manuallyClosed']['add'](_0x5c1b43),this['_removeAnnotationFromBalloon'](_0x5c1b43);}}function F(_0x3d4954){return Array['from'](_0x3d4954)['map'](DOMRect['fromRect']);}function P(_0x2b69e3,_0x28dc2e){return _0x2b69e3['top']===_0x28dc2e['top']&&_0x2b69e3['bottom']===_0x28dc2e['bottom']&&_0x2b69e3['right']===_0x28dc2e['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x300076,_0x46978d){super(_0x300076),this['set']('isEmpty',!_0x46978d['length']),this['focusTracker']=new _0x144d0f(),this['_annotationViews']=_0x46978d,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x37e2ac({'focusables':_0x46978d,'focusTracker':this['focusTracker']}),this['listenTo'](_0x46978d,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x46978d,'remove',(_0x22a305,_0x298048)=>{_0x298048['isActive']&&this['focus'](),_0x46978d['length']||(this['isEmpty']=!0x0);});const _0x26b937=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x300076,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x46978d},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x26b937['if']('isEmpty','ck-hidden',_0x3cdcae=>!_0x3cdcae)]},'children':[{'text':N(_0x300076,'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 _0x4c8dcb of this['_annotationViews'])this['focusTracker']['add'](_0x4c8dcb['element']);this['_annotationViews']['on']('change',(_0x248475,{added:_0x9314a2,removed:_0x3e4fc9})=>{for(const _0x320e1b of _0x9314a2)this['focusTracker']['add'](_0x320e1b['element']);for(const _0x440325 of _0x3e4fc9)this['focusTracker']['remove'](_0x440325['element']);});}}class p extends _0x51795f{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x195aef){super(_0x195aef),this['archivedThreads']=new _0x1b1267();}['init'](){const _0x146349=this['context'],_0x2690b6=_0x146349['plugins']['get'](o),_0x400477=_0x146349['plugins']['get'](y);this['listenTo'](_0x2690b6,'addCommentThread',(_0x1972bc,{threadId:_0x50f531})=>{const _0x564df8=_0x2690b6['getCommentThread'](_0x50f531);_0x564df8['archivedAt']&&this['archivedThreads']['add'](_0x564df8,this['_calculatePosition'](_0x564df8['archivedAt'])),this['listenTo'](_0x564df8,'change:archivedAt',(_0x54d2cf,_0x3c68d1,_0x2b7dad)=>{_0x2b7dad?this['archivedThreads']['has'](_0x564df8)||this['archivedThreads']['add'](_0x564df8,this['_calculatePosition'](_0x564df8['archivedAt'])):this['archivedThreads']['has'](_0x564df8)&&this['archivedThreads']['remove'](_0x564df8);});}),this['listenTo'](_0x2690b6,'removeCommentThread',(_0x28f4dd,{threadId:_0x4112f8})=>{const _0x40f8e9=_0x2690b6['getCommentThread'](_0x4112f8);this['stopListening'](_0x40f8e9),this['archivedThreads']['has'](_0x40f8e9)&&this['archivedThreads']['remove'](_0x40f8e9);},{'priority':'highest'}),this['listenTo'](_0x400477['collection'],'focus',(_0x588560,_0x12573a)=>{_0x12573a['isVisible']||(_0x12573a['isActive']=!0x0,_0x400477['activate'](_0x12573a));});}['_calculatePosition'](_0x36c760){const _0x32a464=[...this['archivedThreads']]['findIndex'](_0x4fc1af=>_0x4fc1af['archivedAt']<_0x36c760);return _0x32a464>-0x1?_0x32a464:this['archivedThreads']['length'];}}class a extends _0x2d240e{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x4adc55];}constructor(_0x120f17){super(_0x120f17),this['annotationViews']=new _0x437229(),this['_pendingThreads']=[];}['init'](){const _0x359f5a=this['editor'],_0x47630d=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x359f5a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x6b909b,!0x0)),_0x359f5a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5e4a48=this['_createCommentsArchiveButton'](_0x1d6833);return _0x5e4a48['set']({'role':'menuitemcheckbox'}),_0x5e4a48;});const _0x63cced=_0x359f5a['plugins']['get'](p),_0x556e2f=_0x359f5a['plugins']['get']('Annotations'),_0x284c8d=_0x359f5a['plugins']['get']('CommentsRepository');_0x63cced['archivedThreads']['forEach'](_0x4beb6c=>{this['_handleNewThread'](_0x4beb6c);}),this['listenTo'](_0x63cced['archivedThreads'],'add',(_0x298970,_0x5416fa)=>{this['_handleNewThread'](_0x5416fa);}),this['listenTo'](_0x556e2f['collection'],'add',(_0x227f1b,_0x233c83)=>{const _0x1f2cd1=this['_pendingThreads']['find'](_0x2d8eea=>{const _0x1ee089=_0x284c8d['_threadToController']['get'](_0x2d8eea);return _0x1ee089&&_0x233c83['innerView']===_0x1ee089['view'];});if(_0x1f2cd1){const _0x3b7100=this['_calculatePosition'](_0x1f2cd1['archivedAt']);this['_addAnnotationToArchive'](_0x233c83,_0x3b7100),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1f2cd1),0x1);}}),this['listenTo'](_0x63cced['archivedThreads'],'remove',(_0x1460a4,_0x2da440)=>{const _0x1b0bbc=_0x359f5a['config']['get']('collaboration.channelId');if(!_0x1b0bbc||_0x2da440['channelId']===_0x1b0bbc){if(this['_pendingThreads']['includes'](_0x2da440))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2da440),0x1);else{const _0x327b44=_0x284c8d['_threadToController']['get'](_0x2da440),_0x260313=_0x556e2f['getByInnerView'](_0x327b44['view']);this['annotationViews']['remove'](_0x260313['view']),this['stopListening'](_0x260313),this['stopListening'](_0x260313['focusableElements']);}}}),this['listenTo'](_0x556e2f['collection'],'add',(_0x4bddf4,_0x16ed2d)=>{this['listenTo'](_0x16ed2d,'escape',_0x47630d);}),this['listenTo'](_0x556e2f['collection'],'remove',(_0xe6017f,_0x361a12)=>{this['stopListening'](_0x361a12,'escape',_0x47630d);});}['_addAnnotationToArchive'](_0x56cf7b,_0x18ceb2){this['listenTo'](_0x56cf7b,'set:isVisible',_0x3bcbaf=>{_0x3bcbaf['return']=!0x1,_0x3bcbaf['stop']();}),this['annotationViews']['add'](_0x56cf7b['view'],_0x18ceb2);}['_handleNewThread'](_0x591634){const _0x432e55=this['editor']['plugins']['get']('CommentsRepository'),_0x2a24f0=this['editor']['plugins']['get']('Annotations'),_0x245cd3=this['editor']['config']['get']('collaboration.channelId');if(!_0x245cd3||_0x591634['channelId']===_0x245cd3){const _0x4a4c2e=_0x432e55['_threadToController']['get'](_0x591634);if(!_0x4a4c2e)return void this['_pendingThreads']['push'](_0x591634);const _0x2c58a7=this['_calculatePosition'](_0x591634['archivedAt']),_0x5ccaa1=_0x2a24f0['getByInnerView'](_0x4a4c2e['view']);_0x5ccaa1['isVisible']&&_0x2a24f0['_visibleAnnotations']['remove'](_0x5ccaa1),this['_addAnnotationToArchive'](_0x5ccaa1,_0x2c58a7);}}['_calculatePosition'](_0x15e3ba){const _0x7a2fe6=this['editor']['config']['get']('collaboration.channelId'),_0x303a35=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x113dd6=>_0x113dd6['channelId']===_0x7a2fe6)['findIndex'](_0x3daae8=>_0x3daae8['archivedAt']<_0x15e3ba);return _0x303a35<0x0||_0x303a35>this['annotationViews']['length']?this['annotationViews']['length']:_0x303a35-0x1;}['_toggleDialog'](){const _0x3d94fb=this['editor'],_0x4ad477=_0x3d94fb['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x3d94fb['locale'],this['annotationViews'])),'commentsArchive'===_0x4ad477['id']?_0x4ad477['hide']():_0x4ad477['show']({'id':'commentsArchive','title':N(_0x3d94fb['locale'],'COMMENTS_ARCHIVE'),'icon':_0x50c104,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3c4ef8['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x186a4b,_0x44c780=!0x1){const _0x67096a=this['editor']['locale'],_0x1bbdb0=this['editor']['plugins']['get']('Dialog'),_0x142f02=new _0x186a4b(_0x67096a);return _0x142f02['bind']('isEnabled')['to'](this,'isEnabled'),_0x142f02['bind']('isOn')['to'](_0x1bbdb0,'id',_0x4081e5=>'commentsArchive'===_0x4081e5),_0x142f02['set']({'label':N(_0x67096a,'COMMENTS_ARCHIVE'),'icon':_0x50c104,'isToggleable':!0x0}),_0x44c780&&(_0x142f02['tooltip']=!0x0),this['listenTo'](_0x142f02,'execute',()=>this['_toggleDialog']()),_0x142f02;}['_hideDialogOnAnnotationEscape']=_0x9ed9eb=>{const _0x203786=_0x9ed9eb['source'];if(!this['annotationViews']['has'](_0x203786['view']))return;const _0x5b4e91=this['editor']['plugins']['get']('Dialog');_0x5b4e91['isOpen']&&'commentsArchive'===_0x5b4e91['id']&&(_0x5b4e91['hide'](),_0x9ed9eb['stop']());};}class gi extends _0x2d240e{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x3280f7,ContextPlugin as _0x4427fc,PendingActions as lt,Command as _0x387361,Plugin as _0x4aad6f,Context as _0x1819ae}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x36733b,uid as _0x49a746,KeystrokeHandler as jt,FocusTracker as _0x1b869f,diff as _0x1f3a01,Collection as _0x359f6f,Rect as _0x482e1e,CKEditorError as _0x1be892,first as _0x1a989f,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x3bfb52,keyCodes as _0x3d471d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2e6685,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x4d5215,trimHtml as ts,LateFocusDropdownButtonView as _0x5a4470,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x2f354e}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x4d37e2}from'es-toolkit/compat';import{IconUndo as _0x4675ee,IconCheck as _0x2b516d,IconPencil as _0x5bceab,IconRemoveComment as _0x56bdaa,IconThreeVerticalDots as _0x375308,IconAddComment as _0x3065db,IconCommentsArchive as _0x231344}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0xba4b7f,ButtonView as _0x235388,ViewCollection as _0x4b50a2,createDropdown as _0x3ba136,ListView as _0x56a7a9,focusChildOnDropdownOpen as _0x24d5fc,ListItemView as _0x3ef368,MenuBarMenuListItemButtonView as _0xba86ba,BodyCollection as _0x1d7182,BalloonPanelView as _0x1c777c,ContextualBalloon as _0x25f061,Dialog as _0x350d3c,DialogViewPosition as _0x5b66b1}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x4749c3}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x221ef1}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x56c570}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x36733b(){['model'];['view'];constructor(_0x4f03b3,_0x43653e){super(),this['model']=_0x4f03b3,this['model']['_isAttached']=!0x0,this['view']=_0x43653e,this['listenTo'](_0x43653e,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x43653e,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x43653e,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x43653e,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x43653e,'addComment',(_0xb407d1,_0x4fd1cc)=>this['addComment'](_0x4fd1cc)),this['listenTo'](_0x43653e,'updateComment',(_0x3bca02,_0x275acb,_0x20cf40)=>this['updateComment'](_0x275acb,_0x20cf40)),this['listenTo'](_0x43653e,'removeComment',(_0x53b052,_0x284fdb)=>this['removeComment'](_0x284fdb));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x3a8756){this['model']['addComment']({'content':_0x3a8756,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x4dd4f7,_0x1d50a8){this['model']['getComment'](_0x4dd4f7)['update']({'content':_0x1d50a8});}['removeComment'](_0x27f8b3){this['model']['getComment'](_0x27f8b3)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x1be046,_0x260646,_0x24919a){const t=_0x1be046['t'];switch(_0x260646){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'},_0x24919a);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'},_0x24919a);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'},_0x24919a);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'},_0x24919a);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x24919a);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'},_0x24919a);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'},_0x24919a);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'},_0x24919a);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(_0x13a93a,_0x524524){super(_0x13a93a);const _0x28b5a6=_0x49a746();this['main']=this['createCollection'](),this['editable']=new Vt(_0x13a93a,_0x524524,void 0x0,{'label':()=>N(_0x13a93a,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x13a93a['uiLanguageDirection'],'lang':_0x13a93a['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x28b5a6},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x2a720b){super(_0x2a720b),this['view']=new Rt(_0x2a720b['locale'],_0x2a720b['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x2adaa1=this['editor']['editing']['view'],_0x231e2d=this['view']['editable'],_0x4f74ad=_0x2adaa1['document']['getRoot']();_0x231e2d['name']=_0x4f74ad['rootName'],this['view']['render']();const _0xc62c1c=_0x231e2d['element'];this['setEditableElement'](_0x231e2d['name'],_0xc62c1c),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2adaa1['attachDomRoot'](_0xc62c1c),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x36733b(_0x3280f7){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x2784d2={}){function _0x459f38(_0x33817c){return _0x33817c['map'](_0xe4ff71=>String['fromCharCode'](_0xe4ff71))['join']('');}(_0x2784d2=Object['assign']({},_0x2784d2))['plugins']||(_0x2784d2['plugins']=hs['defaultPlugins']),super(_0x2784d2),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x459f38([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x459f38([0x76,0x69,0x65,0x77])][_0x459f38([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x459f38([0x61,0x75,0x74,0x6f]),this[_0x459f38([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x459f38([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x459f38([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x459f38([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x459f38([0x6f,0x6b])});}['create'](){const _0x2932c7=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2932c7))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3f8b0f=>{const _0x2ebc17=this['model']['document']['getRoot'](),_0x5342b4=_0x2ebc17&&_0x2ebc17['getChild'](_0x2ebc17['childCount']-0x1);_0x3f8b0f['setSelection'](_0x5342b4,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x8a54e=this['editing']['view'],_0x28d717=_0x8a54e['document']['getRoot'](),_0x25ef19=_0x28d717['getChild'](0x0);_0x28d717['childCount']>0x1||!_0x25ef19||'p'!=_0x25ef19['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x8a54e,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x25ef19['placeholder']=this['placeholder']),Ft({'view':_0x8a54e,'element':_0x25ef19,'keepOnFocus':!0x0}),this['placeholderElement']=_0x25ef19);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5d6746,_0x58e3b4={}){super(_0x5d6746),this['editor']=null,this['_editorConfig']=_0x58e3b4,this['set']('value',_0x58e3b4['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x5d6746,'Reply...')),this['set']('submitLabel',N(_0x5d6746,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1b869f(),this['focusCycler']=new _0xba4b7f({'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',(_0x30bff7,_0xc77c2a)=>{this['cancelButtonView']['fire']('execute'),_0xc77c2a();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5dd052,_0x2f0271)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x2f0271());}),this['on']('submit',(_0x527f31,_0x1bd500)=>{_0x1bd500['length']>0xfde8?(alert(N(_0x5d6746,'TOO_LONG_COMMENT_ALERT',[_0x1bd500['length'],0xfde8])),_0x527f31['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2bca31=this['editor'];this['element']['insertBefore'](_0x2bca31['ui']['element'],this['element']['firstChild']),_0x2bca31['model']['document']['on']('change',()=>this['value']=_0x2bca31['getData']()),_0x2bca31['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2bca31['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x541423){-0x1===_0x541423?(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:_0x2e4cb4}=this,_0x57daf8=new _0x235388(_0x2e4cb4);return _0x57daf8['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x57daf8['withText']=!0x0,_0x57daf8['bind']('label')['to'](this,'submitLabel'),_0x57daf8['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x57daf8['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x20c53a,_0x505e66)=>!_0x505e66&&!!_0x20c53a['trim']()),_0x57daf8;}['_createCancelButton'](){const {locale:_0x3e5917}=this,_0xdf888c=new _0x235388(_0x3e5917);return _0xdf888c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xdf888c['label']=N(_0x3e5917,'Cancel'),_0xdf888c['withText']=!0x0,_0xdf888c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xdf888c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x43f7ec=>{this['focusTracker']['add'](_0x43f7ec['element']);}),this['focusables']['on']('change',(_0x4cc95f,_0x3bd672)=>{for(const _0xd15b7f of Array['from'](_0x3bd672['added'])['reverse']())this['focusTracker']['add'](_0xd15b7f['element']);});}}class ie extends kt{constructor(_0x4d141e,_0x50364c,_0x500180){super(_0x4d141e),this['commentInputView']=new es(_0x4d141e,_0x500180),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x32de19,_0x17185f)=>_0x32de19||!!_0x17185f),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 _0x2e6685(_0x4d141e,_0x50364c),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'](_0x225444){this['commentInputView']['focus'](_0x225444);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xeaca6f,_0x2ae51f)=>{const {submitButtonView:_0x437c06,cancelButtonView:_0x1f585a,editor:_0x3e9e29}=this['commentInputView'];[_0x437c06['element'],_0x1f585a['element'],_0x3e9e29?_0x3e9e29['editing']['view']['getDomRoot']():null]['filter'](_0x1cf693=>_0x1cf693)['some'](_0x3cbd0b=>_0x3cbd0b['contains'](_0x2ae51f['target']))||(this['focus'](),_0x2ae51f['preventDefault']());});}}class rs extends kt{constructor(_0x39f81c){super(_0x39f81c);const _0x528de9=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x528de9['to']('count',_0x602207=>N(_0x39f81c,'NUMBER_OF_COMMENTS',_0x602207))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5ef660,_0x54990b,_0x4defce){super(_0x5ef660);const _0x394531=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x54990b['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x54990b,this['_config']=_0x4defce,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1b869f(),this['keystrokes']=new jt(),this['focusCycler']=new _0xba4b7f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x64342c=>this['commentViews']['map'](_0x523950=>_0x523950['element'])['includes'](_0x64342c['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5ef660),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x19ec44=>_0x19ec44-this['_config']['maxCommentsWhenCollapsed']);for(const _0x33b514 of _0x54990b['comments'])this['_handleNewCommentModel'](_0x33b514);this['_handleInfoComment'](),this['listenTo'](_0x54990b['comments'],'add',(_0x346a9e,_0x1680c4)=>{const _0x175c55=this['_calculatePosition'](_0x1680c4);this['length']++,this['_handleNewCommentModel'](_0x1680c4,_0x175c55),this['refreshVisibleViews']();}),this['listenTo'](_0x54990b['comments'],'remove',(_0x578065,_0x41b318)=>{this['length']--,this['_handleRemoveCommentModel'](_0x41b318),this['refreshVisibleViews']();}),this['listenTo'](_0x54990b,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x54990b,'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',_0x394531['if']('length','ck-hidden',_0x1a78fd=>!_0x1a78fd)],'aria-label':N(_0x5ef660,'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'](_0x4b8430){-0x1===_0x4b8430?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4d3edf of this['commentViews'])_0x4d3edf['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x168f95,_0x1df325){const _0x244cd8=new this['_config']['CommentView'](this['locale'],_0x168f95,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x244cd8['viewUid']=_0x168f95['id'],_0x244cd8['delegate']('removeComment')['to'](this),_0x244cd8['delegate']('updateComment')['to'](this),_0x244cd8['delegate']('resolveCommentThread')['to'](this),_0x244cd8['delegate']('editorReady')['to'](this),_0x244cd8['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x244cd8,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x244cd8,_0x1df325);}['_calculatePosition'](_0x50398d){const _0xd9841e=this['_model']['_findOptimalIndex'](_0x50398d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x50398d['authoredAt']?_0xd9841e-0x1:_0xd9841e:_0xd9841e-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x967931={'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'],_0x967931,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x967931));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x58fa5e){const _0x316a5e=this['commentViews']['remove'](_0x58fa5e['id']);this['stopListening'](_0x316a5e),_0x316a5e['isEditMode']&&this['_updateHasDirtyComment'](),_0x316a5e['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2e2ae4=>_0x2e2ae4['isEditMode']);}['_rearrangeCollapse'](){const _0x210be4=function(_0x59e835){const _0xfc2bea=new _0x359f6f();for(const _0x1d1170 of _0x59e835)_0xfc2bea['add'](_0x1d1170);return _0xfc2bea;}(this['commentViews']),_0x38a742=this['_collapsedCommentsView']['count'];for(let _0x3de128=0x1;_0x3de128<=_0x38a742;_0x3de128++)_0x210be4['remove'](0x1);for(const _0x709a3c of _0x210be4)_0x709a3c['collapse']();_0x38a742>0x0&&_0x210be4['add'](this['_collapsedCommentsView'],0x1),ns(_0x1f3a01(Array['from'](this['visibleViews']),Array['from'](_0x210be4)),this['visibleViews'],_0x210be4);}['_rearrangeExpand'](){ns(_0x1f3a01(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1d4802 of this['visibleViews'])_0x1d4802['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x3993da=>{this['focusTracker']['add'](_0x3993da['element']),this['keystrokes']['listenTo'](_0x3993da['element']);}),this['commentViews']['on']('change',(_0x3ed401,_0x5f068f)=>{for(const _0x5019d5 of _0x5f068f['removed'])this['focusTracker']['remove'](_0x5019d5['element']),this['keystrokes']['stopListening'](_0x5019d5['element']);for(const _0x280615 of Array['from'](_0x5f068f['added'])['reverse']())this['focusTracker']['add'](_0x280615['element']),this['keystrokes']['listenTo'](_0x280615['element']);});}}function ns(_0x13c87b,_0x1dda31,_0x43f3f0){let _0x40d98c=0x0;for(const _0x22d8f0 of _0x13c87b)switch(_0x22d8f0){case'insert':_0x1dda31['add'](_0x43f3f0['get'](_0x40d98c),_0x40d98c),_0x40d98c++;break;case'delete':_0x1dda31['remove'](_0x40d98c);break;case'equal':_0x40d98c++;}}class oe extends kt{constructor(_0x75ed3a){super(_0x75ed3a);const _0x3346b6=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3346b6['to']('contextValue',_0x18ec1d=>N(_0x75ed3a,'THREAD_CONTEXT_LABEL',_0x18ec1d)),'tabindex':-0x1},'children':[{'text':_0x3346b6['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x96cb6,_0x10e43e){super(_0x96cb6);const _0x1a6e6c=this['bindTemplate'];this['_model']=_0x10e43e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1b869f(),this['keystrokes']=new jt(),this['focusCycler']=new _0xba4b7f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2e71b4=>!!_0x2e71b4),this['bind']('contextValue')['to'](this['_model'],'context',_0x3f6ae0=>_0x3f6ae0&&_0x3f6ae0['value']?this['_trimContextValue'](_0x3f6ae0['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',_0x1a6e6c['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 _0x44e93a=new _0x235388(this['locale']);return _0x44e93a['label']=N(this['locale'],'Reopen'),_0x44e93a['tooltip']=N(this['locale'],'Reopen'),_0x44e93a['icon']=_0x4675ee,_0x44e93a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3e8061=>!_0x3e8061),_0x44e93a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x389bcb,_0x37c398)=>_0x389bcb&&_0x37c398),_0x44e93a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x44e93a;}['_trimContextValue'](_0x163d2a){if(_0x163d2a['length']<0x96)return _0x163d2a;const _0x3a55bb=_0x163d2a['lastIndexOf']('\x20',0x93);return _0x163d2a['substring'](0x0,_0x3a55bb>-0x1?_0x3a55bb:0x93)+'...';}['_attachContextActions'](){const _0x5222da=this['element']['querySelector']('.ck-context'),_0x2a8026=_0x5222da['querySelector']('.ck-context__value');this['listenTo'](_0x5222da,'mouseenter',()=>{_0x2a8026['offsetWidth']<_0x2a8026['scrollWidth']&&_0x5222da['classList']['add']('overlay');}),this['listenTo'](_0x5222da,'mouseleave',()=>{_0x5222da['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5ce4e4 of this['focusables'])this['focusTracker']['add'](_0x5ce4e4['element']),this['keystrokes']['listenTo'](_0x5ce4e4['element']);}['_createContextView'](){const _0x19acc5=new oe(this['locale']);return _0x19acc5['bind']('contextValue')['to'](this),_0x19acc5;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x238426,_0x493bb3,_0xaeb06b,_0x13b0e8){super(_0x238426),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x493bb3,this['_localUser']=_0xaeb06b,this['_config']=_0x13b0e8,this['commentThreadHeaderView']=new Xt(_0x238426,_0x493bb3),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x238426,N(_0x238426,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x238426,_0x493bb3,Object['assign']({'CommentView':this['_config']['CommentView']},_0x13b0e8)),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',(_0x17a5dd,_0x23fb54)=>_0x17a5dd||!!_0x23fb54),this['bind']('isUnlinked')['to'](_0x493bb3,'unlinkedAt',_0x5124a0=>!!_0x5124a0),this['bind']('ariaLabel')['to'](this,'length',_0x3cd0b9=>{const _0x46b3b7=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x3cd0b9,_0x46b3b7]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1b869f(),this['keystrokes']=new jt(),this['focusCycler']=new _0xba4b7f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2ee881=>_0x2ee881['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 _0x44b334=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x57c7c7=_0x44b334['commentInputView'];return _0x44b334['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x57c7c7,'value',(_0x3b5554,_0x136215,_0x45da03,_0x275d84,_0x565c6f)=>!!_0x565c6f||!!_0x275d84&&_0x45da03&&!_0x136215||_0x3b5554&&_0x45da03&&!_0x136215),_0x57c7c7['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1d60d1,_0x127b72,_0xe8a372)=>{let _0xd07fa1;return _0xd07fa1=_0xe8a372&&_0x127b72?'Reply\x20to\x20reopen\x20discussion...':_0x1d60d1?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xd07fa1);}),_0x57c7c7['bind']('submitLabel')['to'](this,'length',_0x2d6bc9=>N(this['locale'],_0x2d6bc9?'Reply':'Comment')),_0x57c7c7['on']('submit',(_0x5a38f5,_0x251cf8)=>{this['fire']('addComment',_0x251cf8),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x57c7c7['on']('cancel',()=>{this['focus']();}),_0x57c7c7['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x57c7c7['on']('cancel',_0x52583b=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x52583b['stop']());}),this['on']('change:isActive',(_0x40ea07,_0x2ec06f,_0x5286f2)=>{_0x5286f2||this['length']||_0x57c7c7['value']||this['fire']('removeCommentThread');}),_0x44b334;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4f00d4,_0x2be28d,_0x58e797,_0x30d207){super(_0x4f00d4,_0x2be28d,_0x58e797,_0x30d207),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4f00d4,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x73f79d,_0x21e079,_0xa145f2)=>{_0xa145f2||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xe0d64e,_0x228dee,_0x4bed80)=>{_0x4bed80&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x50aca1=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x50aca1['if']('isActive','ck-thread--active'),_0x50aca1['if']('isUnlinked','ck-thread--unlinked'),_0x50aca1['to']('actionIndicator',_0x1a6037=>_0x1a6037?'ck-thread--'+_0x1a6037:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x50aca1['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 _0x52f37d of this['commentsListView']['commentViews'])_0x52f37d['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1fd14e}=this,_0x56abbc=this['commentsListView']['commentViews']['get'](0x0);_0x56abbc===this['_boundFirstCommentView']||_0x56abbc['isSystemComment']||(this['_boundFirstCommentView']=_0x56abbc,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x56abbc,'actionIndicator',_0x50aaf5=>'remove'===_0x50aaf5?'remove':null),_0x56abbc['placeholder']=N(_0x1fd14e,'Write\x20a\x20comment...'),_0x56abbc['removeButton']['on']('execute',_0x8f9b70=>{_0x8f9b70['stop'](),this['showConfirm'](N(_0x1fd14e,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x56abbc['focus']();}),_0x56abbc['actionBar']['add'](this['resolveButton'],0x0),_0x56abbc['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x41777d=new _0x4d5215(this['locale']);return _0x41777d['label']=N(this['locale'],'Resolve'),_0x41777d['tooltip']=N(this['locale'],'Resolve'),_0x41777d['icon']=_0x2b516d,_0x41777d['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x41777d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xeda54c=>!_0xeda54c),_0x41777d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2ac8ce,_0xe738)=>_0x2ac8ce&&!_0xe738),_0x41777d['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x41777d;}['_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(_0x161f76){super(_0x161f76),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x3eb928,_0x2767c3,_0x19725e)=>{this['element']['innerHTML']=_0x19725e;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x39d342,_0x4a86b3,_0x3187e1){super(_0x39d342),this['_model']=_0x4a86b3,this['_config']=_0x3187e1,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4a86b3,'content',_0x4a86b3,'authoredAt',(_0x16b655,_0x43a93c)=>N(_0x39d342,'COMMENT_ARIA_LABEL',[_0x4a86b3['author']['name'],_0x3187e1['formatDateTime'](_0x43a93c),new DOMParser()['parseFromString'](_0x16b655,'text/html')['body']['textContent'],_0x4a86b3['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x39d342,N(_0x39d342,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x4b50a2(),this['focusTracker']=new _0x1b869f(),this['keystrokes']=new jt(),this['focusCycler']=new _0xba4b7f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1a6f8a=>_0x1a6f8a['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 _0x47a774=new is(this['locale']);return _0x47a774['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4f8892,_0x34d4d5)=>_0x34d4d5?ts(_0x4f8892,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4f8892),_0x47a774;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x477e25=new es(this['locale'],this['_config']['editorConfig']);return _0x477e25['value']=this['_model']['content'],_0x477e25['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x477e25['submitLabel']=N(this['locale'],'Save'),_0x477e25['on']('submit',(_0x4265f8,_0x970847)=>{this['fire']('updateComment',this['_model']['id'],_0x970847),this['switchToDisplayMode'](),this['focus']();}),_0x477e25['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x477e25['once']('editorReady',()=>{_0x477e25['focus']();}),_0x477e25['createEditor'](),_0x477e25['delegate']('editorReady')['to'](this),_0x477e25['delegate']('editorDestroyed')['to'](this),_0x477e25;}['_setupKeyboardNavigation'](){const _0x110f31=this['element'];this['keystrokes']['listenTo'](_0x110f31);for(const _0xd134cd of this['focusables'])this['focusTracker']['add'](_0xd134cd['element']),this['keystrokes']['listenTo'](_0xd134cd['element']);this['focusables']['on']('change',(_0x199a15,_0x523c54)=>{for(const _0x35edaf of _0x523c54['removed'])this['focusTracker']['remove'](_0x35edaf['element']),this['keystrokes']['stopListening'](_0x35edaf['element']);for(const _0x38ff8f of _0x523c54['added'])this['focusTracker']['add'](_0x38ff8f['element']),this['keystrokes']['listenTo'](_0x38ff8f['element']);}),this['keystrokes']['set']('enter',(_0x291947,_0x21ddaa)=>{_0x110f31===_0x291947['target']&&(this['focusCycler']['focusFirst'](),_0x21ddaa());}),this['keystrokes']['set']('esc',(_0x25d0f1,_0x31cfc7)=>{_0x110f31!==_0x25d0f1['target']&&(this['focus'](),_0x31cfc7());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x5d8fd6,_0x53328f,_0x52cc8c){super(_0x5d8fd6,_0x53328f,_0x52cc8c),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x5d8fd6,'Reply...')),this['bind']('authoredAt')['to'](_0x53328f),this['bind']('resolvedAt')['to'](_0x53328f),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 _0x2e6685(_0x5d8fd6,_0x53328f['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x53328f,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x5af062=this['bindTemplate'],_0x9ea86b=[{'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':_0x5af062['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x5af062['to']('authoredAt',_0xd7ed74=>this['_config']['formatDateTime'](_0xd7ed74))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x5af062['if']('isEditMode','ck-comment__actions--hidden'),_0x5af062['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']&&_0x9ea86b['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x5af062['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x5af062['if']('isEditMode','ck-comment--edit'),_0x5af062['if']('isSystemComment','ck-comment--info'),_0x5af062['to']('actionIndicator',_0x577ae2=>_0x577ae2?'ck-comment--'+_0x577ae2:'')],'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':_0x9ea86b}]}]};}['_createEditButton'](){const _0x427b91=new _0x235388(this['locale']);return _0x427b91['label']=N(this['locale'],'Edit'),_0x427b91['icon']=_0x5bceab,_0x427b91['withText']=!0x0,_0x427b91['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x427b91['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1b0d2e=>!_0x1b0d2e),_0x427b91['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x427b91['on']('execute',()=>this['switchToEditMode']()),_0x427b91;}['_createRemoveButton'](){const _0x5b308e=new _0x235388(this['locale']);return _0x5b308e['label']=N(this['locale'],'Remove'),_0x5b308e['icon']=_0x56bdaa,_0x5b308e['withText']=!0x0,_0x5b308e['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5b308e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5c286f=>!_0x5c286f),_0x5b308e['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5b308e['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5b308e;}['_createDropdown'](){const _0x291663=_0x3ba136(this['locale'],_0x5a4470),_0x33b058=_0x291663['panelView']['children'],_0x24e237=new _0x56a7a9(this['locale']),_0x48e08b=_0x291663['bindTemplate'];_0x24d5fc(_0x291663,()=>this['items']['find'](_0x1d97d3=>_0x1d97d3['isVisible'])),_0x291663['extendTemplate']({'attributes':{'class':[_0x48e08b['if']('isVisible','ck-hidden',_0x5107c2=>!_0x5107c2)]}});const _0x4c603d=(_0x5b4feb,_0x27250f=-0x1)=>{const _0x4c5ba8=new _0x3ef368(this['locale']);_0x4c5ba8['children']['add'](_0x5b4feb);const _0x1f2d6d=_0x27250f>-0x1?_0x27250f:_0x24e237['items']['length'];_0x24e237['items']['add'](_0x4c5ba8,_0x1f2d6d);const _0xc386d8=Array['from'](this['items']);_0x291663['unbind']('isEnabled','isVisible'),_0x291663['bind']('isEnabled')['toMany'](_0xc386d8,'isEnabled',(..._0x331d00)=>_0x331d00['some'](_0x2de963=>_0x2de963)),_0x291663['bind']('isVisible')['toMany'](_0xc386d8,'isVisible',(..._0x8344d5)=>_0x8344d5['some'](_0x7b08ec=>_0x7b08ec));};_0x291663['panelPosition']='sw',_0x291663['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x375308});for(const _0x330066 of this['items'])_0x4c603d(_0x330066);return _0x33b058['add'](_0x24e237),_0x291663['listenTo'](this['items'],'add',(_0x45c3f2,_0x12b3b1,_0x172c99)=>{_0x4c603d(_0x12b3b1,_0x172c99);}),_0x291663['listenTo'](this['items'],'remove',(_0xdcc95,_0x2dd6d5,_0x1da1e1)=>{_0x24e237['items']['remove'](_0x1da1e1);}),_0x291663;}['_attachActions'](_0x427470,_0x363ec3){const _0x47b02=_0x427470&&_0x427470['element'];_0x47b02&&(this['listenTo'](_0x47b02,'mouseenter',()=>this['actionIndicator']=_0x363ec3),this['listenTo'](_0x47b02,'focus',()=>this['actionIndicator']=_0x363ec3),this['listenTo'](_0x47b02,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x47b02,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x17f775=super['_createCommentInputView']();return _0x17f775['bind']('placeholder')['to'](this),_0x17f775;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x21888d){const _0x487488=Dt(_0x21888d,0x1e),_0x5c5ca8=new MutationObserver(_0x3181be=>{for(const _0x556357 of _0x3181be)('attributes'==_0x556357['type']&&'class'==_0x556357['attributeName']||'childList'==_0x556357['type']||'characterData'==_0x556357['type'])&&_0x487488();});return{'attach'(_0x5efce7){_0x5c5ca8['observe'](_0x5efce7,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5c5ca8['disconnect'](),_0x487488['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0xf8d9a7,_0x363ed4){super(_0xf8d9a7),this['id']=_0x49a746(),this['focusTracker']=new _0x1b869f(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5ccc1f,_0x39a24f)=>this['fire']('Esc',_0x39a24f)),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'](_0x363ed4),this['mainView']=_0x363ed4;const _0x269d1f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x269d1f['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 _0x4ee0c7=this['element']['clientHeight'];_0x4ee0c7&&(this['height']=_0x4ee0c7);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x36733b(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4f95ad,target:_0x5a6298,type:_0x430083,isVisible:_0x366005=!0x0}){super(),this['view']=_0x4f95ad,this['view']['element']||this['view']['render'](),this['_type']=_0x430083,this['_target']=_0x5a6298,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x359f6f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x52f446,_0x1f9efc)=>{this['view']['focusTracker']['add'](_0x1f9efc);}),this['focusableElements']['on']('remove',(_0x54260e,_0x1bb437)=>{this['view']['focusTracker']['remove'](_0x1bb437);}),this['set']('isVisible',_0x366005);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x575c48=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x575c48),_0x575c48;}get['targetRect'](){const _0x2325a3=this['target'];if(null===_0x2325a3)return null;if(_0x2325a3 instanceof _0x482e1e)return _0x2325a3;const _0x4db358=_0x2325a3['filter'](_0x123bf6=>function(_0x1d48e1){const _0x20f853=_0x1d48e1['offsetParent'];if(_0x20f853)return!0x0;const _0x39836c=_0x1d48e1['getClientRects']()['item'](0x0);return!!_0x39836c;}(_0x123bf6));return 0x0===_0x4db358['length']?null:new _0x482e1e(_0x4db358[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3874d6){this['view']['isActive']=_0x3874d6,this['view']['mainView']['isActive']=_0x3874d6;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3bba8f){if(!(null===_0x3bba8f||_0x3bba8f instanceof _0x482e1e||Array['isArray'](_0x3bba8f)&&_0x3bba8f['every'](_0x3be30b=>fi(_0x3be30b))))throw new _0x1be892('annotation-invalid-target',null,{'target':_0x3bba8f});}['_getNormalizedTarget'](){const _0x576afb='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x576afb)?[_0x576afb]:_0x576afb;}}function fi(_0x2fd1e4){return null!==_0x2fd1e4&&'object'==typeof _0x2fd1e4&&'nodeType'in _0x2fd1e4&&0x1===_0x2fd1e4['nodeType'];}class S extends _0x359f6f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x515941=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1b869f(),this['_focusTracker']['on']('change:isFocused',(_0x42d22f,_0x494bda,_0x233a3a)=>{_0x233a3a||this['fire']('blur');});for(const _0x4f6428 of _0x515941)this['add'](_0x4f6428);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x483c15){if(this['has'](_0x483c15))throw new _0x1be892('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x483c15['innerView'],_0x483c15),this['_viewToAnnotation']['set'](_0x483c15['view'],_0x483c15);for(const _0x4fd805 of _0x483c15['focusableElements'])this['_focusTracker']['add'](_0x4fd805);this['listenTo'](_0x483c15['focusableElements'],'add',(_0x58f087,_0x4ddd96)=>{this['_focusTracker']['add'](_0x4ddd96);}),this['listenTo'](_0x483c15['focusableElements'],'remove',(_0x2870c1,_0x1375fb)=>{this['_focusTracker']['remove'](_0x1375fb);}),this['listenTo'](_0x483c15['view']['focusTracker'],'change:isFocused',(_0x46d118,_0x159403,_0x1908cb)=>{_0x1908cb&&this['fire']('focus',_0x483c15);}),_0x483c15['updateTargetRect']();const _0x251eac=this['_getOrderInContent'](_0x483c15['view']['targetRect']);return super['add'](_0x483c15,_0x251eac);}['remove'](_0x4f04fb){if(!this['has'](_0x4f04fb))throw new _0x1be892('annotationcollection-not-existing-item',null);this['stopListening'](_0x4f04fb['view']['focusTracker']),this['stopListening'](_0x4f04fb['focusableElements']);for(const _0x150255 of _0x4f04fb['focusableElements'])this['_focusTracker']['remove'](_0x150255);return this['_viewToAnnotation']['delete'](_0x4f04fb['view']),this['_innerViewToAnnotation']['delete'](_0x4f04fb['innerView']),super['remove'](_0x4f04fb);}['getByInnerView'](_0x1443f9){return this['_innerViewToAnnotation']['get'](_0x1443f9);}['getByView'](_0x3b4f55){return this['_viewToAnnotation']['get'](_0x3b4f55);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x58ba2c of this)_0x58ba2c['updateTargetRect']();this['_sort']();}['_sort'](){const _0x46406e=Array['from'](this)['sort']((_0x129c3a,_0x5ea599)=>w(_0x129c3a['view']['targetRect'],_0x5ea599['view']['targetRect']));for(let _0x4ce23c=_0x46406e['length']-0x1;_0x4ce23c>0x0;_0x4ce23c--){const _0x473703=_0x46406e[_0x4ce23c];_0x4ce23c!==this['getIndex'](_0x473703)&&(this['remove'](_0x473703),this['add'](_0x473703));}}['_getOrderInContent'](_0x503d46){let _0x3df51b=0x0;if(!_0x503d46)return this['length'];for(const _0x5a62e4 of this){const _0x65f21d=_0x5a62e4['view']['targetRect'];if(_0x65f21d){if(w(_0x503d46,_0x65f21d)<0x0)return _0x3df51b;_0x3df51b++;}}return _0x3df51b;}}function v({source:_0xa93f18,target:_0x221fba,filter:_0x2aaae9}){for(const _0x1cd28c of _0xa93f18)_0x2aaae9(_0x1cd28c)&&_0x221fba['add'](_0x1cd28c);_0x221fba['listenTo'](_0xa93f18,'add',(_0x1a4556,_0x2f8e04)=>{_0x2aaae9(_0x2f8e04)&&_0x221fba['add'](_0x2f8e04);}),_0x221fba['listenTo'](_0xa93f18,'remove',(_0x9df389,_0x210bb8)=>{_0x221fba['has'](_0x210bb8)&&_0x221fba['remove'](_0x210bb8);});}function w(_0x445c83,_0x2c81a8){if(null===_0x445c83&&null===_0x2c81a8)return 0x0;if(null===_0x445c83)return-0x1;if(null===_0x2c81a8)return 0x1;const _0x277eed=_0x445c83['top']-_0x2c81a8['top'];return 0x0==_0x277eed?_0x445c83['left']-_0x2c81a8['left']:_0x277eed;}class y extends _0x4427fc{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x541a72){if(super(_0x541a72),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x541a72 instanceof _0x3280f7){const _0x27071b=_0x541a72['locale'];_0x541a72['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x27071b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x27071b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x27071b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x27071b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x27071b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x27071b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x27071b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2077f5){this['collection']['add'](_0x2077f5);}['remove'](_0x57fe5d){this['collection']['remove'](_0x57fe5d),_0x57fe5d['destroy']();}['refreshVisibility'](){for(const _0x15faae of this['collection'])_0x15faae['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3ff80d){return this['collection']['getByInnerView'](_0x3ff80d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x88bafb of this['collection'])_0x88bafb['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x324e90){this['fire']('_activateAnnotation',_0x324e90);}['createAnnotation'](_0x34945e){return new T(_0x34945e);}['createAnnotationView'](_0x39ca6a,_0x1dd223){return new E(_0x39ca6a,_0x1dd223);}['_addActiveAnnotation'](_0x1c347b){const _0x1ca105=new Set(this['activeAnnotations']);_0x1ca105['add'](_0x1c347b),this['activeAnnotations']=_0x1ca105;}['_removeActiveAnnotation'](_0x4ac64b){const _0x4331a1=new Set(this['activeAnnotations']);_0x4331a1['delete'](_0x4ac64b),this['activeAnnotations']=_0x4331a1;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5bd3c8=this['collection'],_0xb790f8=this['_visibleAnnotations'];function _0xac4f8a(_0x1e47f8){const _0x458bb0=_0x1e47f8['source'];_0x458bb0['isVisible']&&!_0xb790f8['has'](_0x458bb0)?_0xb790f8['add'](_0x458bb0):!_0x458bb0['isVisible']&&_0xb790f8['has'](_0x458bb0)&&_0xb790f8['remove'](_0x458bb0),_0x458bb0['view']['focusTracker']['remove'](_0x458bb0['view']['element']),_0x458bb0['view']['focusTracker']['add'](_0x458bb0['view']['element']);}this['listenTo'](_0x5bd3c8,'add',(_0xdad552,_0x41981f)=>{_0x41981f['isVisible']&&_0xb790f8['add'](_0x41981f),this['listenTo'](_0x41981f,'change:isVisible',_0xac4f8a);}),this['listenTo'](_0x5bd3c8,'remove',(_0x2f2403,_0x2d4ea0)=>{_0xb790f8['has'](_0x2d4ea0)&&_0xb790f8['remove'](_0x2d4ea0),this['stopListening'](_0x2d4ea0,'change:isVisible',_0xac4f8a);});}['_setupEnterAnnotationKeystroke'](){const _0x48a66a=_0x564606=>{_0x564606['on']('ready',()=>{_0x564606['keystrokes']['set'](_0x221ef1,(_0x26b6a3,_0x4c921c)=>{const _0x5959f0=_0x1a989f(this['activeAnnotations']['values']());_0x5959f0&&(_0x5959f0['view']['focus'](),_0x4c921c());});});};this['context']instanceof _0x3280f7?_0x48a66a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x543ec5,_0x3dcd35)=>{_0x48a66a(_0x3dcd35);});}['_setupEscapeAnnotationHandling'](){const _0x522ebb=_0x3ed815=>{const _0x22bb92=_0x3ed815['source'],_0x1dce4d=[];let _0x26ea91;if(Array['isArray'](_0x22bb92['target'])){_0x26ea91=_0x22bb92['target'][0x0],this['context']instanceof _0x3280f7?_0x1dce4d['push'](this['context']):this['context']['editors']&&_0x1dce4d['push'](...this['context']['editors']);for(const _0x2a1066 of _0x1dce4d)for(const _0x323695 of _0x2a1066['editing']['view']['domRoots']['values']())if(_0x323695['contains'](_0x26ea91))return void _0x2a1066['editing']['view']['focus']();_0x26ea91['focus']();}};this['listenTo'](this['collection'],'add',(_0x37831a,_0xa06011)=>{this['listenTo'](_0xa06011,'escape',_0x522ebb,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x318c59,_0x5161ea)=>{this['stopListening'](_0x5161ea,'escape',_0x522ebb);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4427fc{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3922eb){super(_0x3922eb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x6d0654=this['context']['config'];_0x6d0654['define']('comments.maxCommentsWhenCollapsed',0x2),_0x6d0654['define']('comments.maxThreadTotalWeight',0x1f4),_0x6d0654['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x6d0654['define']('comments.CommentThreadView',gt),_0x6d0654['define']('comments.CommentView',Tt),_0x6d0654['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xc752d7=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x703cda,_0x42a6e0)=>this['_addCommentThread'](_0x42a6e0)),this['on']('submitCommentThread',(_0x488101,_0x56b703)=>this['_submitCommentThread'](_0x56b703)),this['on']('resolveCommentThread',(_0x296c69,_0x274c42)=>this['_resolveCommentThread'](_0x274c42)),this['on']('resolveCommentThread',(_0xfedf4d,_0x17788e)=>this['_updateActiveAnnotation'](_0x17788e),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x248040,_0x16fe94)=>this['_reopenCommentThread'](_0x16fe94)),this['on']('reopenCommentThread',(_0x3fae8a,_0x1a0db)=>this['_updateActiveAnnotation'](_0x1a0db),{'priority':'lowest'}),this['on']('removeCommentThread',(_0xba86fb,_0x1b6916)=>this['_removeCommentThread'](_0x1b6916)),this['on']('updateCommentThread',(_0x373341,_0x404532)=>this['_updateCommentThread'](_0x404532)),this['on']('updateCommentThread',(_0x5a3651,_0x396434)=>this['_updateActiveAnnotation'](_0x396434),{'priority':'lowest'}),this['on']('addComment',(_0x40e064,_0x303d72)=>this['_addComment'](_0x303d72)),this['on']('updateComment',(_0x3668c9,_0x41f935)=>this['_updateComment'](_0x41f935)),this['on']('removeComment',(_0x1bd518,_0x2e33c9)=>this['_removeComment'](_0x2e33c9)),this['on']('addComment',(_0x12afd8,{threadId:_0x59d2bf,isFromAdapter:_0x59c0e9})=>{if(_0x59c0e9)return;const _0x5b6e71=this['getCommentThread'](_0x59d2bf),_0x31af9f=_0x5b6e71&&this['_threadToController']['get'](_0x5b6e71);_0x31af9f&&_0x31af9f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xc752d7,'change:activeAnnotations',(_0x278eda,_0x13d2cc,_0x27a965)=>{const _0x30aa2f=Array['from'](_0x27a965)['map'](_0x474a95=>this['_viewToController']['get'](_0x474a95['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x30aa2f?_0x30aa2f['model']:null;});}set['adapter'](_0x425e63){if(this['_adapter'])throw new _0x1be892('commentsrepository-adapter-already-set');this['_adapter']=_0x425e63;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x12d5fd=_t,threadId:_0x331432=_0x49a746(),comments:_0x515309=[],unlinkedAt:_0x52cc11=null,resolvedAt:_0x3eb65b=null,resolvedBy:_0x11107a=null,target:_0x5330d0=null,context:_0x48d2e8=null,attributes:_0xafe792={},isResolvable:_0x34e5ed=!0x0,isSubmitted:_0x51c93b=!0x1,isFromAdapter:_0x29bcd5=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x12d5fd),{'channelId':_0x12d5fd,'threadId':_0x331432,'comments':_0x515309,'unlinkedAt':_0x52cc11,'resolvedAt':_0x3eb65b,'resolvedBy':_0x11107a,'target':_0x5330d0,'context':_0x48d2e8,'attributes':_0xafe792,'isFromAdapter':_0x29bcd5,'isResolvable':_0x34e5ed,'isSubmitted':_0x51c93b}),this['getCommentThread'](_0x331432);}['openNewCommentThread']({channelId:_0x7588a4=_t,threadId:_0x416702=_0x49a746(),target:_0x4b4a4f,context:_0x47629e=null,isResolvable:_0x1fbbc4=!0x0}){if(this['_readOnlyChannels']['has'](_0x7588a4)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4b4a4f)throw new _0x1be892('commentsrepository-missing-target');const _0x32bd95=this['addCommentThread']({'channelId':_0x7588a4,'threadId':_0x416702,'target':_0x4b4a4f,'context':_0x47629e,'isResolvable':_0x1fbbc4});if(!_0x32bd95)return null;const _0x4c8d85=this['_threadToController']['get'](_0x32bd95),_0x3964ae=_0x4c8d85['view']['commentThreadInputView']['commentInputView'],_0x2b9427=this['context']['plugins']['get'](y),_0x34fe7d=_0x2b9427['getByInnerView'](_0x4c8d85['view']);return _0x2b9427['activate'](_0x34fe7d),_0x3964ae['once']('editorReady',()=>_0x3964ae['focus']()),_0x32bd95;}['hasCommentThread'](_0x48b758){if('string'!=typeof _0x48b758)throw new _0x1be892('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x48b758);}['updateCommentThread']({channelId:_0x519e7f=_t,threadId:_0x38d2aa,context:_0x4ad803,unlinkedAt:_0x351d54,attributes:_0x1d8527,isFromAdapter:_0x1b78c0=!0x1}){return this['fire'](Nt('updateCommentThread',_0x519e7f),{'channelId':_0x519e7f,'threadId':_0x38d2aa,'context':_0x4ad803,'unlinkedAt':_0x351d54,'attributes':_0x1d8527,'isFromAdapter':_0x1b78c0}),this['getCommentThread'](_0x38d2aa);}['getCommentThread'](_0x6125b9){if('string'!=typeof _0x6125b9)throw new _0x1be892('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x6125b9);}['fetchCommentThread']({channelId:_0x2e5e51,threadId:_0x537d96}={}){const _0x12d60a=this['getCommentThread'](_0x537d96);if(_0x12d60a)return Promise['resolve'](_0x12d60a);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x1be892('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2e5e51,'threadId':_0x537d96})['then'](_0x947393=>this['hasCommentThread'](_0x537d96)?this['getCommentThread'](_0x537d96):_0x947393?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2e5e51},_0x947393)):void 0x0)['catch'](_0x55ecf7=>{throw console['error'](_0x55ecf7),new _0x1be892('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2d1e95,skipNotAttached:_0x223306=!0x1,skipEmpty:_0xf7de61=!0x1,toJSON:_0x567758=!0x1}={}){const _0x10d6a3=[];for(const _0x36367f of this['_threads']['values']())_0x2d1e95&&_0x36367f['channelId']!==_0x2d1e95||_0x223306&&!_0x36367f['isAttached']||_0xf7de61&&0x0===_0x36367f['length']||_0x10d6a3['push'](_0x36367f);return _0x567758?_0x10d6a3['map'](_0x2f3f5f=>_0x2f3f5f['toJSON']()):_0x10d6a3;}['getAnnotationForCommentThread'](_0x22804f){const _0x5456b9=this['_threadToController']['get'](_0x22804f);if(!_0x5456b9)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x5456b9['view'])||null;}['getCommentThreadForAnnotation'](_0x379a34){const _0x2f7544=this['_viewToController']['get'](_0x379a34['innerView']);return _0x2f7544?_0x2f7544['model']:null;}['setActiveCommentThread'](_0x590b61){const _0x45ade9=this['context']['plugins']['get'](y);if(!_0x590b61)return void(this['activeCommentThread']&&_0x45ade9['deactivateAll']());const _0x1e797b=this['getCommentThread'](_0x590b61);if(!_0x1e797b)throw new _0x1be892('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x590b61});if(!this['_threadToController']['has'](_0x1e797b))throw new _0x1be892('commentsrepository-active-not-attached',null,{'threadId':_0x590b61});const _0x4b2fd4=_0x45ade9['getByInnerView'](this['_threadToController']['get'](_0x1e797b)['view']);_0x45ade9['activate'](_0x4b2fd4);}['switchReadOnly'](_0x2dc24a,_0x26a7ea){_0x2dc24a?this['_readOnlyChannels']['add'](_0x26a7ea):this['_readOnlyChannels']['delete'](_0x26a7ea),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4b5dcc){return this['_readOnlyChannels']['has'](_0x4b5dcc)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2bed21,_0x1d1233){return new vt(_0x2bed21,_0x1d1233);}['setPermissions'](_0x2273d3,_0x107714=_t){this['_permissions']['set'](_0x107714,_0x2273d3),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2b11ad=_t){return this['_permissions']['has'](_0x2b11ad)?this['_permissions']['get'](_0x2b11ad):bt;}['_addCommentThread']({channelId:_0x16578e,threadId:_0x3c5f53,comments:_0x2031d2,unlinkedAt:_0x515ff2,resolvedAt:_0x236f3f,resolvedBy:_0x27d51e,target:_0x1b2e50,context:_0x34d293,attributes:_0x8f6fa8,isFromAdapter:_0x596141,isResolvable:_0x4b14ce,isSubmitted:_0x15e723}){if('string'!=typeof _0x3c5f53)throw new _0x1be892('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3c5f53});if(this['hasCommentThread'](_0x3c5f53))throw new _0x1be892('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3c5f53});const _0x546ecb=new pi(this,{'channelId':_0x16578e,'id':_0x3c5f53,'context':_0x34d293,'attributes':_0x8f6fa8,'unlinkedAt':_0x515ff2,'resolvedAt':_0x236f3f,'resolvedBy':_0x27d51e?this['context']['plugins']['get'](it)['getUser'](_0x27d51e):null,'isResolvable':_0x4b14ce,'isSubmitted':_0x15e723||_0x596141});this['_threads']['set'](_0x3c5f53,_0x546ecb);for(const _0x2a54e5 of _0x2031d2)_0x546ecb['_add'](this['_createNewComment']({'threadId':_0x3c5f53,..._0x2a54e5}));return _0x1b2e50&&_0x546ecb['attachTo'](_0x1b2e50),_0x596141||!_0x546ecb['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x16578e,'threadId':_0x3c5f53});}['_submitCommentThread']({channelId:_0x11b01f,threadId:_0x3f1652}){if(!this['hasCommentThread'](_0x3f1652))throw new _0x1be892('commentsrepository-missing-comment-thread',this);const _0x4244c6=this['getCommentThread'](_0x3f1652);if(_0x4244c6['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x3b732f,comments:_0x21e433,resolvedAt:_0x175369,resolvedBy:_0x2e6a6f,context:_0x274fd2,attributes:_0x475c7f}=_0x4244c6,_0x2a5fc6=this['context']['plugins']['get']('PendingActions'),_0x3ebd78=_0x2a5fc6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x11b01f,'threadId':_0x3b732f,'comments':_0x21e433['map'](_0x9a8c9b=>_0x9a8c9b['toJSON']()),'resolvedAt':_0x175369,'resolvedBy':_0x2e6a6f?_0x2e6a6f['id']:_0x2e6a6f,'context':_0x274fd2,'attributes':_0x475c7f})['then'](({comments:_0x4426af})=>{_0x2a5fc6['remove'](_0x3ebd78);for(const _0x25d9f2 of _0x4426af)this['_updateComment']({'channelId':_0x11b01f,'threadId':_0x3f1652,'commentId':_0x25d9f2['commentId'],'createdAt':_0x25d9f2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x52d15e=>{throw console['error'](_0x52d15e),new _0x1be892('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5ec87b,target:_0x45731b}){const _0x446361=this['getCommentThread'](_0x5ec87b);if(!_0x446361)throw new _0x1be892('commentsrepository-attach-missing-comment-thread',this);const _0x123b99=this['context']['plugins']['get']('PendingActions'),_0x309335=this['context']['plugins']['get'](y),_0x1ff76a=this['_createCommentThreadView'](_0x446361),_0xe7cf4=new vt(_0x446361,_0x1ff76a);let _0x2c2487=null;_0x1ff76a['on']('change:isDirty',(_0x40dd56,_0x23bc7e,_0x2e8c40)=>{_0x2e8c40?_0x2c2487=_0x123b99['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2c2487&&(_0x123b99['remove'](_0x2c2487),_0x2c2487=null);}),this['_threadToController']['set'](_0x446361,_0xe7cf4),this['_viewToController']['set'](_0x1ff76a,_0xe7cf4);const _0x129636=new E(this['context']['locale'],_0x1ff76a);_0x129636['bind']('length')['to'](_0x1ff76a),_0x129636['bind']('isDirty')['to'](_0x1ff76a,'isDirty',_0x1ff76a,'length',(_0x5e352b,_0x2887c5)=>_0x5e352b||!_0x2887c5),_0x129636['bind']('isActive')['to'](_0x1ff76a),_0x129636['type']='comment';const _0x4d072d=new T({'view':_0x129636,'target':_0x45731b,'type':'comment','isVisible':!_0x446361['archivedAt']&&!!('function'==typeof _0x45731b?_0x45731b():_0x45731b)});return _0x1ff76a['on']('escape',()=>{_0x4d072d['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1ff76a,_0x4d072d),_0x309335['add'](_0x4d072d),_0x4d072d;}['_bindAnnotationToEditors'](_0x3dcdcd,_0x65c1de){this['listenTo'](_0x3dcdcd,'editorReady',(_0x32f103,_0x508275)=>{const _0x4d3652=_0x508275['ui']['view']['body']['bodyCollectionContainer'];_0x65c1de['focusableElements']['add'](_0x4d3652),this['context']instanceof _0x3280f7&&this['context']['ui']['focusTracker']['add'](_0x4d3652);},{'priority':'highest'}),this['listenTo'](_0x3dcdcd,'editorDestroyed',(_0x4a9f6f,_0x853272)=>{const _0x3b8f90=_0x853272['ui']['view']['body']['bodyCollectionContainer'];_0x65c1de['focusableElements']['has'](_0x3b8f90)&&_0x65c1de['focusableElements']['remove'](_0x3b8f90),this['context']instanceof _0x3280f7&&this['context']['ui']['focusTracker']['remove'](_0x3b8f90);});}['_unbindEditors'](_0xb1766a){this['stopListening'](_0xb1766a,'editorReady'),this['stopListening'](_0xb1766a,'editorDestroyed');}['_createCommentThreadView'](_0xe9a21c){const _0x506fa5=this['context']['plugins']['get'](it),{config:_0x203994,locale:_0x3c7c25}=this['context'],_0x4580b5=pt(_0x203994['get']('locale'),_0x3c7c25);return new(0x0,(_0x203994['get']('comments'))['CommentThreadView'])(_0x3c7c25,_0xe9a21c,_0x506fa5['me'],{'editorConfig':{..._0x203994['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x203994['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x203994['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x203994['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x203994['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4580b5,'CommentView':_0x203994['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x23b6b2,channelId:_0x1eb8ff,resolvedAt:_0x529fc1,resolvedBy:_0x3f93a7,isFromAdapter:_0x5c01e4}){if(!this['hasCommentThread'](_0x23b6b2))throw new _0x1be892('commentsrepository-missing-comment-thread',null,{'threadId':_0x23b6b2});const _0x15ac23=this['getCommentThread'](_0x23b6b2);if(_0x15ac23['isResolved'])throw new _0x1be892('commentsrepository-resolved-comment-thread',null,{'threadId':_0x23b6b2});const _0x2c3ab5=this['context']['plugins']['get'](it);if(_0x15ac23['resolvedBy']=_0x2c3ab5['getUser'](_0x3f93a7),_0x15ac23['resolvedAt']=_0x529fc1,_0x5c01e4||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5223cd=this['context']['plugins']['get']('PendingActions'),_0x5c3e78=_0x5223cd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1eb8ff,'threadId':_0x23b6b2})['then'](({resolvedAt:_0x3c3e77,resolvedBy:_0x350929})=>{_0x5223cd['remove'](_0x5c3e78),_0x15ac23['resolvedBy']['id']!==_0x350929&&(_0x15ac23['resolvedBy']=_0x2c3ab5['getUser'](_0x350929)),_0x15ac23['resolvedAt']=_0x3c3e77;})['catch'](_0x21054e=>{throw console['error'](_0x21054e),new _0x1be892('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5327a6,channelId:_0xa39538,isFromAdapter:_0xeb6061}){if(!this['hasCommentThread'](_0x5327a6))throw new _0x1be892('commentsrepository-missing-comment-thread',null,{'threadId':_0x5327a6});const _0x337fae=this['getCommentThread'](_0x5327a6);if(!_0x337fae['isResolved'])throw new _0x1be892('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5327a6});if(_0x337fae['resolvedBy']=null,_0x337fae['resolvedAt']=null,_0xeb6061||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x47e1c9=this['context']['plugins']['get']('PendingActions'),_0x29e49a=_0x47e1c9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xa39538,'threadId':_0x5327a6})['then'](()=>_0x47e1c9['remove'](_0x29e49a))['catch'](_0xc25ef6=>{throw console['error'](_0xc25ef6),new _0x1be892('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4a9228,isFromAdapter:_0x50880b}){const _0x2e41f6=this['getCommentThread'](_0x4a9228);if(!_0x2e41f6)throw new _0x1be892('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4a9228),this['_threads']['delete'](_0x4a9228),!_0x2e41f6['isSubmitted']||_0x50880b||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x143fb8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1372df}=_0x2e41f6,_0x29c5fd=_0x143fb8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1372df,'threadId':_0x4a9228})['then'](()=>_0x143fb8['remove'](_0x29c5fd))['catch'](_0x2ad45=>{throw console['error'](_0x2ad45),new _0x1be892('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x928fd9,unlinkedAt:_0x2c3e4c,context:_0x3ddd77,attributes:_0x2f1bfd,isFromAdapter:_0x5c98c7}){if('string'!=typeof _0x928fd9)throw new _0x1be892('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x928fd9});if(!this['hasCommentThread'](_0x928fd9))throw new _0x1be892('commentsrepository-missing-comment-thread',null,{'threadId':_0x928fd9});const _0x4f4cd3=this['getCommentThread'](_0x928fd9);let _0x3a5f7e=!0x1;if(void 0x0!==_0x3ddd77&&_0x4f4cd3['context']!==_0x3ddd77&&(_0x4f4cd3['context']=_0x3ddd77,_0x3a5f7e=!0x0),void 0x0!==_0x2c3e4c&&_0x4f4cd3['unlinkedAt']!==_0x2c3e4c&&(_0x4f4cd3['unlinkedAt']=_0x2c3e4c,_0x3a5f7e=!0x0),_0x2f1bfd&&!At(_0x2f1bfd,_0x4f4cd3['attributes'])&&(_0x4f4cd3['attributes']=_0x2f1bfd,_0x3a5f7e=!0x0),!_0x3a5f7e)return Promise['resolve']();if(!_0x4f4cd3['isSubmitted']||_0x5c98c7||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1e4c0e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x9185}=_0x4f4cd3,_0x446131=_0x1e4c0e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x9185,'threadId':_0x928fd9,'context':_0x3ddd77,'unlinkedAt':_0x2c3e4c,'attributes':_0x2f1bfd})['then'](()=>_0x1e4c0e['remove'](_0x446131))['catch'](_0x3680c3=>{throw console['error'](_0x3680c3),new _0x1be892('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2f3929){const _0x24456e=this['context']['plugins']['get'](y),_0x218699=this['getCommentThread'](_0x2f3929);if(_0x218699['_isAttached']=!0x1,this['_threadToController']['has'](_0x218699)){const _0x76a42a=this['_threadToController']['get'](_0x218699),_0x3c68a1=_0x76a42a['view'],_0x208067=_0x24456e['getByInnerView'](_0x3c68a1);this['_threadToController']['delete'](_0x218699),this['_viewToController']['delete'](_0x3c68a1),_0x208067&&_0x24456e['remove'](_0x208067),_0x76a42a['destroy'](),_0x3c68a1['destroy']()['then'](()=>{this['_unbindEditors'](_0x3c68a1);});}}['_updateActiveAnnotation']({threadId:_0x1d80a9,resolvedAt:_0x178b14,unlinkedAt:_0x247e70}){const _0x5328bf=!!_0x178b14,_0x5b0305=this['context']['plugins']['get'](y),_0x2de2be=this['getCommentThread'](_0x1d80a9);if(this['_threadToController']['has'](_0x2de2be)){const _0x588426=this['_threadToController']['get'](_0x2de2be)['view'],_0xfc9400=_0x5b0305['getByInnerView'](_0x588426);_0xfc9400&&(_0x5328bf&&_0x5b0305['_removeActiveAnnotation'](_0xfc9400),_0x247e70?_0xfc9400['isVisible']=!0x1:_0xfc9400['refreshVisibility']());}}['_getExternalAuthor'](_0x4012a2){const _0x3f124a=this['context']['plugins']['get'](it),_0x49990e=It('external:'+_0x4012a2),_0x38dd02=_0x3f124a['getUser'](_0x49990e);return _0x38dd02||_0x3f124a['addUser']({'id':_0x49990e,'name':_0x4012a2});}['_createNewComment']({threadId:_0x3a5e28,commentId:_0x5478e9=_0x49a746(),content:_0x4ee1a9,authorId:_0x272b9f,createdAt:_0x1467b7,attributes:_0xf677c9}){if('string'!=typeof _0x5478e9)throw new _0x1be892('commentsrepository-invalid-commentid');if('string'!=typeof _0x272b9f)throw new _0x1be892('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4ee1a9||!_0x4ee1a9['trim']())throw new _0x1be892('commentsrepository-invalid-comment-content');const _0x3535f8=this['context']['plugins']['get'](it)['getUser'](_0x272b9f);if(!_0x3535f8)throw new _0x1be892('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x272b9f});let _0x27a611=null,_0x30dabb=_0x1467b7;return _0xf677c9?.['@external']&&(_0x27a611=this['_getExternalAuthor'](_0xf677c9['@external']['authorName']),_0x30dabb=new Date(_0xf677c9['@external']['createdAt'])),new wi(this,{'threadId':_0x3a5e28,'id':_0x5478e9,'author':_0x27a611||_0x3535f8,'creator':_0x3535f8,'content':_0x4ee1a9,'createdAt':_0x1467b7,'authoredAt':_0x30dabb,'attributes':_0xf677c9});}['_addComment'](_0x42dfda){let {threadId:_0x4d2e88,content:_0x2733df,attributes:_0x37a1c1,isFromAdapter:_0x22d270}=_0x42dfda;const _0x2824ad=this['getCommentThread'](_0x42dfda['threadId']);if(!_0x2824ad)throw new _0x1be892('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x27d90c=this['_createNewComment'](_0x42dfda),{id:_0x3b5b95}=_0x27d90c;if(_0x2824ad['_add'](_0x27d90c),_0x22d270||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2824ad['isSubmitted'])return Promise['resolve']();const _0x10c1c4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x219f32}=_0x2824ad,_0x2b771a=_0x10c1c4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x37a1c1||(_0x37a1c1={}),this['adapter']['addComment']({'channelId':_0x219f32,'threadId':_0x4d2e88,'commentId':_0x3b5b95,'content':_0x2733df,'attributes':_0x37a1c1})['then'](_0x297761=>{_0x10c1c4['remove'](_0x2b771a),_0x297761&&this['_updateComment']({'channelId':_0x219f32,'threadId':_0x4d2e88,'commentId':_0x3b5b95,'createdAt':_0x297761['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4039cd=>{throw console['error'](_0x4039cd),new _0x1be892('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3f6706,commentId:_0x349e83,content:_0x5c2fe2,createdAt:_0x1db468,attributes:_0x336174,isFromAdapter:_0x453716}){if(void 0x0!==_0x5c2fe2&&('string'!=typeof _0x5c2fe2||!_0x5c2fe2['trim']()['length']))throw new _0x1be892('commentsrepository-update-comment-invalid-content');const _0x1f96b2=this['getCommentThread'](_0x3f6706),_0x183bb2=_0x1f96b2['getComment'](_0x349e83);if(!_0x183bb2)throw new _0x1be892('commentsrepository-update-missing-comment',this);let _0x19f35e=!0x1;if(_0x5c2fe2&&_0x5c2fe2!==_0x183bb2['content']&&(_0x183bb2['isEditable']||_0x453716)&&(_0x183bb2['content']=_0x5c2fe2,_0x19f35e=!0x0),_0x1db468&&_0x1db468!==_0x183bb2['createdAt']&&(_0x183bb2['createdAt']=_0x1db468,_0x183bb2['attributes']&&_0x183bb2['attributes']['@external']||(_0x183bb2['authoredAt']=_0x1db468),_0x19f35e=!0x0),_0x336174&&!At(_0x336174,_0x183bb2['attributes'])&&(_0x183bb2['attributes']=_0x336174,_0x19f35e=!0x0),!_0x19f35e)return Promise['resolve']();if(_0x1f96b2['fire']('commentUpdated'),_0x453716||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xd5f9f7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x172337}=this['getCommentThread'](_0x183bb2['threadId']),_0x593343=_0xd5f9f7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x172337,'threadId':_0x3f6706,'commentId':_0x349e83,'content':_0x5c2fe2,'attributes':_0x336174})['then'](()=>_0xd5f9f7['remove'](_0x593343))['catch'](_0x442119=>{throw console['error'](_0x442119),new _0x1be892('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x48ca18,commentId:_0x48bf2e,isFromAdapter:_0x1e29f5}){const _0x309569=this['getCommentThread'](_0x48ca18),_0x3181c5=_0x309569['getComment'](_0x48bf2e);if(!_0x3181c5)throw new _0x1be892('commentsrepository-remove-missing-comment',this);if(_0x309569['_remove'](_0x3181c5),_0x1e29f5||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4802d6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x693da8}=_0x309569,_0x42eea3=_0x4802d6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x693da8,'threadId':_0x48ca18,'commentId':_0x48bf2e})['then'](()=>_0x4802d6['remove'](_0x42eea3))['catch'](_0x5ca4bc=>{throw console['error'](_0x5ca4bc),new _0x1be892('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x36733b(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1f36cc,_0x6f51b0){super();const _0x24b526=_0x6f51b0['isResolvable'];this['channelId']=_0x6f51b0['channelId'],this['id']=_0x6f51b0['id'],this['comments']=new _0x359f6f(),this['_repository']=_0x1f36cc,this['_isAttached']=!0x1,this['_isSubmitted']=_0x6f51b0['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1f36cc,'_permissions',_0x1f36cc,'_readOnlyChannels',()=>_0x1f36cc['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1f36cc,'_permissions',()=>_0x1f36cc['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1f36cc,'_permissions',()=>{const _0x4a065d=_0x1f36cc['getPermissions'](this['channelId']);return _0x4a065d['write']||_0x4a065d['admin'];}),this['bind']('isResolvable')['to'](_0x1f36cc,'_permissions',()=>_0x24b526&&_0x1f36cc['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x6f51b0['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x59c207,_0x2356db)=>_0x59c207?_0x2356db?_0x59c207<_0x2356db?_0x59c207:_0x2356db:_0x59c207:_0x2356db),this['set']('unlinkedAt',_0x6f51b0['unlinkedAt']||null),this['set']('resolvedAt',_0x6f51b0['resolvedAt']||null),this['set']('resolvedBy',_0x6f51b0['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x42707d=>!!_0x42707d),this['set']('attributes',_0x6f51b0['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xec16bb,_0x30e903)=>_0xec16bb+_0x30e903['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2d2b0e,id:_0x2605cc}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x2d2b0e),{'channelId':_0x2d2b0e,'threadId':_0x2605cc});}['setUnlinkedAt'](_0xfab856){this['_update']({'unlinkedAt':_0xfab856});}['resolve']({resolvedAt:_0x1c2fa2=new Date(),resolvedBy:_0x140938='',isFromAdapter:_0x1ceab3=!0x1}={}){const _0xec2166=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x5e942f,id:_0x372bab}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x5e942f),{'channelId':_0x5e942f,'threadId':_0x372bab,'resolvedAt':_0x1c2fa2,'resolvedBy':_0x140938||_0xec2166['id'],'isFromAdapter':_0x1ceab3});}['reopen']({isFromAdapter:_0x31c515=!0x1}={}){const {channelId:_0x409312,id:_0x24495a}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x409312),{'channelId':_0x409312,'threadId':_0x24495a,'isFromAdapter':_0x31c515});}['setContext'](_0x1775b3){this['context']||this['_update']({'context':_0x1775b3});}['setAttribute'](_0x17bb4e,_0x34855e){const _0x426a4f=wt(this['attributes']);yt(_0x426a4f,_0x17bb4e,_0x34855e),this['_update']({'attributes':_0x426a4f});}['removeAttribute'](_0x542f67){const _0x2e8c37=wt(this['attributes']);Ct(_0x2e8c37,_0x542f67),this['_update']({'attributes':_0x2e8c37});}['remove']({isFromAdapter:_0x309ebf=!0x1}={}){const {channelId:_0x32a087,id:_0x489daa}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x32a087),{'channelId':_0x32a087,'threadId':_0x489daa,'isFromAdapter':_0x309ebf});}['attachTo'](_0x2dc267){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2dc267});}['addComment'](_0x10d989){const {channelId:_0x179593,id:_0x1d59c4}=this;this['_repository']['fire'](Nt('addComment',_0x179593,_0x1d59c4),Object['assign']({'channelId':_0x179593,'threadId':_0x1d59c4},_0x10d989));}['getComment'](_0xe7de4c){if('string'!=typeof _0xe7de4c)throw new _0x1be892('commentsrepository-get-comment-invalid-id',null,{'commentId':_0xe7de4c});return this['comments']['get'](_0xe7de4c);}['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'](_0x2bede5=>_0x2bede5['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4d6119){return this['listenTo'](_0x4d6119,'change:authoredAt',()=>{const _0x1516a4=this['_findOptimalIndex'](_0x4d6119),_0x26057a=this['comments'];_0x1516a4-0x1!=_0x26057a['getIndex'](_0x4d6119)&&_0x1516a4+0x1!=_0x26057a['getIndex'](_0x4d6119)&&(this['_remove'](_0x4d6119),this['_add'](_0x4d6119));}),this['comments']['add'](_0x4d6119,this['_findOptimalIndex'](_0x4d6119));}['_update'](_0x5bb29d){const {channelId:_0x35b2ae,id:_0x8c2f90}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x35b2ae),{..._0x5bb29d,'channelId':_0x35b2ae,'threadId':_0x8c2f90});}['_remove'](_0x2a59fe){return this['stopListening'](_0x2a59fe),_0x2a59fe['destroy'](),this['comments']['remove'](_0x2a59fe);}['_findOptimalIndex'](_0xc97064){const _0x47fa03=this['comments']['find'](_0x3f8a5d=>new Date(_0x3f8a5d['authoredAt'])['getTime']()>new Date(_0xc97064['authoredAt'])['getTime']());return _0x47fa03?this['comments']['getIndex'](_0x47fa03):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x36733b(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3b9ed5,_0x49f5dd){super();const _0x5173d8=_0x3b9ed5['context']['plugins']['get'](it)['me'],_0x422b05=_0x3b9ed5['getCommentThread'](_0x49f5dd['threadId']),_0x27632d=0x0===_0x422b05['comments']['length'],_0x4ea10a=_0x5173d8===_0x49f5dd['author'];this['id']=_0x49f5dd['id'],this['threadId']=_0x49f5dd['threadId'],this['author']=_0x49f5dd['author'],this['creator']=_0x49f5dd['creator'],this['isExternal']=Boolean(_0x49f5dd['attributes']&&_0x49f5dd['attributes']['@external']),this['set']('content',_0x49f5dd['content']),this['createdAt']=_0x49f5dd['createdAt']||new Date(),this['set']('authoredAt',_0x49f5dd['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x422b05,'resolvedAt'),this['set']('attributes',_0x49f5dd['attributes']||{}),this['bind']('isEditable')['to'](_0x3b9ed5,'_permissions',()=>{const _0x136c64=_0x3b9ed5['getPermissions'](_0x422b05['channelId'])['write'],_0x2c54ed=_0x3b9ed5['getPermissions'](_0x422b05['channelId'])['modifyAll'];return _0x4ea10a&&_0x136c64||!_0x4ea10a&&_0x2c54ed;}),this['bind']('isRemovable')['to'](_0x422b05,'isRemovable',_0x3b9ed5,'_permissions',_0x488878=>{const _0x4d3750=_0x3b9ed5['getPermissions'](_0x422b05['channelId'])['write'],_0x72a059=_0x3b9ed5['getPermissions'](_0x422b05['channelId'])['modifyAll'];return _0x4ea10a&&_0x4d3750||_0x488878&&_0x27632d||!_0x4ea10a&&_0x72a059&&!_0x27632d;}),this['bind']('isReadOnly')['to'](_0x422b05,'isReadOnly'),this['_repository']=_0x3b9ed5;}get['weight'](){return Math['max'](function(_0x46dc80){const _0xe51063=document['createElement']('div');return _0xe51063['innerHTML']=_0x46dc80,_0xe51063['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1239e9){const {threadId:_0x58e024,id:_0x574700}=this;if(!this['_repository']['hasCommentThread'](_0x58e024))throw new _0x1be892('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x193912}=this['_repository']['getCommentThread'](_0x58e024);this['_repository']['fire'](Nt('updateComment',_0x193912,_0x58e024),{'channelId':_0x193912,'threadId':_0x58e024,'commentId':_0x574700,..._0x1239e9});}['setAttribute'](_0x45da67,_0x44a22d){const _0x23dfea=wt(this['attributes']);yt(_0x23dfea,_0x45da67,_0x44a22d),this['update']({'attributes':_0x23dfea});}['removeAttribute'](_0x38b873){const _0x58cf88=wt(this['attributes']);Ct(_0x58cf88,_0x38b873),this['update']({'attributes':_0x58cf88});}['remove'](_0x57b027={}){if(!_0x57b027['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3b83aa,id:_0x3f8c7d}=this;if(!this['_repository']['hasCommentThread'](_0x3b83aa))throw new _0x1be892('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x21411c}=this['_repository']['getCommentThread'](_0x3b83aa);this['_repository']['fire'](Nt('removeComment',_0x21411c,_0x3b83aa),{'channelId':_0x21411c,'threadId':_0x3b83aa,'commentId':_0x3f8c7d,..._0x57b027});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x516650,..._0x21e7fb){for(const _0x52ca91 of _0x21e7fb)void 0x0!==_0x52ca91&&(_0x516650+=':'+String(_0x52ca91));return _0x516650;}class ot extends _0x387361{constructor(_0x11196a){super(_0x11196a),this['set']('hasContent',!0x1);}['refresh'](){const _0x59670d=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x51ffe5 of _0x59670d['getRanges']())if(this['_hasContent'](_0x51ffe5))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x22863d=_0x49a746(),ranges:_0x1b91bc,comment:_0x51357d}={}){const _0x1e21cb=this['editor']['model'],_0x1688a8=_0x1b91bc??Array['from'](_0x1e21cb['document']['selection']['getRanges']()),_0x78b27c=[];for(const _0x4f9948 of _0x1688a8)this['_hasContent'](_0x4f9948)&&_0x78b27c['push'](this['_trimToContent'](_0x4f9948));if(!_0x78b27c['length'])throw new _0x1be892('addcommentthreadcommand-incorrect-ranges',null);_0x51357d&&this['_createCommentThread'](_0x22863d,_0x51357d),this['_createMarkersFromRanges'](_0x22863d,_0x78b27c,!!_0x51357d);}['_createMarkersFromRanges'](_0x28d3c2,_0x146a19,_0x5dcdc6){this['editor']['model']['change'](_0x500efa=>{for(const _0x3fa0d4 of _0x146a19){const _0x231cd0=_0x49a746()['substr'](0x1,0x5),_0x563a39='comment:'+_0x28d3c2+':'+_0x231cd0;_0x500efa['addMarker'](_0x563a39,{'range':_0x3fa0d4,'usingOperation':_0x5dcdc6,'affectsData':_0x5dcdc6});}});}['_createCommentThread'](_0x5e786a,_0x5b5da0){const _0x4df1bc=this['editor']['plugins']['get']('CommentsRepository'),_0x557f04=this['editor']['config']['get']('collaboration.channelId'),_0x4f3b6c=this['editor']['plugins']['get']('Users')['me'];if(!_0x4f3b6c)throw new _0x1be892('addcommentthreadcommand-user-not-found',null);_0x4df1bc['addCommentThread']({'threadId':_0x5e786a,'channelId':_0x557f04,'comments':[{'authorId':_0x4f3b6c['id'],'content':_0x5b5da0,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x18477b){for(const _0x45e8c1 of _0x18477b['getItems']())if(this['_itemIsContent'](_0x45e8c1))return!0x0;return!0x1;}['_itemIsContent'](_0x38b19d){return _0x38b19d['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x38b19d)&&!_0x38b19d['is']('element','tableCell');}['_trimToContent'](_0x4bb3d1){const _0x9b9d7=_0x188323=>!this['_itemIsContent'](_0x188323['item']),_0x58daf4=_0x4bb3d1['start']['getLastMatchingPosition'](_0x9b9d7),_0xfbb04c=_0x4bb3d1['end']['getLastMatchingPosition'](_0x9b9d7,{'direction':'backward'});return this['editor']['model']['createRange'](_0x58daf4,_0xfbb04c);}}class b extends _0x4aad6f{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x457896){super(_0x457896),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1b1e61=this['editor'],_0x47166f=_0x1b1e61['model']['document']['selection'],_0x8b48a5=_0x4d37e2(()=>this['refreshSelectedViews'](),0xa);_0x47166f['on']('change:range',(_0x5b7cff,_0x54f4db)=>{_0x54f4db['directChange']&&(_0x8b48a5['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1b1e61['editing']['view']['document'],'change:isFocused',(_0x5f2fc5,_0x344b57,_0x16a8f3)=>{_0x16a8f3&&_0x8b48a5();}),this['listenTo'](_0x1b1e61['ui']['focusTracker'],'change:isFocused',(_0x5f44b4,_0x4e52d5,_0x505086)=>{_0x505086||this['fire']('blur',{'isAnnotationTracked':_0x3f426e=>this['_editorAnnotationsData']['has'](_0x3f426e['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x68e1b){if(this['_editorAnnotations']['has'](_0x68e1b['view']))return;this['_editorAnnotations']['add'](_0x68e1b['view']),this['editor']['ui']['focusTracker']['add'](_0x68e1b['view']['element']);const _0xd19805=this['editor']['plugins']['get'](y);this['listenTo'](_0xd19805['collection'],'remove',(_0x1d2f89,_0x435d53)=>{this['editor']['ui']['focusTracker']['remove'](_0x435d53['view']['element']),this['_editorAnnotations']['delete'](_0x435d53['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x3368b4){if('function'!=typeof _0x3368b4)throw new _0x1be892('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x3368b4);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x54f85e,annotations:_0x5df8b9}){const _0x39aa43=[],_0x332ab7=this['editor']['model']['document']['selection'],_0x1aff2f=Array['from'](_0x332ab7['getRanges']());for(const [_0xd09609,_0x14f08e]of this['_editorAnnotationsData']){const _0xcc4704=_0x33f0e2(_0x14f08e),_0x48b050=_0x5df8b9['getByInnerView'](_0xd09609);_0xcc4704&&_0x48b050&&_0x39aa43['push']({'annotation':_0x48b050,'range':_0xcc4704});}function _0x33f0e2(_0xd169d2){for(const _0x58c802 of _0xd169d2)for(const _0x1dfc8b of _0x1aff2f)if(_0x58c802['containsRange'](_0x1dfc8b,!_0x332ab7['isCollapsed']))return _0x58c802;return null;}return _0x39aa43['sort']((_0x132cd0,_0x37186f)=>{const _0x1a57ce=_0x132cd0['range'],_0x2f2a69=_0x37186f['range'];if(!_0x1a57ce['isEqual'](_0x2f2a69)){if(_0x1a57ce['containsRange'](_0x2f2a69,!0x0))return 0x1;if(_0x2f2a69['containsRange'](_0x1a57ce,!0x0))return-0x1;}return _0x132cd0['annotation']==_0x54f85e?-0x1:_0x37186f['annotation']==_0x54f85e?0x1:0x0;})['map'](_0x5074ae=>_0x5074ae['annotation']);}get['_editorAnnotationsData'](){const _0x57e9c8=new Map();for(const _0x121ed2 of Array['from'](this['_dataCollectors']))for(const [_0x4e0713,_0x119598]of _0x121ed2())_0x57e9c8['set'](_0x4e0713,_0x119598);return _0x57e9c8;}}class st extends _0x4aad6f{['afterInit'](){const _0x43cb7a=this['editor'];if(!_0x43cb7a['plugins']['has']('RestrictedEditingModeEditing'))return;_0x43cb7a['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4aad6f{constructor(_0x33611d){super(_0x33611d),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x551b0c=this['editor'],_0x1e6f24=_0x551b0c['commands']['get']('importWord'),_0xe5263e=_0x551b0c['plugins']['get'](it);_0x1e6f24&&(_0x1e6f24['on']('execute',(_0x956355,[,_0x1ae02e])=>{_0x1ae02e['collaboration_features']={'comments':!0x0,'user_id':_0xe5263e['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1e6f24,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x204174,_0x561faf){const {comment_threads:_0x54e16b}=_0x561faf;_0x54e16b&&_0x54e16b['forEach'](({thread_id:_0x139a03,comments:_0x27f994,is_resolved:_0x27689b})=>{const _0x4ff988=new Date(),_0x18b1e8=_0x27f994['map'](({author:_0x298d55,content:_0x1795cb,created_at:_0xeeed97})=>({'content':_0x1795cb,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x4ff988,'attributes':{'@external':{'authorName':_0x298d55,'createdAt':_0xeeed97?new Date(_0xeeed97):new Date(),'source':'importWord'}}})),_0x31db6d=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x31db6d,'threadId':_0x139a03,'comments':_0x18b1e8,'resolvedAt':_0x27689b?_0x4ff988:null});});}}class at extends _0x4aad6f{constructor(_0x578518){super(_0x578518),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x177a7e=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x177a7e,'contentInsertion',(_0x1e1246,_0x40d942)=>this['_removeMarkersWithoutThreads'](_0x40d942['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x27807b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x27807b;const _0x25d641=this['editor']['plugins']['get']('CommentsRepository');for(const _0x657b3c of _0x27807b['keys']()){const [_0x5b1a16,_0x29162d]=_0x657b3c['split'](':');'comment'!=_0x5b1a16||_0x25d641['hasCommentThread'](_0x29162d)||_0x27807b['delete'](_0x657b3c);}return _0x27807b;}['_registerMarkerInClipboardPipeline'](){const _0x468748=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x169971=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x169971&&_0x468748['_registerMarkerToCopy']('comment',_0x169971);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xaf42ca){switch(_0xaf42ca){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x1f49d1){const _0x31f043=_0x1f49d1['split'](':');return{'group':_0x31f043[0x0],'id':_0x31f043[0x1],'part':_0x31f043[0x2]};}class ut extends _0x4aad6f{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x507748,_0x3b4740)=>{if(!_0x3b4740['options']['showCommentHighlights'])return null;if(_0x3b4740['options']['ignoreResolvedComments']){const {id:_0x5e00ef}=ft(_0x507748['markerName']),_0x4b4a89=this['editor']['plugins']['get'](o);if(_0x4b4a89['getCommentThread'](_0x5e00ef)?.['isResolved']&&_0x507748['item'])return _0x3b4740['consumable']['consume'](_0x507748['item'],'addMarker:'+_0x507748['markerName']),_0x3b4740['consumable']['consume'](_0x507748['item'],'removeMarker:'+_0x507748['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x439e77=>{_0x439e77['on']('addMarker:comment',(_0x240ebb,_0x5a9031,_0x45c854)=>{if(!_0x45c854['options']['showCommentHighlights'])return;const _0x266290=_0x5a9031['item'];if(!_0x266290)return;const _0x28bfa3=_0x45c854['mapper']['toViewElement'](_0x266290);this['editor']['model']['schema']['isObject'](_0x266290)&&_0x28bfa3&&!_0x28bfa3['getCustomProperty']('widget')&&_0x28bfa3['is']('containerElement')&&_0x56c570(_0x28bfa3,_0x45c854['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5e3382,{writer:_0x582c20,options:_0x464f9e})=>{if(!_0x464f9e['showCommentHighlights'])return null;const _0x5adb8f=_0x582c20['createContainerElement']('div'),_0x41f3cc=_0x582c20['createEmptyElement']('hr');return _0x582c20['addClass']('ck-horizontal-line',_0x5adb8f),_0x582c20['insert'](_0x582c20['createPositionAt'](_0x5adb8f,0x0),_0x41f3cc),_0x5adb8f;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x497e60,{writer:_0x531b95,options:_0x4e24fd})=>{if(!_0x4e24fd['showCommentHighlights'])return null;const _0x4fb8ee=_0x531b95['createContainerElement']('span'),_0x437728=_0x531b95['createEmptyElement']('img');return _0x531b95['addClass']('image-inline',_0x4fb8ee),_0x531b95['insert'](_0x531b95['createPositionAt'](_0x4fb8ee,0x0),_0x437728),_0x4fb8ee;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xc87b16,{writer:_0x52de04,options:_0x5320bd})=>{if(_0x5320bd['showCommentHighlights'])return _0x52de04['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3be563,_0x5b095a,_0x58de1a)=>{_0x58de1a['options']['showCommentHighlights']&&_0x3be563['stop']();},{'priority':'high'});}}class r extends _0x4aad6f{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(_0x5d14bf){super(_0x5d14bf),this['set']('isThreadsLoadingPaused',!0x0),_0x5d14bf['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4bb910,_0x48abb5,_0x4aadd2,_0x2a7ff0)=>{const _0x51a4b4=_0x5d14bf['plugins']['get'](o),_0x3beddf=_0x4aadd2?ft(_0x4aadd2)['id']:null;_0x5d14bf['model']['change'](()=>{if(_0x3beddf){const _0x228b41=this['getAllMarkersForId'](_0x3beddf);for(const _0x1320c5 of _0x228b41)_0x5d14bf['editing']['reconvertMarker'](_0x1320c5);}if(_0x2a7ff0){const {id:_0x49dccf}=ft(_0x2a7ff0),_0x23e4fe=_0x51a4b4['getCommentThread'](_0x49dccf);if(_0x23e4fe&&_0x23e4fe['unlinkedAt'])return;if(_0x23e4fe&&!_0x23e4fe['isAttached'])return;const _0x1192ed=this['getAllMarkersForId'](_0x49dccf);for(const _0x58aa1b of _0x1192ed)_0x5d14bf['editing']['reconvertMarker'](_0x58aa1b);}}),_0x3beddf&&this['scrollToThreadMarker'](_0x3beddf);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x40479a=this['editor'],_0x54b318=_0x40479a['plugins']['get'](o),_0x2ef72f=_0x40479a['config']['get']('collaboration.channelId'),_0x1a762b=_0x54b318['getCommentThreads']()['filter'](_0x294b6f=>_0x294b6f['channelId']!==_0x2ef72f);_0x40479a['commands']['add']('addCommentThread',new ot(_0x40479a)),this['listenTo'](_0x40479a,'change:isReadOnly',(_0x57500f,_0x3640d2,_0x42ea4e)=>{_0x54b318['switchReadOnly'](_0x42ea4e,_0x40479a['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x54b318,dt('addCommentThread',_0x2ef72f),(_0x21d6f4,{threadId:_0x2abe0e})=>{const _0x37ea36=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2abe0e);_0x37ea36?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2abe0e);}),this['listenTo'](_0x54b318,dt('removeCommentThread',_0x2ef72f),(_0x4b738b,{threadId:_0x330bd0})=>{_0x40479a['model']['enqueueChange']({'isUndoable':!0x1},_0x532ee8=>{const _0x18121c=this['getAllMarkersForId'](_0x330bd0);for(const _0x56d14c of _0x18121c)_0x532ee8['removeMarker'](_0x56d14c);});}),this['listenTo'](_0x54b318,dt('resolveCommentThread',_0x2ef72f),(_0x16c096,{threadId:_0x1bf605})=>{(this['_reconvertMarkers'](_0x1bf605),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1bf605)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x54b318,dt('reopenCommentThread',_0x2ef72f),(_0x23db7a,{threadId:_0x6a0c33})=>{this['_reconvertMarkers'](_0x6a0c33);},{'priority':'low'}),this['listenTo'](_0x54b318,dt('addComment',_0x2ef72f),(_0x3f9813,{threadId:_0x800694,isFromAdapter:_0x31af21})=>{const _0x184e2b=this['getAllMarkersForId'](_0x800694);if(_0x31af21||0x0==_0x184e2b['length']||!_0x54b318['hasCommentThread'](_0x800694))return;0x1===_0x54b318['getCommentThread'](_0x800694)['length']&&_0x40479a['model']['enqueueChange']({'isUndoable':!0x1},_0x3bea36=>{for(const _0x50c862 of _0x184e2b)_0x3bea36['updateMarker'](_0x50c862,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1a762b);}['afterInit'](){!async function(_0x43b491){const _0x287518=_0x44ee48([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x5c7d8c=0x73460ab3,_0x3b3c9f=0x73418c1b^_0x5c7d8c,_0x209a07=window[_0x44ee48([0x44,0x61,0x74,0x65])][_0x44ee48([0x6e,0x6f,0x77])](),_0x37549c=_0x43b491[_0x44ee48([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xde3012=new window[(_0x44ee48([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc1b3e1=>{_0x37549c[_0x44ee48([0x6f,0x6e,0x63,0x65])](_0x44ee48([0x72,0x65,0x61,0x64,0x79]),_0xc1b3e1);}),_0x27eed5={[_0x44ee48([0x6b,0x74,0x79])]:_0x44ee48([0x45,0x43]),[_0x44ee48([0x75,0x73,0x65])]:_0x44ee48([0x73,0x69,0x67]),[_0x44ee48([0x63,0x72,0x76])]:_0x44ee48([0x50,0x2d,0x32,0x35,0x36]),[_0x44ee48([0x78])]:_0x44ee48([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]),[_0x44ee48([0x79])]:_0x44ee48([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]),[_0x44ee48([0x61,0x6c,0x67])]:_0x44ee48([0x45,0x53,0x32,0x35,0x36])},_0x86d9de=_0x37549c[_0x44ee48([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x44ee48([0x67,0x65,0x74])](_0x44ee48([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1ed61a(){let _0x376e29,_0x328c36=null,_0x124d1c=null;try{if(_0x86d9de==_0x44ee48([0x47,0x50,0x4c]))return _0x44ee48([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x376e29=_0x309e3f(),!_0x376e29)return _0x44ee48([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x376e29[_0x44ee48([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x124d1c=_0x294996(_0x376e29[_0x44ee48([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x376e29[_0x44ee48([0x6a,0x74,0x69])])),await _0x1c04e5()?_0x10dcd0()?_0x1c7f60()?_0x44ee48([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x31f29d()?(_0x376e29[_0x44ee48([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x44ee48([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x328c36=_0x17b820(_0x44ee48([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x471e2b()):_0x44ee48([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x44ee48([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x44ee48([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x44ee48([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1c7f60(){const _0xa29148=[_0x44ee48([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x44ee48([0x74,0x72,0x69,0x61,0x6c])][_0x44ee48([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x376e29[_0x44ee48([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x209a07/0x3e8:0xe10*_0x3b3c9f;return _0x376e29[_0x44ee48([0x65,0x78,0x70])]<_0xa29148;}function _0x10dcd0(){const _0x2b755c=_0x376e29[_0x44ee48([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2b755c)return!0x1;if(_0x2b755c[_0x44ee48([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44ee48([0x2a])))return!0x0;if(_0x2b755c[_0x44ee48([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44ee48([0x43,0x4d,0x54])))return!0x0;if(_0x2b755c[_0x44ee48([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44ee48([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x1e133e())return!0x0;if(_0x2b755c[_0x44ee48([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44ee48([0x52,0x43,0x4d,0x54]))){if(_0x4b4d7d())return!0x0;if(_0x252f00()||_0x293fc0())return!0x0;}return!0x1;}function _0x31f29d(){const _0x390b21=_0x376e29[_0x44ee48([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x390b21||0x0==_0x390b21[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2f780d}=new URL(window[_0x44ee48([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x390b21[_0x44ee48([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2f780d))return!0x0;const _0x21976c=_0x2f780d[_0x44ee48([0x73,0x70,0x6c,0x69,0x74])](_0x44ee48([0x2e]));return _0x390b21[_0x44ee48([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b9a01=>_0x2b9a01[_0x44ee48([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44ee48([0x2a])))[_0x44ee48([0x6d,0x61,0x70])](_0x32108b=>_0x32108b[_0x44ee48([0x73,0x70,0x6c,0x69,0x74])](_0x44ee48([0x2e])))[_0x44ee48([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4293d2=>_0x4293d2[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x21976c[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x44ee48([0x6d,0x61,0x70])](_0x4f8e5e=>Array(_0x21976c[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4f8e5e[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x44ee48([0x66,0x69,0x6c,0x6c])](_0x4f8e5e[0x0]===_0x44ee48([0x2a])?_0x44ee48([0x2a]):'')[_0x44ee48([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4f8e5e))[_0x44ee48([0x73,0x6f,0x6d,0x65])](_0xcc89d5=>_0x21976c[_0x44ee48([0x65,0x76,0x65,0x72,0x79])]((_0x5702ea,_0x3c7e90)=>_0xcc89d5[_0x3c7e90]===_0x5702ea||_0xcc89d5[_0x3c7e90]===_0x44ee48([0x2a])));}function _0x471e2b(){return _0x328c36&&_0x124d1c?new window[(_0x44ee48([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x26b925,_0xfd6335)=>{_0x328c36[_0x44ee48([0x74,0x68,0x65,0x6e])](_0x26b925,_0xfd6335),_0x124d1c[_0x44ee48([0x74,0x68,0x65,0x6e])](_0x4ed1aa=>{_0x4ed1aa!=_0x44ee48([0x56,0x61,0x6c,0x69,0x64])&&_0x26b925(_0x4ed1aa);},_0xfd6335);}):_0x328c36||_0x124d1c||_0x44ee48([0x56,0x61,0x6c,0x69,0x64]);}}function _0x294996(_0x419b6a,_0x168cf2){return new window[(_0x44ee48([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x408f24=>{if(_0x10156c())return _0x408f24(_0x44ee48([0x56,0x61,0x6c,0x69,0x64]));_0x5116e6(),_0x37549c[_0x44ee48([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x44ee48([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xd732b0=!0x1;const _0x595919=_0x49a746();function _0x5e875c(_0x1ad215){return!!_0x1ad215&&(typeof _0x1ad215===_0x44ee48([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1ad215===_0x44ee48([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1ad215[_0x44ee48([0x74,0x68,0x65,0x6e])]===_0x44ee48([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1ad215[_0x44ee48([0x63,0x61,0x74,0x63,0x68])]===_0x44ee48([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xe8ff58(_0x5e2b20){_0x1a8d21(_0x5e2b20)[_0x44ee48([0x74,0x68,0x65,0x6e])](_0x200b2d=>{if(!_0x200b2d||_0x200b2d[_0x44ee48([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x44ee48([0x6f,0x6b]))return _0x44ee48([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x23f969(_0x245ec0(_0x595919+_0x168cf2))!=_0x200b2d[_0x44ee48([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x44ee48([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x44ee48([0x56,0x61,0x6c,0x69,0x64]);})[_0x44ee48([0x74,0x68,0x65,0x6e])](_0x4552e9=>(_0x1b2c70(),_0x4552e9),()=>{const _0x1ca8e5=_0x132ce2();return null==_0x1ca8e5?(_0x1b2c70(),_0x44ee48([0x56,0x61,0x6c,0x69,0x64])):_0x44ee48(_0x209a07-_0x1ca8e5>(0x574a8eb3^_0x5c7d8c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x44ee48([0x74,0x68,0x65,0x6e])](_0x408f24)[_0x44ee48([0x63,0x61,0x74,0x63,0x68])](()=>{_0x408f24(_0x44ee48([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2acb6c=0x7370e433^_0x5c7d8c;function _0x1b2c70(){const _0x5934f1=_0x44ee48([0x6c,0x6c,0x63,0x74,0x2d])+_0x23f969(_0x245ec0(_0x419b6a)),_0x4e9295=_0x3a14fc(_0x23f969(window[_0x44ee48([0x4d,0x61,0x74,0x68])][_0x44ee48([0x63,0x65,0x69,0x6c])](_0x209a07/_0x2acb6c)));window[_0x44ee48([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x44ee48([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5934f1,_0x4e9295);}function _0x132ce2(){const _0x4a4c3d=_0x44ee48([0x6c,0x6c,0x63,0x74,0x2d])+_0x23f969(_0x245ec0(_0x419b6a)),_0x41b4f2=window[_0x44ee48([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x44ee48([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a4c3d);return _0x41b4f2?window[_0x44ee48([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a14fc(_0x41b4f2),0x10)*_0x2acb6c:null;}function _0x1a8d21(_0x41d6ae){return new window[(_0x44ee48([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x43b947,_0x2c3a88)=>{_0x41d6ae[_0x44ee48([0x74,0x68,0x65,0x6e])](_0x43b947,_0x2c3a88),window[_0x44ee48([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2c3a88,0x7347de73^_0x5c7d8c);});}}_0x37549c[_0x44ee48([0x6f,0x6e])](_0x44ee48([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x24ef71,_0x210e6a)=>{if(_0x210e6a[0x0]!=_0x419b6a)return _0x408f24(_0x44ee48([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x210e6a[0x1]={..._0x210e6a[0x1],[_0x44ee48([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x595919};},{[_0x44ee48([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x44ee48([0x68,0x69,0x67,0x68])}),_0x37549c[_0x44ee48([0x6f,0x6e])](_0x44ee48([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5db154=>{_0x5e875c(_0x5db154[_0x44ee48([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xd732b0=!0x0,_0xe8ff58(_0x5db154[_0x44ee48([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x44ee48([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x44ee48([0x6c,0x6f,0x77])}),_0xde3012[_0x44ee48([0x74,0x68,0x65,0x6e])](()=>{_0xd732b0||_0x408f24(_0x44ee48([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x10156c(){return _0x37549c[_0x44ee48([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44ee48([0x76,0x69,0x65,0x77])][_0x44ee48([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x44ee48([0x61,0x75,0x74,0x6f]);}function _0x5116e6(){_0x37549c[_0x44ee48([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44ee48([0x76,0x69,0x65,0x77])][_0x44ee48([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x44ee48([0x61,0x75,0x74,0x6f]);}}function _0x17b820(_0x2112a0){const _0x14ad6f=[new window[(_0x44ee48([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1e7bd8=>setTimeout(_0x1e7bd8,0x734f347f^_0x5c7d8c)),_0xde3012[_0x44ee48([0x74,0x68,0x65,0x6e])](()=>new window[(_0x44ee48([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4f8795=>{let _0x55c50f=0x0;_0x37549c[_0x44ee48([0x6d,0x6f,0x64,0x65,0x6c])][_0x44ee48([0x6f,0x6e])](_0x44ee48([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x19c488,_0x1dd18b)=>{_0x1dd18b[0x0][_0x44ee48([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x55c50f++,_0x55c50f==(0x73460f5b^_0x5c7d8c)&&(_0x4f8795(),_0x19c488[_0x44ee48([0x6f,0x66,0x66])]());});}))];return window[_0x44ee48([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x44ee48([0x72,0x61,0x63,0x65])](_0x14ad6f)[_0x44ee48([0x74,0x68,0x65,0x6e])](()=>_0x2112a0);}async function _0x75f240(){await _0xde3012,_0x37549c[_0x44ee48([0x6d,0x6f,0x64,0x65,0x6c])][_0x44ee48([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x8087b4,_0x37549c[_0x44ee48([0x6d,0x6f,0x64,0x65,0x6c])][_0x44ee48([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x8087b4,_0x37549c[_0x44ee48([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x44ee48([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1e133e(){return window[_0x44ee48([0x67,0x6c,0x6f,0x62])]&&window[_0x44ee48([0x67,0x6c,0x6f,0x62])][_0x44ee48([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x4b4d7d(){return _0x3825b9(_0x44ee48([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x49060d(_0x44ee48([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x44ee48([0x73,0x74,0x61,0x74,0x65])]==_0x44ee48([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x252f00(){return _0x3825b9(_0x44ee48([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 _0x293fc0(){return _0x3825b9(_0x44ee48([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5c3998(_0x4f6cb1){const _0x2b034f=_0x12d7b6();_0x37549c[_0x2b034f]=_0x44ee48([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4f6cb1,_0x4f6cb1!=_0x44ee48([0x56,0x61,0x6c,0x69,0x64])&&_0x75f240();}function _0x12d7b6(){const _0x583845=window[_0x44ee48([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x44ee48([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x44ee48([0x6e,0x6f,0x77])]())[_0x44ee48([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x44ee48([0x2e]),'');let _0x17c8b1=_0x44ee48([0x4b]);for(let _0x408b70=0x0;_0x408b70<_0x583845[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x408b70+=0x2){let _0xa020d1=window[_0x44ee48([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x583845[_0x44ee48([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x408b70,_0x408b70+0x2));_0xa020d1>=_0x287518[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xa020d1-=_0x287518[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x17c8b1+=_0x287518[_0xa020d1];}return _0x17c8b1;}function _0x309e3f(){const _0x2e7e1e=_0x86d9de[_0x44ee48([0x73,0x70,0x6c,0x69,0x74])](_0x44ee48([0x2e]));if(0x3!=_0x2e7e1e[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x49858f(_0x2e7e1e[0x1]);function _0x49858f(_0x37baf5){const _0x467a13=_0x58af6d(_0x37baf5);return _0x467a13&&_0x2e3391()?_0x467a13:null;function _0x2e3391(){const _0x30e747=_0x467a13[_0x44ee48([0x6a,0x74,0x69])],_0x5dd93a=window[_0x44ee48([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x30e747[_0x44ee48([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x30e747[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x466617={..._0x467a13,[_0x44ee48([0x6a,0x74,0x69])]:_0x30e747[_0x44ee48([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x30e747[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x466617[_0x44ee48([0x76,0x63])],_0x245ec0(_0x466617)==_0x5dd93a;}}}async function _0x1c04e5(){let _0x6b2f56=!0x0;try{const _0x1b24d0=_0x86d9de[_0x44ee48([0x73,0x70,0x6c,0x69,0x74])](_0x44ee48([0x2e])),[_0x135f4f,_0x347588,_0x47ad96]=_0x1b24d0;return _0x4a95a1(_0x135f4f),await _0x68394e(_0x135f4f,_0x347588,_0x47ad96),_0x6b2f56;}catch{return!0x1;}function _0x4a95a1(_0x5c323d){const _0x448902=_0x58af6d(_0x5c323d);_0x448902&&_0x448902[_0x44ee48([0x61,0x6c,0x67])]==_0x44ee48([0x45,0x53,0x32,0x35,0x36])||(_0x6b2f56=!0x1);}async function _0x68394e(_0x4404cb,_0x11081d,_0x3bebe3){const _0x5ea36f=window[_0x44ee48([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x44ee48([0x66,0x72,0x6f,0x6d])](_0x151d56(_0x3bebe3),_0x4bf592=>_0x4bf592[_0x44ee48([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xcf44ae=new window[(_0x44ee48([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x44ee48([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4404cb+_0x44ee48([0x2e])+_0x11081d),_0x4d25e1=window[_0x44ee48([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x44ee48([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4d25e1)return;const _0x48e2c1=await _0x4d25e1[_0x44ee48([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x44ee48([0x6a,0x77,0x6b]),_0x27eed5,{[_0x44ee48([0x6e,0x61,0x6d,0x65])]:_0x44ee48([0x45,0x43,0x44,0x53,0x41]),[_0x44ee48([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x44ee48([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x44ee48([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4d25e1[_0x44ee48([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x44ee48([0x6e,0x61,0x6d,0x65])]:_0x44ee48([0x45,0x43,0x44,0x53,0x41]),[_0x44ee48([0x68,0x61,0x73,0x68])]:{[_0x44ee48([0x6e,0x61,0x6d,0x65])]:_0x44ee48([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48e2c1,_0x5ea36f,_0xcf44ae)||(_0x6b2f56=!0x1);}}function _0x58af6d(_0x4e3b71){return _0x4e3b71[_0x44ee48([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x44ee48([0x65,0x79]))?JSON[_0x44ee48([0x70,0x61,0x72,0x73,0x65])](_0x151d56(_0x4e3b71)):null;}function _0x151d56(_0x45f8fd){return window[_0x44ee48([0x61,0x74,0x6f,0x62])](_0x45f8fd[_0x44ee48([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x44ee48([0x2b]))[_0x44ee48([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x44ee48([0x2f])));}function _0x245ec0(_0x5e6776){let _0x42ce67=0x1505;function _0x3041e6(_0x5dc4dd){for(let _0x20c1fb=0x0;_0x20c1fb<_0x5dc4dd[_0x44ee48([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20c1fb++){const _0x36428c=_0x5dc4dd[_0x44ee48([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x20c1fb);_0x42ce67=(_0x42ce67<<0x5)+_0x42ce67+_0x36428c,_0x42ce67&=_0x42ce67;}}function _0x16d11a(_0x429dae){Array[_0x44ee48([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x429dae)?_0x429dae[_0x44ee48([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x16d11a):_0x429dae&&typeof _0x429dae==_0x44ee48([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x44ee48([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x429dae)[_0x44ee48([0x73,0x6f,0x72,0x74])]()[_0x44ee48([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9a24ef,_0x16341c])=>{_0x3041e6(_0x9a24ef),_0x16d11a(_0x16341c);}):_0x3041e6(window[_0x44ee48([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x429dae));}return _0x16d11a(_0x5e6776),_0x42ce67>>>0x0;}function _0x23f969(_0x106488){return _0x106488[_0x44ee48([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x44ee48([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x44ee48([0x30]));}function _0x3a14fc(_0x4c7569){return _0x4c7569[_0x44ee48([0x73,0x70,0x6c,0x69,0x74])]('')[_0x44ee48([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x44ee48([0x6a,0x6f,0x69,0x6e])]('');}function _0x3825b9(_0x77a038){return _0x37549c[_0x44ee48([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x44ee48([0x68,0x61,0x73])](_0x77a038);}function _0x49060d(_0x1e2edf){return _0x37549c[_0x44ee48([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x44ee48([0x67,0x65,0x74])](_0x1e2edf);}function _0x8087b4(){}function _0x44ee48(_0xda7e0b){return _0xda7e0b['map'](_0x352ffb=>String['fromCharCode'](_0x352ffb))['join']('');}_0x5c3998(await _0x1ed61a());}(this);}['destroy'](){const _0x4d3c36=this['editor']['plugins']['get'](o),_0x1492c8=this['editor']['config']['get']('collaboration.channelId');for(const _0x26f67e of _0x4d3c36['getCommentThreads']({'channelId':_0x1492c8}))_0x4d3c36['_detachCommentThread'](_0x26f67e['id']),_0x4d3c36['_threads']['delete'](_0x26f67e['id']);super['destroy']();}['hasMarkerForId'](_0x282c55){return this['getAllMarkersForId'](_0x282c55)['length']>0x0;}['getAllMarkersForId'](_0x3451a4){const _0x5ba999=[];for(const _0x4b6fa6 of this['editor']['model']['markers'])_0x4b6fa6['name']['startsWith']('comment:'+_0x3451a4)&&_0x5ba999['push'](_0x4b6fa6);return _0x5ba999;}['scrollToThreadMarker'](_0x1c7b70){setTimeout(()=>{const _0x37f479=this['_getTargetForId'](_0x1c7b70);if(!_0x37f479)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x1c7b70&&nt({'target':_0x37f479[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x273948){this['editor']['model']['change'](()=>{for(const _0xeff34d of this['getAllMarkersForId'](_0x273948))this['editor']['editing']['reconvertMarker'](_0xeff34d);});}['_attachArchivedThread'](_0x3b17be){const _0x61b60e=this['editor']['plugins']['get'](o),_0x51a9f0=this['editor']['plugins']['get'](b),_0x1c94bb=_0x61b60e['getCommentThread'](_0x3b17be);if(!_0x1c94bb['isAttached']){const _0x281928=_0x1c94bb['attachTo'](()=>this['_getTargetForId'](_0x1c94bb['id']));_0x51a9f0['registerAnnotation'](_0x281928),_0x1c94bb['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x7293fe=this['editor'],_0x144275=_0x7293fe['plugins']['get'](it);_0x7293fe['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x151f11,_0x5529b2)=>{const {id:_0x24d906}=ft(_0x151f11['markerName']),_0x3c7500=_0x7293fe['plugins']['get'](o)['getCommentThread'](_0x24d906),_0x3c7221=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x24d906;let _0x52e315;if(_0x3c7500&&_0x3c7500['isResolved']&&!_0x3c7221&&_0x151f11['item'])return _0x5529b2['consumable']['consume'](_0x151f11['item'],'addMarker:'+_0x151f11['markerName']),_0x5529b2['consumable']['consume'](_0x151f11['item'],'removeMarker:'+_0x151f11['markerName']),null;const _0x55c69=['ck-comment-marker'];return _0x3c7221&&_0x55c69['push']('ck-comment-marker--active'),_0x52e315=_0x3c7500?.['length']?_0x3c7500['comments']['first']['author']['id']:_0x144275['me']['id'],{'classes':_0x55c69,'attributes':{'data-comment':_0x24d906,'data-author-id':_0x52e315}};}}),_0x7293fe['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x43fd33,{options:_0x3d92f5})=>{if(_0x3d92f5['showCommentHighlights'])return null;const _0x42bb7a=_0x7293fe['plugins']['get'](o),_0x4bb539=_0x7293fe['model']['markers']['get'](_0x43fd33),{id:_0x153046,part:_0x44de65}=ft(_0x43fd33);return _0x4bb539&&!_0x4bb539['affectsData']||_0x3d92f5['ignoreResolvedComments']&&_0x42bb7a['getCommentThread'](_0x153046)?.['isResolved']?null:{'group':'comment','name':_0x44de65?_0x153046+':'+_0x44de65:_0x153046};}}),_0x7293fe['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0xa14f98,{writer:_0x1f6497})=>_0x1f6497['createElement']('$marker',{'data-name':'comment:'+_0xa14f98['getAttribute']('id')})}),_0x7293fe['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x27267b=this['editor'],_0x56b2dd=_0x27267b['plugins']['get'](o),_0x5f0986=new Set(),_0x59c3ad=new Set();_0x27267b['model']['document']['registerPostFixer'](_0x45457c=>{let _0xf92f5c=!0x1;for(const {name:_0x2db8bf,data:_0x39bddd}of _0x27267b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1dca8b,id:_0x596b5d}=ft(_0x2db8bf);let _0x31b2ca=_0x39bddd['newRange'];if('comment'!==_0x1dca8b||!_0x31b2ca)continue;const _0x51e1d0='$graveyard'===_0x31b2ca['root']['rootName'];_0x51e1d0||(_0x31b2ca=ht(_0x31b2ca,_0x27267b['model']),!_0x31b2ca||_0x31b2ca['isCollapsed']||!_0x39bddd['newRange']||_0x31b2ca['isEqual'](_0x39bddd['newRange']))?_0x27267b['model']['hasContent'](_0x31b2ca)&&!_0x51e1d0?this['isThreadsLoadingPaused']?_0x5f0986['add'](_0x2db8bf):this['_handleThreadMarker'](_0x2db8bf,_0x596b5d):(_0x59c3ad['add'](_0x2db8bf),_0x5f0986['delete'](_0x2db8bf),_0x45457c['removeMarker'](_0x2db8bf),_0xf92f5c=!0x0):(_0x45457c['updateMarker'](_0x2db8bf,{'range':_0x31b2ca}),_0xf92f5c=!0x0);}return _0xf92f5c;}),this['on']('change:isThreadsLoadingPaused',(_0x258144,_0x586937,_0x17cc59)=>{if(!_0x17cc59&&_0x5f0986['size'])for(const _0x171cac of _0x5f0986){const {id:_0x6f6941}=ft(_0x171cac);_0x5f0986['delete'](_0x171cac),_0x27267b['model']['markers']['get'](_0x171cac)&&this['_handleThreadMarker'](_0x171cac,_0x6f6941);}}),this['listenTo'](_0x27267b['model']['document'],'change',()=>{for(const {name:_0x1e12f0,data:{newRange:_0x178402}}of _0x27267b['model']['document']['differ']['getChangedMarkers']()){const {group:_0x219b39,id:_0x43f0da}=ft(_0x1e12f0);if('comment'!==_0x219b39)continue;const _0xf12a09=_0x56b2dd['getCommentThread'](_0x43f0da),_0x529b60=this['hasMarkerForId'](_0x43f0da);_0xf12a09&&(!_0xf12a09['_hasTargetInContent']&&_0x178402&&_0x27267b['editing']['view']['once']('render',()=>{const _0x57234a=_0x27267b['plugins']['get'](y),_0x9cd40c=_0x56b2dd['_threadToController']['get'](_0xf12a09)['view'];_0x57234a['getByInnerView'](_0x9cd40c)['refreshVisibility']();},{'priority':'low'}),_0xf12a09['_hasTargetInContent']=_0x529b60||!!_0x178402),_0x178402||(_0x59c3ad['add'](_0x1e12f0),_0x5f0986['delete'](_0x1e12f0));}for(const _0x4e1318 of _0x59c3ad){const {id:_0x2a717d}=ft(_0x4e1318),_0x323155=_0x56b2dd['getCommentThread'](_0x2a717d);if(_0x5f0986['delete'](_0x4e1318),!_0x323155)continue;const _0x282d8c=this['hasMarkerForId'](_0x2a717d);_0x282d8c||_0x323155['isSubmitted']?_0x282d8c||_0x323155['unlinkedAt']||_0x323155['setUnlinkedAt'](new Date()):_0x323155['remove']();}_0x59c3ad['clear']();});}['_handleInitialThreads'](_0x3b3fde){_0x3b3fde['forEach'](_0x51c2b0=>{_0x51c2b0['unlinkedAt']&&this['_attachArchivedThread'](_0x51c2b0['id']);});}['_getTargetForId'](_0x30371a){const _0xefcd8c=this['editor'],_0x1d7a1c=this['getAllMarkersForId'](_0x30371a);return et(_0xefcd8c['editing'],_0x1d7a1c);}['_getTextContext'](_0x4a7fed){const _0x1c5df4=this['getAllMarkersForId'](_0x4a7fed);let _0x825ae4='',_0x3ee305=!0x1;for(const _0x3b8efe of _0x1c5df4){const _0x4c3be4=_0x3b8efe['getRange']();for(const _0x49c89d of Array['from'](_0x4c3be4['getItems']()))_0x49c89d['is']('$textProxy')?(_0x825ae4&&_0x3ee305&&(_0x825ae4+='\x20',_0x3ee305=!0x1),_0x825ae4+=_0x49c89d['data']):_0x3ee305=!0x0;_0x3ee305=!0x0;}return _0x825ae4['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3a4d53,_0x4cc038){const _0x32ca53=this['editor'],_0x1d6649=_0x32ca53['plugins']['get'](o);let _0x3405e6=_0x1d6649['getCommentThread'](_0x4cc038);const _0x5e53d1=_0x32ca53['config']['get']('collaboration.channelId'),_0x46f504=_0x32ca53['plugins']['get'](b);if(_0x3405e6&&(_0x3405e6['unlinkedAt']&&_0x3405e6['setUnlinkedAt'](null),_0x3405e6['isAttached']))return _0x3405e6;return!this['getAllMarkersForId'](_0x4cc038)[0x0]['managedUsingOperations']?_0x32ca53['editing']['view']['once']('render',()=>{if(_0x1d6649['getCommentThread'](_0x4cc038))return;const _0x330e50=_0x32ca53['plugins']['get'](y);_0x3405e6=_0x1d6649['openNewCommentThread']({'channelId':_0x5e53d1,'threadId':_0x4cc038,'target':()=>this['_getTargetForId'](_0x4cc038),'context':{'type':'text','value':this['_getTextContext'](_0x4cc038)}});const _0x501ae1=_0x1d6649['_threadToController']['get'](_0x3405e6)['view'],_0x434401=_0x330e50['getByInnerView'](_0x501ae1);_0x434401&&_0x46f504['registerAnnotation'](_0x434401);},{'priority':'low'}):_0x1d6649['fetchCommentThread']({'channelId':_0x5e53d1,'threadId':_0x4cc038})['then'](_0x4eea88=>{if('destroyed'!==_0x32ca53['state']){if(_0x3405e6=_0x4eea88,_0x3405e6&&!_0x3405e6['isAttached']){const _0x594a91=_0x3405e6['attachTo'](()=>this['_getTargetForId'](_0x4cc038));_0x46f504['registerAnnotation'](_0x594a91),_0x3405e6['isResolved']&&this['_reconvertMarkers'](_0x4cc038);}else{if(!_0x3405e6){const _0x1e4a00=this['getAllMarkersForId'](_0x4cc038);_0x32ca53['model']['change'](_0xe88996=>{for(const _0x2d6fa0 of _0x1e4a00)_0xe88996['removeMarker'](_0x2d6fa0);});}}}}),_0x3405e6;}['_handleThreadMarker'](_0x27020f,_0x5e0526){const _0x53471b=this['_attachMarkerToThread'](_0x27020f,_0x5e0526);_0x53471b&&!_0x53471b['context']&&_0x53471b['setContext']({'type':'text','value':this['_getTextContext'](_0x5e0526)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4781c5=this['editor'];rt(_0x4781c5['model'],({left:_0x415b8a,entered:_0x2edcca})=>{for(const _0x2d65e7 of _0x415b8a)if(mt(_0x2d65e7)){_0x4781c5['ui']['ariaLiveAnnouncer']['announce'](N(_0x4781c5['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xf9cf24 of _0x2edcca)if(mt(_0xf9cf24)){_0x4781c5['ui']['ariaLiveAnnouncer']['announce'](N(_0x4781c5['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x2f354e)));break;}});}}function dt(_0x4dc928,_0x194929){return _0x194929?_0x4dc928+':'+_0x194929:_0x4dc928;}function ht(_0x331359,_0x4a7ccd){const _0x429b45=_0x4a7ccd['schema'],_0x19cbd3=_0x4a7ccd['createRange'](_0x331359['start']);for(const _0x42b1e6 of _0x331359['getWalker']()){const {type:_0x1cebe9,item:_0x321721,nextPosition:_0x205483}=_0x42b1e6;if('text'===_0x1cebe9||_0x429b45['isObject'](_0x321721)){const _0x44f12a=_0x4a7ccd['createPositionBefore'](_0x321721);_0x19cbd3['isCollapsed']&&(_0x19cbd3['start']=_0x44f12a),_0x19cbd3['end']=_0x205483;}}return _0x19cbd3;}function mt(_0x265120){return'comment'===ft(_0x265120['name'])['group'];}class s extends _0x4aad6f{['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 _0x268a15=this['editor'],_0x5010b7=_0x268a15['plugins']['get'](o),_0x301890=_0x268a15['plugins']['get'](r),_0x44f499=_0x268a15['plugins']['get'](y),_0x2c64d5=_0x268a15['plugins']['get'](b);_0x268a15['ui']['componentFactory']['add']('comment',()=>{const _0x2a50d4=this['_createUIButton'](_0x235388);return _0x2a50d4['tooltip']=!0x0,_0x2a50d4;}),_0x268a15['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0xba86ba)),_0x2c64d5['addSourceCollector'](()=>{const _0x28a0d4=[];for(const [_0x1c2398,_0x3f443d]of _0x5010b7['_threadToController']){const _0x4e24b8=_0x301890['getAllMarkersForId'](_0x1c2398['id']),_0x107bad=_0x4e24b8['map'](_0x122749=>_0x122749['getRange']());_0x4e24b8['length']>0x0&&_0x28a0d4['push']([_0x3f443d['view'],_0x107bad]);}return _0x28a0d4;}),this['listenTo'](_0x44f499,'change:activeAnnotations',(_0x1ace61,_0x424737,_0x394e30)=>{const _0x5aeb10=Array['from'](_0x394e30)['map'](_0x55d325=>_0x55d325['innerView'])['find'](_0x2f4824=>_0x5010b7['_viewToController']['has'](_0x2f4824));if(!_0x5aeb10)return void(_0x301890['activeMarker']=null);const _0x53dddc=_0x5010b7['_viewToController']['get'](_0x5aeb10)['model']['id'],_0x5f4770='comment:'+_0x53dddc;_0x53dddc&&_0x301890['hasMarkerForId'](_0x53dddc)?_0x301890['activeMarker']=_0x5f4770:_0x301890['activeMarker']&&(_0x301890['activeMarker']=null);}),this['listenTo'](_0x5010b7,'removeCommentThread',(_0x3e105f,{threadId:_0x48a385,isFromAdapter:_0x2390ee})=>{!_0x2390ee&&_0x268a15['ui']['focusTracker']['isFocused']&&_0x301890['hasMarkerForId'](_0x48a385)&&_0x268a15['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5010b7,'addComment',(_0x5f5c6c,{threadId:_0x5e1a49,isFromAdapter:_0x59a278})=>{if(_0x59a278||!_0x301890['hasMarkerForId'](_0x5e1a49)||!_0x5010b7['hasCommentThread'](_0x5e1a49))return;0x1===_0x5010b7['getCommentThread'](_0x5e1a49)['length']&&(_0x268a15['editing']['view']['focus'](),_0x5f5c6c['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x39cb69=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x55fcef;for(const _0x58e3c4 in _0x39cb69){const _0x42877b=_0x58e3c4,_0x240f0a=_0x39cb69[_0x42877b];if('commentsLicenseKeyValid'==_0x240f0a||'commentsLicenseKeyInvalid'==_0x240f0a||'commentsLicenseKeyExpired'==_0x240f0a||'commentsLicenseKeyDomainLimit'==_0x240f0a||'commentsLicenseKeyNotAllowed'==_0x240f0a||'commentsLicenseKeyEvaluationLimit'==_0x240f0a||'commentsLicenseKeyUsageLimit'==_0x240f0a){delete _0x39cb69[_0x42877b],_0x55fcef=_0x240f0a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x55fcef&&_0x39cb69['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x55fcef&&_0x39cb69['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x55fcef&&_0x39cb69['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x55fcef&&_0x39cb69['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x55fcef&&_0x39cb69['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x55fcef&&_0x39cb69['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2e1a88){const _0x502589=this['editor'],_0x2ef420=new _0x2e1a88(_0x502589['locale']),_0x36eebe=_0x502589['commands']['get']('addCommentThread');return _0x2ef420['set']({'label':N(_0x502589['locale'],'Comment'),'icon':_0x3065db}),_0x2ef420['bind']('isEnabled')['to'](_0x36eebe,'isEnabled',_0x36eebe,'hasContent',(_0x3acd9e,_0x38b0fa)=>_0x3acd9e&&_0x38b0fa),this['listenTo'](_0x2ef420,'execute',()=>{_0x36eebe['execute']();}),_0x2ef420;}}class i extends _0x4aad6f{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x13abf2){super(_0x13abf2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x26d33d,_0x116742,_0x95e9ed)=>{_0x95e9ed?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x50e992,_0x321b96]of this['editor']['commands'])_0x321b96['affectsData']&&'addCommentThread'!==_0x50e992&&_0x321b96['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x26691a=this['editor']['editing']['view']['document'];this['listenTo'](_0x26691a,'cut',_0x54d2a0=>_0x54d2a0['stop'](),{'priority':'highest'}),this['listenTo'](_0x26691a,'clipboardInput',_0x5905c4=>_0x5905c4['stop'](),{'priority':'highest'}),this['listenTo'](_0x26691a,'delete',_0xc116bb=>_0xc116bb['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1cf7d1,_0x5d624c]of this['editor']['commands'])_0x5d624c['affectsData']&&'addCommentThread'!==_0x1cf7d1&&_0x5d624c['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x4427fc{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51a43c){super(_0x51a43c),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4b48b4=this['context']['plugins']['get'](y);this['listenTo'](_0x4b48b4,'_activateAnnotation',(_0x205401,_0x584840)=>{for(const _0x5d465d of this['activeUIs']){const _0x1f051b=this['_uis']['get'](_0x5d465d);(0x0,this['uisData']['get'](_0x5d465d)['filter'])(_0x584840)&&_0x1f051b['setActiveAnnotation'](_0x584840);}}),this['listenTo'](_0x4b48b4,'_deactivateAllAnnotations',()=>{for(const _0x1bda45 of this['activeUIs']){this['_uis']['get'](_0x1bda45)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4b48b4['_visibleAnnotations'],'add',(_0x114ebc,_0x2d2b57)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2d2b57);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x42f4e6){return this['activeUIs']['has'](_0x42f4e6);}['activate'](_0xdf773e,_0x5b1fb1=this['defaultFilter']){const _0x5b2ffd=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0xdf773e))throw new _0x1be892('annotationsuis-missing-ui',this,{'uiName':_0xdf773e});this['isActive'](_0xdf773e)&&this['deactivate'](_0xdf773e),this['activeUIs']['add'](_0xdf773e);const _0xa3279=new S();v({'source':_0x5b2ffd['_visibleAnnotations'],'target':_0xa3279,'filter':_0x5b1fb1}),this['uisData']['set'](_0xdf773e,{'collection':_0xa3279,'filter':_0x5b1fb1});const _0xde6c0d=this['_uis']['get'](_0xdf773e);_0xde6c0d['attach'](_0xa3279),this['listenTo'](_0xde6c0d,'change:activeAnnotation',(_0x10f459,_0x498580,_0x27be5f,_0x412710)=>{_0x412710&&_0x5b2ffd['_removeActiveAnnotation'](_0x412710),_0x27be5f&&_0x5b2ffd['_addActiveAnnotation'](_0x27be5f);});}['deactivate'](_0x2a9fc6){if(this['activeUIs']['delete'](_0x2a9fc6),!this['_uis']['has'](_0x2a9fc6))throw new _0x1be892('annotationsuis-missing-ui',this,{'uiName':_0x2a9fc6});const _0xdc7571=this['_uis']['get'](_0x2a9fc6);_0xdc7571['detach'](),this['stopListening'](_0xdc7571),this['uisData']['get'](_0x2a9fc6)['collection']['destroy'](),this['uisData']['delete'](_0x2a9fc6);}['switchTo'](_0xb8f76e){if(!this['_uis']['has'](_0xb8f76e))throw new _0x1be892('annotationsuis-missing-ui',this,{'uiName':_0xb8f76e});const _0x201457=this['context']['plugins']['get'](y),_0x4517fe=Array['from'](_0x201457['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xb8f76e);const _0x16e9a6=this['_uis']['get'](_0xb8f76e);_0x16e9a6['setActiveAnnotation'](_0x4517fe),_0x16e9a6['_setSelectedAnnotations']&&_0x4517fe&&_0x16e9a6['_setSelectedAnnotations']([_0x4517fe]);}['deactivateAll'](){for(const _0x451bc9 of this['activeUIs'])this['deactivate'](_0x451bc9);}['register'](_0x240912,_0x4df160){if(this['_uis']['has'](_0x240912))throw new _0x1be892('annotationsuis-register-already-registered');if('function'!=typeof _0x4df160['attach']||'function'!=typeof _0x4df160['detach']||'function'!=typeof _0x4df160['setActiveAnnotation'])throw new _0x1be892('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x240912,_0x4df160);}['refilterAnnotations'](){const _0x3c84e5=this['context']['plugins']['get'](y)['collection'],_0x4c5aba=new Map(),_0x3e26cd=Array['from'](this['activeUIs']);for(const _0x18b848 of this['activeUIs']){const _0x2c7fd6=this['uisData']['get'](_0x18b848)['collection'];for(const _0x799fd4 of _0x2c7fd6)_0x4c5aba['set'](_0x799fd4,_0x18b848);}for(const _0x974227 of _0x3c84e5){const _0x2f4ac4=_0x4c5aba['get'](_0x974227);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x974227);const _0x4d2d08=_0x3e26cd['find'](_0x295632=>this['uisData']['get'](_0x295632)['filter'](_0x974227));_0x2f4ac4!==_0x4d2d08&&(_0x2f4ac4&&this['uisData']['get'](_0x2f4ac4)['collection']['remove'](_0x974227),_0x4d2d08&&this['uisData']['get'](_0x4d2d08)['collection']['add'](_0x974227));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x349af3){const _0xade07b=[];for(const _0x5f1dd7 of this['activeUIs']){(0x0,this['uisData']['get'](_0x5f1dd7)['filter'])(_0x349af3)&&_0xade07b['push'](_0x5f1dd7);}if(_0xade07b['length']>0x1)throw new _0x1be892('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xade07b,'annotationType':_0x349af3['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x342184){super(_0x342184);const _0x53b281=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 _0x1b869f(),this['focusCycler']=new _0xba4b7f({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x53b281['to']('class')],'style':{'minHeight':_0x53b281['to']('minHeight',_0x50cf61=>'number'==typeof _0x50cf61?_i(_0x50cf61+0xa):null)},'dir':_0x342184['uiLanguageDirection'],'role':'application','aria-label':N(_0x342184,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x342184,'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',_0x2c706d=>{this['_updateItemPositionInFocusables'](_0x2c706d['source']);}),this['list']['forEach'](_0x3315b3=>{this['focusTracker']['add'](_0x3315b3['element']),this['_updateItemPositionInFocusables'](_0x3315b3);}),this['list']['on']('change',(_0x2756e3,_0x5648b1)=>{for(const _0x212617 of _0x5648b1['removed'])this['focusTracker']['remove'](_0x212617['element']),this['focusables']['remove'](_0x212617);for(const _0x3550ea of _0x5648b1['added'])this['focusTracker']['add'](_0x3550ea['element']),this['_updateItemPositionInFocusables'](_0x3550ea);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0xccb204){const _0x5c0db0=this['focusables']['getIndex'](_0xccb204);let _0x311f80,_0x58485d;for(const _0x10fd80 of this['focusables'])if(_0xccb204['top']<_0x10fd80['top']){_0x311f80=_0x10fd80;break;}if(_0x58485d=_0x311f80?this['focusables']['getIndex'](_0x311f80):this['focusables']['length'],-0x1!==_0x5c0db0){if(_0x5c0db0===_0x58485d-0x1)return;this['focusables']['remove'](_0xccb204),_0x58485d=_0x311f80?this['focusables']['getIndex'](_0x311f80):this['focusables']['length'];}this['focusables']['add'](_0xccb204,_0x58485d);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4b6fa4){super(_0x4b6fa4),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x1e6e7c,_0x3dba17)=>_0x1e6e7c+_0x3dba17),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x163c5f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x163c5f['to']('isAnimationDisabled',_0x29d5c1=>_0x29d5c1?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x163c5f['to']('top',_0x59ffc5=>Ot(_0x59ffc5))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3d96e0=this['element']['clientHeight'];_0x3d96e0&&(this['height']=_0x3d96e0);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4427fc{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x572498){super(_0x572498),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 _0x43d7c3=this['context']['config']['get']('sidebar.container');_0x43d7c3&&this['setContainer'](_0x43d7c3);}['setContainer'](_0x3ceee8){if(!g(_0x3ceee8))throw new _0x1be892('sidebar-setcontainer-invalid-element');this['container']=_0x3ceee8;}['_attachToContainer']({viewClass:_0x5b9266='',spaceBetweenItems:_0x9504cb=0x19}={}){if(!g(this['container']))throw new _0x1be892('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5b9266,this['_spaceBetweenItems']=_0x9504cb;}['rearrange']({removedAnnotation:_0x5a3850,previousAnnotation:_0x2084fb,nextAnnotation:_0x2ed52c}){const _0x1bf9c8=this['getSidebarItemView'](_0x5a3850);this['view']['list']['remove'](_0x1bf9c8),this['_destroySidebarItemView'](_0x5a3850),_0x2084fb&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2084fb)),_0x2ed52c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2ed52c)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x519bdf,activatedAnnotation:_0x28371a,disableAnimationOnActivatedAnnotation:_0x1235a}){if(this['_activeAnnotation']=_0x28371a,_0x519bdf){_0x519bdf['isActive']=!0x1;const _0x55f47f=this['getSidebarItemView'](_0x519bdf);_0x55f47f&&_0x1235a&&(_0x55f47f['isAnimationDisabled']=!0x1);}if(_0x28371a){const _0x35bb81=this['getSidebarItemView'](_0x28371a);_0x35bb81&&(_0x28371a['isActive']=!0x0,_0x1235a&&(_0x35bb81['isAnimationDisabled']=!0x0,_0x35bb81['top']+=0x1),this['_alignToTargetRect'](_0x35bb81));}}['_detachFromContainer'](_0x506d31){if(this['view']['element']['remove'](),_0x506d31){for(const _0x244319 of _0x506d31)this['_destroySidebarItemView'](_0x244319);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x10ebbb,_0x56eb2e){_0x56eb2e||(_0x56eb2e=_0x10ebbb['view']);const _0x10ee67=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x10ee67,_0x10ebbb),this['_annotationToSidebarItemView']['set'](_0x10ebbb,_0x10ee67),_0x10ee67['content']['add'](_0x56eb2e),this['listenTo'](_0x10ebbb['view'],'change:targetRect',(_0x565c92,_0x5ee647,_0x2f4222)=>{const _0xb037dd=this['_getTargetTop'](_0x10ebbb,_0x2f4222);_0x10ee67['_targetTop']!=_0xb037dd&&(_0x10ee67['_targetTop']=_0xb037dd,this['_setItemTop'](_0x10ee67,_0xb037dd));}),this['listenTo'](_0x10ee67,'change:top',()=>{this['_recalculate'](_0x10ee67,'top');}),this['listenTo'](_0x10ee67,'change:bottom',()=>{this['_recalculate'](_0x10ee67,'bottom');}),this['_alignToTargetRect'](_0x10ee67);const _0x203816=this['_getItemBefore'](_0x10ee67);if(_0x203816)this['_alignAfterItem'](_0x203816,_0x10ee67)||this['_alignToTargetRect'](_0x10ee67);else this['_alignToTargetRect'](_0x10ee67);return this['_updateLastItem'](),this['view']['list']['add'](_0x10ee67),_0x10ee67;}['_alignForTopChange'](_0x43fb0f){if(!_0x43fb0f['content']['length'])return;const _0x36e977=this['_getItemBefore'](_0x43fb0f);if(!_0x36e977)return;const _0x1c3c08=this['_sidebarItemViewToAnnotation']['get'](_0x36e977),_0x111340=this['_activeAnnotation'];_0x111340&&_0x111340===_0x1c3c08?this['_alignAfterItem'](_0x36e977,_0x43fb0f):this['_alignBeforeItem'](_0x43fb0f,_0x36e977);}['_alignForBottomChange'](_0x4b6371){if(!_0x4b6371['content']['length'])return;const _0x4b8ab6=this['_getItemAfter'](_0x4b6371);if(!_0x4b8ab6)return;const _0x213f7f=this['_sidebarItemViewToAnnotation']['get'](_0x4b8ab6),_0xf62cba=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x350fe5=this['_activeAnnotation'];_0x350fe5&&_0x350fe5===_0x213f7f&&_0xf62cba?(this['_alignBeforeItem'](_0x4b8ab6,_0x4b6371),this['_alignAfterItem'](_0x4b6371,_0x4b8ab6)):_0x350fe5&&_0x350fe5===_0x213f7f?this['_alignBeforeItem'](_0x4b8ab6,_0x4b6371):this['_alignAfterItem'](_0x4b6371,_0x4b8ab6);}['_recalculate'](_0x23fd99,_0x52cb3b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x92ff1b,changedProp:_0x5e6a4f}of this['_recalculateBuffer'])'top'===_0x5e6a4f?this['_alignForTopChange'](_0x92ff1b):this['_alignForBottomChange'](_0x92ff1b);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x23fd99,'changedProp':_0x52cb3b});}['getSidebarItemView'](_0x9dd900){return this['_annotationToSidebarItemView']['get'](_0x9dd900);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2fe2ad){const _0xf02ac0=this['getSidebarItemView'](_0x2fe2ad);this['stopListening'](_0xf02ac0),this['stopListening'](_0x2fe2ad['view']),_0xf02ac0['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2fe2ad),this['_sidebarItemViewToAnnotation']['delete'](_0xf02ac0);}['_createSidebarView'](){const _0x420a01=new H(this['context']['locale']);return _0x420a01['render'](),this['on']('change:_lastItem',(_0x48e931,_0x3e10ab,_0x113df1,_0x1aa744)=>{_0x1aa744&&_0x420a01['unbind']('minHeight'),_0x113df1?_0x420a01['bind']('minHeight')['to'](_0x113df1,'bottom'):_0x420a01['minHeight']=null;}),_0x420a01;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3bd121){const _0x4a5d5d=this['_sidebarItemViewToAnnotation']['get'](_0x3bd121),_0x36c64d=_0x4a5d5d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4a5d5d)-0x1);return _0x36c64d&&this['getSidebarItemView'](_0x36c64d)||null;}['_getItemAfter'](_0x35e837){const _0x5a82f4=this['_sidebarItemViewToAnnotation']['get'](_0x35e837),_0x16dc07=_0x5a82f4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5a82f4)+0x1);return _0x16dc07&&this['getSidebarItemView'](_0x16dc07)||null;}['_alignBeforeItem'](_0x462731,_0x1daf32){_0x462731['updateHeight']();const _0x3df9b6=G(_0x1daf32['bottom']+this['_spaceBetweenItems'],_0x462731['top']);return!!_0x3df9b6&&(this['_setItemTop'](_0x1daf32,_0x1daf32['top']-_0x3df9b6),!0x0);}['_alignAfterItem'](_0x16d785,_0x13f0c4){_0x16d785['updateHeight']();const _0x262ebb=G(_0x16d785['bottom']+this['_spaceBetweenItems'],_0x13f0c4['top']);return!!_0x262ebb&&(this['_setItemTop'](_0x13f0c4,_0x13f0c4['top']+_0x262ebb,!0x1),!0x0);}['_alignToTargetRect'](_0x3310d4){const _0x1a5ab6=this['_sidebarItemViewToAnnotation']['get'](_0x3310d4);if(!_0x1a5ab6||!_0x1a5ab6['target']||!_0x1a5ab6['targetRect'])return;const _0x4ec188=this['_getTargetTop'](_0x1a5ab6,_0x1a5ab6['targetRect']);this['_setItemTop'](_0x3310d4,_0x4ec188);}['_getTargetTop'](_0x6bd44a,_0x30b25f){if(null===_0x30b25f)return 0x0;if(_0x6bd44a['target']instanceof _0x482e1e)return _0x30b25f['top'];{const _0x38174a=new _0x482e1e(this['view']['element'])['top'];return _0x30b25f['top']-_0x38174a;}}['_setItemTop'](_0x1f0a51,_0x14bef3,_0x421509=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x421509&&(_0x14bef3=Math['max'](_0x14bef3,this['_getMaxAvailableTop'](_0x1f0a51))),_0x1f0a51['top']=_0x14bef3;}['_getMaxAvailableTop'](_0x3775e1){let _0x16ed65=this['_getItemBefore'](_0x3775e1),_0x1e9c7e=0x0;for(;_0x16ed65;)_0x16ed65['updateHeight'](),_0x1e9c7e+=this['_spaceBetweenItems']+_0x16ed65['height'],_0x16ed65=this['_getItemBefore'](_0x16ed65);return _0x1e9c7e;}}function G(_0x185f31,_0x47ff3f){return Math['max'](_0x185f31-_0x47ff3f,0x0);}function g(_0x4fdc0c){return null!==_0x4fdc0c&&'object'==typeof _0x4fdc0c&&0x1===_0x4fdc0c['nodeType'];}class e extends _0x4427fc{['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(_0x3366d0){super(_0x3366d0),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x359f6f(),this['_refreshPositioningDebounced']=_0x4d37e2(()=>{_0x3366d0['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x11d470=this['context']['plugins']['get'](j),_0x27d576=this['context']['plugins']['get'](z);_0x11d470['register']('wideSidebar',this),_0x27d576['container']&&_0x11d470['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x260680){if(_0x260680===this['activeAnnotation'])return;const _0x384c95=this['context']['plugins']['get'](z);_0x384c95['_activeAnnotation']=_0x260680;const _0x28a82b=this['activeAnnotation'];_0x384c95['refresh']({'blurredAnnotation':_0x28a82b,'activatedAnnotation':_0x260680}),this['activeAnnotation']=_0x260680;}['attach'](_0xad9252){this['annotations']=_0xad9252;const _0x1039eb=this['context']['plugins']['get'](z);if(_0x1039eb['_annotations']=_0xad9252,this['isAttached'])throw new _0x1be892('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1039eb,'set:container',()=>{this['detach'](),this['listenTo'](_0x1039eb,'change:container',_0x498690=>{_0x498690['off'](),this['attach'](_0xad9252);});}),_0x1039eb['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3dc3d7=_0x119a56=>{_0x119a56['updateTargetRect'](),_0x1039eb['addAnnotation'](_0x119a56);};for(const _0x43577d of _0xad9252)_0x3dc3d7(_0x43577d);this['listenTo'](_0xad9252,'add',(_0x43b93f,_0x3113a9)=>{_0x3dc3d7(_0x3113a9);}),this['listenTo'](_0xad9252,'remove',(_0x24eef6,_0x16cd44,_0x3f1fa4)=>{_0x1039eb['rearrange']({'removedAnnotation':_0x16cd44,'previousAnnotation':_0xad9252['get'](_0x3f1fa4-0x1),'nextAnnotation':_0xad9252['get'](_0x3f1fa4+0x1)}),_0x16cd44===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xad9252,'focus',(_0x8bc5e7,_0x1b19d9)=>{this['setActiveAnnotation'](_0x1b19d9);}),this['listenTo'](_0xad9252,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1efdfb=this['context']instanceof _0x1819ae?this['context']['editors']:new _0x359f6f([this['context']]);for(const _0xfccaf7 of _0x1efdfb)this['_integrateWithEditorAnnotations'](_0xfccaf7);this['listenTo'](_0x1efdfb,'add',(_0x5cfbeb,_0x37f914)=>{this['listenTo'](_0x37f914,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x37f914);});}),this['listenTo'](_0x1efdfb,'remove',(_0x4fa726,_0x4fc468)=>{_0x4fc468['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4fc468['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x1be892('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1fdaf1=this['context']['plugins']['get'](z);_0x1fdaf1['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1fdaf1),this['stopListening'](this['annotations']),this['context']instanceof _0x1819ae&&this['stopListening'](this['context']['editors']);for(const _0x5a35de of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5a35de);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2f653b){if(!_0x2f653b['plugins']['has']('EditorAnnotations'))return;const _0xe7d1a9=_0x2f653b['plugins']['get']('EditorAnnotations'),_0x4116a7=()=>{const _0xb29f87=_0xe7d1a9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0xb29f87[0x0]||null);};this['listenTo'](_0xe7d1a9,'refresh',_0x4116a7),this['listenTo'](_0xe7d1a9,'blur',(_0x38f428,{isAnnotationTracked:_0x29c485})=>{this['activeAnnotation']&&_0x29c485(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe7d1a9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5daf00=>{_0xe7d1a9['hasDomSelection']()&&(_0x4116a7(),_0x5daf00['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xe7d1a9);}['_destroyEditorAnnotationsIntegration'](_0x1021ca){this['stopListening'](_0x1021ca),this['_editorAnnotations']['remove'](_0x1021ca);}}class C extends _0x235388{['counterView'];constructor(_0x477754){super(_0x477754);const _0x5b442d=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x388ad8,_0x4863d5)=>_0x388ad8?'...':_0x4863d5['toString']()),this['set']('annotationType',''),this['icon']=_0x3065db,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5b442d['to']('annotationType',_0x1ce5bc=>'ck-annotation-counter__badge--'+_0x1ce5bc),_0x5b442d['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5b442d['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4427fc{['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(_0x2f4c48){super(_0x2f4c48),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3bfb52())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x359f6f(),this['_refreshPositioningDebounced']=_0x4d37e2(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x1d7182(this['context']['locale']),this['balloonPanelView']=new _0x1c777c(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2bc813){this['annotations']=_0x2bc813;const _0x40c5a2=this['context']['plugins']['get'](z),_0x33d609=this['balloonPanelView'];if(_0x40c5a2['_annotations']=_0x2bc813,this['isAttached'])throw new _0x1be892('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x40c5a2,'set:container',()=>{this['detach'](),this['listenTo'](_0x40c5a2,'change:container',_0x2b9247=>{_0x2b9247['off'](),this['attach'](_0x2bc813);});}),_0x40c5a2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x37784b=_0xa5bc99=>{const _0x39e651=new C(this['context']['locale']);_0x40c5a2['addAnnotation'](_0xa5bc99,_0x39e651),this['_annotationToNarrowView']['set'](_0xa5bc99,_0x39e651),_0x39e651['bind']('isDirty','annotationType','number')['to'](_0xa5bc99['view'],'isDirty','type','length'),_0x39e651['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x33d609['content']['first']!==_0xa5bc99['view']?(this['_showBalloon'](_0xa5bc99),_0xa5bc99['view']['element']['focus'](),this['setActiveAnnotation'](_0xa5bc99)):this['setActiveAnnotation'](null);});};for(const _0x33c13d of _0x2bc813)_0x37784b(_0x33c13d);this['listenTo'](_0x2bc813,'add',(_0x502df8,_0x5b30a2)=>{_0x37784b(_0x5b30a2);}),this['listenTo'](_0x2bc813,'remove',(_0xe37158,_0x437950,_0x270005)=>{this['_annotationToNarrowView']['get'](_0x437950)['destroy'](),this['_annotationToNarrowView']['delete'](_0x437950),_0x40c5a2['rearrange']({'removedAnnotation':_0x437950,'previousAnnotation':_0x2bc813['get'](_0x270005-0x1),'nextAnnotation':_0x2bc813['get'](_0x270005+0x1)}),_0x437950===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2bc813,'focus',(_0x23a927,_0x306f47)=>{this['setActiveAnnotation'](_0x306f47);}),this['listenTo'](_0x2bc813,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2cb399,_0x1ac7a1)=>{_0x1ac7a1['keyCode']===_0x3d471d['esc']&&_0x33d609['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x33d609['content']['first']),this['_hideBalloon'](),_0x1ac7a1['stopPropagation'](),_0x1ac7a1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x4d77d9,_0x42f147)=>{const _0xdb88cb=_0x42f147['target'];_0x33d609['isVisible']&&_0x33d609['element']['contains'](_0xdb88cb)||_0x40c5a2['view']['element']['contains'](_0xdb88cb)||_0x4d77d9['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x469d24=>_0x469d24['contains'](_0xdb88cb))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xdb93b2=this['context']instanceof _0x1819ae?this['context']['editors']:new _0x359f6f([this['context']]);for(const _0x514d4f of _0xdb93b2)this['_integrateWithEditorAnnotations'](_0x514d4f);this['listenTo'](_0xdb93b2,'add',(_0x287874,_0x385050)=>{this['listenTo'](_0x385050,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x385050);});}),this['listenTo'](_0xdb93b2,'remove',(_0x471340,_0x43d218)=>{_0x43d218['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x43d218['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x56aca4){if(_0x56aca4===this['activeAnnotation'])return;const _0x5daccf=this['context']['plugins']['get'](z);if(_0x5daccf['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x56aca4,'disableAnimationOnActivatedAnnotation':!0x0}),_0x56aca4)_0x5daccf['getSidebarItemView'](_0x56aca4)?this['_showBalloon'](_0x56aca4):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x56aca4;}['detach'](){if(!this['isAttached'])throw new _0x1be892('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4249af=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x343655=>_0x343655['destroy']()),this['_annotationToNarrowView']['clear'](),_0x4249af['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1819ae&&this['stopListening'](this['context']['editors']);for(const _0x3ed9fc of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3ed9fc);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'](_0x19eff3){if(!_0x19eff3['plugins']['has']('EditorAnnotations'))return;const _0x4ec7c6=_0x19eff3['plugins']['get']('EditorAnnotations'),_0x1b20cf=this['context']['plugins']['get'](z),_0x31bdb2=this['annotations'],_0x48a1fd=this['balloonPanelView'],_0x648bf3=()=>{const _0x2a7746=_0x4ec7c6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2a7746),this['setActiveAnnotation'](_0x2a7746[0x0]||null);};this['listenTo'](_0x4ec7c6,'refresh',_0x648bf3),this['listenTo'](_0x4ec7c6,'blur',(_0x4891fd,{isAnnotationTracked:_0x56e859})=>{this['activeAnnotation']&&_0x56e859(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4ec7c6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x31bdb2,'blur',_0xa2f7d7=>{_0x4ec7c6['hasDomSelection']()&&_0xa2f7d7['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1a5e49,_0x483494)=>{const _0x1f273b=_0x483494['target'];_0x48a1fd['isVisible']&&_0x48a1fd['element']['contains'](_0x1f273b)||_0x1b20cf['view']['element']['contains'](_0x1f273b)||this['activeAnnotation']&&_0x4ec7c6['hasDomSelection']()&&(_0x648bf3(),_0x1a5e49['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4ec7c6);}['_destroyEditorAnnotationsIntegration'](_0x1464de){_0x1464de&&(this['stopListening'](_0x1464de),this['_editorAnnotations']['remove'](_0x1464de));}['_setSelectedAnnotations'](_0x4f3404){for(const _0x3c670f of this['_selectedAnnotations'])_0x4f3404['includes'](_0x3c670f)||this['_manuallyClosedAnnotationViews']['delete'](_0x3c670f['view']);this['_selectedAnnotations']=_0x4f3404;}['_refreshPositioning'](){const _0x5ac714=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5ac714['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x358623){if(this['_manuallyClosedAnnotationViews']['has'](_0x358623['view']))return;const _0x3c0071=this['balloonPanelView']['content']['first'];_0x3c0071!==_0x358623['view']?(_0x3c0071&&this['_detachListeners'](_0x3c0071),this['_attachListeners'](_0x358623['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x358623['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x321a12=this['balloonPanelView']['content']['first'],_0x37362d=_0x321a12&&this['annotations']['getByView'](_0x321a12);if(!_0x37362d||!this['_annotationToNarrowView']['has'](_0x37362d))return;const _0xa6ae3a=this['_annotationToNarrowView']['get'](_0x37362d)['element'],_0x37f85f=(function(){const _0x387230=_0x1c777c['defaultPositions'];return[_0x387230['southArrowNorthEast'],_0x387230['northArrowSouthEast'],_0x387230['southArrowNorth'],_0x387230['northArrowSouth'],_0x387230['southArrowNorthWest'],_0x387230['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xa6ae3a,'positions':_0x37f85f});}['_hideBalloon'](){const _0x47e66c=this['balloonPanelView'],_0x1b1389=_0x47e66c['content']['first'];_0x1b1389&&(this['_detachListeners'](_0x1b1389),_0x47e66c['unpin'](),_0x47e66c['content']['clear']());}['_attachListeners'](_0x1c1267){this['listenTo'](_0x1c1267,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1c1267,'Esc',(_0x424e46,_0x4b087c)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1c1267),this['_hideBalloon'](),_0x4b087c();});}['_detachListeners'](_0x8d3255){this['stopListening'](_0x8d3255);}}class c extends _0x4aad6f{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x25f061,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x473517){super(_0x473517),_0x473517['editing']['view']['addObserver'](_0x4749c3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x473517['plugins']['get'](_0x25f061),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x4d37e2(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x3a96d4=this['editor']['plugins']['get'](j);_0x3a96d4['context']===this['editor']&&(_0x3a96d4['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x214ad7,_0x47fd76)=>{const _0x4088b2=this['_balloon'];if(this['isAttached']&&_0x4088b2['visibleView']){const _0x9631e6=this['annotations']['getByView'](_0x4088b2['visibleView']);_0x9631e6&&this['_closeAnnotation'](_0x9631e6),_0x47fd76();}}));}['afterInit'](){const _0x5b5699=this['editor']['plugins']['get'](j);_0x5b5699['context']===this['editor']&&(_0x5b5699['hasActive']()||_0x5b5699['switchTo']('inline'));}['setActiveAnnotation'](_0x8ebb24){_0x8ebb24!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x8ebb24&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x8ebb24)&&this['_addAnnotationToBalloon'](_0x8ebb24,!0x0),_0x8ebb24['isActive']=!0x0),_0x8ebb24||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x8ebb24);}['attach'](_0x2127dc){this['annotations']=_0x2127dc;const _0x56aba4=this['editor']['plugins']['get'](j),_0x4c09bb=this['_balloon'];if(this['isAttached'])throw new _0x1be892('inlineannotations-attach-already-attached',this);if(_0x56aba4['context']!==this['editor'])throw new _0x1be892('inlineannotations-not-allowed-with-context',this);const _0x5cc1a0=this['editor']['plugins']['get'](b);this['listenTo'](_0x5cc1a0,'refresh',()=>{const _0x49bdef=_0x5cc1a0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0xabdaf6,_0x38394d;!this['_forceRefresh']&&(_0xabdaf6=_0x49bdef,_0x38394d=this['_selectedAnnotations'],_0xabdaf6['length']===_0x38394d['length']&&_0xabdaf6['every'](_0x49ea9a=>_0x38394d['includes'](_0x49ea9a)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x49bdef),this['setActiveAnnotation'](_0x49bdef[0x0]||null));}),this['listenTo'](_0x5cc1a0,'blur',(_0x59ed19,{isAnnotationTracked:_0x5ddc38})=>{this['activeAnnotation']&&_0x5ddc38(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5cc1a0,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4dd83f,_0x5a7960,_0x1761ec)=>{_0x1761ec||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2127dc,'remove',(_0x121b3b,_0x40b286)=>{this['_removeAnnotationFromBalloon'](_0x40b286),_0x40b286===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4c09bb,'change:visibleView',(_0x5e3236,_0x35bd85,_0x3e67a6,_0x52605b)=>{_0x52605b&&this['stopListening'](_0x52605b);const _0x1f8219=_0x2127dc['getByView'](_0x3e67a6);_0x3e67a6&&_0x1f8219&&(this['listenTo'](_0x3e67a6,'change:height',()=>{_0x4c09bb['updatePosition']();}),this['listenTo'](_0x3e67a6,'Esc',()=>{this['_closeAnnotation'](_0x1f8219),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1f8219&&this['setActiveAnnotation'](_0x1f8219));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4c09bb['visibleView']&&(_0x2127dc['getByView'](_0x4c09bb['visibleView'])&&_0x4c09bb['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 _0x1be892('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x41bbd3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x41bbd3);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x32e733){for(const _0x544f0e of this['_selectedAnnotations'])_0x32e733['includes'](_0x544f0e)||this['_manuallyClosed']['delete'](_0x544f0e);for(const _0x58db67 of this['annotations'])_0x32e733['includes'](_0x58db67)||this['_removeAnnotationFromBalloon'](_0x58db67);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x147981 of _0x32e733)this['_addAnnotationToBalloon'](_0x147981);}this['_selectedAnnotations']=_0x32e733;}['_addAnnotationToBalloon'](_0x4fa481,_0x30b0ab=!0x1){this['_manuallyClosed']['has'](_0x4fa481)||(this['_addedAnnotations']['has'](_0x4fa481)||this['_balloon']['hasView'](_0x4fa481['view'])||(this['_addedAnnotations']['add'](_0x4fa481),this['_balloon']['add']({'stackId':_0x4fa481['view']['id'],'view':_0x4fa481['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4fa481)}})),_0x30b0ab&&this['_balloon']['showStack'](_0x4fa481['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4b1f35){const _0x1b3156=_0x4b1f35['target'],_0x3fc65a=this['editor']['editing']['view'],_0x312d56=_0x3fc65a['document']['selection']['getFirstRange'](),_0x3a3d46=_0x3fc65a['domConverter']['viewRangeToDom'](_0x312d56);if(_0x3a3d46['collapse'](!0x0),_0x1b3156){if(_0x1b3156 instanceof _0x482e1e)return _0x1b3156;let _0xc0ac06=[];for(const _0x326bd5 of _0x1b3156)_0xc0ac06['push'](...F(_0x326bd5['getClientRects']()));_0xc0ac06=function(_0x22c475){const _0x163031=[];let _0xd04d55=_0x22c475[0x0];for(let _0x131d43=0x1;_0x131d43<_0x22c475['length'];_0x131d43++)P(_0xd04d55,_0x22c475[_0x131d43])?_0xd04d55['width']+=_0x22c475[_0x131d43]['width']:(_0x163031['push'](_0xd04d55),_0xd04d55=_0x22c475[_0x131d43]);return _0x163031['push'](_0xd04d55),_0x163031;}(_0xc0ac06);const _0x343ddd=_0x3a3d46['getBoundingClientRect']();return _0xc0ac06['find'](_0x2cb5be=>_0x2cb5be['top']<=_0x343ddd['top']&&_0x2cb5be['bottom']>=_0x343ddd['bottom']&&_0x2cb5be['left']<=_0x343ddd['left']&&_0x2cb5be['right']>=_0x343ddd['right'])||_0xc0ac06[0x0];}return _0x4b1f35['targetRect']||_0x3a3d46;}['_removeAnnotationFromBalloon'](_0x1cd590){this['_addedAnnotations']['has'](_0x1cd590)&&this['_balloon']['hasView'](_0x1cd590['view'])&&(this['_addedAnnotations']['delete'](_0x1cd590),this['_balloon']['remove'](_0x1cd590['view']));}['_closeAnnotation'](_0x1c7df9){this['_manuallyClosed']['add'](_0x1c7df9),this['_removeAnnotationFromBalloon'](_0x1c7df9);}}function F(_0x46021d){return Array['from'](_0x46021d)['map'](DOMRect['fromRect']);}function P(_0x414900,_0x2c94a2){return _0x414900['top']===_0x2c94a2['top']&&_0x414900['bottom']===_0x2c94a2['bottom']&&_0x414900['right']===_0x2c94a2['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1fb585,_0x3e6342){super(_0x1fb585),this['set']('isEmpty',!_0x3e6342['length']),this['focusTracker']=new _0x1b869f(),this['_annotationViews']=_0x3e6342,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xba4b7f({'focusables':_0x3e6342,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3e6342,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3e6342,'remove',(_0x27bf66,_0x5e88c3)=>{_0x5e88c3['isActive']&&this['focus'](),_0x3e6342['length']||(this['isEmpty']=!0x0);});const _0x3eaa6f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1fb585,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3e6342},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x3eaa6f['if']('isEmpty','ck-hidden',_0x15b7fc=>!_0x15b7fc)]},'children':[{'text':N(_0x1fb585,'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 _0x2d5b8a of this['_annotationViews'])this['focusTracker']['add'](_0x2d5b8a['element']);this['_annotationViews']['on']('change',(_0x5b721d,{added:_0x2a2a56,removed:_0x4acc4c})=>{for(const _0x4aa678 of _0x2a2a56)this['focusTracker']['add'](_0x4aa678['element']);for(const _0x34ff8f of _0x4acc4c)this['focusTracker']['remove'](_0x34ff8f['element']);});}}class p extends _0x4427fc{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5acf4a){super(_0x5acf4a),this['archivedThreads']=new _0x359f6f();}['init'](){const _0x301b1a=this['context'],_0x445906=_0x301b1a['plugins']['get'](o),_0x3cb94b=_0x301b1a['plugins']['get'](y);this['listenTo'](_0x445906,'addCommentThread',(_0x284c59,{threadId:_0x46a048})=>{const _0x4545f7=_0x445906['getCommentThread'](_0x46a048);_0x4545f7['archivedAt']&&this['archivedThreads']['add'](_0x4545f7,this['_calculatePosition'](_0x4545f7['archivedAt'])),this['listenTo'](_0x4545f7,'change:archivedAt',(_0xfb80ac,_0x55eaf8,_0x25ddb6)=>{_0x25ddb6?this['archivedThreads']['has'](_0x4545f7)||this['archivedThreads']['add'](_0x4545f7,this['_calculatePosition'](_0x4545f7['archivedAt'])):this['archivedThreads']['has'](_0x4545f7)&&this['archivedThreads']['remove'](_0x4545f7);});}),this['listenTo'](_0x445906,'removeCommentThread',(_0x2d9e85,{threadId:_0x51607f})=>{const _0x5dec1d=_0x445906['getCommentThread'](_0x51607f);this['stopListening'](_0x5dec1d),this['archivedThreads']['has'](_0x5dec1d)&&this['archivedThreads']['remove'](_0x5dec1d);},{'priority':'highest'}),this['listenTo'](_0x3cb94b['collection'],'focus',(_0x569e8f,_0x1d89cb)=>{_0x1d89cb['isVisible']||(_0x1d89cb['isActive']=!0x0,_0x3cb94b['activate'](_0x1d89cb));});}['_calculatePosition'](_0x438951){const _0x512b79=[...this['archivedThreads']]['findIndex'](_0x183a85=>_0x183a85['archivedAt']<_0x438951);return _0x512b79>-0x1?_0x512b79:this['archivedThreads']['length'];}}class a extends _0x4aad6f{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x350d3c];}constructor(_0x44288e){super(_0x44288e),this['annotationViews']=new _0x4b50a2(),this['_pendingThreads']=[];}['init'](){const _0x2c739a=this['editor'],_0x3bdff7=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2c739a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x235388,!0x0)),_0x2c739a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2546bf=this['_createCommentsArchiveButton'](_0xba86ba);return _0x2546bf['set']({'role':'menuitemcheckbox'}),_0x2546bf;});const _0x8a43db=_0x2c739a['plugins']['get'](p),_0x4be75e=_0x2c739a['plugins']['get']('Annotations'),_0x378848=_0x2c739a['plugins']['get']('CommentsRepository');_0x8a43db['archivedThreads']['forEach'](_0x2dc628=>{this['_handleNewThread'](_0x2dc628);}),this['listenTo'](_0x8a43db['archivedThreads'],'add',(_0x301488,_0x2961ff)=>{this['_handleNewThread'](_0x2961ff);}),this['listenTo'](_0x4be75e['collection'],'add',(_0x153fc1,_0x57f9c8)=>{const _0x52d1e8=this['_pendingThreads']['find'](_0x5833fc=>{const _0x2e1e1b=_0x378848['_threadToController']['get'](_0x5833fc);return _0x2e1e1b&&_0x57f9c8['innerView']===_0x2e1e1b['view'];});if(_0x52d1e8){const _0x129775=this['_calculatePosition'](_0x52d1e8['archivedAt']);this['_addAnnotationToArchive'](_0x57f9c8,_0x129775),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x52d1e8),0x1);}}),this['listenTo'](_0x8a43db['archivedThreads'],'remove',(_0x29495c,_0x3b60c1)=>{const _0x352e67=_0x2c739a['config']['get']('collaboration.channelId');if(!_0x352e67||_0x3b60c1['channelId']===_0x352e67){if(this['_pendingThreads']['includes'](_0x3b60c1))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3b60c1),0x1);else{const _0x43a0f2=_0x378848['_threadToController']['get'](_0x3b60c1),_0x1f182d=_0x4be75e['getByInnerView'](_0x43a0f2['view']);this['annotationViews']['remove'](_0x1f182d['view']),this['stopListening'](_0x1f182d),this['stopListening'](_0x1f182d['focusableElements']);}}}),this['listenTo'](_0x4be75e['collection'],'add',(_0x1ca1c3,_0x466655)=>{this['listenTo'](_0x466655,'escape',_0x3bdff7);}),this['listenTo'](_0x4be75e['collection'],'remove',(_0x17c691,_0x372b39)=>{this['stopListening'](_0x372b39,'escape',_0x3bdff7);});}['_addAnnotationToArchive'](_0x2f2582,_0x6591b0){this['listenTo'](_0x2f2582,'set:isVisible',_0xe1ddc6=>{_0xe1ddc6['return']=!0x1,_0xe1ddc6['stop']();}),this['annotationViews']['add'](_0x2f2582['view'],_0x6591b0);}['_handleNewThread'](_0x48930a){const _0x25f8b3=this['editor']['plugins']['get']('CommentsRepository'),_0x11642b=this['editor']['plugins']['get']('Annotations'),_0x476c35=this['editor']['config']['get']('collaboration.channelId');if(!_0x476c35||_0x48930a['channelId']===_0x476c35){const _0x277535=_0x25f8b3['_threadToController']['get'](_0x48930a);if(!_0x277535)return void this['_pendingThreads']['push'](_0x48930a);const _0x5c0b2b=this['_calculatePosition'](_0x48930a['archivedAt']),_0x4c4f9c=_0x11642b['getByInnerView'](_0x277535['view']);_0x4c4f9c['isVisible']&&_0x11642b['_visibleAnnotations']['remove'](_0x4c4f9c),this['_addAnnotationToArchive'](_0x4c4f9c,_0x5c0b2b);}}['_calculatePosition'](_0x3dc778){const _0x20c576=this['editor']['config']['get']('collaboration.channelId'),_0x103e02=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2fa5eb=>_0x2fa5eb['channelId']===_0x20c576)['findIndex'](_0xff1f40=>_0xff1f40['archivedAt']<_0x3dc778);return _0x103e02<0x0||_0x103e02>this['annotationViews']['length']?this['annotationViews']['length']:_0x103e02-0x1;}['_toggleDialog'](){const _0x52c7ad=this['editor'],_0x5c9f2e=_0x52c7ad['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x52c7ad['locale'],this['annotationViews'])),'commentsArchive'===_0x5c9f2e['id']?_0x5c9f2e['hide']():_0x5c9f2e['show']({'id':'commentsArchive','title':N(_0x52c7ad['locale'],'COMMENTS_ARCHIVE'),'icon':_0x231344,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5b66b1['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2a66ee,_0x1843f7=!0x1){const _0x15a658=this['editor']['locale'],_0x4a91d5=this['editor']['plugins']['get']('Dialog'),_0x4b3838=new _0x2a66ee(_0x15a658);return _0x4b3838['bind']('isEnabled')['to'](this,'isEnabled'),_0x4b3838['bind']('isOn')['to'](_0x4a91d5,'id',_0x594fb8=>'commentsArchive'===_0x594fb8),_0x4b3838['set']({'label':N(_0x15a658,'COMMENTS_ARCHIVE'),'icon':_0x231344,'isToggleable':!0x0}),_0x1843f7&&(_0x4b3838['tooltip']=!0x0),this['listenTo'](_0x4b3838,'execute',()=>this['_toggleDialog']()),_0x4b3838;}['_hideDialogOnAnnotationEscape']=_0x94a4fc=>{const _0x3daef7=_0x94a4fc['source'];if(!this['annotationViews']['has'](_0x3daef7['view']))return;const _0x17e249=this['editor']['plugins']['get']('Dialog');_0x17e249['isOpen']&&'commentsArchive'===_0x17e249['id']&&(_0x17e249['hide'](),_0x94a4fc['stop']());};}class gi extends _0x4aad6f{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|