@ckeditor/ckeditor5-comments
Version:
Collaborative comments feature for CKEditor 5.
28 lines • 190 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
import{Editor as _0x1f4cfd,ContextPlugin as _0x29aebb,PendingActions as ht,Command as _0x2663db,Plugin as _0x44c3b9,Context as _0x106841}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x2621e6,uid as _0x2d4b73,KeystrokeHandler as jt,FocusTracker as _0x355188,diff as _0x2236a8,Collection as _0x2d8e4d,Rect as _0x1694f4,CKEditorError as _0x4813ff,first as _0x273d1a,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x56f1fb,keyCodes as _0x366093}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x4c2bd2,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x50854c,trimHtml as _0x2496da,LateFocusDropdownButtonView as _0x4a94cc,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x5b26b4}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x51b2e8}from'es-toolkit/compat';import{IconUndo as _0x54791e,IconCheck as _0x57d49c,IconPencil as _0x3abff9,IconRemoveComment as _0x21ca4e,IconThreeVerticalDots as _0x45c7ed,IconAddComment as _0x465f2d,IconCommentsArchive as _0x471d32}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x346817,ButtonView as _0x11514e,ViewCollection as _0x3b3b3c,createDropdown as _0x39ce0f,ListView as _0x562f1b,focusChildOnDropdownOpen as _0x226139,ListItemView as _0x6bed2,MenuBarMenuListItemButtonView as _0x116ef4,BodyCollection as _0x21e681,BalloonPanelView as _0x687bfe,ContextualBalloon as _0x1067eb,Dialog as _0x181830,DialogViewPosition as _0x3f3697}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x32b46f}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x73fcb6}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2ad6b4}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
_0x2621e6(){['model'];['view'];constructor(_0x2dc464,_0x4b6744){super(),this['model']=_0x2dc464,this['model']['_isAttached']=!0x0,this['view']=_0x4b6744,this['listenTo'](_0x4b6744,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x4b6744,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x4b6744,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x4b6744,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x4b6744,'addComment',(_0x3d1b12,_0x3f333e)=>this['addComment'](_0x3f333e)),this['listenTo'](_0x4b6744,'updateComment',(_0x35d9bd,_0x13dde6,_0x44623d)=>this['updateComment'](_0x13dde6,_0x44623d)),this['listenTo'](_0x4b6744,'removeComment',(_0x596439,_0x1fed92)=>this['removeComment'](_0x1fed92));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x15d15a){this['model']['addComment']({'content':_0x15d15a,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x13ebf9,_0x471bc0){this['model']['getComment'](_0x13ebf9)['update']({'content':_0x471bc0});}['removeComment'](_0x54a099){this['model']['getComment'](_0x54a099)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x34fa83,_0x4513f6,_0x1f16cb){const t=_0x34fa83['t'];switch(_0x4513f6){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'},_0x1f16cb);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'},_0x1f16cb);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'},_0x1f16cb);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'},_0x1f16cb);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1f16cb);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'},_0x1f16cb);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'},_0x1f16cb);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'},_0x1f16cb);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 Ut extends Vt{['main'];['editable'];constructor(_0x33efe7,_0x173f51){super(_0x33efe7);const _0x369dcf=_0x2d4b73();this['main']=this['createCollection'](),this['editable']=new $t(_0x33efe7,_0x173f51,void 0x0,{'label':()=>E(_0x33efe7,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x33efe7['uiLanguageDirection'],'lang':_0x33efe7['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x369dcf},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Rt{['view'];constructor(_0x7b285a){super(_0x7b285a),this['view']=new Ut(_0x7b285a['locale'],_0x7b285a['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x28bdb8=this['editor']['editing']['view'],_0x3b25f1=this['view']['editable'],_0x392f3c=_0x28bdb8['document']['getRoot']();_0x3b25f1['name']=_0x392f3c['rootName'],this['view']['render']();const _0xfa4afc=_0x3b25f1['element'];this['setEditableElement'](_0x3b25f1['name'],_0xfa4afc),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x28bdb8['attachDomRoot'](_0xfa4afc),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
_0x2621e6(_0x1f4cfd){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
((()=>Nt)());constructor(_0x2880e6={}){function _0xf0037e(_0x2b64e2){return _0x2b64e2['map'](_0xe46ecf=>String['fromCharCode'](_0xe46ecf))['join']('');}(_0x2880e6=Object['assign']({},_0x2880e6))['plugins']||(_0x2880e6['plugins']=Qt['defaultPlugins']),super(_0x2880e6),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xf0037e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xf0037e([0x76,0x69,0x65,0x77])][_0xf0037e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xf0037e([0x61,0x75,0x74,0x6f]),this[_0xf0037e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xf0037e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xf0037e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xf0037e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xf0037e([0x6f,0x6b])});}['create'](){const _0x33f15b=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x33f15b))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x4598da=>{const _0x29d424=this['model']['document']['getRoot'](),_0x2e19e5=_0x29d424&&_0x29d424['getChild'](_0x29d424['childCount']-0x1);_0x4598da['setSelection'](_0x2e19e5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3bd306=this['editing']['view'],_0x51b409=_0x3bd306['document']['getRoot'](),_0x236d58=_0x51b409['getChild'](0x0);_0x51b409['childCount']>0x1||!_0x236d58||'p'!=_0x236d58['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x3bd306,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x236d58['placeholder']=this['placeholder']),Ft({'view':_0x3bd306,'element':_0x236d58,'keepOnFocus':!0x0}),this['placeholderElement']=_0x236d58);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x32ac0e,_0x2e0232={}){super(_0x32ac0e),this['editor']=null,this['_editorConfig']=_0x2e0232,this['set']('value',_0x2e0232['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x32ac0e,'Reply...')),this['set']('submitLabel',E(_0x32ac0e,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x355188(),this['focusCycler']=new _0x346817({'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',(_0x5d76b8,_0x3596de)=>{this['cancelButtonView']['fire']('execute'),_0x3596de();}),this['keystrokes']['set']('Ctrl+Enter',(_0x85c1f3,_0x59b06d)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x59b06d());}),this['on']('submit',(_0x10f77c,_0x44772a)=>{_0x44772a['length']>0xfde8?(alert(E(_0x32ac0e,'TOO_LONG_COMMENT_ALERT',[_0x44772a['length'],0xfde8])),_0x10f77c['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x7b9801=this['editor'];this['element']['insertBefore'](_0x7b9801['ui']['element'],this['element']['firstChild']),_0x7b9801['model']['document']['on']('change',()=>this['value']=_0x7b9801['getData']()),_0x7b9801['bind']('placeholder')['to'](this),this['focusables']['add'](_0x7b9801['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x29d11b){-0x1===_0x29d11b?(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:_0x455ad8}=this,_0x1b3585=new _0x11514e(_0x455ad8);return _0x1b3585['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1b3585['withText']=!0x0,_0x1b3585['bind']('label')['to'](this,'submitLabel'),_0x1b3585['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1b3585['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2abed7,_0xa17ccc)=>!_0xa17ccc&&!!_0x2abed7['trim']()),_0x1b3585;}['_createCancelButton'](){const {locale:_0x44f2bd}=this,_0xe7a32f=new _0x11514e(_0x44f2bd);return _0xe7a32f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xe7a32f['label']=E(_0x44f2bd,'Cancel'),_0xe7a32f['withText']=!0x0,_0xe7a32f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xe7a32f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3f7627=>{this['focusTracker']['add'](_0x3f7627['element']);}),this['focusables']['on']('change',(_0x2f27b6,_0x34a175)=>{for(const _0x5f086a of Array['from'](_0x34a175['added'])['reverse']())this['focusTracker']['add'](_0x5f086a['element']);});}}class ie extends kt{constructor(_0x265588,_0x5c2113,_0x225802){super(_0x265588),this['commentInputView']=new os(_0x265588,_0x225802),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x20d73c,_0x1a95d9)=>_0x20d73c||!!_0x1a95d9),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 _0x4c2bd2(_0x265588,_0x5c2113),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'](_0xe3a35f){this['commentInputView']['focus'](_0xe3a35f);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x125f8c,_0x2718eb)=>{const {submitButtonView:_0x3f005b,cancelButtonView:_0xc7d4c4,editor:_0x3eb508}=this['commentInputView'];[_0x3f005b['element'],_0xc7d4c4['element'],_0x3eb508?_0x3eb508['editing']['view']['getDomRoot']():null]['filter'](_0x3e42ec=>_0x3e42ec)['some'](_0x4f35d4=>_0x4f35d4['contains'](_0x2718eb['target']))||(this['focus'](),_0x2718eb['preventDefault']());});}}class cs extends kt{constructor(_0x391787){super(_0x391787);const _0x243089=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x243089['to']('count',_0x3d1958=>E(_0x391787,'NUMBER_OF_COMMENTS',_0x3d1958))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x340b76,_0x1cfc27,_0x480895){super(_0x340b76);const _0x14aca6=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1cfc27['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1cfc27,this['_config']=_0x480895,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x355188(),this['keystrokes']=new jt(),this['focusCycler']=new _0x346817({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e6a7c=>this['commentViews']['map'](_0x3c9999=>_0x3c9999['element'])['includes'](_0x3e6a7c['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x340b76),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x991b47=>_0x991b47-this['_config']['maxCommentsWhenCollapsed']);for(const _0x284fe3 of _0x1cfc27['comments'])this['_handleNewCommentModel'](_0x284fe3);this['_handleInfoComment'](),this['listenTo'](_0x1cfc27['comments'],'add',(_0x3593af,_0x50135a)=>{const _0x22c607=this['_calculatePosition'](_0x50135a);this['length']++,this['_handleNewCommentModel'](_0x50135a,_0x22c607),this['refreshVisibleViews']();}),this['listenTo'](_0x1cfc27['comments'],'remove',(_0x2dbe6d,_0x58f621)=>{this['length']--,this['_handleRemoveCommentModel'](_0x58f621),this['refreshVisibleViews']();}),this['listenTo'](_0x1cfc27,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1cfc27,'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',_0x14aca6['if']('length','ck-hidden',_0x29ff61=>!_0x29ff61)],'aria-label':E(_0x340b76,'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'](_0x488ce8){-0x1===_0x488ce8?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3891ec of this['commentViews'])_0x3891ec['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0xb78afe,_0x2febda){const _0x4b557f=new this['_config']['CommentView'](this['locale'],_0xb78afe,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4b557f['viewUid']=_0xb78afe['id'],_0x4b557f['delegate']('removeComment')['to'](this),_0x4b557f['delegate']('updateComment')['to'](this),_0x4b557f['delegate']('resolveCommentThread')['to'](this),_0x4b557f['delegate']('editorReady')['to'](this),_0x4b557f['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4b557f,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4b557f,_0x2febda);}['_calculatePosition'](_0x528330){const _0x1e5b7c=this['_model']['_findOptimalIndex'](_0x528330);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x528330['authoredAt']?_0x1e5b7c-0x1:_0x1e5b7c:_0x1e5b7c-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4f7d98={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x4f7d98,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4f7d98));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1ed624){const _0x1372a1=this['commentViews']['remove'](_0x1ed624['id']);this['stopListening'](_0x1372a1),_0x1372a1['isEditMode']&&this['_updateHasDirtyComment'](),_0x1372a1['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3b1967=>_0x3b1967['isEditMode']);}['_rearrangeCollapse'](){const _0x2e501a=function(_0x29acfe){const _0x156e28=new _0x2d8e4d();for(const _0x315920 of _0x29acfe)_0x156e28['add'](_0x315920);return _0x156e28;}(this['commentViews']),_0xd40651=this['_collapsedCommentsView']['count'];for(let _0x175c49=0x1;_0x175c49<=_0xd40651;_0x175c49++)_0x2e501a['remove'](0x1);for(const _0x15214e of _0x2e501a)_0x15214e['collapse']();_0xd40651>0x0&&_0x2e501a['add'](this['_collapsedCommentsView'],0x1),ns(_0x2236a8(Array['from'](this['visibleViews']),Array['from'](_0x2e501a)),this['visibleViews'],_0x2e501a);}['_rearrangeExpand'](){ns(_0x2236a8(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x57c757 of this['visibleViews'])_0x57c757['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x111815=>{this['focusTracker']['add'](_0x111815['element']),this['keystrokes']['listenTo'](_0x111815['element']);}),this['commentViews']['on']('change',(_0x36f139,_0x2150c0)=>{for(const _0xed99ca of _0x2150c0['removed'])this['focusTracker']['remove'](_0xed99ca['element']),this['keystrokes']['stopListening'](_0xed99ca['element']);for(const _0x57a42a of Array['from'](_0x2150c0['added'])['reverse']())this['focusTracker']['add'](_0x57a42a['element']),this['keystrokes']['listenTo'](_0x57a42a['element']);});}}function ns(_0xd906de,_0x146a65,_0x582bd9){let _0x34dc89=0x0;for(const _0x4a7a00 of _0xd906de)switch(_0x4a7a00){case'insert':_0x146a65['add'](_0x582bd9['get'](_0x34dc89),_0x34dc89),_0x34dc89++;break;case'delete':_0x146a65['remove'](_0x34dc89);break;case'equal':_0x34dc89++;}}class as extends kt{constructor(_0x43f5eb){super(_0x43f5eb);const _0x58da9d=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x58da9d['to']('contextValue',_0xaa8105=>E(_0x43f5eb,'THREAD_CONTEXT_LABEL',_0xaa8105)),'tabindex':-0x1},'children':[{'text':_0x58da9d['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x573b3c,_0x4f5412){super(_0x573b3c);const _0x5686a7=this['bindTemplate'];this['_model']=_0x4f5412,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x355188(),this['keystrokes']=new jt(),this['focusCycler']=new _0x346817({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x10cfc4=>!!_0x10cfc4),this['bind']('contextValue')['to'](this['_model'],'context',_0x338ae0=>_0x338ae0&&_0x338ae0['value']?this['_trimContextValue'](_0x338ae0['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x5686a7['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 _0x1417d0=new _0x11514e(this['locale']);return _0x1417d0['label']=E(this['locale'],'Reopen'),_0x1417d0['tooltip']=E(this['locale'],'Reopen'),_0x1417d0['icon']=_0x54791e,_0x1417d0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x30053e=>!_0x30053e),_0x1417d0['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x53cc71,_0x1f14d0)=>_0x53cc71&&_0x1f14d0),_0x1417d0['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1417d0;}['_trimContextValue'](_0x2f50ef){if(_0x2f50ef['length']<0x96)return _0x2f50ef;const _0x2f8f4d=_0x2f50ef['lastIndexOf']('\x20',0x93);return _0x2f50ef['substring'](0x0,_0x2f8f4d>-0x1?_0x2f8f4d:0x93)+'...';}['_attachContextActions'](){const _0x571961=this['element']['querySelector']('.ck-context'),_0xba95d1=_0x571961['querySelector']('.ck-context__value');this['listenTo'](_0x571961,'mouseenter',()=>{_0xba95d1['offsetWidth']<_0xba95d1['scrollWidth']&&_0x571961['classList']['add']('overlay');}),this['listenTo'](_0x571961,'mouseleave',()=>{_0x571961['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3971fe of this['focusables'])this['focusTracker']['add'](_0x3971fe['element']),this['keystrokes']['listenTo'](_0x3971fe['element']);}['_createContextView'](){const _0x4f9927=new as(this['locale']);return _0x4f9927['bind']('contextValue')['to'](this),_0x4f9927;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x238e13,_0x399854,_0x370fe9,_0x519a63){super(_0x238e13),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x399854,this['_localUser']=_0x370fe9,this['_config']=_0x519a63,this['commentThreadHeaderView']=new Xt(_0x238e13,_0x399854),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x238e13,E(_0x238e13,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x238e13,_0x399854,Object['assign']({'CommentView':this['_config']['CommentView']},_0x519a63)),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',(_0x3f6e3b,_0x4b0eae)=>_0x3f6e3b||!!_0x4b0eae),this['bind']('isUnlinked')['to'](_0x399854,'unlinkedAt',_0x18b963=>!!_0x18b963),this['bind']('ariaLabel')['to'](this,'length',_0x524946=>{const _0x1c0148=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x524946,_0x1c0148]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x355188(),this['keystrokes']=new jt(),this['focusCycler']=new _0x346817({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x465765=>_0x465765['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 _0x4ab72b=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x33d8e4=_0x4ab72b['commentInputView'];return _0x4ab72b['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x33d8e4,'value',(_0x17a750,_0x3d7fcc,_0x32f0a5,_0x1892a,_0x35e89d)=>!!_0x35e89d||!!_0x1892a&&_0x32f0a5&&!_0x3d7fcc||_0x17a750&&_0x32f0a5&&!_0x3d7fcc),_0x33d8e4['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x495cb8,_0x19dbcf,_0x538a7d)=>{let _0x419232;return _0x419232=_0x538a7d&&_0x19dbcf?'Reply\x20to\x20reopen\x20discussion...':_0x495cb8?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x419232);}),_0x33d8e4['bind']('submitLabel')['to'](this,'length',_0x345d4b=>E(this['locale'],_0x345d4b?'Reply':'Comment')),_0x33d8e4['on']('submit',(_0x1ce0ce,_0x2cf68d)=>{this['fire']('addComment',_0x2cf68d),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x33d8e4['on']('cancel',()=>{this['focus']();}),_0x33d8e4['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x33d8e4['on']('cancel',_0x5a6ed6=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5a6ed6['stop']());}),this['on']('change:isActive',(_0xbd3a9d,_0x3b9cb5,_0x4a2f3d)=>{_0x4a2f3d||this['length']||_0x33d8e4['value']||this['fire']('removeCommentThread');}),_0x4ab72b;}}class vt extends/* #__PURE__ -- @preserve */
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x56c053,_0x27e2e1,_0x323496,_0x125842){super(_0x56c053,_0x27e2e1,_0x323496,_0x125842),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x56c053,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0xed0c15,_0x10189a,_0x42392f)=>{_0x42392f||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1affb9,_0x1ee90c,_0x5a1bf7)=>{_0x5a1bf7&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x510077=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x510077['if']('isActive','ck-thread--active'),_0x510077['if']('isUnlinked','ck-thread--unlinked'),_0x510077['if']('isConfirm','ck-thread--remove-confirmation'),_0x510077['to']('actionIndicator',_0x5f1154=>_0x5f1154?'ck-thread--'+_0x5f1154:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x510077['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 _0xae4048 of this['commentsListView']['commentViews'])_0xae4048['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3241e2}=this,_0x4abe2e=this['commentsListView']['commentViews']['get'](0x0);_0x4abe2e===this['_boundFirstCommentView']||_0x4abe2e['isSystemComment']||(this['_boundFirstCommentView']=_0x4abe2e,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x4abe2e,'actionIndicator',_0x1b8698=>'remove'===_0x1b8698?'remove':null),_0x4abe2e['placeholder']=E(_0x3241e2,'Write\x20a\x20comment...'),_0x4abe2e['removeButton']['on']('execute',_0x370c98=>{_0x370c98['stop'](),this['showConfirm'](E(_0x3241e2,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x4abe2e['focus']();}),_0x4abe2e['actionBar']['add'](this['resolveButton'],0x0),_0x4abe2e['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xbd2b75=new _0x50854c(this['locale']);return _0xbd2b75['label']=E(this['locale'],'Resolve'),_0xbd2b75['tooltip']=E(this['locale'],'Resolve'),_0xbd2b75['icon']=_0x57d49c,_0xbd2b75['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xbd2b75['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4eb317=>!_0x4eb317),_0xbd2b75['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4a885f,_0x4f976)=>_0x4a885f&&!_0x4f976),_0xbd2b75['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xbd2b75;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x30fe06){super(_0x30fe06),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x5cfd6b,_0x52e049,_0x36c970)=>{this['element']['innerHTML']=_0x36c970;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x3ae632,_0x502706,_0xe18c3){super(_0x3ae632),this['_model']=_0x502706,this['_config']=_0xe18c3,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x502706,'content',_0x502706,'authoredAt',(_0x9f74ab,_0x4206d3)=>E(_0x3ae632,'COMMENT_ARIA_LABEL',[_0x502706['author']['name'],_0xe18c3['formatDateTime'](_0x4206d3),new DOMParser()['parseFromString'](_0x9f74ab,'text/html')['body']['textContent'],_0x502706['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x3ae632,E(_0x3ae632,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x3b3b3c(),this['focusTracker']=new _0x355188(),this['keystrokes']=new jt(),this['focusCycler']=new _0x346817({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x36a6c3=>_0x36a6c3['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x5327be=new es(this['locale']);return _0x5327be['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x16c26c,_0x48cfa2)=>_0x48cfa2?_0x2496da(_0x16c26c,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x16c26c),_0x5327be;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x1960c5=new os(this['locale'],this['_config']['editorConfig']);return _0x1960c5['value']=this['_model']['content'],_0x1960c5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1960c5['submitLabel']=E(this['locale'],'Save'),_0x1960c5['on']('submit',(_0x58cc8f,_0x1442df)=>{this['fire']('updateComment',this['_model']['id'],_0x1442df),this['switchToDisplayMode'](),this['focus']();}),_0x1960c5['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x1960c5['once']('editorReady',()=>{_0x1960c5['focus']();}),_0x1960c5['createEditor'](),_0x1960c5['delegate']('editorReady')['to'](this),_0x1960c5['delegate']('editorDestroyed')['to'](this),_0x1960c5;}['_setupKeyboardNavigation'](){const _0x42155c=this['element'];this['keystrokes']['listenTo'](_0x42155c);for(const _0xd915de of this['focusables'])this['focusTracker']['add'](_0xd915de['element']),this['keystrokes']['listenTo'](_0xd915de['element']);this['focusables']['on']('change',(_0x312491,_0x54ba8e)=>{for(const _0x4d95a5 of _0x54ba8e['removed'])this['focusTracker']['remove'](_0x4d95a5['element']),this['keystrokes']['stopListening'](_0x4d95a5['element']);for(const _0x91889 of _0x54ba8e['added'])this['focusTracker']['add'](_0x91889['element']),this['keystrokes']['listenTo'](_0x91889['element']);}),this['keystrokes']['set']('enter',(_0x1b8492,_0x3569ea)=>{_0x42155c===_0x1b8492['target']&&(this['focusCycler']['focusFirst'](),_0x3569ea());}),this['keystrokes']['set']('esc',(_0x19036b,_0x1eea0b)=>{_0x42155c!==_0x19036b['target']&&(this['focus'](),_0x1eea0b());});}}class gt extends/* #__PURE__ -- @preserve */
ti(hs){['actionBar'];['userView'];constructor(_0x3200e3,_0x49c3f2,_0x2797fe){super(_0x3200e3,_0x49c3f2,_0x2797fe),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x3200e3,'Reply...')),this['bind']('authoredAt')['to'](_0x49c3f2),this['bind']('resolvedAt')['to'](_0x49c3f2),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 _0x4c2bd2(_0x3200e3,_0x49c3f2['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x49c3f2,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x2a0557=this['bindTemplate'],_0x4dba9c=[{'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':_0x2a0557['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2a0557['to']('authoredAt',_0x1f45d9=>this['_config']['formatDateTime'](_0x1f45d9))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2a0557['if']('isEditMode','ck-comment__actions--hidden'),_0x2a0557['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']&&_0x4dba9c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x2a0557['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x2a0557['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2a0557['if']('isEditMode','ck-comment--edit'),_0x2a0557['if']('isSystemComment','ck-comment--info'),_0x2a0557['to']('actionIndicator',_0x3d64d1=>_0x3d64d1?'ck-comment--'+_0x3d64d1:'')],'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':_0x4dba9c}]}]};}['_createEditButton'](){const _0x1156be=new _0x11514e(this['locale']);return _0x1156be['label']=E(this['locale'],'Edit'),_0x1156be['icon']=_0x3abff9,_0x1156be['withText']=!0x0,_0x1156be['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1156be['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4794aa=>!_0x4794aa),_0x1156be['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1156be['on']('execute',()=>this['switchToEditMode']()),_0x1156be;}['_createRemoveButton'](){const _0x4ffd4a=new _0x11514e(this['locale']);return _0x4ffd4a['label']=E(this['locale'],'Remove'),_0x4ffd4a['icon']=_0x21ca4e,_0x4ffd4a['withText']=!0x0,_0x4ffd4a['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4ffd4a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1de895=>!_0x1de895),_0x4ffd4a['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4ffd4a['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4ffd4a;}['_createDropdown'](){const _0x3f72f2=_0x39ce0f(this['locale'],_0x4a94cc),_0x10bcde=_0x3f72f2['panelView']['children'],_0x5e0bae=new _0x562f1b(this['locale']),_0x3432c1=_0x3f72f2['bindTemplate'];_0x226139(_0x3f72f2,()=>this['items']['find'](_0x179020=>_0x179020['isVisible'])),_0x3f72f2['extendTemplate']({'attributes':{'class':[_0x3432c1['if']('isVisible','ck-hidden',_0x410118=>!_0x410118)]}});const _0x52c8f2=(_0xfb8028,_0x23bc6e=-0x1)=>{const _0x300424=new _0x6bed2(this['locale']);_0x300424['children']['add'](_0xfb8028);const _0x1ffcf3=_0x23bc6e>-0x1?_0x23bc6e:_0x5e0bae['items']['length'];_0x5e0bae['items']['add'](_0x300424,_0x1ffcf3);const _0x5be031=Array['from'](this['items']);_0x3f72f2['unbind']('isEnabled','isVisible'),_0x3f72f2['bind']('isEnabled')['toMany'](_0x5be031,'isEnabled',(..._0x4cd7db)=>_0x4cd7db['some'](_0x51275a=>_0x51275a)),_0x3f72f2['bind']('isVisible')['toMany'](_0x5be031,'isVisible',(..._0x2d6242)=>_0x2d6242['some'](_0x7df1c=>_0x7df1c));};_0x3f72f2['panelPosition']='sw',_0x3f72f2['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x45c7ed});for(const _0x569bc7 of this['items'])_0x52c8f2(_0x569bc7);return _0x10bcde['add'](_0x5e0bae),_0x3f72f2['listenTo'](this['items'],'add',(_0x25ae07,_0x5b22bf,_0x246d8d)=>{_0x52c8f2(_0x5b22bf,_0x246d8d);}),_0x3f72f2['listenTo'](this['items'],'remove',(_0x1c7bbd,_0x5da469,_0x150fba)=>{_0x5e0bae['items']['remove'](_0x150fba);}),_0x3f72f2;}['_attachActions'](_0x193d61,_0xab8738){const _0x2e979d=_0x193d61&&_0x193d61['element'];_0x2e979d&&(this['listenTo'](_0x2e979d,'mouseenter',()=>this['actionIndicator']=_0xab8738),this['listenTo'](_0x2e979d,'focus',()=>this['actionIndicator']=_0xab8738),this['listenTo'](_0x2e979d,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2e979d,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x44eee3=super['_createCommentInputView']();return _0x44eee3['bind']('placeholder')['to'](this),_0x44eee3;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x2e66a0){const _0x373ca6=Dt(_0x2e66a0,0x1e),_0x31461d=new MutationObserver(_0xaa3c82=>{for(const _0x41bdd5 of _0xaa3c82)('attributes'==_0x41bdd5['type']&&'class'==_0x41bdd5['attributeName']||'childList'==_0x41bdd5['type']||'characterData'==_0x41bdd5['type'])&&_0x373ca6();});return{'attach'(_0x1a5b91){