@ckeditor/ckeditor5-comments 45.2.1-alpha.7 → 45.2.1-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- package/package.json +18 -18
- package/src/comments/commentsediting.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x18d4ee={}){function _0x13df30(_0x3ee707){return _0x3ee707['map'](_0x3226d7=>String['fromCharCode'](_0x3226d7))['join']('');}(_0x18d4ee=Object['assign']({},_0x18d4ee))['plugins']||(_0x18d4ee['plugins']=Rt['defaultPlugins']),super(_0x18d4ee),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x13df30([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13df30([0x76,0x69,0x65,0x77])][_0x13df30([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x13df30([0x61,0x75,0x74,0x6f]),this[_0x13df30([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x13df30([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x13df30([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x13df30([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x13df30([0x6f,0x6b])});}['create'](){const _0x14759d=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x14759d))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5e1a98=>{const _0x4d839c=this['model']['document']['getRoot'](),_0x5c1c17=_0x4d839c&&_0x4d839c['getChild'](_0x4d839c['childCount']-0x1);_0x5e1a98['setSelection'](_0x5c1c17,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x5ca7dc=this['editing']['view'],_0x21b71d=_0x5ca7dc['document']['getRoot'](),_0x3bce32=_0x21b71d['getChild'](0x0);_0x21b71d['childCount']>0x1||!_0x3bce32||'p'!=_0x3bce32['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x5ca7dc,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3bce32['placeholder']=this['placeholder']),Ft({'view':_0x5ca7dc,'element':_0x3bce32,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3bce32);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x426032,_0x2103fc={}){super(_0x426032),this['editor']=null,this['_editorConfig']=_0x2103fc,this['set']('value',_0x2103fc['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x426032,'Reply...')),this['set']('submitLabel',E(_0x426032,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1f412d(),this['focusCycler']=new _0x45831b({'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',(_0x12779b,_0x417691)=>{this['cancelButtonView']['fire']('execute'),_0x417691();}),this['keystrokes']['set']('Ctrl+Enter',(_0x33df36,_0xc10476)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xc10476());}),this['on']('submit',(_0x435bfa,_0x46d092)=>{_0x46d092['length']>0xfde8?(alert(E(_0x426032,'TOO_LONG_COMMENT_ALERT',[_0x46d092['length'],0xfde8])),_0x435bfa['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2a7d1a=this['editor'];this['element']['insertBefore'](_0x2a7d1a['ui']['element'],this['element']['firstChild']),_0x2a7d1a['model']['document']['on']('change',()=>this['value']=_0x2a7d1a['getData']()),_0x2a7d1a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2a7d1a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2f844e){-0x1===_0x2f844e?(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:_0x35eb3a}=this,_0x5dcd6f=new _0x151fe8(_0x35eb3a);return _0x5dcd6f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5dcd6f['withText']=!0x0,_0x5dcd6f['bind']('label')['to'](this,'submitLabel'),_0x5dcd6f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5dcd6f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1a1052,_0x96bc98)=>!_0x96bc98&&!!_0x1a1052['trim']()),_0x5dcd6f;}['_createCancelButton'](){const {locale:_0x118cb5}=this,_0x528a9b=new _0x151fe8(_0x118cb5);return _0x528a9b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x528a9b['label']=E(_0x118cb5,'Cancel'),_0x528a9b['withText']=!0x0,_0x528a9b['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x528a9b;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x503d03=>{this['focusTracker']['add'](_0x503d03['element']);}),this['focusables']['on']('change',(_0x58bda7,_0x2407be)=>{for(const _0x4ac6f1 of Array['from'](_0x2407be['added'])['reverse']())this['focusTracker']['add'](_0x4ac6f1['element']);});}}class ie extends kt{constructor(_0x2cde65,_0x34dd86,_0x6e01){super(_0x2cde65),this['commentInputView']=new hs(_0x2cde65,_0x6e01),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x38ce11,_0x2c3e1c)=>_0x38ce11||!!_0x2c3e1c),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 _0x8e27e6(_0x2cde65,_0x34dd86),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'](_0x180b53){this['commentInputView']['focus'](_0x180b53);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x209c3f,_0x2cd9c0)=>{const {submitButtonView:_0x114539,cancelButtonView:_0x24c8c1,editor:_0x211388}=this['commentInputView'];[_0x114539['element'],_0x24c8c1['element'],_0x211388?_0x211388['editing']['view']['getDomRoot']():null]['filter'](_0x13b6ad=>_0x13b6ad)['some'](_0x15e032=>_0x15e032['contains'](_0x2cd9c0['target']))||(this['focus'](),_0x2cd9c0['preventDefault']());});}}class cs extends kt{constructor(_0x2b3fc9){super(_0x2b3fc9);const _0x50c75e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x50c75e['to']('count',_0x19f309=>E(_0x2b3fc9,'NUMBER_OF_COMMENTS',_0x19f309))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1d6ed2,_0x5f2951,_0x3b3988){super(_0x1d6ed2);const _0x5da32a=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5f2951['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5f2951,this['_config']=_0x3b3988,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1f412d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x45831b({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x48d791=>this['commentViews']['map'](_0x1a113f=>_0x1a113f['element'])['includes'](_0x48d791['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x1d6ed2),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5dede6=>_0x5dede6-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4da818 of _0x5f2951['comments'])this['_handleNewCommentModel'](_0x4da818);this['_handleInfoComment'](),this['listenTo'](_0x5f2951['comments'],'add',(_0x33a2cf,_0x434b69)=>{const _0x55f039=this['_calculatePosition'](_0x434b69);this['length']++,this['_handleNewCommentModel'](_0x434b69,_0x55f039),this['refreshVisibleViews']();}),this['listenTo'](_0x5f2951['comments'],'remove',(_0x3be63a,_0x428353)=>{this['length']--,this['_handleRemoveCommentModel'](_0x428353),this['refreshVisibleViews']();}),this['listenTo'](_0x5f2951,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5f2951,'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',_0x5da32a['if']('length','ck-hidden',_0x104f77=>!_0x104f77)],'aria-label':E(_0x1d6ed2,'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'](_0x7843f5){-0x1===_0x7843f5?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4747db of this['commentViews'])_0x4747db['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3dafc1,_0x2e44b4){const _0x5920a7=new this['_config']['CommentView'](this['locale'],_0x3dafc1,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5920a7['viewUid']=_0x3dafc1['id'],_0x5920a7['delegate']('removeComment')['to'](this),_0x5920a7['delegate']('updateComment')['to'](this),_0x5920a7['delegate']('resolveCommentThread')['to'](this),_0x5920a7['delegate']('editorReady')['to'](this),_0x5920a7['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5920a7,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5920a7,_0x2e44b4);}['_calculatePosition'](_0x14c302){const _0x5bb645=this['_model']['_findOptimalIndex'](_0x14c302);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x14c302['authoredAt']?_0x5bb645-0x1:_0x5bb645:_0x5bb645-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x368a2f={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x368a2f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x368a2f));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x244a79){const _0x332a99=this['commentViews']['remove'](_0x244a79['id']);this['stopListening'](_0x332a99),_0x332a99['isEditMode']&&this['_updateHasDirtyComment'](),_0x332a99['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1120e2=>_0x1120e2['isEditMode']);}['_rearrangeCollapse'](){const _0x5788b3=function(_0x1d14b3){const _0x52a0b0=new _0x28495a();for(const _0x4f6243 of _0x1d14b3)_0x52a0b0['add'](_0x4f6243);return _0x52a0b0;}(this['commentViews']),_0x51416e=this['_collapsedCommentsView']['count'];for(let _0x1ddc1b=0x1;_0x1ddc1b<=_0x51416e;_0x1ddc1b++)_0x5788b3['remove'](0x1);for(const _0x4056eb of _0x5788b3)_0x4056eb['collapse']();_0x51416e>0x0&&_0x5788b3['add'](this['_collapsedCommentsView'],0x1),as(_0x301362(Array['from'](this['visibleViews']),Array['from'](_0x5788b3)),this['visibleViews'],_0x5788b3);}['_rearrangeExpand'](){as(_0x301362(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x491541 of this['visibleViews'])_0x491541['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x54bbc7=>{this['focusTracker']['add'](_0x54bbc7['element']),this['keystrokes']['listenTo'](_0x54bbc7['element']);}),this['commentViews']['on']('change',(_0x290e1e,_0x3676ad)=>{for(const _0x47e60f of _0x3676ad['removed'])this['focusTracker']['remove'](_0x47e60f['element']),this['keystrokes']['stopListening'](_0x47e60f['element']);for(const _0x43e534 of Array['from'](_0x3676ad['added'])['reverse']())this['focusTracker']['add'](_0x43e534['element']),this['keystrokes']['listenTo'](_0x43e534['element']);});}}function as(_0x35dbcc,_0x1d6c18,_0x5b6b0c){let _0x2cdb37=0x0;for(const _0x3ae6cc of _0x35dbcc)switch(_0x3ae6cc){case'insert':_0x1d6c18['add'](_0x5b6b0c['get'](_0x2cdb37),_0x2cdb37),_0x2cdb37++;break;case'delete':_0x1d6c18['remove'](_0x2cdb37);break;case'equal':_0x2cdb37++;}}class ls extends kt{constructor(_0x409609){super(_0x409609);const _0x4b99c1=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4b99c1['to']('contextValue',_0x499a03=>E(_0x409609,'THREAD_CONTEXT_LABEL',_0x499a03)),'tabindex':-0x1},'children':[{'text':_0x4b99c1['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x40cf42,_0x3ee98b){super(_0x40cf42);const _0xc02e95=this['bindTemplate'];this['_model']=_0x3ee98b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1f412d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x45831b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x281cb4=>!!_0x281cb4),this['bind']('contextValue')['to'](this['_model'],'context',_0x5456fe=>_0x5456fe&&_0x5456fe['value']?this['_trimContextValue'](_0x5456fe['value']):E(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',_0xc02e95['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 _0x3532e5=new _0x151fe8(this['locale']);return _0x3532e5['label']=E(this['locale'],'Reopen'),_0x3532e5['tooltip']=E(this['locale'],'Reopen'),_0x3532e5['icon']=_0x4d28c0,_0x3532e5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x393af7=>!_0x393af7),_0x3532e5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x37baa3,_0x4cb30b)=>_0x37baa3&&_0x4cb30b),_0x3532e5['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3532e5;}['_trimContextValue'](_0x26696f){if(_0x26696f['length']<0x96)return _0x26696f;const _0x3a1603=_0x26696f['lastIndexOf']('\x20',0x93);return _0x26696f['substring'](0x0,_0x3a1603>-0x1?_0x3a1603:0x93)+'...';}['_attachContextActions'](){const _0x3bd6f0=this['element']['querySelector']('.ck-context'),_0x5d382c=_0x3bd6f0['querySelector']('.ck-context__value');this['listenTo'](_0x3bd6f0,'mouseenter',()=>{_0x5d382c['offsetWidth']<_0x5d382c['scrollWidth']&&_0x3bd6f0['classList']['add']('overlay');}),this['listenTo'](_0x3bd6f0,'mouseleave',()=>{_0x3bd6f0['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x571b60 of this['focusables'])this['focusTracker']['add'](_0x571b60['element']),this['keystrokes']['listenTo'](_0x571b60['element']);}['_createContextView'](){const _0x26acbc=new ls(this['locale']);return _0x26acbc['bind']('contextValue')['to'](this),_0x26acbc;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5fb521,_0x271736,_0x564b73,_0x26919c){super(_0x5fb521),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x271736,this['_localUser']=_0x564b73,this['_config']=_0x26919c,this['commentThreadHeaderView']=new Yt(_0x5fb521,_0x271736),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5fb521,E(_0x5fb521,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5fb521,_0x271736,Object['assign']({'CommentView':this['_config']['CommentView']},_0x26919c)),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',(_0x3a89fb,_0x4193ae)=>_0x3a89fb||!!_0x4193ae),this['bind']('isUnlinked')['to'](_0x271736,'unlinkedAt',_0x21246a=>!!_0x21246a),this['bind']('ariaLabel')['to'](this,'length',_0x114777=>{const _0x3b8991=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x114777,_0x3b8991]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1f412d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x45831b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xff8770=>_0xff8770['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x462ff6=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x22d8bc=_0x462ff6['commentInputView'];return _0x462ff6['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x22d8bc,'value',(_0x53ff08,_0x1cffc5,_0x7055c0,_0x20c7e0,_0x2ffc18)=>!!_0x2ffc18||!!_0x20c7e0&&_0x7055c0&&!_0x1cffc5||_0x53ff08&&_0x7055c0&&!_0x1cffc5),_0x22d8bc['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x242e08,_0x3aaa05,_0x4b599c)=>{let _0x5d48d3;return _0x5d48d3=_0x4b599c&&_0x3aaa05?'Reply\x20to\x20reopen\x20discussion...':_0x242e08?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x5d48d3);}),_0x22d8bc['bind']('submitLabel')['to'](this,'length',_0x55f433=>E(this['locale'],_0x55f433?'Reply':'Comment')),_0x22d8bc['on']('submit',(_0x4fe123,_0x5acb6e)=>{this['fire']('addComment',_0x5acb6e),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x22d8bc['on']('cancel',()=>{this['focus']();}),_0x22d8bc['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x22d8bc['on']('cancel',_0x59ab4e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x59ab4e['stop']());}),this['on']('change:isActive',(_0x51ebb4,_0x19d79b,_0x3b5517)=>{_0x3b5517||this['length']||_0x22d8bc['value']||this['fire']('removeCommentThread');}),_0x462ff6;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(rs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x19e9b6(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x197d26,target:_0x2b7ffa,type:_0x36cfe7,isVisible:_0x54b350=!0x0}){super(),this['view']=_0x197d26,this['view']['element']||this['view']['render'](),this['_type']=_0x36cfe7,this['_target']=_0x2b7ffa,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x28495a([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1e8c80,_0x1e1ebb)=>{this['view']['focusTracker']['add'](_0x1e1ebb);}),this['focusableElements']['on']('remove',(_0x4ee603,_0x1bd411)=>{this['view']['focusTracker']['remove'](_0x1bd411);}),this['set']('isVisible',_0x54b350);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xcbdaf1=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0xcbdaf1),_0xcbdaf1;}get['targetRect'](){const _0x147198=this['target'];if(null===_0x147198)return null;if(_0x147198 instanceof _0x16772f)return _0x147198;const _0x1c9717=_0x147198['filter'](_0x4e077c=>function(_0x4d7b10){const _0x4605df=_0x4d7b10['offsetParent'];if(_0x4605df)return!0x0;const _0x56cd41=_0x4d7b10['getClientRects']()['item'](0x0);return!!_0x56cd41;}(_0x4e077c));return 0x0===_0x1c9717['length']?null:new _0x16772f(_0x1c9717[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x54077b){this['view']['isActive']=_0x54077b,this['view']['mainView']['isActive']=_0x54077b;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3dc001){if(!(null===_0x3dc001||_0x3dc001 instanceof _0x16772f||Array['isArray'](_0x3dc001)&&_0x3dc001['every'](_0x223980=>li(_0x223980))))throw new _0x43099f('annotation-invalid-target',null,{'target':_0x3dc001});}['_getNormalizedTarget'](){const _0x1f2ecc='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x1f2ecc)?[_0x1f2ecc]:_0x1f2ecc;}}function li(_0x24c909){return null!==_0x24c909&&'object'==typeof _0x24c909&&'nodeType'in _0x24c909&&0x1===_0x24c909['nodeType'];}class _ extends _0x28495a{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1d274a=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1f412d(),this['_focusTracker']['on']('change:isFocused',(_0x225f64,_0x2416f1,_0x30d672)=>{_0x30d672||this['fire']('blur');});for(const _0x33ed20 of _0x1d274a)this['add'](_0x33ed20);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x45d101){if(this['has'](_0x45d101))throw new _0x43099f('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x45d101['innerView'],_0x45d101),this['_viewToAnnotation']['set'](_0x45d101['view'],_0x45d101);for(const _0x575aa0 of _0x45d101['focusableElements'])this['_focusTracker']['add'](_0x575aa0);this['listenTo'](_0x45d101['focusableElements'],'add',(_0x1e745b,_0xbd8b88)=>{this['_focusTracker']['add'](_0xbd8b88);}),this['listenTo'](_0x45d101['focusableElements'],'remove',(_0x1c9fc0,_0x3dd25a)=>{this['_focusTracker']['remove'](_0x3dd25a);}),this['listenTo'](_0x45d101['view']['focusTracker'],'change:isFocused',(_0x3e31df,_0x38702e,_0x32775b)=>{_0x32775b&&this['fire']('focus',_0x45d101);}),_0x45d101['updateTargetRect']();const _0x377ab4=this['_getOrderInContent'](_0x45d101['view']['targetRect']);return super['add'](_0x45d101,_0x377ab4);}['remove'](_0x42f1a7){if(!this['has'](_0x42f1a7))throw new _0x43099f('annotationcollection-not-existing-item',null);this['stopListening'](_0x42f1a7['view']['focusTracker']),this['stopListening'](_0x42f1a7['focusableElements']);for(const _0x36eef3 of _0x42f1a7['focusableElements'])this['_focusTracker']['remove'](_0x36eef3);return this['_viewToAnnotation']['delete'](_0x42f1a7['view']),this['_innerViewToAnnotation']['delete'](_0x42f1a7['innerView']),super['remove'](_0x42f1a7);}['getByInnerView'](_0x10b16e){return this['_innerViewToAnnotation']['get'](_0x10b16e);}['getByView'](_0x435993){return this['_viewToAnnotation']['get'](_0x435993);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x245954 of this)_0x245954['updateTargetRect']();this['_sort']();}['_sort'](){const _0xeaa013=Array['from'](this)['sort']((_0x4c1fd7,_0x54065a)=>v(_0x4c1fd7['view']['targetRect'],_0x54065a['view']['targetRect']));for(let _0x5c7c72=_0xeaa013['length']-0x1;_0x5c7c72>0x0;_0x5c7c72--){const _0x47abba=_0xeaa013[_0x5c7c72];_0x5c7c72!==this['getIndex'](_0x47abba)&&(this['remove'](_0x47abba),this['add'](_0x47abba));}}['_getOrderInContent'](_0xf4c987){let _0x51671b=0x0;if(!_0xf4c987)return this['length'];for(const _0x1863fb of this){const _0x15d5ba=_0x1863fb['view']['targetRect'];if(_0x15d5ba){if(v(_0xf4c987,_0x15d5ba)<0x0)return _0x51671b;_0x51671b++;}}return _0x51671b;}}function v(_0x2d8b3e,_0xb13abd){if(null===_0x2d8b3e&&null===_0xb13abd)return 0x0;if(null===_0x2d8b3e)return-0x1;if(null===_0xb13abd)return 0x1;const _0x2ea7e3=_0x2d8b3e['top']-_0xb13abd['top'];return 0x0==_0x2ea7e3?_0x2d8b3e['left']-_0xb13abd['left']:_0x2ea7e3;}class O extends _0x57c986{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x599975){if(super(_0x599975),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x599975 instanceof _0x243d1d){const _0x5dfd00=_0x599975['locale'];_0x599975['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x43ba78){this['collection']['add'](_0x43ba78);}['remove'](_0x5a6839){this['collection']['remove'](_0x5a6839),_0x5a6839['destroy']();}['refreshVisibility'](){for(const _0xebca12 of this['collection'])_0xebca12['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1fa2da){return this['collection']['getByInnerView'](_0x1fa2da);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xaead75 of this['collection'])_0xaead75['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x558dd8){this['fire']('_activateAnnotation',_0x558dd8);}['createAnnotation'](_0x254052){return new d(_0x254052);}['createAnnotationView'](_0x56d022,_0x2e9869){return new S(_0x56d022,_0x2e9869);}['_addActiveAnnotation'](_0x52598e){const _0xf53f07=new Set(this['activeAnnotations']);_0xf53f07['add'](_0x52598e),this['activeAnnotations']=_0xf53f07;}['_removeActiveAnnotation'](_0x31d3d3){const _0x2a854a=new Set(this['activeAnnotations']);_0x2a854a['delete'](_0x31d3d3),this['activeAnnotations']=_0x2a854a;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5a28b5=this['collection'],_0x5a5113=this['_visibleAnnotations'];function _0x30e1d4(_0x23a6c3){const _0x37abd8=_0x23a6c3['source'];_0x37abd8['isVisible']&&!_0x5a5113['has'](_0x37abd8)?_0x5a5113['add'](_0x37abd8):!_0x37abd8['isVisible']&&_0x5a5113['has'](_0x37abd8)&&_0x5a5113['remove'](_0x37abd8),_0x37abd8['view']['focusTracker']['remove'](_0x37abd8['view']['element']),_0x37abd8['view']['focusTracker']['add'](_0x37abd8['view']['element']);}this['listenTo'](_0x5a28b5,'add',(_0x1bff5a,_0x9f3f88)=>{_0x9f3f88['isVisible']&&_0x5a5113['add'](_0x9f3f88),this['listenTo'](_0x9f3f88,'change:isVisible',_0x30e1d4);}),this['listenTo'](_0x5a28b5,'remove',(_0x18068c,_0x2c82a2)=>{_0x5a5113['has'](_0x2c82a2)&&_0x5a5113['remove'](_0x2c82a2),this['stopListening'](_0x2c82a2,'change:isVisible',_0x30e1d4);});}['_setupEnterAnnotationKeystroke'](){const _0x487f9f=_0x2bbd73=>{_0x2bbd73['on']('ready',()=>{_0x2bbd73['keystrokes']['set'](_0x306a71,(_0x3f69c5,_0x1c6817)=>{const _0x4ac7fa=_0x142d43(this['activeAnnotations']['values']());_0x4ac7fa&&(_0x4ac7fa['view']['focus'](),_0x1c6817());});});};this['context']instanceof _0x243d1d?_0x487f9f(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x45afbb,_0x4e96c0)=>{_0x487f9f(_0x4e96c0);});}['_setupEscapeAnnotationHandling'](){const _0x96be22=_0x3ec6b7=>{const _0x27a0ee=_0x3ec6b7['source'],_0x2cb028=[];let _0x5f0ee8;if(Array['isArray'](_0x27a0ee['target'])){_0x5f0ee8=_0x27a0ee['target'][0x0],this['context']instanceof _0x243d1d?_0x2cb028['push'](this['context']):this['context']['editors']&&_0x2cb028['push'](...this['context']['editors']);for(const _0x42214e of _0x2cb028)for(const _0x254127 of _0x42214e['editing']['view']['domRoots']['values']())if(_0x254127['contains'](_0x5f0ee8))return void _0x42214e['editing']['view']['focus']();_0x5f0ee8['focus']();}};this['listenTo'](this['collection'],'add',(_0x4581fd,_0x2dcaa6)=>{this['listenTo'](_0x2dcaa6,'escape',_0x96be22,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3dde8d,_0x4e310d)=>{this['stopListening'](_0x4e310d,'escape',_0x96be22);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x57c986{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,lt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x42ff39){super(_0x42ff39),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1e6596=this['context']['config'];_0x1e6596['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1e6596['define']('comments.maxThreadTotalWeight',0x1f4),_0x1e6596['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1e6596['define']('comments.CommentThreadView',gt),_0x1e6596['define']('comments.CommentView',Tt),_0x1e6596['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3d3598=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x23387c,_0x4c35aa)=>this['_addCommentThread'](_0x4c35aa)),this['on']('submitCommentThread',(_0x25b78e,_0x560089)=>this['_submitCommentThread'](_0x560089)),this['on']('resolveCommentThread',(_0x118b01,_0x398a20)=>this['_resolveCommentThread'](_0x398a20)),this['on']('resolveCommentThread',(_0x5e1fb7,_0x5ca650)=>this['_updateActiveAnnotation'](_0x5ca650),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x11cedb,_0x1aac18)=>this['_reopenCommentThread'](_0x1aac18)),this['on']('reopenCommentThread',(_0x4990a4,_0x44f20e)=>this['_updateActiveAnnotation'](_0x44f20e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x14ecbd,_0x4c921a)=>this['_removeCommentThread'](_0x4c921a)),this['on']('updateCommentThread',(_0x227060,_0x3f6bbf)=>this['_updateCommentThread'](_0x3f6bbf)),this['on']('updateCommentThread',(_0x1a675a,_0x1ecefc)=>this['_updateActiveAnnotation'](_0x1ecefc),{'priority':'lowest'}),this['on']('addComment',(_0x4a33f6,_0x3e66fe)=>this['_addComment'](_0x3e66fe)),this['on']('updateComment',(_0x143f1d,_0x298ed3)=>this['_updateComment'](_0x298ed3)),this['on']('removeComment',(_0x40afa2,_0x3f5047)=>this['_removeComment'](_0x3f5047)),this['on']('addComment',(_0x12649c,{threadId:_0x4922a3,isFromAdapter:_0xf98115})=>{if(_0xf98115)return;const _0x547cb1=this['getCommentThread'](_0x4922a3),_0x290595=_0x547cb1&&this['_threadToController']['get'](_0x547cb1);_0x290595&&_0x290595['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3d3598,'change:activeAnnotations',(_0x58fee8,_0xfcef20,_0xc0e046)=>{const _0x5b8bff=Array['from'](_0xc0e046)['map'](_0x32a0b4=>this['_viewToController']['get'](_0x32a0b4['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5b8bff?_0x5b8bff['model']:null;});}set['adapter'](_0x31218e){if(this['_adapter'])throw new _0x43099f('commentsrepository-adapter-already-set');this['_adapter']=_0x31218e;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xabbafb=_t,threadId:_0x2f8514=_0x2415f3(),comments:_0x3199ba=[],unlinkedAt:_0x334982=null,resolvedAt:_0x1e982e=null,resolvedBy:_0xbd6f73=null,target:_0x2bf6e2=null,context:_0x530e08=null,attributes:_0xc8b6c2={},isResolvable:_0x553662=!0x0,isSubmitted:_0x37e482=!0x1,isFromAdapter:_0x2c5048=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xabbafb),{'channelId':_0xabbafb,'threadId':_0x2f8514,'comments':_0x3199ba,'unlinkedAt':_0x334982,'resolvedAt':_0x1e982e,'resolvedBy':_0xbd6f73,'target':_0x2bf6e2,'context':_0x530e08,'attributes':_0xc8b6c2,'isFromAdapter':_0x2c5048,'isResolvable':_0x553662,'isSubmitted':_0x37e482}),this['getCommentThread'](_0x2f8514);}['openNewCommentThread']({channelId:_0x6bb07c=_t,threadId:_0x129ea8=_0x2415f3(),target:_0x9a9be0,context:_0x3670ed=null,isResolvable:_0x82d8ef=!0x0}){if(this['_readOnlyChannels']['has'](_0x6bb07c)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x9a9be0)throw new _0x43099f('commentsrepository-missing-target');const _0x20c091=this['addCommentThread']({'channelId':_0x6bb07c,'threadId':_0x129ea8,'target':_0x9a9be0,'context':_0x3670ed,'isResolvable':_0x82d8ef});if(!_0x20c091)return null;const _0x49b289=this['_threadToController']['get'](_0x20c091),_0x1071e7=_0x49b289['view']['commentThreadInputView']['commentInputView'],_0x419069=this['context']['plugins']['get'](O),_0x9c1f30=_0x419069['getByInnerView'](_0x49b289['view']);return _0x419069['activate'](_0x9c1f30),_0x1071e7['once']('editorReady',()=>_0x1071e7['focus']()),_0x20c091;}['hasCommentThread'](_0x13904a){if('string'!=typeof _0x13904a)throw new _0x43099f('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x13904a);}['updateCommentThread']({channelId:_0x49fc0f=_t,threadId:_0x5b60db,context:_0x21d4b2,unlinkedAt:_0x140c31,attributes:_0x3eac4d,isFromAdapter:_0x28ac03=!0x1}){return this['fire'](Nt('updateCommentThread',_0x49fc0f),{'channelId':_0x49fc0f,'threadId':_0x5b60db,'context':_0x21d4b2,'unlinkedAt':_0x140c31,'attributes':_0x3eac4d,'isFromAdapter':_0x28ac03}),this['getCommentThread'](_0x5b60db);}['getCommentThread'](_0x25794a){if('string'!=typeof _0x25794a)throw new _0x43099f('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x25794a);}['fetchCommentThread']({channelId:_0x3ecdf7,threadId:_0x5d7189}={}){const _0xe65fe1=this['getCommentThread'](_0x5d7189);if(_0xe65fe1)return Promise['resolve'](_0xe65fe1);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x43099f('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3ecdf7,'threadId':_0x5d7189})['then'](_0xcb98d7=>this['hasCommentThread'](_0x5d7189)?this['getCommentThread'](_0x5d7189):_0xcb98d7?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3ecdf7},_0xcb98d7)):void 0x0)['catch'](_0x3ed8f0=>{throw console['error'](_0x3ed8f0),new _0x43099f('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x251254,skipNotAttached:_0x40a1d5=!0x1,skipEmpty:_0x43bb92=!0x1,toJSON:_0x163a9b=!0x1}={}){const _0xf85f07=[];for(const _0xfb1b66 of this['_threads']['values']())_0x251254&&_0xfb1b66['channelId']!==_0x251254||_0x40a1d5&&!_0xfb1b66['isAttached']||_0x43bb92&&0x0===_0xfb1b66['length']||_0xf85f07['push'](_0xfb1b66);return _0x163a9b?_0xf85f07['map'](_0x2e7f26=>_0x2e7f26['toJSON']()):_0xf85f07;}['setActiveCommentThread'](_0xbbc160){const _0x38e79a=this['context']['plugins']['get'](O);if(!_0xbbc160)return void(this['activeCommentThread']&&_0x38e79a['deactivateAll']());const _0x1082d2=this['getCommentThread'](_0xbbc160);if(!_0x1082d2)throw new _0x43099f('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xbbc160});if(!this['_threadToController']['has'](_0x1082d2))throw new _0x43099f('commentsrepository-active-not-attached',null,{'threadId':_0xbbc160});const _0x599413=_0x38e79a['getByInnerView'](this['_threadToController']['get'](_0x1082d2)['view']);_0x38e79a['activate'](_0x599413);}['switchReadOnly'](_0x28a969,_0x415d68){_0x28a969?this['_readOnlyChannels']['add'](_0x415d68):this['_readOnlyChannels']['delete'](_0x415d68),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2c6a54){return this['_readOnlyChannels']['has'](_0x2c6a54)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1a3bcb,_0x1e923c){return new vt(_0x1a3bcb,_0x1e923c);}['setPermissions'](_0x2645d7,_0x35a529=_t){this['_permissions']['set'](_0x35a529,_0x2645d7),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x38709b=_t){return this['_permissions']['has'](_0x38709b)?this['_permissions']['get'](_0x38709b):bt;}['_addCommentThread']({channelId:_0x5cc17e,threadId:_0x554f8a,comments:_0x1536e5,unlinkedAt:_0x2e9577,resolvedAt:_0x5f1dd1,resolvedBy:_0x3be7dc,target:_0x15f7fb,context:_0x76e7bb,attributes:_0x5780f1,isFromAdapter:_0x49d2c0,isResolvable:_0x3427bc,isSubmitted:_0x394d61}){if('string'!=typeof _0x554f8a)throw new _0x43099f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x554f8a});if(this['hasCommentThread'](_0x554f8a))throw new _0x43099f('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x554f8a});const _0x284f1b=new ui(this,{'channelId':_0x5cc17e,'id':_0x554f8a,'context':_0x76e7bb,'attributes':_0x5780f1,'unlinkedAt':_0x2e9577,'resolvedAt':_0x5f1dd1,'resolvedBy':_0x3be7dc?this['context']['plugins']['get'](st)['getUser'](_0x3be7dc):null,'isResolvable':_0x3427bc,'isSubmitted':_0x394d61||_0x49d2c0});this['_threads']['set'](_0x554f8a,_0x284f1b);for(const _0x51f9cb of _0x1536e5)_0x284f1b['_add'](this['_createNewComment']({'threadId':_0x554f8a,..._0x51f9cb}));return _0x15f7fb&&_0x284f1b['attachTo'](_0x15f7fb),_0x49d2c0||!_0x284f1b['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5cc17e,'threadId':_0x554f8a});}['_submitCommentThread']({channelId:_0x3c3f46,threadId:_0x514109}){if(!this['hasCommentThread'](_0x514109))throw new _0x43099f('commentsrepository-missing-comment-thread',this);const _0x32730c=this['getCommentThread'](_0x514109);if(_0x32730c['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x263153,comments:_0x4351fb,resolvedAt:_0x31759b,resolvedBy:_0xe6b9c5,context:_0xa0c081,attributes:_0x57ebc2}=_0x32730c,_0x2e08a6=this['context']['plugins']['get']('PendingActions'),_0x5ef95b=_0x2e08a6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3c3f46,'threadId':_0x263153,'comments':_0x4351fb['map'](_0x2eae30=>_0x2eae30['toJSON']()),'resolvedAt':_0x31759b,'resolvedBy':_0xe6b9c5?_0xe6b9c5['id']:_0xe6b9c5,'context':_0xa0c081,'attributes':_0x57ebc2})['then'](({comments:_0xb17404})=>{_0x2e08a6['remove'](_0x5ef95b);for(const _0x39dc9e of _0xb17404)this['_updateComment']({'channelId':_0x3c3f46,'threadId':_0x514109,'commentId':_0x39dc9e['commentId'],'createdAt':_0x39dc9e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x51afee=>{throw console['error'](_0x51afee),new _0x43099f('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x15c7eb,target:_0x1cb96c}){const _0x2f460d=this['getCommentThread'](_0x15c7eb);if(!_0x2f460d)throw new _0x43099f('commentsrepository-attach-missing-comment-thread',this);const _0x1d0971=this['context']['plugins']['get']('PendingActions'),_0x4ee005=this['context']['plugins']['get'](O),_0x123e9a=this['_createCommentThreadView'](_0x2f460d),_0x113df5=new vt(_0x2f460d,_0x123e9a);let _0x3ae95d=null;_0x123e9a['on']('change:isDirty',(_0x134227,_0x3ca446,_0x533ba4)=>{_0x533ba4?_0x3ae95d=_0x1d0971['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3ae95d&&(_0x1d0971['remove'](_0x3ae95d),_0x3ae95d=null);}),this['_threadToController']['set'](_0x2f460d,_0x113df5),this['_viewToController']['set'](_0x123e9a,_0x113df5);const _0xcd6c48=new S(this['context']['locale'],_0x123e9a);_0xcd6c48['bind']('length')['to'](_0x123e9a),_0xcd6c48['bind']('isDirty')['to'](_0x123e9a,'isDirty',_0x123e9a,'length',(_0x3d787b,_0x3067df)=>_0x3d787b||!_0x3067df),_0xcd6c48['bind']('isActive')['to'](_0x123e9a),_0xcd6c48['type']='comment';const _0x3f48d0=new d({'view':_0xcd6c48,'target':_0x1cb96c,'type':'comment','isVisible':!_0x2f460d['archivedAt']});return _0x123e9a['on']('escape',()=>{_0x3f48d0['fire']('escape');}),this['_bindAnnotationToEditors'](_0x123e9a,_0x3f48d0),_0x4ee005['add'](_0x3f48d0),_0x3f48d0;}['_bindAnnotationToEditors'](_0x32ebf9,_0x46f7d4){this['listenTo'](_0x32ebf9,'editorReady',(_0x514325,_0x33df75)=>{const _0x6b0422=_0x33df75['ui']['view']['body']['bodyCollectionContainer'];_0x46f7d4['focusableElements']['add'](_0x6b0422),this['context']instanceof _0x243d1d&&this['context']['ui']['focusTracker']['add'](_0x6b0422);},{'priority':'highest'}),this['listenTo'](_0x32ebf9,'editorDestroyed',(_0x5c797d,_0x2ad753)=>{const _0xc3b138=_0x2ad753['ui']['view']['body']['bodyCollectionContainer'];_0x46f7d4['focusableElements']['has'](_0xc3b138)&&_0x46f7d4['focusableElements']['remove'](_0xc3b138),this['context']instanceof _0x243d1d&&this['context']['ui']['focusTracker']['remove'](_0xc3b138);});}['_unbindEditors'](_0x59c114){this['stopListening'](_0x59c114,'editorReady'),this['stopListening'](_0x59c114,'editorDestroyed');}['_createCommentThreadView'](_0x3db812){const _0x21ece0=this['context']['plugins']['get'](st),{config:_0x478b05,locale:_0x2d84c7}=this['context'],_0x466ba9=pt(_0x478b05['get']('locale'),_0x2d84c7);return new(0x0,(_0x478b05['get']('comments'))['CommentThreadView'])(_0x2d84c7,_0x3db812,_0x21ece0['me'],{'editorConfig':{..._0x478b05['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x478b05['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x478b05['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x478b05['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x478b05['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x466ba9,'CommentView':_0x478b05['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x22c6cd,channelId:_0x473f22,resolvedAt:_0x3e75b0,resolvedBy:_0x225179,isFromAdapter:_0x50bf22}){if(!this['hasCommentThread'](_0x22c6cd))throw new _0x43099f('commentsrepository-missing-comment-thread',null,{'threadId':_0x22c6cd});const _0x32cf6c=this['getCommentThread'](_0x22c6cd);if(_0x32cf6c['isResolved'])throw new _0x43099f('commentsrepository-resolved-comment-thread',null,{'threadId':_0x22c6cd});const _0x422818=this['context']['plugins']['get'](st);if(_0x32cf6c['resolvedBy']=_0x422818['getUser'](_0x225179),_0x32cf6c['resolvedAt']=_0x3e75b0,_0x50bf22||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x20ac3b=this['context']['plugins']['get']('PendingActions'),_0x36105e=_0x20ac3b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x473f22,'threadId':_0x22c6cd})['then'](({resolvedAt:_0x12af78,resolvedBy:_0x3f4814})=>{_0x20ac3b['remove'](_0x36105e),_0x32cf6c['resolvedBy']['id']!==_0x3f4814&&(_0x32cf6c['resolvedBy']=_0x422818['getUser'](_0x3f4814)),_0x32cf6c['resolvedAt']=_0x12af78;})['catch'](_0x45b7ec=>{throw console['error'](_0x45b7ec),new _0x43099f('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x50b4be,channelId:_0x387e36,isFromAdapter:_0x33b745}){if(!this['hasCommentThread'](_0x50b4be))throw new _0x43099f('commentsrepository-missing-comment-thread',null,{'threadId':_0x50b4be});const _0x35b013=this['getCommentThread'](_0x50b4be);if(!_0x35b013['isResolved'])throw new _0x43099f('commentsrepository-reopen-comment-thread',null,{'threadId':_0x50b4be});if(_0x35b013['resolvedBy']=null,_0x35b013['resolvedAt']=null,_0x33b745||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4ed77f=this['context']['plugins']['get']('PendingActions'),_0x396f95=_0x4ed77f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x387e36,'threadId':_0x50b4be})['then'](()=>_0x4ed77f['remove'](_0x396f95))['catch'](_0x242071=>{throw console['error'](_0x242071),new _0x43099f('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x152014,isFromAdapter:_0x522820}){const _0x16fe0e=this['getCommentThread'](_0x152014);if(!_0x16fe0e)throw new _0x43099f('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x152014),this['_threads']['delete'](_0x152014),!_0x16fe0e['isSubmitted']||_0x522820||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5c0a08=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4dd755}=_0x16fe0e,_0x5b4d12=_0x5c0a08['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4dd755,'threadId':_0x152014})['then'](()=>_0x5c0a08['remove'](_0x5b4d12))['catch'](_0x1c2edf=>{throw console['error'](_0x1c2edf),new _0x43099f('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x736a56,unlinkedAt:_0x200531,context:_0x5eaee0,attributes:_0x3738ef,isFromAdapter:_0xd94896}){if('string'!=typeof _0x736a56)throw new _0x43099f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x736a56});if(!this['hasCommentThread'](_0x736a56))throw new _0x43099f('commentsrepository-missing-comment-thread',null,{'threadId':_0x736a56});const _0x5731b1=this['getCommentThread'](_0x736a56);let _0x2c0958=!0x1;if(void 0x0!==_0x5eaee0&&_0x5731b1['context']!==_0x5eaee0&&(_0x5731b1['context']=_0x5eaee0,_0x2c0958=!0x0),void 0x0!==_0x200531&&_0x5731b1['unlinkedAt']!==_0x200531&&(_0x5731b1['unlinkedAt']=_0x200531,_0x2c0958=!0x0),_0x3738ef&&!At(_0x3738ef,_0x5731b1['attributes'])&&(_0x5731b1['attributes']=_0x3738ef,_0x2c0958=!0x0),!_0x2c0958)return Promise['resolve']();if(!_0x5731b1['isSubmitted']||_0xd94896||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xa9b9cc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2609c2}=_0x5731b1,_0x3c1be1=_0xa9b9cc['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2609c2,'threadId':_0x736a56,'context':_0x5eaee0,'unlinkedAt':_0x200531,'attributes':_0x3738ef})['then'](()=>_0xa9b9cc['remove'](_0x3c1be1))['catch'](_0x39ea1b=>{throw console['error'](_0x39ea1b),new _0x43099f('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xc4db98){const _0x4b25ee=this['context']['plugins']['get'](O),_0x4c08c9=this['getCommentThread'](_0xc4db98);if(_0x4c08c9['_isAttached']=!0x1,this['_threadToController']['has'](_0x4c08c9)){const _0x37c365=this['_threadToController']['get'](_0x4c08c9),_0x34d78a=_0x37c365['view'],_0x33078a=_0x4b25ee['getByInnerView'](_0x34d78a);this['_threadToController']['delete'](_0x4c08c9),this['_viewToController']['delete'](_0x34d78a),_0x33078a&&_0x4b25ee['remove'](_0x33078a),_0x37c365['destroy'](),_0x34d78a['destroy']()['then'](()=>{this['_unbindEditors'](_0x34d78a);});}}['_updateActiveAnnotation']({threadId:_0x3eb569,resolvedAt:_0x1493f2,unlinkedAt:_0x4e49d4}){const _0x5ac5d9=!!_0x1493f2,_0x260828=this['context']['plugins']['get'](O),_0x1856b6=this['getCommentThread'](_0x3eb569);if(this['_threadToController']['has'](_0x1856b6)){const _0x196a3e=this['_threadToController']['get'](_0x1856b6)['view'],_0x497122=_0x260828['getByInnerView'](_0x196a3e);_0x497122&&(_0x5ac5d9&&_0x260828['_removeActiveAnnotation'](_0x497122),_0x4e49d4?_0x497122['isVisible']=!0x1:_0x497122['refreshVisibility']());}}['_getExternalAuthor'](_0xb1e0dc){const _0xfacbd1=this['context']['plugins']['get'](st),_0x2346e3=It('external:'+_0xb1e0dc),_0x27edf3=_0xfacbd1['getUser'](_0x2346e3);return _0x27edf3||_0xfacbd1['addUser']({'id':_0x2346e3,'name':_0xb1e0dc});}['_createNewComment']({threadId:_0x81e2d1,commentId:_0x3e8964=_0x2415f3(),content:_0x5a615c,authorId:_0x4f7774,createdAt:_0x479219,attributes:_0x37d532}){if('string'!=typeof _0x3e8964)throw new _0x43099f('commentsrepository-invalid-commentid');if('string'!=typeof _0x4f7774)throw new _0x43099f('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5a615c||!_0x5a615c['trim']())throw new _0x43099f('commentsrepository-invalid-comment-content');const _0x579d9b=this['context']['plugins']['get'](st)['getUser'](_0x4f7774);if(!_0x579d9b)throw new _0x43099f('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4f7774});let _0x2d06f2=null,_0x4cf84a=_0x479219;return _0x37d532?.['@external']&&(_0x2d06f2=this['_getExternalAuthor'](_0x37d532['@external']['authorName']),_0x4cf84a=new Date(_0x37d532['@external']['createdAt'])),new fi(this,{'threadId':_0x81e2d1,'id':_0x3e8964,'author':_0x2d06f2||_0x579d9b,'creator':_0x579d9b,'content':_0x5a615c,'createdAt':_0x479219,'authoredAt':_0x4cf84a,'attributes':_0x37d532});}['_addComment'](_0x52a300){let {threadId:_0x4d9b48,content:_0x5e53a8,attributes:_0x4039f0,isFromAdapter:_0x567985}=_0x52a300;const _0x112b2e=this['getCommentThread'](_0x52a300['threadId']);if(!_0x112b2e)throw new _0x43099f('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2ded1d=this['_createNewComment'](_0x52a300),{id:_0x47f48c}=_0x2ded1d;if(_0x112b2e['_add'](_0x2ded1d),_0x567985||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x112b2e['isSubmitted'])return Promise['resolve']();const _0x193665=this['context']['plugins']['get']('PendingActions'),{channelId:_0x333bab}=_0x112b2e,_0x3e9fdb=_0x193665['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4039f0||(_0x4039f0={}),this['adapter']['addComment']({'channelId':_0x333bab,'threadId':_0x4d9b48,'commentId':_0x47f48c,'content':_0x5e53a8,'attributes':_0x4039f0})['then'](_0x513665=>{_0x193665['remove'](_0x3e9fdb),_0x513665&&this['_updateComment']({'channelId':_0x333bab,'threadId':_0x4d9b48,'commentId':_0x47f48c,'createdAt':_0x513665['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3e33e0=>{throw console['error'](_0x3e33e0),new _0x43099f('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x7aafb1,commentId:_0x479ef7,content:_0x2d1610,createdAt:_0x54b0a4,attributes:_0x4b33ba,isFromAdapter:_0x1e0afc}){if(void 0x0!==_0x2d1610&&('string'!=typeof _0x2d1610||!_0x2d1610['trim']()['length']))throw new _0x43099f('commentsrepository-update-comment-invalid-content');const _0x5a95e1=this['getCommentThread'](_0x7aafb1),_0x446bd7=_0x5a95e1['getComment'](_0x479ef7);if(!_0x446bd7)throw new _0x43099f('commentsrepository-update-missing-comment',this);let _0x167db1=!0x1;if(_0x2d1610&&_0x2d1610!==_0x446bd7['content']&&(_0x446bd7['isEditable']||_0x1e0afc)&&(_0x446bd7['content']=_0x2d1610,_0x167db1=!0x0),_0x54b0a4&&_0x54b0a4!==_0x446bd7['createdAt']&&(_0x446bd7['createdAt']=_0x54b0a4,_0x446bd7['attributes']&&_0x446bd7['attributes']['@external']||(_0x446bd7['authoredAt']=_0x54b0a4),_0x167db1=!0x0),_0x4b33ba&&!At(_0x4b33ba,_0x446bd7['attributes'])&&(_0x446bd7['attributes']=_0x4b33ba,_0x167db1=!0x0),!_0x167db1)return Promise['resolve']();if(_0x5a95e1['fire']('commentUpdated'),_0x1e0afc||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2deef0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4bb5fa}=this['getCommentThread'](_0x446bd7['threadId']),_0x2bbd99=_0x2deef0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4bb5fa,'threadId':_0x7aafb1,'commentId':_0x479ef7,'content':_0x2d1610,'attributes':_0x4b33ba})['then'](()=>_0x2deef0['remove'](_0x2bbd99))['catch'](_0x3b74f2=>{throw console['error'](_0x3b74f2),new _0x43099f('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3ba7f0,commentId:_0x3d75f0,isFromAdapter:_0x192868}){const _0x264cba=this['getCommentThread'](_0x3ba7f0),_0x4dd48c=_0x264cba['getComment'](_0x3d75f0);if(!_0x4dd48c)throw new _0x43099f('commentsrepository-remove-missing-comment',this);if(_0x264cba['_remove'](_0x4dd48c),_0x192868||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x485e93=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16dbb1}=_0x264cba,_0x35abbb=_0x485e93['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x16dbb1,'threadId':_0x3ba7f0,'commentId':_0x3d75f0})['then'](()=>_0x485e93['remove'](_0x35abbb))['catch'](_0x2272bb=>{throw console['error'](_0x2272bb),new _0x43099f('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x19e9b6(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x4dd14f,_0x207c45){super();const _0x227cf8=_0x4dd14f['context']['plugins']['get'](st)['me'],_0x2eda77=_0x4dd14f['getCommentThread'](_0x207c45['threadId']),_0x4f6b0b=0x0===_0x2eda77['comments']['length'],_0x5bdfe4=_0x227cf8===_0x207c45['author'];this['id']=_0x207c45['id'],this['threadId']=_0x207c45['threadId'],this['author']=_0x207c45['author'],this['creator']=_0x207c45['creator'],this['isExternal']=Boolean(_0x207c45['attributes']&&_0x207c45['attributes']['@external']),this['set']('content',_0x207c45['content']),this['createdAt']=_0x207c45['createdAt']||new Date(),this['set']('authoredAt',_0x207c45['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2eda77,'resolvedAt'),this['set']('attributes',_0x207c45['attributes']||{}),this['bind']('isEditable')['to'](_0x4dd14f,'_permissions',()=>{const _0x31eb49=_0x4dd14f['getPermissions'](_0x2eda77['channelId'])['write'],_0x39be97=_0x4dd14f['getPermissions'](_0x2eda77['channelId'])['modifyAll'];return _0x5bdfe4&&_0x31eb49||!_0x5bdfe4&&_0x39be97;}),this['bind']('isRemovable')['to'](_0x2eda77,'isRemovable',_0x4dd14f,'_permissions',_0x65e4d9=>{const _0x59f2f8=_0x4dd14f['getPermissions'](_0x2eda77['channelId'])['write'],_0x4eb46a=_0x4dd14f['getPermissions'](_0x2eda77['channelId'])['modifyAll'];return _0x5bdfe4&&_0x59f2f8||_0x65e4d9&&_0x4f6b0b||!_0x5bdfe4&&_0x4eb46a&&!_0x4f6b0b;}),this['bind']('isReadOnly')['to'](_0x2eda77,'isReadOnly'),this['_repository']=_0x4dd14f;}get['weight'](){return Math['max'](function(_0x559ba9){const _0x23e3c2=document['createElement']('div');return _0x23e3c2['innerHTML']=_0x559ba9,_0x23e3c2['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2ce784){const {threadId:_0x30dece,id:_0x579ab4}=this;if(!this['_repository']['hasCommentThread'](_0x30dece))throw new _0x43099f('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3a1b84}=this['_repository']['getCommentThread'](_0x30dece);this['_repository']['fire'](Nt('updateComment',_0x3a1b84,_0x30dece),{'channelId':_0x3a1b84,'threadId':_0x30dece,'commentId':_0x579ab4,..._0x2ce784});}['setAttribute'](_0x4b6d13,_0x191835){const _0x18f919=wt(this['attributes']);yt(_0x18f919,_0x4b6d13,_0x191835),this['update']({'attributes':_0x18f919});}['removeAttribute'](_0x13d6ef){const _0x190ccc=wt(this['attributes']);Ct(_0x190ccc,_0x13d6ef),this['update']({'attributes':_0x190ccc});}['remove'](_0x330abd={}){if(!_0x330abd['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x59cc8a,id:_0x3844a7}=this;if(!this['_repository']['hasCommentThread'](_0x59cc8a))throw new _0x43099f('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x592dc8}=this['_repository']['getCommentThread'](_0x59cc8a);this['_repository']['fire'](Nt('removeComment',_0x592dc8,_0x59cc8a),{'channelId':_0x592dc8,'threadId':_0x59cc8a,'commentId':_0x3844a7,..._0x330abd});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3d03f7,..._0x5596bb){for(const _0x11f0a5 of _0x5596bb)void 0x0!==_0x11f0a5&&(_0x3d03f7+=':'+String(_0x11f0a5));return _0x3d03f7;}class K extends _0x429836{['refresh'](){const _0x555c86=this['editor']['model']['document']['selection'];for(const _0x1ac460 of _0x555c86['getRanges']())if(this['_hasContent'](_0x1ac460))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x455391=_0x2415f3()}={}){const _0x59ff57=this['editor']['model'],_0x4958a0=[];for(const _0x49ace7 of _0x59ff57['document']['selection']['getRanges']())this['_hasContent'](_0x49ace7)&&_0x4958a0['push'](this['_trimToContent'](_0x49ace7));_0x59ff57['change'](_0x1deb08=>{for(const _0x49eef9 of _0x4958a0){const _0x1636d4=_0x2415f3()['substr'](0x1,0x5),_0x3e175b='comment:'+_0x455391+':'+_0x1636d4;_0x1deb08['addMarker'](_0x3e175b,{'range':_0x49eef9,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5aeee9){for(const _0x26ac64 of _0x5aeee9['getItems']())if(this['_itemIsContent'](_0x26ac64))return!0x0;return!0x1;}['_itemIsContent'](_0xd7494c){return _0xd7494c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xd7494c)&&!_0xd7494c['is']('element','tableCell');}['_trimToContent'](_0x5ee94d){const _0x46df3d=_0x57e1c5=>!this['_itemIsContent'](_0x57e1c5['item']),_0x5f39bd=_0x5ee94d['start']['getLastMatchingPosition'](_0x46df3d),_0x4b8cc8=_0x5ee94d['end']['getLastMatchingPosition'](_0x46df3d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5f39bd,_0x4b8cc8);}}class P extends _0x3f67cf{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5de908){super(_0x5de908),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x10a22f=this['editor'],_0x24cd25=_0x10a22f['model']['document']['selection'],_0x4cfdd6=_0xd145ad(()=>this['refreshSelectedViews'](),0xa);_0x24cd25['on']('change:range',(_0x32661a,_0x5ac4aa)=>{_0x5ac4aa['directChange']&&(_0x4cfdd6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x10a22f['editing']['view']['document'],'change:isFocused',(_0x174e4f,_0x4f15bd,_0x20c1aa)=>{_0x20c1aa&&_0x4cfdd6();}),this['listenTo'](_0x10a22f['ui']['focusTracker'],'change:isFocused',(_0x14cd1c,_0x4b391e,_0x304306)=>{_0x304306||_0x10a22f['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x4bed0a=>this['_editorAnnotationsData']['has'](_0x4bed0a['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x435af9){if(this['_editorAnnotations']['has'](_0x435af9['view']))return;this['_editorAnnotations']['add'](_0x435af9['view']),this['editor']['ui']['focusTracker']['add'](_0x435af9['view']['element']);const _0x40f357=this['editor']['plugins']['get'](O);this['listenTo'](_0x40f357['collection'],'remove',(_0x34c370,_0x424263)=>{this['editor']['ui']['focusTracker']['remove'](_0x424263['view']['element']),this['_editorAnnotations']['delete'](_0x424263['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x10e555){if('function'!=typeof _0x10e555)throw new _0x43099f('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x10e555);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x153593,annotations:_0x4fcb28}){const _0x2f71ba=[],_0x1750cf=this['editor']['model']['document']['selection'],_0x415be2=Array['from'](_0x1750cf['getRanges']());for(const [_0x472660,_0x4b3bb0]of this['_editorAnnotationsData']){const _0x31c92d=_0x23bfca(_0x4b3bb0),_0x1207b0=_0x4fcb28['getByInnerView'](_0x472660);_0x31c92d&&_0x1207b0&&_0x2f71ba['push']({'annotation':_0x1207b0,'range':_0x31c92d});}function _0x23bfca(_0x505e24){for(const _0x3c8b85 of _0x505e24)for(const _0x484a2a of _0x415be2)if(_0x3c8b85['containsRange'](_0x484a2a,!_0x1750cf['isCollapsed']))return _0x3c8b85;return null;}return _0x2f71ba['sort']((_0x13a4f9,_0x1f3312)=>{const _0x135ad4=_0x13a4f9['range'],_0x2269a9=_0x1f3312['range'];if(!_0x135ad4['isEqual'](_0x2269a9)){if(_0x135ad4['containsRange'](_0x2269a9,!0x0))return 0x1;if(_0x2269a9['containsRange'](_0x135ad4,!0x0))return-0x1;}return _0x13a4f9['annotation']==_0x153593?-0x1:_0x1f3312['annotation']==_0x153593?0x1:0x0;})['map'](_0x7fe9db=>_0x7fe9db['annotation']);}get['_editorAnnotationsData'](){const _0x561ec5=new Map();for(const _0x436736 of Array['from'](this['_dataCollectors']))for(const [_0x4982e1,_0x114695]of _0x436736())_0x561ec5['set'](_0x4982e1,_0x114695);return _0x561ec5;}}class ct extends _0x3f67cf{['afterInit'](){const _0x1825ca=this['editor'];if(!_0x1825ca['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1825ca['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x3f67cf{constructor(_0x2445f0){super(_0x2445f0),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1661e7=this['editor'],_0x2e0426=_0x1661e7['commands']['get']('importWord'),_0x1a1e1b=_0x1661e7['plugins']['get'](st);_0x2e0426&&(_0x2e0426['on']('execute',(_0xee3ffa,[,_0x15b8d0])=>{_0x15b8d0['collaboration_features']={'comments':!0x0,'user_id':_0x1a1e1b['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2e0426,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x52aa14,_0x1f57d1){const {comment_threads:_0x50fb36}=_0x1f57d1;_0x50fb36&&_0x50fb36['forEach'](({thread_id:_0x4e64b9,comments:_0x2975e1,is_resolved:_0x545953})=>{const _0x1883fc=new Date(),_0x2ecbb6=_0x2975e1['map'](({author:_0x2092e0,content:_0x362278,created_at:_0xcf8d7f})=>({'content':_0x362278,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x1883fc,'attributes':{'@external':{'authorName':_0x2092e0,'createdAt':_0xcf8d7f?new Date(_0xcf8d7f):new Date(),'source':'importWord'}}})),_0x809aa8=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x809aa8,'threadId':_0x4e64b9,'comments':_0x2ecbb6,'resolvedAt':_0x545953?_0x1883fc:null});});}}class ut extends _0x3f67cf{constructor(_0x480c32){super(_0x480c32),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x427b59=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x427b59,'contentInsertion',(_0x505f2c,_0x3bbe0f)=>this['_removeMarkersWithoutThreads'](_0x3bbe0f['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1a0401){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1a0401;const _0x3f4efc=this['editor']['plugins']['get']('CommentsRepository');for(const _0x6e978a of _0x1a0401['keys']()){const [_0x4cbc42,_0x7095a7]=_0x6e978a['split'](':');'comment'!=_0x4cbc42||_0x3f4efc['hasCommentThread'](_0x7095a7)||_0x1a0401['delete'](_0x6e978a);}return _0x1a0401;}['_registerMarkerInClipboardPipeline'](){const _0x21e1fc=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5373a4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5373a4&&_0x21e1fc['_registerMarkerToCopy']('comment',_0x5373a4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x35e5ca){switch(_0x35e5ca){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ft extends _0x3f67cf{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x59b960,_0x3d5057)=>{if(!_0x3d5057['options']['showCommentHighlights'])return null;if(_0x3d5057['options']['ignoreResolvedComments']){const {id:_0x55df9a}=er(_0x59b960['markerName']),_0x1e5389=this['editor']['plugins']['get'](o);if(_0x1e5389['getCommentThread'](_0x55df9a)?.['isResolved']&&_0x59b960['item'])return _0x3d5057['consumable']['consume'](_0x59b960['item'],'addMarker:'+_0x59b960['markerName']),_0x3d5057['consumable']['consume'](_0x59b960['item'],'removeMarker:'+_0x59b960['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5992a6=>{_0x5992a6['on']('addMarker:comment',(_0x45c88d,_0x186499,_0x4eae4b)=>{if(!_0x4eae4b['options']['showCommentHighlights'])return;const _0x18487b=_0x186499['item'];if(!_0x18487b)return;const _0x5d592b=_0x4eae4b['mapper']['toViewElement'](_0x18487b);this['editor']['model']['schema']['isObject'](_0x18487b)&&_0x5d592b&&!_0x5d592b['getCustomProperty']('widget')&&_0x5d592b['is']('containerElement')&&_0x259056(_0x5d592b,_0x4eae4b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x28f459,{writer:_0x3e3f11,options:_0x40620d})=>{if(!_0x40620d['showCommentHighlights'])return null;const _0x14c025=_0x3e3f11['createContainerElement']('div'),_0xe8cd94=_0x3e3f11['createEmptyElement']('hr');return _0x3e3f11['addClass']('ck-horizontal-line',_0x14c025),_0x3e3f11['insert'](_0x3e3f11['createPositionAt'](_0x14c025,0x0),_0xe8cd94),_0x14c025;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x242b99,{writer:_0x5715a8,options:_0x299e7e})=>{if(!_0x299e7e['showCommentHighlights'])return null;const _0x480974=_0x5715a8['createContainerElement']('span'),_0x1090da=_0x5715a8['createEmptyElement']('img');return _0x5715a8['addClass']('image-inline',_0x480974),_0x5715a8['insert'](_0x5715a8['createPositionAt'](_0x480974,0x0),_0x1090da),_0x480974;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x21495a,{writer:_0x6562ae,options:_0x4d9142})=>{if(_0x4d9142['showCommentHighlights'])return _0x6562ae['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x7852b1,_0x22ae8c,_0x4988cd)=>{_0x4988cd['options']['showCommentHighlights']&&_0x7852b1['stop']();},{'priority':'high'});}}class r extends _0x3f67cf{static get['requires'](){return[o,P,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4575d0){super(_0x4575d0),this['set']('isThreadsLoadingPaused',!0x0),_0x4575d0['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x50b2bd,_0x8b013d,_0xa2ca75,_0x380fb7)=>{const _0x115940=_0x4575d0['plugins']['get'](o),_0x1a7591=_0xa2ca75?er(_0xa2ca75)['id']:null;_0x4575d0['model']['change'](()=>{if(_0x1a7591){const _0x535df2=this['getAllMarkersForId'](_0x1a7591);for(const _0x551433 of _0x535df2)_0x4575d0['editing']['reconvertMarker'](_0x551433);}if(_0x380fb7){const {id:_0x4c458e}=er(_0x380fb7),_0x11c8d6=_0x115940['getCommentThread'](_0x4c458e);if(_0x11c8d6&&_0x11c8d6['unlinkedAt'])return;if(_0x11c8d6&&!_0x11c8d6['isAttached'])return;const _0x1151ee=this['getAllMarkersForId'](_0x4c458e);for(const _0x281ff0 of _0x1151ee)_0x4575d0['editing']['reconvertMarker'](_0x281ff0);}}),_0x1a7591&&this['scrollToThreadMarker'](_0x1a7591);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x13cf67=this['editor'],_0x57a48d=_0x13cf67['plugins']['get'](o),_0x46e099=_0x13cf67['config']['get']('collaboration.channelId'),_0x4ed049=_0x57a48d['getCommentThreads']()['filter'](_0x109e26=>_0x109e26['channelId']!==_0x46e099);_0x13cf67['commands']['add']('addCommentThread',new K(_0x13cf67)),this['listenTo'](_0x13cf67,'change:isReadOnly',(_0x3aac3a,_0x5915ad,_0x63ec14)=>{_0x57a48d['switchReadOnly'](_0x63ec14,_0x13cf67['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x57a48d,dt('addCommentThread',_0x46e099),(_0x48c7bc,{threadId:_0xd1cbc5})=>{const _0x2e63d3=this['editor']['plugins']['get'](o)['getCommentThread'](_0xd1cbc5);_0x2e63d3?.['unlinkedAt']&&this['_attachArchivedThread'](_0xd1cbc5);}),this['listenTo'](_0x57a48d,dt('removeCommentThread',_0x46e099),(_0x34425f,{threadId:_0x4d24ce})=>{_0x13cf67['model']['enqueueChange']({'isUndoable':!0x1},_0x114e95=>{const _0x313e11=this['getAllMarkersForId'](_0x4d24ce);for(const _0x3106ef of _0x313e11)_0x114e95['removeMarker'](_0x3106ef);});}),this['listenTo'](_0x57a48d,dt('resolveCommentThread',_0x46e099),(_0x2786a6,{threadId:_0x325f41})=>{(this['_reconvertMarkers'](_0x325f41),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x325f41)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x57a48d,dt('reopenCommentThread',_0x46e099),(_0x4363da,{threadId:_0x301c29})=>{this['_reconvertMarkers'](_0x301c29);},{'priority':'low'}),this['listenTo'](_0x57a48d,dt('addComment',_0x46e099),(_0x593bb2,{threadId:_0x588f84,isFromAdapter:_0xded09a})=>{const _0x24d356=this['getAllMarkersForId'](_0x588f84);if(_0xded09a||0x0==_0x24d356['length']||!_0x57a48d['hasCommentThread'](_0x588f84))return;0x1===_0x57a48d['getCommentThread'](_0x588f84)['length']&&_0x13cf67['model']['enqueueChange']({'isUndoable':!0x1},_0x411685=>{for(const _0x163a3b of _0x24d356)_0x411685['updateMarker'](_0x163a3b,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4ed049);}['afterInit'](){!async function(_0x57496a){const _0x267f92=_0x18a196([0x67,0x76,0x57,0x73,0x49,0x4d,0x71,0x35,0x61,0x4b,0x6c,0x4c,0x72,0x62,0x6b,0x59,0x70,0x41,0x53,0x56,0x50,0x30,0x31,0x33,0x32,0x36,0x48,0x79,0x46,0x52,0x47,0x43,0x6a,0x66,0x34,0x68,0x5a,0x74,0x38,0x75,0x6d,0x54,0x4e,0x69,0x64,0x78,0x39,0x6f,0x51,0x6e,0x63,0x42,0x45,0x58,0x4a,0x4f,0x44,0x65,0x37,0x77,0x55,0x7a]),_0x3b1f58=0x210f428d,_0x57003b=0x210829ed^_0x3b1f58,_0x3b84db=window[_0x18a196([0x44,0x61,0x74,0x65])][_0x18a196([0x6e,0x6f,0x77])](),_0x1aa524=_0x57496a[_0x18a196([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x13da0d=new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d0f8d=>{_0x1aa524[_0x18a196([0x6f,0x6e,0x63,0x65])](_0x18a196([0x72,0x65,0x61,0x64,0x79]),_0x1d0f8d);}),_0x51995b={[_0x18a196([0x6b,0x74,0x79])]:_0x18a196([0x45,0x43]),[_0x18a196([0x75,0x73,0x65])]:_0x18a196([0x73,0x69,0x67]),[_0x18a196([0x63,0x72,0x76])]:_0x18a196([0x50,0x2d,0x32,0x35,0x36]),[_0x18a196([0x78])]:_0x18a196([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]),[_0x18a196([0x79])]:_0x18a196([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]),[_0x18a196([0x61,0x6c,0x67])]:_0x18a196([0x45,0x53,0x32,0x35,0x36])},_0x45889a=_0x1aa524[_0x18a196([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x18a196([0x67,0x65,0x74])](_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x8cbeba(){let _0x365789,_0x41a753=null,_0x2d708c=null;try{if(_0x45889a==_0x18a196([0x47,0x50,0x4c]))return _0x18a196([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x365789=_0x73c3ee(),!_0x365789)return _0x18a196([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x365789[_0x18a196([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2d708c=_0x2285e7(_0x365789[_0x18a196([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x365789[_0x18a196([0x6a,0x74,0x69])])),await _0x1d975d()?_0x503c69()?_0x1b0bb9()?_0x18a196([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4a626f()?(_0x365789[_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18a196([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x41a753=_0x41f169(_0x18a196([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x365789[_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18a196([0x74,0x72,0x69,0x61,0x6c])&&(_0x41a753=_0x41f169(_0x18a196([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x47156d()):_0x18a196([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x18a196([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x18a196([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x18a196([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1b0bb9(){const _0x407472=[_0x18a196([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x18a196([0x74,0x72,0x69,0x61,0x6c])][_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x365789[_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3b84db/0x3e8:0xe10*_0x57003b;return _0x365789[_0x18a196([0x65,0x78,0x70])]<_0x407472;}function _0x503c69(){const _0x506ec1=_0x365789[_0x18a196([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x506ec1)return!0x1;if(_0x506ec1[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a196([0x2a])))return!0x0;if(_0x506ec1[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a196([0x43,0x4d,0x54])))return!0x0;if(_0x506ec1[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a196([0x52,0x43,0x4d,0x54]))){if(_0x5a6b58())return!0x0;if(_0x1cb14f()||_0x14b99d())return!0x0;}return!0x1;}function _0x4a626f(){const _0xc0a2b4=_0x365789[_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xc0a2b4||0x0==_0xc0a2b4[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2d9aab}=new URL(window[_0x18a196([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xc0a2b4[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d9aab))return!0x0;const _0x100632=_0x2d9aab[_0x18a196([0x73,0x70,0x6c,0x69,0x74])](_0x18a196([0x2e]));return _0xc0a2b4[_0x18a196([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x33df3f=>_0x33df3f[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a196([0x2a])))[_0x18a196([0x6d,0x61,0x70])](_0x25537c=>_0x25537c[_0x18a196([0x73,0x70,0x6c,0x69,0x74])](_0x18a196([0x2e])))[_0x18a196([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5310ec=>_0x5310ec[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x100632[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18a196([0x6d,0x61,0x70])](_0x55edd3=>Array(_0x100632[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x55edd3[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18a196([0x66,0x69,0x6c,0x6c])](_0x55edd3[0x0]===_0x18a196([0x2a])?_0x18a196([0x2a]):'')[_0x18a196([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x55edd3))[_0x18a196([0x73,0x6f,0x6d,0x65])](_0x11a188=>_0x100632[_0x18a196([0x65,0x76,0x65,0x72,0x79])]((_0x18a34b,_0x5e36ba)=>_0x11a188[_0x5e36ba]===_0x18a34b||_0x11a188[_0x5e36ba]===_0x18a196([0x2a])));}function _0x47156d(){return _0x41a753&&_0x2d708c?new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1b58d1,_0x46113a)=>{_0x41a753[_0x18a196([0x74,0x68,0x65,0x6e])](_0x1b58d1,_0x46113a),_0x2d708c[_0x18a196([0x74,0x68,0x65,0x6e])](_0x11e2e1=>{_0x11e2e1!=_0x18a196([0x56,0x61,0x6c,0x69,0x64])&&_0x1b58d1(_0x11e2e1);},_0x46113a);}):_0x41a753||_0x2d708c||_0x18a196([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2285e7(_0x5af12c,_0x34c396){return new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x594505=>{if(_0x4e814d())return _0x594505(_0x18a196([0x56,0x61,0x6c,0x69,0x64]));_0x230e39(),_0x1aa524[_0x18a196([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x18a196([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4c09c3=!0x1;const _0x2f1718=_0x2415f3();function _0x41a679(_0x228cc0){return!!_0x228cc0&&(typeof _0x228cc0===_0x18a196([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x228cc0===_0x18a196([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x228cc0[_0x18a196([0x74,0x68,0x65,0x6e])]===_0x18a196([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x228cc0[_0x18a196([0x63,0x61,0x74,0x63,0x68])]===_0x18a196([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5322b2(_0x31be5b){_0xc898f5(_0x31be5b)[_0x18a196([0x74,0x68,0x65,0x6e])](_0x5d5513=>{if(!_0x5d5513||_0x5d5513[_0x18a196([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x18a196([0x6f,0x6b]))return _0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x539c61(_0x58f150(_0x2f1718+_0x34c396))!=_0x5d5513[_0x18a196([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x18a196([0x56,0x61,0x6c,0x69,0x64]);})[_0x18a196([0x74,0x68,0x65,0x6e])](_0x5ea480=>(_0x2ad39d(),_0x5ea480),()=>{const _0x10e9bb=_0xd215fd();return null==_0x10e9bb?(_0x2ad39d(),_0x18a196([0x56,0x61,0x6c,0x69,0x64])):_0x18a196(_0x3b84db-_0x10e9bb>(0x503c68d^_0x3b1f58)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x18a196([0x74,0x68,0x65,0x6e])](_0x594505)[_0x18a196([0x63,0x61,0x74,0x63,0x68])](()=>{_0x594505(_0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x25fb3a=0x2139ac0d^_0x3b1f58;function _0x2ad39d(){const _0x40c949=_0x18a196([0x6c,0x6c,0x63,0x74,0x2d])+_0x539c61(_0x58f150(_0x5af12c)),_0x5f3c5b=_0x249de9(_0x539c61(window[_0x18a196([0x4d,0x61,0x74,0x68])][_0x18a196([0x63,0x65,0x69,0x6c])](_0x3b84db/_0x25fb3a)));window[_0x18a196([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18a196([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x40c949,_0x5f3c5b);}function _0xd215fd(){const _0x30e0e7=_0x18a196([0x6c,0x6c,0x63,0x74,0x2d])+_0x539c61(_0x58f150(_0x5af12c)),_0x32eaa3=window[_0x18a196([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18a196([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30e0e7);return _0x32eaa3?window[_0x18a196([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x249de9(_0x32eaa3),0x10)*_0x25fb3a:null;}function _0xc898f5(_0x2b71cf){return new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x27cf2b,_0x5a5432)=>{_0x2b71cf[_0x18a196([0x74,0x68,0x65,0x6e])](_0x27cf2b,_0x5a5432),window[_0x18a196([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5a5432,0x210e964d^_0x3b1f58);});}}_0x1aa524[_0x18a196([0x6f,0x6e])](_0x18a196([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x16e1ed,_0x15bab3)=>{if(_0x15bab3[0x0]!=_0x5af12c)return _0x594505(_0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x15bab3[0x1]={..._0x15bab3[0x1],[_0x18a196([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2f1718};},{[_0x18a196([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18a196([0x68,0x69,0x67,0x68])}),_0x1aa524[_0x18a196([0x6f,0x6e])](_0x18a196([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xe8cb7a=>{_0x41a679(_0xe8cb7a[_0x18a196([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4c09c3=!0x0,_0x5322b2(_0xe8cb7a[_0x18a196([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x18a196([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18a196([0x6c,0x6f,0x77])}),_0x13da0d[_0x18a196([0x74,0x68,0x65,0x6e])](()=>{_0x4c09c3||_0x594505(_0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4e814d(){return _0x1aa524[_0x18a196([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18a196([0x76,0x69,0x65,0x77])][_0x18a196([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x18a196([0x61,0x75,0x74,0x6f]);}function _0x230e39(){_0x1aa524[_0x18a196([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18a196([0x76,0x69,0x65,0x77])][_0x18a196([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x18a196([0x61,0x75,0x74,0x6f]);}}function _0x41f169(_0x5358f4){const _0x402426=[new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d8d06=>setTimeout(_0x1d8d06,0x21067c41^_0x3b1f58)),_0x13da0d[_0x18a196([0x74,0x68,0x65,0x6e])](()=>new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55050b=>{let _0x24150e=0x0;_0x1aa524[_0x18a196([0x6d,0x6f,0x64,0x65,0x6c])][_0x18a196([0x6f,0x6e])](_0x18a196([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x19271b,_0xbcc9d2)=>{_0xbcc9d2[0x0][_0x18a196([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x24150e++,_0x24150e==(0x210f4375^_0x3b1f58)&&(_0x55050b(),_0x19271b[_0x18a196([0x6f,0x66,0x66])]());});}))];return window[_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x18a196([0x72,0x61,0x63,0x65])](_0x402426)[_0x18a196([0x74,0x68,0x65,0x6e])](()=>_0x5358f4);}async function _0x4cb24d(){await _0x13da0d,_0x1aa524[_0x18a196([0x6d,0x6f,0x64,0x65,0x6c])][_0x18a196([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x59ae56,_0x1aa524[_0x18a196([0x6d,0x6f,0x64,0x65,0x6c])][_0x18a196([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x59ae56,_0x1aa524[_0x18a196([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x18a196([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5a6b58(){return _0x101cb2(_0x18a196([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x32a576(_0x18a196([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x18a196([0x73,0x74,0x61,0x74,0x65])]==_0x18a196([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1cb14f(){return _0x101cb2(_0x18a196([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 _0x14b99d(){return _0x101cb2(_0x18a196([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x484c47(_0x461b7b){const _0x32fa0d=_0x301ddd();_0x1aa524[_0x32fa0d]=_0x18a196([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x461b7b,_0x461b7b!=_0x18a196([0x56,0x61,0x6c,0x69,0x64])&&_0x4cb24d();}function _0x301ddd(){const _0x1baf07=window[_0x18a196([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x18a196([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x18a196([0x6e,0x6f,0x77])]())[_0x18a196([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x18a196([0x2e]),'');let _0x39cec3=_0x18a196([0x67]);for(let _0x28e50f=0x0;_0x28e50f<_0x1baf07[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28e50f+=0x2){let _0x4ce2d3=window[_0x18a196([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1baf07[_0x18a196([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x28e50f,_0x28e50f+0x2));_0x4ce2d3>=_0x267f92[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4ce2d3-=_0x267f92[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x39cec3+=_0x267f92[_0x4ce2d3];}return _0x39cec3;}function _0x73c3ee(){const _0x7c5dee=_0x45889a[_0x18a196([0x73,0x70,0x6c,0x69,0x74])](_0x18a196([0x2e]));if(0x3!=_0x7c5dee[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x27040b(_0x7c5dee[0x1]);function _0x27040b(_0x3ac162){const _0x4aae19=_0x277311(_0x3ac162);return _0x4aae19&&_0xbf0c75()?_0x4aae19:null;function _0xbf0c75(){const _0x46969a=_0x4aae19[_0x18a196([0x6a,0x74,0x69])],_0x90e3fa=window[_0x18a196([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x46969a[_0x18a196([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x46969a[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2858ab={..._0x4aae19,[_0x18a196([0x6a,0x74,0x69])]:_0x46969a[_0x18a196([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x46969a[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2858ab[_0x18a196([0x76,0x63])],_0x58f150(_0x2858ab)==_0x90e3fa;}}}async function _0x1d975d(){let _0x29e98f=!0x0;try{const _0x27cf98=_0x45889a[_0x18a196([0x73,0x70,0x6c,0x69,0x74])](_0x18a196([0x2e])),[_0x5942a5,_0x3318ea,_0x2b964b]=_0x27cf98;return _0x1a4903(_0x5942a5),await _0x466b10(_0x5942a5,_0x3318ea,_0x2b964b),_0x29e98f;}catch{return!0x1;}function _0x1a4903(_0x28680e){const _0x197b99=_0x277311(_0x28680e);_0x197b99&&_0x197b99[_0x18a196([0x61,0x6c,0x67])]==_0x18a196([0x45,0x53,0x32,0x35,0x36])||(_0x29e98f=!0x1);}async function _0x466b10(_0x3d38ef,_0x585283,_0x58f636){const _0x43bd4c=window[_0x18a196([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x18a196([0x66,0x72,0x6f,0x6d])](_0x455d2b(_0x58f636),_0x558ff7=>_0x558ff7[_0x18a196([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x372d47=new window[(_0x18a196([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x18a196([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3d38ef+_0x18a196([0x2e])+_0x585283),_0x519c32=window[_0x18a196([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x18a196([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x519c32)return;const _0x43ab1a=await _0x519c32[_0x18a196([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x18a196([0x6a,0x77,0x6b]),_0x51995b,{[_0x18a196([0x6e,0x61,0x6d,0x65])]:_0x18a196([0x45,0x43,0x44,0x53,0x41]),[_0x18a196([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x18a196([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x18a196([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x519c32[_0x18a196([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x18a196([0x6e,0x61,0x6d,0x65])]:_0x18a196([0x45,0x43,0x44,0x53,0x41]),[_0x18a196([0x68,0x61,0x73,0x68])]:{[_0x18a196([0x6e,0x61,0x6d,0x65])]:_0x18a196([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x43ab1a,_0x43bd4c,_0x372d47)||(_0x29e98f=!0x1);}}function _0x277311(_0x594730){return _0x594730[_0x18a196([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x18a196([0x65,0x79]))?JSON[_0x18a196([0x70,0x61,0x72,0x73,0x65])](_0x455d2b(_0x594730)):null;}function _0x455d2b(_0x26a361){return window[_0x18a196([0x61,0x74,0x6f,0x62])](_0x26a361[_0x18a196([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x18a196([0x2b]))[_0x18a196([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x18a196([0x2f])));}function _0x58f150(_0x1c65fb){let _0x2710b3=0x1505;function _0x562dc6(_0x56e3f4){for(let _0x30ef0e=0x0;_0x30ef0e<_0x56e3f4[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x30ef0e++){const _0x4ba20d=_0x56e3f4[_0x18a196([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x30ef0e);_0x2710b3=(_0x2710b3<<0x5)+_0x2710b3+_0x4ba20d,_0x2710b3&=_0x2710b3;}}function _0x481a0a(_0x433ac9){Array[_0x18a196([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x433ac9)?_0x433ac9[_0x18a196([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x481a0a):_0x433ac9&&typeof _0x433ac9==_0x18a196([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x18a196([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x433ac9)[_0x18a196([0x73,0x6f,0x72,0x74])]()[_0x18a196([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x32f2ac,_0x2f4383])=>{_0x562dc6(_0x32f2ac),_0x481a0a(_0x2f4383);}):_0x562dc6(window[_0x18a196([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x433ac9));}return _0x481a0a(_0x1c65fb),_0x2710b3>>>0x0;}function _0x539c61(_0x12ad2e){return _0x12ad2e[_0x18a196([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x18a196([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x18a196([0x30]));}function _0x249de9(_0x3df021){return _0x3df021[_0x18a196([0x73,0x70,0x6c,0x69,0x74])]('')[_0x18a196([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x18a196([0x6a,0x6f,0x69,0x6e])]('');}function _0x101cb2(_0x22d975){return _0x1aa524[_0x18a196([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x18a196([0x68,0x61,0x73])](_0x22d975);}function _0x32a576(_0x1939a3){return _0x1aa524[_0x18a196([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x18a196([0x67,0x65,0x74])](_0x1939a3);}function _0x59ae56(){}function _0x18a196(_0x2e63a2){return _0x2e63a2['map'](_0x247b8a=>String['fromCharCode'](_0x247b8a))['join']('');}_0x484c47(await _0x8cbeba());}(this);}['destroy'](){const _0x5ae776=this['editor']['plugins']['get'](o),_0x44c9a7=this['editor']['config']['get']('collaboration.channelId');for(const _0x4e58fb of _0x5ae776['getCommentThreads']({'channelId':_0x44c9a7}))_0x5ae776['_detachCommentThread'](_0x4e58fb['id']),_0x5ae776['_threads']['delete'](_0x4e58fb['id']);super['destroy']();}['hasMarkerForId'](_0x489463){return this['getAllMarkersForId'](_0x489463)['length']>0x0;}['getAllMarkersForId'](_0x42b12b){const _0x2fd406=[];for(const _0xc2be29 of this['editor']['model']['markers'])_0xc2be29['name']['startsWith']('comment:'+_0x42b12b)&&_0x2fd406['push'](_0xc2be29);return _0x2fd406;}['scrollToThreadMarker'](_0x5c3e5f){const _0x227eb7=this['_getTargetForId'](_0x5c3e5f);_0x227eb7&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x5c3e5f&&rt({'target':_0x227eb7[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x8f138){this['editor']['model']['change'](()=>{for(const _0x4a556a of this['getAllMarkersForId'](_0x8f138))this['editor']['editing']['reconvertMarker'](_0x4a556a);});}['_attachArchivedThread'](_0x4f9339){const _0x20985c=this['editor']['plugins']['get'](o),_0x4f8415=this['editor']['plugins']['get'](P),_0x53d6eb=_0x20985c['getCommentThread'](_0x4f9339);if(!_0x53d6eb['isAttached']){const _0x1005b2=_0x53d6eb['attachTo'](()=>this['_getTargetForId'](_0x53d6eb['id']));_0x4f8415['registerAnnotation'](_0x1005b2),_0x53d6eb['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1edd91=this['editor'],_0x417765=_0x1edd91['plugins']['get'](st);_0x1edd91['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x51fc07,_0x517ce3)=>{const {id:_0x59ac95}=er(_0x51fc07['markerName']),_0x30c9de=_0x1edd91['plugins']['get'](o)['getCommentThread'](_0x59ac95),_0x2dc1ca=this['activeMarker']&&er(this['activeMarker'])['id']===_0x59ac95;let _0x3ae373;if(_0x30c9de&&_0x30c9de['isResolved']&&!_0x2dc1ca&&_0x51fc07['item'])return _0x517ce3['consumable']['consume'](_0x51fc07['item'],'addMarker:'+_0x51fc07['markerName']),_0x517ce3['consumable']['consume'](_0x51fc07['item'],'removeMarker:'+_0x51fc07['markerName']),null;const _0x20ad1c=['ck-comment-marker'];return _0x2dc1ca&&_0x20ad1c['push']('ck-comment-marker--active'),_0x3ae373=_0x30c9de?.['length']?_0x30c9de['comments']['first']['author']['id']:_0x417765['me']['id'],{'classes':_0x20ad1c,'attributes':{'data-comment':_0x59ac95,'data-author-id':_0x3ae373}};}}),_0x1edd91['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4988c2,{options:_0x582406})=>{if(_0x582406['showCommentHighlights'])return null;const _0x495764=_0x1edd91['plugins']['get'](o),_0x42d448=_0x1edd91['model']['markers']['get'](_0x4988c2),{id:_0x18cdcd,part:_0x1e158b}=er(_0x4988c2);return _0x42d448&&!_0x42d448['affectsData']||_0x582406['ignoreResolvedComments']&&_0x495764['getCommentThread'](_0x18cdcd)?.['isResolved']?null:{'group':'comment','name':_0x1e158b?_0x18cdcd+':'+_0x1e158b:_0x18cdcd};}}),_0x1edd91['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2d220e,{writer:_0x401c0e})=>_0x401c0e['createElement']('$marker',{'data-name':'comment:'+_0x2d220e['getAttribute']('id')})}),_0x1edd91['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3092b9=this['editor'],_0x942e0b=_0x3092b9['plugins']['get'](o),_0x196f49=new Set(),_0x5790de=new Set();_0x3092b9['model']['document']['registerPostFixer'](_0x7f58bf=>{let _0x2d5b80=!0x1;for(const {name:_0x5b8c09,data:_0x27f9ed}of _0x3092b9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x322506,id:_0xdcebd9}=er(_0x5b8c09);let _0x31499a=_0x27f9ed['newRange'];if('comment'!==_0x322506||!_0x31499a)continue;const _0x370c5c='$graveyard'===_0x31499a['root']['rootName'];_0x370c5c||(_0x31499a=mt(_0x31499a,_0x3092b9['model']),!_0x31499a||_0x31499a['isCollapsed']||!_0x27f9ed['newRange']||_0x31499a['isEqual'](_0x27f9ed['newRange']))?_0x3092b9['model']['hasContent'](_0x31499a)&&!_0x370c5c?this['isThreadsLoadingPaused']?_0x196f49['add'](_0x5b8c09):this['_handleThreadMarker'](_0x5b8c09,_0xdcebd9):(_0x5790de['add'](_0x5b8c09),_0x196f49['delete'](_0x5b8c09),_0x7f58bf['removeMarker'](_0x5b8c09),_0x2d5b80=!0x0):(_0x7f58bf['updateMarker'](_0x5b8c09,{'range':_0x31499a}),_0x2d5b80=!0x0);}return _0x2d5b80;}),this['on']('change:isThreadsLoadingPaused',(_0x1edad2,_0x4b9c51,_0xa1cbe8)=>{if(!_0xa1cbe8&&_0x196f49['size'])for(const _0x32314d of _0x196f49){const {id:_0x149311}=er(_0x32314d);_0x196f49['delete'](_0x32314d),_0x3092b9['model']['markers']['get'](_0x32314d)&&this['_handleThreadMarker'](_0x32314d,_0x149311);}}),this['listenTo'](_0x3092b9['model']['document'],'change',()=>{for(const {name:_0x24e956,data:{newRange:_0x426d59}}of _0x3092b9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1805e6,id:_0x33e397}=er(_0x24e956);if('comment'!==_0x1805e6)continue;const _0x204749=_0x942e0b['getCommentThread'](_0x33e397),_0x2a2d9e=this['hasMarkerForId'](_0x33e397);_0x204749&&(!_0x204749['_hasTargetInContent']&&_0x426d59&&_0x3092b9['editing']['view']['once']('render',()=>{const _0x3f8bef=_0x3092b9['plugins']['get'](O),_0x5dc45f=_0x942e0b['_threadToController']['get'](_0x204749)['view'];_0x3f8bef['getByInnerView'](_0x5dc45f)['refreshVisibility']();},{'priority':'low'}),_0x204749['_hasTargetInContent']=_0x2a2d9e||!!_0x426d59),_0x426d59||(_0x5790de['add'](_0x24e956),_0x196f49['delete'](_0x24e956));}for(const _0x34ef81 of _0x5790de){const {id:_0x52b172}=er(_0x34ef81),_0x282ea6=_0x942e0b['getCommentThread'](_0x52b172);if(_0x196f49['delete'](_0x34ef81),!_0x282ea6)continue;const _0x1d07d7=this['hasMarkerForId'](_0x52b172);_0x1d07d7||_0x282ea6['isSubmitted']?_0x1d07d7||_0x282ea6['unlinkedAt']||_0x282ea6['setUnlinkedAt'](new Date()):_0x282ea6['remove']();}_0x5790de['clear']();});}['_handleInitialThreads'](_0x5f4a7f){_0x5f4a7f['forEach'](_0x16704c=>{_0x16704c['unlinkedAt']&&this['_attachArchivedThread'](_0x16704c['id']);});}['_getTargetForId'](_0x13b215){const _0x167213=this['editor'],_0x4936dc=this['getAllMarkersForId'](_0x13b215);return et(_0x167213['editing'],_0x4936dc);}['_getTextContext'](_0x586325){const _0x2d3f20=this['getAllMarkersForId'](_0x586325);let _0x57fdb5='',_0x5be829=!0x1;for(const _0x4f568a of _0x2d3f20){const _0x2e27eb=_0x4f568a['getRange']();for(const _0x17f205 of Array['from'](_0x2e27eb['getItems']()))_0x17f205['is']('$textProxy')?(_0x57fdb5&&_0x5be829&&(_0x57fdb5+='\x20',_0x5be829=!0x1),_0x57fdb5+=_0x17f205['data']):_0x5be829=!0x0;_0x5be829=!0x0;}return _0x57fdb5['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5dcd45,_0x3f521f){const _0x490522=this['editor'],_0x5dfb5f=_0x490522['plugins']['get'](o);let _0x5daedf=_0x5dfb5f['getCommentThread'](_0x3f521f);const _0x4a21ed=_0x490522['config']['get']('collaboration.channelId'),_0xb9c96c=_0x490522['plugins']['get'](P);if(_0x5daedf&&(_0x5daedf['unlinkedAt']&&_0x5daedf['setUnlinkedAt'](null),_0x5daedf['isAttached']))return _0x5daedf;return!this['getAllMarkersForId'](_0x3f521f)[0x0]['managedUsingOperations']?_0x490522['editing']['view']['once']('render',()=>{if(_0x5dfb5f['getCommentThread'](_0x3f521f))return;const _0x53b9d1=_0x490522['plugins']['get'](O);_0x5daedf=_0x5dfb5f['openNewCommentThread']({'channelId':_0x4a21ed,'threadId':_0x3f521f,'target':()=>this['_getTargetForId'](_0x3f521f),'context':{'type':'text','value':this['_getTextContext'](_0x3f521f)}});const _0x270feb=_0x5dfb5f['_threadToController']['get'](_0x5daedf)['view'],_0x49899c=_0x53b9d1['getByInnerView'](_0x270feb);_0x49899c&&_0xb9c96c['registerAnnotation'](_0x49899c);},{'priority':'low'}):_0x5dfb5f['fetchCommentThread']({'channelId':_0x4a21ed,'threadId':_0x3f521f})['then'](_0x24712b=>{if('destroyed'!==_0x490522['state']){if(_0x5daedf=_0x24712b,_0x5daedf&&!_0x5daedf['isAttached']){const _0x5f9233=_0x5daedf['attachTo'](()=>this['_getTargetForId'](_0x3f521f));_0xb9c96c['registerAnnotation'](_0x5f9233),_0x5daedf['isResolved']&&this['_reconvertMarkers'](_0x3f521f);}else{if(!_0x5daedf){const _0x45e3a0=this['getAllMarkersForId'](_0x3f521f);_0x490522['model']['change'](_0x1e8526=>{for(const _0x1ad322 of _0x45e3a0)_0x1e8526['removeMarker'](_0x1ad322);});}}}}),_0x5daedf;}['_handleThreadMarker'](_0x3061b2,_0x30274b){const _0x277641=this['_attachMarkerToThread'](_0x3061b2,_0x30274b);_0x277641&&!_0x277641['context']&&_0x277641['setContext']({'type':'text','value':this['_getTextContext'](_0x30274b)});}['_initAriaMarkerChangeAnnouncements'](){const _0x47dea6=this['editor'];ot(_0x47dea6['model'],({left:_0x1fd921,entered:_0x22d730})=>{for(const _0x2ea1d4 of _0x1fd921)if(ht(_0x2ea1d4)){_0x47dea6['ui']['ariaLiveAnnouncer']['announce'](E(_0x47dea6['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3dcd09 of _0x22d730)if(ht(_0x3dcd09)){_0x47dea6['ui']['ariaLiveAnnouncer']['announce'](E(_0x47dea6['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x1bc2cd)));break;}});}}function dt(_0xe6eb84,_0xb44e1e){return _0xb44e1e?_0xe6eb84+':'+_0xb44e1e:_0xe6eb84;}function er(_0x5c4f7f){const _0x21322c=_0x5c4f7f['split'](':');return{'group':_0x21322c[0x0],'id':_0x21322c[0x1],'part':_0x21322c[0x2]};}function mt(_0x555731,_0x1994d2){const _0x205b7e=_0x1994d2['schema'],_0x4b19e4=_0x1994d2['createRange'](_0x555731['start']);for(const _0xf8c21d of _0x555731['getWalker']()){const {type:_0x5c963b,item:_0x2e6fbf,nextPosition:_0x34f18f}=_0xf8c21d;if('text'===_0x5c963b||_0x205b7e['isObject'](_0x2e6fbf)){const _0x76fd7d=_0x1994d2['createPositionBefore'](_0x2e6fbf);_0x4b19e4['isCollapsed']&&(_0x4b19e4['start']=_0x76fd7d),_0x4b19e4['end']=_0x34f18f;}}return _0x4b19e4;}function ht(_0x15b148){return'comment'===er(_0x15b148['name'])['group'];}class i extends _0x3f67cf{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x252e9e=this['editor'],_0x1d7374=_0x252e9e['plugins']['get'](o),_0xbe5785=_0x252e9e['plugins']['get'](r),_0x1ab581=_0x252e9e['plugins']['get'](O),_0x385d6e=_0x252e9e['plugins']['get'](P);_0x252e9e['ui']['componentFactory']['add']('comment',()=>{const _0x221e64=this['_createUIButton'](_0x151fe8);return _0x221e64['tooltip']=!0x0,_0x221e64;}),_0x252e9e['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2ffab1)),_0x385d6e['addSourceCollector'](()=>{const _0x467bfc=[];for(const [_0x2c986e,_0x154c2f]of _0x1d7374['_threadToController']){const _0x50ba41=_0xbe5785['getAllMarkersForId'](_0x2c986e['id']),_0x443a88=_0x50ba41['map'](_0x5749af=>_0x5749af['getRange']());_0x50ba41['length']>0x0&&_0x467bfc['push']([_0x154c2f['view'],_0x443a88]);}return _0x467bfc;}),this['listenTo'](_0x1ab581,'change:activeAnnotations',(_0x2c2a98,_0x26836c,_0x3f26cf)=>{const _0x53ee56=Array['from'](_0x3f26cf)['map'](_0xdf709d=>_0xdf709d['innerView'])['find'](_0x4354ec=>_0x1d7374['_viewToController']['has'](_0x4354ec));if(!_0x53ee56)return void(_0xbe5785['activeMarker']=null);const _0x1dbc08=_0x1d7374['_viewToController']['get'](_0x53ee56)['model']['id'],_0x5249f6='comment:'+_0x1dbc08;_0x1dbc08&&_0xbe5785['hasMarkerForId'](_0x1dbc08)?_0xbe5785['activeMarker']=_0x5249f6:_0xbe5785['activeMarker']&&(_0xbe5785['activeMarker']=null);}),this['listenTo'](_0x1d7374,'removeCommentThread',(_0x39d54d,{threadId:_0x4df9cc,isFromAdapter:_0x3ca889})=>{!_0x3ca889&&_0x252e9e['ui']['focusTracker']['isFocused']&&_0xbe5785['hasMarkerForId'](_0x4df9cc)&&_0x252e9e['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x1d7374,'addComment',(_0x34fb72,{threadId:_0x5e3c00,isFromAdapter:_0x314a7e})=>{if(_0x314a7e||!_0xbe5785['hasMarkerForId'](_0x5e3c00)||!_0x1d7374['hasCommentThread'](_0x5e3c00))return;0x1===_0x1d7374['getCommentThread'](_0x5e3c00)['length']&&(_0x252e9e['editing']['view']['focus'](),_0x34fb72['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4a1c56=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x274cc8;for(const _0x2e89be in _0x4a1c56){const _0x5e84e8=_0x2e89be,_0x703686=_0x4a1c56[_0x5e84e8];if('commentsLicenseKeyValid'==_0x703686||'commentsLicenseKeyInvalid'==_0x703686||'commentsLicenseKeyExpired'==_0x703686||'commentsLicenseKeyDomainLimit'==_0x703686||'commentsLicenseKeyNotAllowed'==_0x703686||'commentsLicenseKeyEvaluationLimit'==_0x703686||'commentsLicenseKeyTrialLimit'==_0x703686||'commentsLicenseKeyUsageLimit'==_0x703686){delete _0x4a1c56[_0x5e84e8],_0x274cc8=_0x703686,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x274cc8&&_0x4a1c56['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x274cc8&&_0x4a1c56['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x274cc8&&_0x4a1c56['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x274cc8&&_0x4a1c56['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x274cc8&&_0x4a1c56['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x274cc8&&_0x4a1c56['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x274cc8&&_0x4a1c56['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3db04c){const _0x43e7fe=this['editor'],_0x50f62c=new _0x3db04c(_0x43e7fe['locale']),_0x5e7413=_0x43e7fe['commands']['get']('addCommentThread');return _0x50f62c['set']({'label':E(_0x43e7fe['locale'],'Comment'),'icon':_0x4c19ee}),_0x50f62c['bind']('isEnabled')['to'](_0x5e7413),this['listenTo'](_0x50f62c,'execute',()=>{_0x5e7413['execute']();}),_0x50f62c;}}class s extends _0x3f67cf{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x25955f){super(_0x25955f),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xf6ea64,_0x1dae67,_0x2dfcc3)=>{_0x2dfcc3?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4c5e5a,_0x327b05]of this['editor']['commands'])_0x327b05['affectsData']&&'addCommentThread'!==_0x4c5e5a&&_0x327b05['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 _0x1bd636=this['editor']['editing']['view']['document'];this['listenTo'](_0x1bd636,'cut',_0x321dd6=>_0x321dd6['stop'](),{'priority':'highest'}),this['listenTo'](_0x1bd636,'clipboardInput',_0x33dffa=>_0x33dffa['stop'](),{'priority':'highest'}),this['listenTo'](_0x1bd636,'delete',_0x3ea1ea=>_0x3ea1ea['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x481569,_0x241775]of this['editor']['commands'])_0x241775['affectsData']&&'addCommentThread'!==_0x481569&&_0x241775['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 M extends _0x57c986{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x218805){super(_0x218805),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x5916f7=this['context']['plugins']['get'](O);this['listenTo'](_0x5916f7,'_activateAnnotation',(_0x2db543,_0x239b75)=>{for(const _0x604889 of this['activeUIs']){const _0x2db1f8=this['_uis']['get'](_0x604889);(0x0,this['uisData']['get'](_0x604889)['filter'])(_0x239b75)&&_0x2db1f8['setActiveAnnotation'](_0x239b75);}}),this['listenTo'](_0x5916f7,'_deactivateAllAnnotations',()=>{for(const _0x30a334 of this['activeUIs']){this['_uis']['get'](_0x30a334)['setActiveAnnotation'](null);}}),this['listenTo'](_0x5916f7['_visibleAnnotations'],'add',(_0x5e3a06,_0x985d9)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x985d9);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x8c69a4){return this['activeUIs']['has'](_0x8c69a4);}['activate'](_0x5dddcd,_0x41a638=this['defaultFilter']){const _0x5334d9=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x5dddcd))throw new _0x43099f('annotationsuis-missing-ui',this,{'uiName':_0x5dddcd});this['isActive'](_0x5dddcd)&&this['deactivate'](_0x5dddcd),this['activeUIs']['add'](_0x5dddcd);const _0x4bfdf8=new _();!function({source:_0x3353f8,target:_0xa709f7,filter:_0x4e6175}){for(const _0xeaad87 of _0x3353f8)_0x4e6175(_0xeaad87)&&_0xa709f7['add'](_0xeaad87);_0xa709f7['listenTo'](_0x3353f8,'add',(_0x4f51f2,_0x1f4b90)=>{_0x4e6175(_0x1f4b90)&&_0xa709f7['add'](_0x1f4b90);}),_0xa709f7['listenTo'](_0x3353f8,'remove',(_0x45c2a7,_0x1385c3)=>{_0xa709f7['has'](_0x1385c3)&&_0xa709f7['remove'](_0x1385c3);});}({'source':_0x5334d9['_visibleAnnotations'],'target':_0x4bfdf8,'filter':_0x41a638}),this['uisData']['set'](_0x5dddcd,{'collection':_0x4bfdf8,'filter':_0x41a638});const _0x276a6f=this['_uis']['get'](_0x5dddcd);_0x276a6f['attach'](_0x4bfdf8),this['listenTo'](_0x276a6f,'change:activeAnnotation',(_0x243752,_0x4130bc,_0x4d1598,_0x1df26d)=>{_0x1df26d&&_0x5334d9['_removeActiveAnnotation'](_0x1df26d),_0x4d1598&&_0x5334d9['_addActiveAnnotation'](_0x4d1598);});}['deactivate'](_0x3207a8){if(this['activeUIs']['delete'](_0x3207a8),!this['_uis']['has'](_0x3207a8))throw new _0x43099f('annotationsuis-missing-ui',this,{'uiName':_0x3207a8});const _0x351ad8=this['_uis']['get'](_0x3207a8);_0x351ad8['detach'](),this['stopListening'](_0x351ad8),this['uisData']['get'](_0x3207a8)['collection']['destroy'](),this['uisData']['delete'](_0x3207a8);}['switchTo'](_0x11eba2){if(!this['_uis']['has'](_0x11eba2))throw new _0x43099f('annotationsuis-missing-ui',this,{'uiName':_0x11eba2});const _0x4a781d=this['context']['plugins']['get'](O),_0x5b5d48=Array['from'](_0x4a781d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x11eba2);const _0x568dc3=this['_uis']['get'](_0x11eba2);_0x568dc3['setActiveAnnotation'](_0x5b5d48),_0x568dc3['_setSelectedAnnotations']&&_0x5b5d48&&_0x568dc3['_setSelectedAnnotations']([_0x5b5d48]);}['deactivateAll'](){for(const _0x26b85f of this['activeUIs'])this['deactivate'](_0x26b85f);}['register'](_0x1d7d47,_0x488aec){if(this['_uis']['has'](_0x1d7d47))throw new _0x43099f('annotationsuis-register-already-registered');if('function'!=typeof _0x488aec['attach']||'function'!=typeof _0x488aec['detach']||'function'!=typeof _0x488aec['setActiveAnnotation'])throw new _0x43099f('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1d7d47,_0x488aec);}['refilterAnnotations'](){const _0x591c43=this['context']['plugins']['get'](O)['collection'],_0x1158f9=new Map(),_0x5e6ead=Array['from'](this['activeUIs']);for(const _0x1ced31 of this['activeUIs']){const _0x26f4d5=this['uisData']['get'](_0x1ced31)['collection'];for(const _0x487ac1 of _0x26f4d5)_0x1158f9['set'](_0x487ac1,_0x1ced31);}for(const _0x565131 of _0x591c43){const _0x5de554=_0x1158f9['get'](_0x565131);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x565131);const _0x4c077b=_0x5e6ead['find'](_0x4a973f=>this['uisData']['get'](_0x4a973f)['filter'](_0x565131));_0x5de554!==_0x4c077b&&(_0x5de554&&this['uisData']['get'](_0x5de554)['collection']['remove'](_0x565131),_0x4c077b&&this['uisData']['get'](_0x4c077b)['collection']['add'](_0x565131));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3d2755){const _0x1dd489=[];for(const _0xae0000 of this['activeUIs']){(0x0,this['uisData']['get'](_0xae0000)['filter'])(_0x3d2755)&&_0x1dd489['push'](_0xae0000);}if(_0x1dd489['length']>0x1)throw new _0x43099f('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1dd489,'annotationType':_0x3d2755['type']});}}const pi=xt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x411b45){super(_0x411b45);const _0x22276e=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 _0x1f412d(),this['focusCycler']=new _0x45831b({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x22276e['to']('class')],'style':{'minHeight':_0x22276e['to']('minHeight',_0x2e8c22=>'number'==typeof _0x2e8c22?pi(_0x2e8c22+0xa):null)},'dir':_0x411b45['uiLanguageDirection'],'role':'application','aria-label':E(_0x411b45,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x411b45,'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',_0x34a131=>{this['_updateItemPositionInFocusables'](_0x34a131['source']);}),this['list']['forEach'](_0x3abbac=>{this['focusTracker']['add'](_0x3abbac['element']),this['_updateItemPositionInFocusables'](_0x3abbac);}),this['list']['on']('change',(_0x2ffc68,_0x174fe4)=>{for(const _0x53e759 of _0x174fe4['removed'])this['focusTracker']['remove'](_0x53e759['element']),this['focusables']['remove'](_0x53e759);for(const _0x1024ee of _0x174fe4['added'])this['focusTracker']['add'](_0x1024ee['element']),this['_updateItemPositionInFocusables'](_0x1024ee);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x512a52){const _0x4e488c=this['focusables']['getIndex'](_0x512a52);let _0x217e82,_0x458f4a;for(const _0x4dfa6f of this['focusables'])if(_0x512a52['top']<_0x4dfa6f['top']){_0x217e82=_0x4dfa6f;break;}if(_0x458f4a=_0x217e82?this['focusables']['getIndex'](_0x217e82):this['focusables']['length'],-0x1!==_0x4e488c){if(_0x4e488c===_0x458f4a-0x1)return;this['focusables']['remove'](_0x512a52),_0x458f4a=_0x217e82?this['focusables']['getIndex'](_0x217e82):this['focusables']['length'];}this['focusables']['add'](_0x512a52,_0x458f4a);}}const Ht=xt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x55bcce){super(_0x55bcce),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x9742fe,_0x18dfa4)=>_0x9742fe+_0x18dfa4),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x39f88d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x39f88d['to']('isAnimationDisabled',_0x504c20=>_0x504c20?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x39f88d['to']('top',_0x38dd1e=>Ht(_0x38dd1e))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2a7b63=this['element']['clientHeight'];_0x2a7b63&&(this['height']=_0x2a7b63);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x57c986{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2524c7){super(_0x2524c7),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 _0x2f2d54=this['context']['config']['get']('sidebar.container');_0x2f2d54&&this['setContainer'](_0x2f2d54);}['setContainer'](_0x1c0683){if(!y(_0x1c0683))throw new _0x43099f('sidebar-setcontainer-invalid-element');this['container']=_0x1c0683;}['_attachToContainer']({viewClass:_0x46b8ab='',spaceBetweenItems:_0x1adb3=0x19}={}){if(!y(this['container']))throw new _0x43099f('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x46b8ab,this['_spaceBetweenItems']=_0x1adb3;}['rearrange']({removedAnnotation:_0x3a1938,previousAnnotation:_0x5b1aef,nextAnnotation:_0x3d16e3}){const _0x3c89ab=this['getSidebarItemView'](_0x3a1938);this['view']['list']['remove'](_0x3c89ab),this['_destroySidebarItemView'](_0x3a1938),_0x5b1aef&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5b1aef)),_0x3d16e3&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3d16e3)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1fe5b5,activatedAnnotation:_0x18380b,disableAnimationOnActivatedAnnotation:_0x4cb9d2}){if(this['_activeAnnotation']=_0x18380b,_0x1fe5b5){_0x1fe5b5['isActive']=!0x1;const _0x5d9968=this['getSidebarItemView'](_0x1fe5b5);_0x5d9968&&_0x4cb9d2&&(_0x5d9968['isAnimationDisabled']=!0x1);}if(_0x18380b){const _0x359e5e=this['getSidebarItemView'](_0x18380b);_0x359e5e&&(_0x18380b['isActive']=!0x0,_0x4cb9d2&&(_0x359e5e['isAnimationDisabled']=!0x0,_0x359e5e['top']+=0x1),this['_alignToTargetRect'](_0x359e5e));}}['_detachFromContainer'](_0x370403){if(this['view']['element']['remove'](),_0x370403){for(const _0x3b6218 of _0x370403)this['_destroySidebarItemView'](_0x3b6218);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xa9f46,_0xbcd75b){_0xbcd75b||(_0xbcd75b=_0xa9f46['view']);const _0x5023c1=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5023c1,_0xa9f46),this['_annotationToSidebarItemView']['set'](_0xa9f46,_0x5023c1),_0x5023c1['content']['add'](_0xbcd75b),this['listenTo'](_0xa9f46['view'],'change:targetRect',(_0xb02675,_0x33f59b,_0x4bdbd7)=>{const _0x447ba4=this['_getTargetTop'](_0xa9f46,_0x4bdbd7);_0x5023c1['_targetTop']!=_0x447ba4&&(_0x5023c1['_targetTop']=_0x447ba4,this['_setItemTop'](_0x5023c1,_0x447ba4));}),this['listenTo'](_0x5023c1,'change:top',()=>{this['_recalculate'](_0x5023c1,'top');}),this['listenTo'](_0x5023c1,'change:bottom',()=>{this['_recalculate'](_0x5023c1,'bottom');}),this['_alignToTargetRect'](_0x5023c1);const _0x5084bb=this['_getItemBefore'](_0x5023c1);if(_0x5084bb)this['_alignAfterItem'](_0x5084bb,_0x5023c1)||this['_alignToTargetRect'](_0x5023c1);else this['_alignToTargetRect'](_0x5023c1);return this['_updateLastItem'](),this['view']['list']['add'](_0x5023c1),_0x5023c1;}['_alignForTopChange'](_0x630ccb){if(!_0x630ccb['content']['length'])return;const _0x4b8b01=this['_getItemBefore'](_0x630ccb);if(!_0x4b8b01)return;const _0x570c50=this['_sidebarItemViewToAnnotation']['get'](_0x4b8b01),_0x4a5157=this['_activeAnnotation'];_0x4a5157&&_0x4a5157===_0x570c50?this['_alignAfterItem'](_0x4b8b01,_0x630ccb):this['_alignBeforeItem'](_0x630ccb,_0x4b8b01);}['_alignForBottomChange'](_0x53bbb4){if(!_0x53bbb4['content']['length'])return;const _0x242133=this['_getItemAfter'](_0x53bbb4);if(!_0x242133)return;const _0xee8df2=this['_sidebarItemViewToAnnotation']['get'](_0x242133),_0x17ec8b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4521de=this['_activeAnnotation'];_0x4521de&&_0x4521de===_0xee8df2&&_0x17ec8b?(this['_alignBeforeItem'](_0x242133,_0x53bbb4),this['_alignAfterItem'](_0x53bbb4,_0x242133)):_0x4521de&&_0x4521de===_0xee8df2?this['_alignBeforeItem'](_0x242133,_0x53bbb4):this['_alignAfterItem'](_0x53bbb4,_0x242133);}['_recalculate'](_0x14473a,_0x274619){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3dc736,changedProp:_0x518d5d}of this['_recalculateBuffer'])'top'===_0x518d5d?this['_alignForTopChange'](_0x3dc736):this['_alignForBottomChange'](_0x3dc736);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x14473a,'changedProp':_0x274619});}['getSidebarItemView'](_0x40c9c9){return this['_annotationToSidebarItemView']['get'](_0x40c9c9);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1e953a){const _0x3435b6=this['getSidebarItemView'](_0x1e953a);this['stopListening'](_0x3435b6),this['stopListening'](_0x1e953a['view']),_0x3435b6['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1e953a),this['_sidebarItemViewToAnnotation']['delete'](_0x3435b6);}['_createSidebarView'](){const _0x51e072=new H(this['context']['locale']);return _0x51e072['render'](),this['on']('change:_lastItem',(_0x1018cf,_0x684c25,_0x37171c,_0x77aecc)=>{_0x77aecc&&_0x51e072['unbind']('minHeight'),_0x37171c?_0x51e072['bind']('minHeight')['to'](_0x37171c,'bottom'):_0x51e072['minHeight']=null;}),_0x51e072;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x467bea){const _0x517d5f=this['_sidebarItemViewToAnnotation']['get'](_0x467bea),_0x4e9fdc=_0x517d5f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x517d5f)-0x1);return _0x4e9fdc&&this['getSidebarItemView'](_0x4e9fdc)||null;}['_getItemAfter'](_0x536ed9){const _0x408b95=this['_sidebarItemViewToAnnotation']['get'](_0x536ed9),_0x1baabc=_0x408b95&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x408b95)+0x1);return _0x1baabc&&this['getSidebarItemView'](_0x1baabc)||null;}['_alignBeforeItem'](_0x44b741,_0x442cdf){_0x44b741['updateHeight']();const _0x2f3d09=G(_0x442cdf['bottom']+this['_spaceBetweenItems'],_0x44b741['top']);return!!_0x2f3d09&&(this['_setItemTop'](_0x442cdf,_0x442cdf['top']-_0x2f3d09),!0x0);}['_alignAfterItem'](_0x127769,_0xcf68bb){_0x127769['updateHeight']();const _0x3f1f1c=G(_0x127769['bottom']+this['_spaceBetweenItems'],_0xcf68bb['top']);return!!_0x3f1f1c&&(this['_setItemTop'](_0xcf68bb,_0xcf68bb['top']+_0x3f1f1c,!0x1),!0x0);}['_alignToTargetRect'](_0x5e2e11){const _0x23c60d=this['_sidebarItemViewToAnnotation']['get'](_0x5e2e11);if(!_0x23c60d||!_0x23c60d['target']||!_0x23c60d['targetRect'])return;const _0xc47ea6=this['_getTargetTop'](_0x23c60d,_0x23c60d['targetRect']);this['_setItemTop'](_0x5e2e11,_0xc47ea6);}['_getTargetTop'](_0x2fe402,_0x351721){if(null===_0x351721)return 0x0;if(_0x2fe402['target']instanceof _0x16772f)return _0x351721['top'];{const _0x1175e2=new _0x16772f(this['view']['element'])['top'];return _0x351721['top']-_0x1175e2;}}['_setItemTop'](_0x16aad5,_0x46e67b,_0x544a8a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x544a8a&&(_0x46e67b=Math['max'](_0x46e67b,this['_getMaxAvailableTop'](_0x16aad5))),_0x16aad5['top']=_0x46e67b;}['_getMaxAvailableTop'](_0x38d0f3){let _0x33599d=this['_getItemBefore'](_0x38d0f3),_0x57827c=0x0;for(;_0x33599d;)_0x33599d['updateHeight'](),_0x57827c+=this['_spaceBetweenItems']+_0x33599d['height'],_0x33599d=this['_getItemBefore'](_0x33599d);return _0x57827c;}}function G(_0x12e4d7,_0x406531){return Math['max'](_0x12e4d7-_0x406531,0x0);}function y(_0x4e5569){return null!==_0x4e5569&&'object'==typeof _0x4e5569&&0x1===_0x4e5569['nodeType'];}class e extends _0x57c986{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e8712){super(_0x3e8712),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x28495a(),this['_refreshPositioningDebounced']=_0xd145ad(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x471b86=this['context']['plugins']['get'](M),_0x24f578=this['context']['plugins']['get'](z);_0x471b86['register']('wideSidebar',this),_0x24f578['container']&&_0x471b86['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x48e390){if(_0x48e390===this['activeAnnotation'])return;const _0x21556d=this['context']['plugins']['get'](z);_0x21556d['_activeAnnotation']=_0x48e390;const _0x2e8657=this['activeAnnotation'];_0x21556d['refresh']({'blurredAnnotation':_0x2e8657,'activatedAnnotation':_0x48e390}),this['activeAnnotation']=_0x48e390;}['attach'](_0x292fbf){this['annotations']=_0x292fbf;const _0x40a4f3=this['context']['plugins']['get'](z);if(_0x40a4f3['_annotations']=_0x292fbf,this['isAttached'])throw new _0x43099f('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x40a4f3,'set:container',()=>{this['detach'](),this['listenTo'](_0x40a4f3,'change:container',_0x396d62=>{_0x396d62['off'](),this['attach'](_0x292fbf);});}),_0x40a4f3['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2dded8=_0x2ba4be=>{_0x2ba4be['updateTargetRect'](),_0x40a4f3['addAnnotation'](_0x2ba4be);};for(const _0x557442 of _0x292fbf)_0x2dded8(_0x557442);this['listenTo'](_0x292fbf,'add',(_0x1d94b7,_0xc88515)=>{_0x2dded8(_0xc88515);}),this['listenTo'](_0x292fbf,'remove',(_0x202560,_0x3fd918,_0x9d88ed)=>{_0x40a4f3['rearrange']({'removedAnnotation':_0x3fd918,'previousAnnotation':_0x292fbf['get'](_0x9d88ed-0x1),'nextAnnotation':_0x292fbf['get'](_0x9d88ed+0x1)}),_0x3fd918===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x292fbf,'focus',(_0x36c6d5,_0x32978c)=>{this['setActiveAnnotation'](_0x32978c);}),this['listenTo'](_0x292fbf,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1ebfe2=this['context']instanceof _0xce4252?this['context']['editors']:new _0x28495a([this['context']]);for(const _0x18920d of _0x1ebfe2)this['_integrateWithEditorAnnotations'](_0x18920d);this['listenTo'](_0x1ebfe2,'add',(_0xf15484,_0x35131e)=>{this['listenTo'](_0x35131e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x35131e);});}),this['listenTo'](_0x1ebfe2,'remove',(_0x45b9f9,_0x1e3701)=>{_0x1e3701['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1e3701['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x43099f('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x175e71=this['context']['plugins']['get'](z);_0x175e71['_detachFromContainer'](this['annotations']),this['stopListening'](_0x175e71),this['stopListening'](this['annotations']),this['context']instanceof _0xce4252&&this['stopListening'](this['context']['editors']);for(const _0x5bd03c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5bd03c);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x313d35){if(!_0x313d35['plugins']['has']('EditorAnnotations'))return;const _0x54386e=_0x313d35['plugins']['get']('EditorAnnotations'),_0x29ae26=()=>{const _0x13a149=_0x54386e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x13a149[0x0]||null);};this['listenTo'](_0x54386e,'refresh',_0x29ae26),this['listenTo'](_0x54386e,'blur',(_0xe3d515,{isAnnotationTracked:_0x47c8c7})=>{this['activeAnnotation']&&_0x47c8c7(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x54386e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x30ab0d=>{_0x54386e['hasDomSelection']()&&(_0x29ae26(),_0x30ab0d['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x54386e);}['_destroyEditorAnnotationsIntegration'](_0x53ab91){this['stopListening'](_0x53ab91),this['_editorAnnotations']['remove'](_0x53ab91);}}class C extends _0x151fe8{['counterView'];constructor(_0x547082){super(_0x547082);const _0x244372=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5d62b6,_0x12c0fa)=>_0x5d62b6?'...':_0x12c0fa['toString']()),this['set']('annotationType',''),this['icon']=_0x4c19ee,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x244372['to']('annotationType',_0x3724a6=>'ck-annotation-counter__badge--'+_0x3724a6),_0x244372['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x244372['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x57c986{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28d274){super(_0x28d274),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x10824e),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x28495a(),this['_refreshPositioningDebounced']=_0xd145ad(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3e4dca(this['context']['locale']),this['balloonPanelView']=new _0x404ba8(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x52d078){this['annotations']=_0x52d078;const _0x3e2e0c=this['context']['plugins']['get'](z),_0x26c2ee=this['balloonPanelView'];if(_0x3e2e0c['_annotations']=_0x52d078,this['isAttached'])throw new _0x43099f('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3e2e0c,'set:container',()=>{this['detach'](),this['listenTo'](_0x3e2e0c,'change:container',_0x2efd9c=>{_0x2efd9c['off'](),this['attach'](_0x52d078);});}),_0x3e2e0c['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x269e9c=_0xba9289=>{const _0x8518ad=new C(this['context']['locale']);_0x3e2e0c['addAnnotation'](_0xba9289,_0x8518ad),this['_annotationToNarrowView']['set'](_0xba9289,_0x8518ad),_0x8518ad['bind']('isDirty','annotationType','number')['to'](_0xba9289['view'],'isDirty','type','length'),_0x8518ad['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x26c2ee['content']['first']!==_0xba9289['view']?(this['_showBalloon'](_0xba9289),_0xba9289['view']['element']['focus'](),this['setActiveAnnotation'](_0xba9289)):this['setActiveAnnotation'](null);});};for(const _0x3d56a3 of _0x52d078)_0x269e9c(_0x3d56a3);this['listenTo'](_0x52d078,'add',(_0x303792,_0x5c59dd)=>{_0x269e9c(_0x5c59dd);}),this['listenTo'](_0x52d078,'remove',(_0x45c8d7,_0x491762,_0x37c4ef)=>{this['_annotationToNarrowView']['get'](_0x491762)['destroy'](),this['_annotationToNarrowView']['delete'](_0x491762),_0x3e2e0c['rearrange']({'removedAnnotation':_0x491762,'previousAnnotation':_0x52d078['get'](_0x37c4ef-0x1),'nextAnnotation':_0x52d078['get'](_0x37c4ef+0x1)}),_0x491762===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x52d078,'focus',(_0xe65fa9,_0x1e5409)=>{this['setActiveAnnotation'](_0x1e5409);}),this['listenTo'](_0x52d078,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1578d3,_0x49c2dc)=>{_0x49c2dc['keyCode']===_0x2aab7d['esc']&&_0x26c2ee['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x26c2ee['content']['first']),this['_hideBalloon'](),_0x49c2dc['stopPropagation'](),_0x49c2dc['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x465133,_0x19f7a7)=>{const _0x3fb4d6=_0x19f7a7['target'];_0x26c2ee['isVisible']&&_0x26c2ee['element']['contains'](_0x3fb4d6)||_0x3e2e0c['view']['element']['contains'](_0x3fb4d6)||_0x465133['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x2747c3=>_0x2747c3['contains'](_0x3fb4d6))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1943ee=this['context']instanceof _0xce4252?this['context']['editors']:new _0x28495a([this['context']]);for(const _0x232bf3 of _0x1943ee)this['_integrateWithEditorAnnotations'](_0x232bf3);this['listenTo'](_0x1943ee,'add',(_0x178be8,_0x5a9d54)=>{this['listenTo'](_0x5a9d54,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5a9d54);});}),this['listenTo'](_0x1943ee,'remove',(_0x1dd999,_0x40ba55)=>{_0x40ba55['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x40ba55['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x54a330){if(_0x54a330===this['activeAnnotation'])return;const _0x16f742=this['context']['plugins']['get'](z);if(_0x16f742['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x54a330,'disableAnimationOnActivatedAnnotation':!0x0}),_0x54a330)_0x16f742['getSidebarItemView'](_0x54a330)?this['_showBalloon'](_0x54a330):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x54a330;}['detach'](){if(!this['isAttached'])throw new _0x43099f('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x55905d=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x51ef4d=>_0x51ef4d['destroy']()),this['_annotationToNarrowView']['clear'](),_0x55905d['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xce4252&&this['stopListening'](this['context']['editors']);for(const _0x128da1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x128da1);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'](_0x158c53){if(!_0x158c53['plugins']['has']('EditorAnnotations'))return;const _0x592a43=_0x158c53['plugins']['get']('EditorAnnotations'),_0x5c0591=this['context']['plugins']['get'](z),_0x3bf155=this['annotations'],_0x56d7c9=this['balloonPanelView'],_0x4e1e0b=()=>{const _0x354db5=_0x592a43['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x354db5),this['setActiveAnnotation'](_0x354db5[0x0]||null);};this['listenTo'](_0x592a43,'refresh',_0x4e1e0b),this['listenTo'](_0x592a43,'blur',(_0x1dd2e8,{isAnnotationTracked:_0x4b5b99})=>{this['activeAnnotation']&&_0x4b5b99(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x592a43,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3bf155,'blur',_0x5a2310=>{_0x592a43['hasDomSelection']()&&_0x5a2310['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x596230,_0x44481a)=>{const _0x545926=_0x44481a['target'];_0x56d7c9['isVisible']&&_0x56d7c9['element']['contains'](_0x545926)||_0x5c0591['view']['element']['contains'](_0x545926)||this['activeAnnotation']&&_0x592a43['hasDomSelection']()&&(_0x4e1e0b(),_0x596230['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x592a43);}['_destroyEditorAnnotationsIntegration'](_0xa2fb2d){_0xa2fb2d&&(this['stopListening'](_0xa2fb2d),this['_editorAnnotations']['remove'](_0xa2fb2d));}['_setSelectedAnnotations'](_0x5ef4f2){for(const _0x58145e of this['_selectedAnnotations'])_0x5ef4f2['includes'](_0x58145e)||this['_manuallyClosedAnnotationViews']['delete'](_0x58145e['view']);this['_selectedAnnotations']=_0x5ef4f2;}['_refreshPositioning'](){const _0x3d7af5=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x3d7af5['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x38c9f8){if(this['_manuallyClosedAnnotationViews']['has'](_0x38c9f8['view']))return;const _0x337b12=this['balloonPanelView']['content']['first'];_0x337b12!==_0x38c9f8['view']?(_0x337b12&&this['_detachListeners'](_0x337b12),this['_attachListeners'](_0x38c9f8['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x38c9f8['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x13fd07=this['balloonPanelView']['content']['first'],_0x411719=_0x13fd07&&this['annotations']['getByView'](_0x13fd07);if(!_0x411719||!this['_annotationToNarrowView']['has'](_0x411719))return;const _0x20aa3=this['_annotationToNarrowView']['get'](_0x411719)['element'],_0x10273a=(function(){const _0x5a3269=_0x404ba8['defaultPositions'];return[_0x5a3269['southArrowNorthEast'],_0x5a3269['northArrowSouthEast'],_0x5a3269['southArrowNorth'],_0x5a3269['northArrowSouth'],_0x5a3269['southArrowNorthWest'],_0x5a3269['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x20aa3,'positions':_0x10273a});}['_hideBalloon'](){const _0x56f794=this['balloonPanelView'],_0x25c3c4=_0x56f794['content']['first'];_0x25c3c4&&(this['_detachListeners'](_0x25c3c4),_0x56f794['unpin'](),_0x56f794['content']['clear']());}['_attachListeners'](_0x1825a7){this['listenTo'](_0x1825a7,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1825a7,'Esc',(_0x47cf3f,_0x23f499)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1825a7),this['_hideBalloon'](),_0x23f499();});}['_detachListeners'](_0x3db880){this['stopListening'](_0x3db880);}}class c extends _0x3f67cf{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x3b8509,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d3315){super(_0x4d3315),_0x4d3315['editing']['view']['addObserver'](_0x37beaf),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4d3315['plugins']['get'](_0x3b8509),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x2df0d7=this['editor']['plugins']['get'](M);_0x2df0d7['context']===this['editor']&&(_0x2df0d7['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x366102,_0x18222f)=>{const _0x3f48f6=this['_balloon'];if(this['isAttached']&&_0x3f48f6['visibleView']){const _0x59237b=this['annotations']['getByView'](_0x3f48f6['visibleView']);_0x59237b&&this['_closeAnnotation'](_0x59237b),_0x18222f();}}));}['afterInit'](){const _0x247b61=this['editor']['plugins']['get'](M);_0x247b61['context']===this['editor']&&(_0x247b61['hasActive']()||_0x247b61['switchTo']('inline'));}['setActiveAnnotation'](_0x28ea8f){_0x28ea8f!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x28ea8f&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x28ea8f)&&this['_addAnnotationToBalloon'](_0x28ea8f,!0x0),_0x28ea8f['isActive']=!0x0),_0x28ea8f||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x28ea8f);}['attach'](_0x21d99c){this['annotations']=_0x21d99c;const _0x2622db=this['editor']['plugins']['get'](M),_0x338a38=this['_balloon'];if(this['isAttached'])throw new _0x43099f('inlineannotations-attach-already-attached',this);if(_0x2622db['context']!==this['editor'])throw new _0x43099f('inlineannotations-not-allowed-with-context',this);const _0x4071ab=this['editor']['plugins']['get'](P);this['listenTo'](_0x4071ab,'refresh',()=>{const _0x5ba044=_0x4071ab['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x54342f,_0x5cd0f4;!this['_forceRefresh']&&(_0x54342f=_0x5ba044,_0x5cd0f4=this['_selectedAnnotations'],_0x54342f['length']===_0x5cd0f4['length']&&_0x54342f['every'](_0x2abbb8=>_0x5cd0f4['includes'](_0x2abbb8)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5ba044),this['setActiveAnnotation'](_0x5ba044[0x0]||null));}),this['listenTo'](_0x4071ab,'blur',(_0x32a694,{isAnnotationTracked:_0x44dcf0})=>{this['activeAnnotation']&&_0x44dcf0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x529505,_0x3a12ce,_0x2ead7e)=>{_0x2ead7e||this['setActiveAnnotation'](null);}),this['listenTo'](_0x21d99c,'remove',(_0x55b757,_0x5f34ba)=>{this['_removeAnnotationFromBalloon'](_0x5f34ba),_0x5f34ba===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x338a38,'change:visibleView',(_0x544134,_0x1a0f4f,_0x155aaf,_0x42781e)=>{_0x42781e&&this['stopListening'](_0x42781e);const _0x5f2e00=_0x21d99c['getByView'](_0x155aaf);_0x155aaf&&_0x5f2e00&&(this['listenTo'](_0x155aaf,'change:height',()=>{_0x338a38['updatePosition']();}),this['listenTo'](_0x155aaf,'Esc',()=>{this['_closeAnnotation'](_0x5f2e00),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5f2e00&&this['setActiveAnnotation'](_0x5f2e00));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x338a38['visibleView']&&(_0x21d99c['getByView'](_0x338a38['visibleView'])&&_0x338a38['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 _0x43099f('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x449082 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x449082);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x244458){for(const _0x2bae17 of this['_selectedAnnotations'])_0x244458['includes'](_0x2bae17)||this['_manuallyClosed']['delete'](_0x2bae17);for(const _0x3c4dd5 of this['annotations'])_0x244458['includes'](_0x3c4dd5)||this['_removeAnnotationFromBalloon'](_0x3c4dd5);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1b6b1b of _0x244458)this['_addAnnotationToBalloon'](_0x1b6b1b);}this['_selectedAnnotations']=_0x244458;}['_addAnnotationToBalloon'](_0xd0597b,_0x35730a=!0x1){this['_manuallyClosed']['has'](_0xd0597b)||(this['_addedAnnotations']['has'](_0xd0597b)||this['_balloon']['hasView'](_0xd0597b['view'])||(this['_addedAnnotations']['add'](_0xd0597b),this['_balloon']['add']({'stackId':_0xd0597b['view']['id'],'view':_0xd0597b['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xd0597b)}})),_0x35730a&&this['_balloon']['showStack'](_0xd0597b['view']['id']));}['_getBalloonTargetForAnnotation'](_0x446c03){const _0x3ef1a5=_0x446c03['target'],_0x24fa19=this['editor']['editing']['view'],_0x4d776e=_0x24fa19['document']['selection']['getFirstRange'](),_0x43f543=_0x24fa19['domConverter']['viewRangeToDom'](_0x4d776e);if(_0x43f543['collapse'](!0x0),_0x3ef1a5){if(_0x3ef1a5 instanceof _0x16772f)return _0x3ef1a5;let _0x456d85=[];for(const _0x50f877 of _0x3ef1a5)_0x456d85['push'](...B(_0x50f877['getClientRects']()));_0x456d85=function(_0x12126f){const _0x23bf0f=[];let _0x4c35ba=_0x12126f[0x0];for(let _0x3b2a3c=0x1;_0x3b2a3c<_0x12126f['length'];_0x3b2a3c++)F(_0x4c35ba,_0x12126f[_0x3b2a3c])?_0x4c35ba['width']+=_0x12126f[_0x3b2a3c]['width']:(_0x23bf0f['push'](_0x4c35ba),_0x4c35ba=_0x12126f[_0x3b2a3c]);return _0x23bf0f['push'](_0x4c35ba),_0x23bf0f;}(_0x456d85);const _0xbc4e83=_0x43f543['getBoundingClientRect']();return _0x456d85['find'](_0x5f0774=>_0x5f0774['top']<=_0xbc4e83['top']&&_0x5f0774['bottom']>=_0xbc4e83['bottom']&&_0x5f0774['left']<=_0xbc4e83['left']&&_0x5f0774['right']>=_0xbc4e83['right'])||_0x456d85[0x0];}return _0x446c03['targetRect']||_0x43f543;}['_removeAnnotationFromBalloon'](_0x2b4601){this['_addedAnnotations']['has'](_0x2b4601)&&this['_balloon']['hasView'](_0x2b4601['view'])&&(this['_addedAnnotations']['delete'](_0x2b4601),this['_balloon']['remove'](_0x2b4601['view']));}['_closeAnnotation'](_0x550f3c){this['_manuallyClosed']['add'](_0x550f3c),this['_removeAnnotationFromBalloon'](_0x550f3c);}}function B(_0x387e05){return Array['from'](_0x387e05)['map'](DOMRect['fromRect']);}function F(_0xe9804d,_0x4e5561){return _0xe9804d['top']===_0x4e5561['top']&&_0xe9804d['bottom']===_0x4e5561['bottom']&&_0xe9804d['right']===_0x4e5561['left'];}class it extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1e44ce,_0x43057b){super(_0x1e44ce),this['set']('isEmpty',!_0x43057b['length']),this['focusTracker']=new _0x1f412d(),this['_annotationViews']=_0x43057b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x45831b({'focusables':_0x43057b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x43057b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x43057b,'remove',(_0x437286,_0x5d0d6e)=>{_0x5d0d6e['isActive']&&this['focus'](),_0x43057b['length']||(this['isEmpty']=!0x0);});const _0x46fa5c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x1e44ce,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x43057b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x46fa5c['if']('isEmpty','ck-hidden',_0x1f55ba=>!_0x1f55ba)]},'children':[{'text':E(_0x1e44ce,'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 _0x19a6fa of this['_annotationViews'])this['focusTracker']['add'](_0x19a6fa['element']);this['_annotationViews']['on']('change',(_0x1002c2,{added:_0x6684b2,removed:_0xe915c8})=>{for(const _0x775eee of _0x6684b2)this['focusTracker']['add'](_0x775eee['element']);for(const _0x53d771 of _0xe915c8)this['focusTracker']['remove'](_0x53d771['element']);});}}class f extends _0x57c986{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x19a7c5){super(_0x19a7c5),this['archivedThreads']=new _0x28495a();}['init'](){const _0x117697=this['context'],_0x100925=_0x117697['plugins']['get'](o),_0x4117f1=_0x117697['plugins']['get'](O);this['listenTo'](_0x100925,'addCommentThread',(_0x37cb2a,{threadId:_0x5ed3b3})=>{const _0x497d7a=_0x100925['getCommentThread'](_0x5ed3b3);_0x497d7a['archivedAt']&&this['archivedThreads']['add'](_0x497d7a,this['_calculatePosition'](_0x497d7a['archivedAt'])),this['listenTo'](_0x497d7a,'change:archivedAt',(_0x571d3c,_0x582af3,_0x550f78)=>{_0x550f78?this['archivedThreads']['has'](_0x497d7a)||this['archivedThreads']['add'](_0x497d7a,this['_calculatePosition'](_0x497d7a['archivedAt'])):this['archivedThreads']['has'](_0x497d7a)&&this['archivedThreads']['remove'](_0x497d7a);});}),this['listenTo'](_0x100925,'removeCommentThread',(_0x3f5ec2,{threadId:_0x3f22f7})=>{const _0x12e704=_0x100925['getCommentThread'](_0x3f22f7);this['stopListening'](_0x12e704),this['archivedThreads']['has'](_0x12e704)&&this['archivedThreads']['remove'](_0x12e704);},{'priority':'highest'}),this['listenTo'](_0x4117f1['collection'],'focus',(_0x1485b0,_0xc3b8f7)=>{_0xc3b8f7['isVisible']||(_0xc3b8f7['isActive']=!0x0,_0x4117f1['activate'](_0xc3b8f7));});}['_calculatePosition'](_0x134551){const _0x9b0e14=[...this['archivedThreads']]['findIndex'](_0x2c8ce4=>_0x2c8ce4['archivedAt']<_0x134551);return _0x9b0e14>-0x1?_0x9b0e14:this['archivedThreads']['length'];}}class a extends _0x3f67cf{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x23eebf];}constructor(_0x3856ab){super(_0x3856ab),this['annotationViews']=new _0xa4c1a7(),this['_pendingThreads']=[];}['init'](){const _0xcbd522=this['editor'],_0x5a24bb=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xcbd522['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x151fe8,!0x0)),_0xcbd522['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2d1c65=this['_createCommentsArchiveButton'](_0x2ffab1);return _0x2d1c65['set']({'role':'menuitemcheckbox'}),_0x2d1c65;});const _0x2baee4=_0xcbd522['plugins']['get'](f),_0x3be652=_0xcbd522['plugins']['get']('Annotations'),_0x393102=_0xcbd522['plugins']['get']('CommentsRepository');_0x2baee4['archivedThreads']['forEach'](_0x52ad72=>{this['_handleNewThread'](_0x52ad72);}),this['listenTo'](_0x2baee4['archivedThreads'],'add',(_0x1699b7,_0x5bee82)=>{this['_handleNewThread'](_0x5bee82);}),this['listenTo'](_0x3be652['collection'],'add',(_0x31a4bd,_0x27a9ae)=>{const _0x211092=this['_pendingThreads']['find'](_0x49ffae=>{const _0x3b4174=_0x393102['_threadToController']['get'](_0x49ffae);return _0x3b4174&&_0x27a9ae['innerView']===_0x3b4174['view'];});if(_0x211092){const _0x4df6a0=this['_calculatePosition'](_0x211092['archivedAt']);this['annotationViews']['add'](_0x27a9ae['view'],_0x4df6a0),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x211092),0x1);}}),this['listenTo'](_0x2baee4['archivedThreads'],'remove',(_0x79604d,_0x501283)=>{const _0x107638=_0xcbd522['config']['get']('collaboration.channelId');if(!_0x107638||_0x501283['channelId']===_0x107638){if(this['_pendingThreads']['includes'](_0x501283))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x501283),0x1);else{const _0x8f2781=_0x393102['_threadToController']['get'](_0x501283),_0x204bf9=_0x3be652['getByInnerView'](_0x8f2781['view']);this['annotationViews']['remove'](_0x204bf9['view']),this['stopListening'](_0x204bf9['focusableElements']);}}}),this['listenTo'](_0x3be652['collection'],'add',(_0x13ab21,_0x2c9e86)=>{this['listenTo'](_0x2c9e86,'escape',_0x5a24bb);}),this['listenTo'](_0x3be652['collection'],'remove',(_0x1b7aac,_0x2f9e72)=>{this['stopListening'](_0x2f9e72,'escape',_0x5a24bb);});}['_handleNewThread'](_0x3dc332){const _0x30d113=this['editor']['plugins']['get']('CommentsRepository'),_0x40d599=this['editor']['plugins']['get']('Annotations'),_0x405681=this['editor']['config']['get']('collaboration.channelId');if(!_0x405681||_0x3dc332['channelId']===_0x405681){const _0x5aaabb=_0x30d113['_threadToController']['get'](_0x3dc332);if(!_0x5aaabb)return void this['_pendingThreads']['push'](_0x3dc332);const _0x6a146=this['_calculatePosition'](_0x3dc332['archivedAt']),_0x4bd6d3=_0x40d599['getByInnerView'](_0x5aaabb['view']);_0x4bd6d3['isVisible']&&_0x40d599['_visibleAnnotations']['remove'](_0x4bd6d3),this['annotationViews']['add'](_0x4bd6d3['view'],_0x6a146);}}['_calculatePosition'](_0x18dcb7){const _0x21a712=this['editor']['config']['get']('collaboration.channelId'),_0x1fc18a=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x5af1d1=>_0x5af1d1['channelId']===_0x21a712)['findIndex'](_0x272db5=>_0x272db5['archivedAt']<_0x18dcb7);return _0x1fc18a<0x0||_0x1fc18a>this['annotationViews']['length']?this['annotationViews']['length']:_0x1fc18a-0x1;}['_toggleDialog'](){const _0x1abb6b=this['editor'],_0x1bec30=_0x1abb6b['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new it(_0x1abb6b['locale'],this['annotationViews'])),'commentsArchive'===_0x1bec30['id']?_0x1bec30['hide']():_0x1bec30['show']({'id':'commentsArchive','title':E(_0x1abb6b['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3a4089,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':tt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x30257d,_0x49394d=!0x1){const _0x23da95=this['editor']['locale'],_0x372684=this['editor']['plugins']['get']('Dialog'),_0x1d2135=new _0x30257d(_0x23da95);return _0x1d2135['bind']('isEnabled')['to'](this,'isEnabled'),_0x1d2135['bind']('isOn')['to'](_0x372684,'id',_0x47bd70=>'commentsArchive'===_0x47bd70),_0x1d2135['set']({'label':E(_0x23da95,'COMMENTS_ARCHIVE'),'icon':_0x3a4089,'isToggleable':!0x0}),_0x49394d&&(_0x1d2135['tooltip']=!0x0),this['listenTo'](_0x1d2135,'execute',()=>this['_toggleDialog']()),_0x1d2135;}['_hideDialogOnAnnotationEscape']=_0x872a04=>{const _0x2989d9=_0x872a04['source'];if(!this['annotationViews']['has'](_0x2989d9['view']))return;const _0x7ed741=this['editor']['plugins']['get']('Dialog');_0x7ed741['isOpen']&&'commentsArchive'===_0x7ed741['id']&&(_0x7ed741['hide'](),_0x872a04['stop']());};}class p extends _0x3f67cf{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,is as BaseCommentThreadView,rs as BaseCommentView,fi as Comment,ui as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x4358e8,ContextPlugin as _0x36456e,PendingActions as lt,Command as _0x1d4e46,Plugin as _0x46aee5,Context as _0x3d509f}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1ca8f3,uid as _0x26f50a,KeystrokeHandler as jt,FocusTracker as _0x20e391,diff as _0x15d702,Collection as _0x27e15c,Rect as _0x32a86d,CKEditorError as _0xd92937,first as _0x3dbc24,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x100987,keyCodes as _0x25afdb}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x5ead24,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x1698d7,trimHtml as _0x3404e1,LateFocusDropdownButtonView as _0x2bfcfe,Users as st,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x43e52b}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x4daac0}from'es-toolkit/compat';import{IconUndo as _0x43e8fc,IconCheck as _0x16bc51,IconPencil as _0x5cca6c,IconRemoveComment as _0x23220d,IconThreeVerticalDots as _0x5b09d3,IconAddComment as _0x4bd163,IconCommentsArchive as _0x23c1b7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0xa806cd,ButtonView as _0x3ac222,ViewCollection as _0x3c4ee6,createDropdown as _0x53160a,ListView as _0x13ca0c,focusChildOnDropdownOpen as _0x35acd5,ListItemView as _0x3adee0,MenuBarMenuListItemButtonView as _0x554070,BodyCollection as _0x11df1c,BalloonPanelView as _0x20d659,ContextualBalloon as _0x2944a3,Dialog as _0x2d1df0,DialogViewPosition as tt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x5c406a}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x211b6f}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x5cf785}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1ca8f3(){['model'];['view'];constructor(_0x2e9c3b,_0x5a27cd){super(),this['model']=_0x2e9c3b,this['model']['_isAttached']=!0x0,this['view']=_0x5a27cd,this['listenTo'](_0x5a27cd,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5a27cd,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5a27cd,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5a27cd,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5a27cd,'addComment',(_0x5663aa,_0x170e29)=>this['addComment'](_0x170e29)),this['listenTo'](_0x5a27cd,'updateComment',(_0x2cd23c,_0x5ce216,_0x566ebd)=>this['updateComment'](_0x5ce216,_0x566ebd)),this['listenTo'](_0x5a27cd,'removeComment',(_0x14cfdf,_0x11f42c)=>this['removeComment'](_0x11f42c));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x12485f){this['model']['addComment']({'content':_0x12485f,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xf56e8d,_0x2bcee5){this['model']['getComment'](_0xf56e8d)['update']({'content':_0x2bcee5});}['removeComment'](_0x4b387e){this['model']['getComment'](_0x4b387e)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x418f4d,_0x2d4540,_0x565d3e){const t=_0x418f4d['t'];switch(_0x2d4540){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'},_0x565d3e);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'},_0x565d3e);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'},_0x565d3e);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'},_0x565d3e);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x565d3e);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'},_0x565d3e);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'},_0x565d3e);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'},_0x565d3e);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 Vt extends Xt{['main'];['editable'];constructor(_0x8df469,_0x57d41b){super(_0x8df469);const _0x512036=_0x26f50a();this['main']=this['createCollection'](),this['editable']=new $t(_0x8df469,_0x57d41b,void 0x0,{'label':()=>E(_0x8df469,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x8df469['uiLanguageDirection'],'lang':_0x8df469['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x512036},'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 Ot extends Ut{['view'];constructor(_0x20132e){super(_0x20132e),this['view']=new Vt(_0x20132e['locale'],_0x20132e['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x317dd0=this['editor']['editing']['view'],_0x41ceca=this['view']['editable'],_0x47f670=_0x317dd0['document']['getRoot']();_0x41ceca['name']=_0x47f670['rootName'],this['view']['render']();const _0x3dd1e0=_0x41ceca['element'];this['setEditableElement'](_0x41ceca['name'],_0x3dd1e0),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x317dd0['attachDomRoot'](_0x3dd1e0),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1ca8f3(_0x4358e8){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x4851a4={}){function _0x2d80d2(_0x1d521e){return _0x1d521e['map'](_0x50eb2f=>String['fromCharCode'](_0x50eb2f))['join']('');}(_0x4851a4=Object['assign']({},_0x4851a4))['plugins']||(_0x4851a4['plugins']=Rt['defaultPlugins']),super(_0x4851a4),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2d80d2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d80d2([0x76,0x69,0x65,0x77])][_0x2d80d2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d80d2([0x61,0x75,0x74,0x6f]),this[_0x2d80d2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2d80d2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d80d2([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2d80d2([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2d80d2([0x6f,0x6b])});}['create'](){const _0x5057a3=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5057a3))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xf2e393=>{const _0x69e64f=this['model']['document']['getRoot'](),_0x371f78=_0x69e64f&&_0x69e64f['getChild'](_0x69e64f['childCount']-0x1);_0xf2e393['setSelection'](_0x371f78,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x231a56=this['editing']['view'],_0x58773a=_0x231a56['document']['getRoot'](),_0x335304=_0x58773a['getChild'](0x0);_0x58773a['childCount']>0x1||!_0x335304||'p'!=_0x335304['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x231a56,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x335304['placeholder']=this['placeholder']),Ft({'view':_0x231a56,'element':_0x335304,'keepOnFocus':!0x0}),this['placeholderElement']=_0x335304);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x48566f,_0x48d2f6={}){super(_0x48566f),this['editor']=null,this['_editorConfig']=_0x48d2f6,this['set']('value',_0x48d2f6['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x48566f,'Reply...')),this['set']('submitLabel',E(_0x48566f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x20e391(),this['focusCycler']=new _0xa806cd({'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',(_0x585953,_0x5193fb)=>{this['cancelButtonView']['fire']('execute'),_0x5193fb();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2806b9,_0x157af)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x157af());}),this['on']('submit',(_0x4aa1f6,_0x34d6f5)=>{_0x34d6f5['length']>0xfde8?(alert(E(_0x48566f,'TOO_LONG_COMMENT_ALERT',[_0x34d6f5['length'],0xfde8])),_0x4aa1f6['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x272d32=this['editor'];this['element']['insertBefore'](_0x272d32['ui']['element'],this['element']['firstChild']),_0x272d32['model']['document']['on']('change',()=>this['value']=_0x272d32['getData']()),_0x272d32['bind']('placeholder')['to'](this),this['focusables']['add'](_0x272d32['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x28d34c){-0x1===_0x28d34c?(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:_0x432b6c}=this,_0x3f35c5=new _0x3ac222(_0x432b6c);return _0x3f35c5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3f35c5['withText']=!0x0,_0x3f35c5['bind']('label')['to'](this,'submitLabel'),_0x3f35c5['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3f35c5['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x193671,_0x40b057)=>!_0x40b057&&!!_0x193671['trim']()),_0x3f35c5;}['_createCancelButton'](){const {locale:_0x1e8948}=this,_0x58e14b=new _0x3ac222(_0x1e8948);return _0x58e14b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x58e14b['label']=E(_0x1e8948,'Cancel'),_0x58e14b['withText']=!0x0,_0x58e14b['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x58e14b;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x9361d3=>{this['focusTracker']['add'](_0x9361d3['element']);}),this['focusables']['on']('change',(_0x38d84c,_0x33425e)=>{for(const _0x17ddd5 of Array['from'](_0x33425e['added'])['reverse']())this['focusTracker']['add'](_0x17ddd5['element']);});}}class ie extends kt{constructor(_0x10fc01,_0x3b0b57,_0x583144){super(_0x10fc01),this['commentInputView']=new hs(_0x10fc01,_0x583144),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x16b968,_0x3f0135)=>_0x16b968||!!_0x3f0135),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 _0x5ead24(_0x10fc01,_0x3b0b57),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'](_0x13aaa1){this['commentInputView']['focus'](_0x13aaa1);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2c3e3b,_0x2be176)=>{const {submitButtonView:_0x5289d8,cancelButtonView:_0x9f4b4d,editor:_0x363b86}=this['commentInputView'];[_0x5289d8['element'],_0x9f4b4d['element'],_0x363b86?_0x363b86['editing']['view']['getDomRoot']():null]['filter'](_0x1e8b92=>_0x1e8b92)['some'](_0x15f1ca=>_0x15f1ca['contains'](_0x2be176['target']))||(this['focus'](),_0x2be176['preventDefault']());});}}class cs extends kt{constructor(_0x1c7050){super(_0x1c7050);const _0x2438fc=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2438fc['to']('count',_0x4a398c=>E(_0x1c7050,'NUMBER_OF_COMMENTS',_0x4a398c))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x59cf24,_0x4e51d3,_0x3068a0){super(_0x59cf24);const _0x4139b4=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4e51d3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4e51d3,this['_config']=_0x3068a0,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa806cd({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3802c9=>this['commentViews']['map'](_0x24362b=>_0x24362b['element'])['includes'](_0x3802c9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x59cf24),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x230cf6=>_0x230cf6-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5dbd61 of _0x4e51d3['comments'])this['_handleNewCommentModel'](_0x5dbd61);this['_handleInfoComment'](),this['listenTo'](_0x4e51d3['comments'],'add',(_0x3403b0,_0x52286d)=>{const _0x31180f=this['_calculatePosition'](_0x52286d);this['length']++,this['_handleNewCommentModel'](_0x52286d,_0x31180f),this['refreshVisibleViews']();}),this['listenTo'](_0x4e51d3['comments'],'remove',(_0x17220a,_0x4f69e4)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4f69e4),this['refreshVisibleViews']();}),this['listenTo'](_0x4e51d3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4e51d3,'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',_0x4139b4['if']('length','ck-hidden',_0x520bb0=>!_0x520bb0)],'aria-label':E(_0x59cf24,'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'](_0x71ae13){-0x1===_0x71ae13?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x49877b of this['commentViews'])_0x49877b['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2e81a6,_0x467e38){const _0x4d3503=new this['_config']['CommentView'](this['locale'],_0x2e81a6,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4d3503['viewUid']=_0x2e81a6['id'],_0x4d3503['delegate']('removeComment')['to'](this),_0x4d3503['delegate']('updateComment')['to'](this),_0x4d3503['delegate']('resolveCommentThread')['to'](this),_0x4d3503['delegate']('editorReady')['to'](this),_0x4d3503['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4d3503,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4d3503,_0x467e38);}['_calculatePosition'](_0x5409a1){const _0x11047f=this['_model']['_findOptimalIndex'](_0x5409a1);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5409a1['authoredAt']?_0x11047f-0x1:_0x11047f:_0x11047f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4ddbe8={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x4ddbe8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4ddbe8));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5e92cf){const _0xf385f9=this['commentViews']['remove'](_0x5e92cf['id']);this['stopListening'](_0xf385f9),_0xf385f9['isEditMode']&&this['_updateHasDirtyComment'](),_0xf385f9['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4d164e=>_0x4d164e['isEditMode']);}['_rearrangeCollapse'](){const _0x3a32eb=function(_0x26b515){const _0xafc9=new _0x27e15c();for(const _0x32c6bd of _0x26b515)_0xafc9['add'](_0x32c6bd);return _0xafc9;}(this['commentViews']),_0x56f329=this['_collapsedCommentsView']['count'];for(let _0x5cc5ff=0x1;_0x5cc5ff<=_0x56f329;_0x5cc5ff++)_0x3a32eb['remove'](0x1);for(const _0x143cfe of _0x3a32eb)_0x143cfe['collapse']();_0x56f329>0x0&&_0x3a32eb['add'](this['_collapsedCommentsView'],0x1),as(_0x15d702(Array['from'](this['visibleViews']),Array['from'](_0x3a32eb)),this['visibleViews'],_0x3a32eb);}['_rearrangeExpand'](){as(_0x15d702(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x19641f of this['visibleViews'])_0x19641f['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1eba9c=>{this['focusTracker']['add'](_0x1eba9c['element']),this['keystrokes']['listenTo'](_0x1eba9c['element']);}),this['commentViews']['on']('change',(_0xb69607,_0x1e719c)=>{for(const _0xb09d59 of _0x1e719c['removed'])this['focusTracker']['remove'](_0xb09d59['element']),this['keystrokes']['stopListening'](_0xb09d59['element']);for(const _0xbc8f3f of Array['from'](_0x1e719c['added'])['reverse']())this['focusTracker']['add'](_0xbc8f3f['element']),this['keystrokes']['listenTo'](_0xbc8f3f['element']);});}}function as(_0x27ff3f,_0x56a924,_0x5a3cc9){let _0x243ea8=0x0;for(const _0x1c5436 of _0x27ff3f)switch(_0x1c5436){case'insert':_0x56a924['add'](_0x5a3cc9['get'](_0x243ea8),_0x243ea8),_0x243ea8++;break;case'delete':_0x56a924['remove'](_0x243ea8);break;case'equal':_0x243ea8++;}}class ls extends kt{constructor(_0x2ffadc){super(_0x2ffadc);const _0x32609b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x32609b['to']('contextValue',_0x45f222=>E(_0x2ffadc,'THREAD_CONTEXT_LABEL',_0x45f222)),'tabindex':-0x1},'children':[{'text':_0x32609b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4b5911,_0x285f44){super(_0x4b5911);const _0x377942=this['bindTemplate'];this['_model']=_0x285f44,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa806cd({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x580dfc=>!!_0x580dfc),this['bind']('contextValue')['to'](this['_model'],'context',_0x2d30b3=>_0x2d30b3&&_0x2d30b3['value']?this['_trimContextValue'](_0x2d30b3['value']):E(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',_0x377942['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 _0x548dcd=new _0x3ac222(this['locale']);return _0x548dcd['label']=E(this['locale'],'Reopen'),_0x548dcd['tooltip']=E(this['locale'],'Reopen'),_0x548dcd['icon']=_0x43e8fc,_0x548dcd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4902f2=>!_0x4902f2),_0x548dcd['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4957b0,_0xfb5471)=>_0x4957b0&&_0xfb5471),_0x548dcd['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x548dcd;}['_trimContextValue'](_0x2831da){if(_0x2831da['length']<0x96)return _0x2831da;const _0x72ee0c=_0x2831da['lastIndexOf']('\x20',0x93);return _0x2831da['substring'](0x0,_0x72ee0c>-0x1?_0x72ee0c:0x93)+'...';}['_attachContextActions'](){const _0x1e6e52=this['element']['querySelector']('.ck-context'),_0x456e2b=_0x1e6e52['querySelector']('.ck-context__value');this['listenTo'](_0x1e6e52,'mouseenter',()=>{_0x456e2b['offsetWidth']<_0x456e2b['scrollWidth']&&_0x1e6e52['classList']['add']('overlay');}),this['listenTo'](_0x1e6e52,'mouseleave',()=>{_0x1e6e52['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x543538 of this['focusables'])this['focusTracker']['add'](_0x543538['element']),this['keystrokes']['listenTo'](_0x543538['element']);}['_createContextView'](){const _0x4c51a6=new ls(this['locale']);return _0x4c51a6['bind']('contextValue')['to'](this),_0x4c51a6;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x56055d,_0x13f9ef,_0x37df72,_0x5b5ff6){super(_0x56055d),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x13f9ef,this['_localUser']=_0x37df72,this['_config']=_0x5b5ff6,this['commentThreadHeaderView']=new Yt(_0x56055d,_0x13f9ef),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x56055d,E(_0x56055d,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x56055d,_0x13f9ef,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5b5ff6)),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',(_0x2f09df,_0x1d3fa2)=>_0x2f09df||!!_0x1d3fa2),this['bind']('isUnlinked')['to'](_0x13f9ef,'unlinkedAt',_0x2cc751=>!!_0x2cc751),this['bind']('ariaLabel')['to'](this,'length',_0x53da56=>{const _0x5788db=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x53da56,_0x5788db]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa806cd({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x13c37c=>_0x13c37c['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x5c369d=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1f1f3e=_0x5c369d['commentInputView'];return _0x5c369d['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1f1f3e,'value',(_0x8ef853,_0xa6e975,_0x13cc5a,_0x3309cd,_0x3acb6f)=>!!_0x3acb6f||!!_0x3309cd&&_0x13cc5a&&!_0xa6e975||_0x8ef853&&_0x13cc5a&&!_0xa6e975),_0x1f1f3e['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x19baad,_0x55d367,_0x568ac7)=>{let _0x586aaa;return _0x586aaa=_0x568ac7&&_0x55d367?'Reply\x20to\x20reopen\x20discussion...':_0x19baad?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x586aaa);}),_0x1f1f3e['bind']('submitLabel')['to'](this,'length',_0x358821=>E(this['locale'],_0x358821?'Reply':'Comment')),_0x1f1f3e['on']('submit',(_0xde352d,_0x418de4)=>{this['fire']('addComment',_0x418de4),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1f1f3e['on']('cancel',()=>{this['focus']();}),_0x1f1f3e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1f1f3e['on']('cancel',_0x1607fa=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1607fa['stop']());}),this['on']('change:isActive',(_0x2c5bec,_0x274610,_0x2afba5)=>{_0x2afba5||this['length']||_0x1f1f3e['value']||this['fire']('removeCommentThread');}),_0x5c369d;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4575a5,_0x71f553,_0x147967,_0x48cef4){super(_0x4575a5,_0x71f553,_0x147967,_0x48cef4),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4575a5,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2152af,_0x22e2df,_0x36d444)=>{_0x36d444||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1885f1,_0x4a3972,_0x3c55c2)=>{_0x3c55c2&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x42a9f4=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x42a9f4['if']('isActive','ck-thread--active'),_0x42a9f4['if']('isUnlinked','ck-thread--unlinked'),_0x42a9f4['if']('isConfirm','ck-thread--remove-confirmation'),_0x42a9f4['to']('actionIndicator',_0x1bf068=>_0x1bf068?'ck-thread--'+_0x1bf068:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x42a9f4['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 _0x4fab2e of this['commentsListView']['commentViews'])_0x4fab2e['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x42f3d1}=this,_0x1e1fa0=this['commentsListView']['commentViews']['get'](0x0);_0x1e1fa0===this['_boundFirstCommentView']||_0x1e1fa0['isSystemComment']||(this['_boundFirstCommentView']=_0x1e1fa0,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1e1fa0,'actionIndicator',_0x4e2991=>'remove'===_0x4e2991?'remove':null),_0x1e1fa0['placeholder']=E(_0x42f3d1,'Write\x20a\x20comment...'),_0x1e1fa0['removeButton']['on']('execute',_0x3c276c=>{_0x3c276c['stop'](),this['showConfirm'](E(_0x42f3d1,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1e1fa0['focus']();}),_0x1e1fa0['actionBar']['add'](this['resolveButton'],0x0),_0x1e1fa0['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5f1f03=new _0x1698d7(this['locale']);return _0x5f1f03['label']=E(this['locale'],'Resolve'),_0x5f1f03['tooltip']=E(this['locale'],'Resolve'),_0x5f1f03['icon']=_0x16bc51,_0x5f1f03['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5f1f03['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x6ef811=>!_0x6ef811),_0x5f1f03['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x287013,_0x3220f8)=>_0x287013&&!_0x3220f8),_0x5f1f03['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5f1f03;}['_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 os extends kt{constructor(_0x5acf5a){super(_0x5acf5a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x386a4a,_0x50fba7,_0xdee57d)=>{this['element']['innerHTML']=_0xdee57d;}),this['element']['innerHTML']=this['content'];}}class rs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x180e40,_0x4d054e,_0x209f79){super(_0x180e40),this['_model']=_0x4d054e,this['_config']=_0x209f79,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4d054e,'content',_0x4d054e,'authoredAt',(_0xb4bee8,_0x562695)=>E(_0x180e40,'COMMENT_ARIA_LABEL',[_0x4d054e['author']['name'],_0x209f79['formatDateTime'](_0x562695),new DOMParser()['parseFromString'](_0xb4bee8,'text/html')['body']['textContent'],_0x4d054e['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x180e40,E(_0x180e40,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x3c4ee6(),this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['focusCycler']=new _0xa806cd({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x593d9a=>_0x593d9a['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x52f27f=new os(this['locale']);return _0x52f27f['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4657c4,_0x6cd735)=>_0x6cd735?_0x3404e1(_0x4657c4,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4657c4),_0x52f27f;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x51835e=new hs(this['locale'],this['_config']['editorConfig']);return _0x51835e['value']=this['_model']['content'],_0x51835e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x51835e['submitLabel']=E(this['locale'],'Save'),_0x51835e['on']('submit',(_0x5694ec,_0x1d4eb5)=>{this['fire']('updateComment',this['_model']['id'],_0x1d4eb5),this['switchToDisplayMode'](),this['focus']();}),_0x51835e['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x51835e['once']('editorReady',()=>{_0x51835e['focus']();}),_0x51835e['createEditor'](),_0x51835e['delegate']('editorReady')['to'](this),_0x51835e['delegate']('editorDestroyed')['to'](this),_0x51835e;}['_setupKeyboardNavigation'](){const _0x474087=this['element'];this['keystrokes']['listenTo'](_0x474087);for(const _0x13ab3f of this['focusables'])this['focusTracker']['add'](_0x13ab3f['element']),this['keystrokes']['listenTo'](_0x13ab3f['element']);this['focusables']['on']('change',(_0x3120cd,_0x1ab1e7)=>{for(const _0x4f1828 of _0x1ab1e7['removed'])this['focusTracker']['remove'](_0x4f1828['element']),this['keystrokes']['stopListening'](_0x4f1828['element']);for(const _0x35b45b of _0x1ab1e7['added'])this['focusTracker']['add'](_0x35b45b['element']),this['keystrokes']['listenTo'](_0x35b45b['element']);}),this['keystrokes']['set']('enter',(_0x3977cc,_0x52bdca)=>{_0x474087===_0x3977cc['target']&&(this['focusCycler']['focusFirst'](),_0x52bdca());}),this['keystrokes']['set']('esc',(_0x254764,_0xa42cf8)=>{_0x474087!==_0x254764['target']&&(this['focus'](),_0xa42cf8());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(rs){['actionBar'];['userView'];constructor(_0x563728,_0x19ef56,_0x1cf906){super(_0x563728,_0x19ef56,_0x1cf906),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x563728,'Reply...')),this['bind']('authoredAt')['to'](_0x19ef56),this['bind']('resolvedAt')['to'](_0x19ef56),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 _0x5ead24(_0x563728,_0x19ef56['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x19ef56,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x3c8527=this['bindTemplate'],_0xe3860f=[{'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':_0x3c8527['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x3c8527['to']('authoredAt',_0x2387df=>this['_config']['formatDateTime'](_0x2387df))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x3c8527['if']('isEditMode','ck-comment__actions--hidden'),_0x3c8527['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']&&_0xe3860f['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x3c8527['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x3c8527['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x3c8527['if']('isEditMode','ck-comment--edit'),_0x3c8527['if']('isSystemComment','ck-comment--info'),_0x3c8527['to']('actionIndicator',_0x30b3ab=>_0x30b3ab?'ck-comment--'+_0x30b3ab:'')],'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':_0xe3860f}]}]};}['_createEditButton'](){const _0x5465b6=new _0x3ac222(this['locale']);return _0x5465b6['label']=E(this['locale'],'Edit'),_0x5465b6['icon']=_0x5cca6c,_0x5465b6['withText']=!0x0,_0x5465b6['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5465b6['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1c20e5=>!_0x1c20e5),_0x5465b6['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5465b6['on']('execute',()=>this['switchToEditMode']()),_0x5465b6;}['_createRemoveButton'](){const _0x509197=new _0x3ac222(this['locale']);return _0x509197['label']=E(this['locale'],'Remove'),_0x509197['icon']=_0x23220d,_0x509197['withText']=!0x0,_0x509197['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x509197['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x42f23f=>!_0x42f23f),_0x509197['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x509197['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x509197;}['_createDropdown'](){const _0x470003=_0x53160a(this['locale'],_0x2bfcfe),_0x5ec4f4=_0x470003['panelView']['children'],_0x3055e2=new _0x13ca0c(this['locale']),_0x3a13c4=_0x470003['bindTemplate'];_0x35acd5(_0x470003,()=>this['items']['find'](_0x1ee853=>_0x1ee853['isVisible'])),_0x470003['extendTemplate']({'attributes':{'class':[_0x3a13c4['if']('isVisible','ck-hidden',_0x18b68f=>!_0x18b68f)]}});const _0x252db1=(_0x38c310,_0x1d0cc6=-0x1)=>{const _0x5443da=new _0x3adee0(this['locale']);_0x5443da['children']['add'](_0x38c310);const _0x35f00e=_0x1d0cc6>-0x1?_0x1d0cc6:_0x3055e2['items']['length'];_0x3055e2['items']['add'](_0x5443da,_0x35f00e);const _0x165fee=Array['from'](this['items']);_0x470003['unbind']('isEnabled','isVisible'),_0x470003['bind']('isEnabled')['toMany'](_0x165fee,'isEnabled',(..._0x16aead)=>_0x16aead['some'](_0x462ea0=>_0x462ea0)),_0x470003['bind']('isVisible')['toMany'](_0x165fee,'isVisible',(..._0x5a0a65)=>_0x5a0a65['some'](_0x5667ae=>_0x5667ae));};_0x470003['panelPosition']='sw',_0x470003['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x5b09d3});for(const _0x39261d of this['items'])_0x252db1(_0x39261d);return _0x5ec4f4['add'](_0x3055e2),_0x470003['listenTo'](this['items'],'add',(_0x7faeb7,_0x361e6d,_0x57c54e)=>{_0x252db1(_0x361e6d,_0x57c54e);}),_0x470003['listenTo'](this['items'],'remove',(_0x72fb33,_0x41cddc,_0xeb1b3b)=>{_0x3055e2['items']['remove'](_0xeb1b3b);}),_0x470003;}['_attachActions'](_0x23191e,_0x3890f3){const _0x6fca2=_0x23191e&&_0x23191e['element'];_0x6fca2&&(this['listenTo'](_0x6fca2,'mouseenter',()=>this['actionIndicator']=_0x3890f3),this['listenTo'](_0x6fca2,'focus',()=>this['actionIndicator']=_0x3890f3),this['listenTo'](_0x6fca2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x6fca2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x55ff16=super['_createCommentInputView']();return _0x55ff16['bind']('placeholder')['to'](this),_0x55ff16;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x2c50d3){const _0x521df2=Dt(_0x2c50d3,0x1e),_0xe85cad=new MutationObserver(_0xf7de1b=>{for(const _0x5e7d10 of _0xf7de1b)('attributes'==_0x5e7d10['type']&&'class'==_0x5e7d10['attributeName']||'childList'==_0x5e7d10['type']||'characterData'==_0x5e7d10['type'])&&_0x521df2();});return{'attach'(_0x578f8f){_0xe85cad['observe'](_0x578f8f,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xe85cad['disconnect'](),_0x521df2['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4e5b93,_0x328aa8){super(_0x4e5b93),this['id']=_0x26f50a(),this['focusTracker']=new _0x20e391(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5d0a1f,_0x24fc4d)=>this['fire']('Esc',_0x24fc4d)),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']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x328aa8),this['mainView']=_0x328aa8;const _0x981c38=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x981c38['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 _0x38cf3d=this['element']['clientHeight'];_0x38cf3d&&(this['height']=_0x38cf3d);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1ca8f3(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4d3617,target:_0x171885,type:_0x39d4fc,isVisible:_0x3446e2=!0x0}){super(),this['view']=_0x4d3617,this['view']['element']||this['view']['render'](),this['_type']=_0x39d4fc,this['_target']=_0x171885,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x27e15c([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x586040,_0x87f2)=>{this['view']['focusTracker']['add'](_0x87f2);}),this['focusableElements']['on']('remove',(_0x8a44d1,_0x4b75c7)=>{this['view']['focusTracker']['remove'](_0x4b75c7);}),this['set']('isVisible',_0x3446e2);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4cd16b=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x4cd16b),_0x4cd16b;}get['targetRect'](){const _0x357f5f=this['target'];if(null===_0x357f5f)return null;if(_0x357f5f instanceof _0x32a86d)return _0x357f5f;const _0x4b749c=_0x357f5f['filter'](_0x530e91=>function(_0x17e4dc){const _0x4dc885=_0x17e4dc['offsetParent'];if(_0x4dc885)return!0x0;const _0x400398=_0x17e4dc['getClientRects']()['item'](0x0);return!!_0x400398;}(_0x530e91));return 0x0===_0x4b749c['length']?null:new _0x32a86d(_0x4b749c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3de357){this['view']['isActive']=_0x3de357,this['view']['mainView']['isActive']=_0x3de357;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x18414a){if(!(null===_0x18414a||_0x18414a instanceof _0x32a86d||Array['isArray'](_0x18414a)&&_0x18414a['every'](_0x5b1617=>li(_0x5b1617))))throw new _0xd92937('annotation-invalid-target',null,{'target':_0x18414a});}['_getNormalizedTarget'](){const _0x179ae9='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x179ae9)?[_0x179ae9]:_0x179ae9;}}function li(_0x54f1eb){return null!==_0x54f1eb&&'object'==typeof _0x54f1eb&&'nodeType'in _0x54f1eb&&0x1===_0x54f1eb['nodeType'];}class _ extends _0x27e15c{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x6cfe68=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x20e391(),this['_focusTracker']['on']('change:isFocused',(_0x5f4291,_0x300ac1,_0x952a2c)=>{_0x952a2c||this['fire']('blur');});for(const _0xd92edc of _0x6cfe68)this['add'](_0xd92edc);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x25a4af){if(this['has'](_0x25a4af))throw new _0xd92937('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x25a4af['innerView'],_0x25a4af),this['_viewToAnnotation']['set'](_0x25a4af['view'],_0x25a4af);for(const _0x43bb36 of _0x25a4af['focusableElements'])this['_focusTracker']['add'](_0x43bb36);this['listenTo'](_0x25a4af['focusableElements'],'add',(_0x5f49cd,_0x492346)=>{this['_focusTracker']['add'](_0x492346);}),this['listenTo'](_0x25a4af['focusableElements'],'remove',(_0x49d78d,_0xa6443e)=>{this['_focusTracker']['remove'](_0xa6443e);}),this['listenTo'](_0x25a4af['view']['focusTracker'],'change:isFocused',(_0x150620,_0x1e2a68,_0x3b7de0)=>{_0x3b7de0&&this['fire']('focus',_0x25a4af);}),_0x25a4af['updateTargetRect']();const _0xd433d8=this['_getOrderInContent'](_0x25a4af['view']['targetRect']);return super['add'](_0x25a4af,_0xd433d8);}['remove'](_0x53d963){if(!this['has'](_0x53d963))throw new _0xd92937('annotationcollection-not-existing-item',null);this['stopListening'](_0x53d963['view']['focusTracker']),this['stopListening'](_0x53d963['focusableElements']);for(const _0x2d6e9a of _0x53d963['focusableElements'])this['_focusTracker']['remove'](_0x2d6e9a);return this['_viewToAnnotation']['delete'](_0x53d963['view']),this['_innerViewToAnnotation']['delete'](_0x53d963['innerView']),super['remove'](_0x53d963);}['getByInnerView'](_0x1867eb){return this['_innerViewToAnnotation']['get'](_0x1867eb);}['getByView'](_0x124b74){return this['_viewToAnnotation']['get'](_0x124b74);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x36476e of this)_0x36476e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1ecde4=Array['from'](this)['sort']((_0x134962,_0x1fe408)=>v(_0x134962['view']['targetRect'],_0x1fe408['view']['targetRect']));for(let _0x247eab=_0x1ecde4['length']-0x1;_0x247eab>0x0;_0x247eab--){const _0x61c410=_0x1ecde4[_0x247eab];_0x247eab!==this['getIndex'](_0x61c410)&&(this['remove'](_0x61c410),this['add'](_0x61c410));}}['_getOrderInContent'](_0x34bc66){let _0x24df74=0x0;if(!_0x34bc66)return this['length'];for(const _0x51b1c5 of this){const _0x3dbfd0=_0x51b1c5['view']['targetRect'];if(_0x3dbfd0){if(v(_0x34bc66,_0x3dbfd0)<0x0)return _0x24df74;_0x24df74++;}}return _0x24df74;}}function v(_0x13fc00,_0x36e64b){if(null===_0x13fc00&&null===_0x36e64b)return 0x0;if(null===_0x13fc00)return-0x1;if(null===_0x36e64b)return 0x1;const _0xb4ab59=_0x13fc00['top']-_0x36e64b['top'];return 0x0==_0xb4ab59?_0x13fc00['left']-_0x36e64b['left']:_0xb4ab59;}class O extends _0x36456e{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x25f9fd){if(super(_0x25f9fd),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x25f9fd instanceof _0x4358e8){const _0x557cca=_0x25f9fd['locale'];_0x25f9fd['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x557cca,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x238b26){this['collection']['add'](_0x238b26);}['remove'](_0x1811f5){this['collection']['remove'](_0x1811f5),_0x1811f5['destroy']();}['refreshVisibility'](){for(const _0x4fa70d of this['collection'])_0x4fa70d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2cc03d){return this['collection']['getByInnerView'](_0x2cc03d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3144e7 of this['collection'])_0x3144e7['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0xdc157f){this['fire']('_activateAnnotation',_0xdc157f);}['createAnnotation'](_0x3de703){return new d(_0x3de703);}['createAnnotationView'](_0x316102,_0x53be08){return new S(_0x316102,_0x53be08);}['_addActiveAnnotation'](_0xfebc04){const _0x26268a=new Set(this['activeAnnotations']);_0x26268a['add'](_0xfebc04),this['activeAnnotations']=_0x26268a;}['_removeActiveAnnotation'](_0x1fae16){const _0xc62c13=new Set(this['activeAnnotations']);_0xc62c13['delete'](_0x1fae16),this['activeAnnotations']=_0xc62c13;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4a40be=this['collection'],_0x4a108f=this['_visibleAnnotations'];function _0x316999(_0x3accf8){const _0x6eedfc=_0x3accf8['source'];_0x6eedfc['isVisible']&&!_0x4a108f['has'](_0x6eedfc)?_0x4a108f['add'](_0x6eedfc):!_0x6eedfc['isVisible']&&_0x4a108f['has'](_0x6eedfc)&&_0x4a108f['remove'](_0x6eedfc),_0x6eedfc['view']['focusTracker']['remove'](_0x6eedfc['view']['element']),_0x6eedfc['view']['focusTracker']['add'](_0x6eedfc['view']['element']);}this['listenTo'](_0x4a40be,'add',(_0xab12a2,_0xe148ac)=>{_0xe148ac['isVisible']&&_0x4a108f['add'](_0xe148ac),this['listenTo'](_0xe148ac,'change:isVisible',_0x316999);}),this['listenTo'](_0x4a40be,'remove',(_0x1ad3c4,_0x5886e4)=>{_0x4a108f['has'](_0x5886e4)&&_0x4a108f['remove'](_0x5886e4),this['stopListening'](_0x5886e4,'change:isVisible',_0x316999);});}['_setupEnterAnnotationKeystroke'](){const _0x4d9650=_0x24ae25=>{_0x24ae25['on']('ready',()=>{_0x24ae25['keystrokes']['set'](_0x211b6f,(_0x2ea35f,_0x7574a1)=>{const _0x3fa710=_0x3dbc24(this['activeAnnotations']['values']());_0x3fa710&&(_0x3fa710['view']['focus'](),_0x7574a1());});});};this['context']instanceof _0x4358e8?_0x4d9650(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1780c8,_0x8014a7)=>{_0x4d9650(_0x8014a7);});}['_setupEscapeAnnotationHandling'](){const _0x176d3c=_0x2801d8=>{const _0x97488e=_0x2801d8['source'],_0x3626fd=[];let _0x5ccd27;if(Array['isArray'](_0x97488e['target'])){_0x5ccd27=_0x97488e['target'][0x0],this['context']instanceof _0x4358e8?_0x3626fd['push'](this['context']):this['context']['editors']&&_0x3626fd['push'](...this['context']['editors']);for(const _0x2da750 of _0x3626fd)for(const _0x6a298a of _0x2da750['editing']['view']['domRoots']['values']())if(_0x6a298a['contains'](_0x5ccd27))return void _0x2da750['editing']['view']['focus']();_0x5ccd27['focus']();}};this['listenTo'](this['collection'],'add',(_0x53a209,_0x5e1c74)=>{this['listenTo'](_0x5e1c74,'escape',_0x176d3c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x49b881,_0x2b8b05)=>{this['stopListening'](_0x2b8b05,'escape',_0x176d3c);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x36456e{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,lt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x438cd6){super(_0x438cd6),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3e5705=this['context']['config'];_0x3e5705['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3e5705['define']('comments.maxThreadTotalWeight',0x1f4),_0x3e5705['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3e5705['define']('comments.CommentThreadView',gt),_0x3e5705['define']('comments.CommentView',Tt),_0x3e5705['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x34a805=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x33b477,_0x59f76)=>this['_addCommentThread'](_0x59f76)),this['on']('submitCommentThread',(_0xd4e946,_0x1412df)=>this['_submitCommentThread'](_0x1412df)),this['on']('resolveCommentThread',(_0x393f9f,_0x1b5f93)=>this['_resolveCommentThread'](_0x1b5f93)),this['on']('resolveCommentThread',(_0x537f29,_0x2396a4)=>this['_updateActiveAnnotation'](_0x2396a4),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0xd44a7,_0x43a4b2)=>this['_reopenCommentThread'](_0x43a4b2)),this['on']('reopenCommentThread',(_0x22a81c,_0x16b90e)=>this['_updateActiveAnnotation'](_0x16b90e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x52d2b2,_0x10d12e)=>this['_removeCommentThread'](_0x10d12e)),this['on']('updateCommentThread',(_0x270406,_0x1d27a4)=>this['_updateCommentThread'](_0x1d27a4)),this['on']('updateCommentThread',(_0x2ff0ba,_0x232d10)=>this['_updateActiveAnnotation'](_0x232d10),{'priority':'lowest'}),this['on']('addComment',(_0x2e0f01,_0x429a84)=>this['_addComment'](_0x429a84)),this['on']('updateComment',(_0x26f4b3,_0x23f8ea)=>this['_updateComment'](_0x23f8ea)),this['on']('removeComment',(_0x1573bd,_0x2cad5a)=>this['_removeComment'](_0x2cad5a)),this['on']('addComment',(_0x1be906,{threadId:_0xcdad31,isFromAdapter:_0x22799b})=>{if(_0x22799b)return;const _0x2cc99f=this['getCommentThread'](_0xcdad31),_0x996146=_0x2cc99f&&this['_threadToController']['get'](_0x2cc99f);_0x996146&&_0x996146['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x34a805,'change:activeAnnotations',(_0x13d2f5,_0x2b7cd8,_0x489dfc)=>{const _0x4645e3=Array['from'](_0x489dfc)['map'](_0x4a9b81=>this['_viewToController']['get'](_0x4a9b81['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4645e3?_0x4645e3['model']:null;});}set['adapter'](_0x369c1e){if(this['_adapter'])throw new _0xd92937('commentsrepository-adapter-already-set');this['_adapter']=_0x369c1e;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x564289=_t,threadId:_0x40deac=_0x26f50a(),comments:_0x10d07e=[],unlinkedAt:_0x367fc4=null,resolvedAt:_0x2d98ca=null,resolvedBy:_0xf85fdc=null,target:_0x54e093=null,context:_0x4c05f6=null,attributes:_0x10e238={},isResolvable:_0x380f78=!0x0,isSubmitted:_0x1a475f=!0x1,isFromAdapter:_0x5500c4=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x564289),{'channelId':_0x564289,'threadId':_0x40deac,'comments':_0x10d07e,'unlinkedAt':_0x367fc4,'resolvedAt':_0x2d98ca,'resolvedBy':_0xf85fdc,'target':_0x54e093,'context':_0x4c05f6,'attributes':_0x10e238,'isFromAdapter':_0x5500c4,'isResolvable':_0x380f78,'isSubmitted':_0x1a475f}),this['getCommentThread'](_0x40deac);}['openNewCommentThread']({channelId:_0x2e25ee=_t,threadId:_0x3df540=_0x26f50a(),target:_0x2ab6dc,context:_0x50cd3d=null,isResolvable:_0xdd05a2=!0x0}){if(this['_readOnlyChannels']['has'](_0x2e25ee)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2ab6dc)throw new _0xd92937('commentsrepository-missing-target');const _0x171325=this['addCommentThread']({'channelId':_0x2e25ee,'threadId':_0x3df540,'target':_0x2ab6dc,'context':_0x50cd3d,'isResolvable':_0xdd05a2});if(!_0x171325)return null;const _0x9fafd2=this['_threadToController']['get'](_0x171325),_0x214092=_0x9fafd2['view']['commentThreadInputView']['commentInputView'],_0x4b73a9=this['context']['plugins']['get'](O),_0x4a343c=_0x4b73a9['getByInnerView'](_0x9fafd2['view']);return _0x4b73a9['activate'](_0x4a343c),_0x214092['once']('editorReady',()=>_0x214092['focus']()),_0x171325;}['hasCommentThread'](_0x2c2a37){if('string'!=typeof _0x2c2a37)throw new _0xd92937('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2c2a37);}['updateCommentThread']({channelId:_0x36e9f4=_t,threadId:_0x4e994b,context:_0x1bc54c,unlinkedAt:_0x1e14da,attributes:_0x21c3a4,isFromAdapter:_0x424d24=!0x1}){return this['fire'](Nt('updateCommentThread',_0x36e9f4),{'channelId':_0x36e9f4,'threadId':_0x4e994b,'context':_0x1bc54c,'unlinkedAt':_0x1e14da,'attributes':_0x21c3a4,'isFromAdapter':_0x424d24}),this['getCommentThread'](_0x4e994b);}['getCommentThread'](_0x58569e){if('string'!=typeof _0x58569e)throw new _0xd92937('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x58569e);}['fetchCommentThread']({channelId:_0x264197,threadId:_0x3ff26d}={}){const _0x1450ac=this['getCommentThread'](_0x3ff26d);if(_0x1450ac)return Promise['resolve'](_0x1450ac);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xd92937('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x264197,'threadId':_0x3ff26d})['then'](_0x27d2db=>this['hasCommentThread'](_0x3ff26d)?this['getCommentThread'](_0x3ff26d):_0x27d2db?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x264197},_0x27d2db)):void 0x0)['catch'](_0xc65d5f=>{throw console['error'](_0xc65d5f),new _0xd92937('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x22aedc,skipNotAttached:_0xfb3a55=!0x1,skipEmpty:_0x173beb=!0x1,toJSON:_0x55c45f=!0x1}={}){const _0x81d72=[];for(const _0x55b169 of this['_threads']['values']())_0x22aedc&&_0x55b169['channelId']!==_0x22aedc||_0xfb3a55&&!_0x55b169['isAttached']||_0x173beb&&0x0===_0x55b169['length']||_0x81d72['push'](_0x55b169);return _0x55c45f?_0x81d72['map'](_0x155242=>_0x155242['toJSON']()):_0x81d72;}['setActiveCommentThread'](_0x2bbf98){const _0x132263=this['context']['plugins']['get'](O);if(!_0x2bbf98)return void(this['activeCommentThread']&&_0x132263['deactivateAll']());const _0x24a840=this['getCommentThread'](_0x2bbf98);if(!_0x24a840)throw new _0xd92937('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2bbf98});if(!this['_threadToController']['has'](_0x24a840))throw new _0xd92937('commentsrepository-active-not-attached',null,{'threadId':_0x2bbf98});const _0xf5f455=_0x132263['getByInnerView'](this['_threadToController']['get'](_0x24a840)['view']);_0x132263['activate'](_0xf5f455);}['switchReadOnly'](_0x4d7e0f,_0x5deb0d){_0x4d7e0f?this['_readOnlyChannels']['add'](_0x5deb0d):this['_readOnlyChannels']['delete'](_0x5deb0d),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x129e2b){return this['_readOnlyChannels']['has'](_0x129e2b)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x217a9c,_0x316fe8){return new vt(_0x217a9c,_0x316fe8);}['setPermissions'](_0x213c2c,_0x4a2bcc=_t){this['_permissions']['set'](_0x4a2bcc,_0x213c2c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x26d27f=_t){return this['_permissions']['has'](_0x26d27f)?this['_permissions']['get'](_0x26d27f):bt;}['_addCommentThread']({channelId:_0x3ac237,threadId:_0x4df46e,comments:_0x3e9432,unlinkedAt:_0x2e84ec,resolvedAt:_0x3329de,resolvedBy:_0x3b0b35,target:_0x421a78,context:_0x51ef1f,attributes:_0x31537b,isFromAdapter:_0xc73f78,isResolvable:_0x404a58,isSubmitted:_0x2e53c9}){if('string'!=typeof _0x4df46e)throw new _0xd92937('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4df46e});if(this['hasCommentThread'](_0x4df46e))throw new _0xd92937('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4df46e});const _0xbd2286=new ui(this,{'channelId':_0x3ac237,'id':_0x4df46e,'context':_0x51ef1f,'attributes':_0x31537b,'unlinkedAt':_0x2e84ec,'resolvedAt':_0x3329de,'resolvedBy':_0x3b0b35?this['context']['plugins']['get'](st)['getUser'](_0x3b0b35):null,'isResolvable':_0x404a58,'isSubmitted':_0x2e53c9||_0xc73f78});this['_threads']['set'](_0x4df46e,_0xbd2286);for(const _0xe47179 of _0x3e9432)_0xbd2286['_add'](this['_createNewComment']({'threadId':_0x4df46e,..._0xe47179}));return _0x421a78&&_0xbd2286['attachTo'](_0x421a78),_0xc73f78||!_0xbd2286['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3ac237,'threadId':_0x4df46e});}['_submitCommentThread']({channelId:_0x4d5059,threadId:_0x2920a6}){if(!this['hasCommentThread'](_0x2920a6))throw new _0xd92937('commentsrepository-missing-comment-thread',this);const _0x27ae7f=this['getCommentThread'](_0x2920a6);if(_0x27ae7f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x188a85,comments:_0x54c110,resolvedAt:_0x21e466,resolvedBy:_0x2e77d2,context:_0x28cc30,attributes:_0x1e1e38}=_0x27ae7f,_0x4b1a01=this['context']['plugins']['get']('PendingActions'),_0x51908b=_0x4b1a01['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4d5059,'threadId':_0x188a85,'comments':_0x54c110['map'](_0x204131=>_0x204131['toJSON']()),'resolvedAt':_0x21e466,'resolvedBy':_0x2e77d2?_0x2e77d2['id']:_0x2e77d2,'context':_0x28cc30,'attributes':_0x1e1e38})['then'](({comments:_0x2d47a8})=>{_0x4b1a01['remove'](_0x51908b);for(const _0x23e1b4 of _0x2d47a8)this['_updateComment']({'channelId':_0x4d5059,'threadId':_0x2920a6,'commentId':_0x23e1b4['commentId'],'createdAt':_0x23e1b4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x570826=>{throw console['error'](_0x570826),new _0xd92937('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x20f529,target:_0x4f4f43}){const _0x1c8a57=this['getCommentThread'](_0x20f529);if(!_0x1c8a57)throw new _0xd92937('commentsrepository-attach-missing-comment-thread',this);const _0x11c3fe=this['context']['plugins']['get']('PendingActions'),_0x7bce6a=this['context']['plugins']['get'](O),_0x4a1598=this['_createCommentThreadView'](_0x1c8a57),_0x5de3ee=new vt(_0x1c8a57,_0x4a1598);let _0x3ad850=null;_0x4a1598['on']('change:isDirty',(_0x456fbf,_0x5e7ce6,_0x154dfe)=>{_0x154dfe?_0x3ad850=_0x11c3fe['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3ad850&&(_0x11c3fe['remove'](_0x3ad850),_0x3ad850=null);}),this['_threadToController']['set'](_0x1c8a57,_0x5de3ee),this['_viewToController']['set'](_0x4a1598,_0x5de3ee);const _0x2e0d9e=new S(this['context']['locale'],_0x4a1598);_0x2e0d9e['bind']('length')['to'](_0x4a1598),_0x2e0d9e['bind']('isDirty')['to'](_0x4a1598,'isDirty',_0x4a1598,'length',(_0x5c390a,_0x3ce6e3)=>_0x5c390a||!_0x3ce6e3),_0x2e0d9e['bind']('isActive')['to'](_0x4a1598),_0x2e0d9e['type']='comment';const _0x167fae=new d({'view':_0x2e0d9e,'target':_0x4f4f43,'type':'comment','isVisible':!_0x1c8a57['archivedAt']});return _0x4a1598['on']('escape',()=>{_0x167fae['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4a1598,_0x167fae),_0x7bce6a['add'](_0x167fae),_0x167fae;}['_bindAnnotationToEditors'](_0x3440b3,_0x160532){this['listenTo'](_0x3440b3,'editorReady',(_0x595b7b,_0x25ea22)=>{const _0x2d2508=_0x25ea22['ui']['view']['body']['bodyCollectionContainer'];_0x160532['focusableElements']['add'](_0x2d2508),this['context']instanceof _0x4358e8&&this['context']['ui']['focusTracker']['add'](_0x2d2508);},{'priority':'highest'}),this['listenTo'](_0x3440b3,'editorDestroyed',(_0x32c4c6,_0x3b27fd)=>{const _0x272d9c=_0x3b27fd['ui']['view']['body']['bodyCollectionContainer'];_0x160532['focusableElements']['has'](_0x272d9c)&&_0x160532['focusableElements']['remove'](_0x272d9c),this['context']instanceof _0x4358e8&&this['context']['ui']['focusTracker']['remove'](_0x272d9c);});}['_unbindEditors'](_0x2e3f34){this['stopListening'](_0x2e3f34,'editorReady'),this['stopListening'](_0x2e3f34,'editorDestroyed');}['_createCommentThreadView'](_0x563528){const _0x1fe756=this['context']['plugins']['get'](st),{config:_0x2dc043,locale:_0x23580f}=this['context'],_0x32cb80=pt(_0x2dc043['get']('locale'),_0x23580f);return new(0x0,(_0x2dc043['get']('comments'))['CommentThreadView'])(_0x23580f,_0x563528,_0x1fe756['me'],{'editorConfig':{..._0x2dc043['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2dc043['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2dc043['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2dc043['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2dc043['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x32cb80,'CommentView':_0x2dc043['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4b317c,channelId:_0x412ee6,resolvedAt:_0x7f283f,resolvedBy:_0x55a7a2,isFromAdapter:_0x4f96f8}){if(!this['hasCommentThread'](_0x4b317c))throw new _0xd92937('commentsrepository-missing-comment-thread',null,{'threadId':_0x4b317c});const _0x49d5b2=this['getCommentThread'](_0x4b317c);if(_0x49d5b2['isResolved'])throw new _0xd92937('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4b317c});const _0x1ded91=this['context']['plugins']['get'](st);if(_0x49d5b2['resolvedBy']=_0x1ded91['getUser'](_0x55a7a2),_0x49d5b2['resolvedAt']=_0x7f283f,_0x4f96f8||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x468c19=this['context']['plugins']['get']('PendingActions'),_0x551d29=_0x468c19['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x412ee6,'threadId':_0x4b317c})['then'](({resolvedAt:_0x1e194f,resolvedBy:_0x16bd90})=>{_0x468c19['remove'](_0x551d29),_0x49d5b2['resolvedBy']['id']!==_0x16bd90&&(_0x49d5b2['resolvedBy']=_0x1ded91['getUser'](_0x16bd90)),_0x49d5b2['resolvedAt']=_0x1e194f;})['catch'](_0x43838e=>{throw console['error'](_0x43838e),new _0xd92937('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4a1bae,channelId:_0x3bbe9e,isFromAdapter:_0x4279dc}){if(!this['hasCommentThread'](_0x4a1bae))throw new _0xd92937('commentsrepository-missing-comment-thread',null,{'threadId':_0x4a1bae});const _0xd5790=this['getCommentThread'](_0x4a1bae);if(!_0xd5790['isResolved'])throw new _0xd92937('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4a1bae});if(_0xd5790['resolvedBy']=null,_0xd5790['resolvedAt']=null,_0x4279dc||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1d83de=this['context']['plugins']['get']('PendingActions'),_0x69a8f8=_0x1d83de['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3bbe9e,'threadId':_0x4a1bae})['then'](()=>_0x1d83de['remove'](_0x69a8f8))['catch'](_0xc1d84c=>{throw console['error'](_0xc1d84c),new _0xd92937('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1597fb,isFromAdapter:_0x4c6cd3}){const _0xf1d26d=this['getCommentThread'](_0x1597fb);if(!_0xf1d26d)throw new _0xd92937('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1597fb),this['_threads']['delete'](_0x1597fb),!_0xf1d26d['isSubmitted']||_0x4c6cd3||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5de882=this['context']['plugins']['get']('PendingActions'),{channelId:_0x30bebb}=_0xf1d26d,_0xc7b75c=_0x5de882['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x30bebb,'threadId':_0x1597fb})['then'](()=>_0x5de882['remove'](_0xc7b75c))['catch'](_0x241b2a=>{throw console['error'](_0x241b2a),new _0xd92937('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0xfa9598,unlinkedAt:_0x1caff5,context:_0x26598c,attributes:_0xcc90b0,isFromAdapter:_0x5646c3}){if('string'!=typeof _0xfa9598)throw new _0xd92937('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xfa9598});if(!this['hasCommentThread'](_0xfa9598))throw new _0xd92937('commentsrepository-missing-comment-thread',null,{'threadId':_0xfa9598});const _0x5c0ab1=this['getCommentThread'](_0xfa9598);let _0x5d9c26=!0x1;if(void 0x0!==_0x26598c&&_0x5c0ab1['context']!==_0x26598c&&(_0x5c0ab1['context']=_0x26598c,_0x5d9c26=!0x0),void 0x0!==_0x1caff5&&_0x5c0ab1['unlinkedAt']!==_0x1caff5&&(_0x5c0ab1['unlinkedAt']=_0x1caff5,_0x5d9c26=!0x0),_0xcc90b0&&!At(_0xcc90b0,_0x5c0ab1['attributes'])&&(_0x5c0ab1['attributes']=_0xcc90b0,_0x5d9c26=!0x0),!_0x5d9c26)return Promise['resolve']();if(!_0x5c0ab1['isSubmitted']||_0x5646c3||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x470e9b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x355093}=_0x5c0ab1,_0x3b2ed1=_0x470e9b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x355093,'threadId':_0xfa9598,'context':_0x26598c,'unlinkedAt':_0x1caff5,'attributes':_0xcc90b0})['then'](()=>_0x470e9b['remove'](_0x3b2ed1))['catch'](_0x3b4433=>{throw console['error'](_0x3b4433),new _0xd92937('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x27b134){const _0x38daf2=this['context']['plugins']['get'](O),_0x157edb=this['getCommentThread'](_0x27b134);if(_0x157edb['_isAttached']=!0x1,this['_threadToController']['has'](_0x157edb)){const _0x297d69=this['_threadToController']['get'](_0x157edb),_0x58a1e8=_0x297d69['view'],_0x1db271=_0x38daf2['getByInnerView'](_0x58a1e8);this['_threadToController']['delete'](_0x157edb),this['_viewToController']['delete'](_0x58a1e8),_0x1db271&&_0x38daf2['remove'](_0x1db271),_0x297d69['destroy'](),_0x58a1e8['destroy']()['then'](()=>{this['_unbindEditors'](_0x58a1e8);});}}['_updateActiveAnnotation']({threadId:_0x187f2c,resolvedAt:_0x55abf0,unlinkedAt:_0x35bb08}){const _0x154469=!!_0x55abf0,_0xe5d893=this['context']['plugins']['get'](O),_0xb3c7d5=this['getCommentThread'](_0x187f2c);if(this['_threadToController']['has'](_0xb3c7d5)){const _0x547579=this['_threadToController']['get'](_0xb3c7d5)['view'],_0x1c52e8=_0xe5d893['getByInnerView'](_0x547579);_0x1c52e8&&(_0x154469&&_0xe5d893['_removeActiveAnnotation'](_0x1c52e8),_0x35bb08?_0x1c52e8['isVisible']=!0x1:_0x1c52e8['refreshVisibility']());}}['_getExternalAuthor'](_0x191ece){const _0x2801f0=this['context']['plugins']['get'](st),_0x36db59=It('external:'+_0x191ece),_0x26ee66=_0x2801f0['getUser'](_0x36db59);return _0x26ee66||_0x2801f0['addUser']({'id':_0x36db59,'name':_0x191ece});}['_createNewComment']({threadId:_0x44baac,commentId:_0x3f3977=_0x26f50a(),content:_0x25280f,authorId:_0x614ca9,createdAt:_0x16d863,attributes:_0x42f29d}){if('string'!=typeof _0x3f3977)throw new _0xd92937('commentsrepository-invalid-commentid');if('string'!=typeof _0x614ca9)throw new _0xd92937('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x25280f||!_0x25280f['trim']())throw new _0xd92937('commentsrepository-invalid-comment-content');const _0x461ad3=this['context']['plugins']['get'](st)['getUser'](_0x614ca9);if(!_0x461ad3)throw new _0xd92937('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x614ca9});let _0x350685=null,_0x344a72=_0x16d863;return _0x42f29d?.['@external']&&(_0x350685=this['_getExternalAuthor'](_0x42f29d['@external']['authorName']),_0x344a72=new Date(_0x42f29d['@external']['createdAt'])),new fi(this,{'threadId':_0x44baac,'id':_0x3f3977,'author':_0x350685||_0x461ad3,'creator':_0x461ad3,'content':_0x25280f,'createdAt':_0x16d863,'authoredAt':_0x344a72,'attributes':_0x42f29d});}['_addComment'](_0x58d581){let {threadId:_0x1b73b8,content:_0x472be7,attributes:_0x5e25ef,isFromAdapter:_0x40e0ad}=_0x58d581;const _0x504637=this['getCommentThread'](_0x58d581['threadId']);if(!_0x504637)throw new _0xd92937('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5c9558=this['_createNewComment'](_0x58d581),{id:_0x30f3ec}=_0x5c9558;if(_0x504637['_add'](_0x5c9558),_0x40e0ad||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x504637['isSubmitted'])return Promise['resolve']();const _0x51ac0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x381d41}=_0x504637,_0x1a2ff6=_0x51ac0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5e25ef||(_0x5e25ef={}),this['adapter']['addComment']({'channelId':_0x381d41,'threadId':_0x1b73b8,'commentId':_0x30f3ec,'content':_0x472be7,'attributes':_0x5e25ef})['then'](_0x3da5e1=>{_0x51ac0['remove'](_0x1a2ff6),_0x3da5e1&&this['_updateComment']({'channelId':_0x381d41,'threadId':_0x1b73b8,'commentId':_0x30f3ec,'createdAt':_0x3da5e1['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2c9c0c=>{throw console['error'](_0x2c9c0c),new _0xd92937('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5b7c22,commentId:_0x383d9a,content:_0x2607a7,createdAt:_0x25ab55,attributes:_0x13c353,isFromAdapter:_0x22e025}){if(void 0x0!==_0x2607a7&&('string'!=typeof _0x2607a7||!_0x2607a7['trim']()['length']))throw new _0xd92937('commentsrepository-update-comment-invalid-content');const _0x54de8f=this['getCommentThread'](_0x5b7c22),_0x2a8019=_0x54de8f['getComment'](_0x383d9a);if(!_0x2a8019)throw new _0xd92937('commentsrepository-update-missing-comment',this);let _0x36d3cb=!0x1;if(_0x2607a7&&_0x2607a7!==_0x2a8019['content']&&(_0x2a8019['isEditable']||_0x22e025)&&(_0x2a8019['content']=_0x2607a7,_0x36d3cb=!0x0),_0x25ab55&&_0x25ab55!==_0x2a8019['createdAt']&&(_0x2a8019['createdAt']=_0x25ab55,_0x2a8019['attributes']&&_0x2a8019['attributes']['@external']||(_0x2a8019['authoredAt']=_0x25ab55),_0x36d3cb=!0x0),_0x13c353&&!At(_0x13c353,_0x2a8019['attributes'])&&(_0x2a8019['attributes']=_0x13c353,_0x36d3cb=!0x0),!_0x36d3cb)return Promise['resolve']();if(_0x54de8f['fire']('commentUpdated'),_0x22e025||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4305f8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16354b}=this['getCommentThread'](_0x2a8019['threadId']),_0x25851c=_0x4305f8['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x16354b,'threadId':_0x5b7c22,'commentId':_0x383d9a,'content':_0x2607a7,'attributes':_0x13c353})['then'](()=>_0x4305f8['remove'](_0x25851c))['catch'](_0x8177e0=>{throw console['error'](_0x8177e0),new _0xd92937('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x491c0f,commentId:_0x1156a7,isFromAdapter:_0x5cd61c}){const _0x571444=this['getCommentThread'](_0x491c0f),_0x448389=_0x571444['getComment'](_0x1156a7);if(!_0x448389)throw new _0xd92937('commentsrepository-remove-missing-comment',this);if(_0x571444['_remove'](_0x448389),_0x5cd61c||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x255ec9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4acb9d}=_0x571444,_0xd7f023=_0x255ec9['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4acb9d,'threadId':_0x491c0f,'commentId':_0x1156a7})['then'](()=>_0x255ec9['remove'](_0xd7f023))['catch'](_0x7ed8fc=>{throw console['error'](_0x7ed8fc),new _0xd92937('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1ca8f3(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1a76f0,_0x25e957){super();const _0x5e6215=_0x25e957['isResolvable'];this['channelId']=_0x25e957['channelId'],this['id']=_0x25e957['id'],this['comments']=new _0x27e15c(),this['_repository']=_0x1a76f0,this['_isAttached']=!0x1,this['_isSubmitted']=_0x25e957['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1a76f0,'_permissions',_0x1a76f0,'_readOnlyChannels',()=>_0x1a76f0['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1a76f0,'_permissions',()=>_0x1a76f0['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1a76f0,'_permissions',()=>{const _0xc8f1fc=_0x1a76f0['getPermissions'](this['channelId']);return _0xc8f1fc['write']||_0xc8f1fc['admin'];}),this['bind']('isResolvable')['to'](_0x1a76f0,'_permissions',()=>_0x5e6215&&_0x1a76f0['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x25e957['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x133135,_0x7de802)=>_0x133135?_0x7de802?_0x133135<_0x7de802?_0x133135:_0x7de802:_0x133135:_0x7de802),this['set']('unlinkedAt',_0x25e957['unlinkedAt']||null),this['set']('resolvedAt',_0x25e957['resolvedAt']||null),this['set']('resolvedBy',_0x25e957['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x41e916=>!!_0x41e916),this['set']('attributes',_0x25e957['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x5e9d89,_0x40255d)=>_0x5e9d89+_0x40255d['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xa56dc4,id:_0x538ac5}=this;this['_repository']['fire'](Nt('submitCommentThread',_0xa56dc4),{'channelId':_0xa56dc4,'threadId':_0x538ac5});}['setUnlinkedAt'](_0x1d6587){this['_update']({'unlinkedAt':_0x1d6587});}['resolve']({resolvedAt:_0x3f3b70=new Date(),resolvedBy:_0x5efb5c=null,isFromAdapter:_0x53a98c=!0x1}={}){const _0x16cbaf=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x3ac769,id:_0x5c5fa7}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x3ac769),{'channelId':_0x3ac769,'threadId':_0x5c5fa7,'resolvedAt':_0x3f3b70,'resolvedBy':_0x5efb5c||_0x16cbaf['id'],'isFromAdapter':_0x53a98c});}['reopen']({isFromAdapter:_0x2ae31f=!0x1}={}){const {channelId:_0x41c8f4,id:_0x381c78}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x41c8f4),{'channelId':_0x41c8f4,'threadId':_0x381c78,'isFromAdapter':_0x2ae31f});}['setContext'](_0x259521){this['context']||this['_update']({'context':_0x259521});}['setAttribute'](_0x2823b8,_0x3dfef8){const _0x471a44=wt(this['attributes']);yt(_0x471a44,_0x2823b8,_0x3dfef8),this['_update']({'attributes':_0x471a44});}['removeAttribute'](_0x306139){const _0xdb6872=wt(this['attributes']);Ct(_0xdb6872,_0x306139),this['_update']({'attributes':_0xdb6872});}['remove']({isFromAdapter:_0x1aa03b=!0x1}={}){const {channelId:_0x2609cd,id:_0x5ac56f}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x2609cd),{'channelId':_0x2609cd,'threadId':_0x5ac56f,'isFromAdapter':_0x1aa03b});}['attachTo'](_0x47fe25){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x47fe25});}['addComment'](_0x32c242){const {channelId:_0x2fd010,id:_0x3ebf5d}=this;this['_repository']['fire'](Nt('addComment',_0x2fd010,_0x3ebf5d),Object['assign']({'channelId':_0x2fd010,'threadId':_0x3ebf5d},_0x32c242));}['getComment'](_0x34aab5){if('string'!=typeof _0x34aab5)throw new _0xd92937('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x34aab5});return this['comments']['get'](_0x34aab5);}['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'](_0x5ce2a0=>_0x5ce2a0['toJSON']()),'attributes':this['attributes']};}['_add'](_0x589b72){return this['listenTo'](_0x589b72,'change:authoredAt',()=>{const _0xc335f0=this['_findOptimalIndex'](_0x589b72),_0x893c8d=this['comments'];_0xc335f0-0x1!=_0x893c8d['getIndex'](_0x589b72)&&_0xc335f0+0x1!=_0x893c8d['getIndex'](_0x589b72)&&(this['_remove'](_0x589b72),this['_add'](_0x589b72));}),this['comments']['add'](_0x589b72,this['_findOptimalIndex'](_0x589b72));}['_update'](_0x5da02a){const {channelId:_0x209450,id:_0x415759}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x209450),{..._0x5da02a,'channelId':_0x209450,'threadId':_0x415759});}['_remove'](_0x2fb4a2){return this['stopListening'](_0x2fb4a2),_0x2fb4a2['destroy'](),this['comments']['remove'](_0x2fb4a2);}['_findOptimalIndex'](_0x2f0708){const _0x2ad03b=this['comments']['find'](_0x190385=>new Date(_0x190385['authoredAt'])['getTime']()>new Date(_0x2f0708['authoredAt'])['getTime']());return _0x2ad03b?this['comments']['getIndex'](_0x2ad03b):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1ca8f3(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x673527,_0x3e3d4f){super();const _0x328873=_0x673527['context']['plugins']['get'](st)['me'],_0x23f652=_0x673527['getCommentThread'](_0x3e3d4f['threadId']),_0x5317ea=0x0===_0x23f652['comments']['length'],_0x97afd3=_0x328873===_0x3e3d4f['author'];this['id']=_0x3e3d4f['id'],this['threadId']=_0x3e3d4f['threadId'],this['author']=_0x3e3d4f['author'],this['creator']=_0x3e3d4f['creator'],this['isExternal']=Boolean(_0x3e3d4f['attributes']&&_0x3e3d4f['attributes']['@external']),this['set']('content',_0x3e3d4f['content']),this['createdAt']=_0x3e3d4f['createdAt']||new Date(),this['set']('authoredAt',_0x3e3d4f['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x23f652,'resolvedAt'),this['set']('attributes',_0x3e3d4f['attributes']||{}),this['bind']('isEditable')['to'](_0x673527,'_permissions',()=>{const _0x4f422d=_0x673527['getPermissions'](_0x23f652['channelId'])['write'],_0x18b9a4=_0x673527['getPermissions'](_0x23f652['channelId'])['modifyAll'];return _0x97afd3&&_0x4f422d||!_0x97afd3&&_0x18b9a4;}),this['bind']('isRemovable')['to'](_0x23f652,'isRemovable',_0x673527,'_permissions',_0x33b9e6=>{const _0x50a5eb=_0x673527['getPermissions'](_0x23f652['channelId'])['write'],_0x45eef4=_0x673527['getPermissions'](_0x23f652['channelId'])['modifyAll'];return _0x97afd3&&_0x50a5eb||_0x33b9e6&&_0x5317ea||!_0x97afd3&&_0x45eef4&&!_0x5317ea;}),this['bind']('isReadOnly')['to'](_0x23f652,'isReadOnly'),this['_repository']=_0x673527;}get['weight'](){return Math['max'](function(_0x1c3154){const _0x139e7f=document['createElement']('div');return _0x139e7f['innerHTML']=_0x1c3154,_0x139e7f['textContent']['length'];}(this['content']),0xc8);}['update'](_0x48b6a4){const {threadId:_0x3e42dd,id:_0x2b03f9}=this;if(!this['_repository']['hasCommentThread'](_0x3e42dd))throw new _0xd92937('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4280d8}=this['_repository']['getCommentThread'](_0x3e42dd);this['_repository']['fire'](Nt('updateComment',_0x4280d8,_0x3e42dd),{'channelId':_0x4280d8,'threadId':_0x3e42dd,'commentId':_0x2b03f9,..._0x48b6a4});}['setAttribute'](_0x20dea5,_0x55d129){const _0x3f4402=wt(this['attributes']);yt(_0x3f4402,_0x20dea5,_0x55d129),this['update']({'attributes':_0x3f4402});}['removeAttribute'](_0x93300d){const _0x479e58=wt(this['attributes']);Ct(_0x479e58,_0x93300d),this['update']({'attributes':_0x479e58});}['remove'](_0x14085e={}){if(!_0x14085e['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x212b47,id:_0x493b0f}=this;if(!this['_repository']['hasCommentThread'](_0x212b47))throw new _0xd92937('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3b1f81}=this['_repository']['getCommentThread'](_0x212b47);this['_repository']['fire'](Nt('removeComment',_0x3b1f81,_0x212b47),{'channelId':_0x3b1f81,'threadId':_0x212b47,'commentId':_0x493b0f,..._0x14085e});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x44a5d3,..._0x50e49f){for(const _0x15abd1 of _0x50e49f)void 0x0!==_0x15abd1&&(_0x44a5d3+=':'+String(_0x15abd1));return _0x44a5d3;}class K extends _0x1d4e46{['refresh'](){const _0x188e18=this['editor']['model']['document']['selection'];for(const _0x2cbf60 of _0x188e18['getRanges']())if(this['_hasContent'](_0x2cbf60))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x1cdfad=_0x26f50a()}={}){const _0x48c43e=this['editor']['model'],_0x364ec1=[];for(const _0x37b2b4 of _0x48c43e['document']['selection']['getRanges']())this['_hasContent'](_0x37b2b4)&&_0x364ec1['push'](this['_trimToContent'](_0x37b2b4));_0x48c43e['change'](_0x218af6=>{for(const _0x26e6e6 of _0x364ec1){const _0x3c7ddc=_0x26f50a()['substr'](0x1,0x5),_0x231c43='comment:'+_0x1cdfad+':'+_0x3c7ddc;_0x218af6['addMarker'](_0x231c43,{'range':_0x26e6e6,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x35a2e9){for(const _0x30fd48 of _0x35a2e9['getItems']())if(this['_itemIsContent'](_0x30fd48))return!0x0;return!0x1;}['_itemIsContent'](_0x6aa316){return _0x6aa316['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x6aa316)&&!_0x6aa316['is']('element','tableCell');}['_trimToContent'](_0x292c32){const _0x10baf4=_0x4bd8ac=>!this['_itemIsContent'](_0x4bd8ac['item']),_0x470c45=_0x292c32['start']['getLastMatchingPosition'](_0x10baf4),_0x3dc11a=_0x292c32['end']['getLastMatchingPosition'](_0x10baf4,{'direction':'backward'});return this['editor']['model']['createRange'](_0x470c45,_0x3dc11a);}}class P extends _0x46aee5{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x175c47){super(_0x175c47),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x534374=this['editor'],_0x3870f1=_0x534374['model']['document']['selection'],_0x46d896=_0x4daac0(()=>this['refreshSelectedViews'](),0xa);_0x3870f1['on']('change:range',(_0x402a6c,_0x32848b)=>{_0x32848b['directChange']&&(_0x46d896['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x534374['editing']['view']['document'],'change:isFocused',(_0x33206d,_0x715d87,_0x369fa8)=>{_0x369fa8&&_0x46d896();}),this['listenTo'](_0x534374['ui']['focusTracker'],'change:isFocused',(_0x2d70dd,_0x18657c,_0xc6d6c4)=>{_0xc6d6c4||_0x534374['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x1809f4=>this['_editorAnnotationsData']['has'](_0x1809f4['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2b11d6){if(this['_editorAnnotations']['has'](_0x2b11d6['view']))return;this['_editorAnnotations']['add'](_0x2b11d6['view']),this['editor']['ui']['focusTracker']['add'](_0x2b11d6['view']['element']);const _0x46e635=this['editor']['plugins']['get'](O);this['listenTo'](_0x46e635['collection'],'remove',(_0x1c34bc,_0x4b67dd)=>{this['editor']['ui']['focusTracker']['remove'](_0x4b67dd['view']['element']),this['_editorAnnotations']['delete'](_0x4b67dd['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x34ee7e){if('function'!=typeof _0x34ee7e)throw new _0xd92937('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x34ee7e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2f4d92,annotations:_0x3e4bd2}){const _0x226b97=[],_0x4759cb=this['editor']['model']['document']['selection'],_0x359afd=Array['from'](_0x4759cb['getRanges']());for(const [_0xfbd31,_0x5dc2eb]of this['_editorAnnotationsData']){const _0x23939b=_0x1f0bab(_0x5dc2eb),_0x2cb1c1=_0x3e4bd2['getByInnerView'](_0xfbd31);_0x23939b&&_0x2cb1c1&&_0x226b97['push']({'annotation':_0x2cb1c1,'range':_0x23939b});}function _0x1f0bab(_0x54c53d){for(const _0x452e1e of _0x54c53d)for(const _0x3b1ab5 of _0x359afd)if(_0x452e1e['containsRange'](_0x3b1ab5,!_0x4759cb['isCollapsed']))return _0x452e1e;return null;}return _0x226b97['sort']((_0x22957f,_0x16c4b7)=>{const _0x39dce8=_0x22957f['range'],_0x5b008d=_0x16c4b7['range'];if(!_0x39dce8['isEqual'](_0x5b008d)){if(_0x39dce8['containsRange'](_0x5b008d,!0x0))return 0x1;if(_0x5b008d['containsRange'](_0x39dce8,!0x0))return-0x1;}return _0x22957f['annotation']==_0x2f4d92?-0x1:_0x16c4b7['annotation']==_0x2f4d92?0x1:0x0;})['map'](_0x438ad8=>_0x438ad8['annotation']);}get['_editorAnnotationsData'](){const _0x57ed37=new Map();for(const _0x24ec8c of Array['from'](this['_dataCollectors']))for(const [_0x357c6d,_0xd82e88]of _0x24ec8c())_0x57ed37['set'](_0x357c6d,_0xd82e88);return _0x57ed37;}}class ct extends _0x46aee5{['afterInit'](){const _0x2f57e5=this['editor'];if(!_0x2f57e5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2f57e5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x46aee5{constructor(_0x59a2be){super(_0x59a2be),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x5a0252=this['editor'],_0x49bb34=_0x5a0252['commands']['get']('importWord'),_0x2f5aca=_0x5a0252['plugins']['get'](st);_0x49bb34&&(_0x49bb34['on']('execute',(_0x5c5d66,[,_0x5ec12b])=>{_0x5ec12b['collaboration_features']={'comments':!0x0,'user_id':_0x2f5aca['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x49bb34,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x573907,_0x2e8b2d){const {comment_threads:_0x3ff331}=_0x2e8b2d;_0x3ff331&&_0x3ff331['forEach'](({thread_id:_0x4f510a,comments:_0x2a38e2,is_resolved:_0x236c3c})=>{const _0x22bccb=new Date(),_0x3ed2c1=_0x2a38e2['map'](({author:_0x40e0ec,content:_0x480011,created_at:_0x2294b1})=>({'content':_0x480011,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x22bccb,'attributes':{'@external':{'authorName':_0x40e0ec,'createdAt':_0x2294b1?new Date(_0x2294b1):new Date(),'source':'importWord'}}})),_0x463920=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x463920,'threadId':_0x4f510a,'comments':_0x3ed2c1,'resolvedAt':_0x236c3c?_0x22bccb:null});});}}class ut extends _0x46aee5{constructor(_0x203b0c){super(_0x203b0c),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x11fd85=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x11fd85,'contentInsertion',(_0xebb91c,_0x3132cd)=>this['_removeMarkersWithoutThreads'](_0x3132cd['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x39a242){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x39a242;const _0x3d0565=this['editor']['plugins']['get']('CommentsRepository');for(const _0x18bf2f of _0x39a242['keys']()){const [_0x5a89fb,_0x136fc7]=_0x18bf2f['split'](':');'comment'!=_0x5a89fb||_0x3d0565['hasCommentThread'](_0x136fc7)||_0x39a242['delete'](_0x18bf2f);}return _0x39a242;}['_registerMarkerInClipboardPipeline'](){const _0x271e4e=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x46527a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x46527a&&_0x271e4e['_registerMarkerToCopy']('comment',_0x46527a);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1e2eda){switch(_0x1e2eda){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ft extends _0x46aee5{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x178f83,_0x956ec1)=>{if(!_0x956ec1['options']['showCommentHighlights'])return null;if(_0x956ec1['options']['ignoreResolvedComments']){const {id:_0x49da32}=er(_0x178f83['markerName']),_0x375455=this['editor']['plugins']['get'](o);if(_0x375455['getCommentThread'](_0x49da32)?.['isResolved']&&_0x178f83['item'])return _0x956ec1['consumable']['consume'](_0x178f83['item'],'addMarker:'+_0x178f83['markerName']),_0x956ec1['consumable']['consume'](_0x178f83['item'],'removeMarker:'+_0x178f83['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2b8994=>{_0x2b8994['on']('addMarker:comment',(_0x5bc655,_0x5707fb,_0x575d8b)=>{if(!_0x575d8b['options']['showCommentHighlights'])return;const _0x9962e8=_0x5707fb['item'];if(!_0x9962e8)return;const _0x41d5d9=_0x575d8b['mapper']['toViewElement'](_0x9962e8);this['editor']['model']['schema']['isObject'](_0x9962e8)&&_0x41d5d9&&!_0x41d5d9['getCustomProperty']('widget')&&_0x41d5d9['is']('containerElement')&&_0x5cf785(_0x41d5d9,_0x575d8b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xd1084a,{writer:_0xb7739c,options:_0x16736a})=>{if(!_0x16736a['showCommentHighlights'])return null;const _0x172301=_0xb7739c['createContainerElement']('div'),_0x3b095b=_0xb7739c['createEmptyElement']('hr');return _0xb7739c['addClass']('ck-horizontal-line',_0x172301),_0xb7739c['insert'](_0xb7739c['createPositionAt'](_0x172301,0x0),_0x3b095b),_0x172301;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x14e155,{writer:_0x2891a7,options:_0x4aeb15})=>{if(!_0x4aeb15['showCommentHighlights'])return null;const _0x330a73=_0x2891a7['createContainerElement']('span'),_0x21e317=_0x2891a7['createEmptyElement']('img');return _0x2891a7['addClass']('image-inline',_0x330a73),_0x2891a7['insert'](_0x2891a7['createPositionAt'](_0x330a73,0x0),_0x21e317),_0x330a73;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x928dc1,{writer:_0x3695b8,options:_0x5efd97})=>{if(_0x5efd97['showCommentHighlights'])return _0x3695b8['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x17fdb5,_0xb87273,_0xf92d3e)=>{_0xf92d3e['options']['showCommentHighlights']&&_0x17fdb5['stop']();},{'priority':'high'});}}class r extends _0x46aee5{static get['requires'](){return[o,P,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e83ef){super(_0x1e83ef),this['set']('isThreadsLoadingPaused',!0x0),_0x1e83ef['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x366152,_0x28ad64,_0x16d703,_0x1b3300)=>{const _0x531e6b=_0x1e83ef['plugins']['get'](o),_0x5505e9=_0x16d703?er(_0x16d703)['id']:null;_0x1e83ef['model']['change'](()=>{if(_0x5505e9){const _0x224392=this['getAllMarkersForId'](_0x5505e9);for(const _0x58221a of _0x224392)_0x1e83ef['editing']['reconvertMarker'](_0x58221a);}if(_0x1b3300){const {id:_0x207a15}=er(_0x1b3300),_0x5dc0ee=_0x531e6b['getCommentThread'](_0x207a15);if(_0x5dc0ee&&_0x5dc0ee['unlinkedAt'])return;if(_0x5dc0ee&&!_0x5dc0ee['isAttached'])return;const _0x53b83e=this['getAllMarkersForId'](_0x207a15);for(const _0x5566f6 of _0x53b83e)_0x1e83ef['editing']['reconvertMarker'](_0x5566f6);}}),_0x5505e9&&this['scrollToThreadMarker'](_0x5505e9);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xeb08b1=this['editor'],_0x4773ed=_0xeb08b1['plugins']['get'](o),_0x5a33e5=_0xeb08b1['config']['get']('collaboration.channelId'),_0x284c02=_0x4773ed['getCommentThreads']()['filter'](_0x1ef912=>_0x1ef912['channelId']!==_0x5a33e5);_0xeb08b1['commands']['add']('addCommentThread',new K(_0xeb08b1)),this['listenTo'](_0xeb08b1,'change:isReadOnly',(_0x128692,_0x4e50d4,_0x38104f)=>{_0x4773ed['switchReadOnly'](_0x38104f,_0xeb08b1['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4773ed,dt('addCommentThread',_0x5a33e5),(_0x139f20,{threadId:_0x2174bf})=>{const _0x1035f2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2174bf);_0x1035f2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2174bf);}),this['listenTo'](_0x4773ed,dt('removeCommentThread',_0x5a33e5),(_0x2f351e,{threadId:_0x5a559e})=>{_0xeb08b1['model']['enqueueChange']({'isUndoable':!0x1},_0x64ec6e=>{const _0x1e9768=this['getAllMarkersForId'](_0x5a559e);for(const _0x51e0c4 of _0x1e9768)_0x64ec6e['removeMarker'](_0x51e0c4);});}),this['listenTo'](_0x4773ed,dt('resolveCommentThread',_0x5a33e5),(_0xf252a2,{threadId:_0x15aa68})=>{(this['_reconvertMarkers'](_0x15aa68),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x15aa68)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4773ed,dt('reopenCommentThread',_0x5a33e5),(_0xf8ecec,{threadId:_0x1346b2})=>{this['_reconvertMarkers'](_0x1346b2);},{'priority':'low'}),this['listenTo'](_0x4773ed,dt('addComment',_0x5a33e5),(_0x489f2e,{threadId:_0x2e9233,isFromAdapter:_0xa1850d})=>{const _0x2d381f=this['getAllMarkersForId'](_0x2e9233);if(_0xa1850d||0x0==_0x2d381f['length']||!_0x4773ed['hasCommentThread'](_0x2e9233))return;0x1===_0x4773ed['getCommentThread'](_0x2e9233)['length']&&_0xeb08b1['model']['enqueueChange']({'isUndoable':!0x1},_0x33246b=>{for(const _0x40d0eb of _0x2d381f)_0x33246b['updateMarker'](_0x40d0eb,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x284c02);}['afterInit'](){!async function(_0x4eeeeb){const _0x34962a=_0x463397([0x66,0x31,0x32,0x55,0x75,0x5a,0x6f,0x59,0x71,0x56,0x4c,0x62,0x74,0x69,0x67,0x51,0x4a,0x53,0x45,0x48,0x37,0x30,0x79,0x4b,0x7a,0x77,0x35,0x34,0x50,0x46,0x78,0x52,0x49,0x76,0x6e,0x4e,0x64,0x42,0x57,0x6a,0x73,0x41,0x4d,0x4f,0x68,0x36,0x6b,0x38,0x72,0x43,0x44,0x65,0x33,0x6d,0x70,0x61,0x54,0x47,0x58,0x6c,0x63,0x39]),_0x3bdf90=0x5bb9355e,_0x53dffb=0x5bbe5e26^_0x3bdf90,_0x209af5=window[_0x463397([0x44,0x61,0x74,0x65])][_0x463397([0x6e,0x6f,0x77])](),_0x45f7c3=_0x4eeeeb[_0x463397([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3b7174=new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e0800=>{_0x45f7c3[_0x463397([0x6f,0x6e,0x63,0x65])](_0x463397([0x72,0x65,0x61,0x64,0x79]),_0x4e0800);}),_0x14335b={[_0x463397([0x6b,0x74,0x79])]:_0x463397([0x45,0x43]),[_0x463397([0x75,0x73,0x65])]:_0x463397([0x73,0x69,0x67]),[_0x463397([0x63,0x72,0x76])]:_0x463397([0x50,0x2d,0x32,0x35,0x36]),[_0x463397([0x78])]:_0x463397([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]),[_0x463397([0x79])]:_0x463397([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]),[_0x463397([0x61,0x6c,0x67])]:_0x463397([0x45,0x53,0x32,0x35,0x36])},_0x8c0f2a=_0x45f7c3[_0x463397([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x463397([0x67,0x65,0x74])](_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x182139(){let _0xcd15ef,_0xfa23a0=null,_0x474e67=null;try{if(_0x8c0f2a==_0x463397([0x47,0x50,0x4c]))return _0x463397([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xcd15ef=_0x1ea22a(),!_0xcd15ef)return _0x463397([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xcd15ef[_0x463397([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x474e67=_0x1d4911(_0xcd15ef[_0x463397([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xcd15ef[_0x463397([0x6a,0x74,0x69])])),await _0xd03e80()?_0x2a56c1()?_0x8af284()?_0x463397([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1c8cb9()?(_0xcd15ef[_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x463397([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xfa23a0=_0x469b34(_0x463397([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xcd15ef[_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x463397([0x74,0x72,0x69,0x61,0x6c])&&(_0xfa23a0=_0x469b34(_0x463397([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2f4ac6()):_0x463397([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x463397([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x463397([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x463397([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x8af284(){const _0x3ddda7=[_0x463397([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x463397([0x74,0x72,0x69,0x61,0x6c])][_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xcd15ef[_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x209af5/0x3e8:0xe10*_0x53dffb;return _0xcd15ef[_0x463397([0x65,0x78,0x70])]<_0x3ddda7;}function _0x2a56c1(){const _0x4d6780=_0xcd15ef[_0x463397([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4d6780)return!0x1;if(_0x4d6780[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x463397([0x2a])))return!0x0;if(_0x4d6780[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x463397([0x43,0x4d,0x54])))return!0x0;if(_0x4d6780[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x463397([0x52,0x43,0x4d,0x54]))){if(_0x2eaa76())return!0x0;if(_0x511eec()||_0x2abb6a())return!0x0;}return!0x1;}function _0x1c8cb9(){const _0xff7590=_0xcd15ef[_0x463397([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xff7590||0x0==_0xff7590[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3be4c4}=new URL(window[_0x463397([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xff7590[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3be4c4))return!0x0;const _0x5f3a25=_0x3be4c4[_0x463397([0x73,0x70,0x6c,0x69,0x74])](_0x463397([0x2e]));return _0xff7590[_0x463397([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fc994=>_0x1fc994[_0x463397([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x463397([0x2a])))[_0x463397([0x6d,0x61,0x70])](_0x1fc380=>_0x1fc380[_0x463397([0x73,0x70,0x6c,0x69,0x74])](_0x463397([0x2e])))[_0x463397([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x406d23=>_0x406d23[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5f3a25[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x463397([0x6d,0x61,0x70])](_0x1f5c03=>Array(_0x5f3a25[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1f5c03[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x463397([0x66,0x69,0x6c,0x6c])](_0x1f5c03[0x0]===_0x463397([0x2a])?_0x463397([0x2a]):'')[_0x463397([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1f5c03))[_0x463397([0x73,0x6f,0x6d,0x65])](_0x416d09=>_0x5f3a25[_0x463397([0x65,0x76,0x65,0x72,0x79])]((_0xcbf8c4,_0x5381f1)=>_0x416d09[_0x5381f1]===_0xcbf8c4||_0x416d09[_0x5381f1]===_0x463397([0x2a])));}function _0x2f4ac6(){return _0xfa23a0&&_0x474e67?new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x15a592,_0x114d40)=>{_0xfa23a0[_0x463397([0x74,0x68,0x65,0x6e])](_0x15a592,_0x114d40),_0x474e67[_0x463397([0x74,0x68,0x65,0x6e])](_0x10357f=>{_0x10357f!=_0x463397([0x56,0x61,0x6c,0x69,0x64])&&_0x15a592(_0x10357f);},_0x114d40);}):_0xfa23a0||_0x474e67||_0x463397([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1d4911(_0x1f6d27,_0xbf93e){return new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1ec3a0=>{if(_0x2a0d0d())return _0x1ec3a0(_0x463397([0x56,0x61,0x6c,0x69,0x64]));_0x208330(),_0x45f7c3[_0x463397([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x463397([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4a5a1f=!0x1;const _0x51bf73=_0x26f50a();function _0x1eb42e(_0x179f71){return!!_0x179f71&&(typeof _0x179f71===_0x463397([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x179f71===_0x463397([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x179f71[_0x463397([0x74,0x68,0x65,0x6e])]===_0x463397([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x179f71[_0x463397([0x63,0x61,0x74,0x63,0x68])]===_0x463397([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4d361a(_0x1f3dbb){_0x6fb7d7(_0x1f3dbb)[_0x463397([0x74,0x68,0x65,0x6e])](_0x1781c5=>{if(!_0x1781c5||_0x1781c5[_0x463397([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x463397([0x6f,0x6b]))return _0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5c1e01(_0x2feb1d(_0x51bf73+_0xbf93e))!=_0x1781c5[_0x463397([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x463397([0x56,0x61,0x6c,0x69,0x64]);})[_0x463397([0x74,0x68,0x65,0x6e])](_0x199309=>(_0x5cabb9(),_0x199309),()=>{const _0x3b6fc3=_0x22702d();return null==_0x3b6fc3?(_0x5cabb9(),_0x463397([0x56,0x61,0x6c,0x69,0x64])):_0x463397(_0x209af5-_0x3b6fc3>(0x7fb5b15e^_0x3bdf90)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x463397([0x74,0x68,0x65,0x6e])](_0x1ec3a0)[_0x463397([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1ec3a0(_0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xd679ce=0x5b8fdbde^_0x3bdf90;function _0x5cabb9(){const _0x3b0fe4=_0x463397([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c1e01(_0x2feb1d(_0x1f6d27)),_0x1b417a=_0xea58a3(_0x5c1e01(window[_0x463397([0x4d,0x61,0x74,0x68])][_0x463397([0x63,0x65,0x69,0x6c])](_0x209af5/_0xd679ce)));window[_0x463397([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x463397([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b0fe4,_0x1b417a);}function _0x22702d(){const _0x10555a=_0x463397([0x6c,0x6c,0x63,0x74,0x2d])+_0x5c1e01(_0x2feb1d(_0x1f6d27)),_0x6b66e0=window[_0x463397([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x463397([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10555a);return _0x6b66e0?window[_0x463397([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xea58a3(_0x6b66e0),0x10)*_0xd679ce:null;}function _0x6fb7d7(_0x1da31d){return new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5e539f,_0x384a50)=>{_0x1da31d[_0x463397([0x74,0x68,0x65,0x6e])](_0x5e539f,_0x384a50),window[_0x463397([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x384a50,0x5bb8e19e^_0x3bdf90);});}}_0x45f7c3[_0x463397([0x6f,0x6e])](_0x463397([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x391b05,_0x4cfbf8)=>{if(_0x4cfbf8[0x0]!=_0x1f6d27)return _0x1ec3a0(_0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4cfbf8[0x1]={..._0x4cfbf8[0x1],[_0x463397([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x51bf73};},{[_0x463397([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x463397([0x68,0x69,0x67,0x68])}),_0x45f7c3[_0x463397([0x6f,0x6e])](_0x463397([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58a4bd=>{_0x1eb42e(_0x58a4bd[_0x463397([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4a5a1f=!0x0,_0x4d361a(_0x58a4bd[_0x463397([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x463397([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x463397([0x6c,0x6f,0x77])}),_0x3b7174[_0x463397([0x74,0x68,0x65,0x6e])](()=>{_0x4a5a1f||_0x1ec3a0(_0x463397([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2a0d0d(){return _0x45f7c3[_0x463397([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x463397([0x76,0x69,0x65,0x77])][_0x463397([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x463397([0x61,0x75,0x74,0x6f]);}function _0x208330(){_0x45f7c3[_0x463397([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x463397([0x76,0x69,0x65,0x77])][_0x463397([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x463397([0x61,0x75,0x74,0x6f]);}}function _0x469b34(_0x1bc496){const _0x484aed=[new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3f2147=>setTimeout(_0x3f2147,0x5bb00b92^_0x3bdf90)),_0x3b7174[_0x463397([0x74,0x68,0x65,0x6e])](()=>new window[(_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x40e177=>{let _0x582327=0x0;_0x45f7c3[_0x463397([0x6d,0x6f,0x64,0x65,0x6c])][_0x463397([0x6f,0x6e])](_0x463397([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xf63f78,_0x30b270)=>{_0x30b270[0x0][_0x463397([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x582327++,_0x582327==(0x5bb934a6^_0x3bdf90)&&(_0x40e177(),_0xf63f78[_0x463397([0x6f,0x66,0x66])]());});}))];return window[_0x463397([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x463397([0x72,0x61,0x63,0x65])](_0x484aed)[_0x463397([0x74,0x68,0x65,0x6e])](()=>_0x1bc496);}async function _0x47c88a(){await _0x3b7174,_0x45f7c3[_0x463397([0x6d,0x6f,0x64,0x65,0x6c])][_0x463397([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4fea78,_0x45f7c3[_0x463397([0x6d,0x6f,0x64,0x65,0x6c])][_0x463397([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4fea78,_0x45f7c3[_0x463397([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x463397([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2eaa76(){return _0xcbbed9(_0x463397([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x329aaf(_0x463397([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x463397([0x73,0x74,0x61,0x74,0x65])]==_0x463397([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x511eec(){return _0xcbbed9(_0x463397([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 _0x2abb6a(){return _0xcbbed9(_0x463397([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x507530(_0x54c42d){const _0x3bc4e9=_0x419893();_0x45f7c3[_0x3bc4e9]=_0x463397([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x54c42d,_0x54c42d!=_0x463397([0x56,0x61,0x6c,0x69,0x64])&&_0x47c88a();}function _0x419893(){const _0x5546d1=window[_0x463397([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x463397([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x463397([0x6e,0x6f,0x77])]())[_0x463397([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x463397([0x2e]),'');let _0x48d149=_0x463397([0x66]);for(let _0xe01f2d=0x0;_0xe01f2d<_0x5546d1[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xe01f2d+=0x2){let _0x186827=window[_0x463397([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5546d1[_0x463397([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xe01f2d,_0xe01f2d+0x2));_0x186827>=_0x34962a[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x186827-=_0x34962a[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x48d149+=_0x34962a[_0x186827];}return _0x48d149;}function _0x1ea22a(){const _0x2b70d2=_0x8c0f2a[_0x463397([0x73,0x70,0x6c,0x69,0x74])](_0x463397([0x2e]));if(0x3!=_0x2b70d2[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4769b6(_0x2b70d2[0x1]);function _0x4769b6(_0x426b81){const _0x3fb30f=_0x25b1a1(_0x426b81);return _0x3fb30f&&_0x4dd7b4()?_0x3fb30f:null;function _0x4dd7b4(){const _0x138c69=_0x3fb30f[_0x463397([0x6a,0x74,0x69])],_0x4e5d10=window[_0x463397([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x138c69[_0x463397([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x138c69[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x33ab39={..._0x3fb30f,[_0x463397([0x6a,0x74,0x69])]:_0x138c69[_0x463397([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x138c69[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x33ab39[_0x463397([0x76,0x63])],_0x2feb1d(_0x33ab39)==_0x4e5d10;}}}async function _0xd03e80(){let _0x1b887f=!0x0;try{const _0x488589=_0x8c0f2a[_0x463397([0x73,0x70,0x6c,0x69,0x74])](_0x463397([0x2e])),[_0xdd260b,_0x112ca1,_0x2f39ed]=_0x488589;return _0x2ba67e(_0xdd260b),await _0x51df35(_0xdd260b,_0x112ca1,_0x2f39ed),_0x1b887f;}catch{return!0x1;}function _0x2ba67e(_0x1f2929){const _0x1ed35f=_0x25b1a1(_0x1f2929);_0x1ed35f&&_0x1ed35f[_0x463397([0x61,0x6c,0x67])]==_0x463397([0x45,0x53,0x32,0x35,0x36])||(_0x1b887f=!0x1);}async function _0x51df35(_0x163d0e,_0x221179,_0x17da35){const _0xf11fab=window[_0x463397([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x463397([0x66,0x72,0x6f,0x6d])](_0x29930d(_0x17da35),_0x43e8b9=>_0x43e8b9[_0x463397([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x39d29a=new window[(_0x463397([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x463397([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x163d0e+_0x463397([0x2e])+_0x221179),_0x4b594f=window[_0x463397([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x463397([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4b594f)return;const _0x24c766=await _0x4b594f[_0x463397([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x463397([0x6a,0x77,0x6b]),_0x14335b,{[_0x463397([0x6e,0x61,0x6d,0x65])]:_0x463397([0x45,0x43,0x44,0x53,0x41]),[_0x463397([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x463397([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x463397([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4b594f[_0x463397([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x463397([0x6e,0x61,0x6d,0x65])]:_0x463397([0x45,0x43,0x44,0x53,0x41]),[_0x463397([0x68,0x61,0x73,0x68])]:{[_0x463397([0x6e,0x61,0x6d,0x65])]:_0x463397([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x24c766,_0xf11fab,_0x39d29a)||(_0x1b887f=!0x1);}}function _0x25b1a1(_0x1a5c36){return _0x1a5c36[_0x463397([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x463397([0x65,0x79]))?JSON[_0x463397([0x70,0x61,0x72,0x73,0x65])](_0x29930d(_0x1a5c36)):null;}function _0x29930d(_0x1db73b){return window[_0x463397([0x61,0x74,0x6f,0x62])](_0x1db73b[_0x463397([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x463397([0x2b]))[_0x463397([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x463397([0x2f])));}function _0x2feb1d(_0x2120dc){let _0x1bd694=0x1505;function _0x26b899(_0x3826c1){for(let _0x1c1e14=0x0;_0x1c1e14<_0x3826c1[_0x463397([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1c1e14++){const _0x4babda=_0x3826c1[_0x463397([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1c1e14);_0x1bd694=(_0x1bd694<<0x5)+_0x1bd694+_0x4babda,_0x1bd694&=_0x1bd694;}}function _0x1f34d0(_0x526f68){Array[_0x463397([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x526f68)?_0x526f68[_0x463397([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1f34d0):_0x526f68&&typeof _0x526f68==_0x463397([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x463397([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x526f68)[_0x463397([0x73,0x6f,0x72,0x74])]()[_0x463397([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1ceb09,_0x39a9bc])=>{_0x26b899(_0x1ceb09),_0x1f34d0(_0x39a9bc);}):_0x26b899(window[_0x463397([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x526f68));}return _0x1f34d0(_0x2120dc),_0x1bd694>>>0x0;}function _0x5c1e01(_0xca50d2){return _0xca50d2[_0x463397([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x463397([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x463397([0x30]));}function _0xea58a3(_0x316a82){return _0x316a82[_0x463397([0x73,0x70,0x6c,0x69,0x74])]('')[_0x463397([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x463397([0x6a,0x6f,0x69,0x6e])]('');}function _0xcbbed9(_0x5310d8){return _0x45f7c3[_0x463397([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x463397([0x68,0x61,0x73])](_0x5310d8);}function _0x329aaf(_0x242bbc){return _0x45f7c3[_0x463397([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x463397([0x67,0x65,0x74])](_0x242bbc);}function _0x4fea78(){}function _0x463397(_0x4b157e){return _0x4b157e['map'](_0x52f73e=>String['fromCharCode'](_0x52f73e))['join']('');}_0x507530(await _0x182139());}(this);}['destroy'](){const _0x5f10fa=this['editor']['plugins']['get'](o),_0x5c87b0=this['editor']['config']['get']('collaboration.channelId');for(const _0x99c475 of _0x5f10fa['getCommentThreads']({'channelId':_0x5c87b0}))_0x5f10fa['_detachCommentThread'](_0x99c475['id']),_0x5f10fa['_threads']['delete'](_0x99c475['id']);super['destroy']();}['hasMarkerForId'](_0x8c9d5){return this['getAllMarkersForId'](_0x8c9d5)['length']>0x0;}['getAllMarkersForId'](_0x1e9bb0){const _0x4e0fdc=[];for(const _0x3899c2 of this['editor']['model']['markers'])_0x3899c2['name']['startsWith']('comment:'+_0x1e9bb0)&&_0x4e0fdc['push'](_0x3899c2);return _0x4e0fdc;}['scrollToThreadMarker'](_0x26c571){const _0x2ee4a6=this['_getTargetForId'](_0x26c571);_0x2ee4a6&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x26c571&&rt({'target':_0x2ee4a6[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xda0dad){this['editor']['model']['change'](()=>{for(const _0x3f2504 of this['getAllMarkersForId'](_0xda0dad))this['editor']['editing']['reconvertMarker'](_0x3f2504);});}['_attachArchivedThread'](_0x545fe7){const _0xe59a47=this['editor']['plugins']['get'](o),_0x149799=this['editor']['plugins']['get'](P),_0x5b42fd=_0xe59a47['getCommentThread'](_0x545fe7);if(!_0x5b42fd['isAttached']){const _0x1f02d4=_0x5b42fd['attachTo'](()=>this['_getTargetForId'](_0x5b42fd['id']));_0x149799['registerAnnotation'](_0x1f02d4),_0x5b42fd['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3df48a=this['editor'],_0x5a9345=_0x3df48a['plugins']['get'](st);_0x3df48a['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x101b1e,_0x3a2d31)=>{const {id:_0x1779e6}=er(_0x101b1e['markerName']),_0x13898b=_0x3df48a['plugins']['get'](o)['getCommentThread'](_0x1779e6),_0x20e5ff=this['activeMarker']&&er(this['activeMarker'])['id']===_0x1779e6;let _0x2e49fa;if(_0x13898b&&_0x13898b['isResolved']&&!_0x20e5ff&&_0x101b1e['item'])return _0x3a2d31['consumable']['consume'](_0x101b1e['item'],'addMarker:'+_0x101b1e['markerName']),_0x3a2d31['consumable']['consume'](_0x101b1e['item'],'removeMarker:'+_0x101b1e['markerName']),null;const _0x196078=['ck-comment-marker'];return _0x20e5ff&&_0x196078['push']('ck-comment-marker--active'),_0x2e49fa=_0x13898b?.['length']?_0x13898b['comments']['first']['author']['id']:_0x5a9345['me']['id'],{'classes':_0x196078,'attributes':{'data-comment':_0x1779e6,'data-author-id':_0x2e49fa}};}}),_0x3df48a['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1b378f,{options:_0x355b5c})=>{if(_0x355b5c['showCommentHighlights'])return null;const _0x14063a=_0x3df48a['plugins']['get'](o),_0x284bcf=_0x3df48a['model']['markers']['get'](_0x1b378f),{id:_0x25b1c1,part:_0x1d5d03}=er(_0x1b378f);return _0x284bcf&&!_0x284bcf['affectsData']||_0x355b5c['ignoreResolvedComments']&&_0x14063a['getCommentThread'](_0x25b1c1)?.['isResolved']?null:{'group':'comment','name':_0x1d5d03?_0x25b1c1+':'+_0x1d5d03:_0x25b1c1};}}),_0x3df48a['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2f3620,{writer:_0x1fe1d1})=>_0x1fe1d1['createElement']('$marker',{'data-name':'comment:'+_0x2f3620['getAttribute']('id')})}),_0x3df48a['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1093f2=this['editor'],_0x425d8a=_0x1093f2['plugins']['get'](o),_0x18468d=new Set(),_0x440aa9=new Set();_0x1093f2['model']['document']['registerPostFixer'](_0x2e2fea=>{let _0xfb139=!0x1;for(const {name:_0x5997ab,data:_0x3a4b14}of _0x1093f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x6f399e,id:_0x2f96f5}=er(_0x5997ab);let _0x2002e1=_0x3a4b14['newRange'];if('comment'!==_0x6f399e||!_0x2002e1)continue;const _0x35b8dd='$graveyard'===_0x2002e1['root']['rootName'];_0x35b8dd||(_0x2002e1=mt(_0x2002e1,_0x1093f2['model']),!_0x2002e1||_0x2002e1['isCollapsed']||!_0x3a4b14['newRange']||_0x2002e1['isEqual'](_0x3a4b14['newRange']))?_0x1093f2['model']['hasContent'](_0x2002e1)&&!_0x35b8dd?this['isThreadsLoadingPaused']?_0x18468d['add'](_0x5997ab):this['_handleThreadMarker'](_0x5997ab,_0x2f96f5):(_0x440aa9['add'](_0x5997ab),_0x18468d['delete'](_0x5997ab),_0x2e2fea['removeMarker'](_0x5997ab),_0xfb139=!0x0):(_0x2e2fea['updateMarker'](_0x5997ab,{'range':_0x2002e1}),_0xfb139=!0x0);}return _0xfb139;}),this['on']('change:isThreadsLoadingPaused',(_0xf8a726,_0x2565b1,_0x57fa1d)=>{if(!_0x57fa1d&&_0x18468d['size'])for(const _0x2c7923 of _0x18468d){const {id:_0x30745e}=er(_0x2c7923);_0x18468d['delete'](_0x2c7923),_0x1093f2['model']['markers']['get'](_0x2c7923)&&this['_handleThreadMarker'](_0x2c7923,_0x30745e);}}),this['listenTo'](_0x1093f2['model']['document'],'change',()=>{for(const {name:_0x459c3c,data:{newRange:_0x248e9a}}of _0x1093f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x741857,id:_0xbebf5e}=er(_0x459c3c);if('comment'!==_0x741857)continue;const _0x14a443=_0x425d8a['getCommentThread'](_0xbebf5e),_0xc221bf=this['hasMarkerForId'](_0xbebf5e);_0x14a443&&(!_0x14a443['_hasTargetInContent']&&_0x248e9a&&_0x1093f2['editing']['view']['once']('render',()=>{const _0x32b7df=_0x1093f2['plugins']['get'](O),_0x13407c=_0x425d8a['_threadToController']['get'](_0x14a443)['view'];_0x32b7df['getByInnerView'](_0x13407c)['refreshVisibility']();},{'priority':'low'}),_0x14a443['_hasTargetInContent']=_0xc221bf||!!_0x248e9a),_0x248e9a||(_0x440aa9['add'](_0x459c3c),_0x18468d['delete'](_0x459c3c));}for(const _0x1e028b of _0x440aa9){const {id:_0x5df1af}=er(_0x1e028b),_0x186d5=_0x425d8a['getCommentThread'](_0x5df1af);if(_0x18468d['delete'](_0x1e028b),!_0x186d5)continue;const _0x374ce7=this['hasMarkerForId'](_0x5df1af);_0x374ce7||_0x186d5['isSubmitted']?_0x374ce7||_0x186d5['unlinkedAt']||_0x186d5['setUnlinkedAt'](new Date()):_0x186d5['remove']();}_0x440aa9['clear']();});}['_handleInitialThreads'](_0x18d88e){_0x18d88e['forEach'](_0x4e588a=>{_0x4e588a['unlinkedAt']&&this['_attachArchivedThread'](_0x4e588a['id']);});}['_getTargetForId'](_0x4f221f){const _0x144db9=this['editor'],_0x372d65=this['getAllMarkersForId'](_0x4f221f);return et(_0x144db9['editing'],_0x372d65);}['_getTextContext'](_0x567bb5){const _0xdf047d=this['getAllMarkersForId'](_0x567bb5);let _0x1defcc='',_0x1185a5=!0x1;for(const _0x342270 of _0xdf047d){const _0x481871=_0x342270['getRange']();for(const _0x52ce6a of Array['from'](_0x481871['getItems']()))_0x52ce6a['is']('$textProxy')?(_0x1defcc&&_0x1185a5&&(_0x1defcc+='\x20',_0x1185a5=!0x1),_0x1defcc+=_0x52ce6a['data']):_0x1185a5=!0x0;_0x1185a5=!0x0;}return _0x1defcc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5285d0,_0x1b122d){const _0xebd319=this['editor'],_0x44fa60=_0xebd319['plugins']['get'](o);let _0x45091c=_0x44fa60['getCommentThread'](_0x1b122d);const _0x521d03=_0xebd319['config']['get']('collaboration.channelId'),_0x19bf76=_0xebd319['plugins']['get'](P);if(_0x45091c&&(_0x45091c['unlinkedAt']&&_0x45091c['setUnlinkedAt'](null),_0x45091c['isAttached']))return _0x45091c;return!this['getAllMarkersForId'](_0x1b122d)[0x0]['managedUsingOperations']?_0xebd319['editing']['view']['once']('render',()=>{if(_0x44fa60['getCommentThread'](_0x1b122d))return;const _0x13913d=_0xebd319['plugins']['get'](O);_0x45091c=_0x44fa60['openNewCommentThread']({'channelId':_0x521d03,'threadId':_0x1b122d,'target':()=>this['_getTargetForId'](_0x1b122d),'context':{'type':'text','value':this['_getTextContext'](_0x1b122d)}});const _0x5e46d1=_0x44fa60['_threadToController']['get'](_0x45091c)['view'],_0x38e8b3=_0x13913d['getByInnerView'](_0x5e46d1);_0x38e8b3&&_0x19bf76['registerAnnotation'](_0x38e8b3);},{'priority':'low'}):_0x44fa60['fetchCommentThread']({'channelId':_0x521d03,'threadId':_0x1b122d})['then'](_0x4b1c26=>{if('destroyed'!==_0xebd319['state']){if(_0x45091c=_0x4b1c26,_0x45091c&&!_0x45091c['isAttached']){const _0x269cce=_0x45091c['attachTo'](()=>this['_getTargetForId'](_0x1b122d));_0x19bf76['registerAnnotation'](_0x269cce),_0x45091c['isResolved']&&this['_reconvertMarkers'](_0x1b122d);}else{if(!_0x45091c){const _0x5c0a94=this['getAllMarkersForId'](_0x1b122d);_0xebd319['model']['change'](_0xe5c49d=>{for(const _0x1ed8c7 of _0x5c0a94)_0xe5c49d['removeMarker'](_0x1ed8c7);});}}}}),_0x45091c;}['_handleThreadMarker'](_0x3e4b5d,_0x3a2155){const _0x1be8ec=this['_attachMarkerToThread'](_0x3e4b5d,_0x3a2155);_0x1be8ec&&!_0x1be8ec['context']&&_0x1be8ec['setContext']({'type':'text','value':this['_getTextContext'](_0x3a2155)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5326bd=this['editor'];ot(_0x5326bd['model'],({left:_0x4b7616,entered:_0xb75c10})=>{for(const _0x4e00a6 of _0x4b7616)if(ht(_0x4e00a6)){_0x5326bd['ui']['ariaLiveAnnouncer']['announce'](E(_0x5326bd['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x28719a of _0xb75c10)if(ht(_0x28719a)){_0x5326bd['ui']['ariaLiveAnnouncer']['announce'](E(_0x5326bd['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x43e52b)));break;}});}}function dt(_0x2c6942,_0x379c6d){return _0x379c6d?_0x2c6942+':'+_0x379c6d:_0x2c6942;}function er(_0x465c0a){const _0x82119a=_0x465c0a['split'](':');return{'group':_0x82119a[0x0],'id':_0x82119a[0x1],'part':_0x82119a[0x2]};}function mt(_0x50b59d,_0x2344c2){const _0x2d142f=_0x2344c2['schema'],_0x31558b=_0x2344c2['createRange'](_0x50b59d['start']);for(const _0x4b4b82 of _0x50b59d['getWalker']()){const {type:_0x10fda4,item:_0x60f5d6,nextPosition:_0x239a20}=_0x4b4b82;if('text'===_0x10fda4||_0x2d142f['isObject'](_0x60f5d6)){const _0x1c2829=_0x2344c2['createPositionBefore'](_0x60f5d6);_0x31558b['isCollapsed']&&(_0x31558b['start']=_0x1c2829),_0x31558b['end']=_0x239a20;}}return _0x31558b;}function ht(_0x2361a9){return'comment'===er(_0x2361a9['name'])['group'];}class i extends _0x46aee5{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x30876f=this['editor'],_0x39c769=_0x30876f['plugins']['get'](o),_0x2a145c=_0x30876f['plugins']['get'](r),_0x4bbff7=_0x30876f['plugins']['get'](O),_0x5f4f15=_0x30876f['plugins']['get'](P);_0x30876f['ui']['componentFactory']['add']('comment',()=>{const _0x1878f4=this['_createUIButton'](_0x3ac222);return _0x1878f4['tooltip']=!0x0,_0x1878f4;}),_0x30876f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x554070)),_0x5f4f15['addSourceCollector'](()=>{const _0x425c06=[];for(const [_0x37950e,_0x4d76f7]of _0x39c769['_threadToController']){const _0x5a6067=_0x2a145c['getAllMarkersForId'](_0x37950e['id']),_0x24614e=_0x5a6067['map'](_0x464cf4=>_0x464cf4['getRange']());_0x5a6067['length']>0x0&&_0x425c06['push']([_0x4d76f7['view'],_0x24614e]);}return _0x425c06;}),this['listenTo'](_0x4bbff7,'change:activeAnnotations',(_0x217280,_0x5f2181,_0x28abd1)=>{const _0x2c8aa0=Array['from'](_0x28abd1)['map'](_0x3d65df=>_0x3d65df['innerView'])['find'](_0x94cd0f=>_0x39c769['_viewToController']['has'](_0x94cd0f));if(!_0x2c8aa0)return void(_0x2a145c['activeMarker']=null);const _0xd52ffd=_0x39c769['_viewToController']['get'](_0x2c8aa0)['model']['id'],_0x18bdfa='comment:'+_0xd52ffd;_0xd52ffd&&_0x2a145c['hasMarkerForId'](_0xd52ffd)?_0x2a145c['activeMarker']=_0x18bdfa:_0x2a145c['activeMarker']&&(_0x2a145c['activeMarker']=null);}),this['listenTo'](_0x39c769,'removeCommentThread',(_0x20f17d,{threadId:_0x4e7aa4,isFromAdapter:_0x3f168c})=>{!_0x3f168c&&_0x30876f['ui']['focusTracker']['isFocused']&&_0x2a145c['hasMarkerForId'](_0x4e7aa4)&&_0x30876f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x39c769,'addComment',(_0x599f41,{threadId:_0x20dfcf,isFromAdapter:_0x5487ae})=>{if(_0x5487ae||!_0x2a145c['hasMarkerForId'](_0x20dfcf)||!_0x39c769['hasCommentThread'](_0x20dfcf))return;0x1===_0x39c769['getCommentThread'](_0x20dfcf)['length']&&(_0x30876f['editing']['view']['focus'](),_0x599f41['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xc2393e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1d38af;for(const _0x4a7cbe in _0xc2393e){const _0x5e6cea=_0x4a7cbe,_0x4df564=_0xc2393e[_0x5e6cea];if('commentsLicenseKeyValid'==_0x4df564||'commentsLicenseKeyInvalid'==_0x4df564||'commentsLicenseKeyExpired'==_0x4df564||'commentsLicenseKeyDomainLimit'==_0x4df564||'commentsLicenseKeyNotAllowed'==_0x4df564||'commentsLicenseKeyEvaluationLimit'==_0x4df564||'commentsLicenseKeyTrialLimit'==_0x4df564||'commentsLicenseKeyUsageLimit'==_0x4df564){delete _0xc2393e[_0x5e6cea],_0x1d38af=_0x4df564,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1d38af&&_0xc2393e['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1d38af&&_0xc2393e['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1d38af&&_0xc2393e['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1d38af&&_0xc2393e['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1d38af&&_0xc2393e['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1d38af&&_0xc2393e['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1d38af&&_0xc2393e['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x257126){const _0x46e6b6=this['editor'],_0x18b843=new _0x257126(_0x46e6b6['locale']),_0x556bdc=_0x46e6b6['commands']['get']('addCommentThread');return _0x18b843['set']({'label':E(_0x46e6b6['locale'],'Comment'),'icon':_0x4bd163}),_0x18b843['bind']('isEnabled')['to'](_0x556bdc),this['listenTo'](_0x18b843,'execute',()=>{_0x556bdc['execute']();}),_0x18b843;}}class s extends _0x46aee5{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1c4bb5){super(_0x1c4bb5),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x14e143,_0x49a50c,_0x2dfe5f)=>{_0x2dfe5f?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x13bf1e,_0x487c18]of this['editor']['commands'])_0x487c18['affectsData']&&'addCommentThread'!==_0x13bf1e&&_0x487c18['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 _0x4dc575=this['editor']['editing']['view']['document'];this['listenTo'](_0x4dc575,'cut',_0x6f72ad=>_0x6f72ad['stop'](),{'priority':'highest'}),this['listenTo'](_0x4dc575,'clipboardInput',_0x37766f=>_0x37766f['stop'](),{'priority':'highest'}),this['listenTo'](_0x4dc575,'delete',_0xd81de6=>_0xd81de6['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2e01e2,_0x5d768e]of this['editor']['commands'])_0x5d768e['affectsData']&&'addCommentThread'!==_0x2e01e2&&_0x5d768e['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 M extends _0x36456e{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3b51b8){super(_0x3b51b8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x39e6fa=this['context']['plugins']['get'](O);this['listenTo'](_0x39e6fa,'_activateAnnotation',(_0x58d703,_0x43b03f)=>{for(const _0x21c946 of this['activeUIs']){const _0x2e37f4=this['_uis']['get'](_0x21c946);(0x0,this['uisData']['get'](_0x21c946)['filter'])(_0x43b03f)&&_0x2e37f4['setActiveAnnotation'](_0x43b03f);}}),this['listenTo'](_0x39e6fa,'_deactivateAllAnnotations',()=>{for(const _0x5585c4 of this['activeUIs']){this['_uis']['get'](_0x5585c4)['setActiveAnnotation'](null);}}),this['listenTo'](_0x39e6fa['_visibleAnnotations'],'add',(_0x2ae3ac,_0x5821ab)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5821ab);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x243321){return this['activeUIs']['has'](_0x243321);}['activate'](_0x581562,_0x35153c=this['defaultFilter']){const _0x67df34=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x581562))throw new _0xd92937('annotationsuis-missing-ui',this,{'uiName':_0x581562});this['isActive'](_0x581562)&&this['deactivate'](_0x581562),this['activeUIs']['add'](_0x581562);const _0xb58f3b=new _();!function({source:_0x26f04a,target:_0x17cedb,filter:_0x165dd2}){for(const _0x5806d9 of _0x26f04a)_0x165dd2(_0x5806d9)&&_0x17cedb['add'](_0x5806d9);_0x17cedb['listenTo'](_0x26f04a,'add',(_0x16ef7e,_0x1e7367)=>{_0x165dd2(_0x1e7367)&&_0x17cedb['add'](_0x1e7367);}),_0x17cedb['listenTo'](_0x26f04a,'remove',(_0x10d32f,_0x2ac28c)=>{_0x17cedb['has'](_0x2ac28c)&&_0x17cedb['remove'](_0x2ac28c);});}({'source':_0x67df34['_visibleAnnotations'],'target':_0xb58f3b,'filter':_0x35153c}),this['uisData']['set'](_0x581562,{'collection':_0xb58f3b,'filter':_0x35153c});const _0x5cbb4b=this['_uis']['get'](_0x581562);_0x5cbb4b['attach'](_0xb58f3b),this['listenTo'](_0x5cbb4b,'change:activeAnnotation',(_0x53c258,_0x2641ac,_0x27b40d,_0x18d455)=>{_0x18d455&&_0x67df34['_removeActiveAnnotation'](_0x18d455),_0x27b40d&&_0x67df34['_addActiveAnnotation'](_0x27b40d);});}['deactivate'](_0x5f15b7){if(this['activeUIs']['delete'](_0x5f15b7),!this['_uis']['has'](_0x5f15b7))throw new _0xd92937('annotationsuis-missing-ui',this,{'uiName':_0x5f15b7});const _0x5871f5=this['_uis']['get'](_0x5f15b7);_0x5871f5['detach'](),this['stopListening'](_0x5871f5),this['uisData']['get'](_0x5f15b7)['collection']['destroy'](),this['uisData']['delete'](_0x5f15b7);}['switchTo'](_0x5632ad){if(!this['_uis']['has'](_0x5632ad))throw new _0xd92937('annotationsuis-missing-ui',this,{'uiName':_0x5632ad});const _0x5b821c=this['context']['plugins']['get'](O),_0x550998=Array['from'](_0x5b821c['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5632ad);const _0x53d06f=this['_uis']['get'](_0x5632ad);_0x53d06f['setActiveAnnotation'](_0x550998),_0x53d06f['_setSelectedAnnotations']&&_0x550998&&_0x53d06f['_setSelectedAnnotations']([_0x550998]);}['deactivateAll'](){for(const _0x5da228 of this['activeUIs'])this['deactivate'](_0x5da228);}['register'](_0x5c1313,_0x5a311b){if(this['_uis']['has'](_0x5c1313))throw new _0xd92937('annotationsuis-register-already-registered');if('function'!=typeof _0x5a311b['attach']||'function'!=typeof _0x5a311b['detach']||'function'!=typeof _0x5a311b['setActiveAnnotation'])throw new _0xd92937('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5c1313,_0x5a311b);}['refilterAnnotations'](){const _0x41d905=this['context']['plugins']['get'](O)['collection'],_0xdee729=new Map(),_0x4458e8=Array['from'](this['activeUIs']);for(const _0x2c95fb of this['activeUIs']){const _0x1e41cc=this['uisData']['get'](_0x2c95fb)['collection'];for(const _0x380823 of _0x1e41cc)_0xdee729['set'](_0x380823,_0x2c95fb);}for(const _0x3247ef of _0x41d905){const _0x47817f=_0xdee729['get'](_0x3247ef);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3247ef);const _0x140019=_0x4458e8['find'](_0x1c845c=>this['uisData']['get'](_0x1c845c)['filter'](_0x3247ef));_0x47817f!==_0x140019&&(_0x47817f&&this['uisData']['get'](_0x47817f)['collection']['remove'](_0x3247ef),_0x140019&&this['uisData']['get'](_0x140019)['collection']['add'](_0x3247ef));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5db772){const _0x35e441=[];for(const _0x3ed741 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3ed741)['filter'])(_0x5db772)&&_0x35e441['push'](_0x3ed741);}if(_0x35e441['length']>0x1)throw new _0xd92937('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x35e441,'annotationType':_0x5db772['type']});}}const pi=xt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x52c607){super(_0x52c607);const _0xcfbe04=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 _0x20e391(),this['focusCycler']=new _0xa806cd({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0xcfbe04['to']('class')],'style':{'minHeight':_0xcfbe04['to']('minHeight',_0x4cfc9c=>'number'==typeof _0x4cfc9c?pi(_0x4cfc9c+0xa):null)},'dir':_0x52c607['uiLanguageDirection'],'role':'application','aria-label':E(_0x52c607,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x52c607,'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',_0x89dece=>{this['_updateItemPositionInFocusables'](_0x89dece['source']);}),this['list']['forEach'](_0x35b04f=>{this['focusTracker']['add'](_0x35b04f['element']),this['_updateItemPositionInFocusables'](_0x35b04f);}),this['list']['on']('change',(_0x568207,_0x72b902)=>{for(const _0x563000 of _0x72b902['removed'])this['focusTracker']['remove'](_0x563000['element']),this['focusables']['remove'](_0x563000);for(const _0x255abe of _0x72b902['added'])this['focusTracker']['add'](_0x255abe['element']),this['_updateItemPositionInFocusables'](_0x255abe);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4f7c60){const _0x497e62=this['focusables']['getIndex'](_0x4f7c60);let _0x392c88,_0x5539cf;for(const _0x4c241c of this['focusables'])if(_0x4f7c60['top']<_0x4c241c['top']){_0x392c88=_0x4c241c;break;}if(_0x5539cf=_0x392c88?this['focusables']['getIndex'](_0x392c88):this['focusables']['length'],-0x1!==_0x497e62){if(_0x497e62===_0x5539cf-0x1)return;this['focusables']['remove'](_0x4f7c60),_0x5539cf=_0x392c88?this['focusables']['getIndex'](_0x392c88):this['focusables']['length'];}this['focusables']['add'](_0x4f7c60,_0x5539cf);}}const Ht=xt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x450e6f){super(_0x450e6f),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2f89ff,_0xf7f541)=>_0x2f89ff+_0xf7f541),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x38ff36=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x38ff36['to']('isAnimationDisabled',_0x2e6486=>_0x2e6486?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x38ff36['to']('top',_0xf593da=>Ht(_0xf593da))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1e6917=this['element']['clientHeight'];_0x1e6917&&(this['height']=_0x1e6917);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x36456e{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x586398){super(_0x586398),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 _0x31d8f8=this['context']['config']['get']('sidebar.container');_0x31d8f8&&this['setContainer'](_0x31d8f8);}['setContainer'](_0x46cbdd){if(!y(_0x46cbdd))throw new _0xd92937('sidebar-setcontainer-invalid-element');this['container']=_0x46cbdd;}['_attachToContainer']({viewClass:_0x186638='',spaceBetweenItems:_0x1fe1a8=0x19}={}){if(!y(this['container']))throw new _0xd92937('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x186638,this['_spaceBetweenItems']=_0x1fe1a8;}['rearrange']({removedAnnotation:_0xee93cb,previousAnnotation:_0x54a138,nextAnnotation:_0x1ae8c5}){const _0x1f697d=this['getSidebarItemView'](_0xee93cb);this['view']['list']['remove'](_0x1f697d),this['_destroySidebarItemView'](_0xee93cb),_0x54a138&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x54a138)),_0x1ae8c5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1ae8c5)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xd06c23,activatedAnnotation:_0x17d9f6,disableAnimationOnActivatedAnnotation:_0x516c33}){if(this['_activeAnnotation']=_0x17d9f6,_0xd06c23){_0xd06c23['isActive']=!0x1;const _0x4c3d85=this['getSidebarItemView'](_0xd06c23);_0x4c3d85&&_0x516c33&&(_0x4c3d85['isAnimationDisabled']=!0x1);}if(_0x17d9f6){const _0x3450b7=this['getSidebarItemView'](_0x17d9f6);_0x3450b7&&(_0x17d9f6['isActive']=!0x0,_0x516c33&&(_0x3450b7['isAnimationDisabled']=!0x0,_0x3450b7['top']+=0x1),this['_alignToTargetRect'](_0x3450b7));}}['_detachFromContainer'](_0x2e115d){if(this['view']['element']['remove'](),_0x2e115d){for(const _0x332222 of _0x2e115d)this['_destroySidebarItemView'](_0x332222);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x34f8c0,_0x4d10f2){_0x4d10f2||(_0x4d10f2=_0x34f8c0['view']);const _0x2fa714=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2fa714,_0x34f8c0),this['_annotationToSidebarItemView']['set'](_0x34f8c0,_0x2fa714),_0x2fa714['content']['add'](_0x4d10f2),this['listenTo'](_0x34f8c0['view'],'change:targetRect',(_0x5b5fef,_0x4e139d,_0x41f6f0)=>{const _0x4d581a=this['_getTargetTop'](_0x34f8c0,_0x41f6f0);_0x2fa714['_targetTop']!=_0x4d581a&&(_0x2fa714['_targetTop']=_0x4d581a,this['_setItemTop'](_0x2fa714,_0x4d581a));}),this['listenTo'](_0x2fa714,'change:top',()=>{this['_recalculate'](_0x2fa714,'top');}),this['listenTo'](_0x2fa714,'change:bottom',()=>{this['_recalculate'](_0x2fa714,'bottom');}),this['_alignToTargetRect'](_0x2fa714);const _0x2f814e=this['_getItemBefore'](_0x2fa714);if(_0x2f814e)this['_alignAfterItem'](_0x2f814e,_0x2fa714)||this['_alignToTargetRect'](_0x2fa714);else this['_alignToTargetRect'](_0x2fa714);return this['_updateLastItem'](),this['view']['list']['add'](_0x2fa714),_0x2fa714;}['_alignForTopChange'](_0x47b49d){if(!_0x47b49d['content']['length'])return;const _0x59607a=this['_getItemBefore'](_0x47b49d);if(!_0x59607a)return;const _0x145d5b=this['_sidebarItemViewToAnnotation']['get'](_0x59607a),_0x500a99=this['_activeAnnotation'];_0x500a99&&_0x500a99===_0x145d5b?this['_alignAfterItem'](_0x59607a,_0x47b49d):this['_alignBeforeItem'](_0x47b49d,_0x59607a);}['_alignForBottomChange'](_0x592ae7){if(!_0x592ae7['content']['length'])return;const _0x2a1a51=this['_getItemAfter'](_0x592ae7);if(!_0x2a1a51)return;const _0xef4be0=this['_sidebarItemViewToAnnotation']['get'](_0x2a1a51),_0x3dede2=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x349a37=this['_activeAnnotation'];_0x349a37&&_0x349a37===_0xef4be0&&_0x3dede2?(this['_alignBeforeItem'](_0x2a1a51,_0x592ae7),this['_alignAfterItem'](_0x592ae7,_0x2a1a51)):_0x349a37&&_0x349a37===_0xef4be0?this['_alignBeforeItem'](_0x2a1a51,_0x592ae7):this['_alignAfterItem'](_0x592ae7,_0x2a1a51);}['_recalculate'](_0x2c80ea,_0x58725f){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5b898c,changedProp:_0x1f3fa3}of this['_recalculateBuffer'])'top'===_0x1f3fa3?this['_alignForTopChange'](_0x5b898c):this['_alignForBottomChange'](_0x5b898c);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2c80ea,'changedProp':_0x58725f});}['getSidebarItemView'](_0x34c535){return this['_annotationToSidebarItemView']['get'](_0x34c535);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1d4b71){const _0x30f7fa=this['getSidebarItemView'](_0x1d4b71);this['stopListening'](_0x30f7fa),this['stopListening'](_0x1d4b71['view']),_0x30f7fa['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1d4b71),this['_sidebarItemViewToAnnotation']['delete'](_0x30f7fa);}['_createSidebarView'](){const _0xcb168f=new H(this['context']['locale']);return _0xcb168f['render'](),this['on']('change:_lastItem',(_0x2ba963,_0x3bee46,_0x31e1c1,_0x5b2485)=>{_0x5b2485&&_0xcb168f['unbind']('minHeight'),_0x31e1c1?_0xcb168f['bind']('minHeight')['to'](_0x31e1c1,'bottom'):_0xcb168f['minHeight']=null;}),_0xcb168f;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x549bae){const _0xeb89fd=this['_sidebarItemViewToAnnotation']['get'](_0x549bae),_0x5e9f67=_0xeb89fd&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xeb89fd)-0x1);return _0x5e9f67&&this['getSidebarItemView'](_0x5e9f67)||null;}['_getItemAfter'](_0x333e29){const _0x3a0e3e=this['_sidebarItemViewToAnnotation']['get'](_0x333e29),_0x16418a=_0x3a0e3e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3a0e3e)+0x1);return _0x16418a&&this['getSidebarItemView'](_0x16418a)||null;}['_alignBeforeItem'](_0xc16dc6,_0x13f4f4){_0xc16dc6['updateHeight']();const _0x5f5a98=G(_0x13f4f4['bottom']+this['_spaceBetweenItems'],_0xc16dc6['top']);return!!_0x5f5a98&&(this['_setItemTop'](_0x13f4f4,_0x13f4f4['top']-_0x5f5a98),!0x0);}['_alignAfterItem'](_0xfed472,_0x177c2a){_0xfed472['updateHeight']();const _0x13b26b=G(_0xfed472['bottom']+this['_spaceBetweenItems'],_0x177c2a['top']);return!!_0x13b26b&&(this['_setItemTop'](_0x177c2a,_0x177c2a['top']+_0x13b26b,!0x1),!0x0);}['_alignToTargetRect'](_0x810203){const _0x25a2a3=this['_sidebarItemViewToAnnotation']['get'](_0x810203);if(!_0x25a2a3||!_0x25a2a3['target']||!_0x25a2a3['targetRect'])return;const _0x37a474=this['_getTargetTop'](_0x25a2a3,_0x25a2a3['targetRect']);this['_setItemTop'](_0x810203,_0x37a474);}['_getTargetTop'](_0xbe5bbc,_0x525058){if(null===_0x525058)return 0x0;if(_0xbe5bbc['target']instanceof _0x32a86d)return _0x525058['top'];{const _0x46b80a=new _0x32a86d(this['view']['element'])['top'];return _0x525058['top']-_0x46b80a;}}['_setItemTop'](_0x16a9b4,_0x1a346f,_0x49cbb3=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x49cbb3&&(_0x1a346f=Math['max'](_0x1a346f,this['_getMaxAvailableTop'](_0x16a9b4))),_0x16a9b4['top']=_0x1a346f;}['_getMaxAvailableTop'](_0x51730e){let _0x387538=this['_getItemBefore'](_0x51730e),_0x548269=0x0;for(;_0x387538;)_0x387538['updateHeight'](),_0x548269+=this['_spaceBetweenItems']+_0x387538['height'],_0x387538=this['_getItemBefore'](_0x387538);return _0x548269;}}function G(_0x3f0ef6,_0x3b214c){return Math['max'](_0x3f0ef6-_0x3b214c,0x0);}function y(_0x4a1163){return null!==_0x4a1163&&'object'==typeof _0x4a1163&&0x1===_0x4a1163['nodeType'];}class e extends _0x36456e{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f134d){super(_0x1f134d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x27e15c(),this['_refreshPositioningDebounced']=_0x4daac0(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3b0fd2=this['context']['plugins']['get'](M),_0x5748ef=this['context']['plugins']['get'](z);_0x3b0fd2['register']('wideSidebar',this),_0x5748ef['container']&&_0x3b0fd2['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4c73ba){if(_0x4c73ba===this['activeAnnotation'])return;const _0x25e9fc=this['context']['plugins']['get'](z);_0x25e9fc['_activeAnnotation']=_0x4c73ba;const _0xfec6b=this['activeAnnotation'];_0x25e9fc['refresh']({'blurredAnnotation':_0xfec6b,'activatedAnnotation':_0x4c73ba}),this['activeAnnotation']=_0x4c73ba;}['attach'](_0x64134c){this['annotations']=_0x64134c;const _0x188c01=this['context']['plugins']['get'](z);if(_0x188c01['_annotations']=_0x64134c,this['isAttached'])throw new _0xd92937('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x188c01,'set:container',()=>{this['detach'](),this['listenTo'](_0x188c01,'change:container',_0x43e27d=>{_0x43e27d['off'](),this['attach'](_0x64134c);});}),_0x188c01['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x420a17=_0xfe57de=>{_0xfe57de['updateTargetRect'](),_0x188c01['addAnnotation'](_0xfe57de);};for(const _0x42afea of _0x64134c)_0x420a17(_0x42afea);this['listenTo'](_0x64134c,'add',(_0x51be38,_0x5ca00a)=>{_0x420a17(_0x5ca00a);}),this['listenTo'](_0x64134c,'remove',(_0x3343a0,_0x22b6ce,_0x1df7c2)=>{_0x188c01['rearrange']({'removedAnnotation':_0x22b6ce,'previousAnnotation':_0x64134c['get'](_0x1df7c2-0x1),'nextAnnotation':_0x64134c['get'](_0x1df7c2+0x1)}),_0x22b6ce===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x64134c,'focus',(_0xc117e0,_0x83ba35)=>{this['setActiveAnnotation'](_0x83ba35);}),this['listenTo'](_0x64134c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4db373=this['context']instanceof _0x3d509f?this['context']['editors']:new _0x27e15c([this['context']]);for(const _0x1e3b99 of _0x4db373)this['_integrateWithEditorAnnotations'](_0x1e3b99);this['listenTo'](_0x4db373,'add',(_0x54b9f4,_0x3aac31)=>{this['listenTo'](_0x3aac31,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3aac31);});}),this['listenTo'](_0x4db373,'remove',(_0xb4485a,_0x5f59c0)=>{_0x5f59c0['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5f59c0['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xd92937('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5aff46=this['context']['plugins']['get'](z);_0x5aff46['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5aff46),this['stopListening'](this['annotations']),this['context']instanceof _0x3d509f&&this['stopListening'](this['context']['editors']);for(const _0x48a9b5 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x48a9b5);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x265c5d){if(!_0x265c5d['plugins']['has']('EditorAnnotations'))return;const _0x94198a=_0x265c5d['plugins']['get']('EditorAnnotations'),_0x462989=()=>{const _0x5c445b=_0x94198a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x5c445b[0x0]||null);};this['listenTo'](_0x94198a,'refresh',_0x462989),this['listenTo'](_0x94198a,'blur',(_0x4c4dcc,{isAnnotationTracked:_0x59aa41})=>{this['activeAnnotation']&&_0x59aa41(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x94198a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4b7e08=>{_0x94198a['hasDomSelection']()&&(_0x462989(),_0x4b7e08['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x94198a);}['_destroyEditorAnnotationsIntegration'](_0x5eabea){this['stopListening'](_0x5eabea),this['_editorAnnotations']['remove'](_0x5eabea);}}class C extends _0x3ac222{['counterView'];constructor(_0x559416){super(_0x559416);const _0x5e3117=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x114438,_0x5b6646)=>_0x114438?'...':_0x5b6646['toString']()),this['set']('annotationType',''),this['icon']=_0x4bd163,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5e3117['to']('annotationType',_0x35e048=>'ck-annotation-counter__badge--'+_0x35e048),_0x5e3117['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5e3117['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x36456e{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1afe02){super(_0x1afe02),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x100987),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x27e15c(),this['_refreshPositioningDebounced']=_0x4daac0(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x11df1c(this['context']['locale']),this['balloonPanelView']=new _0x20d659(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1af1e1){this['annotations']=_0x1af1e1;const _0x543be6=this['context']['plugins']['get'](z),_0x45898d=this['balloonPanelView'];if(_0x543be6['_annotations']=_0x1af1e1,this['isAttached'])throw new _0xd92937('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x543be6,'set:container',()=>{this['detach'](),this['listenTo'](_0x543be6,'change:container',_0x234c23=>{_0x234c23['off'](),this['attach'](_0x1af1e1);});}),_0x543be6['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x49e517=_0x4575d6=>{const _0x28db36=new C(this['context']['locale']);_0x543be6['addAnnotation'](_0x4575d6,_0x28db36),this['_annotationToNarrowView']['set'](_0x4575d6,_0x28db36),_0x28db36['bind']('isDirty','annotationType','number')['to'](_0x4575d6['view'],'isDirty','type','length'),_0x28db36['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x45898d['content']['first']!==_0x4575d6['view']?(this['_showBalloon'](_0x4575d6),_0x4575d6['view']['element']['focus'](),this['setActiveAnnotation'](_0x4575d6)):this['setActiveAnnotation'](null);});};for(const _0x10c1d8 of _0x1af1e1)_0x49e517(_0x10c1d8);this['listenTo'](_0x1af1e1,'add',(_0x1f41f5,_0x3ac0ea)=>{_0x49e517(_0x3ac0ea);}),this['listenTo'](_0x1af1e1,'remove',(_0x3fdc30,_0x255c43,_0x2a38ac)=>{this['_annotationToNarrowView']['get'](_0x255c43)['destroy'](),this['_annotationToNarrowView']['delete'](_0x255c43),_0x543be6['rearrange']({'removedAnnotation':_0x255c43,'previousAnnotation':_0x1af1e1['get'](_0x2a38ac-0x1),'nextAnnotation':_0x1af1e1['get'](_0x2a38ac+0x1)}),_0x255c43===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1af1e1,'focus',(_0x36cbff,_0x2ba105)=>{this['setActiveAnnotation'](_0x2ba105);}),this['listenTo'](_0x1af1e1,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x101379,_0x34288a)=>{_0x34288a['keyCode']===_0x25afdb['esc']&&_0x45898d['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x45898d['content']['first']),this['_hideBalloon'](),_0x34288a['stopPropagation'](),_0x34288a['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x29531f,_0x3c66cc)=>{const _0x4a67cf=_0x3c66cc['target'];_0x45898d['isVisible']&&_0x45898d['element']['contains'](_0x4a67cf)||_0x543be6['view']['element']['contains'](_0x4a67cf)||_0x29531f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1e0517=>_0x1e0517['contains'](_0x4a67cf))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x59f9ff=this['context']instanceof _0x3d509f?this['context']['editors']:new _0x27e15c([this['context']]);for(const _0x1ff176 of _0x59f9ff)this['_integrateWithEditorAnnotations'](_0x1ff176);this['listenTo'](_0x59f9ff,'add',(_0x5a1bd5,_0x32f876)=>{this['listenTo'](_0x32f876,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x32f876);});}),this['listenTo'](_0x59f9ff,'remove',(_0x1c4173,_0x142e78)=>{_0x142e78['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x142e78['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x135a25){if(_0x135a25===this['activeAnnotation'])return;const _0x17564a=this['context']['plugins']['get'](z);if(_0x17564a['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x135a25,'disableAnimationOnActivatedAnnotation':!0x0}),_0x135a25)_0x17564a['getSidebarItemView'](_0x135a25)?this['_showBalloon'](_0x135a25):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x135a25;}['detach'](){if(!this['isAttached'])throw new _0xd92937('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x35199d=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x25e102=>_0x25e102['destroy']()),this['_annotationToNarrowView']['clear'](),_0x35199d['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3d509f&&this['stopListening'](this['context']['editors']);for(const _0x2435cd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2435cd);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'](_0x3a8926){if(!_0x3a8926['plugins']['has']('EditorAnnotations'))return;const _0x4bfc72=_0x3a8926['plugins']['get']('EditorAnnotations'),_0x2c4fbe=this['context']['plugins']['get'](z),_0x51a378=this['annotations'],_0x1390c3=this['balloonPanelView'],_0x17698f=()=>{const _0x2cc102=_0x4bfc72['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2cc102),this['setActiveAnnotation'](_0x2cc102[0x0]||null);};this['listenTo'](_0x4bfc72,'refresh',_0x17698f),this['listenTo'](_0x4bfc72,'blur',(_0x56fea8,{isAnnotationTracked:_0x333eae})=>{this['activeAnnotation']&&_0x333eae(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4bfc72,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x51a378,'blur',_0x14e651=>{_0x4bfc72['hasDomSelection']()&&_0x14e651['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1e6c01,_0x5b27ad)=>{const _0x1af701=_0x5b27ad['target'];_0x1390c3['isVisible']&&_0x1390c3['element']['contains'](_0x1af701)||_0x2c4fbe['view']['element']['contains'](_0x1af701)||this['activeAnnotation']&&_0x4bfc72['hasDomSelection']()&&(_0x17698f(),_0x1e6c01['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4bfc72);}['_destroyEditorAnnotationsIntegration'](_0x138771){_0x138771&&(this['stopListening'](_0x138771),this['_editorAnnotations']['remove'](_0x138771));}['_setSelectedAnnotations'](_0x2dd7a3){for(const _0x2d6ded of this['_selectedAnnotations'])_0x2dd7a3['includes'](_0x2d6ded)||this['_manuallyClosedAnnotationViews']['delete'](_0x2d6ded['view']);this['_selectedAnnotations']=_0x2dd7a3;}['_refreshPositioning'](){const _0x712e05=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x712e05['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x10004c){if(this['_manuallyClosedAnnotationViews']['has'](_0x10004c['view']))return;const _0x550a41=this['balloonPanelView']['content']['first'];_0x550a41!==_0x10004c['view']?(_0x550a41&&this['_detachListeners'](_0x550a41),this['_attachListeners'](_0x10004c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x10004c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x43b5c7=this['balloonPanelView']['content']['first'],_0x3051a0=_0x43b5c7&&this['annotations']['getByView'](_0x43b5c7);if(!_0x3051a0||!this['_annotationToNarrowView']['has'](_0x3051a0))return;const _0x548330=this['_annotationToNarrowView']['get'](_0x3051a0)['element'],_0x587f63=(function(){const _0x31745c=_0x20d659['defaultPositions'];return[_0x31745c['southArrowNorthEast'],_0x31745c['northArrowSouthEast'],_0x31745c['southArrowNorth'],_0x31745c['northArrowSouth'],_0x31745c['southArrowNorthWest'],_0x31745c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x548330,'positions':_0x587f63});}['_hideBalloon'](){const _0x5902c7=this['balloonPanelView'],_0x56f5b4=_0x5902c7['content']['first'];_0x56f5b4&&(this['_detachListeners'](_0x56f5b4),_0x5902c7['unpin'](),_0x5902c7['content']['clear']());}['_attachListeners'](_0x57d338){this['listenTo'](_0x57d338,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x57d338,'Esc',(_0x60980d,_0x50de95)=>{this['_manuallyClosedAnnotationViews']['add'](_0x57d338),this['_hideBalloon'](),_0x50de95();});}['_detachListeners'](_0x138ca1){this['stopListening'](_0x138ca1);}}class c extends _0x46aee5{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x2944a3,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3372d4){super(_0x3372d4),_0x3372d4['editing']['view']['addObserver'](_0x5c406a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x3372d4['plugins']['get'](_0x2944a3),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x5c8774=this['editor']['plugins']['get'](M);_0x5c8774['context']===this['editor']&&(_0x5c8774['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3a04e8,_0x52dbbf)=>{const _0x316a7c=this['_balloon'];if(this['isAttached']&&_0x316a7c['visibleView']){const _0x256e9e=this['annotations']['getByView'](_0x316a7c['visibleView']);_0x256e9e&&this['_closeAnnotation'](_0x256e9e),_0x52dbbf();}}));}['afterInit'](){const _0x4b7569=this['editor']['plugins']['get'](M);_0x4b7569['context']===this['editor']&&(_0x4b7569['hasActive']()||_0x4b7569['switchTo']('inline'));}['setActiveAnnotation'](_0x1ff6d0){_0x1ff6d0!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1ff6d0&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1ff6d0)&&this['_addAnnotationToBalloon'](_0x1ff6d0,!0x0),_0x1ff6d0['isActive']=!0x0),_0x1ff6d0||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1ff6d0);}['attach'](_0x462397){this['annotations']=_0x462397;const _0x566257=this['editor']['plugins']['get'](M),_0x7c7d1d=this['_balloon'];if(this['isAttached'])throw new _0xd92937('inlineannotations-attach-already-attached',this);if(_0x566257['context']!==this['editor'])throw new _0xd92937('inlineannotations-not-allowed-with-context',this);const _0x314b97=this['editor']['plugins']['get'](P);this['listenTo'](_0x314b97,'refresh',()=>{const _0x535aed=_0x314b97['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x19ad16,_0x24d5d0;!this['_forceRefresh']&&(_0x19ad16=_0x535aed,_0x24d5d0=this['_selectedAnnotations'],_0x19ad16['length']===_0x24d5d0['length']&&_0x19ad16['every'](_0x4210cd=>_0x24d5d0['includes'](_0x4210cd)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x535aed),this['setActiveAnnotation'](_0x535aed[0x0]||null));}),this['listenTo'](_0x314b97,'blur',(_0x5dcf64,{isAnnotationTracked:_0xee17bf})=>{this['activeAnnotation']&&_0xee17bf(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x41ae75,_0x2eaae5,_0x29d714)=>{_0x29d714||this['setActiveAnnotation'](null);}),this['listenTo'](_0x462397,'remove',(_0x27a176,_0x463970)=>{this['_removeAnnotationFromBalloon'](_0x463970),_0x463970===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x7c7d1d,'change:visibleView',(_0x59b1ea,_0x3fd5c7,_0x3aa1c6,_0x2fda00)=>{_0x2fda00&&this['stopListening'](_0x2fda00);const _0xbc7ff3=_0x462397['getByView'](_0x3aa1c6);_0x3aa1c6&&_0xbc7ff3&&(this['listenTo'](_0x3aa1c6,'change:height',()=>{_0x7c7d1d['updatePosition']();}),this['listenTo'](_0x3aa1c6,'Esc',()=>{this['_closeAnnotation'](_0xbc7ff3),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xbc7ff3&&this['setActiveAnnotation'](_0xbc7ff3));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x7c7d1d['visibleView']&&(_0x462397['getByView'](_0x7c7d1d['visibleView'])&&_0x7c7d1d['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 _0xd92937('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3763f8 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3763f8);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2eba33){for(const _0x595a8e of this['_selectedAnnotations'])_0x2eba33['includes'](_0x595a8e)||this['_manuallyClosed']['delete'](_0x595a8e);for(const _0x22ff22 of this['annotations'])_0x2eba33['includes'](_0x22ff22)||this['_removeAnnotationFromBalloon'](_0x22ff22);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x156d9e of _0x2eba33)this['_addAnnotationToBalloon'](_0x156d9e);}this['_selectedAnnotations']=_0x2eba33;}['_addAnnotationToBalloon'](_0x1175b3,_0x564bf3=!0x1){this['_manuallyClosed']['has'](_0x1175b3)||(this['_addedAnnotations']['has'](_0x1175b3)||this['_balloon']['hasView'](_0x1175b3['view'])||(this['_addedAnnotations']['add'](_0x1175b3),this['_balloon']['add']({'stackId':_0x1175b3['view']['id'],'view':_0x1175b3['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1175b3)}})),_0x564bf3&&this['_balloon']['showStack'](_0x1175b3['view']['id']));}['_getBalloonTargetForAnnotation'](_0x3c6c26){const _0x21a0eb=_0x3c6c26['target'],_0x488a05=this['editor']['editing']['view'],_0x5b40f4=_0x488a05['document']['selection']['getFirstRange'](),_0x5de5b7=_0x488a05['domConverter']['viewRangeToDom'](_0x5b40f4);if(_0x5de5b7['collapse'](!0x0),_0x21a0eb){if(_0x21a0eb instanceof _0x32a86d)return _0x21a0eb;let _0x433b62=[];for(const _0x5d16e9 of _0x21a0eb)_0x433b62['push'](...B(_0x5d16e9['getClientRects']()));_0x433b62=function(_0x5ebdc0){const _0x3b01b6=[];let _0x36c64b=_0x5ebdc0[0x0];for(let _0x5b830e=0x1;_0x5b830e<_0x5ebdc0['length'];_0x5b830e++)F(_0x36c64b,_0x5ebdc0[_0x5b830e])?_0x36c64b['width']+=_0x5ebdc0[_0x5b830e]['width']:(_0x3b01b6['push'](_0x36c64b),_0x36c64b=_0x5ebdc0[_0x5b830e]);return _0x3b01b6['push'](_0x36c64b),_0x3b01b6;}(_0x433b62);const _0x2d888d=_0x5de5b7['getBoundingClientRect']();return _0x433b62['find'](_0x55045e=>_0x55045e['top']<=_0x2d888d['top']&&_0x55045e['bottom']>=_0x2d888d['bottom']&&_0x55045e['left']<=_0x2d888d['left']&&_0x55045e['right']>=_0x2d888d['right'])||_0x433b62[0x0];}return _0x3c6c26['targetRect']||_0x5de5b7;}['_removeAnnotationFromBalloon'](_0x107c5d){this['_addedAnnotations']['has'](_0x107c5d)&&this['_balloon']['hasView'](_0x107c5d['view'])&&(this['_addedAnnotations']['delete'](_0x107c5d),this['_balloon']['remove'](_0x107c5d['view']));}['_closeAnnotation'](_0x18ee71){this['_manuallyClosed']['add'](_0x18ee71),this['_removeAnnotationFromBalloon'](_0x18ee71);}}function B(_0x48a813){return Array['from'](_0x48a813)['map'](DOMRect['fromRect']);}function F(_0x2826b8,_0x2f46b0){return _0x2826b8['top']===_0x2f46b0['top']&&_0x2826b8['bottom']===_0x2f46b0['bottom']&&_0x2826b8['right']===_0x2f46b0['left'];}class it extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0xfe6c5d,_0x125ec8){super(_0xfe6c5d),this['set']('isEmpty',!_0x125ec8['length']),this['focusTracker']=new _0x20e391(),this['_annotationViews']=_0x125ec8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xa806cd({'focusables':_0x125ec8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x125ec8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x125ec8,'remove',(_0x672ee,_0x4eedc2)=>{_0x4eedc2['isActive']&&this['focus'](),_0x125ec8['length']||(this['isEmpty']=!0x0);});const _0x2f1755=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0xfe6c5d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x125ec8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2f1755['if']('isEmpty','ck-hidden',_0x2c50f7=>!_0x2c50f7)]},'children':[{'text':E(_0xfe6c5d,'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 _0x58f87d of this['_annotationViews'])this['focusTracker']['add'](_0x58f87d['element']);this['_annotationViews']['on']('change',(_0x4f08e3,{added:_0x13b6d7,removed:_0x38a7ba})=>{for(const _0x2f3144 of _0x13b6d7)this['focusTracker']['add'](_0x2f3144['element']);for(const _0x2e8172 of _0x38a7ba)this['focusTracker']['remove'](_0x2e8172['element']);});}}class f extends _0x36456e{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x2e598f){super(_0x2e598f),this['archivedThreads']=new _0x27e15c();}['init'](){const _0x4bdc47=this['context'],_0x46761a=_0x4bdc47['plugins']['get'](o),_0x12fce8=_0x4bdc47['plugins']['get'](O);this['listenTo'](_0x46761a,'addCommentThread',(_0xaca371,{threadId:_0x9e06b2})=>{const _0x13c5ae=_0x46761a['getCommentThread'](_0x9e06b2);_0x13c5ae['archivedAt']&&this['archivedThreads']['add'](_0x13c5ae,this['_calculatePosition'](_0x13c5ae['archivedAt'])),this['listenTo'](_0x13c5ae,'change:archivedAt',(_0x1c0975,_0x5a40c8,_0x1e6f3b)=>{_0x1e6f3b?this['archivedThreads']['has'](_0x13c5ae)||this['archivedThreads']['add'](_0x13c5ae,this['_calculatePosition'](_0x13c5ae['archivedAt'])):this['archivedThreads']['has'](_0x13c5ae)&&this['archivedThreads']['remove'](_0x13c5ae);});}),this['listenTo'](_0x46761a,'removeCommentThread',(_0x628579,{threadId:_0x46d3a0})=>{const _0x5126ab=_0x46761a['getCommentThread'](_0x46d3a0);this['stopListening'](_0x5126ab),this['archivedThreads']['has'](_0x5126ab)&&this['archivedThreads']['remove'](_0x5126ab);},{'priority':'highest'}),this['listenTo'](_0x12fce8['collection'],'focus',(_0x373b26,_0x433ca9)=>{_0x433ca9['isVisible']||(_0x433ca9['isActive']=!0x0,_0x12fce8['activate'](_0x433ca9));});}['_calculatePosition'](_0x117623){const _0x158597=[...this['archivedThreads']]['findIndex'](_0x382bff=>_0x382bff['archivedAt']<_0x117623);return _0x158597>-0x1?_0x158597:this['archivedThreads']['length'];}}class a extends _0x46aee5{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x2d1df0];}constructor(_0x5e75ae){super(_0x5e75ae),this['annotationViews']=new _0x3c4ee6(),this['_pendingThreads']=[];}['init'](){const _0x27368f=this['editor'],_0xa682f9=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x27368f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3ac222,!0x0)),_0x27368f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4f212f=this['_createCommentsArchiveButton'](_0x554070);return _0x4f212f['set']({'role':'menuitemcheckbox'}),_0x4f212f;});const _0x5941d6=_0x27368f['plugins']['get'](f),_0x10c14a=_0x27368f['plugins']['get']('Annotations'),_0x51b0fe=_0x27368f['plugins']['get']('CommentsRepository');_0x5941d6['archivedThreads']['forEach'](_0x363166=>{this['_handleNewThread'](_0x363166);}),this['listenTo'](_0x5941d6['archivedThreads'],'add',(_0xfbe887,_0x2a6b25)=>{this['_handleNewThread'](_0x2a6b25);}),this['listenTo'](_0x10c14a['collection'],'add',(_0x16e70e,_0x4df607)=>{const _0x1a5590=this['_pendingThreads']['find'](_0x2ae11a=>{const _0x455d3d=_0x51b0fe['_threadToController']['get'](_0x2ae11a);return _0x455d3d&&_0x4df607['innerView']===_0x455d3d['view'];});if(_0x1a5590){const _0xf01739=this['_calculatePosition'](_0x1a5590['archivedAt']);this['annotationViews']['add'](_0x4df607['view'],_0xf01739),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1a5590),0x1);}}),this['listenTo'](_0x5941d6['archivedThreads'],'remove',(_0x2cd13a,_0x2d843c)=>{const _0x2528c7=_0x27368f['config']['get']('collaboration.channelId');if(!_0x2528c7||_0x2d843c['channelId']===_0x2528c7){if(this['_pendingThreads']['includes'](_0x2d843c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2d843c),0x1);else{const _0x5ea01e=_0x51b0fe['_threadToController']['get'](_0x2d843c),_0x26671e=_0x10c14a['getByInnerView'](_0x5ea01e['view']);this['annotationViews']['remove'](_0x26671e['view']),this['stopListening'](_0x26671e['focusableElements']);}}}),this['listenTo'](_0x10c14a['collection'],'add',(_0x54fc1a,_0x55f286)=>{this['listenTo'](_0x55f286,'escape',_0xa682f9);}),this['listenTo'](_0x10c14a['collection'],'remove',(_0x3f4658,_0x43d3fe)=>{this['stopListening'](_0x43d3fe,'escape',_0xa682f9);});}['_handleNewThread'](_0x2a422a){const _0x232144=this['editor']['plugins']['get']('CommentsRepository'),_0x312568=this['editor']['plugins']['get']('Annotations'),_0x38169d=this['editor']['config']['get']('collaboration.channelId');if(!_0x38169d||_0x2a422a['channelId']===_0x38169d){const _0x2bede2=_0x232144['_threadToController']['get'](_0x2a422a);if(!_0x2bede2)return void this['_pendingThreads']['push'](_0x2a422a);const _0x594475=this['_calculatePosition'](_0x2a422a['archivedAt']),_0x420a5a=_0x312568['getByInnerView'](_0x2bede2['view']);_0x420a5a['isVisible']&&_0x312568['_visibleAnnotations']['remove'](_0x420a5a),this['annotationViews']['add'](_0x420a5a['view'],_0x594475);}}['_calculatePosition'](_0x50abd2){const _0x2f232a=this['editor']['config']['get']('collaboration.channelId'),_0x4eb852=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x2f30f0=>_0x2f30f0['channelId']===_0x2f232a)['findIndex'](_0x28bcb9=>_0x28bcb9['archivedAt']<_0x50abd2);return _0x4eb852<0x0||_0x4eb852>this['annotationViews']['length']?this['annotationViews']['length']:_0x4eb852-0x1;}['_toggleDialog'](){const _0x5ec804=this['editor'],_0x59ea82=_0x5ec804['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new it(_0x5ec804['locale'],this['annotationViews'])),'commentsArchive'===_0x59ea82['id']?_0x59ea82['hide']():_0x59ea82['show']({'id':'commentsArchive','title':E(_0x5ec804['locale'],'COMMENTS_ARCHIVE'),'icon':_0x23c1b7,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':tt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x23b8a5,_0x204564=!0x1){const _0x17d0fc=this['editor']['locale'],_0x44c57e=this['editor']['plugins']['get']('Dialog'),_0x42c0c8=new _0x23b8a5(_0x17d0fc);return _0x42c0c8['bind']('isEnabled')['to'](this,'isEnabled'),_0x42c0c8['bind']('isOn')['to'](_0x44c57e,'id',_0x3854f4=>'commentsArchive'===_0x3854f4),_0x42c0c8['set']({'label':E(_0x17d0fc,'COMMENTS_ARCHIVE'),'icon':_0x23c1b7,'isToggleable':!0x0}),_0x204564&&(_0x42c0c8['tooltip']=!0x0),this['listenTo'](_0x42c0c8,'execute',()=>this['_toggleDialog']()),_0x42c0c8;}['_hideDialogOnAnnotationEscape']=_0x964de8=>{const _0x184b6e=_0x964de8['source'];if(!this['annotationViews']['has'](_0x184b6e['view']))return;const _0x3e7b83=this['editor']['plugins']['get']('Dialog');_0x3e7b83['isOpen']&&'commentsArchive'===_0x3e7b83['id']&&(_0x3e7b83['hide'](),_0x964de8['stop']());};}class p extends _0x46aee5{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,is as BaseCommentThreadView,rs as BaseCommentView,fi as Comment,ui as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|