@ckeditor/ckeditor5-comments 46.0.1-alpha.13 → 46.0.1-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x1961e5,ContextPlugin as _0x388a6f,PendingActions as pt,Command as _0x406027,Plugin as _0x35651a,Context as _0x3a3651}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3538ec,uid as _0x3b880e,KeystrokeHandler as jt,FocusTracker as _0x43d57e,diff as _0x152196,Collection as _0x504ada,Rect as _0x3dcdfa,CKEditorError as _0x274fd1,first as _0x3292fb,priorities as Wt,scrollViewportToShowTarget as ot,getEnvKeystrokeText as nt,toUnit as Dt,DomEmitterMixin as _0x3fda0f,keyCodes as _0x50541b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3e6b0c,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x2c520f,trimHtml as _0x180eda,LateFocusDropdownButtonView as _0xbda48,Users as st,getDateTimeFormatter as It,hashObject as wt,getAllMarkersDomElementsSorted as it,surroundingMarkersDetector as et,FOCUS_ANNOTATION_KEYSTROKE as _0x3be90e}from'ckeditor5-collaboration/dist/index.js';import{throttle as _0x378124,isEqual as yt,cloneDeep as At,set as Ct,unset as vt,debounce as _0x12b399}from'es-toolkit/compat';import{IconUndo as _0x476701,IconCheck as _0x2a6e37,IconPencil as _0x4dc30,IconRemoveComment as _0x1ad19b,IconThreeVerticalDots as _0x384224,IconAddComment as _0x14f2f4,IconCommentsArchive as _0x37f55e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x5a7382,ButtonView as _0x13fccc,ViewCollection as _0x31ebb9,createDropdown as _0x1a0755,ListView as _0x3737d5,focusChildOnDropdownOpen as _0x2e355f,ListItemView as _0x53e8ec,MenuBarMenuListItemButtonView as _0x339fd3,BodyCollection as _0x308b40,BalloonPanelView as _0x1d2c37,ContextualBalloon as _0x2e5f1d,Dialog as _0x3c85b0,DialogViewPosition as _0x4c44fd}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0xbea9b9}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x258aa7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x976562}from'@ckeditor/ckeditor5-widget/dist/index.js';class gt extends/* #__PURE__ -- @preserve */
24
- _0x3538ec(){['model'];['view'];constructor(_0x4e0548,_0x320a7d){super(),this['model']=_0x4e0548,this['model']['_isAttached']=!0x0,this['view']=_0x320a7d,this['listenTo'](_0x320a7d,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x320a7d,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x320a7d,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x320a7d,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x320a7d,'addComment',(_0x3f05d1,_0x366b55)=>this['addComment'](_0x366b55)),this['listenTo'](_0x320a7d,'updateComment',(_0x54ddf0,_0x2a3f86,_0x9bd238)=>this['updateComment'](_0x2a3f86,_0x9bd238)),this['listenTo'](_0x320a7d,'removeComment',(_0x3ce61b,_0x5dafe9)=>this['removeComment'](_0x5dafe9));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x2246c8){this['model']['addComment']({'content':_0x2246c8,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3cf2fb,_0x2d1687){this['model']['getComment'](_0x3cf2fb)['update']({'content':_0x2d1687});}['removeComment'](_0x324877){this['model']['getComment'](_0x324877)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x1a9765,_0x3a6d19,_0x313af5){const t=_0x1a9765['t'];switch(_0x3a6d19){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'},_0x313af5);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'},_0x313af5);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'},_0x313af5);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'},_0x313af5);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x313af5);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'},_0x313af5);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'},_0x313af5);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'},_0x313af5);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(_0xb317a4,_0x41b49a){super(_0xb317a4);const _0x1f0902=_0x3b880e();this['main']=this['createCollection'](),this['editable']=new $t(_0xb317a4,_0x41b49a,void 0x0,{'label':()=>N(_0xb317a4,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xb317a4['uiLanguageDirection'],'lang':_0xb317a4['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x1f0902},'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(_0x406fd7){super(_0x406fd7),this['view']=new Vt(_0x406fd7['locale'],_0x406fd7['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1b2d1a=this['editor']['editing']['view'],_0x3473d6=this['view']['editable'],_0xb4ba04=_0x1b2d1a['document']['getRoot']();_0x3473d6['name']=_0xb4ba04['rootName'],this['view']['render']();const _0x56cafc=_0x3473d6['element'];this['setEditableElement'](_0x3473d6['name'],_0x56cafc),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1b2d1a['attachDomRoot'](_0x56cafc),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
25
- _0x3538ec(_0x1961e5){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x1c6cfc={}){function _0x59de9d(_0x5b11a6){return _0x5b11a6['map'](_0x3ccaae=>String['fromCharCode'](_0x3ccaae))['join']('');}(_0x1c6cfc=Object['assign']({},_0x1c6cfc))['plugins']||(_0x1c6cfc['plugins']=Rt['defaultPlugins']),super(_0x1c6cfc),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[_0x59de9d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59de9d([0x76,0x69,0x65,0x77])][_0x59de9d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x59de9d([0x61,0x75,0x74,0x6f]),this[_0x59de9d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x59de9d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x59de9d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x59de9d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x59de9d([0x6f,0x6b])});}['create'](){const _0x584393=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x584393))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x372514=>{const _0x1d6259=this['model']['document']['getRoot'](),_0xc991b7=_0x1d6259&&_0x1d6259['getChild'](_0x1d6259['childCount']-0x1);_0x372514['setSelection'](_0xc991b7,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1a33f6=this['editing']['view'],_0x588e0e=_0x1a33f6['document']['getRoot'](),_0x291873=_0x588e0e['getChild'](0x0);_0x588e0e['childCount']>0x1||!_0x291873||'p'!=_0x291873['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x1a33f6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x291873['placeholder']=this['placeholder']),Ft({'view':_0x1a33f6,'element':_0x291873,'keepOnFocus':!0x0}),this['placeholderElement']=_0x291873);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x56eea7,_0x1f7b97={}){super(_0x56eea7),this['editor']=null,this['_editorConfig']=_0x1f7b97,this['set']('value',_0x1f7b97['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x56eea7,'Reply...')),this['set']('submitLabel',N(_0x56eea7,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x43d57e(),this['focusCycler']=new _0x5a7382({'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',(_0x4106dc,_0x3a4424)=>{this['cancelButtonView']['fire']('execute'),_0x3a4424();}),this['keystrokes']['set']('Ctrl+Enter',(_0x51af32,_0x3d946c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3d946c());}),this['on']('submit',(_0x3863eb,_0x5f034e)=>{_0x5f034e['length']>0xfde8?(alert(N(_0x56eea7,'TOO_LONG_COMMENT_ALERT',[_0x5f034e['length'],0xfde8])),_0x3863eb['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 _0xf039e7=this['editor'];this['element']['insertBefore'](_0xf039e7['ui']['element'],this['element']['firstChild']),_0xf039e7['model']['document']['on']('change',()=>this['value']=_0xf039e7['getData']()),_0xf039e7['bind']('placeholder')['to'](this),this['focusables']['add'](_0xf039e7['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3cb71b){-0x1===_0x3cb71b?(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:_0x2c53cb}=this,_0x2248fd=new _0x13fccc(_0x2c53cb);return _0x2248fd['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2248fd['withText']=!0x0,_0x2248fd['bind']('label')['to'](this,'submitLabel'),_0x2248fd['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2248fd['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5ae149,_0x187a8a)=>!_0x187a8a&&!!_0x5ae149['trim']()),_0x2248fd;}['_createCancelButton'](){const {locale:_0x53b520}=this,_0x1ee4d9=new _0x13fccc(_0x53b520);return _0x1ee4d9['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1ee4d9['label']=N(_0x53b520,'Cancel'),_0x1ee4d9['withText']=!0x0,_0x1ee4d9['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1ee4d9;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3735ee=>{this['focusTracker']['add'](_0x3735ee['element']);}),this['focusables']['on']('change',(_0x381599,_0x564afe)=>{for(const _0x545d9b of Array['from'](_0x564afe['added'])['reverse']())this['focusTracker']['add'](_0x545d9b['element']);});}}class ie extends kt{constructor(_0x31d2cd,_0xda2624,_0x3dfe55){super(_0x31d2cd),this['commentInputView']=new os(_0x31d2cd,_0x3dfe55),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5015d3,_0xd7935e)=>_0x5015d3||!!_0xd7935e),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 _0x3e6b0c(_0x31d2cd,_0xda2624),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'](_0x10992a){this['commentInputView']['focus'](_0x10992a);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5e394e,_0x40fb36)=>{const {submitButtonView:_0x2d6b98,cancelButtonView:_0x17ae5f,editor:_0x2f9157}=this['commentInputView'];[_0x2d6b98['element'],_0x17ae5f['element'],_0x2f9157?_0x2f9157['editing']['view']['getDomRoot']():null]['filter'](_0x1ed4a0=>_0x1ed4a0)['some'](_0x423f15=>_0x423f15['contains'](_0x40fb36['target']))||(this['focus'](),_0x40fb36['preventDefault']());});}}class rs extends kt{constructor(_0x171632){super(_0x171632);const _0xcc923f=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xcc923f['to']('count',_0x211d0c=>N(_0x171632,'NUMBER_OF_COMMENTS',_0x211d0c))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x37da3f,_0xb5fe56,_0x3ecc17){super(_0x37da3f);const _0x4fb83f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xb5fe56['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xb5fe56,this['_config']=_0x3ecc17,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x21bd3b=>this['commentViews']['map'](_0x3544d6=>_0x3544d6['element'])['includes'](_0x21bd3b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x37da3f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3d2419=>_0x3d2419-this['_config']['maxCommentsWhenCollapsed']);for(const _0x49f632 of _0xb5fe56['comments'])this['_handleNewCommentModel'](_0x49f632);this['_handleInfoComment'](),this['listenTo'](_0xb5fe56['comments'],'add',(_0x1d4a2d,_0x52f9bd)=>{const _0x4dab03=this['_calculatePosition'](_0x52f9bd);this['length']++,this['_handleNewCommentModel'](_0x52f9bd,_0x4dab03),this['refreshVisibleViews']();}),this['listenTo'](_0xb5fe56['comments'],'remove',(_0x40b752,_0xa336b6)=>{this['length']--,this['_handleRemoveCommentModel'](_0xa336b6),this['refreshVisibleViews']();}),this['listenTo'](_0xb5fe56,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xb5fe56,'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',_0x4fb83f['if']('length','ck-hidden',_0x3fb2ba=>!_0x3fb2ba)],'aria-label':N(_0x37da3f,'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'](_0x3e0a45){-0x1===_0x3e0a45?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x67c59 of this['commentViews'])_0x67c59['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1bdc58,_0x5e4c3c){const _0x237581=new this['_config']['CommentView'](this['locale'],_0x1bdc58,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x237581['viewUid']=_0x1bdc58['id'],_0x237581['delegate']('removeComment')['to'](this),_0x237581['delegate']('updateComment')['to'](this),_0x237581['delegate']('resolveCommentThread')['to'](this),_0x237581['delegate']('editorReady')['to'](this),_0x237581['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x237581,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x237581,_0x5e4c3c);}['_calculatePosition'](_0x3dd37){const _0x171078=this['_model']['_findOptimalIndex'](_0x3dd37);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3dd37['authoredAt']?_0x171078-0x1:_0x171078:_0x171078-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3b3161={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3b3161,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3b3161));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x295990){const _0x45d3bd=this['commentViews']['remove'](_0x295990['id']);this['stopListening'](_0x45d3bd),_0x45d3bd['isEditMode']&&this['_updateHasDirtyComment'](),_0x45d3bd['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x20b578=>_0x20b578['isEditMode']);}['_rearrangeCollapse'](){const _0x2a098d=function(_0x469b9a){const _0x14beee=new _0x504ada();for(const _0xa482e2 of _0x469b9a)_0x14beee['add'](_0xa482e2);return _0x14beee;}(this['commentViews']),_0x25f789=this['_collapsedCommentsView']['count'];for(let _0x4ed2b2=0x1;_0x4ed2b2<=_0x25f789;_0x4ed2b2++)_0x2a098d['remove'](0x1);for(const _0x290bd1 of _0x2a098d)_0x290bd1['collapse']();_0x25f789>0x0&&_0x2a098d['add'](this['_collapsedCommentsView'],0x1),ns(_0x152196(Array['from'](this['visibleViews']),Array['from'](_0x2a098d)),this['visibleViews'],_0x2a098d);}['_rearrangeExpand'](){ns(_0x152196(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x18fdfd of this['visibleViews'])_0x18fdfd['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1f7e28=>{this['focusTracker']['add'](_0x1f7e28['element']),this['keystrokes']['listenTo'](_0x1f7e28['element']);}),this['commentViews']['on']('change',(_0x1fcadc,_0x2549b0)=>{for(const _0x38fae6 of _0x2549b0['removed'])this['focusTracker']['remove'](_0x38fae6['element']),this['keystrokes']['stopListening'](_0x38fae6['element']);for(const _0x336e24 of Array['from'](_0x2549b0['added'])['reverse']())this['focusTracker']['add'](_0x336e24['element']),this['keystrokes']['listenTo'](_0x336e24['element']);});}}function ns(_0x28760c,_0x52acda,_0x31ed3e){let _0x9028d5=0x0;for(const _0x171d19 of _0x28760c)switch(_0x171d19){case'insert':_0x52acda['add'](_0x31ed3e['get'](_0x9028d5),_0x9028d5),_0x9028d5++;break;case'delete':_0x52acda['remove'](_0x9028d5);break;case'equal':_0x9028d5++;}}class oe extends kt{constructor(_0x77339e){super(_0x77339e);const _0x83d5e2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x83d5e2['to']('contextValue',_0x12a9a5=>N(_0x77339e,'THREAD_CONTEXT_LABEL',_0x12a9a5)),'tabindex':-0x1},'children':[{'text':_0x83d5e2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x974bd5,_0x435022){super(_0x974bd5);const _0x2ce67d=this['bindTemplate'];this['_model']=_0x435022,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1b6811=>!!_0x1b6811),this['bind']('contextValue')['to'](this['_model'],'context',_0x166e21=>_0x166e21&&_0x166e21['value']?this['_trimContextValue'](_0x166e21['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x2ce67d['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 _0x149713=new _0x13fccc(this['locale']);return _0x149713['label']=N(this['locale'],'Reopen'),_0x149713['tooltip']=N(this['locale'],'Reopen'),_0x149713['icon']=_0x476701,_0x149713['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2206ac=>!_0x2206ac),_0x149713['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x317512,_0x305aad)=>_0x317512&&_0x305aad),_0x149713['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x149713;}['_trimContextValue'](_0x272266){if(_0x272266['length']<0x96)return _0x272266;const _0x40710a=_0x272266['lastIndexOf']('\x20',0x93);return _0x272266['substring'](0x0,_0x40710a>-0x1?_0x40710a:0x93)+'...';}['_attachContextActions'](){const _0x391708=this['element']['querySelector']('.ck-context'),_0x1d371a=_0x391708['querySelector']('.ck-context__value');this['listenTo'](_0x391708,'mouseenter',()=>{_0x1d371a['offsetWidth']<_0x1d371a['scrollWidth']&&_0x391708['classList']['add']('overlay');}),this['listenTo'](_0x391708,'mouseleave',()=>{_0x391708['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x26939a of this['focusables'])this['focusTracker']['add'](_0x26939a['element']),this['keystrokes']['listenTo'](_0x26939a['element']);}['_createContextView'](){const _0x9c0ac3=new oe(this['locale']);return _0x9c0ac3['bind']('contextValue')['to'](this),_0x9c0ac3;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2f2ca6,_0x54cbaf,_0x5b3711,_0x1dc481){super(_0x2f2ca6),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x54cbaf,this['_localUser']=_0x5b3711,this['_config']=_0x1dc481,this['commentThreadHeaderView']=new Yt(_0x2f2ca6,_0x54cbaf),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x2f2ca6,N(_0x2f2ca6,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2f2ca6,_0x54cbaf,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1dc481)),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',(_0x237886,_0x31a02b)=>_0x237886||!!_0x31a02b),this['bind']('isUnlinked')['to'](_0x54cbaf,'unlinkedAt',_0x5ccbd4=>!!_0x5ccbd4),this['bind']('ariaLabel')['to'](this,'length',_0x167772=>{const _0x4db465=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x167772,_0x4db465]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5adb86=>_0x5adb86['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 _0x2e8f25=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x37867f=_0x2e8f25['commentInputView'];return _0x2e8f25['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x37867f,'value',(_0x5de711,_0x160d86,_0x4cecb7,_0x7da004,_0x3027a7)=>!!_0x3027a7||!!_0x7da004&&_0x4cecb7&&!_0x160d86||_0x5de711&&_0x4cecb7&&!_0x160d86),_0x37867f['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x335974,_0x724c9e,_0x441e45)=>{let _0x289fb7;return _0x289fb7=_0x441e45&&_0x724c9e?'Reply\x20to\x20reopen\x20discussion...':_0x335974?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x289fb7);}),_0x37867f['bind']('submitLabel')['to'](this,'length',_0x449184=>N(this['locale'],_0x449184?'Reply':'Comment')),_0x37867f['on']('submit',(_0xc01dfc,_0x559d18)=>{this['fire']('addComment',_0x559d18),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x37867f['on']('cancel',()=>{this['focus']();}),_0x37867f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x37867f['on']('cancel',_0x5c37be=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5c37be['stop']());}),this['on']('change:isActive',(_0x3df9a2,_0xf28ea0,_0x2608be)=>{_0x2608be||this['length']||_0x37867f['value']||this['fire']('removeCommentThread');}),_0x2e8f25;}}class Tt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xd63abc,_0x26053f,_0x5caca0,_0x396502){super(_0xd63abc,_0x26053f,_0x5caca0,_0x396502),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xd63abc,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x298bcb,_0xf5c4c,_0x295389)=>{_0x295389||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x495ad9,_0x3be33e,_0x1b1d95)=>{_0x1b1d95&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x2f161d=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2f161d['if']('isActive','ck-thread--active'),_0x2f161d['if']('isUnlinked','ck-thread--unlinked'),_0x2f161d['if']('isConfirm','ck-thread--remove-confirmation'),_0x2f161d['to']('actionIndicator',_0x343d9b=>_0x343d9b?'ck-thread--'+_0x343d9b:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2f161d['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 _0xc2da7c of this['commentsListView']['commentViews'])_0xc2da7c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5ceefe}=this,_0x216c24=this['commentsListView']['commentViews']['get'](0x0);_0x216c24===this['_boundFirstCommentView']||_0x216c24['isSystemComment']||(this['_boundFirstCommentView']=_0x216c24,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x216c24,'actionIndicator',_0x94e8d1=>'remove'===_0x94e8d1?'remove':null),_0x216c24['placeholder']=N(_0x5ceefe,'Write\x20a\x20comment...'),_0x216c24['removeButton']['on']('execute',_0x480e05=>{_0x480e05['stop'](),this['showConfirm'](N(_0x5ceefe,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x216c24['focus']();}),_0x216c24['actionBar']['add'](this['resolveButton'],0x0),_0x216c24['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x38e8aa=new _0x2c520f(this['locale']);return _0x38e8aa['label']=N(this['locale'],'Resolve'),_0x38e8aa['tooltip']=N(this['locale'],'Resolve'),_0x38e8aa['icon']=_0x2a6e37,_0x38e8aa['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x38e8aa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x318f76=>!_0x318f76),_0x38e8aa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x524c17,_0x392787)=>_0x524c17&&!_0x392787),_0x38e8aa['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x38e8aa;}['_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 es extends kt{constructor(_0xf067e8){super(_0xf067e8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x724ee0,_0x2ee50a,_0x2f18f7)=>{this['element']['innerHTML']=_0x2f18f7;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x488f9d,_0x48162a,_0x465839){super(_0x488f9d),this['_model']=_0x48162a,this['_config']=_0x465839,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x48162a,'content',_0x48162a,'authoredAt',(_0x2ee7d5,_0x31d6b0)=>N(_0x488f9d,'COMMENT_ARIA_LABEL',[_0x48162a['author']['name'],_0x465839['formatDateTime'](_0x31d6b0),new DOMParser()['parseFromString'](_0x2ee7d5,'text/html')['body']['textContent'],_0x48162a['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x488f9d,N(_0x488f9d,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x31ebb9(),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x62d6b5=>_0x62d6b5['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x21ded5=new es(this['locale']);return _0x21ded5['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x573e8b,_0x5acc78)=>_0x5acc78?_0x180eda(_0x573e8b,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x573e8b),_0x21ded5;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5eef90=new os(this['locale'],this['_config']['editorConfig']);return _0x5eef90['value']=this['_model']['content'],_0x5eef90['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5eef90['submitLabel']=N(this['locale'],'Save'),_0x5eef90['on']('submit',(_0x532d8,_0x216d72)=>{this['fire']('updateComment',this['_model']['id'],_0x216d72),this['switchToDisplayMode'](),this['focus']();}),_0x5eef90['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5eef90['once']('editorReady',()=>{_0x5eef90['focus']();}),_0x5eef90['createEditor'](),_0x5eef90['delegate']('editorReady')['to'](this),_0x5eef90['delegate']('editorDestroyed')['to'](this),_0x5eef90;}['_setupKeyboardNavigation'](){const _0x1d105c=this['element'];this['keystrokes']['listenTo'](_0x1d105c);for(const _0x12f226 of this['focusables'])this['focusTracker']['add'](_0x12f226['element']),this['keystrokes']['listenTo'](_0x12f226['element']);this['focusables']['on']('change',(_0x6ec879,_0x5ccdf7)=>{for(const _0x78c727 of _0x5ccdf7['removed'])this['focusTracker']['remove'](_0x78c727['element']),this['keystrokes']['stopListening'](_0x78c727['element']);for(const _0x3e3d2e of _0x5ccdf7['added'])this['focusTracker']['add'](_0x3e3d2e['element']),this['keystrokes']['listenTo'](_0x3e3d2e['element']);}),this['keystrokes']['set']('enter',(_0x51a643,_0x3bb9f2)=>{_0x1d105c===_0x51a643['target']&&(this['focusCycler']['focusFirst'](),_0x3bb9f2());}),this['keystrokes']['set']('esc',(_0x97b76f,_0x3ee34e)=>{_0x1d105c!==_0x97b76f['target']&&(this['focus'](),_0x3ee34e());});}}class _t extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0x1f77b5,_0x491330,_0x528877){super(_0x1f77b5,_0x491330,_0x528877),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x1f77b5,'Reply...')),this['bind']('authoredAt')['to'](_0x491330),this['bind']('resolvedAt')['to'](_0x491330),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 _0x3e6b0c(_0x1f77b5,_0x491330['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x491330,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1d6333=this['bindTemplate'],_0x4f576c=[{'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':_0x1d6333['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1d6333['to']('authoredAt',_0x28445e=>this['_config']['formatDateTime'](_0x28445e))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1d6333['if']('isEditMode','ck-comment__actions--hidden'),_0x1d6333['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']&&_0x4f576c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x1d6333['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x1d6333['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1d6333['if']('isEditMode','ck-comment--edit'),_0x1d6333['if']('isSystemComment','ck-comment--info'),_0x1d6333['to']('actionIndicator',_0x66de32=>_0x66de32?'ck-comment--'+_0x66de32:'')],'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':_0x4f576c}]}]};}['_createEditButton'](){const _0xaef185=new _0x13fccc(this['locale']);return _0xaef185['label']=N(this['locale'],'Edit'),_0xaef185['icon']=_0x4dc30,_0xaef185['withText']=!0x0,_0xaef185['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xaef185['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x34007f=>!_0x34007f),_0xaef185['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xaef185['on']('execute',()=>this['switchToEditMode']()),_0xaef185;}['_createRemoveButton'](){const _0x15c5aa=new _0x13fccc(this['locale']);return _0x15c5aa['label']=N(this['locale'],'Remove'),_0x15c5aa['icon']=_0x1ad19b,_0x15c5aa['withText']=!0x0,_0x15c5aa['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x15c5aa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x525c28=>!_0x525c28),_0x15c5aa['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x15c5aa['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x15c5aa;}['_createDropdown'](){const _0x5a1a91=_0x1a0755(this['locale'],_0xbda48),_0x1f6fce=_0x5a1a91['panelView']['children'],_0x5e9352=new _0x3737d5(this['locale']),_0x2862e0=_0x5a1a91['bindTemplate'];_0x2e355f(_0x5a1a91,()=>this['items']['find'](_0x27ee21=>_0x27ee21['isVisible'])),_0x5a1a91['extendTemplate']({'attributes':{'class':[_0x2862e0['if']('isVisible','ck-hidden',_0x1f1246=>!_0x1f1246)]}});const _0x49b25b=(_0x23b3ba,_0x5b2720=-0x1)=>{const _0xafc193=new _0x53e8ec(this['locale']);_0xafc193['children']['add'](_0x23b3ba);const _0x44f84b=_0x5b2720>-0x1?_0x5b2720:_0x5e9352['items']['length'];_0x5e9352['items']['add'](_0xafc193,_0x44f84b);const _0x4e2276=Array['from'](this['items']);_0x5a1a91['unbind']('isEnabled','isVisible'),_0x5a1a91['bind']('isEnabled')['toMany'](_0x4e2276,'isEnabled',(..._0x28ed14)=>_0x28ed14['some'](_0x234b7a=>_0x234b7a)),_0x5a1a91['bind']('isVisible')['toMany'](_0x4e2276,'isVisible',(..._0x4451d0)=>_0x4451d0['some'](_0x769f7=>_0x769f7));};_0x5a1a91['panelPosition']='sw',_0x5a1a91['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x384224});for(const _0x5ddccc of this['items'])_0x49b25b(_0x5ddccc);return _0x1f6fce['add'](_0x5e9352),_0x5a1a91['listenTo'](this['items'],'add',(_0x1f1c47,_0x968980,_0x416ed9)=>{_0x49b25b(_0x968980,_0x416ed9);}),_0x5a1a91['listenTo'](this['items'],'remove',(_0xe451c6,_0x21d935,_0x3421c8)=>{_0x5e9352['items']['remove'](_0x3421c8);}),_0x5a1a91;}['_attachActions'](_0x29c022,_0x2b92f4){const _0x2bbfb0=_0x29c022&&_0x29c022['element'];_0x2bbfb0&&(this['listenTo'](_0x2bbfb0,'mouseenter',()=>this['actionIndicator']=_0x2b92f4),this['listenTo'](_0x2bbfb0,'focus',()=>this['actionIndicator']=_0x2b92f4),this['listenTo'](_0x2bbfb0,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2bbfb0,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x30eeed=super['_createCommentInputView']();return _0x30eeed['bind']('placeholder')['to'](this),_0x30eeed;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Et(_0x26b94d){const _0xdd31d2=_0x378124(_0x26b94d,0x1e),_0x4ab3e1=new MutationObserver(_0x4516a4=>{for(const _0x3b9102 of _0x4516a4)('attributes'==_0x3b9102['type']&&'class'==_0x3b9102['attributeName']||'childList'==_0x3b9102['type']||'characterData'==_0x3b9102['type'])&&_0xdd31d2();});return{'attach'(_0x3da89d){_0x4ab3e1['observe'](_0x3da89d,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x4ab3e1['disconnect'](),_0xdd31d2['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x291033,_0x4b4f59){super(_0x291033),this['id']=_0x3b880e(),this['focusTracker']=new _0x43d57e(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x176de0,_0x305977)=>this['fire']('Esc',_0x305977)),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']=Et(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x4b4f59),this['mainView']=_0x4b4f59;const _0x257b80=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x257b80['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 _0xf326b8=this['element']['clientHeight'];_0xf326b8&&(this['height']=_0xf326b8);}}class T extends/* #__PURE__ -- @preserve */
29
- _0x3538ec(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3a262a,target:_0x2dd17c,type:_0x227279,isVisible:_0xa1117=!0x0}){super(),this['view']=_0x3a262a,this['view']['element']||this['view']['render'](),this['_type']=_0x227279,this['_target']=_0x2dd17c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x504ada([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x41a0fa,_0x5389f8)=>{this['view']['focusTracker']['add'](_0x5389f8);}),this['focusableElements']['on']('remove',(_0x20a265,_0x32002d)=>{this['view']['focusTracker']['remove'](_0x32002d);}),this['set']('isVisible',_0xa1117);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x274c6c=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x274c6c),_0x274c6c;}get['targetRect'](){const _0x4572eb=this['target'];if(null===_0x4572eb)return null;if(_0x4572eb instanceof _0x3dcdfa)return _0x4572eb;const _0x379b88=_0x4572eb['filter'](_0x147a4a=>function(_0x409300){const _0x244971=_0x409300['offsetParent'];if(_0x244971)return!0x0;const _0x530245=_0x409300['getClientRects']()['item'](0x0);return!!_0x530245;}(_0x147a4a));return 0x0===_0x379b88['length']?null:new _0x3dcdfa(_0x379b88[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x277f8e){this['view']['isActive']=_0x277f8e,this['view']['mainView']['isActive']=_0x277f8e;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x60f062){if(!(null===_0x60f062||_0x60f062 instanceof _0x3dcdfa||Array['isArray'](_0x60f062)&&_0x60f062['every'](_0x47f634=>fi(_0x47f634))))throw new _0x274fd1('annotation-invalid-target',null,{'target':_0x60f062});}['_getNormalizedTarget'](){const _0x3dc7f5='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x3dc7f5)?[_0x3dc7f5]:_0x3dc7f5;}}function fi(_0x25b629){return null!==_0x25b629&&'object'==typeof _0x25b629&&'nodeType'in _0x25b629&&0x1===_0x25b629['nodeType'];}class S extends _0x504ada{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x594d65=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x43d57e(),this['_focusTracker']['on']('change:isFocused',(_0x1d70de,_0x2727e2,_0x2ff482)=>{_0x2ff482||this['fire']('blur');});for(const _0x457145 of _0x594d65)this['add'](_0x457145);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x324126){if(this['has'](_0x324126))throw new _0x274fd1('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x324126['innerView'],_0x324126),this['_viewToAnnotation']['set'](_0x324126['view'],_0x324126);for(const _0x373271 of _0x324126['focusableElements'])this['_focusTracker']['add'](_0x373271);this['listenTo'](_0x324126['focusableElements'],'add',(_0x329033,_0x50510d)=>{this['_focusTracker']['add'](_0x50510d);}),this['listenTo'](_0x324126['focusableElements'],'remove',(_0x50695b,_0x3f7431)=>{this['_focusTracker']['remove'](_0x3f7431);}),this['listenTo'](_0x324126['view']['focusTracker'],'change:isFocused',(_0xb87467,_0x842c84,_0x295610)=>{_0x295610&&this['fire']('focus',_0x324126);}),_0x324126['updateTargetRect']();const _0x58e6a9=this['_getOrderInContent'](_0x324126['view']['targetRect']);return super['add'](_0x324126,_0x58e6a9);}['remove'](_0x87dd61){if(!this['has'](_0x87dd61))throw new _0x274fd1('annotationcollection-not-existing-item',null);this['stopListening'](_0x87dd61['view']['focusTracker']),this['stopListening'](_0x87dd61['focusableElements']);for(const _0x3653c5 of _0x87dd61['focusableElements'])this['_focusTracker']['remove'](_0x3653c5);return this['_viewToAnnotation']['delete'](_0x87dd61['view']),this['_innerViewToAnnotation']['delete'](_0x87dd61['innerView']),super['remove'](_0x87dd61);}['getByInnerView'](_0x4eeb34){return this['_innerViewToAnnotation']['get'](_0x4eeb34);}['getByView'](_0x4c0430){return this['_viewToAnnotation']['get'](_0x4c0430);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3c10f0 of this)_0x3c10f0['updateTargetRect']();this['_sort']();}['_sort'](){const _0xcc06ed=Array['from'](this)['sort']((_0xb8ccd9,_0x53e459)=>w(_0xb8ccd9['view']['targetRect'],_0x53e459['view']['targetRect']));for(let _0x3f747c=_0xcc06ed['length']-0x1;_0x3f747c>0x0;_0x3f747c--){const _0x5a88cf=_0xcc06ed[_0x3f747c];_0x3f747c!==this['getIndex'](_0x5a88cf)&&(this['remove'](_0x5a88cf),this['add'](_0x5a88cf));}}['_getOrderInContent'](_0x3effa3){let _0x348986=0x0;if(!_0x3effa3)return this['length'];for(const _0x34ba6c of this){const _0x291512=_0x34ba6c['view']['targetRect'];if(_0x291512){if(w(_0x3effa3,_0x291512)<0x0)return _0x348986;_0x348986++;}}return _0x348986;}}function v({source:_0x4e3ab4,target:_0x531b59,filter:_0x1c7599}){for(const _0x4e6228 of _0x4e3ab4)_0x1c7599(_0x4e6228)&&_0x531b59['add'](_0x4e6228);_0x531b59['listenTo'](_0x4e3ab4,'add',(_0xbfde8f,_0x4d2bf6)=>{_0x1c7599(_0x4d2bf6)&&_0x531b59['add'](_0x4d2bf6);}),_0x531b59['listenTo'](_0x4e3ab4,'remove',(_0x449aa5,_0x16ed83)=>{_0x531b59['has'](_0x16ed83)&&_0x531b59['remove'](_0x16ed83);});}function w(_0x3b72a0,_0x882466){if(null===_0x3b72a0&&null===_0x882466)return 0x0;if(null===_0x3b72a0)return-0x1;if(null===_0x882466)return 0x1;const _0x1e88fb=_0x3b72a0['top']-_0x882466['top'];return 0x0==_0x1e88fb?_0x3b72a0['left']-_0x882466['left']:_0x1e88fb;}class y extends _0x388a6f{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52edd6){if(super(_0x52edd6),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x52edd6 instanceof _0x1961e5){const _0x287bc3=_0x52edd6['locale'];_0x52edd6['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x287bc3,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x51eb9c){this['collection']['add'](_0x51eb9c);}['remove'](_0x306991){this['collection']['remove'](_0x306991),_0x306991['destroy']();}['refreshVisibility'](){for(const _0x435f2a of this['collection'])_0x435f2a['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x46c386){return this['collection']['getByInnerView'](_0x46c386);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5245b3 of this['collection'])_0x5245b3['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3b321e){this['fire']('_activateAnnotation',_0x3b321e);}['createAnnotation'](_0x1a104d){return new T(_0x1a104d);}['createAnnotationView'](_0x430d34,_0x58f5c6){return new E(_0x430d34,_0x58f5c6);}['_addActiveAnnotation'](_0x390e08){const _0x17ee57=new Set(this['activeAnnotations']);_0x17ee57['add'](_0x390e08),this['activeAnnotations']=_0x17ee57;}['_removeActiveAnnotation'](_0x290f94){const _0x1ad4f3=new Set(this['activeAnnotations']);_0x1ad4f3['delete'](_0x290f94),this['activeAnnotations']=_0x1ad4f3;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4ea5aa=this['collection'],_0x3c997d=this['_visibleAnnotations'];function _0x3f37d4(_0x253faa){const _0x264dc5=_0x253faa['source'];_0x264dc5['isVisible']&&!_0x3c997d['has'](_0x264dc5)?_0x3c997d['add'](_0x264dc5):!_0x264dc5['isVisible']&&_0x3c997d['has'](_0x264dc5)&&_0x3c997d['remove'](_0x264dc5),_0x264dc5['view']['focusTracker']['remove'](_0x264dc5['view']['element']),_0x264dc5['view']['focusTracker']['add'](_0x264dc5['view']['element']);}this['listenTo'](_0x4ea5aa,'add',(_0x534df1,_0x4b0229)=>{_0x4b0229['isVisible']&&_0x3c997d['add'](_0x4b0229),this['listenTo'](_0x4b0229,'change:isVisible',_0x3f37d4);}),this['listenTo'](_0x4ea5aa,'remove',(_0x49c18d,_0x4a1a68)=>{_0x3c997d['has'](_0x4a1a68)&&_0x3c997d['remove'](_0x4a1a68),this['stopListening'](_0x4a1a68,'change:isVisible',_0x3f37d4);});}['_setupEnterAnnotationKeystroke'](){const _0x4aa855=_0xb36d9d=>{_0xb36d9d['on']('ready',()=>{_0xb36d9d['keystrokes']['set'](_0x258aa7,(_0x41cc99,_0x1dfc75)=>{const _0x3c5db9=_0x3292fb(this['activeAnnotations']['values']());_0x3c5db9&&(_0x3c5db9['view']['focus'](),_0x1dfc75());});});};this['context']instanceof _0x1961e5?_0x4aa855(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xabcaf8,_0x227965)=>{_0x4aa855(_0x227965);});}['_setupEscapeAnnotationHandling'](){const _0x137099=_0x540a2e=>{const _0x5bd156=_0x540a2e['source'],_0x2a7ee9=[];let _0x277ef9;if(Array['isArray'](_0x5bd156['target'])){_0x277ef9=_0x5bd156['target'][0x0],this['context']instanceof _0x1961e5?_0x2a7ee9['push'](this['context']):this['context']['editors']&&_0x2a7ee9['push'](...this['context']['editors']);for(const _0x331135 of _0x2a7ee9)for(const _0x164f6c of _0x331135['editing']['view']['domRoots']['values']())if(_0x164f6c['contains'](_0x277ef9))return void _0x331135['editing']['view']['focus']();_0x277ef9['focus']();}};this['listenTo'](this['collection'],'add',(_0x311d4a,_0x55abd9)=>{this['listenTo'](_0x55abd9,'escape',_0x137099,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2f5e8a,_0x4c8ea9)=>{this['stopListening'](_0x4c8ea9,'escape',_0x137099);});}}const bt=Symbol('noChannel'),Nt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x388a6f{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,pt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x209bc7){super(_0x209bc7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5e865e=this['context']['config'];_0x5e865e['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5e865e['define']('comments.maxThreadTotalWeight',0x1f4),_0x5e865e['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5e865e['define']('comments.CommentThreadView',Tt),_0x5e865e['define']('comments.CommentView',_t),_0x5e865e['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5315ab=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0xe4b159,_0x3f767c)=>this['_addCommentThread'](_0x3f767c)),this['on']('submitCommentThread',(_0x4ab146,_0x49293e)=>this['_submitCommentThread'](_0x49293e)),this['on']('resolveCommentThread',(_0x33cd42,_0x5f0325)=>this['_resolveCommentThread'](_0x5f0325)),this['on']('resolveCommentThread',(_0x51d4e7,_0x38c7b5)=>this['_updateActiveAnnotation'](_0x38c7b5),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x362bb4,_0x5382e4)=>this['_reopenCommentThread'](_0x5382e4)),this['on']('reopenCommentThread',(_0x676d0f,_0x7a4779)=>this['_updateActiveAnnotation'](_0x7a4779),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5ed8e7,_0x5909f3)=>this['_removeCommentThread'](_0x5909f3)),this['on']('updateCommentThread',(_0x3f9eb7,_0x4d13f4)=>this['_updateCommentThread'](_0x4d13f4)),this['on']('updateCommentThread',(_0x5ed8f1,_0x306a8f)=>this['_updateActiveAnnotation'](_0x306a8f),{'priority':'lowest'}),this['on']('addComment',(_0x44d7d6,_0x121eb1)=>this['_addComment'](_0x121eb1)),this['on']('updateComment',(_0x46dd74,_0x160196)=>this['_updateComment'](_0x160196)),this['on']('removeComment',(_0x2b2c03,_0x2f7c47)=>this['_removeComment'](_0x2f7c47)),this['on']('addComment',(_0x503c59,{threadId:_0x5d46fa,isFromAdapter:_0x26af0e})=>{if(_0x26af0e)return;const _0x5a81c7=this['getCommentThread'](_0x5d46fa),_0x389b50=_0x5a81c7&&this['_threadToController']['get'](_0x5a81c7);_0x389b50&&_0x389b50['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5315ab,'change:activeAnnotations',(_0x48a95d,_0x4013ae,_0x5d9a03)=>{const _0x3c7a1f=Array['from'](_0x5d9a03)['map'](_0x11f12a=>this['_viewToController']['get'](_0x11f12a['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3c7a1f?_0x3c7a1f['model']:null;});}set['adapter'](_0x4a9237){if(this['_adapter'])throw new _0x274fd1('commentsrepository-adapter-already-set');this['_adapter']=_0x4a9237;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2243ef=bt,threadId:_0x1beee7=_0x3b880e(),comments:_0x2d2a0f=[],unlinkedAt:_0x126a48=null,resolvedAt:_0x52d27c=null,resolvedBy:_0x251138=null,target:_0x548a4a=null,context:_0xfff122=null,attributes:_0x263be8={},isResolvable:_0xedbf24=!0x0,isSubmitted:_0x1e1565=!0x1,isFromAdapter:_0x50503e=!0x1}={}){return this['fire'](xt('addCommentThread',_0x2243ef),{'channelId':_0x2243ef,'threadId':_0x1beee7,'comments':_0x2d2a0f,'unlinkedAt':_0x126a48,'resolvedAt':_0x52d27c,'resolvedBy':_0x251138,'target':_0x548a4a,'context':_0xfff122,'attributes':_0x263be8,'isFromAdapter':_0x50503e,'isResolvable':_0xedbf24,'isSubmitted':_0x1e1565}),this['getCommentThread'](_0x1beee7);}['openNewCommentThread']({channelId:_0x49f218=bt,threadId:_0x5ee0e2=_0x3b880e(),target:_0x4421e6,context:_0x55b487=null,isResolvable:_0x5e18c8=!0x0}){if(this['_readOnlyChannels']['has'](_0x49f218)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4421e6)throw new _0x274fd1('commentsrepository-missing-target');const _0x1b9cb5=this['addCommentThread']({'channelId':_0x49f218,'threadId':_0x5ee0e2,'target':_0x4421e6,'context':_0x55b487,'isResolvable':_0x5e18c8});if(!_0x1b9cb5)return null;const _0x651ee3=this['_threadToController']['get'](_0x1b9cb5),_0x2273ec=_0x651ee3['view']['commentThreadInputView']['commentInputView'],_0x1ce22b=this['context']['plugins']['get'](y),_0x372324=_0x1ce22b['getByInnerView'](_0x651ee3['view']);return _0x1ce22b['activate'](_0x372324),_0x2273ec['once']('editorReady',()=>_0x2273ec['focus']()),_0x1b9cb5;}['hasCommentThread'](_0x1c4bb3){if('string'!=typeof _0x1c4bb3)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1c4bb3);}['updateCommentThread']({channelId:_0x4ea232=bt,threadId:_0x3ee8a4,context:_0x19e8d1,unlinkedAt:_0xba49ca,attributes:_0x176edc,isFromAdapter:_0x5e8615=!0x1}){return this['fire'](xt('updateCommentThread',_0x4ea232),{'channelId':_0x4ea232,'threadId':_0x3ee8a4,'context':_0x19e8d1,'unlinkedAt':_0xba49ca,'attributes':_0x176edc,'isFromAdapter':_0x5e8615}),this['getCommentThread'](_0x3ee8a4);}['getCommentThread'](_0x603aad){if('string'!=typeof _0x603aad)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x603aad);}['fetchCommentThread']({channelId:_0x332692,threadId:_0x5dea16}={}){const _0x2fe73c=this['getCommentThread'](_0x5dea16);if(_0x2fe73c)return Promise['resolve'](_0x2fe73c);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x274fd1('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x332692,'threadId':_0x5dea16})['then'](_0x490632=>this['hasCommentThread'](_0x5dea16)?this['getCommentThread'](_0x5dea16):_0x490632?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x332692},_0x490632)):void 0x0)['catch'](_0x3d2ec1=>{throw console['error'](_0x3d2ec1),new _0x274fd1('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x42947b,skipNotAttached:_0x56f7e3=!0x1,skipEmpty:_0x22fb5a=!0x1,toJSON:_0x994181=!0x1}={}){const _0x3acc81=[];for(const _0x529aad of this['_threads']['values']())_0x42947b&&_0x529aad['channelId']!==_0x42947b||_0x56f7e3&&!_0x529aad['isAttached']||_0x22fb5a&&0x0===_0x529aad['length']||_0x3acc81['push'](_0x529aad);return _0x994181?_0x3acc81['map'](_0x2dceca=>_0x2dceca['toJSON']()):_0x3acc81;}['getAnnotationForCommentThread'](_0x59c778){const _0x1623ef=this['_threadToController']['get'](_0x59c778);if(!_0x1623ef)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x1623ef['view'])||null;}['getCommentThreadForAnnotation'](_0x3404e9){const _0x18e417=this['_viewToController']['get'](_0x3404e9['innerView']);return _0x18e417?_0x18e417['model']:null;}['setActiveCommentThread'](_0x5f1da5){const _0x42c3cd=this['context']['plugins']['get'](y);if(!_0x5f1da5)return void(this['activeCommentThread']&&_0x42c3cd['deactivateAll']());const _0x526130=this['getCommentThread'](_0x5f1da5);if(!_0x526130)throw new _0x274fd1('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5f1da5});if(!this['_threadToController']['has'](_0x526130))throw new _0x274fd1('commentsrepository-active-not-attached',null,{'threadId':_0x5f1da5});const _0x51fbf3=_0x42c3cd['getByInnerView'](this['_threadToController']['get'](_0x526130)['view']);_0x42c3cd['activate'](_0x51fbf3);}['switchReadOnly'](_0x492294,_0x2510e4){_0x492294?this['_readOnlyChannels']['add'](_0x2510e4):this['_readOnlyChannels']['delete'](_0x2510e4),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x43da71){return this['_readOnlyChannels']['has'](_0x43da71)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2527d1,_0xf291f0){return new gt(_0x2527d1,_0xf291f0);}['setPermissions'](_0x23bc48,_0xc2de48=bt){this['_permissions']['set'](_0xc2de48,_0x23bc48),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5d91a0=bt){return this['_permissions']['has'](_0x5d91a0)?this['_permissions']['get'](_0x5d91a0):Nt;}['_addCommentThread']({channelId:_0x1f0a80,threadId:_0x210660,comments:_0x136c36,unlinkedAt:_0x21771e,resolvedAt:_0x18a09f,resolvedBy:_0x43b5a1,target:_0x4eaf5b,context:_0x512e8d,attributes:_0x1b5a64,isFromAdapter:_0x2f90ae,isResolvable:_0xe244c9,isSubmitted:_0x1ec0a2}){if('string'!=typeof _0x210660)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x210660});if(this['hasCommentThread'](_0x210660))throw new _0x274fd1('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x210660});const _0xf1ac9a=new pi(this,{'channelId':_0x1f0a80,'id':_0x210660,'context':_0x512e8d,'attributes':_0x1b5a64,'unlinkedAt':_0x21771e,'resolvedAt':_0x18a09f,'resolvedBy':_0x43b5a1?this['context']['plugins']['get'](st)['getUser'](_0x43b5a1):null,'isResolvable':_0xe244c9,'isSubmitted':_0x1ec0a2||_0x2f90ae});this['_threads']['set'](_0x210660,_0xf1ac9a);for(const _0x3bf860 of _0x136c36)_0xf1ac9a['_add'](this['_createNewComment']({'threadId':_0x210660,..._0x3bf860}));return _0x4eaf5b&&_0xf1ac9a['attachTo'](_0x4eaf5b),_0x2f90ae||!_0xf1ac9a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1f0a80,'threadId':_0x210660});}['_submitCommentThread']({channelId:_0x44551f,threadId:_0x4bd4cd}){if(!this['hasCommentThread'](_0x4bd4cd))throw new _0x274fd1('commentsrepository-missing-comment-thread',this);const _0x8340af=this['getCommentThread'](_0x4bd4cd);if(_0x8340af['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x16b55e,comments:_0x1a9f00,resolvedAt:_0x13e11a,resolvedBy:_0x43cce4,context:_0x188ec7,attributes:_0x48000e}=_0x8340af,_0x46ba16=this['context']['plugins']['get']('PendingActions'),_0x414b61=_0x46ba16['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x44551f,'threadId':_0x16b55e,'comments':_0x1a9f00['map'](_0x282118=>_0x282118['toJSON']()),'resolvedAt':_0x13e11a,'resolvedBy':_0x43cce4?_0x43cce4['id']:_0x43cce4,'context':_0x188ec7,'attributes':_0x48000e})['then'](({comments:_0x462a31})=>{_0x46ba16['remove'](_0x414b61);for(const _0x943d85 of _0x462a31)this['_updateComment']({'channelId':_0x44551f,'threadId':_0x4bd4cd,'commentId':_0x943d85['commentId'],'createdAt':_0x943d85['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x34de38=>{throw console['error'](_0x34de38),new _0x274fd1('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x969f78,target:_0x39a548}){const _0x5719b4=this['getCommentThread'](_0x969f78);if(!_0x5719b4)throw new _0x274fd1('commentsrepository-attach-missing-comment-thread',this);const _0x30f090=this['context']['plugins']['get']('PendingActions'),_0x48f48d=this['context']['plugins']['get'](y),_0x451997=this['_createCommentThreadView'](_0x5719b4),_0x404b6b=new gt(_0x5719b4,_0x451997);let _0x217bbf=null;_0x451997['on']('change:isDirty',(_0xb21d43,_0xdb479e,_0x30db22)=>{_0x30db22?_0x217bbf=_0x30f090['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x217bbf&&(_0x30f090['remove'](_0x217bbf),_0x217bbf=null);}),this['_threadToController']['set'](_0x5719b4,_0x404b6b),this['_viewToController']['set'](_0x451997,_0x404b6b);const _0x4122a6=new E(this['context']['locale'],_0x451997);_0x4122a6['bind']('length')['to'](_0x451997),_0x4122a6['bind']('isDirty')['to'](_0x451997,'isDirty',_0x451997,'length',(_0x23ed63,_0x235e66)=>_0x23ed63||!_0x235e66),_0x4122a6['bind']('isActive')['to'](_0x451997),_0x4122a6['type']='comment';const _0x295f8a=new T({'view':_0x4122a6,'target':_0x39a548,'type':'comment','isVisible':!_0x5719b4['archivedAt']&&!!('function'==typeof _0x39a548?_0x39a548():_0x39a548)});return _0x451997['on']('escape',()=>{_0x295f8a['fire']('escape');}),this['_bindAnnotationToEditors'](_0x451997,_0x295f8a),_0x48f48d['add'](_0x295f8a),_0x295f8a;}['_bindAnnotationToEditors'](_0x1f20da,_0x5478a7){this['listenTo'](_0x1f20da,'editorReady',(_0x21c564,_0x44c4da)=>{const _0x54b20f=_0x44c4da['ui']['view']['body']['bodyCollectionContainer'];_0x5478a7['focusableElements']['add'](_0x54b20f),this['context']instanceof _0x1961e5&&this['context']['ui']['focusTracker']['add'](_0x54b20f);},{'priority':'highest'}),this['listenTo'](_0x1f20da,'editorDestroyed',(_0x133679,_0x371d85)=>{const _0x1336e9=_0x371d85['ui']['view']['body']['bodyCollectionContainer'];_0x5478a7['focusableElements']['has'](_0x1336e9)&&_0x5478a7['focusableElements']['remove'](_0x1336e9),this['context']instanceof _0x1961e5&&this['context']['ui']['focusTracker']['remove'](_0x1336e9);});}['_unbindEditors'](_0x8810ef){this['stopListening'](_0x8810ef,'editorReady'),this['stopListening'](_0x8810ef,'editorDestroyed');}['_createCommentThreadView'](_0x492467){const _0x489339=this['context']['plugins']['get'](st),{config:_0x375e03,locale:_0x2cf684}=this['context'],_0x1fdc78=It(_0x375e03['get']('locale'),_0x2cf684);return new(0x0,(_0x375e03['get']('comments'))['CommentThreadView'])(_0x2cf684,_0x492467,_0x489339['me'],{'editorConfig':{..._0x375e03['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x375e03['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x375e03['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x375e03['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x375e03['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1fdc78,'CommentView':_0x375e03['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x427518,channelId:_0x1679c8,resolvedAt:_0x4e20e3,resolvedBy:_0x4e5515,isFromAdapter:_0x422c3a}){if(!this['hasCommentThread'](_0x427518))throw new _0x274fd1('commentsrepository-missing-comment-thread',null,{'threadId':_0x427518});const _0x4670e1=this['getCommentThread'](_0x427518);if(_0x4670e1['isResolved'])throw new _0x274fd1('commentsrepository-resolved-comment-thread',null,{'threadId':_0x427518});const _0x4d71b4=this['context']['plugins']['get'](st);if(_0x4670e1['resolvedBy']=_0x4d71b4['getUser'](_0x4e5515),_0x4670e1['resolvedAt']=_0x4e20e3,_0x422c3a||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x141ee6=this['context']['plugins']['get']('PendingActions'),_0x60249e=_0x141ee6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x1679c8,'threadId':_0x427518})['then'](({resolvedAt:_0x11a9e2,resolvedBy:_0x39a156})=>{_0x141ee6['remove'](_0x60249e),_0x4670e1['resolvedBy']['id']!==_0x39a156&&(_0x4670e1['resolvedBy']=_0x4d71b4['getUser'](_0x39a156)),_0x4670e1['resolvedAt']=_0x11a9e2;})['catch'](_0x4ba815=>{throw console['error'](_0x4ba815),new _0x274fd1('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1d7b29,channelId:_0x3929f6,isFromAdapter:_0x4a2189}){if(!this['hasCommentThread'](_0x1d7b29))throw new _0x274fd1('commentsrepository-missing-comment-thread',null,{'threadId':_0x1d7b29});const _0x178239=this['getCommentThread'](_0x1d7b29);if(!_0x178239['isResolved'])throw new _0x274fd1('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1d7b29});if(_0x178239['resolvedBy']=null,_0x178239['resolvedAt']=null,_0x4a2189||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xc7ab59=this['context']['plugins']['get']('PendingActions'),_0x453881=_0xc7ab59['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3929f6,'threadId':_0x1d7b29})['then'](()=>_0xc7ab59['remove'](_0x453881))['catch'](_0x1f6608=>{throw console['error'](_0x1f6608),new _0x274fd1('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4db91d,isFromAdapter:_0x297702}){const _0x13acfc=this['getCommentThread'](_0x4db91d);if(!_0x13acfc)throw new _0x274fd1('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4db91d),this['_threads']['delete'](_0x4db91d),!_0x13acfc['isSubmitted']||_0x297702||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xbc51a3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23fa65}=_0x13acfc,_0x5db7a1=_0xbc51a3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x23fa65,'threadId':_0x4db91d})['then'](()=>_0xbc51a3['remove'](_0x5db7a1))['catch'](_0x79b303=>{throw console['error'](_0x79b303),new _0x274fd1('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x25cc24,unlinkedAt:_0x5cfe50,context:_0x2934b8,attributes:_0x28c5ca,isFromAdapter:_0x19c8fd}){if('string'!=typeof _0x25cc24)throw new _0x274fd1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x25cc24});if(!this['hasCommentThread'](_0x25cc24))throw new _0x274fd1('commentsrepository-missing-comment-thread',null,{'threadId':_0x25cc24});const _0x20a0e7=this['getCommentThread'](_0x25cc24);let _0x16a2e8=!0x1;if(void 0x0!==_0x2934b8&&_0x20a0e7['context']!==_0x2934b8&&(_0x20a0e7['context']=_0x2934b8,_0x16a2e8=!0x0),void 0x0!==_0x5cfe50&&_0x20a0e7['unlinkedAt']!==_0x5cfe50&&(_0x20a0e7['unlinkedAt']=_0x5cfe50,_0x16a2e8=!0x0),_0x28c5ca&&!yt(_0x28c5ca,_0x20a0e7['attributes'])&&(_0x20a0e7['attributes']=_0x28c5ca,_0x16a2e8=!0x0),!_0x16a2e8)return Promise['resolve']();if(!_0x20a0e7['isSubmitted']||_0x19c8fd||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x44ca48=this['context']['plugins']['get']('PendingActions'),{channelId:_0xf3833f}=_0x20a0e7,_0x4a4996=_0x44ca48['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xf3833f,'threadId':_0x25cc24,'context':_0x2934b8,'unlinkedAt':_0x5cfe50,'attributes':_0x28c5ca})['then'](()=>_0x44ca48['remove'](_0x4a4996))['catch'](_0x581872=>{throw console['error'](_0x581872),new _0x274fd1('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x29eded){const _0x307a6b=this['context']['plugins']['get'](y),_0x4576c2=this['getCommentThread'](_0x29eded);if(_0x4576c2['_isAttached']=!0x1,this['_threadToController']['has'](_0x4576c2)){const _0x3ebc48=this['_threadToController']['get'](_0x4576c2),_0x923687=_0x3ebc48['view'],_0x15eaa8=_0x307a6b['getByInnerView'](_0x923687);this['_threadToController']['delete'](_0x4576c2),this['_viewToController']['delete'](_0x923687),_0x15eaa8&&_0x307a6b['remove'](_0x15eaa8),_0x3ebc48['destroy'](),_0x923687['destroy']()['then'](()=>{this['_unbindEditors'](_0x923687);});}}['_updateActiveAnnotation']({threadId:_0x12a453,resolvedAt:_0x303d07,unlinkedAt:_0x2dcf2d}){const _0x2a6c34=!!_0x303d07,_0x9080ff=this['context']['plugins']['get'](y),_0x5309ee=this['getCommentThread'](_0x12a453);if(this['_threadToController']['has'](_0x5309ee)){const _0x52cb41=this['_threadToController']['get'](_0x5309ee)['view'],_0x2b5731=_0x9080ff['getByInnerView'](_0x52cb41);_0x2b5731&&(_0x2a6c34&&_0x9080ff['_removeActiveAnnotation'](_0x2b5731),_0x2dcf2d?_0x2b5731['isVisible']=!0x1:_0x2b5731['refreshVisibility']());}}['_getExternalAuthor'](_0x537b6f){const _0x18c452=this['context']['plugins']['get'](st),_0x308ccf=wt('external:'+_0x537b6f),_0x8aec43=_0x18c452['getUser'](_0x308ccf);return _0x8aec43||_0x18c452['addUser']({'id':_0x308ccf,'name':_0x537b6f});}['_createNewComment']({threadId:_0x351faa,commentId:_0x384f7b=_0x3b880e(),content:_0x5d303e,authorId:_0x1962a8,createdAt:_0x492044,attributes:_0x8ce13d}){if('string'!=typeof _0x384f7b)throw new _0x274fd1('commentsrepository-invalid-commentid');if('string'!=typeof _0x1962a8)throw new _0x274fd1('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5d303e||!_0x5d303e['trim']())throw new _0x274fd1('commentsrepository-invalid-comment-content');const _0x3f68d1=this['context']['plugins']['get'](st)['getUser'](_0x1962a8);if(!_0x3f68d1)throw new _0x274fd1('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1962a8});let _0x1ed260=null,_0x554657=_0x492044;return _0x8ce13d?.['@external']&&(_0x1ed260=this['_getExternalAuthor'](_0x8ce13d['@external']['authorName']),_0x554657=new Date(_0x8ce13d['@external']['createdAt'])),new wi(this,{'threadId':_0x351faa,'id':_0x384f7b,'author':_0x1ed260||_0x3f68d1,'creator':_0x3f68d1,'content':_0x5d303e,'createdAt':_0x492044,'authoredAt':_0x554657,'attributes':_0x8ce13d});}['_addComment'](_0x395ca1){let {threadId:_0x27338c,content:_0x379860,attributes:_0x32ad6b,isFromAdapter:_0x4a99c7}=_0x395ca1;const _0x527f65=this['getCommentThread'](_0x395ca1['threadId']);if(!_0x527f65)throw new _0x274fd1('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4f7a71=this['_createNewComment'](_0x395ca1),{id:_0x1ae04c}=_0x4f7a71;if(_0x527f65['_add'](_0x4f7a71),_0x4a99c7||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x527f65['isSubmitted'])return Promise['resolve']();const _0x26e614=this['context']['plugins']['get']('PendingActions'),{channelId:_0xaed131}=_0x527f65,_0x506a84=_0x26e614['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x32ad6b||(_0x32ad6b={}),this['adapter']['addComment']({'channelId':_0xaed131,'threadId':_0x27338c,'commentId':_0x1ae04c,'content':_0x379860,'attributes':_0x32ad6b})['then'](_0x4dce0a=>{_0x26e614['remove'](_0x506a84),_0x4dce0a&&this['_updateComment']({'channelId':_0xaed131,'threadId':_0x27338c,'commentId':_0x1ae04c,'createdAt':_0x4dce0a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x296976=>{throw console['error'](_0x296976),new _0x274fd1('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3d7e5a,commentId:_0x433d15,content:_0x319c31,createdAt:_0x27eee7,attributes:_0x2e89d5,isFromAdapter:_0x2b9baa}){if(void 0x0!==_0x319c31&&('string'!=typeof _0x319c31||!_0x319c31['trim']()['length']))throw new _0x274fd1('commentsrepository-update-comment-invalid-content');const _0x37880a=this['getCommentThread'](_0x3d7e5a),_0x5d63e9=_0x37880a['getComment'](_0x433d15);if(!_0x5d63e9)throw new _0x274fd1('commentsrepository-update-missing-comment',this);let _0x5d0203=!0x1;if(_0x319c31&&_0x319c31!==_0x5d63e9['content']&&(_0x5d63e9['isEditable']||_0x2b9baa)&&(_0x5d63e9['content']=_0x319c31,_0x5d0203=!0x0),_0x27eee7&&_0x27eee7!==_0x5d63e9['createdAt']&&(_0x5d63e9['createdAt']=_0x27eee7,_0x5d63e9['attributes']&&_0x5d63e9['attributes']['@external']||(_0x5d63e9['authoredAt']=_0x27eee7),_0x5d0203=!0x0),_0x2e89d5&&!yt(_0x2e89d5,_0x5d63e9['attributes'])&&(_0x5d63e9['attributes']=_0x2e89d5,_0x5d0203=!0x0),!_0x5d0203)return Promise['resolve']();if(_0x37880a['fire']('commentUpdated'),_0x2b9baa||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0xd498d8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5d1cd0}=this['getCommentThread'](_0x5d63e9['threadId']),_0x49e1de=_0xd498d8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5d1cd0,'threadId':_0x3d7e5a,'commentId':_0x433d15,'content':_0x319c31,'attributes':_0x2e89d5})['then'](()=>_0xd498d8['remove'](_0x49e1de))['catch'](_0x345feb=>{throw console['error'](_0x345feb),new _0x274fd1('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xf3eab6,commentId:_0x57b6bc,isFromAdapter:_0xc8952f}){const _0x348ee7=this['getCommentThread'](_0xf3eab6),_0x37ae44=_0x348ee7['getComment'](_0x57b6bc);if(!_0x37ae44)throw new _0x274fd1('commentsrepository-remove-missing-comment',this);if(_0x348ee7['_remove'](_0x37ae44),_0xc8952f||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x32862a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x35634b}=_0x348ee7,_0x500bd2=_0x32862a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x35634b,'threadId':_0xf3eab6,'commentId':_0x57b6bc})['then'](()=>_0x32862a['remove'](_0x500bd2))['catch'](_0x1a4165=>{throw console['error'](_0x1a4165),new _0x274fd1('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0x3538ec(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5c9f27,_0x55beb0){super();const _0x12dca8=_0x55beb0['isResolvable'];this['channelId']=_0x55beb0['channelId'],this['id']=_0x55beb0['id'],this['comments']=new _0x504ada(),this['_repository']=_0x5c9f27,this['_isAttached']=!0x1,this['_isSubmitted']=_0x55beb0['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5c9f27,'_permissions',_0x5c9f27,'_readOnlyChannels',()=>_0x5c9f27['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5c9f27,'_permissions',()=>_0x5c9f27['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5c9f27,'_permissions',()=>{const _0x35ca1a=_0x5c9f27['getPermissions'](this['channelId']);return _0x35ca1a['write']||_0x35ca1a['admin'];}),this['bind']('isResolvable')['to'](_0x5c9f27,'_permissions',()=>_0x12dca8&&_0x5c9f27['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x55beb0['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0xb7af55,_0x37c013)=>_0xb7af55?_0x37c013?_0xb7af55<_0x37c013?_0xb7af55:_0x37c013:_0xb7af55:_0x37c013),this['set']('unlinkedAt',_0x55beb0['unlinkedAt']||null),this['set']('resolvedAt',_0x55beb0['resolvedAt']||null),this['set']('resolvedBy',_0x55beb0['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x33d9a8=>!!_0x33d9a8),this['set']('attributes',_0x55beb0['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x3b67a7,_0x1826df)=>_0x3b67a7+_0x1826df['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2618b4,id:_0x5790ff}=this;this['_repository']['fire'](xt('submitCommentThread',_0x2618b4),{'channelId':_0x2618b4,'threadId':_0x5790ff});}['setUnlinkedAt'](_0x2e155e){this['_update']({'unlinkedAt':_0x2e155e});}['resolve']({resolvedAt:_0x294587=new Date(),resolvedBy:_0x57d9b1=null,isFromAdapter:_0x3f12f5=!0x1}={}){const _0x39ae0b=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x67b10b,id:_0x4dc3cb}=this;this['_repository']['fire'](xt('resolveCommentThread',_0x67b10b),{'channelId':_0x67b10b,'threadId':_0x4dc3cb,'resolvedAt':_0x294587,'resolvedBy':_0x57d9b1||_0x39ae0b['id'],'isFromAdapter':_0x3f12f5});}['reopen']({isFromAdapter:_0x430741=!0x1}={}){const {channelId:_0x289696,id:_0x5bb820}=this;this['_repository']['fire'](xt('reopenCommentThread',_0x289696),{'channelId':_0x289696,'threadId':_0x5bb820,'isFromAdapter':_0x430741});}['setContext'](_0x170491){this['context']||this['_update']({'context':_0x170491});}['setAttribute'](_0x4312cb,_0x2e9709){const _0x1ba3bb=At(this['attributes']);Ct(_0x1ba3bb,_0x4312cb,_0x2e9709),this['_update']({'attributes':_0x1ba3bb});}['removeAttribute'](_0x2f53e0){const _0x2e7644=At(this['attributes']);vt(_0x2e7644,_0x2f53e0),this['_update']({'attributes':_0x2e7644});}['remove']({isFromAdapter:_0x35eb4d=!0x1}={}){const {channelId:_0x25d061,id:_0xf3d81a}=this;this['_repository']['fire'](xt('removeCommentThread',_0x25d061),{'channelId':_0x25d061,'threadId':_0xf3d81a,'isFromAdapter':_0x35eb4d});}['attachTo'](_0x37d4c1){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x37d4c1});}['addComment'](_0xc5e775){const {channelId:_0x15aa01,id:_0x5c2ac5}=this;this['_repository']['fire'](xt('addComment',_0x15aa01,_0x5c2ac5),Object['assign']({'channelId':_0x15aa01,'threadId':_0x5c2ac5},_0xc5e775));}['getComment'](_0x132c07){if('string'!=typeof _0x132c07)throw new _0x274fd1('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x132c07});return this['comments']['get'](_0x132c07);}['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'](_0x44afee=>_0x44afee['toJSON']()),'attributes':this['attributes']};}['_add'](_0x3689cb){return this['listenTo'](_0x3689cb,'change:authoredAt',()=>{const _0x1dbb5a=this['_findOptimalIndex'](_0x3689cb),_0xa0636c=this['comments'];_0x1dbb5a-0x1!=_0xa0636c['getIndex'](_0x3689cb)&&_0x1dbb5a+0x1!=_0xa0636c['getIndex'](_0x3689cb)&&(this['_remove'](_0x3689cb),this['_add'](_0x3689cb));}),this['comments']['add'](_0x3689cb,this['_findOptimalIndex'](_0x3689cb));}['_update'](_0x583379){const {channelId:_0x52c736,id:_0x3f2298}=this;this['_repository']['fire'](xt('updateCommentThread',_0x52c736),{..._0x583379,'channelId':_0x52c736,'threadId':_0x3f2298});}['_remove'](_0x51a4fa){return this['stopListening'](_0x51a4fa),_0x51a4fa['destroy'](),this['comments']['remove'](_0x51a4fa);}['_findOptimalIndex'](_0x580382){const _0x444c69=this['comments']['find'](_0x48254b=>new Date(_0x48254b['authoredAt'])['getTime']()>new Date(_0x580382['authoredAt'])['getTime']());return _0x444c69?this['comments']['getIndex'](_0x444c69):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0x3538ec(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2609f8,_0x936c52){super();const _0x123c42=_0x2609f8['context']['plugins']['get'](st)['me'],_0x335071=_0x2609f8['getCommentThread'](_0x936c52['threadId']),_0x45f291=0x0===_0x335071['comments']['length'],_0x5e238e=_0x123c42===_0x936c52['author'];this['id']=_0x936c52['id'],this['threadId']=_0x936c52['threadId'],this['author']=_0x936c52['author'],this['creator']=_0x936c52['creator'],this['isExternal']=Boolean(_0x936c52['attributes']&&_0x936c52['attributes']['@external']),this['set']('content',_0x936c52['content']),this['createdAt']=_0x936c52['createdAt']||new Date(),this['set']('authoredAt',_0x936c52['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x335071,'resolvedAt'),this['set']('attributes',_0x936c52['attributes']||{}),this['bind']('isEditable')['to'](_0x2609f8,'_permissions',()=>{const _0x529aea=_0x2609f8['getPermissions'](_0x335071['channelId'])['write'],_0x121628=_0x2609f8['getPermissions'](_0x335071['channelId'])['modifyAll'];return _0x5e238e&&_0x529aea||!_0x5e238e&&_0x121628;}),this['bind']('isRemovable')['to'](_0x335071,'isRemovable',_0x2609f8,'_permissions',_0x364da1=>{const _0x54d9d4=_0x2609f8['getPermissions'](_0x335071['channelId'])['write'],_0x21319e=_0x2609f8['getPermissions'](_0x335071['channelId'])['modifyAll'];return _0x5e238e&&_0x54d9d4||_0x364da1&&_0x45f291||!_0x5e238e&&_0x21319e&&!_0x45f291;}),this['bind']('isReadOnly')['to'](_0x335071,'isReadOnly'),this['_repository']=_0x2609f8;}get['weight'](){return Math['max'](function(_0x35d740){const _0x128ef8=document['createElement']('div');return _0x128ef8['innerHTML']=_0x35d740,_0x128ef8['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1b0b0b){const {threadId:_0x32d3df,id:_0x53eea0}=this;if(!this['_repository']['hasCommentThread'](_0x32d3df))throw new _0x274fd1('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4ac6d3}=this['_repository']['getCommentThread'](_0x32d3df);this['_repository']['fire'](xt('updateComment',_0x4ac6d3,_0x32d3df),{'channelId':_0x4ac6d3,'threadId':_0x32d3df,'commentId':_0x53eea0,..._0x1b0b0b});}['setAttribute'](_0x1648d0,_0x31cafd){const _0x4f4dbe=At(this['attributes']);Ct(_0x4f4dbe,_0x1648d0,_0x31cafd),this['update']({'attributes':_0x4f4dbe});}['removeAttribute'](_0x2c3a94){const _0x446f9d=At(this['attributes']);vt(_0x446f9d,_0x2c3a94),this['update']({'attributes':_0x446f9d});}['remove'](_0x5e8416={}){if(!_0x5e8416['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x242d78,id:_0x268fa0}=this;if(!this['_repository']['hasCommentThread'](_0x242d78))throw new _0x274fd1('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x35f610}=this['_repository']['getCommentThread'](_0x242d78);this['_repository']['fire'](xt('removeComment',_0x35f610,_0x242d78),{'channelId':_0x35f610,'threadId':_0x242d78,'commentId':_0x268fa0,..._0x5e8416});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x192832,..._0x5ec929){for(const _0x17a8e1 of _0x5ec929)void 0x0!==_0x17a8e1&&(_0x192832+=':'+String(_0x17a8e1));return _0x192832;}class rt extends _0x406027{constructor(_0xd5f856){super(_0xd5f856),this['set']('hasContent',!0x1);}['refresh'](){const _0x3b6648=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5426fe of _0x3b6648['getRanges']())if(this['_hasContent'](_0x5426fe))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x351581=_0x3b880e(),ranges:_0x17ce6f,comment:_0x4d386b}={}){const _0x1f4e3e=this['editor']['model'],_0x323f42=_0x17ce6f??Array['from'](_0x1f4e3e['document']['selection']['getRanges']()),_0x1dbdb1=[];for(const _0x44e9d3 of _0x323f42)this['_hasContent'](_0x44e9d3)&&_0x1dbdb1['push'](this['_trimToContent'](_0x44e9d3));if(!_0x1dbdb1['length'])throw new _0x274fd1('addcommentthreadcommand-incorrect-ranges',null);_0x4d386b&&this['_createCommentThread'](_0x351581,_0x4d386b),this['_createMarkersFromRanges'](_0x351581,_0x1dbdb1,!!_0x4d386b);}['_createMarkersFromRanges'](_0x4117f6,_0x443fe1,_0x5d720a){this['editor']['model']['change'](_0x51db30=>{for(const _0x32b6ed of _0x443fe1){const _0xb0dc6c=_0x3b880e()['substr'](0x1,0x5),_0x2dc69b='comment:'+_0x4117f6+':'+_0xb0dc6c;_0x51db30['addMarker'](_0x2dc69b,{'range':_0x32b6ed,'usingOperation':_0x5d720a,'affectsData':_0x5d720a});}});}['_createCommentThread'](_0x351010,_0x381654){const _0x16bd46=this['editor']['plugins']['get']('CommentsRepository'),_0x57ed09=this['editor']['config']['get']('collaboration.channelId'),_0x66929e=this['editor']['plugins']['get']('Users')['me'];if(!_0x66929e)throw new _0x274fd1('addcommentthreadcommand-user-not-found',null);_0x16bd46['addCommentThread']({'threadId':_0x351010,'channelId':_0x57ed09,'comments':[{'authorId':_0x66929e['id'],'content':_0x381654,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x31b3bf){for(const _0x25241a of _0x31b3bf['getItems']())if(this['_itemIsContent'](_0x25241a))return!0x0;return!0x1;}['_itemIsContent'](_0x1f3943){return _0x1f3943['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1f3943)&&!_0x1f3943['is']('element','tableCell');}['_trimToContent'](_0x41e642){const _0x58591e=_0x21c956=>!this['_itemIsContent'](_0x21c956['item']),_0xa54c61=_0x41e642['start']['getLastMatchingPosition'](_0x58591e),_0x260909=_0x41e642['end']['getLastMatchingPosition'](_0x58591e,{'direction':'backward'});return this['editor']['model']['createRange'](_0xa54c61,_0x260909);}}class b extends _0x35651a{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xbf3c5e){super(_0xbf3c5e),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x35abdc=this['editor'],_0x121596=_0x35abdc['model']['document']['selection'],_0x4fe9ee=_0x12b399(()=>this['refreshSelectedViews'](),0xa);_0x121596['on']('change:range',(_0x32892f,_0x54d8ea)=>{_0x54d8ea['directChange']&&(_0x4fe9ee['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x35abdc['editing']['view']['document'],'change:isFocused',(_0x2c6e88,_0x4d0677,_0x5f9bfa)=>{_0x5f9bfa&&_0x4fe9ee();}),this['listenTo'](_0x35abdc['ui']['focusTracker'],'change:isFocused',(_0x225487,_0x230c34,_0x35ad96)=>{_0x35ad96||this['fire']('blur',{'isAnnotationTracked':_0x313e2d=>this['_editorAnnotationsData']['has'](_0x313e2d['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1a8fb9){if(this['_editorAnnotations']['has'](_0x1a8fb9['view']))return;this['_editorAnnotations']['add'](_0x1a8fb9['view']),this['editor']['ui']['focusTracker']['add'](_0x1a8fb9['view']['element']);const _0x535da8=this['editor']['plugins']['get'](y);this['listenTo'](_0x535da8['collection'],'remove',(_0xa9a6a6,_0x59ab9d)=>{this['editor']['ui']['focusTracker']['remove'](_0x59ab9d['view']['element']),this['_editorAnnotations']['delete'](_0x59ab9d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2d885e){if('function'!=typeof _0x2d885e)throw new _0x274fd1('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2d885e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x39a5a9,annotations:_0x3ea183}){const _0x2ee20b=[],_0x5425c5=this['editor']['model']['document']['selection'],_0x4ff4b0=Array['from'](_0x5425c5['getRanges']());for(const [_0x4736c5,_0x55c670]of this['_editorAnnotationsData']){const _0x51bfe3=_0x58333c(_0x55c670),_0x509240=_0x3ea183['getByInnerView'](_0x4736c5);_0x51bfe3&&_0x509240&&_0x2ee20b['push']({'annotation':_0x509240,'range':_0x51bfe3});}function _0x58333c(_0xcae89){for(const _0x20aadc of _0xcae89)for(const _0x1058c1 of _0x4ff4b0)if(_0x20aadc['containsRange'](_0x1058c1,!_0x5425c5['isCollapsed']))return _0x20aadc;return null;}return _0x2ee20b['sort']((_0x47950f,_0x3af7e3)=>{const _0x2e6939=_0x47950f['range'],_0x59266c=_0x3af7e3['range'];if(!_0x2e6939['isEqual'](_0x59266c)){if(_0x2e6939['containsRange'](_0x59266c,!0x0))return 0x1;if(_0x59266c['containsRange'](_0x2e6939,!0x0))return-0x1;}return _0x47950f['annotation']==_0x39a5a9?-0x1:_0x3af7e3['annotation']==_0x39a5a9?0x1:0x0;})['map'](_0x1c953f=>_0x1c953f['annotation']);}get['_editorAnnotationsData'](){const _0x3fc65b=new Map();for(const _0xe2e394 of Array['from'](this['_dataCollectors']))for(const [_0x2c0740,_0x2cbdad]of _0xe2e394())_0x3fc65b['set'](_0x2c0740,_0x2cbdad);return _0x3fc65b;}}class ct extends _0x35651a{['afterInit'](){const _0x424d05=this['editor'];if(!_0x424d05['plugins']['has']('RestrictedEditingModeEditing'))return;_0x424d05['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x35651a{constructor(_0x3bfb2e){super(_0x3bfb2e),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2edc4c=this['editor'],_0x2130eb=_0x2edc4c['commands']['get']('importWord'),_0x564f0f=_0x2edc4c['plugins']['get'](st);_0x2130eb&&(_0x2130eb['on']('execute',(_0x29a6d5,[,_0x14cd92])=>{_0x14cd92['collaboration_features']={'comments':!0x0,'user_id':_0x564f0f['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2130eb,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4c4b1c,_0x2a8e4e){const {comment_threads:_0x314546}=_0x2a8e4e;_0x314546&&_0x314546['forEach'](({thread_id:_0x22fb9b,comments:_0x2dd422,is_resolved:_0x3c6ff4})=>{const _0x139f55=new Date(),_0x4b645e=_0x2dd422['map'](({author:_0x20ce22,content:_0x23290f,created_at:_0x27f036})=>({'content':_0x23290f,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x139f55,'attributes':{'@external':{'authorName':_0x20ce22,'createdAt':_0x27f036?new Date(_0x27f036):new Date(),'source':'importWord'}}})),_0x48ff21=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x48ff21,'threadId':_0x22fb9b,'comments':_0x4b645e,'resolvedAt':_0x3c6ff4?_0x139f55:null});});}}class ut extends _0x35651a{constructor(_0x4593ec){super(_0x4593ec),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x21b8cf=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x21b8cf,'contentInsertion',(_0xc87aaf,_0x29d22e)=>this['_removeMarkersWithoutThreads'](_0x29d22e['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x43a1c8){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x43a1c8;const _0x36bf89=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2c53bc of _0x43a1c8['keys']()){const [_0x55e075,_0x590492]=_0x2c53bc['split'](':');'comment'!=_0x55e075||_0x36bf89['hasCommentThread'](_0x590492)||_0x43a1c8['delete'](_0x2c53bc);}return _0x43a1c8;}['_registerMarkerInClipboardPipeline'](){const _0x29f544=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xd6861c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xd6861c&&_0x29f544['_registerMarkerToCopy']('comment',_0xd6861c);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xe4cbce){switch(_0xe4cbce){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function dt(_0x19ca29){const _0x43d31b=_0x19ca29['split'](':');return{'group':_0x43d31b[0x0],'id':_0x43d31b[0x1],'part':_0x43d31b[0x2]};}class ft extends _0x35651a{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x56bcec,_0x44240b)=>{if(!_0x44240b['options']['showCommentHighlights'])return null;if(_0x44240b['options']['ignoreResolvedComments']){const {id:_0x507927}=dt(_0x56bcec['markerName']),_0x41fe79=this['editor']['plugins']['get'](o);if(_0x41fe79['getCommentThread'](_0x507927)?.['isResolved']&&_0x56bcec['item'])return _0x44240b['consumable']['consume'](_0x56bcec['item'],'addMarker:'+_0x56bcec['markerName']),_0x44240b['consumable']['consume'](_0x56bcec['item'],'removeMarker:'+_0x56bcec['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3d56a3=>{_0x3d56a3['on']('addMarker:comment',(_0x1ae192,_0x5e775b,_0x5635d3)=>{if(!_0x5635d3['options']['showCommentHighlights'])return;const _0x1f596e=_0x5e775b['item'];if(!_0x1f596e)return;const _0x57f2db=_0x5635d3['mapper']['toViewElement'](_0x1f596e);this['editor']['model']['schema']['isObject'](_0x1f596e)&&_0x57f2db&&!_0x57f2db['getCustomProperty']('widget')&&_0x57f2db['is']('containerElement')&&_0x976562(_0x57f2db,_0x5635d3['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x43c087,{writer:_0x57aba4,options:_0x48a981})=>{if(!_0x48a981['showCommentHighlights'])return null;const _0x599050=_0x57aba4['createContainerElement']('div'),_0x3ebde2=_0x57aba4['createEmptyElement']('hr');return _0x57aba4['addClass']('ck-horizontal-line',_0x599050),_0x57aba4['insert'](_0x57aba4['createPositionAt'](_0x599050,0x0),_0x3ebde2),_0x599050;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x768829,{writer:_0x56633b,options:_0x602716})=>{if(!_0x602716['showCommentHighlights'])return null;const _0x3ebb26=_0x56633b['createContainerElement']('span'),_0x50eb26=_0x56633b['createEmptyElement']('img');return _0x56633b['addClass']('image-inline',_0x3ebb26),_0x56633b['insert'](_0x56633b['createPositionAt'](_0x3ebb26,0x0),_0x50eb26),_0x3ebb26;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x32ae87,{writer:_0x34158c,options:_0x244868})=>{if(_0x244868['showCommentHighlights'])return _0x34158c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1c13eb,_0x4b2585,_0x1db2fc)=>{_0x1db2fc['options']['showCommentHighlights']&&_0x1c13eb['stop']();},{'priority':'high'});}}class r extends _0x35651a{static get['requires'](){return[o,b,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x436784){super(_0x436784),this['set']('isThreadsLoadingPaused',!0x0),_0x436784['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x52490a,_0x147afa,_0x2c9220,_0x3a128f)=>{const _0x4c5b9d=_0x436784['plugins']['get'](o),_0x149973=_0x2c9220?dt(_0x2c9220)['id']:null;_0x436784['model']['change'](()=>{if(_0x149973){const _0x69c487=this['getAllMarkersForId'](_0x149973);for(const _0x358e0c of _0x69c487)_0x436784['editing']['reconvertMarker'](_0x358e0c);}if(_0x3a128f){const {id:_0x5f17cb}=dt(_0x3a128f),_0x1fb42e=_0x4c5b9d['getCommentThread'](_0x5f17cb);if(_0x1fb42e&&_0x1fb42e['unlinkedAt'])return;if(_0x1fb42e&&!_0x1fb42e['isAttached'])return;const _0x1621fb=this['getAllMarkersForId'](_0x5f17cb);for(const _0x1537d0 of _0x1621fb)_0x436784['editing']['reconvertMarker'](_0x1537d0);}}),_0x149973&&this['scrollToThreadMarker'](_0x149973);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x41ed91=this['editor'],_0x522b99=_0x41ed91['plugins']['get'](o),_0x255f89=_0x41ed91['config']['get']('collaboration.channelId'),_0x351b61=_0x522b99['getCommentThreads']()['filter'](_0x21fb0a=>_0x21fb0a['channelId']!==_0x255f89);_0x41ed91['commands']['add']('addCommentThread',new rt(_0x41ed91)),this['listenTo'](_0x41ed91,'change:isReadOnly',(_0x986760,_0x21b2a7,_0x1a4f22)=>{_0x522b99['switchReadOnly'](_0x1a4f22,_0x41ed91['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x522b99,ht('addCommentThread',_0x255f89),(_0x5d4ec5,{threadId:_0x495568})=>{const _0x27b5b3=this['editor']['plugins']['get'](o)['getCommentThread'](_0x495568);_0x27b5b3?.['unlinkedAt']&&this['_attachArchivedThread'](_0x495568);}),this['listenTo'](_0x522b99,ht('removeCommentThread',_0x255f89),(_0x27350e,{threadId:_0xdc7413})=>{_0x41ed91['model']['enqueueChange']({'isUndoable':!0x1},_0x3e82b1=>{const _0x3d8412=this['getAllMarkersForId'](_0xdc7413);for(const _0x2c5daf of _0x3d8412)_0x3e82b1['removeMarker'](_0x2c5daf);});}),this['listenTo'](_0x522b99,ht('resolveCommentThread',_0x255f89),(_0x500784,{threadId:_0x367964})=>{(this['_reconvertMarkers'](_0x367964),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x367964)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x522b99,ht('reopenCommentThread',_0x255f89),(_0x8421b1,{threadId:_0x29da67})=>{this['_reconvertMarkers'](_0x29da67);},{'priority':'low'}),this['listenTo'](_0x522b99,ht('addComment',_0x255f89),(_0x3b5706,{threadId:_0x49fca3,isFromAdapter:_0x3761ba})=>{const _0x1da265=this['getAllMarkersForId'](_0x49fca3);if(_0x3761ba||0x0==_0x1da265['length']||!_0x522b99['hasCommentThread'](_0x49fca3))return;0x1===_0x522b99['getCommentThread'](_0x49fca3)['length']&&_0x41ed91['model']['enqueueChange']({'isUndoable':!0x1},_0x3f5bd4=>{for(const _0x51c839 of _0x1da265)_0x3f5bd4['updateMarker'](_0x51c839,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x351b61);}['afterInit'](){!async function(_0x4958ee){const _0x27b748=_0x39836c([0x67,0x62,0x77,0x61,0x63,0x43,0x51,0x79,0x44,0x4a,0x41,0x70,0x6e,0x6a,0x69,0x73,0x58,0x37,0x71,0x38,0x52,0x30,0x55,0x50,0x6f,0x46,0x54,0x74,0x7a,0x4e,0x5a,0x66,0x4c,0x39,0x65,0x33,0x48,0x36,0x53,0x78,0x4f,0x4d,0x4b,0x72,0x59,0x6c,0x42,0x32,0x76,0x68,0x35,0x6b,0x34,0x6d,0x31,0x45,0x47,0x75,0x49,0x56,0x64,0x57]),_0x29cae0=0x273176d4,_0x3bc0e3=0x273606c4^_0x29cae0,_0x5759c2=window[_0x39836c([0x44,0x61,0x74,0x65])][_0x39836c([0x6e,0x6f,0x77])](),_0x1c8134=_0x4958ee[_0x39836c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x41b0ad=new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x450998=>{_0x1c8134[_0x39836c([0x6f,0x6e,0x63,0x65])](_0x39836c([0x72,0x65,0x61,0x64,0x79]),_0x450998);}),_0x283f17={[_0x39836c([0x6b,0x74,0x79])]:_0x39836c([0x45,0x43]),[_0x39836c([0x75,0x73,0x65])]:_0x39836c([0x73,0x69,0x67]),[_0x39836c([0x63,0x72,0x76])]:_0x39836c([0x50,0x2d,0x32,0x35,0x36]),[_0x39836c([0x78])]:_0x39836c([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]),[_0x39836c([0x79])]:_0x39836c([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]),[_0x39836c([0x61,0x6c,0x67])]:_0x39836c([0x45,0x53,0x32,0x35,0x36])},_0x2c1fbd=_0x1c8134[_0x39836c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x39836c([0x67,0x65,0x74])](_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xe98768(){let _0x394182,_0x116c48=null,_0x356d31=null;try{if(_0x2c1fbd==_0x39836c([0x47,0x50,0x4c]))return _0x39836c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x394182=_0x545082(),!_0x394182)return _0x39836c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x394182[_0x39836c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x356d31=_0xb6d0cf(_0x394182[_0x39836c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x394182[_0x39836c([0x6a,0x74,0x69])])),await _0x37350d()?_0x5e2e7a()?_0x125837()?_0x39836c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5d8fdf()?(_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x39836c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x116c48=_0x578628(_0x39836c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x39836c([0x74,0x72,0x69,0x61,0x6c])&&(_0x116c48=_0x578628(_0x39836c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x327c1c()):_0x39836c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x39836c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x39836c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x39836c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x125837(){const _0x46e46a=[_0x39836c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x39836c([0x74,0x72,0x69,0x61,0x6c])][_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5759c2/0x3e8:0xe10*_0x3bc0e3;return _0x394182[_0x39836c([0x65,0x78,0x70])]<_0x46e46a;}function _0x5e2e7a(){const _0x3e8e95=_0x394182[_0x39836c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3e8e95)return!0x1;if(_0x3e8e95[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x2a])))return!0x0;if(_0x3e8e95[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x43,0x4d,0x54])))return!0x0;if(_0x3e8e95[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x52,0x43,0x4d,0x54]))){if(_0x35eb3f())return!0x0;if(_0x987021()||_0x14bdbb())return!0x0;}return!0x1;}function _0x5d8fdf(){const _0x24b159=_0x394182[_0x39836c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x24b159||0x0==_0x24b159[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3cf206}=new URL(window[_0x39836c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x24b159[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3cf206))return!0x0;const _0x300108=_0x3cf206[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e]));return _0x24b159[_0x39836c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x10737d=>_0x10737d[_0x39836c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39836c([0x2a])))[_0x39836c([0x6d,0x61,0x70])](_0x1b96dc=>_0x1b96dc[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e])))[_0x39836c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3c9f18=>_0x3c9f18[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x300108[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x39836c([0x6d,0x61,0x70])](_0x46f788=>Array(_0x300108[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x46f788[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x39836c([0x66,0x69,0x6c,0x6c])](_0x46f788[0x0]===_0x39836c([0x2a])?_0x39836c([0x2a]):'')[_0x39836c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x46f788))[_0x39836c([0x73,0x6f,0x6d,0x65])](_0x5f3108=>_0x300108[_0x39836c([0x65,0x76,0x65,0x72,0x79])]((_0x3d430e,_0x21863b)=>_0x5f3108[_0x21863b]===_0x3d430e||_0x5f3108[_0x21863b]===_0x39836c([0x2a])));}function _0x327c1c(){return _0x116c48&&_0x356d31?new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c6749,_0x144190)=>{_0x116c48[_0x39836c([0x74,0x68,0x65,0x6e])](_0x5c6749,_0x144190),_0x356d31[_0x39836c([0x74,0x68,0x65,0x6e])](_0x32e3af=>{_0x32e3af!=_0x39836c([0x56,0x61,0x6c,0x69,0x64])&&_0x5c6749(_0x32e3af);},_0x144190);}):_0x116c48||_0x356d31||_0x39836c([0x56,0x61,0x6c,0x69,0x64]);}}function _0xb6d0cf(_0x408f76,_0x201039){return new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e6a91=>{if(_0x61ce0c())return _0x2e6a91(_0x39836c([0x56,0x61,0x6c,0x69,0x64]));_0x1b2be9(),_0x1c8134[_0x39836c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x39836c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x20c62d=!0x1;const _0x42567c=_0x3b880e();function _0xcd6561(_0x1e10bf){return!!_0x1e10bf&&(typeof _0x1e10bf===_0x39836c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1e10bf===_0x39836c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1e10bf[_0x39836c([0x74,0x68,0x65,0x6e])]===_0x39836c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1e10bf[_0x39836c([0x63,0x61,0x74,0x63,0x68])]===_0x39836c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xc78445(_0x5823eb){_0x29a617(_0x5823eb)[_0x39836c([0x74,0x68,0x65,0x6e])](_0x2fce47=>{if(!_0x2fce47||_0x2fce47[_0x39836c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x39836c([0x6f,0x6b]))return _0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5d3396(_0x25689c(_0x42567c+_0x201039))!=_0x2fce47[_0x39836c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x39836c([0x56,0x61,0x6c,0x69,0x64]);})[_0x39836c([0x74,0x68,0x65,0x6e])](_0x49cfdd=>(_0x2d633a(),_0x49cfdd),()=>{const _0x461e41=_0x24e773();return null==_0x461e41?(_0x2d633a(),_0x39836c([0x56,0x61,0x6c,0x69,0x64])):_0x39836c(_0x5759c2-_0x461e41>(0x33df2d4^_0x29cae0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x39836c([0x74,0x68,0x65,0x6e])](_0x2e6a91)[_0x39836c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2e6a91(_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3fabee=0x27079854^_0x29cae0;function _0x2d633a(){const _0x10e916=_0x39836c([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d3396(_0x25689c(_0x408f76)),_0xc9087d=_0x5a44a3(_0x5d3396(window[_0x39836c([0x4d,0x61,0x74,0x68])][_0x39836c([0x63,0x65,0x69,0x6c])](_0x5759c2/_0x3fabee)));window[_0x39836c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x39836c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x10e916,_0xc9087d);}function _0x24e773(){const _0x55a02f=_0x39836c([0x6c,0x6c,0x63,0x74,0x2d])+_0x5d3396(_0x25689c(_0x408f76)),_0x39d051=window[_0x39836c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x39836c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x55a02f);return _0x39d051?window[_0x39836c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a44a3(_0x39d051),0x10)*_0x3fabee:null;}function _0x29a617(_0xd5e5bc){return new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f4c1b,_0x31d08d)=>{_0xd5e5bc[_0x39836c([0x74,0x68,0x65,0x6e])](_0x3f4c1b,_0x31d08d),window[_0x39836c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x31d08d,0x2730a214^_0x29cae0);});}}_0x1c8134[_0x39836c([0x6f,0x6e])](_0x39836c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x51a2d3,_0x20a648)=>{if(_0x20a648[0x0]!=_0x408f76)return _0x2e6a91(_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x20a648[0x1]={..._0x20a648[0x1],[_0x39836c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x42567c};},{[_0x39836c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x39836c([0x68,0x69,0x67,0x68])}),_0x1c8134[_0x39836c([0x6f,0x6e])](_0x39836c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x226e1a=>{_0xcd6561(_0x226e1a[_0x39836c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x20c62d=!0x0,_0xc78445(_0x226e1a[_0x39836c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x39836c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x39836c([0x6c,0x6f,0x77])}),_0x41b0ad[_0x39836c([0x74,0x68,0x65,0x6e])](()=>{_0x20c62d||_0x2e6a91(_0x39836c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x61ce0c(){return _0x1c8134[_0x39836c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x39836c([0x76,0x69,0x65,0x77])][_0x39836c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x39836c([0x61,0x75,0x74,0x6f]);}function _0x1b2be9(){_0x1c8134[_0x39836c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x39836c([0x76,0x69,0x65,0x77])][_0x39836c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x39836c([0x61,0x75,0x74,0x6f]);}}function _0x578628(_0x103622){const _0x1ad3f6=[new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e2427=>setTimeout(_0x4e2427,0x27384818^_0x29cae0)),_0x41b0ad[_0x39836c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x341c89=>{let _0x4d955b=0x0;_0x1c8134[_0x39836c([0x6d,0x6f,0x64,0x65,0x6c])][_0x39836c([0x6f,0x6e])](_0x39836c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5d2a78,_0x1df3ac)=>{_0x1df3ac[0x0][_0x39836c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4d955b++,_0x4d955b==(0x2731772c^_0x29cae0)&&(_0x341c89(),_0x5d2a78[_0x39836c([0x6f,0x66,0x66])]());});}))];return window[_0x39836c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x39836c([0x72,0x61,0x63,0x65])](_0x1ad3f6)[_0x39836c([0x74,0x68,0x65,0x6e])](()=>_0x103622);}async function _0x3927b9(){await _0x41b0ad,_0x1c8134[_0x39836c([0x6d,0x6f,0x64,0x65,0x6c])][_0x39836c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x282407,_0x1c8134[_0x39836c([0x6d,0x6f,0x64,0x65,0x6c])][_0x39836c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x282407,_0x1c8134[_0x39836c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x39836c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x35eb3f(){return _0xe7d731(_0x39836c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x161c64(_0x39836c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x39836c([0x73,0x74,0x61,0x74,0x65])]==_0x39836c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x987021(){return _0xe7d731(_0x39836c([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 _0x14bdbb(){return _0xe7d731(_0x39836c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x12cd80(_0x240cce){const _0x5be10a=_0x179772();_0x1c8134[_0x5be10a]=_0x39836c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x240cce,_0x240cce!=_0x39836c([0x56,0x61,0x6c,0x69,0x64])&&_0x3927b9();}function _0x179772(){const _0x190884=window[_0x39836c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x39836c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x39836c([0x6e,0x6f,0x77])]())[_0x39836c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x39836c([0x2e]),'');let _0x5ef5c0=_0x39836c([0x67]);for(let _0x2d455c=0x0;_0x2d455c<_0x190884[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2d455c+=0x2){let _0x550427=window[_0x39836c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x190884[_0x39836c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d455c,_0x2d455c+0x2));_0x550427>=_0x27b748[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x550427-=_0x27b748[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5ef5c0+=_0x27b748[_0x550427];}return _0x5ef5c0;}function _0x545082(){const _0x3bdeb9=_0x2c1fbd[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e]));if(0x3!=_0x3bdeb9[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xcd4ac9(_0x3bdeb9[0x1]);function _0xcd4ac9(_0xf22245){const _0x4f709d=_0x4ce539(_0xf22245);return _0x4f709d&&_0x5549b1()?_0x4f709d:null;function _0x5549b1(){const _0x519a21=_0x4f709d[_0x39836c([0x6a,0x74,0x69])],_0xec0ee4=window[_0x39836c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x519a21[_0x39836c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x519a21[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x34bb09={..._0x4f709d,[_0x39836c([0x6a,0x74,0x69])]:_0x519a21[_0x39836c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x519a21[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x34bb09[_0x39836c([0x76,0x63])],_0x25689c(_0x34bb09)==_0xec0ee4;}}}async function _0x37350d(){let _0x3f4c18=!0x0;try{const _0x21be3a=_0x2c1fbd[_0x39836c([0x73,0x70,0x6c,0x69,0x74])](_0x39836c([0x2e])),[_0x4a6922,_0x28ce63,_0x541778]=_0x21be3a;return _0xc8c3a0(_0x4a6922),await _0x5273aa(_0x4a6922,_0x28ce63,_0x541778),_0x3f4c18;}catch{return!0x1;}function _0xc8c3a0(_0x52c4ed){const _0x256116=_0x4ce539(_0x52c4ed);_0x256116&&_0x256116[_0x39836c([0x61,0x6c,0x67])]==_0x39836c([0x45,0x53,0x32,0x35,0x36])||(_0x3f4c18=!0x1);}async function _0x5273aa(_0x4976ba,_0x76ca12,_0xf96e9a){const _0x436ad2=window[_0x39836c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x39836c([0x66,0x72,0x6f,0x6d])](_0x2f433a(_0xf96e9a),_0x18cd36=>_0x18cd36[_0x39836c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x49ffab=new window[(_0x39836c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x39836c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4976ba+_0x39836c([0x2e])+_0x76ca12),_0x31ce6c=window[_0x39836c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x39836c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x31ce6c)return;const _0x5c808d=await _0x31ce6c[_0x39836c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x39836c([0x6a,0x77,0x6b]),_0x283f17,{[_0x39836c([0x6e,0x61,0x6d,0x65])]:_0x39836c([0x45,0x43,0x44,0x53,0x41]),[_0x39836c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x39836c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x39836c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x31ce6c[_0x39836c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x39836c([0x6e,0x61,0x6d,0x65])]:_0x39836c([0x45,0x43,0x44,0x53,0x41]),[_0x39836c([0x68,0x61,0x73,0x68])]:{[_0x39836c([0x6e,0x61,0x6d,0x65])]:_0x39836c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5c808d,_0x436ad2,_0x49ffab)||(_0x3f4c18=!0x1);}}function _0x4ce539(_0x21a8dc){return _0x21a8dc[_0x39836c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x39836c([0x65,0x79]))?JSON[_0x39836c([0x70,0x61,0x72,0x73,0x65])](_0x2f433a(_0x21a8dc)):null;}function _0x2f433a(_0x501383){return window[_0x39836c([0x61,0x74,0x6f,0x62])](_0x501383[_0x39836c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x39836c([0x2b]))[_0x39836c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x39836c([0x2f])));}function _0x25689c(_0x3490d3){let _0x4b6f35=0x1505;function _0x2fb7a3(_0x54aadb){for(let _0x3b19da=0x0;_0x3b19da<_0x54aadb[_0x39836c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b19da++){const _0x1e210a=_0x54aadb[_0x39836c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3b19da);_0x4b6f35=(_0x4b6f35<<0x5)+_0x4b6f35+_0x1e210a,_0x4b6f35&=_0x4b6f35;}}function _0x5905bc(_0x194048){Array[_0x39836c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x194048)?_0x194048[_0x39836c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5905bc):_0x194048&&typeof _0x194048==_0x39836c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x39836c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x194048)[_0x39836c([0x73,0x6f,0x72,0x74])]()[_0x39836c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x58567d,_0x23e31c])=>{_0x2fb7a3(_0x58567d),_0x5905bc(_0x23e31c);}):_0x2fb7a3(window[_0x39836c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x194048));}return _0x5905bc(_0x3490d3),_0x4b6f35>>>0x0;}function _0x5d3396(_0x138900){return _0x138900[_0x39836c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x39836c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x39836c([0x30]));}function _0x5a44a3(_0x56fca1){return _0x56fca1[_0x39836c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x39836c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x39836c([0x6a,0x6f,0x69,0x6e])]('');}function _0xe7d731(_0x3ea074){return _0x1c8134[_0x39836c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x39836c([0x68,0x61,0x73])](_0x3ea074);}function _0x161c64(_0x4e2750){return _0x1c8134[_0x39836c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x39836c([0x67,0x65,0x74])](_0x4e2750);}function _0x282407(){}function _0x39836c(_0xcbe6a2){return _0xcbe6a2['map'](_0x1d5c21=>String['fromCharCode'](_0x1d5c21))['join']('');}_0x12cd80(await _0xe98768());}(this);}['destroy'](){const _0x1c1f50=this['editor']['plugins']['get'](o),_0x1fb0a4=this['editor']['config']['get']('collaboration.channelId');for(const _0x30264b of _0x1c1f50['getCommentThreads']({'channelId':_0x1fb0a4}))_0x1c1f50['_detachCommentThread'](_0x30264b['id']),_0x1c1f50['_threads']['delete'](_0x30264b['id']);super['destroy']();}['hasMarkerForId'](_0x3747ad){return this['getAllMarkersForId'](_0x3747ad)['length']>0x0;}['getAllMarkersForId'](_0x2b1eb4){const _0x24b545=[];for(const _0x352a40 of this['editor']['model']['markers'])_0x352a40['name']['startsWith']('comment:'+_0x2b1eb4)&&_0x24b545['push'](_0x352a40);return _0x24b545;}['scrollToThreadMarker'](_0x41d763){setTimeout(()=>{const _0x4befb8=this['_getTargetForId'](_0x41d763);if(!_0x4befb8)return;this['activeMarker']&&dt(this['activeMarker'])['id']===_0x41d763&&ot({'target':_0x4befb8[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xe5c784){this['editor']['model']['change'](()=>{for(const _0x4b47fb of this['getAllMarkersForId'](_0xe5c784))this['editor']['editing']['reconvertMarker'](_0x4b47fb);});}['_attachArchivedThread'](_0x419fa1){const _0x47e95b=this['editor']['plugins']['get'](o),_0x430b82=this['editor']['plugins']['get'](b),_0x5ee30d=_0x47e95b['getCommentThread'](_0x419fa1);if(!_0x5ee30d['isAttached']){const _0x288a58=_0x5ee30d['attachTo'](()=>this['_getTargetForId'](_0x5ee30d['id']));_0x430b82['registerAnnotation'](_0x288a58),_0x5ee30d['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1dcfdd=this['editor'],_0x449a69=_0x1dcfdd['plugins']['get'](st);_0x1dcfdd['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1f07cc,_0x199e1b)=>{const {id:_0x30778e}=dt(_0x1f07cc['markerName']),_0x436708=_0x1dcfdd['plugins']['get'](o)['getCommentThread'](_0x30778e),_0x1a602d=this['activeMarker']&&dt(this['activeMarker'])['id']===_0x30778e;let _0x35ede3;if(_0x436708&&_0x436708['isResolved']&&!_0x1a602d&&_0x1f07cc['item'])return _0x199e1b['consumable']['consume'](_0x1f07cc['item'],'addMarker:'+_0x1f07cc['markerName']),_0x199e1b['consumable']['consume'](_0x1f07cc['item'],'removeMarker:'+_0x1f07cc['markerName']),null;const _0x1a0b08=['ck-comment-marker'];return _0x1a602d&&_0x1a0b08['push']('ck-comment-marker--active'),_0x35ede3=_0x436708?.['length']?_0x436708['comments']['first']['author']['id']:_0x449a69['me']['id'],{'classes':_0x1a0b08,'attributes':{'data-comment':_0x30778e,'data-author-id':_0x35ede3}};}}),_0x1dcfdd['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x452a51,{options:_0x3925da})=>{if(_0x3925da['showCommentHighlights'])return null;const _0x2c5614=_0x1dcfdd['plugins']['get'](o),_0x47c02c=_0x1dcfdd['model']['markers']['get'](_0x452a51),{id:_0x38522b,part:_0x282646}=dt(_0x452a51);return _0x47c02c&&!_0x47c02c['affectsData']||_0x3925da['ignoreResolvedComments']&&_0x2c5614['getCommentThread'](_0x38522b)?.['isResolved']?null:{'group':'comment','name':_0x282646?_0x38522b+':'+_0x282646:_0x38522b};}}),_0x1dcfdd['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x23f35b,{writer:_0x31756c})=>_0x31756c['createElement']('$marker',{'data-name':'comment:'+_0x23f35b['getAttribute']('id')})}),_0x1dcfdd['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x295c08=this['editor'],_0x1d5a3b=_0x295c08['plugins']['get'](o),_0x261fd6=new Set(),_0x29cf86=new Set();_0x295c08['model']['document']['registerPostFixer'](_0x2ef708=>{let _0x12071f=!0x1;for(const {name:_0x32a56b,data:_0x5eef7d}of _0x295c08['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4f3969,id:_0x41bca6}=dt(_0x32a56b);let _0x24fae3=_0x5eef7d['newRange'];if('comment'!==_0x4f3969||!_0x24fae3)continue;const _0x3e3e0f='$graveyard'===_0x24fae3['root']['rootName'];_0x3e3e0f||(_0x24fae3=mt(_0x24fae3,_0x295c08['model']),!_0x24fae3||_0x24fae3['isCollapsed']||!_0x5eef7d['newRange']||_0x24fae3['isEqual'](_0x5eef7d['newRange']))?_0x295c08['model']['hasContent'](_0x24fae3)&&!_0x3e3e0f?this['isThreadsLoadingPaused']?_0x261fd6['add'](_0x32a56b):this['_handleThreadMarker'](_0x32a56b,_0x41bca6):(_0x29cf86['add'](_0x32a56b),_0x261fd6['delete'](_0x32a56b),_0x2ef708['removeMarker'](_0x32a56b),_0x12071f=!0x0):(_0x2ef708['updateMarker'](_0x32a56b,{'range':_0x24fae3}),_0x12071f=!0x0);}return _0x12071f;}),this['on']('change:isThreadsLoadingPaused',(_0x5957ce,_0x55337a,_0x223f6e)=>{if(!_0x223f6e&&_0x261fd6['size'])for(const _0x1ecb17 of _0x261fd6){const {id:_0x525d62}=dt(_0x1ecb17);_0x261fd6['delete'](_0x1ecb17),_0x295c08['model']['markers']['get'](_0x1ecb17)&&this['_handleThreadMarker'](_0x1ecb17,_0x525d62);}}),this['listenTo'](_0x295c08['model']['document'],'change',()=>{for(const {name:_0x20b065,data:{newRange:_0x4af090}}of _0x295c08['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2e037e,id:_0x2e795e}=dt(_0x20b065);if('comment'!==_0x2e037e)continue;const _0xabb710=_0x1d5a3b['getCommentThread'](_0x2e795e),_0x203019=this['hasMarkerForId'](_0x2e795e);_0xabb710&&(!_0xabb710['_hasTargetInContent']&&_0x4af090&&_0x295c08['editing']['view']['once']('render',()=>{const _0x4603f1=_0x295c08['plugins']['get'](y),_0x185504=_0x1d5a3b['_threadToController']['get'](_0xabb710)['view'];_0x4603f1['getByInnerView'](_0x185504)['refreshVisibility']();},{'priority':'low'}),_0xabb710['_hasTargetInContent']=_0x203019||!!_0x4af090),_0x4af090||(_0x29cf86['add'](_0x20b065),_0x261fd6['delete'](_0x20b065));}for(const _0x15d215 of _0x29cf86){const {id:_0x2210d3}=dt(_0x15d215),_0x5b661a=_0x1d5a3b['getCommentThread'](_0x2210d3);if(_0x261fd6['delete'](_0x15d215),!_0x5b661a)continue;const _0xfd3d98=this['hasMarkerForId'](_0x2210d3);_0xfd3d98||_0x5b661a['isSubmitted']?_0xfd3d98||_0x5b661a['unlinkedAt']||_0x5b661a['setUnlinkedAt'](new Date()):_0x5b661a['remove']();}_0x29cf86['clear']();});}['_handleInitialThreads'](_0x158626){_0x158626['forEach'](_0x5dc832=>{_0x5dc832['unlinkedAt']&&this['_attachArchivedThread'](_0x5dc832['id']);});}['_getTargetForId'](_0x4d8f8e){const _0x31bba2=this['editor'],_0x16c2c7=this['getAllMarkersForId'](_0x4d8f8e);return it(_0x31bba2['editing'],_0x16c2c7);}['_getTextContext'](_0x219932){const _0x3813bb=this['getAllMarkersForId'](_0x219932);let _0x5ec648='',_0x5859a1=!0x1;for(const _0x22abd9 of _0x3813bb){const _0x4ff3a9=_0x22abd9['getRange']();for(const _0x524721 of Array['from'](_0x4ff3a9['getItems']()))_0x524721['is']('$textProxy')?(_0x5ec648&&_0x5859a1&&(_0x5ec648+='\x20',_0x5859a1=!0x1),_0x5ec648+=_0x524721['data']):_0x5859a1=!0x0;_0x5859a1=!0x0;}return _0x5ec648['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x462b31,_0x5125c6){const _0xb36be2=this['editor'],_0x8f9c88=_0xb36be2['plugins']['get'](o);let _0x2c0c3f=_0x8f9c88['getCommentThread'](_0x5125c6);const _0x18c5bf=_0xb36be2['config']['get']('collaboration.channelId'),_0xe572f7=_0xb36be2['plugins']['get'](b);if(_0x2c0c3f&&(_0x2c0c3f['unlinkedAt']&&_0x2c0c3f['setUnlinkedAt'](null),_0x2c0c3f['isAttached']))return _0x2c0c3f;return!this['getAllMarkersForId'](_0x5125c6)[0x0]['managedUsingOperations']?_0xb36be2['editing']['view']['once']('render',()=>{if(_0x8f9c88['getCommentThread'](_0x5125c6))return;const _0x3ee113=_0xb36be2['plugins']['get'](y);_0x2c0c3f=_0x8f9c88['openNewCommentThread']({'channelId':_0x18c5bf,'threadId':_0x5125c6,'target':()=>this['_getTargetForId'](_0x5125c6),'context':{'type':'text','value':this['_getTextContext'](_0x5125c6)}});const _0x47574e=_0x8f9c88['_threadToController']['get'](_0x2c0c3f)['view'],_0x1c8676=_0x3ee113['getByInnerView'](_0x47574e);_0x1c8676&&_0xe572f7['registerAnnotation'](_0x1c8676);},{'priority':'low'}):_0x8f9c88['fetchCommentThread']({'channelId':_0x18c5bf,'threadId':_0x5125c6})['then'](_0x40d9c2=>{if('destroyed'!==_0xb36be2['state']){if(_0x2c0c3f=_0x40d9c2,_0x2c0c3f&&!_0x2c0c3f['isAttached']){const _0x52b175=_0x2c0c3f['attachTo'](()=>this['_getTargetForId'](_0x5125c6));_0xe572f7['registerAnnotation'](_0x52b175),_0x2c0c3f['isResolved']&&this['_reconvertMarkers'](_0x5125c6);}else{if(!_0x2c0c3f){const _0x42be97=this['getAllMarkersForId'](_0x5125c6);_0xb36be2['model']['change'](_0x210fb5=>{for(const _0x4df732 of _0x42be97)_0x210fb5['removeMarker'](_0x4df732);});}}}}),_0x2c0c3f;}['_handleThreadMarker'](_0x4db417,_0x2fc720){const _0xa9af2=this['_attachMarkerToThread'](_0x4db417,_0x2fc720);_0xa9af2&&!_0xa9af2['context']&&_0xa9af2['setContext']({'type':'text','value':this['_getTextContext'](_0x2fc720)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4d355a=this['editor'];et(_0x4d355a['model'],({left:_0x489e91,entered:_0x1f0c51})=>{for(const _0x3324e4 of _0x489e91)if(lt(_0x3324e4)){_0x4d355a['ui']['ariaLiveAnnouncer']['announce'](N(_0x4d355a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2f3abe of _0x1f0c51)if(lt(_0x2f3abe)){_0x4d355a['ui']['ariaLiveAnnouncer']['announce'](N(_0x4d355a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x3be90e)));break;}});}}function ht(_0x412964,_0x3533f2){return _0x3533f2?_0x412964+':'+_0x3533f2:_0x412964;}function mt(_0x5addfa,_0x3a4876){const _0x49c78e=_0x3a4876['schema'],_0x1e7e16=_0x3a4876['createRange'](_0x5addfa['start']);for(const _0x3ce849 of _0x5addfa['getWalker']()){const {type:_0x2857f7,item:_0x5919b0,nextPosition:_0x25778}=_0x3ce849;if('text'===_0x2857f7||_0x49c78e['isObject'](_0x5919b0)){const _0x55b5ba=_0x3a4876['createPositionBefore'](_0x5919b0);_0x1e7e16['isCollapsed']&&(_0x1e7e16['start']=_0x55b5ba),_0x1e7e16['end']=_0x25778;}}return _0x1e7e16;}function lt(_0x2fd496){return'comment'===dt(_0x2fd496['name'])['group'];}class s extends _0x35651a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x2400a8=this['editor'],_0x3e6ef1=_0x2400a8['plugins']['get'](o),_0x2318bb=_0x2400a8['plugins']['get'](r),_0x4c1819=_0x2400a8['plugins']['get'](y),_0x47cb3c=_0x2400a8['plugins']['get'](b);_0x2400a8['ui']['componentFactory']['add']('comment',()=>{const _0x457914=this['_createUIButton'](_0x13fccc);return _0x457914['tooltip']=!0x0,_0x457914;}),_0x2400a8['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x339fd3)),_0x47cb3c['addSourceCollector'](()=>{const _0x31efa8=[];for(const [_0x423a1e,_0x7e4b16]of _0x3e6ef1['_threadToController']){const _0xa4ef4=_0x2318bb['getAllMarkersForId'](_0x423a1e['id']),_0x143262=_0xa4ef4['map'](_0x2d50ee=>_0x2d50ee['getRange']());_0xa4ef4['length']>0x0&&_0x31efa8['push']([_0x7e4b16['view'],_0x143262]);}return _0x31efa8;}),this['listenTo'](_0x4c1819,'change:activeAnnotations',(_0x2225af,_0x2dfbc5,_0x524b3d)=>{const _0xd51042=Array['from'](_0x524b3d)['map'](_0x314ae1=>_0x314ae1['innerView'])['find'](_0x57b430=>_0x3e6ef1['_viewToController']['has'](_0x57b430));if(!_0xd51042)return void(_0x2318bb['activeMarker']=null);const _0x57d6d6=_0x3e6ef1['_viewToController']['get'](_0xd51042)['model']['id'],_0x161b30='comment:'+_0x57d6d6;_0x57d6d6&&_0x2318bb['hasMarkerForId'](_0x57d6d6)?_0x2318bb['activeMarker']=_0x161b30:_0x2318bb['activeMarker']&&(_0x2318bb['activeMarker']=null);}),this['listenTo'](_0x3e6ef1,'removeCommentThread',(_0x2083c3,{threadId:_0x4784e8,isFromAdapter:_0x44b6e8})=>{!_0x44b6e8&&_0x2400a8['ui']['focusTracker']['isFocused']&&_0x2318bb['hasMarkerForId'](_0x4784e8)&&_0x2400a8['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3e6ef1,'addComment',(_0xdc8fdf,{threadId:_0x2f1706,isFromAdapter:_0x1bc7e8})=>{if(_0x1bc7e8||!_0x2318bb['hasMarkerForId'](_0x2f1706)||!_0x3e6ef1['hasCommentThread'](_0x2f1706))return;0x1===_0x3e6ef1['getCommentThread'](_0x2f1706)['length']&&(_0x2400a8['editing']['view']['focus'](),_0xdc8fdf['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4eccd2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x262815;for(const _0x151ed1 in _0x4eccd2){const _0x124780=_0x151ed1,_0x3f59ac=_0x4eccd2[_0x124780];if('commentsLicenseKeyValid'==_0x3f59ac||'commentsLicenseKeyInvalid'==_0x3f59ac||'commentsLicenseKeyExpired'==_0x3f59ac||'commentsLicenseKeyDomainLimit'==_0x3f59ac||'commentsLicenseKeyNotAllowed'==_0x3f59ac||'commentsLicenseKeyEvaluationLimit'==_0x3f59ac||'commentsLicenseKeyTrialLimit'==_0x3f59ac||'commentsLicenseKeyUsageLimit'==_0x3f59ac){delete _0x4eccd2[_0x124780],_0x262815=_0x3f59ac,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x262815&&_0x4eccd2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x262815&&_0x4eccd2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x262815&&_0x4eccd2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x262815&&_0x4eccd2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3d1372){const _0x543941=this['editor'],_0x46410c=new _0x3d1372(_0x543941['locale']),_0x1a5480=_0x543941['commands']['get']('addCommentThread');return _0x46410c['set']({'label':N(_0x543941['locale'],'Comment'),'icon':_0x14f2f4}),_0x46410c['bind']('isEnabled')['to'](_0x1a5480,'hasContent'),this['listenTo'](_0x46410c,'execute',()=>{_0x1a5480['execute']();}),_0x46410c;}}class i extends _0x35651a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x8175e3){super(_0x8175e3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xa5e95b,_0x18a194,_0x19b721)=>{_0x19b721?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x25184d,_0x34d209]of this['editor']['commands'])_0x34d209['affectsData']&&'addCommentThread'!==_0x25184d&&_0x34d209['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 _0x360d97=this['editor']['editing']['view']['document'];this['listenTo'](_0x360d97,'cut',_0x1635d8=>_0x1635d8['stop'](),{'priority':'highest'}),this['listenTo'](_0x360d97,'clipboardInput',_0x2fa355=>_0x2fa355['stop'](),{'priority':'highest'}),this['listenTo'](_0x360d97,'delete',_0x1ddc6e=>_0x1ddc6e['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4829a6,_0x44ed53]of this['editor']['commands'])_0x44ed53['affectsData']&&'addCommentThread'!==_0x4829a6&&_0x44ed53['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x388a6f{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5e702){super(_0x5e702),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x45c091=this['context']['plugins']['get'](y);this['listenTo'](_0x45c091,'_activateAnnotation',(_0x2f56e5,_0x415626)=>{for(const _0x48f8a0 of this['activeUIs']){const _0x2e751b=this['_uis']['get'](_0x48f8a0);(0x0,this['uisData']['get'](_0x48f8a0)['filter'])(_0x415626)&&_0x2e751b['setActiveAnnotation'](_0x415626);}}),this['listenTo'](_0x45c091,'_deactivateAllAnnotations',()=>{for(const _0x4f1eff of this['activeUIs']){this['_uis']['get'](_0x4f1eff)['setActiveAnnotation'](null);}}),this['listenTo'](_0x45c091['_visibleAnnotations'],'add',(_0xc9f64e,_0x27fc58)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x27fc58);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2b9d23){return this['activeUIs']['has'](_0x2b9d23);}['activate'](_0x1874c6,_0x499a6c=this['defaultFilter']){const _0x4425b3=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1874c6))throw new _0x274fd1('annotationsuis-missing-ui',this,{'uiName':_0x1874c6});this['isActive'](_0x1874c6)&&this['deactivate'](_0x1874c6),this['activeUIs']['add'](_0x1874c6);const _0x3c4dcd=new S();v({'source':_0x4425b3['_visibleAnnotations'],'target':_0x3c4dcd,'filter':_0x499a6c}),this['uisData']['set'](_0x1874c6,{'collection':_0x3c4dcd,'filter':_0x499a6c});const _0x33e3e9=this['_uis']['get'](_0x1874c6);_0x33e3e9['attach'](_0x3c4dcd),this['listenTo'](_0x33e3e9,'change:activeAnnotation',(_0x326aa1,_0x7f68ed,_0x4369ec,_0x22542b)=>{_0x22542b&&_0x4425b3['_removeActiveAnnotation'](_0x22542b),_0x4369ec&&_0x4425b3['_addActiveAnnotation'](_0x4369ec);});}['deactivate'](_0x15875b){if(this['activeUIs']['delete'](_0x15875b),!this['_uis']['has'](_0x15875b))throw new _0x274fd1('annotationsuis-missing-ui',this,{'uiName':_0x15875b});const _0x426140=this['_uis']['get'](_0x15875b);_0x426140['detach'](),this['stopListening'](_0x426140),this['uisData']['get'](_0x15875b)['collection']['destroy'](),this['uisData']['delete'](_0x15875b);}['switchTo'](_0x272cb8){if(!this['_uis']['has'](_0x272cb8))throw new _0x274fd1('annotationsuis-missing-ui',this,{'uiName':_0x272cb8});const _0x20eb88=this['context']['plugins']['get'](y),_0x57bcbb=Array['from'](_0x20eb88['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x272cb8);const _0x5b5733=this['_uis']['get'](_0x272cb8);_0x5b5733['setActiveAnnotation'](_0x57bcbb),_0x5b5733['_setSelectedAnnotations']&&_0x57bcbb&&_0x5b5733['_setSelectedAnnotations']([_0x57bcbb]);}['deactivateAll'](){for(const _0x3bf58e of this['activeUIs'])this['deactivate'](_0x3bf58e);}['register'](_0x1719f2,_0x52aa1f){if(this['_uis']['has'](_0x1719f2))throw new _0x274fd1('annotationsuis-register-already-registered');if('function'!=typeof _0x52aa1f['attach']||'function'!=typeof _0x52aa1f['detach']||'function'!=typeof _0x52aa1f['setActiveAnnotation'])throw new _0x274fd1('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1719f2,_0x52aa1f);}['refilterAnnotations'](){const _0x76902a=this['context']['plugins']['get'](y)['collection'],_0x47de65=new Map(),_0x334240=Array['from'](this['activeUIs']);for(const _0x1c0fb1 of this['activeUIs']){const _0x277818=this['uisData']['get'](_0x1c0fb1)['collection'];for(const _0x6e70d7 of _0x277818)_0x47de65['set'](_0x6e70d7,_0x1c0fb1);}for(const _0x1a3b04 of _0x76902a){const _0x34afe0=_0x47de65['get'](_0x1a3b04);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1a3b04);const _0xaa93c3=_0x334240['find'](_0x2767dc=>this['uisData']['get'](_0x2767dc)['filter'](_0x1a3b04));_0x34afe0!==_0xaa93c3&&(_0x34afe0&&this['uisData']['get'](_0x34afe0)['collection']['remove'](_0x1a3b04),_0xaa93c3&&this['uisData']['get'](_0xaa93c3)['collection']['add'](_0x1a3b04));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x388464){const _0x283e39=[];for(const _0x2add6e of this['activeUIs']){(0x0,this['uisData']['get'](_0x2add6e)['filter'])(_0x388464)&&_0x283e39['push'](_0x2add6e);}if(_0x283e39['length']>0x1)throw new _0x274fd1('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x283e39,'annotationType':_0x388464['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Dt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x9a5ceb){super(_0x9a5ceb);const _0x342f6e=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 _0x43d57e(),this['focusCycler']=new _0x5a7382({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x342f6e['to']('class')],'style':{'minHeight':_0x342f6e['to']('minHeight',_0x49c36f=>'number'==typeof _0x49c36f?_i(_0x49c36f+0xa):null)},'dir':_0x9a5ceb['uiLanguageDirection'],'role':'application','aria-label':N(_0x9a5ceb,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x9a5ceb,'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',_0xfde88a=>{this['_updateItemPositionInFocusables'](_0xfde88a['source']);}),this['list']['forEach'](_0x4ef085=>{this['focusTracker']['add'](_0x4ef085['element']),this['_updateItemPositionInFocusables'](_0x4ef085);}),this['list']['on']('change',(_0x126f4d,_0x1a15a5)=>{for(const _0x5bfd95 of _0x1a15a5['removed'])this['focusTracker']['remove'](_0x5bfd95['element']),this['focusables']['remove'](_0x5bfd95);for(const _0x43aa0d of _0x1a15a5['added'])this['focusTracker']['add'](_0x43aa0d['element']),this['_updateItemPositionInFocusables'](_0x43aa0d);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1ab7cc){const _0x59caa8=this['focusables']['getIndex'](_0x1ab7cc);let _0x281c45,_0x1755e3;for(const _0x29b8b4 of this['focusables'])if(_0x1ab7cc['top']<_0x29b8b4['top']){_0x281c45=_0x29b8b4;break;}if(_0x1755e3=_0x281c45?this['focusables']['getIndex'](_0x281c45):this['focusables']['length'],-0x1!==_0x59caa8){if(_0x59caa8===_0x1755e3-0x1)return;this['focusables']['remove'](_0x1ab7cc),_0x1755e3=_0x281c45?this['focusables']['getIndex'](_0x281c45):this['focusables']['length'];}this['focusables']['add'](_0x1ab7cc,_0x1755e3);}}const Ht=/* #__PURE__ -- @preserve */
33
- Dt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x454dac){super(_0x454dac),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x44f408,_0x285a31)=>_0x44f408+_0x285a31),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Et(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x12cf6a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x12cf6a['to']('isAnimationDisabled',_0x4778bf=>_0x4778bf?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x12cf6a['to']('top',_0x33258a=>Ht(_0x33258a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4925a6=this['element']['clientHeight'];_0x4925a6&&(this['height']=_0x4925a6);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x388a6f{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39952a){super(_0x39952a),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 _0x29abd1=this['context']['config']['get']('sidebar.container');_0x29abd1&&this['setContainer'](_0x29abd1);}['setContainer'](_0x1b90c3){if(!g(_0x1b90c3))throw new _0x274fd1('sidebar-setcontainer-invalid-element');this['container']=_0x1b90c3;}['_attachToContainer']({viewClass:_0x583f65='',spaceBetweenItems:_0x58debd=0x19}={}){if(!g(this['container']))throw new _0x274fd1('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x583f65,this['_spaceBetweenItems']=_0x58debd;}['rearrange']({removedAnnotation:_0x10ef2b,previousAnnotation:_0x5222cf,nextAnnotation:_0x2b46be}){const _0x35fde1=this['getSidebarItemView'](_0x10ef2b);this['view']['list']['remove'](_0x35fde1),this['_destroySidebarItemView'](_0x10ef2b),_0x5222cf&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5222cf)),_0x2b46be&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2b46be)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2532cb,activatedAnnotation:_0x1e4cee,disableAnimationOnActivatedAnnotation:_0x413594}){if(this['_activeAnnotation']=_0x1e4cee,_0x2532cb){_0x2532cb['isActive']=!0x1;const _0x4c9eb5=this['getSidebarItemView'](_0x2532cb);_0x4c9eb5&&_0x413594&&(_0x4c9eb5['isAnimationDisabled']=!0x1);}if(_0x1e4cee){const _0x34428f=this['getSidebarItemView'](_0x1e4cee);_0x34428f&&(_0x1e4cee['isActive']=!0x0,_0x413594&&(_0x34428f['isAnimationDisabled']=!0x0,_0x34428f['top']+=0x1),this['_alignToTargetRect'](_0x34428f));}}['_detachFromContainer'](_0x3fec18){if(this['view']['element']['remove'](),_0x3fec18){for(const _0x4e5cfb of _0x3fec18)this['_destroySidebarItemView'](_0x4e5cfb);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x227251,_0x1b342c){_0x1b342c||(_0x1b342c=_0x227251['view']);const _0x1d15a3=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1d15a3,_0x227251),this['_annotationToSidebarItemView']['set'](_0x227251,_0x1d15a3),_0x1d15a3['content']['add'](_0x1b342c),this['listenTo'](_0x227251['view'],'change:targetRect',(_0x266253,_0x2b5037,_0x1b5447)=>{const _0x1c9b7f=this['_getTargetTop'](_0x227251,_0x1b5447);_0x1d15a3['_targetTop']!=_0x1c9b7f&&(_0x1d15a3['_targetTop']=_0x1c9b7f,this['_setItemTop'](_0x1d15a3,_0x1c9b7f));}),this['listenTo'](_0x1d15a3,'change:top',()=>{this['_recalculate'](_0x1d15a3,'top');}),this['listenTo'](_0x1d15a3,'change:bottom',()=>{this['_recalculate'](_0x1d15a3,'bottom');}),this['_alignToTargetRect'](_0x1d15a3);const _0x569ee9=this['_getItemBefore'](_0x1d15a3);if(_0x569ee9)this['_alignAfterItem'](_0x569ee9,_0x1d15a3)||this['_alignToTargetRect'](_0x1d15a3);else this['_alignToTargetRect'](_0x1d15a3);return this['_updateLastItem'](),this['view']['list']['add'](_0x1d15a3),_0x1d15a3;}['_alignForTopChange'](_0x4b4cc8){if(!_0x4b4cc8['content']['length'])return;const _0x871db9=this['_getItemBefore'](_0x4b4cc8);if(!_0x871db9)return;const _0x124e6f=this['_sidebarItemViewToAnnotation']['get'](_0x871db9),_0x531e75=this['_activeAnnotation'];_0x531e75&&_0x531e75===_0x124e6f?this['_alignAfterItem'](_0x871db9,_0x4b4cc8):this['_alignBeforeItem'](_0x4b4cc8,_0x871db9);}['_alignForBottomChange'](_0x1f1483){if(!_0x1f1483['content']['length'])return;const _0x28234b=this['_getItemAfter'](_0x1f1483);if(!_0x28234b)return;const _0x3a22e8=this['_sidebarItemViewToAnnotation']['get'](_0x28234b),_0x2d201a=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x531ed1=this['_activeAnnotation'];_0x531ed1&&_0x531ed1===_0x3a22e8&&_0x2d201a?(this['_alignBeforeItem'](_0x28234b,_0x1f1483),this['_alignAfterItem'](_0x1f1483,_0x28234b)):_0x531ed1&&_0x531ed1===_0x3a22e8?this['_alignBeforeItem'](_0x28234b,_0x1f1483):this['_alignAfterItem'](_0x1f1483,_0x28234b);}['_recalculate'](_0x54b32e,_0x513082){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5c567b,changedProp:_0x3380d6}of this['_recalculateBuffer'])'top'===_0x3380d6?this['_alignForTopChange'](_0x5c567b):this['_alignForBottomChange'](_0x5c567b);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x54b32e,'changedProp':_0x513082});}['getSidebarItemView'](_0x3e6de6){return this['_annotationToSidebarItemView']['get'](_0x3e6de6);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x6d29c0){const _0x5bf889=this['getSidebarItemView'](_0x6d29c0);this['stopListening'](_0x5bf889),this['stopListening'](_0x6d29c0['view']),_0x5bf889['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x6d29c0),this['_sidebarItemViewToAnnotation']['delete'](_0x5bf889);}['_createSidebarView'](){const _0x2dd475=new H(this['context']['locale']);return _0x2dd475['render'](),this['on']('change:_lastItem',(_0x1e958c,_0x32007,_0x428679,_0x46b664)=>{_0x46b664&&_0x2dd475['unbind']('minHeight'),_0x428679?_0x2dd475['bind']('minHeight')['to'](_0x428679,'bottom'):_0x2dd475['minHeight']=null;}),_0x2dd475;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x108936){const _0x2cbc0b=this['_sidebarItemViewToAnnotation']['get'](_0x108936),_0x3517ca=_0x2cbc0b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2cbc0b)-0x1);return _0x3517ca&&this['getSidebarItemView'](_0x3517ca)||null;}['_getItemAfter'](_0x556308){const _0x4fa846=this['_sidebarItemViewToAnnotation']['get'](_0x556308),_0x25fffb=_0x4fa846&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4fa846)+0x1);return _0x25fffb&&this['getSidebarItemView'](_0x25fffb)||null;}['_alignBeforeItem'](_0xec6410,_0x50cd8e){_0xec6410['updateHeight']();const _0x43d97c=G(_0x50cd8e['bottom']+this['_spaceBetweenItems'],_0xec6410['top']);return!!_0x43d97c&&(this['_setItemTop'](_0x50cd8e,_0x50cd8e['top']-_0x43d97c),!0x0);}['_alignAfterItem'](_0x24210c,_0x2e9821){_0x24210c['updateHeight']();const _0x2b0070=G(_0x24210c['bottom']+this['_spaceBetweenItems'],_0x2e9821['top']);return!!_0x2b0070&&(this['_setItemTop'](_0x2e9821,_0x2e9821['top']+_0x2b0070,!0x1),!0x0);}['_alignToTargetRect'](_0x1f1ef1){const _0x185461=this['_sidebarItemViewToAnnotation']['get'](_0x1f1ef1);if(!_0x185461||!_0x185461['target']||!_0x185461['targetRect'])return;const _0x59b2bc=this['_getTargetTop'](_0x185461,_0x185461['targetRect']);this['_setItemTop'](_0x1f1ef1,_0x59b2bc);}['_getTargetTop'](_0x4a1cc7,_0x52b017){if(null===_0x52b017)return 0x0;if(_0x4a1cc7['target']instanceof _0x3dcdfa)return _0x52b017['top'];{const _0x2a9270=new _0x3dcdfa(this['view']['element'])['top'];return _0x52b017['top']-_0x2a9270;}}['_setItemTop'](_0x10c582,_0x53ac0c,_0x48ccc0=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x48ccc0&&(_0x53ac0c=Math['max'](_0x53ac0c,this['_getMaxAvailableTop'](_0x10c582))),_0x10c582['top']=_0x53ac0c;}['_getMaxAvailableTop'](_0x1c8b90){let _0x1642a5=this['_getItemBefore'](_0x1c8b90),_0x5df7d3=0x0;for(;_0x1642a5;)_0x1642a5['updateHeight'](),_0x5df7d3+=this['_spaceBetweenItems']+_0x1642a5['height'],_0x1642a5=this['_getItemBefore'](_0x1642a5);return _0x5df7d3;}}function G(_0x3ca5a4,_0x1c1299){return Math['max'](_0x3ca5a4-_0x1c1299,0x0);}function g(_0x5a943a){return null!==_0x5a943a&&'object'==typeof _0x5a943a&&0x1===_0x5a943a['nodeType'];}class e extends _0x388a6f{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x58a7cf){super(_0x58a7cf),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x504ada(),this['_refreshPositioningDebounced']=_0x12b399(()=>{_0x58a7cf['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x9d6925=this['context']['plugins']['get'](j),_0x81610=this['context']['plugins']['get'](z);_0x9d6925['register']('wideSidebar',this),_0x81610['container']&&_0x9d6925['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x36c16f){if(_0x36c16f===this['activeAnnotation'])return;const _0x3f77a6=this['context']['plugins']['get'](z);_0x3f77a6['_activeAnnotation']=_0x36c16f;const _0xacc878=this['activeAnnotation'];_0x3f77a6['refresh']({'blurredAnnotation':_0xacc878,'activatedAnnotation':_0x36c16f}),this['activeAnnotation']=_0x36c16f;}['attach'](_0x76c379){this['annotations']=_0x76c379;const _0x61c103=this['context']['plugins']['get'](z);if(_0x61c103['_annotations']=_0x76c379,this['isAttached'])throw new _0x274fd1('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x61c103,'set:container',()=>{this['detach'](),this['listenTo'](_0x61c103,'change:container',_0xe1cb77=>{_0xe1cb77['off'](),this['attach'](_0x76c379);});}),_0x61c103['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x42d242=_0x3b62f3=>{_0x3b62f3['updateTargetRect'](),_0x61c103['addAnnotation'](_0x3b62f3);};for(const _0x3e7aec of _0x76c379)_0x42d242(_0x3e7aec);this['listenTo'](_0x76c379,'add',(_0x5ed9cf,_0x58a725)=>{_0x42d242(_0x58a725);}),this['listenTo'](_0x76c379,'remove',(_0x2e2507,_0x267e67,_0xffda5f)=>{_0x61c103['rearrange']({'removedAnnotation':_0x267e67,'previousAnnotation':_0x76c379['get'](_0xffda5f-0x1),'nextAnnotation':_0x76c379['get'](_0xffda5f+0x1)}),_0x267e67===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x76c379,'focus',(_0x5baa52,_0x20abe4)=>{this['setActiveAnnotation'](_0x20abe4);}),this['listenTo'](_0x76c379,'blur',()=>{this['setActiveAnnotation'](null);});const _0xda44fa=this['context']instanceof _0x3a3651?this['context']['editors']:new _0x504ada([this['context']]);for(const _0x495875 of _0xda44fa)this['_integrateWithEditorAnnotations'](_0x495875);this['listenTo'](_0xda44fa,'add',(_0x10efd2,_0x328780)=>{this['listenTo'](_0x328780,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x328780);});}),this['listenTo'](_0xda44fa,'remove',(_0x1a5caa,_0x1a1322)=>{_0x1a1322['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1a1322['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x274fd1('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5d4f07=this['context']['plugins']['get'](z);_0x5d4f07['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5d4f07),this['stopListening'](this['annotations']),this['context']instanceof _0x3a3651&&this['stopListening'](this['context']['editors']);for(const _0x211183 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x211183);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3b82ff){if(!_0x3b82ff['plugins']['has']('EditorAnnotations'))return;const _0x34ad9e=_0x3b82ff['plugins']['get']('EditorAnnotations'),_0x22b2d2=()=>{const _0x3a0b8f=_0x34ad9e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3a0b8f[0x0]||null);};this['listenTo'](_0x34ad9e,'refresh',_0x22b2d2),this['listenTo'](_0x34ad9e,'blur',(_0x32c90b,{isAnnotationTracked:_0x1827ce})=>{this['activeAnnotation']&&_0x1827ce(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x34ad9e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x557048=>{_0x34ad9e['hasDomSelection']()&&(_0x22b2d2(),_0x557048['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x34ad9e);}['_destroyEditorAnnotationsIntegration'](_0x4c8d8f){this['stopListening'](_0x4c8d8f),this['_editorAnnotations']['remove'](_0x4c8d8f);}}class C extends _0x13fccc{['counterView'];constructor(_0x54779a){super(_0x54779a);const _0x1b2e5a=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x21b323,_0x3e76b9)=>_0x21b323?'...':_0x3e76b9['toString']()),this['set']('annotationType',''),this['icon']=_0x14f2f4,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1b2e5a['to']('annotationType',_0x4c7683=>'ck-annotation-counter__badge--'+_0x4c7683),_0x1b2e5a['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1b2e5a['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x388a6f{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f3938){super(_0x2f3938),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3fda0f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x504ada(),this['_refreshPositioningDebounced']=_0x12b399(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x308b40(this['context']['locale']),this['balloonPanelView']=new _0x1d2c37(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x490417){this['annotations']=_0x490417;const _0x3e5bf2=this['context']['plugins']['get'](z),_0x5793be=this['balloonPanelView'];if(_0x3e5bf2['_annotations']=_0x490417,this['isAttached'])throw new _0x274fd1('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3e5bf2,'set:container',()=>{this['detach'](),this['listenTo'](_0x3e5bf2,'change:container',_0x19ec37=>{_0x19ec37['off'](),this['attach'](_0x490417);});}),_0x3e5bf2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x65fb4e=_0x26163a=>{const _0xd80b60=new C(this['context']['locale']);_0x3e5bf2['addAnnotation'](_0x26163a,_0xd80b60),this['_annotationToNarrowView']['set'](_0x26163a,_0xd80b60),_0xd80b60['bind']('isDirty','annotationType','number')['to'](_0x26163a['view'],'isDirty','type','length'),_0xd80b60['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5793be['content']['first']!==_0x26163a['view']?(this['_showBalloon'](_0x26163a),_0x26163a['view']['element']['focus'](),this['setActiveAnnotation'](_0x26163a)):this['setActiveAnnotation'](null);});};for(const _0x334b52 of _0x490417)_0x65fb4e(_0x334b52);this['listenTo'](_0x490417,'add',(_0x28c066,_0x3ff0c6)=>{_0x65fb4e(_0x3ff0c6);}),this['listenTo'](_0x490417,'remove',(_0x1deb64,_0x2d3f99,_0x20aaa1)=>{this['_annotationToNarrowView']['get'](_0x2d3f99)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2d3f99),_0x3e5bf2['rearrange']({'removedAnnotation':_0x2d3f99,'previousAnnotation':_0x490417['get'](_0x20aaa1-0x1),'nextAnnotation':_0x490417['get'](_0x20aaa1+0x1)}),_0x2d3f99===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x490417,'focus',(_0x4b7040,_0x4cc94e)=>{this['setActiveAnnotation'](_0x4cc94e);}),this['listenTo'](_0x490417,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x51878f,_0x4056c0)=>{_0x4056c0['keyCode']===_0x50541b['esc']&&_0x5793be['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5793be['content']['first']),this['_hideBalloon'](),_0x4056c0['stopPropagation'](),_0x4056c0['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1fb495,_0x323e5e)=>{const _0x58dfc7=_0x323e5e['target'];_0x5793be['isVisible']&&_0x5793be['element']['contains'](_0x58dfc7)||_0x3e5bf2['view']['element']['contains'](_0x58dfc7)||_0x1fb495['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x193b03=>_0x193b03['contains'](_0x58dfc7))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3b5687=this['context']instanceof _0x3a3651?this['context']['editors']:new _0x504ada([this['context']]);for(const _0x1d6e78 of _0x3b5687)this['_integrateWithEditorAnnotations'](_0x1d6e78);this['listenTo'](_0x3b5687,'add',(_0x3d52b0,_0x4b99bd)=>{this['listenTo'](_0x4b99bd,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4b99bd);});}),this['listenTo'](_0x3b5687,'remove',(_0x11f332,_0x3a26ab)=>{_0x3a26ab['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3a26ab['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2b9d54){if(_0x2b9d54===this['activeAnnotation'])return;const _0x2e36fb=this['context']['plugins']['get'](z);if(_0x2e36fb['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2b9d54,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2b9d54)_0x2e36fb['getSidebarItemView'](_0x2b9d54)?this['_showBalloon'](_0x2b9d54):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2b9d54;}['detach'](){if(!this['isAttached'])throw new _0x274fd1('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x429703=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x42c854=>_0x42c854['destroy']()),this['_annotationToNarrowView']['clear'](),_0x429703['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3a3651&&this['stopListening'](this['context']['editors']);for(const _0x23e830 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x23e830);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'](_0xca5fdc){if(!_0xca5fdc['plugins']['has']('EditorAnnotations'))return;const _0x4e10a2=_0xca5fdc['plugins']['get']('EditorAnnotations'),_0x375a2a=this['context']['plugins']['get'](z),_0x2f1134=this['annotations'],_0x45ce88=this['balloonPanelView'],_0x334c16=()=>{const _0x2e1fc5=_0x4e10a2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2e1fc5),this['setActiveAnnotation'](_0x2e1fc5[0x0]||null);};this['listenTo'](_0x4e10a2,'refresh',_0x334c16),this['listenTo'](_0x4e10a2,'blur',(_0x35f479,{isAnnotationTracked:_0x5b9dec})=>{this['activeAnnotation']&&_0x5b9dec(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4e10a2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2f1134,'blur',_0x1950ba=>{_0x4e10a2['hasDomSelection']()&&_0x1950ba['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x45f8ea,_0x465240)=>{const _0x184b29=_0x465240['target'];_0x45ce88['isVisible']&&_0x45ce88['element']['contains'](_0x184b29)||_0x375a2a['view']['element']['contains'](_0x184b29)||this['activeAnnotation']&&_0x4e10a2['hasDomSelection']()&&(_0x334c16(),_0x45f8ea['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4e10a2);}['_destroyEditorAnnotationsIntegration'](_0x44ff47){_0x44ff47&&(this['stopListening'](_0x44ff47),this['_editorAnnotations']['remove'](_0x44ff47));}['_setSelectedAnnotations'](_0x5735af){for(const _0x530042 of this['_selectedAnnotations'])_0x5735af['includes'](_0x530042)||this['_manuallyClosedAnnotationViews']['delete'](_0x530042['view']);this['_selectedAnnotations']=_0x5735af;}['_refreshPositioning'](){const _0xb0f7d5=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xb0f7d5['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x489047){if(this['_manuallyClosedAnnotationViews']['has'](_0x489047['view']))return;const _0x30ffde=this['balloonPanelView']['content']['first'];_0x30ffde!==_0x489047['view']?(_0x30ffde&&this['_detachListeners'](_0x30ffde),this['_attachListeners'](_0x489047['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x489047['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1654db=this['balloonPanelView']['content']['first'],_0x488dd0=_0x1654db&&this['annotations']['getByView'](_0x1654db);if(!_0x488dd0||!this['_annotationToNarrowView']['has'](_0x488dd0))return;const _0x1195f4=this['_annotationToNarrowView']['get'](_0x488dd0)['element'],_0x2d59f6=(function(){const _0x12bcb5=_0x1d2c37['defaultPositions'];return[_0x12bcb5['southArrowNorthEast'],_0x12bcb5['northArrowSouthEast'],_0x12bcb5['southArrowNorth'],_0x12bcb5['northArrowSouth'],_0x12bcb5['southArrowNorthWest'],_0x12bcb5['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1195f4,'positions':_0x2d59f6});}['_hideBalloon'](){const _0x23db2f=this['balloonPanelView'],_0xdd260e=_0x23db2f['content']['first'];_0xdd260e&&(this['_detachListeners'](_0xdd260e),_0x23db2f['unpin'](),_0x23db2f['content']['clear']());}['_attachListeners'](_0x48f9d6){this['listenTo'](_0x48f9d6,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x48f9d6,'Esc',(_0x3c4860,_0xe01ab5)=>{this['_manuallyClosedAnnotationViews']['add'](_0x48f9d6),this['_hideBalloon'](),_0xe01ab5();});}['_detachListeners'](_0x5cdf70){this['stopListening'](_0x5cdf70);}}class c extends _0x35651a{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x2e5f1d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x497c67){super(_0x497c67),_0x497c67['editing']['view']['addObserver'](_0xbea9b9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x497c67['plugins']['get'](_0x2e5f1d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0xe6d4ab=this['editor']['plugins']['get'](j);_0xe6d4ab['context']===this['editor']&&(_0xe6d4ab['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1faaf7,_0x371428)=>{const _0x463606=this['_balloon'];if(this['isAttached']&&_0x463606['visibleView']){const _0x3b2af8=this['annotations']['getByView'](_0x463606['visibleView']);_0x3b2af8&&this['_closeAnnotation'](_0x3b2af8),_0x371428();}}));}['afterInit'](){const _0x46d39a=this['editor']['plugins']['get'](j);_0x46d39a['context']===this['editor']&&(_0x46d39a['hasActive']()||_0x46d39a['switchTo']('inline'));}['setActiveAnnotation'](_0x1e223b){_0x1e223b!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1e223b&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1e223b)&&this['_addAnnotationToBalloon'](_0x1e223b,!0x0),_0x1e223b['isActive']=!0x0),_0x1e223b||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1e223b);}['attach'](_0x568430){this['annotations']=_0x568430;const _0x19115d=this['editor']['plugins']['get'](j),_0x267b1d=this['_balloon'];if(this['isAttached'])throw new _0x274fd1('inlineannotations-attach-already-attached',this);if(_0x19115d['context']!==this['editor'])throw new _0x274fd1('inlineannotations-not-allowed-with-context',this);const _0x3d9dff=this['editor']['plugins']['get'](b);this['listenTo'](_0x3d9dff,'refresh',()=>{const _0x1e846c=_0x3d9dff['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x573b8b,_0x429d5b;!this['_forceRefresh']&&(_0x573b8b=_0x1e846c,_0x429d5b=this['_selectedAnnotations'],_0x573b8b['length']===_0x429d5b['length']&&_0x573b8b['every'](_0x3c274c=>_0x429d5b['includes'](_0x3c274c)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1e846c),this['setActiveAnnotation'](_0x1e846c[0x0]||null));}),this['listenTo'](_0x3d9dff,'blur',(_0xa47002,{isAnnotationTracked:_0x2af247})=>{this['activeAnnotation']&&_0x2af247(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x38c126,_0x2e513d,_0xb9a91b)=>{_0xb9a91b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x568430,'remove',(_0x13c544,_0x4b27a4)=>{this['_removeAnnotationFromBalloon'](_0x4b27a4),_0x4b27a4===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x267b1d,'change:visibleView',(_0x3bbfd5,_0x3571e4,_0x44f4a8,_0x3765a5)=>{_0x3765a5&&this['stopListening'](_0x3765a5);const _0x19ae43=_0x568430['getByView'](_0x44f4a8);_0x44f4a8&&_0x19ae43&&(this['listenTo'](_0x44f4a8,'change:height',()=>{_0x267b1d['updatePosition']();}),this['listenTo'](_0x44f4a8,'Esc',()=>{this['_closeAnnotation'](_0x19ae43),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x19ae43&&this['setActiveAnnotation'](_0x19ae43));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x267b1d['visibleView']&&(_0x568430['getByView'](_0x267b1d['visibleView'])&&_0x267b1d['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 _0x274fd1('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1cfae3 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1cfae3);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x748942){for(const _0x524791 of this['_selectedAnnotations'])_0x748942['includes'](_0x524791)||this['_manuallyClosed']['delete'](_0x524791);for(const _0x4d0a7b of this['annotations'])_0x748942['includes'](_0x4d0a7b)||this['_removeAnnotationFromBalloon'](_0x4d0a7b);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x349ad0 of _0x748942)this['_addAnnotationToBalloon'](_0x349ad0);}this['_selectedAnnotations']=_0x748942;}['_addAnnotationToBalloon'](_0x2bb61f,_0x4fc9de=!0x1){this['_manuallyClosed']['has'](_0x2bb61f)||(this['_addedAnnotations']['has'](_0x2bb61f)||this['_balloon']['hasView'](_0x2bb61f['view'])||(this['_addedAnnotations']['add'](_0x2bb61f),this['_balloon']['add']({'stackId':_0x2bb61f['view']['id'],'view':_0x2bb61f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2bb61f)}})),_0x4fc9de&&this['_balloon']['showStack'](_0x2bb61f['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2222e6){const _0x38d6dd=_0x2222e6['target'],_0x5707b8=this['editor']['editing']['view'],_0x1806d1=_0x5707b8['document']['selection']['getFirstRange'](),_0x3c6951=_0x5707b8['domConverter']['viewRangeToDom'](_0x1806d1);if(_0x3c6951['collapse'](!0x0),_0x38d6dd){if(_0x38d6dd instanceof _0x3dcdfa)return _0x38d6dd;let _0x64edf7=[];for(const _0x5459f9 of _0x38d6dd)_0x64edf7['push'](...F(_0x5459f9['getClientRects']()));_0x64edf7=function(_0x1a7c58){const _0x4ace9d=[];let _0x420083=_0x1a7c58[0x0];for(let _0x32920b=0x1;_0x32920b<_0x1a7c58['length'];_0x32920b++)P(_0x420083,_0x1a7c58[_0x32920b])?_0x420083['width']+=_0x1a7c58[_0x32920b]['width']:(_0x4ace9d['push'](_0x420083),_0x420083=_0x1a7c58[_0x32920b]);return _0x4ace9d['push'](_0x420083),_0x4ace9d;}(_0x64edf7);const _0x49641e=_0x3c6951['getBoundingClientRect']();return _0x64edf7['find'](_0x2141ff=>_0x2141ff['top']<=_0x49641e['top']&&_0x2141ff['bottom']>=_0x49641e['bottom']&&_0x2141ff['left']<=_0x49641e['left']&&_0x2141ff['right']>=_0x49641e['right'])||_0x64edf7[0x0];}return _0x2222e6['targetRect']||_0x3c6951;}['_removeAnnotationFromBalloon'](_0xf38b20){this['_addedAnnotations']['has'](_0xf38b20)&&this['_balloon']['hasView'](_0xf38b20['view'])&&(this['_addedAnnotations']['delete'](_0xf38b20),this['_balloon']['remove'](_0xf38b20['view']));}['_closeAnnotation'](_0x335f4a){this['_manuallyClosed']['add'](_0x335f4a),this['_removeAnnotationFromBalloon'](_0x335f4a);}}function F(_0x589230){return Array['from'](_0x589230)['map'](DOMRect['fromRect']);}function P(_0xaee39b,_0xbeca68){return _0xaee39b['top']===_0xbeca68['top']&&_0xaee39b['bottom']===_0xbeca68['bottom']&&_0xaee39b['right']===_0xbeca68['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x532d6c,_0x187ddd){super(_0x532d6c),this['set']('isEmpty',!_0x187ddd['length']),this['focusTracker']=new _0x43d57e(),this['_annotationViews']=_0x187ddd,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x5a7382({'focusables':_0x187ddd,'focusTracker':this['focusTracker']}),this['listenTo'](_0x187ddd,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x187ddd,'remove',(_0x442d9a,_0x27646f)=>{_0x27646f['isActive']&&this['focus'](),_0x187ddd['length']||(this['isEmpty']=!0x0);});const _0x2a2e5a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x532d6c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x187ddd},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2a2e5a['if']('isEmpty','ck-hidden',_0x4f3ada=>!_0x4f3ada)]},'children':[{'text':N(_0x532d6c,'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 _0x2f0742 of this['_annotationViews'])this['focusTracker']['add'](_0x2f0742['element']);this['_annotationViews']['on']('change',(_0x13d98c,{added:_0xe5a0f4,removed:_0x2181d2})=>{for(const _0x4052a4 of _0xe5a0f4)this['focusTracker']['add'](_0x4052a4['element']);for(const _0x52ecbe of _0x2181d2)this['focusTracker']['remove'](_0x52ecbe['element']);});}}class p extends _0x388a6f{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x1ecf6a){super(_0x1ecf6a),this['archivedThreads']=new _0x504ada();}['init'](){const _0x5cd10f=this['context'],_0x219019=_0x5cd10f['plugins']['get'](o),_0x1452ff=_0x5cd10f['plugins']['get'](y);this['listenTo'](_0x219019,'addCommentThread',(_0x4695af,{threadId:_0x9d26aa})=>{const _0x2fcbe4=_0x219019['getCommentThread'](_0x9d26aa);_0x2fcbe4['archivedAt']&&this['archivedThreads']['add'](_0x2fcbe4,this['_calculatePosition'](_0x2fcbe4['archivedAt'])),this['listenTo'](_0x2fcbe4,'change:archivedAt',(_0xd01f89,_0x2accd3,_0x5370f8)=>{_0x5370f8?this['archivedThreads']['has'](_0x2fcbe4)||this['archivedThreads']['add'](_0x2fcbe4,this['_calculatePosition'](_0x2fcbe4['archivedAt'])):this['archivedThreads']['has'](_0x2fcbe4)&&this['archivedThreads']['remove'](_0x2fcbe4);});}),this['listenTo'](_0x219019,'removeCommentThread',(_0x3c675e,{threadId:_0x30aa72})=>{const _0x1cc67d=_0x219019['getCommentThread'](_0x30aa72);this['stopListening'](_0x1cc67d),this['archivedThreads']['has'](_0x1cc67d)&&this['archivedThreads']['remove'](_0x1cc67d);},{'priority':'highest'}),this['listenTo'](_0x1452ff['collection'],'focus',(_0xd2871,_0x20f3f6)=>{_0x20f3f6['isVisible']||(_0x20f3f6['isActive']=!0x0,_0x1452ff['activate'](_0x20f3f6));});}['_calculatePosition'](_0x4b3bd6){const _0xd73a3a=[...this['archivedThreads']]['findIndex'](_0x125817=>_0x125817['archivedAt']<_0x4b3bd6);return _0xd73a3a>-0x1?_0xd73a3a:this['archivedThreads']['length'];}}class a extends _0x35651a{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3c85b0];}constructor(_0xe29118){super(_0xe29118),this['annotationViews']=new _0x31ebb9(),this['_pendingThreads']=[];}['init'](){const _0x18cbdc=this['editor'],_0x5d6bcc=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x18cbdc['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x13fccc,!0x0)),_0x18cbdc['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x47fdd9=this['_createCommentsArchiveButton'](_0x339fd3);return _0x47fdd9['set']({'role':'menuitemcheckbox'}),_0x47fdd9;});const _0xab182d=_0x18cbdc['plugins']['get'](p),_0x258868=_0x18cbdc['plugins']['get']('Annotations'),_0x2de03b=_0x18cbdc['plugins']['get']('CommentsRepository');_0xab182d['archivedThreads']['forEach'](_0x2326fa=>{this['_handleNewThread'](_0x2326fa);}),this['listenTo'](_0xab182d['archivedThreads'],'add',(_0x5ec7f0,_0x4aff92)=>{this['_handleNewThread'](_0x4aff92);}),this['listenTo'](_0x258868['collection'],'add',(_0x47ec1d,_0x51d996)=>{const _0x452e9b=this['_pendingThreads']['find'](_0x2e8438=>{const _0x3d82bc=_0x2de03b['_threadToController']['get'](_0x2e8438);return _0x3d82bc&&_0x51d996['innerView']===_0x3d82bc['view'];});if(_0x452e9b){const _0x3e3530=this['_calculatePosition'](_0x452e9b['archivedAt']);this['annotationViews']['add'](_0x51d996['view'],_0x3e3530),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x452e9b),0x1);}}),this['listenTo'](_0xab182d['archivedThreads'],'remove',(_0x54b62b,_0x388137)=>{const _0x37caa7=_0x18cbdc['config']['get']('collaboration.channelId');if(!_0x37caa7||_0x388137['channelId']===_0x37caa7){if(this['_pendingThreads']['includes'](_0x388137))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x388137),0x1);else{const _0x3acd4a=_0x2de03b['_threadToController']['get'](_0x388137),_0x2e2f76=_0x258868['getByInnerView'](_0x3acd4a['view']);this['annotationViews']['remove'](_0x2e2f76['view']),this['stopListening'](_0x2e2f76['focusableElements']);}}}),this['listenTo'](_0x258868['collection'],'add',(_0x4abf65,_0x124792)=>{this['listenTo'](_0x124792,'escape',_0x5d6bcc);}),this['listenTo'](_0x258868['collection'],'remove',(_0x4921d3,_0x5983f8)=>{this['stopListening'](_0x5983f8,'escape',_0x5d6bcc);});}['_handleNewThread'](_0x34867b){const _0x42df52=this['editor']['plugins']['get']('CommentsRepository'),_0x1042ca=this['editor']['plugins']['get']('Annotations'),_0x34941b=this['editor']['config']['get']('collaboration.channelId');if(!_0x34941b||_0x34867b['channelId']===_0x34941b){const _0x5aa367=_0x42df52['_threadToController']['get'](_0x34867b);if(!_0x5aa367)return void this['_pendingThreads']['push'](_0x34867b);const _0xf364c=this['_calculatePosition'](_0x34867b['archivedAt']),_0x13b9ca=_0x1042ca['getByInnerView'](_0x5aa367['view']);_0x13b9ca['isVisible']&&_0x1042ca['_visibleAnnotations']['remove'](_0x13b9ca),this['annotationViews']['add'](_0x13b9ca['view'],_0xf364c);}}['_calculatePosition'](_0x2131a3){const _0x38c792=this['editor']['config']['get']('collaboration.channelId'),_0x3eb46d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x47e1f6=>_0x47e1f6['channelId']===_0x38c792)['findIndex'](_0x46cf70=>_0x46cf70['archivedAt']<_0x2131a3);return _0x3eb46d<0x0||_0x3eb46d>this['annotationViews']['length']?this['annotationViews']['length']:_0x3eb46d-0x1;}['_toggleDialog'](){const _0x501d3c=this['editor'],_0x23b233=_0x501d3c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x501d3c['locale'],this['annotationViews'])),'commentsArchive'===_0x23b233['id']?_0x23b233['hide']():_0x23b233['show']({'id':'commentsArchive','title':N(_0x501d3c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x37f55e,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4c44fd['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x33a533,_0x47d587=!0x1){const _0x4fb832=this['editor']['locale'],_0x5f5479=this['editor']['plugins']['get']('Dialog'),_0x44e425=new _0x33a533(_0x4fb832);return _0x44e425['bind']('isEnabled')['to'](this,'isEnabled'),_0x44e425['bind']('isOn')['to'](_0x5f5479,'id',_0x249b10=>'commentsArchive'===_0x249b10),_0x44e425['set']({'label':N(_0x4fb832,'COMMENTS_ARCHIVE'),'icon':_0x37f55e,'isToggleable':!0x0}),_0x47d587&&(_0x44e425['tooltip']=!0x0),this['listenTo'](_0x44e425,'execute',()=>this['_toggleDialog']()),_0x44e425;}['_hideDialogOnAnnotationEscape']=_0x5da0ad=>{const _0x38f265=_0x5da0ad['source'];if(!this['annotationViews']['has'](_0x38f265['view']))return;const _0x3c9be9=this['editor']['plugins']['get']('Dialog');_0x3c9be9['isOpen']&&'commentsArchive'===_0x3c9be9['id']&&(_0x3c9be9['hide'](),_0x5da0ad['stop']());};}class gi extends _0x35651a{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,gt as CommentThreadController,ie as CommentThreadInputView,Tt as CommentThreadView,_t as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
23
+ import{Editor as _0x1950a2,ContextPlugin as _0x4f7306,PendingActions as lt,Command as _0x56b6c2,Plugin as _0x6c9bcf,Context as _0x25a64a}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x5b7b5d,uid as _0x456ced,KeystrokeHandler as jt,FocusTracker as _0x58f4fb,diff as _0x40502f,Collection as _0x584cc7,Rect as _0x4ec800,CKEditorError as _0x23d4ab,first as _0x3f5c70,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0xd181bf,keyCodes as _0x395c85}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3ccdc5,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x3d231e,trimHtml as _0x2ac8d8,LateFocusDropdownButtonView as _0x505eaa,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x1e3adc}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x24341f}from'es-toolkit/compat';import{IconUndo as _0x32a319,IconCheck as _0x4bd9c2,IconPencil as _0x15a5b2,IconRemoveComment as _0x152e60,IconThreeVerticalDots as _0x52de17,IconAddComment as _0x56d41d,IconCommentsArchive as _0x4fc354}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x1a6b88,ButtonView as _0x38e985,ViewCollection as _0x2d6a7d,createDropdown as _0x25f4e7,ListView as _0xe6b2f6,focusChildOnDropdownOpen as _0x11e431,ListItemView as _0x329efb,MenuBarMenuListItemButtonView as _0x5a3c61,BodyCollection as _0x5e1067,BalloonPanelView as _0x436ff8,ContextualBalloon as _0x552e4a,Dialog as _0x583c95,DialogViewPosition as _0x307dc1}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x191965}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x21530a}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x1bd861}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0x5b7b5d(){['model'];['view'];constructor(_0x4d06b6,_0x54173e){super(),this['model']=_0x4d06b6,this['model']['_isAttached']=!0x0,this['view']=_0x54173e,this['listenTo'](_0x54173e,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x54173e,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x54173e,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x54173e,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x54173e,'addComment',(_0x26ea56,_0x4d3c85)=>this['addComment'](_0x4d3c85)),this['listenTo'](_0x54173e,'updateComment',(_0x3e7961,_0x45519c,_0x57917f)=>this['updateComment'](_0x45519c,_0x57917f)),this['listenTo'](_0x54173e,'removeComment',(_0x41f7cd,_0x48cb73)=>this['removeComment'](_0x48cb73));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x491a12){this['model']['addComment']({'content':_0x491a12,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x552311,_0x1d4de1){this['model']['getComment'](_0x552311)['update']({'content':_0x1d4de1});}['removeComment'](_0x363a3a){this['model']['getComment'](_0x363a3a)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x1a0f8f,_0x476da2,_0x5c5e3d){const t=_0x1a0f8f['t'];switch(_0x476da2){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'},_0x5c5e3d);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'},_0x5c5e3d);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'},_0x5c5e3d);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'},_0x5c5e3d);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x5c5e3d);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'},_0x5c5e3d);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'},_0x5c5e3d);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'},_0x5c5e3d);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(_0xdae8b3,_0x5aab7c){super(_0xdae8b3);const _0x5c1939=_0x456ced();this['main']=this['createCollection'](),this['editable']=new $t(_0xdae8b3,_0x5aab7c,void 0x0,{'label':()=>N(_0xdae8b3,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xdae8b3['uiLanguageDirection'],'lang':_0xdae8b3['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5c1939},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x38adc0){super(_0x38adc0),this['view']=new Vt(_0x38adc0['locale'],_0x38adc0['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1013ed=this['editor']['editing']['view'],_0x17de24=this['view']['editable'],_0x3b8bd8=_0x1013ed['document']['getRoot']();_0x17de24['name']=_0x3b8bd8['rootName'],this['view']['render']();const _0x39ca85=_0x17de24['element'];this['setEditableElement'](_0x17de24['name'],_0x39ca85),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1013ed['attachDomRoot'](_0x39ca85),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
25
+ _0x5b7b5d(_0x1950a2){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x7e8acf={}){function _0x165154(_0x113fc4){return _0x113fc4['map'](_0x5b5f25=>String['fromCharCode'](_0x5b5f25))['join']('');}(_0x7e8acf=Object['assign']({},_0x7e8acf))['plugins']||(_0x7e8acf['plugins']=Rt['defaultPlugins']),super(_0x7e8acf),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x165154([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x165154([0x76,0x69,0x65,0x77])][_0x165154([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x165154([0x61,0x75,0x74,0x6f]),this[_0x165154([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x165154([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x165154([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x165154([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x165154([0x6f,0x6b])});}['create'](){const _0x41506a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x41506a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3d5a92=>{const _0x543e7c=this['model']['document']['getRoot'](),_0x1bad55=_0x543e7c&&_0x543e7c['getChild'](_0x543e7c['childCount']-0x1);_0x3d5a92['setSelection'](_0x1bad55,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3f8435=this['editing']['view'],_0x412fb6=_0x3f8435['document']['getRoot'](),_0x4ef8af=_0x412fb6['getChild'](0x0);_0x412fb6['childCount']>0x1||!_0x4ef8af||'p'!=_0x4ef8af['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x3f8435,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4ef8af['placeholder']=this['placeholder']),St({'view':_0x3f8435,'element':_0x4ef8af,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4ef8af);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3ba9f1,_0x50a370={}){super(_0x3ba9f1),this['editor']=null,this['_editorConfig']=_0x50a370,this['set']('value',_0x50a370['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3ba9f1,'Reply...')),this['set']('submitLabel',N(_0x3ba9f1,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x58f4fb(),this['focusCycler']=new _0x1a6b88({'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',(_0xf10cd8,_0x27a24b)=>{this['cancelButtonView']['fire']('execute'),_0x27a24b();}),this['keystrokes']['set']('Ctrl+Enter',(_0x50a304,_0x474e49)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x474e49());}),this['on']('submit',(_0x34cb05,_0xeb764f)=>{_0xeb764f['length']>0xfde8?(alert(N(_0x3ba9f1,'TOO_LONG_COMMENT_ALERT',[_0xeb764f['length'],0xfde8])),_0x34cb05['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 _0xe4153=this['editor'];this['element']['insertBefore'](_0xe4153['ui']['element'],this['element']['firstChild']),_0xe4153['model']['document']['on']('change',()=>this['value']=_0xe4153['getData']()),_0xe4153['bind']('placeholder')['to'](this),this['focusables']['add'](_0xe4153['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3f25fc){-0x1===_0x3f25fc?(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:_0x473a16}=this,_0x542026=new _0x38e985(_0x473a16);return _0x542026['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x542026['withText']=!0x0,_0x542026['bind']('label')['to'](this,'submitLabel'),_0x542026['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x542026['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x25494d,_0x3a9472)=>!_0x3a9472&&!!_0x25494d['trim']()),_0x542026;}['_createCancelButton'](){const {locale:_0x48b031}=this,_0x4ba5e4=new _0x38e985(_0x48b031);return _0x4ba5e4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4ba5e4['label']=N(_0x48b031,'Cancel'),_0x4ba5e4['withText']=!0x0,_0x4ba5e4['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4ba5e4;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x241524=>{this['focusTracker']['add'](_0x241524['element']);}),this['focusables']['on']('change',(_0x59015e,_0x5a7ccb)=>{for(const _0x46c696 of Array['from'](_0x5a7ccb['added'])['reverse']())this['focusTracker']['add'](_0x46c696['element']);});}}class ie extends kt{constructor(_0x5aac53,_0x2d96ed,_0xdcb5d1){super(_0x5aac53),this['commentInputView']=new os(_0x5aac53,_0xdcb5d1),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5933ba,_0x391660)=>_0x5933ba||!!_0x391660),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 _0x3ccdc5(_0x5aac53,_0x2d96ed),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'](_0x27d5a6){this['commentInputView']['focus'](_0x27d5a6);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x10a4bd,_0x37775f)=>{const {submitButtonView:_0xa974e0,cancelButtonView:_0x18b8b0,editor:_0x2de1e2}=this['commentInputView'];[_0xa974e0['element'],_0x18b8b0['element'],_0x2de1e2?_0x2de1e2['editing']['view']['getDomRoot']():null]['filter'](_0x373bad=>_0x373bad)['some'](_0x54a66f=>_0x54a66f['contains'](_0x37775f['target']))||(this['focus'](),_0x37775f['preventDefault']());});}}class rs extends kt{constructor(_0x9a7948){super(_0x9a7948);const _0x5218d6=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5218d6['to']('count',_0x1a2a9e=>N(_0x9a7948,'NUMBER_OF_COMMENTS',_0x1a2a9e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x433c1b,_0x451827,_0x30d66d){super(_0x433c1b);const _0x49653d=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x451827['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x451827,this['_config']=_0x30d66d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1a6b88({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x55f952=>this['commentViews']['map'](_0x5dc274=>_0x5dc274['element'])['includes'](_0x55f952['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x433c1b),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x330df3=>_0x330df3-this['_config']['maxCommentsWhenCollapsed']);for(const _0x57a1d9 of _0x451827['comments'])this['_handleNewCommentModel'](_0x57a1d9);this['_handleInfoComment'](),this['listenTo'](_0x451827['comments'],'add',(_0xf533b1,_0x2f7f97)=>{const _0x2f2c02=this['_calculatePosition'](_0x2f7f97);this['length']++,this['_handleNewCommentModel'](_0x2f7f97,_0x2f2c02),this['refreshVisibleViews']();}),this['listenTo'](_0x451827['comments'],'remove',(_0x53b55d,_0x1ee5a7)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1ee5a7),this['refreshVisibleViews']();}),this['listenTo'](_0x451827,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x451827,'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',_0x49653d['if']('length','ck-hidden',_0x385013=>!_0x385013)],'aria-label':N(_0x433c1b,'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'](_0xd1fecf){-0x1===_0xd1fecf?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x225a88 of this['commentViews'])_0x225a88['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1a5c81,_0x13a320){const _0x5641f1=new this['_config']['CommentView'](this['locale'],_0x1a5c81,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5641f1['viewUid']=_0x1a5c81['id'],_0x5641f1['delegate']('removeComment')['to'](this),_0x5641f1['delegate']('updateComment')['to'](this),_0x5641f1['delegate']('resolveCommentThread')['to'](this),_0x5641f1['delegate']('editorReady')['to'](this),_0x5641f1['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5641f1,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5641f1,_0x13a320);}['_calculatePosition'](_0x88cf48){const _0x42fd4d=this['_model']['_findOptimalIndex'](_0x88cf48);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x88cf48['authoredAt']?_0x42fd4d-0x1:_0x42fd4d:_0x42fd4d-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x438a7e={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x438a7e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x438a7e));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x47ca30){const _0x43fc11=this['commentViews']['remove'](_0x47ca30['id']);this['stopListening'](_0x43fc11),_0x43fc11['isEditMode']&&this['_updateHasDirtyComment'](),_0x43fc11['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x442f38=>_0x442f38['isEditMode']);}['_rearrangeCollapse'](){const _0x5aa079=function(_0x30d48d){const _0x3acc4e=new _0x584cc7();for(const _0x49aeae of _0x30d48d)_0x3acc4e['add'](_0x49aeae);return _0x3acc4e;}(this['commentViews']),_0xbcb6dd=this['_collapsedCommentsView']['count'];for(let _0x215f90=0x1;_0x215f90<=_0xbcb6dd;_0x215f90++)_0x5aa079['remove'](0x1);for(const _0x130630 of _0x5aa079)_0x130630['collapse']();_0xbcb6dd>0x0&&_0x5aa079['add'](this['_collapsedCommentsView'],0x1),ns(_0x40502f(Array['from'](this['visibleViews']),Array['from'](_0x5aa079)),this['visibleViews'],_0x5aa079);}['_rearrangeExpand'](){ns(_0x40502f(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x9c0256 of this['visibleViews'])_0x9c0256['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4375fb=>{this['focusTracker']['add'](_0x4375fb['element']),this['keystrokes']['listenTo'](_0x4375fb['element']);}),this['commentViews']['on']('change',(_0x21f36a,_0x27ca7e)=>{for(const _0x38eee5 of _0x27ca7e['removed'])this['focusTracker']['remove'](_0x38eee5['element']),this['keystrokes']['stopListening'](_0x38eee5['element']);for(const _0x34ffcd of Array['from'](_0x27ca7e['added'])['reverse']())this['focusTracker']['add'](_0x34ffcd['element']),this['keystrokes']['listenTo'](_0x34ffcd['element']);});}}function ns(_0x2166ff,_0x5834fe,_0xb013d6){let _0x133598=0x0;for(const _0x15b7b4 of _0x2166ff)switch(_0x15b7b4){case'insert':_0x5834fe['add'](_0xb013d6['get'](_0x133598),_0x133598),_0x133598++;break;case'delete':_0x5834fe['remove'](_0x133598);break;case'equal':_0x133598++;}}class oe extends kt{constructor(_0x124b66){super(_0x124b66);const _0x419e48=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x419e48['to']('contextValue',_0x4f5c02=>N(_0x124b66,'THREAD_CONTEXT_LABEL',_0x4f5c02)),'tabindex':-0x1},'children':[{'text':_0x419e48['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x47d122,_0x33740b){super(_0x47d122);const _0x3e835d=this['bindTemplate'];this['_model']=_0x33740b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1a6b88({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xecfe86=>!!_0xecfe86),this['bind']('contextValue')['to'](this['_model'],'context',_0x569e88=>_0x569e88&&_0x569e88['value']?this['_trimContextValue'](_0x569e88['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x3e835d['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 _0x1441af=new _0x38e985(this['locale']);return _0x1441af['label']=N(this['locale'],'Reopen'),_0x1441af['tooltip']=N(this['locale'],'Reopen'),_0x1441af['icon']=_0x32a319,_0x1441af['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4c015b=>!_0x4c015b),_0x1441af['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x348b14,_0x32f0e8)=>_0x348b14&&_0x32f0e8),_0x1441af['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1441af;}['_trimContextValue'](_0x2c20be){if(_0x2c20be['length']<0x96)return _0x2c20be;const _0x127f63=_0x2c20be['lastIndexOf']('\x20',0x93);return _0x2c20be['substring'](0x0,_0x127f63>-0x1?_0x127f63:0x93)+'...';}['_attachContextActions'](){const _0x5c87e2=this['element']['querySelector']('.ck-context'),_0x1429a4=_0x5c87e2['querySelector']('.ck-context__value');this['listenTo'](_0x5c87e2,'mouseenter',()=>{_0x1429a4['offsetWidth']<_0x1429a4['scrollWidth']&&_0x5c87e2['classList']['add']('overlay');}),this['listenTo'](_0x5c87e2,'mouseleave',()=>{_0x5c87e2['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3316c1 of this['focusables'])this['focusTracker']['add'](_0x3316c1['element']),this['keystrokes']['listenTo'](_0x3316c1['element']);}['_createContextView'](){const _0x4d08b8=new oe(this['locale']);return _0x4d08b8['bind']('contextValue')['to'](this),_0x4d08b8;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x32730c,_0x1d1731,_0x44314d,_0x5ad2e2){super(_0x32730c),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1d1731,this['_localUser']=_0x44314d,this['_config']=_0x5ad2e2,this['commentThreadHeaderView']=new Yt(_0x32730c,_0x1d1731),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x32730c,N(_0x32730c,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x32730c,_0x1d1731,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5ad2e2)),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',(_0x3001c3,_0x45d5d9)=>_0x3001c3||!!_0x45d5d9),this['bind']('isUnlinked')['to'](_0x1d1731,'unlinkedAt',_0x2a0007=>!!_0x2a0007),this['bind']('ariaLabel')['to'](this,'length',_0x389f58=>{const _0x54bf86=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x389f58,_0x54bf86]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1a6b88({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2440cc=>_0x2440cc['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 _0x2f07d8=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x31faeb=_0x2f07d8['commentInputView'];return _0x2f07d8['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x31faeb,'value',(_0x48b39e,_0x2275d4,_0x164625,_0x1940d8,_0x4894e2)=>!!_0x4894e2||!!_0x1940d8&&_0x164625&&!_0x2275d4||_0x48b39e&&_0x164625&&!_0x2275d4),_0x31faeb['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xaa15d4,_0xea486d,_0x535c77)=>{let _0x47e600;return _0x47e600=_0x535c77&&_0xea486d?'Reply\x20to\x20reopen\x20discussion...':_0xaa15d4?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x47e600);}),_0x31faeb['bind']('submitLabel')['to'](this,'length',_0x2b9936=>N(this['locale'],_0x2b9936?'Reply':'Comment')),_0x31faeb['on']('submit',(_0xd9e92,_0x467ce5)=>{this['fire']('addComment',_0x467ce5),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x31faeb['on']('cancel',()=>{this['focus']();}),_0x31faeb['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x31faeb['on']('cancel',_0x630efe=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x630efe['stop']());}),this['on']('change:isActive',(_0x71b515,_0x69e32f,_0x281da0)=>{_0x281da0||this['length']||_0x31faeb['value']||this['fire']('removeCommentThread');}),_0x2f07d8;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xb2d113,_0x56d507,_0x5a9269,_0xafae1a){super(_0xb2d113,_0x56d507,_0x5a9269,_0xafae1a),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xb2d113,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x31064d,_0x4f7640,_0xd0ca8a)=>{_0xd0ca8a||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x26be52,_0x798d7a,_0x538f64)=>{_0x538f64&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x25232e=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x25232e['if']('isActive','ck-thread--active'),_0x25232e['if']('isUnlinked','ck-thread--unlinked'),_0x25232e['if']('isConfirm','ck-thread--remove-confirmation'),_0x25232e['to']('actionIndicator',_0x36698a=>_0x36698a?'ck-thread--'+_0x36698a:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x25232e['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 _0x2d0375 of this['commentsListView']['commentViews'])_0x2d0375['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x165b90}=this,_0x10a74a=this['commentsListView']['commentViews']['get'](0x0);_0x10a74a===this['_boundFirstCommentView']||_0x10a74a['isSystemComment']||(this['_boundFirstCommentView']=_0x10a74a,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x10a74a,'actionIndicator',_0x3be2c9=>'remove'===_0x3be2c9?'remove':null),_0x10a74a['placeholder']=N(_0x165b90,'Write\x20a\x20comment...'),_0x10a74a['removeButton']['on']('execute',_0xe8b33=>{_0xe8b33['stop'](),this['showConfirm'](N(_0x165b90,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x10a74a['focus']();}),_0x10a74a['actionBar']['add'](this['resolveButton'],0x0),_0x10a74a['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4d37cc=new _0x3d231e(this['locale']);return _0x4d37cc['label']=N(this['locale'],'Resolve'),_0x4d37cc['tooltip']=N(this['locale'],'Resolve'),_0x4d37cc['icon']=_0x4bd9c2,_0x4d37cc['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4d37cc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x59989a=>!_0x59989a),_0x4d37cc['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x54f294,_0x5aba68)=>_0x54f294&&!_0x5aba68),_0x4d37cc['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4d37cc;}['_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 es extends kt{constructor(_0x670b7a){super(_0x670b7a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x37974b,_0x36089c,_0x5e199e)=>{this['element']['innerHTML']=_0x5e199e;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x486837,_0x40e898,_0x5b5288){super(_0x486837),this['_model']=_0x40e898,this['_config']=_0x5b5288,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x40e898,'content',_0x40e898,'authoredAt',(_0x22c319,_0x5da5b8)=>N(_0x486837,'COMMENT_ARIA_LABEL',[_0x40e898['author']['name'],_0x5b5288['formatDateTime'](_0x5da5b8),new DOMParser()['parseFromString'](_0x22c319,'text/html')['body']['textContent'],_0x40e898['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x486837,N(_0x486837,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x2d6a7d(),this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1a6b88({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x505caf=>_0x505caf['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x4efc0d=new es(this['locale']);return _0x4efc0d['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xf4ec1a,_0x12beb3)=>_0x12beb3?_0x2ac8d8(_0xf4ec1a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xf4ec1a),_0x4efc0d;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x22453c=new os(this['locale'],this['_config']['editorConfig']);return _0x22453c['value']=this['_model']['content'],_0x22453c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x22453c['submitLabel']=N(this['locale'],'Save'),_0x22453c['on']('submit',(_0x489b98,_0x20a446)=>{this['fire']('updateComment',this['_model']['id'],_0x20a446),this['switchToDisplayMode'](),this['focus']();}),_0x22453c['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x22453c['once']('editorReady',()=>{_0x22453c['focus']();}),_0x22453c['createEditor'](),_0x22453c['delegate']('editorReady')['to'](this),_0x22453c['delegate']('editorDestroyed')['to'](this),_0x22453c;}['_setupKeyboardNavigation'](){const _0x9c91fd=this['element'];this['keystrokes']['listenTo'](_0x9c91fd);for(const _0x33c30f of this['focusables'])this['focusTracker']['add'](_0x33c30f['element']),this['keystrokes']['listenTo'](_0x33c30f['element']);this['focusables']['on']('change',(_0x1b5696,_0x38f33f)=>{for(const _0x590812 of _0x38f33f['removed'])this['focusTracker']['remove'](_0x590812['element']),this['keystrokes']['stopListening'](_0x590812['element']);for(const _0x263862 of _0x38f33f['added'])this['focusTracker']['add'](_0x263862['element']),this['keystrokes']['listenTo'](_0x263862['element']);}),this['keystrokes']['set']('enter',(_0x1711d1,_0x5401c6)=>{_0x9c91fd===_0x1711d1['target']&&(this['focusCycler']['focusFirst'](),_0x5401c6());}),this['keystrokes']['set']('esc',(_0x1fe51e,_0x581a23)=>{_0x9c91fd!==_0x1fe51e['target']&&(this['focus'](),_0x581a23());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(di){['actionBar'];['userView'];constructor(_0x258b0c,_0x5c441e,_0x4019e9){super(_0x258b0c,_0x5c441e,_0x4019e9),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x258b0c,'Reply...')),this['bind']('authoredAt')['to'](_0x5c441e),this['bind']('resolvedAt')['to'](_0x5c441e),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 _0x3ccdc5(_0x258b0c,_0x5c441e['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5c441e,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x45adf9=this['bindTemplate'],_0x5d2851=[{'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':_0x45adf9['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x45adf9['to']('authoredAt',_0x4f291f=>this['_config']['formatDateTime'](_0x4f291f))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x45adf9['if']('isEditMode','ck-comment__actions--hidden'),_0x45adf9['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']&&_0x5d2851['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x45adf9['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x45adf9['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x45adf9['if']('isEditMode','ck-comment--edit'),_0x45adf9['if']('isSystemComment','ck-comment--info'),_0x45adf9['to']('actionIndicator',_0x5ecf57=>_0x5ecf57?'ck-comment--'+_0x5ecf57:'')],'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':_0x5d2851}]}]};}['_createEditButton'](){const _0x5a1dea=new _0x38e985(this['locale']);return _0x5a1dea['label']=N(this['locale'],'Edit'),_0x5a1dea['icon']=_0x15a5b2,_0x5a1dea['withText']=!0x0,_0x5a1dea['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5a1dea['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x383a46=>!_0x383a46),_0x5a1dea['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5a1dea['on']('execute',()=>this['switchToEditMode']()),_0x5a1dea;}['_createRemoveButton'](){const _0xb349f5=new _0x38e985(this['locale']);return _0xb349f5['label']=N(this['locale'],'Remove'),_0xb349f5['icon']=_0x152e60,_0xb349f5['withText']=!0x0,_0xb349f5['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xb349f5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x71a127=>!_0x71a127),_0xb349f5['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xb349f5['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xb349f5;}['_createDropdown'](){const _0x21b60d=_0x25f4e7(this['locale'],_0x505eaa),_0x3c0e8f=_0x21b60d['panelView']['children'],_0x4c05a4=new _0xe6b2f6(this['locale']),_0x4f83d8=_0x21b60d['bindTemplate'];_0x11e431(_0x21b60d,()=>this['items']['find'](_0x13bcec=>_0x13bcec['isVisible'])),_0x21b60d['extendTemplate']({'attributes':{'class':[_0x4f83d8['if']('isVisible','ck-hidden',_0x181910=>!_0x181910)]}});const _0x56f98d=(_0x4218f5,_0x523c20=-0x1)=>{const _0x4d780c=new _0x329efb(this['locale']);_0x4d780c['children']['add'](_0x4218f5);const _0x5c77fe=_0x523c20>-0x1?_0x523c20:_0x4c05a4['items']['length'];_0x4c05a4['items']['add'](_0x4d780c,_0x5c77fe);const _0x41fe1c=Array['from'](this['items']);_0x21b60d['unbind']('isEnabled','isVisible'),_0x21b60d['bind']('isEnabled')['toMany'](_0x41fe1c,'isEnabled',(..._0x477a41)=>_0x477a41['some'](_0x2f4a7a=>_0x2f4a7a)),_0x21b60d['bind']('isVisible')['toMany'](_0x41fe1c,'isVisible',(..._0xf2eeb9)=>_0xf2eeb9['some'](_0x1e27ed=>_0x1e27ed));};_0x21b60d['panelPosition']='sw',_0x21b60d['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x52de17});for(const _0x3b00e8 of this['items'])_0x56f98d(_0x3b00e8);return _0x3c0e8f['add'](_0x4c05a4),_0x21b60d['listenTo'](this['items'],'add',(_0x22720a,_0x4c842c,_0x786cb1)=>{_0x56f98d(_0x4c842c,_0x786cb1);}),_0x21b60d['listenTo'](this['items'],'remove',(_0xb79eb4,_0x1f0cc1,_0x12c0f7)=>{_0x4c05a4['items']['remove'](_0x12c0f7);}),_0x21b60d;}['_attachActions'](_0x5af9cb,_0x1868d2){const _0x1a750d=_0x5af9cb&&_0x5af9cb['element'];_0x1a750d&&(this['listenTo'](_0x1a750d,'mouseenter',()=>this['actionIndicator']=_0x1868d2),this['listenTo'](_0x1a750d,'focus',()=>this['actionIndicator']=_0x1868d2),this['listenTo'](_0x1a750d,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x1a750d,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x3c7cef=super['_createCommentInputView']();return _0x3c7cef['bind']('placeholder')['to'](this),_0x3c7cef;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x5cec27){const _0x7d7e54=Dt(_0x5cec27,0x1e),_0x38eef6=new MutationObserver(_0x51de49=>{for(const _0x1e25fa of _0x51de49)('attributes'==_0x1e25fa['type']&&'class'==_0x1e25fa['attributeName']||'childList'==_0x1e25fa['type']||'characterData'==_0x1e25fa['type'])&&_0x7d7e54();});return{'attach'(_0x3cf675){_0x38eef6['observe'](_0x3cf675,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x38eef6['disconnect'](),_0x7d7e54['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x252cd6,_0x4bbd02){super(_0x252cd6),this['id']=_0x456ced(),this['focusTracker']=new _0x58f4fb(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x10cee6,_0x4865da)=>this['fire']('Esc',_0x4865da)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x4bbd02),this['mainView']=_0x4bbd02;const _0x15f715=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x15f715['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 _0x4bc4b1=this['element']['clientHeight'];_0x4bc4b1&&(this['height']=_0x4bc4b1);}}class T extends/* #__PURE__ -- @preserve */
29
+ _0x5b7b5d(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1b5644,target:_0x5bde5a,type:_0x566940,isVisible:_0x28cb27=!0x0}){super(),this['view']=_0x1b5644,this['view']['element']||this['view']['render'](),this['_type']=_0x566940,this['_target']=_0x5bde5a,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x584cc7([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x4ddf96,_0x316a2d)=>{this['view']['focusTracker']['add'](_0x316a2d);}),this['focusableElements']['on']('remove',(_0x205a1c,_0x187ea6)=>{this['view']['focusTracker']['remove'](_0x187ea6);}),this['set']('isVisible',_0x28cb27);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3cf994=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x3cf994),_0x3cf994;}get['targetRect'](){const _0x5d6fa0=this['target'];if(null===_0x5d6fa0)return null;if(_0x5d6fa0 instanceof _0x4ec800)return _0x5d6fa0;const _0xee581b=_0x5d6fa0['filter'](_0x244a79=>function(_0x3542d9){const _0x5e61c2=_0x3542d9['offsetParent'];if(_0x5e61c2)return!0x0;const _0x3270e0=_0x3542d9['getClientRects']()['item'](0x0);return!!_0x3270e0;}(_0x244a79));return 0x0===_0xee581b['length']?null:new _0x4ec800(_0xee581b[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x58e1f3){this['view']['isActive']=_0x58e1f3,this['view']['mainView']['isActive']=_0x58e1f3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x35a365){if(!(null===_0x35a365||_0x35a365 instanceof _0x4ec800||Array['isArray'](_0x35a365)&&_0x35a365['every'](_0x434fa0=>fi(_0x434fa0))))throw new _0x23d4ab('annotation-invalid-target',null,{'target':_0x35a365});}['_getNormalizedTarget'](){const _0x5721a6='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5721a6)?[_0x5721a6]:_0x5721a6;}}function fi(_0x59d22e){return null!==_0x59d22e&&'object'==typeof _0x59d22e&&'nodeType'in _0x59d22e&&0x1===_0x59d22e['nodeType'];}class S extends _0x584cc7{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x17c090=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x58f4fb(),this['_focusTracker']['on']('change:isFocused',(_0xcfe78c,_0x212946,_0x1834cb)=>{_0x1834cb||this['fire']('blur');});for(const _0x2b6813 of _0x17c090)this['add'](_0x2b6813);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2d443f){if(this['has'](_0x2d443f))throw new _0x23d4ab('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2d443f['innerView'],_0x2d443f),this['_viewToAnnotation']['set'](_0x2d443f['view'],_0x2d443f);for(const _0x15030b of _0x2d443f['focusableElements'])this['_focusTracker']['add'](_0x15030b);this['listenTo'](_0x2d443f['focusableElements'],'add',(_0x313d14,_0x1ace67)=>{this['_focusTracker']['add'](_0x1ace67);}),this['listenTo'](_0x2d443f['focusableElements'],'remove',(_0x430e84,_0xdd3484)=>{this['_focusTracker']['remove'](_0xdd3484);}),this['listenTo'](_0x2d443f['view']['focusTracker'],'change:isFocused',(_0x7d49d7,_0x32c72f,_0xcc88d7)=>{_0xcc88d7&&this['fire']('focus',_0x2d443f);}),_0x2d443f['updateTargetRect']();const _0xa4ff64=this['_getOrderInContent'](_0x2d443f['view']['targetRect']);return super['add'](_0x2d443f,_0xa4ff64);}['remove'](_0x164dd8){if(!this['has'](_0x164dd8))throw new _0x23d4ab('annotationcollection-not-existing-item',null);this['stopListening'](_0x164dd8['view']['focusTracker']),this['stopListening'](_0x164dd8['focusableElements']);for(const _0x52184c of _0x164dd8['focusableElements'])this['_focusTracker']['remove'](_0x52184c);return this['_viewToAnnotation']['delete'](_0x164dd8['view']),this['_innerViewToAnnotation']['delete'](_0x164dd8['innerView']),super['remove'](_0x164dd8);}['getByInnerView'](_0x5bfb16){return this['_innerViewToAnnotation']['get'](_0x5bfb16);}['getByView'](_0x17303f){return this['_viewToAnnotation']['get'](_0x17303f);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x516e00 of this)_0x516e00['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4fd6bc=Array['from'](this)['sort']((_0x123a20,_0x1db897)=>w(_0x123a20['view']['targetRect'],_0x1db897['view']['targetRect']));for(let _0x446cd7=_0x4fd6bc['length']-0x1;_0x446cd7>0x0;_0x446cd7--){const _0xb32488=_0x4fd6bc[_0x446cd7];_0x446cd7!==this['getIndex'](_0xb32488)&&(this['remove'](_0xb32488),this['add'](_0xb32488));}}['_getOrderInContent'](_0x5c9152){let _0x43e975=0x0;if(!_0x5c9152)return this['length'];for(const _0x55bdc2 of this){const _0x4f3aae=_0x55bdc2['view']['targetRect'];if(_0x4f3aae){if(w(_0x5c9152,_0x4f3aae)<0x0)return _0x43e975;_0x43e975++;}}return _0x43e975;}}function v({source:_0x75c921,target:_0x46c079,filter:_0x44900c}){for(const _0x18c226 of _0x75c921)_0x44900c(_0x18c226)&&_0x46c079['add'](_0x18c226);_0x46c079['listenTo'](_0x75c921,'add',(_0x320e6f,_0x1544fe)=>{_0x44900c(_0x1544fe)&&_0x46c079['add'](_0x1544fe);}),_0x46c079['listenTo'](_0x75c921,'remove',(_0x5074c4,_0x4dbd6c)=>{_0x46c079['has'](_0x4dbd6c)&&_0x46c079['remove'](_0x4dbd6c);});}function w(_0x5ad745,_0xd56d07){if(null===_0x5ad745&&null===_0xd56d07)return 0x0;if(null===_0x5ad745)return-0x1;if(null===_0xd56d07)return 0x1;const _0x1a0efc=_0x5ad745['top']-_0xd56d07['top'];return 0x0==_0x1a0efc?_0x5ad745['left']-_0xd56d07['left']:_0x1a0efc;}class y extends _0x4f7306{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d2457){if(super(_0x1d2457),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1d2457 instanceof _0x1950a2){const _0x37440b=_0x1d2457['locale'];_0x1d2457['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x37440b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4429fe){this['collection']['add'](_0x4429fe);}['remove'](_0x598a2f){this['collection']['remove'](_0x598a2f),_0x598a2f['destroy']();}['refreshVisibility'](){for(const _0x3af3ed of this['collection'])_0x3af3ed['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1da793){return this['collection']['getByInnerView'](_0x1da793);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x46ba3d of this['collection'])_0x46ba3d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0xfed8a0){this['fire']('_activateAnnotation',_0xfed8a0);}['createAnnotation'](_0x287391){return new T(_0x287391);}['createAnnotationView'](_0x77fde8,_0x449ae0){return new E(_0x77fde8,_0x449ae0);}['_addActiveAnnotation'](_0x4d6df8){const _0x251763=new Set(this['activeAnnotations']);_0x251763['add'](_0x4d6df8),this['activeAnnotations']=_0x251763;}['_removeActiveAnnotation'](_0x20e1c5){const _0x495176=new Set(this['activeAnnotations']);_0x495176['delete'](_0x20e1c5),this['activeAnnotations']=_0x495176;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2cd492=this['collection'],_0x7ca0c1=this['_visibleAnnotations'];function _0x11f6bb(_0x415caf){const _0x2d14d7=_0x415caf['source'];_0x2d14d7['isVisible']&&!_0x7ca0c1['has'](_0x2d14d7)?_0x7ca0c1['add'](_0x2d14d7):!_0x2d14d7['isVisible']&&_0x7ca0c1['has'](_0x2d14d7)&&_0x7ca0c1['remove'](_0x2d14d7),_0x2d14d7['view']['focusTracker']['remove'](_0x2d14d7['view']['element']),_0x2d14d7['view']['focusTracker']['add'](_0x2d14d7['view']['element']);}this['listenTo'](_0x2cd492,'add',(_0x5b4ee6,_0x59e168)=>{_0x59e168['isVisible']&&_0x7ca0c1['add'](_0x59e168),this['listenTo'](_0x59e168,'change:isVisible',_0x11f6bb);}),this['listenTo'](_0x2cd492,'remove',(_0x4c48a1,_0x50755e)=>{_0x7ca0c1['has'](_0x50755e)&&_0x7ca0c1['remove'](_0x50755e),this['stopListening'](_0x50755e,'change:isVisible',_0x11f6bb);});}['_setupEnterAnnotationKeystroke'](){const _0xa39d84=_0x49e8e4=>{_0x49e8e4['on']('ready',()=>{_0x49e8e4['keystrokes']['set'](_0x21530a,(_0x1c41ad,_0x4ccbd2)=>{const _0x509039=_0x3f5c70(this['activeAnnotations']['values']());_0x509039&&(_0x509039['view']['focus'](),_0x4ccbd2());});});};this['context']instanceof _0x1950a2?_0xa39d84(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x34e2ee,_0x4f5395)=>{_0xa39d84(_0x4f5395);});}['_setupEscapeAnnotationHandling'](){const _0x2bcc8a=_0x42004e=>{const _0xc526a5=_0x42004e['source'],_0x204471=[];let _0x5b0710;if(Array['isArray'](_0xc526a5['target'])){_0x5b0710=_0xc526a5['target'][0x0],this['context']instanceof _0x1950a2?_0x204471['push'](this['context']):this['context']['editors']&&_0x204471['push'](...this['context']['editors']);for(const _0x349df8 of _0x204471)for(const _0x58dea3 of _0x349df8['editing']['view']['domRoots']['values']())if(_0x58dea3['contains'](_0x5b0710))return void _0x349df8['editing']['view']['focus']();_0x5b0710['focus']();}};this['listenTo'](this['collection'],'add',(_0x29147f,_0x169fe4)=>{this['listenTo'](_0x169fe4,'escape',_0x2bcc8a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x147b5c,_0x161fe4)=>{this['stopListening'](_0x161fe4,'escape',_0x2bcc8a);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4f7306{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d17fb){super(_0x1d17fb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1229a5=this['context']['config'];_0x1229a5['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1229a5['define']('comments.maxThreadTotalWeight',0x1f4),_0x1229a5['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1229a5['define']('comments.CommentThreadView',gt),_0x1229a5['define']('comments.CommentView',Tt),_0x1229a5['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x55f132=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5c5540,_0x240eb5)=>this['_addCommentThread'](_0x240eb5)),this['on']('submitCommentThread',(_0xd7b906,_0x3755c9)=>this['_submitCommentThread'](_0x3755c9)),this['on']('resolveCommentThread',(_0x52825d,_0x72f8d4)=>this['_resolveCommentThread'](_0x72f8d4)),this['on']('resolveCommentThread',(_0x81dc51,_0x1baa45)=>this['_updateActiveAnnotation'](_0x1baa45),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2dd22d,_0x363db2)=>this['_reopenCommentThread'](_0x363db2)),this['on']('reopenCommentThread',(_0x4cab1b,_0x595248)=>this['_updateActiveAnnotation'](_0x595248),{'priority':'lowest'}),this['on']('removeCommentThread',(_0xbe7141,_0x155cab)=>this['_removeCommentThread'](_0x155cab)),this['on']('updateCommentThread',(_0x9e435e,_0x2d667e)=>this['_updateCommentThread'](_0x2d667e)),this['on']('updateCommentThread',(_0x486ca1,_0x565be3)=>this['_updateActiveAnnotation'](_0x565be3),{'priority':'lowest'}),this['on']('addComment',(_0x350a0d,_0x462968)=>this['_addComment'](_0x462968)),this['on']('updateComment',(_0x1be0a8,_0x5a28ba)=>this['_updateComment'](_0x5a28ba)),this['on']('removeComment',(_0x32e4d7,_0x2e89a7)=>this['_removeComment'](_0x2e89a7)),this['on']('addComment',(_0x108107,{threadId:_0x4d03d3,isFromAdapter:_0x41e1a9})=>{if(_0x41e1a9)return;const _0x45cc50=this['getCommentThread'](_0x4d03d3),_0xad8b2c=_0x45cc50&&this['_threadToController']['get'](_0x45cc50);_0xad8b2c&&_0xad8b2c['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x55f132,'change:activeAnnotations',(_0x60d657,_0x2ef58d,_0x1e87a1)=>{const _0x1bebe7=Array['from'](_0x1e87a1)['map'](_0x2d59e7=>this['_viewToController']['get'](_0x2d59e7['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1bebe7?_0x1bebe7['model']:null;});}set['adapter'](_0xacab3f){if(this['_adapter'])throw new _0x23d4ab('commentsrepository-adapter-already-set');this['_adapter']=_0xacab3f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xd99c=_t,threadId:_0x20f006=_0x456ced(),comments:_0x25e0ec=[],unlinkedAt:_0x22662a=null,resolvedAt:_0x2b339f=null,resolvedBy:_0x1ed9e9=null,target:_0x7cb89a=null,context:_0x4423ef=null,attributes:_0x2ac789={},isResolvable:_0x5f0f7d=!0x0,isSubmitted:_0x31cf18=!0x1,isFromAdapter:_0x27d32c=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xd99c),{'channelId':_0xd99c,'threadId':_0x20f006,'comments':_0x25e0ec,'unlinkedAt':_0x22662a,'resolvedAt':_0x2b339f,'resolvedBy':_0x1ed9e9,'target':_0x7cb89a,'context':_0x4423ef,'attributes':_0x2ac789,'isFromAdapter':_0x27d32c,'isResolvable':_0x5f0f7d,'isSubmitted':_0x31cf18}),this['getCommentThread'](_0x20f006);}['openNewCommentThread']({channelId:_0x7b08e7=_t,threadId:_0x19d0d8=_0x456ced(),target:_0x5bd1c6,context:_0x36b263=null,isResolvable:_0xbfe1ff=!0x0}){if(this['_readOnlyChannels']['has'](_0x7b08e7)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5bd1c6)throw new _0x23d4ab('commentsrepository-missing-target');const _0x400510=this['addCommentThread']({'channelId':_0x7b08e7,'threadId':_0x19d0d8,'target':_0x5bd1c6,'context':_0x36b263,'isResolvable':_0xbfe1ff});if(!_0x400510)return null;const _0x21223f=this['_threadToController']['get'](_0x400510),_0x1f8956=_0x21223f['view']['commentThreadInputView']['commentInputView'],_0x3a7362=this['context']['plugins']['get'](y),_0x36b1fc=_0x3a7362['getByInnerView'](_0x21223f['view']);return _0x3a7362['activate'](_0x36b1fc),_0x1f8956['once']('editorReady',()=>_0x1f8956['focus']()),_0x400510;}['hasCommentThread'](_0x32e906){if('string'!=typeof _0x32e906)throw new _0x23d4ab('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x32e906);}['updateCommentThread']({channelId:_0x727098=_t,threadId:_0xd79a67,context:_0x2f52a8,unlinkedAt:_0x4dbfb9,attributes:_0x576b9a,isFromAdapter:_0x4dfe69=!0x1}){return this['fire'](Nt('updateCommentThread',_0x727098),{'channelId':_0x727098,'threadId':_0xd79a67,'context':_0x2f52a8,'unlinkedAt':_0x4dbfb9,'attributes':_0x576b9a,'isFromAdapter':_0x4dfe69}),this['getCommentThread'](_0xd79a67);}['getCommentThread'](_0x7cab06){if('string'!=typeof _0x7cab06)throw new _0x23d4ab('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x7cab06);}['fetchCommentThread']({channelId:_0x2b0064,threadId:_0x594ae3}={}){const _0x15b4cb=this['getCommentThread'](_0x594ae3);if(_0x15b4cb)return Promise['resolve'](_0x15b4cb);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x23d4ab('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2b0064,'threadId':_0x594ae3})['then'](_0x776ffb=>this['hasCommentThread'](_0x594ae3)?this['getCommentThread'](_0x594ae3):_0x776ffb?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2b0064},_0x776ffb)):void 0x0)['catch'](_0x37c1da=>{throw console['error'](_0x37c1da),new _0x23d4ab('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0xd7dc1c,skipNotAttached:_0x357360=!0x1,skipEmpty:_0x203c60=!0x1,toJSON:_0x2b657e=!0x1}={}){const _0x1258d8=[];for(const _0x2a1242 of this['_threads']['values']())_0xd7dc1c&&_0x2a1242['channelId']!==_0xd7dc1c||_0x357360&&!_0x2a1242['isAttached']||_0x203c60&&0x0===_0x2a1242['length']||_0x1258d8['push'](_0x2a1242);return _0x2b657e?_0x1258d8['map'](_0x5290e5=>_0x5290e5['toJSON']()):_0x1258d8;}['getAnnotationForCommentThread'](_0x2e1687){const _0x42cd62=this['_threadToController']['get'](_0x2e1687);if(!_0x42cd62)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x42cd62['view'])||null;}['getCommentThreadForAnnotation'](_0x2ee7d5){const _0x1edafe=this['_viewToController']['get'](_0x2ee7d5['innerView']);return _0x1edafe?_0x1edafe['model']:null;}['setActiveCommentThread'](_0x36f9ab){const _0x524c5d=this['context']['plugins']['get'](y);if(!_0x36f9ab)return void(this['activeCommentThread']&&_0x524c5d['deactivateAll']());const _0x45a682=this['getCommentThread'](_0x36f9ab);if(!_0x45a682)throw new _0x23d4ab('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x36f9ab});if(!this['_threadToController']['has'](_0x45a682))throw new _0x23d4ab('commentsrepository-active-not-attached',null,{'threadId':_0x36f9ab});const _0x1a4d36=_0x524c5d['getByInnerView'](this['_threadToController']['get'](_0x45a682)['view']);_0x524c5d['activate'](_0x1a4d36);}['switchReadOnly'](_0x281175,_0x16407f){_0x281175?this['_readOnlyChannels']['add'](_0x16407f):this['_readOnlyChannels']['delete'](_0x16407f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xced220){return this['_readOnlyChannels']['has'](_0xced220)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3c28ab,_0x5c7865){return new vt(_0x3c28ab,_0x5c7865);}['setPermissions'](_0x43f092,_0x151e0b=_t){this['_permissions']['set'](_0x151e0b,_0x43f092),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1a18b8=_t){return this['_permissions']['has'](_0x1a18b8)?this['_permissions']['get'](_0x1a18b8):bt;}['_addCommentThread']({channelId:_0x4c70e4,threadId:_0x3e130e,comments:_0x5e8f6e,unlinkedAt:_0x3084c4,resolvedAt:_0x5e2aab,resolvedBy:_0x36627b,target:_0x46c3b2,context:_0x29ee9b,attributes:_0x3248a8,isFromAdapter:_0x3c1ed6,isResolvable:_0x803adf,isSubmitted:_0x468aa9}){if('string'!=typeof _0x3e130e)throw new _0x23d4ab('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3e130e});if(this['hasCommentThread'](_0x3e130e))throw new _0x23d4ab('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3e130e});const _0x475ffa=new pi(this,{'channelId':_0x4c70e4,'id':_0x3e130e,'context':_0x29ee9b,'attributes':_0x3248a8,'unlinkedAt':_0x3084c4,'resolvedAt':_0x5e2aab,'resolvedBy':_0x36627b?this['context']['plugins']['get'](it)['getUser'](_0x36627b):null,'isResolvable':_0x803adf,'isSubmitted':_0x468aa9||_0x3c1ed6});this['_threads']['set'](_0x3e130e,_0x475ffa);for(const _0x18dc4e of _0x5e8f6e)_0x475ffa['_add'](this['_createNewComment']({'threadId':_0x3e130e,..._0x18dc4e}));return _0x46c3b2&&_0x475ffa['attachTo'](_0x46c3b2),_0x3c1ed6||!_0x475ffa['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4c70e4,'threadId':_0x3e130e});}['_submitCommentThread']({channelId:_0x11daf1,threadId:_0x2334ca}){if(!this['hasCommentThread'](_0x2334ca))throw new _0x23d4ab('commentsrepository-missing-comment-thread',this);const _0x262487=this['getCommentThread'](_0x2334ca);if(_0x262487['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xeaee41,comments:_0x18237a,resolvedAt:_0x5489b7,resolvedBy:_0x274fdd,context:_0x25c960,attributes:_0x39b09b}=_0x262487,_0x51403d=this['context']['plugins']['get']('PendingActions'),_0x21cd42=_0x51403d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x11daf1,'threadId':_0xeaee41,'comments':_0x18237a['map'](_0x3e8ff5=>_0x3e8ff5['toJSON']()),'resolvedAt':_0x5489b7,'resolvedBy':_0x274fdd?_0x274fdd['id']:_0x274fdd,'context':_0x25c960,'attributes':_0x39b09b})['then'](({comments:_0x3a0ba7})=>{_0x51403d['remove'](_0x21cd42);for(const _0x5e0083 of _0x3a0ba7)this['_updateComment']({'channelId':_0x11daf1,'threadId':_0x2334ca,'commentId':_0x5e0083['commentId'],'createdAt':_0x5e0083['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2a1071=>{throw console['error'](_0x2a1071),new _0x23d4ab('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4f6ca7,target:_0xab63b8}){const _0x960bdb=this['getCommentThread'](_0x4f6ca7);if(!_0x960bdb)throw new _0x23d4ab('commentsrepository-attach-missing-comment-thread',this);const _0x525ad6=this['context']['plugins']['get']('PendingActions'),_0xeee020=this['context']['plugins']['get'](y),_0x10b8af=this['_createCommentThreadView'](_0x960bdb),_0x58d21a=new vt(_0x960bdb,_0x10b8af);let _0x233ca4=null;_0x10b8af['on']('change:isDirty',(_0x3e4bed,_0x176d7f,_0x2787f7)=>{_0x2787f7?_0x233ca4=_0x525ad6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x233ca4&&(_0x525ad6['remove'](_0x233ca4),_0x233ca4=null);}),this['_threadToController']['set'](_0x960bdb,_0x58d21a),this['_viewToController']['set'](_0x10b8af,_0x58d21a);const _0x4e35d9=new E(this['context']['locale'],_0x10b8af);_0x4e35d9['bind']('length')['to'](_0x10b8af),_0x4e35d9['bind']('isDirty')['to'](_0x10b8af,'isDirty',_0x10b8af,'length',(_0x4137d7,_0x462f65)=>_0x4137d7||!_0x462f65),_0x4e35d9['bind']('isActive')['to'](_0x10b8af),_0x4e35d9['type']='comment';const _0x5d44bf=new T({'view':_0x4e35d9,'target':_0xab63b8,'type':'comment','isVisible':!_0x960bdb['archivedAt']&&!!('function'==typeof _0xab63b8?_0xab63b8():_0xab63b8)});return _0x10b8af['on']('escape',()=>{_0x5d44bf['fire']('escape');}),this['_bindAnnotationToEditors'](_0x10b8af,_0x5d44bf),_0xeee020['add'](_0x5d44bf),_0x5d44bf;}['_bindAnnotationToEditors'](_0x18b22d,_0x328c6b){this['listenTo'](_0x18b22d,'editorReady',(_0x55829e,_0x3461a9)=>{const _0xc0f498=_0x3461a9['ui']['view']['body']['bodyCollectionContainer'];_0x328c6b['focusableElements']['add'](_0xc0f498),this['context']instanceof _0x1950a2&&this['context']['ui']['focusTracker']['add'](_0xc0f498);},{'priority':'highest'}),this['listenTo'](_0x18b22d,'editorDestroyed',(_0x11d190,_0x23a4d7)=>{const _0x260569=_0x23a4d7['ui']['view']['body']['bodyCollectionContainer'];_0x328c6b['focusableElements']['has'](_0x260569)&&_0x328c6b['focusableElements']['remove'](_0x260569),this['context']instanceof _0x1950a2&&this['context']['ui']['focusTracker']['remove'](_0x260569);});}['_unbindEditors'](_0x326efb){this['stopListening'](_0x326efb,'editorReady'),this['stopListening'](_0x326efb,'editorDestroyed');}['_createCommentThreadView'](_0x22f7f6){const _0xe172cf=this['context']['plugins']['get'](it),{config:_0x4e2603,locale:_0x31d5ef}=this['context'],_0x4b0402=pt(_0x4e2603['get']('locale'),_0x31d5ef);return new(0x0,(_0x4e2603['get']('comments'))['CommentThreadView'])(_0x31d5ef,_0x22f7f6,_0xe172cf['me'],{'editorConfig':{..._0x4e2603['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4e2603['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4e2603['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4e2603['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4e2603['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4b0402,'CommentView':_0x4e2603['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4efbba,channelId:_0x3b0cb0,resolvedAt:_0x2b01d1,resolvedBy:_0xe1e29a,isFromAdapter:_0x1d2c8e}){if(!this['hasCommentThread'](_0x4efbba))throw new _0x23d4ab('commentsrepository-missing-comment-thread',null,{'threadId':_0x4efbba});const _0x34c9c0=this['getCommentThread'](_0x4efbba);if(_0x34c9c0['isResolved'])throw new _0x23d4ab('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4efbba});const _0x2c1843=this['context']['plugins']['get'](it);if(_0x34c9c0['resolvedBy']=_0x2c1843['getUser'](_0xe1e29a),_0x34c9c0['resolvedAt']=_0x2b01d1,_0x1d2c8e||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2236d5=this['context']['plugins']['get']('PendingActions'),_0x6cfc2c=_0x2236d5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3b0cb0,'threadId':_0x4efbba})['then'](({resolvedAt:_0x2e0857,resolvedBy:_0x2ee5e7})=>{_0x2236d5['remove'](_0x6cfc2c),_0x34c9c0['resolvedBy']['id']!==_0x2ee5e7&&(_0x34c9c0['resolvedBy']=_0x2c1843['getUser'](_0x2ee5e7)),_0x34c9c0['resolvedAt']=_0x2e0857;})['catch'](_0x2cfefc=>{throw console['error'](_0x2cfefc),new _0x23d4ab('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1259ac,channelId:_0x3794d4,isFromAdapter:_0x4ab40e}){if(!this['hasCommentThread'](_0x1259ac))throw new _0x23d4ab('commentsrepository-missing-comment-thread',null,{'threadId':_0x1259ac});const _0x5f0b01=this['getCommentThread'](_0x1259ac);if(!_0x5f0b01['isResolved'])throw new _0x23d4ab('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1259ac});if(_0x5f0b01['resolvedBy']=null,_0x5f0b01['resolvedAt']=null,_0x4ab40e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x503b67=this['context']['plugins']['get']('PendingActions'),_0x5a1b05=_0x503b67['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3794d4,'threadId':_0x1259ac})['then'](()=>_0x503b67['remove'](_0x5a1b05))['catch'](_0x419ca3=>{throw console['error'](_0x419ca3),new _0x23d4ab('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2e15a3,isFromAdapter:_0x3c38c9}){const _0x580962=this['getCommentThread'](_0x2e15a3);if(!_0x580962)throw new _0x23d4ab('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2e15a3),this['_threads']['delete'](_0x2e15a3),!_0x580962['isSubmitted']||_0x3c38c9||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3a47e1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5dab02}=_0x580962,_0x3b922b=_0x3a47e1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5dab02,'threadId':_0x2e15a3})['then'](()=>_0x3a47e1['remove'](_0x3b922b))['catch'](_0x3742a7=>{throw console['error'](_0x3742a7),new _0x23d4ab('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2cfd14,unlinkedAt:_0x900e77,context:_0x5c4aec,attributes:_0x3c6546,isFromAdapter:_0x4a615d}){if('string'!=typeof _0x2cfd14)throw new _0x23d4ab('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2cfd14});if(!this['hasCommentThread'](_0x2cfd14))throw new _0x23d4ab('commentsrepository-missing-comment-thread',null,{'threadId':_0x2cfd14});const _0x2b0c06=this['getCommentThread'](_0x2cfd14);let _0xabb9c0=!0x1;if(void 0x0!==_0x5c4aec&&_0x2b0c06['context']!==_0x5c4aec&&(_0x2b0c06['context']=_0x5c4aec,_0xabb9c0=!0x0),void 0x0!==_0x900e77&&_0x2b0c06['unlinkedAt']!==_0x900e77&&(_0x2b0c06['unlinkedAt']=_0x900e77,_0xabb9c0=!0x0),_0x3c6546&&!At(_0x3c6546,_0x2b0c06['attributes'])&&(_0x2b0c06['attributes']=_0x3c6546,_0xabb9c0=!0x0),!_0xabb9c0)return Promise['resolve']();if(!_0x2b0c06['isSubmitted']||_0x4a615d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x52038a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16c47c}=_0x2b0c06,_0x48decb=_0x52038a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x16c47c,'threadId':_0x2cfd14,'context':_0x5c4aec,'unlinkedAt':_0x900e77,'attributes':_0x3c6546})['then'](()=>_0x52038a['remove'](_0x48decb))['catch'](_0x4c59e9=>{throw console['error'](_0x4c59e9),new _0x23d4ab('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xe5d139){const _0x245f23=this['context']['plugins']['get'](y),_0x443c3a=this['getCommentThread'](_0xe5d139);if(_0x443c3a['_isAttached']=!0x1,this['_threadToController']['has'](_0x443c3a)){const _0x382cd9=this['_threadToController']['get'](_0x443c3a),_0x2bb3e7=_0x382cd9['view'],_0x4246db=_0x245f23['getByInnerView'](_0x2bb3e7);this['_threadToController']['delete'](_0x443c3a),this['_viewToController']['delete'](_0x2bb3e7),_0x4246db&&_0x245f23['remove'](_0x4246db),_0x382cd9['destroy'](),_0x2bb3e7['destroy']()['then'](()=>{this['_unbindEditors'](_0x2bb3e7);});}}['_updateActiveAnnotation']({threadId:_0x4f72ca,resolvedAt:_0xda0829,unlinkedAt:_0x3f417f}){const _0x5a0044=!!_0xda0829,_0x24631f=this['context']['plugins']['get'](y),_0x4bb190=this['getCommentThread'](_0x4f72ca);if(this['_threadToController']['has'](_0x4bb190)){const _0x57661f=this['_threadToController']['get'](_0x4bb190)['view'],_0x103dc0=_0x24631f['getByInnerView'](_0x57661f);_0x103dc0&&(_0x5a0044&&_0x24631f['_removeActiveAnnotation'](_0x103dc0),_0x3f417f?_0x103dc0['isVisible']=!0x1:_0x103dc0['refreshVisibility']());}}['_getExternalAuthor'](_0xb2d41){const _0x8a80a8=this['context']['plugins']['get'](it),_0x4d7c1d=It('external:'+_0xb2d41),_0x5d4458=_0x8a80a8['getUser'](_0x4d7c1d);return _0x5d4458||_0x8a80a8['addUser']({'id':_0x4d7c1d,'name':_0xb2d41});}['_createNewComment']({threadId:_0x51235c,commentId:_0x1b260a=_0x456ced(),content:_0x4c37f4,authorId:_0x2a19f9,createdAt:_0x1d34b2,attributes:_0x154c66}){if('string'!=typeof _0x1b260a)throw new _0x23d4ab('commentsrepository-invalid-commentid');if('string'!=typeof _0x2a19f9)throw new _0x23d4ab('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4c37f4||!_0x4c37f4['trim']())throw new _0x23d4ab('commentsrepository-invalid-comment-content');const _0x272f44=this['context']['plugins']['get'](it)['getUser'](_0x2a19f9);if(!_0x272f44)throw new _0x23d4ab('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2a19f9});let _0x25d745=null,_0x3bf487=_0x1d34b2;return _0x154c66?.['@external']&&(_0x25d745=this['_getExternalAuthor'](_0x154c66['@external']['authorName']),_0x3bf487=new Date(_0x154c66['@external']['createdAt'])),new wi(this,{'threadId':_0x51235c,'id':_0x1b260a,'author':_0x25d745||_0x272f44,'creator':_0x272f44,'content':_0x4c37f4,'createdAt':_0x1d34b2,'authoredAt':_0x3bf487,'attributes':_0x154c66});}['_addComment'](_0x336471){let {threadId:_0x143d6b,content:_0x233c1f,attributes:_0x340088,isFromAdapter:_0x4a738a}=_0x336471;const _0x348d77=this['getCommentThread'](_0x336471['threadId']);if(!_0x348d77)throw new _0x23d4ab('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3a4805=this['_createNewComment'](_0x336471),{id:_0x1ea2b6}=_0x3a4805;if(_0x348d77['_add'](_0x3a4805),_0x4a738a||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x348d77['isSubmitted'])return Promise['resolve']();const _0x4b693a=this['context']['plugins']['get']('PendingActions'),{channelId:_0xdb7144}=_0x348d77,_0x15030e=_0x4b693a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x340088||(_0x340088={}),this['adapter']['addComment']({'channelId':_0xdb7144,'threadId':_0x143d6b,'commentId':_0x1ea2b6,'content':_0x233c1f,'attributes':_0x340088})['then'](_0x89bae7=>{_0x4b693a['remove'](_0x15030e),_0x89bae7&&this['_updateComment']({'channelId':_0xdb7144,'threadId':_0x143d6b,'commentId':_0x1ea2b6,'createdAt':_0x89bae7['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2f769a=>{throw console['error'](_0x2f769a),new _0x23d4ab('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xdbe070,commentId:_0x1fcc92,content:_0x4f05a5,createdAt:_0x1bd509,attributes:_0x11e2a5,isFromAdapter:_0x4a8099}){if(void 0x0!==_0x4f05a5&&('string'!=typeof _0x4f05a5||!_0x4f05a5['trim']()['length']))throw new _0x23d4ab('commentsrepository-update-comment-invalid-content');const _0x28ca8d=this['getCommentThread'](_0xdbe070),_0x1bbffb=_0x28ca8d['getComment'](_0x1fcc92);if(!_0x1bbffb)throw new _0x23d4ab('commentsrepository-update-missing-comment',this);let _0x599dbe=!0x1;if(_0x4f05a5&&_0x4f05a5!==_0x1bbffb['content']&&(_0x1bbffb['isEditable']||_0x4a8099)&&(_0x1bbffb['content']=_0x4f05a5,_0x599dbe=!0x0),_0x1bd509&&_0x1bd509!==_0x1bbffb['createdAt']&&(_0x1bbffb['createdAt']=_0x1bd509,_0x1bbffb['attributes']&&_0x1bbffb['attributes']['@external']||(_0x1bbffb['authoredAt']=_0x1bd509),_0x599dbe=!0x0),_0x11e2a5&&!At(_0x11e2a5,_0x1bbffb['attributes'])&&(_0x1bbffb['attributes']=_0x11e2a5,_0x599dbe=!0x0),!_0x599dbe)return Promise['resolve']();if(_0x28ca8d['fire']('commentUpdated'),_0x4a8099||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x27655c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7700b0}=this['getCommentThread'](_0x1bbffb['threadId']),_0x503bce=_0x27655c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x7700b0,'threadId':_0xdbe070,'commentId':_0x1fcc92,'content':_0x4f05a5,'attributes':_0x11e2a5})['then'](()=>_0x27655c['remove'](_0x503bce))['catch'](_0x16dd96=>{throw console['error'](_0x16dd96),new _0x23d4ab('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x15de93,commentId:_0x56e0f3,isFromAdapter:_0x1d3464}){const _0x577c9e=this['getCommentThread'](_0x15de93),_0x12ae1a=_0x577c9e['getComment'](_0x56e0f3);if(!_0x12ae1a)throw new _0x23d4ab('commentsrepository-remove-missing-comment',this);if(_0x577c9e['_remove'](_0x12ae1a),_0x1d3464||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x47cd21=this['context']['plugins']['get']('PendingActions'),{channelId:_0x306371}=_0x577c9e,_0x1b6c33=_0x47cd21['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x306371,'threadId':_0x15de93,'commentId':_0x56e0f3})['then'](()=>_0x47cd21['remove'](_0x1b6c33))['catch'](_0x8eba16=>{throw console['error'](_0x8eba16),new _0x23d4ab('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
+ _0x5b7b5d(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4af165,_0x35c2d7){super();const _0x5eebeb=_0x35c2d7['isResolvable'];this['channelId']=_0x35c2d7['channelId'],this['id']=_0x35c2d7['id'],this['comments']=new _0x584cc7(),this['_repository']=_0x4af165,this['_isAttached']=!0x1,this['_isSubmitted']=_0x35c2d7['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4af165,'_permissions',_0x4af165,'_readOnlyChannels',()=>_0x4af165['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4af165,'_permissions',()=>_0x4af165['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4af165,'_permissions',()=>{const _0x4e2fee=_0x4af165['getPermissions'](this['channelId']);return _0x4e2fee['write']||_0x4e2fee['admin'];}),this['bind']('isResolvable')['to'](_0x4af165,'_permissions',()=>_0x5eebeb&&_0x4af165['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x35c2d7['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x701124,_0x556135)=>_0x701124?_0x556135?_0x701124<_0x556135?_0x701124:_0x556135:_0x701124:_0x556135),this['set']('unlinkedAt',_0x35c2d7['unlinkedAt']||null),this['set']('resolvedAt',_0x35c2d7['resolvedAt']||null),this['set']('resolvedBy',_0x35c2d7['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1fac7a=>!!_0x1fac7a),this['set']('attributes',_0x35c2d7['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x4ce62,_0x1a68c9)=>_0x4ce62+_0x1a68c9['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x18c946,id:_0x5683b9}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x18c946),{'channelId':_0x18c946,'threadId':_0x5683b9});}['setUnlinkedAt'](_0x11e2bd){this['_update']({'unlinkedAt':_0x11e2bd});}['resolve']({resolvedAt:_0x3faf1e=new Date(),resolvedBy:_0x4c7dc2=null,isFromAdapter:_0x26afb3=!0x1}={}){const _0xf4f181=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x141a08,id:_0x13de96}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x141a08),{'channelId':_0x141a08,'threadId':_0x13de96,'resolvedAt':_0x3faf1e,'resolvedBy':_0x4c7dc2||_0xf4f181['id'],'isFromAdapter':_0x26afb3});}['reopen']({isFromAdapter:_0x5921fe=!0x1}={}){const {channelId:_0x26c8b9,id:_0x2c0071}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x26c8b9),{'channelId':_0x26c8b9,'threadId':_0x2c0071,'isFromAdapter':_0x5921fe});}['setContext'](_0x46ad79){this['context']||this['_update']({'context':_0x46ad79});}['setAttribute'](_0x42fd59,_0x1d8066){const _0xe57a2e=wt(this['attributes']);yt(_0xe57a2e,_0x42fd59,_0x1d8066),this['_update']({'attributes':_0xe57a2e});}['removeAttribute'](_0x560f02){const _0x2dfcb3=wt(this['attributes']);Ct(_0x2dfcb3,_0x560f02),this['_update']({'attributes':_0x2dfcb3});}['remove']({isFromAdapter:_0x79ba3b=!0x1}={}){const {channelId:_0x546440,id:_0x10a4a9}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x546440),{'channelId':_0x546440,'threadId':_0x10a4a9,'isFromAdapter':_0x79ba3b});}['attachTo'](_0x2adbbb){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2adbbb});}['addComment'](_0x2c2ec6){const {channelId:_0xdbb76c,id:_0x4fc02f}=this;this['_repository']['fire'](Nt('addComment',_0xdbb76c,_0x4fc02f),Object['assign']({'channelId':_0xdbb76c,'threadId':_0x4fc02f},_0x2c2ec6));}['getComment'](_0x35cfc8){if('string'!=typeof _0x35cfc8)throw new _0x23d4ab('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x35cfc8});return this['comments']['get'](_0x35cfc8);}['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'](_0x1095c5=>_0x1095c5['toJSON']()),'attributes':this['attributes']};}['_add'](_0x523c1c){return this['listenTo'](_0x523c1c,'change:authoredAt',()=>{const _0x5df4a6=this['_findOptimalIndex'](_0x523c1c),_0x55e823=this['comments'];_0x5df4a6-0x1!=_0x55e823['getIndex'](_0x523c1c)&&_0x5df4a6+0x1!=_0x55e823['getIndex'](_0x523c1c)&&(this['_remove'](_0x523c1c),this['_add'](_0x523c1c));}),this['comments']['add'](_0x523c1c,this['_findOptimalIndex'](_0x523c1c));}['_update'](_0x1ce039){const {channelId:_0x46f831,id:_0x5006f8}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x46f831),{..._0x1ce039,'channelId':_0x46f831,'threadId':_0x5006f8});}['_remove'](_0x3ae29a){return this['stopListening'](_0x3ae29a),_0x3ae29a['destroy'](),this['comments']['remove'](_0x3ae29a);}['_findOptimalIndex'](_0x512d55){const _0x26cb15=this['comments']['find'](_0x1a6999=>new Date(_0x1a6999['authoredAt'])['getTime']()>new Date(_0x512d55['authoredAt'])['getTime']());return _0x26cb15?this['comments']['getIndex'](_0x26cb15):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
+ _0x5b7b5d(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x25da67,_0x12daa6){super();const _0x2aabba=_0x25da67['context']['plugins']['get'](it)['me'],_0x4aebdd=_0x25da67['getCommentThread'](_0x12daa6['threadId']),_0x97a4bc=0x0===_0x4aebdd['comments']['length'],_0x10a61e=_0x2aabba===_0x12daa6['author'];this['id']=_0x12daa6['id'],this['threadId']=_0x12daa6['threadId'],this['author']=_0x12daa6['author'],this['creator']=_0x12daa6['creator'],this['isExternal']=Boolean(_0x12daa6['attributes']&&_0x12daa6['attributes']['@external']),this['set']('content',_0x12daa6['content']),this['createdAt']=_0x12daa6['createdAt']||new Date(),this['set']('authoredAt',_0x12daa6['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4aebdd,'resolvedAt'),this['set']('attributes',_0x12daa6['attributes']||{}),this['bind']('isEditable')['to'](_0x25da67,'_permissions',()=>{const _0x517653=_0x25da67['getPermissions'](_0x4aebdd['channelId'])['write'],_0x52bec0=_0x25da67['getPermissions'](_0x4aebdd['channelId'])['modifyAll'];return _0x10a61e&&_0x517653||!_0x10a61e&&_0x52bec0;}),this['bind']('isRemovable')['to'](_0x4aebdd,'isRemovable',_0x25da67,'_permissions',_0x1cec6e=>{const _0x28ab65=_0x25da67['getPermissions'](_0x4aebdd['channelId'])['write'],_0x7cac4d=_0x25da67['getPermissions'](_0x4aebdd['channelId'])['modifyAll'];return _0x10a61e&&_0x28ab65||_0x1cec6e&&_0x97a4bc||!_0x10a61e&&_0x7cac4d&&!_0x97a4bc;}),this['bind']('isReadOnly')['to'](_0x4aebdd,'isReadOnly'),this['_repository']=_0x25da67;}get['weight'](){return Math['max'](function(_0x40d08a){const _0x4a67b6=document['createElement']('div');return _0x4a67b6['innerHTML']=_0x40d08a,_0x4a67b6['textContent']['length'];}(this['content']),0xc8);}['update'](_0x7effb2){const {threadId:_0x4b0b8f,id:_0x2e21c7}=this;if(!this['_repository']['hasCommentThread'](_0x4b0b8f))throw new _0x23d4ab('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x29ed82}=this['_repository']['getCommentThread'](_0x4b0b8f);this['_repository']['fire'](Nt('updateComment',_0x29ed82,_0x4b0b8f),{'channelId':_0x29ed82,'threadId':_0x4b0b8f,'commentId':_0x2e21c7,..._0x7effb2});}['setAttribute'](_0x53dcf6,_0x4772fa){const _0x5343b3=wt(this['attributes']);yt(_0x5343b3,_0x53dcf6,_0x4772fa),this['update']({'attributes':_0x5343b3});}['removeAttribute'](_0x1b64b6){const _0xf1f08c=wt(this['attributes']);Ct(_0xf1f08c,_0x1b64b6),this['update']({'attributes':_0xf1f08c});}['remove'](_0x553825={}){if(!_0x553825['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x31544f,id:_0x26bcee}=this;if(!this['_repository']['hasCommentThread'](_0x31544f))throw new _0x23d4ab('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x50899b}=this['_repository']['getCommentThread'](_0x31544f);this['_repository']['fire'](Nt('removeComment',_0x50899b,_0x31544f),{'channelId':_0x50899b,'threadId':_0x31544f,'commentId':_0x26bcee,..._0x553825});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3be1bf,..._0x2bd106){for(const _0x2b42de of _0x2bd106)void 0x0!==_0x2b42de&&(_0x3be1bf+=':'+String(_0x2b42de));return _0x3be1bf;}class ot extends _0x56b6c2{constructor(_0x3c4666){super(_0x3c4666),this['set']('hasContent',!0x1);}['refresh'](){const _0x2fc6ca=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5e18a1 of _0x2fc6ca['getRanges']())if(this['_hasContent'](_0x5e18a1))return void(this['hasContent']=!0x0);}['execute']({threadId:_0xaa076f=_0x456ced(),ranges:_0x26ac04,comment:_0x278994}={}){const _0xc09df4=this['editor']['model'],_0x3eb21a=_0x26ac04??Array['from'](_0xc09df4['document']['selection']['getRanges']()),_0x1fc125=[];for(const _0x50a4dd of _0x3eb21a)this['_hasContent'](_0x50a4dd)&&_0x1fc125['push'](this['_trimToContent'](_0x50a4dd));if(!_0x1fc125['length'])throw new _0x23d4ab('addcommentthreadcommand-incorrect-ranges',null);_0x278994&&this['_createCommentThread'](_0xaa076f,_0x278994),this['_createMarkersFromRanges'](_0xaa076f,_0x1fc125,!!_0x278994);}['_createMarkersFromRanges'](_0x43b16d,_0x4705b0,_0x4e058d){this['editor']['model']['change'](_0x3e9b37=>{for(const _0x11b8b4 of _0x4705b0){const _0x337b91=_0x456ced()['substr'](0x1,0x5),_0x35f69a='comment:'+_0x43b16d+':'+_0x337b91;_0x3e9b37['addMarker'](_0x35f69a,{'range':_0x11b8b4,'usingOperation':_0x4e058d,'affectsData':_0x4e058d});}});}['_createCommentThread'](_0x3272e9,_0x5acd29){const _0x53b0ff=this['editor']['plugins']['get']('CommentsRepository'),_0x32c354=this['editor']['config']['get']('collaboration.channelId'),_0x3ae110=this['editor']['plugins']['get']('Users')['me'];if(!_0x3ae110)throw new _0x23d4ab('addcommentthreadcommand-user-not-found',null);_0x53b0ff['addCommentThread']({'threadId':_0x3272e9,'channelId':_0x32c354,'comments':[{'authorId':_0x3ae110['id'],'content':_0x5acd29,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x34183d){for(const _0x4bcad4 of _0x34183d['getItems']())if(this['_itemIsContent'](_0x4bcad4))return!0x0;return!0x1;}['_itemIsContent'](_0x58ffe1){return _0x58ffe1['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x58ffe1)&&!_0x58ffe1['is']('element','tableCell');}['_trimToContent'](_0x4209a3){const _0x4c7fbb=_0x51cc34=>!this['_itemIsContent'](_0x51cc34['item']),_0x345365=_0x4209a3['start']['getLastMatchingPosition'](_0x4c7fbb),_0x545bb5=_0x4209a3['end']['getLastMatchingPosition'](_0x4c7fbb,{'direction':'backward'});return this['editor']['model']['createRange'](_0x345365,_0x545bb5);}}class b extends _0x6c9bcf{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4e342f){super(_0x4e342f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x23bcb6=this['editor'],_0xc25b3a=_0x23bcb6['model']['document']['selection'],_0x3184d5=_0x24341f(()=>this['refreshSelectedViews'](),0xa);_0xc25b3a['on']('change:range',(_0xf468d4,_0x380946)=>{_0x380946['directChange']&&(_0x3184d5['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x23bcb6['editing']['view']['document'],'change:isFocused',(_0x145483,_0x5e18c9,_0x3b7578)=>{_0x3b7578&&_0x3184d5();}),this['listenTo'](_0x23bcb6['ui']['focusTracker'],'change:isFocused',(_0x26c162,_0x14483d,_0x36776b)=>{_0x36776b||this['fire']('blur',{'isAnnotationTracked':_0x3c4c5f=>this['_editorAnnotationsData']['has'](_0x3c4c5f['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4663d4){if(this['_editorAnnotations']['has'](_0x4663d4['view']))return;this['_editorAnnotations']['add'](_0x4663d4['view']),this['editor']['ui']['focusTracker']['add'](_0x4663d4['view']['element']);const _0x50c07d=this['editor']['plugins']['get'](y);this['listenTo'](_0x50c07d['collection'],'remove',(_0x1d03b2,_0x56ec97)=>{this['editor']['ui']['focusTracker']['remove'](_0x56ec97['view']['element']),this['_editorAnnotations']['delete'](_0x56ec97['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x20ee3b){if('function'!=typeof _0x20ee3b)throw new _0x23d4ab('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x20ee3b);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x225d66,annotations:_0x286844}){const _0x5e87e4=[],_0x2b4676=this['editor']['model']['document']['selection'],_0x7e961c=Array['from'](_0x2b4676['getRanges']());for(const [_0x57a813,_0x27cd30]of this['_editorAnnotationsData']){const _0x50b7fb=_0x36282d(_0x27cd30),_0x1fa764=_0x286844['getByInnerView'](_0x57a813);_0x50b7fb&&_0x1fa764&&_0x5e87e4['push']({'annotation':_0x1fa764,'range':_0x50b7fb});}function _0x36282d(_0x272200){for(const _0x587a14 of _0x272200)for(const _0x586c6a of _0x7e961c)if(_0x587a14['containsRange'](_0x586c6a,!_0x2b4676['isCollapsed']))return _0x587a14;return null;}return _0x5e87e4['sort']((_0x7dddf0,_0x428f21)=>{const _0x3f3cac=_0x7dddf0['range'],_0x47c0eb=_0x428f21['range'];if(!_0x3f3cac['isEqual'](_0x47c0eb)){if(_0x3f3cac['containsRange'](_0x47c0eb,!0x0))return 0x1;if(_0x47c0eb['containsRange'](_0x3f3cac,!0x0))return-0x1;}return _0x7dddf0['annotation']==_0x225d66?-0x1:_0x428f21['annotation']==_0x225d66?0x1:0x0;})['map'](_0x3ca64d=>_0x3ca64d['annotation']);}get['_editorAnnotationsData'](){const _0x43e5bb=new Map();for(const _0x23da5f of Array['from'](this['_dataCollectors']))for(const [_0x87cde5,_0x3e92d0]of _0x23da5f())_0x43e5bb['set'](_0x87cde5,_0x3e92d0);return _0x43e5bb;}}class st extends _0x6c9bcf{['afterInit'](){const _0x3c78e9=this['editor'];if(!_0x3c78e9['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3c78e9['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x6c9bcf{constructor(_0x1e04fa){super(_0x1e04fa),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x352b85=this['editor'],_0x186bc3=_0x352b85['commands']['get']('importWord'),_0x1daac6=_0x352b85['plugins']['get'](it);_0x186bc3&&(_0x186bc3['on']('execute',(_0x377083,[,_0x1e1cdf])=>{_0x1e1cdf['collaboration_features']={'comments':!0x0,'user_id':_0x1daac6['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x186bc3,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5988c1,_0x38a3bb){const {comment_threads:_0x2971f9}=_0x38a3bb;_0x2971f9&&_0x2971f9['forEach'](({thread_id:_0x238220,comments:_0x5182cb,is_resolved:_0x218295})=>{const _0x56b5e0=new Date(),_0x316bf6=_0x5182cb['map'](({author:_0x427aff,content:_0x274cdd,created_at:_0x571a05})=>({'content':_0x274cdd,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x56b5e0,'attributes':{'@external':{'authorName':_0x427aff,'createdAt':_0x571a05?new Date(_0x571a05):new Date(),'source':'importWord'}}})),_0x867322=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x867322,'threadId':_0x238220,'comments':_0x316bf6,'resolvedAt':_0x218295?_0x56b5e0:null});});}}class at extends _0x6c9bcf{constructor(_0x34cf53){super(_0x34cf53),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x4b1216=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4b1216,'contentInsertion',(_0x57667a,_0x1116fe)=>this['_removeMarkersWithoutThreads'](_0x1116fe['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x36eba5){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x36eba5;const _0x58b996=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2e0f43 of _0x36eba5['keys']()){const [_0xc34285,_0x5f157e]=_0x2e0f43['split'](':');'comment'!=_0xc34285||_0x58b996['hasCommentThread'](_0x5f157e)||_0x36eba5['delete'](_0x2e0f43);}return _0x36eba5;}['_registerMarkerInClipboardPipeline'](){const _0x32d8ec=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5ba9eb=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5ba9eb&&_0x32d8ec['_registerMarkerToCopy']('comment',_0x5ba9eb);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3c2983){switch(_0x3c2983){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0xc133c1){const _0x7b3502=_0xc133c1['split'](':');return{'group':_0x7b3502[0x0],'id':_0x7b3502[0x1],'part':_0x7b3502[0x2]};}class ut extends _0x6c9bcf{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3eb1ca,_0x20164d)=>{if(!_0x20164d['options']['showCommentHighlights'])return null;if(_0x20164d['options']['ignoreResolvedComments']){const {id:_0x39a8e4}=ft(_0x3eb1ca['markerName']),_0x48ba59=this['editor']['plugins']['get'](o);if(_0x48ba59['getCommentThread'](_0x39a8e4)?.['isResolved']&&_0x3eb1ca['item'])return _0x20164d['consumable']['consume'](_0x3eb1ca['item'],'addMarker:'+_0x3eb1ca['markerName']),_0x20164d['consumable']['consume'](_0x3eb1ca['item'],'removeMarker:'+_0x3eb1ca['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x505bcf=>{_0x505bcf['on']('addMarker:comment',(_0x475ce0,_0x2bcd0e,_0xa8b360)=>{if(!_0xa8b360['options']['showCommentHighlights'])return;const _0x2cbc64=_0x2bcd0e['item'];if(!_0x2cbc64)return;const _0x348353=_0xa8b360['mapper']['toViewElement'](_0x2cbc64);this['editor']['model']['schema']['isObject'](_0x2cbc64)&&_0x348353&&!_0x348353['getCustomProperty']('widget')&&_0x348353['is']('containerElement')&&_0x1bd861(_0x348353,_0xa8b360['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x595589,{writer:_0x4c95e5,options:_0x5506da})=>{if(!_0x5506da['showCommentHighlights'])return null;const _0x351dc9=_0x4c95e5['createContainerElement']('div'),_0x5cffb5=_0x4c95e5['createEmptyElement']('hr');return _0x4c95e5['addClass']('ck-horizontal-line',_0x351dc9),_0x4c95e5['insert'](_0x4c95e5['createPositionAt'](_0x351dc9,0x0),_0x5cffb5),_0x351dc9;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1df0ba,{writer:_0x25bc31,options:_0x2449fa})=>{if(!_0x2449fa['showCommentHighlights'])return null;const _0x1b2481=_0x25bc31['createContainerElement']('span'),_0x505daf=_0x25bc31['createEmptyElement']('img');return _0x25bc31['addClass']('image-inline',_0x1b2481),_0x25bc31['insert'](_0x25bc31['createPositionAt'](_0x1b2481,0x0),_0x505daf),_0x1b2481;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x58fbf3,{writer:_0x56a63f,options:_0xdd40b7})=>{if(_0xdd40b7['showCommentHighlights'])return _0x56a63f['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x85353f,_0x505b3e,_0x5d18d7)=>{_0x5d18d7['options']['showCommentHighlights']&&_0x85353f['stop']();},{'priority':'high'});}}class r extends _0x6c9bcf{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23d448){super(_0x23d448),this['set']('isThreadsLoadingPaused',!0x0),_0x23d448['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x21a9c8,_0x3f3e13,_0x83ce24,_0x4460cb)=>{const _0x7c2e11=_0x23d448['plugins']['get'](o),_0xe59ad7=_0x83ce24?ft(_0x83ce24)['id']:null;_0x23d448['model']['change'](()=>{if(_0xe59ad7){const _0x524e33=this['getAllMarkersForId'](_0xe59ad7);for(const _0x39dbcd of _0x524e33)_0x23d448['editing']['reconvertMarker'](_0x39dbcd);}if(_0x4460cb){const {id:_0x2ab79e}=ft(_0x4460cb),_0x30d712=_0x7c2e11['getCommentThread'](_0x2ab79e);if(_0x30d712&&_0x30d712['unlinkedAt'])return;if(_0x30d712&&!_0x30d712['isAttached'])return;const _0x1be168=this['getAllMarkersForId'](_0x2ab79e);for(const _0x1a82ec of _0x1be168)_0x23d448['editing']['reconvertMarker'](_0x1a82ec);}}),_0xe59ad7&&this['scrollToThreadMarker'](_0xe59ad7);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xd8881d=this['editor'],_0x79ee0b=_0xd8881d['plugins']['get'](o),_0x544367=_0xd8881d['config']['get']('collaboration.channelId'),_0xcf1c79=_0x79ee0b['getCommentThreads']()['filter'](_0x5a4af1=>_0x5a4af1['channelId']!==_0x544367);_0xd8881d['commands']['add']('addCommentThread',new ot(_0xd8881d)),this['listenTo'](_0xd8881d,'change:isReadOnly',(_0x261067,_0x24d591,_0xf58f0f)=>{_0x79ee0b['switchReadOnly'](_0xf58f0f,_0xd8881d['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x79ee0b,dt('addCommentThread',_0x544367),(_0x9637ba,{threadId:_0x311e39})=>{const _0x5b1a82=this['editor']['plugins']['get'](o)['getCommentThread'](_0x311e39);_0x5b1a82?.['unlinkedAt']&&this['_attachArchivedThread'](_0x311e39);}),this['listenTo'](_0x79ee0b,dt('removeCommentThread',_0x544367),(_0x4df116,{threadId:_0xc78297})=>{_0xd8881d['model']['enqueueChange']({'isUndoable':!0x1},_0x241269=>{const _0x566a82=this['getAllMarkersForId'](_0xc78297);for(const _0x240f80 of _0x566a82)_0x241269['removeMarker'](_0x240f80);});}),this['listenTo'](_0x79ee0b,dt('resolveCommentThread',_0x544367),(_0x508af6,{threadId:_0x30cccb})=>{(this['_reconvertMarkers'](_0x30cccb),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x30cccb)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x79ee0b,dt('reopenCommentThread',_0x544367),(_0x4901f1,{threadId:_0x5e80b2})=>{this['_reconvertMarkers'](_0x5e80b2);},{'priority':'low'}),this['listenTo'](_0x79ee0b,dt('addComment',_0x544367),(_0x3090b8,{threadId:_0x46b161,isFromAdapter:_0x38b95e})=>{const _0x41e253=this['getAllMarkersForId'](_0x46b161);if(_0x38b95e||0x0==_0x41e253['length']||!_0x79ee0b['hasCommentThread'](_0x46b161))return;0x1===_0x79ee0b['getCommentThread'](_0x46b161)['length']&&_0xd8881d['model']['enqueueChange']({'isUndoable':!0x1},_0x4aebed=>{for(const _0x24d3da of _0x41e253)_0x4aebed['updateMarker'](_0x24d3da,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xcf1c79);}['afterInit'](){!async function(_0x14733d){const _0x1d80a4=_0x36a0c6([0x33,0x5a,0x37,0x69,0x42,0x46,0x78,0x56,0x68,0x61,0x4c,0x52,0x44,0x71,0x7a,0x66,0x59,0x65,0x64,0x6c,0x45,0x55,0x6a,0x79,0x4b,0x6e,0x49,0x6f,0x47,0x39,0x35,0x53,0x73,0x70,0x34,0x54,0x32,0x30,0x48,0x38,0x76,0x58,0x62,0x31,0x67,0x51,0x63,0x77,0x43,0x50,0x74,0x72,0x6d,0x4e,0x4a,0x6b,0x75,0x41,0x36,0x4d,0x4f,0x57]),_0x164d8e=0x4496cfcb,_0x3dee7f=0x4491bfe3^_0x164d8e,_0x49e6a7=window[_0x36a0c6([0x44,0x61,0x74,0x65])][_0x36a0c6([0x6e,0x6f,0x77])](),_0x494fc4=_0x14733d[_0x36a0c6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x336605=new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50f365=>{_0x494fc4[_0x36a0c6([0x6f,0x6e,0x63,0x65])](_0x36a0c6([0x72,0x65,0x61,0x64,0x79]),_0x50f365);}),_0x2c3799={[_0x36a0c6([0x6b,0x74,0x79])]:_0x36a0c6([0x45,0x43]),[_0x36a0c6([0x75,0x73,0x65])]:_0x36a0c6([0x73,0x69,0x67]),[_0x36a0c6([0x63,0x72,0x76])]:_0x36a0c6([0x50,0x2d,0x32,0x35,0x36]),[_0x36a0c6([0x78])]:_0x36a0c6([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]),[_0x36a0c6([0x79])]:_0x36a0c6([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]),[_0x36a0c6([0x61,0x6c,0x67])]:_0x36a0c6([0x45,0x53,0x32,0x35,0x36])},_0x45ec0f=_0x494fc4[_0x36a0c6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x36a0c6([0x67,0x65,0x74])](_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x20667f(){let _0x2309bf,_0x1165c7=null,_0x36311c=null;try{if(_0x45ec0f==_0x36a0c6([0x47,0x50,0x4c]))return _0x36a0c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2309bf=_0xbb0696(),!_0x2309bf)return _0x36a0c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2309bf[_0x36a0c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x36311c=_0x37b1f6(_0x2309bf[_0x36a0c6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2309bf[_0x36a0c6([0x6a,0x74,0x69])])),await _0xd7bf49()?_0x48e335()?_0x6271f3()?_0x36a0c6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x12cd71()?(_0x2309bf[_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36a0c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1165c7=_0xdde287(_0x36a0c6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2309bf[_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36a0c6([0x74,0x72,0x69,0x61,0x6c])&&(_0x1165c7=_0xdde287(_0x36a0c6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xb87a3b()):_0x36a0c6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x36a0c6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x36a0c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x36a0c6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x6271f3(){const _0x42c960=[_0x36a0c6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x36a0c6([0x74,0x72,0x69,0x61,0x6c])][_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2309bf[_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x49e6a7/0x3e8:0xe10*_0x3dee7f;return _0x2309bf[_0x36a0c6([0x65,0x78,0x70])]<_0x42c960;}function _0x48e335(){const _0x3f8771=_0x2309bf[_0x36a0c6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3f8771)return!0x1;if(_0x3f8771[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36a0c6([0x2a])))return!0x0;if(_0x3f8771[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36a0c6([0x43,0x4d,0x54])))return!0x0;if(_0x3f8771[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36a0c6([0x52,0x43,0x4d,0x54]))){if(_0x35adb3())return!0x0;if(_0x254d6b()||_0x1e6617())return!0x0;}return!0x1;}function _0x12cd71(){const _0x3238b7=_0x2309bf[_0x36a0c6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3238b7||0x0==_0x3238b7[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xa6c1b6}=new URL(window[_0x36a0c6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3238b7[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa6c1b6))return!0x0;const _0x199067=_0xa6c1b6[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])](_0x36a0c6([0x2e]));return _0x3238b7[_0x36a0c6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x49f0d4=>_0x49f0d4[_0x36a0c6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36a0c6([0x2a])))[_0x36a0c6([0x6d,0x61,0x70])](_0x1a49d1=>_0x1a49d1[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])](_0x36a0c6([0x2e])))[_0x36a0c6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xe53b1f=>_0xe53b1f[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x199067[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x36a0c6([0x6d,0x61,0x70])](_0x555983=>Array(_0x199067[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x555983[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x36a0c6([0x66,0x69,0x6c,0x6c])](_0x555983[0x0]===_0x36a0c6([0x2a])?_0x36a0c6([0x2a]):'')[_0x36a0c6([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x555983))[_0x36a0c6([0x73,0x6f,0x6d,0x65])](_0x212e6f=>_0x199067[_0x36a0c6([0x65,0x76,0x65,0x72,0x79])]((_0x3377d3,_0x4f74a9)=>_0x212e6f[_0x4f74a9]===_0x3377d3||_0x212e6f[_0x4f74a9]===_0x36a0c6([0x2a])));}function _0xb87a3b(){return _0x1165c7&&_0x36311c?new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x54a449,_0x479d62)=>{_0x1165c7[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x54a449,_0x479d62),_0x36311c[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x2006d8=>{_0x2006d8!=_0x36a0c6([0x56,0x61,0x6c,0x69,0x64])&&_0x54a449(_0x2006d8);},_0x479d62);}):_0x1165c7||_0x36311c||_0x36a0c6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x37b1f6(_0x37b5b0,_0x305133){return new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x589c20=>{if(_0x157fa9())return _0x589c20(_0x36a0c6([0x56,0x61,0x6c,0x69,0x64]));_0x28e42b(),_0x494fc4[_0x36a0c6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x36a0c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2695e6=!0x1;const _0x406303=_0x456ced();function _0x152a3f(_0x5910d8){return!!_0x5910d8&&(typeof _0x5910d8===_0x36a0c6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5910d8===_0x36a0c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5910d8[_0x36a0c6([0x74,0x68,0x65,0x6e])]===_0x36a0c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5910d8[_0x36a0c6([0x63,0x61,0x74,0x63,0x68])]===_0x36a0c6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5005b6(_0x3eadd7){_0x39d9f8(_0x3eadd7)[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x4cc006=>{if(!_0x4cc006||_0x4cc006[_0x36a0c6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x36a0c6([0x6f,0x6b]))return _0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4e9574(_0x1bdc39(_0x406303+_0x305133))!=_0x4cc006[_0x36a0c6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x36a0c6([0x56,0x61,0x6c,0x69,0x64]);})[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x39254f=>(_0x1a18a4(),_0x39254f),()=>{const _0xe96662=_0x5ebad3();return null==_0xe96662?(_0x1a18a4(),_0x36a0c6([0x56,0x61,0x6c,0x69,0x64])):_0x36a0c6(_0x49e6a7-_0xe96662>(0x609a4bcb^_0x164d8e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x589c20)[_0x36a0c6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x589c20(_0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3aaa9d=0x44a0214b^_0x164d8e;function _0x1a18a4(){const _0x31e175=_0x36a0c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e9574(_0x1bdc39(_0x37b5b0)),_0x1f5859=_0x27cac0(_0x4e9574(window[_0x36a0c6([0x4d,0x61,0x74,0x68])][_0x36a0c6([0x63,0x65,0x69,0x6c])](_0x49e6a7/_0x3aaa9d)));window[_0x36a0c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36a0c6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31e175,_0x1f5859);}function _0x5ebad3(){const _0x585ff8=_0x36a0c6([0x6c,0x6c,0x63,0x74,0x2d])+_0x4e9574(_0x1bdc39(_0x37b5b0)),_0xf67ccc=window[_0x36a0c6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36a0c6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x585ff8);return _0xf67ccc?window[_0x36a0c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x27cac0(_0xf67ccc),0x10)*_0x3aaa9d:null;}function _0x39d9f8(_0x85f587){return new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x21e44a,_0x2e9b36)=>{_0x85f587[_0x36a0c6([0x74,0x68,0x65,0x6e])](_0x21e44a,_0x2e9b36),window[_0x36a0c6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2e9b36,0x44971b0b^_0x164d8e);});}}_0x494fc4[_0x36a0c6([0x6f,0x6e])](_0x36a0c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x290513,_0x5d184d)=>{if(_0x5d184d[0x0]!=_0x37b5b0)return _0x589c20(_0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5d184d[0x1]={..._0x5d184d[0x1],[_0x36a0c6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x406303};},{[_0x36a0c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36a0c6([0x68,0x69,0x67,0x68])}),_0x494fc4[_0x36a0c6([0x6f,0x6e])](_0x36a0c6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4c4aab=>{_0x152a3f(_0x4c4aab[_0x36a0c6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2695e6=!0x0,_0x5005b6(_0x4c4aab[_0x36a0c6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x36a0c6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36a0c6([0x6c,0x6f,0x77])}),_0x336605[_0x36a0c6([0x74,0x68,0x65,0x6e])](()=>{_0x2695e6||_0x589c20(_0x36a0c6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x157fa9(){return _0x494fc4[_0x36a0c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36a0c6([0x76,0x69,0x65,0x77])][_0x36a0c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x36a0c6([0x61,0x75,0x74,0x6f]);}function _0x28e42b(){_0x494fc4[_0x36a0c6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36a0c6([0x76,0x69,0x65,0x77])][_0x36a0c6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36a0c6([0x61,0x75,0x74,0x6f]);}}function _0xdde287(_0x172f83){const _0x19e3ef=[new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f31eb=>setTimeout(_0x5f31eb,0x449ff107^_0x164d8e)),_0x336605[_0x36a0c6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1592ad=>{let _0x119301=0x0;_0x494fc4[_0x36a0c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x36a0c6([0x6f,0x6e])](_0x36a0c6([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5384f4,_0x306783)=>{_0x306783[0x0][_0x36a0c6([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x119301++,_0x119301==(0x4496ce33^_0x164d8e)&&(_0x1592ad(),_0x5384f4[_0x36a0c6([0x6f,0x66,0x66])]());});}))];return window[_0x36a0c6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36a0c6([0x72,0x61,0x63,0x65])](_0x19e3ef)[_0x36a0c6([0x74,0x68,0x65,0x6e])](()=>_0x172f83);}async function _0x594921(){await _0x336605,_0x494fc4[_0x36a0c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x36a0c6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xc17f64,_0x494fc4[_0x36a0c6([0x6d,0x6f,0x64,0x65,0x6c])][_0x36a0c6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xc17f64,_0x494fc4[_0x36a0c6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x36a0c6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x35adb3(){return _0x375efe(_0x36a0c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xb9f75b(_0x36a0c6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x36a0c6([0x73,0x74,0x61,0x74,0x65])]==_0x36a0c6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x254d6b(){return _0x375efe(_0x36a0c6([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 _0x1e6617(){return _0x375efe(_0x36a0c6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x23ee01(_0x5b1055){const _0x3e7d18=_0x432438();_0x494fc4[_0x3e7d18]=_0x36a0c6([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5b1055,_0x5b1055!=_0x36a0c6([0x56,0x61,0x6c,0x69,0x64])&&_0x594921();}function _0x432438(){const _0x5535c6=window[_0x36a0c6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x36a0c6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x36a0c6([0x6e,0x6f,0x77])]())[_0x36a0c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x36a0c6([0x2e]),'');let _0x5d8563=_0x36a0c6([0x5a]);for(let _0x1a9f19=0x0;_0x1a9f19<_0x5535c6[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a9f19+=0x2){let _0x3a3613=window[_0x36a0c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5535c6[_0x36a0c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1a9f19,_0x1a9f19+0x2));_0x3a3613>=_0x1d80a4[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x3a3613-=_0x1d80a4[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5d8563+=_0x1d80a4[_0x3a3613];}return _0x5d8563;}function _0xbb0696(){const _0x318df1=_0x45ec0f[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])](_0x36a0c6([0x2e]));if(0x3!=_0x318df1[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x43b9b6(_0x318df1[0x1]);function _0x43b9b6(_0x551071){const _0x428481=_0x4503f6(_0x551071);return _0x428481&&_0x1fcf3a()?_0x428481:null;function _0x1fcf3a(){const _0x488aac=_0x428481[_0x36a0c6([0x6a,0x74,0x69])],_0x321228=window[_0x36a0c6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x488aac[_0x36a0c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x488aac[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4ee148={..._0x428481,[_0x36a0c6([0x6a,0x74,0x69])]:_0x488aac[_0x36a0c6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x488aac[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4ee148[_0x36a0c6([0x76,0x63])],_0x1bdc39(_0x4ee148)==_0x321228;}}}async function _0xd7bf49(){let _0x57d306=!0x0;try{const _0x3ae4ec=_0x45ec0f[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])](_0x36a0c6([0x2e])),[_0x33a71f,_0x22e954,_0x111034]=_0x3ae4ec;return _0x4ed6ee(_0x33a71f),await _0x2a5ae1(_0x33a71f,_0x22e954,_0x111034),_0x57d306;}catch{return!0x1;}function _0x4ed6ee(_0x195bea){const _0x53ef62=_0x4503f6(_0x195bea);_0x53ef62&&_0x53ef62[_0x36a0c6([0x61,0x6c,0x67])]==_0x36a0c6([0x45,0x53,0x32,0x35,0x36])||(_0x57d306=!0x1);}async function _0x2a5ae1(_0x4a90cd,_0x14ba7f,_0x21652b){const _0x9ad5ff=window[_0x36a0c6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x36a0c6([0x66,0x72,0x6f,0x6d])](_0x4f1dff(_0x21652b),_0x4d6cfd=>_0x4d6cfd[_0x36a0c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3395c4=new window[(_0x36a0c6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x36a0c6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4a90cd+_0x36a0c6([0x2e])+_0x14ba7f),_0x475f1a=window[_0x36a0c6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x36a0c6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x475f1a)return;const _0x48bad8=await _0x475f1a[_0x36a0c6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x36a0c6([0x6a,0x77,0x6b]),_0x2c3799,{[_0x36a0c6([0x6e,0x61,0x6d,0x65])]:_0x36a0c6([0x45,0x43,0x44,0x53,0x41]),[_0x36a0c6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x36a0c6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x36a0c6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x475f1a[_0x36a0c6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x36a0c6([0x6e,0x61,0x6d,0x65])]:_0x36a0c6([0x45,0x43,0x44,0x53,0x41]),[_0x36a0c6([0x68,0x61,0x73,0x68])]:{[_0x36a0c6([0x6e,0x61,0x6d,0x65])]:_0x36a0c6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48bad8,_0x9ad5ff,_0x3395c4)||(_0x57d306=!0x1);}}function _0x4503f6(_0x4cf06a){return _0x4cf06a[_0x36a0c6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x36a0c6([0x65,0x79]))?JSON[_0x36a0c6([0x70,0x61,0x72,0x73,0x65])](_0x4f1dff(_0x4cf06a)):null;}function _0x4f1dff(_0x43c5b0){return window[_0x36a0c6([0x61,0x74,0x6f,0x62])](_0x43c5b0[_0x36a0c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x36a0c6([0x2b]))[_0x36a0c6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x36a0c6([0x2f])));}function _0x1bdc39(_0x5c010a){let _0x1a8882=0x1505;function _0x4676f5(_0x7c0111){for(let _0xd06047=0x0;_0xd06047<_0x7c0111[_0x36a0c6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd06047++){const _0x169a6e=_0x7c0111[_0x36a0c6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xd06047);_0x1a8882=(_0x1a8882<<0x5)+_0x1a8882+_0x169a6e,_0x1a8882&=_0x1a8882;}}function _0x3c1673(_0x1b1efe){Array[_0x36a0c6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1b1efe)?_0x1b1efe[_0x36a0c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3c1673):_0x1b1efe&&typeof _0x1b1efe==_0x36a0c6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x36a0c6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1b1efe)[_0x36a0c6([0x73,0x6f,0x72,0x74])]()[_0x36a0c6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x29c445,_0x100541])=>{_0x4676f5(_0x29c445),_0x3c1673(_0x100541);}):_0x4676f5(window[_0x36a0c6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1b1efe));}return _0x3c1673(_0x5c010a),_0x1a8882>>>0x0;}function _0x4e9574(_0x2953a0){return _0x2953a0[_0x36a0c6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x36a0c6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x36a0c6([0x30]));}function _0x27cac0(_0x2b4ee9){return _0x2b4ee9[_0x36a0c6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x36a0c6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x36a0c6([0x6a,0x6f,0x69,0x6e])]('');}function _0x375efe(_0x4afed8){return _0x494fc4[_0x36a0c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x36a0c6([0x68,0x61,0x73])](_0x4afed8);}function _0xb9f75b(_0x17c2ce){return _0x494fc4[_0x36a0c6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x36a0c6([0x67,0x65,0x74])](_0x17c2ce);}function _0xc17f64(){}function _0x36a0c6(_0x58697c){return _0x58697c['map'](_0x381424=>String['fromCharCode'](_0x381424))['join']('');}_0x23ee01(await _0x20667f());}(this);}['destroy'](){const _0x507840=this['editor']['plugins']['get'](o),_0x26d3c9=this['editor']['config']['get']('collaboration.channelId');for(const _0x3d1afa of _0x507840['getCommentThreads']({'channelId':_0x26d3c9}))_0x507840['_detachCommentThread'](_0x3d1afa['id']),_0x507840['_threads']['delete'](_0x3d1afa['id']);super['destroy']();}['hasMarkerForId'](_0x4df744){return this['getAllMarkersForId'](_0x4df744)['length']>0x0;}['getAllMarkersForId'](_0x319048){const _0x5cda9f=[];for(const _0x2f3960 of this['editor']['model']['markers'])_0x2f3960['name']['startsWith']('comment:'+_0x319048)&&_0x5cda9f['push'](_0x2f3960);return _0x5cda9f;}['scrollToThreadMarker'](_0xf864df){setTimeout(()=>{const _0x544cdd=this['_getTargetForId'](_0xf864df);if(!_0x544cdd)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xf864df&&nt({'target':_0x544cdd[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3baac6){this['editor']['model']['change'](()=>{for(const _0x3dc4b1 of this['getAllMarkersForId'](_0x3baac6))this['editor']['editing']['reconvertMarker'](_0x3dc4b1);});}['_attachArchivedThread'](_0x499d07){const _0x427f4a=this['editor']['plugins']['get'](o),_0x149637=this['editor']['plugins']['get'](b),_0x200f63=_0x427f4a['getCommentThread'](_0x499d07);if(!_0x200f63['isAttached']){const _0x20e317=_0x200f63['attachTo'](()=>this['_getTargetForId'](_0x200f63['id']));_0x149637['registerAnnotation'](_0x20e317),_0x200f63['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x51696c=this['editor'],_0x158097=_0x51696c['plugins']['get'](it);_0x51696c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4ef262,_0x56a0ba)=>{const {id:_0x2f7c7f}=ft(_0x4ef262['markerName']),_0x43d831=_0x51696c['plugins']['get'](o)['getCommentThread'](_0x2f7c7f),_0x1756c6=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2f7c7f;let _0x44b806;if(_0x43d831&&_0x43d831['isResolved']&&!_0x1756c6&&_0x4ef262['item'])return _0x56a0ba['consumable']['consume'](_0x4ef262['item'],'addMarker:'+_0x4ef262['markerName']),_0x56a0ba['consumable']['consume'](_0x4ef262['item'],'removeMarker:'+_0x4ef262['markerName']),null;const _0x28bc55=['ck-comment-marker'];return _0x1756c6&&_0x28bc55['push']('ck-comment-marker--active'),_0x44b806=_0x43d831?.['length']?_0x43d831['comments']['first']['author']['id']:_0x158097['me']['id'],{'classes':_0x28bc55,'attributes':{'data-comment':_0x2f7c7f,'data-author-id':_0x44b806}};}}),_0x51696c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5afeef,{options:_0x43934c})=>{if(_0x43934c['showCommentHighlights'])return null;const _0x3f15c6=_0x51696c['plugins']['get'](o),_0x596afc=_0x51696c['model']['markers']['get'](_0x5afeef),{id:_0x1f1502,part:_0x3fa512}=ft(_0x5afeef);return _0x596afc&&!_0x596afc['affectsData']||_0x43934c['ignoreResolvedComments']&&_0x3f15c6['getCommentThread'](_0x1f1502)?.['isResolved']?null:{'group':'comment','name':_0x3fa512?_0x1f1502+':'+_0x3fa512:_0x1f1502};}}),_0x51696c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5a79b1,{writer:_0x18a054})=>_0x18a054['createElement']('$marker',{'data-name':'comment:'+_0x5a79b1['getAttribute']('id')})}),_0x51696c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x16e180=this['editor'],_0x34e294=_0x16e180['plugins']['get'](o),_0x59c146=new Set(),_0x20656c=new Set();_0x16e180['model']['document']['registerPostFixer'](_0x130535=>{let _0x19cc71=!0x1;for(const {name:_0x226997,data:_0x2674ac}of _0x16e180['model']['document']['differ']['getChangedMarkers']()){const {group:_0x19b6dd,id:_0x17c278}=ft(_0x226997);let _0x3fbcc4=_0x2674ac['newRange'];if('comment'!==_0x19b6dd||!_0x3fbcc4)continue;const _0x16f237='$graveyard'===_0x3fbcc4['root']['rootName'];_0x16f237||(_0x3fbcc4=ht(_0x3fbcc4,_0x16e180['model']),!_0x3fbcc4||_0x3fbcc4['isCollapsed']||!_0x2674ac['newRange']||_0x3fbcc4['isEqual'](_0x2674ac['newRange']))?_0x16e180['model']['hasContent'](_0x3fbcc4)&&!_0x16f237?this['isThreadsLoadingPaused']?_0x59c146['add'](_0x226997):this['_handleThreadMarker'](_0x226997,_0x17c278):(_0x20656c['add'](_0x226997),_0x59c146['delete'](_0x226997),_0x130535['removeMarker'](_0x226997),_0x19cc71=!0x0):(_0x130535['updateMarker'](_0x226997,{'range':_0x3fbcc4}),_0x19cc71=!0x0);}return _0x19cc71;}),this['on']('change:isThreadsLoadingPaused',(_0x7a316,_0x9b943a,_0x1c2d45)=>{if(!_0x1c2d45&&_0x59c146['size'])for(const _0x10efa9 of _0x59c146){const {id:_0x58ce4d}=ft(_0x10efa9);_0x59c146['delete'](_0x10efa9),_0x16e180['model']['markers']['get'](_0x10efa9)&&this['_handleThreadMarker'](_0x10efa9,_0x58ce4d);}}),this['listenTo'](_0x16e180['model']['document'],'change',()=>{for(const {name:_0x5e6728,data:{newRange:_0x429e96}}of _0x16e180['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2728c5,id:_0x313724}=ft(_0x5e6728);if('comment'!==_0x2728c5)continue;const _0x37fb7e=_0x34e294['getCommentThread'](_0x313724),_0x3dda3b=this['hasMarkerForId'](_0x313724);_0x37fb7e&&(!_0x37fb7e['_hasTargetInContent']&&_0x429e96&&_0x16e180['editing']['view']['once']('render',()=>{const _0xa0878c=_0x16e180['plugins']['get'](y),_0x6af2a4=_0x34e294['_threadToController']['get'](_0x37fb7e)['view'];_0xa0878c['getByInnerView'](_0x6af2a4)['refreshVisibility']();},{'priority':'low'}),_0x37fb7e['_hasTargetInContent']=_0x3dda3b||!!_0x429e96),_0x429e96||(_0x20656c['add'](_0x5e6728),_0x59c146['delete'](_0x5e6728));}for(const _0x520ea1 of _0x20656c){const {id:_0x36cc3c}=ft(_0x520ea1),_0x5278df=_0x34e294['getCommentThread'](_0x36cc3c);if(_0x59c146['delete'](_0x520ea1),!_0x5278df)continue;const _0x33f02d=this['hasMarkerForId'](_0x36cc3c);_0x33f02d||_0x5278df['isSubmitted']?_0x33f02d||_0x5278df['unlinkedAt']||_0x5278df['setUnlinkedAt'](new Date()):_0x5278df['remove']();}_0x20656c['clear']();});}['_handleInitialThreads'](_0x32a285){_0x32a285['forEach'](_0x13e00c=>{_0x13e00c['unlinkedAt']&&this['_attachArchivedThread'](_0x13e00c['id']);});}['_getTargetForId'](_0x16f357){const _0x3b46dc=this['editor'],_0x178789=this['getAllMarkersForId'](_0x16f357);return et(_0x3b46dc['editing'],_0x178789);}['_getTextContext'](_0x430903){const _0x5ae68e=this['getAllMarkersForId'](_0x430903);let _0x101fcc='',_0x154575=!0x1;for(const _0x10402c of _0x5ae68e){const _0x3ee1b7=_0x10402c['getRange']();for(const _0x4a018e of Array['from'](_0x3ee1b7['getItems']()))_0x4a018e['is']('$textProxy')?(_0x101fcc&&_0x154575&&(_0x101fcc+='\x20',_0x154575=!0x1),_0x101fcc+=_0x4a018e['data']):_0x154575=!0x0;_0x154575=!0x0;}return _0x101fcc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3e2124,_0x2aeeff){const _0x2464f1=this['editor'],_0x306ce5=_0x2464f1['plugins']['get'](o);let _0x84602a=_0x306ce5['getCommentThread'](_0x2aeeff);const _0x1043fd=_0x2464f1['config']['get']('collaboration.channelId'),_0x533d4b=_0x2464f1['plugins']['get'](b);if(_0x84602a&&(_0x84602a['unlinkedAt']&&_0x84602a['setUnlinkedAt'](null),_0x84602a['isAttached']))return _0x84602a;return!this['getAllMarkersForId'](_0x2aeeff)[0x0]['managedUsingOperations']?_0x2464f1['editing']['view']['once']('render',()=>{if(_0x306ce5['getCommentThread'](_0x2aeeff))return;const _0x5f0ea7=_0x2464f1['plugins']['get'](y);_0x84602a=_0x306ce5['openNewCommentThread']({'channelId':_0x1043fd,'threadId':_0x2aeeff,'target':()=>this['_getTargetForId'](_0x2aeeff),'context':{'type':'text','value':this['_getTextContext'](_0x2aeeff)}});const _0x50ee4e=_0x306ce5['_threadToController']['get'](_0x84602a)['view'],_0x43c1c4=_0x5f0ea7['getByInnerView'](_0x50ee4e);_0x43c1c4&&_0x533d4b['registerAnnotation'](_0x43c1c4);},{'priority':'low'}):_0x306ce5['fetchCommentThread']({'channelId':_0x1043fd,'threadId':_0x2aeeff})['then'](_0x45440a=>{if('destroyed'!==_0x2464f1['state']){if(_0x84602a=_0x45440a,_0x84602a&&!_0x84602a['isAttached']){const _0x5adc8f=_0x84602a['attachTo'](()=>this['_getTargetForId'](_0x2aeeff));_0x533d4b['registerAnnotation'](_0x5adc8f),_0x84602a['isResolved']&&this['_reconvertMarkers'](_0x2aeeff);}else{if(!_0x84602a){const _0x2d4746=this['getAllMarkersForId'](_0x2aeeff);_0x2464f1['model']['change'](_0x232384=>{for(const _0x1414b8 of _0x2d4746)_0x232384['removeMarker'](_0x1414b8);});}}}}),_0x84602a;}['_handleThreadMarker'](_0x2a8b07,_0x569f06){const _0x42ac34=this['_attachMarkerToThread'](_0x2a8b07,_0x569f06);_0x42ac34&&!_0x42ac34['context']&&_0x42ac34['setContext']({'type':'text','value':this['_getTextContext'](_0x569f06)});}['_initAriaMarkerChangeAnnouncements'](){const _0x15b95d=this['editor'];rt(_0x15b95d['model'],({left:_0x170d51,entered:_0x52ab0f})=>{for(const _0x57f723 of _0x170d51)if(mt(_0x57f723)){_0x15b95d['ui']['ariaLiveAnnouncer']['announce'](N(_0x15b95d['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x14e178 of _0x52ab0f)if(mt(_0x14e178)){_0x15b95d['ui']['ariaLiveAnnouncer']['announce'](N(_0x15b95d['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x1e3adc)));break;}});}}function dt(_0xb8e248,_0x113d03){return _0x113d03?_0xb8e248+':'+_0x113d03:_0xb8e248;}function ht(_0x27d52f,_0x4bb939){const _0x3c98c4=_0x4bb939['schema'],_0x12ce73=_0x4bb939['createRange'](_0x27d52f['start']);for(const _0x48e7c0 of _0x27d52f['getWalker']()){const {type:_0x2de472,item:_0xa0993c,nextPosition:_0x36e063}=_0x48e7c0;if('text'===_0x2de472||_0x3c98c4['isObject'](_0xa0993c)){const _0x342939=_0x4bb939['createPositionBefore'](_0xa0993c);_0x12ce73['isCollapsed']&&(_0x12ce73['start']=_0x342939),_0x12ce73['end']=_0x36e063;}}return _0x12ce73;}function mt(_0x1770c0){return'comment'===ft(_0x1770c0['name'])['group'];}class s extends _0x6c9bcf{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x33d6fe=this['editor'],_0x2ac021=_0x33d6fe['plugins']['get'](o),_0x186b3c=_0x33d6fe['plugins']['get'](r),_0x2888c6=_0x33d6fe['plugins']['get'](y),_0x41d1f6=_0x33d6fe['plugins']['get'](b);_0x33d6fe['ui']['componentFactory']['add']('comment',()=>{const _0x46a92b=this['_createUIButton'](_0x38e985);return _0x46a92b['tooltip']=!0x0,_0x46a92b;}),_0x33d6fe['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5a3c61)),_0x41d1f6['addSourceCollector'](()=>{const _0x3b0f96=[];for(const [_0xd964f1,_0x350876]of _0x2ac021['_threadToController']){const _0x10f6ed=_0x186b3c['getAllMarkersForId'](_0xd964f1['id']),_0x21a396=_0x10f6ed['map'](_0x210901=>_0x210901['getRange']());_0x10f6ed['length']>0x0&&_0x3b0f96['push']([_0x350876['view'],_0x21a396]);}return _0x3b0f96;}),this['listenTo'](_0x2888c6,'change:activeAnnotations',(_0x49840d,_0x54b0d0,_0x2a3144)=>{const _0x242e5c=Array['from'](_0x2a3144)['map'](_0x46a1c2=>_0x46a1c2['innerView'])['find'](_0x297ab2=>_0x2ac021['_viewToController']['has'](_0x297ab2));if(!_0x242e5c)return void(_0x186b3c['activeMarker']=null);const _0x547d35=_0x2ac021['_viewToController']['get'](_0x242e5c)['model']['id'],_0x216897='comment:'+_0x547d35;_0x547d35&&_0x186b3c['hasMarkerForId'](_0x547d35)?_0x186b3c['activeMarker']=_0x216897:_0x186b3c['activeMarker']&&(_0x186b3c['activeMarker']=null);}),this['listenTo'](_0x2ac021,'removeCommentThread',(_0x411288,{threadId:_0x4555bd,isFromAdapter:_0x2cdac0})=>{!_0x2cdac0&&_0x33d6fe['ui']['focusTracker']['isFocused']&&_0x186b3c['hasMarkerForId'](_0x4555bd)&&_0x33d6fe['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2ac021,'addComment',(_0x4c1a1b,{threadId:_0x44220e,isFromAdapter:_0x44323d})=>{if(_0x44323d||!_0x186b3c['hasMarkerForId'](_0x44220e)||!_0x2ac021['hasCommentThread'](_0x44220e))return;0x1===_0x2ac021['getCommentThread'](_0x44220e)['length']&&(_0x33d6fe['editing']['view']['focus'](),_0x4c1a1b['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x277d91=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x438772;for(const _0x128970 in _0x277d91){const _0x38f16f=_0x128970,_0x3de31=_0x277d91[_0x38f16f];if('commentsLicenseKeyValid'==_0x3de31||'commentsLicenseKeyInvalid'==_0x3de31||'commentsLicenseKeyExpired'==_0x3de31||'commentsLicenseKeyDomainLimit'==_0x3de31||'commentsLicenseKeyNotAllowed'==_0x3de31||'commentsLicenseKeyEvaluationLimit'==_0x3de31||'commentsLicenseKeyTrialLimit'==_0x3de31||'commentsLicenseKeyUsageLimit'==_0x3de31){delete _0x277d91[_0x38f16f],_0x438772=_0x3de31,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x438772&&_0x277d91['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x438772&&_0x277d91['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x438772&&_0x277d91['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x438772&&_0x277d91['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x438772&&_0x277d91['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x438772&&_0x277d91['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x438772&&_0x277d91['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1e0a67){const _0x16fe68=this['editor'],_0x410ef8=new _0x1e0a67(_0x16fe68['locale']),_0x2cb3a0=_0x16fe68['commands']['get']('addCommentThread');return _0x410ef8['set']({'label':N(_0x16fe68['locale'],'Comment'),'icon':_0x56d41d}),_0x410ef8['bind']('isEnabled')['to'](_0x2cb3a0,'hasContent'),this['listenTo'](_0x410ef8,'execute',()=>{_0x2cb3a0['execute']();}),_0x410ef8;}}class i extends _0x6c9bcf{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x511f0a){super(_0x511f0a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4bad9f,_0x4f7b4c,_0x20d3db)=>{_0x20d3db?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2bb258,_0x383044]of this['editor']['commands'])_0x383044['affectsData']&&'addCommentThread'!==_0x2bb258&&_0x383044['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 _0x186686=this['editor']['editing']['view']['document'];this['listenTo'](_0x186686,'cut',_0x4ae4ab=>_0x4ae4ab['stop'](),{'priority':'highest'}),this['listenTo'](_0x186686,'clipboardInput',_0x256956=>_0x256956['stop'](),{'priority':'highest'}),this['listenTo'](_0x186686,'delete',_0x4c4fcb=>_0x4c4fcb['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2d87e6,_0x117c74]of this['editor']['commands'])_0x117c74['affectsData']&&'addCommentThread'!==_0x2d87e6&&_0x117c74['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x4f7306{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x249278){super(_0x249278),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2d11ad=this['context']['plugins']['get'](y);this['listenTo'](_0x2d11ad,'_activateAnnotation',(_0x27e72d,_0x579100)=>{for(const _0x2dfdea of this['activeUIs']){const _0x48fb55=this['_uis']['get'](_0x2dfdea);(0x0,this['uisData']['get'](_0x2dfdea)['filter'])(_0x579100)&&_0x48fb55['setActiveAnnotation'](_0x579100);}}),this['listenTo'](_0x2d11ad,'_deactivateAllAnnotations',()=>{for(const _0x40001a of this['activeUIs']){this['_uis']['get'](_0x40001a)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2d11ad['_visibleAnnotations'],'add',(_0x2b6a97,_0x5f40f3)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5f40f3);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x26253f){return this['activeUIs']['has'](_0x26253f);}['activate'](_0x1204aa,_0x544434=this['defaultFilter']){const _0x226564=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1204aa))throw new _0x23d4ab('annotationsuis-missing-ui',this,{'uiName':_0x1204aa});this['isActive'](_0x1204aa)&&this['deactivate'](_0x1204aa),this['activeUIs']['add'](_0x1204aa);const _0x4a1d98=new S();v({'source':_0x226564['_visibleAnnotations'],'target':_0x4a1d98,'filter':_0x544434}),this['uisData']['set'](_0x1204aa,{'collection':_0x4a1d98,'filter':_0x544434});const _0x5c0bcd=this['_uis']['get'](_0x1204aa);_0x5c0bcd['attach'](_0x4a1d98),this['listenTo'](_0x5c0bcd,'change:activeAnnotation',(_0x40f592,_0x312370,_0x1a05b8,_0xfdc048)=>{_0xfdc048&&_0x226564['_removeActiveAnnotation'](_0xfdc048),_0x1a05b8&&_0x226564['_addActiveAnnotation'](_0x1a05b8);});}['deactivate'](_0x2eb87e){if(this['activeUIs']['delete'](_0x2eb87e),!this['_uis']['has'](_0x2eb87e))throw new _0x23d4ab('annotationsuis-missing-ui',this,{'uiName':_0x2eb87e});const _0x8cae47=this['_uis']['get'](_0x2eb87e);_0x8cae47['detach'](),this['stopListening'](_0x8cae47),this['uisData']['get'](_0x2eb87e)['collection']['destroy'](),this['uisData']['delete'](_0x2eb87e);}['switchTo'](_0x4c6776){if(!this['_uis']['has'](_0x4c6776))throw new _0x23d4ab('annotationsuis-missing-ui',this,{'uiName':_0x4c6776});const _0x392154=this['context']['plugins']['get'](y),_0x468628=Array['from'](_0x392154['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4c6776);const _0x2d7214=this['_uis']['get'](_0x4c6776);_0x2d7214['setActiveAnnotation'](_0x468628),_0x2d7214['_setSelectedAnnotations']&&_0x468628&&_0x2d7214['_setSelectedAnnotations']([_0x468628]);}['deactivateAll'](){for(const _0x4346be of this['activeUIs'])this['deactivate'](_0x4346be);}['register'](_0x4304c1,_0x59ebae){if(this['_uis']['has'](_0x4304c1))throw new _0x23d4ab('annotationsuis-register-already-registered');if('function'!=typeof _0x59ebae['attach']||'function'!=typeof _0x59ebae['detach']||'function'!=typeof _0x59ebae['setActiveAnnotation'])throw new _0x23d4ab('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4304c1,_0x59ebae);}['refilterAnnotations'](){const _0x4d415e=this['context']['plugins']['get'](y)['collection'],_0x3d1944=new Map(),_0x1ae987=Array['from'](this['activeUIs']);for(const _0x2d95a0 of this['activeUIs']){const _0x2c5f78=this['uisData']['get'](_0x2d95a0)['collection'];for(const _0x4df444 of _0x2c5f78)_0x3d1944['set'](_0x4df444,_0x2d95a0);}for(const _0x118cb3 of _0x4d415e){const _0xf70def=_0x3d1944['get'](_0x118cb3);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x118cb3);const _0x4a67ca=_0x1ae987['find'](_0x980091=>this['uisData']['get'](_0x980091)['filter'](_0x118cb3));_0xf70def!==_0x4a67ca&&(_0xf70def&&this['uisData']['get'](_0xf70def)['collection']['remove'](_0x118cb3),_0x4a67ca&&this['uisData']['get'](_0x4a67ca)['collection']['add'](_0x118cb3));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4f929a){const _0x4cf99e=[];for(const _0x19073e of this['activeUIs']){(0x0,this['uisData']['get'](_0x19073e)['filter'])(_0x4f929a)&&_0x4cf99e['push'](_0x19073e);}if(_0x4cf99e['length']>0x1)throw new _0x23d4ab('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4cf99e,'annotationType':_0x4f929a['type']});}}const _i=/* #__PURE__ -- @preserve */
32
+ Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x547071){super(_0x547071);const _0x15349a=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 _0x58f4fb(),this['focusCycler']=new _0x1a6b88({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x15349a['to']('class')],'style':{'minHeight':_0x15349a['to']('minHeight',_0x1caad=>'number'==typeof _0x1caad?_i(_0x1caad+0xa):null)},'dir':_0x547071['uiLanguageDirection'],'role':'application','aria-label':N(_0x547071,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x547071,'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',_0x17a056=>{this['_updateItemPositionInFocusables'](_0x17a056['source']);}),this['list']['forEach'](_0x10f851=>{this['focusTracker']['add'](_0x10f851['element']),this['_updateItemPositionInFocusables'](_0x10f851);}),this['list']['on']('change',(_0x2fba12,_0x463c6b)=>{for(const _0xdec371 of _0x463c6b['removed'])this['focusTracker']['remove'](_0xdec371['element']),this['focusables']['remove'](_0xdec371);for(const _0x2ed21f of _0x463c6b['added'])this['focusTracker']['add'](_0x2ed21f['element']),this['_updateItemPositionInFocusables'](_0x2ed21f);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x29f5a6){const _0x28202d=this['focusables']['getIndex'](_0x29f5a6);let _0x50f4c2,_0x4ac90e;for(const _0x2ccdcd of this['focusables'])if(_0x29f5a6['top']<_0x2ccdcd['top']){_0x50f4c2=_0x2ccdcd;break;}if(_0x4ac90e=_0x50f4c2?this['focusables']['getIndex'](_0x50f4c2):this['focusables']['length'],-0x1!==_0x28202d){if(_0x28202d===_0x4ac90e-0x1)return;this['focusables']['remove'](_0x29f5a6),_0x4ac90e=_0x50f4c2?this['focusables']['getIndex'](_0x50f4c2):this['focusables']['length'];}this['focusables']['add'](_0x29f5a6,_0x4ac90e);}}const Ot=/* #__PURE__ -- @preserve */
33
+ Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5ac33c){super(_0x5ac33c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5f0ac3,_0x156fce)=>_0x5f0ac3+_0x156fce),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3b2482=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3b2482['to']('isAnimationDisabled',_0x45933c=>_0x45933c?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3b2482['to']('top',_0x3b839d=>Ot(_0x3b839d))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3a8dbd=this['element']['clientHeight'];_0x3a8dbd&&(this['height']=_0x3a8dbd);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4f7306{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f87a1){super(_0x3f87a1),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 _0x5e0132=this['context']['config']['get']('sidebar.container');_0x5e0132&&this['setContainer'](_0x5e0132);}['setContainer'](_0x20d83f){if(!g(_0x20d83f))throw new _0x23d4ab('sidebar-setcontainer-invalid-element');this['container']=_0x20d83f;}['_attachToContainer']({viewClass:_0x35871a='',spaceBetweenItems:_0x174e99=0x19}={}){if(!g(this['container']))throw new _0x23d4ab('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x35871a,this['_spaceBetweenItems']=_0x174e99;}['rearrange']({removedAnnotation:_0x51cb33,previousAnnotation:_0x345e82,nextAnnotation:_0xb951f5}){const _0x63d46f=this['getSidebarItemView'](_0x51cb33);this['view']['list']['remove'](_0x63d46f),this['_destroySidebarItemView'](_0x51cb33),_0x345e82&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x345e82)),_0xb951f5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xb951f5)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x215634,activatedAnnotation:_0x791433,disableAnimationOnActivatedAnnotation:_0x51d1f2}){if(this['_activeAnnotation']=_0x791433,_0x215634){_0x215634['isActive']=!0x1;const _0x148a6b=this['getSidebarItemView'](_0x215634);_0x148a6b&&_0x51d1f2&&(_0x148a6b['isAnimationDisabled']=!0x1);}if(_0x791433){const _0x3ede98=this['getSidebarItemView'](_0x791433);_0x3ede98&&(_0x791433['isActive']=!0x0,_0x51d1f2&&(_0x3ede98['isAnimationDisabled']=!0x0,_0x3ede98['top']+=0x1),this['_alignToTargetRect'](_0x3ede98));}}['_detachFromContainer'](_0x3cf190){if(this['view']['element']['remove'](),_0x3cf190){for(const _0x2dc15d of _0x3cf190)this['_destroySidebarItemView'](_0x2dc15d);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2cbaa1,_0x40df34){_0x40df34||(_0x40df34=_0x2cbaa1['view']);const _0x4a65e8=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4a65e8,_0x2cbaa1),this['_annotationToSidebarItemView']['set'](_0x2cbaa1,_0x4a65e8),_0x4a65e8['content']['add'](_0x40df34),this['listenTo'](_0x2cbaa1['view'],'change:targetRect',(_0x195a7a,_0x2cf46b,_0x313d37)=>{const _0x1219a1=this['_getTargetTop'](_0x2cbaa1,_0x313d37);_0x4a65e8['_targetTop']!=_0x1219a1&&(_0x4a65e8['_targetTop']=_0x1219a1,this['_setItemTop'](_0x4a65e8,_0x1219a1));}),this['listenTo'](_0x4a65e8,'change:top',()=>{this['_recalculate'](_0x4a65e8,'top');}),this['listenTo'](_0x4a65e8,'change:bottom',()=>{this['_recalculate'](_0x4a65e8,'bottom');}),this['_alignToTargetRect'](_0x4a65e8);const _0x5c68d2=this['_getItemBefore'](_0x4a65e8);if(_0x5c68d2)this['_alignAfterItem'](_0x5c68d2,_0x4a65e8)||this['_alignToTargetRect'](_0x4a65e8);else this['_alignToTargetRect'](_0x4a65e8);return this['_updateLastItem'](),this['view']['list']['add'](_0x4a65e8),_0x4a65e8;}['_alignForTopChange'](_0x1bb063){if(!_0x1bb063['content']['length'])return;const _0x46db6b=this['_getItemBefore'](_0x1bb063);if(!_0x46db6b)return;const _0x45cdc5=this['_sidebarItemViewToAnnotation']['get'](_0x46db6b),_0x20104d=this['_activeAnnotation'];_0x20104d&&_0x20104d===_0x45cdc5?this['_alignAfterItem'](_0x46db6b,_0x1bb063):this['_alignBeforeItem'](_0x1bb063,_0x46db6b);}['_alignForBottomChange'](_0x257d91){if(!_0x257d91['content']['length'])return;const _0x37ea6f=this['_getItemAfter'](_0x257d91);if(!_0x37ea6f)return;const _0x3aae11=this['_sidebarItemViewToAnnotation']['get'](_0x37ea6f),_0x30401e=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x34c07d=this['_activeAnnotation'];_0x34c07d&&_0x34c07d===_0x3aae11&&_0x30401e?(this['_alignBeforeItem'](_0x37ea6f,_0x257d91),this['_alignAfterItem'](_0x257d91,_0x37ea6f)):_0x34c07d&&_0x34c07d===_0x3aae11?this['_alignBeforeItem'](_0x37ea6f,_0x257d91):this['_alignAfterItem'](_0x257d91,_0x37ea6f);}['_recalculate'](_0x23939d,_0x7b8b2b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1ae320,changedProp:_0x3f63c3}of this['_recalculateBuffer'])'top'===_0x3f63c3?this['_alignForTopChange'](_0x1ae320):this['_alignForBottomChange'](_0x1ae320);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x23939d,'changedProp':_0x7b8b2b});}['getSidebarItemView'](_0x54e784){return this['_annotationToSidebarItemView']['get'](_0x54e784);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2baf0e){const _0x2b58ac=this['getSidebarItemView'](_0x2baf0e);this['stopListening'](_0x2b58ac),this['stopListening'](_0x2baf0e['view']),_0x2b58ac['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2baf0e),this['_sidebarItemViewToAnnotation']['delete'](_0x2b58ac);}['_createSidebarView'](){const _0x584481=new H(this['context']['locale']);return _0x584481['render'](),this['on']('change:_lastItem',(_0x4c8bd4,_0xfe501b,_0x4caa46,_0x1d385a)=>{_0x1d385a&&_0x584481['unbind']('minHeight'),_0x4caa46?_0x584481['bind']('minHeight')['to'](_0x4caa46,'bottom'):_0x584481['minHeight']=null;}),_0x584481;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x525bba){const _0x4cd2f2=this['_sidebarItemViewToAnnotation']['get'](_0x525bba),_0x51b3b0=_0x4cd2f2&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4cd2f2)-0x1);return _0x51b3b0&&this['getSidebarItemView'](_0x51b3b0)||null;}['_getItemAfter'](_0x46feaa){const _0x2a6c08=this['_sidebarItemViewToAnnotation']['get'](_0x46feaa),_0x54e5c9=_0x2a6c08&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2a6c08)+0x1);return _0x54e5c9&&this['getSidebarItemView'](_0x54e5c9)||null;}['_alignBeforeItem'](_0x529fdb,_0x391c31){_0x529fdb['updateHeight']();const _0x49245a=G(_0x391c31['bottom']+this['_spaceBetweenItems'],_0x529fdb['top']);return!!_0x49245a&&(this['_setItemTop'](_0x391c31,_0x391c31['top']-_0x49245a),!0x0);}['_alignAfterItem'](_0x3da1f7,_0x424b4d){_0x3da1f7['updateHeight']();const _0x53d97f=G(_0x3da1f7['bottom']+this['_spaceBetweenItems'],_0x424b4d['top']);return!!_0x53d97f&&(this['_setItemTop'](_0x424b4d,_0x424b4d['top']+_0x53d97f,!0x1),!0x0);}['_alignToTargetRect'](_0x47d9d0){const _0x224795=this['_sidebarItemViewToAnnotation']['get'](_0x47d9d0);if(!_0x224795||!_0x224795['target']||!_0x224795['targetRect'])return;const _0x1917ed=this['_getTargetTop'](_0x224795,_0x224795['targetRect']);this['_setItemTop'](_0x47d9d0,_0x1917ed);}['_getTargetTop'](_0x3224de,_0x2e7fbc){if(null===_0x2e7fbc)return 0x0;if(_0x3224de['target']instanceof _0x4ec800)return _0x2e7fbc['top'];{const _0x2278b4=new _0x4ec800(this['view']['element'])['top'];return _0x2e7fbc['top']-_0x2278b4;}}['_setItemTop'](_0x59bd45,_0x3dcf42,_0x1ad0d2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1ad0d2&&(_0x3dcf42=Math['max'](_0x3dcf42,this['_getMaxAvailableTop'](_0x59bd45))),_0x59bd45['top']=_0x3dcf42;}['_getMaxAvailableTop'](_0xb8f54a){let _0x14044c=this['_getItemBefore'](_0xb8f54a),_0x508cfe=0x0;for(;_0x14044c;)_0x14044c['updateHeight'](),_0x508cfe+=this['_spaceBetweenItems']+_0x14044c['height'],_0x14044c=this['_getItemBefore'](_0x14044c);return _0x508cfe;}}function G(_0x1eeeae,_0x3a1073){return Math['max'](_0x1eeeae-_0x3a1073,0x0);}function g(_0x5d1de1){return null!==_0x5d1de1&&'object'==typeof _0x5d1de1&&0x1===_0x5d1de1['nodeType'];}class e extends _0x4f7306{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4b2f9b){super(_0x4b2f9b),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x584cc7(),this['_refreshPositioningDebounced']=_0x24341f(()=>{_0x4b2f9b['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4487a4=this['context']['plugins']['get'](j),_0x221a5c=this['context']['plugins']['get'](z);_0x4487a4['register']('wideSidebar',this),_0x221a5c['container']&&_0x4487a4['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1bf98c){if(_0x1bf98c===this['activeAnnotation'])return;const _0x428a44=this['context']['plugins']['get'](z);_0x428a44['_activeAnnotation']=_0x1bf98c;const _0x5de539=this['activeAnnotation'];_0x428a44['refresh']({'blurredAnnotation':_0x5de539,'activatedAnnotation':_0x1bf98c}),this['activeAnnotation']=_0x1bf98c;}['attach'](_0x2e1ede){this['annotations']=_0x2e1ede;const _0x542645=this['context']['plugins']['get'](z);if(_0x542645['_annotations']=_0x2e1ede,this['isAttached'])throw new _0x23d4ab('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x542645,'set:container',()=>{this['detach'](),this['listenTo'](_0x542645,'change:container',_0x440a70=>{_0x440a70['off'](),this['attach'](_0x2e1ede);});}),_0x542645['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x552564=_0x8eb2e2=>{_0x8eb2e2['updateTargetRect'](),_0x542645['addAnnotation'](_0x8eb2e2);};for(const _0x1a3e44 of _0x2e1ede)_0x552564(_0x1a3e44);this['listenTo'](_0x2e1ede,'add',(_0x54dec9,_0x2975e8)=>{_0x552564(_0x2975e8);}),this['listenTo'](_0x2e1ede,'remove',(_0x2060f1,_0x4de58b,_0x53600b)=>{_0x542645['rearrange']({'removedAnnotation':_0x4de58b,'previousAnnotation':_0x2e1ede['get'](_0x53600b-0x1),'nextAnnotation':_0x2e1ede['get'](_0x53600b+0x1)}),_0x4de58b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2e1ede,'focus',(_0x3442ed,_0x237aa4)=>{this['setActiveAnnotation'](_0x237aa4);}),this['listenTo'](_0x2e1ede,'blur',()=>{this['setActiveAnnotation'](null);});const _0xdac803=this['context']instanceof _0x25a64a?this['context']['editors']:new _0x584cc7([this['context']]);for(const _0x2e3246 of _0xdac803)this['_integrateWithEditorAnnotations'](_0x2e3246);this['listenTo'](_0xdac803,'add',(_0x446996,_0x25692d)=>{this['listenTo'](_0x25692d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x25692d);});}),this['listenTo'](_0xdac803,'remove',(_0x218e29,_0x48242e)=>{_0x48242e['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x48242e['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x23d4ab('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4d24d2=this['context']['plugins']['get'](z);_0x4d24d2['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4d24d2),this['stopListening'](this['annotations']),this['context']instanceof _0x25a64a&&this['stopListening'](this['context']['editors']);for(const _0x1d2696 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1d2696);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1dd696){if(!_0x1dd696['plugins']['has']('EditorAnnotations'))return;const _0x240f5f=_0x1dd696['plugins']['get']('EditorAnnotations'),_0x508e56=()=>{const _0x45eec0=_0x240f5f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x45eec0[0x0]||null);};this['listenTo'](_0x240f5f,'refresh',_0x508e56),this['listenTo'](_0x240f5f,'blur',(_0x25732f,{isAnnotationTracked:_0x515d0d})=>{this['activeAnnotation']&&_0x515d0d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x240f5f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4cd589=>{_0x240f5f['hasDomSelection']()&&(_0x508e56(),_0x4cd589['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x240f5f);}['_destroyEditorAnnotationsIntegration'](_0x71776b){this['stopListening'](_0x71776b),this['_editorAnnotations']['remove'](_0x71776b);}}class C extends _0x38e985{['counterView'];constructor(_0x335303){super(_0x335303);const _0x18e65a=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2cdf12,_0xfc4587)=>_0x2cdf12?'...':_0xfc4587['toString']()),this['set']('annotationType',''),this['icon']=_0x56d41d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x18e65a['to']('annotationType',_0x23940b=>'ck-annotation-counter__badge--'+_0x23940b),_0x18e65a['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x18e65a['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4f7306{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x489097){super(_0x489097),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xd181bf())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x584cc7(),this['_refreshPositioningDebounced']=_0x24341f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5e1067(this['context']['locale']),this['balloonPanelView']=new _0x436ff8(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x231444){this['annotations']=_0x231444;const _0x5dc422=this['context']['plugins']['get'](z),_0x2e6273=this['balloonPanelView'];if(_0x5dc422['_annotations']=_0x231444,this['isAttached'])throw new _0x23d4ab('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5dc422,'set:container',()=>{this['detach'](),this['listenTo'](_0x5dc422,'change:container',_0x1a4e5f=>{_0x1a4e5f['off'](),this['attach'](_0x231444);});}),_0x5dc422['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3ee675=_0x4c5b43=>{const _0x420ee7=new C(this['context']['locale']);_0x5dc422['addAnnotation'](_0x4c5b43,_0x420ee7),this['_annotationToNarrowView']['set'](_0x4c5b43,_0x420ee7),_0x420ee7['bind']('isDirty','annotationType','number')['to'](_0x4c5b43['view'],'isDirty','type','length'),_0x420ee7['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2e6273['content']['first']!==_0x4c5b43['view']?(this['_showBalloon'](_0x4c5b43),_0x4c5b43['view']['element']['focus'](),this['setActiveAnnotation'](_0x4c5b43)):this['setActiveAnnotation'](null);});};for(const _0x310fc8 of _0x231444)_0x3ee675(_0x310fc8);this['listenTo'](_0x231444,'add',(_0x160d52,_0x4b695e)=>{_0x3ee675(_0x4b695e);}),this['listenTo'](_0x231444,'remove',(_0x402e4a,_0x125123,_0xd80c17)=>{this['_annotationToNarrowView']['get'](_0x125123)['destroy'](),this['_annotationToNarrowView']['delete'](_0x125123),_0x5dc422['rearrange']({'removedAnnotation':_0x125123,'previousAnnotation':_0x231444['get'](_0xd80c17-0x1),'nextAnnotation':_0x231444['get'](_0xd80c17+0x1)}),_0x125123===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x231444,'focus',(_0x1c85b2,_0x33cce7)=>{this['setActiveAnnotation'](_0x33cce7);}),this['listenTo'](_0x231444,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x286dda,_0x3776ae)=>{_0x3776ae['keyCode']===_0x395c85['esc']&&_0x2e6273['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2e6273['content']['first']),this['_hideBalloon'](),_0x3776ae['stopPropagation'](),_0x3776ae['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3fe2d7,_0x4c4d1b)=>{const _0x58aeea=_0x4c4d1b['target'];_0x2e6273['isVisible']&&_0x2e6273['element']['contains'](_0x58aeea)||_0x5dc422['view']['element']['contains'](_0x58aeea)||_0x3fe2d7['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1ab308=>_0x1ab308['contains'](_0x58aeea))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x405ad8=this['context']instanceof _0x25a64a?this['context']['editors']:new _0x584cc7([this['context']]);for(const _0x35c536 of _0x405ad8)this['_integrateWithEditorAnnotations'](_0x35c536);this['listenTo'](_0x405ad8,'add',(_0x408118,_0x2e0b96)=>{this['listenTo'](_0x2e0b96,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2e0b96);});}),this['listenTo'](_0x405ad8,'remove',(_0x46f3e6,_0x24d900)=>{_0x24d900['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x24d900['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5481d2){if(_0x5481d2===this['activeAnnotation'])return;const _0x590e8c=this['context']['plugins']['get'](z);if(_0x590e8c['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5481d2,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5481d2)_0x590e8c['getSidebarItemView'](_0x5481d2)?this['_showBalloon'](_0x5481d2):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5481d2;}['detach'](){if(!this['isAttached'])throw new _0x23d4ab('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x445ea2=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x203e5d=>_0x203e5d['destroy']()),this['_annotationToNarrowView']['clear'](),_0x445ea2['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x25a64a&&this['stopListening'](this['context']['editors']);for(const _0xf5ac9b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xf5ac9b);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'](_0x2c21f5){if(!_0x2c21f5['plugins']['has']('EditorAnnotations'))return;const _0x1e606c=_0x2c21f5['plugins']['get']('EditorAnnotations'),_0x487f79=this['context']['plugins']['get'](z),_0x3f6df1=this['annotations'],_0x5d5bbc=this['balloonPanelView'],_0xebd582=()=>{const _0x5ed8dc=_0x1e606c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x5ed8dc),this['setActiveAnnotation'](_0x5ed8dc[0x0]||null);};this['listenTo'](_0x1e606c,'refresh',_0xebd582),this['listenTo'](_0x1e606c,'blur',(_0x39e24b,{isAnnotationTracked:_0x33be2d})=>{this['activeAnnotation']&&_0x33be2d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1e606c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3f6df1,'blur',_0x1635ed=>{_0x1e606c['hasDomSelection']()&&_0x1635ed['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3a48e0,_0x201eeb)=>{const _0x147b96=_0x201eeb['target'];_0x5d5bbc['isVisible']&&_0x5d5bbc['element']['contains'](_0x147b96)||_0x487f79['view']['element']['contains'](_0x147b96)||this['activeAnnotation']&&_0x1e606c['hasDomSelection']()&&(_0xebd582(),_0x3a48e0['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1e606c);}['_destroyEditorAnnotationsIntegration'](_0x16ab00){_0x16ab00&&(this['stopListening'](_0x16ab00),this['_editorAnnotations']['remove'](_0x16ab00));}['_setSelectedAnnotations'](_0x5e5ff7){for(const _0x2491b1 of this['_selectedAnnotations'])_0x5e5ff7['includes'](_0x2491b1)||this['_manuallyClosedAnnotationViews']['delete'](_0x2491b1['view']);this['_selectedAnnotations']=_0x5e5ff7;}['_refreshPositioning'](){const _0x1fc850=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1fc850['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x271e0e){if(this['_manuallyClosedAnnotationViews']['has'](_0x271e0e['view']))return;const _0x23480=this['balloonPanelView']['content']['first'];_0x23480!==_0x271e0e['view']?(_0x23480&&this['_detachListeners'](_0x23480),this['_attachListeners'](_0x271e0e['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x271e0e['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x274f3d=this['balloonPanelView']['content']['first'],_0x555167=_0x274f3d&&this['annotations']['getByView'](_0x274f3d);if(!_0x555167||!this['_annotationToNarrowView']['has'](_0x555167))return;const _0x2c69d2=this['_annotationToNarrowView']['get'](_0x555167)['element'],_0x4e3ae9=(function(){const _0x2e2973=_0x436ff8['defaultPositions'];return[_0x2e2973['southArrowNorthEast'],_0x2e2973['northArrowSouthEast'],_0x2e2973['southArrowNorth'],_0x2e2973['northArrowSouth'],_0x2e2973['southArrowNorthWest'],_0x2e2973['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2c69d2,'positions':_0x4e3ae9});}['_hideBalloon'](){const _0x183afd=this['balloonPanelView'],_0x15a03c=_0x183afd['content']['first'];_0x15a03c&&(this['_detachListeners'](_0x15a03c),_0x183afd['unpin'](),_0x183afd['content']['clear']());}['_attachListeners'](_0x261aa9){this['listenTo'](_0x261aa9,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x261aa9,'Esc',(_0x54a078,_0x597a99)=>{this['_manuallyClosedAnnotationViews']['add'](_0x261aa9),this['_hideBalloon'](),_0x597a99();});}['_detachListeners'](_0x21bfa4){this['stopListening'](_0x21bfa4);}}class c extends _0x6c9bcf{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x552e4a,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5a4f09){super(_0x5a4f09),_0x5a4f09['editing']['view']['addObserver'](_0x191965),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5a4f09['plugins']['get'](_0x552e4a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x1afd24=this['editor']['plugins']['get'](j);_0x1afd24['context']===this['editor']&&(_0x1afd24['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x525956,_0x4104cb)=>{const _0x2cba4f=this['_balloon'];if(this['isAttached']&&_0x2cba4f['visibleView']){const _0x5affc0=this['annotations']['getByView'](_0x2cba4f['visibleView']);_0x5affc0&&this['_closeAnnotation'](_0x5affc0),_0x4104cb();}}));}['afterInit'](){const _0x58709b=this['editor']['plugins']['get'](j);_0x58709b['context']===this['editor']&&(_0x58709b['hasActive']()||_0x58709b['switchTo']('inline'));}['setActiveAnnotation'](_0x4754d0){_0x4754d0!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4754d0&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4754d0)&&this['_addAnnotationToBalloon'](_0x4754d0,!0x0),_0x4754d0['isActive']=!0x0),_0x4754d0||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4754d0);}['attach'](_0x3c3cfd){this['annotations']=_0x3c3cfd;const _0x3d6a26=this['editor']['plugins']['get'](j),_0x5d18a8=this['_balloon'];if(this['isAttached'])throw new _0x23d4ab('inlineannotations-attach-already-attached',this);if(_0x3d6a26['context']!==this['editor'])throw new _0x23d4ab('inlineannotations-not-allowed-with-context',this);const _0x48e99c=this['editor']['plugins']['get'](b);this['listenTo'](_0x48e99c,'refresh',()=>{const _0x46929a=_0x48e99c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4fe2fd,_0x14f585;!this['_forceRefresh']&&(_0x4fe2fd=_0x46929a,_0x14f585=this['_selectedAnnotations'],_0x4fe2fd['length']===_0x14f585['length']&&_0x4fe2fd['every'](_0x51bb5b=>_0x14f585['includes'](_0x51bb5b)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x46929a),this['setActiveAnnotation'](_0x46929a[0x0]||null));}),this['listenTo'](_0x48e99c,'blur',(_0x172283,{isAnnotationTracked:_0x75dc4d})=>{this['activeAnnotation']&&_0x75dc4d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1df6a2,_0x2d1be9,_0x24d781)=>{_0x24d781||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3c3cfd,'remove',(_0x5940e2,_0x25c6e6)=>{this['_removeAnnotationFromBalloon'](_0x25c6e6),_0x25c6e6===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5d18a8,'change:visibleView',(_0x368bad,_0x4bf2c4,_0x29f036,_0x587594)=>{_0x587594&&this['stopListening'](_0x587594);const _0x2a189b=_0x3c3cfd['getByView'](_0x29f036);_0x29f036&&_0x2a189b&&(this['listenTo'](_0x29f036,'change:height',()=>{_0x5d18a8['updatePosition']();}),this['listenTo'](_0x29f036,'Esc',()=>{this['_closeAnnotation'](_0x2a189b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2a189b&&this['setActiveAnnotation'](_0x2a189b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5d18a8['visibleView']&&(_0x3c3cfd['getByView'](_0x5d18a8['visibleView'])&&_0x5d18a8['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 _0x23d4ab('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x22c64f of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x22c64f);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x92fd0){for(const _0x3b7e1b of this['_selectedAnnotations'])_0x92fd0['includes'](_0x3b7e1b)||this['_manuallyClosed']['delete'](_0x3b7e1b);for(const _0xcf11dd of this['annotations'])_0x92fd0['includes'](_0xcf11dd)||this['_removeAnnotationFromBalloon'](_0xcf11dd);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1961d3 of _0x92fd0)this['_addAnnotationToBalloon'](_0x1961d3);}this['_selectedAnnotations']=_0x92fd0;}['_addAnnotationToBalloon'](_0x139812,_0x108ab4=!0x1){this['_manuallyClosed']['has'](_0x139812)||(this['_addedAnnotations']['has'](_0x139812)||this['_balloon']['hasView'](_0x139812['view'])||(this['_addedAnnotations']['add'](_0x139812),this['_balloon']['add']({'stackId':_0x139812['view']['id'],'view':_0x139812['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x139812)}})),_0x108ab4&&this['_balloon']['showStack'](_0x139812['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5735b3){const _0xc2a9e4=_0x5735b3['target'],_0x457bed=this['editor']['editing']['view'],_0x17222b=_0x457bed['document']['selection']['getFirstRange'](),_0x55dbaf=_0x457bed['domConverter']['viewRangeToDom'](_0x17222b);if(_0x55dbaf['collapse'](!0x0),_0xc2a9e4){if(_0xc2a9e4 instanceof _0x4ec800)return _0xc2a9e4;let _0x512f08=[];for(const _0x5097f1 of _0xc2a9e4)_0x512f08['push'](...F(_0x5097f1['getClientRects']()));_0x512f08=function(_0x278eb1){const _0xf12967=[];let _0x13c606=_0x278eb1[0x0];for(let _0x3f05e7=0x1;_0x3f05e7<_0x278eb1['length'];_0x3f05e7++)P(_0x13c606,_0x278eb1[_0x3f05e7])?_0x13c606['width']+=_0x278eb1[_0x3f05e7]['width']:(_0xf12967['push'](_0x13c606),_0x13c606=_0x278eb1[_0x3f05e7]);return _0xf12967['push'](_0x13c606),_0xf12967;}(_0x512f08);const _0x46b0f1=_0x55dbaf['getBoundingClientRect']();return _0x512f08['find'](_0xfa2ff7=>_0xfa2ff7['top']<=_0x46b0f1['top']&&_0xfa2ff7['bottom']>=_0x46b0f1['bottom']&&_0xfa2ff7['left']<=_0x46b0f1['left']&&_0xfa2ff7['right']>=_0x46b0f1['right'])||_0x512f08[0x0];}return _0x5735b3['targetRect']||_0x55dbaf;}['_removeAnnotationFromBalloon'](_0xd7372e){this['_addedAnnotations']['has'](_0xd7372e)&&this['_balloon']['hasView'](_0xd7372e['view'])&&(this['_addedAnnotations']['delete'](_0xd7372e),this['_balloon']['remove'](_0xd7372e['view']));}['_closeAnnotation'](_0x2bb49d){this['_manuallyClosed']['add'](_0x2bb49d),this['_removeAnnotationFromBalloon'](_0x2bb49d);}}function F(_0x2c5ade){return Array['from'](_0x2c5ade)['map'](DOMRect['fromRect']);}function P(_0x53f586,_0x275040){return _0x53f586['top']===_0x275040['top']&&_0x53f586['bottom']===_0x275040['bottom']&&_0x53f586['right']===_0x275040['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x386a70,_0x19fac5){super(_0x386a70),this['set']('isEmpty',!_0x19fac5['length']),this['focusTracker']=new _0x58f4fb(),this['_annotationViews']=_0x19fac5,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x1a6b88({'focusables':_0x19fac5,'focusTracker':this['focusTracker']}),this['listenTo'](_0x19fac5,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x19fac5,'remove',(_0x1d0757,_0x524cc8)=>{_0x524cc8['isActive']&&this['focus'](),_0x19fac5['length']||(this['isEmpty']=!0x0);});const _0x105e4e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x386a70,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x19fac5},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x105e4e['if']('isEmpty','ck-hidden',_0x6a5af4=>!_0x6a5af4)]},'children':[{'text':N(_0x386a70,'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 _0x223b47 of this['_annotationViews'])this['focusTracker']['add'](_0x223b47['element']);this['_annotationViews']['on']('change',(_0x16434c,{added:_0x55331b,removed:_0x982f72})=>{for(const _0x46a884 of _0x55331b)this['focusTracker']['add'](_0x46a884['element']);for(const _0x51bca7 of _0x982f72)this['focusTracker']['remove'](_0x51bca7['element']);});}}class p extends _0x4f7306{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x3d5043){super(_0x3d5043),this['archivedThreads']=new _0x584cc7();}['init'](){const _0x4c2375=this['context'],_0x2e3e58=_0x4c2375['plugins']['get'](o),_0x44df00=_0x4c2375['plugins']['get'](y);this['listenTo'](_0x2e3e58,'addCommentThread',(_0x54756f,{threadId:_0x10a39c})=>{const _0x4d2b32=_0x2e3e58['getCommentThread'](_0x10a39c);_0x4d2b32['archivedAt']&&this['archivedThreads']['add'](_0x4d2b32,this['_calculatePosition'](_0x4d2b32['archivedAt'])),this['listenTo'](_0x4d2b32,'change:archivedAt',(_0x39afbb,_0x405ce2,_0x5c1ca9)=>{_0x5c1ca9?this['archivedThreads']['has'](_0x4d2b32)||this['archivedThreads']['add'](_0x4d2b32,this['_calculatePosition'](_0x4d2b32['archivedAt'])):this['archivedThreads']['has'](_0x4d2b32)&&this['archivedThreads']['remove'](_0x4d2b32);});}),this['listenTo'](_0x2e3e58,'removeCommentThread',(_0x5284b2,{threadId:_0x3b1a64})=>{const _0x1b7cf7=_0x2e3e58['getCommentThread'](_0x3b1a64);this['stopListening'](_0x1b7cf7),this['archivedThreads']['has'](_0x1b7cf7)&&this['archivedThreads']['remove'](_0x1b7cf7);},{'priority':'highest'}),this['listenTo'](_0x44df00['collection'],'focus',(_0x16aa98,_0xe76bfe)=>{_0xe76bfe['isVisible']||(_0xe76bfe['isActive']=!0x0,_0x44df00['activate'](_0xe76bfe));});}['_calculatePosition'](_0x1fd543){const _0xf5f62a=[...this['archivedThreads']]['findIndex'](_0x40d563=>_0x40d563['archivedAt']<_0x1fd543);return _0xf5f62a>-0x1?_0xf5f62a:this['archivedThreads']['length'];}}class a extends _0x6c9bcf{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x583c95];}constructor(_0x46b057){super(_0x46b057),this['annotationViews']=new _0x2d6a7d(),this['_pendingThreads']=[];}['init'](){const _0x2887d8=this['editor'],_0x19de8e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2887d8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x38e985,!0x0)),_0x2887d8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5df91e=this['_createCommentsArchiveButton'](_0x5a3c61);return _0x5df91e['set']({'role':'menuitemcheckbox'}),_0x5df91e;});const _0x33b59e=_0x2887d8['plugins']['get'](p),_0x297dfb=_0x2887d8['plugins']['get']('Annotations'),_0x4f7558=_0x2887d8['plugins']['get']('CommentsRepository');_0x33b59e['archivedThreads']['forEach'](_0x2a7b22=>{this['_handleNewThread'](_0x2a7b22);}),this['listenTo'](_0x33b59e['archivedThreads'],'add',(_0x2ec3a6,_0x126c9b)=>{this['_handleNewThread'](_0x126c9b);}),this['listenTo'](_0x297dfb['collection'],'add',(_0x2c1b0d,_0x210a84)=>{const _0x732ae5=this['_pendingThreads']['find'](_0x407bff=>{const _0x86ded4=_0x4f7558['_threadToController']['get'](_0x407bff);return _0x86ded4&&_0x210a84['innerView']===_0x86ded4['view'];});if(_0x732ae5){const _0x5f709a=this['_calculatePosition'](_0x732ae5['archivedAt']);this['annotationViews']['add'](_0x210a84['view'],_0x5f709a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x732ae5),0x1);}}),this['listenTo'](_0x33b59e['archivedThreads'],'remove',(_0x53ff05,_0x22a68c)=>{const _0x1c6660=_0x2887d8['config']['get']('collaboration.channelId');if(!_0x1c6660||_0x22a68c['channelId']===_0x1c6660){if(this['_pendingThreads']['includes'](_0x22a68c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x22a68c),0x1);else{const _0x292f87=_0x4f7558['_threadToController']['get'](_0x22a68c),_0xd6b24f=_0x297dfb['getByInnerView'](_0x292f87['view']);this['annotationViews']['remove'](_0xd6b24f['view']),this['stopListening'](_0xd6b24f['focusableElements']);}}}),this['listenTo'](_0x297dfb['collection'],'add',(_0x3caedb,_0x1ef7e8)=>{this['listenTo'](_0x1ef7e8,'escape',_0x19de8e);}),this['listenTo'](_0x297dfb['collection'],'remove',(_0x368519,_0x2b8c5d)=>{this['stopListening'](_0x2b8c5d,'escape',_0x19de8e);});}['_handleNewThread'](_0x413086){const _0x513bb9=this['editor']['plugins']['get']('CommentsRepository'),_0x520427=this['editor']['plugins']['get']('Annotations'),_0x407520=this['editor']['config']['get']('collaboration.channelId');if(!_0x407520||_0x413086['channelId']===_0x407520){const _0x280774=_0x513bb9['_threadToController']['get'](_0x413086);if(!_0x280774)return void this['_pendingThreads']['push'](_0x413086);const _0x24dc8e=this['_calculatePosition'](_0x413086['archivedAt']),_0x3600f6=_0x520427['getByInnerView'](_0x280774['view']);_0x3600f6['isVisible']&&_0x520427['_visibleAnnotations']['remove'](_0x3600f6),this['annotationViews']['add'](_0x3600f6['view'],_0x24dc8e);}}['_calculatePosition'](_0x5b96ba){const _0xbefe61=this['editor']['config']['get']('collaboration.channelId'),_0x2f194d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x27e745=>_0x27e745['channelId']===_0xbefe61)['findIndex'](_0x10c5ca=>_0x10c5ca['archivedAt']<_0x5b96ba);return _0x2f194d<0x0||_0x2f194d>this['annotationViews']['length']?this['annotationViews']['length']:_0x2f194d-0x1;}['_toggleDialog'](){const _0x35f231=this['editor'],_0x4ac79a=_0x35f231['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x35f231['locale'],this['annotationViews'])),'commentsArchive'===_0x4ac79a['id']?_0x4ac79a['hide']():_0x4ac79a['show']({'id':'commentsArchive','title':N(_0x35f231['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4fc354,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x307dc1['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x483192,_0x5e25ce=!0x1){const _0x341390=this['editor']['locale'],_0x120e6=this['editor']['plugins']['get']('Dialog'),_0x7ad811=new _0x483192(_0x341390);return _0x7ad811['bind']('isEnabled')['to'](this,'isEnabled'),_0x7ad811['bind']('isOn')['to'](_0x120e6,'id',_0x530d7f=>'commentsArchive'===_0x530d7f),_0x7ad811['set']({'label':N(_0x341390,'COMMENTS_ARCHIVE'),'icon':_0x4fc354,'isToggleable':!0x0}),_0x5e25ce&&(_0x7ad811['tooltip']=!0x0),this['listenTo'](_0x7ad811,'execute',()=>this['_toggleDialog']()),_0x7ad811;}['_hideDialogOnAnnotationEscape']=_0x2d35df=>{const _0x4595c5=_0x2d35df['source'];if(!this['annotationViews']['has'](_0x4595c5['view']))return;const _0x2f0b6a=this['editor']['plugins']['get']('Dialog');_0x2f0b6a['isOpen']&&'commentsArchive'===_0x2f0b6a['id']&&(_0x2f0b6a['hide'](),_0x2d35df['stop']());};}class gi extends _0x6c9bcf{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};