@ckeditor/ckeditor5-comments 45.2.1-alpha.5 → 45.2.1-alpha.7

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,12 +20,12 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x4fffb4,ContextPlugin as _0x2fb15e,PendingActions as lt,Command as _0x239ddb,Plugin as _0x33ee24,Context as _0x107356}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0xcbb367,uid as _0x2a477c,KeystrokeHandler as jt,FocusTracker as _0x41fa4f,diff as _0x43e4fd,Collection as _0x1dc279,Rect as _0x12850d,CKEditorError as _0x9d5d83,first as _0x35757b,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x628073,keyCodes as _0x1bc521}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x20d31a,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x1aabe0,trimHtml as _0x8b01b1,LateFocusDropdownButtonView as _0x34e7fe,Users as st,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0xcd43c4}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x1bbba8}from'es-toolkit/compat';import{IconUndo as _0x3e72c3,IconCheck as _0x3efaa6,IconPencil as _0x1917fa,IconRemoveComment as _0x2c527b,IconThreeVerticalDots as _0x4e0004,IconAddComment as _0x518710,IconCommentsArchive as _0x2c6891}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x42ff83,ButtonView as _0x4d0fd8,ViewCollection as _0x29db78,createDropdown as _0x5cecb2,ListView as _0x22ee35,focusChildOnDropdownOpen as _0x5b9a34,ListItemView as _0x4e23f7,MenuBarMenuListItemButtonView as _0x3b640d,BodyCollection as _0x59e074,BalloonPanelView as _0x1bf72f,ContextualBalloon as _0x350589,Dialog as _0x3ea3ac,DialogViewPosition as tt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x6f3a28}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x133303}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x162540}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0xcbb367(){['model'];['view'];constructor(_0x595032,_0x20d19a){super(),this['model']=_0x595032,this['model']['_isAttached']=!0x0,this['view']=_0x20d19a,this['listenTo'](_0x20d19a,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x20d19a,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x20d19a,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x20d19a,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x20d19a,'addComment',(_0x3b0e82,_0x40be27)=>this['addComment'](_0x40be27)),this['listenTo'](_0x20d19a,'updateComment',(_0x11293e,_0x3ddb56,_0x5896ad)=>this['updateComment'](_0x3ddb56,_0x5896ad)),this['listenTo'](_0x20d19a,'removeComment',(_0x3b11ce,_0x23452c)=>this['removeComment'](_0x23452c));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x25c675){this['model']['addComment']({'content':_0x25c675,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x25c9a4,_0x5f5cc2){this['model']['getComment'](_0x25c9a4)['update']({'content':_0x5f5cc2});}['removeComment'](_0x28d1b7){this['model']['getComment'](_0x28d1b7)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x101eb5,_0x504ca5,_0x2b0db5){const t=_0x101eb5['t'];switch(_0x504ca5){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'},_0x2b0db5);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'},_0x2b0db5);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'},_0x2b0db5);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'},_0x2b0db5);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2b0db5);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'},_0x2b0db5);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'},_0x2b0db5);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'},_0x2b0db5);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(_0x47653b,_0x20b1c0){super(_0x47653b);const _0x594723=_0x2a477c();this['main']=this['createCollection'](),this['editable']=new $t(_0x47653b,_0x20b1c0,void 0x0,{'label':()=>E(_0x47653b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x47653b['uiLanguageDirection'],'lang':_0x47653b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x594723},'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(_0x267299){super(_0x267299),this['view']=new Vt(_0x267299['locale'],_0x267299['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x45e693=this['editor']['editing']['view'],_0x301e83=this['view']['editable'],_0x388414=_0x45e693['document']['getRoot']();_0x301e83['name']=_0x388414['rootName'],this['view']['render']();const _0x445fc2=_0x301e83['element'];this['setEditableElement'](_0x301e83['name'],_0x445fc2),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x45e693['attachDomRoot'](_0x445fc2),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Rt extends/* #__PURE__ -- @preserve */
25
- _0xcbb367(_0x4fffb4){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x8ee66a={}){function _0x5c881e(_0x17fb78){return _0x17fb78['map'](_0x450d71=>String['fromCharCode'](_0x450d71))['join']('');}(_0x8ee66a=Object['assign']({},_0x8ee66a))['plugins']||(_0x8ee66a['plugins']=Rt['defaultPlugins']),super(_0x8ee66a),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[_0x5c881e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5c881e([0x76,0x69,0x65,0x77])][_0x5c881e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5c881e([0x61,0x75,0x74,0x6f]),this[_0x5c881e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5c881e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5c881e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5c881e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5c881e([0x6f,0x6b])});}['create'](){const _0x150091=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x150091))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4ccb4f=>{const _0x54515c=this['model']['document']['getRoot'](),_0x39b1ac=_0x54515c&&_0x54515c['getChild'](_0x54515c['childCount']-0x1);_0x4ccb4f['setSelection'](_0x39b1ac,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x4d7edc=this['editing']['view'],_0x279504=_0x4d7edc['document']['getRoot'](),_0x22c2f3=_0x279504['getChild'](0x0);_0x279504['childCount']>0x1||!_0x22c2f3||'p'!=_0x22c2f3['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x4d7edc,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x22c2f3['placeholder']=this['placeholder']),Ft({'view':_0x4d7edc,'element':_0x22c2f3,'keepOnFocus':!0x0}),this['placeholderElement']=_0x22c2f3);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0xd318a9,_0x17a9d5={}){super(_0xd318a9),this['editor']=null,this['_editorConfig']=_0x17a9d5,this['set']('value',_0x17a9d5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0xd318a9,'Reply...')),this['set']('submitLabel',E(_0xd318a9,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x41fa4f(),this['focusCycler']=new _0x42ff83({'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',(_0x252ec1,_0x15774c)=>{this['cancelButtonView']['fire']('execute'),_0x15774c();}),this['keystrokes']['set']('Ctrl+Enter',(_0x115800,_0x523a1c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x523a1c());}),this['on']('submit',(_0x179466,_0x2c73f5)=>{_0x2c73f5['length']>0xfde8?(alert(E(_0xd318a9,'TOO_LONG_COMMENT_ALERT',[_0x2c73f5['length'],0xfde8])),_0x179466['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 _0x144a67=this['editor'];this['element']['insertBefore'](_0x144a67['ui']['element'],this['element']['firstChild']),_0x144a67['model']['document']['on']('change',()=>this['value']=_0x144a67['getData']()),_0x144a67['bind']('placeholder')['to'](this),this['focusables']['add'](_0x144a67['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x19ea80){-0x1===_0x19ea80?(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:_0x4b08fd}=this,_0x30847c=new _0x4d0fd8(_0x4b08fd);return _0x30847c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x30847c['withText']=!0x0,_0x30847c['bind']('label')['to'](this,'submitLabel'),_0x30847c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x30847c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x50a4d6,_0xef7c76)=>!_0xef7c76&&!!_0x50a4d6['trim']()),_0x30847c;}['_createCancelButton'](){const {locale:_0x3af563}=this,_0x3d9f10=new _0x4d0fd8(_0x3af563);return _0x3d9f10['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3d9f10['label']=E(_0x3af563,'Cancel'),_0x3d9f10['withText']=!0x0,_0x3d9f10['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3d9f10;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2a1d2e=>{this['focusTracker']['add'](_0x2a1d2e['element']);}),this['focusables']['on']('change',(_0x17f04a,_0x34dec7)=>{for(const _0x290064 of Array['from'](_0x34dec7['added'])['reverse']())this['focusTracker']['add'](_0x290064['element']);});}}class ie extends kt{constructor(_0x4eb6ca,_0x2227bd,_0x4f020b){super(_0x4eb6ca),this['commentInputView']=new hs(_0x4eb6ca,_0x4f020b),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4451c0,_0x3ba0be)=>_0x4451c0||!!_0x3ba0be),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 _0x20d31a(_0x4eb6ca,_0x2227bd),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'](_0x427cd7){this['commentInputView']['focus'](_0x427cd7);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5e9c39,_0x1b7bd6)=>{const {submitButtonView:_0x508624,cancelButtonView:_0x37ad93,editor:_0x4ee4b9}=this['commentInputView'];[_0x508624['element'],_0x37ad93['element'],_0x4ee4b9?_0x4ee4b9['editing']['view']['getDomRoot']():null]['filter'](_0x1301a4=>_0x1301a4)['some'](_0x3fb870=>_0x3fb870['contains'](_0x1b7bd6['target']))||(this['focus'](),_0x1b7bd6['preventDefault']());});}}class cs extends kt{constructor(_0x16e9dc){super(_0x16e9dc);const _0x1416e9=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1416e9['to']('count',_0x4e42ab=>E(_0x16e9dc,'NUMBER_OF_COMMENTS',_0x4e42ab))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x752496,_0x24f959,_0x820ede){super(_0x752496);const _0x21aaea=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x24f959['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x24f959,this['_config']=_0x820ede,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x41fa4f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x42ff83({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5386a3=>this['commentViews']['map'](_0x5fc389=>_0x5fc389['element'])['includes'](_0x5386a3['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x752496),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x320a2c=>_0x320a2c-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4f75b0 of _0x24f959['comments'])this['_handleNewCommentModel'](_0x4f75b0);this['_handleInfoComment'](),this['listenTo'](_0x24f959['comments'],'add',(_0x5a941c,_0x42822a)=>{const _0x41f88a=this['_calculatePosition'](_0x42822a);this['length']++,this['_handleNewCommentModel'](_0x42822a,_0x41f88a),this['refreshVisibleViews']();}),this['listenTo'](_0x24f959['comments'],'remove',(_0x2e89a8,_0x1af046)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1af046),this['refreshVisibleViews']();}),this['listenTo'](_0x24f959,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x24f959,'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',_0x21aaea['if']('length','ck-hidden',_0xd41df1=>!_0xd41df1)],'aria-label':E(_0x752496,'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'](_0x1a73fd){-0x1===_0x1a73fd?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x5e09b7 of this['commentViews'])_0x5e09b7['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2918ab,_0x294ef2){const _0x44cbd2=new this['_config']['CommentView'](this['locale'],_0x2918ab,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x44cbd2['viewUid']=_0x2918ab['id'],_0x44cbd2['delegate']('removeComment')['to'](this),_0x44cbd2['delegate']('updateComment')['to'](this),_0x44cbd2['delegate']('resolveCommentThread')['to'](this),_0x44cbd2['delegate']('editorReady')['to'](this),_0x44cbd2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x44cbd2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x44cbd2,_0x294ef2);}['_calculatePosition'](_0x482b3b){const _0x46ac29=this['_model']['_findOptimalIndex'](_0x482b3b);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x482b3b['authoredAt']?_0x46ac29-0x1:_0x46ac29:_0x46ac29-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x492e7f={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x492e7f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x492e7f));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x236469){const _0x38e314=this['commentViews']['remove'](_0x236469['id']);this['stopListening'](_0x38e314),_0x38e314['isEditMode']&&this['_updateHasDirtyComment'](),_0x38e314['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4bb33d=>_0x4bb33d['isEditMode']);}['_rearrangeCollapse'](){const _0x59cc8b=function(_0x2239f7){const _0x464b5d=new _0x1dc279();for(const _0x170a36 of _0x2239f7)_0x464b5d['add'](_0x170a36);return _0x464b5d;}(this['commentViews']),_0x2d2ade=this['_collapsedCommentsView']['count'];for(let _0x569399=0x1;_0x569399<=_0x2d2ade;_0x569399++)_0x59cc8b['remove'](0x1);for(const _0x484079 of _0x59cc8b)_0x484079['collapse']();_0x2d2ade>0x0&&_0x59cc8b['add'](this['_collapsedCommentsView'],0x1),as(_0x43e4fd(Array['from'](this['visibleViews']),Array['from'](_0x59cc8b)),this['visibleViews'],_0x59cc8b);}['_rearrangeExpand'](){as(_0x43e4fd(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2509c8 of this['visibleViews'])_0x2509c8['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x19b308=>{this['focusTracker']['add'](_0x19b308['element']),this['keystrokes']['listenTo'](_0x19b308['element']);}),this['commentViews']['on']('change',(_0x483991,_0x9179d2)=>{for(const _0x1a60bb of _0x9179d2['removed'])this['focusTracker']['remove'](_0x1a60bb['element']),this['keystrokes']['stopListening'](_0x1a60bb['element']);for(const _0x30ba06 of Array['from'](_0x9179d2['added'])['reverse']())this['focusTracker']['add'](_0x30ba06['element']),this['keystrokes']['listenTo'](_0x30ba06['element']);});}}function as(_0x52952e,_0x28719b,_0x3cbcab){let _0x348add=0x0;for(const _0x2fdff2 of _0x52952e)switch(_0x2fdff2){case'insert':_0x28719b['add'](_0x3cbcab['get'](_0x348add),_0x348add),_0x348add++;break;case'delete':_0x28719b['remove'](_0x348add);break;case'equal':_0x348add++;}}class ls extends kt{constructor(_0x145ee7){super(_0x145ee7);const _0x4c6b1d=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4c6b1d['to']('contextValue',_0x122ff6=>E(_0x145ee7,'THREAD_CONTEXT_LABEL',_0x122ff6)),'tabindex':-0x1},'children':[{'text':_0x4c6b1d['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2b6a9f,_0x314eb6){super(_0x2b6a9f);const _0x5de163=this['bindTemplate'];this['_model']=_0x314eb6,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x41fa4f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x42ff83({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xfe7739=>!!_0xfe7739),this['bind']('contextValue')['to'](this['_model'],'context',_0x4e02eb=>_0x4e02eb&&_0x4e02eb['value']?this['_trimContextValue'](_0x4e02eb['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x5de163['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 _0x3865a8=new _0x4d0fd8(this['locale']);return _0x3865a8['label']=E(this['locale'],'Reopen'),_0x3865a8['tooltip']=E(this['locale'],'Reopen'),_0x3865a8['icon']=_0x3e72c3,_0x3865a8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2ef58c=>!_0x2ef58c),_0x3865a8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1347d0,_0x503393)=>_0x1347d0&&_0x503393),_0x3865a8['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3865a8;}['_trimContextValue'](_0x31578f){if(_0x31578f['length']<0x96)return _0x31578f;const _0x403007=_0x31578f['lastIndexOf']('\x20',0x93);return _0x31578f['substring'](0x0,_0x403007>-0x1?_0x403007:0x93)+'...';}['_attachContextActions'](){const _0x5e41e7=this['element']['querySelector']('.ck-context'),_0x2625e1=_0x5e41e7['querySelector']('.ck-context__value');this['listenTo'](_0x5e41e7,'mouseenter',()=>{_0x2625e1['offsetWidth']<_0x2625e1['scrollWidth']&&_0x5e41e7['classList']['add']('overlay');}),this['listenTo'](_0x5e41e7,'mouseleave',()=>{_0x5e41e7['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x269fb6 of this['focusables'])this['focusTracker']['add'](_0x269fb6['element']),this['keystrokes']['listenTo'](_0x269fb6['element']);}['_createContextView'](){const _0x4afe39=new ls(this['locale']);return _0x4afe39['bind']('contextValue')['to'](this),_0x4afe39;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1d4a23,_0x1e2637,_0x2417a5,_0x5f3a82){super(_0x1d4a23),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1e2637,this['_localUser']=_0x2417a5,this['_config']=_0x5f3a82,this['commentThreadHeaderView']=new Yt(_0x1d4a23,_0x1e2637),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x1d4a23,E(_0x1d4a23,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1d4a23,_0x1e2637,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5f3a82)),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',(_0x228406,_0x17d45f)=>_0x228406||!!_0x17d45f),this['bind']('isUnlinked')['to'](_0x1e2637,'unlinkedAt',_0xcb7191=>!!_0xcb7191),this['bind']('ariaLabel')['to'](this,'length',_0x301da8=>{const _0x37e098=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x301da8,_0x37e098]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x41fa4f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x42ff83({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x110bf8=>_0x110bf8['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 _0x2de2a7=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4fe542=_0x2de2a7['commentInputView'];return _0x2de2a7['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4fe542,'value',(_0x4eeab3,_0x27e5b0,_0x561e12,_0x50ee0f,_0x479d73)=>!!_0x479d73||!!_0x50ee0f&&_0x561e12&&!_0x27e5b0||_0x4eeab3&&_0x561e12&&!_0x27e5b0),_0x4fe542['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1359ce,_0x47cae7,_0x3f5f8f)=>{let _0x4bad4d;return _0x4bad4d=_0x3f5f8f&&_0x47cae7?'Reply\x20to\x20reopen\x20discussion...':_0x1359ce?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x4bad4d);}),_0x4fe542['bind']('submitLabel')['to'](this,'length',_0xe0a77f=>E(this['locale'],_0xe0a77f?'Reply':'Comment')),_0x4fe542['on']('submit',(_0x47be97,_0x40f5a3)=>{this['fire']('addComment',_0x40f5a3),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4fe542['on']('cancel',()=>{this['focus']();}),_0x4fe542['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4fe542['on']('cancel',_0x30f613=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x30f613['stop']());}),this['on']('change:isActive',(_0x433aab,_0x5f06ab,_0x1eff00)=>{_0x1eff00||this['length']||_0x4fe542['value']||this['fire']('removeCommentThread');}),_0x2de2a7;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x55c14c,_0x2c6bc2,_0x229745,_0x599785){super(_0x55c14c,_0x2c6bc2,_0x229745,_0x599785),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x55c14c,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2f6d0f,_0xb997f6,_0xeacf15)=>{_0xeacf15||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3ba6c0,_0x4e24de,_0x175a98)=>{_0x175a98&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x1639f1=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x1639f1['if']('isActive','ck-thread--active'),_0x1639f1['if']('isUnlinked','ck-thread--unlinked'),_0x1639f1['if']('isConfirm','ck-thread--remove-confirmation'),_0x1639f1['to']('actionIndicator',_0x57e61e=>_0x57e61e?'ck-thread--'+_0x57e61e:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x1639f1['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 _0x49876c of this['commentsListView']['commentViews'])_0x49876c['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1de92e}=this,_0x2cd792=this['commentsListView']['commentViews']['get'](0x0);_0x2cd792===this['_boundFirstCommentView']||_0x2cd792['isSystemComment']||(this['_boundFirstCommentView']=_0x2cd792,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2cd792,'actionIndicator',_0x2b0e97=>'remove'===_0x2b0e97?'remove':null),_0x2cd792['placeholder']=E(_0x1de92e,'Write\x20a\x20comment...'),_0x2cd792['removeButton']['on']('execute',_0x345850=>{_0x345850['stop'](),this['showConfirm'](E(_0x1de92e,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2cd792['focus']();}),_0x2cd792['actionBar']['add'](this['resolveButton'],0x0),_0x2cd792['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xdd4ca5=new _0x1aabe0(this['locale']);return _0xdd4ca5['label']=E(this['locale'],'Resolve'),_0xdd4ca5['tooltip']=E(this['locale'],'Resolve'),_0xdd4ca5['icon']=_0x3efaa6,_0xdd4ca5['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xdd4ca5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5bca72=>!_0x5bca72),_0xdd4ca5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x461a8a,_0x446286)=>_0x461a8a&&!_0x446286),_0xdd4ca5['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xdd4ca5;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class os extends kt{constructor(_0x3468c1){super(_0x3468c1),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0xa5df55,_0x37c98d,_0x3f75f6)=>{this['element']['innerHTML']=_0x3f75f6;}),this['element']['innerHTML']=this['content'];}}class rs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x37741e,_0x501d2a,_0x5c375a){super(_0x37741e),this['_model']=_0x501d2a,this['_config']=_0x5c375a,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x501d2a,'content',_0x501d2a,'authoredAt',(_0x2cdf01,_0x412986)=>E(_0x37741e,'COMMENT_ARIA_LABEL',[_0x501d2a['author']['name'],_0x5c375a['formatDateTime'](_0x412986),new DOMParser()['parseFromString'](_0x2cdf01,'text/html')['body']['textContent'],_0x501d2a['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x37741e,E(_0x37741e,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x29db78(),this['focusTracker']=new _0x41fa4f(),this['keystrokes']=new jt(),this['focusCycler']=new _0x42ff83({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x338aaf=>_0x338aaf['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x5e1b26=new os(this['locale']);return _0x5e1b26['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x1db8c1,_0x41c9d9)=>_0x41c9d9?_0x8b01b1(_0x1db8c1,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x1db8c1),_0x5e1b26;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x1efb57=new hs(this['locale'],this['_config']['editorConfig']);return _0x1efb57['value']=this['_model']['content'],_0x1efb57['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1efb57['submitLabel']=E(this['locale'],'Save'),_0x1efb57['on']('submit',(_0x4ed5eb,_0x2b0fc5)=>{this['fire']('updateComment',this['_model']['id'],_0x2b0fc5),this['switchToDisplayMode'](),this['focus']();}),_0x1efb57['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x1efb57['once']('editorReady',()=>{_0x1efb57['focus']();}),_0x1efb57['createEditor'](),_0x1efb57['delegate']('editorReady')['to'](this),_0x1efb57['delegate']('editorDestroyed')['to'](this),_0x1efb57;}['_setupKeyboardNavigation'](){const _0x5dc3d2=this['element'];this['keystrokes']['listenTo'](_0x5dc3d2);for(const _0x34becc of this['focusables'])this['focusTracker']['add'](_0x34becc['element']),this['keystrokes']['listenTo'](_0x34becc['element']);this['focusables']['on']('change',(_0x7a874b,_0x4e43e6)=>{for(const _0x11bd67 of _0x4e43e6['removed'])this['focusTracker']['remove'](_0x11bd67['element']),this['keystrokes']['stopListening'](_0x11bd67['element']);for(const _0x133031 of _0x4e43e6['added'])this['focusTracker']['add'](_0x133031['element']),this['keystrokes']['listenTo'](_0x133031['element']);}),this['keystrokes']['set']('enter',(_0x253e23,_0x2ac205)=>{_0x5dc3d2===_0x253e23['target']&&(this['focusCycler']['focusFirst'](),_0x2ac205());}),this['keystrokes']['set']('esc',(_0x1d347e,_0x49e4af)=>{_0x5dc3d2!==_0x1d347e['target']&&(this['focus'](),_0x49e4af());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(rs){['actionBar'];['userView'];constructor(_0x533dd4,_0x57b640,_0x7c2e08){super(_0x533dd4,_0x57b640,_0x7c2e08),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x533dd4,'Reply...')),this['bind']('authoredAt')['to'](_0x57b640),this['bind']('resolvedAt')['to'](_0x57b640),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 _0x20d31a(_0x533dd4,_0x57b640['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x57b640,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x272bde=this['bindTemplate'],_0x7ca93b=[{'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':_0x272bde['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x272bde['to']('authoredAt',_0x496c8a=>this['_config']['formatDateTime'](_0x496c8a))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x272bde['if']('isEditMode','ck-comment__actions--hidden'),_0x272bde['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']&&_0x7ca93b['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x272bde['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x272bde['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x272bde['if']('isEditMode','ck-comment--edit'),_0x272bde['if']('isSystemComment','ck-comment--info'),_0x272bde['to']('actionIndicator',_0x31c4aa=>_0x31c4aa?'ck-comment--'+_0x31c4aa:'')],'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':_0x7ca93b}]}]};}['_createEditButton'](){const _0x39c0fd=new _0x4d0fd8(this['locale']);return _0x39c0fd['label']=E(this['locale'],'Edit'),_0x39c0fd['icon']=_0x1917fa,_0x39c0fd['withText']=!0x0,_0x39c0fd['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x39c0fd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x92becb=>!_0x92becb),_0x39c0fd['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x39c0fd['on']('execute',()=>this['switchToEditMode']()),_0x39c0fd;}['_createRemoveButton'](){const _0x525318=new _0x4d0fd8(this['locale']);return _0x525318['label']=E(this['locale'],'Remove'),_0x525318['icon']=_0x2c527b,_0x525318['withText']=!0x0,_0x525318['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x525318['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5ccebd=>!_0x5ccebd),_0x525318['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x525318['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x525318;}['_createDropdown'](){const _0x25baf0=_0x5cecb2(this['locale'],_0x34e7fe),_0x416cdf=_0x25baf0['panelView']['children'],_0x5bbeb2=new _0x22ee35(this['locale']),_0x3ec51d=_0x25baf0['bindTemplate'];_0x5b9a34(_0x25baf0,()=>this['items']['find'](_0x1a3ad0=>_0x1a3ad0['isVisible'])),_0x25baf0['extendTemplate']({'attributes':{'class':[_0x3ec51d['if']('isVisible','ck-hidden',_0x38ea35=>!_0x38ea35)]}});const _0x1b57d6=(_0x8aab69,_0x3f7ae9=-0x1)=>{const _0x57ac21=new _0x4e23f7(this['locale']);_0x57ac21['children']['add'](_0x8aab69);const _0x7c453e=_0x3f7ae9>-0x1?_0x3f7ae9:_0x5bbeb2['items']['length'];_0x5bbeb2['items']['add'](_0x57ac21,_0x7c453e);const _0x3007e1=Array['from'](this['items']);_0x25baf0['unbind']('isEnabled','isVisible'),_0x25baf0['bind']('isEnabled')['toMany'](_0x3007e1,'isEnabled',(..._0x3702cb)=>_0x3702cb['some'](_0x225300=>_0x225300)),_0x25baf0['bind']('isVisible')['toMany'](_0x3007e1,'isVisible',(..._0x1e396c)=>_0x1e396c['some'](_0xf6a3d6=>_0xf6a3d6));};_0x25baf0['panelPosition']='sw',_0x25baf0['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x4e0004});for(const _0x1af683 of this['items'])_0x1b57d6(_0x1af683);return _0x416cdf['add'](_0x5bbeb2),_0x25baf0['listenTo'](this['items'],'add',(_0x290338,_0x2242a9,_0xb1ecb6)=>{_0x1b57d6(_0x2242a9,_0xb1ecb6);}),_0x25baf0['listenTo'](this['items'],'remove',(_0x92707d,_0x4474fa,_0x5456ca)=>{_0x5bbeb2['items']['remove'](_0x5456ca);}),_0x25baf0;}['_attachActions'](_0x4ab0aa,_0x2398ee){const _0xc068c3=_0x4ab0aa&&_0x4ab0aa['element'];_0xc068c3&&(this['listenTo'](_0xc068c3,'mouseenter',()=>this['actionIndicator']=_0x2398ee),this['listenTo'](_0xc068c3,'focus',()=>this['actionIndicator']=_0x2398ee),this['listenTo'](_0xc068c3,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0xc068c3,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x34ee82=super['_createCommentInputView']();return _0x34ee82['bind']('placeholder')['to'](this),_0x34ee82;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x28bb83){const _0x874849=Dt(_0x28bb83,0x1e),_0x3b2bc2=new MutationObserver(_0x3b936c=>{for(const _0x4d7f13 of _0x3b936c)('attributes'==_0x4d7f13['type']&&'class'==_0x4d7f13['attributeName']||'childList'==_0x4d7f13['type']||'characterData'==_0x4d7f13['type'])&&_0x874849();});return{'attach'(_0x5eb467){_0x3b2bc2['observe'](_0x5eb467,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x3b2bc2['disconnect'](),_0x874849['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x1dfe0b,_0x4602b7){super(_0x1dfe0b),this['id']=_0x2a477c(),this['focusTracker']=new _0x41fa4f(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x205e8b,_0x5bb8ac)=>this['fire']('Esc',_0x5bb8ac)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x4602b7),this['mainView']=_0x4602b7;const _0x147940=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x147940['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 _0x4db563=this['element']['clientHeight'];_0x4db563&&(this['height']=_0x4db563);}}class d extends/* #__PURE__ -- @preserve */
29
- _0xcbb367(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x4cc5ed,target:_0x352842,type:_0x43b4c8,isVisible:_0x4d26b7=!0x0}){super(),this['view']=_0x4cc5ed,this['view']['element']||this['view']['render'](),this['_type']=_0x43b4c8,this['_target']=_0x352842,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1dc279([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3f37ce,_0x548ed6)=>{this['view']['focusTracker']['add'](_0x548ed6);}),this['focusableElements']['on']('remove',(_0x2f4b28,_0x337d40)=>{this['view']['focusTracker']['remove'](_0x337d40);}),this['set']('isVisible',_0x4d26b7);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x589094=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x589094),_0x589094;}get['targetRect'](){const _0x2a715d=this['target'];if(null===_0x2a715d)return null;if(_0x2a715d instanceof _0x12850d)return _0x2a715d;const _0xd2b1a=_0x2a715d['filter'](_0x26a7bd=>function(_0x423952){const _0x44470b=_0x423952['offsetParent'];if(_0x44470b)return!0x0;const _0x3191d3=_0x423952['getClientRects']()['item'](0x0);return!!_0x3191d3;}(_0x26a7bd));return 0x0===_0xd2b1a['length']?null:new _0x12850d(_0xd2b1a[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4b78eb){this['view']['isActive']=_0x4b78eb,this['view']['mainView']['isActive']=_0x4b78eb;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x440a06){if(!(null===_0x440a06||_0x440a06 instanceof _0x12850d||Array['isArray'](_0x440a06)&&_0x440a06['every'](_0x5a42c6=>li(_0x5a42c6))))throw new _0x9d5d83('annotation-invalid-target',null,{'target':_0x440a06});}['_getNormalizedTarget'](){const _0x122393='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x122393)?[_0x122393]:_0x122393;}}function li(_0x3832db){return null!==_0x3832db&&'object'==typeof _0x3832db&&'nodeType'in _0x3832db&&0x1===_0x3832db['nodeType'];}class _ extends _0x1dc279{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4593f3=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x41fa4f(),this['_focusTracker']['on']('change:isFocused',(_0x11e996,_0x39ae0e,_0x5ed2a7)=>{_0x5ed2a7||this['fire']('blur');});for(const _0x3aafbe of _0x4593f3)this['add'](_0x3aafbe);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xb79f37){if(this['has'](_0xb79f37))throw new _0x9d5d83('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xb79f37['innerView'],_0xb79f37),this['_viewToAnnotation']['set'](_0xb79f37['view'],_0xb79f37);for(const _0x5b0da0 of _0xb79f37['focusableElements'])this['_focusTracker']['add'](_0x5b0da0);this['listenTo'](_0xb79f37['focusableElements'],'add',(_0x11aede,_0x293489)=>{this['_focusTracker']['add'](_0x293489);}),this['listenTo'](_0xb79f37['focusableElements'],'remove',(_0x3c581c,_0x3e3f82)=>{this['_focusTracker']['remove'](_0x3e3f82);}),this['listenTo'](_0xb79f37['view']['focusTracker'],'change:isFocused',(_0x460be9,_0x579bd0,_0x93b9ed)=>{_0x93b9ed&&this['fire']('focus',_0xb79f37);}),_0xb79f37['updateTargetRect']();const _0x47e7f6=this['_getOrderInContent'](_0xb79f37['view']['targetRect']);return super['add'](_0xb79f37,_0x47e7f6);}['remove'](_0x58d27e){if(!this['has'](_0x58d27e))throw new _0x9d5d83('annotationcollection-not-existing-item',null);this['stopListening'](_0x58d27e['view']['focusTracker']),this['stopListening'](_0x58d27e['focusableElements']);for(const _0x3ac0da of _0x58d27e['focusableElements'])this['_focusTracker']['remove'](_0x3ac0da);return this['_viewToAnnotation']['delete'](_0x58d27e['view']),this['_innerViewToAnnotation']['delete'](_0x58d27e['innerView']),super['remove'](_0x58d27e);}['getByInnerView'](_0x9ffaf2){return this['_innerViewToAnnotation']['get'](_0x9ffaf2);}['getByView'](_0x4bedab){return this['_viewToAnnotation']['get'](_0x4bedab);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x6f4b50 of this)_0x6f4b50['updateTargetRect']();this['_sort']();}['_sort'](){const _0x397dcd=Array['from'](this)['sort']((_0x42fd35,_0x1fff40)=>v(_0x42fd35['view']['targetRect'],_0x1fff40['view']['targetRect']));for(let _0x55b2df=_0x397dcd['length']-0x1;_0x55b2df>0x0;_0x55b2df--){const _0x35b42e=_0x397dcd[_0x55b2df];_0x55b2df!==this['getIndex'](_0x35b42e)&&(this['remove'](_0x35b42e),this['add'](_0x35b42e));}}['_getOrderInContent'](_0x94d706){let _0x1939b0=0x0;if(!_0x94d706)return this['length'];for(const _0x49f6e2 of this){const _0x535386=_0x49f6e2['view']['targetRect'];if(_0x535386){if(v(_0x94d706,_0x535386)<0x0)return _0x1939b0;_0x1939b0++;}}return _0x1939b0;}}function v(_0x1dc089,_0x257ea9){if(null===_0x1dc089&&null===_0x257ea9)return 0x0;if(null===_0x1dc089)return-0x1;if(null===_0x257ea9)return 0x1;const _0x2e96da=_0x1dc089['top']-_0x257ea9['top'];return 0x0==_0x2e96da?_0x1dc089['left']-_0x257ea9['left']:_0x2e96da;}class O extends _0x2fb15e{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43cbea){if(super(_0x43cbea),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x43cbea instanceof _0x4fffb4){const _0x1a5379=_0x43cbea['locale'];_0x43cbea['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x1a5379,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x1a5379,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x1a5379,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x1a5379,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x1a5379,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x1a5379,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x1a5379,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4bf47d){this['collection']['add'](_0x4bf47d);}['remove'](_0x1c48b1){this['collection']['remove'](_0x1c48b1),_0x1c48b1['destroy']();}['refreshVisibility'](){for(const _0x2e41be of this['collection'])_0x2e41be['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3e3121){return this['collection']['getByInnerView'](_0x3e3121);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x451d9c of this['collection'])_0x451d9c['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2da8d5){this['fire']('_activateAnnotation',_0x2da8d5);}['createAnnotation'](_0x314d47){return new d(_0x314d47);}['createAnnotationView'](_0x25ddc0,_0x417de1){return new S(_0x25ddc0,_0x417de1);}['_addActiveAnnotation'](_0x3afc73){const _0x326f9b=new Set(this['activeAnnotations']);_0x326f9b['add'](_0x3afc73),this['activeAnnotations']=_0x326f9b;}['_removeActiveAnnotation'](_0x43f3f3){const _0x255469=new Set(this['activeAnnotations']);_0x255469['delete'](_0x43f3f3),this['activeAnnotations']=_0x255469;}['_bindAnnotationsToVisibleAnnotations'](){const _0x520db6=this['collection'],_0x2b357f=this['_visibleAnnotations'];function _0x44e2b3(_0x2534b3){const _0x5b7772=_0x2534b3['source'];_0x5b7772['isVisible']&&!_0x2b357f['has'](_0x5b7772)?_0x2b357f['add'](_0x5b7772):!_0x5b7772['isVisible']&&_0x2b357f['has'](_0x5b7772)&&_0x2b357f['remove'](_0x5b7772),_0x5b7772['view']['focusTracker']['remove'](_0x5b7772['view']['element']),_0x5b7772['view']['focusTracker']['add'](_0x5b7772['view']['element']);}this['listenTo'](_0x520db6,'add',(_0x1615a1,_0x3c2b06)=>{_0x3c2b06['isVisible']&&_0x2b357f['add'](_0x3c2b06),this['listenTo'](_0x3c2b06,'change:isVisible',_0x44e2b3);}),this['listenTo'](_0x520db6,'remove',(_0x3d9c70,_0x287c5c)=>{_0x2b357f['has'](_0x287c5c)&&_0x2b357f['remove'](_0x287c5c),this['stopListening'](_0x287c5c,'change:isVisible',_0x44e2b3);});}['_setupEnterAnnotationKeystroke'](){const _0x1bebbf=_0x5ee8a3=>{_0x5ee8a3['on']('ready',()=>{_0x5ee8a3['keystrokes']['set'](_0x133303,(_0x2f5cee,_0xe16ea0)=>{const _0x47ddb6=_0x35757b(this['activeAnnotations']['values']());_0x47ddb6&&(_0x47ddb6['view']['focus'](),_0xe16ea0());});});};this['context']instanceof _0x4fffb4?_0x1bebbf(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x446ccc,_0x12a19d)=>{_0x1bebbf(_0x12a19d);});}['_setupEscapeAnnotationHandling'](){const _0x266896=_0x2a06d7=>{const _0x302a7c=_0x2a06d7['source'],_0x4e99af=[];let _0x27907d;if(Array['isArray'](_0x302a7c['target'])){_0x27907d=_0x302a7c['target'][0x0],this['context']instanceof _0x4fffb4?_0x4e99af['push'](this['context']):this['context']['editors']&&_0x4e99af['push'](...this['context']['editors']);for(const _0x3f7ed1 of _0x4e99af)for(const _0x37d1b7 of _0x3f7ed1['editing']['view']['domRoots']['values']())if(_0x37d1b7['contains'](_0x27907d))return void _0x3f7ed1['editing']['view']['focus']();_0x27907d['focus']();}};this['listenTo'](this['collection'],'add',(_0x37bf36,_0x33b8ab)=>{this['listenTo'](_0x33b8ab,'escape',_0x266896,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x10ec86,_0x3a5b37)=>{this['stopListening'](_0x3a5b37,'escape',_0x266896);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2fb15e{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,lt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a0633){super(_0x1a0633),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x464c77=this['context']['config'];_0x464c77['define']('comments.maxCommentsWhenCollapsed',0x2),_0x464c77['define']('comments.maxThreadTotalWeight',0x1f4),_0x464c77['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x464c77['define']('comments.CommentThreadView',gt),_0x464c77['define']('comments.CommentView',Tt),_0x464c77['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x22837a=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x42e505,_0x35d87e)=>this['_addCommentThread'](_0x35d87e)),this['on']('submitCommentThread',(_0x30c219,_0x3e48f2)=>this['_submitCommentThread'](_0x3e48f2)),this['on']('resolveCommentThread',(_0x3311b3,_0x4047c3)=>this['_resolveCommentThread'](_0x4047c3)),this['on']('resolveCommentThread',(_0x5f068a,_0x319a25)=>this['_updateActiveAnnotation'](_0x319a25),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x4fc02b,_0x463385)=>this['_reopenCommentThread'](_0x463385)),this['on']('reopenCommentThread',(_0x40e31f,_0x189917)=>this['_updateActiveAnnotation'](_0x189917),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1b451a,_0x6e9276)=>this['_removeCommentThread'](_0x6e9276)),this['on']('updateCommentThread',(_0x5c901f,_0x409526)=>this['_updateCommentThread'](_0x409526)),this['on']('updateCommentThread',(_0x3034e0,_0x576018)=>this['_updateActiveAnnotation'](_0x576018),{'priority':'lowest'}),this['on']('addComment',(_0x567680,_0x1350f0)=>this['_addComment'](_0x1350f0)),this['on']('updateComment',(_0x1a411a,_0x57bf00)=>this['_updateComment'](_0x57bf00)),this['on']('removeComment',(_0x5f1a4f,_0x3084fd)=>this['_removeComment'](_0x3084fd)),this['on']('addComment',(_0x4c8e8d,{threadId:_0xfa5515,isFromAdapter:_0x5360c6})=>{if(_0x5360c6)return;const _0x3f643a=this['getCommentThread'](_0xfa5515),_0x2dd976=_0x3f643a&&this['_threadToController']['get'](_0x3f643a);_0x2dd976&&_0x2dd976['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x22837a,'change:activeAnnotations',(_0x2ca3ad,_0x56c06a,_0x469191)=>{const _0x4cbe3c=Array['from'](_0x469191)['map'](_0x20b233=>this['_viewToController']['get'](_0x20b233['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4cbe3c?_0x4cbe3c['model']:null;});}set['adapter'](_0x97213a){if(this['_adapter'])throw new _0x9d5d83('commentsrepository-adapter-already-set');this['_adapter']=_0x97213a;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4cb784=_t,threadId:_0x5790b7=_0x2a477c(),comments:_0x148033=[],unlinkedAt:_0x28f0d4=null,resolvedAt:_0x5eaa0c=null,resolvedBy:_0x30e16b=null,target:_0x2fd0c8=null,context:_0x34d405=null,attributes:_0x36fd7a={},isResolvable:_0x37e91b=!0x0,isSubmitted:_0x18ad77=!0x1,isFromAdapter:_0x3b0513=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4cb784),{'channelId':_0x4cb784,'threadId':_0x5790b7,'comments':_0x148033,'unlinkedAt':_0x28f0d4,'resolvedAt':_0x5eaa0c,'resolvedBy':_0x30e16b,'target':_0x2fd0c8,'context':_0x34d405,'attributes':_0x36fd7a,'isFromAdapter':_0x3b0513,'isResolvable':_0x37e91b,'isSubmitted':_0x18ad77}),this['getCommentThread'](_0x5790b7);}['openNewCommentThread']({channelId:_0x540b41=_t,threadId:_0x47a954=_0x2a477c(),target:_0x263798,context:_0x107c63=null,isResolvable:_0x33f959=!0x0}){if(this['_readOnlyChannels']['has'](_0x540b41)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x263798)throw new _0x9d5d83('commentsrepository-missing-target');const _0x227f38=this['addCommentThread']({'channelId':_0x540b41,'threadId':_0x47a954,'target':_0x263798,'context':_0x107c63,'isResolvable':_0x33f959});if(!_0x227f38)return null;const _0x361698=this['_threadToController']['get'](_0x227f38),_0x193f62=_0x361698['view']['commentThreadInputView']['commentInputView'],_0x186c5c=this['context']['plugins']['get'](O),_0x416b97=_0x186c5c['getByInnerView'](_0x361698['view']);return _0x186c5c['activate'](_0x416b97),_0x193f62['once']('editorReady',()=>_0x193f62['focus']()),_0x227f38;}['hasCommentThread'](_0x466fb3){if('string'!=typeof _0x466fb3)throw new _0x9d5d83('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x466fb3);}['updateCommentThread']({channelId:_0x469841=_t,threadId:_0x1c8767,context:_0x649eef,unlinkedAt:_0x3d007f,attributes:_0x1dacae,isFromAdapter:_0x3257b7=!0x1}){return this['fire'](Nt('updateCommentThread',_0x469841),{'channelId':_0x469841,'threadId':_0x1c8767,'context':_0x649eef,'unlinkedAt':_0x3d007f,'attributes':_0x1dacae,'isFromAdapter':_0x3257b7}),this['getCommentThread'](_0x1c8767);}['getCommentThread'](_0x3e0e0e){if('string'!=typeof _0x3e0e0e)throw new _0x9d5d83('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3e0e0e);}['fetchCommentThread']({channelId:_0x162e24,threadId:_0x55f07e}={}){const _0x429ed3=this['getCommentThread'](_0x55f07e);if(_0x429ed3)return Promise['resolve'](_0x429ed3);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x9d5d83('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x162e24,'threadId':_0x55f07e})['then'](_0xa025bf=>this['hasCommentThread'](_0x55f07e)?this['getCommentThread'](_0x55f07e):_0xa025bf?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x162e24},_0xa025bf)):void 0x0)['catch'](_0x10cb0c=>{throw console['error'](_0x10cb0c),new _0x9d5d83('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2b5f41,skipNotAttached:_0x2548c0=!0x1,skipEmpty:_0x1d0f04=!0x1,toJSON:_0x2bf88e=!0x1}={}){const _0x15fbde=[];for(const _0x34c448 of this['_threads']['values']())_0x2b5f41&&_0x34c448['channelId']!==_0x2b5f41||_0x2548c0&&!_0x34c448['isAttached']||_0x1d0f04&&0x0===_0x34c448['length']||_0x15fbde['push'](_0x34c448);return _0x2bf88e?_0x15fbde['map'](_0x3ab7a2=>_0x3ab7a2['toJSON']()):_0x15fbde;}['setActiveCommentThread'](_0x577429){const _0x5e86db=this['context']['plugins']['get'](O);if(!_0x577429)return void(this['activeCommentThread']&&_0x5e86db['deactivateAll']());const _0x350ba1=this['getCommentThread'](_0x577429);if(!_0x350ba1)throw new _0x9d5d83('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x577429});if(!this['_threadToController']['has'](_0x350ba1))throw new _0x9d5d83('commentsrepository-active-not-attached',null,{'threadId':_0x577429});const _0x2625a6=_0x5e86db['getByInnerView'](this['_threadToController']['get'](_0x350ba1)['view']);_0x5e86db['activate'](_0x2625a6);}['switchReadOnly'](_0x2bfe57,_0xff5d95){_0x2bfe57?this['_readOnlyChannels']['add'](_0xff5d95):this['_readOnlyChannels']['delete'](_0xff5d95),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4c31c2){return this['_readOnlyChannels']['has'](_0x4c31c2)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x32b734,_0x2a5629){return new vt(_0x32b734,_0x2a5629);}['setPermissions'](_0x55609c,_0x4a8fc7=_t){this['_permissions']['set'](_0x4a8fc7,_0x55609c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1f2782=_t){return this['_permissions']['has'](_0x1f2782)?this['_permissions']['get'](_0x1f2782):bt;}['_addCommentThread']({channelId:_0x183030,threadId:_0x400df1,comments:_0x482c96,unlinkedAt:_0x49c361,resolvedAt:_0x3b5830,resolvedBy:_0xb778c3,target:_0x3ffc1c,context:_0x4a20ec,attributes:_0x5a9b54,isFromAdapter:_0xab574,isResolvable:_0x482e89,isSubmitted:_0x47e7ba}){if('string'!=typeof _0x400df1)throw new _0x9d5d83('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x400df1});if(this['hasCommentThread'](_0x400df1))throw new _0x9d5d83('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x400df1});const _0x375e1e=new ui(this,{'channelId':_0x183030,'id':_0x400df1,'context':_0x4a20ec,'attributes':_0x5a9b54,'unlinkedAt':_0x49c361,'resolvedAt':_0x3b5830,'resolvedBy':_0xb778c3?this['context']['plugins']['get'](st)['getUser'](_0xb778c3):null,'isResolvable':_0x482e89,'isSubmitted':_0x47e7ba||_0xab574});this['_threads']['set'](_0x400df1,_0x375e1e);for(const _0x3ece9a of _0x482c96)_0x375e1e['_add'](this['_createNewComment']({'threadId':_0x400df1,..._0x3ece9a}));return _0x3ffc1c&&_0x375e1e['attachTo'](_0x3ffc1c),_0xab574||!_0x375e1e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x183030,'threadId':_0x400df1});}['_submitCommentThread']({channelId:_0x197718,threadId:_0x3014ec}){if(!this['hasCommentThread'](_0x3014ec))throw new _0x9d5d83('commentsrepository-missing-comment-thread',this);const _0x191d4a=this['getCommentThread'](_0x3014ec);if(_0x191d4a['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5045cb,comments:_0x2ff344,resolvedAt:_0x81d06a,resolvedBy:_0xbf12d6,context:_0xf5379c,attributes:_0x2a3ccb}=_0x191d4a,_0x4e1f55=this['context']['plugins']['get']('PendingActions'),_0x535a78=_0x4e1f55['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x197718,'threadId':_0x5045cb,'comments':_0x2ff344['map'](_0x485f83=>_0x485f83['toJSON']()),'resolvedAt':_0x81d06a,'resolvedBy':_0xbf12d6?_0xbf12d6['id']:_0xbf12d6,'context':_0xf5379c,'attributes':_0x2a3ccb})['then'](({comments:_0x36f289})=>{_0x4e1f55['remove'](_0x535a78);for(const _0x3e5b85 of _0x36f289)this['_updateComment']({'channelId':_0x197718,'threadId':_0x3014ec,'commentId':_0x3e5b85['commentId'],'createdAt':_0x3e5b85['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x55a408=>{throw console['error'](_0x55a408),new _0x9d5d83('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4430f3,target:_0xc47f27}){const _0x33c58e=this['getCommentThread'](_0x4430f3);if(!_0x33c58e)throw new _0x9d5d83('commentsrepository-attach-missing-comment-thread',this);const _0x158b26=this['context']['plugins']['get']('PendingActions'),_0x467af9=this['context']['plugins']['get'](O),_0x8ffc66=this['_createCommentThreadView'](_0x33c58e),_0x98e25f=new vt(_0x33c58e,_0x8ffc66);let _0x5a02bb=null;_0x8ffc66['on']('change:isDirty',(_0x96d2c1,_0x1fdaad,_0x2f444f)=>{_0x2f444f?_0x5a02bb=_0x158b26['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5a02bb&&(_0x158b26['remove'](_0x5a02bb),_0x5a02bb=null);}),this['_threadToController']['set'](_0x33c58e,_0x98e25f),this['_viewToController']['set'](_0x8ffc66,_0x98e25f);const _0x1029d1=new S(this['context']['locale'],_0x8ffc66);_0x1029d1['bind']('length')['to'](_0x8ffc66),_0x1029d1['bind']('isDirty')['to'](_0x8ffc66,'isDirty',_0x8ffc66,'length',(_0x394b6b,_0x563a70)=>_0x394b6b||!_0x563a70),_0x1029d1['bind']('isActive')['to'](_0x8ffc66),_0x1029d1['type']='comment';const _0x4089e4=new d({'view':_0x1029d1,'target':_0xc47f27,'type':'comment','isVisible':!_0x33c58e['archivedAt']});return _0x8ffc66['on']('escape',()=>{_0x4089e4['fire']('escape');}),this['_bindAnnotationToEditors'](_0x8ffc66,_0x4089e4),_0x467af9['add'](_0x4089e4),_0x4089e4;}['_bindAnnotationToEditors'](_0x58469e,_0x2b8150){this['listenTo'](_0x58469e,'editorReady',(_0x2f7069,_0x5593b0)=>{const _0x4fa2f9=_0x5593b0['ui']['view']['body']['bodyCollectionContainer'];_0x2b8150['focusableElements']['add'](_0x4fa2f9),this['context']instanceof _0x4fffb4&&this['context']['ui']['focusTracker']['add'](_0x4fa2f9);},{'priority':'highest'}),this['listenTo'](_0x58469e,'editorDestroyed',(_0x3a65d7,_0x3b901a)=>{const _0x175fa9=_0x3b901a['ui']['view']['body']['bodyCollectionContainer'];_0x2b8150['focusableElements']['has'](_0x175fa9)&&_0x2b8150['focusableElements']['remove'](_0x175fa9),this['context']instanceof _0x4fffb4&&this['context']['ui']['focusTracker']['remove'](_0x175fa9);});}['_unbindEditors'](_0x294cfa){this['stopListening'](_0x294cfa,'editorReady'),this['stopListening'](_0x294cfa,'editorDestroyed');}['_createCommentThreadView'](_0x59731c){const _0x5a8313=this['context']['plugins']['get'](st),{config:_0x2ee6b6,locale:_0x3e5479}=this['context'],_0x442bb=pt(_0x2ee6b6['get']('locale'),_0x3e5479);return new(0x0,(_0x2ee6b6['get']('comments'))['CommentThreadView'])(_0x3e5479,_0x59731c,_0x5a8313['me'],{'editorConfig':{..._0x2ee6b6['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2ee6b6['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2ee6b6['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2ee6b6['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2ee6b6['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x442bb,'CommentView':_0x2ee6b6['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x197f45,channelId:_0x5887e2,resolvedAt:_0x1007ac,resolvedBy:_0x41fb91,isFromAdapter:_0x38dada}){if(!this['hasCommentThread'](_0x197f45))throw new _0x9d5d83('commentsrepository-missing-comment-thread',null,{'threadId':_0x197f45});const _0x20d7b7=this['getCommentThread'](_0x197f45);if(_0x20d7b7['isResolved'])throw new _0x9d5d83('commentsrepository-resolved-comment-thread',null,{'threadId':_0x197f45});const _0x23f41b=this['context']['plugins']['get'](st);if(_0x20d7b7['resolvedBy']=_0x23f41b['getUser'](_0x41fb91),_0x20d7b7['resolvedAt']=_0x1007ac,_0x38dada||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1fa7c5=this['context']['plugins']['get']('PendingActions'),_0x52506d=_0x1fa7c5['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x5887e2,'threadId':_0x197f45})['then'](({resolvedAt:_0xbdfaf3,resolvedBy:_0x336110})=>{_0x1fa7c5['remove'](_0x52506d),_0x20d7b7['resolvedBy']['id']!==_0x336110&&(_0x20d7b7['resolvedBy']=_0x23f41b['getUser'](_0x336110)),_0x20d7b7['resolvedAt']=_0xbdfaf3;})['catch'](_0x5ce2f9=>{throw console['error'](_0x5ce2f9),new _0x9d5d83('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x13d717,channelId:_0x44d18c,isFromAdapter:_0x8bb4b}){if(!this['hasCommentThread'](_0x13d717))throw new _0x9d5d83('commentsrepository-missing-comment-thread',null,{'threadId':_0x13d717});const _0x3e2141=this['getCommentThread'](_0x13d717);if(!_0x3e2141['isResolved'])throw new _0x9d5d83('commentsrepository-reopen-comment-thread',null,{'threadId':_0x13d717});if(_0x3e2141['resolvedBy']=null,_0x3e2141['resolvedAt']=null,_0x8bb4b||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2637bd=this['context']['plugins']['get']('PendingActions'),_0x111f09=_0x2637bd['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x44d18c,'threadId':_0x13d717})['then'](()=>_0x2637bd['remove'](_0x111f09))['catch'](_0x1419a5=>{throw console['error'](_0x1419a5),new _0x9d5d83('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0xb68467,isFromAdapter:_0x3dca5d}){const _0x5ae333=this['getCommentThread'](_0xb68467);if(!_0x5ae333)throw new _0x9d5d83('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0xb68467),this['_threads']['delete'](_0xb68467),!_0x5ae333['isSubmitted']||_0x3dca5d||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2b6190=this['context']['plugins']['get']('PendingActions'),{channelId:_0x17ef83}=_0x5ae333,_0x130026=_0x2b6190['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x17ef83,'threadId':_0xb68467})['then'](()=>_0x2b6190['remove'](_0x130026))['catch'](_0x208991=>{throw console['error'](_0x208991),new _0x9d5d83('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4097d7,unlinkedAt:_0x4acbbd,context:_0x1b9505,attributes:_0x5b0ae9,isFromAdapter:_0x58ebdc}){if('string'!=typeof _0x4097d7)throw new _0x9d5d83('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4097d7});if(!this['hasCommentThread'](_0x4097d7))throw new _0x9d5d83('commentsrepository-missing-comment-thread',null,{'threadId':_0x4097d7});const _0x523df2=this['getCommentThread'](_0x4097d7);let _0x4bd9af=!0x1;if(void 0x0!==_0x1b9505&&_0x523df2['context']!==_0x1b9505&&(_0x523df2['context']=_0x1b9505,_0x4bd9af=!0x0),void 0x0!==_0x4acbbd&&_0x523df2['unlinkedAt']!==_0x4acbbd&&(_0x523df2['unlinkedAt']=_0x4acbbd,_0x4bd9af=!0x0),_0x5b0ae9&&!At(_0x5b0ae9,_0x523df2['attributes'])&&(_0x523df2['attributes']=_0x5b0ae9,_0x4bd9af=!0x0),!_0x4bd9af)return Promise['resolve']();if(!_0x523df2['isSubmitted']||_0x58ebdc||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5ca65f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x367564}=_0x523df2,_0x1e29cf=_0x5ca65f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x367564,'threadId':_0x4097d7,'context':_0x1b9505,'unlinkedAt':_0x4acbbd,'attributes':_0x5b0ae9})['then'](()=>_0x5ca65f['remove'](_0x1e29cf))['catch'](_0x3d2b62=>{throw console['error'](_0x3d2b62),new _0x9d5d83('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x572259){const _0x5a5369=this['context']['plugins']['get'](O),_0x2978ee=this['getCommentThread'](_0x572259);if(_0x2978ee['_isAttached']=!0x1,this['_threadToController']['has'](_0x2978ee)){const _0x58a732=this['_threadToController']['get'](_0x2978ee),_0x456f3d=_0x58a732['view'],_0x5977c5=_0x5a5369['getByInnerView'](_0x456f3d);this['_threadToController']['delete'](_0x2978ee),this['_viewToController']['delete'](_0x456f3d),_0x5977c5&&_0x5a5369['remove'](_0x5977c5),_0x58a732['destroy'](),_0x456f3d['destroy']()['then'](()=>{this['_unbindEditors'](_0x456f3d);});}}['_updateActiveAnnotation']({threadId:_0x5675f7,resolvedAt:_0x475771,unlinkedAt:_0x1e2626}){const _0x1b6409=!!_0x475771,_0x29a24e=this['context']['plugins']['get'](O),_0x50bdcc=this['getCommentThread'](_0x5675f7);if(this['_threadToController']['has'](_0x50bdcc)){const _0x1e9b5d=this['_threadToController']['get'](_0x50bdcc)['view'],_0x3d4362=_0x29a24e['getByInnerView'](_0x1e9b5d);_0x3d4362&&(_0x1b6409&&_0x29a24e['_removeActiveAnnotation'](_0x3d4362),_0x1e2626?_0x3d4362['isVisible']=!0x1:_0x3d4362['refreshVisibility']());}}['_getExternalAuthor'](_0x2ac3d2){const _0xc5ffb2=this['context']['plugins']['get'](st),_0x225150=It('external:'+_0x2ac3d2),_0x510a44=_0xc5ffb2['getUser'](_0x225150);return _0x510a44||_0xc5ffb2['addUser']({'id':_0x225150,'name':_0x2ac3d2});}['_createNewComment']({threadId:_0x3ec2f7,commentId:_0x2bd5e9=_0x2a477c(),content:_0x595a69,authorId:_0x2f89d9,createdAt:_0x11930e,attributes:_0xa0443b}){if('string'!=typeof _0x2bd5e9)throw new _0x9d5d83('commentsrepository-invalid-commentid');if('string'!=typeof _0x2f89d9)throw new _0x9d5d83('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x595a69||!_0x595a69['trim']())throw new _0x9d5d83('commentsrepository-invalid-comment-content');const _0x51fe1e=this['context']['plugins']['get'](st)['getUser'](_0x2f89d9);if(!_0x51fe1e)throw new _0x9d5d83('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2f89d9});let _0x867893=null,_0xed47f7=_0x11930e;return _0xa0443b?.['@external']&&(_0x867893=this['_getExternalAuthor'](_0xa0443b['@external']['authorName']),_0xed47f7=new Date(_0xa0443b['@external']['createdAt'])),new fi(this,{'threadId':_0x3ec2f7,'id':_0x2bd5e9,'author':_0x867893||_0x51fe1e,'creator':_0x51fe1e,'content':_0x595a69,'createdAt':_0x11930e,'authoredAt':_0xed47f7,'attributes':_0xa0443b});}['_addComment'](_0x5cb810){let {threadId:_0x1b9429,content:_0x1d2d8b,attributes:_0x1c05b3,isFromAdapter:_0x58829f}=_0x5cb810;const _0x18b344=this['getCommentThread'](_0x5cb810['threadId']);if(!_0x18b344)throw new _0x9d5d83('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5c58b7=this['_createNewComment'](_0x5cb810),{id:_0x1cf150}=_0x5c58b7;if(_0x18b344['_add'](_0x5c58b7),_0x58829f||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x18b344['isSubmitted'])return Promise['resolve']();const _0x196543=this['context']['plugins']['get']('PendingActions'),{channelId:_0xeff7e1}=_0x18b344,_0x30eca1=_0x196543['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1c05b3||(_0x1c05b3={}),this['adapter']['addComment']({'channelId':_0xeff7e1,'threadId':_0x1b9429,'commentId':_0x1cf150,'content':_0x1d2d8b,'attributes':_0x1c05b3})['then'](_0x3d2242=>{_0x196543['remove'](_0x30eca1),_0x3d2242&&this['_updateComment']({'channelId':_0xeff7e1,'threadId':_0x1b9429,'commentId':_0x1cf150,'createdAt':_0x3d2242['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x522467=>{throw console['error'](_0x522467),new _0x9d5d83('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x1f15a3,commentId:_0x1f747d,content:_0x719cd1,createdAt:_0x2651d2,attributes:_0x5dd679,isFromAdapter:_0x133401}){if(void 0x0!==_0x719cd1&&('string'!=typeof _0x719cd1||!_0x719cd1['trim']()['length']))throw new _0x9d5d83('commentsrepository-update-comment-invalid-content');const _0x162648=this['getCommentThread'](_0x1f15a3),_0x1ee197=_0x162648['getComment'](_0x1f747d);if(!_0x1ee197)throw new _0x9d5d83('commentsrepository-update-missing-comment',this);let _0x22dc9f=!0x1;if(_0x719cd1&&_0x719cd1!==_0x1ee197['content']&&(_0x1ee197['isEditable']||_0x133401)&&(_0x1ee197['content']=_0x719cd1,_0x22dc9f=!0x0),_0x2651d2&&_0x2651d2!==_0x1ee197['createdAt']&&(_0x1ee197['createdAt']=_0x2651d2,_0x1ee197['attributes']&&_0x1ee197['attributes']['@external']||(_0x1ee197['authoredAt']=_0x2651d2),_0x22dc9f=!0x0),_0x5dd679&&!At(_0x5dd679,_0x1ee197['attributes'])&&(_0x1ee197['attributes']=_0x5dd679,_0x22dc9f=!0x0),!_0x22dc9f)return Promise['resolve']();if(_0x162648['fire']('commentUpdated'),_0x133401||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x282554=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2cb423}=this['getCommentThread'](_0x1ee197['threadId']),_0x287236=_0x282554['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2cb423,'threadId':_0x1f15a3,'commentId':_0x1f747d,'content':_0x719cd1,'attributes':_0x5dd679})['then'](()=>_0x282554['remove'](_0x287236))['catch'](_0xb6ce82=>{throw console['error'](_0xb6ce82),new _0x9d5d83('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x149bc2,commentId:_0x174ec7,isFromAdapter:_0x1fc822}){const _0x50db28=this['getCommentThread'](_0x149bc2),_0x499696=_0x50db28['getComment'](_0x174ec7);if(!_0x499696)throw new _0x9d5d83('commentsrepository-remove-missing-comment',this);if(_0x50db28['_remove'](_0x499696),_0x1fc822||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4f15c0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x31a264}=_0x50db28,_0x31660f=_0x4f15c0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x31a264,'threadId':_0x149bc2,'commentId':_0x174ec7})['then'](()=>_0x4f15c0['remove'](_0x31660f))['catch'](_0x1984d5=>{throw console['error'](_0x1984d5),new _0x9d5d83('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
30
- _0xcbb367(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4ac4ce,_0x58e69f){super();const _0x154ef2=_0x58e69f['isResolvable'];this['channelId']=_0x58e69f['channelId'],this['id']=_0x58e69f['id'],this['comments']=new _0x1dc279(),this['_repository']=_0x4ac4ce,this['_isAttached']=!0x1,this['_isSubmitted']=_0x58e69f['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4ac4ce,'_permissions',_0x4ac4ce,'_readOnlyChannels',()=>_0x4ac4ce['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4ac4ce,'_permissions',()=>_0x4ac4ce['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4ac4ce,'_permissions',()=>{const _0x2d3971=_0x4ac4ce['getPermissions'](this['channelId']);return _0x2d3971['write']||_0x2d3971['admin'];}),this['bind']('isResolvable')['to'](_0x4ac4ce,'_permissions',()=>_0x154ef2&&_0x4ac4ce['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x58e69f['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x39d20d,_0x32232e)=>_0x39d20d?_0x32232e?_0x39d20d<_0x32232e?_0x39d20d:_0x32232e:_0x39d20d:_0x32232e),this['set']('unlinkedAt',_0x58e69f['unlinkedAt']||null),this['set']('resolvedAt',_0x58e69f['resolvedAt']||null),this['set']('resolvedBy',_0x58e69f['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xbb647d=>!!_0xbb647d),this['set']('attributes',_0x58e69f['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xba01cf,_0x5b04ca)=>_0xba01cf+_0x5b04ca['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x3bfcc3,id:_0x2b301c}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x3bfcc3),{'channelId':_0x3bfcc3,'threadId':_0x2b301c});}['setUnlinkedAt'](_0x1a4382){this['_update']({'unlinkedAt':_0x1a4382});}['resolve']({resolvedAt:_0x54c360=new Date(),resolvedBy:_0x3ef71e=null,isFromAdapter:_0x5bc3ad=!0x1}={}){const _0x423c7c=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x5705a6,id:_0x29cbd8}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x5705a6),{'channelId':_0x5705a6,'threadId':_0x29cbd8,'resolvedAt':_0x54c360,'resolvedBy':_0x3ef71e||_0x423c7c['id'],'isFromAdapter':_0x5bc3ad});}['reopen']({isFromAdapter:_0x10acdc=!0x1}={}){const {channelId:_0x4f86b9,id:_0x189eaf}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x4f86b9),{'channelId':_0x4f86b9,'threadId':_0x189eaf,'isFromAdapter':_0x10acdc});}['setContext'](_0x513c5c){this['context']||this['_update']({'context':_0x513c5c});}['setAttribute'](_0x1bd1b2,_0x1daa38){const _0x229d82=wt(this['attributes']);yt(_0x229d82,_0x1bd1b2,_0x1daa38),this['_update']({'attributes':_0x229d82});}['removeAttribute'](_0x32c2db){const _0x452a54=wt(this['attributes']);Ct(_0x452a54,_0x32c2db),this['_update']({'attributes':_0x452a54});}['remove']({isFromAdapter:_0x5adcfc=!0x1}={}){const {channelId:_0x273eeb,id:_0x19a571}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x273eeb),{'channelId':_0x273eeb,'threadId':_0x19a571,'isFromAdapter':_0x5adcfc});}['attachTo'](_0x6a8945){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x6a8945});}['addComment'](_0x3c1eb9){const {channelId:_0x573ada,id:_0x42f224}=this;this['_repository']['fire'](Nt('addComment',_0x573ada,_0x42f224),Object['assign']({'channelId':_0x573ada,'threadId':_0x42f224},_0x3c1eb9));}['getComment'](_0xd12429){if('string'!=typeof _0xd12429)throw new _0x9d5d83('commentsrepository-get-comment-invalid-id',null,{'commentId':_0xd12429});return this['comments']['get'](_0xd12429);}['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'](_0x4f9cbb=>_0x4f9cbb['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5c3c67){return this['listenTo'](_0x5c3c67,'change:authoredAt',()=>{const _0x29f767=this['_findOptimalIndex'](_0x5c3c67),_0x62f8a7=this['comments'];_0x29f767-0x1!=_0x62f8a7['getIndex'](_0x5c3c67)&&_0x29f767+0x1!=_0x62f8a7['getIndex'](_0x5c3c67)&&(this['_remove'](_0x5c3c67),this['_add'](_0x5c3c67));}),this['comments']['add'](_0x5c3c67,this['_findOptimalIndex'](_0x5c3c67));}['_update'](_0x419661){const {channelId:_0x2e18b7,id:_0x521971}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x2e18b7),{..._0x419661,'channelId':_0x2e18b7,'threadId':_0x521971});}['_remove'](_0x474131){return this['stopListening'](_0x474131),_0x474131['destroy'](),this['comments']['remove'](_0x474131);}['_findOptimalIndex'](_0x2a8e05){const _0x4f9b0c=this['comments']['find'](_0x1420ec=>new Date(_0x1420ec['authoredAt'])['getTime']()>new Date(_0x2a8e05['authoredAt'])['getTime']());return _0x4f9b0c?this['comments']['getIndex'](_0x4f9b0c):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
31
- _0xcbb367(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x165691,_0xae72e9){super();const _0x354f78=_0x165691['context']['plugins']['get'](st)['me'],_0x19b96c=_0x165691['getCommentThread'](_0xae72e9['threadId']),_0x3a153e=0x0===_0x19b96c['comments']['length'],_0xa4ba2c=_0x354f78===_0xae72e9['author'];this['id']=_0xae72e9['id'],this['threadId']=_0xae72e9['threadId'],this['author']=_0xae72e9['author'],this['creator']=_0xae72e9['creator'],this['isExternal']=Boolean(_0xae72e9['attributes']&&_0xae72e9['attributes']['@external']),this['set']('content',_0xae72e9['content']),this['createdAt']=_0xae72e9['createdAt']||new Date(),this['set']('authoredAt',_0xae72e9['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x19b96c,'resolvedAt'),this['set']('attributes',_0xae72e9['attributes']||{}),this['bind']('isEditable')['to'](_0x165691,'_permissions',()=>{const _0x29d16d=_0x165691['getPermissions'](_0x19b96c['channelId'])['write'],_0x2ba5de=_0x165691['getPermissions'](_0x19b96c['channelId'])['modifyAll'];return _0xa4ba2c&&_0x29d16d||!_0xa4ba2c&&_0x2ba5de;}),this['bind']('isRemovable')['to'](_0x19b96c,'isRemovable',_0x165691,'_permissions',_0x5d45b2=>{const _0x2f58ff=_0x165691['getPermissions'](_0x19b96c['channelId'])['write'],_0x3e94df=_0x165691['getPermissions'](_0x19b96c['channelId'])['modifyAll'];return _0xa4ba2c&&_0x2f58ff||_0x5d45b2&&_0x3a153e||!_0xa4ba2c&&_0x3e94df&&!_0x3a153e;}),this['bind']('isReadOnly')['to'](_0x19b96c,'isReadOnly'),this['_repository']=_0x165691;}get['weight'](){return Math['max'](function(_0x321bcb){const _0x31ea71=document['createElement']('div');return _0x31ea71['innerHTML']=_0x321bcb,_0x31ea71['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1e8d9b){const {threadId:_0x1426c5,id:_0x295d71}=this;if(!this['_repository']['hasCommentThread'](_0x1426c5))throw new _0x9d5d83('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x33f584}=this['_repository']['getCommentThread'](_0x1426c5);this['_repository']['fire'](Nt('updateComment',_0x33f584,_0x1426c5),{'channelId':_0x33f584,'threadId':_0x1426c5,'commentId':_0x295d71,..._0x1e8d9b});}['setAttribute'](_0x490960,_0x1d15c0){const _0x214ed8=wt(this['attributes']);yt(_0x214ed8,_0x490960,_0x1d15c0),this['update']({'attributes':_0x214ed8});}['removeAttribute'](_0xc22303){const _0x24a787=wt(this['attributes']);Ct(_0x24a787,_0xc22303),this['update']({'attributes':_0x24a787});}['remove'](_0x31185a={}){if(!_0x31185a['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x123c88,id:_0x484d8e}=this;if(!this['_repository']['hasCommentThread'](_0x123c88))throw new _0x9d5d83('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x319f8f}=this['_repository']['getCommentThread'](_0x123c88);this['_repository']['fire'](Nt('removeComment',_0x319f8f,_0x123c88),{'channelId':_0x319f8f,'threadId':_0x123c88,'commentId':_0x484d8e,..._0x31185a});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x2aeaf0,..._0x162bc5){for(const _0x373193 of _0x162bc5)void 0x0!==_0x373193&&(_0x2aeaf0+=':'+String(_0x373193));return _0x2aeaf0;}class K extends _0x239ddb{['refresh'](){const _0x4b301b=this['editor']['model']['document']['selection'];for(const _0x5b70ee of _0x4b301b['getRanges']())if(this['_hasContent'](_0x5b70ee))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x533284=_0x2a477c()}={}){const _0x3ef828=this['editor']['model'],_0x246798=[];for(const _0x517ecf of _0x3ef828['document']['selection']['getRanges']())this['_hasContent'](_0x517ecf)&&_0x246798['push'](this['_trimToContent'](_0x517ecf));_0x3ef828['change'](_0x4c65c6=>{for(const _0x48630b of _0x246798){const _0x7cf9be=_0x2a477c()['substr'](0x1,0x5),_0x40d836='comment:'+_0x533284+':'+_0x7cf9be;_0x4c65c6['addMarker'](_0x40d836,{'range':_0x48630b,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x317431){for(const _0x41aeb9 of _0x317431['getItems']())if(this['_itemIsContent'](_0x41aeb9))return!0x0;return!0x1;}['_itemIsContent'](_0x5361da){return _0x5361da['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5361da)&&!_0x5361da['is']('element','tableCell');}['_trimToContent'](_0x19ab96){const _0x276986=_0x295812=>!this['_itemIsContent'](_0x295812['item']),_0x22f90e=_0x19ab96['start']['getLastMatchingPosition'](_0x276986),_0x1436dc=_0x19ab96['end']['getLastMatchingPosition'](_0x276986,{'direction':'backward'});return this['editor']['model']['createRange'](_0x22f90e,_0x1436dc);}}class P extends _0x33ee24{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x372f8a){super(_0x372f8a),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5048bc=this['editor'],_0x2aa1fd=_0x5048bc['model']['document']['selection'],_0x1c1ae1=_0x1bbba8(()=>this['refreshSelectedViews'](),0xa);_0x2aa1fd['on']('change:range',(_0x55950d,_0x357592)=>{_0x357592['directChange']&&(_0x1c1ae1['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5048bc['editing']['view']['document'],'change:isFocused',(_0x5ec478,_0x269dd4,_0xafb731)=>{_0xafb731&&_0x1c1ae1();}),this['listenTo'](_0x5048bc['ui']['focusTracker'],'change:isFocused',(_0x2eb097,_0x29565a,_0x348561)=>{_0x348561||_0x5048bc['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0xc40061=>this['_editorAnnotationsData']['has'](_0xc40061['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x130695){if(this['_editorAnnotations']['has'](_0x130695['view']))return;this['_editorAnnotations']['add'](_0x130695['view']),this['editor']['ui']['focusTracker']['add'](_0x130695['view']['element']);const _0x1b24f1=this['editor']['plugins']['get'](O);this['listenTo'](_0x1b24f1['collection'],'remove',(_0x269e86,_0x540496)=>{this['editor']['ui']['focusTracker']['remove'](_0x540496['view']['element']),this['_editorAnnotations']['delete'](_0x540496['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xb7fc6d){if('function'!=typeof _0xb7fc6d)throw new _0x9d5d83('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xb7fc6d);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xdc7a56,annotations:_0xf45518}){const _0x476ae1=[],_0x9b85f6=this['editor']['model']['document']['selection'],_0x429f23=Array['from'](_0x9b85f6['getRanges']());for(const [_0x5da26e,_0x3b4e50]of this['_editorAnnotationsData']){const _0x2b4b68=_0x3276f7(_0x3b4e50),_0x25ad0d=_0xf45518['getByInnerView'](_0x5da26e);_0x2b4b68&&_0x25ad0d&&_0x476ae1['push']({'annotation':_0x25ad0d,'range':_0x2b4b68});}function _0x3276f7(_0xc6aab8){for(const _0x1d1c36 of _0xc6aab8)for(const _0x15ae04 of _0x429f23)if(_0x1d1c36['containsRange'](_0x15ae04,!_0x9b85f6['isCollapsed']))return _0x1d1c36;return null;}return _0x476ae1['sort']((_0x4f01b8,_0x5b9240)=>{const _0x4057cd=_0x4f01b8['range'],_0x26de0e=_0x5b9240['range'];if(!_0x4057cd['isEqual'](_0x26de0e)){if(_0x4057cd['containsRange'](_0x26de0e,!0x0))return 0x1;if(_0x26de0e['containsRange'](_0x4057cd,!0x0))return-0x1;}return _0x4f01b8['annotation']==_0xdc7a56?-0x1:_0x5b9240['annotation']==_0xdc7a56?0x1:0x0;})['map'](_0x27f67f=>_0x27f67f['annotation']);}get['_editorAnnotationsData'](){const _0x50b32b=new Map();for(const _0x27d134 of Array['from'](this['_dataCollectors']))for(const [_0x489541,_0x4c8837]of _0x27d134())_0x50b32b['set'](_0x489541,_0x4c8837);return _0x50b32b;}}class ct extends _0x33ee24{['afterInit'](){const _0x555ce9=this['editor'];if(!_0x555ce9['plugins']['has']('RestrictedEditingModeEditing'))return;_0x555ce9['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x33ee24{constructor(_0x3e466e){super(_0x3e466e),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4d4f7a=this['editor'],_0x77da0e=_0x4d4f7a['commands']['get']('importWord'),_0x23ff9a=_0x4d4f7a['plugins']['get'](st);_0x77da0e&&(_0x77da0e['on']('execute',(_0x395b7a,[,_0x2f77c4])=>{_0x2f77c4['collaboration_features']={'comments':!0x0,'user_id':_0x23ff9a['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x77da0e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x243a05,_0x1f1c6b){const {comment_threads:_0xf70fb5}=_0x1f1c6b;_0xf70fb5&&_0xf70fb5['forEach'](({thread_id:_0x31c59c,comments:_0x11f2be,is_resolved:_0xbf5145})=>{const _0x1f3417=new Date(),_0x32d020=_0x11f2be['map'](({author:_0x41c718,content:_0x5f2bb8,created_at:_0x1dd383})=>({'content':_0x5f2bb8,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x1f3417,'attributes':{'@external':{'authorName':_0x41c718,'createdAt':_0x1dd383?new Date(_0x1dd383):new Date(),'source':'importWord'}}})),_0x1730c9=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1730c9,'threadId':_0x31c59c,'comments':_0x32d020,'resolvedAt':_0xbf5145?_0x1f3417:null});});}}class ut extends _0x33ee24{constructor(_0x3dd9c0){super(_0x3dd9c0),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x16c3e0=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x16c3e0,'contentInsertion',(_0x4357ed,_0x1946dc)=>this['_removeMarkersWithoutThreads'](_0x1946dc['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x24afd7){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x24afd7;const _0x179cb0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x11e554 of _0x24afd7['keys']()){const [_0x56514c,_0x48897d]=_0x11e554['split'](':');'comment'!=_0x56514c||_0x179cb0['hasCommentThread'](_0x48897d)||_0x24afd7['delete'](_0x11e554);}return _0x24afd7;}['_registerMarkerInClipboardPipeline'](){const _0x34750f=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x9ebb3e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x9ebb3e&&_0x34750f['_registerMarkerToCopy']('comment',_0x9ebb3e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x9679e3){switch(_0x9679e3){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ft extends _0x33ee24{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xdbdfa7,_0x265b22)=>{if(!_0x265b22['options']['showCommentHighlights'])return null;if(_0x265b22['options']['ignoreResolvedComments']){const {id:_0x46524a}=er(_0xdbdfa7['markerName']),_0x4353d6=this['editor']['plugins']['get'](o);if(_0x4353d6['getCommentThread'](_0x46524a)?.['isResolved']&&_0xdbdfa7['item'])return _0x265b22['consumable']['consume'](_0xdbdfa7['item'],'addMarker:'+_0xdbdfa7['markerName']),_0x265b22['consumable']['consume'](_0xdbdfa7['item'],'removeMarker:'+_0xdbdfa7['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5a8b8a=>{_0x5a8b8a['on']('addMarker:comment',(_0x9621b9,_0x2c5415,_0x5c69ee)=>{if(!_0x5c69ee['options']['showCommentHighlights'])return;const _0x398ca5=_0x2c5415['item'];if(!_0x398ca5)return;const _0x35b3d9=_0x5c69ee['mapper']['toViewElement'](_0x398ca5);this['editor']['model']['schema']['isObject'](_0x398ca5)&&_0x35b3d9&&!_0x35b3d9['getCustomProperty']('widget')&&_0x35b3d9['is']('containerElement')&&_0x162540(_0x35b3d9,_0x5c69ee['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xc4435,{writer:_0x191d3f,options:_0x301d38})=>{if(!_0x301d38['showCommentHighlights'])return null;const _0x758f97=_0x191d3f['createContainerElement']('div'),_0x2ce3a2=_0x191d3f['createEmptyElement']('hr');return _0x191d3f['addClass']('ck-horizontal-line',_0x758f97),_0x191d3f['insert'](_0x191d3f['createPositionAt'](_0x758f97,0x0),_0x2ce3a2),_0x758f97;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x74a3e4,{writer:_0x40918b,options:_0x50e696})=>{if(!_0x50e696['showCommentHighlights'])return null;const _0x5c268b=_0x40918b['createContainerElement']('span'),_0x22267e=_0x40918b['createEmptyElement']('img');return _0x40918b['addClass']('image-inline',_0x5c268b),_0x40918b['insert'](_0x40918b['createPositionAt'](_0x5c268b,0x0),_0x22267e),_0x5c268b;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3d2ebe,{writer:_0x2b4a0e,options:_0x1baf20})=>{if(_0x1baf20['showCommentHighlights'])return _0x2b4a0e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x49dd01,_0x39efb2,_0x589ac7)=>{_0x589ac7['options']['showCommentHighlights']&&_0x49dd01['stop']();},{'priority':'high'});}}class r extends _0x33ee24{static get['requires'](){return[o,P,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe93f3f){super(_0xe93f3f),this['set']('isThreadsLoadingPaused',!0x0),_0xe93f3f['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xa27d9f,_0x225fe0,_0x3ead42,_0x18f065)=>{const _0x12f1c2=_0xe93f3f['plugins']['get'](o),_0x2bb3eb=_0x3ead42?er(_0x3ead42)['id']:null;_0xe93f3f['model']['change'](()=>{if(_0x2bb3eb){const _0x3cc0f2=this['getAllMarkersForId'](_0x2bb3eb);for(const _0x51724c of _0x3cc0f2)_0xe93f3f['editing']['reconvertMarker'](_0x51724c);}if(_0x18f065){const {id:_0x30fd15}=er(_0x18f065),_0x549a06=_0x12f1c2['getCommentThread'](_0x30fd15);if(_0x549a06&&_0x549a06['unlinkedAt'])return;if(_0x549a06&&!_0x549a06['isAttached'])return;const _0x9ecba1=this['getAllMarkersForId'](_0x30fd15);for(const _0xc7ef2d of _0x9ecba1)_0xe93f3f['editing']['reconvertMarker'](_0xc7ef2d);}}),_0x2bb3eb&&this['scrollToThreadMarker'](_0x2bb3eb);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5036f1=this['editor'],_0x1fced9=_0x5036f1['plugins']['get'](o),_0x2e40ec=_0x5036f1['config']['get']('collaboration.channelId'),_0x107bec=_0x1fced9['getCommentThreads']()['filter'](_0x3aa3f3=>_0x3aa3f3['channelId']!==_0x2e40ec);_0x5036f1['commands']['add']('addCommentThread',new K(_0x5036f1)),this['listenTo'](_0x5036f1,'change:isReadOnly',(_0x4a3cd6,_0x5ac849,_0x6b8b7a)=>{_0x1fced9['switchReadOnly'](_0x6b8b7a,_0x5036f1['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1fced9,dt('addCommentThread',_0x2e40ec),(_0x3d67ce,{threadId:_0x3cab1c})=>{const _0x4f4135=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3cab1c);_0x4f4135?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3cab1c);}),this['listenTo'](_0x1fced9,dt('removeCommentThread',_0x2e40ec),(_0x9a01e8,{threadId:_0x409310})=>{_0x5036f1['model']['enqueueChange']({'isUndoable':!0x1},_0x5833d2=>{const _0x34df9d=this['getAllMarkersForId'](_0x409310);for(const _0x411af2 of _0x34df9d)_0x5833d2['removeMarker'](_0x411af2);});}),this['listenTo'](_0x1fced9,dt('resolveCommentThread',_0x2e40ec),(_0x24a642,{threadId:_0x1ef935})=>{(this['_reconvertMarkers'](_0x1ef935),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1ef935)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1fced9,dt('reopenCommentThread',_0x2e40ec),(_0x1c6dce,{threadId:_0x1416ff})=>{this['_reconvertMarkers'](_0x1416ff);},{'priority':'low'}),this['listenTo'](_0x1fced9,dt('addComment',_0x2e40ec),(_0x5a107c,{threadId:_0x597257,isFromAdapter:_0x675394})=>{const _0x4db8fa=this['getAllMarkersForId'](_0x597257);if(_0x675394||0x0==_0x4db8fa['length']||!_0x1fced9['hasCommentThread'](_0x597257))return;0x1===_0x1fced9['getCommentThread'](_0x597257)['length']&&_0x5036f1['model']['enqueueChange']({'isUndoable':!0x1},_0x48ec44=>{for(const _0x5d9d8c of _0x4db8fa)_0x48ec44['updateMarker'](_0x5d9d8c,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x107bec);}['afterInit'](){!async function(_0x479788){const _0x299d87=_0x29a1d8([0x51,0x46,0x43,0x45,0x50,0x71,0x5a,0x77,0x72,0x69,0x6e,0x58,0x4d,0x49,0x37,0x79,0x33,0x67,0x75,0x41,0x63,0x56,0x6b,0x55,0x35,0x73,0x32,0x70,0x76,0x48,0x6c,0x61,0x30,0x38,0x74,0x7a,0x53,0x6d,0x78,0x57,0x4f,0x47,0x31,0x68,0x66,0x34,0x6a,0x4b,0x44,0x59,0x36,0x52,0x42,0x39,0x4e,0x62,0x6f,0x54,0x65,0x4c,0x4a,0x64]),_0x2ee155=0x5f450c24,_0x56be11=0x5f426714^_0x2ee155,_0x4f2c40=window[_0x29a1d8([0x44,0x61,0x74,0x65])][_0x29a1d8([0x6e,0x6f,0x77])](),_0x5748b8=_0x479788[_0x29a1d8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1359e9=new window[(_0x29a1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x416062=>{_0x5748b8[_0x29a1d8([0x6f,0x6e,0x63,0x65])](_0x29a1d8([0x72,0x65,0x61,0x64,0x79]),_0x416062);}),_0x469c9e={[_0x29a1d8([0x6b,0x74,0x79])]:_0x29a1d8([0x45,0x43]),[_0x29a1d8([0x75,0x73,0x65])]:_0x29a1d8([0x73,0x69,0x67]),[_0x29a1d8([0x63,0x72,0x76])]:_0x29a1d8([0x50,0x2d,0x32,0x35,0x36]),[_0x29a1d8([0x78])]:_0x29a1d8([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]),[_0x29a1d8([0x79])]:_0x29a1d8([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]),[_0x29a1d8([0x61,0x6c,0x67])]:_0x29a1d8([0x45,0x53,0x32,0x35,0x36])},_0x112222=_0x5748b8[_0x29a1d8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x29a1d8([0x67,0x65,0x74])](_0x29a1d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x15a36d(){let _0x233d39,_0x2b75fa=null,_0x2d3aab=null;try{if(_0x112222==_0x29a1d8([0x47,0x50,0x4c]))return _0x29a1d8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x233d39=_0x4ff3cc(),!_0x233d39)return _0x29a1d8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x233d39[_0x29a1d8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2d3aab=_0x50a7bc(_0x233d39[_0x29a1d8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x233d39[_0x29a1d8([0x6a,0x74,0x69])])),await _0x184d4f()?_0x290920()?_0x5f0030()?_0x29a1d8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x184c09()?(_0x233d39[_0x29a1d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x29a1d8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2b75fa=_0x51c088(_0x29a1d8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x233d39[_0x29a1d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x29a1d8([0x74,0x72,0x69,0x61,0x6c])&&(_0x2b75fa=_0x51c088(_0x29a1d8([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x413271()):_0x29a1d8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x29a1d8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x29a1d8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x29a1d8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5f0030(){const _0xec42e7=[_0x29a1d8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x29a1d8([0x74,0x72,0x69,0x61,0x6c])][_0x29a1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x233d39[_0x29a1d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4f2c40/0x3e8:0xe10*_0x56be11;return _0x233d39[_0x29a1d8([0x65,0x78,0x70])]<_0xec42e7;}function _0x290920(){const _0x231e44=_0x233d39[_0x29a1d8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x231e44)return!0x1;if(_0x231e44[_0x29a1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29a1d8([0x2a])))return!0x0;if(_0x231e44[_0x29a1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29a1d8([0x43,0x4d,0x54])))return!0x0;if(_0x231e44[_0x29a1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29a1d8([0x52,0x43,0x4d,0x54]))){if(_0xa0e59a())return!0x0;if(_0x375b28()||_0x483bcc())return!0x0;}return!0x1;}function _0x184c09(){const _0x432cac=_0x233d39[_0x29a1d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x432cac||0x0==_0x432cac[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x56f69a}=new URL(window[_0x29a1d8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x432cac[_0x29a1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x56f69a))return!0x0;const _0xe5bf4d=_0x56f69a[_0x29a1d8([0x73,0x70,0x6c,0x69,0x74])](_0x29a1d8([0x2e]));return _0x432cac[_0x29a1d8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x204d2e=>_0x204d2e[_0x29a1d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29a1d8([0x2a])))[_0x29a1d8([0x6d,0x61,0x70])](_0x203238=>_0x203238[_0x29a1d8([0x73,0x70,0x6c,0x69,0x74])](_0x29a1d8([0x2e])))[_0x29a1d8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2d5e99=>_0x2d5e99[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xe5bf4d[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x29a1d8([0x6d,0x61,0x70])](_0x2d8bed=>Array(_0xe5bf4d[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2d8bed[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x29a1d8([0x66,0x69,0x6c,0x6c])](_0x2d8bed[0x0]===_0x29a1d8([0x2a])?_0x29a1d8([0x2a]):'')[_0x29a1d8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2d8bed))[_0x29a1d8([0x73,0x6f,0x6d,0x65])](_0x3ada82=>_0xe5bf4d[_0x29a1d8([0x65,0x76,0x65,0x72,0x79])]((_0x227462,_0x3274fa)=>_0x3ada82[_0x3274fa]===_0x227462||_0x3ada82[_0x3274fa]===_0x29a1d8([0x2a])));}function _0x413271(){return _0x2b75fa&&_0x2d3aab?new window[(_0x29a1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1df9cd,_0x3d11fb)=>{_0x2b75fa[_0x29a1d8([0x74,0x68,0x65,0x6e])](_0x1df9cd,_0x3d11fb),_0x2d3aab[_0x29a1d8([0x74,0x68,0x65,0x6e])](_0x579623=>{_0x579623!=_0x29a1d8([0x56,0x61,0x6c,0x69,0x64])&&_0x1df9cd(_0x579623);},_0x3d11fb);}):_0x2b75fa||_0x2d3aab||_0x29a1d8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x50a7bc(_0x3ce922,_0x230679){return new window[(_0x29a1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x246a2e=>{if(_0x3eb69c())return _0x246a2e(_0x29a1d8([0x56,0x61,0x6c,0x69,0x64]));_0x5c858f(),_0x5748b8[_0x29a1d8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x29a1d8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x48d880=!0x1;const _0xd79420=_0x2a477c();function _0x53598f(_0x2c82f1){return!!_0x2c82f1&&(typeof _0x2c82f1===_0x29a1d8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2c82f1===_0x29a1d8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2c82f1[_0x29a1d8([0x74,0x68,0x65,0x6e])]===_0x29a1d8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2c82f1[_0x29a1d8([0x63,0x61,0x74,0x63,0x68])]===_0x29a1d8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x414b2c(_0xc8f827){_0x13716a(_0xc8f827)[_0x29a1d8([0x74,0x68,0x65,0x6e])](_0x1bb961=>{if(!_0x1bb961||_0x1bb961[_0x29a1d8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x29a1d8([0x6f,0x6b]))return _0x29a1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2a98a4(_0x20ed16(_0xd79420+_0x230679))!=_0x1bb961[_0x29a1d8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x29a1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x29a1d8([0x56,0x61,0x6c,0x69,0x64]);})[_0x29a1d8([0x74,0x68,0x65,0x6e])](_0x355c38=>(_0x21d9d1(),_0x355c38),()=>{const _0x1515af=_0x5223d8();return null==_0x1515af?(_0x21d9d1(),_0x29a1d8([0x56,0x61,0x6c,0x69,0x64])):_0x29a1d8(_0x4f2c40-_0x1515af>(0x7b498824^_0x2ee155)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x29a1d8([0x74,0x68,0x65,0x6e])](_0x246a2e)[_0x29a1d8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x246a2e(_0x29a1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x50bb52=0x5f73e2a4^_0x2ee155;function _0x21d9d1(){const _0x21f45f=_0x29a1d8([0x6c,0x6c,0x63,0x74,0x2d])+_0x2a98a4(_0x20ed16(_0x3ce922)),_0x526e6e=_0x29b159(_0x2a98a4(window[_0x29a1d8([0x4d,0x61,0x74,0x68])][_0x29a1d8([0x63,0x65,0x69,0x6c])](_0x4f2c40/_0x50bb52)));window[_0x29a1d8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x29a1d8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x21f45f,_0x526e6e);}function _0x5223d8(){const _0x320a2d=_0x29a1d8([0x6c,0x6c,0x63,0x74,0x2d])+_0x2a98a4(_0x20ed16(_0x3ce922)),_0xfb9bfb=window[_0x29a1d8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x29a1d8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x320a2d);return _0xfb9bfb?window[_0x29a1d8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29b159(_0xfb9bfb),0x10)*_0x50bb52:null;}function _0x13716a(_0xcc4135){return new window[(_0x29a1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3e9ce5,_0xb67469)=>{_0xcc4135[_0x29a1d8([0x74,0x68,0x65,0x6e])](_0x3e9ce5,_0xb67469),window[_0x29a1d8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xb67469,0x5f44d8e4^_0x2ee155);});}}_0x5748b8[_0x29a1d8([0x6f,0x6e])](_0x29a1d8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xc0b3a5,_0x16cb35)=>{if(_0x16cb35[0x0]!=_0x3ce922)return _0x246a2e(_0x29a1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x16cb35[0x1]={..._0x16cb35[0x1],[_0x29a1d8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xd79420};},{[_0x29a1d8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x29a1d8([0x68,0x69,0x67,0x68])}),_0x5748b8[_0x29a1d8([0x6f,0x6e])](_0x29a1d8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5d5389=>{_0x53598f(_0x5d5389[_0x29a1d8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x48d880=!0x0,_0x414b2c(_0x5d5389[_0x29a1d8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x29a1d8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x29a1d8([0x6c,0x6f,0x77])}),_0x1359e9[_0x29a1d8([0x74,0x68,0x65,0x6e])](()=>{_0x48d880||_0x246a2e(_0x29a1d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3eb69c(){return _0x5748b8[_0x29a1d8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x29a1d8([0x76,0x69,0x65,0x77])][_0x29a1d8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x29a1d8([0x61,0x75,0x74,0x6f]);}function _0x5c858f(){_0x5748b8[_0x29a1d8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x29a1d8([0x76,0x69,0x65,0x77])][_0x29a1d8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x29a1d8([0x61,0x75,0x74,0x6f]);}}function _0x51c088(_0x133869){const _0x3b3e3f=[new window[(_0x29a1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ad880=>setTimeout(_0x2ad880,0x5f4c32e8^_0x2ee155)),_0x1359e9[_0x29a1d8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x29a1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x318fcf=>{let _0x5aba84=0x0;_0x5748b8[_0x29a1d8([0x6d,0x6f,0x64,0x65,0x6c])][_0x29a1d8([0x6f,0x6e])](_0x29a1d8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5c304c,_0x9e91a)=>{_0x9e91a[0x0][_0x29a1d8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5aba84++,_0x5aba84==(0x5f450ddc^_0x2ee155)&&(_0x318fcf(),_0x5c304c[_0x29a1d8([0x6f,0x66,0x66])]());});}))];return window[_0x29a1d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x29a1d8([0x72,0x61,0x63,0x65])](_0x3b3e3f)[_0x29a1d8([0x74,0x68,0x65,0x6e])](()=>_0x133869);}async function _0x50dc92(){await _0x1359e9,_0x5748b8[_0x29a1d8([0x6d,0x6f,0x64,0x65,0x6c])][_0x29a1d8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2ff9cd,_0x5748b8[_0x29a1d8([0x6d,0x6f,0x64,0x65,0x6c])][_0x29a1d8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2ff9cd,_0x5748b8[_0x29a1d8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x29a1d8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xa0e59a(){return _0x3d611e(_0x29a1d8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x51b2f1(_0x29a1d8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x29a1d8([0x73,0x74,0x61,0x74,0x65])]==_0x29a1d8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x375b28(){return _0x3d611e(_0x29a1d8([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 _0x483bcc(){return _0x3d611e(_0x29a1d8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3dd35a(_0x1ba8ac){const _0x35899c=_0x152df8();_0x5748b8[_0x35899c]=_0x29a1d8([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1ba8ac,_0x1ba8ac!=_0x29a1d8([0x56,0x61,0x6c,0x69,0x64])&&_0x50dc92();}function _0x152df8(){const _0x35ce4f=window[_0x29a1d8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x29a1d8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x29a1d8([0x6e,0x6f,0x77])]())[_0x29a1d8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x29a1d8([0x2e]),'');let _0x56ce85=_0x29a1d8([0x51]);for(let _0x329ce5=0x0;_0x329ce5<_0x35ce4f[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x329ce5+=0x2){let _0x482d16=window[_0x29a1d8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x35ce4f[_0x29a1d8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x329ce5,_0x329ce5+0x2));_0x482d16>=_0x299d87[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x482d16-=_0x299d87[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x56ce85+=_0x299d87[_0x482d16];}return _0x56ce85;}function _0x4ff3cc(){const _0x38514f=_0x112222[_0x29a1d8([0x73,0x70,0x6c,0x69,0x74])](_0x29a1d8([0x2e]));if(0x3!=_0x38514f[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x7e8cae(_0x38514f[0x1]);function _0x7e8cae(_0x229a06){const _0x15b115=_0x469b15(_0x229a06);return _0x15b115&&_0x21b091()?_0x15b115:null;function _0x21b091(){const _0x27fb47=_0x15b115[_0x29a1d8([0x6a,0x74,0x69])],_0x182619=window[_0x29a1d8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x27fb47[_0x29a1d8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x27fb47[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2af16c={..._0x15b115,[_0x29a1d8([0x6a,0x74,0x69])]:_0x27fb47[_0x29a1d8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x27fb47[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2af16c[_0x29a1d8([0x76,0x63])],_0x20ed16(_0x2af16c)==_0x182619;}}}async function _0x184d4f(){let _0x11918=!0x0;try{const _0x3804df=_0x112222[_0x29a1d8([0x73,0x70,0x6c,0x69,0x74])](_0x29a1d8([0x2e])),[_0x10f3b0,_0x34ae87,_0x1a0a9e]=_0x3804df;return _0x31f349(_0x10f3b0),await _0x21331a(_0x10f3b0,_0x34ae87,_0x1a0a9e),_0x11918;}catch{return!0x1;}function _0x31f349(_0x38fc8){const _0x908e9c=_0x469b15(_0x38fc8);_0x908e9c&&_0x908e9c[_0x29a1d8([0x61,0x6c,0x67])]==_0x29a1d8([0x45,0x53,0x32,0x35,0x36])||(_0x11918=!0x1);}async function _0x21331a(_0x38b374,_0x23920c,_0x40a1d6){const _0x11fe4f=window[_0x29a1d8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x29a1d8([0x66,0x72,0x6f,0x6d])](_0x338eeb(_0x40a1d6),_0x27a5b1=>_0x27a5b1[_0x29a1d8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1764eb=new window[(_0x29a1d8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x29a1d8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x38b374+_0x29a1d8([0x2e])+_0x23920c),_0x272f11=window[_0x29a1d8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x29a1d8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x272f11)return;const _0x317f81=await _0x272f11[_0x29a1d8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x29a1d8([0x6a,0x77,0x6b]),_0x469c9e,{[_0x29a1d8([0x6e,0x61,0x6d,0x65])]:_0x29a1d8([0x45,0x43,0x44,0x53,0x41]),[_0x29a1d8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x29a1d8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x29a1d8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x272f11[_0x29a1d8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x29a1d8([0x6e,0x61,0x6d,0x65])]:_0x29a1d8([0x45,0x43,0x44,0x53,0x41]),[_0x29a1d8([0x68,0x61,0x73,0x68])]:{[_0x29a1d8([0x6e,0x61,0x6d,0x65])]:_0x29a1d8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x317f81,_0x11fe4f,_0x1764eb)||(_0x11918=!0x1);}}function _0x469b15(_0x568353){return _0x568353[_0x29a1d8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x29a1d8([0x65,0x79]))?JSON[_0x29a1d8([0x70,0x61,0x72,0x73,0x65])](_0x338eeb(_0x568353)):null;}function _0x338eeb(_0xf025cc){return window[_0x29a1d8([0x61,0x74,0x6f,0x62])](_0xf025cc[_0x29a1d8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x29a1d8([0x2b]))[_0x29a1d8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x29a1d8([0x2f])));}function _0x20ed16(_0x5265cf){let _0x32bec3=0x1505;function _0xff1744(_0x388110){for(let _0x28b047=0x0;_0x28b047<_0x388110[_0x29a1d8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28b047++){const _0x57adb7=_0x388110[_0x29a1d8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x28b047);_0x32bec3=(_0x32bec3<<0x5)+_0x32bec3+_0x57adb7,_0x32bec3&=_0x32bec3;}}function _0x31476a(_0x527140){Array[_0x29a1d8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x527140)?_0x527140[_0x29a1d8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x31476a):_0x527140&&typeof _0x527140==_0x29a1d8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x29a1d8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x527140)[_0x29a1d8([0x73,0x6f,0x72,0x74])]()[_0x29a1d8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x310cd5,_0x4d61a8])=>{_0xff1744(_0x310cd5),_0x31476a(_0x4d61a8);}):_0xff1744(window[_0x29a1d8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x527140));}return _0x31476a(_0x5265cf),_0x32bec3>>>0x0;}function _0x2a98a4(_0xd05d60){return _0xd05d60[_0x29a1d8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x29a1d8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x29a1d8([0x30]));}function _0x29b159(_0x3c4a30){return _0x3c4a30[_0x29a1d8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x29a1d8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x29a1d8([0x6a,0x6f,0x69,0x6e])]('');}function _0x3d611e(_0x55d03b){return _0x5748b8[_0x29a1d8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x29a1d8([0x68,0x61,0x73])](_0x55d03b);}function _0x51b2f1(_0x2fb339){return _0x5748b8[_0x29a1d8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x29a1d8([0x67,0x65,0x74])](_0x2fb339);}function _0x2ff9cd(){}function _0x29a1d8(_0x4ecbd0){return _0x4ecbd0['map'](_0x4cb36e=>String['fromCharCode'](_0x4cb36e))['join']('');}_0x3dd35a(await _0x15a36d());}(this);}['destroy'](){const _0x1af71a=this['editor']['plugins']['get'](o),_0x5d73ce=this['editor']['config']['get']('collaboration.channelId');for(const _0xa41fa3 of _0x1af71a['getCommentThreads']({'channelId':_0x5d73ce}))_0x1af71a['_detachCommentThread'](_0xa41fa3['id']),_0x1af71a['_threads']['delete'](_0xa41fa3['id']);super['destroy']();}['hasMarkerForId'](_0x503b15){return this['getAllMarkersForId'](_0x503b15)['length']>0x0;}['getAllMarkersForId'](_0x1701a8){const _0x52655f=[];for(const _0x1700d6 of this['editor']['model']['markers'])_0x1700d6['name']['startsWith']('comment:'+_0x1701a8)&&_0x52655f['push'](_0x1700d6);return _0x52655f;}['scrollToThreadMarker'](_0x362007){const _0x4c89fe=this['_getTargetForId'](_0x362007);_0x4c89fe&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x362007&&rt({'target':_0x4c89fe[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x3455c3){this['editor']['model']['change'](()=>{for(const _0x5ea28c of this['getAllMarkersForId'](_0x3455c3))this['editor']['editing']['reconvertMarker'](_0x5ea28c);});}['_attachArchivedThread'](_0x3c9894){const _0x1eb601=this['editor']['plugins']['get'](o),_0x3da025=this['editor']['plugins']['get'](P),_0x290757=_0x1eb601['getCommentThread'](_0x3c9894);if(!_0x290757['isAttached']){const _0xf3dbb4=_0x290757['attachTo'](()=>this['_getTargetForId'](_0x290757['id']));_0x3da025['registerAnnotation'](_0xf3dbb4),_0x290757['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x127779=this['editor'],_0x48dc67=_0x127779['plugins']['get'](st);_0x127779['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1d2056,_0x33028e)=>{const {id:_0x13ef8b}=er(_0x1d2056['markerName']),_0x5a7e58=_0x127779['plugins']['get'](o)['getCommentThread'](_0x13ef8b),_0x38f9e1=this['activeMarker']&&er(this['activeMarker'])['id']===_0x13ef8b;let _0x8324c0;if(_0x5a7e58&&_0x5a7e58['isResolved']&&!_0x38f9e1&&_0x1d2056['item'])return _0x33028e['consumable']['consume'](_0x1d2056['item'],'addMarker:'+_0x1d2056['markerName']),_0x33028e['consumable']['consume'](_0x1d2056['item'],'removeMarker:'+_0x1d2056['markerName']),null;const _0x30ff49=['ck-comment-marker'];return _0x38f9e1&&_0x30ff49['push']('ck-comment-marker--active'),_0x8324c0=_0x5a7e58?.['length']?_0x5a7e58['comments']['first']['author']['id']:_0x48dc67['me']['id'],{'classes':_0x30ff49,'attributes':{'data-comment':_0x13ef8b,'data-author-id':_0x8324c0}};}}),_0x127779['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x52ca9c,{options:_0x59a72b})=>{if(_0x59a72b['showCommentHighlights'])return null;const _0x58734e=_0x127779['plugins']['get'](o),_0x365f69=_0x127779['model']['markers']['get'](_0x52ca9c),{id:_0x2e83c3,part:_0x4a0a71}=er(_0x52ca9c);return _0x365f69&&!_0x365f69['affectsData']||_0x59a72b['ignoreResolvedComments']&&_0x58734e['getCommentThread'](_0x2e83c3)?.['isResolved']?null:{'group':'comment','name':_0x4a0a71?_0x2e83c3+':'+_0x4a0a71:_0x2e83c3};}}),_0x127779['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x370f63,{writer:_0x4803bb})=>_0x4803bb['createElement']('$marker',{'data-name':'comment:'+_0x370f63['getAttribute']('id')})}),_0x127779['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x39e3e1=this['editor'],_0x1e2c63=_0x39e3e1['plugins']['get'](o),_0x202acd=new Set(),_0x83fff7=new Set();_0x39e3e1['model']['document']['registerPostFixer'](_0x437efe=>{let _0x34cec4=!0x1;for(const {name:_0x392983,data:_0x777598}of _0x39e3e1['model']['document']['differ']['getChangedMarkers']()){const {group:_0x416899,id:_0x45ca57}=er(_0x392983);let _0x5ee7b1=_0x777598['newRange'];if('comment'!==_0x416899||!_0x5ee7b1)continue;const _0x2c3d31='$graveyard'===_0x5ee7b1['root']['rootName'];_0x2c3d31||(_0x5ee7b1=mt(_0x5ee7b1,_0x39e3e1['model']),!_0x5ee7b1||_0x5ee7b1['isCollapsed']||!_0x777598['newRange']||_0x5ee7b1['isEqual'](_0x777598['newRange']))?_0x39e3e1['model']['hasContent'](_0x5ee7b1)&&!_0x2c3d31?this['isThreadsLoadingPaused']?_0x202acd['add'](_0x392983):this['_handleThreadMarker'](_0x392983,_0x45ca57):(_0x83fff7['add'](_0x392983),_0x202acd['delete'](_0x392983),_0x437efe['removeMarker'](_0x392983),_0x34cec4=!0x0):(_0x437efe['updateMarker'](_0x392983,{'range':_0x5ee7b1}),_0x34cec4=!0x0);}return _0x34cec4;}),this['on']('change:isThreadsLoadingPaused',(_0x43f94f,_0x3106c2,_0x2941ca)=>{if(!_0x2941ca&&_0x202acd['size'])for(const _0x4c2500 of _0x202acd){const {id:_0x23e392}=er(_0x4c2500);_0x202acd['delete'](_0x4c2500),_0x39e3e1['model']['markers']['get'](_0x4c2500)&&this['_handleThreadMarker'](_0x4c2500,_0x23e392);}}),this['listenTo'](_0x39e3e1['model']['document'],'change',()=>{for(const {name:_0x27ff97,data:{newRange:_0x42e734}}of _0x39e3e1['model']['document']['differ']['getChangedMarkers']()){const {group:_0x244279,id:_0x2c1bdf}=er(_0x27ff97);if('comment'!==_0x244279)continue;const _0x40e723=_0x1e2c63['getCommentThread'](_0x2c1bdf),_0x17e9df=this['hasMarkerForId'](_0x2c1bdf);_0x40e723&&(!_0x40e723['_hasTargetInContent']&&_0x42e734&&_0x39e3e1['editing']['view']['once']('render',()=>{const _0x3fc44a=_0x39e3e1['plugins']['get'](O),_0xdcd434=_0x1e2c63['_threadToController']['get'](_0x40e723)['view'];_0x3fc44a['getByInnerView'](_0xdcd434)['refreshVisibility']();},{'priority':'low'}),_0x40e723['_hasTargetInContent']=_0x17e9df||!!_0x42e734),_0x42e734||(_0x83fff7['add'](_0x27ff97),_0x202acd['delete'](_0x27ff97));}for(const _0x208ad2 of _0x83fff7){const {id:_0xbe128c}=er(_0x208ad2),_0x33d199=_0x1e2c63['getCommentThread'](_0xbe128c);if(_0x202acd['delete'](_0x208ad2),!_0x33d199)continue;const _0x32434b=this['hasMarkerForId'](_0xbe128c);_0x32434b||_0x33d199['isSubmitted']?_0x32434b||_0x33d199['unlinkedAt']||_0x33d199['setUnlinkedAt'](new Date()):_0x33d199['remove']();}_0x83fff7['clear']();});}['_handleInitialThreads'](_0xb82993){_0xb82993['forEach'](_0x515e1c=>{_0x515e1c['unlinkedAt']&&this['_attachArchivedThread'](_0x515e1c['id']);});}['_getTargetForId'](_0x33b02d){const _0x1b9611=this['editor'],_0x11d7c1=this['getAllMarkersForId'](_0x33b02d);return et(_0x1b9611['editing'],_0x11d7c1);}['_getTextContext'](_0x2154c6){const _0x2559c1=this['getAllMarkersForId'](_0x2154c6);let _0x5104ca='',_0x35c970=!0x1;for(const _0x5d84b7 of _0x2559c1){const _0x3b7bbf=_0x5d84b7['getRange']();for(const _0x3798ea of Array['from'](_0x3b7bbf['getItems']()))_0x3798ea['is']('$textProxy')?(_0x5104ca&&_0x35c970&&(_0x5104ca+='\x20',_0x35c970=!0x1),_0x5104ca+=_0x3798ea['data']):_0x35c970=!0x0;_0x35c970=!0x0;}return _0x5104ca['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x56cb66,_0x4ab1f0){const _0x4301c8=this['editor'],_0x4fe2d6=_0x4301c8['plugins']['get'](o);let _0xeb57a4=_0x4fe2d6['getCommentThread'](_0x4ab1f0);const _0x3e66c7=_0x4301c8['config']['get']('collaboration.channelId'),_0x4f8b2f=_0x4301c8['plugins']['get'](P);if(_0xeb57a4&&(_0xeb57a4['unlinkedAt']&&_0xeb57a4['setUnlinkedAt'](null),_0xeb57a4['isAttached']))return _0xeb57a4;return!this['getAllMarkersForId'](_0x4ab1f0)[0x0]['managedUsingOperations']?_0x4301c8['editing']['view']['once']('render',()=>{if(_0x4fe2d6['getCommentThread'](_0x4ab1f0))return;const _0x1a905e=_0x4301c8['plugins']['get'](O);_0xeb57a4=_0x4fe2d6['openNewCommentThread']({'channelId':_0x3e66c7,'threadId':_0x4ab1f0,'target':()=>this['_getTargetForId'](_0x4ab1f0),'context':{'type':'text','value':this['_getTextContext'](_0x4ab1f0)}});const _0x72c2ba=_0x4fe2d6['_threadToController']['get'](_0xeb57a4)['view'],_0x367acd=_0x1a905e['getByInnerView'](_0x72c2ba);_0x367acd&&_0x4f8b2f['registerAnnotation'](_0x367acd);},{'priority':'low'}):_0x4fe2d6['fetchCommentThread']({'channelId':_0x3e66c7,'threadId':_0x4ab1f0})['then'](_0xe2d654=>{if('destroyed'!==_0x4301c8['state']){if(_0xeb57a4=_0xe2d654,_0xeb57a4&&!_0xeb57a4['isAttached']){const _0x5045eb=_0xeb57a4['attachTo'](()=>this['_getTargetForId'](_0x4ab1f0));_0x4f8b2f['registerAnnotation'](_0x5045eb),_0xeb57a4['isResolved']&&this['_reconvertMarkers'](_0x4ab1f0);}else{if(!_0xeb57a4){const _0x5a2671=this['getAllMarkersForId'](_0x4ab1f0);_0x4301c8['model']['change'](_0x92b422=>{for(const _0x3a18e9 of _0x5a2671)_0x92b422['removeMarker'](_0x3a18e9);});}}}}),_0xeb57a4;}['_handleThreadMarker'](_0x48e3c6,_0x1cb3c3){const _0xb86150=this['_attachMarkerToThread'](_0x48e3c6,_0x1cb3c3);_0xb86150&&!_0xb86150['context']&&_0xb86150['setContext']({'type':'text','value':this['_getTextContext'](_0x1cb3c3)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4c51b2=this['editor'];ot(_0x4c51b2['model'],({left:_0x2a0af6,entered:_0x31358b})=>{for(const _0x50d4a2 of _0x2a0af6)if(ht(_0x50d4a2)){_0x4c51b2['ui']['ariaLiveAnnouncer']['announce'](E(_0x4c51b2['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3a75e7 of _0x31358b)if(ht(_0x3a75e7)){_0x4c51b2['ui']['ariaLiveAnnouncer']['announce'](E(_0x4c51b2['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0xcd43c4)));break;}});}}function dt(_0x1fcee6,_0x53999c){return _0x53999c?_0x1fcee6+':'+_0x53999c:_0x1fcee6;}function er(_0x3ba216){const _0x327bcb=_0x3ba216['split'](':');return{'group':_0x327bcb[0x0],'id':_0x327bcb[0x1],'part':_0x327bcb[0x2]};}function mt(_0xb5449,_0x5282d4){const _0x1bd298=_0x5282d4['schema'],_0xa0b731=_0x5282d4['createRange'](_0xb5449['start']);for(const _0x28efbf of _0xb5449['getWalker']()){const {type:_0x256167,item:_0x2229b9,nextPosition:_0x37cb36}=_0x28efbf;if('text'===_0x256167||_0x1bd298['isObject'](_0x2229b9)){const _0x395410=_0x5282d4['createPositionBefore'](_0x2229b9);_0xa0b731['isCollapsed']&&(_0xa0b731['start']=_0x395410),_0xa0b731['end']=_0x37cb36;}}return _0xa0b731;}function ht(_0xfb7e53){return'comment'===er(_0xfb7e53['name'])['group'];}class i extends _0x33ee24{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x3018c0=this['editor'],_0x506b06=_0x3018c0['plugins']['get'](o),_0x5a7067=_0x3018c0['plugins']['get'](r),_0x5bd501=_0x3018c0['plugins']['get'](O),_0x136487=_0x3018c0['plugins']['get'](P);_0x3018c0['ui']['componentFactory']['add']('comment',()=>{const _0xb5d13f=this['_createUIButton'](_0x4d0fd8);return _0xb5d13f['tooltip']=!0x0,_0xb5d13f;}),_0x3018c0['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x3b640d)),_0x136487['addSourceCollector'](()=>{const _0x2ce425=[];for(const [_0x262a5b,_0x141ff0]of _0x506b06['_threadToController']){const _0x4f57ff=_0x5a7067['getAllMarkersForId'](_0x262a5b['id']),_0x5a324b=_0x4f57ff['map'](_0x31cd1e=>_0x31cd1e['getRange']());_0x4f57ff['length']>0x0&&_0x2ce425['push']([_0x141ff0['view'],_0x5a324b]);}return _0x2ce425;}),this['listenTo'](_0x5bd501,'change:activeAnnotations',(_0x1cc8f3,_0x4168aa,_0x34620f)=>{const _0x2fe4b5=Array['from'](_0x34620f)['map'](_0xf2a9b2=>_0xf2a9b2['innerView'])['find'](_0x19fb16=>_0x506b06['_viewToController']['has'](_0x19fb16));if(!_0x2fe4b5)return void(_0x5a7067['activeMarker']=null);const _0x1b897b=_0x506b06['_viewToController']['get'](_0x2fe4b5)['model']['id'],_0x3cdce3='comment:'+_0x1b897b;_0x1b897b&&_0x5a7067['hasMarkerForId'](_0x1b897b)?_0x5a7067['activeMarker']=_0x3cdce3:_0x5a7067['activeMarker']&&(_0x5a7067['activeMarker']=null);}),this['listenTo'](_0x506b06,'removeCommentThread',(_0x189572,{threadId:_0xf93995,isFromAdapter:_0x3e8a49})=>{!_0x3e8a49&&_0x3018c0['ui']['focusTracker']['isFocused']&&_0x5a7067['hasMarkerForId'](_0xf93995)&&_0x3018c0['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x506b06,'addComment',(_0xf5ad91,{threadId:_0x332799,isFromAdapter:_0x1a48e6})=>{if(_0x1a48e6||!_0x5a7067['hasMarkerForId'](_0x332799)||!_0x506b06['hasCommentThread'](_0x332799))return;0x1===_0x506b06['getCommentThread'](_0x332799)['length']&&(_0x3018c0['editing']['view']['focus'](),_0xf5ad91['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x54d627=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xf44808;for(const _0x241d10 in _0x54d627){const _0x143634=_0x241d10,_0x28a76e=_0x54d627[_0x143634];if('commentsLicenseKeyValid'==_0x28a76e||'commentsLicenseKeyInvalid'==_0x28a76e||'commentsLicenseKeyExpired'==_0x28a76e||'commentsLicenseKeyDomainLimit'==_0x28a76e||'commentsLicenseKeyNotAllowed'==_0x28a76e||'commentsLicenseKeyEvaluationLimit'==_0x28a76e||'commentsLicenseKeyTrialLimit'==_0x28a76e||'commentsLicenseKeyUsageLimit'==_0x28a76e){delete _0x54d627[_0x143634],_0xf44808=_0x28a76e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0xf44808&&_0x54d627['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0xf44808&&_0x54d627['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0xf44808&&_0x54d627['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0xf44808&&_0x54d627['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0xf44808&&_0x54d627['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0xf44808&&_0x54d627['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0xf44808&&_0x54d627['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x482a15){const _0x453d30=this['editor'],_0x591652=new _0x482a15(_0x453d30['locale']),_0x860e8e=_0x453d30['commands']['get']('addCommentThread');return _0x591652['set']({'label':E(_0x453d30['locale'],'Comment'),'icon':_0x518710}),_0x591652['bind']('isEnabled')['to'](_0x860e8e),this['listenTo'](_0x591652,'execute',()=>{_0x860e8e['execute']();}),_0x591652;}}class s extends _0x33ee24{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x3b86d2){super(_0x3b86d2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x31c254,_0x32877f,_0x17e04d)=>{_0x17e04d?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x7da767,_0x298cbe]of this['editor']['commands'])_0x298cbe['affectsData']&&'addCommentThread'!==_0x7da767&&_0x298cbe['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 _0x5442d7=this['editor']['editing']['view']['document'];this['listenTo'](_0x5442d7,'cut',_0x36e632=>_0x36e632['stop'](),{'priority':'highest'}),this['listenTo'](_0x5442d7,'clipboardInput',_0x4f67cd=>_0x4f67cd['stop'](),{'priority':'highest'}),this['listenTo'](_0x5442d7,'delete',_0x30d9f5=>_0x30d9f5['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x20e8fc,_0x2da546]of this['editor']['commands'])_0x2da546['affectsData']&&'addCommentThread'!==_0x20e8fc&&_0x2da546['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x2fb15e{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15de11){super(_0x15de11),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x54d3cf=this['context']['plugins']['get'](O);this['listenTo'](_0x54d3cf,'_activateAnnotation',(_0x1b5e9a,_0x44764b)=>{for(const _0x5950ba of this['activeUIs']){const _0x3247a9=this['_uis']['get'](_0x5950ba);(0x0,this['uisData']['get'](_0x5950ba)['filter'])(_0x44764b)&&_0x3247a9['setActiveAnnotation'](_0x44764b);}}),this['listenTo'](_0x54d3cf,'_deactivateAllAnnotations',()=>{for(const _0x26e6d1 of this['activeUIs']){this['_uis']['get'](_0x26e6d1)['setActiveAnnotation'](null);}}),this['listenTo'](_0x54d3cf['_visibleAnnotations'],'add',(_0x4165d9,_0x1120a3)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1120a3);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x27773c){return this['activeUIs']['has'](_0x27773c);}['activate'](_0xb755d9,_0xbc57ac=this['defaultFilter']){const _0x2458a0=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0xb755d9))throw new _0x9d5d83('annotationsuis-missing-ui',this,{'uiName':_0xb755d9});this['isActive'](_0xb755d9)&&this['deactivate'](_0xb755d9),this['activeUIs']['add'](_0xb755d9);const _0x402e48=new _();!function({source:_0x1ceb8b,target:_0x55c13b,filter:_0x1216ea}){for(const _0x4838e9 of _0x1ceb8b)_0x1216ea(_0x4838e9)&&_0x55c13b['add'](_0x4838e9);_0x55c13b['listenTo'](_0x1ceb8b,'add',(_0x5c3acc,_0x42de4a)=>{_0x1216ea(_0x42de4a)&&_0x55c13b['add'](_0x42de4a);}),_0x55c13b['listenTo'](_0x1ceb8b,'remove',(_0x47b187,_0x35231c)=>{_0x55c13b['has'](_0x35231c)&&_0x55c13b['remove'](_0x35231c);});}({'source':_0x2458a0['_visibleAnnotations'],'target':_0x402e48,'filter':_0xbc57ac}),this['uisData']['set'](_0xb755d9,{'collection':_0x402e48,'filter':_0xbc57ac});const _0xf8483c=this['_uis']['get'](_0xb755d9);_0xf8483c['attach'](_0x402e48),this['listenTo'](_0xf8483c,'change:activeAnnotation',(_0x538a50,_0x229c41,_0x47a3b3,_0xbd11e)=>{_0xbd11e&&_0x2458a0['_removeActiveAnnotation'](_0xbd11e),_0x47a3b3&&_0x2458a0['_addActiveAnnotation'](_0x47a3b3);});}['deactivate'](_0x17533f){if(this['activeUIs']['delete'](_0x17533f),!this['_uis']['has'](_0x17533f))throw new _0x9d5d83('annotationsuis-missing-ui',this,{'uiName':_0x17533f});const _0x3f7112=this['_uis']['get'](_0x17533f);_0x3f7112['detach'](),this['stopListening'](_0x3f7112),this['uisData']['get'](_0x17533f)['collection']['destroy'](),this['uisData']['delete'](_0x17533f);}['switchTo'](_0x3b451d){if(!this['_uis']['has'](_0x3b451d))throw new _0x9d5d83('annotationsuis-missing-ui',this,{'uiName':_0x3b451d});const _0x15f750=this['context']['plugins']['get'](O),_0x582a1f=Array['from'](_0x15f750['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3b451d);const _0x5ba251=this['_uis']['get'](_0x3b451d);_0x5ba251['setActiveAnnotation'](_0x582a1f),_0x5ba251['_setSelectedAnnotations']&&_0x582a1f&&_0x5ba251['_setSelectedAnnotations']([_0x582a1f]);}['deactivateAll'](){for(const _0x537a8f of this['activeUIs'])this['deactivate'](_0x537a8f);}['register'](_0x77ed60,_0xfc6f2c){if(this['_uis']['has'](_0x77ed60))throw new _0x9d5d83('annotationsuis-register-already-registered');if('function'!=typeof _0xfc6f2c['attach']||'function'!=typeof _0xfc6f2c['detach']||'function'!=typeof _0xfc6f2c['setActiveAnnotation'])throw new _0x9d5d83('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x77ed60,_0xfc6f2c);}['refilterAnnotations'](){const _0x2d5562=this['context']['plugins']['get'](O)['collection'],_0x16e57b=new Map(),_0x35cbdc=Array['from'](this['activeUIs']);for(const _0x2b7695 of this['activeUIs']){const _0x4c4b9f=this['uisData']['get'](_0x2b7695)['collection'];for(const _0x2539c8 of _0x4c4b9f)_0x16e57b['set'](_0x2539c8,_0x2b7695);}for(const _0x4e486b of _0x2d5562){const _0x191545=_0x16e57b['get'](_0x4e486b);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4e486b);const _0x41dbc7=_0x35cbdc['find'](_0x1cf0d5=>this['uisData']['get'](_0x1cf0d5)['filter'](_0x4e486b));_0x191545!==_0x41dbc7&&(_0x191545&&this['uisData']['get'](_0x191545)['collection']['remove'](_0x4e486b),_0x41dbc7&&this['uisData']['get'](_0x41dbc7)['collection']['add'](_0x4e486b));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x329c94){const _0x3092a5=[];for(const _0x20f0d8 of this['activeUIs']){(0x0,this['uisData']['get'](_0x20f0d8)['filter'])(_0x329c94)&&_0x3092a5['push'](_0x20f0d8);}if(_0x3092a5['length']>0x1)throw new _0x9d5d83('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3092a5,'annotationType':_0x329c94['type']});}}const pi=xt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x464e17){super(_0x464e17);const _0x50b600=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 _0x41fa4f(),this['focusCycler']=new _0x42ff83({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x50b600['to']('class')],'style':{'minHeight':_0x50b600['to']('minHeight',_0x22e605=>'number'==typeof _0x22e605?pi(_0x22e605+0xa):null)},'dir':_0x464e17['uiLanguageDirection'],'role':'application','aria-label':E(_0x464e17,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x464e17,'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',_0x45ed27=>{this['_updateItemPositionInFocusables'](_0x45ed27['source']);}),this['list']['forEach'](_0x2901d7=>{this['focusTracker']['add'](_0x2901d7['element']),this['_updateItemPositionInFocusables'](_0x2901d7);}),this['list']['on']('change',(_0x27ddc1,_0x258fab)=>{for(const _0x2c8099 of _0x258fab['removed'])this['focusTracker']['remove'](_0x2c8099['element']),this['focusables']['remove'](_0x2c8099);for(const _0x595af2 of _0x258fab['added'])this['focusTracker']['add'](_0x595af2['element']),this['_updateItemPositionInFocusables'](_0x595af2);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1d1cc7){const _0xcb6b95=this['focusables']['getIndex'](_0x1d1cc7);let _0xcee7c9,_0x5159b4;for(const _0x6333df of this['focusables'])if(_0x1d1cc7['top']<_0x6333df['top']){_0xcee7c9=_0x6333df;break;}if(_0x5159b4=_0xcee7c9?this['focusables']['getIndex'](_0xcee7c9):this['focusables']['length'],-0x1!==_0xcb6b95){if(_0xcb6b95===_0x5159b4-0x1)return;this['focusables']['remove'](_0x1d1cc7),_0x5159b4=_0xcee7c9?this['focusables']['getIndex'](_0xcee7c9):this['focusables']['length'];}this['focusables']['add'](_0x1d1cc7,_0x5159b4);}}const Ht=xt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3f051b){super(_0x3f051b),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x398c74,_0x1b2ecd)=>_0x398c74+_0x1b2ecd),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x43b986=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x43b986['to']('isAnimationDisabled',_0x231a61=>_0x231a61?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x43b986['to']('top',_0x5d2c65=>Ht(_0x5d2c65))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5c89a0=this['element']['clientHeight'];_0x5c89a0&&(this['height']=_0x5c89a0);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2fb15e{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x709633){super(_0x709633),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 _0x23ac67=this['context']['config']['get']('sidebar.container');_0x23ac67&&this['setContainer'](_0x23ac67);}['setContainer'](_0x4b9197){if(!y(_0x4b9197))throw new _0x9d5d83('sidebar-setcontainer-invalid-element');this['container']=_0x4b9197;}['_attachToContainer']({viewClass:_0x1de1ec='',spaceBetweenItems:_0x1a1ba9=0x19}={}){if(!y(this['container']))throw new _0x9d5d83('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1de1ec,this['_spaceBetweenItems']=_0x1a1ba9;}['rearrange']({removedAnnotation:_0x2285c9,previousAnnotation:_0x488011,nextAnnotation:_0x1cf702}){const _0x19a58a=this['getSidebarItemView'](_0x2285c9);this['view']['list']['remove'](_0x19a58a),this['_destroySidebarItemView'](_0x2285c9),_0x488011&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x488011)),_0x1cf702&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1cf702)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x45568b,activatedAnnotation:_0x1a5b24,disableAnimationOnActivatedAnnotation:_0x23aa9a}){if(this['_activeAnnotation']=_0x1a5b24,_0x45568b){_0x45568b['isActive']=!0x1;const _0x4c37e3=this['getSidebarItemView'](_0x45568b);_0x4c37e3&&_0x23aa9a&&(_0x4c37e3['isAnimationDisabled']=!0x1);}if(_0x1a5b24){const _0xbca658=this['getSidebarItemView'](_0x1a5b24);_0xbca658&&(_0x1a5b24['isActive']=!0x0,_0x23aa9a&&(_0xbca658['isAnimationDisabled']=!0x0,_0xbca658['top']+=0x1),this['_alignToTargetRect'](_0xbca658));}}['_detachFromContainer'](_0x326d73){if(this['view']['element']['remove'](),_0x326d73){for(const _0x18fa73 of _0x326d73)this['_destroySidebarItemView'](_0x18fa73);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x161d7c,_0x4c4ba2){_0x4c4ba2||(_0x4c4ba2=_0x161d7c['view']);const _0x466695=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x466695,_0x161d7c),this['_annotationToSidebarItemView']['set'](_0x161d7c,_0x466695),_0x466695['content']['add'](_0x4c4ba2),this['listenTo'](_0x161d7c['view'],'change:targetRect',(_0x48c8c3,_0x45fed2,_0x358ffe)=>{const _0x379b12=this['_getTargetTop'](_0x161d7c,_0x358ffe);_0x466695['_targetTop']!=_0x379b12&&(_0x466695['_targetTop']=_0x379b12,this['_setItemTop'](_0x466695,_0x379b12));}),this['listenTo'](_0x466695,'change:top',()=>{this['_recalculate'](_0x466695,'top');}),this['listenTo'](_0x466695,'change:bottom',()=>{this['_recalculate'](_0x466695,'bottom');}),this['_alignToTargetRect'](_0x466695);const _0x26af7f=this['_getItemBefore'](_0x466695);if(_0x26af7f)this['_alignAfterItem'](_0x26af7f,_0x466695)||this['_alignToTargetRect'](_0x466695);else this['_alignToTargetRect'](_0x466695);return this['_updateLastItem'](),this['view']['list']['add'](_0x466695),_0x466695;}['_alignForTopChange'](_0x18d902){if(!_0x18d902['content']['length'])return;const _0x43315f=this['_getItemBefore'](_0x18d902);if(!_0x43315f)return;const _0x5f2614=this['_sidebarItemViewToAnnotation']['get'](_0x43315f),_0x13e138=this['_activeAnnotation'];_0x13e138&&_0x13e138===_0x5f2614?this['_alignAfterItem'](_0x43315f,_0x18d902):this['_alignBeforeItem'](_0x18d902,_0x43315f);}['_alignForBottomChange'](_0x34499a){if(!_0x34499a['content']['length'])return;const _0x97d070=this['_getItemAfter'](_0x34499a);if(!_0x97d070)return;const _0x1d6c02=this['_sidebarItemViewToAnnotation']['get'](_0x97d070),_0x51032f=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2b0d5f=this['_activeAnnotation'];_0x2b0d5f&&_0x2b0d5f===_0x1d6c02&&_0x51032f?(this['_alignBeforeItem'](_0x97d070,_0x34499a),this['_alignAfterItem'](_0x34499a,_0x97d070)):_0x2b0d5f&&_0x2b0d5f===_0x1d6c02?this['_alignBeforeItem'](_0x97d070,_0x34499a):this['_alignAfterItem'](_0x34499a,_0x97d070);}['_recalculate'](_0x177b45,_0x46423d){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x29ba01,changedProp:_0x2e7281}of this['_recalculateBuffer'])'top'===_0x2e7281?this['_alignForTopChange'](_0x29ba01):this['_alignForBottomChange'](_0x29ba01);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x177b45,'changedProp':_0x46423d});}['getSidebarItemView'](_0x2a8b3c){return this['_annotationToSidebarItemView']['get'](_0x2a8b3c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x506850){const _0x3df849=this['getSidebarItemView'](_0x506850);this['stopListening'](_0x3df849),this['stopListening'](_0x506850['view']),_0x3df849['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x506850),this['_sidebarItemViewToAnnotation']['delete'](_0x3df849);}['_createSidebarView'](){const _0xabbbb1=new H(this['context']['locale']);return _0xabbbb1['render'](),this['on']('change:_lastItem',(_0xd335dd,_0x1d3196,_0x359fdf,_0x403ba4)=>{_0x403ba4&&_0xabbbb1['unbind']('minHeight'),_0x359fdf?_0xabbbb1['bind']('minHeight')['to'](_0x359fdf,'bottom'):_0xabbbb1['minHeight']=null;}),_0xabbbb1;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x57cd9a){const _0x31dc12=this['_sidebarItemViewToAnnotation']['get'](_0x57cd9a),_0x5e0601=_0x31dc12&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x31dc12)-0x1);return _0x5e0601&&this['getSidebarItemView'](_0x5e0601)||null;}['_getItemAfter'](_0x16cbcb){const _0x29bc7e=this['_sidebarItemViewToAnnotation']['get'](_0x16cbcb),_0x3f31fb=_0x29bc7e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x29bc7e)+0x1);return _0x3f31fb&&this['getSidebarItemView'](_0x3f31fb)||null;}['_alignBeforeItem'](_0x40b99f,_0x5b062b){_0x40b99f['updateHeight']();const _0x3c3e9c=G(_0x5b062b['bottom']+this['_spaceBetweenItems'],_0x40b99f['top']);return!!_0x3c3e9c&&(this['_setItemTop'](_0x5b062b,_0x5b062b['top']-_0x3c3e9c),!0x0);}['_alignAfterItem'](_0x52d633,_0x4d5012){_0x52d633['updateHeight']();const _0x2c668b=G(_0x52d633['bottom']+this['_spaceBetweenItems'],_0x4d5012['top']);return!!_0x2c668b&&(this['_setItemTop'](_0x4d5012,_0x4d5012['top']+_0x2c668b,!0x1),!0x0);}['_alignToTargetRect'](_0x1db0d4){const _0x911513=this['_sidebarItemViewToAnnotation']['get'](_0x1db0d4);if(!_0x911513||!_0x911513['target']||!_0x911513['targetRect'])return;const _0x49558d=this['_getTargetTop'](_0x911513,_0x911513['targetRect']);this['_setItemTop'](_0x1db0d4,_0x49558d);}['_getTargetTop'](_0x4511ed,_0x134c49){if(null===_0x134c49)return 0x0;if(_0x4511ed['target']instanceof _0x12850d)return _0x134c49['top'];{const _0x753fa1=new _0x12850d(this['view']['element'])['top'];return _0x134c49['top']-_0x753fa1;}}['_setItemTop'](_0x3b31bb,_0x4216c7,_0x2e3b2c=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2e3b2c&&(_0x4216c7=Math['max'](_0x4216c7,this['_getMaxAvailableTop'](_0x3b31bb))),_0x3b31bb['top']=_0x4216c7;}['_getMaxAvailableTop'](_0x59722a){let _0x1dc7df=this['_getItemBefore'](_0x59722a),_0x935da9=0x0;for(;_0x1dc7df;)_0x1dc7df['updateHeight'](),_0x935da9+=this['_spaceBetweenItems']+_0x1dc7df['height'],_0x1dc7df=this['_getItemBefore'](_0x1dc7df);return _0x935da9;}}function G(_0x35c0ff,_0x4fd3a9){return Math['max'](_0x35c0ff-_0x4fd3a9,0x0);}function y(_0xf40e69){return null!==_0xf40e69&&'object'==typeof _0xf40e69&&0x1===_0xf40e69['nodeType'];}class e extends _0x2fb15e{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31e3ef){super(_0x31e3ef),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1dc279(),this['_refreshPositioningDebounced']=_0x1bbba8(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4a1e58=this['context']['plugins']['get'](M),_0x11fcf9=this['context']['plugins']['get'](z);_0x4a1e58['register']('wideSidebar',this),_0x11fcf9['container']&&_0x4a1e58['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3171b4){if(_0x3171b4===this['activeAnnotation'])return;const _0x48934e=this['context']['plugins']['get'](z);_0x48934e['_activeAnnotation']=_0x3171b4;const _0x482685=this['activeAnnotation'];_0x48934e['refresh']({'blurredAnnotation':_0x482685,'activatedAnnotation':_0x3171b4}),this['activeAnnotation']=_0x3171b4;}['attach'](_0x36d7de){this['annotations']=_0x36d7de;const _0xfb9fa1=this['context']['plugins']['get'](z);if(_0xfb9fa1['_annotations']=_0x36d7de,this['isAttached'])throw new _0x9d5d83('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xfb9fa1,'set:container',()=>{this['detach'](),this['listenTo'](_0xfb9fa1,'change:container',_0x284653=>{_0x284653['off'](),this['attach'](_0x36d7de);});}),_0xfb9fa1['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x153123=_0x4fd5eb=>{_0x4fd5eb['updateTargetRect'](),_0xfb9fa1['addAnnotation'](_0x4fd5eb);};for(const _0x256ad6 of _0x36d7de)_0x153123(_0x256ad6);this['listenTo'](_0x36d7de,'add',(_0x32fa26,_0x40b67c)=>{_0x153123(_0x40b67c);}),this['listenTo'](_0x36d7de,'remove',(_0x1d8b88,_0x5133bd,_0x1fe8b9)=>{_0xfb9fa1['rearrange']({'removedAnnotation':_0x5133bd,'previousAnnotation':_0x36d7de['get'](_0x1fe8b9-0x1),'nextAnnotation':_0x36d7de['get'](_0x1fe8b9+0x1)}),_0x5133bd===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x36d7de,'focus',(_0x441099,_0x3e1c4e)=>{this['setActiveAnnotation'](_0x3e1c4e);}),this['listenTo'](_0x36d7de,'blur',()=>{this['setActiveAnnotation'](null);});const _0x45b4a3=this['context']instanceof _0x107356?this['context']['editors']:new _0x1dc279([this['context']]);for(const _0x37b834 of _0x45b4a3)this['_integrateWithEditorAnnotations'](_0x37b834);this['listenTo'](_0x45b4a3,'add',(_0x317516,_0x783dc)=>{this['listenTo'](_0x783dc,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x783dc);});}),this['listenTo'](_0x45b4a3,'remove',(_0x40f20b,_0x50d332)=>{_0x50d332['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x50d332['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x9d5d83('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3848e4=this['context']['plugins']['get'](z);_0x3848e4['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3848e4),this['stopListening'](this['annotations']),this['context']instanceof _0x107356&&this['stopListening'](this['context']['editors']);for(const _0x33ba24 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x33ba24);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1d16f3){if(!_0x1d16f3['plugins']['has']('EditorAnnotations'))return;const _0x35bf89=_0x1d16f3['plugins']['get']('EditorAnnotations'),_0x2216a2=()=>{const _0x272abb=_0x35bf89['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x272abb[0x0]||null);};this['listenTo'](_0x35bf89,'refresh',_0x2216a2),this['listenTo'](_0x35bf89,'blur',(_0x18d9dc,{isAnnotationTracked:_0x189f23})=>{this['activeAnnotation']&&_0x189f23(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x35bf89,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1474a9=>{_0x35bf89['hasDomSelection']()&&(_0x2216a2(),_0x1474a9['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x35bf89);}['_destroyEditorAnnotationsIntegration'](_0x1412d0){this['stopListening'](_0x1412d0),this['_editorAnnotations']['remove'](_0x1412d0);}}class C extends _0x4d0fd8{['counterView'];constructor(_0x1935f0){super(_0x1935f0);const _0x4b2a3a=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x49d595,_0x58247d)=>_0x49d595?'...':_0x58247d['toString']()),this['set']('annotationType',''),this['icon']=_0x518710,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4b2a3a['to']('annotationType',_0x531a7d=>'ck-annotation-counter__badge--'+_0x531a7d),_0x4b2a3a['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4b2a3a['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2fb15e{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b09d4){super(_0x2b09d4),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x628073),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1dc279(),this['_refreshPositioningDebounced']=_0x1bbba8(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x59e074(this['context']['locale']),this['balloonPanelView']=new _0x1bf72f(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2b5339){this['annotations']=_0x2b5339;const _0x4c8f06=this['context']['plugins']['get'](z),_0x6d2236=this['balloonPanelView'];if(_0x4c8f06['_annotations']=_0x2b5339,this['isAttached'])throw new _0x9d5d83('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4c8f06,'set:container',()=>{this['detach'](),this['listenTo'](_0x4c8f06,'change:container',_0x1032cb=>{_0x1032cb['off'](),this['attach'](_0x2b5339);});}),_0x4c8f06['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x77d5ec=_0x2fa65d=>{const _0x12acbc=new C(this['context']['locale']);_0x4c8f06['addAnnotation'](_0x2fa65d,_0x12acbc),this['_annotationToNarrowView']['set'](_0x2fa65d,_0x12acbc),_0x12acbc['bind']('isDirty','annotationType','number')['to'](_0x2fa65d['view'],'isDirty','type','length'),_0x12acbc['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x6d2236['content']['first']!==_0x2fa65d['view']?(this['_showBalloon'](_0x2fa65d),_0x2fa65d['view']['element']['focus'](),this['setActiveAnnotation'](_0x2fa65d)):this['setActiveAnnotation'](null);});};for(const _0x139a85 of _0x2b5339)_0x77d5ec(_0x139a85);this['listenTo'](_0x2b5339,'add',(_0x1ff12b,_0x35c856)=>{_0x77d5ec(_0x35c856);}),this['listenTo'](_0x2b5339,'remove',(_0x524717,_0x4f6490,_0x2ce7c4)=>{this['_annotationToNarrowView']['get'](_0x4f6490)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4f6490),_0x4c8f06['rearrange']({'removedAnnotation':_0x4f6490,'previousAnnotation':_0x2b5339['get'](_0x2ce7c4-0x1),'nextAnnotation':_0x2b5339['get'](_0x2ce7c4+0x1)}),_0x4f6490===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2b5339,'focus',(_0x12e215,_0x1b105f)=>{this['setActiveAnnotation'](_0x1b105f);}),this['listenTo'](_0x2b5339,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4f3ec2,_0x2c0689)=>{_0x2c0689['keyCode']===_0x1bc521['esc']&&_0x6d2236['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x6d2236['content']['first']),this['_hideBalloon'](),_0x2c0689['stopPropagation'](),_0x2c0689['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x4fff57,_0x422350)=>{const _0x5a41ca=_0x422350['target'];_0x6d2236['isVisible']&&_0x6d2236['element']['contains'](_0x5a41ca)||_0x4c8f06['view']['element']['contains'](_0x5a41ca)||_0x4fff57['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4b0a3e=>_0x4b0a3e['contains'](_0x5a41ca))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x4fe9b1=this['context']instanceof _0x107356?this['context']['editors']:new _0x1dc279([this['context']]);for(const _0x599deb of _0x4fe9b1)this['_integrateWithEditorAnnotations'](_0x599deb);this['listenTo'](_0x4fe9b1,'add',(_0x4835ee,_0x585d31)=>{this['listenTo'](_0x585d31,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x585d31);});}),this['listenTo'](_0x4fe9b1,'remove',(_0x2c5f93,_0x5ebedd)=>{_0x5ebedd['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5ebedd['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x366aac){if(_0x366aac===this['activeAnnotation'])return;const _0x4a61a0=this['context']['plugins']['get'](z);if(_0x4a61a0['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x366aac,'disableAnimationOnActivatedAnnotation':!0x0}),_0x366aac)_0x4a61a0['getSidebarItemView'](_0x366aac)?this['_showBalloon'](_0x366aac):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x366aac;}['detach'](){if(!this['isAttached'])throw new _0x9d5d83('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3a6b9e=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4e6dc0=>_0x4e6dc0['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3a6b9e['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x107356&&this['stopListening'](this['context']['editors']);for(const _0x23419b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x23419b);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'](_0x1ee53e){if(!_0x1ee53e['plugins']['has']('EditorAnnotations'))return;const _0x413239=_0x1ee53e['plugins']['get']('EditorAnnotations'),_0x5d4129=this['context']['plugins']['get'](z),_0x18073b=this['annotations'],_0x535cd4=this['balloonPanelView'],_0x154f91=()=>{const _0x18fb05=_0x413239['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x18fb05),this['setActiveAnnotation'](_0x18fb05[0x0]||null);};this['listenTo'](_0x413239,'refresh',_0x154f91),this['listenTo'](_0x413239,'blur',(_0x25bd76,{isAnnotationTracked:_0x5774b2})=>{this['activeAnnotation']&&_0x5774b2(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x413239,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x18073b,'blur',_0x5c06fe=>{_0x413239['hasDomSelection']()&&_0x5c06fe['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xf02d13,_0x5c3780)=>{const _0x5c51d9=_0x5c3780['target'];_0x535cd4['isVisible']&&_0x535cd4['element']['contains'](_0x5c51d9)||_0x5d4129['view']['element']['contains'](_0x5c51d9)||this['activeAnnotation']&&_0x413239['hasDomSelection']()&&(_0x154f91(),_0xf02d13['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x413239);}['_destroyEditorAnnotationsIntegration'](_0xb69538){_0xb69538&&(this['stopListening'](_0xb69538),this['_editorAnnotations']['remove'](_0xb69538));}['_setSelectedAnnotations'](_0x37e5be){for(const _0x222548 of this['_selectedAnnotations'])_0x37e5be['includes'](_0x222548)||this['_manuallyClosedAnnotationViews']['delete'](_0x222548['view']);this['_selectedAnnotations']=_0x37e5be;}['_refreshPositioning'](){const _0x16d484=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x16d484['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x45383e){if(this['_manuallyClosedAnnotationViews']['has'](_0x45383e['view']))return;const _0x7a4ca3=this['balloonPanelView']['content']['first'];_0x7a4ca3!==_0x45383e['view']?(_0x7a4ca3&&this['_detachListeners'](_0x7a4ca3),this['_attachListeners'](_0x45383e['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x45383e['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x507d6a=this['balloonPanelView']['content']['first'],_0x2b5e6b=_0x507d6a&&this['annotations']['getByView'](_0x507d6a);if(!_0x2b5e6b||!this['_annotationToNarrowView']['has'](_0x2b5e6b))return;const _0x18e8b1=this['_annotationToNarrowView']['get'](_0x2b5e6b)['element'],_0x488707=(function(){const _0x1abd00=_0x1bf72f['defaultPositions'];return[_0x1abd00['southArrowNorthEast'],_0x1abd00['northArrowSouthEast'],_0x1abd00['southArrowNorth'],_0x1abd00['northArrowSouth'],_0x1abd00['southArrowNorthWest'],_0x1abd00['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x18e8b1,'positions':_0x488707});}['_hideBalloon'](){const _0x356523=this['balloonPanelView'],_0x3e96ce=_0x356523['content']['first'];_0x3e96ce&&(this['_detachListeners'](_0x3e96ce),_0x356523['unpin'](),_0x356523['content']['clear']());}['_attachListeners'](_0x5d2a0e){this['listenTo'](_0x5d2a0e,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5d2a0e,'Esc',(_0x41c3c5,_0x4b0b1b)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5d2a0e),this['_hideBalloon'](),_0x4b0b1b();});}['_detachListeners'](_0x15aff3){this['stopListening'](_0x15aff3);}}class c extends _0x33ee24{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x350589,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c8696){super(_0x2c8696),_0x2c8696['editing']['view']['addObserver'](_0x6f3a28),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2c8696['plugins']['get'](_0x350589),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3144c9=this['editor']['plugins']['get'](M);_0x3144c9['context']===this['editor']&&(_0x3144c9['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x15ed4e,_0x27c497)=>{const _0x2e3f34=this['_balloon'];if(this['isAttached']&&_0x2e3f34['visibleView']){const _0x1480a9=this['annotations']['getByView'](_0x2e3f34['visibleView']);_0x1480a9&&this['_closeAnnotation'](_0x1480a9),_0x27c497();}}));}['afterInit'](){const _0x50fcdb=this['editor']['plugins']['get'](M);_0x50fcdb['context']===this['editor']&&(_0x50fcdb['hasActive']()||_0x50fcdb['switchTo']('inline'));}['setActiveAnnotation'](_0x2fd82f){_0x2fd82f!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2fd82f&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2fd82f)&&this['_addAnnotationToBalloon'](_0x2fd82f,!0x0),_0x2fd82f['isActive']=!0x0),_0x2fd82f||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2fd82f);}['attach'](_0x11d446){this['annotations']=_0x11d446;const _0x4e5ded=this['editor']['plugins']['get'](M),_0x5b69fd=this['_balloon'];if(this['isAttached'])throw new _0x9d5d83('inlineannotations-attach-already-attached',this);if(_0x4e5ded['context']!==this['editor'])throw new _0x9d5d83('inlineannotations-not-allowed-with-context',this);const _0x3a2bb4=this['editor']['plugins']['get'](P);this['listenTo'](_0x3a2bb4,'refresh',()=>{const _0x313ee0=_0x3a2bb4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x265daf,_0x2620c9;!this['_forceRefresh']&&(_0x265daf=_0x313ee0,_0x2620c9=this['_selectedAnnotations'],_0x265daf['length']===_0x2620c9['length']&&_0x265daf['every'](_0x3b933a=>_0x2620c9['includes'](_0x3b933a)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x313ee0),this['setActiveAnnotation'](_0x313ee0[0x0]||null));}),this['listenTo'](_0x3a2bb4,'blur',(_0x5974ab,{isAnnotationTracked:_0x80b519})=>{this['activeAnnotation']&&_0x80b519(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3acb1d,_0x5a802b,_0x18f9c0)=>{_0x18f9c0||this['setActiveAnnotation'](null);}),this['listenTo'](_0x11d446,'remove',(_0x229eb8,_0x47473)=>{this['_removeAnnotationFromBalloon'](_0x47473),_0x47473===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5b69fd,'change:visibleView',(_0x5aadda,_0x3d7b9d,_0x5e6a01,_0x37bceb)=>{_0x37bceb&&this['stopListening'](_0x37bceb);const _0x3fd51c=_0x11d446['getByView'](_0x5e6a01);_0x5e6a01&&_0x3fd51c&&(this['listenTo'](_0x5e6a01,'change:height',()=>{_0x5b69fd['updatePosition']();}),this['listenTo'](_0x5e6a01,'Esc',()=>{this['_closeAnnotation'](_0x3fd51c),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3fd51c&&this['setActiveAnnotation'](_0x3fd51c));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5b69fd['visibleView']&&(_0x11d446['getByView'](_0x5b69fd['visibleView'])&&_0x5b69fd['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 _0x9d5d83('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x31587b of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x31587b);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x109a6d){for(const _0x3550d6 of this['_selectedAnnotations'])_0x109a6d['includes'](_0x3550d6)||this['_manuallyClosed']['delete'](_0x3550d6);for(const _0xc3b8a9 of this['annotations'])_0x109a6d['includes'](_0xc3b8a9)||this['_removeAnnotationFromBalloon'](_0xc3b8a9);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xedb4ac of _0x109a6d)this['_addAnnotationToBalloon'](_0xedb4ac);}this['_selectedAnnotations']=_0x109a6d;}['_addAnnotationToBalloon'](_0x33ae8e,_0x13f342=!0x1){this['_manuallyClosed']['has'](_0x33ae8e)||(this['_addedAnnotations']['has'](_0x33ae8e)||this['_balloon']['hasView'](_0x33ae8e['view'])||(this['_addedAnnotations']['add'](_0x33ae8e),this['_balloon']['add']({'stackId':_0x33ae8e['view']['id'],'view':_0x33ae8e['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x33ae8e)}})),_0x13f342&&this['_balloon']['showStack'](_0x33ae8e['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4fc926){const _0xa3d967=_0x4fc926['target'],_0x50d3aa=this['editor']['editing']['view'],_0x5ff7f6=_0x50d3aa['document']['selection']['getFirstRange'](),_0x23485a=_0x50d3aa['domConverter']['viewRangeToDom'](_0x5ff7f6);if(_0x23485a['collapse'](!0x0),_0xa3d967){if(_0xa3d967 instanceof _0x12850d)return _0xa3d967;let _0x4af90c=[];for(const _0x594543 of _0xa3d967)_0x4af90c['push'](...B(_0x594543['getClientRects']()));_0x4af90c=function(_0x257aa3){const _0x2255e2=[];let _0x5b8e6a=_0x257aa3[0x0];for(let _0x2f4c21=0x1;_0x2f4c21<_0x257aa3['length'];_0x2f4c21++)F(_0x5b8e6a,_0x257aa3[_0x2f4c21])?_0x5b8e6a['width']+=_0x257aa3[_0x2f4c21]['width']:(_0x2255e2['push'](_0x5b8e6a),_0x5b8e6a=_0x257aa3[_0x2f4c21]);return _0x2255e2['push'](_0x5b8e6a),_0x2255e2;}(_0x4af90c);const _0x469156=_0x23485a['getBoundingClientRect']();return _0x4af90c['find'](_0x3dda9d=>_0x3dda9d['top']<=_0x469156['top']&&_0x3dda9d['bottom']>=_0x469156['bottom']&&_0x3dda9d['left']<=_0x469156['left']&&_0x3dda9d['right']>=_0x469156['right'])||_0x4af90c[0x0];}return _0x4fc926['targetRect']||_0x23485a;}['_removeAnnotationFromBalloon'](_0x540c21){this['_addedAnnotations']['has'](_0x540c21)&&this['_balloon']['hasView'](_0x540c21['view'])&&(this['_addedAnnotations']['delete'](_0x540c21),this['_balloon']['remove'](_0x540c21['view']));}['_closeAnnotation'](_0x3644ea){this['_manuallyClosed']['add'](_0x3644ea),this['_removeAnnotationFromBalloon'](_0x3644ea);}}function B(_0x45bede){return Array['from'](_0x45bede)['map'](DOMRect['fromRect']);}function F(_0x16efcd,_0x3fc8ce){return _0x16efcd['top']===_0x3fc8ce['top']&&_0x16efcd['bottom']===_0x3fc8ce['bottom']&&_0x16efcd['right']===_0x3fc8ce['left'];}class it extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x38aea3,_0x13564b){super(_0x38aea3),this['set']('isEmpty',!_0x13564b['length']),this['focusTracker']=new _0x41fa4f(),this['_annotationViews']=_0x13564b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x42ff83({'focusables':_0x13564b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x13564b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x13564b,'remove',(_0x37b362,_0x25e572)=>{_0x25e572['isActive']&&this['focus'](),_0x13564b['length']||(this['isEmpty']=!0x0);});const _0x4bbddd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x38aea3,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x13564b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4bbddd['if']('isEmpty','ck-hidden',_0x208374=>!_0x208374)]},'children':[{'text':E(_0x38aea3,'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 _0x6d171b of this['_annotationViews'])this['focusTracker']['add'](_0x6d171b['element']);this['_annotationViews']['on']('change',(_0x4d196c,{added:_0x35099c,removed:_0x302cbd})=>{for(const _0xa3fcd4 of _0x35099c)this['focusTracker']['add'](_0xa3fcd4['element']);for(const _0x36cce3 of _0x302cbd)this['focusTracker']['remove'](_0x36cce3['element']);});}}class f extends _0x2fb15e{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x10ebef){super(_0x10ebef),this['archivedThreads']=new _0x1dc279();}['init'](){const _0x58f04b=this['context'],_0x425cda=_0x58f04b['plugins']['get'](o),_0x402797=_0x58f04b['plugins']['get'](O);this['listenTo'](_0x425cda,'addCommentThread',(_0x5e5bc4,{threadId:_0x254f8e})=>{const _0x116ca5=_0x425cda['getCommentThread'](_0x254f8e);_0x116ca5['archivedAt']&&this['archivedThreads']['add'](_0x116ca5,this['_calculatePosition'](_0x116ca5['archivedAt'])),this['listenTo'](_0x116ca5,'change:archivedAt',(_0x4cf696,_0x1bac7d,_0x15e3c5)=>{_0x15e3c5?this['archivedThreads']['has'](_0x116ca5)||this['archivedThreads']['add'](_0x116ca5,this['_calculatePosition'](_0x116ca5['archivedAt'])):this['archivedThreads']['has'](_0x116ca5)&&this['archivedThreads']['remove'](_0x116ca5);});}),this['listenTo'](_0x425cda,'removeCommentThread',(_0x25767a,{threadId:_0x36b06c})=>{const _0x39ed43=_0x425cda['getCommentThread'](_0x36b06c);this['stopListening'](_0x39ed43),this['archivedThreads']['has'](_0x39ed43)&&this['archivedThreads']['remove'](_0x39ed43);},{'priority':'highest'}),this['listenTo'](_0x402797['collection'],'focus',(_0x3d7a21,_0x41ad99)=>{_0x41ad99['isVisible']||(_0x41ad99['isActive']=!0x0,_0x402797['activate'](_0x41ad99));});}['_calculatePosition'](_0x30845f){const _0x55b4b3=[...this['archivedThreads']]['findIndex'](_0x4373bc=>_0x4373bc['archivedAt']<_0x30845f);return _0x55b4b3>-0x1?_0x55b4b3:this['archivedThreads']['length'];}}class a extends _0x33ee24{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x3ea3ac];}constructor(_0x450d64){super(_0x450d64),this['annotationViews']=new _0x29db78(),this['_pendingThreads']=[];}['init'](){const _0x5916da=this['editor'],_0x40db4e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5916da['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4d0fd8,!0x0)),_0x5916da['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x145023=this['_createCommentsArchiveButton'](_0x3b640d);return _0x145023['set']({'role':'menuitemcheckbox'}),_0x145023;});const _0xde0e39=_0x5916da['plugins']['get'](f),_0x5bf606=_0x5916da['plugins']['get']('Annotations'),_0x46a09d=_0x5916da['plugins']['get']('CommentsRepository');_0xde0e39['archivedThreads']['forEach'](_0x363a67=>{this['_handleNewThread'](_0x363a67);}),this['listenTo'](_0xde0e39['archivedThreads'],'add',(_0x59edc2,_0x50bc32)=>{this['_handleNewThread'](_0x50bc32);}),this['listenTo'](_0x5bf606['collection'],'add',(_0x20aa6e,_0x14555e)=>{const _0x408800=this['_pendingThreads']['find'](_0x27428c=>{const _0x10c903=_0x46a09d['_threadToController']['get'](_0x27428c);return _0x10c903&&_0x14555e['innerView']===_0x10c903['view'];});if(_0x408800){const _0x1bb01e=this['_calculatePosition'](_0x408800['archivedAt']);this['annotationViews']['add'](_0x14555e['view'],_0x1bb01e),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x408800),0x1);}}),this['listenTo'](_0xde0e39['archivedThreads'],'remove',(_0xc28e97,_0x551e7f)=>{const _0x404f08=_0x5916da['config']['get']('collaboration.channelId');if(!_0x404f08||_0x551e7f['channelId']===_0x404f08){if(this['_pendingThreads']['includes'](_0x551e7f))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x551e7f),0x1);else{const _0x5bf382=_0x46a09d['_threadToController']['get'](_0x551e7f),_0x37673d=_0x5bf606['getByInnerView'](_0x5bf382['view']);this['annotationViews']['remove'](_0x37673d['view']),this['stopListening'](_0x37673d['focusableElements']);}}}),this['listenTo'](_0x5bf606['collection'],'add',(_0x12b877,_0x1bb464)=>{this['listenTo'](_0x1bb464,'escape',_0x40db4e);}),this['listenTo'](_0x5bf606['collection'],'remove',(_0x1fe7ee,_0xef5e30)=>{this['stopListening'](_0xef5e30,'escape',_0x40db4e);});}['_handleNewThread'](_0x336759){const _0x2b887f=this['editor']['plugins']['get']('CommentsRepository'),_0xe0872=this['editor']['plugins']['get']('Annotations'),_0x594e77=this['editor']['config']['get']('collaboration.channelId');if(!_0x594e77||_0x336759['channelId']===_0x594e77){const _0x339238=_0x2b887f['_threadToController']['get'](_0x336759);if(!_0x339238)return void this['_pendingThreads']['push'](_0x336759);const _0x3dfeb4=this['_calculatePosition'](_0x336759['archivedAt']),_0x389fae=_0xe0872['getByInnerView'](_0x339238['view']);_0x389fae['isVisible']&&_0xe0872['_visibleAnnotations']['remove'](_0x389fae),this['annotationViews']['add'](_0x389fae['view'],_0x3dfeb4);}}['_calculatePosition'](_0x431ed9){const _0x30f4b8=this['editor']['config']['get']('collaboration.channelId'),_0x5a3706=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x2a91fa=>_0x2a91fa['channelId']===_0x30f4b8)['findIndex'](_0xf068de=>_0xf068de['archivedAt']<_0x431ed9);return _0x5a3706<0x0||_0x5a3706>this['annotationViews']['length']?this['annotationViews']['length']:_0x5a3706-0x1;}['_toggleDialog'](){const _0x5eb996=this['editor'],_0x12a07f=_0x5eb996['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new it(_0x5eb996['locale'],this['annotationViews'])),'commentsArchive'===_0x12a07f['id']?_0x12a07f['hide']():_0x12a07f['show']({'id':'commentsArchive','title':E(_0x5eb996['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2c6891,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':tt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0xb769ab,_0x8f0b49=!0x1){const _0x4a68f6=this['editor']['locale'],_0x120beb=this['editor']['plugins']['get']('Dialog'),_0x3fb62d=new _0xb769ab(_0x4a68f6);return _0x3fb62d['bind']('isEnabled')['to'](this,'isEnabled'),_0x3fb62d['bind']('isOn')['to'](_0x120beb,'id',_0x3d7b6c=>'commentsArchive'===_0x3d7b6c),_0x3fb62d['set']({'label':E(_0x4a68f6,'COMMENTS_ARCHIVE'),'icon':_0x2c6891,'isToggleable':!0x0}),_0x8f0b49&&(_0x3fb62d['tooltip']=!0x0),this['listenTo'](_0x3fb62d,'execute',()=>this['_toggleDialog']()),_0x3fb62d;}['_hideDialogOnAnnotationEscape']=_0x5baf17=>{const _0x4657d2=_0x5baf17['source'];if(!this['annotationViews']['has'](_0x4657d2['view']))return;const _0x483267=this['editor']['plugins']['get']('Dialog');_0x483267['isOpen']&&'commentsArchive'===_0x483267['id']&&(_0x483267['hide'](),_0x5baf17['stop']());};}class p extends _0x33ee24{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,is as BaseCommentThreadView,rs as BaseCommentView,fi as Comment,ui as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
23
+ import{Editor as _0x243d1d,ContextPlugin as _0x57c986,PendingActions as lt,Command as _0x429836,Plugin as _0x3f67cf,Context as _0xce4252}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x19e9b6,uid as _0x2415f3,KeystrokeHandler as jt,FocusTracker as _0x1f412d,diff as _0x301362,Collection as _0x28495a,Rect as _0x16772f,CKEditorError as _0x43099f,first as _0x142d43,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x10824e,keyCodes as _0x2aab7d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x8e27e6,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x5eb2c0,trimHtml as _0x247a0e,LateFocusDropdownButtonView as _0x4a0552,Users as st,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x1bc2cd}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0xd145ad}from'es-toolkit/compat';import{IconUndo as _0x4d28c0,IconCheck as _0x40e06f,IconPencil as _0x92ad00,IconRemoveComment as _0x109784,IconThreeVerticalDots as _0x7b8604,IconAddComment as _0x4c19ee,IconCommentsArchive as _0x3a4089}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x45831b,ButtonView as _0x151fe8,ViewCollection as _0xa4c1a7,createDropdown as _0xd73cdb,ListView as _0xe1f410,focusChildOnDropdownOpen as _0x1bd353,ListItemView as _0x22db09,MenuBarMenuListItemButtonView as _0x2ffab1,BodyCollection as _0x3e4dca,BalloonPanelView as _0x404ba8,ContextualBalloon as _0x3b8509,Dialog as _0x23eebf,DialogViewPosition as tt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x37beaf}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x306a71}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x259056}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0x19e9b6(){['model'];['view'];constructor(_0x2b241e,_0x294e60){super(),this['model']=_0x2b241e,this['model']['_isAttached']=!0x0,this['view']=_0x294e60,this['listenTo'](_0x294e60,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x294e60,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x294e60,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x294e60,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x294e60,'addComment',(_0x2e8f7b,_0x391c62)=>this['addComment'](_0x391c62)),this['listenTo'](_0x294e60,'updateComment',(_0x55bb5d,_0x38e19f,_0x5ecc27)=>this['updateComment'](_0x38e19f,_0x5ecc27)),this['listenTo'](_0x294e60,'removeComment',(_0x529e5c,_0xf4f713)=>this['removeComment'](_0xf4f713));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1849a0){this['model']['addComment']({'content':_0x1849a0,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2fee09,_0x4a827f){this['model']['getComment'](_0x2fee09)['update']({'content':_0x4a827f});}['removeComment'](_0x150624){this['model']['getComment'](_0x150624)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x4f69a4,_0x212dc5,_0x546a44){const t=_0x4f69a4['t'];switch(_0x212dc5){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'},_0x546a44);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'},_0x546a44);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'},_0x546a44);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'},_0x546a44);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x546a44);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'},_0x546a44);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'},_0x546a44);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'},_0x546a44);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(_0x1202e7,_0x2d80ba){super(_0x1202e7);const _0x5e34ba=_0x2415f3();this['main']=this['createCollection'](),this['editable']=new $t(_0x1202e7,_0x2d80ba,void 0x0,{'label':()=>E(_0x1202e7,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1202e7['uiLanguageDirection'],'lang':_0x1202e7['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5e34ba},'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(_0x5172d4){super(_0x5172d4),this['view']=new Vt(_0x5172d4['locale'],_0x5172d4['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x32666d=this['editor']['editing']['view'],_0x1dbfb9=this['view']['editable'],_0x23ebaf=_0x32666d['document']['getRoot']();_0x1dbfb9['name']=_0x23ebaf['rootName'],this['view']['render']();const _0x4fadf2=_0x1dbfb9['element'];this['setEditableElement'](_0x1dbfb9['name'],_0x4fadf2),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x32666d['attachDomRoot'](_0x4fadf2),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Rt extends/* #__PURE__ -- @preserve */
25
+ _0x19e9b6(_0x243d1d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x18d4ee={}){function _0x13df30(_0x3ee707){return _0x3ee707['map'](_0x3226d7=>String['fromCharCode'](_0x3226d7))['join']('');}(_0x18d4ee=Object['assign']({},_0x18d4ee))['plugins']||(_0x18d4ee['plugins']=Rt['defaultPlugins']),super(_0x18d4ee),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x13df30([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x13df30([0x76,0x69,0x65,0x77])][_0x13df30([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x13df30([0x61,0x75,0x74,0x6f]),this[_0x13df30([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x13df30([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x13df30([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x13df30([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x13df30([0x6f,0x6b])});}['create'](){const _0x14759d=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x14759d))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5e1a98=>{const _0x4d839c=this['model']['document']['getRoot'](),_0x5c1c17=_0x4d839c&&_0x4d839c['getChild'](_0x4d839c['childCount']-0x1);_0x5e1a98['setSelection'](_0x5c1c17,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x5ca7dc=this['editing']['view'],_0x21b71d=_0x5ca7dc['document']['getRoot'](),_0x3bce32=_0x21b71d['getChild'](0x0);_0x21b71d['childCount']>0x1||!_0x3bce32||'p'!=_0x3bce32['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x5ca7dc,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3bce32['placeholder']=this['placeholder']),Ft({'view':_0x5ca7dc,'element':_0x3bce32,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3bce32);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x426032,_0x2103fc={}){super(_0x426032),this['editor']=null,this['_editorConfig']=_0x2103fc,this['set']('value',_0x2103fc['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x426032,'Reply...')),this['set']('submitLabel',E(_0x426032,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1f412d(),this['focusCycler']=new _0x45831b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x12779b,_0x417691)=>{this['cancelButtonView']['fire']('execute'),_0x417691();}),this['keystrokes']['set']('Ctrl+Enter',(_0x33df36,_0xc10476)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xc10476());}),this['on']('submit',(_0x435bfa,_0x46d092)=>{_0x46d092['length']>0xfde8?(alert(E(_0x426032,'TOO_LONG_COMMENT_ALERT',[_0x46d092['length'],0xfde8])),_0x435bfa['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2a7d1a=this['editor'];this['element']['insertBefore'](_0x2a7d1a['ui']['element'],this['element']['firstChild']),_0x2a7d1a['model']['document']['on']('change',()=>this['value']=_0x2a7d1a['getData']()),_0x2a7d1a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2a7d1a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2f844e){-0x1===_0x2f844e?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x35eb3a}=this,_0x5dcd6f=new _0x151fe8(_0x35eb3a);return _0x5dcd6f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5dcd6f['withText']=!0x0,_0x5dcd6f['bind']('label')['to'](this,'submitLabel'),_0x5dcd6f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5dcd6f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1a1052,_0x96bc98)=>!_0x96bc98&&!!_0x1a1052['trim']()),_0x5dcd6f;}['_createCancelButton'](){const {locale:_0x118cb5}=this,_0x528a9b=new _0x151fe8(_0x118cb5);return _0x528a9b['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x528a9b['label']=E(_0x118cb5,'Cancel'),_0x528a9b['withText']=!0x0,_0x528a9b['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x528a9b;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x503d03=>{this['focusTracker']['add'](_0x503d03['element']);}),this['focusables']['on']('change',(_0x58bda7,_0x2407be)=>{for(const _0x4ac6f1 of Array['from'](_0x2407be['added'])['reverse']())this['focusTracker']['add'](_0x4ac6f1['element']);});}}class ie extends kt{constructor(_0x2cde65,_0x34dd86,_0x6e01){super(_0x2cde65),this['commentInputView']=new hs(_0x2cde65,_0x6e01),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x38ce11,_0x2c3e1c)=>_0x38ce11||!!_0x2c3e1c),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x8e27e6(_0x2cde65,_0x34dd86),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x180b53){this['commentInputView']['focus'](_0x180b53);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x209c3f,_0x2cd9c0)=>{const {submitButtonView:_0x114539,cancelButtonView:_0x24c8c1,editor:_0x211388}=this['commentInputView'];[_0x114539['element'],_0x24c8c1['element'],_0x211388?_0x211388['editing']['view']['getDomRoot']():null]['filter'](_0x13b6ad=>_0x13b6ad)['some'](_0x15e032=>_0x15e032['contains'](_0x2cd9c0['target']))||(this['focus'](),_0x2cd9c0['preventDefault']());});}}class cs extends kt{constructor(_0x2b3fc9){super(_0x2b3fc9);const _0x50c75e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x50c75e['to']('count',_0x19f309=>E(_0x2b3fc9,'NUMBER_OF_COMMENTS',_0x19f309))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1d6ed2,_0x5f2951,_0x3b3988){super(_0x1d6ed2);const _0x5da32a=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5f2951['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5f2951,this['_config']=_0x3b3988,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1f412d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x45831b({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x48d791=>this['commentViews']['map'](_0x1a113f=>_0x1a113f['element'])['includes'](_0x48d791['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x1d6ed2),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5dede6=>_0x5dede6-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4da818 of _0x5f2951['comments'])this['_handleNewCommentModel'](_0x4da818);this['_handleInfoComment'](),this['listenTo'](_0x5f2951['comments'],'add',(_0x33a2cf,_0x434b69)=>{const _0x55f039=this['_calculatePosition'](_0x434b69);this['length']++,this['_handleNewCommentModel'](_0x434b69,_0x55f039),this['refreshVisibleViews']();}),this['listenTo'](_0x5f2951['comments'],'remove',(_0x3be63a,_0x428353)=>{this['length']--,this['_handleRemoveCommentModel'](_0x428353),this['refreshVisibleViews']();}),this['listenTo'](_0x5f2951,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5f2951,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x5da32a['if']('length','ck-hidden',_0x104f77=>!_0x104f77)],'aria-label':E(_0x1d6ed2,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x7843f5){-0x1===_0x7843f5?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4747db of this['commentViews'])_0x4747db['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3dafc1,_0x2e44b4){const _0x5920a7=new this['_config']['CommentView'](this['locale'],_0x3dafc1,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5920a7['viewUid']=_0x3dafc1['id'],_0x5920a7['delegate']('removeComment')['to'](this),_0x5920a7['delegate']('updateComment')['to'](this),_0x5920a7['delegate']('resolveCommentThread')['to'](this),_0x5920a7['delegate']('editorReady')['to'](this),_0x5920a7['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5920a7,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5920a7,_0x2e44b4);}['_calculatePosition'](_0x14c302){const _0x5bb645=this['_model']['_findOptimalIndex'](_0x14c302);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x14c302['authoredAt']?_0x5bb645-0x1:_0x5bb645:_0x5bb645-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x368a2f={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x368a2f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x368a2f));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x244a79){const _0x332a99=this['commentViews']['remove'](_0x244a79['id']);this['stopListening'](_0x332a99),_0x332a99['isEditMode']&&this['_updateHasDirtyComment'](),_0x332a99['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1120e2=>_0x1120e2['isEditMode']);}['_rearrangeCollapse'](){const _0x5788b3=function(_0x1d14b3){const _0x52a0b0=new _0x28495a();for(const _0x4f6243 of _0x1d14b3)_0x52a0b0['add'](_0x4f6243);return _0x52a0b0;}(this['commentViews']),_0x51416e=this['_collapsedCommentsView']['count'];for(let _0x1ddc1b=0x1;_0x1ddc1b<=_0x51416e;_0x1ddc1b++)_0x5788b3['remove'](0x1);for(const _0x4056eb of _0x5788b3)_0x4056eb['collapse']();_0x51416e>0x0&&_0x5788b3['add'](this['_collapsedCommentsView'],0x1),as(_0x301362(Array['from'](this['visibleViews']),Array['from'](_0x5788b3)),this['visibleViews'],_0x5788b3);}['_rearrangeExpand'](){as(_0x301362(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x491541 of this['visibleViews'])_0x491541['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x54bbc7=>{this['focusTracker']['add'](_0x54bbc7['element']),this['keystrokes']['listenTo'](_0x54bbc7['element']);}),this['commentViews']['on']('change',(_0x290e1e,_0x3676ad)=>{for(const _0x47e60f of _0x3676ad['removed'])this['focusTracker']['remove'](_0x47e60f['element']),this['keystrokes']['stopListening'](_0x47e60f['element']);for(const _0x43e534 of Array['from'](_0x3676ad['added'])['reverse']())this['focusTracker']['add'](_0x43e534['element']),this['keystrokes']['listenTo'](_0x43e534['element']);});}}function as(_0x35dbcc,_0x1d6c18,_0x5b6b0c){let _0x2cdb37=0x0;for(const _0x3ae6cc of _0x35dbcc)switch(_0x3ae6cc){case'insert':_0x1d6c18['add'](_0x5b6b0c['get'](_0x2cdb37),_0x2cdb37),_0x2cdb37++;break;case'delete':_0x1d6c18['remove'](_0x2cdb37);break;case'equal':_0x2cdb37++;}}class ls extends kt{constructor(_0x409609){super(_0x409609);const _0x4b99c1=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4b99c1['to']('contextValue',_0x499a03=>E(_0x409609,'THREAD_CONTEXT_LABEL',_0x499a03)),'tabindex':-0x1},'children':[{'text':_0x4b99c1['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x40cf42,_0x3ee98b){super(_0x40cf42);const _0xc02e95=this['bindTemplate'];this['_model']=_0x3ee98b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1f412d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x45831b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x281cb4=>!!_0x281cb4),this['bind']('contextValue')['to'](this['_model'],'context',_0x5456fe=>_0x5456fe&&_0x5456fe['value']?this['_trimContextValue'](_0x5456fe['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0xc02e95['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x3532e5=new _0x151fe8(this['locale']);return _0x3532e5['label']=E(this['locale'],'Reopen'),_0x3532e5['tooltip']=E(this['locale'],'Reopen'),_0x3532e5['icon']=_0x4d28c0,_0x3532e5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x393af7=>!_0x393af7),_0x3532e5['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x37baa3,_0x4cb30b)=>_0x37baa3&&_0x4cb30b),_0x3532e5['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3532e5;}['_trimContextValue'](_0x26696f){if(_0x26696f['length']<0x96)return _0x26696f;const _0x3a1603=_0x26696f['lastIndexOf']('\x20',0x93);return _0x26696f['substring'](0x0,_0x3a1603>-0x1?_0x3a1603:0x93)+'...';}['_attachContextActions'](){const _0x3bd6f0=this['element']['querySelector']('.ck-context'),_0x5d382c=_0x3bd6f0['querySelector']('.ck-context__value');this['listenTo'](_0x3bd6f0,'mouseenter',()=>{_0x5d382c['offsetWidth']<_0x5d382c['scrollWidth']&&_0x3bd6f0['classList']['add']('overlay');}),this['listenTo'](_0x3bd6f0,'mouseleave',()=>{_0x3bd6f0['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x571b60 of this['focusables'])this['focusTracker']['add'](_0x571b60['element']),this['keystrokes']['listenTo'](_0x571b60['element']);}['_createContextView'](){const _0x26acbc=new ls(this['locale']);return _0x26acbc['bind']('contextValue')['to'](this),_0x26acbc;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5fb521,_0x271736,_0x564b73,_0x26919c){super(_0x5fb521),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x271736,this['_localUser']=_0x564b73,this['_config']=_0x26919c,this['commentThreadHeaderView']=new Yt(_0x5fb521,_0x271736),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5fb521,E(_0x5fb521,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5fb521,_0x271736,Object['assign']({'CommentView':this['_config']['CommentView']},_0x26919c)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x3a89fb,_0x4193ae)=>_0x3a89fb||!!_0x4193ae),this['bind']('isUnlinked')['to'](_0x271736,'unlinkedAt',_0x21246a=>!!_0x21246a),this['bind']('ariaLabel')['to'](this,'length',_0x114777=>{const _0x3b8991=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x114777,_0x3b8991]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1f412d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x45831b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xff8770=>_0xff8770['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x462ff6=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x22d8bc=_0x462ff6['commentInputView'];return _0x462ff6['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x22d8bc,'value',(_0x53ff08,_0x1cffc5,_0x7055c0,_0x20c7e0,_0x2ffc18)=>!!_0x2ffc18||!!_0x20c7e0&&_0x7055c0&&!_0x1cffc5||_0x53ff08&&_0x7055c0&&!_0x1cffc5),_0x22d8bc['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x242e08,_0x3aaa05,_0x4b599c)=>{let _0x5d48d3;return _0x5d48d3=_0x4b599c&&_0x3aaa05?'Reply\x20to\x20reopen\x20discussion...':_0x242e08?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x5d48d3);}),_0x22d8bc['bind']('submitLabel')['to'](this,'length',_0x55f433=>E(this['locale'],_0x55f433?'Reply':'Comment')),_0x22d8bc['on']('submit',(_0x4fe123,_0x5acb6e)=>{this['fire']('addComment',_0x5acb6e),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x22d8bc['on']('cancel',()=>{this['focus']();}),_0x22d8bc['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x22d8bc['on']('cancel',_0x59ab4e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x59ab4e['stop']());}),this['on']('change:isActive',(_0x51ebb4,_0x19d79b,_0x3b5517)=>{_0x3b5517||this['length']||_0x22d8bc['value']||this['fire']('removeCommentThread');}),_0x462ff6;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x49a705,_0x1f39ad,_0x5489ee,_0x53ea4e){super(_0x49a705,_0x1f39ad,_0x5489ee,_0x53ea4e),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x49a705,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x5a3ff2,_0x1a4e9e,_0x3183f6)=>{_0x3183f6||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xcd1206,_0x53ae48,_0xd0a4bb)=>{_0xd0a4bb&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x24e44e=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x24e44e['if']('isActive','ck-thread--active'),_0x24e44e['if']('isUnlinked','ck-thread--unlinked'),_0x24e44e['if']('isConfirm','ck-thread--remove-confirmation'),_0x24e44e['to']('actionIndicator',_0x484593=>_0x484593?'ck-thread--'+_0x484593:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x24e44e['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 _0x14c0fa of this['commentsListView']['commentViews'])_0x14c0fa['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x4d1eb8}=this,_0x2a653e=this['commentsListView']['commentViews']['get'](0x0);_0x2a653e===this['_boundFirstCommentView']||_0x2a653e['isSystemComment']||(this['_boundFirstCommentView']=_0x2a653e,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2a653e,'actionIndicator',_0x58114c=>'remove'===_0x58114c?'remove':null),_0x2a653e['placeholder']=E(_0x4d1eb8,'Write\x20a\x20comment...'),_0x2a653e['removeButton']['on']('execute',_0x3da2bf=>{_0x3da2bf['stop'](),this['showConfirm'](E(_0x4d1eb8,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2a653e['focus']();}),_0x2a653e['actionBar']['add'](this['resolveButton'],0x0),_0x2a653e['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xf639db=new _0x5eb2c0(this['locale']);return _0xf639db['label']=E(this['locale'],'Resolve'),_0xf639db['tooltip']=E(this['locale'],'Resolve'),_0xf639db['icon']=_0x40e06f,_0xf639db['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xf639db['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x7f7ffd=>!_0x7f7ffd),_0xf639db['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x286d3d,_0x1e42ae)=>_0x286d3d&&!_0x1e42ae),_0xf639db['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xf639db;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class os extends kt{constructor(_0x3f35c3){super(_0x3f35c3),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x592609,_0x1adff5,_0x356b35)=>{this['element']['innerHTML']=_0x356b35;}),this['element']['innerHTML']=this['content'];}}class rs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1294aa,_0x107324,_0x284133){super(_0x1294aa),this['_model']=_0x107324,this['_config']=_0x284133,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x107324,'content',_0x107324,'authoredAt',(_0x51dbb5,_0x1ca98d)=>E(_0x1294aa,'COMMENT_ARIA_LABEL',[_0x107324['author']['name'],_0x284133['formatDateTime'](_0x1ca98d),new DOMParser()['parseFromString'](_0x51dbb5,'text/html')['body']['textContent'],_0x107324['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x1294aa,E(_0x1294aa,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xa4c1a7(),this['focusTracker']=new _0x1f412d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x45831b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x34cab1=>_0x34cab1['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x2afb2d=new os(this['locale']);return _0x2afb2d['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2851be,_0x23ed57)=>_0x23ed57?_0x247a0e(_0x2851be,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2851be),_0x2afb2d;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x432ba1=new hs(this['locale'],this['_config']['editorConfig']);return _0x432ba1['value']=this['_model']['content'],_0x432ba1['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x432ba1['submitLabel']=E(this['locale'],'Save'),_0x432ba1['on']('submit',(_0x5e6845,_0x150d81)=>{this['fire']('updateComment',this['_model']['id'],_0x150d81),this['switchToDisplayMode'](),this['focus']();}),_0x432ba1['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x432ba1['once']('editorReady',()=>{_0x432ba1['focus']();}),_0x432ba1['createEditor'](),_0x432ba1['delegate']('editorReady')['to'](this),_0x432ba1['delegate']('editorDestroyed')['to'](this),_0x432ba1;}['_setupKeyboardNavigation'](){const _0x58016c=this['element'];this['keystrokes']['listenTo'](_0x58016c);for(const _0x2157fb of this['focusables'])this['focusTracker']['add'](_0x2157fb['element']),this['keystrokes']['listenTo'](_0x2157fb['element']);this['focusables']['on']('change',(_0x5cb944,_0x48cc44)=>{for(const _0x5e1481 of _0x48cc44['removed'])this['focusTracker']['remove'](_0x5e1481['element']),this['keystrokes']['stopListening'](_0x5e1481['element']);for(const _0x3014fe of _0x48cc44['added'])this['focusTracker']['add'](_0x3014fe['element']),this['keystrokes']['listenTo'](_0x3014fe['element']);}),this['keystrokes']['set']('enter',(_0x2a53a9,_0x1f5b9b)=>{_0x58016c===_0x2a53a9['target']&&(this['focusCycler']['focusFirst'](),_0x1f5b9b());}),this['keystrokes']['set']('esc',(_0x564f0c,_0x14b3b3)=>{_0x58016c!==_0x564f0c['target']&&(this['focus'](),_0x14b3b3());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(rs){['actionBar'];['userView'];constructor(_0x14bb76,_0x5b1658,_0x4050cc){super(_0x14bb76,_0x5b1658,_0x4050cc),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x14bb76,'Reply...')),this['bind']('authoredAt')['to'](_0x5b1658),this['bind']('resolvedAt')['to'](_0x5b1658),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 _0x8e27e6(_0x14bb76,_0x5b1658['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5b1658,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x17e192=this['bindTemplate'],_0x511668=[{'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':_0x17e192['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x17e192['to']('authoredAt',_0x36da3b=>this['_config']['formatDateTime'](_0x36da3b))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x17e192['if']('isEditMode','ck-comment__actions--hidden'),_0x17e192['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']&&_0x511668['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x17e192['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x17e192['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x17e192['if']('isEditMode','ck-comment--edit'),_0x17e192['if']('isSystemComment','ck-comment--info'),_0x17e192['to']('actionIndicator',_0x52bb67=>_0x52bb67?'ck-comment--'+_0x52bb67:'')],'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':_0x511668}]}]};}['_createEditButton'](){const _0x2955c5=new _0x151fe8(this['locale']);return _0x2955c5['label']=E(this['locale'],'Edit'),_0x2955c5['icon']=_0x92ad00,_0x2955c5['withText']=!0x0,_0x2955c5['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2955c5['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x10e1cf=>!_0x10e1cf),_0x2955c5['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2955c5['on']('execute',()=>this['switchToEditMode']()),_0x2955c5;}['_createRemoveButton'](){const _0x5339f4=new _0x151fe8(this['locale']);return _0x5339f4['label']=E(this['locale'],'Remove'),_0x5339f4['icon']=_0x109784,_0x5339f4['withText']=!0x0,_0x5339f4['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5339f4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x9c201c=>!_0x9c201c),_0x5339f4['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5339f4['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5339f4;}['_createDropdown'](){const _0x3a0c59=_0xd73cdb(this['locale'],_0x4a0552),_0x241824=_0x3a0c59['panelView']['children'],_0x4373c0=new _0xe1f410(this['locale']),_0x35ae5b=_0x3a0c59['bindTemplate'];_0x1bd353(_0x3a0c59,()=>this['items']['find'](_0x4b72ba=>_0x4b72ba['isVisible'])),_0x3a0c59['extendTemplate']({'attributes':{'class':[_0x35ae5b['if']('isVisible','ck-hidden',_0x250615=>!_0x250615)]}});const _0x33a2fb=(_0x2cca08,_0x3f554c=-0x1)=>{const _0x59d841=new _0x22db09(this['locale']);_0x59d841['children']['add'](_0x2cca08);const _0x446f4d=_0x3f554c>-0x1?_0x3f554c:_0x4373c0['items']['length'];_0x4373c0['items']['add'](_0x59d841,_0x446f4d);const _0x2a8f55=Array['from'](this['items']);_0x3a0c59['unbind']('isEnabled','isVisible'),_0x3a0c59['bind']('isEnabled')['toMany'](_0x2a8f55,'isEnabled',(..._0x50eb13)=>_0x50eb13['some'](_0x32e2b7=>_0x32e2b7)),_0x3a0c59['bind']('isVisible')['toMany'](_0x2a8f55,'isVisible',(..._0x3fb179)=>_0x3fb179['some'](_0x15b410=>_0x15b410));};_0x3a0c59['panelPosition']='sw',_0x3a0c59['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x7b8604});for(const _0x45a6c6 of this['items'])_0x33a2fb(_0x45a6c6);return _0x241824['add'](_0x4373c0),_0x3a0c59['listenTo'](this['items'],'add',(_0x5252ca,_0x4dd7fc,_0x316668)=>{_0x33a2fb(_0x4dd7fc,_0x316668);}),_0x3a0c59['listenTo'](this['items'],'remove',(_0x7bbc3c,_0x2ce848,_0x4029fd)=>{_0x4373c0['items']['remove'](_0x4029fd);}),_0x3a0c59;}['_attachActions'](_0x5f0d2f,_0xbf1893){const _0x1ae603=_0x5f0d2f&&_0x5f0d2f['element'];_0x1ae603&&(this['listenTo'](_0x1ae603,'mouseenter',()=>this['actionIndicator']=_0xbf1893),this['listenTo'](_0x1ae603,'focus',()=>this['actionIndicator']=_0xbf1893),this['listenTo'](_0x1ae603,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x1ae603,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x71b0fd=super['_createCommentInputView']();return _0x71b0fd['bind']('placeholder')['to'](this),_0x71b0fd;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x443ef9){const _0x1533c9=Dt(_0x443ef9,0x1e),_0x5f0f7e=new MutationObserver(_0x3d7308=>{for(const _0x26442a of _0x3d7308)('attributes'==_0x26442a['type']&&'class'==_0x26442a['attributeName']||'childList'==_0x26442a['type']||'characterData'==_0x26442a['type'])&&_0x1533c9();});return{'attach'(_0x3331ff){_0x5f0f7e['observe'](_0x3331ff,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5f0f7e['disconnect'](),_0x1533c9['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x1957af,_0x246904){super(_0x1957af),this['id']=_0x2415f3(),this['focusTracker']=new _0x1f412d(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0xeb5a8c,_0x468f70)=>this['fire']('Esc',_0x468f70)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x246904),this['mainView']=_0x246904;const _0x19baba=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x19baba['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 _0x3afe6b=this['element']['clientHeight'];_0x3afe6b&&(this['height']=_0x3afe6b);}}class d extends/* #__PURE__ -- @preserve */
29
+ _0x19e9b6(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x197d26,target:_0x2b7ffa,type:_0x36cfe7,isVisible:_0x54b350=!0x0}){super(),this['view']=_0x197d26,this['view']['element']||this['view']['render'](),this['_type']=_0x36cfe7,this['_target']=_0x2b7ffa,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x28495a([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1e8c80,_0x1e1ebb)=>{this['view']['focusTracker']['add'](_0x1e1ebb);}),this['focusableElements']['on']('remove',(_0x4ee603,_0x1bd411)=>{this['view']['focusTracker']['remove'](_0x1bd411);}),this['set']('isVisible',_0x54b350);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xcbdaf1=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0xcbdaf1),_0xcbdaf1;}get['targetRect'](){const _0x147198=this['target'];if(null===_0x147198)return null;if(_0x147198 instanceof _0x16772f)return _0x147198;const _0x1c9717=_0x147198['filter'](_0x4e077c=>function(_0x4d7b10){const _0x4605df=_0x4d7b10['offsetParent'];if(_0x4605df)return!0x0;const _0x56cd41=_0x4d7b10['getClientRects']()['item'](0x0);return!!_0x56cd41;}(_0x4e077c));return 0x0===_0x1c9717['length']?null:new _0x16772f(_0x1c9717[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x54077b){this['view']['isActive']=_0x54077b,this['view']['mainView']['isActive']=_0x54077b;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3dc001){if(!(null===_0x3dc001||_0x3dc001 instanceof _0x16772f||Array['isArray'](_0x3dc001)&&_0x3dc001['every'](_0x223980=>li(_0x223980))))throw new _0x43099f('annotation-invalid-target',null,{'target':_0x3dc001});}['_getNormalizedTarget'](){const _0x1f2ecc='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x1f2ecc)?[_0x1f2ecc]:_0x1f2ecc;}}function li(_0x24c909){return null!==_0x24c909&&'object'==typeof _0x24c909&&'nodeType'in _0x24c909&&0x1===_0x24c909['nodeType'];}class _ extends _0x28495a{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1d274a=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1f412d(),this['_focusTracker']['on']('change:isFocused',(_0x225f64,_0x2416f1,_0x30d672)=>{_0x30d672||this['fire']('blur');});for(const _0x33ed20 of _0x1d274a)this['add'](_0x33ed20);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x45d101){if(this['has'](_0x45d101))throw new _0x43099f('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x45d101['innerView'],_0x45d101),this['_viewToAnnotation']['set'](_0x45d101['view'],_0x45d101);for(const _0x575aa0 of _0x45d101['focusableElements'])this['_focusTracker']['add'](_0x575aa0);this['listenTo'](_0x45d101['focusableElements'],'add',(_0x1e745b,_0xbd8b88)=>{this['_focusTracker']['add'](_0xbd8b88);}),this['listenTo'](_0x45d101['focusableElements'],'remove',(_0x1c9fc0,_0x3dd25a)=>{this['_focusTracker']['remove'](_0x3dd25a);}),this['listenTo'](_0x45d101['view']['focusTracker'],'change:isFocused',(_0x3e31df,_0x38702e,_0x32775b)=>{_0x32775b&&this['fire']('focus',_0x45d101);}),_0x45d101['updateTargetRect']();const _0x377ab4=this['_getOrderInContent'](_0x45d101['view']['targetRect']);return super['add'](_0x45d101,_0x377ab4);}['remove'](_0x42f1a7){if(!this['has'](_0x42f1a7))throw new _0x43099f('annotationcollection-not-existing-item',null);this['stopListening'](_0x42f1a7['view']['focusTracker']),this['stopListening'](_0x42f1a7['focusableElements']);for(const _0x36eef3 of _0x42f1a7['focusableElements'])this['_focusTracker']['remove'](_0x36eef3);return this['_viewToAnnotation']['delete'](_0x42f1a7['view']),this['_innerViewToAnnotation']['delete'](_0x42f1a7['innerView']),super['remove'](_0x42f1a7);}['getByInnerView'](_0x10b16e){return this['_innerViewToAnnotation']['get'](_0x10b16e);}['getByView'](_0x435993){return this['_viewToAnnotation']['get'](_0x435993);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x245954 of this)_0x245954['updateTargetRect']();this['_sort']();}['_sort'](){const _0xeaa013=Array['from'](this)['sort']((_0x4c1fd7,_0x54065a)=>v(_0x4c1fd7['view']['targetRect'],_0x54065a['view']['targetRect']));for(let _0x5c7c72=_0xeaa013['length']-0x1;_0x5c7c72>0x0;_0x5c7c72--){const _0x47abba=_0xeaa013[_0x5c7c72];_0x5c7c72!==this['getIndex'](_0x47abba)&&(this['remove'](_0x47abba),this['add'](_0x47abba));}}['_getOrderInContent'](_0xf4c987){let _0x51671b=0x0;if(!_0xf4c987)return this['length'];for(const _0x1863fb of this){const _0x15d5ba=_0x1863fb['view']['targetRect'];if(_0x15d5ba){if(v(_0xf4c987,_0x15d5ba)<0x0)return _0x51671b;_0x51671b++;}}return _0x51671b;}}function v(_0x2d8b3e,_0xb13abd){if(null===_0x2d8b3e&&null===_0xb13abd)return 0x0;if(null===_0x2d8b3e)return-0x1;if(null===_0xb13abd)return 0x1;const _0x2ea7e3=_0x2d8b3e['top']-_0xb13abd['top'];return 0x0==_0x2ea7e3?_0x2d8b3e['left']-_0xb13abd['left']:_0x2ea7e3;}class O extends _0x57c986{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x599975){if(super(_0x599975),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x599975 instanceof _0x243d1d){const _0x5dfd00=_0x599975['locale'];_0x599975['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x5dfd00,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x43ba78){this['collection']['add'](_0x43ba78);}['remove'](_0x5a6839){this['collection']['remove'](_0x5a6839),_0x5a6839['destroy']();}['refreshVisibility'](){for(const _0xebca12 of this['collection'])_0xebca12['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1fa2da){return this['collection']['getByInnerView'](_0x1fa2da);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xaead75 of this['collection'])_0xaead75['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x558dd8){this['fire']('_activateAnnotation',_0x558dd8);}['createAnnotation'](_0x254052){return new d(_0x254052);}['createAnnotationView'](_0x56d022,_0x2e9869){return new S(_0x56d022,_0x2e9869);}['_addActiveAnnotation'](_0x52598e){const _0xf53f07=new Set(this['activeAnnotations']);_0xf53f07['add'](_0x52598e),this['activeAnnotations']=_0xf53f07;}['_removeActiveAnnotation'](_0x31d3d3){const _0x2a854a=new Set(this['activeAnnotations']);_0x2a854a['delete'](_0x31d3d3),this['activeAnnotations']=_0x2a854a;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5a28b5=this['collection'],_0x5a5113=this['_visibleAnnotations'];function _0x30e1d4(_0x23a6c3){const _0x37abd8=_0x23a6c3['source'];_0x37abd8['isVisible']&&!_0x5a5113['has'](_0x37abd8)?_0x5a5113['add'](_0x37abd8):!_0x37abd8['isVisible']&&_0x5a5113['has'](_0x37abd8)&&_0x5a5113['remove'](_0x37abd8),_0x37abd8['view']['focusTracker']['remove'](_0x37abd8['view']['element']),_0x37abd8['view']['focusTracker']['add'](_0x37abd8['view']['element']);}this['listenTo'](_0x5a28b5,'add',(_0x1bff5a,_0x9f3f88)=>{_0x9f3f88['isVisible']&&_0x5a5113['add'](_0x9f3f88),this['listenTo'](_0x9f3f88,'change:isVisible',_0x30e1d4);}),this['listenTo'](_0x5a28b5,'remove',(_0x18068c,_0x2c82a2)=>{_0x5a5113['has'](_0x2c82a2)&&_0x5a5113['remove'](_0x2c82a2),this['stopListening'](_0x2c82a2,'change:isVisible',_0x30e1d4);});}['_setupEnterAnnotationKeystroke'](){const _0x487f9f=_0x2bbd73=>{_0x2bbd73['on']('ready',()=>{_0x2bbd73['keystrokes']['set'](_0x306a71,(_0x3f69c5,_0x1c6817)=>{const _0x4ac7fa=_0x142d43(this['activeAnnotations']['values']());_0x4ac7fa&&(_0x4ac7fa['view']['focus'](),_0x1c6817());});});};this['context']instanceof _0x243d1d?_0x487f9f(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x45afbb,_0x4e96c0)=>{_0x487f9f(_0x4e96c0);});}['_setupEscapeAnnotationHandling'](){const _0x96be22=_0x3ec6b7=>{const _0x27a0ee=_0x3ec6b7['source'],_0x2cb028=[];let _0x5f0ee8;if(Array['isArray'](_0x27a0ee['target'])){_0x5f0ee8=_0x27a0ee['target'][0x0],this['context']instanceof _0x243d1d?_0x2cb028['push'](this['context']):this['context']['editors']&&_0x2cb028['push'](...this['context']['editors']);for(const _0x42214e of _0x2cb028)for(const _0x254127 of _0x42214e['editing']['view']['domRoots']['values']())if(_0x254127['contains'](_0x5f0ee8))return void _0x42214e['editing']['view']['focus']();_0x5f0ee8['focus']();}};this['listenTo'](this['collection'],'add',(_0x4581fd,_0x2dcaa6)=>{this['listenTo'](_0x2dcaa6,'escape',_0x96be22,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3dde8d,_0x4e310d)=>{this['stopListening'](_0x4e310d,'escape',_0x96be22);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x57c986{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,lt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x42ff39){super(_0x42ff39),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1e6596=this['context']['config'];_0x1e6596['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1e6596['define']('comments.maxThreadTotalWeight',0x1f4),_0x1e6596['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1e6596['define']('comments.CommentThreadView',gt),_0x1e6596['define']('comments.CommentView',Tt),_0x1e6596['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3d3598=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x23387c,_0x4c35aa)=>this['_addCommentThread'](_0x4c35aa)),this['on']('submitCommentThread',(_0x25b78e,_0x560089)=>this['_submitCommentThread'](_0x560089)),this['on']('resolveCommentThread',(_0x118b01,_0x398a20)=>this['_resolveCommentThread'](_0x398a20)),this['on']('resolveCommentThread',(_0x5e1fb7,_0x5ca650)=>this['_updateActiveAnnotation'](_0x5ca650),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x11cedb,_0x1aac18)=>this['_reopenCommentThread'](_0x1aac18)),this['on']('reopenCommentThread',(_0x4990a4,_0x44f20e)=>this['_updateActiveAnnotation'](_0x44f20e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x14ecbd,_0x4c921a)=>this['_removeCommentThread'](_0x4c921a)),this['on']('updateCommentThread',(_0x227060,_0x3f6bbf)=>this['_updateCommentThread'](_0x3f6bbf)),this['on']('updateCommentThread',(_0x1a675a,_0x1ecefc)=>this['_updateActiveAnnotation'](_0x1ecefc),{'priority':'lowest'}),this['on']('addComment',(_0x4a33f6,_0x3e66fe)=>this['_addComment'](_0x3e66fe)),this['on']('updateComment',(_0x143f1d,_0x298ed3)=>this['_updateComment'](_0x298ed3)),this['on']('removeComment',(_0x40afa2,_0x3f5047)=>this['_removeComment'](_0x3f5047)),this['on']('addComment',(_0x12649c,{threadId:_0x4922a3,isFromAdapter:_0xf98115})=>{if(_0xf98115)return;const _0x547cb1=this['getCommentThread'](_0x4922a3),_0x290595=_0x547cb1&&this['_threadToController']['get'](_0x547cb1);_0x290595&&_0x290595['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3d3598,'change:activeAnnotations',(_0x58fee8,_0xfcef20,_0xc0e046)=>{const _0x5b8bff=Array['from'](_0xc0e046)['map'](_0x32a0b4=>this['_viewToController']['get'](_0x32a0b4['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5b8bff?_0x5b8bff['model']:null;});}set['adapter'](_0x31218e){if(this['_adapter'])throw new _0x43099f('commentsrepository-adapter-already-set');this['_adapter']=_0x31218e;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xabbafb=_t,threadId:_0x2f8514=_0x2415f3(),comments:_0x3199ba=[],unlinkedAt:_0x334982=null,resolvedAt:_0x1e982e=null,resolvedBy:_0xbd6f73=null,target:_0x2bf6e2=null,context:_0x530e08=null,attributes:_0xc8b6c2={},isResolvable:_0x553662=!0x0,isSubmitted:_0x37e482=!0x1,isFromAdapter:_0x2c5048=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xabbafb),{'channelId':_0xabbafb,'threadId':_0x2f8514,'comments':_0x3199ba,'unlinkedAt':_0x334982,'resolvedAt':_0x1e982e,'resolvedBy':_0xbd6f73,'target':_0x2bf6e2,'context':_0x530e08,'attributes':_0xc8b6c2,'isFromAdapter':_0x2c5048,'isResolvable':_0x553662,'isSubmitted':_0x37e482}),this['getCommentThread'](_0x2f8514);}['openNewCommentThread']({channelId:_0x6bb07c=_t,threadId:_0x129ea8=_0x2415f3(),target:_0x9a9be0,context:_0x3670ed=null,isResolvable:_0x82d8ef=!0x0}){if(this['_readOnlyChannels']['has'](_0x6bb07c)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x9a9be0)throw new _0x43099f('commentsrepository-missing-target');const _0x20c091=this['addCommentThread']({'channelId':_0x6bb07c,'threadId':_0x129ea8,'target':_0x9a9be0,'context':_0x3670ed,'isResolvable':_0x82d8ef});if(!_0x20c091)return null;const _0x49b289=this['_threadToController']['get'](_0x20c091),_0x1071e7=_0x49b289['view']['commentThreadInputView']['commentInputView'],_0x419069=this['context']['plugins']['get'](O),_0x9c1f30=_0x419069['getByInnerView'](_0x49b289['view']);return _0x419069['activate'](_0x9c1f30),_0x1071e7['once']('editorReady',()=>_0x1071e7['focus']()),_0x20c091;}['hasCommentThread'](_0x13904a){if('string'!=typeof _0x13904a)throw new _0x43099f('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x13904a);}['updateCommentThread']({channelId:_0x49fc0f=_t,threadId:_0x5b60db,context:_0x21d4b2,unlinkedAt:_0x140c31,attributes:_0x3eac4d,isFromAdapter:_0x28ac03=!0x1}){return this['fire'](Nt('updateCommentThread',_0x49fc0f),{'channelId':_0x49fc0f,'threadId':_0x5b60db,'context':_0x21d4b2,'unlinkedAt':_0x140c31,'attributes':_0x3eac4d,'isFromAdapter':_0x28ac03}),this['getCommentThread'](_0x5b60db);}['getCommentThread'](_0x25794a){if('string'!=typeof _0x25794a)throw new _0x43099f('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x25794a);}['fetchCommentThread']({channelId:_0x3ecdf7,threadId:_0x5d7189}={}){const _0xe65fe1=this['getCommentThread'](_0x5d7189);if(_0xe65fe1)return Promise['resolve'](_0xe65fe1);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x43099f('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3ecdf7,'threadId':_0x5d7189})['then'](_0xcb98d7=>this['hasCommentThread'](_0x5d7189)?this['getCommentThread'](_0x5d7189):_0xcb98d7?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3ecdf7},_0xcb98d7)):void 0x0)['catch'](_0x3ed8f0=>{throw console['error'](_0x3ed8f0),new _0x43099f('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x251254,skipNotAttached:_0x40a1d5=!0x1,skipEmpty:_0x43bb92=!0x1,toJSON:_0x163a9b=!0x1}={}){const _0xf85f07=[];for(const _0xfb1b66 of this['_threads']['values']())_0x251254&&_0xfb1b66['channelId']!==_0x251254||_0x40a1d5&&!_0xfb1b66['isAttached']||_0x43bb92&&0x0===_0xfb1b66['length']||_0xf85f07['push'](_0xfb1b66);return _0x163a9b?_0xf85f07['map'](_0x2e7f26=>_0x2e7f26['toJSON']()):_0xf85f07;}['setActiveCommentThread'](_0xbbc160){const _0x38e79a=this['context']['plugins']['get'](O);if(!_0xbbc160)return void(this['activeCommentThread']&&_0x38e79a['deactivateAll']());const _0x1082d2=this['getCommentThread'](_0xbbc160);if(!_0x1082d2)throw new _0x43099f('commentsrepository-active-missing-comment-thread',null,{'threadId':_0xbbc160});if(!this['_threadToController']['has'](_0x1082d2))throw new _0x43099f('commentsrepository-active-not-attached',null,{'threadId':_0xbbc160});const _0x599413=_0x38e79a['getByInnerView'](this['_threadToController']['get'](_0x1082d2)['view']);_0x38e79a['activate'](_0x599413);}['switchReadOnly'](_0x28a969,_0x415d68){_0x28a969?this['_readOnlyChannels']['add'](_0x415d68):this['_readOnlyChannels']['delete'](_0x415d68),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2c6a54){return this['_readOnlyChannels']['has'](_0x2c6a54)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1a3bcb,_0x1e923c){return new vt(_0x1a3bcb,_0x1e923c);}['setPermissions'](_0x2645d7,_0x35a529=_t){this['_permissions']['set'](_0x35a529,_0x2645d7),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x38709b=_t){return this['_permissions']['has'](_0x38709b)?this['_permissions']['get'](_0x38709b):bt;}['_addCommentThread']({channelId:_0x5cc17e,threadId:_0x554f8a,comments:_0x1536e5,unlinkedAt:_0x2e9577,resolvedAt:_0x5f1dd1,resolvedBy:_0x3be7dc,target:_0x15f7fb,context:_0x76e7bb,attributes:_0x5780f1,isFromAdapter:_0x49d2c0,isResolvable:_0x3427bc,isSubmitted:_0x394d61}){if('string'!=typeof _0x554f8a)throw new _0x43099f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x554f8a});if(this['hasCommentThread'](_0x554f8a))throw new _0x43099f('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x554f8a});const _0x284f1b=new ui(this,{'channelId':_0x5cc17e,'id':_0x554f8a,'context':_0x76e7bb,'attributes':_0x5780f1,'unlinkedAt':_0x2e9577,'resolvedAt':_0x5f1dd1,'resolvedBy':_0x3be7dc?this['context']['plugins']['get'](st)['getUser'](_0x3be7dc):null,'isResolvable':_0x3427bc,'isSubmitted':_0x394d61||_0x49d2c0});this['_threads']['set'](_0x554f8a,_0x284f1b);for(const _0x51f9cb of _0x1536e5)_0x284f1b['_add'](this['_createNewComment']({'threadId':_0x554f8a,..._0x51f9cb}));return _0x15f7fb&&_0x284f1b['attachTo'](_0x15f7fb),_0x49d2c0||!_0x284f1b['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5cc17e,'threadId':_0x554f8a});}['_submitCommentThread']({channelId:_0x3c3f46,threadId:_0x514109}){if(!this['hasCommentThread'](_0x514109))throw new _0x43099f('commentsrepository-missing-comment-thread',this);const _0x32730c=this['getCommentThread'](_0x514109);if(_0x32730c['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x263153,comments:_0x4351fb,resolvedAt:_0x31759b,resolvedBy:_0xe6b9c5,context:_0xa0c081,attributes:_0x57ebc2}=_0x32730c,_0x2e08a6=this['context']['plugins']['get']('PendingActions'),_0x5ef95b=_0x2e08a6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3c3f46,'threadId':_0x263153,'comments':_0x4351fb['map'](_0x2eae30=>_0x2eae30['toJSON']()),'resolvedAt':_0x31759b,'resolvedBy':_0xe6b9c5?_0xe6b9c5['id']:_0xe6b9c5,'context':_0xa0c081,'attributes':_0x57ebc2})['then'](({comments:_0xb17404})=>{_0x2e08a6['remove'](_0x5ef95b);for(const _0x39dc9e of _0xb17404)this['_updateComment']({'channelId':_0x3c3f46,'threadId':_0x514109,'commentId':_0x39dc9e['commentId'],'createdAt':_0x39dc9e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x51afee=>{throw console['error'](_0x51afee),new _0x43099f('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x15c7eb,target:_0x1cb96c}){const _0x2f460d=this['getCommentThread'](_0x15c7eb);if(!_0x2f460d)throw new _0x43099f('commentsrepository-attach-missing-comment-thread',this);const _0x1d0971=this['context']['plugins']['get']('PendingActions'),_0x4ee005=this['context']['plugins']['get'](O),_0x123e9a=this['_createCommentThreadView'](_0x2f460d),_0x113df5=new vt(_0x2f460d,_0x123e9a);let _0x3ae95d=null;_0x123e9a['on']('change:isDirty',(_0x134227,_0x3ca446,_0x533ba4)=>{_0x533ba4?_0x3ae95d=_0x1d0971['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x3ae95d&&(_0x1d0971['remove'](_0x3ae95d),_0x3ae95d=null);}),this['_threadToController']['set'](_0x2f460d,_0x113df5),this['_viewToController']['set'](_0x123e9a,_0x113df5);const _0xcd6c48=new S(this['context']['locale'],_0x123e9a);_0xcd6c48['bind']('length')['to'](_0x123e9a),_0xcd6c48['bind']('isDirty')['to'](_0x123e9a,'isDirty',_0x123e9a,'length',(_0x3d787b,_0x3067df)=>_0x3d787b||!_0x3067df),_0xcd6c48['bind']('isActive')['to'](_0x123e9a),_0xcd6c48['type']='comment';const _0x3f48d0=new d({'view':_0xcd6c48,'target':_0x1cb96c,'type':'comment','isVisible':!_0x2f460d['archivedAt']});return _0x123e9a['on']('escape',()=>{_0x3f48d0['fire']('escape');}),this['_bindAnnotationToEditors'](_0x123e9a,_0x3f48d0),_0x4ee005['add'](_0x3f48d0),_0x3f48d0;}['_bindAnnotationToEditors'](_0x32ebf9,_0x46f7d4){this['listenTo'](_0x32ebf9,'editorReady',(_0x514325,_0x33df75)=>{const _0x6b0422=_0x33df75['ui']['view']['body']['bodyCollectionContainer'];_0x46f7d4['focusableElements']['add'](_0x6b0422),this['context']instanceof _0x243d1d&&this['context']['ui']['focusTracker']['add'](_0x6b0422);},{'priority':'highest'}),this['listenTo'](_0x32ebf9,'editorDestroyed',(_0x5c797d,_0x2ad753)=>{const _0xc3b138=_0x2ad753['ui']['view']['body']['bodyCollectionContainer'];_0x46f7d4['focusableElements']['has'](_0xc3b138)&&_0x46f7d4['focusableElements']['remove'](_0xc3b138),this['context']instanceof _0x243d1d&&this['context']['ui']['focusTracker']['remove'](_0xc3b138);});}['_unbindEditors'](_0x59c114){this['stopListening'](_0x59c114,'editorReady'),this['stopListening'](_0x59c114,'editorDestroyed');}['_createCommentThreadView'](_0x3db812){const _0x21ece0=this['context']['plugins']['get'](st),{config:_0x478b05,locale:_0x2d84c7}=this['context'],_0x466ba9=pt(_0x478b05['get']('locale'),_0x2d84c7);return new(0x0,(_0x478b05['get']('comments'))['CommentThreadView'])(_0x2d84c7,_0x3db812,_0x21ece0['me'],{'editorConfig':{..._0x478b05['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x478b05['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x478b05['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x478b05['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x478b05['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x466ba9,'CommentView':_0x478b05['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x22c6cd,channelId:_0x473f22,resolvedAt:_0x3e75b0,resolvedBy:_0x225179,isFromAdapter:_0x50bf22}){if(!this['hasCommentThread'](_0x22c6cd))throw new _0x43099f('commentsrepository-missing-comment-thread',null,{'threadId':_0x22c6cd});const _0x32cf6c=this['getCommentThread'](_0x22c6cd);if(_0x32cf6c['isResolved'])throw new _0x43099f('commentsrepository-resolved-comment-thread',null,{'threadId':_0x22c6cd});const _0x422818=this['context']['plugins']['get'](st);if(_0x32cf6c['resolvedBy']=_0x422818['getUser'](_0x225179),_0x32cf6c['resolvedAt']=_0x3e75b0,_0x50bf22||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x20ac3b=this['context']['plugins']['get']('PendingActions'),_0x36105e=_0x20ac3b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x473f22,'threadId':_0x22c6cd})['then'](({resolvedAt:_0x12af78,resolvedBy:_0x3f4814})=>{_0x20ac3b['remove'](_0x36105e),_0x32cf6c['resolvedBy']['id']!==_0x3f4814&&(_0x32cf6c['resolvedBy']=_0x422818['getUser'](_0x3f4814)),_0x32cf6c['resolvedAt']=_0x12af78;})['catch'](_0x45b7ec=>{throw console['error'](_0x45b7ec),new _0x43099f('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x50b4be,channelId:_0x387e36,isFromAdapter:_0x33b745}){if(!this['hasCommentThread'](_0x50b4be))throw new _0x43099f('commentsrepository-missing-comment-thread',null,{'threadId':_0x50b4be});const _0x35b013=this['getCommentThread'](_0x50b4be);if(!_0x35b013['isResolved'])throw new _0x43099f('commentsrepository-reopen-comment-thread',null,{'threadId':_0x50b4be});if(_0x35b013['resolvedBy']=null,_0x35b013['resolvedAt']=null,_0x33b745||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4ed77f=this['context']['plugins']['get']('PendingActions'),_0x396f95=_0x4ed77f['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x387e36,'threadId':_0x50b4be})['then'](()=>_0x4ed77f['remove'](_0x396f95))['catch'](_0x242071=>{throw console['error'](_0x242071),new _0x43099f('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x152014,isFromAdapter:_0x522820}){const _0x16fe0e=this['getCommentThread'](_0x152014);if(!_0x16fe0e)throw new _0x43099f('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x152014),this['_threads']['delete'](_0x152014),!_0x16fe0e['isSubmitted']||_0x522820||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5c0a08=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4dd755}=_0x16fe0e,_0x5b4d12=_0x5c0a08['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4dd755,'threadId':_0x152014})['then'](()=>_0x5c0a08['remove'](_0x5b4d12))['catch'](_0x1c2edf=>{throw console['error'](_0x1c2edf),new _0x43099f('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x736a56,unlinkedAt:_0x200531,context:_0x5eaee0,attributes:_0x3738ef,isFromAdapter:_0xd94896}){if('string'!=typeof _0x736a56)throw new _0x43099f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x736a56});if(!this['hasCommentThread'](_0x736a56))throw new _0x43099f('commentsrepository-missing-comment-thread',null,{'threadId':_0x736a56});const _0x5731b1=this['getCommentThread'](_0x736a56);let _0x2c0958=!0x1;if(void 0x0!==_0x5eaee0&&_0x5731b1['context']!==_0x5eaee0&&(_0x5731b1['context']=_0x5eaee0,_0x2c0958=!0x0),void 0x0!==_0x200531&&_0x5731b1['unlinkedAt']!==_0x200531&&(_0x5731b1['unlinkedAt']=_0x200531,_0x2c0958=!0x0),_0x3738ef&&!At(_0x3738ef,_0x5731b1['attributes'])&&(_0x5731b1['attributes']=_0x3738ef,_0x2c0958=!0x0),!_0x2c0958)return Promise['resolve']();if(!_0x5731b1['isSubmitted']||_0xd94896||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xa9b9cc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2609c2}=_0x5731b1,_0x3c1be1=_0xa9b9cc['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2609c2,'threadId':_0x736a56,'context':_0x5eaee0,'unlinkedAt':_0x200531,'attributes':_0x3738ef})['then'](()=>_0xa9b9cc['remove'](_0x3c1be1))['catch'](_0x39ea1b=>{throw console['error'](_0x39ea1b),new _0x43099f('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xc4db98){const _0x4b25ee=this['context']['plugins']['get'](O),_0x4c08c9=this['getCommentThread'](_0xc4db98);if(_0x4c08c9['_isAttached']=!0x1,this['_threadToController']['has'](_0x4c08c9)){const _0x37c365=this['_threadToController']['get'](_0x4c08c9),_0x34d78a=_0x37c365['view'],_0x33078a=_0x4b25ee['getByInnerView'](_0x34d78a);this['_threadToController']['delete'](_0x4c08c9),this['_viewToController']['delete'](_0x34d78a),_0x33078a&&_0x4b25ee['remove'](_0x33078a),_0x37c365['destroy'](),_0x34d78a['destroy']()['then'](()=>{this['_unbindEditors'](_0x34d78a);});}}['_updateActiveAnnotation']({threadId:_0x3eb569,resolvedAt:_0x1493f2,unlinkedAt:_0x4e49d4}){const _0x5ac5d9=!!_0x1493f2,_0x260828=this['context']['plugins']['get'](O),_0x1856b6=this['getCommentThread'](_0x3eb569);if(this['_threadToController']['has'](_0x1856b6)){const _0x196a3e=this['_threadToController']['get'](_0x1856b6)['view'],_0x497122=_0x260828['getByInnerView'](_0x196a3e);_0x497122&&(_0x5ac5d9&&_0x260828['_removeActiveAnnotation'](_0x497122),_0x4e49d4?_0x497122['isVisible']=!0x1:_0x497122['refreshVisibility']());}}['_getExternalAuthor'](_0xb1e0dc){const _0xfacbd1=this['context']['plugins']['get'](st),_0x2346e3=It('external:'+_0xb1e0dc),_0x27edf3=_0xfacbd1['getUser'](_0x2346e3);return _0x27edf3||_0xfacbd1['addUser']({'id':_0x2346e3,'name':_0xb1e0dc});}['_createNewComment']({threadId:_0x81e2d1,commentId:_0x3e8964=_0x2415f3(),content:_0x5a615c,authorId:_0x4f7774,createdAt:_0x479219,attributes:_0x37d532}){if('string'!=typeof _0x3e8964)throw new _0x43099f('commentsrepository-invalid-commentid');if('string'!=typeof _0x4f7774)throw new _0x43099f('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5a615c||!_0x5a615c['trim']())throw new _0x43099f('commentsrepository-invalid-comment-content');const _0x579d9b=this['context']['plugins']['get'](st)['getUser'](_0x4f7774);if(!_0x579d9b)throw new _0x43099f('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4f7774});let _0x2d06f2=null,_0x4cf84a=_0x479219;return _0x37d532?.['@external']&&(_0x2d06f2=this['_getExternalAuthor'](_0x37d532['@external']['authorName']),_0x4cf84a=new Date(_0x37d532['@external']['createdAt'])),new fi(this,{'threadId':_0x81e2d1,'id':_0x3e8964,'author':_0x2d06f2||_0x579d9b,'creator':_0x579d9b,'content':_0x5a615c,'createdAt':_0x479219,'authoredAt':_0x4cf84a,'attributes':_0x37d532});}['_addComment'](_0x52a300){let {threadId:_0x4d9b48,content:_0x5e53a8,attributes:_0x4039f0,isFromAdapter:_0x567985}=_0x52a300;const _0x112b2e=this['getCommentThread'](_0x52a300['threadId']);if(!_0x112b2e)throw new _0x43099f('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2ded1d=this['_createNewComment'](_0x52a300),{id:_0x47f48c}=_0x2ded1d;if(_0x112b2e['_add'](_0x2ded1d),_0x567985||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x112b2e['isSubmitted'])return Promise['resolve']();const _0x193665=this['context']['plugins']['get']('PendingActions'),{channelId:_0x333bab}=_0x112b2e,_0x3e9fdb=_0x193665['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4039f0||(_0x4039f0={}),this['adapter']['addComment']({'channelId':_0x333bab,'threadId':_0x4d9b48,'commentId':_0x47f48c,'content':_0x5e53a8,'attributes':_0x4039f0})['then'](_0x513665=>{_0x193665['remove'](_0x3e9fdb),_0x513665&&this['_updateComment']({'channelId':_0x333bab,'threadId':_0x4d9b48,'commentId':_0x47f48c,'createdAt':_0x513665['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3e33e0=>{throw console['error'](_0x3e33e0),new _0x43099f('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x7aafb1,commentId:_0x479ef7,content:_0x2d1610,createdAt:_0x54b0a4,attributes:_0x4b33ba,isFromAdapter:_0x1e0afc}){if(void 0x0!==_0x2d1610&&('string'!=typeof _0x2d1610||!_0x2d1610['trim']()['length']))throw new _0x43099f('commentsrepository-update-comment-invalid-content');const _0x5a95e1=this['getCommentThread'](_0x7aafb1),_0x446bd7=_0x5a95e1['getComment'](_0x479ef7);if(!_0x446bd7)throw new _0x43099f('commentsrepository-update-missing-comment',this);let _0x167db1=!0x1;if(_0x2d1610&&_0x2d1610!==_0x446bd7['content']&&(_0x446bd7['isEditable']||_0x1e0afc)&&(_0x446bd7['content']=_0x2d1610,_0x167db1=!0x0),_0x54b0a4&&_0x54b0a4!==_0x446bd7['createdAt']&&(_0x446bd7['createdAt']=_0x54b0a4,_0x446bd7['attributes']&&_0x446bd7['attributes']['@external']||(_0x446bd7['authoredAt']=_0x54b0a4),_0x167db1=!0x0),_0x4b33ba&&!At(_0x4b33ba,_0x446bd7['attributes'])&&(_0x446bd7['attributes']=_0x4b33ba,_0x167db1=!0x0),!_0x167db1)return Promise['resolve']();if(_0x5a95e1['fire']('commentUpdated'),_0x1e0afc||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2deef0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4bb5fa}=this['getCommentThread'](_0x446bd7['threadId']),_0x2bbd99=_0x2deef0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4bb5fa,'threadId':_0x7aafb1,'commentId':_0x479ef7,'content':_0x2d1610,'attributes':_0x4b33ba})['then'](()=>_0x2deef0['remove'](_0x2bbd99))['catch'](_0x3b74f2=>{throw console['error'](_0x3b74f2),new _0x43099f('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3ba7f0,commentId:_0x3d75f0,isFromAdapter:_0x192868}){const _0x264cba=this['getCommentThread'](_0x3ba7f0),_0x4dd48c=_0x264cba['getComment'](_0x3d75f0);if(!_0x4dd48c)throw new _0x43099f('commentsrepository-remove-missing-comment',this);if(_0x264cba['_remove'](_0x4dd48c),_0x192868||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x485e93=this['context']['plugins']['get']('PendingActions'),{channelId:_0x16dbb1}=_0x264cba,_0x35abbb=_0x485e93['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x16dbb1,'threadId':_0x3ba7f0,'commentId':_0x3d75f0})['then'](()=>_0x485e93['remove'](_0x35abbb))['catch'](_0x2272bb=>{throw console['error'](_0x2272bb),new _0x43099f('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
30
+ _0x19e9b6(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x57dd8a,_0x28c43f){super();const _0x1a7164=_0x28c43f['isResolvable'];this['channelId']=_0x28c43f['channelId'],this['id']=_0x28c43f['id'],this['comments']=new _0x28495a(),this['_repository']=_0x57dd8a,this['_isAttached']=!0x1,this['_isSubmitted']=_0x28c43f['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x57dd8a,'_permissions',_0x57dd8a,'_readOnlyChannels',()=>_0x57dd8a['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x57dd8a,'_permissions',()=>_0x57dd8a['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x57dd8a,'_permissions',()=>{const _0x3691b4=_0x57dd8a['getPermissions'](this['channelId']);return _0x3691b4['write']||_0x3691b4['admin'];}),this['bind']('isResolvable')['to'](_0x57dd8a,'_permissions',()=>_0x1a7164&&_0x57dd8a['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x28c43f['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4772ef,_0x7f446f)=>_0x4772ef?_0x7f446f?_0x4772ef<_0x7f446f?_0x4772ef:_0x7f446f:_0x4772ef:_0x7f446f),this['set']('unlinkedAt',_0x28c43f['unlinkedAt']||null),this['set']('resolvedAt',_0x28c43f['resolvedAt']||null),this['set']('resolvedBy',_0x28c43f['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x5c7ea8=>!!_0x5c7ea8),this['set']('attributes',_0x28c43f['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x62d4c4,_0x2954e3)=>_0x62d4c4+_0x2954e3['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x36ea16,id:_0x3b7edc}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x36ea16),{'channelId':_0x36ea16,'threadId':_0x3b7edc});}['setUnlinkedAt'](_0x53539d){this['_update']({'unlinkedAt':_0x53539d});}['resolve']({resolvedAt:_0x14020e=new Date(),resolvedBy:_0x4569d6=null,isFromAdapter:_0x43f2dd=!0x1}={}){const _0x556918=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x210edd,id:_0x490c2f}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x210edd),{'channelId':_0x210edd,'threadId':_0x490c2f,'resolvedAt':_0x14020e,'resolvedBy':_0x4569d6||_0x556918['id'],'isFromAdapter':_0x43f2dd});}['reopen']({isFromAdapter:_0x1592ee=!0x1}={}){const {channelId:_0x5bd44c,id:_0x47ec2f}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x5bd44c),{'channelId':_0x5bd44c,'threadId':_0x47ec2f,'isFromAdapter':_0x1592ee});}['setContext'](_0x4d1532){this['context']||this['_update']({'context':_0x4d1532});}['setAttribute'](_0x5560fe,_0x4ca69d){const _0x1c34c5=wt(this['attributes']);yt(_0x1c34c5,_0x5560fe,_0x4ca69d),this['_update']({'attributes':_0x1c34c5});}['removeAttribute'](_0x9f8b6d){const _0x237f77=wt(this['attributes']);Ct(_0x237f77,_0x9f8b6d),this['_update']({'attributes':_0x237f77});}['remove']({isFromAdapter:_0x5dcb3c=!0x1}={}){const {channelId:_0xd960e2,id:_0x328113}=this;this['_repository']['fire'](Nt('removeCommentThread',_0xd960e2),{'channelId':_0xd960e2,'threadId':_0x328113,'isFromAdapter':_0x5dcb3c});}['attachTo'](_0x7925b2){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x7925b2});}['addComment'](_0x1c4b85){const {channelId:_0x14060e,id:_0xd218b6}=this;this['_repository']['fire'](Nt('addComment',_0x14060e,_0xd218b6),Object['assign']({'channelId':_0x14060e,'threadId':_0xd218b6},_0x1c4b85));}['getComment'](_0x449a71){if('string'!=typeof _0x449a71)throw new _0x43099f('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x449a71});return this['comments']['get'](_0x449a71);}['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'](_0x55bce0=>_0x55bce0['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2037cf){return this['listenTo'](_0x2037cf,'change:authoredAt',()=>{const _0x28ce29=this['_findOptimalIndex'](_0x2037cf),_0x511325=this['comments'];_0x28ce29-0x1!=_0x511325['getIndex'](_0x2037cf)&&_0x28ce29+0x1!=_0x511325['getIndex'](_0x2037cf)&&(this['_remove'](_0x2037cf),this['_add'](_0x2037cf));}),this['comments']['add'](_0x2037cf,this['_findOptimalIndex'](_0x2037cf));}['_update'](_0x5400cf){const {channelId:_0x4a4294,id:_0x47d304}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x4a4294),{..._0x5400cf,'channelId':_0x4a4294,'threadId':_0x47d304});}['_remove'](_0xf73081){return this['stopListening'](_0xf73081),_0xf73081['destroy'](),this['comments']['remove'](_0xf73081);}['_findOptimalIndex'](_0x2ebfdb){const _0x4a1497=this['comments']['find'](_0xc0085b=>new Date(_0xc0085b['authoredAt'])['getTime']()>new Date(_0x2ebfdb['authoredAt'])['getTime']());return _0x4a1497?this['comments']['getIndex'](_0x4a1497):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
31
+ _0x19e9b6(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x4dd14f,_0x207c45){super();const _0x227cf8=_0x4dd14f['context']['plugins']['get'](st)['me'],_0x2eda77=_0x4dd14f['getCommentThread'](_0x207c45['threadId']),_0x4f6b0b=0x0===_0x2eda77['comments']['length'],_0x5bdfe4=_0x227cf8===_0x207c45['author'];this['id']=_0x207c45['id'],this['threadId']=_0x207c45['threadId'],this['author']=_0x207c45['author'],this['creator']=_0x207c45['creator'],this['isExternal']=Boolean(_0x207c45['attributes']&&_0x207c45['attributes']['@external']),this['set']('content',_0x207c45['content']),this['createdAt']=_0x207c45['createdAt']||new Date(),this['set']('authoredAt',_0x207c45['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2eda77,'resolvedAt'),this['set']('attributes',_0x207c45['attributes']||{}),this['bind']('isEditable')['to'](_0x4dd14f,'_permissions',()=>{const _0x31eb49=_0x4dd14f['getPermissions'](_0x2eda77['channelId'])['write'],_0x39be97=_0x4dd14f['getPermissions'](_0x2eda77['channelId'])['modifyAll'];return _0x5bdfe4&&_0x31eb49||!_0x5bdfe4&&_0x39be97;}),this['bind']('isRemovable')['to'](_0x2eda77,'isRemovable',_0x4dd14f,'_permissions',_0x65e4d9=>{const _0x59f2f8=_0x4dd14f['getPermissions'](_0x2eda77['channelId'])['write'],_0x4eb46a=_0x4dd14f['getPermissions'](_0x2eda77['channelId'])['modifyAll'];return _0x5bdfe4&&_0x59f2f8||_0x65e4d9&&_0x4f6b0b||!_0x5bdfe4&&_0x4eb46a&&!_0x4f6b0b;}),this['bind']('isReadOnly')['to'](_0x2eda77,'isReadOnly'),this['_repository']=_0x4dd14f;}get['weight'](){return Math['max'](function(_0x559ba9){const _0x23e3c2=document['createElement']('div');return _0x23e3c2['innerHTML']=_0x559ba9,_0x23e3c2['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2ce784){const {threadId:_0x30dece,id:_0x579ab4}=this;if(!this['_repository']['hasCommentThread'](_0x30dece))throw new _0x43099f('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3a1b84}=this['_repository']['getCommentThread'](_0x30dece);this['_repository']['fire'](Nt('updateComment',_0x3a1b84,_0x30dece),{'channelId':_0x3a1b84,'threadId':_0x30dece,'commentId':_0x579ab4,..._0x2ce784});}['setAttribute'](_0x4b6d13,_0x191835){const _0x18f919=wt(this['attributes']);yt(_0x18f919,_0x4b6d13,_0x191835),this['update']({'attributes':_0x18f919});}['removeAttribute'](_0x13d6ef){const _0x190ccc=wt(this['attributes']);Ct(_0x190ccc,_0x13d6ef),this['update']({'attributes':_0x190ccc});}['remove'](_0x330abd={}){if(!_0x330abd['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x59cc8a,id:_0x3844a7}=this;if(!this['_repository']['hasCommentThread'](_0x59cc8a))throw new _0x43099f('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x592dc8}=this['_repository']['getCommentThread'](_0x59cc8a);this['_repository']['fire'](Nt('removeComment',_0x592dc8,_0x59cc8a),{'channelId':_0x592dc8,'threadId':_0x59cc8a,'commentId':_0x3844a7,..._0x330abd});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3d03f7,..._0x5596bb){for(const _0x11f0a5 of _0x5596bb)void 0x0!==_0x11f0a5&&(_0x3d03f7+=':'+String(_0x11f0a5));return _0x3d03f7;}class K extends _0x429836{['refresh'](){const _0x555c86=this['editor']['model']['document']['selection'];for(const _0x1ac460 of _0x555c86['getRanges']())if(this['_hasContent'](_0x1ac460))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x455391=_0x2415f3()}={}){const _0x59ff57=this['editor']['model'],_0x4958a0=[];for(const _0x49ace7 of _0x59ff57['document']['selection']['getRanges']())this['_hasContent'](_0x49ace7)&&_0x4958a0['push'](this['_trimToContent'](_0x49ace7));_0x59ff57['change'](_0x1deb08=>{for(const _0x49eef9 of _0x4958a0){const _0x1636d4=_0x2415f3()['substr'](0x1,0x5),_0x3e175b='comment:'+_0x455391+':'+_0x1636d4;_0x1deb08['addMarker'](_0x3e175b,{'range':_0x49eef9,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x5aeee9){for(const _0x26ac64 of _0x5aeee9['getItems']())if(this['_itemIsContent'](_0x26ac64))return!0x0;return!0x1;}['_itemIsContent'](_0xd7494c){return _0xd7494c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xd7494c)&&!_0xd7494c['is']('element','tableCell');}['_trimToContent'](_0x5ee94d){const _0x46df3d=_0x57e1c5=>!this['_itemIsContent'](_0x57e1c5['item']),_0x5f39bd=_0x5ee94d['start']['getLastMatchingPosition'](_0x46df3d),_0x4b8cc8=_0x5ee94d['end']['getLastMatchingPosition'](_0x46df3d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5f39bd,_0x4b8cc8);}}class P extends _0x3f67cf{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5de908){super(_0x5de908),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x10a22f=this['editor'],_0x24cd25=_0x10a22f['model']['document']['selection'],_0x4cfdd6=_0xd145ad(()=>this['refreshSelectedViews'](),0xa);_0x24cd25['on']('change:range',(_0x32661a,_0x5ac4aa)=>{_0x5ac4aa['directChange']&&(_0x4cfdd6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x10a22f['editing']['view']['document'],'change:isFocused',(_0x174e4f,_0x4f15bd,_0x20c1aa)=>{_0x20c1aa&&_0x4cfdd6();}),this['listenTo'](_0x10a22f['ui']['focusTracker'],'change:isFocused',(_0x14cd1c,_0x4b391e,_0x304306)=>{_0x304306||_0x10a22f['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x4bed0a=>this['_editorAnnotationsData']['has'](_0x4bed0a['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x435af9){if(this['_editorAnnotations']['has'](_0x435af9['view']))return;this['_editorAnnotations']['add'](_0x435af9['view']),this['editor']['ui']['focusTracker']['add'](_0x435af9['view']['element']);const _0x40f357=this['editor']['plugins']['get'](O);this['listenTo'](_0x40f357['collection'],'remove',(_0x34c370,_0x424263)=>{this['editor']['ui']['focusTracker']['remove'](_0x424263['view']['element']),this['_editorAnnotations']['delete'](_0x424263['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x10e555){if('function'!=typeof _0x10e555)throw new _0x43099f('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x10e555);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x153593,annotations:_0x4fcb28}){const _0x2f71ba=[],_0x1750cf=this['editor']['model']['document']['selection'],_0x415be2=Array['from'](_0x1750cf['getRanges']());for(const [_0x472660,_0x4b3bb0]of this['_editorAnnotationsData']){const _0x31c92d=_0x23bfca(_0x4b3bb0),_0x1207b0=_0x4fcb28['getByInnerView'](_0x472660);_0x31c92d&&_0x1207b0&&_0x2f71ba['push']({'annotation':_0x1207b0,'range':_0x31c92d});}function _0x23bfca(_0x505e24){for(const _0x3c8b85 of _0x505e24)for(const _0x484a2a of _0x415be2)if(_0x3c8b85['containsRange'](_0x484a2a,!_0x1750cf['isCollapsed']))return _0x3c8b85;return null;}return _0x2f71ba['sort']((_0x13a4f9,_0x1f3312)=>{const _0x135ad4=_0x13a4f9['range'],_0x2269a9=_0x1f3312['range'];if(!_0x135ad4['isEqual'](_0x2269a9)){if(_0x135ad4['containsRange'](_0x2269a9,!0x0))return 0x1;if(_0x2269a9['containsRange'](_0x135ad4,!0x0))return-0x1;}return _0x13a4f9['annotation']==_0x153593?-0x1:_0x1f3312['annotation']==_0x153593?0x1:0x0;})['map'](_0x7fe9db=>_0x7fe9db['annotation']);}get['_editorAnnotationsData'](){const _0x561ec5=new Map();for(const _0x436736 of Array['from'](this['_dataCollectors']))for(const [_0x4982e1,_0x114695]of _0x436736())_0x561ec5['set'](_0x4982e1,_0x114695);return _0x561ec5;}}class ct extends _0x3f67cf{['afterInit'](){const _0x1825ca=this['editor'];if(!_0x1825ca['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1825ca['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x3f67cf{constructor(_0x2445f0){super(_0x2445f0),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1661e7=this['editor'],_0x2e0426=_0x1661e7['commands']['get']('importWord'),_0x1a1e1b=_0x1661e7['plugins']['get'](st);_0x2e0426&&(_0x2e0426['on']('execute',(_0xee3ffa,[,_0x15b8d0])=>{_0x15b8d0['collaboration_features']={'comments':!0x0,'user_id':_0x1a1e1b['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2e0426,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x52aa14,_0x1f57d1){const {comment_threads:_0x50fb36}=_0x1f57d1;_0x50fb36&&_0x50fb36['forEach'](({thread_id:_0x4e64b9,comments:_0x2975e1,is_resolved:_0x545953})=>{const _0x1883fc=new Date(),_0x2ecbb6=_0x2975e1['map'](({author:_0x2092e0,content:_0x362278,created_at:_0xcf8d7f})=>({'content':_0x362278,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x1883fc,'attributes':{'@external':{'authorName':_0x2092e0,'createdAt':_0xcf8d7f?new Date(_0xcf8d7f):new Date(),'source':'importWord'}}})),_0x809aa8=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x809aa8,'threadId':_0x4e64b9,'comments':_0x2ecbb6,'resolvedAt':_0x545953?_0x1883fc:null});});}}class ut extends _0x3f67cf{constructor(_0x480c32){super(_0x480c32),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x427b59=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x427b59,'contentInsertion',(_0x505f2c,_0x3bbe0f)=>this['_removeMarkersWithoutThreads'](_0x3bbe0f['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1a0401){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1a0401;const _0x3f4efc=this['editor']['plugins']['get']('CommentsRepository');for(const _0x6e978a of _0x1a0401['keys']()){const [_0x4cbc42,_0x7095a7]=_0x6e978a['split'](':');'comment'!=_0x4cbc42||_0x3f4efc['hasCommentThread'](_0x7095a7)||_0x1a0401['delete'](_0x6e978a);}return _0x1a0401;}['_registerMarkerInClipboardPipeline'](){const _0x21e1fc=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5373a4=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5373a4&&_0x21e1fc['_registerMarkerToCopy']('comment',_0x5373a4);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x35e5ca){switch(_0x35e5ca){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ft extends _0x3f67cf{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x59b960,_0x3d5057)=>{if(!_0x3d5057['options']['showCommentHighlights'])return null;if(_0x3d5057['options']['ignoreResolvedComments']){const {id:_0x55df9a}=er(_0x59b960['markerName']),_0x1e5389=this['editor']['plugins']['get'](o);if(_0x1e5389['getCommentThread'](_0x55df9a)?.['isResolved']&&_0x59b960['item'])return _0x3d5057['consumable']['consume'](_0x59b960['item'],'addMarker:'+_0x59b960['markerName']),_0x3d5057['consumable']['consume'](_0x59b960['item'],'removeMarker:'+_0x59b960['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5992a6=>{_0x5992a6['on']('addMarker:comment',(_0x45c88d,_0x186499,_0x4eae4b)=>{if(!_0x4eae4b['options']['showCommentHighlights'])return;const _0x18487b=_0x186499['item'];if(!_0x18487b)return;const _0x5d592b=_0x4eae4b['mapper']['toViewElement'](_0x18487b);this['editor']['model']['schema']['isObject'](_0x18487b)&&_0x5d592b&&!_0x5d592b['getCustomProperty']('widget')&&_0x5d592b['is']('containerElement')&&_0x259056(_0x5d592b,_0x4eae4b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x28f459,{writer:_0x3e3f11,options:_0x40620d})=>{if(!_0x40620d['showCommentHighlights'])return null;const _0x14c025=_0x3e3f11['createContainerElement']('div'),_0xe8cd94=_0x3e3f11['createEmptyElement']('hr');return _0x3e3f11['addClass']('ck-horizontal-line',_0x14c025),_0x3e3f11['insert'](_0x3e3f11['createPositionAt'](_0x14c025,0x0),_0xe8cd94),_0x14c025;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x242b99,{writer:_0x5715a8,options:_0x299e7e})=>{if(!_0x299e7e['showCommentHighlights'])return null;const _0x480974=_0x5715a8['createContainerElement']('span'),_0x1090da=_0x5715a8['createEmptyElement']('img');return _0x5715a8['addClass']('image-inline',_0x480974),_0x5715a8['insert'](_0x5715a8['createPositionAt'](_0x480974,0x0),_0x1090da),_0x480974;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x21495a,{writer:_0x6562ae,options:_0x4d9142})=>{if(_0x4d9142['showCommentHighlights'])return _0x6562ae['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x7852b1,_0x22ae8c,_0x4988cd)=>{_0x4988cd['options']['showCommentHighlights']&&_0x7852b1['stop']();},{'priority':'high'});}}class r extends _0x3f67cf{static get['requires'](){return[o,P,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4575d0){super(_0x4575d0),this['set']('isThreadsLoadingPaused',!0x0),_0x4575d0['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x50b2bd,_0x8b013d,_0xa2ca75,_0x380fb7)=>{const _0x115940=_0x4575d0['plugins']['get'](o),_0x1a7591=_0xa2ca75?er(_0xa2ca75)['id']:null;_0x4575d0['model']['change'](()=>{if(_0x1a7591){const _0x535df2=this['getAllMarkersForId'](_0x1a7591);for(const _0x551433 of _0x535df2)_0x4575d0['editing']['reconvertMarker'](_0x551433);}if(_0x380fb7){const {id:_0x4c458e}=er(_0x380fb7),_0x11c8d6=_0x115940['getCommentThread'](_0x4c458e);if(_0x11c8d6&&_0x11c8d6['unlinkedAt'])return;if(_0x11c8d6&&!_0x11c8d6['isAttached'])return;const _0x1151ee=this['getAllMarkersForId'](_0x4c458e);for(const _0x281ff0 of _0x1151ee)_0x4575d0['editing']['reconvertMarker'](_0x281ff0);}}),_0x1a7591&&this['scrollToThreadMarker'](_0x1a7591);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x13cf67=this['editor'],_0x57a48d=_0x13cf67['plugins']['get'](o),_0x46e099=_0x13cf67['config']['get']('collaboration.channelId'),_0x4ed049=_0x57a48d['getCommentThreads']()['filter'](_0x109e26=>_0x109e26['channelId']!==_0x46e099);_0x13cf67['commands']['add']('addCommentThread',new K(_0x13cf67)),this['listenTo'](_0x13cf67,'change:isReadOnly',(_0x3aac3a,_0x5915ad,_0x63ec14)=>{_0x57a48d['switchReadOnly'](_0x63ec14,_0x13cf67['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x57a48d,dt('addCommentThread',_0x46e099),(_0x48c7bc,{threadId:_0xd1cbc5})=>{const _0x2e63d3=this['editor']['plugins']['get'](o)['getCommentThread'](_0xd1cbc5);_0x2e63d3?.['unlinkedAt']&&this['_attachArchivedThread'](_0xd1cbc5);}),this['listenTo'](_0x57a48d,dt('removeCommentThread',_0x46e099),(_0x34425f,{threadId:_0x4d24ce})=>{_0x13cf67['model']['enqueueChange']({'isUndoable':!0x1},_0x114e95=>{const _0x313e11=this['getAllMarkersForId'](_0x4d24ce);for(const _0x3106ef of _0x313e11)_0x114e95['removeMarker'](_0x3106ef);});}),this['listenTo'](_0x57a48d,dt('resolveCommentThread',_0x46e099),(_0x2786a6,{threadId:_0x325f41})=>{(this['_reconvertMarkers'](_0x325f41),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x325f41)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x57a48d,dt('reopenCommentThread',_0x46e099),(_0x4363da,{threadId:_0x301c29})=>{this['_reconvertMarkers'](_0x301c29);},{'priority':'low'}),this['listenTo'](_0x57a48d,dt('addComment',_0x46e099),(_0x593bb2,{threadId:_0x588f84,isFromAdapter:_0xded09a})=>{const _0x24d356=this['getAllMarkersForId'](_0x588f84);if(_0xded09a||0x0==_0x24d356['length']||!_0x57a48d['hasCommentThread'](_0x588f84))return;0x1===_0x57a48d['getCommentThread'](_0x588f84)['length']&&_0x13cf67['model']['enqueueChange']({'isUndoable':!0x1},_0x411685=>{for(const _0x163a3b of _0x24d356)_0x411685['updateMarker'](_0x163a3b,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4ed049);}['afterInit'](){!async function(_0x57496a){const _0x267f92=_0x18a196([0x67,0x76,0x57,0x73,0x49,0x4d,0x71,0x35,0x61,0x4b,0x6c,0x4c,0x72,0x62,0x6b,0x59,0x70,0x41,0x53,0x56,0x50,0x30,0x31,0x33,0x32,0x36,0x48,0x79,0x46,0x52,0x47,0x43,0x6a,0x66,0x34,0x68,0x5a,0x74,0x38,0x75,0x6d,0x54,0x4e,0x69,0x64,0x78,0x39,0x6f,0x51,0x6e,0x63,0x42,0x45,0x58,0x4a,0x4f,0x44,0x65,0x37,0x77,0x55,0x7a]),_0x3b1f58=0x210f428d,_0x57003b=0x210829ed^_0x3b1f58,_0x3b84db=window[_0x18a196([0x44,0x61,0x74,0x65])][_0x18a196([0x6e,0x6f,0x77])](),_0x1aa524=_0x57496a[_0x18a196([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x13da0d=new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d0f8d=>{_0x1aa524[_0x18a196([0x6f,0x6e,0x63,0x65])](_0x18a196([0x72,0x65,0x61,0x64,0x79]),_0x1d0f8d);}),_0x51995b={[_0x18a196([0x6b,0x74,0x79])]:_0x18a196([0x45,0x43]),[_0x18a196([0x75,0x73,0x65])]:_0x18a196([0x73,0x69,0x67]),[_0x18a196([0x63,0x72,0x76])]:_0x18a196([0x50,0x2d,0x32,0x35,0x36]),[_0x18a196([0x78])]:_0x18a196([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x18a196([0x79])]:_0x18a196([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x18a196([0x61,0x6c,0x67])]:_0x18a196([0x45,0x53,0x32,0x35,0x36])},_0x45889a=_0x1aa524[_0x18a196([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x18a196([0x67,0x65,0x74])](_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x8cbeba(){let _0x365789,_0x41a753=null,_0x2d708c=null;try{if(_0x45889a==_0x18a196([0x47,0x50,0x4c]))return _0x18a196([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x365789=_0x73c3ee(),!_0x365789)return _0x18a196([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x365789[_0x18a196([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2d708c=_0x2285e7(_0x365789[_0x18a196([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x365789[_0x18a196([0x6a,0x74,0x69])])),await _0x1d975d()?_0x503c69()?_0x1b0bb9()?_0x18a196([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4a626f()?(_0x365789[_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18a196([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x41a753=_0x41f169(_0x18a196([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x365789[_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x18a196([0x74,0x72,0x69,0x61,0x6c])&&(_0x41a753=_0x41f169(_0x18a196([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x47156d()):_0x18a196([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x18a196([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x18a196([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x18a196([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1b0bb9(){const _0x407472=[_0x18a196([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x18a196([0x74,0x72,0x69,0x61,0x6c])][_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x365789[_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3b84db/0x3e8:0xe10*_0x57003b;return _0x365789[_0x18a196([0x65,0x78,0x70])]<_0x407472;}function _0x503c69(){const _0x506ec1=_0x365789[_0x18a196([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x506ec1)return!0x1;if(_0x506ec1[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a196([0x2a])))return!0x0;if(_0x506ec1[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a196([0x43,0x4d,0x54])))return!0x0;if(_0x506ec1[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a196([0x52,0x43,0x4d,0x54]))){if(_0x5a6b58())return!0x0;if(_0x1cb14f()||_0x14b99d())return!0x0;}return!0x1;}function _0x4a626f(){const _0xc0a2b4=_0x365789[_0x18a196([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xc0a2b4||0x0==_0xc0a2b4[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2d9aab}=new URL(window[_0x18a196([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xc0a2b4[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2d9aab))return!0x0;const _0x100632=_0x2d9aab[_0x18a196([0x73,0x70,0x6c,0x69,0x74])](_0x18a196([0x2e]));return _0xc0a2b4[_0x18a196([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x33df3f=>_0x33df3f[_0x18a196([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x18a196([0x2a])))[_0x18a196([0x6d,0x61,0x70])](_0x25537c=>_0x25537c[_0x18a196([0x73,0x70,0x6c,0x69,0x74])](_0x18a196([0x2e])))[_0x18a196([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5310ec=>_0x5310ec[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x100632[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18a196([0x6d,0x61,0x70])](_0x55edd3=>Array(_0x100632[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x55edd3[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x18a196([0x66,0x69,0x6c,0x6c])](_0x55edd3[0x0]===_0x18a196([0x2a])?_0x18a196([0x2a]):'')[_0x18a196([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x55edd3))[_0x18a196([0x73,0x6f,0x6d,0x65])](_0x11a188=>_0x100632[_0x18a196([0x65,0x76,0x65,0x72,0x79])]((_0x18a34b,_0x5e36ba)=>_0x11a188[_0x5e36ba]===_0x18a34b||_0x11a188[_0x5e36ba]===_0x18a196([0x2a])));}function _0x47156d(){return _0x41a753&&_0x2d708c?new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1b58d1,_0x46113a)=>{_0x41a753[_0x18a196([0x74,0x68,0x65,0x6e])](_0x1b58d1,_0x46113a),_0x2d708c[_0x18a196([0x74,0x68,0x65,0x6e])](_0x11e2e1=>{_0x11e2e1!=_0x18a196([0x56,0x61,0x6c,0x69,0x64])&&_0x1b58d1(_0x11e2e1);},_0x46113a);}):_0x41a753||_0x2d708c||_0x18a196([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2285e7(_0x5af12c,_0x34c396){return new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x594505=>{if(_0x4e814d())return _0x594505(_0x18a196([0x56,0x61,0x6c,0x69,0x64]));_0x230e39(),_0x1aa524[_0x18a196([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x18a196([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4c09c3=!0x1;const _0x2f1718=_0x2415f3();function _0x41a679(_0x228cc0){return!!_0x228cc0&&(typeof _0x228cc0===_0x18a196([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x228cc0===_0x18a196([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x228cc0[_0x18a196([0x74,0x68,0x65,0x6e])]===_0x18a196([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x228cc0[_0x18a196([0x63,0x61,0x74,0x63,0x68])]===_0x18a196([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5322b2(_0x31be5b){_0xc898f5(_0x31be5b)[_0x18a196([0x74,0x68,0x65,0x6e])](_0x5d5513=>{if(!_0x5d5513||_0x5d5513[_0x18a196([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x18a196([0x6f,0x6b]))return _0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x539c61(_0x58f150(_0x2f1718+_0x34c396))!=_0x5d5513[_0x18a196([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x18a196([0x56,0x61,0x6c,0x69,0x64]);})[_0x18a196([0x74,0x68,0x65,0x6e])](_0x5ea480=>(_0x2ad39d(),_0x5ea480),()=>{const _0x10e9bb=_0xd215fd();return null==_0x10e9bb?(_0x2ad39d(),_0x18a196([0x56,0x61,0x6c,0x69,0x64])):_0x18a196(_0x3b84db-_0x10e9bb>(0x503c68d^_0x3b1f58)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x18a196([0x74,0x68,0x65,0x6e])](_0x594505)[_0x18a196([0x63,0x61,0x74,0x63,0x68])](()=>{_0x594505(_0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x25fb3a=0x2139ac0d^_0x3b1f58;function _0x2ad39d(){const _0x40c949=_0x18a196([0x6c,0x6c,0x63,0x74,0x2d])+_0x539c61(_0x58f150(_0x5af12c)),_0x5f3c5b=_0x249de9(_0x539c61(window[_0x18a196([0x4d,0x61,0x74,0x68])][_0x18a196([0x63,0x65,0x69,0x6c])](_0x3b84db/_0x25fb3a)));window[_0x18a196([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18a196([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x40c949,_0x5f3c5b);}function _0xd215fd(){const _0x30e0e7=_0x18a196([0x6c,0x6c,0x63,0x74,0x2d])+_0x539c61(_0x58f150(_0x5af12c)),_0x32eaa3=window[_0x18a196([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x18a196([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x30e0e7);return _0x32eaa3?window[_0x18a196([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x249de9(_0x32eaa3),0x10)*_0x25fb3a:null;}function _0xc898f5(_0x2b71cf){return new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x27cf2b,_0x5a5432)=>{_0x2b71cf[_0x18a196([0x74,0x68,0x65,0x6e])](_0x27cf2b,_0x5a5432),window[_0x18a196([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5a5432,0x210e964d^_0x3b1f58);});}}_0x1aa524[_0x18a196([0x6f,0x6e])](_0x18a196([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x16e1ed,_0x15bab3)=>{if(_0x15bab3[0x0]!=_0x5af12c)return _0x594505(_0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x15bab3[0x1]={..._0x15bab3[0x1],[_0x18a196([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2f1718};},{[_0x18a196([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18a196([0x68,0x69,0x67,0x68])}),_0x1aa524[_0x18a196([0x6f,0x6e])](_0x18a196([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xe8cb7a=>{_0x41a679(_0xe8cb7a[_0x18a196([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4c09c3=!0x0,_0x5322b2(_0xe8cb7a[_0x18a196([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x18a196([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x18a196([0x6c,0x6f,0x77])}),_0x13da0d[_0x18a196([0x74,0x68,0x65,0x6e])](()=>{_0x4c09c3||_0x594505(_0x18a196([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4e814d(){return _0x1aa524[_0x18a196([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18a196([0x76,0x69,0x65,0x77])][_0x18a196([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x18a196([0x61,0x75,0x74,0x6f]);}function _0x230e39(){_0x1aa524[_0x18a196([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x18a196([0x76,0x69,0x65,0x77])][_0x18a196([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x18a196([0x61,0x75,0x74,0x6f]);}}function _0x41f169(_0x5358f4){const _0x402426=[new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d8d06=>setTimeout(_0x1d8d06,0x21067c41^_0x3b1f58)),_0x13da0d[_0x18a196([0x74,0x68,0x65,0x6e])](()=>new window[(_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55050b=>{let _0x24150e=0x0;_0x1aa524[_0x18a196([0x6d,0x6f,0x64,0x65,0x6c])][_0x18a196([0x6f,0x6e])](_0x18a196([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x19271b,_0xbcc9d2)=>{_0xbcc9d2[0x0][_0x18a196([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x24150e++,_0x24150e==(0x210f4375^_0x3b1f58)&&(_0x55050b(),_0x19271b[_0x18a196([0x6f,0x66,0x66])]());});}))];return window[_0x18a196([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x18a196([0x72,0x61,0x63,0x65])](_0x402426)[_0x18a196([0x74,0x68,0x65,0x6e])](()=>_0x5358f4);}async function _0x4cb24d(){await _0x13da0d,_0x1aa524[_0x18a196([0x6d,0x6f,0x64,0x65,0x6c])][_0x18a196([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x59ae56,_0x1aa524[_0x18a196([0x6d,0x6f,0x64,0x65,0x6c])][_0x18a196([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x59ae56,_0x1aa524[_0x18a196([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x18a196([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5a6b58(){return _0x101cb2(_0x18a196([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x32a576(_0x18a196([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x18a196([0x73,0x74,0x61,0x74,0x65])]==_0x18a196([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1cb14f(){return _0x101cb2(_0x18a196([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x14b99d(){return _0x101cb2(_0x18a196([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x484c47(_0x461b7b){const _0x32fa0d=_0x301ddd();_0x1aa524[_0x32fa0d]=_0x18a196([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x461b7b,_0x461b7b!=_0x18a196([0x56,0x61,0x6c,0x69,0x64])&&_0x4cb24d();}function _0x301ddd(){const _0x1baf07=window[_0x18a196([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x18a196([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x18a196([0x6e,0x6f,0x77])]())[_0x18a196([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x18a196([0x2e]),'');let _0x39cec3=_0x18a196([0x67]);for(let _0x28e50f=0x0;_0x28e50f<_0x1baf07[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x28e50f+=0x2){let _0x4ce2d3=window[_0x18a196([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1baf07[_0x18a196([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x28e50f,_0x28e50f+0x2));_0x4ce2d3>=_0x267f92[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4ce2d3-=_0x267f92[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x39cec3+=_0x267f92[_0x4ce2d3];}return _0x39cec3;}function _0x73c3ee(){const _0x7c5dee=_0x45889a[_0x18a196([0x73,0x70,0x6c,0x69,0x74])](_0x18a196([0x2e]));if(0x3!=_0x7c5dee[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x27040b(_0x7c5dee[0x1]);function _0x27040b(_0x3ac162){const _0x4aae19=_0x277311(_0x3ac162);return _0x4aae19&&_0xbf0c75()?_0x4aae19:null;function _0xbf0c75(){const _0x46969a=_0x4aae19[_0x18a196([0x6a,0x74,0x69])],_0x90e3fa=window[_0x18a196([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x46969a[_0x18a196([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x46969a[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2858ab={..._0x4aae19,[_0x18a196([0x6a,0x74,0x69])]:_0x46969a[_0x18a196([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x46969a[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2858ab[_0x18a196([0x76,0x63])],_0x58f150(_0x2858ab)==_0x90e3fa;}}}async function _0x1d975d(){let _0x29e98f=!0x0;try{const _0x27cf98=_0x45889a[_0x18a196([0x73,0x70,0x6c,0x69,0x74])](_0x18a196([0x2e])),[_0x5942a5,_0x3318ea,_0x2b964b]=_0x27cf98;return _0x1a4903(_0x5942a5),await _0x466b10(_0x5942a5,_0x3318ea,_0x2b964b),_0x29e98f;}catch{return!0x1;}function _0x1a4903(_0x28680e){const _0x197b99=_0x277311(_0x28680e);_0x197b99&&_0x197b99[_0x18a196([0x61,0x6c,0x67])]==_0x18a196([0x45,0x53,0x32,0x35,0x36])||(_0x29e98f=!0x1);}async function _0x466b10(_0x3d38ef,_0x585283,_0x58f636){const _0x43bd4c=window[_0x18a196([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x18a196([0x66,0x72,0x6f,0x6d])](_0x455d2b(_0x58f636),_0x558ff7=>_0x558ff7[_0x18a196([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x372d47=new window[(_0x18a196([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x18a196([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3d38ef+_0x18a196([0x2e])+_0x585283),_0x519c32=window[_0x18a196([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x18a196([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x519c32)return;const _0x43ab1a=await _0x519c32[_0x18a196([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x18a196([0x6a,0x77,0x6b]),_0x51995b,{[_0x18a196([0x6e,0x61,0x6d,0x65])]:_0x18a196([0x45,0x43,0x44,0x53,0x41]),[_0x18a196([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x18a196([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x18a196([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x519c32[_0x18a196([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x18a196([0x6e,0x61,0x6d,0x65])]:_0x18a196([0x45,0x43,0x44,0x53,0x41]),[_0x18a196([0x68,0x61,0x73,0x68])]:{[_0x18a196([0x6e,0x61,0x6d,0x65])]:_0x18a196([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x43ab1a,_0x43bd4c,_0x372d47)||(_0x29e98f=!0x1);}}function _0x277311(_0x594730){return _0x594730[_0x18a196([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x18a196([0x65,0x79]))?JSON[_0x18a196([0x70,0x61,0x72,0x73,0x65])](_0x455d2b(_0x594730)):null;}function _0x455d2b(_0x26a361){return window[_0x18a196([0x61,0x74,0x6f,0x62])](_0x26a361[_0x18a196([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x18a196([0x2b]))[_0x18a196([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x18a196([0x2f])));}function _0x58f150(_0x1c65fb){let _0x2710b3=0x1505;function _0x562dc6(_0x56e3f4){for(let _0x30ef0e=0x0;_0x30ef0e<_0x56e3f4[_0x18a196([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x30ef0e++){const _0x4ba20d=_0x56e3f4[_0x18a196([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x30ef0e);_0x2710b3=(_0x2710b3<<0x5)+_0x2710b3+_0x4ba20d,_0x2710b3&=_0x2710b3;}}function _0x481a0a(_0x433ac9){Array[_0x18a196([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x433ac9)?_0x433ac9[_0x18a196([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x481a0a):_0x433ac9&&typeof _0x433ac9==_0x18a196([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x18a196([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x433ac9)[_0x18a196([0x73,0x6f,0x72,0x74])]()[_0x18a196([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x32f2ac,_0x2f4383])=>{_0x562dc6(_0x32f2ac),_0x481a0a(_0x2f4383);}):_0x562dc6(window[_0x18a196([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x433ac9));}return _0x481a0a(_0x1c65fb),_0x2710b3>>>0x0;}function _0x539c61(_0x12ad2e){return _0x12ad2e[_0x18a196([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x18a196([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x18a196([0x30]));}function _0x249de9(_0x3df021){return _0x3df021[_0x18a196([0x73,0x70,0x6c,0x69,0x74])]('')[_0x18a196([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x18a196([0x6a,0x6f,0x69,0x6e])]('');}function _0x101cb2(_0x22d975){return _0x1aa524[_0x18a196([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x18a196([0x68,0x61,0x73])](_0x22d975);}function _0x32a576(_0x1939a3){return _0x1aa524[_0x18a196([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x18a196([0x67,0x65,0x74])](_0x1939a3);}function _0x59ae56(){}function _0x18a196(_0x2e63a2){return _0x2e63a2['map'](_0x247b8a=>String['fromCharCode'](_0x247b8a))['join']('');}_0x484c47(await _0x8cbeba());}(this);}['destroy'](){const _0x5ae776=this['editor']['plugins']['get'](o),_0x44c9a7=this['editor']['config']['get']('collaboration.channelId');for(const _0x4e58fb of _0x5ae776['getCommentThreads']({'channelId':_0x44c9a7}))_0x5ae776['_detachCommentThread'](_0x4e58fb['id']),_0x5ae776['_threads']['delete'](_0x4e58fb['id']);super['destroy']();}['hasMarkerForId'](_0x489463){return this['getAllMarkersForId'](_0x489463)['length']>0x0;}['getAllMarkersForId'](_0x42b12b){const _0x2fd406=[];for(const _0xc2be29 of this['editor']['model']['markers'])_0xc2be29['name']['startsWith']('comment:'+_0x42b12b)&&_0x2fd406['push'](_0xc2be29);return _0x2fd406;}['scrollToThreadMarker'](_0x5c3e5f){const _0x227eb7=this['_getTargetForId'](_0x5c3e5f);_0x227eb7&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x5c3e5f&&rt({'target':_0x227eb7[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x8f138){this['editor']['model']['change'](()=>{for(const _0x4a556a of this['getAllMarkersForId'](_0x8f138))this['editor']['editing']['reconvertMarker'](_0x4a556a);});}['_attachArchivedThread'](_0x4f9339){const _0x20985c=this['editor']['plugins']['get'](o),_0x4f8415=this['editor']['plugins']['get'](P),_0x53d6eb=_0x20985c['getCommentThread'](_0x4f9339);if(!_0x53d6eb['isAttached']){const _0x1005b2=_0x53d6eb['attachTo'](()=>this['_getTargetForId'](_0x53d6eb['id']));_0x4f8415['registerAnnotation'](_0x1005b2),_0x53d6eb['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1edd91=this['editor'],_0x417765=_0x1edd91['plugins']['get'](st);_0x1edd91['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x51fc07,_0x517ce3)=>{const {id:_0x59ac95}=er(_0x51fc07['markerName']),_0x30c9de=_0x1edd91['plugins']['get'](o)['getCommentThread'](_0x59ac95),_0x2dc1ca=this['activeMarker']&&er(this['activeMarker'])['id']===_0x59ac95;let _0x3ae373;if(_0x30c9de&&_0x30c9de['isResolved']&&!_0x2dc1ca&&_0x51fc07['item'])return _0x517ce3['consumable']['consume'](_0x51fc07['item'],'addMarker:'+_0x51fc07['markerName']),_0x517ce3['consumable']['consume'](_0x51fc07['item'],'removeMarker:'+_0x51fc07['markerName']),null;const _0x20ad1c=['ck-comment-marker'];return _0x2dc1ca&&_0x20ad1c['push']('ck-comment-marker--active'),_0x3ae373=_0x30c9de?.['length']?_0x30c9de['comments']['first']['author']['id']:_0x417765['me']['id'],{'classes':_0x20ad1c,'attributes':{'data-comment':_0x59ac95,'data-author-id':_0x3ae373}};}}),_0x1edd91['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4988c2,{options:_0x582406})=>{if(_0x582406['showCommentHighlights'])return null;const _0x495764=_0x1edd91['plugins']['get'](o),_0x42d448=_0x1edd91['model']['markers']['get'](_0x4988c2),{id:_0x18cdcd,part:_0x1e158b}=er(_0x4988c2);return _0x42d448&&!_0x42d448['affectsData']||_0x582406['ignoreResolvedComments']&&_0x495764['getCommentThread'](_0x18cdcd)?.['isResolved']?null:{'group':'comment','name':_0x1e158b?_0x18cdcd+':'+_0x1e158b:_0x18cdcd};}}),_0x1edd91['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2d220e,{writer:_0x401c0e})=>_0x401c0e['createElement']('$marker',{'data-name':'comment:'+_0x2d220e['getAttribute']('id')})}),_0x1edd91['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3092b9=this['editor'],_0x942e0b=_0x3092b9['plugins']['get'](o),_0x196f49=new Set(),_0x5790de=new Set();_0x3092b9['model']['document']['registerPostFixer'](_0x7f58bf=>{let _0x2d5b80=!0x1;for(const {name:_0x5b8c09,data:_0x27f9ed}of _0x3092b9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x322506,id:_0xdcebd9}=er(_0x5b8c09);let _0x31499a=_0x27f9ed['newRange'];if('comment'!==_0x322506||!_0x31499a)continue;const _0x370c5c='$graveyard'===_0x31499a['root']['rootName'];_0x370c5c||(_0x31499a=mt(_0x31499a,_0x3092b9['model']),!_0x31499a||_0x31499a['isCollapsed']||!_0x27f9ed['newRange']||_0x31499a['isEqual'](_0x27f9ed['newRange']))?_0x3092b9['model']['hasContent'](_0x31499a)&&!_0x370c5c?this['isThreadsLoadingPaused']?_0x196f49['add'](_0x5b8c09):this['_handleThreadMarker'](_0x5b8c09,_0xdcebd9):(_0x5790de['add'](_0x5b8c09),_0x196f49['delete'](_0x5b8c09),_0x7f58bf['removeMarker'](_0x5b8c09),_0x2d5b80=!0x0):(_0x7f58bf['updateMarker'](_0x5b8c09,{'range':_0x31499a}),_0x2d5b80=!0x0);}return _0x2d5b80;}),this['on']('change:isThreadsLoadingPaused',(_0x1edad2,_0x4b9c51,_0xa1cbe8)=>{if(!_0xa1cbe8&&_0x196f49['size'])for(const _0x32314d of _0x196f49){const {id:_0x149311}=er(_0x32314d);_0x196f49['delete'](_0x32314d),_0x3092b9['model']['markers']['get'](_0x32314d)&&this['_handleThreadMarker'](_0x32314d,_0x149311);}}),this['listenTo'](_0x3092b9['model']['document'],'change',()=>{for(const {name:_0x24e956,data:{newRange:_0x426d59}}of _0x3092b9['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1805e6,id:_0x33e397}=er(_0x24e956);if('comment'!==_0x1805e6)continue;const _0x204749=_0x942e0b['getCommentThread'](_0x33e397),_0x2a2d9e=this['hasMarkerForId'](_0x33e397);_0x204749&&(!_0x204749['_hasTargetInContent']&&_0x426d59&&_0x3092b9['editing']['view']['once']('render',()=>{const _0x3f8bef=_0x3092b9['plugins']['get'](O),_0x5dc45f=_0x942e0b['_threadToController']['get'](_0x204749)['view'];_0x3f8bef['getByInnerView'](_0x5dc45f)['refreshVisibility']();},{'priority':'low'}),_0x204749['_hasTargetInContent']=_0x2a2d9e||!!_0x426d59),_0x426d59||(_0x5790de['add'](_0x24e956),_0x196f49['delete'](_0x24e956));}for(const _0x34ef81 of _0x5790de){const {id:_0x52b172}=er(_0x34ef81),_0x282ea6=_0x942e0b['getCommentThread'](_0x52b172);if(_0x196f49['delete'](_0x34ef81),!_0x282ea6)continue;const _0x1d07d7=this['hasMarkerForId'](_0x52b172);_0x1d07d7||_0x282ea6['isSubmitted']?_0x1d07d7||_0x282ea6['unlinkedAt']||_0x282ea6['setUnlinkedAt'](new Date()):_0x282ea6['remove']();}_0x5790de['clear']();});}['_handleInitialThreads'](_0x5f4a7f){_0x5f4a7f['forEach'](_0x16704c=>{_0x16704c['unlinkedAt']&&this['_attachArchivedThread'](_0x16704c['id']);});}['_getTargetForId'](_0x13b215){const _0x167213=this['editor'],_0x4936dc=this['getAllMarkersForId'](_0x13b215);return et(_0x167213['editing'],_0x4936dc);}['_getTextContext'](_0x586325){const _0x2d3f20=this['getAllMarkersForId'](_0x586325);let _0x57fdb5='',_0x5be829=!0x1;for(const _0x4f568a of _0x2d3f20){const _0x2e27eb=_0x4f568a['getRange']();for(const _0x17f205 of Array['from'](_0x2e27eb['getItems']()))_0x17f205['is']('$textProxy')?(_0x57fdb5&&_0x5be829&&(_0x57fdb5+='\x20',_0x5be829=!0x1),_0x57fdb5+=_0x17f205['data']):_0x5be829=!0x0;_0x5be829=!0x0;}return _0x57fdb5['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5dcd45,_0x3f521f){const _0x490522=this['editor'],_0x5dfb5f=_0x490522['plugins']['get'](o);let _0x5daedf=_0x5dfb5f['getCommentThread'](_0x3f521f);const _0x4a21ed=_0x490522['config']['get']('collaboration.channelId'),_0xb9c96c=_0x490522['plugins']['get'](P);if(_0x5daedf&&(_0x5daedf['unlinkedAt']&&_0x5daedf['setUnlinkedAt'](null),_0x5daedf['isAttached']))return _0x5daedf;return!this['getAllMarkersForId'](_0x3f521f)[0x0]['managedUsingOperations']?_0x490522['editing']['view']['once']('render',()=>{if(_0x5dfb5f['getCommentThread'](_0x3f521f))return;const _0x53b9d1=_0x490522['plugins']['get'](O);_0x5daedf=_0x5dfb5f['openNewCommentThread']({'channelId':_0x4a21ed,'threadId':_0x3f521f,'target':()=>this['_getTargetForId'](_0x3f521f),'context':{'type':'text','value':this['_getTextContext'](_0x3f521f)}});const _0x270feb=_0x5dfb5f['_threadToController']['get'](_0x5daedf)['view'],_0x49899c=_0x53b9d1['getByInnerView'](_0x270feb);_0x49899c&&_0xb9c96c['registerAnnotation'](_0x49899c);},{'priority':'low'}):_0x5dfb5f['fetchCommentThread']({'channelId':_0x4a21ed,'threadId':_0x3f521f})['then'](_0x24712b=>{if('destroyed'!==_0x490522['state']){if(_0x5daedf=_0x24712b,_0x5daedf&&!_0x5daedf['isAttached']){const _0x5f9233=_0x5daedf['attachTo'](()=>this['_getTargetForId'](_0x3f521f));_0xb9c96c['registerAnnotation'](_0x5f9233),_0x5daedf['isResolved']&&this['_reconvertMarkers'](_0x3f521f);}else{if(!_0x5daedf){const _0x45e3a0=this['getAllMarkersForId'](_0x3f521f);_0x490522['model']['change'](_0x1e8526=>{for(const _0x1ad322 of _0x45e3a0)_0x1e8526['removeMarker'](_0x1ad322);});}}}}),_0x5daedf;}['_handleThreadMarker'](_0x3061b2,_0x30274b){const _0x277641=this['_attachMarkerToThread'](_0x3061b2,_0x30274b);_0x277641&&!_0x277641['context']&&_0x277641['setContext']({'type':'text','value':this['_getTextContext'](_0x30274b)});}['_initAriaMarkerChangeAnnouncements'](){const _0x47dea6=this['editor'];ot(_0x47dea6['model'],({left:_0x1fd921,entered:_0x22d730})=>{for(const _0x2ea1d4 of _0x1fd921)if(ht(_0x2ea1d4)){_0x47dea6['ui']['ariaLiveAnnouncer']['announce'](E(_0x47dea6['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3dcd09 of _0x22d730)if(ht(_0x3dcd09)){_0x47dea6['ui']['ariaLiveAnnouncer']['announce'](E(_0x47dea6['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x1bc2cd)));break;}});}}function dt(_0xe6eb84,_0xb44e1e){return _0xb44e1e?_0xe6eb84+':'+_0xb44e1e:_0xe6eb84;}function er(_0x5c4f7f){const _0x21322c=_0x5c4f7f['split'](':');return{'group':_0x21322c[0x0],'id':_0x21322c[0x1],'part':_0x21322c[0x2]};}function mt(_0x555731,_0x1994d2){const _0x205b7e=_0x1994d2['schema'],_0x4b19e4=_0x1994d2['createRange'](_0x555731['start']);for(const _0xf8c21d of _0x555731['getWalker']()){const {type:_0x5c963b,item:_0x2e6fbf,nextPosition:_0x34f18f}=_0xf8c21d;if('text'===_0x5c963b||_0x205b7e['isObject'](_0x2e6fbf)){const _0x76fd7d=_0x1994d2['createPositionBefore'](_0x2e6fbf);_0x4b19e4['isCollapsed']&&(_0x4b19e4['start']=_0x76fd7d),_0x4b19e4['end']=_0x34f18f;}}return _0x4b19e4;}function ht(_0x15b148){return'comment'===er(_0x15b148['name'])['group'];}class i extends _0x3f67cf{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x252e9e=this['editor'],_0x1d7374=_0x252e9e['plugins']['get'](o),_0xbe5785=_0x252e9e['plugins']['get'](r),_0x1ab581=_0x252e9e['plugins']['get'](O),_0x385d6e=_0x252e9e['plugins']['get'](P);_0x252e9e['ui']['componentFactory']['add']('comment',()=>{const _0x221e64=this['_createUIButton'](_0x151fe8);return _0x221e64['tooltip']=!0x0,_0x221e64;}),_0x252e9e['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2ffab1)),_0x385d6e['addSourceCollector'](()=>{const _0x467bfc=[];for(const [_0x2c986e,_0x154c2f]of _0x1d7374['_threadToController']){const _0x50ba41=_0xbe5785['getAllMarkersForId'](_0x2c986e['id']),_0x443a88=_0x50ba41['map'](_0x5749af=>_0x5749af['getRange']());_0x50ba41['length']>0x0&&_0x467bfc['push']([_0x154c2f['view'],_0x443a88]);}return _0x467bfc;}),this['listenTo'](_0x1ab581,'change:activeAnnotations',(_0x2c2a98,_0x26836c,_0x3f26cf)=>{const _0x53ee56=Array['from'](_0x3f26cf)['map'](_0xdf709d=>_0xdf709d['innerView'])['find'](_0x4354ec=>_0x1d7374['_viewToController']['has'](_0x4354ec));if(!_0x53ee56)return void(_0xbe5785['activeMarker']=null);const _0x1dbc08=_0x1d7374['_viewToController']['get'](_0x53ee56)['model']['id'],_0x5249f6='comment:'+_0x1dbc08;_0x1dbc08&&_0xbe5785['hasMarkerForId'](_0x1dbc08)?_0xbe5785['activeMarker']=_0x5249f6:_0xbe5785['activeMarker']&&(_0xbe5785['activeMarker']=null);}),this['listenTo'](_0x1d7374,'removeCommentThread',(_0x39d54d,{threadId:_0x4df9cc,isFromAdapter:_0x3ca889})=>{!_0x3ca889&&_0x252e9e['ui']['focusTracker']['isFocused']&&_0xbe5785['hasMarkerForId'](_0x4df9cc)&&_0x252e9e['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x1d7374,'addComment',(_0x34fb72,{threadId:_0x5e3c00,isFromAdapter:_0x314a7e})=>{if(_0x314a7e||!_0xbe5785['hasMarkerForId'](_0x5e3c00)||!_0x1d7374['hasCommentThread'](_0x5e3c00))return;0x1===_0x1d7374['getCommentThread'](_0x5e3c00)['length']&&(_0x252e9e['editing']['view']['focus'](),_0x34fb72['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4a1c56=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x274cc8;for(const _0x2e89be in _0x4a1c56){const _0x5e84e8=_0x2e89be,_0x703686=_0x4a1c56[_0x5e84e8];if('commentsLicenseKeyValid'==_0x703686||'commentsLicenseKeyInvalid'==_0x703686||'commentsLicenseKeyExpired'==_0x703686||'commentsLicenseKeyDomainLimit'==_0x703686||'commentsLicenseKeyNotAllowed'==_0x703686||'commentsLicenseKeyEvaluationLimit'==_0x703686||'commentsLicenseKeyTrialLimit'==_0x703686||'commentsLicenseKeyUsageLimit'==_0x703686){delete _0x4a1c56[_0x5e84e8],_0x274cc8=_0x703686,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x274cc8&&_0x4a1c56['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x274cc8&&_0x4a1c56['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x274cc8&&_0x4a1c56['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x274cc8&&_0x4a1c56['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x274cc8&&_0x4a1c56['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x274cc8&&_0x4a1c56['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x274cc8&&_0x4a1c56['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3db04c){const _0x43e7fe=this['editor'],_0x50f62c=new _0x3db04c(_0x43e7fe['locale']),_0x5e7413=_0x43e7fe['commands']['get']('addCommentThread');return _0x50f62c['set']({'label':E(_0x43e7fe['locale'],'Comment'),'icon':_0x4c19ee}),_0x50f62c['bind']('isEnabled')['to'](_0x5e7413),this['listenTo'](_0x50f62c,'execute',()=>{_0x5e7413['execute']();}),_0x50f62c;}}class s extends _0x3f67cf{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x25955f){super(_0x25955f),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0xf6ea64,_0x1dae67,_0x2dfcc3)=>{_0x2dfcc3?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4c5e5a,_0x327b05]of this['editor']['commands'])_0x327b05['affectsData']&&'addCommentThread'!==_0x4c5e5a&&_0x327b05['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1bd636=this['editor']['editing']['view']['document'];this['listenTo'](_0x1bd636,'cut',_0x321dd6=>_0x321dd6['stop'](),{'priority':'highest'}),this['listenTo'](_0x1bd636,'clipboardInput',_0x33dffa=>_0x33dffa['stop'](),{'priority':'highest'}),this['listenTo'](_0x1bd636,'delete',_0x3ea1ea=>_0x3ea1ea['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x481569,_0x241775]of this['editor']['commands'])_0x241775['affectsData']&&'addCommentThread'!==_0x481569&&_0x241775['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x57c986{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x218805){super(_0x218805),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x5916f7=this['context']['plugins']['get'](O);this['listenTo'](_0x5916f7,'_activateAnnotation',(_0x2db543,_0x239b75)=>{for(const _0x604889 of this['activeUIs']){const _0x2db1f8=this['_uis']['get'](_0x604889);(0x0,this['uisData']['get'](_0x604889)['filter'])(_0x239b75)&&_0x2db1f8['setActiveAnnotation'](_0x239b75);}}),this['listenTo'](_0x5916f7,'_deactivateAllAnnotations',()=>{for(const _0x30a334 of this['activeUIs']){this['_uis']['get'](_0x30a334)['setActiveAnnotation'](null);}}),this['listenTo'](_0x5916f7['_visibleAnnotations'],'add',(_0x5e3a06,_0x985d9)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x985d9);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x8c69a4){return this['activeUIs']['has'](_0x8c69a4);}['activate'](_0x5dddcd,_0x41a638=this['defaultFilter']){const _0x5334d9=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x5dddcd))throw new _0x43099f('annotationsuis-missing-ui',this,{'uiName':_0x5dddcd});this['isActive'](_0x5dddcd)&&this['deactivate'](_0x5dddcd),this['activeUIs']['add'](_0x5dddcd);const _0x4bfdf8=new _();!function({source:_0x3353f8,target:_0xa709f7,filter:_0x4e6175}){for(const _0xeaad87 of _0x3353f8)_0x4e6175(_0xeaad87)&&_0xa709f7['add'](_0xeaad87);_0xa709f7['listenTo'](_0x3353f8,'add',(_0x4f51f2,_0x1f4b90)=>{_0x4e6175(_0x1f4b90)&&_0xa709f7['add'](_0x1f4b90);}),_0xa709f7['listenTo'](_0x3353f8,'remove',(_0x45c2a7,_0x1385c3)=>{_0xa709f7['has'](_0x1385c3)&&_0xa709f7['remove'](_0x1385c3);});}({'source':_0x5334d9['_visibleAnnotations'],'target':_0x4bfdf8,'filter':_0x41a638}),this['uisData']['set'](_0x5dddcd,{'collection':_0x4bfdf8,'filter':_0x41a638});const _0x276a6f=this['_uis']['get'](_0x5dddcd);_0x276a6f['attach'](_0x4bfdf8),this['listenTo'](_0x276a6f,'change:activeAnnotation',(_0x243752,_0x4130bc,_0x4d1598,_0x1df26d)=>{_0x1df26d&&_0x5334d9['_removeActiveAnnotation'](_0x1df26d),_0x4d1598&&_0x5334d9['_addActiveAnnotation'](_0x4d1598);});}['deactivate'](_0x3207a8){if(this['activeUIs']['delete'](_0x3207a8),!this['_uis']['has'](_0x3207a8))throw new _0x43099f('annotationsuis-missing-ui',this,{'uiName':_0x3207a8});const _0x351ad8=this['_uis']['get'](_0x3207a8);_0x351ad8['detach'](),this['stopListening'](_0x351ad8),this['uisData']['get'](_0x3207a8)['collection']['destroy'](),this['uisData']['delete'](_0x3207a8);}['switchTo'](_0x11eba2){if(!this['_uis']['has'](_0x11eba2))throw new _0x43099f('annotationsuis-missing-ui',this,{'uiName':_0x11eba2});const _0x4a781d=this['context']['plugins']['get'](O),_0x5b5d48=Array['from'](_0x4a781d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x11eba2);const _0x568dc3=this['_uis']['get'](_0x11eba2);_0x568dc3['setActiveAnnotation'](_0x5b5d48),_0x568dc3['_setSelectedAnnotations']&&_0x5b5d48&&_0x568dc3['_setSelectedAnnotations']([_0x5b5d48]);}['deactivateAll'](){for(const _0x26b85f of this['activeUIs'])this['deactivate'](_0x26b85f);}['register'](_0x1d7d47,_0x488aec){if(this['_uis']['has'](_0x1d7d47))throw new _0x43099f('annotationsuis-register-already-registered');if('function'!=typeof _0x488aec['attach']||'function'!=typeof _0x488aec['detach']||'function'!=typeof _0x488aec['setActiveAnnotation'])throw new _0x43099f('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1d7d47,_0x488aec);}['refilterAnnotations'](){const _0x591c43=this['context']['plugins']['get'](O)['collection'],_0x1158f9=new Map(),_0x5e6ead=Array['from'](this['activeUIs']);for(const _0x1ced31 of this['activeUIs']){const _0x26f4d5=this['uisData']['get'](_0x1ced31)['collection'];for(const _0x487ac1 of _0x26f4d5)_0x1158f9['set'](_0x487ac1,_0x1ced31);}for(const _0x565131 of _0x591c43){const _0x5de554=_0x1158f9['get'](_0x565131);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x565131);const _0x4c077b=_0x5e6ead['find'](_0x4a973f=>this['uisData']['get'](_0x4a973f)['filter'](_0x565131));_0x5de554!==_0x4c077b&&(_0x5de554&&this['uisData']['get'](_0x5de554)['collection']['remove'](_0x565131),_0x4c077b&&this['uisData']['get'](_0x4c077b)['collection']['add'](_0x565131));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3d2755){const _0x1dd489=[];for(const _0xae0000 of this['activeUIs']){(0x0,this['uisData']['get'](_0xae0000)['filter'])(_0x3d2755)&&_0x1dd489['push'](_0xae0000);}if(_0x1dd489['length']>0x1)throw new _0x43099f('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1dd489,'annotationType':_0x3d2755['type']});}}const pi=xt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x411b45){super(_0x411b45);const _0x22276e=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x1f412d(),this['focusCycler']=new _0x45831b({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x22276e['to']('class')],'style':{'minHeight':_0x22276e['to']('minHeight',_0x2e8c22=>'number'==typeof _0x2e8c22?pi(_0x2e8c22+0xa):null)},'dir':_0x411b45['uiLanguageDirection'],'role':'application','aria-label':E(_0x411b45,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x411b45,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x34a131=>{this['_updateItemPositionInFocusables'](_0x34a131['source']);}),this['list']['forEach'](_0x3abbac=>{this['focusTracker']['add'](_0x3abbac['element']),this['_updateItemPositionInFocusables'](_0x3abbac);}),this['list']['on']('change',(_0x2ffc68,_0x174fe4)=>{for(const _0x53e759 of _0x174fe4['removed'])this['focusTracker']['remove'](_0x53e759['element']),this['focusables']['remove'](_0x53e759);for(const _0x1024ee of _0x174fe4['added'])this['focusTracker']['add'](_0x1024ee['element']),this['_updateItemPositionInFocusables'](_0x1024ee);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x512a52){const _0x4e488c=this['focusables']['getIndex'](_0x512a52);let _0x217e82,_0x458f4a;for(const _0x4dfa6f of this['focusables'])if(_0x512a52['top']<_0x4dfa6f['top']){_0x217e82=_0x4dfa6f;break;}if(_0x458f4a=_0x217e82?this['focusables']['getIndex'](_0x217e82):this['focusables']['length'],-0x1!==_0x4e488c){if(_0x4e488c===_0x458f4a-0x1)return;this['focusables']['remove'](_0x512a52),_0x458f4a=_0x217e82?this['focusables']['getIndex'](_0x217e82):this['focusables']['length'];}this['focusables']['add'](_0x512a52,_0x458f4a);}}const Ht=xt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x55bcce){super(_0x55bcce),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x9742fe,_0x18dfa4)=>_0x9742fe+_0x18dfa4),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x39f88d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x39f88d['to']('isAnimationDisabled',_0x504c20=>_0x504c20?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x39f88d['to']('top',_0x38dd1e=>Ht(_0x38dd1e))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2a7b63=this['element']['clientHeight'];_0x2a7b63&&(this['height']=_0x2a7b63);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x57c986{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2524c7){super(_0x2524c7),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x2f2d54=this['context']['config']['get']('sidebar.container');_0x2f2d54&&this['setContainer'](_0x2f2d54);}['setContainer'](_0x1c0683){if(!y(_0x1c0683))throw new _0x43099f('sidebar-setcontainer-invalid-element');this['container']=_0x1c0683;}['_attachToContainer']({viewClass:_0x46b8ab='',spaceBetweenItems:_0x1adb3=0x19}={}){if(!y(this['container']))throw new _0x43099f('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x46b8ab,this['_spaceBetweenItems']=_0x1adb3;}['rearrange']({removedAnnotation:_0x3a1938,previousAnnotation:_0x5b1aef,nextAnnotation:_0x3d16e3}){const _0x3c89ab=this['getSidebarItemView'](_0x3a1938);this['view']['list']['remove'](_0x3c89ab),this['_destroySidebarItemView'](_0x3a1938),_0x5b1aef&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5b1aef)),_0x3d16e3&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3d16e3)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1fe5b5,activatedAnnotation:_0x18380b,disableAnimationOnActivatedAnnotation:_0x4cb9d2}){if(this['_activeAnnotation']=_0x18380b,_0x1fe5b5){_0x1fe5b5['isActive']=!0x1;const _0x5d9968=this['getSidebarItemView'](_0x1fe5b5);_0x5d9968&&_0x4cb9d2&&(_0x5d9968['isAnimationDisabled']=!0x1);}if(_0x18380b){const _0x359e5e=this['getSidebarItemView'](_0x18380b);_0x359e5e&&(_0x18380b['isActive']=!0x0,_0x4cb9d2&&(_0x359e5e['isAnimationDisabled']=!0x0,_0x359e5e['top']+=0x1),this['_alignToTargetRect'](_0x359e5e));}}['_detachFromContainer'](_0x370403){if(this['view']['element']['remove'](),_0x370403){for(const _0x3b6218 of _0x370403)this['_destroySidebarItemView'](_0x3b6218);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xa9f46,_0xbcd75b){_0xbcd75b||(_0xbcd75b=_0xa9f46['view']);const _0x5023c1=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5023c1,_0xa9f46),this['_annotationToSidebarItemView']['set'](_0xa9f46,_0x5023c1),_0x5023c1['content']['add'](_0xbcd75b),this['listenTo'](_0xa9f46['view'],'change:targetRect',(_0xb02675,_0x33f59b,_0x4bdbd7)=>{const _0x447ba4=this['_getTargetTop'](_0xa9f46,_0x4bdbd7);_0x5023c1['_targetTop']!=_0x447ba4&&(_0x5023c1['_targetTop']=_0x447ba4,this['_setItemTop'](_0x5023c1,_0x447ba4));}),this['listenTo'](_0x5023c1,'change:top',()=>{this['_recalculate'](_0x5023c1,'top');}),this['listenTo'](_0x5023c1,'change:bottom',()=>{this['_recalculate'](_0x5023c1,'bottom');}),this['_alignToTargetRect'](_0x5023c1);const _0x5084bb=this['_getItemBefore'](_0x5023c1);if(_0x5084bb)this['_alignAfterItem'](_0x5084bb,_0x5023c1)||this['_alignToTargetRect'](_0x5023c1);else this['_alignToTargetRect'](_0x5023c1);return this['_updateLastItem'](),this['view']['list']['add'](_0x5023c1),_0x5023c1;}['_alignForTopChange'](_0x630ccb){if(!_0x630ccb['content']['length'])return;const _0x4b8b01=this['_getItemBefore'](_0x630ccb);if(!_0x4b8b01)return;const _0x570c50=this['_sidebarItemViewToAnnotation']['get'](_0x4b8b01),_0x4a5157=this['_activeAnnotation'];_0x4a5157&&_0x4a5157===_0x570c50?this['_alignAfterItem'](_0x4b8b01,_0x630ccb):this['_alignBeforeItem'](_0x630ccb,_0x4b8b01);}['_alignForBottomChange'](_0x53bbb4){if(!_0x53bbb4['content']['length'])return;const _0x242133=this['_getItemAfter'](_0x53bbb4);if(!_0x242133)return;const _0xee8df2=this['_sidebarItemViewToAnnotation']['get'](_0x242133),_0x17ec8b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4521de=this['_activeAnnotation'];_0x4521de&&_0x4521de===_0xee8df2&&_0x17ec8b?(this['_alignBeforeItem'](_0x242133,_0x53bbb4),this['_alignAfterItem'](_0x53bbb4,_0x242133)):_0x4521de&&_0x4521de===_0xee8df2?this['_alignBeforeItem'](_0x242133,_0x53bbb4):this['_alignAfterItem'](_0x53bbb4,_0x242133);}['_recalculate'](_0x14473a,_0x274619){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3dc736,changedProp:_0x518d5d}of this['_recalculateBuffer'])'top'===_0x518d5d?this['_alignForTopChange'](_0x3dc736):this['_alignForBottomChange'](_0x3dc736);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x14473a,'changedProp':_0x274619});}['getSidebarItemView'](_0x40c9c9){return this['_annotationToSidebarItemView']['get'](_0x40c9c9);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1e953a){const _0x3435b6=this['getSidebarItemView'](_0x1e953a);this['stopListening'](_0x3435b6),this['stopListening'](_0x1e953a['view']),_0x3435b6['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1e953a),this['_sidebarItemViewToAnnotation']['delete'](_0x3435b6);}['_createSidebarView'](){const _0x51e072=new H(this['context']['locale']);return _0x51e072['render'](),this['on']('change:_lastItem',(_0x1018cf,_0x684c25,_0x37171c,_0x77aecc)=>{_0x77aecc&&_0x51e072['unbind']('minHeight'),_0x37171c?_0x51e072['bind']('minHeight')['to'](_0x37171c,'bottom'):_0x51e072['minHeight']=null;}),_0x51e072;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x467bea){const _0x517d5f=this['_sidebarItemViewToAnnotation']['get'](_0x467bea),_0x4e9fdc=_0x517d5f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x517d5f)-0x1);return _0x4e9fdc&&this['getSidebarItemView'](_0x4e9fdc)||null;}['_getItemAfter'](_0x536ed9){const _0x408b95=this['_sidebarItemViewToAnnotation']['get'](_0x536ed9),_0x1baabc=_0x408b95&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x408b95)+0x1);return _0x1baabc&&this['getSidebarItemView'](_0x1baabc)||null;}['_alignBeforeItem'](_0x44b741,_0x442cdf){_0x44b741['updateHeight']();const _0x2f3d09=G(_0x442cdf['bottom']+this['_spaceBetweenItems'],_0x44b741['top']);return!!_0x2f3d09&&(this['_setItemTop'](_0x442cdf,_0x442cdf['top']-_0x2f3d09),!0x0);}['_alignAfterItem'](_0x127769,_0xcf68bb){_0x127769['updateHeight']();const _0x3f1f1c=G(_0x127769['bottom']+this['_spaceBetweenItems'],_0xcf68bb['top']);return!!_0x3f1f1c&&(this['_setItemTop'](_0xcf68bb,_0xcf68bb['top']+_0x3f1f1c,!0x1),!0x0);}['_alignToTargetRect'](_0x5e2e11){const _0x23c60d=this['_sidebarItemViewToAnnotation']['get'](_0x5e2e11);if(!_0x23c60d||!_0x23c60d['target']||!_0x23c60d['targetRect'])return;const _0xc47ea6=this['_getTargetTop'](_0x23c60d,_0x23c60d['targetRect']);this['_setItemTop'](_0x5e2e11,_0xc47ea6);}['_getTargetTop'](_0x2fe402,_0x351721){if(null===_0x351721)return 0x0;if(_0x2fe402['target']instanceof _0x16772f)return _0x351721['top'];{const _0x1175e2=new _0x16772f(this['view']['element'])['top'];return _0x351721['top']-_0x1175e2;}}['_setItemTop'](_0x16aad5,_0x46e67b,_0x544a8a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x544a8a&&(_0x46e67b=Math['max'](_0x46e67b,this['_getMaxAvailableTop'](_0x16aad5))),_0x16aad5['top']=_0x46e67b;}['_getMaxAvailableTop'](_0x38d0f3){let _0x33599d=this['_getItemBefore'](_0x38d0f3),_0x57827c=0x0;for(;_0x33599d;)_0x33599d['updateHeight'](),_0x57827c+=this['_spaceBetweenItems']+_0x33599d['height'],_0x33599d=this['_getItemBefore'](_0x33599d);return _0x57827c;}}function G(_0x12e4d7,_0x406531){return Math['max'](_0x12e4d7-_0x406531,0x0);}function y(_0x4e5569){return null!==_0x4e5569&&'object'==typeof _0x4e5569&&0x1===_0x4e5569['nodeType'];}class e extends _0x57c986{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e8712){super(_0x3e8712),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x28495a(),this['_refreshPositioningDebounced']=_0xd145ad(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x471b86=this['context']['plugins']['get'](M),_0x24f578=this['context']['plugins']['get'](z);_0x471b86['register']('wideSidebar',this),_0x24f578['container']&&_0x471b86['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x48e390){if(_0x48e390===this['activeAnnotation'])return;const _0x21556d=this['context']['plugins']['get'](z);_0x21556d['_activeAnnotation']=_0x48e390;const _0x2e8657=this['activeAnnotation'];_0x21556d['refresh']({'blurredAnnotation':_0x2e8657,'activatedAnnotation':_0x48e390}),this['activeAnnotation']=_0x48e390;}['attach'](_0x292fbf){this['annotations']=_0x292fbf;const _0x40a4f3=this['context']['plugins']['get'](z);if(_0x40a4f3['_annotations']=_0x292fbf,this['isAttached'])throw new _0x43099f('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x40a4f3,'set:container',()=>{this['detach'](),this['listenTo'](_0x40a4f3,'change:container',_0x396d62=>{_0x396d62['off'](),this['attach'](_0x292fbf);});}),_0x40a4f3['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2dded8=_0x2ba4be=>{_0x2ba4be['updateTargetRect'](),_0x40a4f3['addAnnotation'](_0x2ba4be);};for(const _0x557442 of _0x292fbf)_0x2dded8(_0x557442);this['listenTo'](_0x292fbf,'add',(_0x1d94b7,_0xc88515)=>{_0x2dded8(_0xc88515);}),this['listenTo'](_0x292fbf,'remove',(_0x202560,_0x3fd918,_0x9d88ed)=>{_0x40a4f3['rearrange']({'removedAnnotation':_0x3fd918,'previousAnnotation':_0x292fbf['get'](_0x9d88ed-0x1),'nextAnnotation':_0x292fbf['get'](_0x9d88ed+0x1)}),_0x3fd918===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x292fbf,'focus',(_0x36c6d5,_0x32978c)=>{this['setActiveAnnotation'](_0x32978c);}),this['listenTo'](_0x292fbf,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1ebfe2=this['context']instanceof _0xce4252?this['context']['editors']:new _0x28495a([this['context']]);for(const _0x18920d of _0x1ebfe2)this['_integrateWithEditorAnnotations'](_0x18920d);this['listenTo'](_0x1ebfe2,'add',(_0xf15484,_0x35131e)=>{this['listenTo'](_0x35131e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x35131e);});}),this['listenTo'](_0x1ebfe2,'remove',(_0x45b9f9,_0x1e3701)=>{_0x1e3701['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1e3701['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x43099f('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x175e71=this['context']['plugins']['get'](z);_0x175e71['_detachFromContainer'](this['annotations']),this['stopListening'](_0x175e71),this['stopListening'](this['annotations']),this['context']instanceof _0xce4252&&this['stopListening'](this['context']['editors']);for(const _0x5bd03c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5bd03c);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x313d35){if(!_0x313d35['plugins']['has']('EditorAnnotations'))return;const _0x54386e=_0x313d35['plugins']['get']('EditorAnnotations'),_0x29ae26=()=>{const _0x13a149=_0x54386e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x13a149[0x0]||null);};this['listenTo'](_0x54386e,'refresh',_0x29ae26),this['listenTo'](_0x54386e,'blur',(_0xe3d515,{isAnnotationTracked:_0x47c8c7})=>{this['activeAnnotation']&&_0x47c8c7(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x54386e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x30ab0d=>{_0x54386e['hasDomSelection']()&&(_0x29ae26(),_0x30ab0d['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x54386e);}['_destroyEditorAnnotationsIntegration'](_0x53ab91){this['stopListening'](_0x53ab91),this['_editorAnnotations']['remove'](_0x53ab91);}}class C extends _0x151fe8{['counterView'];constructor(_0x547082){super(_0x547082);const _0x244372=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5d62b6,_0x12c0fa)=>_0x5d62b6?'...':_0x12c0fa['toString']()),this['set']('annotationType',''),this['icon']=_0x4c19ee,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x244372['to']('annotationType',_0x3724a6=>'ck-annotation-counter__badge--'+_0x3724a6),_0x244372['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x244372['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x57c986{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28d274){super(_0x28d274),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x10824e),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x28495a(),this['_refreshPositioningDebounced']=_0xd145ad(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3e4dca(this['context']['locale']),this['balloonPanelView']=new _0x404ba8(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x52d078){this['annotations']=_0x52d078;const _0x3e2e0c=this['context']['plugins']['get'](z),_0x26c2ee=this['balloonPanelView'];if(_0x3e2e0c['_annotations']=_0x52d078,this['isAttached'])throw new _0x43099f('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3e2e0c,'set:container',()=>{this['detach'](),this['listenTo'](_0x3e2e0c,'change:container',_0x2efd9c=>{_0x2efd9c['off'](),this['attach'](_0x52d078);});}),_0x3e2e0c['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x269e9c=_0xba9289=>{const _0x8518ad=new C(this['context']['locale']);_0x3e2e0c['addAnnotation'](_0xba9289,_0x8518ad),this['_annotationToNarrowView']['set'](_0xba9289,_0x8518ad),_0x8518ad['bind']('isDirty','annotationType','number')['to'](_0xba9289['view'],'isDirty','type','length'),_0x8518ad['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x26c2ee['content']['first']!==_0xba9289['view']?(this['_showBalloon'](_0xba9289),_0xba9289['view']['element']['focus'](),this['setActiveAnnotation'](_0xba9289)):this['setActiveAnnotation'](null);});};for(const _0x3d56a3 of _0x52d078)_0x269e9c(_0x3d56a3);this['listenTo'](_0x52d078,'add',(_0x303792,_0x5c59dd)=>{_0x269e9c(_0x5c59dd);}),this['listenTo'](_0x52d078,'remove',(_0x45c8d7,_0x491762,_0x37c4ef)=>{this['_annotationToNarrowView']['get'](_0x491762)['destroy'](),this['_annotationToNarrowView']['delete'](_0x491762),_0x3e2e0c['rearrange']({'removedAnnotation':_0x491762,'previousAnnotation':_0x52d078['get'](_0x37c4ef-0x1),'nextAnnotation':_0x52d078['get'](_0x37c4ef+0x1)}),_0x491762===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x52d078,'focus',(_0xe65fa9,_0x1e5409)=>{this['setActiveAnnotation'](_0x1e5409);}),this['listenTo'](_0x52d078,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1578d3,_0x49c2dc)=>{_0x49c2dc['keyCode']===_0x2aab7d['esc']&&_0x26c2ee['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x26c2ee['content']['first']),this['_hideBalloon'](),_0x49c2dc['stopPropagation'](),_0x49c2dc['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x465133,_0x19f7a7)=>{const _0x3fb4d6=_0x19f7a7['target'];_0x26c2ee['isVisible']&&_0x26c2ee['element']['contains'](_0x3fb4d6)||_0x3e2e0c['view']['element']['contains'](_0x3fb4d6)||_0x465133['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x2747c3=>_0x2747c3['contains'](_0x3fb4d6))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1943ee=this['context']instanceof _0xce4252?this['context']['editors']:new _0x28495a([this['context']]);for(const _0x232bf3 of _0x1943ee)this['_integrateWithEditorAnnotations'](_0x232bf3);this['listenTo'](_0x1943ee,'add',(_0x178be8,_0x5a9d54)=>{this['listenTo'](_0x5a9d54,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5a9d54);});}),this['listenTo'](_0x1943ee,'remove',(_0x1dd999,_0x40ba55)=>{_0x40ba55['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x40ba55['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x54a330){if(_0x54a330===this['activeAnnotation'])return;const _0x16f742=this['context']['plugins']['get'](z);if(_0x16f742['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x54a330,'disableAnimationOnActivatedAnnotation':!0x0}),_0x54a330)_0x16f742['getSidebarItemView'](_0x54a330)?this['_showBalloon'](_0x54a330):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x54a330;}['detach'](){if(!this['isAttached'])throw new _0x43099f('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x55905d=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x51ef4d=>_0x51ef4d['destroy']()),this['_annotationToNarrowView']['clear'](),_0x55905d['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xce4252&&this['stopListening'](this['context']['editors']);for(const _0x128da1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x128da1);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x158c53){if(!_0x158c53['plugins']['has']('EditorAnnotations'))return;const _0x592a43=_0x158c53['plugins']['get']('EditorAnnotations'),_0x5c0591=this['context']['plugins']['get'](z),_0x3bf155=this['annotations'],_0x56d7c9=this['balloonPanelView'],_0x4e1e0b=()=>{const _0x354db5=_0x592a43['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x354db5),this['setActiveAnnotation'](_0x354db5[0x0]||null);};this['listenTo'](_0x592a43,'refresh',_0x4e1e0b),this['listenTo'](_0x592a43,'blur',(_0x1dd2e8,{isAnnotationTracked:_0x4b5b99})=>{this['activeAnnotation']&&_0x4b5b99(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x592a43,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3bf155,'blur',_0x5a2310=>{_0x592a43['hasDomSelection']()&&_0x5a2310['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x596230,_0x44481a)=>{const _0x545926=_0x44481a['target'];_0x56d7c9['isVisible']&&_0x56d7c9['element']['contains'](_0x545926)||_0x5c0591['view']['element']['contains'](_0x545926)||this['activeAnnotation']&&_0x592a43['hasDomSelection']()&&(_0x4e1e0b(),_0x596230['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x592a43);}['_destroyEditorAnnotationsIntegration'](_0xa2fb2d){_0xa2fb2d&&(this['stopListening'](_0xa2fb2d),this['_editorAnnotations']['remove'](_0xa2fb2d));}['_setSelectedAnnotations'](_0x5ef4f2){for(const _0x58145e of this['_selectedAnnotations'])_0x5ef4f2['includes'](_0x58145e)||this['_manuallyClosedAnnotationViews']['delete'](_0x58145e['view']);this['_selectedAnnotations']=_0x5ef4f2;}['_refreshPositioning'](){const _0x3d7af5=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x3d7af5['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x38c9f8){if(this['_manuallyClosedAnnotationViews']['has'](_0x38c9f8['view']))return;const _0x337b12=this['balloonPanelView']['content']['first'];_0x337b12!==_0x38c9f8['view']?(_0x337b12&&this['_detachListeners'](_0x337b12),this['_attachListeners'](_0x38c9f8['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x38c9f8['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x13fd07=this['balloonPanelView']['content']['first'],_0x411719=_0x13fd07&&this['annotations']['getByView'](_0x13fd07);if(!_0x411719||!this['_annotationToNarrowView']['has'](_0x411719))return;const _0x20aa3=this['_annotationToNarrowView']['get'](_0x411719)['element'],_0x10273a=(function(){const _0x5a3269=_0x404ba8['defaultPositions'];return[_0x5a3269['southArrowNorthEast'],_0x5a3269['northArrowSouthEast'],_0x5a3269['southArrowNorth'],_0x5a3269['northArrowSouth'],_0x5a3269['southArrowNorthWest'],_0x5a3269['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x20aa3,'positions':_0x10273a});}['_hideBalloon'](){const _0x56f794=this['balloonPanelView'],_0x25c3c4=_0x56f794['content']['first'];_0x25c3c4&&(this['_detachListeners'](_0x25c3c4),_0x56f794['unpin'](),_0x56f794['content']['clear']());}['_attachListeners'](_0x1825a7){this['listenTo'](_0x1825a7,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1825a7,'Esc',(_0x47cf3f,_0x23f499)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1825a7),this['_hideBalloon'](),_0x23f499();});}['_detachListeners'](_0x3db880){this['stopListening'](_0x3db880);}}class c extends _0x3f67cf{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x3b8509,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d3315){super(_0x4d3315),_0x4d3315['editing']['view']['addObserver'](_0x37beaf),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4d3315['plugins']['get'](_0x3b8509),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x2df0d7=this['editor']['plugins']['get'](M);_0x2df0d7['context']===this['editor']&&(_0x2df0d7['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x366102,_0x18222f)=>{const _0x3f48f6=this['_balloon'];if(this['isAttached']&&_0x3f48f6['visibleView']){const _0x59237b=this['annotations']['getByView'](_0x3f48f6['visibleView']);_0x59237b&&this['_closeAnnotation'](_0x59237b),_0x18222f();}}));}['afterInit'](){const _0x247b61=this['editor']['plugins']['get'](M);_0x247b61['context']===this['editor']&&(_0x247b61['hasActive']()||_0x247b61['switchTo']('inline'));}['setActiveAnnotation'](_0x28ea8f){_0x28ea8f!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x28ea8f&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x28ea8f)&&this['_addAnnotationToBalloon'](_0x28ea8f,!0x0),_0x28ea8f['isActive']=!0x0),_0x28ea8f||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x28ea8f);}['attach'](_0x21d99c){this['annotations']=_0x21d99c;const _0x2622db=this['editor']['plugins']['get'](M),_0x338a38=this['_balloon'];if(this['isAttached'])throw new _0x43099f('inlineannotations-attach-already-attached',this);if(_0x2622db['context']!==this['editor'])throw new _0x43099f('inlineannotations-not-allowed-with-context',this);const _0x4071ab=this['editor']['plugins']['get'](P);this['listenTo'](_0x4071ab,'refresh',()=>{const _0x5ba044=_0x4071ab['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x54342f,_0x5cd0f4;!this['_forceRefresh']&&(_0x54342f=_0x5ba044,_0x5cd0f4=this['_selectedAnnotations'],_0x54342f['length']===_0x5cd0f4['length']&&_0x54342f['every'](_0x2abbb8=>_0x5cd0f4['includes'](_0x2abbb8)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5ba044),this['setActiveAnnotation'](_0x5ba044[0x0]||null));}),this['listenTo'](_0x4071ab,'blur',(_0x32a694,{isAnnotationTracked:_0x44dcf0})=>{this['activeAnnotation']&&_0x44dcf0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x529505,_0x3a12ce,_0x2ead7e)=>{_0x2ead7e||this['setActiveAnnotation'](null);}),this['listenTo'](_0x21d99c,'remove',(_0x55b757,_0x5f34ba)=>{this['_removeAnnotationFromBalloon'](_0x5f34ba),_0x5f34ba===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x338a38,'change:visibleView',(_0x544134,_0x1a0f4f,_0x155aaf,_0x42781e)=>{_0x42781e&&this['stopListening'](_0x42781e);const _0x5f2e00=_0x21d99c['getByView'](_0x155aaf);_0x155aaf&&_0x5f2e00&&(this['listenTo'](_0x155aaf,'change:height',()=>{_0x338a38['updatePosition']();}),this['listenTo'](_0x155aaf,'Esc',()=>{this['_closeAnnotation'](_0x5f2e00),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5f2e00&&this['setActiveAnnotation'](_0x5f2e00));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x338a38['visibleView']&&(_0x21d99c['getByView'](_0x338a38['visibleView'])&&_0x338a38['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x43099f('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x449082 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x449082);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x244458){for(const _0x2bae17 of this['_selectedAnnotations'])_0x244458['includes'](_0x2bae17)||this['_manuallyClosed']['delete'](_0x2bae17);for(const _0x3c4dd5 of this['annotations'])_0x244458['includes'](_0x3c4dd5)||this['_removeAnnotationFromBalloon'](_0x3c4dd5);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1b6b1b of _0x244458)this['_addAnnotationToBalloon'](_0x1b6b1b);}this['_selectedAnnotations']=_0x244458;}['_addAnnotationToBalloon'](_0xd0597b,_0x35730a=!0x1){this['_manuallyClosed']['has'](_0xd0597b)||(this['_addedAnnotations']['has'](_0xd0597b)||this['_balloon']['hasView'](_0xd0597b['view'])||(this['_addedAnnotations']['add'](_0xd0597b),this['_balloon']['add']({'stackId':_0xd0597b['view']['id'],'view':_0xd0597b['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xd0597b)}})),_0x35730a&&this['_balloon']['showStack'](_0xd0597b['view']['id']));}['_getBalloonTargetForAnnotation'](_0x446c03){const _0x3ef1a5=_0x446c03['target'],_0x24fa19=this['editor']['editing']['view'],_0x4d776e=_0x24fa19['document']['selection']['getFirstRange'](),_0x43f543=_0x24fa19['domConverter']['viewRangeToDom'](_0x4d776e);if(_0x43f543['collapse'](!0x0),_0x3ef1a5){if(_0x3ef1a5 instanceof _0x16772f)return _0x3ef1a5;let _0x456d85=[];for(const _0x50f877 of _0x3ef1a5)_0x456d85['push'](...B(_0x50f877['getClientRects']()));_0x456d85=function(_0x12126f){const _0x23bf0f=[];let _0x4c35ba=_0x12126f[0x0];for(let _0x3b2a3c=0x1;_0x3b2a3c<_0x12126f['length'];_0x3b2a3c++)F(_0x4c35ba,_0x12126f[_0x3b2a3c])?_0x4c35ba['width']+=_0x12126f[_0x3b2a3c]['width']:(_0x23bf0f['push'](_0x4c35ba),_0x4c35ba=_0x12126f[_0x3b2a3c]);return _0x23bf0f['push'](_0x4c35ba),_0x23bf0f;}(_0x456d85);const _0xbc4e83=_0x43f543['getBoundingClientRect']();return _0x456d85['find'](_0x5f0774=>_0x5f0774['top']<=_0xbc4e83['top']&&_0x5f0774['bottom']>=_0xbc4e83['bottom']&&_0x5f0774['left']<=_0xbc4e83['left']&&_0x5f0774['right']>=_0xbc4e83['right'])||_0x456d85[0x0];}return _0x446c03['targetRect']||_0x43f543;}['_removeAnnotationFromBalloon'](_0x2b4601){this['_addedAnnotations']['has'](_0x2b4601)&&this['_balloon']['hasView'](_0x2b4601['view'])&&(this['_addedAnnotations']['delete'](_0x2b4601),this['_balloon']['remove'](_0x2b4601['view']));}['_closeAnnotation'](_0x550f3c){this['_manuallyClosed']['add'](_0x550f3c),this['_removeAnnotationFromBalloon'](_0x550f3c);}}function B(_0x387e05){return Array['from'](_0x387e05)['map'](DOMRect['fromRect']);}function F(_0xe9804d,_0x4e5561){return _0xe9804d['top']===_0x4e5561['top']&&_0xe9804d['bottom']===_0x4e5561['bottom']&&_0xe9804d['right']===_0x4e5561['left'];}class it extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1e44ce,_0x43057b){super(_0x1e44ce),this['set']('isEmpty',!_0x43057b['length']),this['focusTracker']=new _0x1f412d(),this['_annotationViews']=_0x43057b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x45831b({'focusables':_0x43057b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x43057b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x43057b,'remove',(_0x437286,_0x5d0d6e)=>{_0x5d0d6e['isActive']&&this['focus'](),_0x43057b['length']||(this['isEmpty']=!0x0);});const _0x46fa5c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x1e44ce,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x43057b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x46fa5c['if']('isEmpty','ck-hidden',_0x1f55ba=>!_0x1f55ba)]},'children':[{'text':E(_0x1e44ce,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x19a6fa of this['_annotationViews'])this['focusTracker']['add'](_0x19a6fa['element']);this['_annotationViews']['on']('change',(_0x1002c2,{added:_0x6684b2,removed:_0xe915c8})=>{for(const _0x775eee of _0x6684b2)this['focusTracker']['add'](_0x775eee['element']);for(const _0x53d771 of _0xe915c8)this['focusTracker']['remove'](_0x53d771['element']);});}}class f extends _0x57c986{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x19a7c5){super(_0x19a7c5),this['archivedThreads']=new _0x28495a();}['init'](){const _0x117697=this['context'],_0x100925=_0x117697['plugins']['get'](o),_0x4117f1=_0x117697['plugins']['get'](O);this['listenTo'](_0x100925,'addCommentThread',(_0x37cb2a,{threadId:_0x5ed3b3})=>{const _0x497d7a=_0x100925['getCommentThread'](_0x5ed3b3);_0x497d7a['archivedAt']&&this['archivedThreads']['add'](_0x497d7a,this['_calculatePosition'](_0x497d7a['archivedAt'])),this['listenTo'](_0x497d7a,'change:archivedAt',(_0x571d3c,_0x582af3,_0x550f78)=>{_0x550f78?this['archivedThreads']['has'](_0x497d7a)||this['archivedThreads']['add'](_0x497d7a,this['_calculatePosition'](_0x497d7a['archivedAt'])):this['archivedThreads']['has'](_0x497d7a)&&this['archivedThreads']['remove'](_0x497d7a);});}),this['listenTo'](_0x100925,'removeCommentThread',(_0x3f5ec2,{threadId:_0x3f22f7})=>{const _0x12e704=_0x100925['getCommentThread'](_0x3f22f7);this['stopListening'](_0x12e704),this['archivedThreads']['has'](_0x12e704)&&this['archivedThreads']['remove'](_0x12e704);},{'priority':'highest'}),this['listenTo'](_0x4117f1['collection'],'focus',(_0x1485b0,_0xc3b8f7)=>{_0xc3b8f7['isVisible']||(_0xc3b8f7['isActive']=!0x0,_0x4117f1['activate'](_0xc3b8f7));});}['_calculatePosition'](_0x134551){const _0x9b0e14=[...this['archivedThreads']]['findIndex'](_0x2c8ce4=>_0x2c8ce4['archivedAt']<_0x134551);return _0x9b0e14>-0x1?_0x9b0e14:this['archivedThreads']['length'];}}class a extends _0x3f67cf{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x23eebf];}constructor(_0x3856ab){super(_0x3856ab),this['annotationViews']=new _0xa4c1a7(),this['_pendingThreads']=[];}['init'](){const _0xcbd522=this['editor'],_0x5a24bb=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xcbd522['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x151fe8,!0x0)),_0xcbd522['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2d1c65=this['_createCommentsArchiveButton'](_0x2ffab1);return _0x2d1c65['set']({'role':'menuitemcheckbox'}),_0x2d1c65;});const _0x2baee4=_0xcbd522['plugins']['get'](f),_0x3be652=_0xcbd522['plugins']['get']('Annotations'),_0x393102=_0xcbd522['plugins']['get']('CommentsRepository');_0x2baee4['archivedThreads']['forEach'](_0x52ad72=>{this['_handleNewThread'](_0x52ad72);}),this['listenTo'](_0x2baee4['archivedThreads'],'add',(_0x1699b7,_0x5bee82)=>{this['_handleNewThread'](_0x5bee82);}),this['listenTo'](_0x3be652['collection'],'add',(_0x31a4bd,_0x27a9ae)=>{const _0x211092=this['_pendingThreads']['find'](_0x49ffae=>{const _0x3b4174=_0x393102['_threadToController']['get'](_0x49ffae);return _0x3b4174&&_0x27a9ae['innerView']===_0x3b4174['view'];});if(_0x211092){const _0x4df6a0=this['_calculatePosition'](_0x211092['archivedAt']);this['annotationViews']['add'](_0x27a9ae['view'],_0x4df6a0),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x211092),0x1);}}),this['listenTo'](_0x2baee4['archivedThreads'],'remove',(_0x79604d,_0x501283)=>{const _0x107638=_0xcbd522['config']['get']('collaboration.channelId');if(!_0x107638||_0x501283['channelId']===_0x107638){if(this['_pendingThreads']['includes'](_0x501283))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x501283),0x1);else{const _0x8f2781=_0x393102['_threadToController']['get'](_0x501283),_0x204bf9=_0x3be652['getByInnerView'](_0x8f2781['view']);this['annotationViews']['remove'](_0x204bf9['view']),this['stopListening'](_0x204bf9['focusableElements']);}}}),this['listenTo'](_0x3be652['collection'],'add',(_0x13ab21,_0x2c9e86)=>{this['listenTo'](_0x2c9e86,'escape',_0x5a24bb);}),this['listenTo'](_0x3be652['collection'],'remove',(_0x1b7aac,_0x2f9e72)=>{this['stopListening'](_0x2f9e72,'escape',_0x5a24bb);});}['_handleNewThread'](_0x3dc332){const _0x30d113=this['editor']['plugins']['get']('CommentsRepository'),_0x40d599=this['editor']['plugins']['get']('Annotations'),_0x405681=this['editor']['config']['get']('collaboration.channelId');if(!_0x405681||_0x3dc332['channelId']===_0x405681){const _0x5aaabb=_0x30d113['_threadToController']['get'](_0x3dc332);if(!_0x5aaabb)return void this['_pendingThreads']['push'](_0x3dc332);const _0x6a146=this['_calculatePosition'](_0x3dc332['archivedAt']),_0x4bd6d3=_0x40d599['getByInnerView'](_0x5aaabb['view']);_0x4bd6d3['isVisible']&&_0x40d599['_visibleAnnotations']['remove'](_0x4bd6d3),this['annotationViews']['add'](_0x4bd6d3['view'],_0x6a146);}}['_calculatePosition'](_0x18dcb7){const _0x21a712=this['editor']['config']['get']('collaboration.channelId'),_0x1fc18a=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x5af1d1=>_0x5af1d1['channelId']===_0x21a712)['findIndex'](_0x272db5=>_0x272db5['archivedAt']<_0x18dcb7);return _0x1fc18a<0x0||_0x1fc18a>this['annotationViews']['length']?this['annotationViews']['length']:_0x1fc18a-0x1;}['_toggleDialog'](){const _0x1abb6b=this['editor'],_0x1bec30=_0x1abb6b['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new it(_0x1abb6b['locale'],this['annotationViews'])),'commentsArchive'===_0x1bec30['id']?_0x1bec30['hide']():_0x1bec30['show']({'id':'commentsArchive','title':E(_0x1abb6b['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3a4089,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':tt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x30257d,_0x49394d=!0x1){const _0x23da95=this['editor']['locale'],_0x372684=this['editor']['plugins']['get']('Dialog'),_0x1d2135=new _0x30257d(_0x23da95);return _0x1d2135['bind']('isEnabled')['to'](this,'isEnabled'),_0x1d2135['bind']('isOn')['to'](_0x372684,'id',_0x47bd70=>'commentsArchive'===_0x47bd70),_0x1d2135['set']({'label':E(_0x23da95,'COMMENTS_ARCHIVE'),'icon':_0x3a4089,'isToggleable':!0x0}),_0x49394d&&(_0x1d2135['tooltip']=!0x0),this['listenTo'](_0x1d2135,'execute',()=>this['_toggleDialog']()),_0x1d2135;}['_hideDialogOnAnnotationEscape']=_0x872a04=>{const _0x2989d9=_0x872a04['source'];if(!this['annotationViews']['has'](_0x2989d9['view']))return;const _0x7ed741=this['editor']['plugins']['get']('Dialog');_0x7ed741['isOpen']&&'commentsArchive'===_0x7ed741['id']&&(_0x7ed741['hide'](),_0x872a04['stop']());};}class p extends _0x3f67cf{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,is as BaseCommentThreadView,rs as BaseCommentView,fi as Comment,ui as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};