@ckeditor/ckeditor5-comments 47.4.0-alpha.5 → 47.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0xf60486,ContextPlugin as _0x4b682f,PendingActions as lt,Command as _0x14f0aa,Plugin as _0xc00a87,Context as _0x5d9522}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x70c1ad,uid as _0x2e35e1,KeystrokeHandler as jt,FocusTracker as _0x22fbb8,diff as _0x11ee0c,Collection as _0x236aed,Rect as _0x2767ff,CKEditorError as _0x4000c2,first as _0x507315,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x5743fa,keyCodes as _0x46e1a0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x1eb990,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x3a5e2f,trimHtml as ts,LateFocusDropdownButtonView as _0x3735fe,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x433cbb}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x51e02f}from'es-toolkit/compat';import{IconUndo as _0x15be80,IconCheck as _0x2ad987,IconPencil as _0x4eaf7c,IconRemoveComment as _0x415646,IconThreeVerticalDots as _0x243f07,IconAddComment as _0x2a98df,IconCommentsArchive as _0x5d05ce}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x329626,ButtonView as _0x19a4ce,ViewCollection as _0x12e523,createDropdown as _0x27ddc6,ListView as _0x4af2d5,focusChildOnDropdownOpen as _0x5631c1,ListItemView as _0x3f5f88,MenuBarMenuListItemButtonView as _0x171cc0,BodyCollection as _0x5a1f0d,BalloonPanelView as _0x46579c,ContextualBalloon as _0x296170,Dialog as _0x1972a5,DialogViewPosition as _0x20ca1c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0xf0bc54}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0xb096fc}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x32dbb5}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0x70c1ad(){['model'];['view'];constructor(_0x3f346a,_0x468cf4){super(),this['model']=_0x3f346a,this['model']['_isAttached']=!0x0,this['view']=_0x468cf4,this['listenTo'](_0x468cf4,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x468cf4,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x468cf4,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x468cf4,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x468cf4,'addComment',(_0x3f9582,_0x513688)=>this['addComment'](_0x513688)),this['listenTo'](_0x468cf4,'updateComment',(_0x4ec6c7,_0x2b7ea6,_0x126d9f)=>this['updateComment'](_0x2b7ea6,_0x126d9f)),this['listenTo'](_0x468cf4,'removeComment',(_0xb0e4ef,_0x3bc207)=>this['removeComment'](_0x3bc207));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x580d5c){this['model']['addComment']({'content':_0x580d5c,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x132eed,_0x4ae474){this['model']['getComment'](_0x132eed)['update']({'content':_0x4ae474});}['removeComment'](_0x1af6f7){this['model']['getComment'](_0x1af6f7)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0xc33ea0,_0x2f4cb7,_0x186d67){const t=_0xc33ea0['t'];switch(_0x2f4cb7){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'},_0x186d67);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'},_0x186d67);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'},_0x186d67);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'},_0x186d67);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x186d67);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'},_0x186d67);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'},_0x186d67);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'},_0x186d67);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0xb2b353,_0x89a705){super(_0xb2b353);const _0x16c165=_0x2e35e1();this['main']=this['createCollection'](),this['editable']=new Vt(_0xb2b353,_0x89a705,void 0x0,{'label':()=>N(_0xb2b353,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xb2b353['uiLanguageDirection'],'lang':_0xb2b353['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x16c165},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x4b68ac){super(_0x4b68ac),this['view']=new Rt(_0x4b68ac['locale'],_0x4b68ac['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x3c99e5=this['editor']['editing']['view'],_0x13f549=this['view']['editable'],_0x1462db=_0x3c99e5['document']['getRoot']();_0x13f549['name']=_0x1462db['rootName'],this['view']['render']();const _0x139cf3=_0x13f549['element'];this['setEditableElement'](_0x13f549['name'],_0x139cf3),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3c99e5['attachDomRoot'](_0x139cf3),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
- _0x70c1ad(_0xf60486){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x5597c8={}){function _0x2d30f3(_0x93ed77){return _0x93ed77['map'](_0x42b712=>String['fromCharCode'](_0x42b712))['join']('');}(_0x5597c8=Object['assign']({},_0x5597c8))['plugins']||(_0x5597c8['plugins']=hs['defaultPlugins']),super(_0x5597c8),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2d30f3([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d30f3([0x76,0x69,0x65,0x77])][_0x2d30f3([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d30f3([0x61,0x75,0x74,0x6f]),this[_0x2d30f3([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2d30f3([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d30f3([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2d30f3([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2d30f3([0x6f,0x6b])});}['create'](){const _0x4ac5c6=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4ac5c6))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x436b62=>{const _0x44c5e1=this['model']['document']['getRoot'](),_0x317be8=_0x44c5e1&&_0x44c5e1['getChild'](_0x44c5e1['childCount']-0x1);_0x436b62['setSelection'](_0x317be8,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2ae3f7=this['editing']['view'],_0x12a3a3=_0x2ae3f7['document']['getRoot'](),_0x3174dc=_0x12a3a3['getChild'](0x0);_0x12a3a3['childCount']>0x1||!_0x3174dc||'p'!=_0x3174dc['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x2ae3f7,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3174dc['placeholder']=this['placeholder']),Ft({'view':_0x2ae3f7,'element':_0x3174dc,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3174dc);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3fd855,_0x40aacd={}){super(_0x3fd855),this['editor']=null,this['_editorConfig']=_0x40aacd,this['set']('value',_0x40aacd['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3fd855,'Reply...')),this['set']('submitLabel',N(_0x3fd855,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x22fbb8(),this['focusCycler']=new _0x329626({'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',(_0x56cf91,_0x596001)=>{this['cancelButtonView']['fire']('execute'),_0x596001();}),this['keystrokes']['set']('Ctrl+Enter',(_0x27bdb5,_0x30581c)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x30581c());}),this['on']('submit',(_0x1cb218,_0x26b8c2)=>{_0x26b8c2['length']>0xfde8?(alert(N(_0x3fd855,'TOO_LONG_COMMENT_ALERT',[_0x26b8c2['length'],0xfde8])),_0x1cb218['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3aae5b=this['editor'];this['element']['insertBefore'](_0x3aae5b['ui']['element'],this['element']['firstChild']),_0x3aae5b['model']['document']['on']('change',()=>this['value']=_0x3aae5b['getData']()),_0x3aae5b['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3aae5b['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2170bb){-0x1===_0x2170bb?(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:_0x56f402}=this,_0x50a1a1=new _0x19a4ce(_0x56f402);return _0x50a1a1['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x50a1a1['withText']=!0x0,_0x50a1a1['bind']('label')['to'](this,'submitLabel'),_0x50a1a1['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x50a1a1['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x171af,_0x58429e)=>!_0x58429e&&!!_0x171af['trim']()),_0x50a1a1;}['_createCancelButton'](){const {locale:_0x564002}=this,_0xf8f0cb=new _0x19a4ce(_0x564002);return _0xf8f0cb['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xf8f0cb['label']=N(_0x564002,'Cancel'),_0xf8f0cb['withText']=!0x0,_0xf8f0cb['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xf8f0cb;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x39efd4=>{this['focusTracker']['add'](_0x39efd4['element']);}),this['focusables']['on']('change',(_0x2fdb19,_0xb9b04)=>{for(const _0x4bba8e of Array['from'](_0xb9b04['added'])['reverse']())this['focusTracker']['add'](_0x4bba8e['element']);});}}class ie extends kt{constructor(_0x44f7e9,_0x333abe,_0x1b0d4d){super(_0x44f7e9),this['commentInputView']=new es(_0x44f7e9,_0x1b0d4d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2f776e,_0x34b9f2)=>_0x2f776e||!!_0x34b9f2),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 _0x1eb990(_0x44f7e9,_0x333abe),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'](_0x51e35c){this['commentInputView']['focus'](_0x51e35c);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x8a527b,_0x5885dc)=>{const {submitButtonView:_0x27a3f6,cancelButtonView:_0x14df86,editor:_0x15f6d4}=this['commentInputView'];[_0x27a3f6['element'],_0x14df86['element'],_0x15f6d4?_0x15f6d4['editing']['view']['getDomRoot']():null]['filter'](_0x40faab=>_0x40faab)['some'](_0x130013=>_0x130013['contains'](_0x5885dc['target']))||(this['focus'](),_0x5885dc['preventDefault']());});}}class rs extends kt{constructor(_0x4f5404){super(_0x4f5404);const _0x112b5a=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x112b5a['to']('count',_0x3b4b6b=>N(_0x4f5404,'NUMBER_OF_COMMENTS',_0x3b4b6b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2f041e,_0x4ffda1,_0x59939a){super(_0x2f041e);const _0x439297=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4ffda1['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4ffda1,this['_config']=_0x59939a,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x22fbb8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x329626({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x23415a=>this['commentViews']['map'](_0x1988e0=>_0x1988e0['element'])['includes'](_0x23415a['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x2f041e),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x24891c=>_0x24891c-this['_config']['maxCommentsWhenCollapsed']);for(const _0x6cf611 of _0x4ffda1['comments'])this['_handleNewCommentModel'](_0x6cf611);this['_handleInfoComment'](),this['listenTo'](_0x4ffda1['comments'],'add',(_0x2d101a,_0x598541)=>{const _0x4f188d=this['_calculatePosition'](_0x598541);this['length']++,this['_handleNewCommentModel'](_0x598541,_0x4f188d),this['refreshVisibleViews']();}),this['listenTo'](_0x4ffda1['comments'],'remove',(_0x351703,_0x2b0413)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2b0413),this['refreshVisibleViews']();}),this['listenTo'](_0x4ffda1,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4ffda1,'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',_0x439297['if']('length','ck-hidden',_0x52ae17=>!_0x52ae17)],'aria-label':N(_0x2f041e,'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'](_0x217800){-0x1===_0x217800?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xa0751 of this['commentViews'])_0xa0751['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1bdd13,_0x1e82f6){const _0x481484=new this['_config']['CommentView'](this['locale'],_0x1bdd13,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x481484['viewUid']=_0x1bdd13['id'],_0x481484['delegate']('removeComment')['to'](this),_0x481484['delegate']('updateComment')['to'](this),_0x481484['delegate']('resolveCommentThread')['to'](this),_0x481484['delegate']('editorReady')['to'](this),_0x481484['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x481484,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x481484,_0x1e82f6);}['_calculatePosition'](_0x2df633){const _0x46bccb=this['_model']['_findOptimalIndex'](_0x2df633);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2df633['authoredAt']?_0x46bccb-0x1:_0x46bccb:_0x46bccb-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1e60aa={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x1e60aa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1e60aa));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5d8849){const _0x5bfef3=this['commentViews']['remove'](_0x5d8849['id']);this['stopListening'](_0x5bfef3),_0x5bfef3['isEditMode']&&this['_updateHasDirtyComment'](),_0x5bfef3['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x16eeb9=>_0x16eeb9['isEditMode']);}['_rearrangeCollapse'](){const _0x2951bd=function(_0x2ef2c0){const _0x2290e6=new _0x236aed();for(const _0x1f6b8a of _0x2ef2c0)_0x2290e6['add'](_0x1f6b8a);return _0x2290e6;}(this['commentViews']),_0x50b4db=this['_collapsedCommentsView']['count'];for(let _0x146590=0x1;_0x146590<=_0x50b4db;_0x146590++)_0x2951bd['remove'](0x1);for(const _0x10e5a4 of _0x2951bd)_0x10e5a4['collapse']();_0x50b4db>0x0&&_0x2951bd['add'](this['_collapsedCommentsView'],0x1),ns(_0x11ee0c(Array['from'](this['visibleViews']),Array['from'](_0x2951bd)),this['visibleViews'],_0x2951bd);}['_rearrangeExpand'](){ns(_0x11ee0c(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3180f6 of this['visibleViews'])_0x3180f6['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x20a8bb=>{this['focusTracker']['add'](_0x20a8bb['element']),this['keystrokes']['listenTo'](_0x20a8bb['element']);}),this['commentViews']['on']('change',(_0x497707,_0x183ff9)=>{for(const _0x26fcd6 of _0x183ff9['removed'])this['focusTracker']['remove'](_0x26fcd6['element']),this['keystrokes']['stopListening'](_0x26fcd6['element']);for(const _0x327a2c of Array['from'](_0x183ff9['added'])['reverse']())this['focusTracker']['add'](_0x327a2c['element']),this['keystrokes']['listenTo'](_0x327a2c['element']);});}}function ns(_0x46ee01,_0x4e5685,_0x27f769){let _0x286ca5=0x0;for(const _0x542466 of _0x46ee01)switch(_0x542466){case'insert':_0x4e5685['add'](_0x27f769['get'](_0x286ca5),_0x286ca5),_0x286ca5++;break;case'delete':_0x4e5685['remove'](_0x286ca5);break;case'equal':_0x286ca5++;}}class oe extends kt{constructor(_0x252c05){super(_0x252c05);const _0x31432e=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x31432e['to']('contextValue',_0x471b10=>N(_0x252c05,'THREAD_CONTEXT_LABEL',_0x471b10)),'tabindex':-0x1},'children':[{'text':_0x31432e['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1c0272,_0x526aca){super(_0x1c0272);const _0x52391c=this['bindTemplate'];this['_model']=_0x526aca,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x22fbb8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x329626({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2ca7c1=>!!_0x2ca7c1),this['bind']('contextValue')['to'](this['_model'],'context',_0x27e4da=>_0x27e4da&&_0x27e4da['value']?this['_trimContextValue'](_0x27e4da['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x52391c['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 _0x7a6fdc=new _0x19a4ce(this['locale']);return _0x7a6fdc['label']=N(this['locale'],'Reopen'),_0x7a6fdc['tooltip']=N(this['locale'],'Reopen'),_0x7a6fdc['icon']=_0x15be80,_0x7a6fdc['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xff3bc1=>!_0xff3bc1),_0x7a6fdc['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x12c3cd,_0x2ad2ef)=>_0x12c3cd&&_0x2ad2ef),_0x7a6fdc['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x7a6fdc;}['_trimContextValue'](_0x17d968){if(_0x17d968['length']<0x96)return _0x17d968;const _0x1f119a=_0x17d968['lastIndexOf']('\x20',0x93);return _0x17d968['substring'](0x0,_0x1f119a>-0x1?_0x1f119a:0x93)+'...';}['_attachContextActions'](){const _0x855c70=this['element']['querySelector']('.ck-context'),_0x20ef60=_0x855c70['querySelector']('.ck-context__value');this['listenTo'](_0x855c70,'mouseenter',()=>{_0x20ef60['offsetWidth']<_0x20ef60['scrollWidth']&&_0x855c70['classList']['add']('overlay');}),this['listenTo'](_0x855c70,'mouseleave',()=>{_0x855c70['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x403e9f of this['focusables'])this['focusTracker']['add'](_0x403e9f['element']),this['keystrokes']['listenTo'](_0x403e9f['element']);}['_createContextView'](){const _0x4dfeab=new oe(this['locale']);return _0x4dfeab['bind']('contextValue')['to'](this),_0x4dfeab;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4e854f,_0x5dd5c7,_0x252128,_0x4e8775){super(_0x4e854f),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5dd5c7,this['_localUser']=_0x252128,this['_config']=_0x4e8775,this['commentThreadHeaderView']=new Xt(_0x4e854f,_0x5dd5c7),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x4e854f,N(_0x4e854f,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x4e854f,_0x5dd5c7,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4e8775)),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',(_0x2d48ec,_0x3055f0)=>_0x2d48ec||!!_0x3055f0),this['bind']('isUnlinked')['to'](_0x5dd5c7,'unlinkedAt',_0x271b00=>!!_0x271b00),this['bind']('ariaLabel')['to'](this,'length',_0x4556ea=>{const _0x400d2b=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x4556ea,_0x400d2b]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x22fbb8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x329626({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4fa2e4=>_0x4fa2e4['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1654b4=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x15b0aa=_0x1654b4['commentInputView'];return _0x1654b4['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x15b0aa,'value',(_0x2671d8,_0x54a46a,_0x1bacd7,_0x13d336,_0x44def5)=>!!_0x44def5||!!_0x13d336&&_0x1bacd7&&!_0x54a46a||_0x2671d8&&_0x1bacd7&&!_0x54a46a),_0x15b0aa['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5c03ab,_0x4c1c5b,_0x4a1abb)=>{let _0xb2f298;return _0xb2f298=_0x4a1abb&&_0x4c1c5b?'Reply\x20to\x20reopen\x20discussion...':_0x5c03ab?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xb2f298);}),_0x15b0aa['bind']('submitLabel')['to'](this,'length',_0xa8f245=>N(this['locale'],_0xa8f245?'Reply':'Comment')),_0x15b0aa['on']('submit',(_0x1b9764,_0x3c50ab)=>{this['fire']('addComment',_0x3c50ab),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x15b0aa['on']('cancel',()=>{this['focus']();}),_0x15b0aa['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x15b0aa['on']('cancel',_0x3788ea=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3788ea['stop']());}),this['on']('change:isActive',(_0x53e57c,_0x379f65,_0x54a8e3)=>{_0x54a8e3||this['length']||_0x15b0aa['value']||this['fire']('removeCommentThread');}),_0x1654b4;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4a5ee9,_0x202788,_0x213b61,_0x1aded2){super(_0x4a5ee9,_0x202788,_0x213b61,_0x1aded2),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4a5ee9,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2672d5,_0x2b1591,_0x595cff)=>{_0x595cff||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x42a56d,_0x5adf06,_0x599b57)=>{_0x599b57&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x24fa58=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x24fa58['if']('isActive','ck-thread--active'),_0x24fa58['if']('isUnlinked','ck-thread--unlinked'),_0x24fa58['to']('actionIndicator',_0xeb0dde=>_0xeb0dde?'ck-thread--'+_0xeb0dde:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x24fa58['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 _0x2107c0 of this['commentsListView']['commentViews'])_0x2107c0['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x32e7c9}=this,_0x321cd3=this['commentsListView']['commentViews']['get'](0x0);_0x321cd3===this['_boundFirstCommentView']||_0x321cd3['isSystemComment']||(this['_boundFirstCommentView']=_0x321cd3,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x321cd3,'actionIndicator',_0x296cde=>'remove'===_0x296cde?'remove':null),_0x321cd3['placeholder']=N(_0x32e7c9,'Write\x20a\x20comment...'),_0x321cd3['removeButton']['on']('execute',_0x374ce1=>{_0x374ce1['stop'](),this['showConfirm'](N(_0x32e7c9,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x321cd3['focus']();}),_0x321cd3['actionBar']['add'](this['resolveButton'],0x0),_0x321cd3['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x33f2b4=new _0x3a5e2f(this['locale']);return _0x33f2b4['label']=N(this['locale'],'Resolve'),_0x33f2b4['tooltip']=N(this['locale'],'Resolve'),_0x33f2b4['icon']=_0x2ad987,_0x33f2b4['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x33f2b4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x45a827=>!_0x45a827),_0x33f2b4['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x19f930,_0x14aaf8)=>_0x19f930&&!_0x14aaf8),_0x33f2b4['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x33f2b4;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x4dae1d){super(_0x4dae1d),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x16bd9c,_0x6a68ca,_0x1321f1)=>{this['element']['innerHTML']=_0x1321f1;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x387bf1,_0x493c56,_0x3b9a3d){super(_0x387bf1),this['_model']=_0x493c56,this['_config']=_0x3b9a3d,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x493c56,'content',_0x493c56,'authoredAt',(_0x42a96a,_0x55f6e7)=>N(_0x387bf1,'COMMENT_ARIA_LABEL',[_0x493c56['author']['name'],_0x3b9a3d['formatDateTime'](_0x55f6e7),new DOMParser()['parseFromString'](_0x42a96a,'text/html')['body']['textContent'],_0x493c56['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x387bf1,N(_0x387bf1,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x12e523(),this['focusTracker']=new _0x22fbb8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x329626({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x282e56=>_0x282e56['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x2911e1=new is(this['locale']);return _0x2911e1['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x1403b5,_0xfff799)=>_0xfff799?ts(_0x1403b5,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x1403b5),_0x2911e1;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x27f67c=new es(this['locale'],this['_config']['editorConfig']);return _0x27f67c['value']=this['_model']['content'],_0x27f67c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x27f67c['submitLabel']=N(this['locale'],'Save'),_0x27f67c['on']('submit',(_0x278498,_0x11844e)=>{this['fire']('updateComment',this['_model']['id'],_0x11844e),this['switchToDisplayMode'](),this['focus']();}),_0x27f67c['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x27f67c['once']('editorReady',()=>{_0x27f67c['focus']();}),_0x27f67c['createEditor'](),_0x27f67c['delegate']('editorReady')['to'](this),_0x27f67c['delegate']('editorDestroyed')['to'](this),_0x27f67c;}['_setupKeyboardNavigation'](){const _0x4d2db2=this['element'];this['keystrokes']['listenTo'](_0x4d2db2);for(const _0x221e7d of this['focusables'])this['focusTracker']['add'](_0x221e7d['element']),this['keystrokes']['listenTo'](_0x221e7d['element']);this['focusables']['on']('change',(_0x2d7bb7,_0x1dd6e8)=>{for(const _0xc752b6 of _0x1dd6e8['removed'])this['focusTracker']['remove'](_0xc752b6['element']),this['keystrokes']['stopListening'](_0xc752b6['element']);for(const _0x375711 of _0x1dd6e8['added'])this['focusTracker']['add'](_0x375711['element']),this['keystrokes']['listenTo'](_0x375711['element']);}),this['keystrokes']['set']('enter',(_0x8fcb8a,_0xbea66f)=>{_0x4d2db2===_0x8fcb8a['target']&&(this['focusCycler']['focusFirst'](),_0xbea66f());}),this['keystrokes']['set']('esc',(_0x18fb50,_0x1bc926)=>{_0x4d2db2!==_0x18fb50['target']&&(this['focus'](),_0x1bc926());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0x553b03,_0x5b463d,_0x12a758){super(_0x553b03,_0x5b463d,_0x12a758),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x553b03,'Reply...')),this['bind']('authoredAt')['to'](_0x5b463d),this['bind']('resolvedAt')['to'](_0x5b463d),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 _0x1eb990(_0x553b03,_0x5b463d['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5b463d,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x3a3a7f=this['bindTemplate'],_0x3d671c=[{'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':_0x3a3a7f['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x3a3a7f['to']('authoredAt',_0x25a18b=>this['_config']['formatDateTime'](_0x25a18b))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x3a3a7f['if']('isEditMode','ck-comment__actions--hidden'),_0x3a3a7f['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']&&_0x3d671c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x3a3a7f['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x3a3a7f['if']('isEditMode','ck-comment--edit'),_0x3a3a7f['if']('isSystemComment','ck-comment--info'),_0x3a3a7f['to']('actionIndicator',_0x5dfb3e=>_0x5dfb3e?'ck-comment--'+_0x5dfb3e:'')],'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':_0x3d671c}]}]};}['_createEditButton'](){const _0x193125=new _0x19a4ce(this['locale']);return _0x193125['label']=N(this['locale'],'Edit'),_0x193125['icon']=_0x4eaf7c,_0x193125['withText']=!0x0,_0x193125['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x193125['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x361b57=>!_0x361b57),_0x193125['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x193125['on']('execute',()=>this['switchToEditMode']()),_0x193125;}['_createRemoveButton'](){const _0x67d49c=new _0x19a4ce(this['locale']);return _0x67d49c['label']=N(this['locale'],'Remove'),_0x67d49c['icon']=_0x415646,_0x67d49c['withText']=!0x0,_0x67d49c['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x67d49c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x349816=>!_0x349816),_0x67d49c['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x67d49c['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x67d49c;}['_createDropdown'](){const _0x1efaf5=_0x27ddc6(this['locale'],_0x3735fe),_0x3a9834=_0x1efaf5['panelView']['children'],_0x20ce3a=new _0x4af2d5(this['locale']),_0x5f5346=_0x1efaf5['bindTemplate'];_0x5631c1(_0x1efaf5,()=>this['items']['find'](_0xef65cc=>_0xef65cc['isVisible'])),_0x1efaf5['extendTemplate']({'attributes':{'class':[_0x5f5346['if']('isVisible','ck-hidden',_0x410e90=>!_0x410e90)]}});const _0x5d84c1=(_0x50b037,_0x4dfaaa=-0x1)=>{const _0x68636c=new _0x3f5f88(this['locale']);_0x68636c['children']['add'](_0x50b037);const _0x122572=_0x4dfaaa>-0x1?_0x4dfaaa:_0x20ce3a['items']['length'];_0x20ce3a['items']['add'](_0x68636c,_0x122572);const _0xf635fb=Array['from'](this['items']);_0x1efaf5['unbind']('isEnabled','isVisible'),_0x1efaf5['bind']('isEnabled')['toMany'](_0xf635fb,'isEnabled',(..._0x22c806)=>_0x22c806['some'](_0x4d927b=>_0x4d927b)),_0x1efaf5['bind']('isVisible')['toMany'](_0xf635fb,'isVisible',(..._0x24d6d4)=>_0x24d6d4['some'](_0x461db1=>_0x461db1));};_0x1efaf5['panelPosition']='sw',_0x1efaf5['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x243f07});for(const _0x49de92 of this['items'])_0x5d84c1(_0x49de92);return _0x3a9834['add'](_0x20ce3a),_0x1efaf5['listenTo'](this['items'],'add',(_0x507b8d,_0x59f09a,_0x3983da)=>{_0x5d84c1(_0x59f09a,_0x3983da);}),_0x1efaf5['listenTo'](this['items'],'remove',(_0x1c026d,_0x53862b,_0x2beba3)=>{_0x20ce3a['items']['remove'](_0x2beba3);}),_0x1efaf5;}['_attachActions'](_0x15f737,_0x7a897f){const _0x399bc1=_0x15f737&&_0x15f737['element'];_0x399bc1&&(this['listenTo'](_0x399bc1,'mouseenter',()=>this['actionIndicator']=_0x7a897f),this['listenTo'](_0x399bc1,'focus',()=>this['actionIndicator']=_0x7a897f),this['listenTo'](_0x399bc1,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x399bc1,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1321f9=super['_createCommentInputView']();return _0x1321f9['bind']('placeholder')['to'](this),_0x1321f9;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x5e63ea){const _0x12267a=Dt(_0x5e63ea,0x1e),_0x85f823=new MutationObserver(_0x1b448c=>{for(const _0x2acf67 of _0x1b448c)('attributes'==_0x2acf67['type']&&'class'==_0x2acf67['attributeName']||'childList'==_0x2acf67['type']||'characterData'==_0x2acf67['type'])&&_0x12267a();});return{'attach'(_0x123483){_0x85f823['observe'](_0x123483,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x85f823['disconnect'](),_0x12267a['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x16eb35,_0x2288f5){super(_0x16eb35),this['id']=_0x2e35e1(),this['focusTracker']=new _0x22fbb8(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5e6573,_0x40d52d)=>this['fire']('Esc',_0x40d52d)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x2288f5),this['mainView']=_0x2288f5;const _0x5b81f8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x5b81f8['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 _0x277f47=this['element']['clientHeight'];_0x277f47&&(this['height']=_0x277f47);}}class T extends/* #__PURE__ -- @preserve */
29
- _0x70c1ad(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x89802e,target:_0x1c9c9c,type:_0x391631,isVisible:_0x35f592=!0x0}){super(),this['view']=_0x89802e,this['view']['element']||this['view']['render'](),this['_type']=_0x391631,this['_target']=_0x1c9c9c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x236aed([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x47a52b,_0x85ab78)=>{this['view']['focusTracker']['add'](_0x85ab78);}),this['focusableElements']['on']('remove',(_0x594d46,_0x205f37)=>{this['view']['focusTracker']['remove'](_0x205f37);}),this['set']('isVisible',_0x35f592);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x14b3fd=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x14b3fd),_0x14b3fd;}get['targetRect'](){const _0x6875e7=this['target'];if(null===_0x6875e7)return null;if(_0x6875e7 instanceof _0x2767ff)return _0x6875e7;const _0x26c024=_0x6875e7['filter'](_0x3a17b8=>function(_0x277d44){const _0x32f746=_0x277d44['offsetParent'];if(_0x32f746)return!0x0;const _0x1817b3=_0x277d44['getClientRects']()['item'](0x0);return!!_0x1817b3;}(_0x3a17b8));return 0x0===_0x26c024['length']?null:new _0x2767ff(_0x26c024[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x3245b1){this['view']['isActive']=_0x3245b1,this['view']['mainView']['isActive']=_0x3245b1;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x466931){if(!(null===_0x466931||_0x466931 instanceof _0x2767ff||Array['isArray'](_0x466931)&&_0x466931['every'](_0x44f31c=>fi(_0x44f31c))))throw new _0x4000c2('annotation-invalid-target',null,{'target':_0x466931});}['_getNormalizedTarget'](){const _0x3f5544='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x3f5544)?[_0x3f5544]:_0x3f5544;}}function fi(_0x5b2266){return null!==_0x5b2266&&'object'==typeof _0x5b2266&&'nodeType'in _0x5b2266&&0x1===_0x5b2266['nodeType'];}class S extends _0x236aed{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x25c196=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x22fbb8(),this['_focusTracker']['on']('change:isFocused',(_0x56d4f0,_0x2f7c74,_0x1ca074)=>{_0x1ca074||this['fire']('blur');});for(const _0x2e965f of _0x25c196)this['add'](_0x2e965f);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x5e69c5){if(this['has'](_0x5e69c5))throw new _0x4000c2('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x5e69c5['innerView'],_0x5e69c5),this['_viewToAnnotation']['set'](_0x5e69c5['view'],_0x5e69c5);for(const _0x4c8010 of _0x5e69c5['focusableElements'])this['_focusTracker']['add'](_0x4c8010);this['listenTo'](_0x5e69c5['focusableElements'],'add',(_0x164533,_0xfd5b71)=>{this['_focusTracker']['add'](_0xfd5b71);}),this['listenTo'](_0x5e69c5['focusableElements'],'remove',(_0x2b6db1,_0x2a56b3)=>{this['_focusTracker']['remove'](_0x2a56b3);}),this['listenTo'](_0x5e69c5['view']['focusTracker'],'change:isFocused',(_0x1448cc,_0x42591d,_0x4a6708)=>{_0x4a6708&&this['fire']('focus',_0x5e69c5);}),_0x5e69c5['updateTargetRect']();const _0x2f3657=this['_getOrderInContent'](_0x5e69c5['view']['targetRect']);return super['add'](_0x5e69c5,_0x2f3657);}['remove'](_0x7c2eac){if(!this['has'](_0x7c2eac))throw new _0x4000c2('annotationcollection-not-existing-item',null);this['stopListening'](_0x7c2eac['view']['focusTracker']),this['stopListening'](_0x7c2eac['focusableElements']);for(const _0x47b738 of _0x7c2eac['focusableElements'])this['_focusTracker']['remove'](_0x47b738);return this['_viewToAnnotation']['delete'](_0x7c2eac['view']),this['_innerViewToAnnotation']['delete'](_0x7c2eac['innerView']),super['remove'](_0x7c2eac);}['getByInnerView'](_0x31ea9d){return this['_innerViewToAnnotation']['get'](_0x31ea9d);}['getByView'](_0x22f9e0){return this['_viewToAnnotation']['get'](_0x22f9e0);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x576d27 of this)_0x576d27['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2d055c=Array['from'](this)['sort']((_0x57e4ee,_0x268ea1)=>w(_0x57e4ee['view']['targetRect'],_0x268ea1['view']['targetRect']));for(let _0x4189f9=_0x2d055c['length']-0x1;_0x4189f9>0x0;_0x4189f9--){const _0x38b9f8=_0x2d055c[_0x4189f9];_0x4189f9!==this['getIndex'](_0x38b9f8)&&(this['remove'](_0x38b9f8),this['add'](_0x38b9f8));}}['_getOrderInContent'](_0x442b5a){let _0x1ff187=0x0;if(!_0x442b5a)return this['length'];for(const _0x124224 of this){const _0x210af4=_0x124224['view']['targetRect'];if(_0x210af4){if(w(_0x442b5a,_0x210af4)<0x0)return _0x1ff187;_0x1ff187++;}}return _0x1ff187;}}function v({source:_0x56a40b,target:_0x319f4e,filter:_0x1506c7}){for(const _0x28e100 of _0x56a40b)_0x1506c7(_0x28e100)&&_0x319f4e['add'](_0x28e100);_0x319f4e['listenTo'](_0x56a40b,'add',(_0x100c0c,_0x5ea43e)=>{_0x1506c7(_0x5ea43e)&&_0x319f4e['add'](_0x5ea43e);}),_0x319f4e['listenTo'](_0x56a40b,'remove',(_0x4eeee1,_0x34b20b)=>{_0x319f4e['has'](_0x34b20b)&&_0x319f4e['remove'](_0x34b20b);});}function w(_0x4c4d55,_0x362a82){if(null===_0x4c4d55&&null===_0x362a82)return 0x0;if(null===_0x4c4d55)return-0x1;if(null===_0x362a82)return 0x1;const _0x18b8ef=_0x4c4d55['top']-_0x362a82['top'];return 0x0==_0x18b8ef?_0x4c4d55['left']-_0x362a82['left']:_0x18b8ef;}class y extends _0x4b682f{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xbaf88f){if(super(_0xbaf88f),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xbaf88f instanceof _0xf60486){const _0x3fc1a8=_0xbaf88f['locale'];_0xbaf88f['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x3fc1a8,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x3fc1a8,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x3fc1a8,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x3fc1a8,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x3fc1a8,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x3fc1a8,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x3fc1a8,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x325d1){this['collection']['add'](_0x325d1);}['remove'](_0x4e0838){this['collection']['remove'](_0x4e0838),_0x4e0838['destroy']();}['refreshVisibility'](){for(const _0x361b89 of this['collection'])_0x361b89['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x57778d){return this['collection']['getByInnerView'](_0x57778d);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5b740d of this['collection'])_0x5b740d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5731b0){this['fire']('_activateAnnotation',_0x5731b0);}['createAnnotation'](_0x390719){return new T(_0x390719);}['createAnnotationView'](_0x2af8d3,_0x14119e){return new E(_0x2af8d3,_0x14119e);}['_addActiveAnnotation'](_0x1322ff){const _0x1d0d17=new Set(this['activeAnnotations']);_0x1d0d17['add'](_0x1322ff),this['activeAnnotations']=_0x1d0d17;}['_removeActiveAnnotation'](_0x2cd07b){const _0x2369f2=new Set(this['activeAnnotations']);_0x2369f2['delete'](_0x2cd07b),this['activeAnnotations']=_0x2369f2;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3b29de=this['collection'],_0x35187b=this['_visibleAnnotations'];function _0x222f32(_0x247b0d){const _0x2c72cb=_0x247b0d['source'];_0x2c72cb['isVisible']&&!_0x35187b['has'](_0x2c72cb)?_0x35187b['add'](_0x2c72cb):!_0x2c72cb['isVisible']&&_0x35187b['has'](_0x2c72cb)&&_0x35187b['remove'](_0x2c72cb),_0x2c72cb['view']['focusTracker']['remove'](_0x2c72cb['view']['element']),_0x2c72cb['view']['focusTracker']['add'](_0x2c72cb['view']['element']);}this['listenTo'](_0x3b29de,'add',(_0x5904b5,_0x155aa5)=>{_0x155aa5['isVisible']&&_0x35187b['add'](_0x155aa5),this['listenTo'](_0x155aa5,'change:isVisible',_0x222f32);}),this['listenTo'](_0x3b29de,'remove',(_0x34ca19,_0x3214dd)=>{_0x35187b['has'](_0x3214dd)&&_0x35187b['remove'](_0x3214dd),this['stopListening'](_0x3214dd,'change:isVisible',_0x222f32);});}['_setupEnterAnnotationKeystroke'](){const _0x1fc73b=_0x5062db=>{_0x5062db['on']('ready',()=>{_0x5062db['keystrokes']['set'](_0xb096fc,(_0x2262b1,_0x4ff38d)=>{const _0x5ddd9d=_0x507315(this['activeAnnotations']['values']());_0x5ddd9d&&(_0x5ddd9d['view']['focus'](),_0x4ff38d());});});};this['context']instanceof _0xf60486?_0x1fc73b(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x567633,_0xca0fba)=>{_0x1fc73b(_0xca0fba);});}['_setupEscapeAnnotationHandling'](){const _0x5a79b4=_0xe0bbfa=>{const _0x3c79b7=_0xe0bbfa['source'],_0x4a5e3b=[];let _0x1e62a1;if(Array['isArray'](_0x3c79b7['target'])){_0x1e62a1=_0x3c79b7['target'][0x0],this['context']instanceof _0xf60486?_0x4a5e3b['push'](this['context']):this['context']['editors']&&_0x4a5e3b['push'](...this['context']['editors']);for(const _0x3582ed of _0x4a5e3b)for(const _0x31cf2c of _0x3582ed['editing']['view']['domRoots']['values']())if(_0x31cf2c['contains'](_0x1e62a1))return void _0x3582ed['editing']['view']['focus']();_0x1e62a1['focus']();}};this['listenTo'](this['collection'],'add',(_0x4df3e0,_0x4b70b9)=>{this['listenTo'](_0x4b70b9,'escape',_0x5a79b4,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x56385e,_0xd6e50d)=>{this['stopListening'](_0xd6e50d,'escape',_0x5a79b4);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4b682f{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20c331){super(_0x20c331),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3d81fd=this['context']['config'];_0x3d81fd['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3d81fd['define']('comments.maxThreadTotalWeight',0x1f4),_0x3d81fd['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3d81fd['define']('comments.CommentThreadView',gt),_0x3d81fd['define']('comments.CommentView',Tt),_0x3d81fd['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x55481e=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x894a8f,_0x56dc47)=>this['_addCommentThread'](_0x56dc47)),this['on']('submitCommentThread',(_0x1684f6,_0x462088)=>this['_submitCommentThread'](_0x462088)),this['on']('resolveCommentThread',(_0x1b7b7c,_0x3f72f2)=>this['_resolveCommentThread'](_0x3f72f2)),this['on']('resolveCommentThread',(_0x115a4a,_0x3d19b0)=>this['_updateActiveAnnotation'](_0x3d19b0),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x6c92f9,_0x35be3f)=>this['_reopenCommentThread'](_0x35be3f)),this['on']('reopenCommentThread',(_0xdffde3,_0x417ff3)=>this['_updateActiveAnnotation'](_0x417ff3),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x310a58,_0x11e638)=>this['_removeCommentThread'](_0x11e638)),this['on']('updateCommentThread',(_0x12f5ba,_0xe7d671)=>this['_updateCommentThread'](_0xe7d671)),this['on']('updateCommentThread',(_0x5f24ee,_0x35b42e)=>this['_updateActiveAnnotation'](_0x35b42e),{'priority':'lowest'}),this['on']('addComment',(_0x186cc0,_0x1eba57)=>this['_addComment'](_0x1eba57)),this['on']('updateComment',(_0x1a5e96,_0x4775c4)=>this['_updateComment'](_0x4775c4)),this['on']('removeComment',(_0x4f54cd,_0x26d6fc)=>this['_removeComment'](_0x26d6fc)),this['on']('addComment',(_0x45f084,{threadId:_0x500d8d,isFromAdapter:_0x2f8c64})=>{if(_0x2f8c64)return;const _0x517e9b=this['getCommentThread'](_0x500d8d),_0x58a1d7=_0x517e9b&&this['_threadToController']['get'](_0x517e9b);_0x58a1d7&&_0x58a1d7['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x55481e,'change:activeAnnotations',(_0x4c2822,_0x363163,_0x1f8ac2)=>{const _0x246743=Array['from'](_0x1f8ac2)['map'](_0x4a4af0=>this['_viewToController']['get'](_0x4a4af0['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x246743?_0x246743['model']:null;});}set['adapter'](_0x2c9acb){if(this['_adapter'])throw new _0x4000c2('commentsrepository-adapter-already-set');this['_adapter']=_0x2c9acb;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x21aaec=_t,threadId:_0x117bc1=_0x2e35e1(),comments:_0x301541=[],unlinkedAt:_0x3c6b7b=null,resolvedAt:_0xce14a4=null,resolvedBy:_0x3acce3=null,target:_0x47bda4=null,context:_0x56df83=null,attributes:_0x15677a={},isResolvable:_0x50ae81=!0x0,isSubmitted:_0x5bf74b=!0x1,isFromAdapter:_0x5e7943=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x21aaec),{'channelId':_0x21aaec,'threadId':_0x117bc1,'comments':_0x301541,'unlinkedAt':_0x3c6b7b,'resolvedAt':_0xce14a4,'resolvedBy':_0x3acce3,'target':_0x47bda4,'context':_0x56df83,'attributes':_0x15677a,'isFromAdapter':_0x5e7943,'isResolvable':_0x50ae81,'isSubmitted':_0x5bf74b}),this['getCommentThread'](_0x117bc1);}['openNewCommentThread']({channelId:_0x328bee=_t,threadId:_0x5e4e91=_0x2e35e1(),target:_0x16a917,context:_0x10d953=null,isResolvable:_0x286931=!0x0}){if(this['_readOnlyChannels']['has'](_0x328bee)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x16a917)throw new _0x4000c2('commentsrepository-missing-target');const _0xcdd271=this['addCommentThread']({'channelId':_0x328bee,'threadId':_0x5e4e91,'target':_0x16a917,'context':_0x10d953,'isResolvable':_0x286931});if(!_0xcdd271)return null;const _0x5da369=this['_threadToController']['get'](_0xcdd271),_0x25c982=_0x5da369['view']['commentThreadInputView']['commentInputView'],_0x15fef6=this['context']['plugins']['get'](y),_0x28d182=_0x15fef6['getByInnerView'](_0x5da369['view']);return _0x15fef6['activate'](_0x28d182),_0x25c982['once']('editorReady',()=>_0x25c982['focus']()),_0xcdd271;}['hasCommentThread'](_0x4096f4){if('string'!=typeof _0x4096f4)throw new _0x4000c2('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4096f4);}['updateCommentThread']({channelId:_0x55c811=_t,threadId:_0x3af244,context:_0x3b44f1,unlinkedAt:_0x58f77a,attributes:_0x4c0dd3,isFromAdapter:_0xec7e52=!0x1}){return this['fire'](Nt('updateCommentThread',_0x55c811),{'channelId':_0x55c811,'threadId':_0x3af244,'context':_0x3b44f1,'unlinkedAt':_0x58f77a,'attributes':_0x4c0dd3,'isFromAdapter':_0xec7e52}),this['getCommentThread'](_0x3af244);}['getCommentThread'](_0x4fba81){if('string'!=typeof _0x4fba81)throw new _0x4000c2('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4fba81);}['fetchCommentThread']({channelId:_0x1a3bd8,threadId:_0x1f08c7}={}){const _0x95380b=this['getCommentThread'](_0x1f08c7);if(_0x95380b)return Promise['resolve'](_0x95380b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4000c2('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1a3bd8,'threadId':_0x1f08c7})['then'](_0x48ad1a=>this['hasCommentThread'](_0x1f08c7)?this['getCommentThread'](_0x1f08c7):_0x48ad1a?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1a3bd8},_0x48ad1a)):void 0x0)['catch'](_0x20d30a=>{throw console['error'](_0x20d30a),new _0x4000c2('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x18d54a,skipNotAttached:_0x2278ce=!0x1,skipEmpty:_0x34e2ee=!0x1,toJSON:_0x31fcac=!0x1}={}){const _0x517f51=[];for(const _0x3683d4 of this['_threads']['values']())_0x18d54a&&_0x3683d4['channelId']!==_0x18d54a||_0x2278ce&&!_0x3683d4['isAttached']||_0x34e2ee&&0x0===_0x3683d4['length']||_0x517f51['push'](_0x3683d4);return _0x31fcac?_0x517f51['map'](_0xb2a3ed=>_0xb2a3ed['toJSON']()):_0x517f51;}['getAnnotationForCommentThread'](_0x38d09f){const _0x4c72e0=this['_threadToController']['get'](_0x38d09f);if(!_0x4c72e0)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x4c72e0['view'])||null;}['getCommentThreadForAnnotation'](_0x1030b1){const _0x777fd7=this['_viewToController']['get'](_0x1030b1['innerView']);return _0x777fd7?_0x777fd7['model']:null;}['setActiveCommentThread'](_0x17d863){const _0x502d60=this['context']['plugins']['get'](y);if(!_0x17d863)return void(this['activeCommentThread']&&_0x502d60['deactivateAll']());const _0x4eadd8=this['getCommentThread'](_0x17d863);if(!_0x4eadd8)throw new _0x4000c2('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x17d863});if(!this['_threadToController']['has'](_0x4eadd8))throw new _0x4000c2('commentsrepository-active-not-attached',null,{'threadId':_0x17d863});const _0x2b7397=_0x502d60['getByInnerView'](this['_threadToController']['get'](_0x4eadd8)['view']);_0x502d60['activate'](_0x2b7397);}['switchReadOnly'](_0x4b964c,_0x5d5975){_0x4b964c?this['_readOnlyChannels']['add'](_0x5d5975):this['_readOnlyChannels']['delete'](_0x5d5975),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x516a07){return this['_readOnlyChannels']['has'](_0x516a07)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4b5bdb,_0x4d48f2){return new vt(_0x4b5bdb,_0x4d48f2);}['setPermissions'](_0x210380,_0x41a89a=_t){this['_permissions']['set'](_0x41a89a,_0x210380),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3705c0=_t){return this['_permissions']['has'](_0x3705c0)?this['_permissions']['get'](_0x3705c0):bt;}['_addCommentThread']({channelId:_0x21bc9f,threadId:_0x24e1be,comments:_0x40d7fc,unlinkedAt:_0x4a10a9,resolvedAt:_0x4adc7f,resolvedBy:_0x430c58,target:_0x5862d1,context:_0x5f46a9,attributes:_0x3c993a,isFromAdapter:_0x46fc59,isResolvable:_0x264075,isSubmitted:_0x39d48f}){if('string'!=typeof _0x24e1be)throw new _0x4000c2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x24e1be});if(this['hasCommentThread'](_0x24e1be))throw new _0x4000c2('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x24e1be});const _0x521eb2=new pi(this,{'channelId':_0x21bc9f,'id':_0x24e1be,'context':_0x5f46a9,'attributes':_0x3c993a,'unlinkedAt':_0x4a10a9,'resolvedAt':_0x4adc7f,'resolvedBy':_0x430c58?this['context']['plugins']['get'](it)['getUser'](_0x430c58):null,'isResolvable':_0x264075,'isSubmitted':_0x39d48f||_0x46fc59});this['_threads']['set'](_0x24e1be,_0x521eb2);for(const _0x51627c of _0x40d7fc)_0x521eb2['_add'](this['_createNewComment']({'threadId':_0x24e1be,..._0x51627c}));return _0x5862d1&&_0x521eb2['attachTo'](_0x5862d1),_0x46fc59||!_0x521eb2['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x21bc9f,'threadId':_0x24e1be});}['_submitCommentThread']({channelId:_0x34ed5a,threadId:_0x49391b}){if(!this['hasCommentThread'](_0x49391b))throw new _0x4000c2('commentsrepository-missing-comment-thread',this);const _0x270e77=this['getCommentThread'](_0x49391b);if(_0x270e77['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5ee5be,comments:_0x3c701c,resolvedAt:_0x5a3a09,resolvedBy:_0x24934f,context:_0x51b33a,attributes:_0x52093a}=_0x270e77,_0x172566=this['context']['plugins']['get']('PendingActions'),_0x272f18=_0x172566['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x34ed5a,'threadId':_0x5ee5be,'comments':_0x3c701c['map'](_0x1b48f5=>_0x1b48f5['toJSON']()),'resolvedAt':_0x5a3a09,'resolvedBy':_0x24934f?_0x24934f['id']:_0x24934f,'context':_0x51b33a,'attributes':_0x52093a})['then'](({comments:_0x113c2b})=>{_0x172566['remove'](_0x272f18);for(const _0x824c8e of _0x113c2b)this['_updateComment']({'channelId':_0x34ed5a,'threadId':_0x49391b,'commentId':_0x824c8e['commentId'],'createdAt':_0x824c8e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x49a02e=>{throw console['error'](_0x49a02e),new _0x4000c2('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x372fb1,target:_0x1d1b67}){const _0xb10278=this['getCommentThread'](_0x372fb1);if(!_0xb10278)throw new _0x4000c2('commentsrepository-attach-missing-comment-thread',this);const _0x20b6d7=this['context']['plugins']['get']('PendingActions'),_0x1a4b51=this['context']['plugins']['get'](y),_0x25a114=this['_createCommentThreadView'](_0xb10278),_0x4358c3=new vt(_0xb10278,_0x25a114);let _0x625834=null;_0x25a114['on']('change:isDirty',(_0x4136c8,_0x276a71,_0x126b5a)=>{_0x126b5a?_0x625834=_0x20b6d7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x625834&&(_0x20b6d7['remove'](_0x625834),_0x625834=null);}),this['_threadToController']['set'](_0xb10278,_0x4358c3),this['_viewToController']['set'](_0x25a114,_0x4358c3);const _0xc08090=new E(this['context']['locale'],_0x25a114);_0xc08090['bind']('length')['to'](_0x25a114),_0xc08090['bind']('isDirty')['to'](_0x25a114,'isDirty',_0x25a114,'length',(_0x589aeb,_0x4982d4)=>_0x589aeb||!_0x4982d4),_0xc08090['bind']('isActive')['to'](_0x25a114),_0xc08090['type']='comment';const _0x1f3026=new T({'view':_0xc08090,'target':_0x1d1b67,'type':'comment','isVisible':!_0xb10278['archivedAt']&&!!('function'==typeof _0x1d1b67?_0x1d1b67():_0x1d1b67)});return _0x25a114['on']('escape',()=>{_0x1f3026['fire']('escape');}),this['_bindAnnotationToEditors'](_0x25a114,_0x1f3026),_0x1a4b51['add'](_0x1f3026),_0x1f3026;}['_bindAnnotationToEditors'](_0x48953f,_0x566c9d){this['listenTo'](_0x48953f,'editorReady',(_0x1eaed8,_0x320c92)=>{const _0xe99c59=_0x320c92['ui']['view']['body']['bodyCollectionContainer'];_0x566c9d['focusableElements']['add'](_0xe99c59),this['context']instanceof _0xf60486&&this['context']['ui']['focusTracker']['add'](_0xe99c59);},{'priority':'highest'}),this['listenTo'](_0x48953f,'editorDestroyed',(_0x1edcba,_0x3c1db8)=>{const _0x5e3ef8=_0x3c1db8['ui']['view']['body']['bodyCollectionContainer'];_0x566c9d['focusableElements']['has'](_0x5e3ef8)&&_0x566c9d['focusableElements']['remove'](_0x5e3ef8),this['context']instanceof _0xf60486&&this['context']['ui']['focusTracker']['remove'](_0x5e3ef8);});}['_unbindEditors'](_0x33b18c){this['stopListening'](_0x33b18c,'editorReady'),this['stopListening'](_0x33b18c,'editorDestroyed');}['_createCommentThreadView'](_0x5023a2){const _0x16004d=this['context']['plugins']['get'](it),{config:_0x1f71f8,locale:_0x43738a}=this['context'],_0x2293c0=pt(_0x1f71f8['get']('locale'),_0x43738a);return new(0x0,(_0x1f71f8['get']('comments'))['CommentThreadView'])(_0x43738a,_0x5023a2,_0x16004d['me'],{'editorConfig':{..._0x1f71f8['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1f71f8['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1f71f8['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1f71f8['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1f71f8['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2293c0,'CommentView':_0x1f71f8['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x14d275,channelId:_0x5169de,resolvedAt:_0x29287e,resolvedBy:_0x22e9ca,isFromAdapter:_0x35e984}){if(!this['hasCommentThread'](_0x14d275))throw new _0x4000c2('commentsrepository-missing-comment-thread',null,{'threadId':_0x14d275});const _0x162016=this['getCommentThread'](_0x14d275);if(_0x162016['isResolved'])throw new _0x4000c2('commentsrepository-resolved-comment-thread',null,{'threadId':_0x14d275});const _0xeba651=this['context']['plugins']['get'](it);if(_0x162016['resolvedBy']=_0xeba651['getUser'](_0x22e9ca),_0x162016['resolvedAt']=_0x29287e,_0x35e984||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1b741d=this['context']['plugins']['get']('PendingActions'),_0x27cb02=_0x1b741d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x5169de,'threadId':_0x14d275})['then'](({resolvedAt:_0x52415f,resolvedBy:_0x3e4d5b})=>{_0x1b741d['remove'](_0x27cb02),_0x162016['resolvedBy']['id']!==_0x3e4d5b&&(_0x162016['resolvedBy']=_0xeba651['getUser'](_0x3e4d5b)),_0x162016['resolvedAt']=_0x52415f;})['catch'](_0x324b91=>{throw console['error'](_0x324b91),new _0x4000c2('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x32f6ed,channelId:_0x3dd945,isFromAdapter:_0x169717}){if(!this['hasCommentThread'](_0x32f6ed))throw new _0x4000c2('commentsrepository-missing-comment-thread',null,{'threadId':_0x32f6ed});const _0x50231b=this['getCommentThread'](_0x32f6ed);if(!_0x50231b['isResolved'])throw new _0x4000c2('commentsrepository-reopen-comment-thread',null,{'threadId':_0x32f6ed});if(_0x50231b['resolvedBy']=null,_0x50231b['resolvedAt']=null,_0x169717||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2753d7=this['context']['plugins']['get']('PendingActions'),_0x11a258=_0x2753d7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3dd945,'threadId':_0x32f6ed})['then'](()=>_0x2753d7['remove'](_0x11a258))['catch'](_0x4369fa=>{throw console['error'](_0x4369fa),new _0x4000c2('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x38bc34,isFromAdapter:_0x1a0ccc}){const _0x4c46be=this['getCommentThread'](_0x38bc34);if(!_0x4c46be)throw new _0x4000c2('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x38bc34),this['_threads']['delete'](_0x38bc34),!_0x4c46be['isSubmitted']||_0x1a0ccc||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5a8e88=this['context']['plugins']['get']('PendingActions'),{channelId:_0x300aab}=_0x4c46be,_0x550b1d=_0x5a8e88['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x300aab,'threadId':_0x38bc34})['then'](()=>_0x5a8e88['remove'](_0x550b1d))['catch'](_0x28f41f=>{throw console['error'](_0x28f41f),new _0x4000c2('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4c77a9,unlinkedAt:_0x571b14,context:_0x4d5025,attributes:_0x164a49,isFromAdapter:_0x419c34}){if('string'!=typeof _0x4c77a9)throw new _0x4000c2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4c77a9});if(!this['hasCommentThread'](_0x4c77a9))throw new _0x4000c2('commentsrepository-missing-comment-thread',null,{'threadId':_0x4c77a9});const _0x33416c=this['getCommentThread'](_0x4c77a9);let _0x268729=!0x1;if(void 0x0!==_0x4d5025&&_0x33416c['context']!==_0x4d5025&&(_0x33416c['context']=_0x4d5025,_0x268729=!0x0),void 0x0!==_0x571b14&&_0x33416c['unlinkedAt']!==_0x571b14&&(_0x33416c['unlinkedAt']=_0x571b14,_0x268729=!0x0),_0x164a49&&!At(_0x164a49,_0x33416c['attributes'])&&(_0x33416c['attributes']=_0x164a49,_0x268729=!0x0),!_0x268729)return Promise['resolve']();if(!_0x33416c['isSubmitted']||_0x419c34||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4f96b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x56e8b2}=_0x33416c,_0x3fd826=_0x4f96b2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x56e8b2,'threadId':_0x4c77a9,'context':_0x4d5025,'unlinkedAt':_0x571b14,'attributes':_0x164a49})['then'](()=>_0x4f96b2['remove'](_0x3fd826))['catch'](_0x2338b=>{throw console['error'](_0x2338b),new _0x4000c2('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2e150d){const _0x1654d0=this['context']['plugins']['get'](y),_0x3f6299=this['getCommentThread'](_0x2e150d);if(_0x3f6299['_isAttached']=!0x1,this['_threadToController']['has'](_0x3f6299)){const _0x1f9f07=this['_threadToController']['get'](_0x3f6299),_0x39d386=_0x1f9f07['view'],_0x5555ea=_0x1654d0['getByInnerView'](_0x39d386);this['_threadToController']['delete'](_0x3f6299),this['_viewToController']['delete'](_0x39d386),_0x5555ea&&_0x1654d0['remove'](_0x5555ea),_0x1f9f07['destroy'](),_0x39d386['destroy']()['then'](()=>{this['_unbindEditors'](_0x39d386);});}}['_updateActiveAnnotation']({threadId:_0x46d69d,resolvedAt:_0x51502e,unlinkedAt:_0x9bab60}){const _0xa14487=!!_0x51502e,_0x451f36=this['context']['plugins']['get'](y),_0x211720=this['getCommentThread'](_0x46d69d);if(this['_threadToController']['has'](_0x211720)){const _0x30445d=this['_threadToController']['get'](_0x211720)['view'],_0x277d84=_0x451f36['getByInnerView'](_0x30445d);_0x277d84&&(_0xa14487&&_0x451f36['_removeActiveAnnotation'](_0x277d84),_0x9bab60?_0x277d84['isVisible']=!0x1:_0x277d84['refreshVisibility']());}}['_getExternalAuthor'](_0x3857f9){const _0x44bbf1=this['context']['plugins']['get'](it),_0x59bba8=It('external:'+_0x3857f9),_0xf5c1e7=_0x44bbf1['getUser'](_0x59bba8);return _0xf5c1e7||_0x44bbf1['addUser']({'id':_0x59bba8,'name':_0x3857f9});}['_createNewComment']({threadId:_0x2acc48,commentId:_0x84e023=_0x2e35e1(),content:_0xaa8a21,authorId:_0x246398,createdAt:_0x733ee0,attributes:_0x313416}){if('string'!=typeof _0x84e023)throw new _0x4000c2('commentsrepository-invalid-commentid');if('string'!=typeof _0x246398)throw new _0x4000c2('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xaa8a21||!_0xaa8a21['trim']())throw new _0x4000c2('commentsrepository-invalid-comment-content');const _0x4546d8=this['context']['plugins']['get'](it)['getUser'](_0x246398);if(!_0x4546d8)throw new _0x4000c2('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x246398});let _0x1e5b21=null,_0x39c8ee=_0x733ee0;return _0x313416?.['@external']&&(_0x1e5b21=this['_getExternalAuthor'](_0x313416['@external']['authorName']),_0x39c8ee=new Date(_0x313416['@external']['createdAt'])),new wi(this,{'threadId':_0x2acc48,'id':_0x84e023,'author':_0x1e5b21||_0x4546d8,'creator':_0x4546d8,'content':_0xaa8a21,'createdAt':_0x733ee0,'authoredAt':_0x39c8ee,'attributes':_0x313416});}['_addComment'](_0x2a9acc){let {threadId:_0x7454fb,content:_0x36ae9b,attributes:_0x4db46f,isFromAdapter:_0x40f894}=_0x2a9acc;const _0x57d59b=this['getCommentThread'](_0x2a9acc['threadId']);if(!_0x57d59b)throw new _0x4000c2('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4b22af=this['_createNewComment'](_0x2a9acc),{id:_0x20a008}=_0x4b22af;if(_0x57d59b['_add'](_0x4b22af),_0x40f894||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x57d59b['isSubmitted'])return Promise['resolve']();const _0x4b441d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3771e1}=_0x57d59b,_0x2d0d4f=_0x4b441d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4db46f||(_0x4db46f={}),this['adapter']['addComment']({'channelId':_0x3771e1,'threadId':_0x7454fb,'commentId':_0x20a008,'content':_0x36ae9b,'attributes':_0x4db46f})['then'](_0x2e16af=>{_0x4b441d['remove'](_0x2d0d4f),_0x2e16af&&this['_updateComment']({'channelId':_0x3771e1,'threadId':_0x7454fb,'commentId':_0x20a008,'createdAt':_0x2e16af['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5cb130=>{throw console['error'](_0x5cb130),new _0x4000c2('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x1fb979,commentId:_0x344d69,content:_0x26acdd,createdAt:_0x4df7ff,attributes:_0x8200f6,isFromAdapter:_0x2cdcfe}){if(void 0x0!==_0x26acdd&&('string'!=typeof _0x26acdd||!_0x26acdd['trim']()['length']))throw new _0x4000c2('commentsrepository-update-comment-invalid-content');const _0x4831ae=this['getCommentThread'](_0x1fb979),_0x1bf03b=_0x4831ae['getComment'](_0x344d69);if(!_0x1bf03b)throw new _0x4000c2('commentsrepository-update-missing-comment',this);let _0x2c161b=!0x1;if(_0x26acdd&&_0x26acdd!==_0x1bf03b['content']&&(_0x1bf03b['isEditable']||_0x2cdcfe)&&(_0x1bf03b['content']=_0x26acdd,_0x2c161b=!0x0),_0x4df7ff&&_0x4df7ff!==_0x1bf03b['createdAt']&&(_0x1bf03b['createdAt']=_0x4df7ff,_0x1bf03b['attributes']&&_0x1bf03b['attributes']['@external']||(_0x1bf03b['authoredAt']=_0x4df7ff),_0x2c161b=!0x0),_0x8200f6&&!At(_0x8200f6,_0x1bf03b['attributes'])&&(_0x1bf03b['attributes']=_0x8200f6,_0x2c161b=!0x0),!_0x2c161b)return Promise['resolve']();if(_0x4831ae['fire']('commentUpdated'),_0x2cdcfe||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2f40ae=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1df232}=this['getCommentThread'](_0x1bf03b['threadId']),_0x520ca0=_0x2f40ae['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1df232,'threadId':_0x1fb979,'commentId':_0x344d69,'content':_0x26acdd,'attributes':_0x8200f6})['then'](()=>_0x2f40ae['remove'](_0x520ca0))['catch'](_0x55d652=>{throw console['error'](_0x55d652),new _0x4000c2('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x48ea02,commentId:_0x5a8e23,isFromAdapter:_0x2b74b6}){const _0x3559ce=this['getCommentThread'](_0x48ea02),_0x44fe82=_0x3559ce['getComment'](_0x5a8e23);if(!_0x44fe82)throw new _0x4000c2('commentsrepository-remove-missing-comment',this);if(_0x3559ce['_remove'](_0x44fe82),_0x2b74b6||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2ed214=this['context']['plugins']['get']('PendingActions'),{channelId:_0x549c25}=_0x3559ce,_0x5d501f=_0x2ed214['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x549c25,'threadId':_0x48ea02,'commentId':_0x5a8e23})['then'](()=>_0x2ed214['remove'](_0x5d501f))['catch'](_0x1d5a6d=>{throw console['error'](_0x1d5a6d),new _0x4000c2('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0x70c1ad(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0xa07b4c,_0x18d8ae){super();const _0x33f32a=_0x18d8ae['isResolvable'];this['channelId']=_0x18d8ae['channelId'],this['id']=_0x18d8ae['id'],this['comments']=new _0x236aed(),this['_repository']=_0xa07b4c,this['_isAttached']=!0x1,this['_isSubmitted']=_0x18d8ae['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0xa07b4c,'_permissions',_0xa07b4c,'_readOnlyChannels',()=>_0xa07b4c['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0xa07b4c,'_permissions',()=>_0xa07b4c['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0xa07b4c,'_permissions',()=>{const _0xdcbd0a=_0xa07b4c['getPermissions'](this['channelId']);return _0xdcbd0a['write']||_0xdcbd0a['admin'];}),this['bind']('isResolvable')['to'](_0xa07b4c,'_permissions',()=>_0x33f32a&&_0xa07b4c['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x18d8ae['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x22a6ff,_0x12ec4d)=>_0x22a6ff?_0x12ec4d?_0x22a6ff<_0x12ec4d?_0x22a6ff:_0x12ec4d:_0x22a6ff:_0x12ec4d),this['set']('unlinkedAt',_0x18d8ae['unlinkedAt']||null),this['set']('resolvedAt',_0x18d8ae['resolvedAt']||null),this['set']('resolvedBy',_0x18d8ae['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x259ce4=>!!_0x259ce4),this['set']('attributes',_0x18d8ae['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x243929,_0x24c259)=>_0x243929+_0x24c259['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5f5662,id:_0x21671f}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x5f5662),{'channelId':_0x5f5662,'threadId':_0x21671f});}['setUnlinkedAt'](_0x4d3ac9){this['_update']({'unlinkedAt':_0x4d3ac9});}['resolve']({resolvedAt:_0x183cad=new Date(),resolvedBy:_0x36364f='',isFromAdapter:_0x3008da=!0x1}={}){const _0x212e68=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4e6f9d,id:_0x16e1af}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4e6f9d),{'channelId':_0x4e6f9d,'threadId':_0x16e1af,'resolvedAt':_0x183cad,'resolvedBy':_0x36364f||_0x212e68['id'],'isFromAdapter':_0x3008da});}['reopen']({isFromAdapter:_0x1b21e4=!0x1}={}){const {channelId:_0x4fd896,id:_0x22580f}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x4fd896),{'channelId':_0x4fd896,'threadId':_0x22580f,'isFromAdapter':_0x1b21e4});}['setContext'](_0x44ecb2){this['context']||this['_update']({'context':_0x44ecb2});}['setAttribute'](_0x3a5140,_0x1f9078){const _0x5e1423=wt(this['attributes']);yt(_0x5e1423,_0x3a5140,_0x1f9078),this['_update']({'attributes':_0x5e1423});}['removeAttribute'](_0x2e1a7e){const _0x32c85b=wt(this['attributes']);Ct(_0x32c85b,_0x2e1a7e),this['_update']({'attributes':_0x32c85b});}['remove']({isFromAdapter:_0x541a7c=!0x1}={}){const {channelId:_0xef6479,id:_0x334cac}=this;this['_repository']['fire'](Nt('removeCommentThread',_0xef6479),{'channelId':_0xef6479,'threadId':_0x334cac,'isFromAdapter':_0x541a7c});}['attachTo'](_0xc668c4){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xc668c4});}['addComment'](_0x1b1acb){const {channelId:_0x581b8f,id:_0x4da915}=this;this['_repository']['fire'](Nt('addComment',_0x581b8f,_0x4da915),Object['assign']({'channelId':_0x581b8f,'threadId':_0x4da915},_0x1b1acb));}['getComment'](_0x5e60c3){if('string'!=typeof _0x5e60c3)throw new _0x4000c2('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5e60c3});return this['comments']['get'](_0x5e60c3);}['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'](_0x42fe29=>_0x42fe29['toJSON']()),'attributes':this['attributes']};}['_add'](_0x24dffc){return this['listenTo'](_0x24dffc,'change:authoredAt',()=>{const _0x19e857=this['_findOptimalIndex'](_0x24dffc),_0x54aedb=this['comments'];_0x19e857-0x1!=_0x54aedb['getIndex'](_0x24dffc)&&_0x19e857+0x1!=_0x54aedb['getIndex'](_0x24dffc)&&(this['_remove'](_0x24dffc),this['_add'](_0x24dffc));}),this['comments']['add'](_0x24dffc,this['_findOptimalIndex'](_0x24dffc));}['_update'](_0x5d05eb){const {channelId:_0x588803,id:_0x7fda36}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x588803),{..._0x5d05eb,'channelId':_0x588803,'threadId':_0x7fda36});}['_remove'](_0x37bcd9){return this['stopListening'](_0x37bcd9),_0x37bcd9['destroy'](),this['comments']['remove'](_0x37bcd9);}['_findOptimalIndex'](_0x4ced88){const _0x35dc8c=this['comments']['find'](_0x237f3a=>new Date(_0x237f3a['authoredAt'])['getTime']()>new Date(_0x4ced88['authoredAt'])['getTime']());return _0x35dc8c?this['comments']['getIndex'](_0x35dc8c):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0x70c1ad(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x57cafe,_0x5df848){super();const _0x5b96c5=_0x57cafe['context']['plugins']['get'](it)['me'],_0x2fc08f=_0x57cafe['getCommentThread'](_0x5df848['threadId']),_0x64ef4f=0x0===_0x2fc08f['comments']['length'],_0x6bffe9=_0x5b96c5===_0x5df848['author'];this['id']=_0x5df848['id'],this['threadId']=_0x5df848['threadId'],this['author']=_0x5df848['author'],this['creator']=_0x5df848['creator'],this['isExternal']=Boolean(_0x5df848['attributes']&&_0x5df848['attributes']['@external']),this['set']('content',_0x5df848['content']),this['createdAt']=_0x5df848['createdAt']||new Date(),this['set']('authoredAt',_0x5df848['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2fc08f,'resolvedAt'),this['set']('attributes',_0x5df848['attributes']||{}),this['bind']('isEditable')['to'](_0x57cafe,'_permissions',()=>{const _0x5ae8b4=_0x57cafe['getPermissions'](_0x2fc08f['channelId'])['write'],_0xe6b963=_0x57cafe['getPermissions'](_0x2fc08f['channelId'])['modifyAll'];return _0x6bffe9&&_0x5ae8b4||!_0x6bffe9&&_0xe6b963;}),this['bind']('isRemovable')['to'](_0x2fc08f,'isRemovable',_0x57cafe,'_permissions',_0x33c6a6=>{const _0x3ce207=_0x57cafe['getPermissions'](_0x2fc08f['channelId'])['write'],_0x2f9604=_0x57cafe['getPermissions'](_0x2fc08f['channelId'])['modifyAll'];return _0x6bffe9&&_0x3ce207||_0x33c6a6&&_0x64ef4f||!_0x6bffe9&&_0x2f9604&&!_0x64ef4f;}),this['bind']('isReadOnly')['to'](_0x2fc08f,'isReadOnly'),this['_repository']=_0x57cafe;}get['weight'](){return Math['max'](function(_0x7c3ab1){const _0xff32f1=document['createElement']('div');return _0xff32f1['innerHTML']=_0x7c3ab1,_0xff32f1['textContent']['length'];}(this['content']),0xc8);}['update'](_0x11a2e7){const {threadId:_0x3a4894,id:_0x3c4357}=this;if(!this['_repository']['hasCommentThread'](_0x3a4894))throw new _0x4000c2('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x16db9c}=this['_repository']['getCommentThread'](_0x3a4894);this['_repository']['fire'](Nt('updateComment',_0x16db9c,_0x3a4894),{'channelId':_0x16db9c,'threadId':_0x3a4894,'commentId':_0x3c4357,..._0x11a2e7});}['setAttribute'](_0x4abb82,_0x307971){const _0x18d08d=wt(this['attributes']);yt(_0x18d08d,_0x4abb82,_0x307971),this['update']({'attributes':_0x18d08d});}['removeAttribute'](_0xa77559){const _0x2ca721=wt(this['attributes']);Ct(_0x2ca721,_0xa77559),this['update']({'attributes':_0x2ca721});}['remove'](_0x25eab3={}){if(!_0x25eab3['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x17d832,id:_0xd3e8cd}=this;if(!this['_repository']['hasCommentThread'](_0x17d832))throw new _0x4000c2('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4671d6}=this['_repository']['getCommentThread'](_0x17d832);this['_repository']['fire'](Nt('removeComment',_0x4671d6,_0x17d832),{'channelId':_0x4671d6,'threadId':_0x17d832,'commentId':_0xd3e8cd,..._0x25eab3});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x22bc56,..._0x4f5d50){for(const _0x1ded5f of _0x4f5d50)void 0x0!==_0x1ded5f&&(_0x22bc56+=':'+String(_0x1ded5f));return _0x22bc56;}class ot extends _0x14f0aa{constructor(_0x383dc5){super(_0x383dc5),this['set']('hasContent',!0x1);}['refresh'](){const _0x37b7d8=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xd465a8 of _0x37b7d8['getRanges']())if(this['_hasContent'](_0xd465a8))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x4548c1=_0x2e35e1(),ranges:_0x17fab1,comment:_0x2d39e1}={}){const _0x169098=this['editor']['model'],_0x4d56ee=_0x17fab1??Array['from'](_0x169098['document']['selection']['getRanges']()),_0x24edbc=[];for(const _0xae996e of _0x4d56ee)this['_hasContent'](_0xae996e)&&_0x24edbc['push'](this['_trimToContent'](_0xae996e));if(!_0x24edbc['length'])throw new _0x4000c2('addcommentthreadcommand-incorrect-ranges',null);_0x2d39e1&&this['_createCommentThread'](_0x4548c1,_0x2d39e1),this['_createMarkersFromRanges'](_0x4548c1,_0x24edbc,!!_0x2d39e1);}['_createMarkersFromRanges'](_0x17cb28,_0x324075,_0x224f1f){this['editor']['model']['change'](_0x4c3490=>{for(const _0x32b373 of _0x324075){const _0x359e0a=_0x2e35e1()['substr'](0x1,0x5),_0x2629f7='comment:'+_0x17cb28+':'+_0x359e0a;_0x4c3490['addMarker'](_0x2629f7,{'range':_0x32b373,'usingOperation':_0x224f1f,'affectsData':_0x224f1f});}});}['_createCommentThread'](_0xc8f1c2,_0xa17ad1){const _0xf2e177=this['editor']['plugins']['get']('CommentsRepository'),_0x201642=this['editor']['config']['get']('collaboration.channelId'),_0x45de28=this['editor']['plugins']['get']('Users')['me'];if(!_0x45de28)throw new _0x4000c2('addcommentthreadcommand-user-not-found',null);_0xf2e177['addCommentThread']({'threadId':_0xc8f1c2,'channelId':_0x201642,'comments':[{'authorId':_0x45de28['id'],'content':_0xa17ad1,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x19c645){for(const _0x11ccc8 of _0x19c645['getItems']())if(this['_itemIsContent'](_0x11ccc8))return!0x0;return!0x1;}['_itemIsContent'](_0x1f16db){return _0x1f16db['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1f16db)&&!_0x1f16db['is']('element','tableCell');}['_trimToContent'](_0x485d83){const _0x2fb6d8=_0x5f4074=>!this['_itemIsContent'](_0x5f4074['item']),_0x321200=_0x485d83['start']['getLastMatchingPosition'](_0x2fb6d8),_0x4b77fd=_0x485d83['end']['getLastMatchingPosition'](_0x2fb6d8,{'direction':'backward'});return this['editor']['model']['createRange'](_0x321200,_0x4b77fd);}}class b extends _0xc00a87{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x361783){super(_0x361783),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x141876=this['editor'],_0x3d68d9=_0x141876['model']['document']['selection'],_0xec4e9a=_0x51e02f(()=>this['refreshSelectedViews'](),0xa);_0x3d68d9['on']('change:range',(_0x395fb1,_0x5881f0)=>{_0x5881f0['directChange']&&(_0xec4e9a['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x141876['editing']['view']['document'],'change:isFocused',(_0x16cccc,_0x2721b8,_0x497919)=>{_0x497919&&_0xec4e9a();}),this['listenTo'](_0x141876['ui']['focusTracker'],'change:isFocused',(_0x362319,_0x52c526,_0xda193a)=>{_0xda193a||this['fire']('blur',{'isAnnotationTracked':_0x333846=>this['_editorAnnotationsData']['has'](_0x333846['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4ec4f7){if(this['_editorAnnotations']['has'](_0x4ec4f7['view']))return;this['_editorAnnotations']['add'](_0x4ec4f7['view']),this['editor']['ui']['focusTracker']['add'](_0x4ec4f7['view']['element']);const _0x1083f5=this['editor']['plugins']['get'](y);this['listenTo'](_0x1083f5['collection'],'remove',(_0x540557,_0x18a26a)=>{this['editor']['ui']['focusTracker']['remove'](_0x18a26a['view']['element']),this['_editorAnnotations']['delete'](_0x18a26a['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x487a13){if('function'!=typeof _0x487a13)throw new _0x4000c2('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x487a13);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x10354a,annotations:_0x40b3c3}){const _0x1df11a=[],_0x3e5653=this['editor']['model']['document']['selection'],_0x257b76=Array['from'](_0x3e5653['getRanges']());for(const [_0x2e4066,_0xc9de92]of this['_editorAnnotationsData']){const _0x241227=_0x24b0ec(_0xc9de92),_0x57cd6b=_0x40b3c3['getByInnerView'](_0x2e4066);_0x241227&&_0x57cd6b&&_0x1df11a['push']({'annotation':_0x57cd6b,'range':_0x241227});}function _0x24b0ec(_0x450e78){for(const _0x15bd5c of _0x450e78)for(const _0x4ddffb of _0x257b76)if(_0x15bd5c['containsRange'](_0x4ddffb,!_0x3e5653['isCollapsed']))return _0x15bd5c;return null;}return _0x1df11a['sort']((_0x45fc8c,_0x5e92eb)=>{const _0x1e4175=_0x45fc8c['range'],_0x205d04=_0x5e92eb['range'];if(!_0x1e4175['isEqual'](_0x205d04)){if(_0x1e4175['containsRange'](_0x205d04,!0x0))return 0x1;if(_0x205d04['containsRange'](_0x1e4175,!0x0))return-0x1;}return _0x45fc8c['annotation']==_0x10354a?-0x1:_0x5e92eb['annotation']==_0x10354a?0x1:0x0;})['map'](_0x137139=>_0x137139['annotation']);}get['_editorAnnotationsData'](){const _0x4257c1=new Map();for(const _0x5e13bc of Array['from'](this['_dataCollectors']))for(const [_0x28cf04,_0x283a6e]of _0x5e13bc())_0x4257c1['set'](_0x28cf04,_0x283a6e);return _0x4257c1;}}class st extends _0xc00a87{['afterInit'](){const _0x5ba2de=this['editor'];if(!_0x5ba2de['plugins']['has']('RestrictedEditingModeEditing'))return;_0x5ba2de['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0xc00a87{constructor(_0x4f50ac){super(_0x4f50ac),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1300de=this['editor'],_0x3e7eee=_0x1300de['commands']['get']('importWord'),_0x3b78f4=_0x1300de['plugins']['get'](it);_0x3e7eee&&(_0x3e7eee['on']('execute',(_0x142b85,[,_0x6b76dd])=>{_0x6b76dd['collaboration_features']={'comments':!0x0,'user_id':_0x3b78f4['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x3e7eee,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x48c80c,_0x1fcd81){const {comment_threads:_0x473c46}=_0x1fcd81;_0x473c46&&_0x473c46['forEach'](({thread_id:_0x1b3e75,comments:_0x223cad,is_resolved:_0x1c9be4})=>{const _0x43ec0e=new Date(),_0x5d4cfe=_0x223cad['map'](({author:_0x16c767,content:_0x45735b,created_at:_0xe67e9e})=>({'content':_0x45735b,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x43ec0e,'attributes':{'@external':{'authorName':_0x16c767,'createdAt':_0xe67e9e?new Date(_0xe67e9e):new Date(),'source':'importWord'}}})),_0xca34a6=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xca34a6,'threadId':_0x1b3e75,'comments':_0x5d4cfe,'resolvedAt':_0x1c9be4?_0x43ec0e:null});});}}class at extends _0xc00a87{constructor(_0x3383c8){super(_0x3383c8),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x30b402=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x30b402,'contentInsertion',(_0x53a39a,_0x4ef26d)=>this['_removeMarkersWithoutThreads'](_0x4ef26d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xe7261a){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xe7261a;const _0x201050=this['editor']['plugins']['get']('CommentsRepository');for(const _0xa8539c of _0xe7261a['keys']()){const [_0x3602bd,_0x3cf002]=_0xa8539c['split'](':');'comment'!=_0x3602bd||_0x201050['hasCommentThread'](_0x3cf002)||_0xe7261a['delete'](_0xa8539c);}return _0xe7261a;}['_registerMarkerInClipboardPipeline'](){const _0x3a656b=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x31837c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x31837c&&_0x3a656b['_registerMarkerToCopy']('comment',_0x31837c);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4ab135){switch(_0x4ab135){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x2b49f9){const _0x3ff803=_0x2b49f9['split'](':');return{'group':_0x3ff803[0x0],'id':_0x3ff803[0x1],'part':_0x3ff803[0x2]};}class ut extends _0xc00a87{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1eec3d,_0x5126c3)=>{if(!_0x5126c3['options']['showCommentHighlights'])return null;if(_0x5126c3['options']['ignoreResolvedComments']){const {id:_0x5de683}=ft(_0x1eec3d['markerName']),_0xb98094=this['editor']['plugins']['get'](o);if(_0xb98094['getCommentThread'](_0x5de683)?.['isResolved']&&_0x1eec3d['item'])return _0x5126c3['consumable']['consume'](_0x1eec3d['item'],'addMarker:'+_0x1eec3d['markerName']),_0x5126c3['consumable']['consume'](_0x1eec3d['item'],'removeMarker:'+_0x1eec3d['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x23ac9b=>{_0x23ac9b['on']('addMarker:comment',(_0x561521,_0x2032c2,_0x1e96a8)=>{if(!_0x1e96a8['options']['showCommentHighlights'])return;const _0x4221e3=_0x2032c2['item'];if(!_0x4221e3)return;const _0x503a2c=_0x1e96a8['mapper']['toViewElement'](_0x4221e3);this['editor']['model']['schema']['isObject'](_0x4221e3)&&_0x503a2c&&!_0x503a2c['getCustomProperty']('widget')&&_0x503a2c['is']('containerElement')&&_0x32dbb5(_0x503a2c,_0x1e96a8['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3fe7c5,{writer:_0x55dda8,options:_0x3c0911})=>{if(!_0x3c0911['showCommentHighlights'])return null;const _0x55eba5=_0x55dda8['createContainerElement']('div'),_0x195c05=_0x55dda8['createEmptyElement']('hr');return _0x55dda8['addClass']('ck-horizontal-line',_0x55eba5),_0x55dda8['insert'](_0x55dda8['createPositionAt'](_0x55eba5,0x0),_0x195c05),_0x55eba5;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1d307e,{writer:_0x331c76,options:_0x1dcb15})=>{if(!_0x1dcb15['showCommentHighlights'])return null;const _0x4d352a=_0x331c76['createContainerElement']('span'),_0x1a1523=_0x331c76['createEmptyElement']('img');return _0x331c76['addClass']('image-inline',_0x4d352a),_0x331c76['insert'](_0x331c76['createPositionAt'](_0x4d352a,0x0),_0x1a1523),_0x4d352a;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1d411f,{writer:_0x15490a,options:_0x787615})=>{if(_0x787615['showCommentHighlights'])return _0x15490a['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x37e449,_0x12b89a,_0x35f110)=>{_0x35f110['options']['showCommentHighlights']&&_0x37e449['stop']();},{'priority':'high'});}}class r extends _0xc00a87{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xfa37a4){super(_0xfa37a4),this['set']('isThreadsLoadingPaused',!0x0),_0xfa37a4['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x433c87,_0x28b18f,_0xff905d,_0x8cd583)=>{const _0xddf309=_0xfa37a4['plugins']['get'](o),_0x588fc9=_0xff905d?ft(_0xff905d)['id']:null;_0xfa37a4['model']['change'](()=>{if(_0x588fc9){const _0xa37ad2=this['getAllMarkersForId'](_0x588fc9);for(const _0x42af66 of _0xa37ad2)_0xfa37a4['editing']['reconvertMarker'](_0x42af66);}if(_0x8cd583){const {id:_0x5c7e98}=ft(_0x8cd583),_0x430b7b=_0xddf309['getCommentThread'](_0x5c7e98);if(_0x430b7b&&_0x430b7b['unlinkedAt'])return;if(_0x430b7b&&!_0x430b7b['isAttached'])return;const _0x15b0bc=this['getAllMarkersForId'](_0x5c7e98);for(const _0x4f5d99 of _0x15b0bc)_0xfa37a4['editing']['reconvertMarker'](_0x4f5d99);}}),_0x588fc9&&this['scrollToThreadMarker'](_0x588fc9);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x37b467=this['editor'],_0x510aff=_0x37b467['plugins']['get'](o),_0x1a44be=_0x37b467['config']['get']('collaboration.channelId'),_0xe9a3ec=_0x510aff['getCommentThreads']()['filter'](_0x2976a2=>_0x2976a2['channelId']!==_0x1a44be);_0x37b467['commands']['add']('addCommentThread',new ot(_0x37b467)),this['listenTo'](_0x37b467,'change:isReadOnly',(_0x379232,_0x3e5bba,_0x52adb8)=>{_0x510aff['switchReadOnly'](_0x52adb8,_0x37b467['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x510aff,dt('addCommentThread',_0x1a44be),(_0x1bd640,{threadId:_0x3942af})=>{const _0x429424=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3942af);_0x429424?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3942af);}),this['listenTo'](_0x510aff,dt('removeCommentThread',_0x1a44be),(_0x591b27,{threadId:_0x241a7e})=>{_0x37b467['model']['enqueueChange']({'isUndoable':!0x1},_0x698e0a=>{const _0x434aef=this['getAllMarkersForId'](_0x241a7e);for(const _0x42cc86 of _0x434aef)_0x698e0a['removeMarker'](_0x42cc86);});}),this['listenTo'](_0x510aff,dt('resolveCommentThread',_0x1a44be),(_0x3af8e8,{threadId:_0x5d42c8})=>{(this['_reconvertMarkers'](_0x5d42c8),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5d42c8)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x510aff,dt('reopenCommentThread',_0x1a44be),(_0x16e5d8,{threadId:_0x147b28})=>{this['_reconvertMarkers'](_0x147b28);},{'priority':'low'}),this['listenTo'](_0x510aff,dt('addComment',_0x1a44be),(_0x310466,{threadId:_0x3b0aaa,isFromAdapter:_0x5e07fa})=>{const _0x369a81=this['getAllMarkersForId'](_0x3b0aaa);if(_0x5e07fa||0x0==_0x369a81['length']||!_0x510aff['hasCommentThread'](_0x3b0aaa))return;0x1===_0x510aff['getCommentThread'](_0x3b0aaa)['length']&&_0x37b467['model']['enqueueChange']({'isUndoable':!0x1},_0x5d6c5e=>{for(const _0x529e80 of _0x369a81)_0x5d6c5e['updateMarker'](_0x529e80,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0xe9a3ec);}['afterInit'](){!async function(_0x4a4f5d){const _0x421cba=_0x560da8([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x19a2f2=0x73460ab3,_0x3b090e=0x73417403^_0x19a2f2,_0x13ab9b=window[_0x560da8([0x44,0x61,0x74,0x65])][_0x560da8([0x6e,0x6f,0x77])](),_0x59b929=_0x4a4f5d[_0x560da8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x83a268=new window[(_0x560da8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd75e7=>{_0x59b929[_0x560da8([0x6f,0x6e,0x63,0x65])](_0x560da8([0x72,0x65,0x61,0x64,0x79]),_0xd75e7);}),_0x856ed4={[_0x560da8([0x6b,0x74,0x79])]:_0x560da8([0x45,0x43]),[_0x560da8([0x75,0x73,0x65])]:_0x560da8([0x73,0x69,0x67]),[_0x560da8([0x63,0x72,0x76])]:_0x560da8([0x50,0x2d,0x32,0x35,0x36]),[_0x560da8([0x78])]:_0x560da8([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]),[_0x560da8([0x79])]:_0x560da8([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]),[_0x560da8([0x61,0x6c,0x67])]:_0x560da8([0x45,0x53,0x32,0x35,0x36])},_0x4fc65d=_0x59b929[_0x560da8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x560da8([0x67,0x65,0x74])](_0x560da8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5efa05(){let _0x3bbcb6,_0x15fa99=null,_0x19ebc9=null;try{if(_0x4fc65d==_0x560da8([0x47,0x50,0x4c]))return _0x560da8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x3bbcb6=_0x244ebc(),!_0x3bbcb6)return _0x560da8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x3bbcb6[_0x560da8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x19ebc9=_0x112c32(_0x3bbcb6[_0x560da8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x3bbcb6[_0x560da8([0x6a,0x74,0x69])])),await _0x113dc2()?_0x1f8d5d()?_0x3f6be6()?_0x560da8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x39491e()?(_0x3bbcb6[_0x560da8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x560da8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x15fa99=_0x3dc5b8(_0x560da8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x176cc5()):_0x560da8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x560da8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x560da8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x560da8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3f6be6(){const _0x27b6b9=[_0x560da8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x560da8([0x74,0x72,0x69,0x61,0x6c])][_0x560da8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bbcb6[_0x560da8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x13ab9b/0x3e8:0xe10*_0x3b090e;return _0x3bbcb6[_0x560da8([0x65,0x78,0x70])]<_0x27b6b9;}function _0x1f8d5d(){const _0x5dc2cd=_0x3bbcb6[_0x560da8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5dc2cd)return!0x1;if(_0x5dc2cd[_0x560da8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560da8([0x2a])))return!0x0;if(_0x5dc2cd[_0x560da8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560da8([0x43,0x4d,0x54])))return!0x0;if(_0x5dc2cd[_0x560da8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560da8([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x5b9ef4())return!0x0;if(_0x5dc2cd[_0x560da8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560da8([0x52,0x43,0x4d,0x54]))){if(_0x22ff6a())return!0x0;if(_0x1f6617()||_0x55e741())return!0x0;}return!0x1;}function _0x39491e(){const _0x876770=_0x3bbcb6[_0x560da8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x876770||0x0==_0x876770[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x124350}=new URL(window[_0x560da8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x876770[_0x560da8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x124350))return!0x0;const _0x40aad6=_0x124350[_0x560da8([0x73,0x70,0x6c,0x69,0x74])](_0x560da8([0x2e]));return _0x876770[_0x560da8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x546077=>_0x546077[_0x560da8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x560da8([0x2a])))[_0x560da8([0x6d,0x61,0x70])](_0x4cc198=>_0x4cc198[_0x560da8([0x73,0x70,0x6c,0x69,0x74])](_0x560da8([0x2e])))[_0x560da8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3d6b78=>_0x3d6b78[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x40aad6[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x560da8([0x6d,0x61,0x70])](_0x42adc8=>Array(_0x40aad6[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x42adc8[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x560da8([0x66,0x69,0x6c,0x6c])](_0x42adc8[0x0]===_0x560da8([0x2a])?_0x560da8([0x2a]):'')[_0x560da8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x42adc8))[_0x560da8([0x73,0x6f,0x6d,0x65])](_0x3a0247=>_0x40aad6[_0x560da8([0x65,0x76,0x65,0x72,0x79])]((_0x4d8ce8,_0x128615)=>_0x3a0247[_0x128615]===_0x4d8ce8||_0x3a0247[_0x128615]===_0x560da8([0x2a])));}function _0x176cc5(){return _0x15fa99&&_0x19ebc9?new window[(_0x560da8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d37c1,_0x301085)=>{_0x15fa99[_0x560da8([0x74,0x68,0x65,0x6e])](_0x2d37c1,_0x301085),_0x19ebc9[_0x560da8([0x74,0x68,0x65,0x6e])](_0x13a0d1=>{_0x13a0d1!=_0x560da8([0x56,0x61,0x6c,0x69,0x64])&&_0x2d37c1(_0x13a0d1);},_0x301085);}):_0x15fa99||_0x19ebc9||_0x560da8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x112c32(_0x59a055,_0x72b883){return new window[(_0x560da8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x372eba=>{if(_0x2b9419())return _0x372eba(_0x560da8([0x56,0x61,0x6c,0x69,0x64]));_0x29c821(),_0x59b929[_0x560da8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x560da8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4dfd7e=!0x1;const _0x5922e1=_0x2e35e1();function _0xc4c9e9(_0xeb606b){return!!_0xeb606b&&(typeof _0xeb606b===_0x560da8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xeb606b===_0x560da8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xeb606b[_0x560da8([0x74,0x68,0x65,0x6e])]===_0x560da8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xeb606b[_0x560da8([0x63,0x61,0x74,0x63,0x68])]===_0x560da8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2343f2(_0x1897aa){_0x77ec38(_0x1897aa)[_0x560da8([0x74,0x68,0x65,0x6e])](_0xb09ab2=>{if(!_0xb09ab2||_0xb09ab2[_0x560da8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x560da8([0x6f,0x6b]))return _0x560da8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x22a504(_0x5aec07(_0x5922e1+_0x72b883))!=_0xb09ab2[_0x560da8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x560da8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x560da8([0x56,0x61,0x6c,0x69,0x64]);})[_0x560da8([0x74,0x68,0x65,0x6e])](_0x1fe5d2=>(_0x52b446(),_0x1fe5d2),()=>{const _0x286f9a=_0x5e6e4e();return null==_0x286f9a?(_0x52b446(),_0x560da8([0x56,0x61,0x6c,0x69,0x64])):_0x560da8(_0x13ab9b-_0x286f9a>(0x574a8eb3^_0x19a2f2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x560da8([0x74,0x68,0x65,0x6e])](_0x372eba)[_0x560da8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x372eba(_0x560da8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2e2a34=0x7370e433^_0x19a2f2;function _0x52b446(){const _0x270cb8=_0x560da8([0x6c,0x6c,0x63,0x74,0x2d])+_0x22a504(_0x5aec07(_0x59a055)),_0x5cd205=_0x38a480(_0x22a504(window[_0x560da8([0x4d,0x61,0x74,0x68])][_0x560da8([0x63,0x65,0x69,0x6c])](_0x13ab9b/_0x2e2a34)));window[_0x560da8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x560da8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x270cb8,_0x5cd205);}function _0x5e6e4e(){const _0x4e238b=_0x560da8([0x6c,0x6c,0x63,0x74,0x2d])+_0x22a504(_0x5aec07(_0x59a055)),_0xb4ac93=window[_0x560da8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x560da8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4e238b);return _0xb4ac93?window[_0x560da8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x38a480(_0xb4ac93),0x10)*_0x2e2a34:null;}function _0x77ec38(_0x39074e){return new window[(_0x560da8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2fdbeb,_0x266d59)=>{_0x39074e[_0x560da8([0x74,0x68,0x65,0x6e])](_0x2fdbeb,_0x266d59),window[_0x560da8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x266d59,0x7347de73^_0x19a2f2);});}}_0x59b929[_0x560da8([0x6f,0x6e])](_0x560da8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4c4960,_0x2d49e2)=>{if(_0x2d49e2[0x0]!=_0x59a055)return _0x372eba(_0x560da8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2d49e2[0x1]={..._0x2d49e2[0x1],[_0x560da8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5922e1};},{[_0x560da8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x560da8([0x68,0x69,0x67,0x68])}),_0x59b929[_0x560da8([0x6f,0x6e])](_0x560da8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x51a4f6=>{_0xc4c9e9(_0x51a4f6[_0x560da8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4dfd7e=!0x0,_0x2343f2(_0x51a4f6[_0x560da8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x560da8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x560da8([0x6c,0x6f,0x77])}),_0x83a268[_0x560da8([0x74,0x68,0x65,0x6e])](()=>{_0x4dfd7e||_0x372eba(_0x560da8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2b9419(){return _0x59b929[_0x560da8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x560da8([0x76,0x69,0x65,0x77])][_0x560da8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x560da8([0x61,0x75,0x74,0x6f]);}function _0x29c821(){_0x59b929[_0x560da8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x560da8([0x76,0x69,0x65,0x77])][_0x560da8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x560da8([0x61,0x75,0x74,0x6f]);}}function _0x3dc5b8(_0x35ce59){const _0x212479=[new window[(_0x560da8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb91a45=>setTimeout(_0xb91a45,0x734f347f^_0x19a2f2)),_0x83a268[_0x560da8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x560da8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f38a7=>{let _0x31841a=0x0;_0x59b929[_0x560da8([0x6d,0x6f,0x64,0x65,0x6c])][_0x560da8([0x6f,0x6e])](_0x560da8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x38b70e,_0x4e69ab)=>{_0x4e69ab[0x0][_0x560da8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x31841a++,_0x31841a==(0x73460f5b^_0x19a2f2)&&(_0x2f38a7(),_0x38b70e[_0x560da8([0x6f,0x66,0x66])]());});}))];return window[_0x560da8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x560da8([0x72,0x61,0x63,0x65])](_0x212479)[_0x560da8([0x74,0x68,0x65,0x6e])](()=>_0x35ce59);}async function _0x3b5ce2(){await _0x83a268,_0x59b929[_0x560da8([0x6d,0x6f,0x64,0x65,0x6c])][_0x560da8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4e5c68,_0x59b929[_0x560da8([0x6d,0x6f,0x64,0x65,0x6c])][_0x560da8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4e5c68,_0x59b929[_0x560da8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x560da8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5b9ef4(){return window[_0x560da8([0x67,0x6c,0x6f,0x62])]&&window[_0x560da8([0x67,0x6c,0x6f,0x62])][_0x560da8([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x22ff6a(){return _0x3455d6(_0x560da8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x370a81(_0x560da8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x560da8([0x73,0x74,0x61,0x74,0x65])]==_0x560da8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1f6617(){return _0x3455d6(_0x560da8([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 _0x55e741(){return _0x3455d6(_0x560da8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4548cf(_0x3d6994){const _0x8f493=_0x17037a();_0x59b929[_0x8f493]=_0x560da8([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3d6994,_0x3d6994!=_0x560da8([0x56,0x61,0x6c,0x69,0x64])&&_0x3b5ce2();}function _0x17037a(){const _0x1ad373=window[_0x560da8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x560da8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x560da8([0x6e,0x6f,0x77])]())[_0x560da8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x560da8([0x2e]),'');let _0x1732b9=_0x560da8([0x4b]);for(let _0x3ef9e0=0x0;_0x3ef9e0<_0x1ad373[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3ef9e0+=0x2){let _0x5c73b4=window[_0x560da8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ad373[_0x560da8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ef9e0,_0x3ef9e0+0x2));_0x5c73b4>=_0x421cba[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5c73b4-=_0x421cba[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1732b9+=_0x421cba[_0x5c73b4];}return _0x1732b9;}function _0x244ebc(){const _0x4d102e=_0x4fc65d[_0x560da8([0x73,0x70,0x6c,0x69,0x74])](_0x560da8([0x2e]));if(0x3!=_0x4d102e[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x518e4b(_0x4d102e[0x1]);function _0x518e4b(_0x3ce095){const _0x42d770=_0x175bfc(_0x3ce095);return _0x42d770&&_0x11bbc6()?_0x42d770:null;function _0x11bbc6(){const _0xff92d9=_0x42d770[_0x560da8([0x6a,0x74,0x69])],_0x135e1a=window[_0x560da8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xff92d9[_0x560da8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xff92d9[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2f385d={..._0x42d770,[_0x560da8([0x6a,0x74,0x69])]:_0xff92d9[_0x560da8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xff92d9[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2f385d[_0x560da8([0x76,0x63])],_0x5aec07(_0x2f385d)==_0x135e1a;}}}async function _0x113dc2(){let _0x2b89e6=!0x0;try{const _0x112133=_0x4fc65d[_0x560da8([0x73,0x70,0x6c,0x69,0x74])](_0x560da8([0x2e])),[_0x1840cd,_0x3f126,_0x46ca5d]=_0x112133;return _0x264f3b(_0x1840cd),await _0x103fac(_0x1840cd,_0x3f126,_0x46ca5d),_0x2b89e6;}catch{return!0x1;}function _0x264f3b(_0x200bfa){const _0x1af164=_0x175bfc(_0x200bfa);_0x1af164&&_0x1af164[_0x560da8([0x61,0x6c,0x67])]==_0x560da8([0x45,0x53,0x32,0x35,0x36])||(_0x2b89e6=!0x1);}async function _0x103fac(_0x48fcdb,_0x5c05c8,_0x4e92cc){const _0x2606b7=window[_0x560da8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x560da8([0x66,0x72,0x6f,0x6d])](_0x24709a(_0x4e92cc),_0x3c7c78=>_0x3c7c78[_0x560da8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x360c44=new window[(_0x560da8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x560da8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x48fcdb+_0x560da8([0x2e])+_0x5c05c8),_0x21ea7d=window[_0x560da8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x560da8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x21ea7d)return;const _0x4de1a3=await _0x21ea7d[_0x560da8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x560da8([0x6a,0x77,0x6b]),_0x856ed4,{[_0x560da8([0x6e,0x61,0x6d,0x65])]:_0x560da8([0x45,0x43,0x44,0x53,0x41]),[_0x560da8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x560da8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x560da8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x21ea7d[_0x560da8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x560da8([0x6e,0x61,0x6d,0x65])]:_0x560da8([0x45,0x43,0x44,0x53,0x41]),[_0x560da8([0x68,0x61,0x73,0x68])]:{[_0x560da8([0x6e,0x61,0x6d,0x65])]:_0x560da8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4de1a3,_0x2606b7,_0x360c44)||(_0x2b89e6=!0x1);}}function _0x175bfc(_0x15c51c){return _0x15c51c[_0x560da8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x560da8([0x65,0x79]))?JSON[_0x560da8([0x70,0x61,0x72,0x73,0x65])](_0x24709a(_0x15c51c)):null;}function _0x24709a(_0xdddac9){return window[_0x560da8([0x61,0x74,0x6f,0x62])](_0xdddac9[_0x560da8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x560da8([0x2b]))[_0x560da8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x560da8([0x2f])));}function _0x5aec07(_0x5251cf){let _0x346a6e=0x1505;function _0x47b54d(_0x4b3823){for(let _0x276f2e=0x0;_0x276f2e<_0x4b3823[_0x560da8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x276f2e++){const _0x3b8f9c=_0x4b3823[_0x560da8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x276f2e);_0x346a6e=(_0x346a6e<<0x5)+_0x346a6e+_0x3b8f9c,_0x346a6e&=_0x346a6e;}}function _0x3e3484(_0x41ce23){Array[_0x560da8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x41ce23)?_0x41ce23[_0x560da8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3e3484):_0x41ce23&&typeof _0x41ce23==_0x560da8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x560da8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x41ce23)[_0x560da8([0x73,0x6f,0x72,0x74])]()[_0x560da8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x256deb,_0x546f74])=>{_0x47b54d(_0x256deb),_0x3e3484(_0x546f74);}):_0x47b54d(window[_0x560da8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x41ce23));}return _0x3e3484(_0x5251cf),_0x346a6e>>>0x0;}function _0x22a504(_0x4deda8){return _0x4deda8[_0x560da8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x560da8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x560da8([0x30]));}function _0x38a480(_0x16bc0a){return _0x16bc0a[_0x560da8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x560da8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x560da8([0x6a,0x6f,0x69,0x6e])]('');}function _0x3455d6(_0xbbabc0){return _0x59b929[_0x560da8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x560da8([0x68,0x61,0x73])](_0xbbabc0);}function _0x370a81(_0xec7c30){return _0x59b929[_0x560da8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x560da8([0x67,0x65,0x74])](_0xec7c30);}function _0x4e5c68(){}function _0x560da8(_0x1cbc0f){return _0x1cbc0f['map'](_0x476e1a=>String['fromCharCode'](_0x476e1a))['join']('');}_0x4548cf(await _0x5efa05());}(this);}['destroy'](){const _0x1cfd75=this['editor']['plugins']['get'](o),_0x2ebba5=this['editor']['config']['get']('collaboration.channelId');for(const _0x577bc8 of _0x1cfd75['getCommentThreads']({'channelId':_0x2ebba5}))_0x1cfd75['_detachCommentThread'](_0x577bc8['id']),_0x1cfd75['_threads']['delete'](_0x577bc8['id']);super['destroy']();}['hasMarkerForId'](_0x1c319c){return this['getAllMarkersForId'](_0x1c319c)['length']>0x0;}['getAllMarkersForId'](_0x14d7de){const _0x4d592a=[];for(const _0x5d0dc0 of this['editor']['model']['markers'])_0x5d0dc0['name']['startsWith']('comment:'+_0x14d7de)&&_0x4d592a['push'](_0x5d0dc0);return _0x4d592a;}['scrollToThreadMarker'](_0x492106){setTimeout(()=>{const _0x2da500=this['_getTargetForId'](_0x492106);if(!_0x2da500)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x492106&&nt({'target':_0x2da500[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2c07eb){this['editor']['model']['change'](()=>{for(const _0x1ab06d of this['getAllMarkersForId'](_0x2c07eb))this['editor']['editing']['reconvertMarker'](_0x1ab06d);});}['_attachArchivedThread'](_0x402b93){const _0x4dc550=this['editor']['plugins']['get'](o),_0x26cf0f=this['editor']['plugins']['get'](b),_0xe6cfbd=_0x4dc550['getCommentThread'](_0x402b93);if(!_0xe6cfbd['isAttached']){const _0x5e89f1=_0xe6cfbd['attachTo'](()=>this['_getTargetForId'](_0xe6cfbd['id']));_0x26cf0f['registerAnnotation'](_0x5e89f1),_0xe6cfbd['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x20ded6=this['editor'],_0x365e98=_0x20ded6['plugins']['get'](it);_0x20ded6['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x11e275,_0x3b3a9c)=>{const {id:_0x4b827d}=ft(_0x11e275['markerName']),_0x5919dc=_0x20ded6['plugins']['get'](o)['getCommentThread'](_0x4b827d),_0x14011e=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x4b827d;let _0x553ad6;if(_0x5919dc&&_0x5919dc['isResolved']&&!_0x14011e&&_0x11e275['item'])return _0x3b3a9c['consumable']['consume'](_0x11e275['item'],'addMarker:'+_0x11e275['markerName']),_0x3b3a9c['consumable']['consume'](_0x11e275['item'],'removeMarker:'+_0x11e275['markerName']),null;const _0x5f02d8=['ck-comment-marker'];return _0x14011e&&_0x5f02d8['push']('ck-comment-marker--active'),_0x553ad6=_0x5919dc?.['length']?_0x5919dc['comments']['first']['author']['id']:_0x365e98['me']['id'],{'classes':_0x5f02d8,'attributes':{'data-comment':_0x4b827d,'data-author-id':_0x553ad6}};}}),_0x20ded6['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x10daa6,{options:_0x22ae07})=>{if(_0x22ae07['showCommentHighlights'])return null;const _0x13ed3c=_0x20ded6['plugins']['get'](o),_0x3474b5=_0x20ded6['model']['markers']['get'](_0x10daa6),{id:_0x492457,part:_0x1f39c5}=ft(_0x10daa6);return _0x3474b5&&!_0x3474b5['affectsData']||_0x22ae07['ignoreResolvedComments']&&_0x13ed3c['getCommentThread'](_0x492457)?.['isResolved']?null:{'group':'comment','name':_0x1f39c5?_0x492457+':'+_0x1f39c5:_0x492457};}}),_0x20ded6['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5c7bab,{writer:_0x28066b})=>_0x28066b['createElement']('$marker',{'data-name':'comment:'+_0x5c7bab['getAttribute']('id')})}),_0x20ded6['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1ba0aa=this['editor'],_0xa09431=_0x1ba0aa['plugins']['get'](o),_0x599861=new Set(),_0x4360af=new Set();_0x1ba0aa['model']['document']['registerPostFixer'](_0x4c6147=>{let _0x4fffc6=!0x1;for(const {name:_0x5c13f4,data:_0x379075}of _0x1ba0aa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2280c9,id:_0x38ca1c}=ft(_0x5c13f4);let _0x585753=_0x379075['newRange'];if('comment'!==_0x2280c9||!_0x585753)continue;const _0x3602b8='$graveyard'===_0x585753['root']['rootName'];_0x3602b8||(_0x585753=ht(_0x585753,_0x1ba0aa['model']),!_0x585753||_0x585753['isCollapsed']||!_0x379075['newRange']||_0x585753['isEqual'](_0x379075['newRange']))?_0x1ba0aa['model']['hasContent'](_0x585753)&&!_0x3602b8?this['isThreadsLoadingPaused']?_0x599861['add'](_0x5c13f4):this['_handleThreadMarker'](_0x5c13f4,_0x38ca1c):(_0x4360af['add'](_0x5c13f4),_0x599861['delete'](_0x5c13f4),_0x4c6147['removeMarker'](_0x5c13f4),_0x4fffc6=!0x0):(_0x4c6147['updateMarker'](_0x5c13f4,{'range':_0x585753}),_0x4fffc6=!0x0);}return _0x4fffc6;}),this['on']('change:isThreadsLoadingPaused',(_0x39aafa,_0x466f4b,_0x12a4f8)=>{if(!_0x12a4f8&&_0x599861['size'])for(const _0x36593 of _0x599861){const {id:_0xc8b194}=ft(_0x36593);_0x599861['delete'](_0x36593),_0x1ba0aa['model']['markers']['get'](_0x36593)&&this['_handleThreadMarker'](_0x36593,_0xc8b194);}}),this['listenTo'](_0x1ba0aa['model']['document'],'change',()=>{for(const {name:_0x407646,data:{newRange:_0x4a7981}}of _0x1ba0aa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3a702a,id:_0x137fad}=ft(_0x407646);if('comment'!==_0x3a702a)continue;const _0x1d8e92=_0xa09431['getCommentThread'](_0x137fad),_0x42d680=this['hasMarkerForId'](_0x137fad);_0x1d8e92&&(!_0x1d8e92['_hasTargetInContent']&&_0x4a7981&&_0x1ba0aa['editing']['view']['once']('render',()=>{const _0x15c261=_0x1ba0aa['plugins']['get'](y),_0x2ff880=_0xa09431['_threadToController']['get'](_0x1d8e92)['view'];_0x15c261['getByInnerView'](_0x2ff880)['refreshVisibility']();},{'priority':'low'}),_0x1d8e92['_hasTargetInContent']=_0x42d680||!!_0x4a7981),_0x4a7981||(_0x4360af['add'](_0x407646),_0x599861['delete'](_0x407646));}for(const _0x4b6fb2 of _0x4360af){const {id:_0x21f222}=ft(_0x4b6fb2),_0x29466e=_0xa09431['getCommentThread'](_0x21f222);if(_0x599861['delete'](_0x4b6fb2),!_0x29466e)continue;const _0xf44a62=this['hasMarkerForId'](_0x21f222);_0xf44a62||_0x29466e['isSubmitted']?_0xf44a62||_0x29466e['unlinkedAt']||_0x29466e['setUnlinkedAt'](new Date()):_0x29466e['remove']();}_0x4360af['clear']();});}['_handleInitialThreads'](_0x16f9ba){_0x16f9ba['forEach'](_0x10e08e=>{_0x10e08e['unlinkedAt']&&this['_attachArchivedThread'](_0x10e08e['id']);});}['_getTargetForId'](_0x25cfa8){const _0x7a604d=this['editor'],_0x397c13=this['getAllMarkersForId'](_0x25cfa8);return et(_0x7a604d['editing'],_0x397c13);}['_getTextContext'](_0x5a45fe){const _0x7ec4ab=this['getAllMarkersForId'](_0x5a45fe);let _0x442097='',_0x320b1b=!0x1;for(const _0xf8a1ee of _0x7ec4ab){const _0x2cbfb2=_0xf8a1ee['getRange']();for(const _0x44720e of Array['from'](_0x2cbfb2['getItems']()))_0x44720e['is']('$textProxy')?(_0x442097&&_0x320b1b&&(_0x442097+='\x20',_0x320b1b=!0x1),_0x442097+=_0x44720e['data']):_0x320b1b=!0x0;_0x320b1b=!0x0;}return _0x442097['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3d93b6,_0x2ef231){const _0x999a73=this['editor'],_0x349179=_0x999a73['plugins']['get'](o);let _0x53d571=_0x349179['getCommentThread'](_0x2ef231);const _0x59d8e0=_0x999a73['config']['get']('collaboration.channelId'),_0x109ec6=_0x999a73['plugins']['get'](b);if(_0x53d571&&(_0x53d571['unlinkedAt']&&_0x53d571['setUnlinkedAt'](null),_0x53d571['isAttached']))return _0x53d571;return!this['getAllMarkersForId'](_0x2ef231)[0x0]['managedUsingOperations']?_0x999a73['editing']['view']['once']('render',()=>{if(_0x349179['getCommentThread'](_0x2ef231))return;const _0x458ab5=_0x999a73['plugins']['get'](y);_0x53d571=_0x349179['openNewCommentThread']({'channelId':_0x59d8e0,'threadId':_0x2ef231,'target':()=>this['_getTargetForId'](_0x2ef231),'context':{'type':'text','value':this['_getTextContext'](_0x2ef231)}});const _0xf4f7b8=_0x349179['_threadToController']['get'](_0x53d571)['view'],_0x4542d0=_0x458ab5['getByInnerView'](_0xf4f7b8);_0x4542d0&&_0x109ec6['registerAnnotation'](_0x4542d0);},{'priority':'low'}):_0x349179['fetchCommentThread']({'channelId':_0x59d8e0,'threadId':_0x2ef231})['then'](_0x135f21=>{if('destroyed'!==_0x999a73['state']){if(_0x53d571=_0x135f21,_0x53d571&&!_0x53d571['isAttached']){const _0x320bbf=_0x53d571['attachTo'](()=>this['_getTargetForId'](_0x2ef231));_0x109ec6['registerAnnotation'](_0x320bbf),_0x53d571['isResolved']&&this['_reconvertMarkers'](_0x2ef231);}else{if(!_0x53d571){const _0x7fea75=this['getAllMarkersForId'](_0x2ef231);_0x999a73['model']['change'](_0x3f64c2=>{for(const _0xb057e0 of _0x7fea75)_0x3f64c2['removeMarker'](_0xb057e0);});}}}}),_0x53d571;}['_handleThreadMarker'](_0x3d33b4,_0x2f25d9){const _0x139739=this['_attachMarkerToThread'](_0x3d33b4,_0x2f25d9);_0x139739&&!_0x139739['context']&&_0x139739['setContext']({'type':'text','value':this['_getTextContext'](_0x2f25d9)});}['_initAriaMarkerChangeAnnouncements'](){const _0x264c99=this['editor'];rt(_0x264c99['model'],({left:_0x20676a,entered:_0x29c845})=>{for(const _0x333b26 of _0x20676a)if(mt(_0x333b26)){_0x264c99['ui']['ariaLiveAnnouncer']['announce'](N(_0x264c99['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x8b9b79 of _0x29c845)if(mt(_0x8b9b79)){_0x264c99['ui']['ariaLiveAnnouncer']['announce'](N(_0x264c99['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x433cbb)));break;}});}}function dt(_0x408819,_0x344c32){return _0x344c32?_0x408819+':'+_0x344c32:_0x408819;}function ht(_0x2e9f3e,_0x519c7b){const _0x5e37e9=_0x519c7b['schema'],_0x175385=_0x519c7b['createRange'](_0x2e9f3e['start']);for(const _0x52830e of _0x2e9f3e['getWalker']()){const {type:_0x3fe3ba,item:_0x37260b,nextPosition:_0x294257}=_0x52830e;if('text'===_0x3fe3ba||_0x5e37e9['isObject'](_0x37260b)){const _0x34fd35=_0x519c7b['createPositionBefore'](_0x37260b);_0x175385['isCollapsed']&&(_0x175385['start']=_0x34fd35),_0x175385['end']=_0x294257;}}return _0x175385;}function mt(_0x33c2dc){return'comment'===ft(_0x33c2dc['name'])['group'];}class s extends _0xc00a87{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x5b6ac8=this['editor'],_0x243213=_0x5b6ac8['plugins']['get'](o),_0x58e1ea=_0x5b6ac8['plugins']['get'](r),_0x4526c5=_0x5b6ac8['plugins']['get'](y),_0x1a76f0=_0x5b6ac8['plugins']['get'](b);_0x5b6ac8['ui']['componentFactory']['add']('comment',()=>{const _0x186ebc=this['_createUIButton'](_0x19a4ce);return _0x186ebc['tooltip']=!0x0,_0x186ebc;}),_0x5b6ac8['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x171cc0)),_0x1a76f0['addSourceCollector'](()=>{const _0x40dce6=[];for(const [_0x3621cb,_0x45a7da]of _0x243213['_threadToController']){const _0x212709=_0x58e1ea['getAllMarkersForId'](_0x3621cb['id']),_0x15e7b0=_0x212709['map'](_0x11d4ba=>_0x11d4ba['getRange']());_0x212709['length']>0x0&&_0x40dce6['push']([_0x45a7da['view'],_0x15e7b0]);}return _0x40dce6;}),this['listenTo'](_0x4526c5,'change:activeAnnotations',(_0x41877a,_0x2c6f21,_0x2814b6)=>{const _0x3ed872=Array['from'](_0x2814b6)['map'](_0x37b5aa=>_0x37b5aa['innerView'])['find'](_0x30a826=>_0x243213['_viewToController']['has'](_0x30a826));if(!_0x3ed872)return void(_0x58e1ea['activeMarker']=null);const _0x220c30=_0x243213['_viewToController']['get'](_0x3ed872)['model']['id'],_0x4d9e5b='comment:'+_0x220c30;_0x220c30&&_0x58e1ea['hasMarkerForId'](_0x220c30)?_0x58e1ea['activeMarker']=_0x4d9e5b:_0x58e1ea['activeMarker']&&(_0x58e1ea['activeMarker']=null);}),this['listenTo'](_0x243213,'removeCommentThread',(_0x58da15,{threadId:_0x3cc54d,isFromAdapter:_0x418cec})=>{!_0x418cec&&_0x5b6ac8['ui']['focusTracker']['isFocused']&&_0x58e1ea['hasMarkerForId'](_0x3cc54d)&&_0x5b6ac8['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x243213,'addComment',(_0x51efe6,{threadId:_0x456ba9,isFromAdapter:_0x3fa8bd})=>{if(_0x3fa8bd||!_0x58e1ea['hasMarkerForId'](_0x456ba9)||!_0x243213['hasCommentThread'](_0x456ba9))return;0x1===_0x243213['getCommentThread'](_0x456ba9)['length']&&(_0x5b6ac8['editing']['view']['focus'](),_0x51efe6['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3c2b2d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x547e9d;for(const _0x5973cb in _0x3c2b2d){const _0x15f4ec=_0x5973cb,_0x247580=_0x3c2b2d[_0x15f4ec];if('commentsLicenseKeyValid'==_0x247580||'commentsLicenseKeyInvalid'==_0x247580||'commentsLicenseKeyExpired'==_0x247580||'commentsLicenseKeyDomainLimit'==_0x247580||'commentsLicenseKeyNotAllowed'==_0x247580||'commentsLicenseKeyEvaluationLimit'==_0x247580||'commentsLicenseKeyUsageLimit'==_0x247580){delete _0x3c2b2d[_0x15f4ec],_0x547e9d=_0x247580,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x547e9d&&_0x3c2b2d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x547e9d&&_0x3c2b2d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x547e9d&&_0x3c2b2d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x547e9d&&_0x3c2b2d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x547e9d&&_0x3c2b2d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x547e9d&&_0x3c2b2d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xfc5a23){const _0x50b942=this['editor'],_0x5582d8=new _0xfc5a23(_0x50b942['locale']),_0x941f7b=_0x50b942['commands']['get']('addCommentThread');return _0x5582d8['set']({'label':N(_0x50b942['locale'],'Comment'),'icon':_0x2a98df}),_0x5582d8['bind']('isEnabled')['to'](_0x941f7b,'isEnabled',_0x941f7b,'hasContent',(_0x5626f2,_0xb5b9c7)=>_0x5626f2&&_0xb5b9c7),this['listenTo'](_0x5582d8,'execute',()=>{_0x941f7b['execute']();}),_0x5582d8;}}class i extends _0xc00a87{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x54ab5e){super(_0x54ab5e),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x371250,_0x424858,_0xae0030)=>{_0xae0030?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x38ba77,_0x28492b]of this['editor']['commands'])_0x28492b['affectsData']&&'addCommentThread'!==_0x38ba77&&_0x28492b['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x10cef1=this['editor']['editing']['view']['document'];this['listenTo'](_0x10cef1,'cut',_0x55025b=>_0x55025b['stop'](),{'priority':'highest'}),this['listenTo'](_0x10cef1,'clipboardInput',_0xd649b=>_0xd649b['stop'](),{'priority':'highest'}),this['listenTo'](_0x10cef1,'delete',_0x33fdf9=>_0x33fdf9['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x46fbb6,_0x36a3c6]of this['editor']['commands'])_0x36a3c6['affectsData']&&'addCommentThread'!==_0x46fbb6&&_0x36a3c6['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x4b682f{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdc6ae){super(_0xdc6ae),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x130ad4=this['context']['plugins']['get'](y);this['listenTo'](_0x130ad4,'_activateAnnotation',(_0x22a1d6,_0x196959)=>{for(const _0x24e8c2 of this['activeUIs']){const _0x143d4=this['_uis']['get'](_0x24e8c2);(0x0,this['uisData']['get'](_0x24e8c2)['filter'])(_0x196959)&&_0x143d4['setActiveAnnotation'](_0x196959);}}),this['listenTo'](_0x130ad4,'_deactivateAllAnnotations',()=>{for(const _0x108f1c of this['activeUIs']){this['_uis']['get'](_0x108f1c)['setActiveAnnotation'](null);}}),this['listenTo'](_0x130ad4['_visibleAnnotations'],'add',(_0x589b55,_0x1869c2)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1869c2);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x29360e){return this['activeUIs']['has'](_0x29360e);}['activate'](_0x2815b1,_0x45222a=this['defaultFilter']){const _0x14e4cf=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2815b1))throw new _0x4000c2('annotationsuis-missing-ui',this,{'uiName':_0x2815b1});this['isActive'](_0x2815b1)&&this['deactivate'](_0x2815b1),this['activeUIs']['add'](_0x2815b1);const _0x3bab7e=new S();v({'source':_0x14e4cf['_visibleAnnotations'],'target':_0x3bab7e,'filter':_0x45222a}),this['uisData']['set'](_0x2815b1,{'collection':_0x3bab7e,'filter':_0x45222a});const _0x3e6a27=this['_uis']['get'](_0x2815b1);_0x3e6a27['attach'](_0x3bab7e),this['listenTo'](_0x3e6a27,'change:activeAnnotation',(_0x350906,_0x28b81b,_0x3ea3b0,_0x43d75a)=>{_0x43d75a&&_0x14e4cf['_removeActiveAnnotation'](_0x43d75a),_0x3ea3b0&&_0x14e4cf['_addActiveAnnotation'](_0x3ea3b0);});}['deactivate'](_0x266c05){if(this['activeUIs']['delete'](_0x266c05),!this['_uis']['has'](_0x266c05))throw new _0x4000c2('annotationsuis-missing-ui',this,{'uiName':_0x266c05});const _0x5cf0de=this['_uis']['get'](_0x266c05);_0x5cf0de['detach'](),this['stopListening'](_0x5cf0de),this['uisData']['get'](_0x266c05)['collection']['destroy'](),this['uisData']['delete'](_0x266c05);}['switchTo'](_0x18c149){if(!this['_uis']['has'](_0x18c149))throw new _0x4000c2('annotationsuis-missing-ui',this,{'uiName':_0x18c149});const _0x174410=this['context']['plugins']['get'](y),_0x3d8484=Array['from'](_0x174410['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x18c149);const _0xaaad14=this['_uis']['get'](_0x18c149);_0xaaad14['setActiveAnnotation'](_0x3d8484),_0xaaad14['_setSelectedAnnotations']&&_0x3d8484&&_0xaaad14['_setSelectedAnnotations']([_0x3d8484]);}['deactivateAll'](){for(const _0xa278dc of this['activeUIs'])this['deactivate'](_0xa278dc);}['register'](_0x3fb3df,_0x32c57b){if(this['_uis']['has'](_0x3fb3df))throw new _0x4000c2('annotationsuis-register-already-registered');if('function'!=typeof _0x32c57b['attach']||'function'!=typeof _0x32c57b['detach']||'function'!=typeof _0x32c57b['setActiveAnnotation'])throw new _0x4000c2('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3fb3df,_0x32c57b);}['refilterAnnotations'](){const _0x9c8e03=this['context']['plugins']['get'](y)['collection'],_0x1ac20e=new Map(),_0x14c15a=Array['from'](this['activeUIs']);for(const _0x1eadb4 of this['activeUIs']){const _0x40e160=this['uisData']['get'](_0x1eadb4)['collection'];for(const _0xed50dd of _0x40e160)_0x1ac20e['set'](_0xed50dd,_0x1eadb4);}for(const _0x476cf2 of _0x9c8e03){const _0x6b9586=_0x1ac20e['get'](_0x476cf2);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x476cf2);const _0x43a0b5=_0x14c15a['find'](_0xac37b2=>this['uisData']['get'](_0xac37b2)['filter'](_0x476cf2));_0x6b9586!==_0x43a0b5&&(_0x6b9586&&this['uisData']['get'](_0x6b9586)['collection']['remove'](_0x476cf2),_0x43a0b5&&this['uisData']['get'](_0x43a0b5)['collection']['add'](_0x476cf2));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x51de37){const _0x49f1f7=[];for(const _0x1ec22e of this['activeUIs']){(0x0,this['uisData']['get'](_0x1ec22e)['filter'])(_0x51de37)&&_0x49f1f7['push'](_0x1ec22e);}if(_0x49f1f7['length']>0x1)throw new _0x4000c2('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x49f1f7,'annotationType':_0x51de37['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5267fc){super(_0x5267fc);const _0x2e028a=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 _0x22fbb8(),this['focusCycler']=new _0x329626({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2e028a['to']('class')],'style':{'minHeight':_0x2e028a['to']('minHeight',_0x45c364=>'number'==typeof _0x45c364?_i(_0x45c364+0xa):null)},'dir':_0x5267fc['uiLanguageDirection'],'role':'application','aria-label':N(_0x5267fc,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x5267fc,'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',_0x2b74fb=>{this['_updateItemPositionInFocusables'](_0x2b74fb['source']);}),this['list']['forEach'](_0x277d7a=>{this['focusTracker']['add'](_0x277d7a['element']),this['_updateItemPositionInFocusables'](_0x277d7a);}),this['list']['on']('change',(_0x47c2d7,_0x5154bc)=>{for(const _0x10ddd0 of _0x5154bc['removed'])this['focusTracker']['remove'](_0x10ddd0['element']),this['focusables']['remove'](_0x10ddd0);for(const _0x45cc5e of _0x5154bc['added'])this['focusTracker']['add'](_0x45cc5e['element']),this['_updateItemPositionInFocusables'](_0x45cc5e);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x42344e){const _0xdb3179=this['focusables']['getIndex'](_0x42344e);let _0x614eb4,_0x2a83e7;for(const _0x35d209 of this['focusables'])if(_0x42344e['top']<_0x35d209['top']){_0x614eb4=_0x35d209;break;}if(_0x2a83e7=_0x614eb4?this['focusables']['getIndex'](_0x614eb4):this['focusables']['length'],-0x1!==_0xdb3179){if(_0xdb3179===_0x2a83e7-0x1)return;this['focusables']['remove'](_0x42344e),_0x2a83e7=_0x614eb4?this['focusables']['getIndex'](_0x614eb4):this['focusables']['length'];}this['focusables']['add'](_0x42344e,_0x2a83e7);}}const Ot=/* #__PURE__ -- @preserve */
33
- Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x2b453e){super(_0x2b453e),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x217f78,_0xc3df6a)=>_0x217f78+_0xc3df6a),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x14decc=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x14decc['to']('isAnimationDisabled',_0x412e6e=>_0x412e6e?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x14decc['to']('top',_0x421733=>Ot(_0x421733))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5d4edc=this['element']['clientHeight'];_0x5d4edc&&(this['height']=_0x5d4edc);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4b682f{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1df383){super(_0x1df383),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 _0x293859=this['context']['config']['get']('sidebar.container');_0x293859&&this['setContainer'](_0x293859);}['setContainer'](_0x78815d){if(!g(_0x78815d))throw new _0x4000c2('sidebar-setcontainer-invalid-element');this['container']=_0x78815d;}['_attachToContainer']({viewClass:_0x4887c3='',spaceBetweenItems:_0x468907=0x19}={}){if(!g(this['container']))throw new _0x4000c2('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4887c3,this['_spaceBetweenItems']=_0x468907;}['rearrange']({removedAnnotation:_0x599252,previousAnnotation:_0x537cf7,nextAnnotation:_0x195a0d}){const _0x7bf28a=this['getSidebarItemView'](_0x599252);this['view']['list']['remove'](_0x7bf28a),this['_destroySidebarItemView'](_0x599252),_0x537cf7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x537cf7)),_0x195a0d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x195a0d)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x54524f,activatedAnnotation:_0x295f26,disableAnimationOnActivatedAnnotation:_0x513f15}){if(this['_activeAnnotation']=_0x295f26,_0x54524f){_0x54524f['isActive']=!0x1;const _0x4fb0b1=this['getSidebarItemView'](_0x54524f);_0x4fb0b1&&_0x513f15&&(_0x4fb0b1['isAnimationDisabled']=!0x1);}if(_0x295f26){const _0x437be7=this['getSidebarItemView'](_0x295f26);_0x437be7&&(_0x295f26['isActive']=!0x0,_0x513f15&&(_0x437be7['isAnimationDisabled']=!0x0,_0x437be7['top']+=0x1),this['_alignToTargetRect'](_0x437be7));}}['_detachFromContainer'](_0x25412f){if(this['view']['element']['remove'](),_0x25412f){for(const _0x3726d7 of _0x25412f)this['_destroySidebarItemView'](_0x3726d7);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2d4ead,_0x4c9d04){_0x4c9d04||(_0x4c9d04=_0x2d4ead['view']);const _0x356e9a=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x356e9a,_0x2d4ead),this['_annotationToSidebarItemView']['set'](_0x2d4ead,_0x356e9a),_0x356e9a['content']['add'](_0x4c9d04),this['listenTo'](_0x2d4ead['view'],'change:targetRect',(_0x3f8fa1,_0x619bf9,_0x4cd5f5)=>{const _0x39b6e3=this['_getTargetTop'](_0x2d4ead,_0x4cd5f5);_0x356e9a['_targetTop']!=_0x39b6e3&&(_0x356e9a['_targetTop']=_0x39b6e3,this['_setItemTop'](_0x356e9a,_0x39b6e3));}),this['listenTo'](_0x356e9a,'change:top',()=>{this['_recalculate'](_0x356e9a,'top');}),this['listenTo'](_0x356e9a,'change:bottom',()=>{this['_recalculate'](_0x356e9a,'bottom');}),this['_alignToTargetRect'](_0x356e9a);const _0x29ccd5=this['_getItemBefore'](_0x356e9a);if(_0x29ccd5)this['_alignAfterItem'](_0x29ccd5,_0x356e9a)||this['_alignToTargetRect'](_0x356e9a);else this['_alignToTargetRect'](_0x356e9a);return this['_updateLastItem'](),this['view']['list']['add'](_0x356e9a),_0x356e9a;}['_alignForTopChange'](_0x2b05dc){if(!_0x2b05dc['content']['length'])return;const _0x37c9bb=this['_getItemBefore'](_0x2b05dc);if(!_0x37c9bb)return;const _0x3f15aa=this['_sidebarItemViewToAnnotation']['get'](_0x37c9bb),_0x1dc4b8=this['_activeAnnotation'];_0x1dc4b8&&_0x1dc4b8===_0x3f15aa?this['_alignAfterItem'](_0x37c9bb,_0x2b05dc):this['_alignBeforeItem'](_0x2b05dc,_0x37c9bb);}['_alignForBottomChange'](_0x3eb444){if(!_0x3eb444['content']['length'])return;const _0x2346c7=this['_getItemAfter'](_0x3eb444);if(!_0x2346c7)return;const _0x26a1dd=this['_sidebarItemViewToAnnotation']['get'](_0x2346c7),_0x424ad0=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x161961=this['_activeAnnotation'];_0x161961&&_0x161961===_0x26a1dd&&_0x424ad0?(this['_alignBeforeItem'](_0x2346c7,_0x3eb444),this['_alignAfterItem'](_0x3eb444,_0x2346c7)):_0x161961&&_0x161961===_0x26a1dd?this['_alignBeforeItem'](_0x2346c7,_0x3eb444):this['_alignAfterItem'](_0x3eb444,_0x2346c7);}['_recalculate'](_0x2537c1,_0x34b389){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x244706,changedProp:_0x55c4b1}of this['_recalculateBuffer'])'top'===_0x55c4b1?this['_alignForTopChange'](_0x244706):this['_alignForBottomChange'](_0x244706);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2537c1,'changedProp':_0x34b389});}['getSidebarItemView'](_0x2136a9){return this['_annotationToSidebarItemView']['get'](_0x2136a9);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5141fb){const _0xc7d8c2=this['getSidebarItemView'](_0x5141fb);this['stopListening'](_0xc7d8c2),this['stopListening'](_0x5141fb['view']),_0xc7d8c2['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5141fb),this['_sidebarItemViewToAnnotation']['delete'](_0xc7d8c2);}['_createSidebarView'](){const _0x34c728=new H(this['context']['locale']);return _0x34c728['render'](),this['on']('change:_lastItem',(_0x3a52b9,_0x12df11,_0x5d34a0,_0x3d2ef6)=>{_0x3d2ef6&&_0x34c728['unbind']('minHeight'),_0x5d34a0?_0x34c728['bind']('minHeight')['to'](_0x5d34a0,'bottom'):_0x34c728['minHeight']=null;}),_0x34c728;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x177573){const _0xe7d80a=this['_sidebarItemViewToAnnotation']['get'](_0x177573),_0xb8870c=_0xe7d80a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xe7d80a)-0x1);return _0xb8870c&&this['getSidebarItemView'](_0xb8870c)||null;}['_getItemAfter'](_0x560aec){const _0x1d6ecf=this['_sidebarItemViewToAnnotation']['get'](_0x560aec),_0x585e77=_0x1d6ecf&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1d6ecf)+0x1);return _0x585e77&&this['getSidebarItemView'](_0x585e77)||null;}['_alignBeforeItem'](_0x1a2a75,_0x1e3c7c){_0x1a2a75['updateHeight']();const _0x4cc8ac=G(_0x1e3c7c['bottom']+this['_spaceBetweenItems'],_0x1a2a75['top']);return!!_0x4cc8ac&&(this['_setItemTop'](_0x1e3c7c,_0x1e3c7c['top']-_0x4cc8ac),!0x0);}['_alignAfterItem'](_0xe703e4,_0x56e5de){_0xe703e4['updateHeight']();const _0x21fb21=G(_0xe703e4['bottom']+this['_spaceBetweenItems'],_0x56e5de['top']);return!!_0x21fb21&&(this['_setItemTop'](_0x56e5de,_0x56e5de['top']+_0x21fb21,!0x1),!0x0);}['_alignToTargetRect'](_0x381f1b){const _0x3d2c48=this['_sidebarItemViewToAnnotation']['get'](_0x381f1b);if(!_0x3d2c48||!_0x3d2c48['target']||!_0x3d2c48['targetRect'])return;const _0x5e8f4d=this['_getTargetTop'](_0x3d2c48,_0x3d2c48['targetRect']);this['_setItemTop'](_0x381f1b,_0x5e8f4d);}['_getTargetTop'](_0x44e64f,_0x3ba72f){if(null===_0x3ba72f)return 0x0;if(_0x44e64f['target']instanceof _0x2767ff)return _0x3ba72f['top'];{const _0x3be07d=new _0x2767ff(this['view']['element'])['top'];return _0x3ba72f['top']-_0x3be07d;}}['_setItemTop'](_0x32c86c,_0x590b98,_0x3c35f9=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x3c35f9&&(_0x590b98=Math['max'](_0x590b98,this['_getMaxAvailableTop'](_0x32c86c))),_0x32c86c['top']=_0x590b98;}['_getMaxAvailableTop'](_0x1c752b){let _0x59c0ec=this['_getItemBefore'](_0x1c752b),_0x43ccd2=0x0;for(;_0x59c0ec;)_0x59c0ec['updateHeight'](),_0x43ccd2+=this['_spaceBetweenItems']+_0x59c0ec['height'],_0x59c0ec=this['_getItemBefore'](_0x59c0ec);return _0x43ccd2;}}function G(_0x1926bf,_0x3961ad){return Math['max'](_0x1926bf-_0x3961ad,0x0);}function g(_0x576990){return null!==_0x576990&&'object'==typeof _0x576990&&0x1===_0x576990['nodeType'];}class e extends _0x4b682f{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x15df6e){super(_0x15df6e),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x236aed(),this['_refreshPositioningDebounced']=_0x51e02f(()=>{_0x15df6e['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x48b23d=this['context']['plugins']['get'](j),_0x6785c=this['context']['plugins']['get'](z);_0x48b23d['register']('wideSidebar',this),_0x6785c['container']&&_0x48b23d['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1e7489){if(_0x1e7489===this['activeAnnotation'])return;const _0x56a955=this['context']['plugins']['get'](z);_0x56a955['_activeAnnotation']=_0x1e7489;const _0x5ef1bf=this['activeAnnotation'];_0x56a955['refresh']({'blurredAnnotation':_0x5ef1bf,'activatedAnnotation':_0x1e7489}),this['activeAnnotation']=_0x1e7489;}['attach'](_0x5c8f1){this['annotations']=_0x5c8f1;const _0x3c412e=this['context']['plugins']['get'](z);if(_0x3c412e['_annotations']=_0x5c8f1,this['isAttached'])throw new _0x4000c2('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3c412e,'set:container',()=>{this['detach'](),this['listenTo'](_0x3c412e,'change:container',_0xe56543=>{_0xe56543['off'](),this['attach'](_0x5c8f1);});}),_0x3c412e['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x12ecf0=_0x5b9878=>{_0x5b9878['updateTargetRect'](),_0x3c412e['addAnnotation'](_0x5b9878);};for(const _0x46e3f1 of _0x5c8f1)_0x12ecf0(_0x46e3f1);this['listenTo'](_0x5c8f1,'add',(_0x58e039,_0x58b4c9)=>{_0x12ecf0(_0x58b4c9);}),this['listenTo'](_0x5c8f1,'remove',(_0x38a551,_0x20eaa9,_0x4c40d6)=>{_0x3c412e['rearrange']({'removedAnnotation':_0x20eaa9,'previousAnnotation':_0x5c8f1['get'](_0x4c40d6-0x1),'nextAnnotation':_0x5c8f1['get'](_0x4c40d6+0x1)}),_0x20eaa9===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5c8f1,'focus',(_0x24a474,_0x1d4f6f)=>{this['setActiveAnnotation'](_0x1d4f6f);}),this['listenTo'](_0x5c8f1,'blur',()=>{this['setActiveAnnotation'](null);});const _0x14858c=this['context']instanceof _0x5d9522?this['context']['editors']:new _0x236aed([this['context']]);for(const _0x46fbe6 of _0x14858c)this['_integrateWithEditorAnnotations'](_0x46fbe6);this['listenTo'](_0x14858c,'add',(_0x3d300a,_0x11ea10)=>{this['listenTo'](_0x11ea10,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x11ea10);});}),this['listenTo'](_0x14858c,'remove',(_0x51a624,_0xad8d87)=>{_0xad8d87['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xad8d87['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4000c2('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5019ad=this['context']['plugins']['get'](z);_0x5019ad['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5019ad),this['stopListening'](this['annotations']),this['context']instanceof _0x5d9522&&this['stopListening'](this['context']['editors']);for(const _0x1f095c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1f095c);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2f8337){if(!_0x2f8337['plugins']['has']('EditorAnnotations'))return;const _0x24c63f=_0x2f8337['plugins']['get']('EditorAnnotations'),_0x12c619=()=>{const _0x2482ed=_0x24c63f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2482ed[0x0]||null);};this['listenTo'](_0x24c63f,'refresh',_0x12c619),this['listenTo'](_0x24c63f,'blur',(_0x2bc1be,{isAnnotationTracked:_0x50280a})=>{this['activeAnnotation']&&_0x50280a(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x24c63f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4221a6=>{_0x24c63f['hasDomSelection']()&&(_0x12c619(),_0x4221a6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x24c63f);}['_destroyEditorAnnotationsIntegration'](_0x35dac1){this['stopListening'](_0x35dac1),this['_editorAnnotations']['remove'](_0x35dac1);}}class C extends _0x19a4ce{['counterView'];constructor(_0x248208){super(_0x248208);const _0x358fcd=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x1ac209,_0x3a6ac9)=>_0x1ac209?'...':_0x3a6ac9['toString']()),this['set']('annotationType',''),this['icon']=_0x2a98df,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x358fcd['to']('annotationType',_0x589b42=>'ck-annotation-counter__badge--'+_0x589b42),_0x358fcd['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x358fcd['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4b682f{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11d1d8){super(_0x11d1d8),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x5743fa())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x236aed(),this['_refreshPositioningDebounced']=_0x51e02f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5a1f0d(this['context']['locale']),this['balloonPanelView']=new _0x46579c(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x346321){this['annotations']=_0x346321;const _0x79904b=this['context']['plugins']['get'](z),_0x2de207=this['balloonPanelView'];if(_0x79904b['_annotations']=_0x346321,this['isAttached'])throw new _0x4000c2('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x79904b,'set:container',()=>{this['detach'](),this['listenTo'](_0x79904b,'change:container',_0x369123=>{_0x369123['off'](),this['attach'](_0x346321);});}),_0x79904b['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x963e67=_0x1b0028=>{const _0x4c0cf9=new C(this['context']['locale']);_0x79904b['addAnnotation'](_0x1b0028,_0x4c0cf9),this['_annotationToNarrowView']['set'](_0x1b0028,_0x4c0cf9),_0x4c0cf9['bind']('isDirty','annotationType','number')['to'](_0x1b0028['view'],'isDirty','type','length'),_0x4c0cf9['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2de207['content']['first']!==_0x1b0028['view']?(this['_showBalloon'](_0x1b0028),_0x1b0028['view']['element']['focus'](),this['setActiveAnnotation'](_0x1b0028)):this['setActiveAnnotation'](null);});};for(const _0xe39a71 of _0x346321)_0x963e67(_0xe39a71);this['listenTo'](_0x346321,'add',(_0x378c84,_0x2d28ee)=>{_0x963e67(_0x2d28ee);}),this['listenTo'](_0x346321,'remove',(_0x82fb65,_0x4a31e6,_0x57cb3a)=>{this['_annotationToNarrowView']['get'](_0x4a31e6)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4a31e6),_0x79904b['rearrange']({'removedAnnotation':_0x4a31e6,'previousAnnotation':_0x346321['get'](_0x57cb3a-0x1),'nextAnnotation':_0x346321['get'](_0x57cb3a+0x1)}),_0x4a31e6===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x346321,'focus',(_0x36e102,_0x196fc3)=>{this['setActiveAnnotation'](_0x196fc3);}),this['listenTo'](_0x346321,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2e29d8,_0x270f69)=>{_0x270f69['keyCode']===_0x46e1a0['esc']&&_0x2de207['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2de207['content']['first']),this['_hideBalloon'](),_0x270f69['stopPropagation'](),_0x270f69['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2f8945,_0x40b466)=>{const _0x430b59=_0x40b466['target'];_0x2de207['isVisible']&&_0x2de207['element']['contains'](_0x430b59)||_0x79904b['view']['element']['contains'](_0x430b59)||_0x2f8945['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x8c8216=>_0x8c8216['contains'](_0x430b59))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xcd57ff=this['context']instanceof _0x5d9522?this['context']['editors']:new _0x236aed([this['context']]);for(const _0x34137c of _0xcd57ff)this['_integrateWithEditorAnnotations'](_0x34137c);this['listenTo'](_0xcd57ff,'add',(_0xf27793,_0x5e1f7e)=>{this['listenTo'](_0x5e1f7e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5e1f7e);});}),this['listenTo'](_0xcd57ff,'remove',(_0x2e4a54,_0x5af42a)=>{_0x5af42a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5af42a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4bacd6){if(_0x4bacd6===this['activeAnnotation'])return;const _0x2f1c01=this['context']['plugins']['get'](z);if(_0x2f1c01['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4bacd6,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4bacd6)_0x2f1c01['getSidebarItemView'](_0x4bacd6)?this['_showBalloon'](_0x4bacd6):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4bacd6;}['detach'](){if(!this['isAttached'])throw new _0x4000c2('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x456ff1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4ce8d6=>_0x4ce8d6['destroy']()),this['_annotationToNarrowView']['clear'](),_0x456ff1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5d9522&&this['stopListening'](this['context']['editors']);for(const _0x3f3c6d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3f3c6d);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'](_0x4ca695){if(!_0x4ca695['plugins']['has']('EditorAnnotations'))return;const _0x202f15=_0x4ca695['plugins']['get']('EditorAnnotations'),_0x66e099=this['context']['plugins']['get'](z),_0x552842=this['annotations'],_0x341c86=this['balloonPanelView'],_0x4822a3=()=>{const _0x40971e=_0x202f15['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x40971e),this['setActiveAnnotation'](_0x40971e[0x0]||null);};this['listenTo'](_0x202f15,'refresh',_0x4822a3),this['listenTo'](_0x202f15,'blur',(_0x5344fd,{isAnnotationTracked:_0x5697bc})=>{this['activeAnnotation']&&_0x5697bc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x202f15,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x552842,'blur',_0x5ba7cc=>{_0x202f15['hasDomSelection']()&&_0x5ba7cc['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2b78a8,_0x33f134)=>{const _0x36679c=_0x33f134['target'];_0x341c86['isVisible']&&_0x341c86['element']['contains'](_0x36679c)||_0x66e099['view']['element']['contains'](_0x36679c)||this['activeAnnotation']&&_0x202f15['hasDomSelection']()&&(_0x4822a3(),_0x2b78a8['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x202f15);}['_destroyEditorAnnotationsIntegration'](_0x33bab2){_0x33bab2&&(this['stopListening'](_0x33bab2),this['_editorAnnotations']['remove'](_0x33bab2));}['_setSelectedAnnotations'](_0x5d94dd){for(const _0x2bf512 of this['_selectedAnnotations'])_0x5d94dd['includes'](_0x2bf512)||this['_manuallyClosedAnnotationViews']['delete'](_0x2bf512['view']);this['_selectedAnnotations']=_0x5d94dd;}['_refreshPositioning'](){const _0x390230=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x390230['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x10d6cb){if(this['_manuallyClosedAnnotationViews']['has'](_0x10d6cb['view']))return;const _0x37d8c5=this['balloonPanelView']['content']['first'];_0x37d8c5!==_0x10d6cb['view']?(_0x37d8c5&&this['_detachListeners'](_0x37d8c5),this['_attachListeners'](_0x10d6cb['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x10d6cb['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0xf3a608=this['balloonPanelView']['content']['first'],_0x119718=_0xf3a608&&this['annotations']['getByView'](_0xf3a608);if(!_0x119718||!this['_annotationToNarrowView']['has'](_0x119718))return;const _0x375bf1=this['_annotationToNarrowView']['get'](_0x119718)['element'],_0x54c1da=(function(){const _0x109173=_0x46579c['defaultPositions'];return[_0x109173['southArrowNorthEast'],_0x109173['northArrowSouthEast'],_0x109173['southArrowNorth'],_0x109173['northArrowSouth'],_0x109173['southArrowNorthWest'],_0x109173['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x375bf1,'positions':_0x54c1da});}['_hideBalloon'](){const _0x2a15ea=this['balloonPanelView'],_0x3e7234=_0x2a15ea['content']['first'];_0x3e7234&&(this['_detachListeners'](_0x3e7234),_0x2a15ea['unpin'](),_0x2a15ea['content']['clear']());}['_attachListeners'](_0x436d4f){this['listenTo'](_0x436d4f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x436d4f,'Esc',(_0x9d9a96,_0x1f8b9b)=>{this['_manuallyClosedAnnotationViews']['add'](_0x436d4f),this['_hideBalloon'](),_0x1f8b9b();});}['_detachListeners'](_0x2c3eeb){this['stopListening'](_0x2c3eeb);}}class c extends _0xc00a87{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x296170,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xb8782f){super(_0xb8782f),_0xb8782f['editing']['view']['addObserver'](_0xf0bc54),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xb8782f['plugins']['get'](_0x296170),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x8fc44a=this['editor']['plugins']['get'](j);_0x8fc44a['context']===this['editor']&&(_0x8fc44a['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x58b0f8,_0x326b93)=>{const _0x1b33ec=this['_balloon'];if(this['isAttached']&&_0x1b33ec['visibleView']){const _0x622fd8=this['annotations']['getByView'](_0x1b33ec['visibleView']);_0x622fd8&&this['_closeAnnotation'](_0x622fd8),_0x326b93();}}));}['afterInit'](){const _0x7b7f89=this['editor']['plugins']['get'](j);_0x7b7f89['context']===this['editor']&&(_0x7b7f89['hasActive']()||_0x7b7f89['switchTo']('inline'));}['setActiveAnnotation'](_0x2ca70c){_0x2ca70c!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2ca70c&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2ca70c)&&this['_addAnnotationToBalloon'](_0x2ca70c,!0x0),_0x2ca70c['isActive']=!0x0),_0x2ca70c||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2ca70c);}['attach'](_0x5f33e7){this['annotations']=_0x5f33e7;const _0x5a314c=this['editor']['plugins']['get'](j),_0x5a163b=this['_balloon'];if(this['isAttached'])throw new _0x4000c2('inlineannotations-attach-already-attached',this);if(_0x5a314c['context']!==this['editor'])throw new _0x4000c2('inlineannotations-not-allowed-with-context',this);const _0x43cc66=this['editor']['plugins']['get'](b);this['listenTo'](_0x43cc66,'refresh',()=>{const _0x33193a=_0x43cc66['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x31d37e,_0x4cf9a8;!this['_forceRefresh']&&(_0x31d37e=_0x33193a,_0x4cf9a8=this['_selectedAnnotations'],_0x31d37e['length']===_0x4cf9a8['length']&&_0x31d37e['every'](_0x3ef602=>_0x4cf9a8['includes'](_0x3ef602)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x33193a),this['setActiveAnnotation'](_0x33193a[0x0]||null));}),this['listenTo'](_0x43cc66,'blur',(_0x31adb5,{isAnnotationTracked:_0x23d774})=>{this['activeAnnotation']&&_0x23d774(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x451b7,_0x3e8424,_0x62cf8a)=>{_0x62cf8a||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5f33e7,'remove',(_0x1a0d5f,_0x5e5949)=>{this['_removeAnnotationFromBalloon'](_0x5e5949),_0x5e5949===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5a163b,'change:visibleView',(_0x27ca39,_0x4689ac,_0x4feb5f,_0x21ec16)=>{_0x21ec16&&this['stopListening'](_0x21ec16);const _0x46e582=_0x5f33e7['getByView'](_0x4feb5f);_0x4feb5f&&_0x46e582&&(this['listenTo'](_0x4feb5f,'change:height',()=>{_0x5a163b['updatePosition']();}),this['listenTo'](_0x4feb5f,'Esc',()=>{this['_closeAnnotation'](_0x46e582),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x46e582&&this['setActiveAnnotation'](_0x46e582));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5a163b['visibleView']&&(_0x5f33e7['getByView'](_0x5a163b['visibleView'])&&_0x5a163b['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 _0x4000c2('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x57f178 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x57f178);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x1f6e11){for(const _0xc07180 of this['_selectedAnnotations'])_0x1f6e11['includes'](_0xc07180)||this['_manuallyClosed']['delete'](_0xc07180);for(const _0x1312ca of this['annotations'])_0x1f6e11['includes'](_0x1312ca)||this['_removeAnnotationFromBalloon'](_0x1312ca);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x481380 of _0x1f6e11)this['_addAnnotationToBalloon'](_0x481380);}this['_selectedAnnotations']=_0x1f6e11;}['_addAnnotationToBalloon'](_0x5a57be,_0x4de29b=!0x1){this['_manuallyClosed']['has'](_0x5a57be)||(this['_addedAnnotations']['has'](_0x5a57be)||this['_balloon']['hasView'](_0x5a57be['view'])||(this['_addedAnnotations']['add'](_0x5a57be),this['_balloon']['add']({'stackId':_0x5a57be['view']['id'],'view':_0x5a57be['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5a57be)}})),_0x4de29b&&this['_balloon']['showStack'](_0x5a57be['view']['id']));}['_getBalloonTargetForAnnotation'](_0xd3dbdf){const _0x3c45a7=_0xd3dbdf['target'],_0x1eb482=this['editor']['editing']['view'],_0x505ddc=_0x1eb482['document']['selection']['getFirstRange'](),_0x233917=_0x1eb482['domConverter']['viewRangeToDom'](_0x505ddc);if(_0x233917['collapse'](!0x0),_0x3c45a7){if(_0x3c45a7 instanceof _0x2767ff)return _0x3c45a7;let _0x204424=[];for(const _0x2414ae of _0x3c45a7)_0x204424['push'](...F(_0x2414ae['getClientRects']()));_0x204424=function(_0x544737){const _0x16c366=[];let _0x42c59c=_0x544737[0x0];for(let _0x12916f=0x1;_0x12916f<_0x544737['length'];_0x12916f++)P(_0x42c59c,_0x544737[_0x12916f])?_0x42c59c['width']+=_0x544737[_0x12916f]['width']:(_0x16c366['push'](_0x42c59c),_0x42c59c=_0x544737[_0x12916f]);return _0x16c366['push'](_0x42c59c),_0x16c366;}(_0x204424);const _0x54a280=_0x233917['getBoundingClientRect']();return _0x204424['find'](_0x50b314=>_0x50b314['top']<=_0x54a280['top']&&_0x50b314['bottom']>=_0x54a280['bottom']&&_0x50b314['left']<=_0x54a280['left']&&_0x50b314['right']>=_0x54a280['right'])||_0x204424[0x0];}return _0xd3dbdf['targetRect']||_0x233917;}['_removeAnnotationFromBalloon'](_0x18634c){this['_addedAnnotations']['has'](_0x18634c)&&this['_balloon']['hasView'](_0x18634c['view'])&&(this['_addedAnnotations']['delete'](_0x18634c),this['_balloon']['remove'](_0x18634c['view']));}['_closeAnnotation'](_0x2503ce){this['_manuallyClosed']['add'](_0x2503ce),this['_removeAnnotationFromBalloon'](_0x2503ce);}}function F(_0x32a9e3){return Array['from'](_0x32a9e3)['map'](DOMRect['fromRect']);}function P(_0xc5d22e,_0x351be9){return _0xc5d22e['top']===_0x351be9['top']&&_0xc5d22e['bottom']===_0x351be9['bottom']&&_0xc5d22e['right']===_0x351be9['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x4ce75e,_0x2690b7){super(_0x4ce75e),this['set']('isEmpty',!_0x2690b7['length']),this['focusTracker']=new _0x22fbb8(),this['_annotationViews']=_0x2690b7,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x329626({'focusables':_0x2690b7,'focusTracker':this['focusTracker']}),this['listenTo'](_0x2690b7,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x2690b7,'remove',(_0x37da69,_0x377784)=>{_0x377784['isActive']&&this['focus'](),_0x2690b7['length']||(this['isEmpty']=!0x0);});const _0x5abce8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x4ce75e,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x2690b7},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5abce8['if']('isEmpty','ck-hidden',_0x24e980=>!_0x24e980)]},'children':[{'text':N(_0x4ce75e,'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 _0x98272b of this['_annotationViews'])this['focusTracker']['add'](_0x98272b['element']);this['_annotationViews']['on']('change',(_0x86de5,{added:_0x4f2706,removed:_0x36a710})=>{for(const _0x18a818 of _0x4f2706)this['focusTracker']['add'](_0x18a818['element']);for(const _0x54b016 of _0x36a710)this['focusTracker']['remove'](_0x54b016['element']);});}}class p extends _0x4b682f{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x49ccfc){super(_0x49ccfc),this['archivedThreads']=new _0x236aed();}['init'](){const _0x3f63e8=this['context'],_0x46eec3=_0x3f63e8['plugins']['get'](o),_0x58ae86=_0x3f63e8['plugins']['get'](y);this['listenTo'](_0x46eec3,'addCommentThread',(_0x368851,{threadId:_0x2533f2})=>{const _0x879f88=_0x46eec3['getCommentThread'](_0x2533f2);_0x879f88['archivedAt']&&this['archivedThreads']['add'](_0x879f88,this['_calculatePosition'](_0x879f88['archivedAt'])),this['listenTo'](_0x879f88,'change:archivedAt',(_0x48336d,_0x5c21d0,_0x28da5c)=>{_0x28da5c?this['archivedThreads']['has'](_0x879f88)||this['archivedThreads']['add'](_0x879f88,this['_calculatePosition'](_0x879f88['archivedAt'])):this['archivedThreads']['has'](_0x879f88)&&this['archivedThreads']['remove'](_0x879f88);});}),this['listenTo'](_0x46eec3,'removeCommentThread',(_0x50a1ed,{threadId:_0x473ada})=>{const _0x234136=_0x46eec3['getCommentThread'](_0x473ada);this['stopListening'](_0x234136),this['archivedThreads']['has'](_0x234136)&&this['archivedThreads']['remove'](_0x234136);},{'priority':'highest'}),this['listenTo'](_0x58ae86['collection'],'focus',(_0x1baabe,_0x56efa0)=>{_0x56efa0['isVisible']||(_0x56efa0['isActive']=!0x0,_0x58ae86['activate'](_0x56efa0));});}['_calculatePosition'](_0x180e42){const _0x224811=[...this['archivedThreads']]['findIndex'](_0x2f0c48=>_0x2f0c48['archivedAt']<_0x180e42);return _0x224811>-0x1?_0x224811:this['archivedThreads']['length'];}}class a extends _0xc00a87{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1972a5];}constructor(_0x6f326a){super(_0x6f326a),this['annotationViews']=new _0x12e523(),this['_pendingThreads']=[];}['init'](){const _0x2fac43=this['editor'],_0x32e50c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2fac43['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x19a4ce,!0x0)),_0x2fac43['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3b4ffe=this['_createCommentsArchiveButton'](_0x171cc0);return _0x3b4ffe['set']({'role':'menuitemcheckbox'}),_0x3b4ffe;});const _0x361138=_0x2fac43['plugins']['get'](p),_0x36980c=_0x2fac43['plugins']['get']('Annotations'),_0x25f6a2=_0x2fac43['plugins']['get']('CommentsRepository');_0x361138['archivedThreads']['forEach'](_0x20fbfc=>{this['_handleNewThread'](_0x20fbfc);}),this['listenTo'](_0x361138['archivedThreads'],'add',(_0x4787ca,_0x319074)=>{this['_handleNewThread'](_0x319074);}),this['listenTo'](_0x36980c['collection'],'add',(_0x25cf35,_0x58b830)=>{const _0x21116b=this['_pendingThreads']['find'](_0x3dbd15=>{const _0x470744=_0x25f6a2['_threadToController']['get'](_0x3dbd15);return _0x470744&&_0x58b830['innerView']===_0x470744['view'];});if(_0x21116b){const _0x48af8a=this['_calculatePosition'](_0x21116b['archivedAt']);this['_addAnnotationToArchive'](_0x58b830,_0x48af8a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x21116b),0x1);}}),this['listenTo'](_0x361138['archivedThreads'],'remove',(_0xa50b,_0x5cde5c)=>{const _0x476701=_0x2fac43['config']['get']('collaboration.channelId');if(!_0x476701||_0x5cde5c['channelId']===_0x476701){if(this['_pendingThreads']['includes'](_0x5cde5c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5cde5c),0x1);else{const _0x5233ed=_0x25f6a2['_threadToController']['get'](_0x5cde5c),_0x3d3487=_0x36980c['getByInnerView'](_0x5233ed['view']);this['annotationViews']['remove'](_0x3d3487['view']),this['stopListening'](_0x3d3487),this['stopListening'](_0x3d3487['focusableElements']);}}}),this['listenTo'](_0x36980c['collection'],'add',(_0x37b479,_0x15c279)=>{this['listenTo'](_0x15c279,'escape',_0x32e50c);}),this['listenTo'](_0x36980c['collection'],'remove',(_0x53f905,_0x372622)=>{this['stopListening'](_0x372622,'escape',_0x32e50c);});}['_addAnnotationToArchive'](_0x382462,_0x50df0a){this['listenTo'](_0x382462,'set:isVisible',_0x1b1c72=>{_0x1b1c72['return']=!0x1,_0x1b1c72['stop']();}),this['annotationViews']['add'](_0x382462['view'],_0x50df0a);}['_handleNewThread'](_0x66fb10){const _0x6a1fd1=this['editor']['plugins']['get']('CommentsRepository'),_0x52647d=this['editor']['plugins']['get']('Annotations'),_0x1fc7e9=this['editor']['config']['get']('collaboration.channelId');if(!_0x1fc7e9||_0x66fb10['channelId']===_0x1fc7e9){const _0x7fb462=_0x6a1fd1['_threadToController']['get'](_0x66fb10);if(!_0x7fb462)return void this['_pendingThreads']['push'](_0x66fb10);const _0x46177d=this['_calculatePosition'](_0x66fb10['archivedAt']),_0x471a53=_0x52647d['getByInnerView'](_0x7fb462['view']);_0x471a53['isVisible']&&_0x52647d['_visibleAnnotations']['remove'](_0x471a53),this['_addAnnotationToArchive'](_0x471a53,_0x46177d);}}['_calculatePosition'](_0xb5bf4d){const _0x4d9ee0=this['editor']['config']['get']('collaboration.channelId'),_0x15e295=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x344e43=>_0x344e43['channelId']===_0x4d9ee0)['findIndex'](_0x2183e8=>_0x2183e8['archivedAt']<_0xb5bf4d);return _0x15e295<0x0||_0x15e295>this['annotationViews']['length']?this['annotationViews']['length']:_0x15e295-0x1;}['_toggleDialog'](){const _0x230663=this['editor'],_0xc8eba=_0x230663['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x230663['locale'],this['annotationViews'])),'commentsArchive'===_0xc8eba['id']?_0xc8eba['hide']():_0xc8eba['show']({'id':'commentsArchive','title':N(_0x230663['locale'],'COMMENTS_ARCHIVE'),'icon':_0x5d05ce,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x20ca1c['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x39c2d9,_0x3b5b79=!0x1){const _0x14ad53=this['editor']['locale'],_0x2c7b12=this['editor']['plugins']['get']('Dialog'),_0x14413d=new _0x39c2d9(_0x14ad53);return _0x14413d['bind']('isEnabled')['to'](this,'isEnabled'),_0x14413d['bind']('isOn')['to'](_0x2c7b12,'id',_0x2eb517=>'commentsArchive'===_0x2eb517),_0x14413d['set']({'label':N(_0x14ad53,'COMMENTS_ARCHIVE'),'icon':_0x5d05ce,'isToggleable':!0x0}),_0x3b5b79&&(_0x14413d['tooltip']=!0x0),this['listenTo'](_0x14413d,'execute',()=>this['_toggleDialog']()),_0x14413d;}['_hideDialogOnAnnotationEscape']=_0x1e0c62=>{const _0x5bd4bd=_0x1e0c62['source'];if(!this['annotationViews']['has'](_0x5bd4bd['view']))return;const _0x3cab00=this['editor']['plugins']['get']('Dialog');_0x3cab00['isOpen']&&'commentsArchive'===_0x3cab00['id']&&(_0x3cab00['hide'](),_0x1e0c62['stop']());};}class gi extends _0xc00a87{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
23
+ import{Editor as _0x1f8384,ContextPlugin as _0x152fb7,PendingActions as lt,Command as _0x39b56b,Plugin as _0x165a5f,Context as _0x4eea4a}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x41c8cb,uid as _0x4c5e37,KeystrokeHandler as jt,FocusTracker as _0x5f5319,diff as _0x52b175,Collection as _0x139e96,Rect as _0x3f14b6,CKEditorError as _0x266f92,first as _0x49bf05,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x2bb24d,keyCodes as _0x63f92}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x193858,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x188cb3,trimHtml as ts,LateFocusDropdownButtonView as _0x539736,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x355e93}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x3b904d}from'es-toolkit/compat';import{IconUndo as _0x130a47,IconCheck as _0x2a328a,IconPencil as _0x5939de,IconRemoveComment as _0x92b88,IconThreeVerticalDots as _0x44b678,IconAddComment as _0x1b49ba,IconCommentsArchive as _0x54b5f6}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x140f1f,ButtonView as _0x47a354,ViewCollection as _0x577399,createDropdown as _0x3deee8,ListView as _0x5ca25c,focusChildOnDropdownOpen as _0x1518f9,ListItemView as _0x365663,MenuBarMenuListItemButtonView as _0x320df3,BodyCollection as _0x530e58,BalloonPanelView as _0x4534d9,ContextualBalloon as _0x15b3ff,Dialog as _0x20864c,DialogViewPosition as _0x22636}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x1cac50}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x3b0de7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x4359cf}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0x41c8cb(){['model'];['view'];constructor(_0x35177d,_0x61bc16){super(),this['model']=_0x35177d,this['model']['_isAttached']=!0x0,this['view']=_0x61bc16,this['listenTo'](_0x61bc16,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x61bc16,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x61bc16,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x61bc16,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x61bc16,'addComment',(_0x5e0975,_0xb98570)=>this['addComment'](_0xb98570)),this['listenTo'](_0x61bc16,'updateComment',(_0x5c2753,_0x5dc974,_0x5ecfdc)=>this['updateComment'](_0x5dc974,_0x5ecfdc)),this['listenTo'](_0x61bc16,'removeComment',(_0x133a12,_0x3cd7c4)=>this['removeComment'](_0x3cd7c4));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1ffbf4){this['model']['addComment']({'content':_0x1ffbf4,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x2def70,_0x14031d){this['model']['getComment'](_0x2def70)['update']({'content':_0x14031d});}['removeComment'](_0x900bb7){this['model']['getComment'](_0x900bb7)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x14d22b,_0x58bdc0,_0x149b13){const t=_0x14d22b['t'];switch(_0x58bdc0){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'},_0x149b13);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'},_0x149b13);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'},_0x149b13);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'},_0x149b13);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x149b13);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'},_0x149b13);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'},_0x149b13);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'},_0x149b13);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x923db3,_0x1d166b){super(_0x923db3);const _0x2cf00b=_0x4c5e37();this['main']=this['createCollection'](),this['editable']=new Vt(_0x923db3,_0x1d166b,void 0x0,{'label':()=>N(_0x923db3,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x923db3['uiLanguageDirection'],'lang':_0x923db3['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x2cf00b},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x51911d){super(_0x51911d),this['view']=new Rt(_0x51911d['locale'],_0x51911d['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x317777=this['editor']['editing']['view'],_0xb9bd04=this['view']['editable'],_0x2e7663=_0x317777['document']['getRoot']();_0xb9bd04['name']=_0x2e7663['rootName'],this['view']['render']();const _0x3d5294=_0xb9bd04['element'];this['setEditableElement'](_0xb9bd04['name'],_0x3d5294),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x317777['attachDomRoot'](_0x3d5294),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
+ _0x41c8cb(_0x1f8384){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x3c4fe9={}){function _0x3cddeb(_0x4d3ce4){return _0x4d3ce4['map'](_0x285a6a=>String['fromCharCode'](_0x285a6a))['join']('');}(_0x3c4fe9=Object['assign']({},_0x3c4fe9))['plugins']||(_0x3c4fe9['plugins']=hs['defaultPlugins']),super(_0x3c4fe9),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3cddeb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3cddeb([0x76,0x69,0x65,0x77])][_0x3cddeb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3cddeb([0x61,0x75,0x74,0x6f]),this[_0x3cddeb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3cddeb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3cddeb([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3cddeb([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3cddeb([0x6f,0x6b])});}['create'](){const _0x5e5868=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5e5868))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xc18d11=>{const _0x3ef22d=this['model']['document']['getRoot'](),_0x4879d3=_0x3ef22d&&_0x3ef22d['getChild'](_0x3ef22d['childCount']-0x1);_0xc18d11['setSelection'](_0x4879d3,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x44bae1=this['editing']['view'],_0x49cd6b=_0x44bae1['document']['getRoot'](),_0x524568=_0x49cd6b['getChild'](0x0);_0x49cd6b['childCount']>0x1||!_0x524568||'p'!=_0x524568['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x44bae1,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x524568['placeholder']=this['placeholder']),Ft({'view':_0x44bae1,'element':_0x524568,'keepOnFocus':!0x0}),this['placeholderElement']=_0x524568);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x532e96,_0x3375e1={}){super(_0x532e96),this['editor']=null,this['_editorConfig']=_0x3375e1,this['set']('value',_0x3375e1['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x532e96,'Reply...')),this['set']('submitLabel',N(_0x532e96,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5f5319(),this['focusCycler']=new _0x140f1f({'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',(_0x24dd75,_0x24ba18)=>{this['cancelButtonView']['fire']('execute'),_0x24ba18();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3b56d0,_0x3ee3b5)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3ee3b5());}),this['on']('submit',(_0x34139d,_0x31e5db)=>{_0x31e5db['length']>0xfde8?(alert(N(_0x532e96,'TOO_LONG_COMMENT_ALERT',[_0x31e5db['length'],0xfde8])),_0x34139d['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x16aa56=this['editor'];this['element']['insertBefore'](_0x16aa56['ui']['element'],this['element']['firstChild']),_0x16aa56['model']['document']['on']('change',()=>this['value']=_0x16aa56['getData']()),_0x16aa56['bind']('placeholder')['to'](this),this['focusables']['add'](_0x16aa56['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4638a8){-0x1===_0x4638a8?(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:_0x9d630}=this,_0x52d7e6=new _0x47a354(_0x9d630);return _0x52d7e6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x52d7e6['withText']=!0x0,_0x52d7e6['bind']('label')['to'](this,'submitLabel'),_0x52d7e6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x52d7e6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x536e64,_0x168a8c)=>!_0x168a8c&&!!_0x536e64['trim']()),_0x52d7e6;}['_createCancelButton'](){const {locale:_0x4b32b5}=this,_0x33c61f=new _0x47a354(_0x4b32b5);return _0x33c61f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x33c61f['label']=N(_0x4b32b5,'Cancel'),_0x33c61f['withText']=!0x0,_0x33c61f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x33c61f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5d789f=>{this['focusTracker']['add'](_0x5d789f['element']);}),this['focusables']['on']('change',(_0x46e03d,_0x472025)=>{for(const _0x1a79cd of Array['from'](_0x472025['added'])['reverse']())this['focusTracker']['add'](_0x1a79cd['element']);});}}class ie extends kt{constructor(_0x186388,_0x4c9eb5,_0x28ca93){super(_0x186388),this['commentInputView']=new es(_0x186388,_0x28ca93),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4adc72,_0x2d4e40)=>_0x4adc72||!!_0x2d4e40),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 _0x193858(_0x186388,_0x4c9eb5),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'](_0x32f95c){this['commentInputView']['focus'](_0x32f95c);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x21b9a3,_0x2ee8cd)=>{const {submitButtonView:_0x464707,cancelButtonView:_0x16df27,editor:_0x3386de}=this['commentInputView'];[_0x464707['element'],_0x16df27['element'],_0x3386de?_0x3386de['editing']['view']['getDomRoot']():null]['filter'](_0x4c0274=>_0x4c0274)['some'](_0xe054f=>_0xe054f['contains'](_0x2ee8cd['target']))||(this['focus'](),_0x2ee8cd['preventDefault']());});}}class rs extends kt{constructor(_0x22f4cc){super(_0x22f4cc);const _0x50de5d=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x50de5d['to']('count',_0x143643=>N(_0x22f4cc,'NUMBER_OF_COMMENTS',_0x143643))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2f4030,_0x9ab699,_0x5781f3){super(_0x2f4030);const _0x3343b3=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x9ab699['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x9ab699,this['_config']=_0x5781f3,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['focusCycler']=new _0x140f1f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x360176=>this['commentViews']['map'](_0x571d04=>_0x571d04['element'])['includes'](_0x360176['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x2f4030),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x239242=>_0x239242-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4eb311 of _0x9ab699['comments'])this['_handleNewCommentModel'](_0x4eb311);this['_handleInfoComment'](),this['listenTo'](_0x9ab699['comments'],'add',(_0x3514,_0x49de90)=>{const _0x1906df=this['_calculatePosition'](_0x49de90);this['length']++,this['_handleNewCommentModel'](_0x49de90,_0x1906df),this['refreshVisibleViews']();}),this['listenTo'](_0x9ab699['comments'],'remove',(_0x5994c5,_0x4e5a28)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4e5a28),this['refreshVisibleViews']();}),this['listenTo'](_0x9ab699,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x9ab699,'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',_0x3343b3['if']('length','ck-hidden',_0x2f3031=>!_0x2f3031)],'aria-label':N(_0x2f4030,'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'](_0x2e1e2b){-0x1===_0x2e1e2b?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x33cfd2 of this['commentViews'])_0x33cfd2['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x5a1b5f,_0x39fb16){const _0x133917=new this['_config']['CommentView'](this['locale'],_0x5a1b5f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x133917['viewUid']=_0x5a1b5f['id'],_0x133917['delegate']('removeComment')['to'](this),_0x133917['delegate']('updateComment')['to'](this),_0x133917['delegate']('resolveCommentThread')['to'](this),_0x133917['delegate']('editorReady')['to'](this),_0x133917['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x133917,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x133917,_0x39fb16);}['_calculatePosition'](_0x4ca0e7){const _0xaaee6c=this['_model']['_findOptimalIndex'](_0x4ca0e7);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x4ca0e7['authoredAt']?_0xaaee6c-0x1:_0xaaee6c:_0xaaee6c-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x56eb59={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x56eb59,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x56eb59));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x232955){const _0xe272c2=this['commentViews']['remove'](_0x232955['id']);this['stopListening'](_0xe272c2),_0xe272c2['isEditMode']&&this['_updateHasDirtyComment'](),_0xe272c2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1ea64c=>_0x1ea64c['isEditMode']);}['_rearrangeCollapse'](){const _0x3aef9a=function(_0x381723){const _0xc579d=new _0x139e96();for(const _0x29819c of _0x381723)_0xc579d['add'](_0x29819c);return _0xc579d;}(this['commentViews']),_0x3a6c23=this['_collapsedCommentsView']['count'];for(let _0x39bf2f=0x1;_0x39bf2f<=_0x3a6c23;_0x39bf2f++)_0x3aef9a['remove'](0x1);for(const _0x4b8a0b of _0x3aef9a)_0x4b8a0b['collapse']();_0x3a6c23>0x0&&_0x3aef9a['add'](this['_collapsedCommentsView'],0x1),ns(_0x52b175(Array['from'](this['visibleViews']),Array['from'](_0x3aef9a)),this['visibleViews'],_0x3aef9a);}['_rearrangeExpand'](){ns(_0x52b175(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x111ed6 of this['visibleViews'])_0x111ed6['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x539bcb=>{this['focusTracker']['add'](_0x539bcb['element']),this['keystrokes']['listenTo'](_0x539bcb['element']);}),this['commentViews']['on']('change',(_0x1ae5d9,_0x47aafd)=>{for(const _0x328654 of _0x47aafd['removed'])this['focusTracker']['remove'](_0x328654['element']),this['keystrokes']['stopListening'](_0x328654['element']);for(const _0x4cf4f1 of Array['from'](_0x47aafd['added'])['reverse']())this['focusTracker']['add'](_0x4cf4f1['element']),this['keystrokes']['listenTo'](_0x4cf4f1['element']);});}}function ns(_0xdd8c44,_0x49dbe2,_0x273ecf){let _0x5e87b8=0x0;for(const _0x5bb72a of _0xdd8c44)switch(_0x5bb72a){case'insert':_0x49dbe2['add'](_0x273ecf['get'](_0x5e87b8),_0x5e87b8),_0x5e87b8++;break;case'delete':_0x49dbe2['remove'](_0x5e87b8);break;case'equal':_0x5e87b8++;}}class oe extends kt{constructor(_0x4a4f13){super(_0x4a4f13);const _0x4e6007=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4e6007['to']('contextValue',_0x127637=>N(_0x4a4f13,'THREAD_CONTEXT_LABEL',_0x127637)),'tabindex':-0x1},'children':[{'text':_0x4e6007['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2b150d,_0x377fa5){super(_0x2b150d);const _0x2bcdcd=this['bindTemplate'];this['_model']=_0x377fa5,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['focusCycler']=new _0x140f1f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5a6a75=>!!_0x5a6a75),this['bind']('contextValue')['to'](this['_model'],'context',_0x3b46ea=>_0x3b46ea&&_0x3b46ea['value']?this['_trimContextValue'](_0x3b46ea['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x2bcdcd['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 _0x172aaa=new _0x47a354(this['locale']);return _0x172aaa['label']=N(this['locale'],'Reopen'),_0x172aaa['tooltip']=N(this['locale'],'Reopen'),_0x172aaa['icon']=_0x130a47,_0x172aaa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x54f77=>!_0x54f77),_0x172aaa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x42ec5c,_0x194a95)=>_0x42ec5c&&_0x194a95),_0x172aaa['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x172aaa;}['_trimContextValue'](_0x5c18a5){if(_0x5c18a5['length']<0x96)return _0x5c18a5;const _0x161674=_0x5c18a5['lastIndexOf']('\x20',0x93);return _0x5c18a5['substring'](0x0,_0x161674>-0x1?_0x161674:0x93)+'...';}['_attachContextActions'](){const _0x247bca=this['element']['querySelector']('.ck-context'),_0x465291=_0x247bca['querySelector']('.ck-context__value');this['listenTo'](_0x247bca,'mouseenter',()=>{_0x465291['offsetWidth']<_0x465291['scrollWidth']&&_0x247bca['classList']['add']('overlay');}),this['listenTo'](_0x247bca,'mouseleave',()=>{_0x247bca['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x47fa2b of this['focusables'])this['focusTracker']['add'](_0x47fa2b['element']),this['keystrokes']['listenTo'](_0x47fa2b['element']);}['_createContextView'](){const _0x16c793=new oe(this['locale']);return _0x16c793['bind']('contextValue')['to'](this),_0x16c793;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x54b277,_0x2705b5,_0x44f53d,_0x225fb5){super(_0x54b277),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2705b5,this['_localUser']=_0x44f53d,this['_config']=_0x225fb5,this['commentThreadHeaderView']=new Xt(_0x54b277,_0x2705b5),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x54b277,N(_0x54b277,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x54b277,_0x2705b5,Object['assign']({'CommentView':this['_config']['CommentView']},_0x225fb5)),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',(_0x4b933c,_0x1dd826)=>_0x4b933c||!!_0x1dd826),this['bind']('isUnlinked')['to'](_0x2705b5,'unlinkedAt',_0x2bbc7b=>!!_0x2bbc7b),this['bind']('ariaLabel')['to'](this,'length',_0x49ad7a=>{const _0x9f9537=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x49ad7a,_0x9f9537]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['focusCycler']=new _0x140f1f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x356ad7=>_0x356ad7['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x21e3fd=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x48f60a=_0x21e3fd['commentInputView'];return _0x21e3fd['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x48f60a,'value',(_0x2c1a97,_0x1b4dd2,_0x44448c,_0x171611,_0x161c98)=>!!_0x161c98||!!_0x171611&&_0x44448c&&!_0x1b4dd2||_0x2c1a97&&_0x44448c&&!_0x1b4dd2),_0x48f60a['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5d3337,_0x4174bc,_0x4d3357)=>{let _0x1b215d;return _0x1b215d=_0x4d3357&&_0x4174bc?'Reply\x20to\x20reopen\x20discussion...':_0x5d3337?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x1b215d);}),_0x48f60a['bind']('submitLabel')['to'](this,'length',_0x40baca=>N(this['locale'],_0x40baca?'Reply':'Comment')),_0x48f60a['on']('submit',(_0x2c77b1,_0xa60ad6)=>{this['fire']('addComment',_0xa60ad6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x48f60a['on']('cancel',()=>{this['focus']();}),_0x48f60a['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x48f60a['on']('cancel',_0x86753a=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x86753a['stop']());}),this['on']('change:isActive',(_0x59ea1d,_0x11da3f,_0x12bd8a)=>{_0x12bd8a||this['length']||_0x48f60a['value']||this['fire']('removeCommentThread');}),_0x21e3fd;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x40ae74,_0x50e3d,_0x38a291,_0x558856){super(_0x40ae74,_0x50e3d,_0x38a291,_0x558856),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x40ae74,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x330c17,_0x341fbd,_0x201b9b)=>{_0x201b9b||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x308a97,_0x89e4f,_0x2f80d8)=>{_0x2f80d8&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x34d771=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x34d771['if']('isActive','ck-thread--active'),_0x34d771['if']('isUnlinked','ck-thread--unlinked'),_0x34d771['to']('actionIndicator',_0x54d1e8=>_0x54d1e8?'ck-thread--'+_0x54d1e8:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x34d771['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 _0x31b5c6 of this['commentsListView']['commentViews'])_0x31b5c6['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x648028}=this,_0x3007ba=this['commentsListView']['commentViews']['get'](0x0);_0x3007ba===this['_boundFirstCommentView']||_0x3007ba['isSystemComment']||(this['_boundFirstCommentView']=_0x3007ba,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3007ba,'actionIndicator',_0x400930=>'remove'===_0x400930?'remove':null),_0x3007ba['placeholder']=N(_0x648028,'Write\x20a\x20comment...'),_0x3007ba['removeButton']['on']('execute',_0x7183d5=>{_0x7183d5['stop'](),this['showConfirm'](N(_0x648028,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3007ba['focus']();}),_0x3007ba['actionBar']['add'](this['resolveButton'],0x0),_0x3007ba['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2d4084=new _0x188cb3(this['locale']);return _0x2d4084['label']=N(this['locale'],'Resolve'),_0x2d4084['tooltip']=N(this['locale'],'Resolve'),_0x2d4084['icon']=_0x2a328a,_0x2d4084['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2d4084['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x415828=>!_0x415828),_0x2d4084['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xea1c2b,_0x558482)=>_0xea1c2b&&!_0x558482),_0x2d4084['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2d4084;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0xd808c1){super(_0xd808c1),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1bc05d,_0x427bf7,_0x5f100c)=>{this['element']['innerHTML']=_0x5f100c;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x57563c,_0x3ae401,_0x3fb87c){super(_0x57563c),this['_model']=_0x3ae401,this['_config']=_0x3fb87c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x3ae401,'content',_0x3ae401,'authoredAt',(_0x53a348,_0x1d4ba0)=>N(_0x57563c,'COMMENT_ARIA_LABEL',[_0x3ae401['author']['name'],_0x3fb87c['formatDateTime'](_0x1d4ba0),new DOMParser()['parseFromString'](_0x53a348,'text/html')['body']['textContent'],_0x3ae401['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x57563c,N(_0x57563c,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x577399(),this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['focusCycler']=new _0x140f1f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1a8b3d=>_0x1a8b3d['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x3063f2=new is(this['locale']);return _0x3063f2['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x3b8e17,_0x1ef626)=>_0x1ef626?ts(_0x3b8e17,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x3b8e17),_0x3063f2;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5387b2=new es(this['locale'],this['_config']['editorConfig']);return _0x5387b2['value']=this['_model']['content'],_0x5387b2['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5387b2['submitLabel']=N(this['locale'],'Save'),_0x5387b2['on']('submit',(_0x104525,_0x54d33d)=>{this['fire']('updateComment',this['_model']['id'],_0x54d33d),this['switchToDisplayMode'](),this['focus']();}),_0x5387b2['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5387b2['once']('editorReady',()=>{_0x5387b2['focus']();}),_0x5387b2['createEditor'](),_0x5387b2['delegate']('editorReady')['to'](this),_0x5387b2['delegate']('editorDestroyed')['to'](this),_0x5387b2;}['_setupKeyboardNavigation'](){const _0x5e7a2b=this['element'];this['keystrokes']['listenTo'](_0x5e7a2b);for(const _0x38dd59 of this['focusables'])this['focusTracker']['add'](_0x38dd59['element']),this['keystrokes']['listenTo'](_0x38dd59['element']);this['focusables']['on']('change',(_0x57c64f,_0x103357)=>{for(const _0x3749ee of _0x103357['removed'])this['focusTracker']['remove'](_0x3749ee['element']),this['keystrokes']['stopListening'](_0x3749ee['element']);for(const _0x578dcc of _0x103357['added'])this['focusTracker']['add'](_0x578dcc['element']),this['keystrokes']['listenTo'](_0x578dcc['element']);}),this['keystrokes']['set']('enter',(_0x389905,_0x493482)=>{_0x5e7a2b===_0x389905['target']&&(this['focusCycler']['focusFirst'](),_0x493482());}),this['keystrokes']['set']('esc',(_0x51809c,_0xed9c8e)=>{_0x5e7a2b!==_0x51809c['target']&&(this['focus'](),_0xed9c8e());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(di){['actionBar'];['userView'];constructor(_0x4d7379,_0x49c673,_0x1a2f64){super(_0x4d7379,_0x49c673,_0x1a2f64),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x4d7379,'Reply...')),this['bind']('authoredAt')['to'](_0x49c673),this['bind']('resolvedAt')['to'](_0x49c673),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 _0x193858(_0x4d7379,_0x49c673['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x49c673,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1b5272=this['bindTemplate'],_0x48068a=[{'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':_0x1b5272['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1b5272['to']('authoredAt',_0x4f024e=>this['_config']['formatDateTime'](_0x4f024e))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1b5272['if']('isEditMode','ck-comment__actions--hidden'),_0x1b5272['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']&&_0x48068a['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x1b5272['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1b5272['if']('isEditMode','ck-comment--edit'),_0x1b5272['if']('isSystemComment','ck-comment--info'),_0x1b5272['to']('actionIndicator',_0x19d792=>_0x19d792?'ck-comment--'+_0x19d792:'')],'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':_0x48068a}]}]};}['_createEditButton'](){const _0xf4fe27=new _0x47a354(this['locale']);return _0xf4fe27['label']=N(this['locale'],'Edit'),_0xf4fe27['icon']=_0x5939de,_0xf4fe27['withText']=!0x0,_0xf4fe27['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xf4fe27['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x55e0a1=>!_0x55e0a1),_0xf4fe27['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xf4fe27['on']('execute',()=>this['switchToEditMode']()),_0xf4fe27;}['_createRemoveButton'](){const _0x31516f=new _0x47a354(this['locale']);return _0x31516f['label']=N(this['locale'],'Remove'),_0x31516f['icon']=_0x92b88,_0x31516f['withText']=!0x0,_0x31516f['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x31516f['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xf033ae=>!_0xf033ae),_0x31516f['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x31516f['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x31516f;}['_createDropdown'](){const _0x535109=_0x3deee8(this['locale'],_0x539736),_0x7dcfcd=_0x535109['panelView']['children'],_0x433d3f=new _0x5ca25c(this['locale']),_0x88c7ed=_0x535109['bindTemplate'];_0x1518f9(_0x535109,()=>this['items']['find'](_0x44d54c=>_0x44d54c['isVisible'])),_0x535109['extendTemplate']({'attributes':{'class':[_0x88c7ed['if']('isVisible','ck-hidden',_0xe60691=>!_0xe60691)]}});const _0x4b1e0b=(_0x5acd43,_0x38479b=-0x1)=>{const _0x3ea0bd=new _0x365663(this['locale']);_0x3ea0bd['children']['add'](_0x5acd43);const _0x55f01f=_0x38479b>-0x1?_0x38479b:_0x433d3f['items']['length'];_0x433d3f['items']['add'](_0x3ea0bd,_0x55f01f);const _0x16e998=Array['from'](this['items']);_0x535109['unbind']('isEnabled','isVisible'),_0x535109['bind']('isEnabled')['toMany'](_0x16e998,'isEnabled',(..._0x51a35c)=>_0x51a35c['some'](_0x3214ad=>_0x3214ad)),_0x535109['bind']('isVisible')['toMany'](_0x16e998,'isVisible',(..._0x5390b0)=>_0x5390b0['some'](_0x9fac88=>_0x9fac88));};_0x535109['panelPosition']='sw',_0x535109['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x44b678});for(const _0x27dad0 of this['items'])_0x4b1e0b(_0x27dad0);return _0x7dcfcd['add'](_0x433d3f),_0x535109['listenTo'](this['items'],'add',(_0x6ac6d0,_0x550cd2,_0xc88233)=>{_0x4b1e0b(_0x550cd2,_0xc88233);}),_0x535109['listenTo'](this['items'],'remove',(_0x5508d7,_0x135aaa,_0x596809)=>{_0x433d3f['items']['remove'](_0x596809);}),_0x535109;}['_attachActions'](_0x18dd8e,_0x5e77a4){const _0x48482f=_0x18dd8e&&_0x18dd8e['element'];_0x48482f&&(this['listenTo'](_0x48482f,'mouseenter',()=>this['actionIndicator']=_0x5e77a4),this['listenTo'](_0x48482f,'focus',()=>this['actionIndicator']=_0x5e77a4),this['listenTo'](_0x48482f,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x48482f,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x46a7ef=super['_createCommentInputView']();return _0x46a7ef['bind']('placeholder')['to'](this),_0x46a7ef;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x2ee6d5){const _0x1bf762=Dt(_0x2ee6d5,0x1e),_0x19f99d=new MutationObserver(_0x1ed9e4=>{for(const _0x572cee of _0x1ed9e4)('attributes'==_0x572cee['type']&&'class'==_0x572cee['attributeName']||'childList'==_0x572cee['type']||'characterData'==_0x572cee['type'])&&_0x1bf762();});return{'attach'(_0x448b45){_0x19f99d['observe'](_0x448b45,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x19f99d['disconnect'](),_0x1bf762['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x117a1e,_0x52f251){super(_0x117a1e),this['id']=_0x4c5e37(),this['focusTracker']=new _0x5f5319(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x200bf5,_0x24b16f)=>this['fire']('Esc',_0x24b16f)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x52f251),this['mainView']=_0x52f251;const _0x178025=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x178025['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 _0x1098c5=this['element']['clientHeight'];_0x1098c5&&(this['height']=_0x1098c5);}}class T extends/* #__PURE__ -- @preserve */
29
+ _0x41c8cb(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x26e44a,target:_0x235b72,type:_0x3f76fa,isVisible:_0x53b625=!0x0}){super(),this['view']=_0x26e44a,this['view']['element']||this['view']['render'](),this['_type']=_0x3f76fa,this['_target']=_0x235b72,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x139e96([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x56b5ba,_0x943a83)=>{this['view']['focusTracker']['add'](_0x943a83);}),this['focusableElements']['on']('remove',(_0x2e2dbc,_0x528803)=>{this['view']['focusTracker']['remove'](_0x528803);}),this['set']('isVisible',_0x53b625);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3d1708=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x3d1708),_0x3d1708;}get['targetRect'](){const _0x5b0d29=this['target'];if(null===_0x5b0d29)return null;if(_0x5b0d29 instanceof _0x3f14b6)return _0x5b0d29;const _0x194a5f=_0x5b0d29['filter'](_0x305ed7=>function(_0x186e1f){const _0x3ae0a6=_0x186e1f['offsetParent'];if(_0x3ae0a6)return!0x0;const _0x1b39eb=_0x186e1f['getClientRects']()['item'](0x0);return!!_0x1b39eb;}(_0x305ed7));return 0x0===_0x194a5f['length']?null:new _0x3f14b6(_0x194a5f[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5271b4){this['view']['isActive']=_0x5271b4,this['view']['mainView']['isActive']=_0x5271b4;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x2d3153){if(!(null===_0x2d3153||_0x2d3153 instanceof _0x3f14b6||Array['isArray'](_0x2d3153)&&_0x2d3153['every'](_0x5f575a=>fi(_0x5f575a))))throw new _0x266f92('annotation-invalid-target',null,{'target':_0x2d3153});}['_getNormalizedTarget'](){const _0x56af1b='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x56af1b)?[_0x56af1b]:_0x56af1b;}}function fi(_0x4ba54e){return null!==_0x4ba54e&&'object'==typeof _0x4ba54e&&'nodeType'in _0x4ba54e&&0x1===_0x4ba54e['nodeType'];}class S extends _0x139e96{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x9890f7=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5f5319(),this['_focusTracker']['on']('change:isFocused',(_0x30bd59,_0x594026,_0x5af28a)=>{_0x5af28a||this['fire']('blur');});for(const _0x5de883 of _0x9890f7)this['add'](_0x5de883);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3e24a9){if(this['has'](_0x3e24a9))throw new _0x266f92('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3e24a9['innerView'],_0x3e24a9),this['_viewToAnnotation']['set'](_0x3e24a9['view'],_0x3e24a9);for(const _0x4c2cca of _0x3e24a9['focusableElements'])this['_focusTracker']['add'](_0x4c2cca);this['listenTo'](_0x3e24a9['focusableElements'],'add',(_0x3ac30b,_0x1a8a90)=>{this['_focusTracker']['add'](_0x1a8a90);}),this['listenTo'](_0x3e24a9['focusableElements'],'remove',(_0x1db501,_0x121890)=>{this['_focusTracker']['remove'](_0x121890);}),this['listenTo'](_0x3e24a9['view']['focusTracker'],'change:isFocused',(_0x435344,_0x4eb7e8,_0x53eabb)=>{_0x53eabb&&this['fire']('focus',_0x3e24a9);}),_0x3e24a9['updateTargetRect']();const _0x5554f2=this['_getOrderInContent'](_0x3e24a9['view']['targetRect']);return super['add'](_0x3e24a9,_0x5554f2);}['remove'](_0x23f535){if(!this['has'](_0x23f535))throw new _0x266f92('annotationcollection-not-existing-item',null);this['stopListening'](_0x23f535['view']['focusTracker']),this['stopListening'](_0x23f535['focusableElements']);for(const _0x2909ca of _0x23f535['focusableElements'])this['_focusTracker']['remove'](_0x2909ca);return this['_viewToAnnotation']['delete'](_0x23f535['view']),this['_innerViewToAnnotation']['delete'](_0x23f535['innerView']),super['remove'](_0x23f535);}['getByInnerView'](_0x3877e6){return this['_innerViewToAnnotation']['get'](_0x3877e6);}['getByView'](_0x1cee72){return this['_viewToAnnotation']['get'](_0x1cee72);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x10fdb0 of this)_0x10fdb0['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1b969a=Array['from'](this)['sort']((_0x162dd9,_0x305661)=>w(_0x162dd9['view']['targetRect'],_0x305661['view']['targetRect']));for(let _0x224b0f=_0x1b969a['length']-0x1;_0x224b0f>0x0;_0x224b0f--){const _0x3cf51c=_0x1b969a[_0x224b0f];_0x224b0f!==this['getIndex'](_0x3cf51c)&&(this['remove'](_0x3cf51c),this['add'](_0x3cf51c));}}['_getOrderInContent'](_0x40eb1e){let _0x35c4e6=0x0;if(!_0x40eb1e)return this['length'];for(const _0x112845 of this){const _0x36abbf=_0x112845['view']['targetRect'];if(_0x36abbf){if(w(_0x40eb1e,_0x36abbf)<0x0)return _0x35c4e6;_0x35c4e6++;}}return _0x35c4e6;}}function v({source:_0x6f27d,target:_0x13cddc,filter:_0x3ee75c}){for(const _0x1e80b4 of _0x6f27d)_0x3ee75c(_0x1e80b4)&&_0x13cddc['add'](_0x1e80b4);_0x13cddc['listenTo'](_0x6f27d,'add',(_0x1bdede,_0x360a17)=>{_0x3ee75c(_0x360a17)&&_0x13cddc['add'](_0x360a17);}),_0x13cddc['listenTo'](_0x6f27d,'remove',(_0x5ee66e,_0x948477)=>{_0x13cddc['has'](_0x948477)&&_0x13cddc['remove'](_0x948477);});}function w(_0x2c340e,_0x416a54){if(null===_0x2c340e&&null===_0x416a54)return 0x0;if(null===_0x2c340e)return-0x1;if(null===_0x416a54)return 0x1;const _0xa8b561=_0x2c340e['top']-_0x416a54['top'];return 0x0==_0xa8b561?_0x2c340e['left']-_0x416a54['left']:_0xa8b561;}class y extends _0x152fb7{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d4089){if(super(_0x1d4089),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1d4089 instanceof _0x1f8384){const _0xe0325a=_0x1d4089['locale'];_0x1d4089['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0xe0325a,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1d658b){this['collection']['add'](_0x1d658b);}['remove'](_0x495b04){this['collection']['remove'](_0x495b04),_0x495b04['destroy']();}['refreshVisibility'](){for(const _0x386924 of this['collection'])_0x386924['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x514cce){return this['collection']['getByInnerView'](_0x514cce);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x273d25 of this['collection'])_0x273d25['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x61a3cb){this['fire']('_activateAnnotation',_0x61a3cb);}['createAnnotation'](_0x1f55b3){return new T(_0x1f55b3);}['createAnnotationView'](_0x33209d,_0x4fd0ee){return new E(_0x33209d,_0x4fd0ee);}['_addActiveAnnotation'](_0xcbbd74){const _0x1cba97=new Set(this['activeAnnotations']);_0x1cba97['add'](_0xcbbd74),this['activeAnnotations']=_0x1cba97;}['_removeActiveAnnotation'](_0x5b7a5c){const _0x66b187=new Set(this['activeAnnotations']);_0x66b187['delete'](_0x5b7a5c),this['activeAnnotations']=_0x66b187;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3f3188=this['collection'],_0x4a705a=this['_visibleAnnotations'];function _0x169e85(_0x547d23){const _0x5c8f8b=_0x547d23['source'];_0x5c8f8b['isVisible']&&!_0x4a705a['has'](_0x5c8f8b)?_0x4a705a['add'](_0x5c8f8b):!_0x5c8f8b['isVisible']&&_0x4a705a['has'](_0x5c8f8b)&&_0x4a705a['remove'](_0x5c8f8b),_0x5c8f8b['view']['focusTracker']['remove'](_0x5c8f8b['view']['element']),_0x5c8f8b['view']['focusTracker']['add'](_0x5c8f8b['view']['element']);}this['listenTo'](_0x3f3188,'add',(_0x1ec58b,_0x445f20)=>{_0x445f20['isVisible']&&_0x4a705a['add'](_0x445f20),this['listenTo'](_0x445f20,'change:isVisible',_0x169e85);}),this['listenTo'](_0x3f3188,'remove',(_0x7c7076,_0x578846)=>{_0x4a705a['has'](_0x578846)&&_0x4a705a['remove'](_0x578846),this['stopListening'](_0x578846,'change:isVisible',_0x169e85);});}['_setupEnterAnnotationKeystroke'](){const _0x1b84ec=_0xee9c7d=>{_0xee9c7d['on']('ready',()=>{_0xee9c7d['keystrokes']['set'](_0x3b0de7,(_0x46ec73,_0x29a075)=>{const _0x41f3fd=_0x49bf05(this['activeAnnotations']['values']());_0x41f3fd&&(_0x41f3fd['view']['focus'](),_0x29a075());});});};this['context']instanceof _0x1f8384?_0x1b84ec(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x58554c,_0x50917f)=>{_0x1b84ec(_0x50917f);});}['_setupEscapeAnnotationHandling'](){const _0x36e238=_0x303133=>{const _0x394015=_0x303133['source'],_0x24ed0a=[];let _0xa0d7c7;if(Array['isArray'](_0x394015['target'])){_0xa0d7c7=_0x394015['target'][0x0],this['context']instanceof _0x1f8384?_0x24ed0a['push'](this['context']):this['context']['editors']&&_0x24ed0a['push'](...this['context']['editors']);for(const _0x501be8 of _0x24ed0a)for(const _0x14f96e of _0x501be8['editing']['view']['domRoots']['values']())if(_0x14f96e['contains'](_0xa0d7c7))return void _0x501be8['editing']['view']['focus']();_0xa0d7c7['focus']();}};this['listenTo'](this['collection'],'add',(_0x2d2a6e,_0x42a7d8)=>{this['listenTo'](_0x42a7d8,'escape',_0x36e238,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x25b4bd,_0x5740b9)=>{this['stopListening'](_0x5740b9,'escape',_0x36e238);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x152fb7{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x45a819){super(_0x45a819),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1afdf2=this['context']['config'];_0x1afdf2['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1afdf2['define']('comments.maxThreadTotalWeight',0x1f4),_0x1afdf2['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1afdf2['define']('comments.CommentThreadView',gt),_0x1afdf2['define']('comments.CommentView',Tt),_0x1afdf2['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3b6858=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x26bed8,_0x358865)=>this['_addCommentThread'](_0x358865)),this['on']('submitCommentThread',(_0x3d5b8c,_0xca3659)=>this['_submitCommentThread'](_0xca3659)),this['on']('resolveCommentThread',(_0x98e652,_0x510851)=>this['_resolveCommentThread'](_0x510851)),this['on']('resolveCommentThread',(_0x3e5909,_0x4e7135)=>this['_updateActiveAnnotation'](_0x4e7135),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x10458a,_0x222265)=>this['_reopenCommentThread'](_0x222265)),this['on']('reopenCommentThread',(_0x562fd3,_0x2addf4)=>this['_updateActiveAnnotation'](_0x2addf4),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x14d8c6,_0x179bd6)=>this['_removeCommentThread'](_0x179bd6)),this['on']('updateCommentThread',(_0x163e98,_0x24705d)=>this['_updateCommentThread'](_0x24705d)),this['on']('updateCommentThread',(_0x5d217a,_0x394959)=>this['_updateActiveAnnotation'](_0x394959),{'priority':'lowest'}),this['on']('addComment',(_0x36b483,_0x3db42f)=>this['_addComment'](_0x3db42f)),this['on']('updateComment',(_0x44db19,_0x3879d3)=>this['_updateComment'](_0x3879d3)),this['on']('removeComment',(_0x2da261,_0x186a63)=>this['_removeComment'](_0x186a63)),this['on']('addComment',(_0x4ad97d,{threadId:_0x16c377,isFromAdapter:_0x160743})=>{if(_0x160743)return;const _0x180dc8=this['getCommentThread'](_0x16c377),_0x147fd7=_0x180dc8&&this['_threadToController']['get'](_0x180dc8);_0x147fd7&&_0x147fd7['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3b6858,'change:activeAnnotations',(_0x2838bb,_0x31fae9,_0x1d7e6c)=>{const _0x5a0b68=Array['from'](_0x1d7e6c)['map'](_0x4521cb=>this['_viewToController']['get'](_0x4521cb['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5a0b68?_0x5a0b68['model']:null;});}set['adapter'](_0x21050d){if(this['_adapter'])throw new _0x266f92('commentsrepository-adapter-already-set');this['_adapter']=_0x21050d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5dee48=_t,threadId:_0x30743f=_0x4c5e37(),comments:_0x1e216d=[],unlinkedAt:_0x20ecef=null,resolvedAt:_0x1aa1e0=null,resolvedBy:_0x6b63f6=null,target:_0x462fb8=null,context:_0x501e16=null,attributes:_0x406d2c={},isResolvable:_0x5387f6=!0x0,isSubmitted:_0x38d16c=!0x1,isFromAdapter:_0xb222a5=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x5dee48),{'channelId':_0x5dee48,'threadId':_0x30743f,'comments':_0x1e216d,'unlinkedAt':_0x20ecef,'resolvedAt':_0x1aa1e0,'resolvedBy':_0x6b63f6,'target':_0x462fb8,'context':_0x501e16,'attributes':_0x406d2c,'isFromAdapter':_0xb222a5,'isResolvable':_0x5387f6,'isSubmitted':_0x38d16c}),this['getCommentThread'](_0x30743f);}['openNewCommentThread']({channelId:_0x415aec=_t,threadId:_0x504516=_0x4c5e37(),target:_0x2dd969,context:_0x1af586=null,isResolvable:_0x39d693=!0x0}){if(this['_readOnlyChannels']['has'](_0x415aec)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2dd969)throw new _0x266f92('commentsrepository-missing-target');const _0x1036d3=this['addCommentThread']({'channelId':_0x415aec,'threadId':_0x504516,'target':_0x2dd969,'context':_0x1af586,'isResolvable':_0x39d693});if(!_0x1036d3)return null;const _0x1e2098=this['_threadToController']['get'](_0x1036d3),_0x2ede26=_0x1e2098['view']['commentThreadInputView']['commentInputView'],_0x34858b=this['context']['plugins']['get'](y),_0x59f928=_0x34858b['getByInnerView'](_0x1e2098['view']);return _0x34858b['activate'](_0x59f928),_0x2ede26['once']('editorReady',()=>_0x2ede26['focus']()),_0x1036d3;}['hasCommentThread'](_0x46faf5){if('string'!=typeof _0x46faf5)throw new _0x266f92('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x46faf5);}['updateCommentThread']({channelId:_0x2b9a48=_t,threadId:_0xbb1bfc,context:_0x2ae7b5,unlinkedAt:_0x6e375b,attributes:_0x10298c,isFromAdapter:_0x5c4fc3=!0x1}){return this['fire'](Nt('updateCommentThread',_0x2b9a48),{'channelId':_0x2b9a48,'threadId':_0xbb1bfc,'context':_0x2ae7b5,'unlinkedAt':_0x6e375b,'attributes':_0x10298c,'isFromAdapter':_0x5c4fc3}),this['getCommentThread'](_0xbb1bfc);}['getCommentThread'](_0x41b4ec){if('string'!=typeof _0x41b4ec)throw new _0x266f92('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x41b4ec);}['fetchCommentThread']({channelId:_0x5d5f38,threadId:_0x57a1b1}={}){const _0x2d42b6=this['getCommentThread'](_0x57a1b1);if(_0x2d42b6)return Promise['resolve'](_0x2d42b6);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x266f92('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5d5f38,'threadId':_0x57a1b1})['then'](_0x5f4e64=>this['hasCommentThread'](_0x57a1b1)?this['getCommentThread'](_0x57a1b1):_0x5f4e64?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5d5f38},_0x5f4e64)):void 0x0)['catch'](_0x37437d=>{throw console['error'](_0x37437d),new _0x266f92('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x289e1d,skipNotAttached:_0x3b54ad=!0x1,skipEmpty:_0x4cd618=!0x1,toJSON:_0x4d1f4b=!0x1}={}){const _0x432217=[];for(const _0x292905 of this['_threads']['values']())_0x289e1d&&_0x292905['channelId']!==_0x289e1d||_0x3b54ad&&!_0x292905['isAttached']||_0x4cd618&&0x0===_0x292905['length']||_0x432217['push'](_0x292905);return _0x4d1f4b?_0x432217['map'](_0x43868e=>_0x43868e['toJSON']()):_0x432217;}['getAnnotationForCommentThread'](_0x5c2b64){const _0x1f3f5c=this['_threadToController']['get'](_0x5c2b64);if(!_0x1f3f5c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x1f3f5c['view'])||null;}['getCommentThreadForAnnotation'](_0x76df22){const _0x46aaf2=this['_viewToController']['get'](_0x76df22['innerView']);return _0x46aaf2?_0x46aaf2['model']:null;}['setActiveCommentThread'](_0x478fd3){const _0x47c65d=this['context']['plugins']['get'](y);if(!_0x478fd3)return void(this['activeCommentThread']&&_0x47c65d['deactivateAll']());const _0x4dd6a1=this['getCommentThread'](_0x478fd3);if(!_0x4dd6a1)throw new _0x266f92('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x478fd3});if(!this['_threadToController']['has'](_0x4dd6a1))throw new _0x266f92('commentsrepository-active-not-attached',null,{'threadId':_0x478fd3});const _0x1d5574=_0x47c65d['getByInnerView'](this['_threadToController']['get'](_0x4dd6a1)['view']);_0x47c65d['activate'](_0x1d5574);}['switchReadOnly'](_0x579e2d,_0x385760){_0x579e2d?this['_readOnlyChannels']['add'](_0x385760):this['_readOnlyChannels']['delete'](_0x385760),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x420004){return this['_readOnlyChannels']['has'](_0x420004)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x32d6be,_0xb24d2b){return new vt(_0x32d6be,_0xb24d2b);}['setPermissions'](_0x3f786d,_0x2481e7=_t){this['_permissions']['set'](_0x2481e7,_0x3f786d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5b9a43=_t){return this['_permissions']['has'](_0x5b9a43)?this['_permissions']['get'](_0x5b9a43):bt;}['_addCommentThread']({channelId:_0x283e10,threadId:_0x3985f0,comments:_0x327482,unlinkedAt:_0x5d6eae,resolvedAt:_0x57f75a,resolvedBy:_0x3c1442,target:_0x5aea21,context:_0x568af2,attributes:_0x4e61d4,isFromAdapter:_0x3cbaea,isResolvable:_0x24598e,isSubmitted:_0x197be6}){if('string'!=typeof _0x3985f0)throw new _0x266f92('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3985f0});if(this['hasCommentThread'](_0x3985f0))throw new _0x266f92('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3985f0});const _0xef0aa4=new pi(this,{'channelId':_0x283e10,'id':_0x3985f0,'context':_0x568af2,'attributes':_0x4e61d4,'unlinkedAt':_0x5d6eae,'resolvedAt':_0x57f75a,'resolvedBy':_0x3c1442?this['context']['plugins']['get'](it)['getUser'](_0x3c1442):null,'isResolvable':_0x24598e,'isSubmitted':_0x197be6||_0x3cbaea});this['_threads']['set'](_0x3985f0,_0xef0aa4);for(const _0x146615 of _0x327482)_0xef0aa4['_add'](this['_createNewComment']({'threadId':_0x3985f0,..._0x146615}));return _0x5aea21&&_0xef0aa4['attachTo'](_0x5aea21),_0x3cbaea||!_0xef0aa4['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x283e10,'threadId':_0x3985f0});}['_submitCommentThread']({channelId:_0x288f59,threadId:_0x44e7ff}){if(!this['hasCommentThread'](_0x44e7ff))throw new _0x266f92('commentsrepository-missing-comment-thread',this);const _0x2ec2aa=this['getCommentThread'](_0x44e7ff);if(_0x2ec2aa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x19ae11,comments:_0x306d74,resolvedAt:_0x318d40,resolvedBy:_0xcbdda4,context:_0x21efa0,attributes:_0x5691eb}=_0x2ec2aa,_0x1e6486=this['context']['plugins']['get']('PendingActions'),_0x59fd79=_0x1e6486['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x288f59,'threadId':_0x19ae11,'comments':_0x306d74['map'](_0x4b5426=>_0x4b5426['toJSON']()),'resolvedAt':_0x318d40,'resolvedBy':_0xcbdda4?_0xcbdda4['id']:_0xcbdda4,'context':_0x21efa0,'attributes':_0x5691eb})['then'](({comments:_0x886b3b})=>{_0x1e6486['remove'](_0x59fd79);for(const _0x37b7e9 of _0x886b3b)this['_updateComment']({'channelId':_0x288f59,'threadId':_0x44e7ff,'commentId':_0x37b7e9['commentId'],'createdAt':_0x37b7e9['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x278143=>{throw console['error'](_0x278143),new _0x266f92('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x13d471,target:_0x280d2b}){const _0x2fa642=this['getCommentThread'](_0x13d471);if(!_0x2fa642)throw new _0x266f92('commentsrepository-attach-missing-comment-thread',this);const _0x1ca8d1=this['context']['plugins']['get']('PendingActions'),_0x19e333=this['context']['plugins']['get'](y),_0x49cacc=this['_createCommentThreadView'](_0x2fa642),_0x20d4f6=new vt(_0x2fa642,_0x49cacc);let _0x5c31c6=null;_0x49cacc['on']('change:isDirty',(_0x22de24,_0xc8dc69,_0xc4638b)=>{_0xc4638b?_0x5c31c6=_0x1ca8d1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5c31c6&&(_0x1ca8d1['remove'](_0x5c31c6),_0x5c31c6=null);}),this['_threadToController']['set'](_0x2fa642,_0x20d4f6),this['_viewToController']['set'](_0x49cacc,_0x20d4f6);const _0x11d77f=new E(this['context']['locale'],_0x49cacc);_0x11d77f['bind']('length')['to'](_0x49cacc),_0x11d77f['bind']('isDirty')['to'](_0x49cacc,'isDirty',_0x49cacc,'length',(_0x51ce5e,_0x15267f)=>_0x51ce5e||!_0x15267f),_0x11d77f['bind']('isActive')['to'](_0x49cacc),_0x11d77f['type']='comment';const _0xb8208=new T({'view':_0x11d77f,'target':_0x280d2b,'type':'comment','isVisible':!_0x2fa642['archivedAt']&&!!('function'==typeof _0x280d2b?_0x280d2b():_0x280d2b)});return _0x49cacc['on']('escape',()=>{_0xb8208['fire']('escape');}),this['_bindAnnotationToEditors'](_0x49cacc,_0xb8208),_0x19e333['add'](_0xb8208),_0xb8208;}['_bindAnnotationToEditors'](_0x5c4f18,_0x67191){this['listenTo'](_0x5c4f18,'editorReady',(_0x1421bc,_0xf5a1a4)=>{const _0x16c8b7=_0xf5a1a4['ui']['view']['body']['bodyCollectionContainer'];_0x67191['focusableElements']['add'](_0x16c8b7),this['context']instanceof _0x1f8384&&this['context']['ui']['focusTracker']['add'](_0x16c8b7);},{'priority':'highest'}),this['listenTo'](_0x5c4f18,'editorDestroyed',(_0x40229d,_0x6c60f)=>{const _0x2016f4=_0x6c60f['ui']['view']['body']['bodyCollectionContainer'];_0x67191['focusableElements']['has'](_0x2016f4)&&_0x67191['focusableElements']['remove'](_0x2016f4),this['context']instanceof _0x1f8384&&this['context']['ui']['focusTracker']['remove'](_0x2016f4);});}['_unbindEditors'](_0x455496){this['stopListening'](_0x455496,'editorReady'),this['stopListening'](_0x455496,'editorDestroyed');}['_createCommentThreadView'](_0x2d52df){const _0x5235b0=this['context']['plugins']['get'](it),{config:_0xc032d,locale:_0x4da7ed}=this['context'],_0x2361de=pt(_0xc032d['get']('locale'),_0x4da7ed);return new(0x0,(_0xc032d['get']('comments'))['CommentThreadView'])(_0x4da7ed,_0x2d52df,_0x5235b0['me'],{'editorConfig':{..._0xc032d['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xc032d['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xc032d['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xc032d['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xc032d['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2361de,'CommentView':_0xc032d['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3ac328,channelId:_0x5a0482,resolvedAt:_0x2221eb,resolvedBy:_0x372a67,isFromAdapter:_0x20de7d}){if(!this['hasCommentThread'](_0x3ac328))throw new _0x266f92('commentsrepository-missing-comment-thread',null,{'threadId':_0x3ac328});const _0x30bf4a=this['getCommentThread'](_0x3ac328);if(_0x30bf4a['isResolved'])throw new _0x266f92('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3ac328});const _0x25e3f3=this['context']['plugins']['get'](it);if(_0x30bf4a['resolvedBy']=_0x25e3f3['getUser'](_0x372a67),_0x30bf4a['resolvedAt']=_0x2221eb,_0x20de7d||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x255913=this['context']['plugins']['get']('PendingActions'),_0x1410b1=_0x255913['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x5a0482,'threadId':_0x3ac328})['then'](({resolvedAt:_0x40b8a3,resolvedBy:_0x1e0d03})=>{_0x255913['remove'](_0x1410b1),_0x30bf4a['resolvedBy']['id']!==_0x1e0d03&&(_0x30bf4a['resolvedBy']=_0x25e3f3['getUser'](_0x1e0d03)),_0x30bf4a['resolvedAt']=_0x40b8a3;})['catch'](_0x2bebe0=>{throw console['error'](_0x2bebe0),new _0x266f92('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3c184e,channelId:_0x4c0a49,isFromAdapter:_0x15ef49}){if(!this['hasCommentThread'](_0x3c184e))throw new _0x266f92('commentsrepository-missing-comment-thread',null,{'threadId':_0x3c184e});const _0x5372d6=this['getCommentThread'](_0x3c184e);if(!_0x5372d6['isResolved'])throw new _0x266f92('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3c184e});if(_0x5372d6['resolvedBy']=null,_0x5372d6['resolvedAt']=null,_0x15ef49||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x46aa3d=this['context']['plugins']['get']('PendingActions'),_0x2834a3=_0x46aa3d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4c0a49,'threadId':_0x3c184e})['then'](()=>_0x46aa3d['remove'](_0x2834a3))['catch'](_0x2c2360=>{throw console['error'](_0x2c2360),new _0x266f92('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5367bb,isFromAdapter:_0x1cd28a}){const _0x5b8ef7=this['getCommentThread'](_0x5367bb);if(!_0x5b8ef7)throw new _0x266f92('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5367bb),this['_threads']['delete'](_0x5367bb),!_0x5b8ef7['isSubmitted']||_0x1cd28a||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x457292=this['context']['plugins']['get']('PendingActions'),{channelId:_0x714ad6}=_0x5b8ef7,_0x54593a=_0x457292['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x714ad6,'threadId':_0x5367bb})['then'](()=>_0x457292['remove'](_0x54593a))['catch'](_0x2ef7b9=>{throw console['error'](_0x2ef7b9),new _0x266f92('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1f1b3f,unlinkedAt:_0x2849f6,context:_0x2cc1ec,attributes:_0x4ec564,isFromAdapter:_0x3671dd}){if('string'!=typeof _0x1f1b3f)throw new _0x266f92('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1f1b3f});if(!this['hasCommentThread'](_0x1f1b3f))throw new _0x266f92('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f1b3f});const _0x55b32d=this['getCommentThread'](_0x1f1b3f);let _0x1a868c=!0x1;if(void 0x0!==_0x2cc1ec&&_0x55b32d['context']!==_0x2cc1ec&&(_0x55b32d['context']=_0x2cc1ec,_0x1a868c=!0x0),void 0x0!==_0x2849f6&&_0x55b32d['unlinkedAt']!==_0x2849f6&&(_0x55b32d['unlinkedAt']=_0x2849f6,_0x1a868c=!0x0),_0x4ec564&&!At(_0x4ec564,_0x55b32d['attributes'])&&(_0x55b32d['attributes']=_0x4ec564,_0x1a868c=!0x0),!_0x1a868c)return Promise['resolve']();if(!_0x55b32d['isSubmitted']||_0x3671dd||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5df204=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd37b37}=_0x55b32d,_0x125d45=_0x5df204['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0xd37b37,'threadId':_0x1f1b3f,'context':_0x2cc1ec,'unlinkedAt':_0x2849f6,'attributes':_0x4ec564})['then'](()=>_0x5df204['remove'](_0x125d45))['catch'](_0x5ba4df=>{throw console['error'](_0x5ba4df),new _0x266f92('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x45d827){const _0x328fda=this['context']['plugins']['get'](y),_0x28411e=this['getCommentThread'](_0x45d827);if(_0x28411e['_isAttached']=!0x1,this['_threadToController']['has'](_0x28411e)){const _0x4386d1=this['_threadToController']['get'](_0x28411e),_0x33bee4=_0x4386d1['view'],_0x4b2804=_0x328fda['getByInnerView'](_0x33bee4);this['_threadToController']['delete'](_0x28411e),this['_viewToController']['delete'](_0x33bee4),_0x4b2804&&_0x328fda['remove'](_0x4b2804),_0x4386d1['destroy'](),_0x33bee4['destroy']()['then'](()=>{this['_unbindEditors'](_0x33bee4);});}}['_updateActiveAnnotation']({threadId:_0x28ed8e,resolvedAt:_0x6bbe5e,unlinkedAt:_0x30f530}){const _0x44de3e=!!_0x6bbe5e,_0x6ef0a9=this['context']['plugins']['get'](y),_0x4d148a=this['getCommentThread'](_0x28ed8e);if(this['_threadToController']['has'](_0x4d148a)){const _0x2e3e08=this['_threadToController']['get'](_0x4d148a)['view'],_0x42f331=_0x6ef0a9['getByInnerView'](_0x2e3e08);_0x42f331&&(_0x44de3e&&_0x6ef0a9['_removeActiveAnnotation'](_0x42f331),_0x30f530?_0x42f331['isVisible']=!0x1:_0x42f331['refreshVisibility']());}}['_getExternalAuthor'](_0x536535){const _0x1ceabf=this['context']['plugins']['get'](it),_0x4c6005=It('external:'+_0x536535),_0x152f1d=_0x1ceabf['getUser'](_0x4c6005);return _0x152f1d||_0x1ceabf['addUser']({'id':_0x4c6005,'name':_0x536535});}['_createNewComment']({threadId:_0x3cba43,commentId:_0x1dbe6d=_0x4c5e37(),content:_0x5337af,authorId:_0x844a4f,createdAt:_0x410d07,attributes:_0x3594b7}){if('string'!=typeof _0x1dbe6d)throw new _0x266f92('commentsrepository-invalid-commentid');if('string'!=typeof _0x844a4f)throw new _0x266f92('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5337af||!_0x5337af['trim']())throw new _0x266f92('commentsrepository-invalid-comment-content');const _0x315394=this['context']['plugins']['get'](it)['getUser'](_0x844a4f);if(!_0x315394)throw new _0x266f92('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x844a4f});let _0x27aee9=null,_0x477470=_0x410d07;return _0x3594b7?.['@external']&&(_0x27aee9=this['_getExternalAuthor'](_0x3594b7['@external']['authorName']),_0x477470=new Date(_0x3594b7['@external']['createdAt'])),new wi(this,{'threadId':_0x3cba43,'id':_0x1dbe6d,'author':_0x27aee9||_0x315394,'creator':_0x315394,'content':_0x5337af,'createdAt':_0x410d07,'authoredAt':_0x477470,'attributes':_0x3594b7});}['_addComment'](_0x232ccf){let {threadId:_0x11131d,content:_0x11f64c,attributes:_0x22c7a1,isFromAdapter:_0xbcfbb4}=_0x232ccf;const _0x37166e=this['getCommentThread'](_0x232ccf['threadId']);if(!_0x37166e)throw new _0x266f92('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5ea40c=this['_createNewComment'](_0x232ccf),{id:_0x179db0}=_0x5ea40c;if(_0x37166e['_add'](_0x5ea40c),_0xbcfbb4||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x37166e['isSubmitted'])return Promise['resolve']();const _0x931b1c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1cdc92}=_0x37166e,_0x671a2e=_0x931b1c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x22c7a1||(_0x22c7a1={}),this['adapter']['addComment']({'channelId':_0x1cdc92,'threadId':_0x11131d,'commentId':_0x179db0,'content':_0x11f64c,'attributes':_0x22c7a1})['then'](_0x570ddd=>{_0x931b1c['remove'](_0x671a2e),_0x570ddd&&this['_updateComment']({'channelId':_0x1cdc92,'threadId':_0x11131d,'commentId':_0x179db0,'createdAt':_0x570ddd['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x345e9a=>{throw console['error'](_0x345e9a),new _0x266f92('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xd09fad,commentId:_0x5e7942,content:_0x3eb182,createdAt:_0x597b58,attributes:_0x309ba5,isFromAdapter:_0x910cc3}){if(void 0x0!==_0x3eb182&&('string'!=typeof _0x3eb182||!_0x3eb182['trim']()['length']))throw new _0x266f92('commentsrepository-update-comment-invalid-content');const _0x1f2197=this['getCommentThread'](_0xd09fad),_0x34afe5=_0x1f2197['getComment'](_0x5e7942);if(!_0x34afe5)throw new _0x266f92('commentsrepository-update-missing-comment',this);let _0x34468a=!0x1;if(_0x3eb182&&_0x3eb182!==_0x34afe5['content']&&(_0x34afe5['isEditable']||_0x910cc3)&&(_0x34afe5['content']=_0x3eb182,_0x34468a=!0x0),_0x597b58&&_0x597b58!==_0x34afe5['createdAt']&&(_0x34afe5['createdAt']=_0x597b58,_0x34afe5['attributes']&&_0x34afe5['attributes']['@external']||(_0x34afe5['authoredAt']=_0x597b58),_0x34468a=!0x0),_0x309ba5&&!At(_0x309ba5,_0x34afe5['attributes'])&&(_0x34afe5['attributes']=_0x309ba5,_0x34468a=!0x0),!_0x34468a)return Promise['resolve']();if(_0x1f2197['fire']('commentUpdated'),_0x910cc3||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x58e8f4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x532436}=this['getCommentThread'](_0x34afe5['threadId']),_0x2b6520=_0x58e8f4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x532436,'threadId':_0xd09fad,'commentId':_0x5e7942,'content':_0x3eb182,'attributes':_0x309ba5})['then'](()=>_0x58e8f4['remove'](_0x2b6520))['catch'](_0x214aa0=>{throw console['error'](_0x214aa0),new _0x266f92('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xa5a5e3,commentId:_0x5c95e1,isFromAdapter:_0x4111ab}){const _0x4fa818=this['getCommentThread'](_0xa5a5e3),_0x598d3a=_0x4fa818['getComment'](_0x5c95e1);if(!_0x598d3a)throw new _0x266f92('commentsrepository-remove-missing-comment',this);if(_0x4fa818['_remove'](_0x598d3a),_0x4111ab||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4c1f50=this['context']['plugins']['get']('PendingActions'),{channelId:_0x325ee6}=_0x4fa818,_0x177e94=_0x4c1f50['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x325ee6,'threadId':_0xa5a5e3,'commentId':_0x5c95e1})['then'](()=>_0x4c1f50['remove'](_0x177e94))['catch'](_0x46f143=>{throw console['error'](_0x46f143),new _0x266f92('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
+ _0x41c8cb(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x463732,_0x5b5307){super();const _0x4594c5=_0x5b5307['isResolvable'];this['channelId']=_0x5b5307['channelId'],this['id']=_0x5b5307['id'],this['comments']=new _0x139e96(),this['_repository']=_0x463732,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5b5307['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x463732,'_permissions',_0x463732,'_readOnlyChannels',()=>_0x463732['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x463732,'_permissions',()=>_0x463732['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x463732,'_permissions',()=>{const _0x248742=_0x463732['getPermissions'](this['channelId']);return _0x248742['write']||_0x248742['admin'];}),this['bind']('isResolvable')['to'](_0x463732,'_permissions',()=>_0x4594c5&&_0x463732['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5b5307['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5e4f37,_0x2b6d30)=>_0x5e4f37?_0x2b6d30?_0x5e4f37<_0x2b6d30?_0x5e4f37:_0x2b6d30:_0x5e4f37:_0x2b6d30),this['set']('unlinkedAt',_0x5b5307['unlinkedAt']||null),this['set']('resolvedAt',_0x5b5307['resolvedAt']||null),this['set']('resolvedBy',_0x5b5307['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x362260=>!!_0x362260),this['set']('attributes',_0x5b5307['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x2d1fe2,_0x563613)=>_0x2d1fe2+_0x563613['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xb0f67e,id:_0x4de3bf}=this;this['_repository']['fire'](Nt('submitCommentThread',_0xb0f67e),{'channelId':_0xb0f67e,'threadId':_0x4de3bf});}['setUnlinkedAt'](_0x1d5fc6){this['_update']({'unlinkedAt':_0x1d5fc6});}['resolve']({resolvedAt:_0x1f6396=new Date(),resolvedBy:_0xaf6cb3='',isFromAdapter:_0x18e17e=!0x1}={}){const _0x19ff08=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x4877e3,id:_0x5759cf}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4877e3),{'channelId':_0x4877e3,'threadId':_0x5759cf,'resolvedAt':_0x1f6396,'resolvedBy':_0xaf6cb3||_0x19ff08['id'],'isFromAdapter':_0x18e17e});}['reopen']({isFromAdapter:_0x2763de=!0x1}={}){const {channelId:_0x2eb75b,id:_0x475555}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2eb75b),{'channelId':_0x2eb75b,'threadId':_0x475555,'isFromAdapter':_0x2763de});}['setContext'](_0x5c8797){this['context']||this['_update']({'context':_0x5c8797});}['setAttribute'](_0x149c92,_0x32e73f){const _0x1916fc=wt(this['attributes']);yt(_0x1916fc,_0x149c92,_0x32e73f),this['_update']({'attributes':_0x1916fc});}['removeAttribute'](_0x45747e){const _0xa63b45=wt(this['attributes']);Ct(_0xa63b45,_0x45747e),this['_update']({'attributes':_0xa63b45});}['remove']({isFromAdapter:_0x2e1543=!0x1}={}){const {channelId:_0x4cf2d1,id:_0xc1d9a0}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x4cf2d1),{'channelId':_0x4cf2d1,'threadId':_0xc1d9a0,'isFromAdapter':_0x2e1543});}['attachTo'](_0x249330){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x249330});}['addComment'](_0xc03726){const {channelId:_0xfb6475,id:_0x1573ef}=this;this['_repository']['fire'](Nt('addComment',_0xfb6475,_0x1573ef),Object['assign']({'channelId':_0xfb6475,'threadId':_0x1573ef},_0xc03726));}['getComment'](_0x181dae){if('string'!=typeof _0x181dae)throw new _0x266f92('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x181dae});return this['comments']['get'](_0x181dae);}['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'](_0x2f7d49=>_0x2f7d49['toJSON']()),'attributes':this['attributes']};}['_add'](_0x5e7c20){return this['listenTo'](_0x5e7c20,'change:authoredAt',()=>{const _0x35c8ac=this['_findOptimalIndex'](_0x5e7c20),_0x22e75e=this['comments'];_0x35c8ac-0x1!=_0x22e75e['getIndex'](_0x5e7c20)&&_0x35c8ac+0x1!=_0x22e75e['getIndex'](_0x5e7c20)&&(this['_remove'](_0x5e7c20),this['_add'](_0x5e7c20));}),this['comments']['add'](_0x5e7c20,this['_findOptimalIndex'](_0x5e7c20));}['_update'](_0x93aa3){const {channelId:_0x21b026,id:_0x2058dd}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x21b026),{..._0x93aa3,'channelId':_0x21b026,'threadId':_0x2058dd});}['_remove'](_0x53df1a){return this['stopListening'](_0x53df1a),_0x53df1a['destroy'](),this['comments']['remove'](_0x53df1a);}['_findOptimalIndex'](_0x7034c1){const _0x32771c=this['comments']['find'](_0x4aeb3e=>new Date(_0x4aeb3e['authoredAt'])['getTime']()>new Date(_0x7034c1['authoredAt'])['getTime']());return _0x32771c?this['comments']['getIndex'](_0x32771c):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
+ _0x41c8cb(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x165742,_0x343b2f){super();const _0x6f28a4=_0x165742['context']['plugins']['get'](it)['me'],_0x385da6=_0x165742['getCommentThread'](_0x343b2f['threadId']),_0x4b1fc9=0x0===_0x385da6['comments']['length'],_0x39aa94=_0x6f28a4===_0x343b2f['author'];this['id']=_0x343b2f['id'],this['threadId']=_0x343b2f['threadId'],this['author']=_0x343b2f['author'],this['creator']=_0x343b2f['creator'],this['isExternal']=Boolean(_0x343b2f['attributes']&&_0x343b2f['attributes']['@external']),this['set']('content',_0x343b2f['content']),this['createdAt']=_0x343b2f['createdAt']||new Date(),this['set']('authoredAt',_0x343b2f['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x385da6,'resolvedAt'),this['set']('attributes',_0x343b2f['attributes']||{}),this['bind']('isEditable')['to'](_0x165742,'_permissions',()=>{const _0x58d095=_0x165742['getPermissions'](_0x385da6['channelId'])['write'],_0xd0f70a=_0x165742['getPermissions'](_0x385da6['channelId'])['modifyAll'];return _0x39aa94&&_0x58d095||!_0x39aa94&&_0xd0f70a;}),this['bind']('isRemovable')['to'](_0x385da6,'isRemovable',_0x165742,'_permissions',_0x128571=>{const _0xd25c19=_0x165742['getPermissions'](_0x385da6['channelId'])['write'],_0x1c27d4=_0x165742['getPermissions'](_0x385da6['channelId'])['modifyAll'];return _0x39aa94&&_0xd25c19||_0x128571&&_0x4b1fc9||!_0x39aa94&&_0x1c27d4&&!_0x4b1fc9;}),this['bind']('isReadOnly')['to'](_0x385da6,'isReadOnly'),this['_repository']=_0x165742;}get['weight'](){return Math['max'](function(_0x21f458){const _0x5166fe=document['createElement']('div');return _0x5166fe['innerHTML']=_0x21f458,_0x5166fe['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3023f1){const {threadId:_0x5e92ae,id:_0xebb2e1}=this;if(!this['_repository']['hasCommentThread'](_0x5e92ae))throw new _0x266f92('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4718bb}=this['_repository']['getCommentThread'](_0x5e92ae);this['_repository']['fire'](Nt('updateComment',_0x4718bb,_0x5e92ae),{'channelId':_0x4718bb,'threadId':_0x5e92ae,'commentId':_0xebb2e1,..._0x3023f1});}['setAttribute'](_0x490532,_0x486eb6){const _0x1054df=wt(this['attributes']);yt(_0x1054df,_0x490532,_0x486eb6),this['update']({'attributes':_0x1054df});}['removeAttribute'](_0x130208){const _0x236046=wt(this['attributes']);Ct(_0x236046,_0x130208),this['update']({'attributes':_0x236046});}['remove'](_0x5ba015={}){if(!_0x5ba015['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4739e5,id:_0x58a187}=this;if(!this['_repository']['hasCommentThread'](_0x4739e5))throw new _0x266f92('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4b0a9c}=this['_repository']['getCommentThread'](_0x4739e5);this['_repository']['fire'](Nt('removeComment',_0x4b0a9c,_0x4739e5),{'channelId':_0x4b0a9c,'threadId':_0x4739e5,'commentId':_0x58a187,..._0x5ba015});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0xb0d342,..._0x1845dc){for(const _0x448dcd of _0x1845dc)void 0x0!==_0x448dcd&&(_0xb0d342+=':'+String(_0x448dcd));return _0xb0d342;}class ot extends _0x39b56b{constructor(_0x2e4d4b){super(_0x2e4d4b),this['set']('hasContent',!0x1);}['refresh'](){const _0x48325c=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5c89b8 of _0x48325c['getRanges']())if(this['_hasContent'](_0x5c89b8))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x47600e=_0x4c5e37(),ranges:_0x336abb,comment:_0x1e5ec8}={}){const _0x1ed3dc=this['editor']['model'],_0x24c7a7=_0x336abb??Array['from'](_0x1ed3dc['document']['selection']['getRanges']()),_0x3feadc=[];for(const _0x5d2ab5 of _0x24c7a7)this['_hasContent'](_0x5d2ab5)&&_0x3feadc['push'](this['_trimToContent'](_0x5d2ab5));if(!_0x3feadc['length'])throw new _0x266f92('addcommentthreadcommand-incorrect-ranges',null);_0x1e5ec8&&this['_createCommentThread'](_0x47600e,_0x1e5ec8),this['_createMarkersFromRanges'](_0x47600e,_0x3feadc,!!_0x1e5ec8);}['_createMarkersFromRanges'](_0xe3ed2e,_0x2f1153,_0x86b529){this['editor']['model']['change'](_0x43b635=>{for(const _0x178666 of _0x2f1153){const _0x2c4eb6=_0x4c5e37()['substr'](0x1,0x5),_0x1b37c6='comment:'+_0xe3ed2e+':'+_0x2c4eb6;_0x43b635['addMarker'](_0x1b37c6,{'range':_0x178666,'usingOperation':_0x86b529,'affectsData':_0x86b529});}});}['_createCommentThread'](_0x33e6dc,_0x19df70){const _0x1d266d=this['editor']['plugins']['get']('CommentsRepository'),_0x2f8b40=this['editor']['config']['get']('collaboration.channelId'),_0x569b0a=this['editor']['plugins']['get']('Users')['me'];if(!_0x569b0a)throw new _0x266f92('addcommentthreadcommand-user-not-found',null);_0x1d266d['addCommentThread']({'threadId':_0x33e6dc,'channelId':_0x2f8b40,'comments':[{'authorId':_0x569b0a['id'],'content':_0x19df70,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x51153b){for(const _0x4ab971 of _0x51153b['getItems']())if(this['_itemIsContent'](_0x4ab971))return!0x0;return!0x1;}['_itemIsContent'](_0xba4120){return _0xba4120['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xba4120)&&!_0xba4120['is']('element','tableCell');}['_trimToContent'](_0x5305fe){const _0x3a3d6b=_0x3e2c34=>!this['_itemIsContent'](_0x3e2c34['item']),_0x279cc3=_0x5305fe['start']['getLastMatchingPosition'](_0x3a3d6b),_0xd97db5=_0x5305fe['end']['getLastMatchingPosition'](_0x3a3d6b,{'direction':'backward'});return this['editor']['model']['createRange'](_0x279cc3,_0xd97db5);}}class b extends _0x165a5f{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f6b2f){super(_0x4f6b2f),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x53a06e=this['editor'],_0x339cca=_0x53a06e['model']['document']['selection'],_0x361729=_0x3b904d(()=>this['refreshSelectedViews'](),0xa);_0x339cca['on']('change:range',(_0x3441c9,_0x32f185)=>{_0x32f185['directChange']&&(_0x361729['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x53a06e['editing']['view']['document'],'change:isFocused',(_0x67676b,_0x4068b1,_0x4d498e)=>{_0x4d498e&&_0x361729();}),this['listenTo'](_0x53a06e['ui']['focusTracker'],'change:isFocused',(_0x53cee6,_0x3334ce,_0x174eaa)=>{_0x174eaa||this['fire']('blur',{'isAnnotationTracked':_0x3ed08d=>this['_editorAnnotationsData']['has'](_0x3ed08d['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x455526){if(this['_editorAnnotations']['has'](_0x455526['view']))return;this['_editorAnnotations']['add'](_0x455526['view']),this['editor']['ui']['focusTracker']['add'](_0x455526['view']['element']);const _0x16d102=this['editor']['plugins']['get'](y);this['listenTo'](_0x16d102['collection'],'remove',(_0x1b5647,_0x212dd3)=>{this['editor']['ui']['focusTracker']['remove'](_0x212dd3['view']['element']),this['_editorAnnotations']['delete'](_0x212dd3['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x405134){if('function'!=typeof _0x405134)throw new _0x266f92('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x405134);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x54d19a,annotations:_0x282c3b}){const _0x28ffa6=[],_0xd15654=this['editor']['model']['document']['selection'],_0x3df471=Array['from'](_0xd15654['getRanges']());for(const [_0x47f9d1,_0x252682]of this['_editorAnnotationsData']){const _0xbb3600=_0x1c8d36(_0x252682),_0x323395=_0x282c3b['getByInnerView'](_0x47f9d1);_0xbb3600&&_0x323395&&_0x28ffa6['push']({'annotation':_0x323395,'range':_0xbb3600});}function _0x1c8d36(_0x5e5bb8){for(const _0x54e22f of _0x5e5bb8)for(const _0x19dfae of _0x3df471)if(_0x54e22f['containsRange'](_0x19dfae,!_0xd15654['isCollapsed']))return _0x54e22f;return null;}return _0x28ffa6['sort']((_0x5bc535,_0x3afb64)=>{const _0x404fbb=_0x5bc535['range'],_0xdf429b=_0x3afb64['range'];if(!_0x404fbb['isEqual'](_0xdf429b)){if(_0x404fbb['containsRange'](_0xdf429b,!0x0))return 0x1;if(_0xdf429b['containsRange'](_0x404fbb,!0x0))return-0x1;}return _0x5bc535['annotation']==_0x54d19a?-0x1:_0x3afb64['annotation']==_0x54d19a?0x1:0x0;})['map'](_0x5506b4=>_0x5506b4['annotation']);}get['_editorAnnotationsData'](){const _0x4f1852=new Map();for(const _0x43b99f of Array['from'](this['_dataCollectors']))for(const [_0x52c435,_0x7ae8a3]of _0x43b99f())_0x4f1852['set'](_0x52c435,_0x7ae8a3);return _0x4f1852;}}class st extends _0x165a5f{['afterInit'](){const _0x50e059=this['editor'];if(!_0x50e059['plugins']['has']('RestrictedEditingModeEditing'))return;_0x50e059['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x165a5f{constructor(_0x1fa356){super(_0x1fa356),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2b620a=this['editor'],_0x5f492d=_0x2b620a['commands']['get']('importWord'),_0x3e8a8c=_0x2b620a['plugins']['get'](it);_0x5f492d&&(_0x5f492d['on']('execute',(_0x1b9dbe,[,_0x360dab])=>{_0x360dab['collaboration_features']={'comments':!0x0,'user_id':_0x3e8a8c['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5f492d,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x56c900,_0x4ef799){const {comment_threads:_0x1777f5}=_0x4ef799;_0x1777f5&&_0x1777f5['forEach'](({thread_id:_0x5e835c,comments:_0x5d1fca,is_resolved:_0x22b735})=>{const _0x41a999=new Date(),_0x373023=_0x5d1fca['map'](({author:_0x4b3fe7,content:_0x2f7944,created_at:_0x60dfe0})=>({'content':_0x2f7944,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x41a999,'attributes':{'@external':{'authorName':_0x4b3fe7,'createdAt':_0x60dfe0?new Date(_0x60dfe0):new Date(),'source':'importWord'}}})),_0x1bf232=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1bf232,'threadId':_0x5e835c,'comments':_0x373023,'resolvedAt':_0x22b735?_0x41a999:null});});}}class at extends _0x165a5f{constructor(_0x25e460){super(_0x25e460),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2c6d34=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2c6d34,'contentInsertion',(_0x278834,_0x15d455)=>this['_removeMarkersWithoutThreads'](_0x15d455['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xc447d4){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xc447d4;const _0x46c128=this['editor']['plugins']['get']('CommentsRepository');for(const _0x415a44 of _0xc447d4['keys']()){const [_0x1338c3,_0x217f6c]=_0x415a44['split'](':');'comment'!=_0x1338c3||_0x46c128['hasCommentThread'](_0x217f6c)||_0xc447d4['delete'](_0x415a44);}return _0xc447d4;}['_registerMarkerInClipboardPipeline'](){const _0xda8b54=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2401c2=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2401c2&&_0xda8b54['_registerMarkerToCopy']('comment',_0x2401c2);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x322d5c){switch(_0x322d5c){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x4bf466){const _0x25a445=_0x4bf466['split'](':');return{'group':_0x25a445[0x0],'id':_0x25a445[0x1],'part':_0x25a445[0x2]};}class ut extends _0x165a5f{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x31ed13,_0x4cd0e6)=>{if(!_0x4cd0e6['options']['showCommentHighlights'])return null;if(_0x4cd0e6['options']['ignoreResolvedComments']){const {id:_0x41190b}=ft(_0x31ed13['markerName']),_0x14f620=this['editor']['plugins']['get'](o);if(_0x14f620['getCommentThread'](_0x41190b)?.['isResolved']&&_0x31ed13['item'])return _0x4cd0e6['consumable']['consume'](_0x31ed13['item'],'addMarker:'+_0x31ed13['markerName']),_0x4cd0e6['consumable']['consume'](_0x31ed13['item'],'removeMarker:'+_0x31ed13['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5fba0b=>{_0x5fba0b['on']('addMarker:comment',(_0x2078cf,_0x1fc61b,_0x249b1d)=>{if(!_0x249b1d['options']['showCommentHighlights'])return;const _0x49d80b=_0x1fc61b['item'];if(!_0x49d80b)return;const _0x1a89e5=_0x249b1d['mapper']['toViewElement'](_0x49d80b);this['editor']['model']['schema']['isObject'](_0x49d80b)&&_0x1a89e5&&!_0x1a89e5['getCustomProperty']('widget')&&_0x1a89e5['is']('containerElement')&&_0x4359cf(_0x1a89e5,_0x249b1d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4b58a4,{writer:_0x1df54d,options:_0x527ed1})=>{if(!_0x527ed1['showCommentHighlights'])return null;const _0x3b8efd=_0x1df54d['createContainerElement']('div'),_0x505878=_0x1df54d['createEmptyElement']('hr');return _0x1df54d['addClass']('ck-horizontal-line',_0x3b8efd),_0x1df54d['insert'](_0x1df54d['createPositionAt'](_0x3b8efd,0x0),_0x505878),_0x3b8efd;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4e3b99,{writer:_0x1855a0,options:_0x188bb4})=>{if(!_0x188bb4['showCommentHighlights'])return null;const _0x4188f6=_0x1855a0['createContainerElement']('span'),_0x17725c=_0x1855a0['createEmptyElement']('img');return _0x1855a0['addClass']('image-inline',_0x4188f6),_0x1855a0['insert'](_0x1855a0['createPositionAt'](_0x4188f6,0x0),_0x17725c),_0x4188f6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x372951,{writer:_0x328fcb,options:_0x40f126})=>{if(_0x40f126['showCommentHighlights'])return _0x328fcb['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1a7d7b,_0x47c896,_0xe37a3b)=>{_0xe37a3b['options']['showCommentHighlights']&&_0x1a7d7b['stop']();},{'priority':'high'});}}class r extends _0x165a5f{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x474004){super(_0x474004),this['set']('isThreadsLoadingPaused',!0x0),_0x474004['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2df79b,_0x1e1f31,_0xded7c6,_0x39900d)=>{const _0x3107fd=_0x474004['plugins']['get'](o),_0x5b45c0=_0xded7c6?ft(_0xded7c6)['id']:null;_0x474004['model']['change'](()=>{if(_0x5b45c0){const _0x363dbe=this['getAllMarkersForId'](_0x5b45c0);for(const _0x5317d7 of _0x363dbe)_0x474004['editing']['reconvertMarker'](_0x5317d7);}if(_0x39900d){const {id:_0x1a6568}=ft(_0x39900d),_0x381465=_0x3107fd['getCommentThread'](_0x1a6568);if(_0x381465&&_0x381465['unlinkedAt'])return;if(_0x381465&&!_0x381465['isAttached'])return;const _0x1bba49=this['getAllMarkersForId'](_0x1a6568);for(const _0x238422 of _0x1bba49)_0x474004['editing']['reconvertMarker'](_0x238422);}}),_0x5b45c0&&this['scrollToThreadMarker'](_0x5b45c0);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x1b2e01=this['editor'],_0x2ba296=_0x1b2e01['plugins']['get'](o),_0x364bd2=_0x1b2e01['config']['get']('collaboration.channelId'),_0x345fa4=_0x2ba296['getCommentThreads']()['filter'](_0x9c5227=>_0x9c5227['channelId']!==_0x364bd2);_0x1b2e01['commands']['add']('addCommentThread',new ot(_0x1b2e01)),this['listenTo'](_0x1b2e01,'change:isReadOnly',(_0x1d863b,_0x2a6f01,_0x48e844)=>{_0x2ba296['switchReadOnly'](_0x48e844,_0x1b2e01['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2ba296,dt('addCommentThread',_0x364bd2),(_0x43ec00,{threadId:_0xdd9a37})=>{const _0x163e11=this['editor']['plugins']['get'](o)['getCommentThread'](_0xdd9a37);_0x163e11?.['unlinkedAt']&&this['_attachArchivedThread'](_0xdd9a37);}),this['listenTo'](_0x2ba296,dt('removeCommentThread',_0x364bd2),(_0x2c7c29,{threadId:_0x190a69})=>{_0x1b2e01['model']['enqueueChange']({'isUndoable':!0x1},_0x22ded9=>{const _0x547053=this['getAllMarkersForId'](_0x190a69);for(const _0x4af547 of _0x547053)_0x22ded9['removeMarker'](_0x4af547);});}),this['listenTo'](_0x2ba296,dt('resolveCommentThread',_0x364bd2),(_0x45910b,{threadId:_0x1904a2})=>{(this['_reconvertMarkers'](_0x1904a2),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1904a2)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2ba296,dt('reopenCommentThread',_0x364bd2),(_0x544e33,{threadId:_0x37503c})=>{this['_reconvertMarkers'](_0x37503c);},{'priority':'low'}),this['listenTo'](_0x2ba296,dt('addComment',_0x364bd2),(_0x4d4542,{threadId:_0x411107,isFromAdapter:_0x10355f})=>{const _0xa8e4da=this['getAllMarkersForId'](_0x411107);if(_0x10355f||0x0==_0xa8e4da['length']||!_0x2ba296['hasCommentThread'](_0x411107))return;0x1===_0x2ba296['getCommentThread'](_0x411107)['length']&&_0x1b2e01['model']['enqueueChange']({'isUndoable':!0x1},_0x13d392=>{for(const _0x339338 of _0xa8e4da)_0x13d392['updateMarker'](_0x339338,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x345fa4);}['afterInit'](){!async function(_0x260844){const _0x332e45=_0x309b49([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x1137e9=0x73460ab3,_0x279822=0x7341747b^_0x1137e9,_0x14ca18=window[_0x309b49([0x44,0x61,0x74,0x65])][_0x309b49([0x6e,0x6f,0x77])](),_0x560007=_0x260844[_0x309b49([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x59b04d=new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d6385=>{_0x560007[_0x309b49([0x6f,0x6e,0x63,0x65])](_0x309b49([0x72,0x65,0x61,0x64,0x79]),_0x4d6385);}),_0x46117e={[_0x309b49([0x6b,0x74,0x79])]:_0x309b49([0x45,0x43]),[_0x309b49([0x75,0x73,0x65])]:_0x309b49([0x73,0x69,0x67]),[_0x309b49([0x63,0x72,0x76])]:_0x309b49([0x50,0x2d,0x32,0x35,0x36]),[_0x309b49([0x78])]:_0x309b49([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]),[_0x309b49([0x79])]:_0x309b49([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]),[_0x309b49([0x61,0x6c,0x67])]:_0x309b49([0x45,0x53,0x32,0x35,0x36])},_0x35345a=_0x560007[_0x309b49([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x309b49([0x67,0x65,0x74])](_0x309b49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x23fd15(){let _0x2cf608,_0x145eca=null,_0xd59f10=null;try{if(_0x35345a==_0x309b49([0x47,0x50,0x4c]))return _0x309b49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2cf608=_0x26ed33(),!_0x2cf608)return _0x309b49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2cf608[_0x309b49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xd59f10=_0x399ecc(_0x2cf608[_0x309b49([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2cf608[_0x309b49([0x6a,0x74,0x69])])),await _0x4724f0()?_0x5b4b56()?_0x30b98b()?_0x309b49([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x18031f()?(_0x2cf608[_0x309b49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x309b49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x145eca=_0x44a297(_0x309b49([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x59543f()):_0x309b49([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x309b49([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x309b49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x309b49([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x30b98b(){const _0x315608=[_0x309b49([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x309b49([0x74,0x72,0x69,0x61,0x6c])][_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2cf608[_0x309b49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x14ca18/0x3e8:0xe10*_0x279822;return _0x2cf608[_0x309b49([0x65,0x78,0x70])]<_0x315608;}function _0x5b4b56(){const _0xc1c408=_0x2cf608[_0x309b49([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xc1c408)return!0x1;if(_0xc1c408[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x2a])))return!0x0;if(_0xc1c408[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x43,0x4d,0x54])))return!0x0;if(_0xc1c408[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x4af233())return!0x0;if(_0xc1c408[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x52,0x43,0x4d,0x54]))){if(_0x1ba01e())return!0x0;if(_0x277bd8()||_0x664143())return!0x0;}return!0x1;}function _0x18031f(){const _0x187d30=_0x2cf608[_0x309b49([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x187d30||0x0==_0x187d30[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x77d41b}=new URL(window[_0x309b49([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x187d30[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x77d41b))return!0x0;const _0x33fb68=_0x77d41b[_0x309b49([0x73,0x70,0x6c,0x69,0x74])](_0x309b49([0x2e]));return _0x187d30[_0x309b49([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x508cf8=>_0x508cf8[_0x309b49([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x309b49([0x2a])))[_0x309b49([0x6d,0x61,0x70])](_0x39448e=>_0x39448e[_0x309b49([0x73,0x70,0x6c,0x69,0x74])](_0x309b49([0x2e])))[_0x309b49([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a48af=>_0x5a48af[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x33fb68[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x309b49([0x6d,0x61,0x70])](_0x28915d=>Array(_0x33fb68[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x28915d[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x309b49([0x66,0x69,0x6c,0x6c])](_0x28915d[0x0]===_0x309b49([0x2a])?_0x309b49([0x2a]):'')[_0x309b49([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x28915d))[_0x309b49([0x73,0x6f,0x6d,0x65])](_0x3c9767=>_0x33fb68[_0x309b49([0x65,0x76,0x65,0x72,0x79])]((_0x5aaf75,_0x131565)=>_0x3c9767[_0x131565]===_0x5aaf75||_0x3c9767[_0x131565]===_0x309b49([0x2a])));}function _0x59543f(){return _0x145eca&&_0xd59f10?new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x186a25,_0x1c151c)=>{_0x145eca[_0x309b49([0x74,0x68,0x65,0x6e])](_0x186a25,_0x1c151c),_0xd59f10[_0x309b49([0x74,0x68,0x65,0x6e])](_0x5f26f9=>{_0x5f26f9!=_0x309b49([0x56,0x61,0x6c,0x69,0x64])&&_0x186a25(_0x5f26f9);},_0x1c151c);}):_0x145eca||_0xd59f10||_0x309b49([0x56,0x61,0x6c,0x69,0x64]);}}function _0x399ecc(_0x6141a9,_0x25b768){return new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x38721e=>{if(_0x418288())return _0x38721e(_0x309b49([0x56,0x61,0x6c,0x69,0x64]));_0x4545e2(),_0x560007[_0x309b49([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x309b49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5c687b=!0x1;const _0x5e4263=_0x4c5e37();function _0x376c6b(_0xf46531){return!!_0xf46531&&(typeof _0xf46531===_0x309b49([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xf46531===_0x309b49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xf46531[_0x309b49([0x74,0x68,0x65,0x6e])]===_0x309b49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xf46531[_0x309b49([0x63,0x61,0x74,0x63,0x68])]===_0x309b49([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x162874(_0x3609ce){_0x1dc8f6(_0x3609ce)[_0x309b49([0x74,0x68,0x65,0x6e])](_0x305fa6=>{if(!_0x305fa6||_0x305fa6[_0x309b49([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x309b49([0x6f,0x6b]))return _0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1061f9(_0x589f8c(_0x5e4263+_0x25b768))!=_0x305fa6[_0x309b49([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x309b49([0x56,0x61,0x6c,0x69,0x64]);})[_0x309b49([0x74,0x68,0x65,0x6e])](_0x3d0440=>(_0x40ad74(),_0x3d0440),()=>{const _0x3c12cd=_0x416add();return null==_0x3c12cd?(_0x40ad74(),_0x309b49([0x56,0x61,0x6c,0x69,0x64])):_0x309b49(_0x14ca18-_0x3c12cd>(0x574a8eb3^_0x1137e9)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x309b49([0x74,0x68,0x65,0x6e])](_0x38721e)[_0x309b49([0x63,0x61,0x74,0x63,0x68])](()=>{_0x38721e(_0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xb05495=0x7370e433^_0x1137e9;function _0x40ad74(){const _0xebcc83=_0x309b49([0x6c,0x6c,0x63,0x74,0x2d])+_0x1061f9(_0x589f8c(_0x6141a9)),_0x3ec57a=_0xf8b9c7(_0x1061f9(window[_0x309b49([0x4d,0x61,0x74,0x68])][_0x309b49([0x63,0x65,0x69,0x6c])](_0x14ca18/_0xb05495)));window[_0x309b49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x309b49([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xebcc83,_0x3ec57a);}function _0x416add(){const _0xef83b7=_0x309b49([0x6c,0x6c,0x63,0x74,0x2d])+_0x1061f9(_0x589f8c(_0x6141a9)),_0xb1cea=window[_0x309b49([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x309b49([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xef83b7);return _0xb1cea?window[_0x309b49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xf8b9c7(_0xb1cea),0x10)*_0xb05495:null;}function _0x1dc8f6(_0x2378ce){return new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x577d7b,_0x4710cb)=>{_0x2378ce[_0x309b49([0x74,0x68,0x65,0x6e])](_0x577d7b,_0x4710cb),window[_0x309b49([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4710cb,0x7347de73^_0x1137e9);});}}_0x560007[_0x309b49([0x6f,0x6e])](_0x309b49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3c3dfb,_0x44c7ff)=>{if(_0x44c7ff[0x0]!=_0x6141a9)return _0x38721e(_0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x44c7ff[0x1]={..._0x44c7ff[0x1],[_0x309b49([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5e4263};},{[_0x309b49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x309b49([0x68,0x69,0x67,0x68])}),_0x560007[_0x309b49([0x6f,0x6e])](_0x309b49([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x7909ba=>{_0x376c6b(_0x7909ba[_0x309b49([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5c687b=!0x0,_0x162874(_0x7909ba[_0x309b49([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x309b49([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x309b49([0x6c,0x6f,0x77])}),_0x59b04d[_0x309b49([0x74,0x68,0x65,0x6e])](()=>{_0x5c687b||_0x38721e(_0x309b49([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x418288(){return _0x560007[_0x309b49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x309b49([0x76,0x69,0x65,0x77])][_0x309b49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x309b49([0x61,0x75,0x74,0x6f]);}function _0x4545e2(){_0x560007[_0x309b49([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x309b49([0x76,0x69,0x65,0x77])][_0x309b49([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x309b49([0x61,0x75,0x74,0x6f]);}}function _0x44a297(_0xef9a93){const _0x435d58=[new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x107d4d=>setTimeout(_0x107d4d,0x734f347f^_0x1137e9)),_0x59b04d[_0x309b49([0x74,0x68,0x65,0x6e])](()=>new window[(_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2dd156=>{let _0x4f87fe=0x0;_0x560007[_0x309b49([0x6d,0x6f,0x64,0x65,0x6c])][_0x309b49([0x6f,0x6e])](_0x309b49([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2d832d,_0x52d791)=>{_0x52d791[0x0][_0x309b49([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4f87fe++,_0x4f87fe==(0x73460f5b^_0x1137e9)&&(_0x2dd156(),_0x2d832d[_0x309b49([0x6f,0x66,0x66])]());});}))];return window[_0x309b49([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x309b49([0x72,0x61,0x63,0x65])](_0x435d58)[_0x309b49([0x74,0x68,0x65,0x6e])](()=>_0xef9a93);}async function _0x5e525a(){await _0x59b04d,_0x560007[_0x309b49([0x6d,0x6f,0x64,0x65,0x6c])][_0x309b49([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x23627a,_0x560007[_0x309b49([0x6d,0x6f,0x64,0x65,0x6c])][_0x309b49([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x23627a,_0x560007[_0x309b49([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x309b49([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4af233(){return window[_0x309b49([0x67,0x6c,0x6f,0x62])]&&window[_0x309b49([0x67,0x6c,0x6f,0x62])][_0x309b49([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1ba01e(){return _0x153ae7(_0x309b49([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3d4f13(_0x309b49([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x309b49([0x73,0x74,0x61,0x74,0x65])]==_0x309b49([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x277bd8(){return _0x153ae7(_0x309b49([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 _0x664143(){return _0x153ae7(_0x309b49([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4399f6(_0xe2ebac){const _0x5a7c02=_0x25ef81();_0x560007[_0x5a7c02]=_0x309b49([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xe2ebac,_0xe2ebac!=_0x309b49([0x56,0x61,0x6c,0x69,0x64])&&_0x5e525a();}function _0x25ef81(){const _0x34d98e=window[_0x309b49([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x309b49([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x309b49([0x6e,0x6f,0x77])]())[_0x309b49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x309b49([0x2e]),'');let _0x230672=_0x309b49([0x4b]);for(let _0x5b6c82=0x0;_0x5b6c82<_0x34d98e[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5b6c82+=0x2){let _0x284d5a=window[_0x309b49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x34d98e[_0x309b49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5b6c82,_0x5b6c82+0x2));_0x284d5a>=_0x332e45[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x284d5a-=_0x332e45[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x230672+=_0x332e45[_0x284d5a];}return _0x230672;}function _0x26ed33(){const _0x35c964=_0x35345a[_0x309b49([0x73,0x70,0x6c,0x69,0x74])](_0x309b49([0x2e]));if(0x3!=_0x35c964[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2bbf91(_0x35c964[0x1]);function _0x2bbf91(_0x1dc22e){const _0xdcbbb2=_0x36a44e(_0x1dc22e);return _0xdcbbb2&&_0x45426d()?_0xdcbbb2:null;function _0x45426d(){const _0x4667ce=_0xdcbbb2[_0x309b49([0x6a,0x74,0x69])],_0x37f1be=window[_0x309b49([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4667ce[_0x309b49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4667ce[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2a378e={..._0xdcbbb2,[_0x309b49([0x6a,0x74,0x69])]:_0x4667ce[_0x309b49([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4667ce[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2a378e[_0x309b49([0x76,0x63])],_0x589f8c(_0x2a378e)==_0x37f1be;}}}async function _0x4724f0(){let _0x315989=!0x0;try{const _0x7d9e3=_0x35345a[_0x309b49([0x73,0x70,0x6c,0x69,0x74])](_0x309b49([0x2e])),[_0x1f1130,_0x5745e4,_0x530c72]=_0x7d9e3;return _0x81836a(_0x1f1130),await _0x560922(_0x1f1130,_0x5745e4,_0x530c72),_0x315989;}catch{return!0x1;}function _0x81836a(_0x15257d){const _0x832ece=_0x36a44e(_0x15257d);_0x832ece&&_0x832ece[_0x309b49([0x61,0x6c,0x67])]==_0x309b49([0x45,0x53,0x32,0x35,0x36])||(_0x315989=!0x1);}async function _0x560922(_0x39984d,_0x21b50a,_0x17048f){const _0xd9281b=window[_0x309b49([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x309b49([0x66,0x72,0x6f,0x6d])](_0x232309(_0x17048f),_0xee21bc=>_0xee21bc[_0x309b49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2d436a=new window[(_0x309b49([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x309b49([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x39984d+_0x309b49([0x2e])+_0x21b50a),_0x537e9a=window[_0x309b49([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x309b49([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x537e9a)return;const _0x1dbcb9=await _0x537e9a[_0x309b49([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x309b49([0x6a,0x77,0x6b]),_0x46117e,{[_0x309b49([0x6e,0x61,0x6d,0x65])]:_0x309b49([0x45,0x43,0x44,0x53,0x41]),[_0x309b49([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x309b49([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x309b49([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x537e9a[_0x309b49([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x309b49([0x6e,0x61,0x6d,0x65])]:_0x309b49([0x45,0x43,0x44,0x53,0x41]),[_0x309b49([0x68,0x61,0x73,0x68])]:{[_0x309b49([0x6e,0x61,0x6d,0x65])]:_0x309b49([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1dbcb9,_0xd9281b,_0x2d436a)||(_0x315989=!0x1);}}function _0x36a44e(_0xe5fe53){return _0xe5fe53[_0x309b49([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x309b49([0x65,0x79]))?JSON[_0x309b49([0x70,0x61,0x72,0x73,0x65])](_0x232309(_0xe5fe53)):null;}function _0x232309(_0x5de894){return window[_0x309b49([0x61,0x74,0x6f,0x62])](_0x5de894[_0x309b49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x309b49([0x2b]))[_0x309b49([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x309b49([0x2f])));}function _0x589f8c(_0x136379){let _0x37b2d9=0x1505;function _0x227874(_0x19daa6){for(let _0x4b4e29=0x0;_0x4b4e29<_0x19daa6[_0x309b49([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b4e29++){const _0x3b23a1=_0x19daa6[_0x309b49([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4b4e29);_0x37b2d9=(_0x37b2d9<<0x5)+_0x37b2d9+_0x3b23a1,_0x37b2d9&=_0x37b2d9;}}function _0x399a80(_0x382da1){Array[_0x309b49([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x382da1)?_0x382da1[_0x309b49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x399a80):_0x382da1&&typeof _0x382da1==_0x309b49([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x309b49([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x382da1)[_0x309b49([0x73,0x6f,0x72,0x74])]()[_0x309b49([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x398112,_0x351cf1])=>{_0x227874(_0x398112),_0x399a80(_0x351cf1);}):_0x227874(window[_0x309b49([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x382da1));}return _0x399a80(_0x136379),_0x37b2d9>>>0x0;}function _0x1061f9(_0x17c1c6){return _0x17c1c6[_0x309b49([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x309b49([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x309b49([0x30]));}function _0xf8b9c7(_0x4d66f8){return _0x4d66f8[_0x309b49([0x73,0x70,0x6c,0x69,0x74])]('')[_0x309b49([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x309b49([0x6a,0x6f,0x69,0x6e])]('');}function _0x153ae7(_0x17eedc){return _0x560007[_0x309b49([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x309b49([0x68,0x61,0x73])](_0x17eedc);}function _0x3d4f13(_0x43d418){return _0x560007[_0x309b49([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x309b49([0x67,0x65,0x74])](_0x43d418);}function _0x23627a(){}function _0x309b49(_0x2b5dee){return _0x2b5dee['map'](_0x555e75=>String['fromCharCode'](_0x555e75))['join']('');}_0x4399f6(await _0x23fd15());}(this);}['destroy'](){const _0x8c0c64=this['editor']['plugins']['get'](o),_0x24c872=this['editor']['config']['get']('collaboration.channelId');for(const _0x5351a9 of _0x8c0c64['getCommentThreads']({'channelId':_0x24c872}))_0x8c0c64['_detachCommentThread'](_0x5351a9['id']),_0x8c0c64['_threads']['delete'](_0x5351a9['id']);super['destroy']();}['hasMarkerForId'](_0x59abe3){return this['getAllMarkersForId'](_0x59abe3)['length']>0x0;}['getAllMarkersForId'](_0x5f2fd3){const _0x17a2fb=[];for(const _0x1bcb7a of this['editor']['model']['markers'])_0x1bcb7a['name']['startsWith']('comment:'+_0x5f2fd3)&&_0x17a2fb['push'](_0x1bcb7a);return _0x17a2fb;}['scrollToThreadMarker'](_0x3c6d14){setTimeout(()=>{const _0x8288d0=this['_getTargetForId'](_0x3c6d14);if(!_0x8288d0)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x3c6d14&&nt({'target':_0x8288d0[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x20bf60){this['editor']['model']['change'](()=>{for(const _0x3d5c84 of this['getAllMarkersForId'](_0x20bf60))this['editor']['editing']['reconvertMarker'](_0x3d5c84);});}['_attachArchivedThread'](_0x2b0bef){const _0x4f98c0=this['editor']['plugins']['get'](o),_0x5d20a4=this['editor']['plugins']['get'](b),_0x1d3438=_0x4f98c0['getCommentThread'](_0x2b0bef);if(!_0x1d3438['isAttached']){const _0x11ff0f=_0x1d3438['attachTo'](()=>this['_getTargetForId'](_0x1d3438['id']));_0x5d20a4['registerAnnotation'](_0x11ff0f),_0x1d3438['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xddded9=this['editor'],_0x516d79=_0xddded9['plugins']['get'](it);_0xddded9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1c25ee,_0x3bc33b)=>{const {id:_0x9219e9}=ft(_0x1c25ee['markerName']),_0x1687fe=_0xddded9['plugins']['get'](o)['getCommentThread'](_0x9219e9),_0x2f5873=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x9219e9;let _0x581ea0;if(_0x1687fe&&_0x1687fe['isResolved']&&!_0x2f5873&&_0x1c25ee['item'])return _0x3bc33b['consumable']['consume'](_0x1c25ee['item'],'addMarker:'+_0x1c25ee['markerName']),_0x3bc33b['consumable']['consume'](_0x1c25ee['item'],'removeMarker:'+_0x1c25ee['markerName']),null;const _0xc63909=['ck-comment-marker'];return _0x2f5873&&_0xc63909['push']('ck-comment-marker--active'),_0x581ea0=_0x1687fe?.['length']?_0x1687fe['comments']['first']['author']['id']:_0x516d79['me']['id'],{'classes':_0xc63909,'attributes':{'data-comment':_0x9219e9,'data-author-id':_0x581ea0}};}}),_0xddded9['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2e7ff0,{options:_0x2581c2})=>{if(_0x2581c2['showCommentHighlights'])return null;const _0x51291f=_0xddded9['plugins']['get'](o),_0x238014=_0xddded9['model']['markers']['get'](_0x2e7ff0),{id:_0x112c35,part:_0x174905}=ft(_0x2e7ff0);return _0x238014&&!_0x238014['affectsData']||_0x2581c2['ignoreResolvedComments']&&_0x51291f['getCommentThread'](_0x112c35)?.['isResolved']?null:{'group':'comment','name':_0x174905?_0x112c35+':'+_0x174905:_0x112c35};}}),_0xddded9['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5a654e,{writer:_0x49627b})=>_0x49627b['createElement']('$marker',{'data-name':'comment:'+_0x5a654e['getAttribute']('id')})}),_0xddded9['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x97d80a=this['editor'],_0x34a28a=_0x97d80a['plugins']['get'](o),_0x5c6374=new Set(),_0x5b46e5=new Set();_0x97d80a['model']['document']['registerPostFixer'](_0x41b94d=>{let _0x23a3e6=!0x1;for(const {name:_0x4b9efa,data:_0x2e47d4}of _0x97d80a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x107f48,id:_0x2f3923}=ft(_0x4b9efa);let _0x5cde94=_0x2e47d4['newRange'];if('comment'!==_0x107f48||!_0x5cde94)continue;const _0x116696='$graveyard'===_0x5cde94['root']['rootName'];_0x116696||(_0x5cde94=ht(_0x5cde94,_0x97d80a['model']),!_0x5cde94||_0x5cde94['isCollapsed']||!_0x2e47d4['newRange']||_0x5cde94['isEqual'](_0x2e47d4['newRange']))?_0x97d80a['model']['hasContent'](_0x5cde94)&&!_0x116696?this['isThreadsLoadingPaused']?_0x5c6374['add'](_0x4b9efa):this['_handleThreadMarker'](_0x4b9efa,_0x2f3923):(_0x5b46e5['add'](_0x4b9efa),_0x5c6374['delete'](_0x4b9efa),_0x41b94d['removeMarker'](_0x4b9efa),_0x23a3e6=!0x0):(_0x41b94d['updateMarker'](_0x4b9efa,{'range':_0x5cde94}),_0x23a3e6=!0x0);}return _0x23a3e6;}),this['on']('change:isThreadsLoadingPaused',(_0x4d9f2b,_0x15b6de,_0x5cfe6a)=>{if(!_0x5cfe6a&&_0x5c6374['size'])for(const _0x4727fc of _0x5c6374){const {id:_0x413cd1}=ft(_0x4727fc);_0x5c6374['delete'](_0x4727fc),_0x97d80a['model']['markers']['get'](_0x4727fc)&&this['_handleThreadMarker'](_0x4727fc,_0x413cd1);}}),this['listenTo'](_0x97d80a['model']['document'],'change',()=>{for(const {name:_0x462f43,data:{newRange:_0x422f62}}of _0x97d80a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4b0537,id:_0x5119ad}=ft(_0x462f43);if('comment'!==_0x4b0537)continue;const _0x278285=_0x34a28a['getCommentThread'](_0x5119ad),_0xa3aaf0=this['hasMarkerForId'](_0x5119ad);_0x278285&&(!_0x278285['_hasTargetInContent']&&_0x422f62&&_0x97d80a['editing']['view']['once']('render',()=>{const _0x264163=_0x97d80a['plugins']['get'](y),_0x2f84ad=_0x34a28a['_threadToController']['get'](_0x278285)['view'];_0x264163['getByInnerView'](_0x2f84ad)['refreshVisibility']();},{'priority':'low'}),_0x278285['_hasTargetInContent']=_0xa3aaf0||!!_0x422f62),_0x422f62||(_0x5b46e5['add'](_0x462f43),_0x5c6374['delete'](_0x462f43));}for(const _0x46bbd2 of _0x5b46e5){const {id:_0x11ef85}=ft(_0x46bbd2),_0x570459=_0x34a28a['getCommentThread'](_0x11ef85);if(_0x5c6374['delete'](_0x46bbd2),!_0x570459)continue;const _0x5e2c70=this['hasMarkerForId'](_0x11ef85);_0x5e2c70||_0x570459['isSubmitted']?_0x5e2c70||_0x570459['unlinkedAt']||_0x570459['setUnlinkedAt'](new Date()):_0x570459['remove']();}_0x5b46e5['clear']();});}['_handleInitialThreads'](_0x4b0290){_0x4b0290['forEach'](_0x4f89ce=>{_0x4f89ce['unlinkedAt']&&this['_attachArchivedThread'](_0x4f89ce['id']);});}['_getTargetForId'](_0x38f216){const _0xd3896=this['editor'],_0xad15db=this['getAllMarkersForId'](_0x38f216);return et(_0xd3896['editing'],_0xad15db);}['_getTextContext'](_0x41b7f0){const _0x4f8d8c=this['getAllMarkersForId'](_0x41b7f0);let _0x1b8985='',_0x2ea24b=!0x1;for(const _0x1051d4 of _0x4f8d8c){const _0x4e0e70=_0x1051d4['getRange']();for(const _0x4e5ca2 of Array['from'](_0x4e0e70['getItems']()))_0x4e5ca2['is']('$textProxy')?(_0x1b8985&&_0x2ea24b&&(_0x1b8985+='\x20',_0x2ea24b=!0x1),_0x1b8985+=_0x4e5ca2['data']):_0x2ea24b=!0x0;_0x2ea24b=!0x0;}return _0x1b8985['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x50f55e,_0x5ce882){const _0x4c4faa=this['editor'],_0x2bfa57=_0x4c4faa['plugins']['get'](o);let _0x2c3693=_0x2bfa57['getCommentThread'](_0x5ce882);const _0x5a0bd6=_0x4c4faa['config']['get']('collaboration.channelId'),_0x36a3e3=_0x4c4faa['plugins']['get'](b);if(_0x2c3693&&(_0x2c3693['unlinkedAt']&&_0x2c3693['setUnlinkedAt'](null),_0x2c3693['isAttached']))return _0x2c3693;return!this['getAllMarkersForId'](_0x5ce882)[0x0]['managedUsingOperations']?_0x4c4faa['editing']['view']['once']('render',()=>{if(_0x2bfa57['getCommentThread'](_0x5ce882))return;const _0x561bcc=_0x4c4faa['plugins']['get'](y);_0x2c3693=_0x2bfa57['openNewCommentThread']({'channelId':_0x5a0bd6,'threadId':_0x5ce882,'target':()=>this['_getTargetForId'](_0x5ce882),'context':{'type':'text','value':this['_getTextContext'](_0x5ce882)}});const _0x5f3cc8=_0x2bfa57['_threadToController']['get'](_0x2c3693)['view'],_0x4ea022=_0x561bcc['getByInnerView'](_0x5f3cc8);_0x4ea022&&_0x36a3e3['registerAnnotation'](_0x4ea022);},{'priority':'low'}):_0x2bfa57['fetchCommentThread']({'channelId':_0x5a0bd6,'threadId':_0x5ce882})['then'](_0x290d1a=>{if('destroyed'!==_0x4c4faa['state']){if(_0x2c3693=_0x290d1a,_0x2c3693&&!_0x2c3693['isAttached']){const _0x491bb7=_0x2c3693['attachTo'](()=>this['_getTargetForId'](_0x5ce882));_0x36a3e3['registerAnnotation'](_0x491bb7),_0x2c3693['isResolved']&&this['_reconvertMarkers'](_0x5ce882);}else{if(!_0x2c3693){const _0x500a15=this['getAllMarkersForId'](_0x5ce882);_0x4c4faa['model']['change'](_0xca3faf=>{for(const _0x39f045 of _0x500a15)_0xca3faf['removeMarker'](_0x39f045);});}}}}),_0x2c3693;}['_handleThreadMarker'](_0x18cd7c,_0x42276d){const _0x1bb942=this['_attachMarkerToThread'](_0x18cd7c,_0x42276d);_0x1bb942&&!_0x1bb942['context']&&_0x1bb942['setContext']({'type':'text','value':this['_getTextContext'](_0x42276d)});}['_initAriaMarkerChangeAnnouncements'](){const _0x11f521=this['editor'];rt(_0x11f521['model'],({left:_0x194cff,entered:_0x74afa1})=>{for(const _0x34eed1 of _0x194cff)if(mt(_0x34eed1)){_0x11f521['ui']['ariaLiveAnnouncer']['announce'](N(_0x11f521['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x28f9e9 of _0x74afa1)if(mt(_0x28f9e9)){_0x11f521['ui']['ariaLiveAnnouncer']['announce'](N(_0x11f521['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x355e93)));break;}});}}function dt(_0x1ed3d7,_0x41a147){return _0x41a147?_0x1ed3d7+':'+_0x41a147:_0x1ed3d7;}function ht(_0x1253ba,_0x543b67){const _0x449b59=_0x543b67['schema'],_0x4f1cad=_0x543b67['createRange'](_0x1253ba['start']);for(const _0x2dcde5 of _0x1253ba['getWalker']()){const {type:_0x51b491,item:_0x5c9182,nextPosition:_0x41f447}=_0x2dcde5;if('text'===_0x51b491||_0x449b59['isObject'](_0x5c9182)){const _0x4ea900=_0x543b67['createPositionBefore'](_0x5c9182);_0x4f1cad['isCollapsed']&&(_0x4f1cad['start']=_0x4ea900),_0x4f1cad['end']=_0x41f447;}}return _0x4f1cad;}function mt(_0x425fdc){return'comment'===ft(_0x425fdc['name'])['group'];}class s extends _0x165a5f{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x43deca=this['editor'],_0x4178ba=_0x43deca['plugins']['get'](o),_0x26cc1a=_0x43deca['plugins']['get'](r),_0x501bc8=_0x43deca['plugins']['get'](y),_0x2cc0f3=_0x43deca['plugins']['get'](b);_0x43deca['ui']['componentFactory']['add']('comment',()=>{const _0x13722d=this['_createUIButton'](_0x47a354);return _0x13722d['tooltip']=!0x0,_0x13722d;}),_0x43deca['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x320df3)),_0x2cc0f3['addSourceCollector'](()=>{const _0x44d005=[];for(const [_0x48391e,_0x845901]of _0x4178ba['_threadToController']){const _0x554e19=_0x26cc1a['getAllMarkersForId'](_0x48391e['id']),_0x3a427c=_0x554e19['map'](_0xa4054d=>_0xa4054d['getRange']());_0x554e19['length']>0x0&&_0x44d005['push']([_0x845901['view'],_0x3a427c]);}return _0x44d005;}),this['listenTo'](_0x501bc8,'change:activeAnnotations',(_0x45c256,_0x1f0a98,_0x33db2b)=>{const _0x27803f=Array['from'](_0x33db2b)['map'](_0x7d3fcd=>_0x7d3fcd['innerView'])['find'](_0x17b742=>_0x4178ba['_viewToController']['has'](_0x17b742));if(!_0x27803f)return void(_0x26cc1a['activeMarker']=null);const _0x2af08b=_0x4178ba['_viewToController']['get'](_0x27803f)['model']['id'],_0x29433a='comment:'+_0x2af08b;_0x2af08b&&_0x26cc1a['hasMarkerForId'](_0x2af08b)?_0x26cc1a['activeMarker']=_0x29433a:_0x26cc1a['activeMarker']&&(_0x26cc1a['activeMarker']=null);}),this['listenTo'](_0x4178ba,'removeCommentThread',(_0x53f75f,{threadId:_0x3cc957,isFromAdapter:_0x4702f8})=>{!_0x4702f8&&_0x43deca['ui']['focusTracker']['isFocused']&&_0x26cc1a['hasMarkerForId'](_0x3cc957)&&_0x43deca['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4178ba,'addComment',(_0x562542,{threadId:_0x166469,isFromAdapter:_0x45eb1a})=>{if(_0x45eb1a||!_0x26cc1a['hasMarkerForId'](_0x166469)||!_0x4178ba['hasCommentThread'](_0x166469))return;0x1===_0x4178ba['getCommentThread'](_0x166469)['length']&&(_0x43deca['editing']['view']['focus'](),_0x562542['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3f4589=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x23e5f8;for(const _0x374aaa in _0x3f4589){const _0x80b60f=_0x374aaa,_0x1bbf79=_0x3f4589[_0x80b60f];if('commentsLicenseKeyValid'==_0x1bbf79||'commentsLicenseKeyInvalid'==_0x1bbf79||'commentsLicenseKeyExpired'==_0x1bbf79||'commentsLicenseKeyDomainLimit'==_0x1bbf79||'commentsLicenseKeyNotAllowed'==_0x1bbf79||'commentsLicenseKeyEvaluationLimit'==_0x1bbf79||'commentsLicenseKeyUsageLimit'==_0x1bbf79){delete _0x3f4589[_0x80b60f],_0x23e5f8=_0x1bbf79,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x23e5f8&&_0x3f4589['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x23e5f8&&_0x3f4589['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x23e5f8&&_0x3f4589['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x23e5f8&&_0x3f4589['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x23e5f8&&_0x3f4589['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x23e5f8&&_0x3f4589['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0xae8be2){const _0x27dc66=this['editor'],_0x571250=new _0xae8be2(_0x27dc66['locale']),_0x4a598d=_0x27dc66['commands']['get']('addCommentThread');return _0x571250['set']({'label':N(_0x27dc66['locale'],'Comment'),'icon':_0x1b49ba}),_0x571250['bind']('isEnabled')['to'](_0x4a598d,'isEnabled',_0x4a598d,'hasContent',(_0x3406a6,_0x838ca8)=>_0x3406a6&&_0x838ca8),this['listenTo'](_0x571250,'execute',()=>{_0x4a598d['execute']();}),_0x571250;}}class i extends _0x165a5f{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2605f6){super(_0x2605f6),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x399dee,_0x53af3c,_0x1c675d)=>{_0x1c675d?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x29ee31,_0x51a944]of this['editor']['commands'])_0x51a944['affectsData']&&'addCommentThread'!==_0x29ee31&&_0x51a944['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x1bbb7b=this['editor']['editing']['view']['document'];this['listenTo'](_0x1bbb7b,'cut',_0x3fa220=>_0x3fa220['stop'](),{'priority':'highest'}),this['listenTo'](_0x1bbb7b,'clipboardInput',_0xef4259=>_0xef4259['stop'](),{'priority':'highest'}),this['listenTo'](_0x1bbb7b,'delete',_0x2111f3=>_0x2111f3['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x582215,_0x26b83a]of this['editor']['commands'])_0x26b83a['affectsData']&&'addCommentThread'!==_0x582215&&_0x26b83a['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x152fb7{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3d4173){super(_0x3d4173),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4d41ab=this['context']['plugins']['get'](y);this['listenTo'](_0x4d41ab,'_activateAnnotation',(_0x5163bd,_0x118da0)=>{for(const _0x5a76f4 of this['activeUIs']){const _0x3a3ba2=this['_uis']['get'](_0x5a76f4);(0x0,this['uisData']['get'](_0x5a76f4)['filter'])(_0x118da0)&&_0x3a3ba2['setActiveAnnotation'](_0x118da0);}}),this['listenTo'](_0x4d41ab,'_deactivateAllAnnotations',()=>{for(const _0x3339cd of this['activeUIs']){this['_uis']['get'](_0x3339cd)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4d41ab['_visibleAnnotations'],'add',(_0x1a5e33,_0x3841ff)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3841ff);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2c1259){return this['activeUIs']['has'](_0x2c1259);}['activate'](_0x4d208e,_0x2fa776=this['defaultFilter']){const _0x493b88=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x4d208e))throw new _0x266f92('annotationsuis-missing-ui',this,{'uiName':_0x4d208e});this['isActive'](_0x4d208e)&&this['deactivate'](_0x4d208e),this['activeUIs']['add'](_0x4d208e);const _0x5b978e=new S();v({'source':_0x493b88['_visibleAnnotations'],'target':_0x5b978e,'filter':_0x2fa776}),this['uisData']['set'](_0x4d208e,{'collection':_0x5b978e,'filter':_0x2fa776});const _0x5f2485=this['_uis']['get'](_0x4d208e);_0x5f2485['attach'](_0x5b978e),this['listenTo'](_0x5f2485,'change:activeAnnotation',(_0x5363fe,_0x3bbdcd,_0x2b5fe5,_0x364878)=>{_0x364878&&_0x493b88['_removeActiveAnnotation'](_0x364878),_0x2b5fe5&&_0x493b88['_addActiveAnnotation'](_0x2b5fe5);});}['deactivate'](_0x120ca2){if(this['activeUIs']['delete'](_0x120ca2),!this['_uis']['has'](_0x120ca2))throw new _0x266f92('annotationsuis-missing-ui',this,{'uiName':_0x120ca2});const _0x7e01d2=this['_uis']['get'](_0x120ca2);_0x7e01d2['detach'](),this['stopListening'](_0x7e01d2),this['uisData']['get'](_0x120ca2)['collection']['destroy'](),this['uisData']['delete'](_0x120ca2);}['switchTo'](_0x245650){if(!this['_uis']['has'](_0x245650))throw new _0x266f92('annotationsuis-missing-ui',this,{'uiName':_0x245650});const _0x2ebdd8=this['context']['plugins']['get'](y),_0x33d54f=Array['from'](_0x2ebdd8['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x245650);const _0x3242df=this['_uis']['get'](_0x245650);_0x3242df['setActiveAnnotation'](_0x33d54f),_0x3242df['_setSelectedAnnotations']&&_0x33d54f&&_0x3242df['_setSelectedAnnotations']([_0x33d54f]);}['deactivateAll'](){for(const _0x42136e of this['activeUIs'])this['deactivate'](_0x42136e);}['register'](_0x143161,_0x30944f){if(this['_uis']['has'](_0x143161))throw new _0x266f92('annotationsuis-register-already-registered');if('function'!=typeof _0x30944f['attach']||'function'!=typeof _0x30944f['detach']||'function'!=typeof _0x30944f['setActiveAnnotation'])throw new _0x266f92('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x143161,_0x30944f);}['refilterAnnotations'](){const _0x34125f=this['context']['plugins']['get'](y)['collection'],_0x15b6fc=new Map(),_0x4e33dc=Array['from'](this['activeUIs']);for(const _0x151fb4 of this['activeUIs']){const _0x13dbd4=this['uisData']['get'](_0x151fb4)['collection'];for(const _0xf67328 of _0x13dbd4)_0x15b6fc['set'](_0xf67328,_0x151fb4);}for(const _0x26bb57 of _0x34125f){const _0x8ed9d0=_0x15b6fc['get'](_0x26bb57);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x26bb57);const _0x45b312=_0x4e33dc['find'](_0x47317e=>this['uisData']['get'](_0x47317e)['filter'](_0x26bb57));_0x8ed9d0!==_0x45b312&&(_0x8ed9d0&&this['uisData']['get'](_0x8ed9d0)['collection']['remove'](_0x26bb57),_0x45b312&&this['uisData']['get'](_0x45b312)['collection']['add'](_0x26bb57));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x568dff){const _0x3ae80d=[];for(const _0xbaf593 of this['activeUIs']){(0x0,this['uisData']['get'](_0xbaf593)['filter'])(_0x568dff)&&_0x3ae80d['push'](_0xbaf593);}if(_0x3ae80d['length']>0x1)throw new _0x266f92('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3ae80d,'annotationType':_0x568dff['type']});}}const _i=/* #__PURE__ -- @preserve */
32
+ Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x17a9e3){super(_0x17a9e3);const _0x4693ad=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 _0x5f5319(),this['focusCycler']=new _0x140f1f({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4693ad['to']('class')],'style':{'minHeight':_0x4693ad['to']('minHeight',_0x29c5e4=>'number'==typeof _0x29c5e4?_i(_0x29c5e4+0xa):null)},'dir':_0x17a9e3['uiLanguageDirection'],'role':'application','aria-label':N(_0x17a9e3,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x17a9e3,'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',_0x3a840f=>{this['_updateItemPositionInFocusables'](_0x3a840f['source']);}),this['list']['forEach'](_0x20b79c=>{this['focusTracker']['add'](_0x20b79c['element']),this['_updateItemPositionInFocusables'](_0x20b79c);}),this['list']['on']('change',(_0x512d56,_0x4a0d8c)=>{for(const _0x561889 of _0x4a0d8c['removed'])this['focusTracker']['remove'](_0x561889['element']),this['focusables']['remove'](_0x561889);for(const _0xded53c of _0x4a0d8c['added'])this['focusTracker']['add'](_0xded53c['element']),this['_updateItemPositionInFocusables'](_0xded53c);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x3ad96a){const _0x2c3ef7=this['focusables']['getIndex'](_0x3ad96a);let _0x113903,_0x25af27;for(const _0x10c589 of this['focusables'])if(_0x3ad96a['top']<_0x10c589['top']){_0x113903=_0x10c589;break;}if(_0x25af27=_0x113903?this['focusables']['getIndex'](_0x113903):this['focusables']['length'],-0x1!==_0x2c3ef7){if(_0x2c3ef7===_0x25af27-0x1)return;this['focusables']['remove'](_0x3ad96a),_0x25af27=_0x113903?this['focusables']['getIndex'](_0x113903):this['focusables']['length'];}this['focusables']['add'](_0x3ad96a,_0x25af27);}}const Ot=/* #__PURE__ -- @preserve */
33
+ Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4ff66a){super(_0x4ff66a),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5d2e75,_0x175694)=>_0x5d2e75+_0x175694),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1c94bb=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1c94bb['to']('isAnimationDisabled',_0x53f06b=>_0x53f06b?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1c94bb['to']('top',_0x538c72=>Ot(_0x538c72))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x5c21da=this['element']['clientHeight'];_0x5c21da&&(this['height']=_0x5c21da);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x152fb7{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f9e48){super(_0x3f9e48),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 _0x1f4e94=this['context']['config']['get']('sidebar.container');_0x1f4e94&&this['setContainer'](_0x1f4e94);}['setContainer'](_0x371bfe){if(!g(_0x371bfe))throw new _0x266f92('sidebar-setcontainer-invalid-element');this['container']=_0x371bfe;}['_attachToContainer']({viewClass:_0x2defaa='',spaceBetweenItems:_0x10b2c8=0x19}={}){if(!g(this['container']))throw new _0x266f92('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2defaa,this['_spaceBetweenItems']=_0x10b2c8;}['rearrange']({removedAnnotation:_0x53e5f9,previousAnnotation:_0x3eb88e,nextAnnotation:_0x1fcb0e}){const _0x253955=this['getSidebarItemView'](_0x53e5f9);this['view']['list']['remove'](_0x253955),this['_destroySidebarItemView'](_0x53e5f9),_0x3eb88e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3eb88e)),_0x1fcb0e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1fcb0e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3632b4,activatedAnnotation:_0x55bc34,disableAnimationOnActivatedAnnotation:_0x1fbb8a}){if(this['_activeAnnotation']=_0x55bc34,_0x3632b4){_0x3632b4['isActive']=!0x1;const _0x56c1ce=this['getSidebarItemView'](_0x3632b4);_0x56c1ce&&_0x1fbb8a&&(_0x56c1ce['isAnimationDisabled']=!0x1);}if(_0x55bc34){const _0xbcff16=this['getSidebarItemView'](_0x55bc34);_0xbcff16&&(_0x55bc34['isActive']=!0x0,_0x1fbb8a&&(_0xbcff16['isAnimationDisabled']=!0x0,_0xbcff16['top']+=0x1),this['_alignToTargetRect'](_0xbcff16));}}['_detachFromContainer'](_0x2eb341){if(this['view']['element']['remove'](),_0x2eb341){for(const _0x492411 of _0x2eb341)this['_destroySidebarItemView'](_0x492411);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x45d106,_0x11158d){_0x11158d||(_0x11158d=_0x45d106['view']);const _0x209e47=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x209e47,_0x45d106),this['_annotationToSidebarItemView']['set'](_0x45d106,_0x209e47),_0x209e47['content']['add'](_0x11158d),this['listenTo'](_0x45d106['view'],'change:targetRect',(_0x387bc5,_0x1af19f,_0x212d6e)=>{const _0x3845c0=this['_getTargetTop'](_0x45d106,_0x212d6e);_0x209e47['_targetTop']!=_0x3845c0&&(_0x209e47['_targetTop']=_0x3845c0,this['_setItemTop'](_0x209e47,_0x3845c0));}),this['listenTo'](_0x209e47,'change:top',()=>{this['_recalculate'](_0x209e47,'top');}),this['listenTo'](_0x209e47,'change:bottom',()=>{this['_recalculate'](_0x209e47,'bottom');}),this['_alignToTargetRect'](_0x209e47);const _0x43bda1=this['_getItemBefore'](_0x209e47);if(_0x43bda1)this['_alignAfterItem'](_0x43bda1,_0x209e47)||this['_alignToTargetRect'](_0x209e47);else this['_alignToTargetRect'](_0x209e47);return this['_updateLastItem'](),this['view']['list']['add'](_0x209e47),_0x209e47;}['_alignForTopChange'](_0x29a34b){if(!_0x29a34b['content']['length'])return;const _0x4bcfd9=this['_getItemBefore'](_0x29a34b);if(!_0x4bcfd9)return;const _0x475004=this['_sidebarItemViewToAnnotation']['get'](_0x4bcfd9),_0x51bd29=this['_activeAnnotation'];_0x51bd29&&_0x51bd29===_0x475004?this['_alignAfterItem'](_0x4bcfd9,_0x29a34b):this['_alignBeforeItem'](_0x29a34b,_0x4bcfd9);}['_alignForBottomChange'](_0x38eb5c){if(!_0x38eb5c['content']['length'])return;const _0x40018e=this['_getItemAfter'](_0x38eb5c);if(!_0x40018e)return;const _0x428ab3=this['_sidebarItemViewToAnnotation']['get'](_0x40018e),_0x1c2963=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x58d81f=this['_activeAnnotation'];_0x58d81f&&_0x58d81f===_0x428ab3&&_0x1c2963?(this['_alignBeforeItem'](_0x40018e,_0x38eb5c),this['_alignAfterItem'](_0x38eb5c,_0x40018e)):_0x58d81f&&_0x58d81f===_0x428ab3?this['_alignBeforeItem'](_0x40018e,_0x38eb5c):this['_alignAfterItem'](_0x38eb5c,_0x40018e);}['_recalculate'](_0x3a7f9f,_0x4a7728){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3923a4,changedProp:_0x5b7c2e}of this['_recalculateBuffer'])'top'===_0x5b7c2e?this['_alignForTopChange'](_0x3923a4):this['_alignForBottomChange'](_0x3923a4);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3a7f9f,'changedProp':_0x4a7728});}['getSidebarItemView'](_0x4ec154){return this['_annotationToSidebarItemView']['get'](_0x4ec154);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x41c80b){const _0x4ee44a=this['getSidebarItemView'](_0x41c80b);this['stopListening'](_0x4ee44a),this['stopListening'](_0x41c80b['view']),_0x4ee44a['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x41c80b),this['_sidebarItemViewToAnnotation']['delete'](_0x4ee44a);}['_createSidebarView'](){const _0x142143=new H(this['context']['locale']);return _0x142143['render'](),this['on']('change:_lastItem',(_0x343f17,_0x125429,_0x2ac625,_0x43e426)=>{_0x43e426&&_0x142143['unbind']('minHeight'),_0x2ac625?_0x142143['bind']('minHeight')['to'](_0x2ac625,'bottom'):_0x142143['minHeight']=null;}),_0x142143;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x477db4){const _0xd7c305=this['_sidebarItemViewToAnnotation']['get'](_0x477db4),_0x106364=_0xd7c305&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xd7c305)-0x1);return _0x106364&&this['getSidebarItemView'](_0x106364)||null;}['_getItemAfter'](_0x2072d2){const _0x2c8871=this['_sidebarItemViewToAnnotation']['get'](_0x2072d2),_0x221839=_0x2c8871&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2c8871)+0x1);return _0x221839&&this['getSidebarItemView'](_0x221839)||null;}['_alignBeforeItem'](_0x329c8c,_0x4b1d31){_0x329c8c['updateHeight']();const _0x40bed9=G(_0x4b1d31['bottom']+this['_spaceBetweenItems'],_0x329c8c['top']);return!!_0x40bed9&&(this['_setItemTop'](_0x4b1d31,_0x4b1d31['top']-_0x40bed9),!0x0);}['_alignAfterItem'](_0x73af74,_0x3cdae9){_0x73af74['updateHeight']();const _0xccff07=G(_0x73af74['bottom']+this['_spaceBetweenItems'],_0x3cdae9['top']);return!!_0xccff07&&(this['_setItemTop'](_0x3cdae9,_0x3cdae9['top']+_0xccff07,!0x1),!0x0);}['_alignToTargetRect'](_0x576a1b){const _0x48e529=this['_sidebarItemViewToAnnotation']['get'](_0x576a1b);if(!_0x48e529||!_0x48e529['target']||!_0x48e529['targetRect'])return;const _0x1183bb=this['_getTargetTop'](_0x48e529,_0x48e529['targetRect']);this['_setItemTop'](_0x576a1b,_0x1183bb);}['_getTargetTop'](_0x44a53d,_0x503c52){if(null===_0x503c52)return 0x0;if(_0x44a53d['target']instanceof _0x3f14b6)return _0x503c52['top'];{const _0x5633f4=new _0x3f14b6(this['view']['element'])['top'];return _0x503c52['top']-_0x5633f4;}}['_setItemTop'](_0x3416e1,_0x27a754,_0x2dfb0e=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2dfb0e&&(_0x27a754=Math['max'](_0x27a754,this['_getMaxAvailableTop'](_0x3416e1))),_0x3416e1['top']=_0x27a754;}['_getMaxAvailableTop'](_0x30409a){let _0x17baa9=this['_getItemBefore'](_0x30409a),_0x37fdbd=0x0;for(;_0x17baa9;)_0x17baa9['updateHeight'](),_0x37fdbd+=this['_spaceBetweenItems']+_0x17baa9['height'],_0x17baa9=this['_getItemBefore'](_0x17baa9);return _0x37fdbd;}}function G(_0x27fb07,_0x1800ec){return Math['max'](_0x27fb07-_0x1800ec,0x0);}function g(_0x53c9ee){return null!==_0x53c9ee&&'object'==typeof _0x53c9ee&&0x1===_0x53c9ee['nodeType'];}class e extends _0x152fb7{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1708ed){super(_0x1708ed),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x139e96(),this['_refreshPositioningDebounced']=_0x3b904d(()=>{_0x1708ed['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x34e961=this['context']['plugins']['get'](j),_0x128866=this['context']['plugins']['get'](z);_0x34e961['register']('wideSidebar',this),_0x128866['container']&&_0x34e961['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1f5a9e){if(_0x1f5a9e===this['activeAnnotation'])return;const _0xc97a08=this['context']['plugins']['get'](z);_0xc97a08['_activeAnnotation']=_0x1f5a9e;const _0xfc210d=this['activeAnnotation'];_0xc97a08['refresh']({'blurredAnnotation':_0xfc210d,'activatedAnnotation':_0x1f5a9e}),this['activeAnnotation']=_0x1f5a9e;}['attach'](_0x4d3532){this['annotations']=_0x4d3532;const _0x11ea36=this['context']['plugins']['get'](z);if(_0x11ea36['_annotations']=_0x4d3532,this['isAttached'])throw new _0x266f92('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x11ea36,'set:container',()=>{this['detach'](),this['listenTo'](_0x11ea36,'change:container',_0x34ec17=>{_0x34ec17['off'](),this['attach'](_0x4d3532);});}),_0x11ea36['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x21b425=_0x13cb16=>{_0x13cb16['updateTargetRect'](),_0x11ea36['addAnnotation'](_0x13cb16);};for(const _0x2ccd0a of _0x4d3532)_0x21b425(_0x2ccd0a);this['listenTo'](_0x4d3532,'add',(_0x1204c8,_0x480482)=>{_0x21b425(_0x480482);}),this['listenTo'](_0x4d3532,'remove',(_0x535e7f,_0x47a3b1,_0x45167e)=>{_0x11ea36['rearrange']({'removedAnnotation':_0x47a3b1,'previousAnnotation':_0x4d3532['get'](_0x45167e-0x1),'nextAnnotation':_0x4d3532['get'](_0x45167e+0x1)}),_0x47a3b1===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4d3532,'focus',(_0x277f3c,_0x3d4134)=>{this['setActiveAnnotation'](_0x3d4134);}),this['listenTo'](_0x4d3532,'blur',()=>{this['setActiveAnnotation'](null);});const _0x75d15c=this['context']instanceof _0x4eea4a?this['context']['editors']:new _0x139e96([this['context']]);for(const _0x3cfec4 of _0x75d15c)this['_integrateWithEditorAnnotations'](_0x3cfec4);this['listenTo'](_0x75d15c,'add',(_0x3fc75d,_0x4856b3)=>{this['listenTo'](_0x4856b3,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4856b3);});}),this['listenTo'](_0x75d15c,'remove',(_0x483845,_0x4fa230)=>{_0x4fa230['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4fa230['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x266f92('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1094e1=this['context']['plugins']['get'](z);_0x1094e1['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1094e1),this['stopListening'](this['annotations']),this['context']instanceof _0x4eea4a&&this['stopListening'](this['context']['editors']);for(const _0x446de1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x446de1);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1e6f6b){if(!_0x1e6f6b['plugins']['has']('EditorAnnotations'))return;const _0x2fdfae=_0x1e6f6b['plugins']['get']('EditorAnnotations'),_0x1e3388=()=>{const _0x4fab5c=_0x2fdfae['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4fab5c[0x0]||null);};this['listenTo'](_0x2fdfae,'refresh',_0x1e3388),this['listenTo'](_0x2fdfae,'blur',(_0x2f97f9,{isAnnotationTracked:_0x4a74b6})=>{this['activeAnnotation']&&_0x4a74b6(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2fdfae,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x49a168=>{_0x2fdfae['hasDomSelection']()&&(_0x1e3388(),_0x49a168['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2fdfae);}['_destroyEditorAnnotationsIntegration'](_0x5235c2){this['stopListening'](_0x5235c2),this['_editorAnnotations']['remove'](_0x5235c2);}}class C extends _0x47a354{['counterView'];constructor(_0xb8ace9){super(_0xb8ace9);const _0x4ded26=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5cbfbc,_0xebab28)=>_0x5cbfbc?'...':_0xebab28['toString']()),this['set']('annotationType',''),this['icon']=_0x1b49ba,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4ded26['to']('annotationType',_0x91c3fc=>'ck-annotation-counter__badge--'+_0x91c3fc),_0x4ded26['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4ded26['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x152fb7{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x326f93){super(_0x326f93),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x2bb24d())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x139e96(),this['_refreshPositioningDebounced']=_0x3b904d(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x530e58(this['context']['locale']),this['balloonPanelView']=new _0x4534d9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x43127f){this['annotations']=_0x43127f;const _0x34ae74=this['context']['plugins']['get'](z),_0x16b0fe=this['balloonPanelView'];if(_0x34ae74['_annotations']=_0x43127f,this['isAttached'])throw new _0x266f92('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x34ae74,'set:container',()=>{this['detach'](),this['listenTo'](_0x34ae74,'change:container',_0x5ed163=>{_0x5ed163['off'](),this['attach'](_0x43127f);});}),_0x34ae74['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2ba996=_0x5545cb=>{const _0x1b639d=new C(this['context']['locale']);_0x34ae74['addAnnotation'](_0x5545cb,_0x1b639d),this['_annotationToNarrowView']['set'](_0x5545cb,_0x1b639d),_0x1b639d['bind']('isDirty','annotationType','number')['to'](_0x5545cb['view'],'isDirty','type','length'),_0x1b639d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x16b0fe['content']['first']!==_0x5545cb['view']?(this['_showBalloon'](_0x5545cb),_0x5545cb['view']['element']['focus'](),this['setActiveAnnotation'](_0x5545cb)):this['setActiveAnnotation'](null);});};for(const _0x49b229 of _0x43127f)_0x2ba996(_0x49b229);this['listenTo'](_0x43127f,'add',(_0x2269ee,_0x5c881b)=>{_0x2ba996(_0x5c881b);}),this['listenTo'](_0x43127f,'remove',(_0x2a9c6f,_0x1f1e1d,_0x40c2fe)=>{this['_annotationToNarrowView']['get'](_0x1f1e1d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1f1e1d),_0x34ae74['rearrange']({'removedAnnotation':_0x1f1e1d,'previousAnnotation':_0x43127f['get'](_0x40c2fe-0x1),'nextAnnotation':_0x43127f['get'](_0x40c2fe+0x1)}),_0x1f1e1d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x43127f,'focus',(_0x4f370f,_0x199380)=>{this['setActiveAnnotation'](_0x199380);}),this['listenTo'](_0x43127f,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xef12b6,_0x2990b1)=>{_0x2990b1['keyCode']===_0x63f92['esc']&&_0x16b0fe['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x16b0fe['content']['first']),this['_hideBalloon'](),_0x2990b1['stopPropagation'](),_0x2990b1['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3119fe,_0x1771bb)=>{const _0x2c89f3=_0x1771bb['target'];_0x16b0fe['isVisible']&&_0x16b0fe['element']['contains'](_0x2c89f3)||_0x34ae74['view']['element']['contains'](_0x2c89f3)||_0x3119fe['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x110c04=>_0x110c04['contains'](_0x2c89f3))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x15b295=this['context']instanceof _0x4eea4a?this['context']['editors']:new _0x139e96([this['context']]);for(const _0x50495d of _0x15b295)this['_integrateWithEditorAnnotations'](_0x50495d);this['listenTo'](_0x15b295,'add',(_0x2a978d,_0x29fb4f)=>{this['listenTo'](_0x29fb4f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x29fb4f);});}),this['listenTo'](_0x15b295,'remove',(_0x3dff87,_0x1881c2)=>{_0x1881c2['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1881c2['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2f4073){if(_0x2f4073===this['activeAnnotation'])return;const _0x568480=this['context']['plugins']['get'](z);if(_0x568480['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2f4073,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2f4073)_0x568480['getSidebarItemView'](_0x2f4073)?this['_showBalloon'](_0x2f4073):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2f4073;}['detach'](){if(!this['isAttached'])throw new _0x266f92('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x402249=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x4b30fd=>_0x4b30fd['destroy']()),this['_annotationToNarrowView']['clear'](),_0x402249['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4eea4a&&this['stopListening'](this['context']['editors']);for(const _0x35163b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x35163b);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'](_0x3eecc3){if(!_0x3eecc3['plugins']['has']('EditorAnnotations'))return;const _0x2361d8=_0x3eecc3['plugins']['get']('EditorAnnotations'),_0x48f32e=this['context']['plugins']['get'](z),_0x19dd01=this['annotations'],_0x39daa8=this['balloonPanelView'],_0x3a8337=()=>{const _0x41cdf0=_0x2361d8['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x41cdf0),this['setActiveAnnotation'](_0x41cdf0[0x0]||null);};this['listenTo'](_0x2361d8,'refresh',_0x3a8337),this['listenTo'](_0x2361d8,'blur',(_0x13b557,{isAnnotationTracked:_0x56feb6})=>{this['activeAnnotation']&&_0x56feb6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2361d8,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x19dd01,'blur',_0x269a25=>{_0x2361d8['hasDomSelection']()&&_0x269a25['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x509542,_0xcf9a16)=>{const _0x8dd852=_0xcf9a16['target'];_0x39daa8['isVisible']&&_0x39daa8['element']['contains'](_0x8dd852)||_0x48f32e['view']['element']['contains'](_0x8dd852)||this['activeAnnotation']&&_0x2361d8['hasDomSelection']()&&(_0x3a8337(),_0x509542['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2361d8);}['_destroyEditorAnnotationsIntegration'](_0x384c9d){_0x384c9d&&(this['stopListening'](_0x384c9d),this['_editorAnnotations']['remove'](_0x384c9d));}['_setSelectedAnnotations'](_0x33d229){for(const _0x1210be of this['_selectedAnnotations'])_0x33d229['includes'](_0x1210be)||this['_manuallyClosedAnnotationViews']['delete'](_0x1210be['view']);this['_selectedAnnotations']=_0x33d229;}['_refreshPositioning'](){const _0x291afa=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x291afa['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x484575){if(this['_manuallyClosedAnnotationViews']['has'](_0x484575['view']))return;const _0x5c174=this['balloonPanelView']['content']['first'];_0x5c174!==_0x484575['view']?(_0x5c174&&this['_detachListeners'](_0x5c174),this['_attachListeners'](_0x484575['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x484575['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x397c90=this['balloonPanelView']['content']['first'],_0x1ed207=_0x397c90&&this['annotations']['getByView'](_0x397c90);if(!_0x1ed207||!this['_annotationToNarrowView']['has'](_0x1ed207))return;const _0x2acb29=this['_annotationToNarrowView']['get'](_0x1ed207)['element'],_0x5f34cd=(function(){const _0x259491=_0x4534d9['defaultPositions'];return[_0x259491['southArrowNorthEast'],_0x259491['northArrowSouthEast'],_0x259491['southArrowNorth'],_0x259491['northArrowSouth'],_0x259491['southArrowNorthWest'],_0x259491['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2acb29,'positions':_0x5f34cd});}['_hideBalloon'](){const _0x3360eb=this['balloonPanelView'],_0x311070=_0x3360eb['content']['first'];_0x311070&&(this['_detachListeners'](_0x311070),_0x3360eb['unpin'](),_0x3360eb['content']['clear']());}['_attachListeners'](_0x30b2d5){this['listenTo'](_0x30b2d5,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x30b2d5,'Esc',(_0x1f92da,_0x4c50b8)=>{this['_manuallyClosedAnnotationViews']['add'](_0x30b2d5),this['_hideBalloon'](),_0x4c50b8();});}['_detachListeners'](_0x5d56ba){this['stopListening'](_0x5d56ba);}}class c extends _0x165a5f{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x15b3ff,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1585d9){super(_0x1585d9),_0x1585d9['editing']['view']['addObserver'](_0x1cac50),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1585d9['plugins']['get'](_0x15b3ff),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x5edefe=this['editor']['plugins']['get'](j);_0x5edefe['context']===this['editor']&&(_0x5edefe['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x400e15,_0x4aad76)=>{const _0xe88c78=this['_balloon'];if(this['isAttached']&&_0xe88c78['visibleView']){const _0x325791=this['annotations']['getByView'](_0xe88c78['visibleView']);_0x325791&&this['_closeAnnotation'](_0x325791),_0x4aad76();}}));}['afterInit'](){const _0x2d74c8=this['editor']['plugins']['get'](j);_0x2d74c8['context']===this['editor']&&(_0x2d74c8['hasActive']()||_0x2d74c8['switchTo']('inline'));}['setActiveAnnotation'](_0x38ba14){_0x38ba14!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x38ba14&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x38ba14)&&this['_addAnnotationToBalloon'](_0x38ba14,!0x0),_0x38ba14['isActive']=!0x0),_0x38ba14||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x38ba14);}['attach'](_0x2bc726){this['annotations']=_0x2bc726;const _0x40e6d5=this['editor']['plugins']['get'](j),_0x173247=this['_balloon'];if(this['isAttached'])throw new _0x266f92('inlineannotations-attach-already-attached',this);if(_0x40e6d5['context']!==this['editor'])throw new _0x266f92('inlineannotations-not-allowed-with-context',this);const _0x12891c=this['editor']['plugins']['get'](b);this['listenTo'](_0x12891c,'refresh',()=>{const _0x2bd135=_0x12891c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1fe0ec,_0x315f82;!this['_forceRefresh']&&(_0x1fe0ec=_0x2bd135,_0x315f82=this['_selectedAnnotations'],_0x1fe0ec['length']===_0x315f82['length']&&_0x1fe0ec['every'](_0x41e78b=>_0x315f82['includes'](_0x41e78b)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2bd135),this['setActiveAnnotation'](_0x2bd135[0x0]||null));}),this['listenTo'](_0x12891c,'blur',(_0x1107d8,{isAnnotationTracked:_0x449984})=>{this['activeAnnotation']&&_0x449984(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x48c8a7,_0x511009,_0x23afe8)=>{_0x23afe8||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2bc726,'remove',(_0x3cd5b0,_0x11036d)=>{this['_removeAnnotationFromBalloon'](_0x11036d),_0x11036d===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x173247,'change:visibleView',(_0x3fbd28,_0x20e337,_0x45121e,_0x456854)=>{_0x456854&&this['stopListening'](_0x456854);const _0x1ec205=_0x2bc726['getByView'](_0x45121e);_0x45121e&&_0x1ec205&&(this['listenTo'](_0x45121e,'change:height',()=>{_0x173247['updatePosition']();}),this['listenTo'](_0x45121e,'Esc',()=>{this['_closeAnnotation'](_0x1ec205),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1ec205&&this['setActiveAnnotation'](_0x1ec205));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x173247['visibleView']&&(_0x2bc726['getByView'](_0x173247['visibleView'])&&_0x173247['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 _0x266f92('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xd5d70e of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xd5d70e);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x5afc71){for(const _0x45196e of this['_selectedAnnotations'])_0x5afc71['includes'](_0x45196e)||this['_manuallyClosed']['delete'](_0x45196e);for(const _0x59501d of this['annotations'])_0x5afc71['includes'](_0x59501d)||this['_removeAnnotationFromBalloon'](_0x59501d);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x322323 of _0x5afc71)this['_addAnnotationToBalloon'](_0x322323);}this['_selectedAnnotations']=_0x5afc71;}['_addAnnotationToBalloon'](_0x26c70f,_0x54c86d=!0x1){this['_manuallyClosed']['has'](_0x26c70f)||(this['_addedAnnotations']['has'](_0x26c70f)||this['_balloon']['hasView'](_0x26c70f['view'])||(this['_addedAnnotations']['add'](_0x26c70f),this['_balloon']['add']({'stackId':_0x26c70f['view']['id'],'view':_0x26c70f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x26c70f)}})),_0x54c86d&&this['_balloon']['showStack'](_0x26c70f['view']['id']));}['_getBalloonTargetForAnnotation'](_0xa1de){const _0x350c4f=_0xa1de['target'],_0x286144=this['editor']['editing']['view'],_0x438078=_0x286144['document']['selection']['getFirstRange'](),_0x3d8a2d=_0x286144['domConverter']['viewRangeToDom'](_0x438078);if(_0x3d8a2d['collapse'](!0x0),_0x350c4f){if(_0x350c4f instanceof _0x3f14b6)return _0x350c4f;let _0x482857=[];for(const _0x1ef7b5 of _0x350c4f)_0x482857['push'](...F(_0x1ef7b5['getClientRects']()));_0x482857=function(_0x1b5b81){const _0x1dd50e=[];let _0x42633d=_0x1b5b81[0x0];for(let _0x3023af=0x1;_0x3023af<_0x1b5b81['length'];_0x3023af++)P(_0x42633d,_0x1b5b81[_0x3023af])?_0x42633d['width']+=_0x1b5b81[_0x3023af]['width']:(_0x1dd50e['push'](_0x42633d),_0x42633d=_0x1b5b81[_0x3023af]);return _0x1dd50e['push'](_0x42633d),_0x1dd50e;}(_0x482857);const _0x5cb912=_0x3d8a2d['getBoundingClientRect']();return _0x482857['find'](_0x48dcc3=>_0x48dcc3['top']<=_0x5cb912['top']&&_0x48dcc3['bottom']>=_0x5cb912['bottom']&&_0x48dcc3['left']<=_0x5cb912['left']&&_0x48dcc3['right']>=_0x5cb912['right'])||_0x482857[0x0];}return _0xa1de['targetRect']||_0x3d8a2d;}['_removeAnnotationFromBalloon'](_0x229d38){this['_addedAnnotations']['has'](_0x229d38)&&this['_balloon']['hasView'](_0x229d38['view'])&&(this['_addedAnnotations']['delete'](_0x229d38),this['_balloon']['remove'](_0x229d38['view']));}['_closeAnnotation'](_0x1958bf){this['_manuallyClosed']['add'](_0x1958bf),this['_removeAnnotationFromBalloon'](_0x1958bf);}}function F(_0x55472e){return Array['from'](_0x55472e)['map'](DOMRect['fromRect']);}function P(_0x2d7a5d,_0x1df71c){return _0x2d7a5d['top']===_0x1df71c['top']&&_0x2d7a5d['bottom']===_0x1df71c['bottom']&&_0x2d7a5d['right']===_0x1df71c['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x18a561,_0x52c6db){super(_0x18a561),this['set']('isEmpty',!_0x52c6db['length']),this['focusTracker']=new _0x5f5319(),this['_annotationViews']=_0x52c6db,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x140f1f({'focusables':_0x52c6db,'focusTracker':this['focusTracker']}),this['listenTo'](_0x52c6db,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x52c6db,'remove',(_0x1e9a5e,_0x454156)=>{_0x454156['isActive']&&this['focus'](),_0x52c6db['length']||(this['isEmpty']=!0x0);});const _0x310a6c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x18a561,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x52c6db},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x310a6c['if']('isEmpty','ck-hidden',_0x48152c=>!_0x48152c)]},'children':[{'text':N(_0x18a561,'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 _0x4801c4 of this['_annotationViews'])this['focusTracker']['add'](_0x4801c4['element']);this['_annotationViews']['on']('change',(_0x173443,{added:_0x5a5d1a,removed:_0x3e5a28})=>{for(const _0x502019 of _0x5a5d1a)this['focusTracker']['add'](_0x502019['element']);for(const _0xa52059 of _0x3e5a28)this['focusTracker']['remove'](_0xa52059['element']);});}}class p extends _0x152fb7{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x282968){super(_0x282968),this['archivedThreads']=new _0x139e96();}['init'](){const _0x734b8e=this['context'],_0xefeb7d=_0x734b8e['plugins']['get'](o),_0x2c0f75=_0x734b8e['plugins']['get'](y);this['listenTo'](_0xefeb7d,'addCommentThread',(_0x3c4991,{threadId:_0x6c3112})=>{const _0x264975=_0xefeb7d['getCommentThread'](_0x6c3112);_0x264975['archivedAt']&&this['archivedThreads']['add'](_0x264975,this['_calculatePosition'](_0x264975['archivedAt'])),this['listenTo'](_0x264975,'change:archivedAt',(_0x2523e1,_0x418d48,_0x278cdb)=>{_0x278cdb?this['archivedThreads']['has'](_0x264975)||this['archivedThreads']['add'](_0x264975,this['_calculatePosition'](_0x264975['archivedAt'])):this['archivedThreads']['has'](_0x264975)&&this['archivedThreads']['remove'](_0x264975);});}),this['listenTo'](_0xefeb7d,'removeCommentThread',(_0x52fc35,{threadId:_0xc17bad})=>{const _0x48f85b=_0xefeb7d['getCommentThread'](_0xc17bad);this['stopListening'](_0x48f85b),this['archivedThreads']['has'](_0x48f85b)&&this['archivedThreads']['remove'](_0x48f85b);},{'priority':'highest'}),this['listenTo'](_0x2c0f75['collection'],'focus',(_0xdb94d6,_0x2db1d5)=>{_0x2db1d5['isVisible']||(_0x2db1d5['isActive']=!0x0,_0x2c0f75['activate'](_0x2db1d5));});}['_calculatePosition'](_0x449ebc){const _0x2ed4ba=[...this['archivedThreads']]['findIndex'](_0x321d17=>_0x321d17['archivedAt']<_0x449ebc);return _0x2ed4ba>-0x1?_0x2ed4ba:this['archivedThreads']['length'];}}class a extends _0x165a5f{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x20864c];}constructor(_0x119b35){super(_0x119b35),this['annotationViews']=new _0x577399(),this['_pendingThreads']=[];}['init'](){const _0xa30389=this['editor'],_0x1746e4=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xa30389['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x47a354,!0x0)),_0xa30389['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x34100c=this['_createCommentsArchiveButton'](_0x320df3);return _0x34100c['set']({'role':'menuitemcheckbox'}),_0x34100c;});const _0x38bab9=_0xa30389['plugins']['get'](p),_0x16c1cb=_0xa30389['plugins']['get']('Annotations'),_0xc0c8a3=_0xa30389['plugins']['get']('CommentsRepository');_0x38bab9['archivedThreads']['forEach'](_0x81437a=>{this['_handleNewThread'](_0x81437a);}),this['listenTo'](_0x38bab9['archivedThreads'],'add',(_0x331d43,_0x5db006)=>{this['_handleNewThread'](_0x5db006);}),this['listenTo'](_0x16c1cb['collection'],'add',(_0x23c7f0,_0x3a96cc)=>{const _0xc9d807=this['_pendingThreads']['find'](_0x1b4c9d=>{const _0x1ff848=_0xc0c8a3['_threadToController']['get'](_0x1b4c9d);return _0x1ff848&&_0x3a96cc['innerView']===_0x1ff848['view'];});if(_0xc9d807){const _0x324808=this['_calculatePosition'](_0xc9d807['archivedAt']);this['_addAnnotationToArchive'](_0x3a96cc,_0x324808),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xc9d807),0x1);}}),this['listenTo'](_0x38bab9['archivedThreads'],'remove',(_0x35c7f9,_0x4486ec)=>{const _0x3af432=_0xa30389['config']['get']('collaboration.channelId');if(!_0x3af432||_0x4486ec['channelId']===_0x3af432){if(this['_pendingThreads']['includes'](_0x4486ec))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4486ec),0x1);else{const _0x22b33b=_0xc0c8a3['_threadToController']['get'](_0x4486ec),_0x6862cb=_0x16c1cb['getByInnerView'](_0x22b33b['view']);this['annotationViews']['remove'](_0x6862cb['view']),this['stopListening'](_0x6862cb),this['stopListening'](_0x6862cb['focusableElements']);}}}),this['listenTo'](_0x16c1cb['collection'],'add',(_0x3e21d5,_0x303c63)=>{this['listenTo'](_0x303c63,'escape',_0x1746e4);}),this['listenTo'](_0x16c1cb['collection'],'remove',(_0x2b86f0,_0x16097b)=>{this['stopListening'](_0x16097b,'escape',_0x1746e4);});}['_addAnnotationToArchive'](_0x49392e,_0x57946a){this['listenTo'](_0x49392e,'set:isVisible',_0x571a07=>{_0x571a07['return']=!0x1,_0x571a07['stop']();}),this['annotationViews']['add'](_0x49392e['view'],_0x57946a);}['_handleNewThread'](_0x369f7a){const _0x387417=this['editor']['plugins']['get']('CommentsRepository'),_0x357724=this['editor']['plugins']['get']('Annotations'),_0x5465be=this['editor']['config']['get']('collaboration.channelId');if(!_0x5465be||_0x369f7a['channelId']===_0x5465be){const _0x4cc054=_0x387417['_threadToController']['get'](_0x369f7a);if(!_0x4cc054)return void this['_pendingThreads']['push'](_0x369f7a);const _0x4b2bf5=this['_calculatePosition'](_0x369f7a['archivedAt']),_0x10abc=_0x357724['getByInnerView'](_0x4cc054['view']);_0x10abc['isVisible']&&_0x357724['_visibleAnnotations']['remove'](_0x10abc),this['_addAnnotationToArchive'](_0x10abc,_0x4b2bf5);}}['_calculatePosition'](_0x168796){const _0xcbf0bf=this['editor']['config']['get']('collaboration.channelId'),_0x132722=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x26e0e2=>_0x26e0e2['channelId']===_0xcbf0bf)['findIndex'](_0x5beb65=>_0x5beb65['archivedAt']<_0x168796);return _0x132722<0x0||_0x132722>this['annotationViews']['length']?this['annotationViews']['length']:_0x132722-0x1;}['_toggleDialog'](){const _0x551687=this['editor'],_0x250c2b=_0x551687['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x551687['locale'],this['annotationViews'])),'commentsArchive'===_0x250c2b['id']?_0x250c2b['hide']():_0x250c2b['show']({'id':'commentsArchive','title':N(_0x551687['locale'],'COMMENTS_ARCHIVE'),'icon':_0x54b5f6,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x22636['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2355d6,_0x23b4a8=!0x1){const _0x3a0df2=this['editor']['locale'],_0x568991=this['editor']['plugins']['get']('Dialog'),_0x3080e4=new _0x2355d6(_0x3a0df2);return _0x3080e4['bind']('isEnabled')['to'](this,'isEnabled'),_0x3080e4['bind']('isOn')['to'](_0x568991,'id',_0x8b4472=>'commentsArchive'===_0x8b4472),_0x3080e4['set']({'label':N(_0x3a0df2,'COMMENTS_ARCHIVE'),'icon':_0x54b5f6,'isToggleable':!0x0}),_0x23b4a8&&(_0x3080e4['tooltip']=!0x0),this['listenTo'](_0x3080e4,'execute',()=>this['_toggleDialog']()),_0x3080e4;}['_hideDialogOnAnnotationEscape']=_0x480dbb=>{const _0x55d7a5=_0x480dbb['source'];if(!this['annotationViews']['has'](_0x55d7a5['view']))return;const _0x2ed053=this['editor']['plugins']['get']('Dialog');_0x2ed053['isOpen']&&'commentsArchive'===_0x2ed053['id']&&(_0x2ed053['hide'](),_0x480dbb['stop']());};}class gi extends _0x165a5f{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};