@ckeditor/ckeditor5-comments 46.0.0-alpha.0 → 46.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x296bdb={}){function _0x115327(_0x1e3656){return _0x1e3656['map'](_0x744e4b=>String['fromCharCode'](_0x744e4b))['join']('');}(_0x296bdb=Object['assign']({},_0x296bdb))['plugins']||(_0x296bdb['plugins']=Qt['defaultPlugins']),super(_0x296bdb),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x115327([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x115327([0x76,0x69,0x65,0x77])][_0x115327([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x115327([0x61,0x75,0x74,0x6f]),this[_0x115327([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x115327([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x115327([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x115327([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x115327([0x6f,0x6b])});}['create'](){const _0x2fa44f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2fa44f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x34ecfc=>{const _0x5bda32=this['model']['document']['getRoot'](),_0x117547=_0x5bda32&&_0x5bda32['getChild'](_0x5bda32['childCount']-0x1);_0x34ecfc['setSelection'](_0x117547,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x413bc8=this['editing']['view'],_0x4299e4=_0x413bc8['document']['getRoot'](),_0x947aa=_0x4299e4['getChild'](0x0);_0x4299e4['childCount']>0x1||!_0x947aa||'p'!=_0x947aa['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x413bc8,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x947aa['placeholder']=this['placeholder']),St({'view':_0x413bc8,'element':_0x947aa,'keepOnFocus':!0x0}),this['placeholderElement']=_0x947aa);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1e924c,_0x4d6fc6={}){super(_0x1e924c),this['editor']=null,this['_editorConfig']=_0x4d6fc6,this['set']('value',_0x4d6fc6['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x1e924c,'Reply...')),this['set']('submitLabel',N(_0x1e924c,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x570758(),this['focusCycler']=new _0x3ffb7c({'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',(_0x3ea8e2,_0x35ea3d)=>{this['cancelButtonView']['fire']('execute'),_0x35ea3d();}),this['keystrokes']['set']('Ctrl+Enter',(_0x18d3cc,_0x26e91d)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x26e91d());}),this['on']('submit',(_0x5e96c1,_0x329503)=>{_0x329503['length']>0xfde8?(alert(N(_0x1e924c,'TOO_LONG_COMMENT_ALERT',[_0x329503['length'],0xfde8])),_0x5e96c1['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1137be=this['editor'];this['element']['insertBefore'](_0x1137be['ui']['element'],this['element']['firstChild']),_0x1137be['model']['document']['on']('change',()=>this['value']=_0x1137be['getData']()),_0x1137be['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1137be['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x22cc3b){-0x1===_0x22cc3b?(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:_0x4ae712}=this,_0x7b282a=new _0x3adb51(_0x4ae712);return _0x7b282a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x7b282a['withText']=!0x0,_0x7b282a['bind']('label')['to'](this,'submitLabel'),_0x7b282a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x7b282a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x17ac93,_0x14b603)=>!_0x14b603&&!!_0x17ac93['trim']()),_0x7b282a;}['_createCancelButton'](){const {locale:_0x5b1aeb}=this,_0x4452c6=new _0x3adb51(_0x5b1aeb);return _0x4452c6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4452c6['label']=N(_0x5b1aeb,'Cancel'),_0x4452c6['withText']=!0x0,_0x4452c6['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4452c6;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x48db7f=>{this['focusTracker']['add'](_0x48db7f['element']);}),this['focusables']['on']('change',(_0x1fe5af,_0x30c756)=>{for(const _0x591218 of Array['from'](_0x30c756['added'])['reverse']())this['focusTracker']['add'](_0x591218['element']);});}}class ie extends kt{constructor(_0x37f1bc,_0x26f4a3,_0x56e935){super(_0x37f1bc),this['commentInputView']=new es(_0x37f1bc,_0x56e935),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x41d2a8,_0x1f6f07)=>_0x41d2a8||!!_0x1f6f07),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 _0xe944a7(_0x37f1bc,_0x26f4a3),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'](_0x291d74){this['commentInputView']['focus'](_0x291d74);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x28eb72,_0x1d12eb)=>{const {submitButtonView:_0x5b846c,cancelButtonView:_0x1ff2ab,editor:_0x2b3e8a}=this['commentInputView'];[_0x5b846c['element'],_0x1ff2ab['element'],_0x2b3e8a?_0x2b3e8a['editing']['view']['getDomRoot']():null]['filter'](_0x114243=>_0x114243)['some'](_0x1b487f=>_0x1b487f['contains'](_0x1d12eb['target']))||(this['focus'](),_0x1d12eb['preventDefault']());});}}class os extends kt{constructor(_0x6a4b06){super(_0x6a4b06);const _0xb92551=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xb92551['to']('count',_0x4aea9=>N(_0x6a4b06,'NUMBER_OF_COMMENTS',_0x4aea9))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2a422c,_0x374d4b,_0x59b4d4){super(_0x2a422c);const _0x3694f7=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x374d4b['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x374d4b,this['_config']=_0x59b4d4,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x570758(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3ffb7c({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xce64f2=>this['commentViews']['map'](_0x2b8b4e=>_0x2b8b4e['element'])['includes'](_0xce64f2['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x2a422c),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x45246b=>_0x45246b-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3face3 of _0x374d4b['comments'])this['_handleNewCommentModel'](_0x3face3);this['_handleInfoComment'](),this['listenTo'](_0x374d4b['comments'],'add',(_0x26ed82,_0x4024c6)=>{const _0x263094=this['_calculatePosition'](_0x4024c6);this['length']++,this['_handleNewCommentModel'](_0x4024c6,_0x263094),this['refreshVisibleViews']();}),this['listenTo'](_0x374d4b['comments'],'remove',(_0xa27157,_0x5bcc98)=>{this['length']--,this['_handleRemoveCommentModel'](_0x5bcc98),this['refreshVisibleViews']();}),this['listenTo'](_0x374d4b,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x374d4b,'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',_0x3694f7['if']('length','ck-hidden',_0x563714=>!_0x563714)],'aria-label':N(_0x2a422c,'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'](_0x1e06e4){-0x1===_0x1e06e4?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3171eb of this['commentViews'])_0x3171eb['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x14c966,_0x1510b5){const _0x3c6f57=new this['_config']['CommentView'](this['locale'],_0x14c966,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3c6f57['viewUid']=_0x14c966['id'],_0x3c6f57['delegate']('removeComment')['to'](this),_0x3c6f57['delegate']('updateComment')['to'](this),_0x3c6f57['delegate']('resolveCommentThread')['to'](this),_0x3c6f57['delegate']('editorReady')['to'](this),_0x3c6f57['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3c6f57,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3c6f57,_0x1510b5);}['_calculatePosition'](_0x19f771){const _0x52e574=this['_model']['_findOptimalIndex'](_0x19f771);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x19f771['authoredAt']?_0x52e574-0x1:_0x52e574:_0x52e574-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x541c10={'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'],_0x541c10,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x541c10));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x17fb2b){const _0x5431ac=this['commentViews']['remove'](_0x17fb2b['id']);this['stopListening'](_0x5431ac),_0x5431ac['isEditMode']&&this['_updateHasDirtyComment'](),_0x5431ac['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x9fd831=>_0x9fd831['isEditMode']);}['_rearrangeCollapse'](){const _0x297605=function(_0x354b31){const _0x2f9af0=new _0x56e647();for(const _0xb2f0af of _0x354b31)_0x2f9af0['add'](_0xb2f0af);return _0x2f9af0;}(this['commentViews']),_0x4cd971=this['_collapsedCommentsView']['count'];for(let _0x52fe86=0x1;_0x52fe86<=_0x4cd971;_0x52fe86++)_0x297605['remove'](0x1);for(const _0x80ebbc of _0x297605)_0x80ebbc['collapse']();_0x4cd971>0x0&&_0x297605['add'](this['_collapsedCommentsView'],0x1),rs(_0x4fa6f4(Array['from'](this['visibleViews']),Array['from'](_0x297605)),this['visibleViews'],_0x297605);}['_rearrangeExpand'](){rs(_0x4fa6f4(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x248801 of this['visibleViews'])_0x248801['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x156139=>{this['focusTracker']['add'](_0x156139['element']),this['keystrokes']['listenTo'](_0x156139['element']);}),this['commentViews']['on']('change',(_0x4e35a2,_0x32438e)=>{for(const _0x1f207b of _0x32438e['removed'])this['focusTracker']['remove'](_0x1f207b['element']),this['keystrokes']['stopListening'](_0x1f207b['element']);for(const _0x47774e of Array['from'](_0x32438e['added'])['reverse']())this['focusTracker']['add'](_0x47774e['element']),this['keystrokes']['listenTo'](_0x47774e['element']);});}}function rs(_0x490074,_0x1f1c94,_0x17b73c){let _0x435d1a=0x0;for(const _0x314d30 of _0x490074)switch(_0x314d30){case'insert':_0x1f1c94['add'](_0x17b73c['get'](_0x435d1a),_0x435d1a),_0x435d1a++;break;case'delete':_0x1f1c94['remove'](_0x435d1a);break;case'equal':_0x435d1a++;}}class oe extends kt{constructor(_0x2c2695){super(_0x2c2695);const _0x3b710e=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3b710e['to']('contextValue',_0x13a81d=>N(_0x2c2695,'THREAD_CONTEXT_LABEL',_0x13a81d)),'tabindex':-0x1},'children':[{'text':_0x3b710e['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x52f23e,_0x30d49a){super(_0x52f23e);const _0x1c69fa=this['bindTemplate'];this['_model']=_0x30d49a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x570758(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3ffb7c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2e4459=>!!_0x2e4459),this['bind']('contextValue')['to'](this['_model'],'context',_0xbfef44=>_0xbfef44&&_0xbfef44['value']?this['_trimContextValue'](_0xbfef44['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',_0x1c69fa['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 _0x17d372=new _0x3adb51(this['locale']);return _0x17d372['label']=N(this['locale'],'Reopen'),_0x17d372['tooltip']=N(this['locale'],'Reopen'),_0x17d372['icon']=_0x601d34,_0x17d372['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x16af4a=>!_0x16af4a),_0x17d372['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x36ec64,_0x32fd86)=>_0x36ec64&&_0x32fd86),_0x17d372['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x17d372;}['_trimContextValue'](_0x15c2b5){if(_0x15c2b5['length']<0x96)return _0x15c2b5;const _0x4f514d=_0x15c2b5['lastIndexOf']('\x20',0x93);return _0x15c2b5['substring'](0x0,_0x4f514d>-0x1?_0x4f514d:0x93)+'...';}['_attachContextActions'](){const _0x5b6e3f=this['element']['querySelector']('.ck-context'),_0x74eeea=_0x5b6e3f['querySelector']('.ck-context__value');this['listenTo'](_0x5b6e3f,'mouseenter',()=>{_0x74eeea['offsetWidth']<_0x74eeea['scrollWidth']&&_0x5b6e3f['classList']['add']('overlay');}),this['listenTo'](_0x5b6e3f,'mouseleave',()=>{_0x5b6e3f['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x453e10 of this['focusables'])this['focusTracker']['add'](_0x453e10['element']),this['keystrokes']['listenTo'](_0x453e10['element']);}['_createContextView'](){const _0x340aa3=new oe(this['locale']);return _0x340aa3['bind']('contextValue')['to'](this),_0x340aa3;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x12549e,_0x177e11,_0xa428ba,_0x2441de){super(_0x12549e),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x177e11,this['_localUser']=_0xa428ba,this['_config']=_0x2441de,this['commentThreadHeaderView']=new Xt(_0x12549e,_0x177e11),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x12549e,N(_0x12549e,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x12549e,_0x177e11,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2441de)),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',(_0x460d14,_0x1cb22f)=>_0x460d14||!!_0x1cb22f),this['bind']('isUnlinked')['to'](_0x177e11,'unlinkedAt',_0x56bdd3=>!!_0x56bdd3),this['bind']('ariaLabel')['to'](this,'length',_0x2cc1e1=>{const _0x3af214=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2cc1e1,_0x3af214]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x570758(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3ffb7c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xccbea2=>_0xccbea2['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 _0x3825f0=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x507056=_0x3825f0['commentInputView'];return _0x3825f0['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x507056,'value',(_0x104ba6,_0x14a077,_0x400370,_0x25b7f7,_0x2f311e)=>!!_0x2f311e||!!_0x25b7f7&&_0x400370&&!_0x14a077||_0x104ba6&&_0x400370&&!_0x14a077),_0x507056['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x576f08,_0xfa6523,_0x1215e4)=>{let _0x5942a6;return _0x5942a6=_0x1215e4&&_0xfa6523?'Reply\x20to\x20reopen\x20discussion...':_0x576f08?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5942a6);}),_0x507056['bind']('submitLabel')['to'](this,'length',_0x4445ad=>N(this['locale'],_0x4445ad?'Reply':'Comment')),_0x507056['on']('submit',(_0x2062b5,_0x250aad)=>{this['fire']('addComment',_0x250aad),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x507056['on']('cancel',()=>{this['focus']();}),_0x507056['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x507056['on']('cancel',_0x1f8c6b=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1f8c6b['stop']());}),this['on']('change:isActive',(_0x5ad5d3,_0x5aa6b5,_0x5aed4b)=>{_0x5aed4b||this['length']||_0x507056['value']||this['fire']('removeCommentThread');}),_0x3825f0;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x16f0db(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x161567,target:_0x4b330b,type:_0xd2c6fa,isVisible:_0x40661b=!0x0}){super(),this['view']=_0x161567,this['view']['element']||this['view']['render'](),this['_type']=_0xd2c6fa,this['_target']=_0x4b330b,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x56e647([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x307b4d,_0x4291e7)=>{this['view']['focusTracker']['add'](_0x4291e7);}),this['focusableElements']['on']('remove',(_0x4edd28,_0x4e3271)=>{this['view']['focusTracker']['remove'](_0x4e3271);}),this['set']('isVisible',_0x40661b);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x12ff95=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x12ff95),_0x12ff95;}get['targetRect'](){const _0x2ea5d7=this['target'];if(null===_0x2ea5d7)return null;if(_0x2ea5d7 instanceof _0x14f71d)return _0x2ea5d7;const _0x3ccb4c=_0x2ea5d7['filter'](_0x521c1d=>function(_0x511105){const _0x1baee8=_0x511105['offsetParent'];if(_0x1baee8)return!0x0;const _0xd5612f=_0x511105['getClientRects']()['item'](0x0);return!!_0xd5612f;}(_0x521c1d));return 0x0===_0x3ccb4c['length']?null:new _0x14f71d(_0x3ccb4c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4facfd){this['view']['isActive']=_0x4facfd,this['view']['mainView']['isActive']=_0x4facfd;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x2a7f61){if(!(null===_0x2a7f61||_0x2a7f61 instanceof _0x14f71d||Array['isArray'](_0x2a7f61)&&_0x2a7f61['every'](_0x36bf31=>fi(_0x36bf31))))throw new _0xb557ef('annotation-invalid-target',null,{'target':_0x2a7f61});}['_getNormalizedTarget'](){const _0x41a975='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x41a975)?[_0x41a975]:_0x41a975;}}function fi(_0x20dae3){return null!==_0x20dae3&&'object'==typeof _0x20dae3&&'nodeType'in _0x20dae3&&0x1===_0x20dae3['nodeType'];}class S extends _0x56e647{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3f7160=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x570758(),this['_focusTracker']['on']('change:isFocused',(_0x505740,_0x16b130,_0x1a1928)=>{_0x1a1928||this['fire']('blur');});for(const _0x1f7618 of _0x3f7160)this['add'](_0x1f7618);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x15a457){if(this['has'](_0x15a457))throw new _0xb557ef('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x15a457['innerView'],_0x15a457),this['_viewToAnnotation']['set'](_0x15a457['view'],_0x15a457);for(const _0x165b83 of _0x15a457['focusableElements'])this['_focusTracker']['add'](_0x165b83);this['listenTo'](_0x15a457['focusableElements'],'add',(_0x38d4d9,_0x3cc29e)=>{this['_focusTracker']['add'](_0x3cc29e);}),this['listenTo'](_0x15a457['focusableElements'],'remove',(_0x32f97b,_0x2e77cd)=>{this['_focusTracker']['remove'](_0x2e77cd);}),this['listenTo'](_0x15a457['view']['focusTracker'],'change:isFocused',(_0x3c7912,_0x2af611,_0x10a738)=>{_0x10a738&&this['fire']('focus',_0x15a457);}),_0x15a457['updateTargetRect']();const _0x41a127=this['_getOrderInContent'](_0x15a457['view']['targetRect']);return super['add'](_0x15a457,_0x41a127);}['remove'](_0x2c5e50){if(!this['has'](_0x2c5e50))throw new _0xb557ef('annotationcollection-not-existing-item',null);this['stopListening'](_0x2c5e50['view']['focusTracker']),this['stopListening'](_0x2c5e50['focusableElements']);for(const _0x5eec07 of _0x2c5e50['focusableElements'])this['_focusTracker']['remove'](_0x5eec07);return this['_viewToAnnotation']['delete'](_0x2c5e50['view']),this['_innerViewToAnnotation']['delete'](_0x2c5e50['innerView']),super['remove'](_0x2c5e50);}['getByInnerView'](_0x1f1314){return this['_innerViewToAnnotation']['get'](_0x1f1314);}['getByView'](_0x483b4c){return this['_viewToAnnotation']['get'](_0x483b4c);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x421066 of this)_0x421066['updateTargetRect']();this['_sort']();}['_sort'](){const _0xa45303=Array['from'](this)['sort']((_0xfbb8f,_0x2f45ae)=>w(_0xfbb8f['view']['targetRect'],_0x2f45ae['view']['targetRect']));for(let _0x19fabe=_0xa45303['length']-0x1;_0x19fabe>0x0;_0x19fabe--){const _0x5e4671=_0xa45303[_0x19fabe];_0x19fabe!==this['getIndex'](_0x5e4671)&&(this['remove'](_0x5e4671),this['add'](_0x5e4671));}}['_getOrderInContent'](_0x5cb438){let _0x29b6ad=0x0;if(!_0x5cb438)return this['length'];for(const _0x553fcc of this){const _0x3db7c3=_0x553fcc['view']['targetRect'];if(_0x3db7c3){if(w(_0x5cb438,_0x3db7c3)<0x0)return _0x29b6ad;_0x29b6ad++;}}return _0x29b6ad;}}function v({source:_0x3f8f27,target:_0x1a6785,filter:_0x964a01}){for(const _0x51165f of _0x3f8f27)_0x964a01(_0x51165f)&&_0x1a6785['add'](_0x51165f);_0x1a6785['listenTo'](_0x3f8f27,'add',(_0x2cbce1,_0x105808)=>{_0x964a01(_0x105808)&&_0x1a6785['add'](_0x105808);}),_0x1a6785['listenTo'](_0x3f8f27,'remove',(_0x228dea,_0x20afdf)=>{_0x1a6785['has'](_0x20afdf)&&_0x1a6785['remove'](_0x20afdf);});}function w(_0x3fe1ac,_0x41dc4c){if(null===_0x3fe1ac&&null===_0x41dc4c)return 0x0;if(null===_0x3fe1ac)return-0x1;if(null===_0x41dc4c)return 0x1;const _0x557a2e=_0x3fe1ac['top']-_0x41dc4c['top'];return 0x0==_0x557a2e?_0x3fe1ac['left']-_0x41dc4c['left']:_0x557a2e;}class y extends _0x38f59f{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x33b3db){if(super(_0x33b3db),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x33b3db instanceof _0x3f49f1){const _0x19b81f=_0x33b3db['locale'];_0x33b3db['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x19b81f,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x19b81f,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x19b81f,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x19b81f,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x19b81f,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x19b81f,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x19b81f,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x375f08){this['collection']['add'](_0x375f08);}['remove'](_0x3fc7bc){this['collection']['remove'](_0x3fc7bc),_0x3fc7bc['destroy']();}['refreshVisibility'](){for(const _0xea79d0 of this['collection'])_0xea79d0['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x563e0c){return this['collection']['getByInnerView'](_0x563e0c);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x430fa0 of this['collection'])_0x430fa0['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x58ec57){this['fire']('_activateAnnotation',_0x58ec57);}['createAnnotation'](_0x713c96){return new T(_0x713c96);}['createAnnotationView'](_0x2b22e5,_0x250dad){return new E(_0x2b22e5,_0x250dad);}['_addActiveAnnotation'](_0x221425){const _0x593a65=new Set(this['activeAnnotations']);_0x593a65['add'](_0x221425),this['activeAnnotations']=_0x593a65;}['_removeActiveAnnotation'](_0x495d85){const _0x37f92b=new Set(this['activeAnnotations']);_0x37f92b['delete'](_0x495d85),this['activeAnnotations']=_0x37f92b;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1e1044=this['collection'],_0x3a5fb2=this['_visibleAnnotations'];function _0x2a8117(_0x21c5ce){const _0x46b189=_0x21c5ce['source'];_0x46b189['isVisible']&&!_0x3a5fb2['has'](_0x46b189)?_0x3a5fb2['add'](_0x46b189):!_0x46b189['isVisible']&&_0x3a5fb2['has'](_0x46b189)&&_0x3a5fb2['remove'](_0x46b189),_0x46b189['view']['focusTracker']['remove'](_0x46b189['view']['element']),_0x46b189['view']['focusTracker']['add'](_0x46b189['view']['element']);}this['listenTo'](_0x1e1044,'add',(_0x59bb29,_0x350f7e)=>{_0x350f7e['isVisible']&&_0x3a5fb2['add'](_0x350f7e),this['listenTo'](_0x350f7e,'change:isVisible',_0x2a8117);}),this['listenTo'](_0x1e1044,'remove',(_0x1b6b8b,_0x47bb3d)=>{_0x3a5fb2['has'](_0x47bb3d)&&_0x3a5fb2['remove'](_0x47bb3d),this['stopListening'](_0x47bb3d,'change:isVisible',_0x2a8117);});}['_setupEnterAnnotationKeystroke'](){const _0x3af022=_0x3fc4d0=>{_0x3fc4d0['on']('ready',()=>{_0x3fc4d0['keystrokes']['set'](_0x21011e,(_0x252d08,_0x1a22d1)=>{const _0x2343e0=_0x17a9d8(this['activeAnnotations']['values']());_0x2343e0&&(_0x2343e0['view']['focus'](),_0x1a22d1());});});};this['context']instanceof _0x3f49f1?_0x3af022(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5f5405,_0x196f87)=>{_0x3af022(_0x196f87);});}['_setupEscapeAnnotationHandling'](){const _0x4e1b8f=_0x1d6d6a=>{const _0x356334=_0x1d6d6a['source'],_0x4701f6=[];let _0x449a5c;if(Array['isArray'](_0x356334['target'])){_0x449a5c=_0x356334['target'][0x0],this['context']instanceof _0x3f49f1?_0x4701f6['push'](this['context']):this['context']['editors']&&_0x4701f6['push'](...this['context']['editors']);for(const _0x2cf9e1 of _0x4701f6)for(const _0x5e0cdb of _0x2cf9e1['editing']['view']['domRoots']['values']())if(_0x5e0cdb['contains'](_0x449a5c))return void _0x2cf9e1['editing']['view']['focus']();_0x449a5c['focus']();}};this['listenTo'](this['collection'],'add',(_0x55e32e,_0x49c09d)=>{this['listenTo'](_0x49c09d,'escape',_0x4e1b8f,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5a9934,_0x21b5d6)=>{this['stopListening'](_0x21b5d6,'escape',_0x4e1b8f);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x38f59f{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x960f69){super(_0x960f69),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1a425a=this['context']['config'];_0x1a425a['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1a425a['define']('comments.maxThreadTotalWeight',0x1f4),_0x1a425a['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1a425a['define']('comments.CommentThreadView',vt),_0x1a425a['define']('comments.CommentView',gt),_0x1a425a['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2fcf31=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2b5653,_0x39027c)=>this['_addCommentThread'](_0x39027c)),this['on']('submitCommentThread',(_0x277557,_0x3571ca)=>this['_submitCommentThread'](_0x3571ca)),this['on']('resolveCommentThread',(_0x31c834,_0x52a7a3)=>this['_resolveCommentThread'](_0x52a7a3)),this['on']('resolveCommentThread',(_0xb251c4,_0x1ac516)=>this['_updateActiveAnnotation'](_0x1ac516),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x200584,_0x127356)=>this['_reopenCommentThread'](_0x127356)),this['on']('reopenCommentThread',(_0x31800c,_0x5b840d)=>this['_updateActiveAnnotation'](_0x5b840d),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4098d9,_0x2568b1)=>this['_removeCommentThread'](_0x2568b1)),this['on']('updateCommentThread',(_0x5c63d2,_0x29f43e)=>this['_updateCommentThread'](_0x29f43e)),this['on']('updateCommentThread',(_0x3e87c4,_0x4eb6a7)=>this['_updateActiveAnnotation'](_0x4eb6a7),{'priority':'lowest'}),this['on']('addComment',(_0x16a1c1,_0x3cca40)=>this['_addComment'](_0x3cca40)),this['on']('updateComment',(_0x53ce73,_0x2e46c1)=>this['_updateComment'](_0x2e46c1)),this['on']('removeComment',(_0x1d7a06,_0x28e64e)=>this['_removeComment'](_0x28e64e)),this['on']('addComment',(_0x451e30,{threadId:_0x1418c3,isFromAdapter:_0x59d7c9})=>{if(_0x59d7c9)return;const _0x5a4f04=this['getCommentThread'](_0x1418c3),_0x2f3a61=_0x5a4f04&&this['_threadToController']['get'](_0x5a4f04);_0x2f3a61&&_0x2f3a61['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2fcf31,'change:activeAnnotations',(_0x5b2144,_0x5b41e6,_0x30f523)=>{const _0x4ac6c7=Array['from'](_0x30f523)['map'](_0x7c89dd=>this['_viewToController']['get'](_0x7c89dd['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4ac6c7?_0x4ac6c7['model']:null;});}set['adapter'](_0x4f2b47){if(this['_adapter'])throw new _0xb557ef('commentsrepository-adapter-already-set');this['_adapter']=_0x4f2b47;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x177d2e=Tt,threadId:_0x12ad12=_0x300841(),comments:_0x32fe45=[],unlinkedAt:_0x5348fd=null,resolvedAt:_0x5b69db=null,resolvedBy:_0x3bb567=null,target:_0x541fe6=null,context:_0x2da47a=null,attributes:_0xa00930={},isResolvable:_0x13129d=!0x0,isSubmitted:_0x20e18c=!0x1,isFromAdapter:_0x50ec88=!0x1}={}){return this['fire'](bt('addCommentThread',_0x177d2e),{'channelId':_0x177d2e,'threadId':_0x12ad12,'comments':_0x32fe45,'unlinkedAt':_0x5348fd,'resolvedAt':_0x5b69db,'resolvedBy':_0x3bb567,'target':_0x541fe6,'context':_0x2da47a,'attributes':_0xa00930,'isFromAdapter':_0x50ec88,'isResolvable':_0x13129d,'isSubmitted':_0x20e18c}),this['getCommentThread'](_0x12ad12);}['openNewCommentThread']({channelId:_0x1ec123=Tt,threadId:_0x3dfd3c=_0x300841(),target:_0x18e5f9,context:_0x4be1eb=null,isResolvable:_0x283858=!0x0}){if(this['_readOnlyChannels']['has'](_0x1ec123)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x18e5f9)throw new _0xb557ef('commentsrepository-missing-target');const _0x58b574=this['addCommentThread']({'channelId':_0x1ec123,'threadId':_0x3dfd3c,'target':_0x18e5f9,'context':_0x4be1eb,'isResolvable':_0x283858});if(!_0x58b574)return null;const _0x11e400=this['_threadToController']['get'](_0x58b574),_0xda8047=_0x11e400['view']['commentThreadInputView']['commentInputView'],_0x17b7c9=this['context']['plugins']['get'](y),_0x47f01d=_0x17b7c9['getByInnerView'](_0x11e400['view']);return _0x17b7c9['activate'](_0x47f01d),_0xda8047['once']('editorReady',()=>_0xda8047['focus']()),_0x58b574;}['hasCommentThread'](_0x391b24){if('string'!=typeof _0x391b24)throw new _0xb557ef('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x391b24);}['updateCommentThread']({channelId:_0x461b81=Tt,threadId:_0x48db22,context:_0x9922dc,unlinkedAt:_0x1fe6cf,attributes:_0x42ed38,isFromAdapter:_0xbac87e=!0x1}){return this['fire'](bt('updateCommentThread',_0x461b81),{'channelId':_0x461b81,'threadId':_0x48db22,'context':_0x9922dc,'unlinkedAt':_0x1fe6cf,'attributes':_0x42ed38,'isFromAdapter':_0xbac87e}),this['getCommentThread'](_0x48db22);}['getCommentThread'](_0x543158){if('string'!=typeof _0x543158)throw new _0xb557ef('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x543158);}['fetchCommentThread']({channelId:_0x5ad7b0,threadId:_0x3999c1}={}){const _0x37c7f4=this['getCommentThread'](_0x3999c1);if(_0x37c7f4)return Promise['resolve'](_0x37c7f4);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xb557ef('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5ad7b0,'threadId':_0x3999c1})['then'](_0x3c2c1f=>this['hasCommentThread'](_0x3999c1)?this['getCommentThread'](_0x3999c1):_0x3c2c1f?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5ad7b0},_0x3c2c1f)):void 0x0)['catch'](_0x20af4b=>{throw console['error'](_0x20af4b),new _0xb557ef('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x215ac9,skipNotAttached:_0x183bc3=!0x1,skipEmpty:_0x4de8b1=!0x1,toJSON:_0x26449d=!0x1}={}){const _0x2f05cd=[];for(const _0x501e64 of this['_threads']['values']())_0x215ac9&&_0x501e64['channelId']!==_0x215ac9||_0x183bc3&&!_0x501e64['isAttached']||_0x4de8b1&&0x0===_0x501e64['length']||_0x2f05cd['push'](_0x501e64);return _0x26449d?_0x2f05cd['map'](_0x39c340=>_0x39c340['toJSON']()):_0x2f05cd;}['getAnnotationForCommentThread'](_0x1ac072){const _0x4004cd=this['_threadToController']['get'](_0x1ac072);if(!_0x4004cd)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x4004cd['view'])||null;}['getCommentThreadForAnnotation'](_0x5f2c76){const _0x395d9b=this['_viewToController']['get'](_0x5f2c76['innerView']);return _0x395d9b?_0x395d9b['model']:null;}['setActiveCommentThread'](_0x180b5d){const _0x46eca3=this['context']['plugins']['get'](y);if(!_0x180b5d)return void(this['activeCommentThread']&&_0x46eca3['deactivateAll']());const _0x153c14=this['getCommentThread'](_0x180b5d);if(!_0x153c14)throw new _0xb557ef('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x180b5d});if(!this['_threadToController']['has'](_0x153c14))throw new _0xb557ef('commentsrepository-active-not-attached',null,{'threadId':_0x180b5d});const _0x21a8ca=_0x46eca3['getByInnerView'](this['_threadToController']['get'](_0x153c14)['view']);_0x46eca3['activate'](_0x21a8ca);}['switchReadOnly'](_0x2fe48f,_0x12db70){_0x2fe48f?this['_readOnlyChannels']['add'](_0x12db70):this['_readOnlyChannels']['delete'](_0x12db70),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5738cc){return this['_readOnlyChannels']['has'](_0x5738cc)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x23e89b,_0x5c2f2a){return new yt(_0x23e89b,_0x5c2f2a);}['setPermissions'](_0xcb3bff,_0x3a18d8=Tt){this['_permissions']['set'](_0x3a18d8,_0xcb3bff),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5b614a=Tt){return this['_permissions']['has'](_0x5b614a)?this['_permissions']['get'](_0x5b614a):_t;}['_addCommentThread']({channelId:_0x2379ea,threadId:_0x9951c9,comments:_0x182185,unlinkedAt:_0x2709f1,resolvedAt:_0x46c25a,resolvedBy:_0x1d9df2,target:_0x5cf77b,context:_0x6d3c1a,attributes:_0x354390,isFromAdapter:_0xb113cb,isResolvable:_0x43d342,isSubmitted:_0x394f78}){if('string'!=typeof _0x9951c9)throw new _0xb557ef('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x9951c9});if(this['hasCommentThread'](_0x9951c9))throw new _0xb557ef('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x9951c9});const _0x34a32c=new pi(this,{'channelId':_0x2379ea,'id':_0x9951c9,'context':_0x6d3c1a,'attributes':_0x354390,'unlinkedAt':_0x2709f1,'resolvedAt':_0x46c25a,'resolvedBy':_0x1d9df2?this['context']['plugins']['get'](it)['getUser'](_0x1d9df2):null,'isResolvable':_0x43d342,'isSubmitted':_0x394f78||_0xb113cb});this['_threads']['set'](_0x9951c9,_0x34a32c);for(const _0x2c0499 of _0x182185)_0x34a32c['_add'](this['_createNewComment']({'threadId':_0x9951c9,..._0x2c0499}));return _0x5cf77b&&_0x34a32c['attachTo'](_0x5cf77b),_0xb113cb||!_0x34a32c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2379ea,'threadId':_0x9951c9});}['_submitCommentThread']({channelId:_0xb0ca29,threadId:_0x4e812f}){if(!this['hasCommentThread'](_0x4e812f))throw new _0xb557ef('commentsrepository-missing-comment-thread',this);const _0x9f7c03=this['getCommentThread'](_0x4e812f);if(_0x9f7c03['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x507703,comments:_0x45a04c,resolvedAt:_0x2d8e18,resolvedBy:_0x2676d3,context:_0x313846,attributes:_0x5509d3}=_0x9f7c03,_0x45361f=this['context']['plugins']['get']('PendingActions'),_0xeb98f7=_0x45361f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0xb0ca29,'threadId':_0x507703,'comments':_0x45a04c['map'](_0x1efaac=>_0x1efaac['toJSON']()),'resolvedAt':_0x2d8e18,'resolvedBy':_0x2676d3?_0x2676d3['id']:_0x2676d3,'context':_0x313846,'attributes':_0x5509d3})['then'](({comments:_0x199fd6})=>{_0x45361f['remove'](_0xeb98f7);for(const _0x228463 of _0x199fd6)this['_updateComment']({'channelId':_0xb0ca29,'threadId':_0x4e812f,'commentId':_0x228463['commentId'],'createdAt':_0x228463['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4cae4b=>{throw console['error'](_0x4cae4b),new _0xb557ef('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2ef497,target:_0x3953be}){const _0x591639=this['getCommentThread'](_0x2ef497);if(!_0x591639)throw new _0xb557ef('commentsrepository-attach-missing-comment-thread',this);const _0x8135f3=this['context']['plugins']['get']('PendingActions'),_0x3cad7e=this['context']['plugins']['get'](y),_0x25907b=this['_createCommentThreadView'](_0x591639),_0x59f65b=new yt(_0x591639,_0x25907b);let _0x3c2a17=null;_0x25907b['on']('change:isDirty',(_0x33f319,_0x304bac,_0x4bfdc5)=>{_0x4bfdc5?_0x3c2a17=_0x8135f3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3c2a17&&(_0x8135f3['remove'](_0x3c2a17),_0x3c2a17=null);}),this['_threadToController']['set'](_0x591639,_0x59f65b),this['_viewToController']['set'](_0x25907b,_0x59f65b);const _0x466a96=new E(this['context']['locale'],_0x25907b);_0x466a96['bind']('length')['to'](_0x25907b),_0x466a96['bind']('isDirty')['to'](_0x25907b,'isDirty',_0x25907b,'length',(_0xd33323,_0x229e43)=>_0xd33323||!_0x229e43),_0x466a96['bind']('isActive')['to'](_0x25907b),_0x466a96['type']='comment';const _0x58f540=new T({'view':_0x466a96,'target':_0x3953be,'type':'comment','isVisible':!_0x591639['archivedAt']});return _0x25907b['on']('escape',()=>{_0x58f540['fire']('escape');}),this['_bindAnnotationToEditors'](_0x25907b,_0x58f540),_0x3cad7e['add'](_0x58f540),_0x58f540;}['_bindAnnotationToEditors'](_0x4a77d5,_0x2cdfba){this['listenTo'](_0x4a77d5,'editorReady',(_0x3ee41f,_0x2a23d3)=>{const _0x1ef55e=_0x2a23d3['ui']['view']['body']['bodyCollectionContainer'];_0x2cdfba['focusableElements']['add'](_0x1ef55e),this['context']instanceof _0x3f49f1&&this['context']['ui']['focusTracker']['add'](_0x1ef55e);},{'priority':'highest'}),this['listenTo'](_0x4a77d5,'editorDestroyed',(_0x2dcfc0,_0x13bdd6)=>{const _0x5a1eaf=_0x13bdd6['ui']['view']['body']['bodyCollectionContainer'];_0x2cdfba['focusableElements']['has'](_0x5a1eaf)&&_0x2cdfba['focusableElements']['remove'](_0x5a1eaf),this['context']instanceof _0x3f49f1&&this['context']['ui']['focusTracker']['remove'](_0x5a1eaf);});}['_unbindEditors'](_0xd453d5){this['stopListening'](_0xd453d5,'editorReady'),this['stopListening'](_0xd453d5,'editorDestroyed');}['_createCommentThreadView'](_0x27d9a3){const _0x151afd=this['context']['plugins']['get'](it),{config:_0x2bdf27,locale:_0x298cac}=this['context'],_0x55fe3d=lt(_0x2bdf27['get']('locale'),_0x298cac);return new(0x0,(_0x2bdf27['get']('comments'))['CommentThreadView'])(_0x298cac,_0x27d9a3,_0x151afd['me'],{'editorConfig':{..._0x2bdf27['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2bdf27['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2bdf27['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2bdf27['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2bdf27['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x55fe3d,'CommentView':_0x2bdf27['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1eea0a,channelId:_0x38f024,resolvedAt:_0x34c615,resolvedBy:_0x5c20e7,isFromAdapter:_0x47a7db}){if(!this['hasCommentThread'](_0x1eea0a))throw new _0xb557ef('commentsrepository-missing-comment-thread',null,{'threadId':_0x1eea0a});const _0x352fb7=this['getCommentThread'](_0x1eea0a);if(_0x352fb7['isResolved'])throw new _0xb557ef('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1eea0a});const _0x389b5b=this['context']['plugins']['get'](it);if(_0x352fb7['resolvedBy']=_0x389b5b['getUser'](_0x5c20e7),_0x352fb7['resolvedAt']=_0x34c615,_0x47a7db||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4445c8=this['context']['plugins']['get']('PendingActions'),_0x4c43db=_0x4445c8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x38f024,'threadId':_0x1eea0a})['then'](({resolvedAt:_0x29ca4c,resolvedBy:_0x3e6b65})=>{_0x4445c8['remove'](_0x4c43db),_0x352fb7['resolvedBy']['id']!==_0x3e6b65&&(_0x352fb7['resolvedBy']=_0x389b5b['getUser'](_0x3e6b65)),_0x352fb7['resolvedAt']=_0x29ca4c;})['catch'](_0x3bc496=>{throw console['error'](_0x3bc496),new _0xb557ef('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x411755,channelId:_0x58de8d,isFromAdapter:_0x46779e}){if(!this['hasCommentThread'](_0x411755))throw new _0xb557ef('commentsrepository-missing-comment-thread',null,{'threadId':_0x411755});const _0x2f78ae=this['getCommentThread'](_0x411755);if(!_0x2f78ae['isResolved'])throw new _0xb557ef('commentsrepository-reopen-comment-thread',null,{'threadId':_0x411755});if(_0x2f78ae['resolvedBy']=null,_0x2f78ae['resolvedAt']=null,_0x46779e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1e483a=this['context']['plugins']['get']('PendingActions'),_0x52a381=_0x1e483a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x58de8d,'threadId':_0x411755})['then'](()=>_0x1e483a['remove'](_0x52a381))['catch'](_0x5a7a0e=>{throw console['error'](_0x5a7a0e),new _0xb557ef('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x38c5e0,isFromAdapter:_0x126a64}){const _0x1e8d77=this['getCommentThread'](_0x38c5e0);if(!_0x1e8d77)throw new _0xb557ef('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x38c5e0),this['_threads']['delete'](_0x38c5e0),!_0x1e8d77['isSubmitted']||_0x126a64||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3ed834=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5c0d9a}=_0x1e8d77,_0x4f9190=_0x3ed834['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5c0d9a,'threadId':_0x38c5e0})['then'](()=>_0x3ed834['remove'](_0x4f9190))['catch'](_0x29ef73=>{throw console['error'](_0x29ef73),new _0xb557ef('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4517c1,unlinkedAt:_0x204f15,context:_0x364748,attributes:_0x39a54d,isFromAdapter:_0x2d0a22}){if('string'!=typeof _0x4517c1)throw new _0xb557ef('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4517c1});if(!this['hasCommentThread'](_0x4517c1))throw new _0xb557ef('commentsrepository-missing-comment-thread',null,{'threadId':_0x4517c1});const _0x1a3905=this['getCommentThread'](_0x4517c1);let _0x1a7201=!0x1;if(void 0x0!==_0x364748&&_0x1a3905['context']!==_0x364748&&(_0x1a3905['context']=_0x364748,_0x1a7201=!0x0),void 0x0!==_0x204f15&&_0x1a3905['unlinkedAt']!==_0x204f15&&(_0x1a3905['unlinkedAt']=_0x204f15,_0x1a7201=!0x0),_0x39a54d&&!wt(_0x39a54d,_0x1a3905['attributes'])&&(_0x1a3905['attributes']=_0x39a54d,_0x1a7201=!0x0),!_0x1a7201)return Promise['resolve']();if(!_0x1a3905['isSubmitted']||_0x2d0a22||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5d8684=this['context']['plugins']['get']('PendingActions'),{channelId:_0x6bb596}=_0x1a3905,_0x452ed6=_0x5d8684['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x6bb596,'threadId':_0x4517c1,'context':_0x364748,'unlinkedAt':_0x204f15,'attributes':_0x39a54d})['then'](()=>_0x5d8684['remove'](_0x452ed6))['catch'](_0x25d810=>{throw console['error'](_0x25d810),new _0xb557ef('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x52a5b9){const _0xd9c9ca=this['context']['plugins']['get'](y),_0x422a60=this['getCommentThread'](_0x52a5b9);if(_0x422a60['_isAttached']=!0x1,this['_threadToController']['has'](_0x422a60)){const _0x2a9152=this['_threadToController']['get'](_0x422a60),_0x50d8b6=_0x2a9152['view'],_0x2e13de=_0xd9c9ca['getByInnerView'](_0x50d8b6);this['_threadToController']['delete'](_0x422a60),this['_viewToController']['delete'](_0x50d8b6),_0x2e13de&&_0xd9c9ca['remove'](_0x2e13de),_0x2a9152['destroy'](),_0x50d8b6['destroy']()['then'](()=>{this['_unbindEditors'](_0x50d8b6);});}}['_updateActiveAnnotation']({threadId:_0x42e929,resolvedAt:_0x447eb5,unlinkedAt:_0x4da8d6}){const _0xa7f458=!!_0x447eb5,_0x37afcd=this['context']['plugins']['get'](y),_0x643910=this['getCommentThread'](_0x42e929);if(this['_threadToController']['has'](_0x643910)){const _0x55ab3e=this['_threadToController']['get'](_0x643910)['view'],_0x3a89ab=_0x37afcd['getByInnerView'](_0x55ab3e);_0x3a89ab&&(_0xa7f458&&_0x37afcd['_removeActiveAnnotation'](_0x3a89ab),_0x4da8d6?_0x3a89ab['isVisible']=!0x1:_0x3a89ab['refreshVisibility']());}}['_getExternalAuthor'](_0xc5317d){const _0x194cf9=this['context']['plugins']['get'](it),_0x57edb3=pt('external:'+_0xc5317d),_0x4e713e=_0x194cf9['getUser'](_0x57edb3);return _0x4e713e||_0x194cf9['addUser']({'id':_0x57edb3,'name':_0xc5317d});}['_createNewComment']({threadId:_0x34aca1,commentId:_0xae334a=_0x300841(),content:_0x3fc004,authorId:_0x392741,createdAt:_0x12c828,attributes:_0x5a0ed9}){if('string'!=typeof _0xae334a)throw new _0xb557ef('commentsrepository-invalid-commentid');if('string'!=typeof _0x392741)throw new _0xb557ef('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3fc004||!_0x3fc004['trim']())throw new _0xb557ef('commentsrepository-invalid-comment-content');const _0x359438=this['context']['plugins']['get'](it)['getUser'](_0x392741);if(!_0x359438)throw new _0xb557ef('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x392741});let _0x7ea0b6=null,_0xfbcfaa=_0x12c828;return _0x5a0ed9?.['@external']&&(_0x7ea0b6=this['_getExternalAuthor'](_0x5a0ed9['@external']['authorName']),_0xfbcfaa=new Date(_0x5a0ed9['@external']['createdAt'])),new wi(this,{'threadId':_0x34aca1,'id':_0xae334a,'author':_0x7ea0b6||_0x359438,'creator':_0x359438,'content':_0x3fc004,'createdAt':_0x12c828,'authoredAt':_0xfbcfaa,'attributes':_0x5a0ed9});}['_addComment'](_0x2b4d48){let {threadId:_0x42542c,content:_0x527421,attributes:_0x2ea4df,isFromAdapter:_0x2bbdad}=_0x2b4d48;const _0x1cb06c=this['getCommentThread'](_0x2b4d48['threadId']);if(!_0x1cb06c)throw new _0xb557ef('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x385fe3=this['_createNewComment'](_0x2b4d48),{id:_0x2b69d8}=_0x385fe3;if(_0x1cb06c['_add'](_0x385fe3),_0x2bbdad||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1cb06c['isSubmitted'])return Promise['resolve']();const _0x453f9a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4e2047}=_0x1cb06c,_0x1b63d6=_0x453f9a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2ea4df||(_0x2ea4df={}),this['adapter']['addComment']({'channelId':_0x4e2047,'threadId':_0x42542c,'commentId':_0x2b69d8,'content':_0x527421,'attributes':_0x2ea4df})['then'](_0x13b7e5=>{_0x453f9a['remove'](_0x1b63d6),_0x13b7e5&&this['_updateComment']({'channelId':_0x4e2047,'threadId':_0x42542c,'commentId':_0x2b69d8,'createdAt':_0x13b7e5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x304e66=>{throw console['error'](_0x304e66),new _0xb557ef('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x2814a5,commentId:_0x391de6,content:_0x6b8d17,createdAt:_0x1de322,attributes:_0x23b8f9,isFromAdapter:_0x3f9d73}){if(void 0x0!==_0x6b8d17&&('string'!=typeof _0x6b8d17||!_0x6b8d17['trim']()['length']))throw new _0xb557ef('commentsrepository-update-comment-invalid-content');const _0x5eecf2=this['getCommentThread'](_0x2814a5),_0x49d1f2=_0x5eecf2['getComment'](_0x391de6);if(!_0x49d1f2)throw new _0xb557ef('commentsrepository-update-missing-comment',this);let _0x18aabe=!0x1;if(_0x6b8d17&&_0x6b8d17!==_0x49d1f2['content']&&(_0x49d1f2['isEditable']||_0x3f9d73)&&(_0x49d1f2['content']=_0x6b8d17,_0x18aabe=!0x0),_0x1de322&&_0x1de322!==_0x49d1f2['createdAt']&&(_0x49d1f2['createdAt']=_0x1de322,_0x49d1f2['attributes']&&_0x49d1f2['attributes']['@external']||(_0x49d1f2['authoredAt']=_0x1de322),_0x18aabe=!0x0),_0x23b8f9&&!wt(_0x23b8f9,_0x49d1f2['attributes'])&&(_0x49d1f2['attributes']=_0x23b8f9,_0x18aabe=!0x0),!_0x18aabe)return Promise['resolve']();if(_0x5eecf2['fire']('commentUpdated'),_0x3f9d73||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x22074f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cf335}=this['getCommentThread'](_0x49d1f2['threadId']),_0x9c1707=_0x22074f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4cf335,'threadId':_0x2814a5,'commentId':_0x391de6,'content':_0x6b8d17,'attributes':_0x23b8f9})['then'](()=>_0x22074f['remove'](_0x9c1707))['catch'](_0x4c648b=>{throw console['error'](_0x4c648b),new _0xb557ef('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x5a818c,commentId:_0x2734a9,isFromAdapter:_0xfc4d9}){const _0x2a2a3e=this['getCommentThread'](_0x5a818c),_0x5cb4ef=_0x2a2a3e['getComment'](_0x2734a9);if(!_0x5cb4ef)throw new _0xb557ef('commentsrepository-remove-missing-comment',this);if(_0x2a2a3e['_remove'](_0x5cb4ef),_0xfc4d9||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2df26f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1f6ded}=_0x2a2a3e,_0x445721=_0x2df26f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1f6ded,'threadId':_0x5a818c,'commentId':_0x2734a9})['then'](()=>_0x2df26f['remove'](_0x445721))['catch'](_0x2e6deb=>{throw console['error'](_0x2e6deb),new _0xb557ef('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x16f0db(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x211ee8,_0x325a47){super();const _0x2dde3c=_0x211ee8['context']['plugins']['get'](it)['me'],_0x641269=_0x211ee8['getCommentThread'](_0x325a47['threadId']),_0x2ab64a=0x0===_0x641269['comments']['length'],_0x871be5=_0x2dde3c===_0x325a47['author'];this['id']=_0x325a47['id'],this['threadId']=_0x325a47['threadId'],this['author']=_0x325a47['author'],this['creator']=_0x325a47['creator'],this['isExternal']=Boolean(_0x325a47['attributes']&&_0x325a47['attributes']['@external']),this['set']('content',_0x325a47['content']),this['createdAt']=_0x325a47['createdAt']||new Date(),this['set']('authoredAt',_0x325a47['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x641269,'resolvedAt'),this['set']('attributes',_0x325a47['attributes']||{}),this['bind']('isEditable')['to'](_0x211ee8,'_permissions',()=>{const _0x565cde=_0x211ee8['getPermissions'](_0x641269['channelId'])['write'],_0x128164=_0x211ee8['getPermissions'](_0x641269['channelId'])['modifyAll'];return _0x871be5&&_0x565cde||!_0x871be5&&_0x128164;}),this['bind']('isRemovable')['to'](_0x641269,'isRemovable',_0x211ee8,'_permissions',_0x29b459=>{const _0x18e9f0=_0x211ee8['getPermissions'](_0x641269['channelId'])['write'],_0x124e98=_0x211ee8['getPermissions'](_0x641269['channelId'])['modifyAll'];return _0x871be5&&_0x18e9f0||_0x29b459&&_0x2ab64a||!_0x871be5&&_0x124e98&&!_0x2ab64a;}),this['bind']('isReadOnly')['to'](_0x641269,'isReadOnly'),this['_repository']=_0x211ee8;}get['weight'](){return Math['max'](function(_0x2c35f2){const _0x3b66e6=document['createElement']('div');return _0x3b66e6['innerHTML']=_0x2c35f2,_0x3b66e6['textContent']['length'];}(this['content']),0xc8);}['update'](_0x29d47c){const {threadId:_0x23722c,id:_0x4ed4d3}=this;if(!this['_repository']['hasCommentThread'](_0x23722c))throw new _0xb557ef('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x18539b}=this['_repository']['getCommentThread'](_0x23722c);this['_repository']['fire'](bt('updateComment',_0x18539b,_0x23722c),{'channelId':_0x18539b,'threadId':_0x23722c,'commentId':_0x4ed4d3,..._0x29d47c});}['setAttribute'](_0x5a4cbb,_0x3f0cc3){const _0x3a10eb=It(this['attributes']);At(_0x3a10eb,_0x5a4cbb,_0x3f0cc3),this['update']({'attributes':_0x3a10eb});}['removeAttribute'](_0x3bf0b6){const _0x3e42b7=It(this['attributes']);Ct(_0x3e42b7,_0x3bf0b6),this['update']({'attributes':_0x3e42b7});}['remove'](_0x44d1b1={}){if(!_0x44d1b1['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x29495d,id:_0x5d761d}=this;if(!this['_repository']['hasCommentThread'](_0x29495d))throw new _0xb557ef('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5d4621}=this['_repository']['getCommentThread'](_0x29495d);this['_repository']['fire'](bt('removeComment',_0x5d4621,_0x29495d),{'channelId':_0x5d4621,'threadId':_0x29495d,'commentId':_0x5d761d,..._0x44d1b1});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x24948f,..._0x456932){for(const _0x1aa4db of _0x456932)void 0x0!==_0x1aa4db&&(_0x24948f+=':'+String(_0x1aa4db));return _0x24948f;}class rt extends _0x2bd618{constructor(_0x5a8a94){super(_0x5a8a94),this['set']('hasContent',!0x1);}['refresh'](){const _0x22d8fa=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x18056d of _0x22d8fa['getRanges']())if(this['_hasContent'](_0x18056d))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x507bd8=_0x300841(),ranges:_0x43cabb,comment:_0x27ae5d}={}){const _0xde6325=this['editor']['model'],_0x46df6c=_0x43cabb??Array['from'](_0xde6325['document']['selection']['getRanges']()),_0x280a94=[];for(const _0x31b608 of _0x46df6c)this['_hasContent'](_0x31b608)&&_0x280a94['push'](this['_trimToContent'](_0x31b608));if(!_0x280a94['length'])throw new _0xb557ef('addcommentthreadcommand-incorrect-ranges',null);_0x27ae5d&&this['_createCommentThread'](_0x507bd8,_0x27ae5d),this['_createMarkersFromRanges'](_0x507bd8,_0x280a94,!!_0x27ae5d);}['_createMarkersFromRanges'](_0x440470,_0x577a93,_0x4248cf){this['editor']['model']['change'](_0xde5718=>{for(const _0x3bad30 of _0x577a93){const _0x28c096=_0x300841()['substr'](0x1,0x5),_0x278e99='comment:'+_0x440470+':'+_0x28c096;_0xde5718['addMarker'](_0x278e99,{'range':_0x3bad30,'usingOperation':_0x4248cf,'affectsData':_0x4248cf});}});}['_createCommentThread'](_0x4266e2,_0xa00009){const _0x11c3af=this['editor']['plugins']['get']('CommentsRepository'),_0x44a2b0=this['editor']['config']['get']('collaboration.channelId'),_0x305a4e=this['editor']['plugins']['get']('Users')['me'];if(!_0x305a4e)throw new _0xb557ef('addcommentthreadcommand-user-not-found',null);_0x11c3af['addCommentThread']({'threadId':_0x4266e2,'channelId':_0x44a2b0,'comments':[{'authorId':_0x305a4e['id'],'content':_0xa00009,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x33286e){for(const _0x2bee5b of _0x33286e['getItems']())if(this['_itemIsContent'](_0x2bee5b))return!0x0;return!0x1;}['_itemIsContent'](_0x3a1738){return _0x3a1738['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x3a1738)&&!_0x3a1738['is']('element','tableCell');}['_trimToContent'](_0xef4233){const _0x923b34=_0x5d4a26=>!this['_itemIsContent'](_0x5d4a26['item']),_0x1716f7=_0xef4233['start']['getLastMatchingPosition'](_0x923b34),_0x170c2d=_0xef4233['end']['getLastMatchingPosition'](_0x923b34,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1716f7,_0x170c2d);}}class b extends _0x108da2{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f5285){super(_0x2f5285),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4fc0e7=this['editor'],_0x4c90c3=_0x4fc0e7['model']['document']['selection'],_0xeae5f8=_0x59d6ea(()=>this['refreshSelectedViews'](),0xa);_0x4c90c3['on']('change:range',(_0x442698,_0x5cc7b0)=>{_0x5cc7b0['directChange']&&(_0xeae5f8['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4fc0e7['editing']['view']['document'],'change:isFocused',(_0x37a160,_0x199a83,_0x353924)=>{_0x353924&&_0xeae5f8();}),this['listenTo'](_0x4fc0e7['ui']['focusTracker'],'change:isFocused',(_0x38234b,_0x32e80e,_0x3f050f)=>{_0x3f050f||_0x4fc0e7['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x50f7ef=>this['_editorAnnotationsData']['has'](_0x50f7ef['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x58e6a6){if(this['_editorAnnotations']['has'](_0x58e6a6['view']))return;this['_editorAnnotations']['add'](_0x58e6a6['view']),this['editor']['ui']['focusTracker']['add'](_0x58e6a6['view']['element']);const _0x5f0bf7=this['editor']['plugins']['get'](y);this['listenTo'](_0x5f0bf7['collection'],'remove',(_0x11a1b3,_0x174803)=>{this['editor']['ui']['focusTracker']['remove'](_0x174803['view']['element']),this['_editorAnnotations']['delete'](_0x174803['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x438186){if('function'!=typeof _0x438186)throw new _0xb557ef('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x438186);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x32eca4,annotations:_0x49a8a3}){const _0x4ac25a=[],_0x585a52=this['editor']['model']['document']['selection'],_0x87281=Array['from'](_0x585a52['getRanges']());for(const [_0x557c13,_0x17128a]of this['_editorAnnotationsData']){const _0x3a600c=_0x414701(_0x17128a),_0x3db0ad=_0x49a8a3['getByInnerView'](_0x557c13);_0x3a600c&&_0x3db0ad&&_0x4ac25a['push']({'annotation':_0x3db0ad,'range':_0x3a600c});}function _0x414701(_0x5c04f2){for(const _0x3d28c5 of _0x5c04f2)for(const _0x159f8b of _0x87281)if(_0x3d28c5['containsRange'](_0x159f8b,!_0x585a52['isCollapsed']))return _0x3d28c5;return null;}return _0x4ac25a['sort']((_0x11e062,_0x3bea76)=>{const _0x31699f=_0x11e062['range'],_0xe73dda=_0x3bea76['range'];if(!_0x31699f['isEqual'](_0xe73dda)){if(_0x31699f['containsRange'](_0xe73dda,!0x0))return 0x1;if(_0xe73dda['containsRange'](_0x31699f,!0x0))return-0x1;}return _0x11e062['annotation']==_0x32eca4?-0x1:_0x3bea76['annotation']==_0x32eca4?0x1:0x0;})['map'](_0x31590e=>_0x31590e['annotation']);}get['_editorAnnotationsData'](){const _0x4a3663=new Map();for(const _0x3ce5ae of Array['from'](this['_dataCollectors']))for(const [_0x1571f1,_0x1ebf37]of _0x3ce5ae())_0x4a3663['set'](_0x1571f1,_0x1ebf37);return _0x4a3663;}}class st extends _0x108da2{['afterInit'](){const _0x538be1=this['editor'];if(!_0x538be1['plugins']['has']('RestrictedEditingModeEditing'))return;_0x538be1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x108da2{constructor(_0x1b6403){super(_0x1b6403),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x39a384=this['editor'],_0x24823f=_0x39a384['commands']['get']('importWord'),_0x168350=_0x39a384['plugins']['get'](it);_0x24823f&&(_0x24823f['on']('execute',(_0x2c7c14,[,_0x553789])=>{_0x553789['collaboration_features']={'comments':!0x0,'user_id':_0x168350['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x24823f,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x12e379,_0x1d4533){const {comment_threads:_0x171fbf}=_0x1d4533;_0x171fbf&&_0x171fbf['forEach'](({thread_id:_0x1f437f,comments:_0x58c8bf,is_resolved:_0x33fa4c})=>{const _0x2671ce=new Date(),_0x6c145a=_0x58c8bf['map'](({author:_0x23faf5,content:_0x322f6f,created_at:_0xa13b10})=>({'content':_0x322f6f,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2671ce,'attributes':{'@external':{'authorName':_0x23faf5,'createdAt':_0xa13b10?new Date(_0xa13b10):new Date(),'source':'importWord'}}})),_0x5b62e8=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x5b62e8,'threadId':_0x1f437f,'comments':_0x6c145a,'resolvedAt':_0x33fa4c?_0x2671ce:null});});}}class at extends _0x108da2{constructor(_0x230407){super(_0x230407),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0xf6d969=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0xf6d969,'contentInsertion',(_0x202e4b,_0x5b0d49)=>this['_removeMarkersWithoutThreads'](_0x5b0d49['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x5a18a1){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5a18a1;const _0x2a57f3=this['editor']['plugins']['get']('CommentsRepository');for(const _0x3d3b10 of _0x5a18a1['keys']()){const [_0xf85349,_0xdb4e40]=_0x3d3b10['split'](':');'comment'!=_0xf85349||_0x2a57f3['hasCommentThread'](_0xdb4e40)||_0x5a18a1['delete'](_0x3d3b10);}return _0x5a18a1;}['_registerMarkerInClipboardPipeline'](){const _0x5e81d3=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2aa5b4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2aa5b4&&_0x5e81d3['_registerMarkerToCopy']('comment',_0x2aa5b4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x594aa2){switch(_0x594aa2){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x108da2{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3eb53e,_0x106eba)=>{if(!_0x106eba['options']['showCommentHighlights'])return null;if(_0x106eba['options']['ignoreResolvedComments']){const {id:_0x5427c9}=er(_0x3eb53e['markerName']),_0x36850c=this['editor']['plugins']['get'](o);if(_0x36850c['getCommentThread'](_0x5427c9)?.['isResolved']&&_0x3eb53e['item'])return _0x106eba['consumable']['consume'](_0x3eb53e['item'],'addMarker:'+_0x3eb53e['markerName']),_0x106eba['consumable']['consume'](_0x3eb53e['item'],'removeMarker:'+_0x3eb53e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x12d53e=>{_0x12d53e['on']('addMarker:comment',(_0xdf64ba,_0x939896,_0x5c0508)=>{if(!_0x5c0508['options']['showCommentHighlights'])return;const _0x37b369=_0x939896['item'];if(!_0x37b369)return;const _0x159295=_0x5c0508['mapper']['toViewElement'](_0x37b369);this['editor']['model']['schema']['isObject'](_0x37b369)&&_0x159295&&!_0x159295['getCustomProperty']('widget')&&_0x159295['is']('containerElement')&&_0x11cd4d(_0x159295,_0x5c0508['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3f04d2,{writer:_0x27e68e,options:_0x43e847})=>{if(!_0x43e847['showCommentHighlights'])return null;const _0x1b79a7=_0x27e68e['createContainerElement']('div'),_0x557a44=_0x27e68e['createEmptyElement']('hr');return _0x27e68e['addClass']('ck-horizontal-line',_0x1b79a7),_0x27e68e['insert'](_0x27e68e['createPositionAt'](_0x1b79a7,0x0),_0x557a44),_0x1b79a7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x74ea67,{writer:_0x34aaf,options:_0x9d1fdc})=>{if(!_0x9d1fdc['showCommentHighlights'])return null;const _0x5e97d6=_0x34aaf['createContainerElement']('span'),_0x281550=_0x34aaf['createEmptyElement']('img');return _0x34aaf['addClass']('image-inline',_0x5e97d6),_0x34aaf['insert'](_0x34aaf['createPositionAt'](_0x5e97d6,0x0),_0x281550),_0x5e97d6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x195cac,{writer:_0x10098d,options:_0x18c4ac})=>{if(_0x18c4ac['showCommentHighlights'])return _0x10098d['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x135c93,_0x4c6b51,_0x2ea80b)=>{_0x2ea80b['options']['showCommentHighlights']&&_0x135c93['stop']();},{'priority':'high'});}}class r extends _0x108da2{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(_0x101876){super(_0x101876),this['set']('isThreadsLoadingPaused',!0x0),_0x101876['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x37c087,_0x26bb51,_0x3a4e48,_0x206cff)=>{const _0x9d3abd=_0x101876['plugins']['get'](o),_0x5ad88d=_0x3a4e48?er(_0x3a4e48)['id']:null;_0x101876['model']['change'](()=>{if(_0x5ad88d){const _0x3ab432=this['getAllMarkersForId'](_0x5ad88d);for(const _0x1c6530 of _0x3ab432)_0x101876['editing']['reconvertMarker'](_0x1c6530);}if(_0x206cff){const {id:_0xfca516}=er(_0x206cff),_0x186479=_0x9d3abd['getCommentThread'](_0xfca516);if(_0x186479&&_0x186479['unlinkedAt'])return;if(_0x186479&&!_0x186479['isAttached'])return;const _0x23e9db=this['getAllMarkersForId'](_0xfca516);for(const _0x40375f of _0x23e9db)_0x101876['editing']['reconvertMarker'](_0x40375f);}}),_0x5ad88d&&this['scrollToThreadMarker'](_0x5ad88d);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5b1547=this['editor'],_0x1ab6ec=_0x5b1547['plugins']['get'](o),_0x8d484d=_0x5b1547['config']['get']('collaboration.channelId'),_0x21dafa=_0x1ab6ec['getCommentThreads']()['filter'](_0x3b5c3c=>_0x3b5c3c['channelId']!==_0x8d484d);_0x5b1547['commands']['add']('addCommentThread',new rt(_0x5b1547)),this['listenTo'](_0x5b1547,'change:isReadOnly',(_0x41f36b,_0x154728,_0x3ac8dc)=>{_0x1ab6ec['switchReadOnly'](_0x3ac8dc,_0x5b1547['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1ab6ec,ft('addCommentThread',_0x8d484d),(_0x2ac4df,{threadId:_0x285537})=>{const _0x4618b3=this['editor']['plugins']['get'](o)['getCommentThread'](_0x285537);_0x4618b3?.['unlinkedAt']&&this['_attachArchivedThread'](_0x285537);}),this['listenTo'](_0x1ab6ec,ft('removeCommentThread',_0x8d484d),(_0x1b07ab,{threadId:_0x7e7614})=>{_0x5b1547['model']['enqueueChange']({'isUndoable':!0x1},_0x221044=>{const _0x15b697=this['getAllMarkersForId'](_0x7e7614);for(const _0x362f9f of _0x15b697)_0x221044['removeMarker'](_0x362f9f);});}),this['listenTo'](_0x1ab6ec,ft('resolveCommentThread',_0x8d484d),(_0x4725a3,{threadId:_0x2e4d31})=>{(this['_reconvertMarkers'](_0x2e4d31),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x2e4d31)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1ab6ec,ft('reopenCommentThread',_0x8d484d),(_0x259b19,{threadId:_0x2c6d91})=>{this['_reconvertMarkers'](_0x2c6d91);},{'priority':'low'}),this['listenTo'](_0x1ab6ec,ft('addComment',_0x8d484d),(_0x385527,{threadId:_0x3d67d3,isFromAdapter:_0x49309a})=>{const _0xdaf443=this['getAllMarkersForId'](_0x3d67d3);if(_0x49309a||0x0==_0xdaf443['length']||!_0x1ab6ec['hasCommentThread'](_0x3d67d3))return;0x1===_0x1ab6ec['getCommentThread'](_0x3d67d3)['length']&&_0x5b1547['model']['enqueueChange']({'isUndoable':!0x1},_0x461bf6=>{for(const _0x275fbd of _0xdaf443)_0x461bf6['updateMarker'](_0x275fbd,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x21dafa);}['afterInit'](){!async function(_0x5d68b4){const _0x44c41a=_0x29760b([0x36,0x66,0x56,0x76,0x73,0x49,0x58,0x74,0x62,0x4f,0x42,0x45,0x32,0x30,0x53,0x31,0x78,0x4b,0x7a,0x79,0x4a,0x77,0x37,0x4c,0x55,0x35,0x70,0x71,0x4d,0x65,0x44,0x47,0x48,0x43,0x59,0x39,0x54,0x6c,0x72,0x69,0x41,0x34,0x6d,0x50,0x57,0x46,0x6a,0x5a,0x52,0x6b,0x33,0x68,0x64,0x75,0x51,0x6f,0x61,0x4e,0x67,0x63,0x6e,0x38]),_0x3f1cae=0x143ba50f,_0x5454e6=0x143cc95f^_0x3f1cae,_0x137db9=window[_0x29760b([0x44,0x61,0x74,0x65])][_0x29760b([0x6e,0x6f,0x77])](),_0x463b98=_0x5d68b4[_0x29760b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1daf1d=new window[(_0x29760b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f73f3=>{_0x463b98[_0x29760b([0x6f,0x6e,0x63,0x65])](_0x29760b([0x72,0x65,0x61,0x64,0x79]),_0x3f73f3);}),_0x3bfba1={[_0x29760b([0x6b,0x74,0x79])]:_0x29760b([0x45,0x43]),[_0x29760b([0x75,0x73,0x65])]:_0x29760b([0x73,0x69,0x67]),[_0x29760b([0x63,0x72,0x76])]:_0x29760b([0x50,0x2d,0x32,0x35,0x36]),[_0x29760b([0x78])]:_0x29760b([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]),[_0x29760b([0x79])]:_0x29760b([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]),[_0x29760b([0x61,0x6c,0x67])]:_0x29760b([0x45,0x53,0x32,0x35,0x36])},_0x489146=_0x463b98[_0x29760b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x29760b([0x67,0x65,0x74])](_0x29760b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x36e410(){let _0x52e022,_0x409375=null,_0x1b24c5=null;try{if(_0x489146==_0x29760b([0x47,0x50,0x4c]))return _0x29760b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x52e022=_0x27f96f(),!_0x52e022)return _0x29760b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x52e022[_0x29760b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1b24c5=_0x4c30de(_0x52e022[_0x29760b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x52e022[_0x29760b([0x6a,0x74,0x69])])),await _0x25b853()?_0x20993b()?_0x48b6bb()?_0x29760b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x169850()?(_0x52e022[_0x29760b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x29760b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x409375=_0x5571c6(_0x29760b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x52e022[_0x29760b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x29760b([0x74,0x72,0x69,0x61,0x6c])&&(_0x409375=_0x5571c6(_0x29760b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x76bf96()):_0x29760b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x29760b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x29760b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x29760b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x48b6bb(){const _0x37bc3c=[_0x29760b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x29760b([0x74,0x72,0x69,0x61,0x6c])][_0x29760b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52e022[_0x29760b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x137db9/0x3e8:0xe10*_0x5454e6;return _0x52e022[_0x29760b([0x65,0x78,0x70])]<_0x37bc3c;}function _0x20993b(){const _0xf8a99e=_0x52e022[_0x29760b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xf8a99e)return!0x1;if(_0xf8a99e[_0x29760b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29760b([0x2a])))return!0x0;if(_0xf8a99e[_0x29760b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29760b([0x43,0x4d,0x54])))return!0x0;if(_0xf8a99e[_0x29760b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29760b([0x52,0x43,0x4d,0x54]))){if(_0x194de4())return!0x0;if(_0x33d41d()||_0x24f051())return!0x0;}return!0x1;}function _0x169850(){const _0x2350fa=_0x52e022[_0x29760b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2350fa||0x0==_0x2350fa[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x37fd3d}=new URL(window[_0x29760b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2350fa[_0x29760b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37fd3d))return!0x0;const _0x4f44a4=_0x37fd3d[_0x29760b([0x73,0x70,0x6c,0x69,0x74])](_0x29760b([0x2e]));return _0x2350fa[_0x29760b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x46426c=>_0x46426c[_0x29760b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29760b([0x2a])))[_0x29760b([0x6d,0x61,0x70])](_0xa6faf8=>_0xa6faf8[_0x29760b([0x73,0x70,0x6c,0x69,0x74])](_0x29760b([0x2e])))[_0x29760b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4997de=>_0x4997de[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4f44a4[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x29760b([0x6d,0x61,0x70])](_0x4bcc6c=>Array(_0x4f44a4[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4bcc6c[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x29760b([0x66,0x69,0x6c,0x6c])](_0x4bcc6c[0x0]===_0x29760b([0x2a])?_0x29760b([0x2a]):'')[_0x29760b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4bcc6c))[_0x29760b([0x73,0x6f,0x6d,0x65])](_0x45a54a=>_0x4f44a4[_0x29760b([0x65,0x76,0x65,0x72,0x79])]((_0x20eaae,_0xd9091c)=>_0x45a54a[_0xd9091c]===_0x20eaae||_0x45a54a[_0xd9091c]===_0x29760b([0x2a])));}function _0x76bf96(){return _0x409375&&_0x1b24c5?new window[(_0x29760b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4ea696,_0x5c9402)=>{_0x409375[_0x29760b([0x74,0x68,0x65,0x6e])](_0x4ea696,_0x5c9402),_0x1b24c5[_0x29760b([0x74,0x68,0x65,0x6e])](_0x49463b=>{_0x49463b!=_0x29760b([0x56,0x61,0x6c,0x69,0x64])&&_0x4ea696(_0x49463b);},_0x5c9402);}):_0x409375||_0x1b24c5||_0x29760b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4c30de(_0x5daf8c,_0x36f191){return new window[(_0x29760b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3fdb2d=>{if(_0x24de3e())return _0x3fdb2d(_0x29760b([0x56,0x61,0x6c,0x69,0x64]));_0x4d9914(),_0x463b98[_0x29760b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x29760b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x62ea9=!0x1;const _0x7002d8=_0x300841();function _0x4def34(_0x535d06){return!!_0x535d06&&(typeof _0x535d06===_0x29760b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x535d06===_0x29760b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x535d06[_0x29760b([0x74,0x68,0x65,0x6e])]===_0x29760b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x535d06[_0x29760b([0x63,0x61,0x74,0x63,0x68])]===_0x29760b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3d5d0e(_0x1d1d70){_0x1dd01f(_0x1d1d70)[_0x29760b([0x74,0x68,0x65,0x6e])](_0x422a68=>{if(!_0x422a68||_0x422a68[_0x29760b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x29760b([0x6f,0x6b]))return _0x29760b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x113bb8(_0x5bebb9(_0x7002d8+_0x36f191))!=_0x422a68[_0x29760b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x29760b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x29760b([0x56,0x61,0x6c,0x69,0x64]);})[_0x29760b([0x74,0x68,0x65,0x6e])](_0x51a651=>(_0x4ff1da(),_0x51a651),()=>{const _0x3c0699=_0x1f739d();return null==_0x3c0699?(_0x4ff1da(),_0x29760b([0x56,0x61,0x6c,0x69,0x64])):_0x29760b(_0x137db9-_0x3c0699>(0x3037210f^_0x3f1cae)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x29760b([0x74,0x68,0x65,0x6e])](_0x3fdb2d)[_0x29760b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3fdb2d(_0x29760b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4e68a4=0x140d4b8f^_0x3f1cae;function _0x4ff1da(){const _0x44408b=_0x29760b([0x6c,0x6c,0x63,0x74,0x2d])+_0x113bb8(_0x5bebb9(_0x5daf8c)),_0x292a41=_0x4226d7(_0x113bb8(window[_0x29760b([0x4d,0x61,0x74,0x68])][_0x29760b([0x63,0x65,0x69,0x6c])](_0x137db9/_0x4e68a4)));window[_0x29760b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x29760b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x44408b,_0x292a41);}function _0x1f739d(){const _0x1bcd99=_0x29760b([0x6c,0x6c,0x63,0x74,0x2d])+_0x113bb8(_0x5bebb9(_0x5daf8c)),_0x5803d6=window[_0x29760b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x29760b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1bcd99);return _0x5803d6?window[_0x29760b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4226d7(_0x5803d6),0x10)*_0x4e68a4:null;}function _0x1dd01f(_0x18d9f3){return new window[(_0x29760b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3dad64,_0x11e149)=>{_0x18d9f3[_0x29760b([0x74,0x68,0x65,0x6e])](_0x3dad64,_0x11e149),window[_0x29760b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x11e149,0x143a71cf^_0x3f1cae);});}}_0x463b98[_0x29760b([0x6f,0x6e])](_0x29760b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2b1ee2,_0x28d974)=>{if(_0x28d974[0x0]!=_0x5daf8c)return _0x3fdb2d(_0x29760b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x28d974[0x1]={..._0x28d974[0x1],[_0x29760b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x7002d8};},{[_0x29760b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x29760b([0x68,0x69,0x67,0x68])}),_0x463b98[_0x29760b([0x6f,0x6e])](_0x29760b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4db93f=>{_0x4def34(_0x4db93f[_0x29760b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x62ea9=!0x0,_0x3d5d0e(_0x4db93f[_0x29760b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x29760b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x29760b([0x6c,0x6f,0x77])}),_0x1daf1d[_0x29760b([0x74,0x68,0x65,0x6e])](()=>{_0x62ea9||_0x3fdb2d(_0x29760b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x24de3e(){return _0x463b98[_0x29760b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x29760b([0x76,0x69,0x65,0x77])][_0x29760b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x29760b([0x61,0x75,0x74,0x6f]);}function _0x4d9914(){_0x463b98[_0x29760b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x29760b([0x76,0x69,0x65,0x77])][_0x29760b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x29760b([0x61,0x75,0x74,0x6f]);}}function _0x5571c6(_0x387f17){const _0xc0fe33=[new window[(_0x29760b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5bd971=>setTimeout(_0x5bd971,0x14329bc3^_0x3f1cae)),_0x1daf1d[_0x29760b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x29760b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x500659=>{let _0x4b0624=0x0;_0x463b98[_0x29760b([0x6d,0x6f,0x64,0x65,0x6c])][_0x29760b([0x6f,0x6e])](_0x29760b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xe1faf0,_0x1f0a7c)=>{_0x1f0a7c[0x0][_0x29760b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4b0624++,_0x4b0624==(0x143ba4f7^_0x3f1cae)&&(_0x500659(),_0xe1faf0[_0x29760b([0x6f,0x66,0x66])]());});}))];return window[_0x29760b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x29760b([0x72,0x61,0x63,0x65])](_0xc0fe33)[_0x29760b([0x74,0x68,0x65,0x6e])](()=>_0x387f17);}async function _0xac377d(){await _0x1daf1d,_0x463b98[_0x29760b([0x6d,0x6f,0x64,0x65,0x6c])][_0x29760b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x11531c,_0x463b98[_0x29760b([0x6d,0x6f,0x64,0x65,0x6c])][_0x29760b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x11531c,_0x463b98[_0x29760b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x29760b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x194de4(){return _0x32926c(_0x29760b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xe218ee(_0x29760b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x29760b([0x73,0x74,0x61,0x74,0x65])]==_0x29760b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x33d41d(){return _0x32926c(_0x29760b([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 _0x24f051(){return _0x32926c(_0x29760b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x538102(_0x560f0f){const _0x41ab1c=_0x397375();_0x463b98[_0x41ab1c]=_0x29760b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x560f0f,_0x560f0f!=_0x29760b([0x56,0x61,0x6c,0x69,0x64])&&_0xac377d();}function _0x397375(){const _0x47c4bb=window[_0x29760b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x29760b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x29760b([0x6e,0x6f,0x77])]())[_0x29760b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x29760b([0x2e]),'');let _0x38da03=_0x29760b([0x66]);for(let _0x25322b=0x0;_0x25322b<_0x47c4bb[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25322b+=0x2){let _0x4cbd21=window[_0x29760b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x47c4bb[_0x29760b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x25322b,_0x25322b+0x2));_0x4cbd21>=_0x44c41a[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4cbd21-=_0x44c41a[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x38da03+=_0x44c41a[_0x4cbd21];}return _0x38da03;}function _0x27f96f(){const _0x4ca693=_0x489146[_0x29760b([0x73,0x70,0x6c,0x69,0x74])](_0x29760b([0x2e]));if(0x3!=_0x4ca693[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x16de00(_0x4ca693[0x1]);function _0x16de00(_0x2f7909){const _0x1525de=_0x5e3aca(_0x2f7909);return _0x1525de&&_0x15ab79()?_0x1525de:null;function _0x15ab79(){const _0xa1951d=_0x1525de[_0x29760b([0x6a,0x74,0x69])],_0x5a3f44=window[_0x29760b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xa1951d[_0x29760b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xa1951d[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5596a1={..._0x1525de,[_0x29760b([0x6a,0x74,0x69])]:_0xa1951d[_0x29760b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xa1951d[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5596a1[_0x29760b([0x76,0x63])],_0x5bebb9(_0x5596a1)==_0x5a3f44;}}}async function _0x25b853(){let _0x10e862=!0x0;try{const _0x577ad5=_0x489146[_0x29760b([0x73,0x70,0x6c,0x69,0x74])](_0x29760b([0x2e])),[_0xfa0941,_0x1db0c8,_0x2f4edf]=_0x577ad5;return _0x1bfd54(_0xfa0941),await _0x5761b8(_0xfa0941,_0x1db0c8,_0x2f4edf),_0x10e862;}catch{return!0x1;}function _0x1bfd54(_0x14cf64){const _0x471ed4=_0x5e3aca(_0x14cf64);_0x471ed4&&_0x471ed4[_0x29760b([0x61,0x6c,0x67])]==_0x29760b([0x45,0x53,0x32,0x35,0x36])||(_0x10e862=!0x1);}async function _0x5761b8(_0x48bd31,_0x17f2c3,_0x40a607){const _0x43e377=window[_0x29760b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x29760b([0x66,0x72,0x6f,0x6d])](_0x58790c(_0x40a607),_0x3d5114=>_0x3d5114[_0x29760b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xa3f0c7=new window[(_0x29760b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x29760b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x48bd31+_0x29760b([0x2e])+_0x17f2c3),_0x20c6cb=window[_0x29760b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x29760b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x20c6cb)return;const _0x18da1a=await _0x20c6cb[_0x29760b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x29760b([0x6a,0x77,0x6b]),_0x3bfba1,{[_0x29760b([0x6e,0x61,0x6d,0x65])]:_0x29760b([0x45,0x43,0x44,0x53,0x41]),[_0x29760b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x29760b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x29760b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x20c6cb[_0x29760b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x29760b([0x6e,0x61,0x6d,0x65])]:_0x29760b([0x45,0x43,0x44,0x53,0x41]),[_0x29760b([0x68,0x61,0x73,0x68])]:{[_0x29760b([0x6e,0x61,0x6d,0x65])]:_0x29760b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x18da1a,_0x43e377,_0xa3f0c7)||(_0x10e862=!0x1);}}function _0x5e3aca(_0x1649fa){return _0x1649fa[_0x29760b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x29760b([0x65,0x79]))?JSON[_0x29760b([0x70,0x61,0x72,0x73,0x65])](_0x58790c(_0x1649fa)):null;}function _0x58790c(_0xd0470d){return window[_0x29760b([0x61,0x74,0x6f,0x62])](_0xd0470d[_0x29760b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x29760b([0x2b]))[_0x29760b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x29760b([0x2f])));}function _0x5bebb9(_0x57bdaf){let _0x3551b3=0x1505;function _0x370120(_0x98f955){for(let _0x206e9a=0x0;_0x206e9a<_0x98f955[_0x29760b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x206e9a++){const _0x49a954=_0x98f955[_0x29760b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x206e9a);_0x3551b3=(_0x3551b3<<0x5)+_0x3551b3+_0x49a954,_0x3551b3&=_0x3551b3;}}function _0x28e543(_0x5a2b79){Array[_0x29760b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5a2b79)?_0x5a2b79[_0x29760b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x28e543):_0x5a2b79&&typeof _0x5a2b79==_0x29760b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x29760b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5a2b79)[_0x29760b([0x73,0x6f,0x72,0x74])]()[_0x29760b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1063d7,_0xcb1d4])=>{_0x370120(_0x1063d7),_0x28e543(_0xcb1d4);}):_0x370120(window[_0x29760b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5a2b79));}return _0x28e543(_0x57bdaf),_0x3551b3>>>0x0;}function _0x113bb8(_0x103a75){return _0x103a75[_0x29760b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x29760b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x29760b([0x30]));}function _0x4226d7(_0x4a3522){return _0x4a3522[_0x29760b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x29760b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x29760b([0x6a,0x6f,0x69,0x6e])]('');}function _0x32926c(_0x5ec1cc){return _0x463b98[_0x29760b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x29760b([0x68,0x61,0x73])](_0x5ec1cc);}function _0xe218ee(_0x570ae7){return _0x463b98[_0x29760b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x29760b([0x67,0x65,0x74])](_0x570ae7);}function _0x11531c(){}function _0x29760b(_0x646eb4){return _0x646eb4['map'](_0x43bd83=>String['fromCharCode'](_0x43bd83))['join']('');}_0x538102(await _0x36e410());}(this);}['destroy'](){const _0x141e98=this['editor']['plugins']['get'](o),_0x44dd96=this['editor']['config']['get']('collaboration.channelId');for(const _0x2f397f of _0x141e98['getCommentThreads']({'channelId':_0x44dd96}))_0x141e98['_detachCommentThread'](_0x2f397f['id']),_0x141e98['_threads']['delete'](_0x2f397f['id']);super['destroy']();}['hasMarkerForId'](_0x57aad2){return this['getAllMarkersForId'](_0x57aad2)['length']>0x0;}['getAllMarkersForId'](_0x2ecdfe){const _0x4313e0=[];for(const _0x297ea2 of this['editor']['model']['markers'])_0x297ea2['name']['startsWith']('comment:'+_0x2ecdfe)&&_0x4313e0['push'](_0x297ea2);return _0x4313e0;}['scrollToThreadMarker'](_0x38bd1e){setTimeout(()=>{const _0x1bb5ae=this['_getTargetForId'](_0x38bd1e);if(!_0x1bb5ae)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0x38bd1e&&nt({'target':_0x1bb5ae[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xd503ff){this['editor']['model']['change'](()=>{for(const _0x19a068 of this['getAllMarkersForId'](_0xd503ff))this['editor']['editing']['reconvertMarker'](_0x19a068);});}['_attachArchivedThread'](_0x192d47){const _0x277e28=this['editor']['plugins']['get'](o),_0x28828e=this['editor']['plugins']['get'](b),_0x5d14e2=_0x277e28['getCommentThread'](_0x192d47);if(!_0x5d14e2['isAttached']){const _0x37c6e3=_0x5d14e2['attachTo'](()=>this['_getTargetForId'](_0x5d14e2['id']));_0x28828e['registerAnnotation'](_0x37c6e3),_0x5d14e2['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x435425=this['editor'],_0x5062fe=_0x435425['plugins']['get'](it);_0x435425['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5e97e0,_0x42ad8e)=>{const {id:_0x227155}=er(_0x5e97e0['markerName']),_0x1c947a=_0x435425['plugins']['get'](o)['getCommentThread'](_0x227155),_0x5662f0=this['activeMarker']&&er(this['activeMarker'])['id']===_0x227155;let _0x3487fb;if(_0x1c947a&&_0x1c947a['isResolved']&&!_0x5662f0&&_0x5e97e0['item'])return _0x42ad8e['consumable']['consume'](_0x5e97e0['item'],'addMarker:'+_0x5e97e0['markerName']),_0x42ad8e['consumable']['consume'](_0x5e97e0['item'],'removeMarker:'+_0x5e97e0['markerName']),null;const _0x3bc47c=['ck-comment-marker'];return _0x5662f0&&_0x3bc47c['push']('ck-comment-marker--active'),_0x3487fb=_0x1c947a?.['length']?_0x1c947a['comments']['first']['author']['id']:_0x5062fe['me']['id'],{'classes':_0x3bc47c,'attributes':{'data-comment':_0x227155,'data-author-id':_0x3487fb}};}}),_0x435425['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4e7d34,{options:_0x1fb3d4})=>{if(_0x1fb3d4['showCommentHighlights'])return null;const _0x2f0d18=_0x435425['plugins']['get'](o),_0x2073c4=_0x435425['model']['markers']['get'](_0x4e7d34),{id:_0xdc4a41,part:_0x395377}=er(_0x4e7d34);return _0x2073c4&&!_0x2073c4['affectsData']||_0x1fb3d4['ignoreResolvedComments']&&_0x2f0d18['getCommentThread'](_0xdc4a41)?.['isResolved']?null:{'group':'comment','name':_0x395377?_0xdc4a41+':'+_0x395377:_0xdc4a41};}}),_0x435425['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1164c6,{writer:_0xb5d45c})=>_0xb5d45c['createElement']('$marker',{'data-name':'comment:'+_0x1164c6['getAttribute']('id')})}),_0x435425['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2cd995=this['editor'],_0x3ba06c=_0x2cd995['plugins']['get'](o),_0x11d1e8=new Set(),_0x124f76=new Set();_0x2cd995['model']['document']['registerPostFixer'](_0x434972=>{let _0x54f9bf=!0x1;for(const {name:_0x585130,data:_0x5816a2}of _0x2cd995['model']['document']['differ']['getChangedMarkers']()){const {group:_0x53921f,id:_0x489588}=er(_0x585130);let _0x1c294f=_0x5816a2['newRange'];if('comment'!==_0x53921f||!_0x1c294f)continue;const _0x5aeffc='$graveyard'===_0x1c294f['root']['rootName'];_0x5aeffc||(_0x1c294f=dt(_0x1c294f,_0x2cd995['model']),!_0x1c294f||_0x1c294f['isCollapsed']||!_0x5816a2['newRange']||_0x1c294f['isEqual'](_0x5816a2['newRange']))?_0x2cd995['model']['hasContent'](_0x1c294f)&&!_0x5aeffc?this['isThreadsLoadingPaused']?_0x11d1e8['add'](_0x585130):this['_handleThreadMarker'](_0x585130,_0x489588):(_0x124f76['add'](_0x585130),_0x11d1e8['delete'](_0x585130),_0x434972['removeMarker'](_0x585130),_0x54f9bf=!0x0):(_0x434972['updateMarker'](_0x585130,{'range':_0x1c294f}),_0x54f9bf=!0x0);}return _0x54f9bf;}),this['on']('change:isThreadsLoadingPaused',(_0x2a1fef,_0x29987e,_0x14680e)=>{if(!_0x14680e&&_0x11d1e8['size'])for(const _0x107a2e of _0x11d1e8){const {id:_0x463993}=er(_0x107a2e);_0x11d1e8['delete'](_0x107a2e),_0x2cd995['model']['markers']['get'](_0x107a2e)&&this['_handleThreadMarker'](_0x107a2e,_0x463993);}}),this['listenTo'](_0x2cd995['model']['document'],'change',()=>{for(const {name:_0x2ef2bd,data:{newRange:_0x250346}}of _0x2cd995['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1beece,id:_0x4b853c}=er(_0x2ef2bd);if('comment'!==_0x1beece)continue;const _0x2e3b15=_0x3ba06c['getCommentThread'](_0x4b853c),_0x447835=this['hasMarkerForId'](_0x4b853c);_0x2e3b15&&(!_0x2e3b15['_hasTargetInContent']&&_0x250346&&_0x2cd995['editing']['view']['once']('render',()=>{const _0x1e9e18=_0x2cd995['plugins']['get'](y),_0x4217f1=_0x3ba06c['_threadToController']['get'](_0x2e3b15)['view'];_0x1e9e18['getByInnerView'](_0x4217f1)['refreshVisibility']();},{'priority':'low'}),_0x2e3b15['_hasTargetInContent']=_0x447835||!!_0x250346),_0x250346||(_0x124f76['add'](_0x2ef2bd),_0x11d1e8['delete'](_0x2ef2bd));}for(const _0x3a8dcc of _0x124f76){const {id:_0x5b0c3b}=er(_0x3a8dcc),_0x1a7f55=_0x3ba06c['getCommentThread'](_0x5b0c3b);if(_0x11d1e8['delete'](_0x3a8dcc),!_0x1a7f55)continue;const _0x4087d2=this['hasMarkerForId'](_0x5b0c3b);_0x4087d2||_0x1a7f55['isSubmitted']?_0x4087d2||_0x1a7f55['unlinkedAt']||_0x1a7f55['setUnlinkedAt'](new Date()):_0x1a7f55['remove']();}_0x124f76['clear']();});}['_handleInitialThreads'](_0xad0fe){_0xad0fe['forEach'](_0x34b7ee=>{_0x34b7ee['unlinkedAt']&&this['_attachArchivedThread'](_0x34b7ee['id']);});}['_getTargetForId'](_0x4214f0){const _0x183187=this['editor'],_0x3dc9f0=this['getAllMarkersForId'](_0x4214f0);return et(_0x183187['editing'],_0x3dc9f0);}['_getTextContext'](_0x36f586){const _0x3eecff=this['getAllMarkersForId'](_0x36f586);let _0x1b20c5='',_0x262262=!0x1;for(const _0x42c09a of _0x3eecff){const _0x4483e4=_0x42c09a['getRange']();for(const _0x31248b of Array['from'](_0x4483e4['getItems']()))_0x31248b['is']('$textProxy')?(_0x1b20c5&&_0x262262&&(_0x1b20c5+='\x20',_0x262262=!0x1),_0x1b20c5+=_0x31248b['data']):_0x262262=!0x0;_0x262262=!0x0;}return _0x1b20c5['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xc22016,_0x4c6ef4){const _0x509942=this['editor'],_0x302b03=_0x509942['plugins']['get'](o);let _0x1374ae=_0x302b03['getCommentThread'](_0x4c6ef4);const _0xbbf46d=_0x509942['config']['get']('collaboration.channelId'),_0x64a1a9=_0x509942['plugins']['get'](b);if(_0x1374ae&&(_0x1374ae['unlinkedAt']&&_0x1374ae['setUnlinkedAt'](null),_0x1374ae['isAttached']))return _0x1374ae;return!this['getAllMarkersForId'](_0x4c6ef4)[0x0]['managedUsingOperations']?_0x509942['editing']['view']['once']('render',()=>{if(_0x302b03['getCommentThread'](_0x4c6ef4))return;const _0x133c92=_0x509942['plugins']['get'](y);_0x1374ae=_0x302b03['openNewCommentThread']({'channelId':_0xbbf46d,'threadId':_0x4c6ef4,'target':()=>this['_getTargetForId'](_0x4c6ef4),'context':{'type':'text','value':this['_getTextContext'](_0x4c6ef4)}});const _0x3d305e=_0x302b03['_threadToController']['get'](_0x1374ae)['view'],_0xd54a71=_0x133c92['getByInnerView'](_0x3d305e);_0xd54a71&&_0x64a1a9['registerAnnotation'](_0xd54a71);},{'priority':'low'}):_0x302b03['fetchCommentThread']({'channelId':_0xbbf46d,'threadId':_0x4c6ef4})['then'](_0x28a6e3=>{if('destroyed'!==_0x509942['state']){if(_0x1374ae=_0x28a6e3,_0x1374ae&&!_0x1374ae['isAttached']){const _0x4ddaff=_0x1374ae['attachTo'](()=>this['_getTargetForId'](_0x4c6ef4));_0x64a1a9['registerAnnotation'](_0x4ddaff),_0x1374ae['isResolved']&&this['_reconvertMarkers'](_0x4c6ef4);}else{if(!_0x1374ae){const _0x12a153=this['getAllMarkersForId'](_0x4c6ef4);_0x509942['model']['change'](_0x12c0fb=>{for(const _0x26420a of _0x12a153)_0x12c0fb['removeMarker'](_0x26420a);});}}}}),_0x1374ae;}['_handleThreadMarker'](_0x348f2b,_0x508f71){const _0x184e10=this['_attachMarkerToThread'](_0x348f2b,_0x508f71);_0x184e10&&!_0x184e10['context']&&_0x184e10['setContext']({'type':'text','value':this['_getTextContext'](_0x508f71)});}['_initAriaMarkerChangeAnnouncements'](){const _0x20b705=this['editor'];ot(_0x20b705['model'],({left:_0x4ef04b,entered:_0x4a53aa})=>{for(const _0x45d4bc of _0x4ef04b)if(mt(_0x45d4bc)){_0x20b705['ui']['ariaLiveAnnouncer']['announce'](N(_0x20b705['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x21e5ed of _0x4a53aa)if(mt(_0x21e5ed)){_0x20b705['ui']['ariaLiveAnnouncer']['announce'](N(_0x20b705['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x3d04bf)));break;}});}}function ft(_0x5d0827,_0x84dad9){return _0x84dad9?_0x5d0827+':'+_0x84dad9:_0x5d0827;}function er(_0x376b09){const _0x26fd15=_0x376b09['split'](':');return{'group':_0x26fd15[0x0],'id':_0x26fd15[0x1],'part':_0x26fd15[0x2]};}function dt(_0xd500ce,_0x5c2c4c){const _0x4086f6=_0x5c2c4c['schema'],_0x566069=_0x5c2c4c['createRange'](_0xd500ce['start']);for(const _0x5152d7 of _0xd500ce['getWalker']()){const {type:_0xbac06a,item:_0x4c6505,nextPosition:_0x1698a9}=_0x5152d7;if('text'===_0xbac06a||_0x4086f6['isObject'](_0x4c6505)){const _0x5b2880=_0x5c2c4c['createPositionBefore'](_0x4c6505);_0x566069['isCollapsed']&&(_0x566069['start']=_0x5b2880),_0x566069['end']=_0x1698a9;}}return _0x566069;}function mt(_0x553465){return'comment'===er(_0x553465['name'])['group'];}class s extends _0x108da2{['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 _0x227918=this['editor'],_0x3f5308=_0x227918['plugins']['get'](o),_0x53ec60=_0x227918['plugins']['get'](r),_0x476e9a=_0x227918['plugins']['get'](y),_0x3b272d=_0x227918['plugins']['get'](b);_0x227918['ui']['componentFactory']['add']('comment',()=>{const _0x6a0ee4=this['_createUIButton'](_0x3adb51);return _0x6a0ee4['tooltip']=!0x0,_0x6a0ee4;}),_0x227918['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x52c1fc)),_0x3b272d['addSourceCollector'](()=>{const _0x67d936=[];for(const [_0x33229c,_0x942d10]of _0x3f5308['_threadToController']){const _0x410ba0=_0x53ec60['getAllMarkersForId'](_0x33229c['id']),_0x258813=_0x410ba0['map'](_0x1aaf3b=>_0x1aaf3b['getRange']());_0x410ba0['length']>0x0&&_0x67d936['push']([_0x942d10['view'],_0x258813]);}return _0x67d936;}),this['listenTo'](_0x476e9a,'change:activeAnnotations',(_0x4d1f49,_0x3447f3,_0x3378dc)=>{const _0x30602b=Array['from'](_0x3378dc)['map'](_0x5dfa01=>_0x5dfa01['innerView'])['find'](_0x20403d=>_0x3f5308['_viewToController']['has'](_0x20403d));if(!_0x30602b)return void(_0x53ec60['activeMarker']=null);const _0x325403=_0x3f5308['_viewToController']['get'](_0x30602b)['model']['id'],_0x2e1944='comment:'+_0x325403;_0x325403&&_0x53ec60['hasMarkerForId'](_0x325403)?_0x53ec60['activeMarker']=_0x2e1944:_0x53ec60['activeMarker']&&(_0x53ec60['activeMarker']=null);}),this['listenTo'](_0x3f5308,'removeCommentThread',(_0x1ef199,{threadId:_0x5f5e03,isFromAdapter:_0x1276f0})=>{!_0x1276f0&&_0x227918['ui']['focusTracker']['isFocused']&&_0x53ec60['hasMarkerForId'](_0x5f5e03)&&_0x227918['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3f5308,'addComment',(_0x43ff70,{threadId:_0x4b893a,isFromAdapter:_0x5ef8cb})=>{if(_0x5ef8cb||!_0x53ec60['hasMarkerForId'](_0x4b893a)||!_0x3f5308['hasCommentThread'](_0x4b893a))return;0x1===_0x3f5308['getCommentThread'](_0x4b893a)['length']&&(_0x227918['editing']['view']['focus'](),_0x43ff70['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4dc0ef=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x16c282;for(const _0x3c7683 in _0x4dc0ef){const _0x5d7074=_0x3c7683,_0x33ed4a=_0x4dc0ef[_0x5d7074];if('commentsLicenseKeyValid'==_0x33ed4a||'commentsLicenseKeyInvalid'==_0x33ed4a||'commentsLicenseKeyExpired'==_0x33ed4a||'commentsLicenseKeyDomainLimit'==_0x33ed4a||'commentsLicenseKeyNotAllowed'==_0x33ed4a||'commentsLicenseKeyEvaluationLimit'==_0x33ed4a||'commentsLicenseKeyTrialLimit'==_0x33ed4a||'commentsLicenseKeyUsageLimit'==_0x33ed4a){delete _0x4dc0ef[_0x5d7074],_0x16c282=_0x33ed4a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x16c282&&_0x4dc0ef['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x16c282&&_0x4dc0ef['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x16c282&&_0x4dc0ef['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x16c282&&_0x4dc0ef['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x16c282&&_0x4dc0ef['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x16c282&&_0x4dc0ef['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x16c282&&_0x4dc0ef['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x416267){const _0x3d5340=this['editor'],_0x30c92d=new _0x416267(_0x3d5340['locale']),_0xf0adf0=_0x3d5340['commands']['get']('addCommentThread');return _0x30c92d['set']({'label':N(_0x3d5340['locale'],'Comment'),'icon':_0x353e64}),_0x30c92d['bind']('isEnabled')['to'](_0xf0adf0,'hasContent'),this['listenTo'](_0x30c92d,'execute',()=>{_0xf0adf0['execute']();}),_0x30c92d;}}class i extends _0x108da2{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x42a9cc){super(_0x42a9cc),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3b989b,_0x3b0f5c,_0x514917)=>{_0x514917?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1d36ef,_0x50a737]of this['editor']['commands'])_0x50a737['affectsData']&&'addCommentThread'!==_0x1d36ef&&_0x50a737['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1465f4=this['editor']['editing']['view']['document'];this['listenTo'](_0x1465f4,'cut',_0x28509e=>_0x28509e['stop'](),{'priority':'highest'}),this['listenTo'](_0x1465f4,'clipboardInput',_0x17fc94=>_0x17fc94['stop'](),{'priority':'highest'}),this['listenTo'](_0x1465f4,'delete',_0x3f6dfb=>_0x3f6dfb['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x21ddb8,_0x5c20ec]of this['editor']['commands'])_0x5c20ec['affectsData']&&'addCommentThread'!==_0x21ddb8&&_0x5c20ec['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 _0x38f59f{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x30c030){super(_0x30c030),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x29c20d=this['context']['plugins']['get'](y);this['listenTo'](_0x29c20d,'_activateAnnotation',(_0x3eda3b,_0xb2f1a3)=>{for(const _0xabe1b8 of this['activeUIs']){const _0x31c7d8=this['_uis']['get'](_0xabe1b8);(0x0,this['uisData']['get'](_0xabe1b8)['filter'])(_0xb2f1a3)&&_0x31c7d8['setActiveAnnotation'](_0xb2f1a3);}}),this['listenTo'](_0x29c20d,'_deactivateAllAnnotations',()=>{for(const _0x40cdd4 of this['activeUIs']){this['_uis']['get'](_0x40cdd4)['setActiveAnnotation'](null);}}),this['listenTo'](_0x29c20d['_visibleAnnotations'],'add',(_0xb02467,_0x4f7358)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4f7358);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x5470fd){return this['activeUIs']['has'](_0x5470fd);}['activate'](_0x1f2f0c,_0x43e150=this['defaultFilter']){const _0x23b308=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1f2f0c))throw new _0xb557ef('annotationsuis-missing-ui',this,{'uiName':_0x1f2f0c});this['isActive'](_0x1f2f0c)&&this['deactivate'](_0x1f2f0c),this['activeUIs']['add'](_0x1f2f0c);const _0x28c4be=new S();v({'source':_0x23b308['_visibleAnnotations'],'target':_0x28c4be,'filter':_0x43e150}),this['uisData']['set'](_0x1f2f0c,{'collection':_0x28c4be,'filter':_0x43e150});const _0x480328=this['_uis']['get'](_0x1f2f0c);_0x480328['attach'](_0x28c4be),this['listenTo'](_0x480328,'change:activeAnnotation',(_0x26a65f,_0x83d9c3,_0x1be9c7,_0xa6812f)=>{_0xa6812f&&_0x23b308['_removeActiveAnnotation'](_0xa6812f),_0x1be9c7&&_0x23b308['_addActiveAnnotation'](_0x1be9c7);});}['deactivate'](_0x2da0af){if(this['activeUIs']['delete'](_0x2da0af),!this['_uis']['has'](_0x2da0af))throw new _0xb557ef('annotationsuis-missing-ui',this,{'uiName':_0x2da0af});const _0x19abc5=this['_uis']['get'](_0x2da0af);_0x19abc5['detach'](),this['stopListening'](_0x19abc5),this['uisData']['get'](_0x2da0af)['collection']['destroy'](),this['uisData']['delete'](_0x2da0af);}['switchTo'](_0x13f19d){if(!this['_uis']['has'](_0x13f19d))throw new _0xb557ef('annotationsuis-missing-ui',this,{'uiName':_0x13f19d});const _0x1b2332=this['context']['plugins']['get'](y),_0x49b2ea=Array['from'](_0x1b2332['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x13f19d);const _0x2e258e=this['_uis']['get'](_0x13f19d);_0x2e258e['setActiveAnnotation'](_0x49b2ea),_0x2e258e['_setSelectedAnnotations']&&_0x49b2ea&&_0x2e258e['_setSelectedAnnotations']([_0x49b2ea]);}['deactivateAll'](){for(const _0x27715f of this['activeUIs'])this['deactivate'](_0x27715f);}['register'](_0x41a1fe,_0x32a8c9){if(this['_uis']['has'](_0x41a1fe))throw new _0xb557ef('annotationsuis-register-already-registered');if('function'!=typeof _0x32a8c9['attach']||'function'!=typeof _0x32a8c9['detach']||'function'!=typeof _0x32a8c9['setActiveAnnotation'])throw new _0xb557ef('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x41a1fe,_0x32a8c9);}['refilterAnnotations'](){const _0x5c28f3=this['context']['plugins']['get'](y)['collection'],_0x144583=new Map(),_0x221328=Array['from'](this['activeUIs']);for(const _0x90ed0 of this['activeUIs']){const _0x49ebcf=this['uisData']['get'](_0x90ed0)['collection'];for(const _0x252944 of _0x49ebcf)_0x144583['set'](_0x252944,_0x90ed0);}for(const _0x3a1b21 of _0x5c28f3){const _0x143dd3=_0x144583['get'](_0x3a1b21);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3a1b21);const _0x464159=_0x221328['find'](_0x4c8245=>this['uisData']['get'](_0x4c8245)['filter'](_0x3a1b21));_0x143dd3!==_0x464159&&(_0x143dd3&&this['uisData']['get'](_0x143dd3)['collection']['remove'](_0x3a1b21),_0x464159&&this['uisData']['get'](_0x464159)['collection']['add'](_0x3a1b21));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x56594c){const _0x13897c=[];for(const _0x4549a9 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4549a9)['filter'])(_0x56594c)&&_0x13897c['push'](_0x4549a9);}if(_0x13897c['length']>0x1)throw new _0xb557ef('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x13897c,'annotationType':_0x56594c['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(_0x346683){super(_0x346683),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x17313d,_0x1226fe)=>_0x17313d+_0x1226fe),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2ee016=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2ee016['to']('isAnimationDisabled',_0x34edce=>_0x34edce?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2ee016['to']('top',_0x49cca5=>Ot(_0x49cca5))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2dda31=this['element']['clientHeight'];_0x2dda31&&(this['height']=_0x2dda31);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x38f59f{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1535c8){super(_0x1535c8),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 _0x3abc89=this['context']['config']['get']('sidebar.container');_0x3abc89&&this['setContainer'](_0x3abc89);}['setContainer'](_0x307199){if(!g(_0x307199))throw new _0xb557ef('sidebar-setcontainer-invalid-element');this['container']=_0x307199;}['_attachToContainer']({viewClass:_0x3dab3c='',spaceBetweenItems:_0xa2b8d5=0x19}={}){if(!g(this['container']))throw new _0xb557ef('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3dab3c,this['_spaceBetweenItems']=_0xa2b8d5;}['rearrange']({removedAnnotation:_0x264fe4,previousAnnotation:_0x40dc06,nextAnnotation:_0x4a52cb}){const _0x51ca31=this['getSidebarItemView'](_0x264fe4);this['view']['list']['remove'](_0x51ca31),this['_destroySidebarItemView'](_0x264fe4),_0x40dc06&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x40dc06)),_0x4a52cb&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4a52cb)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1fc365,activatedAnnotation:_0x5b3176,disableAnimationOnActivatedAnnotation:_0x51795c}){if(this['_activeAnnotation']=_0x5b3176,_0x1fc365){_0x1fc365['isActive']=!0x1;const _0x5a77ee=this['getSidebarItemView'](_0x1fc365);_0x5a77ee&&_0x51795c&&(_0x5a77ee['isAnimationDisabled']=!0x1);}if(_0x5b3176){const _0x17d08b=this['getSidebarItemView'](_0x5b3176);_0x17d08b&&(_0x5b3176['isActive']=!0x0,_0x51795c&&(_0x17d08b['isAnimationDisabled']=!0x0,_0x17d08b['top']+=0x1),this['_alignToTargetRect'](_0x17d08b));}}['_detachFromContainer'](_0x5c0c8f){if(this['view']['element']['remove'](),_0x5c0c8f){for(const _0x2dd7d4 of _0x5c0c8f)this['_destroySidebarItemView'](_0x2dd7d4);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1b7e69,_0x28ce24){_0x28ce24||(_0x28ce24=_0x1b7e69['view']);const _0x263fc0=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x263fc0,_0x1b7e69),this['_annotationToSidebarItemView']['set'](_0x1b7e69,_0x263fc0),_0x263fc0['content']['add'](_0x28ce24),this['listenTo'](_0x1b7e69['view'],'change:targetRect',(_0x341b0b,_0x2bfff0,_0x188a72)=>{const _0x5869da=this['_getTargetTop'](_0x1b7e69,_0x188a72);_0x263fc0['_targetTop']!=_0x5869da&&(_0x263fc0['_targetTop']=_0x5869da,this['_setItemTop'](_0x263fc0,_0x5869da));}),this['listenTo'](_0x263fc0,'change:top',()=>{this['_recalculate'](_0x263fc0,'top');}),this['listenTo'](_0x263fc0,'change:bottom',()=>{this['_recalculate'](_0x263fc0,'bottom');}),this['_alignToTargetRect'](_0x263fc0);const _0x5c2447=this['_getItemBefore'](_0x263fc0);if(_0x5c2447)this['_alignAfterItem'](_0x5c2447,_0x263fc0)||this['_alignToTargetRect'](_0x263fc0);else this['_alignToTargetRect'](_0x263fc0);return this['_updateLastItem'](),this['view']['list']['add'](_0x263fc0),_0x263fc0;}['_alignForTopChange'](_0xe773d){if(!_0xe773d['content']['length'])return;const _0x61f78f=this['_getItemBefore'](_0xe773d);if(!_0x61f78f)return;const _0x553708=this['_sidebarItemViewToAnnotation']['get'](_0x61f78f),_0x173d5b=this['_activeAnnotation'];_0x173d5b&&_0x173d5b===_0x553708?this['_alignAfterItem'](_0x61f78f,_0xe773d):this['_alignBeforeItem'](_0xe773d,_0x61f78f);}['_alignForBottomChange'](_0xa51409){if(!_0xa51409['content']['length'])return;const _0x4da0ec=this['_getItemAfter'](_0xa51409);if(!_0x4da0ec)return;const _0x336881=this['_sidebarItemViewToAnnotation']['get'](_0x4da0ec),_0x4165e5=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x45e66a=this['_activeAnnotation'];_0x45e66a&&_0x45e66a===_0x336881&&_0x4165e5?(this['_alignBeforeItem'](_0x4da0ec,_0xa51409),this['_alignAfterItem'](_0xa51409,_0x4da0ec)):_0x45e66a&&_0x45e66a===_0x336881?this['_alignBeforeItem'](_0x4da0ec,_0xa51409):this['_alignAfterItem'](_0xa51409,_0x4da0ec);}['_recalculate'](_0x44fd77,_0x184e91){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x418e6a,changedProp:_0x2c568e}of this['_recalculateBuffer'])'top'===_0x2c568e?this['_alignForTopChange'](_0x418e6a):this['_alignForBottomChange'](_0x418e6a);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x44fd77,'changedProp':_0x184e91});}['getSidebarItemView'](_0x27a9ca){return this['_annotationToSidebarItemView']['get'](_0x27a9ca);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1ef400){const _0x4f9a69=this['getSidebarItemView'](_0x1ef400);this['stopListening'](_0x4f9a69),this['stopListening'](_0x1ef400['view']),_0x4f9a69['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1ef400),this['_sidebarItemViewToAnnotation']['delete'](_0x4f9a69);}['_createSidebarView'](){const _0x33670d=new H(this['context']['locale']);return _0x33670d['render'](),this['on']('change:_lastItem',(_0x39a2e0,_0x4b35b6,_0x2798b2,_0x266a2d)=>{_0x266a2d&&_0x33670d['unbind']('minHeight'),_0x2798b2?_0x33670d['bind']('minHeight')['to'](_0x2798b2,'bottom'):_0x33670d['minHeight']=null;}),_0x33670d;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4d3153){const _0x11e3a4=this['_sidebarItemViewToAnnotation']['get'](_0x4d3153),_0x403841=_0x11e3a4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x11e3a4)-0x1);return _0x403841&&this['getSidebarItemView'](_0x403841)||null;}['_getItemAfter'](_0x43ccbe){const _0x55b883=this['_sidebarItemViewToAnnotation']['get'](_0x43ccbe),_0x4f7962=_0x55b883&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x55b883)+0x1);return _0x4f7962&&this['getSidebarItemView'](_0x4f7962)||null;}['_alignBeforeItem'](_0x569535,_0x33bf22){_0x569535['updateHeight']();const _0x2eb491=G(_0x33bf22['bottom']+this['_spaceBetweenItems'],_0x569535['top']);return!!_0x2eb491&&(this['_setItemTop'](_0x33bf22,_0x33bf22['top']-_0x2eb491),!0x0);}['_alignAfterItem'](_0xe5b082,_0x44765f){_0xe5b082['updateHeight']();const _0x299817=G(_0xe5b082['bottom']+this['_spaceBetweenItems'],_0x44765f['top']);return!!_0x299817&&(this['_setItemTop'](_0x44765f,_0x44765f['top']+_0x299817,!0x1),!0x0);}['_alignToTargetRect'](_0x79046d){const _0x5c6688=this['_sidebarItemViewToAnnotation']['get'](_0x79046d);if(!_0x5c6688||!_0x5c6688['target']||!_0x5c6688['targetRect'])return;const _0x1bdc1e=this['_getTargetTop'](_0x5c6688,_0x5c6688['targetRect']);this['_setItemTop'](_0x79046d,_0x1bdc1e);}['_getTargetTop'](_0x5a1fc7,_0x8fb08c){if(null===_0x8fb08c)return 0x0;if(_0x5a1fc7['target']instanceof _0x14f71d)return _0x8fb08c['top'];{const _0x1d566a=new _0x14f71d(this['view']['element'])['top'];return _0x8fb08c['top']-_0x1d566a;}}['_setItemTop'](_0x980c26,_0x489261,_0x59a5f6=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x59a5f6&&(_0x489261=Math['max'](_0x489261,this['_getMaxAvailableTop'](_0x980c26))),_0x980c26['top']=_0x489261;}['_getMaxAvailableTop'](_0x4200ad){let _0x319c37=this['_getItemBefore'](_0x4200ad),_0x38537d=0x0;for(;_0x319c37;)_0x319c37['updateHeight'](),_0x38537d+=this['_spaceBetweenItems']+_0x319c37['height'],_0x319c37=this['_getItemBefore'](_0x319c37);return _0x38537d;}}function G(_0x28453c,_0x1159ea){return Math['max'](_0x28453c-_0x1159ea,0x0);}function g(_0x3d04a3){return null!==_0x3d04a3&&'object'==typeof _0x3d04a3&&0x1===_0x3d04a3['nodeType'];}class e extends _0x38f59f{['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(_0x377192){super(_0x377192),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x56e647(),this['_refreshPositioningDebounced']=_0x59d6ea(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x17119f=this['context']['plugins']['get'](j),_0x597b9a=this['context']['plugins']['get'](z);_0x17119f['register']('wideSidebar',this),_0x597b9a['container']&&_0x17119f['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1739da){if(_0x1739da===this['activeAnnotation'])return;const _0x58a284=this['context']['plugins']['get'](z);_0x58a284['_activeAnnotation']=_0x1739da;const _0x3fbe36=this['activeAnnotation'];_0x58a284['refresh']({'blurredAnnotation':_0x3fbe36,'activatedAnnotation':_0x1739da}),this['activeAnnotation']=_0x1739da;}['attach'](_0x29999e){this['annotations']=_0x29999e;const _0x40a63c=this['context']['plugins']['get'](z);if(_0x40a63c['_annotations']=_0x29999e,this['isAttached'])throw new _0xb557ef('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x40a63c,'set:container',()=>{this['detach'](),this['listenTo'](_0x40a63c,'change:container',_0x43e1f2=>{_0x43e1f2['off'](),this['attach'](_0x29999e);});}),_0x40a63c['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4f0cf4=_0x3dd2e0=>{_0x3dd2e0['updateTargetRect'](),_0x40a63c['addAnnotation'](_0x3dd2e0);};for(const _0x4d7b73 of _0x29999e)_0x4f0cf4(_0x4d7b73);this['listenTo'](_0x29999e,'add',(_0x5ed5f7,_0x5af70e)=>{_0x4f0cf4(_0x5af70e);}),this['listenTo'](_0x29999e,'remove',(_0x1faad3,_0x2e8d4d,_0x207d23)=>{_0x40a63c['rearrange']({'removedAnnotation':_0x2e8d4d,'previousAnnotation':_0x29999e['get'](_0x207d23-0x1),'nextAnnotation':_0x29999e['get'](_0x207d23+0x1)}),_0x2e8d4d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x29999e,'focus',(_0x120c0b,_0x91ffce)=>{this['setActiveAnnotation'](_0x91ffce);}),this['listenTo'](_0x29999e,'blur',()=>{this['setActiveAnnotation'](null);});const _0x369cc6=this['context']instanceof _0x4fa64c?this['context']['editors']:new _0x56e647([this['context']]);for(const _0x45df3c of _0x369cc6)this['_integrateWithEditorAnnotations'](_0x45df3c);this['listenTo'](_0x369cc6,'add',(_0x34f1a3,_0x5823c5)=>{this['listenTo'](_0x5823c5,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5823c5);});}),this['listenTo'](_0x369cc6,'remove',(_0x1a9afe,_0x213d30)=>{_0x213d30['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x213d30['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xb557ef('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1c0504=this['context']['plugins']['get'](z);_0x1c0504['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1c0504),this['stopListening'](this['annotations']),this['context']instanceof _0x4fa64c&&this['stopListening'](this['context']['editors']);for(const _0x21d588 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x21d588);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2df408){if(!_0x2df408['plugins']['has']('EditorAnnotations'))return;const _0x495a29=_0x2df408['plugins']['get']('EditorAnnotations'),_0x14accd=()=>{const _0x572530=_0x495a29['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x572530[0x0]||null);};this['listenTo'](_0x495a29,'refresh',_0x14accd),this['listenTo'](_0x495a29,'blur',(_0x2c108e,{isAnnotationTracked:_0xe4d1b3})=>{this['activeAnnotation']&&_0xe4d1b3(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x495a29,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x178cfb=>{_0x495a29['hasDomSelection']()&&(_0x14accd(),_0x178cfb['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x495a29);}['_destroyEditorAnnotationsIntegration'](_0x362080){this['stopListening'](_0x362080),this['_editorAnnotations']['remove'](_0x362080);}}class C extends _0x3adb51{['counterView'];constructor(_0x53cf85){super(_0x53cf85);const _0xc481eb=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x154100,_0x3cb35e)=>_0x154100?'...':_0x3cb35e['toString']()),this['set']('annotationType',''),this['icon']=_0x353e64,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xc481eb['to']('annotationType',_0x364e11=>'ck-annotation-counter__badge--'+_0x364e11),_0xc481eb['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xc481eb['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x38f59f{['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(_0x492613){super(_0x492613),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x206baa())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x56e647(),this['_refreshPositioningDebounced']=_0x59d6ea(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4a86a6(this['context']['locale']),this['balloonPanelView']=new _0x322a3d(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xc924f6){this['annotations']=_0xc924f6;const _0x11b963=this['context']['plugins']['get'](z),_0x5d1bee=this['balloonPanelView'];if(_0x11b963['_annotations']=_0xc924f6,this['isAttached'])throw new _0xb557ef('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x11b963,'set:container',()=>{this['detach'](),this['listenTo'](_0x11b963,'change:container',_0x5017b5=>{_0x5017b5['off'](),this['attach'](_0xc924f6);});}),_0x11b963['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x501d79=_0x3ce0d7=>{const _0x9dc07c=new C(this['context']['locale']);_0x11b963['addAnnotation'](_0x3ce0d7,_0x9dc07c),this['_annotationToNarrowView']['set'](_0x3ce0d7,_0x9dc07c),_0x9dc07c['bind']('isDirty','annotationType','number')['to'](_0x3ce0d7['view'],'isDirty','type','length'),_0x9dc07c['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5d1bee['content']['first']!==_0x3ce0d7['view']?(this['_showBalloon'](_0x3ce0d7),_0x3ce0d7['view']['element']['focus'](),this['setActiveAnnotation'](_0x3ce0d7)):this['setActiveAnnotation'](null);});};for(const _0x518116 of _0xc924f6)_0x501d79(_0x518116);this['listenTo'](_0xc924f6,'add',(_0x2d830c,_0x2e889a)=>{_0x501d79(_0x2e889a);}),this['listenTo'](_0xc924f6,'remove',(_0x21eb9c,_0x119410,_0x1357b8)=>{this['_annotationToNarrowView']['get'](_0x119410)['destroy'](),this['_annotationToNarrowView']['delete'](_0x119410),_0x11b963['rearrange']({'removedAnnotation':_0x119410,'previousAnnotation':_0xc924f6['get'](_0x1357b8-0x1),'nextAnnotation':_0xc924f6['get'](_0x1357b8+0x1)}),_0x119410===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xc924f6,'focus',(_0x441610,_0x50edd7)=>{this['setActiveAnnotation'](_0x50edd7);}),this['listenTo'](_0xc924f6,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x5a5f27,_0x318647)=>{_0x318647['keyCode']===_0x821f48['esc']&&_0x5d1bee['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5d1bee['content']['first']),this['_hideBalloon'](),_0x318647['stopPropagation'](),_0x318647['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x25f48a,_0x1ec6cf)=>{const _0x16b963=_0x1ec6cf['target'];_0x5d1bee['isVisible']&&_0x5d1bee['element']['contains'](_0x16b963)||_0x11b963['view']['element']['contains'](_0x16b963)||_0x25f48a['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x33362e=>_0x33362e['contains'](_0x16b963))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5bfb83=this['context']instanceof _0x4fa64c?this['context']['editors']:new _0x56e647([this['context']]);for(const _0x15039d of _0x5bfb83)this['_integrateWithEditorAnnotations'](_0x15039d);this['listenTo'](_0x5bfb83,'add',(_0x329951,_0x577863)=>{this['listenTo'](_0x577863,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x577863);});}),this['listenTo'](_0x5bfb83,'remove',(_0x24783a,_0x112f4f)=>{_0x112f4f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x112f4f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x81988f){if(_0x81988f===this['activeAnnotation'])return;const _0x168339=this['context']['plugins']['get'](z);if(_0x168339['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x81988f,'disableAnimationOnActivatedAnnotation':!0x0}),_0x81988f)_0x168339['getSidebarItemView'](_0x81988f)?this['_showBalloon'](_0x81988f):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x81988f;}['detach'](){if(!this['isAttached'])throw new _0xb557ef('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x483000=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4b00a0=>_0x4b00a0['destroy']()),this['_annotationToNarrowView']['clear'](),_0x483000['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4fa64c&&this['stopListening'](this['context']['editors']);for(const _0x12377c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x12377c);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'](_0x5150bc){if(!_0x5150bc['plugins']['has']('EditorAnnotations'))return;const _0x5d07fe=_0x5150bc['plugins']['get']('EditorAnnotations'),_0x258fc0=this['context']['plugins']['get'](z),_0x2ce1d4=this['annotations'],_0x5f1298=this['balloonPanelView'],_0x11fcb9=()=>{const _0x4df865=_0x5d07fe['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4df865),this['setActiveAnnotation'](_0x4df865[0x0]||null);};this['listenTo'](_0x5d07fe,'refresh',_0x11fcb9),this['listenTo'](_0x5d07fe,'blur',(_0x5368bd,{isAnnotationTracked:_0x29c2a0})=>{this['activeAnnotation']&&_0x29c2a0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5d07fe,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2ce1d4,'blur',_0x42f4f3=>{_0x5d07fe['hasDomSelection']()&&_0x42f4f3['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x158017,_0x2331b0)=>{const _0x49c93b=_0x2331b0['target'];_0x5f1298['isVisible']&&_0x5f1298['element']['contains'](_0x49c93b)||_0x258fc0['view']['element']['contains'](_0x49c93b)||this['activeAnnotation']&&_0x5d07fe['hasDomSelection']()&&(_0x11fcb9(),_0x158017['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5d07fe);}['_destroyEditorAnnotationsIntegration'](_0x2bc07d){_0x2bc07d&&(this['stopListening'](_0x2bc07d),this['_editorAnnotations']['remove'](_0x2bc07d));}['_setSelectedAnnotations'](_0x1c8a3f){for(const _0x2daa8b of this['_selectedAnnotations'])_0x1c8a3f['includes'](_0x2daa8b)||this['_manuallyClosedAnnotationViews']['delete'](_0x2daa8b['view']);this['_selectedAnnotations']=_0x1c8a3f;}['_refreshPositioning'](){const _0x51d1a2=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x51d1a2['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x28d9b5){if(this['_manuallyClosedAnnotationViews']['has'](_0x28d9b5['view']))return;const _0x2053fd=this['balloonPanelView']['content']['first'];_0x2053fd!==_0x28d9b5['view']?(_0x2053fd&&this['_detachListeners'](_0x2053fd),this['_attachListeners'](_0x28d9b5['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x28d9b5['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3b4552=this['balloonPanelView']['content']['first'],_0xa54617=_0x3b4552&&this['annotations']['getByView'](_0x3b4552);if(!_0xa54617||!this['_annotationToNarrowView']['has'](_0xa54617))return;const _0x3aa41f=this['_annotationToNarrowView']['get'](_0xa54617)['element'],_0x21e527=(function(){const _0xac9bbf=_0x322a3d['defaultPositions'];return[_0xac9bbf['southArrowNorthEast'],_0xac9bbf['northArrowSouthEast'],_0xac9bbf['southArrowNorth'],_0xac9bbf['northArrowSouth'],_0xac9bbf['southArrowNorthWest'],_0xac9bbf['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3aa41f,'positions':_0x21e527});}['_hideBalloon'](){const _0x45c4ec=this['balloonPanelView'],_0x369d39=_0x45c4ec['content']['first'];_0x369d39&&(this['_detachListeners'](_0x369d39),_0x45c4ec['unpin'](),_0x45c4ec['content']['clear']());}['_attachListeners'](_0x4c02d8){this['listenTo'](_0x4c02d8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4c02d8,'Esc',(_0xabf763,_0x2f4950)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4c02d8),this['_hideBalloon'](),_0x2f4950();});}['_detachListeners'](_0x25075a){this['stopListening'](_0x25075a);}}class c extends _0x108da2{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x49b01a,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x346fc3){super(_0x346fc3),_0x346fc3['editing']['view']['addObserver'](_0x1706a0),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x346fc3['plugins']['get'](_0x49b01a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xad31f=this['editor']['plugins']['get'](j);_0xad31f['context']===this['editor']&&(_0xad31f['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x342441,_0x619eb7)=>{const _0x4ae608=this['_balloon'];if(this['isAttached']&&_0x4ae608['visibleView']){const _0x5d5c05=this['annotations']['getByView'](_0x4ae608['visibleView']);_0x5d5c05&&this['_closeAnnotation'](_0x5d5c05),_0x619eb7();}}));}['afterInit'](){const _0x46c022=this['editor']['plugins']['get'](j);_0x46c022['context']===this['editor']&&(_0x46c022['hasActive']()||_0x46c022['switchTo']('inline'));}['setActiveAnnotation'](_0x13065f){_0x13065f!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x13065f&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x13065f)&&this['_addAnnotationToBalloon'](_0x13065f,!0x0),_0x13065f['isActive']=!0x0),_0x13065f||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x13065f);}['attach'](_0xf542ad){this['annotations']=_0xf542ad;const _0x1a3f84=this['editor']['plugins']['get'](j),_0x2b4120=this['_balloon'];if(this['isAttached'])throw new _0xb557ef('inlineannotations-attach-already-attached',this);if(_0x1a3f84['context']!==this['editor'])throw new _0xb557ef('inlineannotations-not-allowed-with-context',this);const _0x7dd41d=this['editor']['plugins']['get'](b);this['listenTo'](_0x7dd41d,'refresh',()=>{const _0x316761=_0x7dd41d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x23a627,_0x1b2888;!this['_forceRefresh']&&(_0x23a627=_0x316761,_0x1b2888=this['_selectedAnnotations'],_0x23a627['length']===_0x1b2888['length']&&_0x23a627['every'](_0x3de181=>_0x1b2888['includes'](_0x3de181)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x316761),this['setActiveAnnotation'](_0x316761[0x0]||null));}),this['listenTo'](_0x7dd41d,'blur',(_0x169bab,{isAnnotationTracked:_0x42a062})=>{this['activeAnnotation']&&_0x42a062(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x53f3fc,_0x56f4b1,_0x3d6ed4)=>{_0x3d6ed4||this['setActiveAnnotation'](null);}),this['listenTo'](_0xf542ad,'remove',(_0x2cb467,_0x30f462)=>{this['_removeAnnotationFromBalloon'](_0x30f462),_0x30f462===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2b4120,'change:visibleView',(_0x4ac8cd,_0x233a44,_0x1e0172,_0x10506d)=>{_0x10506d&&this['stopListening'](_0x10506d);const _0x4ebfce=_0xf542ad['getByView'](_0x1e0172);_0x1e0172&&_0x4ebfce&&(this['listenTo'](_0x1e0172,'change:height',()=>{_0x2b4120['updatePosition']();}),this['listenTo'](_0x1e0172,'Esc',()=>{this['_closeAnnotation'](_0x4ebfce),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4ebfce&&this['setActiveAnnotation'](_0x4ebfce));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x2b4120['visibleView']&&(_0xf542ad['getByView'](_0x2b4120['visibleView'])&&_0x2b4120['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 _0xb557ef('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x51b92e of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x51b92e);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x52260b){for(const _0xe66f3d of this['_selectedAnnotations'])_0x52260b['includes'](_0xe66f3d)||this['_manuallyClosed']['delete'](_0xe66f3d);for(const _0x46da2d of this['annotations'])_0x52260b['includes'](_0x46da2d)||this['_removeAnnotationFromBalloon'](_0x46da2d);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3125b6 of _0x52260b)this['_addAnnotationToBalloon'](_0x3125b6);}this['_selectedAnnotations']=_0x52260b;}['_addAnnotationToBalloon'](_0x3916ed,_0x789fe3=!0x1){this['_manuallyClosed']['has'](_0x3916ed)||(this['_addedAnnotations']['has'](_0x3916ed)||this['_balloon']['hasView'](_0x3916ed['view'])||(this['_addedAnnotations']['add'](_0x3916ed),this['_balloon']['add']({'stackId':_0x3916ed['view']['id'],'view':_0x3916ed['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3916ed)}})),_0x789fe3&&this['_balloon']['showStack'](_0x3916ed['view']['id']));}['_getBalloonTargetForAnnotation'](_0x3dbc89){const _0x410d0c=_0x3dbc89['target'],_0x2906b1=this['editor']['editing']['view'],_0x4a5ad3=_0x2906b1['document']['selection']['getFirstRange'](),_0x56f994=_0x2906b1['domConverter']['viewRangeToDom'](_0x4a5ad3);if(_0x56f994['collapse'](!0x0),_0x410d0c){if(_0x410d0c instanceof _0x14f71d)return _0x410d0c;let _0x56b680=[];for(const _0x563b33 of _0x410d0c)_0x56b680['push'](...F(_0x563b33['getClientRects']()));_0x56b680=function(_0x3b1193){const _0x297ed6=[];let _0x14f77e=_0x3b1193[0x0];for(let _0x515bf6=0x1;_0x515bf6<_0x3b1193['length'];_0x515bf6++)P(_0x14f77e,_0x3b1193[_0x515bf6])?_0x14f77e['width']+=_0x3b1193[_0x515bf6]['width']:(_0x297ed6['push'](_0x14f77e),_0x14f77e=_0x3b1193[_0x515bf6]);return _0x297ed6['push'](_0x14f77e),_0x297ed6;}(_0x56b680);const _0x3bb5ce=_0x56f994['getBoundingClientRect']();return _0x56b680['find'](_0x53138b=>_0x53138b['top']<=_0x3bb5ce['top']&&_0x53138b['bottom']>=_0x3bb5ce['bottom']&&_0x53138b['left']<=_0x3bb5ce['left']&&_0x53138b['right']>=_0x3bb5ce['right'])||_0x56b680[0x0];}return _0x3dbc89['targetRect']||_0x56f994;}['_removeAnnotationFromBalloon'](_0x229d1f){this['_addedAnnotations']['has'](_0x229d1f)&&this['_balloon']['hasView'](_0x229d1f['view'])&&(this['_addedAnnotations']['delete'](_0x229d1f),this['_balloon']['remove'](_0x229d1f['view']));}['_closeAnnotation'](_0x2c4f7e){this['_manuallyClosed']['add'](_0x2c4f7e),this['_removeAnnotationFromBalloon'](_0x2c4f7e);}}function F(_0x16d653){return Array['from'](_0x16d653)['map'](DOMRect['fromRect']);}function P(_0x3a1668,_0x20e2c0){return _0x3a1668['top']===_0x20e2c0['top']&&_0x3a1668['bottom']===_0x20e2c0['bottom']&&_0x3a1668['right']===_0x20e2c0['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x39bc0f,_0xf833e3){super(_0x39bc0f),this['set']('isEmpty',!_0xf833e3['length']),this['focusTracker']=new _0x570758(),this['_annotationViews']=_0xf833e3,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x3ffb7c({'focusables':_0xf833e3,'focusTracker':this['focusTracker']}),this['listenTo'](_0xf833e3,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xf833e3,'remove',(_0x33a44e,_0x1edf5c)=>{_0x1edf5c['isActive']&&this['focus'](),_0xf833e3['length']||(this['isEmpty']=!0x0);});const _0x283f22=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x39bc0f,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xf833e3},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x283f22['if']('isEmpty','ck-hidden',_0x4681ff=>!_0x4681ff)]},'children':[{'text':N(_0x39bc0f,'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 _0x2c7d40 of this['_annotationViews'])this['focusTracker']['add'](_0x2c7d40['element']);this['_annotationViews']['on']('change',(_0x39fb7a,{added:_0x57d4d2,removed:_0x26c855})=>{for(const _0x5d058d of _0x57d4d2)this['focusTracker']['add'](_0x5d058d['element']);for(const _0x254ed2 of _0x26c855)this['focusTracker']['remove'](_0x254ed2['element']);});}}class p extends _0x38f59f{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x464f48){super(_0x464f48),this['archivedThreads']=new _0x56e647();}['init'](){const _0xa6971=this['context'],_0x2e7245=_0xa6971['plugins']['get'](o),_0x19231a=_0xa6971['plugins']['get'](y);this['listenTo'](_0x2e7245,'addCommentThread',(_0x34db4f,{threadId:_0x373262})=>{const _0x3256e0=_0x2e7245['getCommentThread'](_0x373262);_0x3256e0['archivedAt']&&this['archivedThreads']['add'](_0x3256e0,this['_calculatePosition'](_0x3256e0['archivedAt'])),this['listenTo'](_0x3256e0,'change:archivedAt',(_0x19c3fa,_0x1de37d,_0x12e2f5)=>{_0x12e2f5?this['archivedThreads']['has'](_0x3256e0)||this['archivedThreads']['add'](_0x3256e0,this['_calculatePosition'](_0x3256e0['archivedAt'])):this['archivedThreads']['has'](_0x3256e0)&&this['archivedThreads']['remove'](_0x3256e0);});}),this['listenTo'](_0x2e7245,'removeCommentThread',(_0x4ebd3f,{threadId:_0x58a003})=>{const _0x249042=_0x2e7245['getCommentThread'](_0x58a003);this['stopListening'](_0x249042),this['archivedThreads']['has'](_0x249042)&&this['archivedThreads']['remove'](_0x249042);},{'priority':'highest'}),this['listenTo'](_0x19231a['collection'],'focus',(_0x1b922a,_0x20818b)=>{_0x20818b['isVisible']||(_0x20818b['isActive']=!0x0,_0x19231a['activate'](_0x20818b));});}['_calculatePosition'](_0x30cda7){const _0x182d30=[...this['archivedThreads']]['findIndex'](_0x13f0ba=>_0x13f0ba['archivedAt']<_0x30cda7);return _0x182d30>-0x1?_0x182d30:this['archivedThreads']['length'];}}class a extends _0x108da2{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x40c884];}constructor(_0x16fc5b){super(_0x16fc5b),this['annotationViews']=new _0x5cdefa(),this['_pendingThreads']=[];}['init'](){const _0x242f00=this['editor'],_0x51b6b8=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x242f00['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3adb51,!0x0)),_0x242f00['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1fd3e4=this['_createCommentsArchiveButton'](_0x52c1fc);return _0x1fd3e4['set']({'role':'menuitemcheckbox'}),_0x1fd3e4;});const _0x380907=_0x242f00['plugins']['get'](p),_0x3103de=_0x242f00['plugins']['get']('Annotations'),_0x3c3fa3=_0x242f00['plugins']['get']('CommentsRepository');_0x380907['archivedThreads']['forEach'](_0x20d8e7=>{this['_handleNewThread'](_0x20d8e7);}),this['listenTo'](_0x380907['archivedThreads'],'add',(_0xfbde25,_0x3c15b5)=>{this['_handleNewThread'](_0x3c15b5);}),this['listenTo'](_0x3103de['collection'],'add',(_0x5db0cb,_0xdc36e2)=>{const _0x2a9327=this['_pendingThreads']['find'](_0x82f893=>{const _0x413b43=_0x3c3fa3['_threadToController']['get'](_0x82f893);return _0x413b43&&_0xdc36e2['innerView']===_0x413b43['view'];});if(_0x2a9327){const _0x5d44b4=this['_calculatePosition'](_0x2a9327['archivedAt']);this['annotationViews']['add'](_0xdc36e2['view'],_0x5d44b4),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2a9327),0x1);}}),this['listenTo'](_0x380907['archivedThreads'],'remove',(_0x3a8110,_0xfb7553)=>{const _0x1e3a0a=_0x242f00['config']['get']('collaboration.channelId');if(!_0x1e3a0a||_0xfb7553['channelId']===_0x1e3a0a){if(this['_pendingThreads']['includes'](_0xfb7553))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xfb7553),0x1);else{const _0x919d11=_0x3c3fa3['_threadToController']['get'](_0xfb7553),_0xb40c4d=_0x3103de['getByInnerView'](_0x919d11['view']);this['annotationViews']['remove'](_0xb40c4d['view']),this['stopListening'](_0xb40c4d['focusableElements']);}}}),this['listenTo'](_0x3103de['collection'],'add',(_0x1c3e92,_0x5e8de2)=>{this['listenTo'](_0x5e8de2,'escape',_0x51b6b8);}),this['listenTo'](_0x3103de['collection'],'remove',(_0x57410c,_0x30b237)=>{this['stopListening'](_0x30b237,'escape',_0x51b6b8);});}['_handleNewThread'](_0x4272a8){const _0x197854=this['editor']['plugins']['get']('CommentsRepository'),_0x4b0265=this['editor']['plugins']['get']('Annotations'),_0x4a15f2=this['editor']['config']['get']('collaboration.channelId');if(!_0x4a15f2||_0x4272a8['channelId']===_0x4a15f2){const _0x200d39=_0x197854['_threadToController']['get'](_0x4272a8);if(!_0x200d39)return void this['_pendingThreads']['push'](_0x4272a8);const _0xd0bcb0=this['_calculatePosition'](_0x4272a8['archivedAt']),_0x6741e1=_0x4b0265['getByInnerView'](_0x200d39['view']);_0x6741e1['isVisible']&&_0x4b0265['_visibleAnnotations']['remove'](_0x6741e1),this['annotationViews']['add'](_0x6741e1['view'],_0xd0bcb0);}}['_calculatePosition'](_0xdc1637){const _0x9572d0=this['editor']['config']['get']('collaboration.channelId'),_0x2639a7=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x379381=>_0x379381['channelId']===_0x9572d0)['findIndex'](_0x48b681=>_0x48b681['archivedAt']<_0xdc1637);return _0x2639a7<0x0||_0x2639a7>this['annotationViews']['length']?this['annotationViews']['length']:_0x2639a7-0x1;}['_toggleDialog'](){const _0x428c8=this['editor'],_0x1193a6=_0x428c8['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x428c8['locale'],this['annotationViews'])),'commentsArchive'===_0x1193a6['id']?_0x1193a6['hide']():_0x1193a6['show']({'id':'commentsArchive','title':N(_0x428c8['locale'],'COMMENTS_ARCHIVE'),'icon':_0x15d9c0,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x13630d['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4b46be,_0x59552d=!0x1){const _0x59e95e=this['editor']['locale'],_0x49763a=this['editor']['plugins']['get']('Dialog'),_0x4966c0=new _0x4b46be(_0x59e95e);return _0x4966c0['bind']('isEnabled')['to'](this,'isEnabled'),_0x4966c0['bind']('isOn')['to'](_0x49763a,'id',_0x5f420e=>'commentsArchive'===_0x5f420e),_0x4966c0['set']({'label':N(_0x59e95e,'COMMENTS_ARCHIVE'),'icon':_0x15d9c0,'isToggleable':!0x0}),_0x59552d&&(_0x4966c0['tooltip']=!0x0),this['listenTo'](_0x4966c0,'execute',()=>this['_toggleDialog']()),_0x4966c0;}['_hideDialogOnAnnotationEscape']=_0xe765e5=>{const _0x31fe42=_0xe765e5['source'];if(!this['annotationViews']['has'](_0x31fe42['view']))return;const _0x53ea35=this['editor']['plugins']['get']('Dialog');_0x53ea35['isOpen']&&'commentsArchive'===_0x53ea35['id']&&(_0x53ea35['hide'](),_0xe765e5['stop']());};}class gi extends _0x108da2{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x53a597,ContextPlugin as _0x42791b,PendingActions as ht,Command as _0x3a648c,Plugin as _0x3a30de,Context as _0xe14280}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x52a59c,uid as _0x50d72b,KeystrokeHandler as jt,FocusTracker as _0x4cfdf8,diff as _0x30600f,Collection as _0x364175,Rect as _0x56aaf6,CKEditorError as _0x441c59,first as _0x40d693,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x57119a,keyCodes as _0x465a8c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x4daedd,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x4d49c8,trimHtml as ts,LateFocusDropdownButtonView as _0x3d1af5,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x1851f4}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as Ct,debounce as _0x5510df}from'es-toolkit/compat';import{IconUndo as _0x46a965,IconCheck as _0x28117c,IconPencil as _0x1fb7a7,IconRemoveComment as _0x4daafe,IconThreeVerticalDots as _0x11fd34,IconAddComment as _0x47f152,IconCommentsArchive as _0x234f73}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x59c832,ButtonView as _0x50efaa,ViewCollection as _0x33ceff,createDropdown as _0x120942,ListView as _0x19e426,focusChildOnDropdownOpen as _0xd1fc05,ListItemView as _0xdf2ad2,MenuBarMenuListItemButtonView as _0x17389d,BodyCollection as _0x46ec89,BalloonPanelView as _0x15b8ea,ContextualBalloon as _0x45ef95,Dialog as _0x5adb31,DialogViewPosition as _0x152236}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x17a1e9}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x470e0b}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2e0659}from'@ckeditor/ckeditor5-widget/dist/index.js';class yt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x52a59c(){['model'];['view'];constructor(_0x4106e7,_0x342619){super(),this['model']=_0x4106e7,this['model']['_isAttached']=!0x0,this['view']=_0x342619,this['listenTo'](_0x342619,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x342619,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x342619,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x342619,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x342619,'addComment',(_0x5cfc26,_0x227d2d)=>this['addComment'](_0x227d2d)),this['listenTo'](_0x342619,'updateComment',(_0x25ad68,_0x403717,_0x504fc3)=>this['updateComment'](_0x403717,_0x504fc3)),this['listenTo'](_0x342619,'removeComment',(_0x66ded1,_0x2aec43)=>this['removeComment'](_0x2aec43));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x4ae1f5){this['model']['addComment']({'content':_0x4ae1f5,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x42c839,_0x335700){this['model']['getComment'](_0x42c839)['update']({'content':_0x335700});}['removeComment'](_0x8fa356){this['model']['getComment'](_0x8fa356)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x2884b2,_0x1729f5,_0x476c84){const t=_0x2884b2['t'];switch(_0x1729f5){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'},_0x476c84);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'},_0x476c84);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'},_0x476c84);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'},_0x476c84);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x476c84);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'},_0x476c84);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'},_0x476c84);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'},_0x476c84);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(_0xeedf7a,_0x229995){super(_0xeedf7a);const _0x41723f=_0x50d72b();this['main']=this['createCollection'](),this['editable']=new Vt(_0xeedf7a,_0x229995,void 0x0,{'label':()=>N(_0xeedf7a,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xeedf7a['uiLanguageDirection'],'lang':_0xeedf7a['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x41723f},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x326003){super(_0x326003),this['view']=new Rt(_0x326003['locale'],_0x326003['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x5d114e=this['editor']['editing']['view'],_0x2dc3f5=this['view']['editable'],_0x14bd7d=_0x5d114e['document']['getRoot']();_0x2dc3f5['name']=_0x14bd7d['rootName'],this['view']['render']();const _0x5cbd89=_0x2dc3f5['element'];this['setEditableElement'](_0x2dc3f5['name'],_0x5cbd89),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5d114e['attachDomRoot'](_0x5cbd89),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x52a59c(_0x53a597){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x4f0645={}){function _0x2f11e2(_0x53304c){return _0x53304c['map'](_0x4e4bab=>String['fromCharCode'](_0x4e4bab))['join']('');}(_0x4f0645=Object['assign']({},_0x4f0645))['plugins']||(_0x4f0645['plugins']=Qt['defaultPlugins']),super(_0x4f0645),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2f11e2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2f11e2([0x76,0x69,0x65,0x77])][_0x2f11e2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2f11e2([0x61,0x75,0x74,0x6f]),this[_0x2f11e2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2f11e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2f11e2([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2f11e2([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2f11e2([0x6f,0x6b])});}['create'](){const _0x8f4ac7=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x8f4ac7))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x505078=>{const _0x12287c=this['model']['document']['getRoot'](),_0x59a9b9=_0x12287c&&_0x12287c['getChild'](_0x12287c['childCount']-0x1);_0x505078['setSelection'](_0x59a9b9,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x53d8de=this['editing']['view'],_0x131ccf=_0x53d8de['document']['getRoot'](),_0x1338fe=_0x131ccf['getChild'](0x0);_0x131ccf['childCount']>0x1||!_0x1338fe||'p'!=_0x1338fe['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x53d8de,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1338fe['placeholder']=this['placeholder']),St({'view':_0x53d8de,'element':_0x1338fe,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1338fe);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x49abf0,_0xbd2630={}){super(_0x49abf0),this['editor']=null,this['_editorConfig']=_0xbd2630,this['set']('value',_0xbd2630['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x49abf0,'Reply...')),this['set']('submitLabel',N(_0x49abf0,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4cfdf8(),this['focusCycler']=new _0x59c832({'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',(_0x3d3d61,_0x46a8a2)=>{this['cancelButtonView']['fire']('execute'),_0x46a8a2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x32f964,_0x430e2f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x430e2f());}),this['on']('submit',(_0xd30500,_0x5a7bf3)=>{_0x5a7bf3['length']>0xfde8?(alert(N(_0x49abf0,'TOO_LONG_COMMENT_ALERT',[_0x5a7bf3['length'],0xfde8])),_0xd30500['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x5cc662=this['editor'];this['element']['insertBefore'](_0x5cc662['ui']['element'],this['element']['firstChild']),_0x5cc662['model']['document']['on']('change',()=>this['value']=_0x5cc662['getData']()),_0x5cc662['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5cc662['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2a04e2){-0x1===_0x2a04e2?(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:_0x57be77}=this,_0x480dc1=new _0x50efaa(_0x57be77);return _0x480dc1['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x480dc1['withText']=!0x0,_0x480dc1['bind']('label')['to'](this,'submitLabel'),_0x480dc1['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x480dc1['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x43d6b2,_0x3733e5)=>!_0x3733e5&&!!_0x43d6b2['trim']()),_0x480dc1;}['_createCancelButton'](){const {locale:_0x8394e7}=this,_0xefc372=new _0x50efaa(_0x8394e7);return _0xefc372['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xefc372['label']=N(_0x8394e7,'Cancel'),_0xefc372['withText']=!0x0,_0xefc372['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xefc372;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x16ef0e=>{this['focusTracker']['add'](_0x16ef0e['element']);}),this['focusables']['on']('change',(_0xc5dd08,_0x4046e1)=>{for(const _0x46c97b of Array['from'](_0x4046e1['added'])['reverse']())this['focusTracker']['add'](_0x46c97b['element']);});}}class ie extends kt{constructor(_0x1a0575,_0x7903d0,_0xdde378){super(_0x1a0575),this['commentInputView']=new es(_0x1a0575,_0xdde378),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5238dc,_0x45c362)=>_0x5238dc||!!_0x45c362),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 _0x4daedd(_0x1a0575,_0x7903d0),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'](_0x3976fb){this['commentInputView']['focus'](_0x3976fb);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x197984,_0x2b4843)=>{const {submitButtonView:_0x125fbf,cancelButtonView:_0x37c7b3,editor:_0x221a5f}=this['commentInputView'];[_0x125fbf['element'],_0x37c7b3['element'],_0x221a5f?_0x221a5f['editing']['view']['getDomRoot']():null]['filter'](_0x5bbd37=>_0x5bbd37)['some'](_0x4d140c=>_0x4d140c['contains'](_0x2b4843['target']))||(this['focus'](),_0x2b4843['preventDefault']());});}}class os extends kt{constructor(_0x593346){super(_0x593346);const _0x382568=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x382568['to']('count',_0x6c6f80=>N(_0x593346,'NUMBER_OF_COMMENTS',_0x6c6f80))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3e6eec,_0x16faae,_0x1dcbd7){super(_0x3e6eec);const _0x12f7bb=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x16faae['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x16faae,this['_config']=_0x1dcbd7,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4cfdf8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x59c832({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2983ba=>this['commentViews']['map'](_0x5c6a87=>_0x5c6a87['element'])['includes'](_0x2983ba['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x3e6eec),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x561890=>_0x561890-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5a481f of _0x16faae['comments'])this['_handleNewCommentModel'](_0x5a481f);this['_handleInfoComment'](),this['listenTo'](_0x16faae['comments'],'add',(_0x5e6105,_0x388257)=>{const _0x48cdd8=this['_calculatePosition'](_0x388257);this['length']++,this['_handleNewCommentModel'](_0x388257,_0x48cdd8),this['refreshVisibleViews']();}),this['listenTo'](_0x16faae['comments'],'remove',(_0x567558,_0x19839a)=>{this['length']--,this['_handleRemoveCommentModel'](_0x19839a),this['refreshVisibleViews']();}),this['listenTo'](_0x16faae,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x16faae,'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',_0x12f7bb['if']('length','ck-hidden',_0x2d4b32=>!_0x2d4b32)],'aria-label':N(_0x3e6eec,'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'](_0xfc9d1){-0x1===_0xfc9d1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4bbc2b of this['commentViews'])_0x4bbc2b['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x47a7aa,_0x167f8d){const _0x3d8c5a=new this['_config']['CommentView'](this['locale'],_0x47a7aa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3d8c5a['viewUid']=_0x47a7aa['id'],_0x3d8c5a['delegate']('removeComment')['to'](this),_0x3d8c5a['delegate']('updateComment')['to'](this),_0x3d8c5a['delegate']('resolveCommentThread')['to'](this),_0x3d8c5a['delegate']('editorReady')['to'](this),_0x3d8c5a['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3d8c5a,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3d8c5a,_0x167f8d);}['_calculatePosition'](_0x43eac3){const _0x18d815=this['_model']['_findOptimalIndex'](_0x43eac3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x43eac3['authoredAt']?_0x18d815-0x1:_0x18d815:_0x18d815-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x11fe8c={'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'],_0x11fe8c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x11fe8c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x161fbe){const _0x38588a=this['commentViews']['remove'](_0x161fbe['id']);this['stopListening'](_0x38588a),_0x38588a['isEditMode']&&this['_updateHasDirtyComment'](),_0x38588a['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3d0cd5=>_0x3d0cd5['isEditMode']);}['_rearrangeCollapse'](){const _0x4c7b77=function(_0x18e671){const _0x40199a=new _0x364175();for(const _0x32744b of _0x18e671)_0x40199a['add'](_0x32744b);return _0x40199a;}(this['commentViews']),_0x2d403b=this['_collapsedCommentsView']['count'];for(let _0x3097f0=0x1;_0x3097f0<=_0x2d403b;_0x3097f0++)_0x4c7b77['remove'](0x1);for(const _0x5a656c of _0x4c7b77)_0x5a656c['collapse']();_0x2d403b>0x0&&_0x4c7b77['add'](this['_collapsedCommentsView'],0x1),rs(_0x30600f(Array['from'](this['visibleViews']),Array['from'](_0x4c7b77)),this['visibleViews'],_0x4c7b77);}['_rearrangeExpand'](){rs(_0x30600f(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x571214 of this['visibleViews'])_0x571214['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1bbb9a=>{this['focusTracker']['add'](_0x1bbb9a['element']),this['keystrokes']['listenTo'](_0x1bbb9a['element']);}),this['commentViews']['on']('change',(_0x251892,_0x4671bc)=>{for(const _0x4119ec of _0x4671bc['removed'])this['focusTracker']['remove'](_0x4119ec['element']),this['keystrokes']['stopListening'](_0x4119ec['element']);for(const _0x5a78e3 of Array['from'](_0x4671bc['added'])['reverse']())this['focusTracker']['add'](_0x5a78e3['element']),this['keystrokes']['listenTo'](_0x5a78e3['element']);});}}function rs(_0x1494d1,_0x38860b,_0x4c0f59){let _0x9ba6aa=0x0;for(const _0x559b6e of _0x1494d1)switch(_0x559b6e){case'insert':_0x38860b['add'](_0x4c0f59['get'](_0x9ba6aa),_0x9ba6aa),_0x9ba6aa++;break;case'delete':_0x38860b['remove'](_0x9ba6aa);break;case'equal':_0x9ba6aa++;}}class oe extends kt{constructor(_0x395f9f){super(_0x395f9f);const _0x3b8227=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3b8227['to']('contextValue',_0x3abf70=>N(_0x395f9f,'THREAD_CONTEXT_LABEL',_0x3abf70)),'tabindex':-0x1},'children':[{'text':_0x3b8227['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x96f08a,_0x48171a){super(_0x96f08a);const _0x156430=this['bindTemplate'];this['_model']=_0x48171a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4cfdf8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x59c832({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x93bc52=>!!_0x93bc52),this['bind']('contextValue')['to'](this['_model'],'context',_0x1f2d75=>_0x1f2d75&&_0x1f2d75['value']?this['_trimContextValue'](_0x1f2d75['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',_0x156430['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 _0x546ed9=new _0x50efaa(this['locale']);return _0x546ed9['label']=N(this['locale'],'Reopen'),_0x546ed9['tooltip']=N(this['locale'],'Reopen'),_0x546ed9['icon']=_0x46a965,_0x546ed9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xf83966=>!_0xf83966),_0x546ed9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x530105,_0x27bc55)=>_0x530105&&_0x27bc55),_0x546ed9['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x546ed9;}['_trimContextValue'](_0x3e7030){if(_0x3e7030['length']<0x96)return _0x3e7030;const _0x16434f=_0x3e7030['lastIndexOf']('\x20',0x93);return _0x3e7030['substring'](0x0,_0x16434f>-0x1?_0x16434f:0x93)+'...';}['_attachContextActions'](){const _0x8c5e80=this['element']['querySelector']('.ck-context'),_0x14e018=_0x8c5e80['querySelector']('.ck-context__value');this['listenTo'](_0x8c5e80,'mouseenter',()=>{_0x14e018['offsetWidth']<_0x14e018['scrollWidth']&&_0x8c5e80['classList']['add']('overlay');}),this['listenTo'](_0x8c5e80,'mouseleave',()=>{_0x8c5e80['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x53c8ef of this['focusables'])this['focusTracker']['add'](_0x53c8ef['element']),this['keystrokes']['listenTo'](_0x53c8ef['element']);}['_createContextView'](){const _0x3191ef=new oe(this['locale']);return _0x3191ef['bind']('contextValue')['to'](this),_0x3191ef;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5a48a8,_0x56ef36,_0x554dcd,_0x15033a){super(_0x5a48a8),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x56ef36,this['_localUser']=_0x554dcd,this['_config']=_0x15033a,this['commentThreadHeaderView']=new Xt(_0x5a48a8,_0x56ef36),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5a48a8,N(_0x5a48a8,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5a48a8,_0x56ef36,Object['assign']({'CommentView':this['_config']['CommentView']},_0x15033a)),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',(_0x1194f6,_0x4f2ad9)=>_0x1194f6||!!_0x4f2ad9),this['bind']('isUnlinked')['to'](_0x56ef36,'unlinkedAt',_0x41bae5=>!!_0x41bae5),this['bind']('ariaLabel')['to'](this,'length',_0x437805=>{const _0x4428e6=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x437805,_0x4428e6]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4cfdf8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x59c832({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xbabe67=>_0xbabe67['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 _0x56369f=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3cf538=_0x56369f['commentInputView'];return _0x56369f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3cf538,'value',(_0x255125,_0x8da042,_0x498161,_0xb6da2f,_0x2fa75e)=>!!_0x2fa75e||!!_0xb6da2f&&_0x498161&&!_0x8da042||_0x255125&&_0x498161&&!_0x8da042),_0x3cf538['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1baf74,_0x307bd3,_0x2b1f43)=>{let _0x69f9b5;return _0x69f9b5=_0x2b1f43&&_0x307bd3?'Reply\x20to\x20reopen\x20discussion...':_0x1baf74?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x69f9b5);}),_0x3cf538['bind']('submitLabel')['to'](this,'length',_0x355ad7=>N(this['locale'],_0x355ad7?'Reply':'Comment')),_0x3cf538['on']('submit',(_0x398245,_0x410c7f)=>{this['fire']('addComment',_0x410c7f),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3cf538['on']('cancel',()=>{this['focus']();}),_0x3cf538['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3cf538['on']('cancel',_0x1eb954=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1eb954['stop']());}),this['on']('change:isActive',(_0x383357,_0x1d6a34,_0x213312)=>{_0x213312||this['length']||_0x3cf538['value']||this['fire']('removeCommentThread');}),_0x56369f;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x55b4aa,_0x34e189,_0x18d974,_0x103ad9){super(_0x55b4aa,_0x34e189,_0x18d974,_0x103ad9),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x55b4aa,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x4b324d,_0x341af5,_0x4e4f1e)=>{_0x4e4f1e||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x158952,_0x3614f9,_0x28d890)=>{_0x28d890&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4fb139=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4fb139['if']('isActive','ck-thread--active'),_0x4fb139['if']('isUnlinked','ck-thread--unlinked'),_0x4fb139['if']('isConfirm','ck-thread--remove-confirmation'),_0x4fb139['to']('actionIndicator',_0x1dddb9=>_0x1dddb9?'ck-thread--'+_0x1dddb9:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4fb139['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 _0x32f7c8 of this['commentsListView']['commentViews'])_0x32f7c8['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1d8d7d}=this,_0x3edafc=this['commentsListView']['commentViews']['get'](0x0);_0x3edafc===this['_boundFirstCommentView']||_0x3edafc['isSystemComment']||(this['_boundFirstCommentView']=_0x3edafc,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3edafc,'actionIndicator',_0x25a6cd=>'remove'===_0x25a6cd?'remove':null),_0x3edafc['placeholder']=N(_0x1d8d7d,'Write\x20a\x20comment...'),_0x3edafc['removeButton']['on']('execute',_0x572a8a=>{_0x572a8a['stop'](),this['showConfirm'](N(_0x1d8d7d,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3edafc['focus']();}),_0x3edafc['actionBar']['add'](this['resolveButton'],0x0),_0x3edafc['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4f31ab=new _0x4d49c8(this['locale']);return _0x4f31ab['label']=N(this['locale'],'Resolve'),_0x4f31ab['tooltip']=N(this['locale'],'Resolve'),_0x4f31ab['icon']=_0x28117c,_0x4f31ab['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4f31ab['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x593b26=>!_0x593b26),_0x4f31ab['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2be412,_0x52bde6)=>_0x2be412&&!_0x52bde6),_0x4f31ab['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4f31ab;}['_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(_0x2abf08){super(_0x2abf08),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5155b6,_0x3c5932,_0x579e15)=>{this['element']['innerHTML']=_0x579e15;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x54ab15,_0x5ef8ff,_0x41028c){super(_0x54ab15),this['_model']=_0x5ef8ff,this['_config']=_0x41028c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5ef8ff,'content',_0x5ef8ff,'authoredAt',(_0x20f492,_0x2d2cf6)=>N(_0x54ab15,'COMMENT_ARIA_LABEL',[_0x5ef8ff['author']['name'],_0x41028c['formatDateTime'](_0x2d2cf6),new DOMParser()['parseFromString'](_0x20f492,'text/html')['body']['textContent'],_0x5ef8ff['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x54ab15,N(_0x54ab15,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x33ceff(),this['focusTracker']=new _0x4cfdf8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x59c832({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4c8169=>_0x4c8169['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 _0x4e624f=new is(this['locale']);return _0x4e624f['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2a5109,_0x1e2aff)=>_0x1e2aff?ts(_0x2a5109,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2a5109),_0x4e624f;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0xb0743e=new es(this['locale'],this['_config']['editorConfig']);return _0xb0743e['value']=this['_model']['content'],_0xb0743e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xb0743e['submitLabel']=N(this['locale'],'Save'),_0xb0743e['on']('submit',(_0x1f3e65,_0x200e4b)=>{this['fire']('updateComment',this['_model']['id'],_0x200e4b),this['switchToDisplayMode'](),this['focus']();}),_0xb0743e['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0xb0743e['once']('editorReady',()=>{_0xb0743e['focus']();}),_0xb0743e['createEditor'](),_0xb0743e['delegate']('editorReady')['to'](this),_0xb0743e['delegate']('editorDestroyed')['to'](this),_0xb0743e;}['_setupKeyboardNavigation'](){const _0x51f447=this['element'];this['keystrokes']['listenTo'](_0x51f447);for(const _0x34e68f of this['focusables'])this['focusTracker']['add'](_0x34e68f['element']),this['keystrokes']['listenTo'](_0x34e68f['element']);this['focusables']['on']('change',(_0x358186,_0xa718fa)=>{for(const _0x93d9dd of _0xa718fa['removed'])this['focusTracker']['remove'](_0x93d9dd['element']),this['keystrokes']['stopListening'](_0x93d9dd['element']);for(const _0x40585d of _0xa718fa['added'])this['focusTracker']['add'](_0x40585d['element']),this['keystrokes']['listenTo'](_0x40585d['element']);}),this['keystrokes']['set']('enter',(_0x1a2aaa,_0x5d48ef)=>{_0x51f447===_0x1a2aaa['target']&&(this['focusCycler']['focusFirst'](),_0x5d48ef());}),this['keystrokes']['set']('esc',(_0x874727,_0x5679f7)=>{_0x51f447!==_0x874727['target']&&(this['focus'](),_0x5679f7());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x49971c,_0x2d64a3,_0x10d8c2){super(_0x49971c,_0x2d64a3,_0x10d8c2),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x49971c,'Reply...')),this['bind']('authoredAt')['to'](_0x2d64a3),this['bind']('resolvedAt')['to'](_0x2d64a3),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 _0x4daedd(_0x49971c,_0x2d64a3['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2d64a3,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x37d099=this['bindTemplate'],_0x559b1a=[{'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':_0x37d099['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x37d099['to']('authoredAt',_0x250b75=>this['_config']['formatDateTime'](_0x250b75))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x37d099['if']('isEditMode','ck-comment__actions--hidden'),_0x37d099['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']&&_0x559b1a['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x37d099['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x37d099['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x37d099['if']('isEditMode','ck-comment--edit'),_0x37d099['if']('isSystemComment','ck-comment--info'),_0x37d099['to']('actionIndicator',_0x397c78=>_0x397c78?'ck-comment--'+_0x397c78:'')],'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':_0x559b1a}]}]};}['_createEditButton'](){const _0x2e8773=new _0x50efaa(this['locale']);return _0x2e8773['label']=N(this['locale'],'Edit'),_0x2e8773['icon']=_0x1fb7a7,_0x2e8773['withText']=!0x0,_0x2e8773['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2e8773['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3d7611=>!_0x3d7611),_0x2e8773['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2e8773['on']('execute',()=>this['switchToEditMode']()),_0x2e8773;}['_createRemoveButton'](){const _0x1798d3=new _0x50efaa(this['locale']);return _0x1798d3['label']=N(this['locale'],'Remove'),_0x1798d3['icon']=_0x4daafe,_0x1798d3['withText']=!0x0,_0x1798d3['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1798d3['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x26a983=>!_0x26a983),_0x1798d3['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1798d3['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1798d3;}['_createDropdown'](){const _0x4afea8=_0x120942(this['locale'],_0x3d1af5),_0x513fb0=_0x4afea8['panelView']['children'],_0x593fa0=new _0x19e426(this['locale']),_0xb820a2=_0x4afea8['bindTemplate'];_0xd1fc05(_0x4afea8,()=>this['items']['find'](_0x55b084=>_0x55b084['isVisible'])),_0x4afea8['extendTemplate']({'attributes':{'class':[_0xb820a2['if']('isVisible','ck-hidden',_0x31ed08=>!_0x31ed08)]}});const _0x510253=(_0x1a7344,_0x41863e=-0x1)=>{const _0x5a86a8=new _0xdf2ad2(this['locale']);_0x5a86a8['children']['add'](_0x1a7344);const _0x422deb=_0x41863e>-0x1?_0x41863e:_0x593fa0['items']['length'];_0x593fa0['items']['add'](_0x5a86a8,_0x422deb);const _0x4ad3b3=Array['from'](this['items']);_0x4afea8['unbind']('isEnabled','isVisible'),_0x4afea8['bind']('isEnabled')['toMany'](_0x4ad3b3,'isEnabled',(..._0x4bda4d)=>_0x4bda4d['some'](_0x5594a6=>_0x5594a6)),_0x4afea8['bind']('isVisible')['toMany'](_0x4ad3b3,'isVisible',(..._0x4c968)=>_0x4c968['some'](_0x4e737d=>_0x4e737d));};_0x4afea8['panelPosition']='sw',_0x4afea8['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x11fd34});for(const _0xb63bbb of this['items'])_0x510253(_0xb63bbb);return _0x513fb0['add'](_0x593fa0),_0x4afea8['listenTo'](this['items'],'add',(_0x2daf36,_0x50f47c,_0x524c3a)=>{_0x510253(_0x50f47c,_0x524c3a);}),_0x4afea8['listenTo'](this['items'],'remove',(_0x337a14,_0x3c308e,_0x2907c4)=>{_0x593fa0['items']['remove'](_0x2907c4);}),_0x4afea8;}['_attachActions'](_0x3afa0d,_0x1f0a51){const _0x55c7b4=_0x3afa0d&&_0x3afa0d['element'];_0x55c7b4&&(this['listenTo'](_0x55c7b4,'mouseenter',()=>this['actionIndicator']=_0x1f0a51),this['listenTo'](_0x55c7b4,'focus',()=>this['actionIndicator']=_0x1f0a51),this['listenTo'](_0x55c7b4,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x55c7b4,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x41f68f=super['_createCommentInputView']();return _0x41f68f['bind']('placeholder')['to'](this),_0x41f68f;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x496490){const _0x139e49=Dt(_0x496490,0x1e),_0x48750a=new MutationObserver(_0x528c80=>{for(const _0x488f8f of _0x528c80)('attributes'==_0x488f8f['type']&&'class'==_0x488f8f['attributeName']||'childList'==_0x488f8f['type']||'characterData'==_0x488f8f['type'])&&_0x139e49();});return{'attach'(_0x571271){_0x48750a['observe'](_0x571271,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x48750a['disconnect'](),_0x139e49['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4123c7,_0x22fa14){super(_0x4123c7),this['id']=_0x50d72b(),this['focusTracker']=new _0x4cfdf8(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x7b5ca3,_0x3c42d1)=>this['fire']('Esc',_0x3c42d1)),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'](_0x22fa14),this['mainView']=_0x22fa14;const _0x48c37f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x48c37f['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 _0x492a2e=this['element']['clientHeight'];_0x492a2e&&(this['height']=_0x492a2e);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x52a59c(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1af789,target:_0x5da76c,type:_0x4e2a13,isVisible:_0x2a1576=!0x0}){super(),this['view']=_0x1af789,this['view']['element']||this['view']['render'](),this['_type']=_0x4e2a13,this['_target']=_0x5da76c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x364175([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x254e5b,_0x2ccb64)=>{this['view']['focusTracker']['add'](_0x2ccb64);}),this['focusableElements']['on']('remove',(_0x35ef83,_0x460a2b)=>{this['view']['focusTracker']['remove'](_0x460a2b);}),this['set']('isVisible',_0x2a1576);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x34ff5d=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x34ff5d),_0x34ff5d;}get['targetRect'](){const _0x53de7d=this['target'];if(null===_0x53de7d)return null;if(_0x53de7d instanceof _0x56aaf6)return _0x53de7d;const _0x43438c=_0x53de7d['filter'](_0x2b682e=>function(_0x2a2a56){const _0x1154e9=_0x2a2a56['offsetParent'];if(_0x1154e9)return!0x0;const _0x17ce8c=_0x2a2a56['getClientRects']()['item'](0x0);return!!_0x17ce8c;}(_0x2b682e));return 0x0===_0x43438c['length']?null:new _0x56aaf6(_0x43438c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x498074){this['view']['isActive']=_0x498074,this['view']['mainView']['isActive']=_0x498074;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x49a083){if(!(null===_0x49a083||_0x49a083 instanceof _0x56aaf6||Array['isArray'](_0x49a083)&&_0x49a083['every'](_0x19e54e=>fi(_0x19e54e))))throw new _0x441c59('annotation-invalid-target',null,{'target':_0x49a083});}['_getNormalizedTarget'](){const _0x37e056='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x37e056)?[_0x37e056]:_0x37e056;}}function fi(_0x40bf66){return null!==_0x40bf66&&'object'==typeof _0x40bf66&&'nodeType'in _0x40bf66&&0x1===_0x40bf66['nodeType'];}class S extends _0x364175{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2af975=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4cfdf8(),this['_focusTracker']['on']('change:isFocused',(_0x7a92cb,_0x180251,_0x502e7a)=>{_0x502e7a||this['fire']('blur');});for(const _0x393c25 of _0x2af975)this['add'](_0x393c25);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x791b96){if(this['has'](_0x791b96))throw new _0x441c59('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x791b96['innerView'],_0x791b96),this['_viewToAnnotation']['set'](_0x791b96['view'],_0x791b96);for(const _0x636acd of _0x791b96['focusableElements'])this['_focusTracker']['add'](_0x636acd);this['listenTo'](_0x791b96['focusableElements'],'add',(_0x1de85f,_0x23fa1f)=>{this['_focusTracker']['add'](_0x23fa1f);}),this['listenTo'](_0x791b96['focusableElements'],'remove',(_0x254d1f,_0x18660a)=>{this['_focusTracker']['remove'](_0x18660a);}),this['listenTo'](_0x791b96['view']['focusTracker'],'change:isFocused',(_0x1019ad,_0x20af89,_0x199b7c)=>{_0x199b7c&&this['fire']('focus',_0x791b96);}),_0x791b96['updateTargetRect']();const _0x9529e2=this['_getOrderInContent'](_0x791b96['view']['targetRect']);return super['add'](_0x791b96,_0x9529e2);}['remove'](_0x1789b0){if(!this['has'](_0x1789b0))throw new _0x441c59('annotationcollection-not-existing-item',null);this['stopListening'](_0x1789b0['view']['focusTracker']),this['stopListening'](_0x1789b0['focusableElements']);for(const _0x52ec5f of _0x1789b0['focusableElements'])this['_focusTracker']['remove'](_0x52ec5f);return this['_viewToAnnotation']['delete'](_0x1789b0['view']),this['_innerViewToAnnotation']['delete'](_0x1789b0['innerView']),super['remove'](_0x1789b0);}['getByInnerView'](_0x3546e2){return this['_innerViewToAnnotation']['get'](_0x3546e2);}['getByView'](_0x278632){return this['_viewToAnnotation']['get'](_0x278632);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2c77b4 of this)_0x2c77b4['updateTargetRect']();this['_sort']();}['_sort'](){const _0x54a61e=Array['from'](this)['sort']((_0x2038e0,_0x15fb28)=>w(_0x2038e0['view']['targetRect'],_0x15fb28['view']['targetRect']));for(let _0x1e6d96=_0x54a61e['length']-0x1;_0x1e6d96>0x0;_0x1e6d96--){const _0x2d9264=_0x54a61e[_0x1e6d96];_0x1e6d96!==this['getIndex'](_0x2d9264)&&(this['remove'](_0x2d9264),this['add'](_0x2d9264));}}['_getOrderInContent'](_0xe3af2b){let _0x3114d0=0x0;if(!_0xe3af2b)return this['length'];for(const _0x15e9fb of this){const _0x2f4b09=_0x15e9fb['view']['targetRect'];if(_0x2f4b09){if(w(_0xe3af2b,_0x2f4b09)<0x0)return _0x3114d0;_0x3114d0++;}}return _0x3114d0;}}function v({source:_0x4af40d,target:_0x253b05,filter:_0x13e9e7}){for(const _0x1f0c89 of _0x4af40d)_0x13e9e7(_0x1f0c89)&&_0x253b05['add'](_0x1f0c89);_0x253b05['listenTo'](_0x4af40d,'add',(_0x411a7c,_0x2c4769)=>{_0x13e9e7(_0x2c4769)&&_0x253b05['add'](_0x2c4769);}),_0x253b05['listenTo'](_0x4af40d,'remove',(_0x16176f,_0x3f7593)=>{_0x253b05['has'](_0x3f7593)&&_0x253b05['remove'](_0x3f7593);});}function w(_0x5dd9d3,_0xf5f46d){if(null===_0x5dd9d3&&null===_0xf5f46d)return 0x0;if(null===_0x5dd9d3)return-0x1;if(null===_0xf5f46d)return 0x1;const _0x587e3e=_0x5dd9d3['top']-_0xf5f46d['top'];return 0x0==_0x587e3e?_0x5dd9d3['left']-_0xf5f46d['left']:_0x587e3e;}class y extends _0x42791b{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f4f6e){if(super(_0x5f4f6e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x5f4f6e instanceof _0x53a597){const _0x5951ef=_0x5f4f6e['locale'];_0x5f4f6e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4aed3f){this['collection']['add'](_0x4aed3f);}['remove'](_0x1b5094){this['collection']['remove'](_0x1b5094),_0x1b5094['destroy']();}['refreshVisibility'](){for(const _0x4af1d2 of this['collection'])_0x4af1d2['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5a25cb){return this['collection']['getByInnerView'](_0x5a25cb);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x569f26 of this['collection'])_0x569f26['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4f31f6){this['fire']('_activateAnnotation',_0x4f31f6);}['createAnnotation'](_0xb48d60){return new T(_0xb48d60);}['createAnnotationView'](_0x1c82c6,_0x1465d7){return new E(_0x1c82c6,_0x1465d7);}['_addActiveAnnotation'](_0x1a15fc){const _0x4f4e3f=new Set(this['activeAnnotations']);_0x4f4e3f['add'](_0x1a15fc),this['activeAnnotations']=_0x4f4e3f;}['_removeActiveAnnotation'](_0x703f3c){const _0x2cc97e=new Set(this['activeAnnotations']);_0x2cc97e['delete'](_0x703f3c),this['activeAnnotations']=_0x2cc97e;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1b26c7=this['collection'],_0x2f2e72=this['_visibleAnnotations'];function _0x64c450(_0x505b7f){const _0x3a5608=_0x505b7f['source'];_0x3a5608['isVisible']&&!_0x2f2e72['has'](_0x3a5608)?_0x2f2e72['add'](_0x3a5608):!_0x3a5608['isVisible']&&_0x2f2e72['has'](_0x3a5608)&&_0x2f2e72['remove'](_0x3a5608),_0x3a5608['view']['focusTracker']['remove'](_0x3a5608['view']['element']),_0x3a5608['view']['focusTracker']['add'](_0x3a5608['view']['element']);}this['listenTo'](_0x1b26c7,'add',(_0x5600d3,_0x1074df)=>{_0x1074df['isVisible']&&_0x2f2e72['add'](_0x1074df),this['listenTo'](_0x1074df,'change:isVisible',_0x64c450);}),this['listenTo'](_0x1b26c7,'remove',(_0x1a01fb,_0x59fa72)=>{_0x2f2e72['has'](_0x59fa72)&&_0x2f2e72['remove'](_0x59fa72),this['stopListening'](_0x59fa72,'change:isVisible',_0x64c450);});}['_setupEnterAnnotationKeystroke'](){const _0x312977=_0x2f5676=>{_0x2f5676['on']('ready',()=>{_0x2f5676['keystrokes']['set'](_0x470e0b,(_0x3bb8ee,_0x20d733)=>{const _0x4fd701=_0x40d693(this['activeAnnotations']['values']());_0x4fd701&&(_0x4fd701['view']['focus'](),_0x20d733());});});};this['context']instanceof _0x53a597?_0x312977(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x59eb08,_0x320a44)=>{_0x312977(_0x320a44);});}['_setupEscapeAnnotationHandling'](){const _0x414387=_0x91e21=>{const _0x467b8b=_0x91e21['source'],_0x43b188=[];let _0x150f9f;if(Array['isArray'](_0x467b8b['target'])){_0x150f9f=_0x467b8b['target'][0x0],this['context']instanceof _0x53a597?_0x43b188['push'](this['context']):this['context']['editors']&&_0x43b188['push'](...this['context']['editors']);for(const _0x30004b of _0x43b188)for(const _0x4240ca of _0x30004b['editing']['view']['domRoots']['values']())if(_0x4240ca['contains'](_0x150f9f))return void _0x30004b['editing']['view']['focus']();_0x150f9f['focus']();}};this['listenTo'](this['collection'],'add',(_0x2ce313,_0x3aed4d)=>{this['listenTo'](_0x3aed4d,'escape',_0x414387,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x525b47,_0x2bf4b5)=>{this['stopListening'](_0x2bf4b5,'escape',_0x414387);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x42791b{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x186adf){super(_0x186adf),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x22df39=this['context']['config'];_0x22df39['define']('comments.maxCommentsWhenCollapsed',0x2),_0x22df39['define']('comments.maxThreadTotalWeight',0x1f4),_0x22df39['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x22df39['define']('comments.CommentThreadView',vt),_0x22df39['define']('comments.CommentView',gt),_0x22df39['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x290a00=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x8ed936,_0x6fd69b)=>this['_addCommentThread'](_0x6fd69b)),this['on']('submitCommentThread',(_0x67b882,_0xaf55a2)=>this['_submitCommentThread'](_0xaf55a2)),this['on']('resolveCommentThread',(_0x27549d,_0x2d4e0c)=>this['_resolveCommentThread'](_0x2d4e0c)),this['on']('resolveCommentThread',(_0x91afa5,_0x1f5b72)=>this['_updateActiveAnnotation'](_0x1f5b72),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x55e57c,_0x10bf56)=>this['_reopenCommentThread'](_0x10bf56)),this['on']('reopenCommentThread',(_0x365dba,_0x1785a4)=>this['_updateActiveAnnotation'](_0x1785a4),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x572b1d,_0x426a54)=>this['_removeCommentThread'](_0x426a54)),this['on']('updateCommentThread',(_0x2082d0,_0x482cef)=>this['_updateCommentThread'](_0x482cef)),this['on']('updateCommentThread',(_0x3397b6,_0x3221ba)=>this['_updateActiveAnnotation'](_0x3221ba),{'priority':'lowest'}),this['on']('addComment',(_0x42ae27,_0x112c68)=>this['_addComment'](_0x112c68)),this['on']('updateComment',(_0x37f67b,_0x271e13)=>this['_updateComment'](_0x271e13)),this['on']('removeComment',(_0x372d64,_0x1dea3b)=>this['_removeComment'](_0x1dea3b)),this['on']('addComment',(_0x1fbd21,{threadId:_0x33e441,isFromAdapter:_0x3e15f0})=>{if(_0x3e15f0)return;const _0x199df2=this['getCommentThread'](_0x33e441),_0x598e9f=_0x199df2&&this['_threadToController']['get'](_0x199df2);_0x598e9f&&_0x598e9f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x290a00,'change:activeAnnotations',(_0x2b6639,_0x5ad781,_0x2c786c)=>{const _0x4965d9=Array['from'](_0x2c786c)['map'](_0x36400c=>this['_viewToController']['get'](_0x36400c['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4965d9?_0x4965d9['model']:null;});}set['adapter'](_0x56839c){if(this['_adapter'])throw new _0x441c59('commentsrepository-adapter-already-set');this['_adapter']=_0x56839c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4a8b49=Tt,threadId:_0x2ca499=_0x50d72b(),comments:_0x17888c=[],unlinkedAt:_0x22fc29=null,resolvedAt:_0x1c0963=null,resolvedBy:_0x5d887b=null,target:_0xb34402=null,context:_0x595af5=null,attributes:_0x546228={},isResolvable:_0x45aa49=!0x0,isSubmitted:_0x53a2bf=!0x1,isFromAdapter:_0xf834b8=!0x1}={}){return this['fire'](bt('addCommentThread',_0x4a8b49),{'channelId':_0x4a8b49,'threadId':_0x2ca499,'comments':_0x17888c,'unlinkedAt':_0x22fc29,'resolvedAt':_0x1c0963,'resolvedBy':_0x5d887b,'target':_0xb34402,'context':_0x595af5,'attributes':_0x546228,'isFromAdapter':_0xf834b8,'isResolvable':_0x45aa49,'isSubmitted':_0x53a2bf}),this['getCommentThread'](_0x2ca499);}['openNewCommentThread']({channelId:_0x54183a=Tt,threadId:_0x2751e4=_0x50d72b(),target:_0x165b7f,context:_0x172112=null,isResolvable:_0x373a7f=!0x0}){if(this['_readOnlyChannels']['has'](_0x54183a)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x165b7f)throw new _0x441c59('commentsrepository-missing-target');const _0x3c47b3=this['addCommentThread']({'channelId':_0x54183a,'threadId':_0x2751e4,'target':_0x165b7f,'context':_0x172112,'isResolvable':_0x373a7f});if(!_0x3c47b3)return null;const _0x51b0e6=this['_threadToController']['get'](_0x3c47b3),_0x289ab2=_0x51b0e6['view']['commentThreadInputView']['commentInputView'],_0x26fa32=this['context']['plugins']['get'](y),_0x112e12=_0x26fa32['getByInnerView'](_0x51b0e6['view']);return _0x26fa32['activate'](_0x112e12),_0x289ab2['once']('editorReady',()=>_0x289ab2['focus']()),_0x3c47b3;}['hasCommentThread'](_0x23f210){if('string'!=typeof _0x23f210)throw new _0x441c59('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x23f210);}['updateCommentThread']({channelId:_0x451463=Tt,threadId:_0x1ded53,context:_0x2b404b,unlinkedAt:_0x45d4a8,attributes:_0x4003c7,isFromAdapter:_0x2a9963=!0x1}){return this['fire'](bt('updateCommentThread',_0x451463),{'channelId':_0x451463,'threadId':_0x1ded53,'context':_0x2b404b,'unlinkedAt':_0x45d4a8,'attributes':_0x4003c7,'isFromAdapter':_0x2a9963}),this['getCommentThread'](_0x1ded53);}['getCommentThread'](_0x4072f7){if('string'!=typeof _0x4072f7)throw new _0x441c59('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4072f7);}['fetchCommentThread']({channelId:_0x3c2e73,threadId:_0x44d3b8}={}){const _0x59ce1b=this['getCommentThread'](_0x44d3b8);if(_0x59ce1b)return Promise['resolve'](_0x59ce1b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x441c59('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3c2e73,'threadId':_0x44d3b8})['then'](_0x2c0303=>this['hasCommentThread'](_0x44d3b8)?this['getCommentThread'](_0x44d3b8):_0x2c0303?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3c2e73},_0x2c0303)):void 0x0)['catch'](_0x2672b3=>{throw console['error'](_0x2672b3),new _0x441c59('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x422d9d,skipNotAttached:_0xa90116=!0x1,skipEmpty:_0x240346=!0x1,toJSON:_0x4b9678=!0x1}={}){const _0x53604a=[];for(const _0x4b6cc of this['_threads']['values']())_0x422d9d&&_0x4b6cc['channelId']!==_0x422d9d||_0xa90116&&!_0x4b6cc['isAttached']||_0x240346&&0x0===_0x4b6cc['length']||_0x53604a['push'](_0x4b6cc);return _0x4b9678?_0x53604a['map'](_0x3b4ec9=>_0x3b4ec9['toJSON']()):_0x53604a;}['getAnnotationForCommentThread'](_0x4bb7cf){const _0x2e879d=this['_threadToController']['get'](_0x4bb7cf);if(!_0x2e879d)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2e879d['view'])||null;}['getCommentThreadForAnnotation'](_0x563480){const _0xa9ec68=this['_viewToController']['get'](_0x563480['innerView']);return _0xa9ec68?_0xa9ec68['model']:null;}['setActiveCommentThread'](_0x203812){const _0xf3f74=this['context']['plugins']['get'](y);if(!_0x203812)return void(this['activeCommentThread']&&_0xf3f74['deactivateAll']());const _0x30d002=this['getCommentThread'](_0x203812);if(!_0x30d002)throw new _0x441c59('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x203812});if(!this['_threadToController']['has'](_0x30d002))throw new _0x441c59('commentsrepository-active-not-attached',null,{'threadId':_0x203812});const _0x3d98a0=_0xf3f74['getByInnerView'](this['_threadToController']['get'](_0x30d002)['view']);_0xf3f74['activate'](_0x3d98a0);}['switchReadOnly'](_0x5f02ff,_0x2b22c3){_0x5f02ff?this['_readOnlyChannels']['add'](_0x2b22c3):this['_readOnlyChannels']['delete'](_0x2b22c3),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x172d21){return this['_readOnlyChannels']['has'](_0x172d21)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1b6582,_0x406e43){return new yt(_0x1b6582,_0x406e43);}['setPermissions'](_0x2e9d4d,_0x3f0ea9=Tt){this['_permissions']['set'](_0x3f0ea9,_0x2e9d4d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x388ad2=Tt){return this['_permissions']['has'](_0x388ad2)?this['_permissions']['get'](_0x388ad2):_t;}['_addCommentThread']({channelId:_0x6f7c33,threadId:_0x595735,comments:_0x2cb62e,unlinkedAt:_0x426f95,resolvedAt:_0x7b9903,resolvedBy:_0x544305,target:_0x3070ab,context:_0x4f8b2b,attributes:_0x48439c,isFromAdapter:_0x17fcd2,isResolvable:_0x226854,isSubmitted:_0x45d389}){if('string'!=typeof _0x595735)throw new _0x441c59('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x595735});if(this['hasCommentThread'](_0x595735))throw new _0x441c59('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x595735});const _0x6fe06d=new pi(this,{'channelId':_0x6f7c33,'id':_0x595735,'context':_0x4f8b2b,'attributes':_0x48439c,'unlinkedAt':_0x426f95,'resolvedAt':_0x7b9903,'resolvedBy':_0x544305?this['context']['plugins']['get'](it)['getUser'](_0x544305):null,'isResolvable':_0x226854,'isSubmitted':_0x45d389||_0x17fcd2});this['_threads']['set'](_0x595735,_0x6fe06d);for(const _0x2af7f4 of _0x2cb62e)_0x6fe06d['_add'](this['_createNewComment']({'threadId':_0x595735,..._0x2af7f4}));return _0x3070ab&&_0x6fe06d['attachTo'](_0x3070ab),_0x17fcd2||!_0x6fe06d['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x6f7c33,'threadId':_0x595735});}['_submitCommentThread']({channelId:_0x4d0efe,threadId:_0x573eae}){if(!this['hasCommentThread'](_0x573eae))throw new _0x441c59('commentsrepository-missing-comment-thread',this);const _0x53d790=this['getCommentThread'](_0x573eae);if(_0x53d790['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x754dfb,comments:_0x559feb,resolvedAt:_0x2a53ca,resolvedBy:_0x33da31,context:_0x13edb0,attributes:_0x5b5ff8}=_0x53d790,_0x46f3ea=this['context']['plugins']['get']('PendingActions'),_0x7db77=_0x46f3ea['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4d0efe,'threadId':_0x754dfb,'comments':_0x559feb['map'](_0x10117f=>_0x10117f['toJSON']()),'resolvedAt':_0x2a53ca,'resolvedBy':_0x33da31?_0x33da31['id']:_0x33da31,'context':_0x13edb0,'attributes':_0x5b5ff8})['then'](({comments:_0x469d85})=>{_0x46f3ea['remove'](_0x7db77);for(const _0xbc17d of _0x469d85)this['_updateComment']({'channelId':_0x4d0efe,'threadId':_0x573eae,'commentId':_0xbc17d['commentId'],'createdAt':_0xbc17d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1860fe=>{throw console['error'](_0x1860fe),new _0x441c59('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x1b3627,target:_0xf24a6f}){const _0x31ecc2=this['getCommentThread'](_0x1b3627);if(!_0x31ecc2)throw new _0x441c59('commentsrepository-attach-missing-comment-thread',this);const _0x514e85=this['context']['plugins']['get']('PendingActions'),_0x59ed42=this['context']['plugins']['get'](y),_0xf8ee8a=this['_createCommentThreadView'](_0x31ecc2),_0x370167=new yt(_0x31ecc2,_0xf8ee8a);let _0x22c099=null;_0xf8ee8a['on']('change:isDirty',(_0x1299f4,_0x13fa2f,_0x2c972d)=>{_0x2c972d?_0x22c099=_0x514e85['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x22c099&&(_0x514e85['remove'](_0x22c099),_0x22c099=null);}),this['_threadToController']['set'](_0x31ecc2,_0x370167),this['_viewToController']['set'](_0xf8ee8a,_0x370167);const _0x20b542=new E(this['context']['locale'],_0xf8ee8a);_0x20b542['bind']('length')['to'](_0xf8ee8a),_0x20b542['bind']('isDirty')['to'](_0xf8ee8a,'isDirty',_0xf8ee8a,'length',(_0x19ad8a,_0x1c9a1a)=>_0x19ad8a||!_0x1c9a1a),_0x20b542['bind']('isActive')['to'](_0xf8ee8a),_0x20b542['type']='comment';const _0x3d208f=new T({'view':_0x20b542,'target':_0xf24a6f,'type':'comment','isVisible':!_0x31ecc2['archivedAt']});return _0xf8ee8a['on']('escape',()=>{_0x3d208f['fire']('escape');}),this['_bindAnnotationToEditors'](_0xf8ee8a,_0x3d208f),_0x59ed42['add'](_0x3d208f),_0x3d208f;}['_bindAnnotationToEditors'](_0x3c8a14,_0x487d2e){this['listenTo'](_0x3c8a14,'editorReady',(_0x210289,_0x5b7e50)=>{const _0x32550e=_0x5b7e50['ui']['view']['body']['bodyCollectionContainer'];_0x487d2e['focusableElements']['add'](_0x32550e),this['context']instanceof _0x53a597&&this['context']['ui']['focusTracker']['add'](_0x32550e);},{'priority':'highest'}),this['listenTo'](_0x3c8a14,'editorDestroyed',(_0x516dfb,_0x4d6fd1)=>{const _0xdc9f20=_0x4d6fd1['ui']['view']['body']['bodyCollectionContainer'];_0x487d2e['focusableElements']['has'](_0xdc9f20)&&_0x487d2e['focusableElements']['remove'](_0xdc9f20),this['context']instanceof _0x53a597&&this['context']['ui']['focusTracker']['remove'](_0xdc9f20);});}['_unbindEditors'](_0x3e711c){this['stopListening'](_0x3e711c,'editorReady'),this['stopListening'](_0x3e711c,'editorDestroyed');}['_createCommentThreadView'](_0x3b8103){const _0xfda31a=this['context']['plugins']['get'](it),{config:_0x311821,locale:_0x4b63c3}=this['context'],_0xccbb20=lt(_0x311821['get']('locale'),_0x4b63c3);return new(0x0,(_0x311821['get']('comments'))['CommentThreadView'])(_0x4b63c3,_0x3b8103,_0xfda31a['me'],{'editorConfig':{..._0x311821['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x311821['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x311821['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x311821['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x311821['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xccbb20,'CommentView':_0x311821['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x272e72,channelId:_0x4ae172,resolvedAt:_0x5bfc44,resolvedBy:_0x342083,isFromAdapter:_0x445cfe}){if(!this['hasCommentThread'](_0x272e72))throw new _0x441c59('commentsrepository-missing-comment-thread',null,{'threadId':_0x272e72});const _0x5bcb60=this['getCommentThread'](_0x272e72);if(_0x5bcb60['isResolved'])throw new _0x441c59('commentsrepository-resolved-comment-thread',null,{'threadId':_0x272e72});const _0x11b202=this['context']['plugins']['get'](it);if(_0x5bcb60['resolvedBy']=_0x11b202['getUser'](_0x342083),_0x5bcb60['resolvedAt']=_0x5bfc44,_0x445cfe||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5ea621=this['context']['plugins']['get']('PendingActions'),_0x24ac73=_0x5ea621['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4ae172,'threadId':_0x272e72})['then'](({resolvedAt:_0x530031,resolvedBy:_0x3a6196})=>{_0x5ea621['remove'](_0x24ac73),_0x5bcb60['resolvedBy']['id']!==_0x3a6196&&(_0x5bcb60['resolvedBy']=_0x11b202['getUser'](_0x3a6196)),_0x5bcb60['resolvedAt']=_0x530031;})['catch'](_0xf97da9=>{throw console['error'](_0xf97da9),new _0x441c59('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4d8982,channelId:_0x5b66fc,isFromAdapter:_0x54b0ff}){if(!this['hasCommentThread'](_0x4d8982))throw new _0x441c59('commentsrepository-missing-comment-thread',null,{'threadId':_0x4d8982});const _0x1a726c=this['getCommentThread'](_0x4d8982);if(!_0x1a726c['isResolved'])throw new _0x441c59('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4d8982});if(_0x1a726c['resolvedBy']=null,_0x1a726c['resolvedAt']=null,_0x54b0ff||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3d0f9e=this['context']['plugins']['get']('PendingActions'),_0x5a61a9=_0x3d0f9e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5b66fc,'threadId':_0x4d8982})['then'](()=>_0x3d0f9e['remove'](_0x5a61a9))['catch'](_0x287fd2=>{throw console['error'](_0x287fd2),new _0x441c59('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x96aa2e,isFromAdapter:_0x5938f3}){const _0x271169=this['getCommentThread'](_0x96aa2e);if(!_0x271169)throw new _0x441c59('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x96aa2e),this['_threads']['delete'](_0x96aa2e),!_0x271169['isSubmitted']||_0x5938f3||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4bc311=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd89f04}=_0x271169,_0x3d032c=_0x4bc311['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xd89f04,'threadId':_0x96aa2e})['then'](()=>_0x4bc311['remove'](_0x3d032c))['catch'](_0x20ca5f=>{throw console['error'](_0x20ca5f),new _0x441c59('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3cb742,unlinkedAt:_0x4a994d,context:_0xf4319c,attributes:_0x4c2b1e,isFromAdapter:_0x411686}){if('string'!=typeof _0x3cb742)throw new _0x441c59('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3cb742});if(!this['hasCommentThread'](_0x3cb742))throw new _0x441c59('commentsrepository-missing-comment-thread',null,{'threadId':_0x3cb742});const _0x3d9b88=this['getCommentThread'](_0x3cb742);let _0x47779b=!0x1;if(void 0x0!==_0xf4319c&&_0x3d9b88['context']!==_0xf4319c&&(_0x3d9b88['context']=_0xf4319c,_0x47779b=!0x0),void 0x0!==_0x4a994d&&_0x3d9b88['unlinkedAt']!==_0x4a994d&&(_0x3d9b88['unlinkedAt']=_0x4a994d,_0x47779b=!0x0),_0x4c2b1e&&!wt(_0x4c2b1e,_0x3d9b88['attributes'])&&(_0x3d9b88['attributes']=_0x4c2b1e,_0x47779b=!0x0),!_0x47779b)return Promise['resolve']();if(!_0x3d9b88['isSubmitted']||_0x411686||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1ac822=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4a6fce}=_0x3d9b88,_0x59b439=_0x1ac822['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4a6fce,'threadId':_0x3cb742,'context':_0xf4319c,'unlinkedAt':_0x4a994d,'attributes':_0x4c2b1e})['then'](()=>_0x1ac822['remove'](_0x59b439))['catch'](_0x4c122b=>{throw console['error'](_0x4c122b),new _0x441c59('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2fb0ae){const _0x2229c0=this['context']['plugins']['get'](y),_0x548f6b=this['getCommentThread'](_0x2fb0ae);if(_0x548f6b['_isAttached']=!0x1,this['_threadToController']['has'](_0x548f6b)){const _0x2ad009=this['_threadToController']['get'](_0x548f6b),_0x29f2e6=_0x2ad009['view'],_0xbb03c=_0x2229c0['getByInnerView'](_0x29f2e6);this['_threadToController']['delete'](_0x548f6b),this['_viewToController']['delete'](_0x29f2e6),_0xbb03c&&_0x2229c0['remove'](_0xbb03c),_0x2ad009['destroy'](),_0x29f2e6['destroy']()['then'](()=>{this['_unbindEditors'](_0x29f2e6);});}}['_updateActiveAnnotation']({threadId:_0xf0b2e8,resolvedAt:_0x4f9d60,unlinkedAt:_0x473ae5}){const _0x57b596=!!_0x4f9d60,_0x53abe6=this['context']['plugins']['get'](y),_0x43af81=this['getCommentThread'](_0xf0b2e8);if(this['_threadToController']['has'](_0x43af81)){const _0x2e8b6c=this['_threadToController']['get'](_0x43af81)['view'],_0x437ad8=_0x53abe6['getByInnerView'](_0x2e8b6c);_0x437ad8&&(_0x57b596&&_0x53abe6['_removeActiveAnnotation'](_0x437ad8),_0x473ae5?_0x437ad8['isVisible']=!0x1:_0x437ad8['refreshVisibility']());}}['_getExternalAuthor'](_0x142b98){const _0x3ba10a=this['context']['plugins']['get'](it),_0x4c481f=pt('external:'+_0x142b98),_0x4c317b=_0x3ba10a['getUser'](_0x4c481f);return _0x4c317b||_0x3ba10a['addUser']({'id':_0x4c481f,'name':_0x142b98});}['_createNewComment']({threadId:_0x1a1d35,commentId:_0x3372ca=_0x50d72b(),content:_0xd4cb23,authorId:_0x4c99c2,createdAt:_0x40c5f0,attributes:_0x5d49f7}){if('string'!=typeof _0x3372ca)throw new _0x441c59('commentsrepository-invalid-commentid');if('string'!=typeof _0x4c99c2)throw new _0x441c59('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xd4cb23||!_0xd4cb23['trim']())throw new _0x441c59('commentsrepository-invalid-comment-content');const _0x726b59=this['context']['plugins']['get'](it)['getUser'](_0x4c99c2);if(!_0x726b59)throw new _0x441c59('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4c99c2});let _0x422c14=null,_0x5d8888=_0x40c5f0;return _0x5d49f7?.['@external']&&(_0x422c14=this['_getExternalAuthor'](_0x5d49f7['@external']['authorName']),_0x5d8888=new Date(_0x5d49f7['@external']['createdAt'])),new wi(this,{'threadId':_0x1a1d35,'id':_0x3372ca,'author':_0x422c14||_0x726b59,'creator':_0x726b59,'content':_0xd4cb23,'createdAt':_0x40c5f0,'authoredAt':_0x5d8888,'attributes':_0x5d49f7});}['_addComment'](_0x3ef254){let {threadId:_0x45d88a,content:_0x133fa6,attributes:_0x34eac8,isFromAdapter:_0x196d78}=_0x3ef254;const _0x256fc1=this['getCommentThread'](_0x3ef254['threadId']);if(!_0x256fc1)throw new _0x441c59('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4a8c75=this['_createNewComment'](_0x3ef254),{id:_0x518c06}=_0x4a8c75;if(_0x256fc1['_add'](_0x4a8c75),_0x196d78||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x256fc1['isSubmitted'])return Promise['resolve']();const _0x53a5d4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3b0a6c}=_0x256fc1,_0x26b630=_0x53a5d4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x34eac8||(_0x34eac8={}),this['adapter']['addComment']({'channelId':_0x3b0a6c,'threadId':_0x45d88a,'commentId':_0x518c06,'content':_0x133fa6,'attributes':_0x34eac8})['then'](_0x424abd=>{_0x53a5d4['remove'](_0x26b630),_0x424abd&&this['_updateComment']({'channelId':_0x3b0a6c,'threadId':_0x45d88a,'commentId':_0x518c06,'createdAt':_0x424abd['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x55c089=>{throw console['error'](_0x55c089),new _0x441c59('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5e55c2,commentId:_0xe96607,content:_0x4494ea,createdAt:_0x27fc9b,attributes:_0x1ba72e,isFromAdapter:_0x2542db}){if(void 0x0!==_0x4494ea&&('string'!=typeof _0x4494ea||!_0x4494ea['trim']()['length']))throw new _0x441c59('commentsrepository-update-comment-invalid-content');const _0xae4584=this['getCommentThread'](_0x5e55c2),_0x571143=_0xae4584['getComment'](_0xe96607);if(!_0x571143)throw new _0x441c59('commentsrepository-update-missing-comment',this);let _0x4faa57=!0x1;if(_0x4494ea&&_0x4494ea!==_0x571143['content']&&(_0x571143['isEditable']||_0x2542db)&&(_0x571143['content']=_0x4494ea,_0x4faa57=!0x0),_0x27fc9b&&_0x27fc9b!==_0x571143['createdAt']&&(_0x571143['createdAt']=_0x27fc9b,_0x571143['attributes']&&_0x571143['attributes']['@external']||(_0x571143['authoredAt']=_0x27fc9b),_0x4faa57=!0x0),_0x1ba72e&&!wt(_0x1ba72e,_0x571143['attributes'])&&(_0x571143['attributes']=_0x1ba72e,_0x4faa57=!0x0),!_0x4faa57)return Promise['resolve']();if(_0xae4584['fire']('commentUpdated'),_0x2542db||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x455542=this['context']['plugins']['get']('PendingActions'),{channelId:_0x58a764}=this['getCommentThread'](_0x571143['threadId']),_0x446bf8=_0x455542['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x58a764,'threadId':_0x5e55c2,'commentId':_0xe96607,'content':_0x4494ea,'attributes':_0x1ba72e})['then'](()=>_0x455542['remove'](_0x446bf8))['catch'](_0x53f9cb=>{throw console['error'](_0x53f9cb),new _0x441c59('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x189b0d,commentId:_0x1b2373,isFromAdapter:_0x4752a5}){const _0x3e48a9=this['getCommentThread'](_0x189b0d),_0x458052=_0x3e48a9['getComment'](_0x1b2373);if(!_0x458052)throw new _0x441c59('commentsrepository-remove-missing-comment',this);if(_0x3e48a9['_remove'](_0x458052),_0x4752a5||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xf8ffe=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e2cec}=_0x3e48a9,_0x548168=_0xf8ffe['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1e2cec,'threadId':_0x189b0d,'commentId':_0x1b2373})['then'](()=>_0xf8ffe['remove'](_0x548168))['catch'](_0x1e9eb6=>{throw console['error'](_0x1e9eb6),new _0x441c59('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x52a59c(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4b19be,_0xe26030){super();const _0x384f83=_0xe26030['isResolvable'];this['channelId']=_0xe26030['channelId'],this['id']=_0xe26030['id'],this['comments']=new _0x364175(),this['_repository']=_0x4b19be,this['_isAttached']=!0x1,this['_isSubmitted']=_0xe26030['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4b19be,'_permissions',_0x4b19be,'_readOnlyChannels',()=>_0x4b19be['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4b19be,'_permissions',()=>_0x4b19be['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4b19be,'_permissions',()=>{const _0x487a98=_0x4b19be['getPermissions'](this['channelId']);return _0x487a98['write']||_0x487a98['admin'];}),this['bind']('isResolvable')['to'](_0x4b19be,'_permissions',()=>_0x384f83&&_0x4b19be['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xe26030['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x58834e,_0x346e7a)=>_0x58834e?_0x346e7a?_0x58834e<_0x346e7a?_0x58834e:_0x346e7a:_0x58834e:_0x346e7a),this['set']('unlinkedAt',_0xe26030['unlinkedAt']||null),this['set']('resolvedAt',_0xe26030['resolvedAt']||null),this['set']('resolvedBy',_0xe26030['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xba114a=>!!_0xba114a),this['set']('attributes',_0xe26030['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x9f231b,_0xb1feba)=>_0x9f231b+_0xb1feba['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x439dfa,id:_0x446f63}=this;this['_repository']['fire'](bt('submitCommentThread',_0x439dfa),{'channelId':_0x439dfa,'threadId':_0x446f63});}['setUnlinkedAt'](_0x56d472){this['_update']({'unlinkedAt':_0x56d472});}['resolve']({resolvedAt:_0x5d7d10=new Date(),resolvedBy:_0x4a6889=null,isFromAdapter:_0x24b2f9=!0x1}={}){const _0x5d3cc6=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x18ad8e,id:_0x22e493}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x18ad8e),{'channelId':_0x18ad8e,'threadId':_0x22e493,'resolvedAt':_0x5d7d10,'resolvedBy':_0x4a6889||_0x5d3cc6['id'],'isFromAdapter':_0x24b2f9});}['reopen']({isFromAdapter:_0x33ebd9=!0x1}={}){const {channelId:_0x277015,id:_0x2a1818}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x277015),{'channelId':_0x277015,'threadId':_0x2a1818,'isFromAdapter':_0x33ebd9});}['setContext'](_0x59e608){this['context']||this['_update']({'context':_0x59e608});}['setAttribute'](_0x58f303,_0x7568d6){const _0x3a12a0=It(this['attributes']);At(_0x3a12a0,_0x58f303,_0x7568d6),this['_update']({'attributes':_0x3a12a0});}['removeAttribute'](_0x5412cf){const _0x3db2a7=It(this['attributes']);Ct(_0x3db2a7,_0x5412cf),this['_update']({'attributes':_0x3db2a7});}['remove']({isFromAdapter:_0x81f983=!0x1}={}){const {channelId:_0x5e83cc,id:_0x3cf6f3}=this;this['_repository']['fire'](bt('removeCommentThread',_0x5e83cc),{'channelId':_0x5e83cc,'threadId':_0x3cf6f3,'isFromAdapter':_0x81f983});}['attachTo'](_0x21d4aa){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x21d4aa});}['addComment'](_0x2d3e8e){const {channelId:_0x57966b,id:_0x32f17b}=this;this['_repository']['fire'](bt('addComment',_0x57966b,_0x32f17b),Object['assign']({'channelId':_0x57966b,'threadId':_0x32f17b},_0x2d3e8e));}['getComment'](_0x16ec49){if('string'!=typeof _0x16ec49)throw new _0x441c59('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x16ec49});return this['comments']['get'](_0x16ec49);}['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'](_0x1388f3=>_0x1388f3['toJSON']()),'attributes':this['attributes']};}['_add'](_0x29041b){return this['listenTo'](_0x29041b,'change:authoredAt',()=>{const _0x2f819e=this['_findOptimalIndex'](_0x29041b),_0x22bfe3=this['comments'];_0x2f819e-0x1!=_0x22bfe3['getIndex'](_0x29041b)&&_0x2f819e+0x1!=_0x22bfe3['getIndex'](_0x29041b)&&(this['_remove'](_0x29041b),this['_add'](_0x29041b));}),this['comments']['add'](_0x29041b,this['_findOptimalIndex'](_0x29041b));}['_update'](_0xd8a39f){const {channelId:_0x1690c0,id:_0x34ae60}=this;this['_repository']['fire'](bt('updateCommentThread',_0x1690c0),{..._0xd8a39f,'channelId':_0x1690c0,'threadId':_0x34ae60});}['_remove'](_0x5912d1){return this['stopListening'](_0x5912d1),_0x5912d1['destroy'](),this['comments']['remove'](_0x5912d1);}['_findOptimalIndex'](_0x39daa6){const _0x3ee8aa=this['comments']['find'](_0x54c0c2=>new Date(_0x54c0c2['authoredAt'])['getTime']()>new Date(_0x39daa6['authoredAt'])['getTime']());return _0x3ee8aa?this['comments']['getIndex'](_0x3ee8aa):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x52a59c(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5d8b6a,_0x238612){super();const _0x2c6e48=_0x5d8b6a['context']['plugins']['get'](it)['me'],_0x300c1c=_0x5d8b6a['getCommentThread'](_0x238612['threadId']),_0xe62f59=0x0===_0x300c1c['comments']['length'],_0x1ba783=_0x2c6e48===_0x238612['author'];this['id']=_0x238612['id'],this['threadId']=_0x238612['threadId'],this['author']=_0x238612['author'],this['creator']=_0x238612['creator'],this['isExternal']=Boolean(_0x238612['attributes']&&_0x238612['attributes']['@external']),this['set']('content',_0x238612['content']),this['createdAt']=_0x238612['createdAt']||new Date(),this['set']('authoredAt',_0x238612['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x300c1c,'resolvedAt'),this['set']('attributes',_0x238612['attributes']||{}),this['bind']('isEditable')['to'](_0x5d8b6a,'_permissions',()=>{const _0x5a0349=_0x5d8b6a['getPermissions'](_0x300c1c['channelId'])['write'],_0xfab857=_0x5d8b6a['getPermissions'](_0x300c1c['channelId'])['modifyAll'];return _0x1ba783&&_0x5a0349||!_0x1ba783&&_0xfab857;}),this['bind']('isRemovable')['to'](_0x300c1c,'isRemovable',_0x5d8b6a,'_permissions',_0x2d631f=>{const _0x2ff756=_0x5d8b6a['getPermissions'](_0x300c1c['channelId'])['write'],_0x187abb=_0x5d8b6a['getPermissions'](_0x300c1c['channelId'])['modifyAll'];return _0x1ba783&&_0x2ff756||_0x2d631f&&_0xe62f59||!_0x1ba783&&_0x187abb&&!_0xe62f59;}),this['bind']('isReadOnly')['to'](_0x300c1c,'isReadOnly'),this['_repository']=_0x5d8b6a;}get['weight'](){return Math['max'](function(_0x380f3f){const _0x2fb563=document['createElement']('div');return _0x2fb563['innerHTML']=_0x380f3f,_0x2fb563['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2d80a9){const {threadId:_0x88f7af,id:_0x53837d}=this;if(!this['_repository']['hasCommentThread'](_0x88f7af))throw new _0x441c59('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5b1e36}=this['_repository']['getCommentThread'](_0x88f7af);this['_repository']['fire'](bt('updateComment',_0x5b1e36,_0x88f7af),{'channelId':_0x5b1e36,'threadId':_0x88f7af,'commentId':_0x53837d,..._0x2d80a9});}['setAttribute'](_0x1f46e9,_0x49450b){const _0x515877=It(this['attributes']);At(_0x515877,_0x1f46e9,_0x49450b),this['update']({'attributes':_0x515877});}['removeAttribute'](_0x1ed052){const _0x317906=It(this['attributes']);Ct(_0x317906,_0x1ed052),this['update']({'attributes':_0x317906});}['remove'](_0x53fd79={}){if(!_0x53fd79['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x15458a,id:_0x5cee46}=this;if(!this['_repository']['hasCommentThread'](_0x15458a))throw new _0x441c59('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x44ddcc}=this['_repository']['getCommentThread'](_0x15458a);this['_repository']['fire'](bt('removeComment',_0x44ddcc,_0x15458a),{'channelId':_0x44ddcc,'threadId':_0x15458a,'commentId':_0x5cee46,..._0x53fd79});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x302984,..._0x103969){for(const _0x16d532 of _0x103969)void 0x0!==_0x16d532&&(_0x302984+=':'+String(_0x16d532));return _0x302984;}class rt extends _0x3a648c{constructor(_0x2f7fa7){super(_0x2f7fa7),this['set']('hasContent',!0x1);}['refresh'](){const _0x28b693=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4493b0 of _0x28b693['getRanges']())if(this['_hasContent'](_0x4493b0))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x90237b=_0x50d72b(),ranges:_0x4411b3,comment:_0x2b0d11}={}){const _0x356d4d=this['editor']['model'],_0x3bd79f=_0x4411b3??Array['from'](_0x356d4d['document']['selection']['getRanges']()),_0x1938ee=[];for(const _0x3f7241 of _0x3bd79f)this['_hasContent'](_0x3f7241)&&_0x1938ee['push'](this['_trimToContent'](_0x3f7241));if(!_0x1938ee['length'])throw new _0x441c59('addcommentthreadcommand-incorrect-ranges',null);_0x2b0d11&&this['_createCommentThread'](_0x90237b,_0x2b0d11),this['_createMarkersFromRanges'](_0x90237b,_0x1938ee,!!_0x2b0d11);}['_createMarkersFromRanges'](_0x83bee3,_0x193736,_0x5c7dbe){this['editor']['model']['change'](_0x3ae3be=>{for(const _0x2348d5 of _0x193736){const _0x3eba22=_0x50d72b()['substr'](0x1,0x5),_0x1c37af='comment:'+_0x83bee3+':'+_0x3eba22;_0x3ae3be['addMarker'](_0x1c37af,{'range':_0x2348d5,'usingOperation':_0x5c7dbe,'affectsData':_0x5c7dbe});}});}['_createCommentThread'](_0x55f576,_0x2aba78){const _0x392b1c=this['editor']['plugins']['get']('CommentsRepository'),_0x4065bf=this['editor']['config']['get']('collaboration.channelId'),_0x54da41=this['editor']['plugins']['get']('Users')['me'];if(!_0x54da41)throw new _0x441c59('addcommentthreadcommand-user-not-found',null);_0x392b1c['addCommentThread']({'threadId':_0x55f576,'channelId':_0x4065bf,'comments':[{'authorId':_0x54da41['id'],'content':_0x2aba78,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1928cc){for(const _0x547e43 of _0x1928cc['getItems']())if(this['_itemIsContent'](_0x547e43))return!0x0;return!0x1;}['_itemIsContent'](_0x33df63){return _0x33df63['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x33df63)&&!_0x33df63['is']('element','tableCell');}['_trimToContent'](_0x32265a){const _0x13dba7=_0x5670af=>!this['_itemIsContent'](_0x5670af['item']),_0x33e552=_0x32265a['start']['getLastMatchingPosition'](_0x13dba7),_0x2b834c=_0x32265a['end']['getLastMatchingPosition'](_0x13dba7,{'direction':'backward'});return this['editor']['model']['createRange'](_0x33e552,_0x2b834c);}}class b extends _0x3a30de{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xaffd30){super(_0xaffd30),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x30d0f9=this['editor'],_0x25a3b5=_0x30d0f9['model']['document']['selection'],_0x257143=_0x5510df(()=>this['refreshSelectedViews'](),0xa);_0x25a3b5['on']('change:range',(_0x87996b,_0xc129)=>{_0xc129['directChange']&&(_0x257143['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x30d0f9['editing']['view']['document'],'change:isFocused',(_0x51acdb,_0x23f994,_0x577154)=>{_0x577154&&_0x257143();}),this['listenTo'](_0x30d0f9['ui']['focusTracker'],'change:isFocused',(_0x2eb4c4,_0x2bb9b7,_0x2f6857)=>{_0x2f6857||_0x30d0f9['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x18d07a=>this['_editorAnnotationsData']['has'](_0x18d07a['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x414389){if(this['_editorAnnotations']['has'](_0x414389['view']))return;this['_editorAnnotations']['add'](_0x414389['view']),this['editor']['ui']['focusTracker']['add'](_0x414389['view']['element']);const _0x370790=this['editor']['plugins']['get'](y);this['listenTo'](_0x370790['collection'],'remove',(_0x260ffa,_0x2e5291)=>{this['editor']['ui']['focusTracker']['remove'](_0x2e5291['view']['element']),this['_editorAnnotations']['delete'](_0x2e5291['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x32d4d9){if('function'!=typeof _0x32d4d9)throw new _0x441c59('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x32d4d9);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2db2c6,annotations:_0xd5abc}){const _0x34da3e=[],_0x157da5=this['editor']['model']['document']['selection'],_0xbc4ac6=Array['from'](_0x157da5['getRanges']());for(const [_0x335d95,_0x4bf5f7]of this['_editorAnnotationsData']){const _0x3b291a=_0x520534(_0x4bf5f7),_0x549e8c=_0xd5abc['getByInnerView'](_0x335d95);_0x3b291a&&_0x549e8c&&_0x34da3e['push']({'annotation':_0x549e8c,'range':_0x3b291a});}function _0x520534(_0x238926){for(const _0x571e9f of _0x238926)for(const _0x482976 of _0xbc4ac6)if(_0x571e9f['containsRange'](_0x482976,!_0x157da5['isCollapsed']))return _0x571e9f;return null;}return _0x34da3e['sort']((_0x5245f3,_0x18b60c)=>{const _0x24484c=_0x5245f3['range'],_0x17765c=_0x18b60c['range'];if(!_0x24484c['isEqual'](_0x17765c)){if(_0x24484c['containsRange'](_0x17765c,!0x0))return 0x1;if(_0x17765c['containsRange'](_0x24484c,!0x0))return-0x1;}return _0x5245f3['annotation']==_0x2db2c6?-0x1:_0x18b60c['annotation']==_0x2db2c6?0x1:0x0;})['map'](_0x3d0e57=>_0x3d0e57['annotation']);}get['_editorAnnotationsData'](){const _0x47b41c=new Map();for(const _0x415d3c of Array['from'](this['_dataCollectors']))for(const [_0x156214,_0x103bf5]of _0x415d3c())_0x47b41c['set'](_0x156214,_0x103bf5);return _0x47b41c;}}class st extends _0x3a30de{['afterInit'](){const _0x40f904=this['editor'];if(!_0x40f904['plugins']['has']('RestrictedEditingModeEditing'))return;_0x40f904['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3a30de{constructor(_0x200d26){super(_0x200d26),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xe9ca2a=this['editor'],_0x5df6aa=_0xe9ca2a['commands']['get']('importWord'),_0xd6881e=_0xe9ca2a['plugins']['get'](it);_0x5df6aa&&(_0x5df6aa['on']('execute',(_0x1641e8,[,_0x14ff74])=>{_0x14ff74['collaboration_features']={'comments':!0x0,'user_id':_0xd6881e['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5df6aa,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x131bb3,_0x327d58){const {comment_threads:_0x3d353e}=_0x327d58;_0x3d353e&&_0x3d353e['forEach'](({thread_id:_0xce835a,comments:_0x49e9f2,is_resolved:_0x25d327})=>{const _0x37a741=new Date(),_0x2f1655=_0x49e9f2['map'](({author:_0x417da7,content:_0x257dfa,created_at:_0x2f7ee1})=>({'content':_0x257dfa,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x37a741,'attributes':{'@external':{'authorName':_0x417da7,'createdAt':_0x2f7ee1?new Date(_0x2f7ee1):new Date(),'source':'importWord'}}})),_0x20b91f=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x20b91f,'threadId':_0xce835a,'comments':_0x2f1655,'resolvedAt':_0x25d327?_0x37a741:null});});}}class at extends _0x3a30de{constructor(_0x47365b){super(_0x47365b),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2586df=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2586df,'contentInsertion',(_0x653ed8,_0x51a249)=>this['_removeMarkersWithoutThreads'](_0x51a249['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x439f98){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x439f98;const _0x1abadd=this['editor']['plugins']['get']('CommentsRepository');for(const _0x171a22 of _0x439f98['keys']()){const [_0x318402,_0x154592]=_0x171a22['split'](':');'comment'!=_0x318402||_0x1abadd['hasCommentThread'](_0x154592)||_0x439f98['delete'](_0x171a22);}return _0x439f98;}['_registerMarkerInClipboardPipeline'](){const _0x3fbe0d=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xc360c5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xc360c5&&_0x3fbe0d['_registerMarkerToCopy']('comment',_0xc360c5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4091eb){switch(_0x4091eb){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x3a30de{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3f737a,_0x24a57f)=>{if(!_0x24a57f['options']['showCommentHighlights'])return null;if(_0x24a57f['options']['ignoreResolvedComments']){const {id:_0xa7dcc0}=er(_0x3f737a['markerName']),_0x35843d=this['editor']['plugins']['get'](o);if(_0x35843d['getCommentThread'](_0xa7dcc0)?.['isResolved']&&_0x3f737a['item'])return _0x24a57f['consumable']['consume'](_0x3f737a['item'],'addMarker:'+_0x3f737a['markerName']),_0x24a57f['consumable']['consume'](_0x3f737a['item'],'removeMarker:'+_0x3f737a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xe57e6b=>{_0xe57e6b['on']('addMarker:comment',(_0x449494,_0x331b1e,_0x1bb31a)=>{if(!_0x1bb31a['options']['showCommentHighlights'])return;const _0xfdf3d=_0x331b1e['item'];if(!_0xfdf3d)return;const _0x5c0c7b=_0x1bb31a['mapper']['toViewElement'](_0xfdf3d);this['editor']['model']['schema']['isObject'](_0xfdf3d)&&_0x5c0c7b&&!_0x5c0c7b['getCustomProperty']('widget')&&_0x5c0c7b['is']('containerElement')&&_0x2e0659(_0x5c0c7b,_0x1bb31a['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x80a854,{writer:_0x59e19c,options:_0x214b81})=>{if(!_0x214b81['showCommentHighlights'])return null;const _0x594b99=_0x59e19c['createContainerElement']('div'),_0x235e10=_0x59e19c['createEmptyElement']('hr');return _0x59e19c['addClass']('ck-horizontal-line',_0x594b99),_0x59e19c['insert'](_0x59e19c['createPositionAt'](_0x594b99,0x0),_0x235e10),_0x594b99;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4f6f7e,{writer:_0x2cbc4f,options:_0x3f4748})=>{if(!_0x3f4748['showCommentHighlights'])return null;const _0x401c40=_0x2cbc4f['createContainerElement']('span'),_0x1f00b3=_0x2cbc4f['createEmptyElement']('img');return _0x2cbc4f['addClass']('image-inline',_0x401c40),_0x2cbc4f['insert'](_0x2cbc4f['createPositionAt'](_0x401c40,0x0),_0x1f00b3),_0x401c40;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x424e2,{writer:_0x3dc634,options:_0x39eff0})=>{if(_0x39eff0['showCommentHighlights'])return _0x3dc634['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x131faf,_0x109988,_0x18cf1f)=>{_0x18cf1f['options']['showCommentHighlights']&&_0x131faf['stop']();},{'priority':'high'});}}class r extends _0x3a30de{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(_0x545931){super(_0x545931),this['set']('isThreadsLoadingPaused',!0x0),_0x545931['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x493ae7,_0x1e542a,_0xcfdd0f,_0x3ae055)=>{const _0x2c40fe=_0x545931['plugins']['get'](o),_0x421e8d=_0xcfdd0f?er(_0xcfdd0f)['id']:null;_0x545931['model']['change'](()=>{if(_0x421e8d){const _0x538249=this['getAllMarkersForId'](_0x421e8d);for(const _0x18bd85 of _0x538249)_0x545931['editing']['reconvertMarker'](_0x18bd85);}if(_0x3ae055){const {id:_0x4c4a3c}=er(_0x3ae055),_0x16f29d=_0x2c40fe['getCommentThread'](_0x4c4a3c);if(_0x16f29d&&_0x16f29d['unlinkedAt'])return;if(_0x16f29d&&!_0x16f29d['isAttached'])return;const _0x56ffbb=this['getAllMarkersForId'](_0x4c4a3c);for(const _0x47bec2 of _0x56ffbb)_0x545931['editing']['reconvertMarker'](_0x47bec2);}}),_0x421e8d&&this['scrollToThreadMarker'](_0x421e8d);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x14271f=this['editor'],_0x42909b=_0x14271f['plugins']['get'](o),_0x59339b=_0x14271f['config']['get']('collaboration.channelId'),_0x1ff7c2=_0x42909b['getCommentThreads']()['filter'](_0x1d63bf=>_0x1d63bf['channelId']!==_0x59339b);_0x14271f['commands']['add']('addCommentThread',new rt(_0x14271f)),this['listenTo'](_0x14271f,'change:isReadOnly',(_0x5e7afa,_0x449848,_0x5d44a7)=>{_0x42909b['switchReadOnly'](_0x5d44a7,_0x14271f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x42909b,ft('addCommentThread',_0x59339b),(_0x256c89,{threadId:_0x40cf77})=>{const _0x1191ac=this['editor']['plugins']['get'](o)['getCommentThread'](_0x40cf77);_0x1191ac?.['unlinkedAt']&&this['_attachArchivedThread'](_0x40cf77);}),this['listenTo'](_0x42909b,ft('removeCommentThread',_0x59339b),(_0x1c596b,{threadId:_0x133b32})=>{_0x14271f['model']['enqueueChange']({'isUndoable':!0x1},_0x4483ec=>{const _0x1b805a=this['getAllMarkersForId'](_0x133b32);for(const _0x205059 of _0x1b805a)_0x4483ec['removeMarker'](_0x205059);});}),this['listenTo'](_0x42909b,ft('resolveCommentThread',_0x59339b),(_0x440ee7,{threadId:_0x599f34})=>{(this['_reconvertMarkers'](_0x599f34),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x599f34)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x42909b,ft('reopenCommentThread',_0x59339b),(_0x3ebe8e,{threadId:_0x1d7d64})=>{this['_reconvertMarkers'](_0x1d7d64);},{'priority':'low'}),this['listenTo'](_0x42909b,ft('addComment',_0x59339b),(_0x585517,{threadId:_0x21fe4f,isFromAdapter:_0x14a085})=>{const _0x24d2fc=this['getAllMarkersForId'](_0x21fe4f);if(_0x14a085||0x0==_0x24d2fc['length']||!_0x42909b['hasCommentThread'](_0x21fe4f))return;0x1===_0x42909b['getCommentThread'](_0x21fe4f)['length']&&_0x14271f['model']['enqueueChange']({'isUndoable':!0x1},_0x177183=>{for(const _0x12b2bc of _0x24d2fc)_0x177183['updateMarker'](_0x12b2bc,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1ff7c2);}['afterInit'](){!async function(_0x26f13b){const _0x401766=_0x5c2aa5([0x38,0x58,0x41,0x32,0x37,0x4f,0x44,0x43,0x36,0x4d,0x46,0x79,0x6a,0x68,0x72,0x45,0x66,0x53,0x56,0x48,0x75,0x65,0x42,0x4c,0x49,0x31,0x55,0x73,0x63,0x35,0x33,0x4e,0x61,0x39,0x78,0x69,0x70,0x47,0x71,0x6d,0x77,0x6b,0x57,0x7a,0x76,0x64,0x34,0x6e,0x59,0x5a,0x67,0x6c,0x30,0x54,0x6f,0x51,0x74,0x52,0x50,0x62,0x4b,0x4a]),_0x51e52f=0x7e7a3181,_0x5ecd2f=0x7e7d5de9^_0x51e52f,_0x56b22b=window[_0x5c2aa5([0x44,0x61,0x74,0x65])][_0x5c2aa5([0x6e,0x6f,0x77])](),_0x4385eb=_0x26f13b[_0x5c2aa5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x7cf2e1=new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x243c9b=>{_0x4385eb[_0x5c2aa5([0x6f,0x6e,0x63,0x65])](_0x5c2aa5([0x72,0x65,0x61,0x64,0x79]),_0x243c9b);}),_0x17450e={[_0x5c2aa5([0x6b,0x74,0x79])]:_0x5c2aa5([0x45,0x43]),[_0x5c2aa5([0x75,0x73,0x65])]:_0x5c2aa5([0x73,0x69,0x67]),[_0x5c2aa5([0x63,0x72,0x76])]:_0x5c2aa5([0x50,0x2d,0x32,0x35,0x36]),[_0x5c2aa5([0x78])]:_0x5c2aa5([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]),[_0x5c2aa5([0x79])]:_0x5c2aa5([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]),[_0x5c2aa5([0x61,0x6c,0x67])]:_0x5c2aa5([0x45,0x53,0x32,0x35,0x36])},_0x1e0db9=_0x4385eb[_0x5c2aa5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5c2aa5([0x67,0x65,0x74])](_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x16d6b2(){let _0x4ec1a3,_0x351e86=null,_0x26fa7c=null;try{if(_0x1e0db9==_0x5c2aa5([0x47,0x50,0x4c]))return _0x5c2aa5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4ec1a3=_0xdaa122(),!_0x4ec1a3)return _0x5c2aa5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4ec1a3[_0x5c2aa5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x26fa7c=_0xf66baf(_0x4ec1a3[_0x5c2aa5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4ec1a3[_0x5c2aa5([0x6a,0x74,0x69])])),await _0x52de4d()?_0x1adcc4()?_0x1b8ba9()?_0x5c2aa5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4b8c54()?(_0x4ec1a3[_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5c2aa5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x351e86=_0x5ae29c(_0x5c2aa5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4ec1a3[_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5c2aa5([0x74,0x72,0x69,0x61,0x6c])&&(_0x351e86=_0x5ae29c(_0x5c2aa5([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x57ee08()):_0x5c2aa5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5c2aa5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5c2aa5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5c2aa5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1b8ba9(){const _0x249951=[_0x5c2aa5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5c2aa5([0x74,0x72,0x69,0x61,0x6c])][_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ec1a3[_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x56b22b/0x3e8:0xe10*_0x5ecd2f;return _0x4ec1a3[_0x5c2aa5([0x65,0x78,0x70])]<_0x249951;}function _0x1adcc4(){const _0x328ddf=_0x4ec1a3[_0x5c2aa5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x328ddf)return!0x1;if(_0x328ddf[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c2aa5([0x2a])))return!0x0;if(_0x328ddf[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c2aa5([0x43,0x4d,0x54])))return!0x0;if(_0x328ddf[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c2aa5([0x52,0x43,0x4d,0x54]))){if(_0xf4b7ac())return!0x0;if(_0x2e4ed5()||_0x5ed329())return!0x0;}return!0x1;}function _0x4b8c54(){const _0x49876e=_0x4ec1a3[_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x49876e||0x0==_0x49876e[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2a3904}=new URL(window[_0x5c2aa5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x49876e[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a3904))return!0x0;const _0x30dbb6=_0x2a3904[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])](_0x5c2aa5([0x2e]));return _0x49876e[_0x5c2aa5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x21d374=>_0x21d374[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c2aa5([0x2a])))[_0x5c2aa5([0x6d,0x61,0x70])](_0x5c0e06=>_0x5c0e06[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])](_0x5c2aa5([0x2e])))[_0x5c2aa5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x15a128=>_0x15a128[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x30dbb6[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5c2aa5([0x6d,0x61,0x70])](_0x354ba3=>Array(_0x30dbb6[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x354ba3[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5c2aa5([0x66,0x69,0x6c,0x6c])](_0x354ba3[0x0]===_0x5c2aa5([0x2a])?_0x5c2aa5([0x2a]):'')[_0x5c2aa5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x354ba3))[_0x5c2aa5([0x73,0x6f,0x6d,0x65])](_0xeb5577=>_0x30dbb6[_0x5c2aa5([0x65,0x76,0x65,0x72,0x79])]((_0x3ae04f,_0x2f17bd)=>_0xeb5577[_0x2f17bd]===_0x3ae04f||_0xeb5577[_0x2f17bd]===_0x5c2aa5([0x2a])));}function _0x57ee08(){return _0x351e86&&_0x26fa7c?new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d8fc9,_0x15a50d)=>{_0x351e86[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x3d8fc9,_0x15a50d),_0x26fa7c[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x1e1824=>{_0x1e1824!=_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64])&&_0x3d8fc9(_0x1e1824);},_0x15a50d);}):_0x351e86||_0x26fa7c||_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf66baf(_0x43ae90,_0x2068f7){return new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x489e1e=>{if(_0x3a4e16())return _0x489e1e(_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64]));_0x247a3e(),_0x4385eb[_0x5c2aa5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5c2aa5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x159749=!0x1;const _0x38ca0b=_0x50d72b();function _0x18d332(_0x6d967b){return!!_0x6d967b&&(typeof _0x6d967b===_0x5c2aa5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x6d967b===_0x5c2aa5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x6d967b[_0x5c2aa5([0x74,0x68,0x65,0x6e])]===_0x5c2aa5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x6d967b[_0x5c2aa5([0x63,0x61,0x74,0x63,0x68])]===_0x5c2aa5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x387734(_0x881265){_0x5a12cc(_0x881265)[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x2253c3=>{if(!_0x2253c3||_0x2253c3[_0x5c2aa5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5c2aa5([0x6f,0x6b]))return _0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xec59e5(_0x589c82(_0x38ca0b+_0x2068f7))!=_0x2253c3[_0x5c2aa5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64]);})[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x54abdf=>(_0x4e2462(),_0x54abdf),()=>{const _0x49d4f7=_0x2f0028();return null==_0x49d4f7?(_0x4e2462(),_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64])):_0x5c2aa5(_0x56b22b-_0x49d4f7>(0x5a76b581^_0x51e52f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x489e1e)[_0x5c2aa5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x489e1e(_0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1f6fb7=0x7e4cdf01^_0x51e52f;function _0x4e2462(){const _0x289cc8=_0x5c2aa5([0x6c,0x6c,0x63,0x74,0x2d])+_0xec59e5(_0x589c82(_0x43ae90)),_0x370adf=_0x263d64(_0xec59e5(window[_0x5c2aa5([0x4d,0x61,0x74,0x68])][_0x5c2aa5([0x63,0x65,0x69,0x6c])](_0x56b22b/_0x1f6fb7)));window[_0x5c2aa5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5c2aa5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x289cc8,_0x370adf);}function _0x2f0028(){const _0x5676d2=_0x5c2aa5([0x6c,0x6c,0x63,0x74,0x2d])+_0xec59e5(_0x589c82(_0x43ae90)),_0x3489ce=window[_0x5c2aa5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5c2aa5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5676d2);return _0x3489ce?window[_0x5c2aa5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x263d64(_0x3489ce),0x10)*_0x1f6fb7:null;}function _0x5a12cc(_0xc841c6){return new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1404f7,_0x4969b2)=>{_0xc841c6[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x1404f7,_0x4969b2),window[_0x5c2aa5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4969b2,0x7e7be541^_0x51e52f);});}}_0x4385eb[_0x5c2aa5([0x6f,0x6e])](_0x5c2aa5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x43675d,_0x32b3e2)=>{if(_0x32b3e2[0x0]!=_0x43ae90)return _0x489e1e(_0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x32b3e2[0x1]={..._0x32b3e2[0x1],[_0x5c2aa5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x38ca0b};},{[_0x5c2aa5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5c2aa5([0x68,0x69,0x67,0x68])}),_0x4385eb[_0x5c2aa5([0x6f,0x6e])](_0x5c2aa5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x23b9e4=>{_0x18d332(_0x23b9e4[_0x5c2aa5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x159749=!0x0,_0x387734(_0x23b9e4[_0x5c2aa5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5c2aa5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5c2aa5([0x6c,0x6f,0x77])}),_0x7cf2e1[_0x5c2aa5([0x74,0x68,0x65,0x6e])](()=>{_0x159749||_0x489e1e(_0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3a4e16(){return _0x4385eb[_0x5c2aa5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5c2aa5([0x76,0x69,0x65,0x77])][_0x5c2aa5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5c2aa5([0x61,0x75,0x74,0x6f]);}function _0x247a3e(){_0x4385eb[_0x5c2aa5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5c2aa5([0x76,0x69,0x65,0x77])][_0x5c2aa5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5c2aa5([0x61,0x75,0x74,0x6f]);}}function _0x5ae29c(_0xbaac3f){const _0xa454e6=[new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d2010=>setTimeout(_0x5d2010,0x7e730f4d^_0x51e52f)),_0x7cf2e1[_0x5c2aa5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24c1cf=>{let _0xc0a94f=0x0;_0x4385eb[_0x5c2aa5([0x6d,0x6f,0x64,0x65,0x6c])][_0x5c2aa5([0x6f,0x6e])](_0x5c2aa5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3b634f,_0x83ef50)=>{_0x83ef50[0x0][_0x5c2aa5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xc0a94f++,_0xc0a94f==(0x7e7a3079^_0x51e52f)&&(_0x24c1cf(),_0x3b634f[_0x5c2aa5([0x6f,0x66,0x66])]());});}))];return window[_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5c2aa5([0x72,0x61,0x63,0x65])](_0xa454e6)[_0x5c2aa5([0x74,0x68,0x65,0x6e])](()=>_0xbaac3f);}async function _0x10b7d3(){await _0x7cf2e1,_0x4385eb[_0x5c2aa5([0x6d,0x6f,0x64,0x65,0x6c])][_0x5c2aa5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x302a0d,_0x4385eb[_0x5c2aa5([0x6d,0x6f,0x64,0x65,0x6c])][_0x5c2aa5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x302a0d,_0x4385eb[_0x5c2aa5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5c2aa5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xf4b7ac(){return _0x2b52d2(_0x5c2aa5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x38137d(_0x5c2aa5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5c2aa5([0x73,0x74,0x61,0x74,0x65])]==_0x5c2aa5([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2e4ed5(){return _0x2b52d2(_0x5c2aa5([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 _0x5ed329(){return _0x2b52d2(_0x5c2aa5([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1612e6(_0x4132af){const _0x4195a8=_0x39530d();_0x4385eb[_0x4195a8]=_0x5c2aa5([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4132af,_0x4132af!=_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64])&&_0x10b7d3();}function _0x39530d(){const _0x134aa5=window[_0x5c2aa5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5c2aa5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5c2aa5([0x6e,0x6f,0x77])]())[_0x5c2aa5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5c2aa5([0x2e]),'');let _0x21a01e=_0x5c2aa5([0x58]);for(let _0x5e3ba1=0x0;_0x5e3ba1<_0x134aa5[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5e3ba1+=0x2){let _0x10ff72=window[_0x5c2aa5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x134aa5[_0x5c2aa5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5e3ba1,_0x5e3ba1+0x2));_0x10ff72>=_0x401766[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x10ff72-=_0x401766[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x21a01e+=_0x401766[_0x10ff72];}return _0x21a01e;}function _0xdaa122(){const _0x49aa92=_0x1e0db9[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])](_0x5c2aa5([0x2e]));if(0x3!=_0x49aa92[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x551a5c(_0x49aa92[0x1]);function _0x551a5c(_0x57b9e0){const _0x16cac9=_0x1177c6(_0x57b9e0);return _0x16cac9&&_0x4fd1ec()?_0x16cac9:null;function _0x4fd1ec(){const _0x5aa97e=_0x16cac9[_0x5c2aa5([0x6a,0x74,0x69])],_0x46e2e2=window[_0x5c2aa5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5aa97e[_0x5c2aa5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5aa97e[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x197521={..._0x16cac9,[_0x5c2aa5([0x6a,0x74,0x69])]:_0x5aa97e[_0x5c2aa5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5aa97e[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x197521[_0x5c2aa5([0x76,0x63])],_0x589c82(_0x197521)==_0x46e2e2;}}}async function _0x52de4d(){let _0x50ee69=!0x0;try{const _0x561ee8=_0x1e0db9[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])](_0x5c2aa5([0x2e])),[_0x18a76a,_0x257fbe,_0x1f0975]=_0x561ee8;return _0x13bb22(_0x18a76a),await _0x3f5bdf(_0x18a76a,_0x257fbe,_0x1f0975),_0x50ee69;}catch{return!0x1;}function _0x13bb22(_0x30b601){const _0x1d66c2=_0x1177c6(_0x30b601);_0x1d66c2&&_0x1d66c2[_0x5c2aa5([0x61,0x6c,0x67])]==_0x5c2aa5([0x45,0x53,0x32,0x35,0x36])||(_0x50ee69=!0x1);}async function _0x3f5bdf(_0x33a1df,_0xdf1822,_0x55475f){const _0x263198=window[_0x5c2aa5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5c2aa5([0x66,0x72,0x6f,0x6d])](_0x11282e(_0x55475f),_0x599d44=>_0x599d44[_0x5c2aa5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x38156c=new window[(_0x5c2aa5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5c2aa5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x33a1df+_0x5c2aa5([0x2e])+_0xdf1822),_0x99c090=window[_0x5c2aa5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5c2aa5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x99c090)return;const _0x33b30b=await _0x99c090[_0x5c2aa5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5c2aa5([0x6a,0x77,0x6b]),_0x17450e,{[_0x5c2aa5([0x6e,0x61,0x6d,0x65])]:_0x5c2aa5([0x45,0x43,0x44,0x53,0x41]),[_0x5c2aa5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5c2aa5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5c2aa5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x99c090[_0x5c2aa5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5c2aa5([0x6e,0x61,0x6d,0x65])]:_0x5c2aa5([0x45,0x43,0x44,0x53,0x41]),[_0x5c2aa5([0x68,0x61,0x73,0x68])]:{[_0x5c2aa5([0x6e,0x61,0x6d,0x65])]:_0x5c2aa5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x33b30b,_0x263198,_0x38156c)||(_0x50ee69=!0x1);}}function _0x1177c6(_0x55734b){return _0x55734b[_0x5c2aa5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5c2aa5([0x65,0x79]))?JSON[_0x5c2aa5([0x70,0x61,0x72,0x73,0x65])](_0x11282e(_0x55734b)):null;}function _0x11282e(_0x5570be){return window[_0x5c2aa5([0x61,0x74,0x6f,0x62])](_0x5570be[_0x5c2aa5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5c2aa5([0x2b]))[_0x5c2aa5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5c2aa5([0x2f])));}function _0x589c82(_0x5f5030){let _0x224e6c=0x1505;function _0x3065d7(_0x580a4e){for(let _0x290ea5=0x0;_0x290ea5<_0x580a4e[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x290ea5++){const _0x5aa7db=_0x580a4e[_0x5c2aa5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x290ea5);_0x224e6c=(_0x224e6c<<0x5)+_0x224e6c+_0x5aa7db,_0x224e6c&=_0x224e6c;}}function _0x22f40e(_0x4a90d9){Array[_0x5c2aa5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4a90d9)?_0x4a90d9[_0x5c2aa5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x22f40e):_0x4a90d9&&typeof _0x4a90d9==_0x5c2aa5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5c2aa5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4a90d9)[_0x5c2aa5([0x73,0x6f,0x72,0x74])]()[_0x5c2aa5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x539ee0,_0x184f1f])=>{_0x3065d7(_0x539ee0),_0x22f40e(_0x184f1f);}):_0x3065d7(window[_0x5c2aa5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4a90d9));}return _0x22f40e(_0x5f5030),_0x224e6c>>>0x0;}function _0xec59e5(_0x3541f4){return _0x3541f4[_0x5c2aa5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5c2aa5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5c2aa5([0x30]));}function _0x263d64(_0x1f6e28){return _0x1f6e28[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5c2aa5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5c2aa5([0x6a,0x6f,0x69,0x6e])]('');}function _0x2b52d2(_0x5c9fe3){return _0x4385eb[_0x5c2aa5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5c2aa5([0x68,0x61,0x73])](_0x5c9fe3);}function _0x38137d(_0x561358){return _0x4385eb[_0x5c2aa5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5c2aa5([0x67,0x65,0x74])](_0x561358);}function _0x302a0d(){}function _0x5c2aa5(_0xc4ebb4){return _0xc4ebb4['map'](_0x5a0685=>String['fromCharCode'](_0x5a0685))['join']('');}_0x1612e6(await _0x16d6b2());}(this);}['destroy'](){const _0x959949=this['editor']['plugins']['get'](o),_0x58182c=this['editor']['config']['get']('collaboration.channelId');for(const _0x240919 of _0x959949['getCommentThreads']({'channelId':_0x58182c}))_0x959949['_detachCommentThread'](_0x240919['id']),_0x959949['_threads']['delete'](_0x240919['id']);super['destroy']();}['hasMarkerForId'](_0x1480d4){return this['getAllMarkersForId'](_0x1480d4)['length']>0x0;}['getAllMarkersForId'](_0x2c8e10){const _0x28e517=[];for(const _0x4b6b57 of this['editor']['model']['markers'])_0x4b6b57['name']['startsWith']('comment:'+_0x2c8e10)&&_0x28e517['push'](_0x4b6b57);return _0x28e517;}['scrollToThreadMarker'](_0xf1758d){setTimeout(()=>{const _0x33bf81=this['_getTargetForId'](_0xf1758d);if(!_0x33bf81)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0xf1758d&&nt({'target':_0x33bf81[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x24c9a9){this['editor']['model']['change'](()=>{for(const _0x1ecc8d of this['getAllMarkersForId'](_0x24c9a9))this['editor']['editing']['reconvertMarker'](_0x1ecc8d);});}['_attachArchivedThread'](_0x5ace8d){const _0x3da3a4=this['editor']['plugins']['get'](o),_0x1b04db=this['editor']['plugins']['get'](b),_0x964ccf=_0x3da3a4['getCommentThread'](_0x5ace8d);if(!_0x964ccf['isAttached']){const _0x356cda=_0x964ccf['attachTo'](()=>this['_getTargetForId'](_0x964ccf['id']));_0x1b04db['registerAnnotation'](_0x356cda),_0x964ccf['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x5314cb=this['editor'],_0x203d83=_0x5314cb['plugins']['get'](it);_0x5314cb['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1499f0,_0x29edd1)=>{const {id:_0x3cf9c1}=er(_0x1499f0['markerName']),_0x483f48=_0x5314cb['plugins']['get'](o)['getCommentThread'](_0x3cf9c1),_0x523fa8=this['activeMarker']&&er(this['activeMarker'])['id']===_0x3cf9c1;let _0x4c6fbd;if(_0x483f48&&_0x483f48['isResolved']&&!_0x523fa8&&_0x1499f0['item'])return _0x29edd1['consumable']['consume'](_0x1499f0['item'],'addMarker:'+_0x1499f0['markerName']),_0x29edd1['consumable']['consume'](_0x1499f0['item'],'removeMarker:'+_0x1499f0['markerName']),null;const _0x182996=['ck-comment-marker'];return _0x523fa8&&_0x182996['push']('ck-comment-marker--active'),_0x4c6fbd=_0x483f48?.['length']?_0x483f48['comments']['first']['author']['id']:_0x203d83['me']['id'],{'classes':_0x182996,'attributes':{'data-comment':_0x3cf9c1,'data-author-id':_0x4c6fbd}};}}),_0x5314cb['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x51146e,{options:_0x17834f})=>{if(_0x17834f['showCommentHighlights'])return null;const _0x53bb66=_0x5314cb['plugins']['get'](o),_0x3968be=_0x5314cb['model']['markers']['get'](_0x51146e),{id:_0x405b53,part:_0x5f0b80}=er(_0x51146e);return _0x3968be&&!_0x3968be['affectsData']||_0x17834f['ignoreResolvedComments']&&_0x53bb66['getCommentThread'](_0x405b53)?.['isResolved']?null:{'group':'comment','name':_0x5f0b80?_0x405b53+':'+_0x5f0b80:_0x405b53};}}),_0x5314cb['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1cdeea,{writer:_0x27d2bb})=>_0x27d2bb['createElement']('$marker',{'data-name':'comment:'+_0x1cdeea['getAttribute']('id')})}),_0x5314cb['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5b0906=this['editor'],_0x533993=_0x5b0906['plugins']['get'](o),_0x458c82=new Set(),_0x51e590=new Set();_0x5b0906['model']['document']['registerPostFixer'](_0x1d16b7=>{let _0x7d0537=!0x1;for(const {name:_0x3e5e2e,data:_0x28734e}of _0x5b0906['model']['document']['differ']['getChangedMarkers']()){const {group:_0x49615b,id:_0x42003c}=er(_0x3e5e2e);let _0xa05b28=_0x28734e['newRange'];if('comment'!==_0x49615b||!_0xa05b28)continue;const _0x5ebc02='$graveyard'===_0xa05b28['root']['rootName'];_0x5ebc02||(_0xa05b28=dt(_0xa05b28,_0x5b0906['model']),!_0xa05b28||_0xa05b28['isCollapsed']||!_0x28734e['newRange']||_0xa05b28['isEqual'](_0x28734e['newRange']))?_0x5b0906['model']['hasContent'](_0xa05b28)&&!_0x5ebc02?this['isThreadsLoadingPaused']?_0x458c82['add'](_0x3e5e2e):this['_handleThreadMarker'](_0x3e5e2e,_0x42003c):(_0x51e590['add'](_0x3e5e2e),_0x458c82['delete'](_0x3e5e2e),_0x1d16b7['removeMarker'](_0x3e5e2e),_0x7d0537=!0x0):(_0x1d16b7['updateMarker'](_0x3e5e2e,{'range':_0xa05b28}),_0x7d0537=!0x0);}return _0x7d0537;}),this['on']('change:isThreadsLoadingPaused',(_0x5d4ba7,_0x3dc1fb,_0x3342aa)=>{if(!_0x3342aa&&_0x458c82['size'])for(const _0x57f7a7 of _0x458c82){const {id:_0x464057}=er(_0x57f7a7);_0x458c82['delete'](_0x57f7a7),_0x5b0906['model']['markers']['get'](_0x57f7a7)&&this['_handleThreadMarker'](_0x57f7a7,_0x464057);}}),this['listenTo'](_0x5b0906['model']['document'],'change',()=>{for(const {name:_0x2a86f5,data:{newRange:_0x1d34f3}}of _0x5b0906['model']['document']['differ']['getChangedMarkers']()){const {group:_0x563222,id:_0x491a39}=er(_0x2a86f5);if('comment'!==_0x563222)continue;const _0x581582=_0x533993['getCommentThread'](_0x491a39),_0x3f9198=this['hasMarkerForId'](_0x491a39);_0x581582&&(!_0x581582['_hasTargetInContent']&&_0x1d34f3&&_0x5b0906['editing']['view']['once']('render',()=>{const _0x1355cd=_0x5b0906['plugins']['get'](y),_0x5402ba=_0x533993['_threadToController']['get'](_0x581582)['view'];_0x1355cd['getByInnerView'](_0x5402ba)['refreshVisibility']();},{'priority':'low'}),_0x581582['_hasTargetInContent']=_0x3f9198||!!_0x1d34f3),_0x1d34f3||(_0x51e590['add'](_0x2a86f5),_0x458c82['delete'](_0x2a86f5));}for(const _0x5d48a4 of _0x51e590){const {id:_0x2d1701}=er(_0x5d48a4),_0x41cdf2=_0x533993['getCommentThread'](_0x2d1701);if(_0x458c82['delete'](_0x5d48a4),!_0x41cdf2)continue;const _0x507a71=this['hasMarkerForId'](_0x2d1701);_0x507a71||_0x41cdf2['isSubmitted']?_0x507a71||_0x41cdf2['unlinkedAt']||_0x41cdf2['setUnlinkedAt'](new Date()):_0x41cdf2['remove']();}_0x51e590['clear']();});}['_handleInitialThreads'](_0x157d7d){_0x157d7d['forEach'](_0x29d638=>{_0x29d638['unlinkedAt']&&this['_attachArchivedThread'](_0x29d638['id']);});}['_getTargetForId'](_0x3671a0){const _0x5d78f6=this['editor'],_0x5057b0=this['getAllMarkersForId'](_0x3671a0);return et(_0x5d78f6['editing'],_0x5057b0);}['_getTextContext'](_0x1c1c83){const _0x384eba=this['getAllMarkersForId'](_0x1c1c83);let _0xf502d7='',_0x2994df=!0x1;for(const _0x2a1f19 of _0x384eba){const _0x3f5d21=_0x2a1f19['getRange']();for(const _0xcbbdaf of Array['from'](_0x3f5d21['getItems']()))_0xcbbdaf['is']('$textProxy')?(_0xf502d7&&_0x2994df&&(_0xf502d7+='\x20',_0x2994df=!0x1),_0xf502d7+=_0xcbbdaf['data']):_0x2994df=!0x0;_0x2994df=!0x0;}return _0xf502d7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4f46be,_0x356bca){const _0x561401=this['editor'],_0x518623=_0x561401['plugins']['get'](o);let _0x264de5=_0x518623['getCommentThread'](_0x356bca);const _0x2225b6=_0x561401['config']['get']('collaboration.channelId'),_0x38c3f5=_0x561401['plugins']['get'](b);if(_0x264de5&&(_0x264de5['unlinkedAt']&&_0x264de5['setUnlinkedAt'](null),_0x264de5['isAttached']))return _0x264de5;return!this['getAllMarkersForId'](_0x356bca)[0x0]['managedUsingOperations']?_0x561401['editing']['view']['once']('render',()=>{if(_0x518623['getCommentThread'](_0x356bca))return;const _0x546324=_0x561401['plugins']['get'](y);_0x264de5=_0x518623['openNewCommentThread']({'channelId':_0x2225b6,'threadId':_0x356bca,'target':()=>this['_getTargetForId'](_0x356bca),'context':{'type':'text','value':this['_getTextContext'](_0x356bca)}});const _0x1019b3=_0x518623['_threadToController']['get'](_0x264de5)['view'],_0x48cbe4=_0x546324['getByInnerView'](_0x1019b3);_0x48cbe4&&_0x38c3f5['registerAnnotation'](_0x48cbe4);},{'priority':'low'}):_0x518623['fetchCommentThread']({'channelId':_0x2225b6,'threadId':_0x356bca})['then'](_0x5298de=>{if('destroyed'!==_0x561401['state']){if(_0x264de5=_0x5298de,_0x264de5&&!_0x264de5['isAttached']){const _0x437e19=_0x264de5['attachTo'](()=>this['_getTargetForId'](_0x356bca));_0x38c3f5['registerAnnotation'](_0x437e19),_0x264de5['isResolved']&&this['_reconvertMarkers'](_0x356bca);}else{if(!_0x264de5){const _0x53c267=this['getAllMarkersForId'](_0x356bca);_0x561401['model']['change'](_0x488937=>{for(const _0x4d3ba0 of _0x53c267)_0x488937['removeMarker'](_0x4d3ba0);});}}}}),_0x264de5;}['_handleThreadMarker'](_0x46ce34,_0x497878){const _0x52ff4c=this['_attachMarkerToThread'](_0x46ce34,_0x497878);_0x52ff4c&&!_0x52ff4c['context']&&_0x52ff4c['setContext']({'type':'text','value':this['_getTextContext'](_0x497878)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4bc092=this['editor'];ot(_0x4bc092['model'],({left:_0x94f558,entered:_0x54cbfe})=>{for(const _0x3a8001 of _0x94f558)if(mt(_0x3a8001)){_0x4bc092['ui']['ariaLiveAnnouncer']['announce'](N(_0x4bc092['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4cde91 of _0x54cbfe)if(mt(_0x4cde91)){_0x4bc092['ui']['ariaLiveAnnouncer']['announce'](N(_0x4bc092['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x1851f4)));break;}});}}function ft(_0x317ea2,_0x3551b7){return _0x3551b7?_0x317ea2+':'+_0x3551b7:_0x317ea2;}function er(_0xfd4749){const _0x7d7088=_0xfd4749['split'](':');return{'group':_0x7d7088[0x0],'id':_0x7d7088[0x1],'part':_0x7d7088[0x2]};}function dt(_0x4e7979,_0x4ab3bb){const _0x1cf192=_0x4ab3bb['schema'],_0x15093a=_0x4ab3bb['createRange'](_0x4e7979['start']);for(const _0x175e43 of _0x4e7979['getWalker']()){const {type:_0x271f74,item:_0x60cb86,nextPosition:_0x139042}=_0x175e43;if('text'===_0x271f74||_0x1cf192['isObject'](_0x60cb86)){const _0x46d14f=_0x4ab3bb['createPositionBefore'](_0x60cb86);_0x15093a['isCollapsed']&&(_0x15093a['start']=_0x46d14f),_0x15093a['end']=_0x139042;}}return _0x15093a;}function mt(_0x1be1d4){return'comment'===er(_0x1be1d4['name'])['group'];}class s extends _0x3a30de{['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 _0x24c93f=this['editor'],_0x49edf1=_0x24c93f['plugins']['get'](o),_0x1b48a0=_0x24c93f['plugins']['get'](r),_0x12c1db=_0x24c93f['plugins']['get'](y),_0x1c3317=_0x24c93f['plugins']['get'](b);_0x24c93f['ui']['componentFactory']['add']('comment',()=>{const _0x518658=this['_createUIButton'](_0x50efaa);return _0x518658['tooltip']=!0x0,_0x518658;}),_0x24c93f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x17389d)),_0x1c3317['addSourceCollector'](()=>{const _0x5e812a=[];for(const [_0x263e25,_0x1ac456]of _0x49edf1['_threadToController']){const _0x541d12=_0x1b48a0['getAllMarkersForId'](_0x263e25['id']),_0x130dba=_0x541d12['map'](_0x4606f4=>_0x4606f4['getRange']());_0x541d12['length']>0x0&&_0x5e812a['push']([_0x1ac456['view'],_0x130dba]);}return _0x5e812a;}),this['listenTo'](_0x12c1db,'change:activeAnnotations',(_0x262149,_0x4bc1bf,_0xbbc1d2)=>{const _0x57a86b=Array['from'](_0xbbc1d2)['map'](_0x5c62e8=>_0x5c62e8['innerView'])['find'](_0x1b6800=>_0x49edf1['_viewToController']['has'](_0x1b6800));if(!_0x57a86b)return void(_0x1b48a0['activeMarker']=null);const _0x341705=_0x49edf1['_viewToController']['get'](_0x57a86b)['model']['id'],_0x3a178c='comment:'+_0x341705;_0x341705&&_0x1b48a0['hasMarkerForId'](_0x341705)?_0x1b48a0['activeMarker']=_0x3a178c:_0x1b48a0['activeMarker']&&(_0x1b48a0['activeMarker']=null);}),this['listenTo'](_0x49edf1,'removeCommentThread',(_0x4ee7f1,{threadId:_0x15b33f,isFromAdapter:_0x5590f6})=>{!_0x5590f6&&_0x24c93f['ui']['focusTracker']['isFocused']&&_0x1b48a0['hasMarkerForId'](_0x15b33f)&&_0x24c93f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x49edf1,'addComment',(_0x1804aa,{threadId:_0x24d235,isFromAdapter:_0x331e42})=>{if(_0x331e42||!_0x1b48a0['hasMarkerForId'](_0x24d235)||!_0x49edf1['hasCommentThread'](_0x24d235))return;0x1===_0x49edf1['getCommentThread'](_0x24d235)['length']&&(_0x24c93f['editing']['view']['focus'](),_0x1804aa['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x32abb5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x45258f;for(const _0x3cc91b in _0x32abb5){const _0x52d621=_0x3cc91b,_0x4af948=_0x32abb5[_0x52d621];if('commentsLicenseKeyValid'==_0x4af948||'commentsLicenseKeyInvalid'==_0x4af948||'commentsLicenseKeyExpired'==_0x4af948||'commentsLicenseKeyDomainLimit'==_0x4af948||'commentsLicenseKeyNotAllowed'==_0x4af948||'commentsLicenseKeyEvaluationLimit'==_0x4af948||'commentsLicenseKeyTrialLimit'==_0x4af948||'commentsLicenseKeyUsageLimit'==_0x4af948){delete _0x32abb5[_0x52d621],_0x45258f=_0x4af948,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x45258f&&_0x32abb5['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x45258f&&_0x32abb5['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x45258f&&_0x32abb5['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x45258f&&_0x32abb5['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x45258f&&_0x32abb5['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x45258f&&_0x32abb5['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x45258f&&_0x32abb5['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1e9d94){const _0x2435d0=this['editor'],_0x2eaa2a=new _0x1e9d94(_0x2435d0['locale']),_0x715f97=_0x2435d0['commands']['get']('addCommentThread');return _0x2eaa2a['set']({'label':N(_0x2435d0['locale'],'Comment'),'icon':_0x47f152}),_0x2eaa2a['bind']('isEnabled')['to'](_0x715f97,'hasContent'),this['listenTo'](_0x2eaa2a,'execute',()=>{_0x715f97['execute']();}),_0x2eaa2a;}}class i extends _0x3a30de{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0xd225be){super(_0xd225be),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1eb78e,_0x16a4fd,_0x4adc1a)=>{_0x4adc1a?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2f91be,_0x36498d]of this['editor']['commands'])_0x36498d['affectsData']&&'addCommentThread'!==_0x2f91be&&_0x36498d['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x10f4b8=this['editor']['editing']['view']['document'];this['listenTo'](_0x10f4b8,'cut',_0x288836=>_0x288836['stop'](),{'priority':'highest'}),this['listenTo'](_0x10f4b8,'clipboardInput',_0x23b8f5=>_0x23b8f5['stop'](),{'priority':'highest'}),this['listenTo'](_0x10f4b8,'delete',_0x284035=>_0x284035['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3ae35c,_0x549e2c]of this['editor']['commands'])_0x549e2c['affectsData']&&'addCommentThread'!==_0x3ae35c&&_0x549e2c['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 _0x42791b{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x46fdab){super(_0x46fdab),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1d52f5=this['context']['plugins']['get'](y);this['listenTo'](_0x1d52f5,'_activateAnnotation',(_0x2ed97c,_0x20a50c)=>{for(const _0x3ba1e5 of this['activeUIs']){const _0x59f2c8=this['_uis']['get'](_0x3ba1e5);(0x0,this['uisData']['get'](_0x3ba1e5)['filter'])(_0x20a50c)&&_0x59f2c8['setActiveAnnotation'](_0x20a50c);}}),this['listenTo'](_0x1d52f5,'_deactivateAllAnnotations',()=>{for(const _0xf7ee87 of this['activeUIs']){this['_uis']['get'](_0xf7ee87)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1d52f5['_visibleAnnotations'],'add',(_0x8cb58c,_0x59de4e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x59de4e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x261ff8){return this['activeUIs']['has'](_0x261ff8);}['activate'](_0xd44c12,_0x2949d8=this['defaultFilter']){const _0x115f12=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0xd44c12))throw new _0x441c59('annotationsuis-missing-ui',this,{'uiName':_0xd44c12});this['isActive'](_0xd44c12)&&this['deactivate'](_0xd44c12),this['activeUIs']['add'](_0xd44c12);const _0x47530c=new S();v({'source':_0x115f12['_visibleAnnotations'],'target':_0x47530c,'filter':_0x2949d8}),this['uisData']['set'](_0xd44c12,{'collection':_0x47530c,'filter':_0x2949d8});const _0x50a668=this['_uis']['get'](_0xd44c12);_0x50a668['attach'](_0x47530c),this['listenTo'](_0x50a668,'change:activeAnnotation',(_0x577335,_0x393bd5,_0x387b2e,_0x3ea41e)=>{_0x3ea41e&&_0x115f12['_removeActiveAnnotation'](_0x3ea41e),_0x387b2e&&_0x115f12['_addActiveAnnotation'](_0x387b2e);});}['deactivate'](_0x4a9321){if(this['activeUIs']['delete'](_0x4a9321),!this['_uis']['has'](_0x4a9321))throw new _0x441c59('annotationsuis-missing-ui',this,{'uiName':_0x4a9321});const _0x59371a=this['_uis']['get'](_0x4a9321);_0x59371a['detach'](),this['stopListening'](_0x59371a),this['uisData']['get'](_0x4a9321)['collection']['destroy'](),this['uisData']['delete'](_0x4a9321);}['switchTo'](_0x3f90b5){if(!this['_uis']['has'](_0x3f90b5))throw new _0x441c59('annotationsuis-missing-ui',this,{'uiName':_0x3f90b5});const _0x4501e4=this['context']['plugins']['get'](y),_0x22cc8e=Array['from'](_0x4501e4['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3f90b5);const _0xf3b574=this['_uis']['get'](_0x3f90b5);_0xf3b574['setActiveAnnotation'](_0x22cc8e),_0xf3b574['_setSelectedAnnotations']&&_0x22cc8e&&_0xf3b574['_setSelectedAnnotations']([_0x22cc8e]);}['deactivateAll'](){for(const _0x1a0ed5 of this['activeUIs'])this['deactivate'](_0x1a0ed5);}['register'](_0x964a88,_0x1367e7){if(this['_uis']['has'](_0x964a88))throw new _0x441c59('annotationsuis-register-already-registered');if('function'!=typeof _0x1367e7['attach']||'function'!=typeof _0x1367e7['detach']||'function'!=typeof _0x1367e7['setActiveAnnotation'])throw new _0x441c59('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x964a88,_0x1367e7);}['refilterAnnotations'](){const _0x43facc=this['context']['plugins']['get'](y)['collection'],_0x543324=new Map(),_0x5f2bb6=Array['from'](this['activeUIs']);for(const _0x2c0f32 of this['activeUIs']){const _0x1acbf1=this['uisData']['get'](_0x2c0f32)['collection'];for(const _0x144827 of _0x1acbf1)_0x543324['set'](_0x144827,_0x2c0f32);}for(const _0x3a37d6 of _0x43facc){const _0xd594b4=_0x543324['get'](_0x3a37d6);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3a37d6);const _0x5c69c3=_0x5f2bb6['find'](_0x38bb93=>this['uisData']['get'](_0x38bb93)['filter'](_0x3a37d6));_0xd594b4!==_0x5c69c3&&(_0xd594b4&&this['uisData']['get'](_0xd594b4)['collection']['remove'](_0x3a37d6),_0x5c69c3&&this['uisData']['get'](_0x5c69c3)['collection']['add'](_0x3a37d6));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x516f21){const _0x26f109=[];for(const _0x1b0064 of this['activeUIs']){(0x0,this['uisData']['get'](_0x1b0064)['filter'])(_0x516f21)&&_0x26f109['push'](_0x1b0064);}if(_0x26f109['length']>0x1)throw new _0x441c59('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x26f109,'annotationType':_0x516f21['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x3597a4){super(_0x3597a4);const _0x1757aa=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 _0x4cfdf8(),this['focusCycler']=new _0x59c832({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1757aa['to']('class')],'style':{'minHeight':_0x1757aa['to']('minHeight',_0x3926a9=>'number'==typeof _0x3926a9?_i(_0x3926a9+0xa):null)},'dir':_0x3597a4['uiLanguageDirection'],'role':'application','aria-label':N(_0x3597a4,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x3597a4,'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',_0x44064e=>{this['_updateItemPositionInFocusables'](_0x44064e['source']);}),this['list']['forEach'](_0x4fc02f=>{this['focusTracker']['add'](_0x4fc02f['element']),this['_updateItemPositionInFocusables'](_0x4fc02f);}),this['list']['on']('change',(_0x2b6840,_0xf4dca)=>{for(const _0x1f63ac of _0xf4dca['removed'])this['focusTracker']['remove'](_0x1f63ac['element']),this['focusables']['remove'](_0x1f63ac);for(const _0x4de2af of _0xf4dca['added'])this['focusTracker']['add'](_0x4de2af['element']),this['_updateItemPositionInFocusables'](_0x4de2af);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x30716b){const _0x10bf94=this['focusables']['getIndex'](_0x30716b);let _0x273dc4,_0x31ade0;for(const _0x5a3d8a of this['focusables'])if(_0x30716b['top']<_0x5a3d8a['top']){_0x273dc4=_0x5a3d8a;break;}if(_0x31ade0=_0x273dc4?this['focusables']['getIndex'](_0x273dc4):this['focusables']['length'],-0x1!==_0x10bf94){if(_0x10bf94===_0x31ade0-0x1)return;this['focusables']['remove'](_0x30716b),_0x31ade0=_0x273dc4?this['focusables']['getIndex'](_0x273dc4):this['focusables']['length'];}this['focusables']['add'](_0x30716b,_0x31ade0);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x145224){super(_0x145224),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5a42ba,_0x33433f)=>_0x5a42ba+_0x33433f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x44b030=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x44b030['to']('isAnimationDisabled',_0x79cd5f=>_0x79cd5f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x44b030['to']('top',_0x3dc28a=>Ot(_0x3dc28a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x6d8b18=this['element']['clientHeight'];_0x6d8b18&&(this['height']=_0x6d8b18);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x42791b{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1020ca){super(_0x1020ca),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 _0x4d76e8=this['context']['config']['get']('sidebar.container');_0x4d76e8&&this['setContainer'](_0x4d76e8);}['setContainer'](_0x1b8e56){if(!g(_0x1b8e56))throw new _0x441c59('sidebar-setcontainer-invalid-element');this['container']=_0x1b8e56;}['_attachToContainer']({viewClass:_0x5c905e='',spaceBetweenItems:_0x2d6535=0x19}={}){if(!g(this['container']))throw new _0x441c59('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5c905e,this['_spaceBetweenItems']=_0x2d6535;}['rearrange']({removedAnnotation:_0x5f062b,previousAnnotation:_0x3cf6c4,nextAnnotation:_0x4f6421}){const _0x4fb5eb=this['getSidebarItemView'](_0x5f062b);this['view']['list']['remove'](_0x4fb5eb),this['_destroySidebarItemView'](_0x5f062b),_0x3cf6c4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3cf6c4)),_0x4f6421&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4f6421)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x53df69,activatedAnnotation:_0xcb616a,disableAnimationOnActivatedAnnotation:_0xad82d3}){if(this['_activeAnnotation']=_0xcb616a,_0x53df69){_0x53df69['isActive']=!0x1;const _0x3a2b01=this['getSidebarItemView'](_0x53df69);_0x3a2b01&&_0xad82d3&&(_0x3a2b01['isAnimationDisabled']=!0x1);}if(_0xcb616a){const _0xfe6cb7=this['getSidebarItemView'](_0xcb616a);_0xfe6cb7&&(_0xcb616a['isActive']=!0x0,_0xad82d3&&(_0xfe6cb7['isAnimationDisabled']=!0x0,_0xfe6cb7['top']+=0x1),this['_alignToTargetRect'](_0xfe6cb7));}}['_detachFromContainer'](_0x42c3e6){if(this['view']['element']['remove'](),_0x42c3e6){for(const _0x2e9341 of _0x42c3e6)this['_destroySidebarItemView'](_0x2e9341);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x165fb1,_0x21c789){_0x21c789||(_0x21c789=_0x165fb1['view']);const _0x326697=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x326697,_0x165fb1),this['_annotationToSidebarItemView']['set'](_0x165fb1,_0x326697),_0x326697['content']['add'](_0x21c789),this['listenTo'](_0x165fb1['view'],'change:targetRect',(_0x46283f,_0x292bc0,_0x216ee)=>{const _0x31a675=this['_getTargetTop'](_0x165fb1,_0x216ee);_0x326697['_targetTop']!=_0x31a675&&(_0x326697['_targetTop']=_0x31a675,this['_setItemTop'](_0x326697,_0x31a675));}),this['listenTo'](_0x326697,'change:top',()=>{this['_recalculate'](_0x326697,'top');}),this['listenTo'](_0x326697,'change:bottom',()=>{this['_recalculate'](_0x326697,'bottom');}),this['_alignToTargetRect'](_0x326697);const _0xe2b313=this['_getItemBefore'](_0x326697);if(_0xe2b313)this['_alignAfterItem'](_0xe2b313,_0x326697)||this['_alignToTargetRect'](_0x326697);else this['_alignToTargetRect'](_0x326697);return this['_updateLastItem'](),this['view']['list']['add'](_0x326697),_0x326697;}['_alignForTopChange'](_0x49c7f2){if(!_0x49c7f2['content']['length'])return;const _0x404c5a=this['_getItemBefore'](_0x49c7f2);if(!_0x404c5a)return;const _0x400aa0=this['_sidebarItemViewToAnnotation']['get'](_0x404c5a),_0x23164a=this['_activeAnnotation'];_0x23164a&&_0x23164a===_0x400aa0?this['_alignAfterItem'](_0x404c5a,_0x49c7f2):this['_alignBeforeItem'](_0x49c7f2,_0x404c5a);}['_alignForBottomChange'](_0x2c55b5){if(!_0x2c55b5['content']['length'])return;const _0x3922e8=this['_getItemAfter'](_0x2c55b5);if(!_0x3922e8)return;const _0x14a038=this['_sidebarItemViewToAnnotation']['get'](_0x3922e8),_0xcce87d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x56f669=this['_activeAnnotation'];_0x56f669&&_0x56f669===_0x14a038&&_0xcce87d?(this['_alignBeforeItem'](_0x3922e8,_0x2c55b5),this['_alignAfterItem'](_0x2c55b5,_0x3922e8)):_0x56f669&&_0x56f669===_0x14a038?this['_alignBeforeItem'](_0x3922e8,_0x2c55b5):this['_alignAfterItem'](_0x2c55b5,_0x3922e8);}['_recalculate'](_0x4fd0e5,_0x2caaf4){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x183a10,changedProp:_0x7d5a65}of this['_recalculateBuffer'])'top'===_0x7d5a65?this['_alignForTopChange'](_0x183a10):this['_alignForBottomChange'](_0x183a10);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4fd0e5,'changedProp':_0x2caaf4});}['getSidebarItemView'](_0x31fdb3){return this['_annotationToSidebarItemView']['get'](_0x31fdb3);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x410e3b){const _0x1f8175=this['getSidebarItemView'](_0x410e3b);this['stopListening'](_0x1f8175),this['stopListening'](_0x410e3b['view']),_0x1f8175['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x410e3b),this['_sidebarItemViewToAnnotation']['delete'](_0x1f8175);}['_createSidebarView'](){const _0x157ac1=new H(this['context']['locale']);return _0x157ac1['render'](),this['on']('change:_lastItem',(_0x1bb444,_0x50e9a8,_0x461383,_0x3d7694)=>{_0x3d7694&&_0x157ac1['unbind']('minHeight'),_0x461383?_0x157ac1['bind']('minHeight')['to'](_0x461383,'bottom'):_0x157ac1['minHeight']=null;}),_0x157ac1;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4ec285){const _0x3ff8ea=this['_sidebarItemViewToAnnotation']['get'](_0x4ec285),_0x28f0c7=_0x3ff8ea&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3ff8ea)-0x1);return _0x28f0c7&&this['getSidebarItemView'](_0x28f0c7)||null;}['_getItemAfter'](_0x121859){const _0x54eae6=this['_sidebarItemViewToAnnotation']['get'](_0x121859),_0x35871f=_0x54eae6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x54eae6)+0x1);return _0x35871f&&this['getSidebarItemView'](_0x35871f)||null;}['_alignBeforeItem'](_0x5682ba,_0x3f4d26){_0x5682ba['updateHeight']();const _0x2c6cf5=G(_0x3f4d26['bottom']+this['_spaceBetweenItems'],_0x5682ba['top']);return!!_0x2c6cf5&&(this['_setItemTop'](_0x3f4d26,_0x3f4d26['top']-_0x2c6cf5),!0x0);}['_alignAfterItem'](_0x266c7c,_0x25d8aa){_0x266c7c['updateHeight']();const _0x5d3665=G(_0x266c7c['bottom']+this['_spaceBetweenItems'],_0x25d8aa['top']);return!!_0x5d3665&&(this['_setItemTop'](_0x25d8aa,_0x25d8aa['top']+_0x5d3665,!0x1),!0x0);}['_alignToTargetRect'](_0x443df1){const _0x37edcc=this['_sidebarItemViewToAnnotation']['get'](_0x443df1);if(!_0x37edcc||!_0x37edcc['target']||!_0x37edcc['targetRect'])return;const _0x3ecc8a=this['_getTargetTop'](_0x37edcc,_0x37edcc['targetRect']);this['_setItemTop'](_0x443df1,_0x3ecc8a);}['_getTargetTop'](_0x11d54c,_0x572984){if(null===_0x572984)return 0x0;if(_0x11d54c['target']instanceof _0x56aaf6)return _0x572984['top'];{const _0x3061c3=new _0x56aaf6(this['view']['element'])['top'];return _0x572984['top']-_0x3061c3;}}['_setItemTop'](_0x31e447,_0x1a3f8c,_0x5f413f=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5f413f&&(_0x1a3f8c=Math['max'](_0x1a3f8c,this['_getMaxAvailableTop'](_0x31e447))),_0x31e447['top']=_0x1a3f8c;}['_getMaxAvailableTop'](_0x39cdbd){let _0xf5babe=this['_getItemBefore'](_0x39cdbd),_0x168dcf=0x0;for(;_0xf5babe;)_0xf5babe['updateHeight'](),_0x168dcf+=this['_spaceBetweenItems']+_0xf5babe['height'],_0xf5babe=this['_getItemBefore'](_0xf5babe);return _0x168dcf;}}function G(_0x5cc8a3,_0x2a9d72){return Math['max'](_0x5cc8a3-_0x2a9d72,0x0);}function g(_0x45ff84){return null!==_0x45ff84&&'object'==typeof _0x45ff84&&0x1===_0x45ff84['nodeType'];}class e extends _0x42791b{['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(_0x621783){super(_0x621783),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x364175(),this['_refreshPositioningDebounced']=_0x5510df(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2c9a7e=this['context']['plugins']['get'](j),_0x2d2f2c=this['context']['plugins']['get'](z);_0x2c9a7e['register']('wideSidebar',this),_0x2d2f2c['container']&&_0x2c9a7e['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3f46ca){if(_0x3f46ca===this['activeAnnotation'])return;const _0x2c0c3c=this['context']['plugins']['get'](z);_0x2c0c3c['_activeAnnotation']=_0x3f46ca;const _0x36e8c4=this['activeAnnotation'];_0x2c0c3c['refresh']({'blurredAnnotation':_0x36e8c4,'activatedAnnotation':_0x3f46ca}),this['activeAnnotation']=_0x3f46ca;}['attach'](_0x1e9869){this['annotations']=_0x1e9869;const _0x306d02=this['context']['plugins']['get'](z);if(_0x306d02['_annotations']=_0x1e9869,this['isAttached'])throw new _0x441c59('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x306d02,'set:container',()=>{this['detach'](),this['listenTo'](_0x306d02,'change:container',_0x1a4882=>{_0x1a4882['off'](),this['attach'](_0x1e9869);});}),_0x306d02['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x405516=_0x220ca8=>{_0x220ca8['updateTargetRect'](),_0x306d02['addAnnotation'](_0x220ca8);};for(const _0x5349c5 of _0x1e9869)_0x405516(_0x5349c5);this['listenTo'](_0x1e9869,'add',(_0x13eaad,_0x32ced5)=>{_0x405516(_0x32ced5);}),this['listenTo'](_0x1e9869,'remove',(_0x51499d,_0x597534,_0x1c1e44)=>{_0x306d02['rearrange']({'removedAnnotation':_0x597534,'previousAnnotation':_0x1e9869['get'](_0x1c1e44-0x1),'nextAnnotation':_0x1e9869['get'](_0x1c1e44+0x1)}),_0x597534===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1e9869,'focus',(_0x21872b,_0x16b99f)=>{this['setActiveAnnotation'](_0x16b99f);}),this['listenTo'](_0x1e9869,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2b9220=this['context']instanceof _0xe14280?this['context']['editors']:new _0x364175([this['context']]);for(const _0x2afc70 of _0x2b9220)this['_integrateWithEditorAnnotations'](_0x2afc70);this['listenTo'](_0x2b9220,'add',(_0x3041ce,_0x4f78d0)=>{this['listenTo'](_0x4f78d0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4f78d0);});}),this['listenTo'](_0x2b9220,'remove',(_0x4b6c56,_0x1ee7c7)=>{_0x1ee7c7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1ee7c7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x441c59('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xc7bd31=this['context']['plugins']['get'](z);_0xc7bd31['_detachFromContainer'](this['annotations']),this['stopListening'](_0xc7bd31),this['stopListening'](this['annotations']),this['context']instanceof _0xe14280&&this['stopListening'](this['context']['editors']);for(const _0x2e6a8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2e6a8);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x33b1a8){if(!_0x33b1a8['plugins']['has']('EditorAnnotations'))return;const _0x2e4520=_0x33b1a8['plugins']['get']('EditorAnnotations'),_0x59520b=()=>{const _0x56fa09=_0x2e4520['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x56fa09[0x0]||null);};this['listenTo'](_0x2e4520,'refresh',_0x59520b),this['listenTo'](_0x2e4520,'blur',(_0x225a32,{isAnnotationTracked:_0x40c0d4})=>{this['activeAnnotation']&&_0x40c0d4(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2e4520,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xc2a6d4=>{_0x2e4520['hasDomSelection']()&&(_0x59520b(),_0xc2a6d4['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2e4520);}['_destroyEditorAnnotationsIntegration'](_0x55e85f){this['stopListening'](_0x55e85f),this['_editorAnnotations']['remove'](_0x55e85f);}}class C extends _0x50efaa{['counterView'];constructor(_0x4be117){super(_0x4be117);const _0xa6d62b=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x38f1e0,_0x3ec506)=>_0x38f1e0?'...':_0x3ec506['toString']()),this['set']('annotationType',''),this['icon']=_0x47f152,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xa6d62b['to']('annotationType',_0x511e21=>'ck-annotation-counter__badge--'+_0x511e21),_0xa6d62b['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xa6d62b['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x42791b{['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(_0x1b3408){super(_0x1b3408),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x57119a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x364175(),this['_refreshPositioningDebounced']=_0x5510df(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x46ec89(this['context']['locale']),this['balloonPanelView']=new _0x15b8ea(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x477cba){this['annotations']=_0x477cba;const _0x288a78=this['context']['plugins']['get'](z),_0x55dcd1=this['balloonPanelView'];if(_0x288a78['_annotations']=_0x477cba,this['isAttached'])throw new _0x441c59('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x288a78,'set:container',()=>{this['detach'](),this['listenTo'](_0x288a78,'change:container',_0x5780e9=>{_0x5780e9['off'](),this['attach'](_0x477cba);});}),_0x288a78['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1bee57=_0x1874aa=>{const _0xfe8d7a=new C(this['context']['locale']);_0x288a78['addAnnotation'](_0x1874aa,_0xfe8d7a),this['_annotationToNarrowView']['set'](_0x1874aa,_0xfe8d7a),_0xfe8d7a['bind']('isDirty','annotationType','number')['to'](_0x1874aa['view'],'isDirty','type','length'),_0xfe8d7a['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x55dcd1['content']['first']!==_0x1874aa['view']?(this['_showBalloon'](_0x1874aa),_0x1874aa['view']['element']['focus'](),this['setActiveAnnotation'](_0x1874aa)):this['setActiveAnnotation'](null);});};for(const _0x568f37 of _0x477cba)_0x1bee57(_0x568f37);this['listenTo'](_0x477cba,'add',(_0x4cb447,_0x2c02ac)=>{_0x1bee57(_0x2c02ac);}),this['listenTo'](_0x477cba,'remove',(_0x1461ae,_0x3f7e50,_0x5888f1)=>{this['_annotationToNarrowView']['get'](_0x3f7e50)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3f7e50),_0x288a78['rearrange']({'removedAnnotation':_0x3f7e50,'previousAnnotation':_0x477cba['get'](_0x5888f1-0x1),'nextAnnotation':_0x477cba['get'](_0x5888f1+0x1)}),_0x3f7e50===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x477cba,'focus',(_0x7a5de6,_0xcbc1)=>{this['setActiveAnnotation'](_0xcbc1);}),this['listenTo'](_0x477cba,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4864d1,_0x1f5823)=>{_0x1f5823['keyCode']===_0x465a8c['esc']&&_0x55dcd1['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x55dcd1['content']['first']),this['_hideBalloon'](),_0x1f5823['stopPropagation'](),_0x1f5823['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x359f2d,_0x90e5fe)=>{const _0xbd5670=_0x90e5fe['target'];_0x55dcd1['isVisible']&&_0x55dcd1['element']['contains'](_0xbd5670)||_0x288a78['view']['element']['contains'](_0xbd5670)||_0x359f2d['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x35dc3f=>_0x35dc3f['contains'](_0xbd5670))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x259c76=this['context']instanceof _0xe14280?this['context']['editors']:new _0x364175([this['context']]);for(const _0x5e86eb of _0x259c76)this['_integrateWithEditorAnnotations'](_0x5e86eb);this['listenTo'](_0x259c76,'add',(_0x3f4b16,_0x59c6e4)=>{this['listenTo'](_0x59c6e4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x59c6e4);});}),this['listenTo'](_0x259c76,'remove',(_0x430955,_0x26b7a1)=>{_0x26b7a1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x26b7a1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x13a5c2){if(_0x13a5c2===this['activeAnnotation'])return;const _0x1a22d8=this['context']['plugins']['get'](z);if(_0x1a22d8['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x13a5c2,'disableAnimationOnActivatedAnnotation':!0x0}),_0x13a5c2)_0x1a22d8['getSidebarItemView'](_0x13a5c2)?this['_showBalloon'](_0x13a5c2):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x13a5c2;}['detach'](){if(!this['isAttached'])throw new _0x441c59('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x131ca1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5e15fd=>_0x5e15fd['destroy']()),this['_annotationToNarrowView']['clear'](),_0x131ca1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xe14280&&this['stopListening'](this['context']['editors']);for(const _0x532a61 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x532a61);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'](_0x11a426){if(!_0x11a426['plugins']['has']('EditorAnnotations'))return;const _0x555960=_0x11a426['plugins']['get']('EditorAnnotations'),_0x3e2378=this['context']['plugins']['get'](z),_0xff5f0d=this['annotations'],_0x4315a5=this['balloonPanelView'],_0x293d5a=()=>{const _0x47673b=_0x555960['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x47673b),this['setActiveAnnotation'](_0x47673b[0x0]||null);};this['listenTo'](_0x555960,'refresh',_0x293d5a),this['listenTo'](_0x555960,'blur',(_0x55bd7d,{isAnnotationTracked:_0x621323})=>{this['activeAnnotation']&&_0x621323(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x555960,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xff5f0d,'blur',_0x50d2f0=>{_0x555960['hasDomSelection']()&&_0x50d2f0['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xbe01e1,_0x721263)=>{const _0x51e94d=_0x721263['target'];_0x4315a5['isVisible']&&_0x4315a5['element']['contains'](_0x51e94d)||_0x3e2378['view']['element']['contains'](_0x51e94d)||this['activeAnnotation']&&_0x555960['hasDomSelection']()&&(_0x293d5a(),_0xbe01e1['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x555960);}['_destroyEditorAnnotationsIntegration'](_0x1b6da4){_0x1b6da4&&(this['stopListening'](_0x1b6da4),this['_editorAnnotations']['remove'](_0x1b6da4));}['_setSelectedAnnotations'](_0x13e394){for(const _0x5d5263 of this['_selectedAnnotations'])_0x13e394['includes'](_0x5d5263)||this['_manuallyClosedAnnotationViews']['delete'](_0x5d5263['view']);this['_selectedAnnotations']=_0x13e394;}['_refreshPositioning'](){const _0x429594=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x429594['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x5e5f67){if(this['_manuallyClosedAnnotationViews']['has'](_0x5e5f67['view']))return;const _0x5f5493=this['balloonPanelView']['content']['first'];_0x5f5493!==_0x5e5f67['view']?(_0x5f5493&&this['_detachListeners'](_0x5f5493),this['_attachListeners'](_0x5e5f67['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x5e5f67['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2172d6=this['balloonPanelView']['content']['first'],_0x77485c=_0x2172d6&&this['annotations']['getByView'](_0x2172d6);if(!_0x77485c||!this['_annotationToNarrowView']['has'](_0x77485c))return;const _0x113500=this['_annotationToNarrowView']['get'](_0x77485c)['element'],_0x597e5b=(function(){const _0x145cb7=_0x15b8ea['defaultPositions'];return[_0x145cb7['southArrowNorthEast'],_0x145cb7['northArrowSouthEast'],_0x145cb7['southArrowNorth'],_0x145cb7['northArrowSouth'],_0x145cb7['southArrowNorthWest'],_0x145cb7['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x113500,'positions':_0x597e5b});}['_hideBalloon'](){const _0x527b4d=this['balloonPanelView'],_0x2ebc04=_0x527b4d['content']['first'];_0x2ebc04&&(this['_detachListeners'](_0x2ebc04),_0x527b4d['unpin'](),_0x527b4d['content']['clear']());}['_attachListeners'](_0x1f8d8f){this['listenTo'](_0x1f8d8f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1f8d8f,'Esc',(_0x3565ee,_0x2c0528)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1f8d8f),this['_hideBalloon'](),_0x2c0528();});}['_detachListeners'](_0x45aaa9){this['stopListening'](_0x45aaa9);}}class c extends _0x3a30de{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x45ef95,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23212c){super(_0x23212c),_0x23212c['editing']['view']['addObserver'](_0x17a1e9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x23212c['plugins']['get'](_0x45ef95),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x21e471=this['editor']['plugins']['get'](j);_0x21e471['context']===this['editor']&&(_0x21e471['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x299038,_0x27ac93)=>{const _0x44cd5f=this['_balloon'];if(this['isAttached']&&_0x44cd5f['visibleView']){const _0x5a0b53=this['annotations']['getByView'](_0x44cd5f['visibleView']);_0x5a0b53&&this['_closeAnnotation'](_0x5a0b53),_0x27ac93();}}));}['afterInit'](){const _0x45ccf2=this['editor']['plugins']['get'](j);_0x45ccf2['context']===this['editor']&&(_0x45ccf2['hasActive']()||_0x45ccf2['switchTo']('inline'));}['setActiveAnnotation'](_0x74fdbe){_0x74fdbe!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x74fdbe&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x74fdbe)&&this['_addAnnotationToBalloon'](_0x74fdbe,!0x0),_0x74fdbe['isActive']=!0x0),_0x74fdbe||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x74fdbe);}['attach'](_0xe35a2a){this['annotations']=_0xe35a2a;const _0x4cd00e=this['editor']['plugins']['get'](j),_0x144783=this['_balloon'];if(this['isAttached'])throw new _0x441c59('inlineannotations-attach-already-attached',this);if(_0x4cd00e['context']!==this['editor'])throw new _0x441c59('inlineannotations-not-allowed-with-context',this);const _0x4c41fa=this['editor']['plugins']['get'](b);this['listenTo'](_0x4c41fa,'refresh',()=>{const _0x293a2b=_0x4c41fa['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x24c3d0,_0x50ebe6;!this['_forceRefresh']&&(_0x24c3d0=_0x293a2b,_0x50ebe6=this['_selectedAnnotations'],_0x24c3d0['length']===_0x50ebe6['length']&&_0x24c3d0['every'](_0x4fe6c8=>_0x50ebe6['includes'](_0x4fe6c8)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x293a2b),this['setActiveAnnotation'](_0x293a2b[0x0]||null));}),this['listenTo'](_0x4c41fa,'blur',(_0x1a904e,{isAnnotationTracked:_0x4f398e})=>{this['activeAnnotation']&&_0x4f398e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4027f1,_0x17f31d,_0x260665)=>{_0x260665||this['setActiveAnnotation'](null);}),this['listenTo'](_0xe35a2a,'remove',(_0x48dbb6,_0x13e414)=>{this['_removeAnnotationFromBalloon'](_0x13e414),_0x13e414===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x144783,'change:visibleView',(_0x14203c,_0x5a1eac,_0x17905a,_0x538a10)=>{_0x538a10&&this['stopListening'](_0x538a10);const _0xc64582=_0xe35a2a['getByView'](_0x17905a);_0x17905a&&_0xc64582&&(this['listenTo'](_0x17905a,'change:height',()=>{_0x144783['updatePosition']();}),this['listenTo'](_0x17905a,'Esc',()=>{this['_closeAnnotation'](_0xc64582),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xc64582&&this['setActiveAnnotation'](_0xc64582));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x144783['visibleView']&&(_0xe35a2a['getByView'](_0x144783['visibleView'])&&_0x144783['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 _0x441c59('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x28c488 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x28c488);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x3340c3){for(const _0x15a374 of this['_selectedAnnotations'])_0x3340c3['includes'](_0x15a374)||this['_manuallyClosed']['delete'](_0x15a374);for(const _0x3da51e of this['annotations'])_0x3340c3['includes'](_0x3da51e)||this['_removeAnnotationFromBalloon'](_0x3da51e);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x461173 of _0x3340c3)this['_addAnnotationToBalloon'](_0x461173);}this['_selectedAnnotations']=_0x3340c3;}['_addAnnotationToBalloon'](_0x1f7490,_0x3c82ee=!0x1){this['_manuallyClosed']['has'](_0x1f7490)||(this['_addedAnnotations']['has'](_0x1f7490)||this['_balloon']['hasView'](_0x1f7490['view'])||(this['_addedAnnotations']['add'](_0x1f7490),this['_balloon']['add']({'stackId':_0x1f7490['view']['id'],'view':_0x1f7490['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1f7490)}})),_0x3c82ee&&this['_balloon']['showStack'](_0x1f7490['view']['id']));}['_getBalloonTargetForAnnotation'](_0xfa9f41){const _0x474fa3=_0xfa9f41['target'],_0x2a8ac2=this['editor']['editing']['view'],_0x2ebb18=_0x2a8ac2['document']['selection']['getFirstRange'](),_0x5a53cd=_0x2a8ac2['domConverter']['viewRangeToDom'](_0x2ebb18);if(_0x5a53cd['collapse'](!0x0),_0x474fa3){if(_0x474fa3 instanceof _0x56aaf6)return _0x474fa3;let _0x3a0a46=[];for(const _0x4ec7ad of _0x474fa3)_0x3a0a46['push'](...F(_0x4ec7ad['getClientRects']()));_0x3a0a46=function(_0xf070f2){const _0x1f863f=[];let _0x568f7a=_0xf070f2[0x0];for(let _0x4b3987=0x1;_0x4b3987<_0xf070f2['length'];_0x4b3987++)P(_0x568f7a,_0xf070f2[_0x4b3987])?_0x568f7a['width']+=_0xf070f2[_0x4b3987]['width']:(_0x1f863f['push'](_0x568f7a),_0x568f7a=_0xf070f2[_0x4b3987]);return _0x1f863f['push'](_0x568f7a),_0x1f863f;}(_0x3a0a46);const _0x7dfcb6=_0x5a53cd['getBoundingClientRect']();return _0x3a0a46['find'](_0x385588=>_0x385588['top']<=_0x7dfcb6['top']&&_0x385588['bottom']>=_0x7dfcb6['bottom']&&_0x385588['left']<=_0x7dfcb6['left']&&_0x385588['right']>=_0x7dfcb6['right'])||_0x3a0a46[0x0];}return _0xfa9f41['targetRect']||_0x5a53cd;}['_removeAnnotationFromBalloon'](_0x310cbb){this['_addedAnnotations']['has'](_0x310cbb)&&this['_balloon']['hasView'](_0x310cbb['view'])&&(this['_addedAnnotations']['delete'](_0x310cbb),this['_balloon']['remove'](_0x310cbb['view']));}['_closeAnnotation'](_0x441422){this['_manuallyClosed']['add'](_0x441422),this['_removeAnnotationFromBalloon'](_0x441422);}}function F(_0xc2b08e){return Array['from'](_0xc2b08e)['map'](DOMRect['fromRect']);}function P(_0x27f7a2,_0x5a9839){return _0x27f7a2['top']===_0x5a9839['top']&&_0x27f7a2['bottom']===_0x5a9839['bottom']&&_0x27f7a2['right']===_0x5a9839['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x461f32,_0x369c23){super(_0x461f32),this['set']('isEmpty',!_0x369c23['length']),this['focusTracker']=new _0x4cfdf8(),this['_annotationViews']=_0x369c23,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x59c832({'focusables':_0x369c23,'focusTracker':this['focusTracker']}),this['listenTo'](_0x369c23,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x369c23,'remove',(_0x115198,_0x16e8b8)=>{_0x16e8b8['isActive']&&this['focus'](),_0x369c23['length']||(this['isEmpty']=!0x0);});const _0x50a333=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x461f32,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x369c23},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x50a333['if']('isEmpty','ck-hidden',_0x286753=>!_0x286753)]},'children':[{'text':N(_0x461f32,'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 _0x408a4d of this['_annotationViews'])this['focusTracker']['add'](_0x408a4d['element']);this['_annotationViews']['on']('change',(_0x46c07a,{added:_0x3be8d4,removed:_0x49f9c5})=>{for(const _0x85c89a of _0x3be8d4)this['focusTracker']['add'](_0x85c89a['element']);for(const _0x57b758 of _0x49f9c5)this['focusTracker']['remove'](_0x57b758['element']);});}}class p extends _0x42791b{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5cc76e){super(_0x5cc76e),this['archivedThreads']=new _0x364175();}['init'](){const _0x2f6a65=this['context'],_0x4f36c7=_0x2f6a65['plugins']['get'](o),_0xe5d142=_0x2f6a65['plugins']['get'](y);this['listenTo'](_0x4f36c7,'addCommentThread',(_0x43471e,{threadId:_0x586d5d})=>{const _0x581208=_0x4f36c7['getCommentThread'](_0x586d5d);_0x581208['archivedAt']&&this['archivedThreads']['add'](_0x581208,this['_calculatePosition'](_0x581208['archivedAt'])),this['listenTo'](_0x581208,'change:archivedAt',(_0x33e493,_0x452df7,_0x2bcd18)=>{_0x2bcd18?this['archivedThreads']['has'](_0x581208)||this['archivedThreads']['add'](_0x581208,this['_calculatePosition'](_0x581208['archivedAt'])):this['archivedThreads']['has'](_0x581208)&&this['archivedThreads']['remove'](_0x581208);});}),this['listenTo'](_0x4f36c7,'removeCommentThread',(_0x45bc33,{threadId:_0x19c1db})=>{const _0x48b87e=_0x4f36c7['getCommentThread'](_0x19c1db);this['stopListening'](_0x48b87e),this['archivedThreads']['has'](_0x48b87e)&&this['archivedThreads']['remove'](_0x48b87e);},{'priority':'highest'}),this['listenTo'](_0xe5d142['collection'],'focus',(_0x430ec3,_0xabed21)=>{_0xabed21['isVisible']||(_0xabed21['isActive']=!0x0,_0xe5d142['activate'](_0xabed21));});}['_calculatePosition'](_0xf41ab6){const _0xdcfc85=[...this['archivedThreads']]['findIndex'](_0x3a6946=>_0x3a6946['archivedAt']<_0xf41ab6);return _0xdcfc85>-0x1?_0xdcfc85:this['archivedThreads']['length'];}}class a extends _0x3a30de{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x5adb31];}constructor(_0x46bd84){super(_0x46bd84),this['annotationViews']=new _0x33ceff(),this['_pendingThreads']=[];}['init'](){const _0x459f6c=this['editor'],_0x3921d8=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x459f6c['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x50efaa,!0x0)),_0x459f6c['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5d69de=this['_createCommentsArchiveButton'](_0x17389d);return _0x5d69de['set']({'role':'menuitemcheckbox'}),_0x5d69de;});const _0x32fd71=_0x459f6c['plugins']['get'](p),_0x4a34d8=_0x459f6c['plugins']['get']('Annotations'),_0x4f5c53=_0x459f6c['plugins']['get']('CommentsRepository');_0x32fd71['archivedThreads']['forEach'](_0x3739c2=>{this['_handleNewThread'](_0x3739c2);}),this['listenTo'](_0x32fd71['archivedThreads'],'add',(_0x44382f,_0x403909)=>{this['_handleNewThread'](_0x403909);}),this['listenTo'](_0x4a34d8['collection'],'add',(_0x2674a7,_0x4a0009)=>{const _0x593560=this['_pendingThreads']['find'](_0x29706d=>{const _0x5ca2e2=_0x4f5c53['_threadToController']['get'](_0x29706d);return _0x5ca2e2&&_0x4a0009['innerView']===_0x5ca2e2['view'];});if(_0x593560){const _0x5f1ebd=this['_calculatePosition'](_0x593560['archivedAt']);this['annotationViews']['add'](_0x4a0009['view'],_0x5f1ebd),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x593560),0x1);}}),this['listenTo'](_0x32fd71['archivedThreads'],'remove',(_0x15eed5,_0x4c4f71)=>{const _0x2c3b9b=_0x459f6c['config']['get']('collaboration.channelId');if(!_0x2c3b9b||_0x4c4f71['channelId']===_0x2c3b9b){if(this['_pendingThreads']['includes'](_0x4c4f71))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4c4f71),0x1);else{const _0x5a3cca=_0x4f5c53['_threadToController']['get'](_0x4c4f71),_0x35a737=_0x4a34d8['getByInnerView'](_0x5a3cca['view']);this['annotationViews']['remove'](_0x35a737['view']),this['stopListening'](_0x35a737['focusableElements']);}}}),this['listenTo'](_0x4a34d8['collection'],'add',(_0x2f62a1,_0x59f216)=>{this['listenTo'](_0x59f216,'escape',_0x3921d8);}),this['listenTo'](_0x4a34d8['collection'],'remove',(_0x4e9f4c,_0x50a1d2)=>{this['stopListening'](_0x50a1d2,'escape',_0x3921d8);});}['_handleNewThread'](_0x315d69){const _0x4aea47=this['editor']['plugins']['get']('CommentsRepository'),_0x130954=this['editor']['plugins']['get']('Annotations'),_0x282270=this['editor']['config']['get']('collaboration.channelId');if(!_0x282270||_0x315d69['channelId']===_0x282270){const _0x457303=_0x4aea47['_threadToController']['get'](_0x315d69);if(!_0x457303)return void this['_pendingThreads']['push'](_0x315d69);const _0x29b631=this['_calculatePosition'](_0x315d69['archivedAt']),_0x3f8ab7=_0x130954['getByInnerView'](_0x457303['view']);_0x3f8ab7['isVisible']&&_0x130954['_visibleAnnotations']['remove'](_0x3f8ab7),this['annotationViews']['add'](_0x3f8ab7['view'],_0x29b631);}}['_calculatePosition'](_0x101a93){const _0x497635=this['editor']['config']['get']('collaboration.channelId'),_0x5c186d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4a1cb4=>_0x4a1cb4['channelId']===_0x497635)['findIndex'](_0x1eae3c=>_0x1eae3c['archivedAt']<_0x101a93);return _0x5c186d<0x0||_0x5c186d>this['annotationViews']['length']?this['annotationViews']['length']:_0x5c186d-0x1;}['_toggleDialog'](){const _0x26ccdc=this['editor'],_0x59e3ef=_0x26ccdc['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x26ccdc['locale'],this['annotationViews'])),'commentsArchive'===_0x59e3ef['id']?_0x59e3ef['hide']():_0x59e3ef['show']({'id':'commentsArchive','title':N(_0x26ccdc['locale'],'COMMENTS_ARCHIVE'),'icon':_0x234f73,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x152236['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0xd0948,_0x53b975=!0x1){const _0x4ac2ca=this['editor']['locale'],_0x742c78=this['editor']['plugins']['get']('Dialog'),_0xede50a=new _0xd0948(_0x4ac2ca);return _0xede50a['bind']('isEnabled')['to'](this,'isEnabled'),_0xede50a['bind']('isOn')['to'](_0x742c78,'id',_0xd3ad30=>'commentsArchive'===_0xd3ad30),_0xede50a['set']({'label':N(_0x4ac2ca,'COMMENTS_ARCHIVE'),'icon':_0x234f73,'isToggleable':!0x0}),_0x53b975&&(_0xede50a['tooltip']=!0x0),this['listenTo'](_0xede50a,'execute',()=>this['_toggleDialog']()),_0xede50a;}['_hideDialogOnAnnotationEscape']=_0xa056f1=>{const _0x69216e=_0xa056f1['source'];if(!this['annotationViews']['has'](_0x69216e['view']))return;const _0x1a7d88=this['editor']['plugins']['get']('Dialog');_0x1a7d88['isOpen']&&'commentsArchive'===_0x1a7d88['id']&&(_0x1a7d88['hide'](),_0xa056f1['stop']());};}class gi extends _0x3a30de{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|