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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.umd.js +1 -1
  3. package/dist/translations/ar.umd.js +1 -1
  4. package/dist/translations/ast.umd.js +1 -1
  5. package/dist/translations/az.umd.js +1 -1
  6. package/dist/translations/be.umd.js +1 -1
  7. package/dist/translations/bg.umd.js +1 -1
  8. package/dist/translations/bn.umd.js +1 -1
  9. package/dist/translations/bs.umd.js +1 -1
  10. package/dist/translations/ca.umd.js +1 -1
  11. package/dist/translations/cs.umd.js +1 -1
  12. package/dist/translations/da.umd.js +1 -1
  13. package/dist/translations/de-ch.umd.js +1 -1
  14. package/dist/translations/de.umd.js +1 -1
  15. package/dist/translations/el.umd.js +1 -1
  16. package/dist/translations/en-au.umd.js +1 -1
  17. package/dist/translations/en-gb.umd.js +1 -1
  18. package/dist/translations/en.umd.js +1 -1
  19. package/dist/translations/eo.umd.js +1 -1
  20. package/dist/translations/es-co.umd.js +1 -1
  21. package/dist/translations/es.umd.js +1 -1
  22. package/dist/translations/et.umd.js +1 -1
  23. package/dist/translations/eu.umd.js +1 -1
  24. package/dist/translations/fa.umd.js +1 -1
  25. package/dist/translations/fi.umd.js +1 -1
  26. package/dist/translations/fr.umd.js +1 -1
  27. package/dist/translations/gl.umd.js +1 -1
  28. package/dist/translations/gu.umd.js +1 -1
  29. package/dist/translations/he.umd.js +1 -1
  30. package/dist/translations/hi.umd.js +1 -1
  31. package/dist/translations/hr.umd.js +1 -1
  32. package/dist/translations/hu.umd.js +1 -1
  33. package/dist/translations/hy.umd.js +1 -1
  34. package/dist/translations/id.umd.js +1 -1
  35. package/dist/translations/it.umd.js +1 -1
  36. package/dist/translations/ja.umd.js +1 -1
  37. package/dist/translations/jv.umd.js +1 -1
  38. package/dist/translations/kk.umd.js +1 -1
  39. package/dist/translations/km.umd.js +1 -1
  40. package/dist/translations/kn.umd.js +1 -1
  41. package/dist/translations/ko.umd.js +1 -1
  42. package/dist/translations/ku.umd.js +1 -1
  43. package/dist/translations/lt.umd.js +1 -1
  44. package/dist/translations/lv.umd.js +1 -1
  45. package/dist/translations/ms.umd.js +1 -1
  46. package/dist/translations/nb.umd.js +1 -1
  47. package/dist/translations/ne.umd.js +1 -1
  48. package/dist/translations/nl.umd.js +1 -1
  49. package/dist/translations/no.umd.js +1 -1
  50. package/dist/translations/oc.umd.js +1 -1
  51. package/dist/translations/pl.umd.js +1 -1
  52. package/dist/translations/pt-br.umd.js +1 -1
  53. package/dist/translations/pt.umd.js +1 -1
  54. package/dist/translations/ro.umd.js +1 -1
  55. package/dist/translations/ru.umd.js +1 -1
  56. package/dist/translations/si.umd.js +1 -1
  57. package/dist/translations/sk.umd.js +1 -1
  58. package/dist/translations/sl.umd.js +1 -1
  59. package/dist/translations/sq.umd.js +1 -1
  60. package/dist/translations/sr-latn.umd.js +1 -1
  61. package/dist/translations/sr.umd.js +1 -1
  62. package/dist/translations/sv.umd.js +1 -1
  63. package/dist/translations/th.umd.js +1 -1
  64. package/dist/translations/ti.umd.js +1 -1
  65. package/dist/translations/tk.umd.js +1 -1
  66. package/dist/translations/tr.umd.js +1 -1
  67. package/dist/translations/tt.umd.js +1 -1
  68. package/dist/translations/ug.umd.js +1 -1
  69. package/dist/translations/uk.umd.js +1 -1
  70. package/dist/translations/ur.umd.js +1 -1
  71. package/dist/translations/uz.umd.js +1 -1
  72. package/dist/translations/vi.umd.js +1 -1
  73. package/dist/translations/zh-cn.umd.js +1 -1
  74. package/dist/translations/zh.umd.js +1 -1
  75. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Command as _0x44703a,Context as _0x4d8ccf,ContextPlugin as _0xe32c07,Editor as _0x458c52,PendingActions as _0x24dddb,Plugin as _0x12b188}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x3fd207,Collection as _0x5d687e,DomEmitterMixin as _0x30f8a8,FocusTracker as _0x4804cc,KeystrokeHandler as _0x225c8d,ObservableMixin as _0x1bcd46,Rect as _0x1f4f60,diff as _0x46451d,first as _0x9ba8a7,getEnvKeystrokeText as _0x10baf1,keyCodes as _0x5f035e,priorities as _0x4103ab,scrollViewportToShowTarget as _0x38c3bf,toUnit as _0x26abaa,uid as _0x185ea0}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x5319be,ConfirmMixin as _0x327e2c,FOCUS_ANNOTATION_KEYSTROKE as _0x14d518,LateFocusButtonView as _0x3a79be,LateFocusDropdownButtonView as _0x1dc2cf,UserView as _0x29d00e,Users as _0x23b29b,getAllMarkersDomElementsSorted as _0x71726c,getDateTimeFormatter as _0x110226,hashObject as _0x4543c7,setupThreadKeyboardNavigation as _0x146ecb,surroundingMarkersDetector as _0x1b50a0,trimHtml as _0x1f45e6}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x2dad8a,debounce as _0x98290e,isEqual as _0x11ae2a,set as _0x200648,throttle as _0xdb138e,unset as _0x4c0a55}from'es-toolkit/compat';import{IconAddComment as _0x1aed3d,IconCheck as _0x3237c4,IconCommentsArchive as _0x2a22ba,IconPencil as _0x38ac55,IconRemoveComment as _0x52171e,IconThreeVerticalDots as _0x2c70f9,IconUndo as _0x4884c7}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x4f61cf,BodyCollection as _0x456151,ButtonView as _0x422b1d,ContextualBalloon as _0xbf878f,Dialog as _0x3da253,DialogViewPosition as _0x56ba8b,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
- _0x1bcd46();var bt=class extends It{['model'];['view'];constructor(_0x45c665,_0xbbfe45){super(),this['model']=_0x45c665,this['model']['_isAttached']=!0x0,this['view']=_0xbbfe45,this['listenTo'](_0xbbfe45,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0xbbfe45,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0xbbfe45,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0xbbfe45,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0xbbfe45,'addComment',(_0x27f93e,_0x6bd991)=>this['addComment'](_0x6bd991)),this['listenTo'](_0xbbfe45,'updateComment',(_0x5a1135,_0x534849,_0x53e3a9)=>this['updateComment'](_0x534849,_0x53e3a9)),this['listenTo'](_0xbbfe45,'removeComment',(_0x4d008b,_0xa6e9fb)=>this['removeComment'](_0xa6e9fb));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x4d45d4){this['model']['addComment']({'content':_0x4d45d4,'authorId':this['view']['_localUser']['id']});}updateComment(_0x210a3f,_0x98e91c){this['model']['getComment'](_0x210a3f)['update']({'content':_0x98e91c});}removeComment(_0x1f9099){this['model']['getComment'](_0x1f9099)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x2c66e4,_0x51e9c7,_0x1de845){const t=_0x2c66e4['t'];switch(_0x51e9c7){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'},_0x1de845);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x1de845);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'},_0x1de845);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'},_0x1de845);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1de845);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'},_0x1de845);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'},_0x1de845);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'},_0x1de845);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'';}}var kt=class extends it{['main'];editable;constructor(_0x59d09d,_0x1df671){super(_0x59d09d);const _0xef0b36=_0x185ea0();this['main']=this['createCollection'](),this['editable']=new st(_0x59d09d,_0x1df671,void 0x0,{'label':()=>Et(_0x59d09d,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x59d09d['uiLanguageDirection'],'lang':_0x59d09d['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xef0b36},'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']();}},Nt=class extends tt{['view'];constructor(_0xc6d1a0){super(_0xc6d1a0),this['view']=new kt(_0xc6d1a0['locale'],_0xc6d1a0['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x11c928=this['editor']['editing']['view'],_0x4f4353=this['view']['editable'];_0x4f4353['name']=_0x11c928['document']['getRoot']()['rootName'],this['view']['render']();const _0x3f54c4=_0x4f4353['element'];this['setEditableElement'](_0x4f4353['name'],_0x3f54c4),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x11c928['attachDomRoot'](_0x3f54c4),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
- _0x1bcd46(_0x458c52);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
- ((()=>Ot)());constructor(_0x391ad5={}){(_0x391ad5=Object['assign']({},_0x391ad5))['plugins']||(_0x391ad5['plugins']=CommentEditor['defaultPlugins']),super(_0x391ad5),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0x57cddd=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x57cddd))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3ca089=>{const _0x1631f2=this['model']['document']['getRoot'](),_0x3186bc=_0x1631f2&&_0x1631f2['getChild'](_0x1631f2['childCount']-0x1);_0x3ca089['setSelection'](_0x3186bc,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x414654=this['editing']['view'],_0x1e55b6=_0x414654['document']['getRoot'](),_0x372c1e=_0x1e55b6['getChild'](0x0);_0x1e55b6['childCount']>0x1||!_0x372c1e||'p'!=_0x372c1e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x414654,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x372c1e['placeholder']=this['placeholder']),ut({'view':_0x414654,'element':_0x372c1e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x372c1e);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x3ac517,_0x2d1a2d={}){super(_0x3ac517),this['editor']=null,this['_editorConfig']=_0x2d1a2d,this['set']('value',_0x2d1a2d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x3ac517,'Reply...')),this['set']('submitLabel',Et(_0x3ac517,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x225c8d(),this['focusTracker']=new _0x4804cc(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5d3268=>!_0x5d3268['defaultPrevented']},'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',(_0x4966b3,_0x438be2)=>{this['cancelButtonView']['fire']('execute'),_0x438be2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x1dbfe9,_0x4772de)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4772de());}),this['on']('submit',(_0x3005a9,_0x255629)=>{_0x255629['length']>0xfde8?(alert(Et(_0x3ac517,'TOO_LONG_COMMENT_ALERT',[_0x255629['length'],0xfde8])),_0x3005a9['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2ac213=this['editor'];this['element']['insertBefore'](_0x2ac213['ui']['element'],this['element']['firstChild']),_0x2ac213['model']['document']['on']('change',()=>this['value']=_0x2ac213['getData']()),_0x2ac213['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2ac213['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x56fedf){-0x1===_0x56fedf?(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:_0x14cd1d}=this,_0x50a0ff=new _0x422b1d(_0x14cd1d);return _0x50a0ff['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x50a0ff['withText']=!0x0,_0x50a0ff['bind']('label')['to'](this,'submitLabel'),_0x50a0ff['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x50a0ff['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x53cbd5,_0x539e9d)=>!_0x539e9d&&!!_0x53cbd5['trim']()),_0x50a0ff;}_createCancelButton(){const {locale:_0x2f0df5}=this,_0x56c0fb=new _0x422b1d(_0x2f0df5);return _0x56c0fb['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x56c0fb['label']=Et(_0x2f0df5,'Cancel'),_0x56c0fb['withText']=!0x0,_0x56c0fb['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x56c0fb;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xead881=>{this['focusTracker']['add'](_0xead881['element']);}),this['focusables']['on']('change',(_0x1effbb,_0x4a20fc)=>{for(const _0x37c6d8 of Array['from'](_0x4a20fc['added'])['reverse']())this['focusTracker']['add'](_0x37c6d8['element']);});}},xt=class extends ht{constructor(_0x9a9658,_0x58988d,_0x572ecc){super(_0x9a9658),this['commentInputView']=new St(_0x9a9658,_0x572ecc),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3a4bb1,_0x34d7a6)=>_0x3a4bb1||!!_0x34d7a6),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 _0x29d00e(_0x9a9658,_0x58988d),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'](_0x1ac69b){this['commentInputView']['focus'](_0x1ac69b);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x3061f1,_0x4e5fb5)=>{const {submitButtonView:_0x17428d,cancelButtonView:_0x31b24c,editor:_0x15eee8}=this['commentInputView'];[_0x17428d['element'],_0x31b24c['element'],_0x15eee8?_0x15eee8['editing']['view']['getDomRoot']():null]['filter'](_0xc7168a=>_0xc7168a)['some'](_0x52b617=>_0x52b617['contains'](_0x4e5fb5['target']))||(this['focus'](),_0x4e5fb5['preventDefault']());});}},Pt=class extends ht{constructor(_0x19d513){super(_0x19d513);const _0x33f646=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x33f646['to']('count',_0x5e1177=>Et(_0x19d513,'NUMBER_OF_COMMENTS',_0x5e1177))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x37d100,_0x8faf96,_0x2144b3){super(_0x37d100);const _0x44ae22=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x8faf96['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x8faf96,this['_config']=_0x2144b3,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1312d9=>this['commentViews']['map'](_0x1cbad5=>_0x1cbad5['element'])['includes'](_0x1312d9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x37d100),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5be0b0=>_0x5be0b0-this['_config']['maxCommentsWhenCollapsed']);for(const _0x9e42d7 of _0x8faf96['comments'])this['_handleNewCommentModel'](_0x9e42d7);this['_handleInfoComment'](),this['listenTo'](_0x8faf96['comments'],'add',(_0x4b365c,_0x5b071b)=>{const _0x2e873b=this['_calculatePosition'](_0x5b071b);this['length']++,this['_handleNewCommentModel'](_0x5b071b,_0x2e873b),this['refreshVisibleViews']();}),this['listenTo'](_0x8faf96['comments'],'remove',(_0x71749,_0x4b7f64)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4b7f64),this['refreshVisibleViews']();}),this['listenTo'](_0x8faf96,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x8faf96,'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',_0x44ae22['if']('length','ck-hidden',_0x1b5a0c=>!_0x1b5a0c)],'aria-label':Et(_0x37d100,'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'](_0x117502){-0x1===_0x117502?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x496a72 of this['commentViews'])_0x496a72['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x2bede2,_0x32245e){const _0x4f3fbb=new this['_config']['CommentView'](this['locale'],_0x2bede2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4f3fbb['viewUid']=_0x2bede2['id'],_0x4f3fbb['delegate']('removeComment')['to'](this),_0x4f3fbb['delegate']('updateComment')['to'](this),_0x4f3fbb['delegate']('resolveCommentThread')['to'](this),_0x4f3fbb['delegate']('editorReady')['to'](this),_0x4f3fbb['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4f3fbb,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4f3fbb,_0x32245e);}_calculatePosition(_0x14f447){const _0x37ebbe=this['_model']['_findOptimalIndex'](_0x14f447);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x14f447['authoredAt']?_0x37ebbe-0x1:_0x37ebbe:_0x37ebbe-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x12d023={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x12d023,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x12d023));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x5235d5){const _0x4ef485=this['commentViews']['remove'](_0x5235d5['id']);this['stopListening'](_0x4ef485),_0x4ef485['isEditMode']&&this['_updateHasDirtyComment'](),_0x4ef485['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1910bc=>_0x1910bc['isEditMode']);}['_rearrangeCollapse'](){const _0x2fc1f1=function(_0xcbee23){const _0x40b705=new _0x5d687e();for(const _0x1a643c of _0xcbee23)_0x40b705['add'](_0x1a643c);return _0x40b705;}(this['commentViews']),_0x530733=this['_collapsedCommentsView']['count'];for(let _0x2979d6=0x1;_0x2979d6<=_0x530733;_0x2979d6++)_0x2fc1f1['remove'](0x1);for(const _0x158f2c of _0x2fc1f1)_0x158f2c['collapse']();_0x530733>0x0&&_0x2fc1f1['add'](this['_collapsedCommentsView'],0x1),Dt(_0x46451d(Array['from'](this['visibleViews']),Array['from'](_0x2fc1f1)),this['visibleViews'],_0x2fc1f1);}['_rearrangeExpand'](){Dt(_0x46451d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x569d04 of this['visibleViews'])_0x569d04['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x2a962b=>{this['focusTracker']['add'](_0x2a962b['element']),this['keystrokes']['listenTo'](_0x2a962b['element']);}),this['commentViews']['on']('change',(_0x20010d,_0x11e875)=>{for(const _0x301ed3 of _0x11e875['removed'])this['focusTracker']['remove'](_0x301ed3['element']),this['keystrokes']['stopListening'](_0x301ed3['element']);for(const _0x1ebd5f of Array['from'](_0x11e875['added'])['reverse']())this['focusTracker']['add'](_0x1ebd5f['element']),this['keystrokes']['listenTo'](_0x1ebd5f['element']);});}};function Dt(_0x1a6281,_0x495cca,_0x3b40b0){let _0x2b73bd=0x0;for(const _0x37b7b1 of _0x1a6281)switch(_0x37b7b1){case'insert':_0x495cca['add'](_0x3b40b0['get'](_0x2b73bd),_0x2b73bd),_0x2b73bd++;break;case'delete':_0x495cca['remove'](_0x2b73bd);break;case'equal':_0x2b73bd++;}}var Vt=class extends ht{constructor(_0x3c0c10){super(_0x3c0c10);const _0x2d5ce9=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2d5ce9['to']('contextValue',_0xefef5a=>Et(_0x3c0c10,'THREAD_CONTEXT_LABEL',_0xefef5a)),'tabindex':-0x1},'children':[{'text':_0x2d5ce9['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x5259e3,_0x405230){super(_0x5259e3);const _0x557b71=this['bindTemplate'];this['_model']=_0x405230,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4f1bfa=>!!_0x4f1bfa),this['bind']('contextValue')['to'](this['_model'],'context',_0x3dcd57=>_0x3dcd57&&_0x3dcd57['value']?this['_trimContextValue'](_0x3dcd57['value']):Et(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',_0x557b71['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 _0x30d218=new _0x422b1d(this['locale']);return _0x30d218['label']=Et(this['locale'],'Reopen'),_0x30d218['tooltip']=Et(this['locale'],'Reopen'),_0x30d218['icon']=_0x4884c7,_0x30d218['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a4322=>!_0x2a4322),_0x30d218['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x12a50e,_0x3b2e70)=>_0x12a50e&&_0x3b2e70),_0x30d218['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x30d218;}_trimContextValue(_0x57e2aa){if(_0x57e2aa['length']<0x96)return _0x57e2aa;const _0x3f9e04=_0x57e2aa['lastIndexOf']('\x20',0x93);return _0x57e2aa['substring'](0x0,_0x3f9e04>-0x1?_0x3f9e04:0x93)+'...';}_attachContextActions(){const _0x34b0b8=this['element']['querySelector']('.ck-context'),_0x11f668=_0x34b0b8['querySelector']('.ck-context__value');this['listenTo'](_0x34b0b8,'mouseenter',()=>{_0x11f668['offsetWidth']<_0x11f668['scrollWidth']&&_0x34b0b8['classList']['add']('overlay');}),this['listenTo'](_0x34b0b8,'mouseleave',()=>{_0x34b0b8['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x3f308c of this['focusables'])this['focusTracker']['add'](_0x3f308c['element']),this['keystrokes']['listenTo'](_0x3f308c['element']);}_createContextView(){const _0x5d0bea=new Vt(this['locale']);return _0x5d0bea['bind']('contextValue')['to'](this),_0x5d0bea;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x209854,_0x23801d,_0x572b95,_0x7b49d){super(_0x209854),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x23801d,this['_localUser']=_0x572b95,this['_config']=_0x7b49d,this['commentThreadHeaderView']=new Bt(_0x209854,_0x23801d),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x5319be(_0x209854,Et(_0x209854,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x209854,_0x23801d,Object['assign']({'CommentView':this['_config']['CommentView']},_0x7b49d)),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',(_0x170528,_0x2da179)=>_0x170528||!!_0x2da179),this['bind']('isUnlinked')['to'](_0x23801d,'unlinkedAt',_0x2b8aa6=>!!_0x2b8aa6);let _0x461452=null;const _0x22ed13=()=>{const _0xe9f70d=this['_model']['comments']['first']||null;_0xe9f70d!==_0x461452&&(_0x461452&&this['stopListening'](_0x461452,'change:content'),_0x461452=_0xe9f70d,_0xe9f70d&&this['listenTo'](_0xe9f70d,'change:content',_0x22ed13));const _0x548ae4=_0xe9f70d?_0xe9f70d['author']['name']:this['_localUser']['name'],_0x580166=_0xe9f70d?new DOMParser()['parseFromString'](_0x1f45e6(_0xe9f70d['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x7f409=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x548ae4]);this['set']('ariaLabel',_0x580166?_0x7f409+'\x20'+_0x580166:_0x7f409);};this['listenTo'](this['_model']['comments'],'change',_0x22ed13),_0x22ed13(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x396035=>_0x396035['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x146ecb(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x54c10e=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x55d472=_0x54c10e['commentInputView'];return _0x54c10e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x55d472,'value',(_0x18f2ee,_0x1c0c62,_0x2fa3da,_0xee38a3,_0x52fdb5)=>!!_0x52fdb5||!!_0xee38a3&&_0x2fa3da&&!_0x1c0c62||_0x18f2ee&&_0x2fa3da&&!_0x1c0c62),_0x55d472['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x23e51f,_0x4cea5c,_0x4b6a10)=>{let _0x25311;return _0x25311=_0x4b6a10&&_0x4cea5c?'Reply\x20to\x20reopen\x20discussion...':_0x23e51f?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x25311);}),_0x55d472['bind']('submitLabel')['to'](this,'length',_0x136cc9=>Et(this['locale'],_0x136cc9?'Reply':'Comment')),_0x55d472['on']('submit',(_0x38da2d,_0x3ede04)=>{this['fire']('addComment',_0x3ede04),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x55d472['on']('cancel',()=>{this['focus']();}),_0x55d472['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x55d472['on']('cancel',_0x501c69=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x501c69['stop']());}),this['on']('change:isActive',(_0x23d05c,_0x51939c,_0x5ef1a7)=>{_0x5ef1a7||this['length']||_0x55d472['value']||this['fire']('removeCommentThread');}),_0x54c10e;}};const Ft=/* #__PURE__ -- @preserve */
27
- _0x327e2c(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x5c14ea,_0x3fad2f,_0x4d1f6a,_0x4a29cb){super(_0x5c14ea,_0x3fad2f,_0x4d1f6a,_0x4a29cb),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x5c14ea,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x24a83a,_0x2dc2ae,_0x511aee)=>{_0x511aee||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x4e18b7,_0x4d0952,_0xf6e88e)=>{_0xf6e88e&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0xbab00d=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0xbab00d['if']('isActive','ck-thread--active'),_0xbab00d['if']('isUnlinked','ck-thread--unlinked'),_0xbab00d['to']('actionIndicator',_0x4b29a2=>_0x4b29a2?'ck-thread--'+_0x4b29a2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0xbab00d['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 _0x40546c of this['commentsListView']['commentViews'])_0x40546c['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x2a78e9}=this,_0x296400=this['commentsListView']['commentViews']['get'](0x0);_0x296400===this['_boundFirstCommentView']||_0x296400['isSystemComment']||(this['_boundFirstCommentView']=_0x296400,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x296400,'actionIndicator',_0x5b1a62=>'remove'===_0x5b1a62?'remove':null),_0x296400['placeholder']=Et(_0x2a78e9,'Write\x20a\x20comment...'),_0x296400['removeButton']['on']('execute',_0x21081a=>{_0x21081a['stop'](),this['showConfirm'](Et(_0x2a78e9,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x296400['focus']();}),_0x296400['actionBar']['add'](this['resolveButton'],0x0),_0x296400['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x272ac8=new _0x3a79be(this['locale']);return _0x272ac8['label']=Et(this['locale'],'Resolve'),_0x272ac8['tooltip']=Et(this['locale'],'Resolve'),_0x272ac8['icon']=_0x3237c4,_0x272ac8['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x272ac8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x35ba83=>!_0x35ba83),_0x272ac8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x28c6f7,_0x2d3c99)=>_0x28c6f7&&!_0x2d3c99),_0x272ac8['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x272ac8;}_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']));}},Wt=class extends ht{constructor(_0x54cc6){super(_0x54cc6),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x12bc2e,_0x16194a,_0x33c37f)=>{this['element']['innerHTML']=_0x33c37f;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x1b97e7,_0x5bedd9,_0x255769){super(_0x1b97e7),this['_model']=_0x5bedd9,this['_config']=_0x255769,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x5bedd9,'content',_0x5bedd9,'authoredAt',(_0x59fe68,_0xcb7ef4)=>Et(_0x1b97e7,'COMMENT_ARIA_LABEL',[_0x5bedd9['author']['name'],_0x255769['formatDateTime'](_0xcb7ef4),new DOMParser()['parseFromString'](_0x59fe68,'text/html')['body']['textContent'],_0x5bedd9['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x5319be(_0x1b97e7,Et(_0x1b97e7,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1891f0=>_0x1891f0['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x42707b=new Wt(this['locale']);return _0x42707b['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2bb3e3,_0xe7e608)=>_0xe7e608?_0x1f45e6(_0x2bb3e3,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2bb3e3),_0x42707b;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x490018=new St(this['locale'],this['_config']['editorConfig']);return _0x490018['value']=this['_model']['content'],_0x490018['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x490018['submitLabel']=Et(this['locale'],'Save'),_0x490018['on']('submit',(_0x18df50,_0x1b9317)=>{this['fire']('updateComment',this['_model']['id'],_0x1b9317),this['switchToDisplayMode'](),this['focus']();}),_0x490018['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x490018['once']('editorReady',()=>{_0x490018['focus']();}),_0x490018['createEditor'](),_0x490018['delegate']('editorReady')['to'](this),_0x490018['delegate']('editorDestroyed')['to'](this),_0x490018;}_setupKeyboardNavigation(){const _0x15e512=this['element'];this['keystrokes']['listenTo'](_0x15e512);for(const _0x255d4f of this['focusables'])this['focusTracker']['add'](_0x255d4f['element']),this['keystrokes']['listenTo'](_0x255d4f['element']);this['focusables']['on']('change',(_0x4d2613,_0x74d6b3)=>{for(const _0x21a8fd of _0x74d6b3['removed'])this['focusTracker']['remove'](_0x21a8fd['element']),this['keystrokes']['stopListening'](_0x21a8fd['element']);for(const _0x12575b of _0x74d6b3['added'])this['focusTracker']['add'](_0x12575b['element']),this['keystrokes']['listenTo'](_0x12575b['element']);}),this['keystrokes']['set']('enter',(_0x627ff2,_0x287359)=>{_0x15e512===_0x627ff2['target']&&(this['focusCycler']['focusFirst'](),_0x287359());}),this['keystrokes']['set']('esc',(_0x382575,_0x484c97)=>{_0x15e512!==_0x382575['target']&&(this['focus'](),_0x484c97());});}};const Gt=/* #__PURE__ -- @preserve */
28
- _0x327e2c(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x14c354,_0x30bcf3,_0x2b5b55){super(_0x14c354,_0x30bcf3,_0x2b5b55),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x14c354,'Reply...')),this['bind']('authoredAt')['to'](_0x30bcf3),this['bind']('resolvedAt')['to'](_0x30bcf3),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 _0x29d00e(_0x14c354,_0x30bcf3['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x30bcf3,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x25b980=this['bindTemplate'],_0x33b3d2=[{'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':_0x25b980['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x25b980['to']('authoredAt',_0x7c0640=>this['_config']['formatDateTime'](_0x7c0640))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x25b980['if']('isEditMode','ck-comment__actions--hidden'),_0x25b980['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']&&_0x33b3d2['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x25b980['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x25b980['if']('isEditMode','ck-comment--edit'),_0x25b980['if']('isSystemComment','ck-comment--info'),_0x25b980['to']('actionIndicator',_0x2434d1=>_0x2434d1?'ck-comment--'+_0x2434d1:'')],'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':_0x33b3d2}]}]};}_createEditButton(){const _0x57ba1c=new _0x422b1d(this['locale']);return _0x57ba1c['label']=Et(this['locale'],'Edit'),_0x57ba1c['icon']=_0x38ac55,_0x57ba1c['withText']=!0x0,_0x57ba1c['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x57ba1c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1e2b97=>!_0x1e2b97),_0x57ba1c['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x57ba1c['on']('execute',()=>this['switchToEditMode']()),_0x57ba1c;}_createRemoveButton(){const _0x1b48c1=new _0x422b1d(this['locale']);return _0x1b48c1['label']=Et(this['locale'],'Remove'),_0x1b48c1['icon']=_0x52171e,_0x1b48c1['withText']=!0x0,_0x1b48c1['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1b48c1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x433697=>!_0x433697),_0x1b48c1['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1b48c1['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1b48c1;}_createDropdown(){const _0x2b9f86=ct(this['locale'],_0x1dc2cf),_0x520869=_0x2b9f86['panelView']['children'],_0x2aab17=new ot(this['locale']),_0x4d4c96=_0x2b9f86['bindTemplate'];dt(_0x2b9f86,()=>this['items']['find'](_0x62eb21=>_0x62eb21['isVisible'])),_0x2b9f86['extendTemplate']({'attributes':{'class':[_0x4d4c96['if']('isVisible','ck-hidden',_0x8c379c=>!_0x8c379c)]}});const _0x2463dc=(_0xde8bfc,_0x5e56f1=-0x1)=>{const _0x2da68f=new nt(this['locale']);_0x2da68f['children']['add'](_0xde8bfc);const _0x140572=_0x5e56f1>-0x1?_0x5e56f1:_0x2aab17['items']['length'];_0x2aab17['items']['add'](_0x2da68f,_0x140572);const _0x54ae05=Array['from'](this['items']);_0x2b9f86['unbind']('isEnabled','isVisible'),_0x2b9f86['bind']('isEnabled')['toMany'](_0x54ae05,'isEnabled',(..._0x3028f9)=>_0x3028f9['some'](_0x3285f1=>_0x3285f1)),_0x2b9f86['bind']('isVisible')['toMany'](_0x54ae05,'isVisible',(..._0x7e0e2f)=>_0x7e0e2f['some'](_0x3105bc=>_0x3105bc));};_0x2b9f86['panelPosition']='sw',_0x2b9f86['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x2c70f9});for(const _0x444b8b of this['items'])_0x2463dc(_0x444b8b);return _0x520869['add'](_0x2aab17),_0x2b9f86['listenTo'](this['items'],'add',(_0x31c259,_0xa67ad8,_0x1aada8)=>{_0x2463dc(_0xa67ad8,_0x1aada8);}),_0x2b9f86['listenTo'](this['items'],'remove',(_0x53c8ee,_0x1a10e6,_0x239407)=>{_0x2aab17['items']['remove'](_0x239407);}),_0x2b9f86;}_attachActions(_0x603f81,_0x332d3b){const _0xbba5db=_0x603f81&&_0x603f81['element'];_0xbba5db&&(this['listenTo'](_0xbba5db,'mouseenter',()=>this['actionIndicator']=_0x332d3b),this['listenTo'](_0xbba5db,'focus',()=>this['actionIndicator']=_0x332d3b),this['listenTo'](_0xbba5db,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0xbba5db,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x36d0b3=super['_createCommentInputView']();return _0x36d0b3['bind']('placeholder')['to'](this),_0x36d0b3;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x2262f2){const _0x4f9996=_0xdb138e(_0x2262f2,0x1e),_0x3078ce=new MutationObserver(_0x17fe03=>{for(const _0x3bf8ae of _0x17fe03)('attributes'==_0x3bf8ae['type']&&'class'==_0x3bf8ae['attributeName']||'childList'==_0x3bf8ae['type']||'characterData'==_0x3bf8ae['type'])&&_0x4f9996();});return{'attach'(_0x5dca7c){_0x3078ce['observe'](_0x5dca7c,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x3078ce['disconnect'](),_0x4f9996['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x34b28d,_0x57e9f3){super(_0x34b28d),this['id']=_0x185ea0(),this['focusTracker']=new _0x4804cc(),this['keystrokes']=new _0x225c8d(),this['keystrokes']['set']('Esc',(_0x255497,_0x419cb8)=>this['fire']('Esc',_0x419cb8)),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'](_0x57e9f3),this['mainView']=_0x57e9f3;const _0x1eaf6e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1eaf6e['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 _0x174be4=this['element']['clientHeight'];_0x174be4&&(this['height']=_0x174be4);}};const jt=/* #__PURE__ -- @preserve */
29
- _0x1bcd46();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x2c2b5a,target:_0x14142e,type:_0x25f38a,isVisible:_0x47a679=!0x0}){super(),this['view']=_0x2c2b5a,this['view']['element']||this['view']['render'](),this['_type']=_0x25f38a,this['_target']=_0x14142e,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5d687e([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x50db16,_0x3c5ce6)=>{this['view']['focusTracker']['add'](_0x3c5ce6);}),this['focusableElements']['on']('remove',(_0x11d72e,_0x2fabff)=>{this['view']['focusTracker']['remove'](_0x2fabff);}),this['set']('isVisible',_0x47a679);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x860d9b=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x860d9b),_0x860d9b;}get targetRect(){const _0x1b525b=this['target'];if(null===_0x1b525b)return null;if(_0x1b525b instanceof _0x1f4f60)return _0x1b525b;const _0x19dc3a=_0x1b525b['filter'](_0x4fee4d=>function(_0x564f02){return!!_0x564f02['offsetParent']||!!_0x564f02['getClientRects']()['item'](0x0);}(_0x4fee4d));return 0x0===_0x19dc3a['length']?null:_0x1f4f60['getDomElementRects'](_0x19dc3a[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x2904a9){this['view']['isActive']=_0x2904a9,this['view']['mainView']['isActive']=_0x2904a9;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x6190ac){if(!(null===_0x6190ac||_0x6190ac instanceof _0x1f4f60||Array['isArray'](_0x6190ac)&&_0x6190ac['every'](_0x3556bc=>zt(_0x3556bc))))throw new _0x3fd207('annotation-invalid-target',null,{'target':_0x6190ac});}_getNormalizedTarget(){const _0x41d226='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x41d226)?[_0x41d226]:_0x41d226;}};function zt(_0x359e58){return null!==_0x359e58&&'object'==typeof _0x359e58&&'nodeType'in _0x359e58&&0x1===_0x359e58['nodeType'];}var Jt=class extends _0x5d687e{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x11858b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4804cc(),this['_focusTracker']['on']('change:isFocused',(_0x27631a,_0x5a2985,_0x531253)=>{_0x531253||this['fire']('blur');});for(const _0x16eda9 of _0x11858b)this['add'](_0x16eda9);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x564da4){if(this['has'](_0x564da4))throw new _0x3fd207('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x564da4['innerView'],_0x564da4),this['_viewToAnnotation']['set'](_0x564da4['view'],_0x564da4);for(const _0xfd4a7c of _0x564da4['focusableElements'])this['_focusTracker']['add'](_0xfd4a7c);if(this['listenTo'](_0x564da4['focusableElements'],'add',(_0x6a0871,_0x2a8f13)=>{this['_focusTracker']['add'](_0x2a8f13);}),this['listenTo'](_0x564da4['focusableElements'],'remove',(_0x44651b,_0x1d54d2)=>{this['_focusTracker']['remove'](_0x1d54d2);}),this['listenTo'](_0x564da4['view']['focusTracker'],'change:isFocused',(_0x3d6a23,_0x161ec6,_0x4948b5)=>{_0x4948b5&&this['fire']('focus',_0x564da4);}),_0x564da4['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x29eb1b of this)_0x29eb1b['updateTargetRect']();}const _0xa857c5=this['_getOrderInContent'](_0x564da4['view']['targetRect']);return super['add'](_0x564da4,_0xa857c5);}['remove'](_0x251505){if(!this['has'](_0x251505))throw new _0x3fd207('annotationcollection-not-existing-item',null);this['stopListening'](_0x251505['view']['focusTracker']),this['stopListening'](_0x251505['focusableElements']);for(const _0x3fefac of _0x251505['focusableElements'])this['_focusTracker']['remove'](_0x3fefac);return this['_viewToAnnotation']['delete'](_0x251505['view']),this['_innerViewToAnnotation']['delete'](_0x251505['innerView']),super['remove'](_0x251505);}getByInnerView(_0x31bd88){return this['_innerViewToAnnotation']['get'](_0x31bd88);}getByView(_0x5a4e97){return this['_viewToAnnotation']['get'](_0x5a4e97);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0xc316c8 of this)_0xc316c8['updateTargetRect']();this['_sort']();}_sort(){const _0x1d725f=Array['from'](this)['sort']((_0x363a53,_0x59f909)=>Zt(_0x363a53['view']['targetRect'],_0x59f909['view']['targetRect']));for(let _0x2393f9=_0x1d725f['length']-0x1;_0x2393f9>0x0;_0x2393f9--){const _0x244e30=_0x1d725f[_0x2393f9];_0x2393f9!==this['getIndex'](_0x244e30)&&(this['remove'](_0x244e30),this['add'](_0x244e30));}}_getOrderInContent(_0x11f695){let _0x4957c4=0x0;if(!_0x11f695)return this['length'];for(const _0x5c465c of this){const _0x193c5c=_0x5c465c['view']['targetRect'];if(_0x193c5c){if(Zt(_0x11f695,_0x193c5c)<0x0)return _0x4957c4;_0x4957c4++;}}return _0x4957c4;}_areCachedRectsStale(){const _0x273ca2=this['get'](0x0);if(!_0x273ca2)return!0x1;const _0x3f80b7=_0x273ca2['view']['targetRect'],_0x30c59f=_0x273ca2['targetRect'];return!(!_0x3f80b7||!_0x30c59f)&&(_0x3f80b7['top']!==_0x30c59f['top']||_0x3f80b7['left']!==_0x30c59f['left']);}};function Qt({source:_0x59f035,target:_0x5bb0f3,filter:_0x508ac7}){for(const _0x5a1f58 of _0x59f035)_0x508ac7(_0x5a1f58)&&_0x5bb0f3['add'](_0x5a1f58);_0x5bb0f3['listenTo'](_0x59f035,'add',(_0x2c23ba,_0x39c0a3)=>{_0x508ac7(_0x39c0a3)&&_0x5bb0f3['add'](_0x39c0a3);}),_0x5bb0f3['listenTo'](_0x59f035,'remove',(_0x4653fe,_0x45f2f6)=>{_0x5bb0f3['has'](_0x45f2f6)&&_0x5bb0f3['remove'](_0x45f2f6);});}function Zt(_0x288449,_0x515904){if(null===_0x288449&&null===_0x515904)return 0x0;if(null===_0x288449)return-0x1;if(null===_0x515904)return 0x1;const _0x450b16=_0x288449['top']-_0x515904['top'];return 0x0==_0x450b16?_0x288449['left']-_0x515904['left']:_0x450b16;}var ti=class extends _0xe32c07{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ca6c9){if(super(_0x2ca6c9),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2ca6c9 instanceof _0x458c52){const _0x30f70b=_0x2ca6c9['locale'];_0x2ca6c9['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x30f70b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4f3a64){this['collection']['add'](_0x4f3a64);}['remove'](_0x531b9c){this['collection']['remove'](_0x531b9c),_0x531b9c['destroy']();}refreshVisibility(){for(const _0x42d96a of this['collection'])_0x42d96a['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x3e70cf){return this['collection']['getByInnerView'](_0x3e70cf);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x29f870 of this['collection'])_0x29f870['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x51d9e3){this['fire']('_activateAnnotation',_0x51d9e3);}createAnnotation(_0x6e1a62){return new $t(_0x6e1a62);}createAnnotationView(_0x191de1,_0x1e5a83){return new qt(_0x191de1,_0x1e5a83);}_addActiveAnnotation(_0x3936d2){const _0x585191=new Set(this['activeAnnotations']);_0x585191['add'](_0x3936d2),this['activeAnnotations']=_0x585191;}_removeActiveAnnotation(_0x5839fc){const _0x3a6649=new Set(this['activeAnnotations']);_0x3a6649['delete'](_0x5839fc),this['activeAnnotations']=_0x3a6649;}_bindAnnotationsToVisibleAnnotations(){const _0x2d8880=this['collection'],_0x570f44=this['_visibleAnnotations'];function _0x435994(_0x59fe79){const _0x2eabf7=_0x59fe79['source'];_0x2eabf7['isVisible']&&!_0x570f44['has'](_0x2eabf7)?_0x570f44['add'](_0x2eabf7):!_0x2eabf7['isVisible']&&_0x570f44['has'](_0x2eabf7)&&_0x570f44['remove'](_0x2eabf7),_0x2eabf7['view']['focusTracker']['remove'](_0x2eabf7['view']['element']),_0x2eabf7['view']['focusTracker']['add'](_0x2eabf7['view']['element']);}this['listenTo'](_0x2d8880,'add',(_0x55f14f,_0x52a73d)=>{_0x52a73d['isVisible']&&_0x570f44['add'](_0x52a73d),this['listenTo'](_0x52a73d,'change:isVisible',_0x435994);}),this['listenTo'](_0x2d8880,'remove',(_0x25ceab,_0x2664dc)=>{_0x570f44['has'](_0x2664dc)&&_0x570f44['remove'](_0x2664dc),this['stopListening'](_0x2664dc,'change:isVisible',_0x435994);});}_setupEnterAnnotationKeystroke(){const _0x534a67=_0x1eceb5=>{_0x1eceb5['on']('ready',()=>{_0x1eceb5['keystrokes']['set'](_0x14d518,(_0x2ef573,_0x191edb)=>{const _0x1da2d5=_0x9ba8a7(this['activeAnnotations']['values']());_0x1da2d5&&(_0x1da2d5['view']['focus'](),_0x191edb());});});};this['context']instanceof _0x458c52?_0x534a67(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x277f26,_0x164b20)=>{_0x534a67(_0x164b20);});}_setupEscapeAnnotationHandling(){const _0x541f3a=_0xcc5e4f=>{const _0x122230=_0xcc5e4f['source'],_0xc77d7e=[];let _0x251779;if(Array['isArray'](_0x122230['target'])){_0x251779=_0x122230['target'][0x0],this['context']instanceof _0x458c52?_0xc77d7e['push'](this['context']):this['context']['editors']&&_0xc77d7e['push'](...this['context']['editors']);for(const _0x5e0ea6 of _0xc77d7e)for(const _0x448f58 of _0x5e0ea6['editing']['view']['domRoots']['values']())if(_0x448f58['contains'](_0x251779))return void _0x5e0ea6['editing']['view']['focus']();_0x251779['focus']();}};this['listenTo'](this['collection'],'add',(_0x1dfe59,_0x38f8fd)=>{this['listenTo'](_0x38f8fd,'escape',_0x541f3a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x133ec9,_0x4c4452)=>{this['stopListening'](_0x4c4452,'escape',_0x541f3a);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
- _0x1bcd46(),ni=/* #__PURE__ -- @preserve */
31
- _0x1bcd46();var oi=class extends _0xe32c07{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x24dddb,_0x23b29b];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24f841){super(_0x24f841),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x564a18=this['context']['config'];_0x564a18['define']('comments.maxCommentsWhenCollapsed',0x2),_0x564a18['define']('comments.maxThreadTotalWeight',0x1f4),_0x564a18['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x564a18['define']('comments.CommentThreadView',Ut),_0x564a18['define']('comments.CommentView',Yt),_0x564a18['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x176a8f=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5cf516,_0x51f02e)=>this['_addCommentThread'](_0x51f02e)),this['on']('submitCommentThread',(_0x2457f1,_0x3b0c18)=>this['_submitCommentThread'](_0x3b0c18)),this['on']('resolveCommentThread',(_0x5d20ec,_0x1965d9)=>this['_resolveCommentThread'](_0x1965d9)),this['on']('resolveCommentThread',(_0x1969e3,_0x392f13)=>this['_updateActiveAnnotation'](_0x392f13),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x55a40c,_0x39a68f)=>this['_reopenCommentThread'](_0x39a68f)),this['on']('reopenCommentThread',(_0x4da64a,_0x4e050a)=>this['_updateActiveAnnotation'](_0x4e050a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x300f2b,_0x3fff61)=>this['_removeCommentThread'](_0x3fff61)),this['on']('updateCommentThread',(_0x2e3562,_0x37b2f7)=>this['_updateCommentThread'](_0x37b2f7)),this['on']('updateCommentThread',(_0x519269,_0x4a34b6)=>this['_updateActiveAnnotation'](_0x4a34b6),{'priority':'lowest'}),this['on']('addComment',(_0x336d0d,_0x4a13e6)=>this['_addComment'](_0x4a13e6)),this['on']('updateComment',(_0x1313ce,_0x595d14)=>this['_updateComment'](_0x595d14)),this['on']('removeComment',(_0xe3b55f,_0x3bb5ce)=>this['_removeComment'](_0x3bb5ce)),this['on']('addComment',(_0x4967e9,{threadId:_0x2b913b,isFromAdapter:_0x5a0894})=>{if(_0x5a0894)return;const _0x154add=this['getCommentThread'](_0x2b913b),_0x52b2f0=_0x154add&&this['_threadToController']['get'](_0x154add);_0x52b2f0&&_0x52b2f0['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x176a8f,'change:activeAnnotations',(_0x1b31fe,_0x5f7317,_0x4dc2d1)=>{const _0x5cf8ad=Array['from'](_0x4dc2d1)['map'](_0x22a773=>this['_viewToController']['get'](_0x22a773['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5cf8ad?_0x5cf8ad['model']:null;});}set adapter(_0x1c54f5){if(this['_adapter'])throw new _0x3fd207('commentsrepository-adapter-already-set');this['_adapter']=_0x1c54f5;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x2c2036=ii,threadId:_0x14c980=_0x185ea0(),comments:_0xf89ebc=[],unlinkedAt:_0x5c9bb5=null,resolvedAt:_0x2df93b=null,resolvedBy:_0x82ebe4=null,target:_0x2e45ee=null,context:_0x346d68=null,attributes:_0x185448={},isResolvable:_0x20967c=!0x0,isSubmitted:_0x55fa9b=!0x1,isFromAdapter:_0x3b8a44=!0x1}={}){return this['fire'](ai('addCommentThread',_0x2c2036),{'channelId':_0x2c2036,'threadId':_0x14c980,'comments':_0xf89ebc,'unlinkedAt':_0x5c9bb5,'resolvedAt':_0x2df93b,'resolvedBy':_0x82ebe4,'target':_0x2e45ee,'context':_0x346d68,'attributes':_0x185448,'isFromAdapter':_0x3b8a44,'isResolvable':_0x20967c,'isSubmitted':_0x55fa9b}),this['getCommentThread'](_0x14c980);}openNewCommentThread({channelId:_0x188ebc=ii,threadId:_0x41dea7=_0x185ea0(),target:_0x3b933f,context:_0x346434=null,isResolvable:_0xc1d47b=!0x0}){if(this['_readOnlyChannels']['has'](_0x188ebc)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3b933f)throw new _0x3fd207('commentsrepository-missing-target');const _0x51baf5=this['addCommentThread']({'channelId':_0x188ebc,'threadId':_0x41dea7,'target':_0x3b933f,'context':_0x346434,'isResolvable':_0xc1d47b});if(!_0x51baf5)return null;const _0x5eb87a=this['_threadToController']['get'](_0x51baf5),_0x56fcfb=_0x5eb87a['view']['commentThreadInputView']['commentInputView'],_0x2a4a3e=this['context']['plugins']['get'](ti),_0x55ed11=_0x2a4a3e['getByInnerView'](_0x5eb87a['view']);return _0x2a4a3e['activate'](_0x55ed11),_0x56fcfb['once']('editorReady',()=>_0x56fcfb['focus']()),_0x51baf5;}hasCommentThread(_0x192410){if('string'!=typeof _0x192410)throw new _0x3fd207('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x192410);}updateCommentThread({channelId:_0x524708=ii,threadId:_0x4cabfb,context:_0x52b679,unlinkedAt:_0x1ce96,attributes:_0x49fb0f,isFromAdapter:_0x297396=!0x1}){return this['fire'](ai('updateCommentThread',_0x524708),{'channelId':_0x524708,'threadId':_0x4cabfb,'context':_0x52b679,'unlinkedAt':_0x1ce96,'attributes':_0x49fb0f,'isFromAdapter':_0x297396}),this['getCommentThread'](_0x4cabfb);}getCommentThread(_0x6118a1){if('string'!=typeof _0x6118a1)throw new _0x3fd207('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x6118a1);}fetchCommentThread({channelId:_0x34f961,threadId:_0x4a2a7c}={}){const _0x589afe=this['getCommentThread'](_0x4a2a7c);if(_0x589afe)return Promise['resolve'](_0x589afe);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3fd207('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x34f961,'threadId':_0x4a2a7c})['then'](_0x1fca77=>this['hasCommentThread'](_0x4a2a7c)?this['getCommentThread'](_0x4a2a7c):_0x1fca77?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x34f961},_0x1fca77)):void 0x0)['catch'](_0xdfc986=>{throw console['error'](_0xdfc986),new _0x3fd207('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x3f21da,skipNotAttached:_0x37cb36=!0x1,skipEmpty:_0x31e879=!0x1,toJSON:_0x3462fb=!0x1}={}){const _0x2d8635=[];for(const _0x15e613 of this['_threads']['values']())_0x3f21da&&_0x15e613['channelId']!==_0x3f21da||_0x37cb36&&!_0x15e613['isAttached']||_0x31e879&&0x0===_0x15e613['length']||_0x2d8635['push'](_0x15e613);return _0x3462fb?_0x2d8635['map'](_0xb08269=>_0xb08269['toJSON']()):_0x2d8635;}getAnnotationForCommentThread(_0x281c38){const _0x1bdea9=this['_threadToController']['get'](_0x281c38);return _0x1bdea9&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x1bdea9['view'])||null;}getCommentThreadForAnnotation(_0x57d463){const _0x3cee23=this['_viewToController']['get'](_0x57d463['innerView']);return _0x3cee23?_0x3cee23['model']:null;}setActiveCommentThread(_0x110b1d){const _0x2fc8fd=this['context']['plugins']['get'](ti);if(!_0x110b1d)return void(this['activeCommentThread']&&_0x2fc8fd['deactivateAll']());const _0x16213f=this['getCommentThread'](_0x110b1d);if(!_0x16213f)throw new _0x3fd207('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x110b1d});if(!this['_threadToController']['has'](_0x16213f))throw new _0x3fd207('commentsrepository-active-not-attached',null,{'threadId':_0x110b1d});const _0x5468c8=_0x2fc8fd['getByInnerView'](this['_threadToController']['get'](_0x16213f)['view']);_0x2fc8fd['activate'](_0x5468c8);}switchReadOnly(_0x3234a8,_0x59b05e){_0x3234a8?this['_readOnlyChannels']['add'](_0x59b05e):this['_readOnlyChannels']['delete'](_0x59b05e),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5a846e){return this['_readOnlyChannels']['has'](_0x5a846e)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x1fbf51,_0x4f284b){return new bt(_0x1fbf51,_0x4f284b);}setPermissions(_0x5de380,_0x39cd73=ii){this['_permissions']['set'](_0x39cd73,_0x5de380),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x34ace2=ii){return this['_permissions']['has'](_0x34ace2)?this['_permissions']['get'](_0x34ace2):ei;}_addCommentThread({channelId:_0x3aab75,threadId:_0x310a39,comments:_0x4270e7,unlinkedAt:_0x1a1e3e,resolvedAt:_0x192fa6,resolvedBy:_0x4ecaf4,target:_0x21d475,context:_0x3e37ee,attributes:_0x43b738,isFromAdapter:_0x30d718,isResolvable:_0x5f421a,isSubmitted:_0x867fd1}){if('string'!=typeof _0x310a39)throw new _0x3fd207('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x310a39});if(this['hasCommentThread'](_0x310a39))throw new _0x3fd207('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x310a39});const _0x4911ae=new ri(this,{'channelId':_0x3aab75,'id':_0x310a39,'context':_0x3e37ee,'attributes':_0x43b738,'unlinkedAt':_0x1a1e3e,'resolvedAt':_0x192fa6,'resolvedBy':_0x4ecaf4?this['context']['plugins']['get'](_0x23b29b)['getUser'](_0x4ecaf4):null,'isResolvable':_0x5f421a,'isSubmitted':_0x867fd1||_0x30d718});this['_threads']['set'](_0x310a39,_0x4911ae);for(const _0xdbe1cd of _0x4270e7)_0x4911ae['_add'](this['_createNewComment']({'threadId':_0x310a39,..._0xdbe1cd}));return _0x21d475&&_0x4911ae['attachTo'](_0x21d475),_0x30d718||!_0x4911ae['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3aab75,'threadId':_0x310a39});}_submitCommentThread({channelId:_0x2d5a17,threadId:_0x3c104a}){if(!this['hasCommentThread'](_0x3c104a))throw new _0x3fd207('commentsrepository-missing-comment-thread',this);const _0x50807e=this['getCommentThread'](_0x3c104a);if(_0x50807e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x42355b,comments:_0x3b7a66,resolvedAt:_0x195599,resolvedBy:_0x53c89f,context:_0xb5b81f,attributes:_0x149621}=_0x50807e,_0x1f9467=this['context']['plugins']['get']('PendingActions'),_0x41f951=_0x1f9467['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2d5a17,'threadId':_0x42355b,'comments':_0x3b7a66['map'](_0x4aefdd=>_0x4aefdd['toJSON']()),'resolvedAt':_0x195599,'resolvedBy':_0x53c89f?_0x53c89f['id']:_0x53c89f,'context':_0xb5b81f,'attributes':_0x149621})['then'](({comments:_0x56b1db})=>{_0x1f9467['remove'](_0x41f951);for(const _0x2bab1d of _0x56b1db)this['_updateComment']({'channelId':_0x2d5a17,'threadId':_0x3c104a,'commentId':_0x2bab1d['commentId'],'createdAt':_0x2bab1d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2b0646=>{throw console['error'](_0x2b0646),new _0x3fd207('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x5b5c43,target:_0x532854}){const _0x219eb4=this['getCommentThread'](_0x5b5c43);if(!_0x219eb4)throw new _0x3fd207('commentsrepository-attach-missing-comment-thread',this);const _0x271389=this['context']['plugins']['get']('PendingActions'),_0x488cac=this['context']['plugins']['get'](ti),_0x177b14=this['_createCommentThreadView'](_0x219eb4),_0x36dc61=new bt(_0x219eb4,_0x177b14);let _0x606565=null;_0x177b14['on']('change:isDirty',(_0x1cec8c,_0x3cf6b3,_0x5d14cc)=>{_0x5d14cc?_0x606565=_0x271389['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x606565&&(_0x271389['remove'](_0x606565),_0x606565=null);}),this['_threadToController']['set'](_0x219eb4,_0x36dc61),this['_viewToController']['set'](_0x177b14,_0x36dc61);const _0x35f3f9=new qt(this['context']['locale'],_0x177b14);_0x35f3f9['bind']('length')['to'](_0x177b14),_0x35f3f9['bind']('isDirty')['to'](_0x177b14,'isDirty',_0x177b14,'length',(_0x1268eb,_0x167e10)=>_0x1268eb||!_0x167e10),_0x35f3f9['bind']('isActive')['to'](_0x177b14),_0x35f3f9['type']='comment';const _0x5b363e=new $t({'view':_0x35f3f9,'target':_0x532854,'type':'comment','isVisible':!_0x219eb4['archivedAt']&&!!('function'==typeof _0x532854?_0x532854():_0x532854)});return _0x177b14['on']('escape',()=>{_0x5b363e['fire']('escape');}),this['_bindAnnotationToEditors'](_0x177b14,_0x5b363e),_0x488cac['add'](_0x5b363e),_0x5b363e;}_bindAnnotationToEditors(_0x2812b0,_0x1dc1ba){this['listenTo'](_0x2812b0,'editorReady',(_0x5757f7,_0x1194ab)=>{const _0x5a83f4=_0x1194ab['ui']['view']['body']['bodyCollectionContainer'];_0x1dc1ba['focusableElements']['add'](_0x5a83f4),this['context']instanceof _0x458c52&&this['context']['ui']['focusTracker']['add'](_0x5a83f4);},{'priority':'highest'}),this['listenTo'](_0x2812b0,'editorDestroyed',(_0x216861,_0x46ebc3)=>{const _0x4b6a29=_0x46ebc3['ui']['view']['body']['bodyCollectionContainer'];_0x1dc1ba['focusableElements']['has'](_0x4b6a29)&&_0x1dc1ba['focusableElements']['remove'](_0x4b6a29),this['context']instanceof _0x458c52&&this['context']['ui']['focusTracker']['remove'](_0x4b6a29);});}_unbindEditors(_0x49c6cc){this['stopListening'](_0x49c6cc,'editorReady'),this['stopListening'](_0x49c6cc,'editorDestroyed');}_createCommentThreadView(_0x4efad7){const _0x447f46=this['context']['plugins']['get'](_0x23b29b),{config:_0xfd0b87,locale:_0x40de55}=this['context'],_0xdf4443=_0x110226(_0xfd0b87['get']('locale'),_0x40de55);return new(0x0,(_0xfd0b87['get']('comments'))['CommentThreadView'])(_0x40de55,_0x4efad7,_0x447f46['me'],{'editorConfig':{..._0xfd0b87['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xfd0b87['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xfd0b87['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xfd0b87['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xfd0b87['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xdf4443,'CommentView':_0xfd0b87['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x814e34,channelId:_0x25bb10,resolvedAt:_0x3edda6,resolvedBy:_0x1e1018,isFromAdapter:_0xb1e893}){if(!this['hasCommentThread'](_0x814e34))throw new _0x3fd207('commentsrepository-missing-comment-thread',null,{'threadId':_0x814e34});const _0x2382f8=this['getCommentThread'](_0x814e34);if(_0x2382f8['isResolved'])throw new _0x3fd207('commentsrepository-resolved-comment-thread',null,{'threadId':_0x814e34});const _0x4b5aac=this['context']['plugins']['get'](_0x23b29b);if(_0x2382f8['resolvedBy']=_0x4b5aac['getUser'](_0x1e1018),_0x2382f8['resolvedAt']=_0x3edda6,_0xb1e893||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4a29f9=this['context']['plugins']['get']('PendingActions'),_0x1c06c9=_0x4a29f9['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x25bb10,'threadId':_0x814e34})['then'](({resolvedAt:_0x38f791,resolvedBy:_0x1bd16d})=>{_0x4a29f9['remove'](_0x1c06c9),_0x2382f8['resolvedBy']['id']!==_0x1bd16d&&(_0x2382f8['resolvedBy']=_0x4b5aac['getUser'](_0x1bd16d)),_0x2382f8['resolvedAt']=_0x38f791;})['catch'](_0x436f28=>{throw console['error'](_0x436f28),new _0x3fd207('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x389cd5,channelId:_0x5a9258,isFromAdapter:_0xc1af68}){if(!this['hasCommentThread'](_0x389cd5))throw new _0x3fd207('commentsrepository-missing-comment-thread',null,{'threadId':_0x389cd5});const _0x51f852=this['getCommentThread'](_0x389cd5);if(!_0x51f852['isResolved'])throw new _0x3fd207('commentsrepository-reopen-comment-thread',null,{'threadId':_0x389cd5});if(_0x51f852['resolvedBy']=null,_0x51f852['resolvedAt']=null,_0xc1af68||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x34457b=this['context']['plugins']['get']('PendingActions'),_0xf2167b=_0x34457b['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5a9258,'threadId':_0x389cd5})['then'](()=>_0x34457b['remove'](_0xf2167b))['catch'](_0xb66d2=>{throw console['error'](_0xb66d2),new _0x3fd207('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x4ccfe7,isFromAdapter:_0x11e8b2}){const _0x280e4e=this['getCommentThread'](_0x4ccfe7);if(!_0x280e4e)throw new _0x3fd207('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4ccfe7),this['_threads']['delete'](_0x4ccfe7),!_0x280e4e['isSubmitted']||_0x11e8b2||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4b5438=this['context']['plugins']['get']('PendingActions'),{channelId:_0x231b06}=_0x280e4e,_0x3356bc=_0x4b5438['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x231b06,'threadId':_0x4ccfe7})['then'](()=>_0x4b5438['remove'](_0x3356bc))['catch'](_0x5290b8=>{throw console['error'](_0x5290b8),new _0x3fd207('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x373f7b,unlinkedAt:_0xdcbaff,context:_0x28f5eb,attributes:_0x3fe3c4,isFromAdapter:_0x52b3d2}){if('string'!=typeof _0x373f7b)throw new _0x3fd207('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x373f7b});if(!this['hasCommentThread'](_0x373f7b))throw new _0x3fd207('commentsrepository-missing-comment-thread',null,{'threadId':_0x373f7b});const _0x268a39=this['getCommentThread'](_0x373f7b);let _0x520cc6=!0x1;if(void 0x0!==_0x28f5eb&&_0x268a39['context']!==_0x28f5eb&&(_0x268a39['context']=_0x28f5eb,_0x520cc6=!0x0),void 0x0!==_0xdcbaff&&_0x268a39['unlinkedAt']!==_0xdcbaff&&(_0x268a39['unlinkedAt']=_0xdcbaff,_0x520cc6=!0x0),_0x3fe3c4&&!_0x11ae2a(_0x3fe3c4,_0x268a39['attributes'])&&(_0x268a39['attributes']=_0x3fe3c4,_0x520cc6=!0x0),!_0x520cc6)return Promise['resolve']();if(!_0x268a39['isSubmitted']||_0x52b3d2||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1a4a9a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5304b1}=_0x268a39,_0x3a0b2a=_0x1a4a9a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5304b1,'threadId':_0x373f7b,'context':_0x28f5eb,'unlinkedAt':_0xdcbaff,'attributes':_0x3fe3c4})['then'](()=>_0x1a4a9a['remove'](_0x3a0b2a))['catch'](_0x182242=>{throw console['error'](_0x182242),new _0x3fd207('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0xbac409){const _0xf0f7c7=this['context']['plugins']['get'](ti),_0x90f696=this['getCommentThread'](_0xbac409);if(_0x90f696['_isAttached']=!0x1,this['_threadToController']['has'](_0x90f696)){const _0x23a490=this['_threadToController']['get'](_0x90f696),_0x38c54d=_0x23a490['view'],_0x4469c7=_0xf0f7c7['getByInnerView'](_0x38c54d);this['_threadToController']['delete'](_0x90f696),this['_viewToController']['delete'](_0x38c54d),_0x4469c7&&_0xf0f7c7['remove'](_0x4469c7),_0x23a490['destroy'](),_0x38c54d['destroy']()['then'](()=>{this['_unbindEditors'](_0x38c54d);});}}_updateActiveAnnotation({threadId:_0x269509,resolvedAt:_0x50f3ea,unlinkedAt:_0x52a0a8}){const _0x5668ea=!!_0x50f3ea,_0x5f355f=this['context']['plugins']['get'](ti),_0x14335b=this['getCommentThread'](_0x269509);if(this['_threadToController']['has'](_0x14335b)){const _0x4a67a5=this['_threadToController']['get'](_0x14335b)['view'],_0x14ad4b=_0x5f355f['getByInnerView'](_0x4a67a5);_0x14ad4b&&(_0x5668ea&&_0x5f355f['_removeActiveAnnotation'](_0x14ad4b),_0x52a0a8?_0x14ad4b['isVisible']=!0x1:_0x14ad4b['refreshVisibility']());}}_getExternalAuthor(_0x5338c9){const _0x834aa2=this['context']['plugins']['get'](_0x23b29b),_0x4af14c=_0x4543c7('external:'+_0x5338c9),_0x4cb06d=_0x834aa2['getUser'](_0x4af14c);return _0x4cb06d||_0x834aa2['addUser']({'id':_0x4af14c,'name':_0x5338c9});}_createNewComment({threadId:_0x40e81e,commentId:_0x267ded=_0x185ea0(),content:_0x4d7c4e,authorId:_0x1c5013,createdAt:_0x146aa5,attributes:_0x2a1734}){if('string'!=typeof _0x267ded)throw new _0x3fd207('commentsrepository-invalid-commentid');if('string'!=typeof _0x1c5013)throw new _0x3fd207('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4d7c4e||!_0x4d7c4e['trim']())throw new _0x3fd207('commentsrepository-invalid-comment-content');const _0x4a1ebe=this['context']['plugins']['get'](_0x23b29b)['getUser'](_0x1c5013);if(!_0x4a1ebe)throw new _0x3fd207('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1c5013});let _0x280284=null,_0x291c17=_0x146aa5;return _0x2a1734?.['@external']&&(_0x280284=this['_getExternalAuthor'](_0x2a1734['@external']['authorName']),_0x291c17=new Date(_0x2a1734['@external']['createdAt'])),new hi(this,{'threadId':_0x40e81e,'id':_0x267ded,'author':_0x280284||_0x4a1ebe,'creator':_0x4a1ebe,'content':_0x4d7c4e,'createdAt':_0x146aa5,'authoredAt':_0x291c17,'attributes':_0x2a1734});}_addComment(_0x1fef8d){let {threadId:_0x6c425,content:_0x40a494,attributes:_0x130cb7,isFromAdapter:_0x52fa25}=_0x1fef8d;const _0x360d60=this['getCommentThread'](_0x1fef8d['threadId']);if(!_0x360d60)throw new _0x3fd207('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x40f132=this['_createNewComment'](_0x1fef8d),{id:_0x6ed61f}=_0x40f132;if(_0x360d60['_add'](_0x40f132),_0x52fa25||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x360d60['isSubmitted'])return Promise['resolve']();const _0x40a85a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5a64b5}=_0x360d60,_0x438ac9=_0x40a85a['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x130cb7||(_0x130cb7={}),this['adapter']['addComment']({'channelId':_0x5a64b5,'threadId':_0x6c425,'commentId':_0x6ed61f,'content':_0x40a494,'attributes':_0x130cb7})['then'](_0x5e1a4f=>{_0x40a85a['remove'](_0x438ac9),_0x5e1a4f&&this['_updateComment']({'channelId':_0x5a64b5,'threadId':_0x6c425,'commentId':_0x6ed61f,'createdAt':_0x5e1a4f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5d16cc=>{throw console['error'](_0x5d16cc),new _0x3fd207('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x40d683,commentId:_0x5c5086,content:_0x1d070d,createdAt:_0x45629c,attributes:_0x108d43,isFromAdapter:_0x45b711}){if(void 0x0!==_0x1d070d&&('string'!=typeof _0x1d070d||!_0x1d070d['trim']()['length']))throw new _0x3fd207('commentsrepository-update-comment-invalid-content');const _0x16e78c=this['getCommentThread'](_0x40d683),_0xc253a1=_0x16e78c['getComment'](_0x5c5086);if(!_0xc253a1)throw new _0x3fd207('commentsrepository-update-missing-comment',this);let _0x1b7a9e=!0x1;if(_0x1d070d&&_0x1d070d!==_0xc253a1['content']&&(_0xc253a1['isEditable']||_0x45b711)&&(_0xc253a1['content']=_0x1d070d,_0x1b7a9e=!0x0),_0x45629c&&_0x45629c!==_0xc253a1['createdAt']&&(_0xc253a1['createdAt']=_0x45629c,_0xc253a1['isExternal']||(_0xc253a1['authoredAt']=_0x45629c),_0x1b7a9e=!0x0),_0x108d43&&!_0x11ae2a(_0x108d43,_0xc253a1['attributes'])&&(_0xc253a1['attributes']=_0x108d43,_0x1b7a9e=!0x0),!_0x1b7a9e)return Promise['resolve']();if(_0x16e78c['fire']('commentUpdated'),_0x45b711||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x3170cf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x254724}=this['getCommentThread'](_0xc253a1['threadId']),_0xabaaa9=_0x3170cf['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x254724,'threadId':_0x40d683,'commentId':_0x5c5086,'content':_0x1d070d,'attributes':_0x108d43})['then'](()=>_0x3170cf['remove'](_0xabaaa9))['catch'](_0x2a3823=>{throw console['error'](_0x2a3823),new _0x3fd207('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x4c8005,commentId:_0x57d4fa,isFromAdapter:_0x1c101f}){const _0x47f5a2=this['getCommentThread'](_0x4c8005),_0x249b2b=_0x47f5a2['getComment'](_0x57d4fa);if(!_0x249b2b)throw new _0x3fd207('commentsrepository-remove-missing-comment',this);if(_0x47f5a2['_remove'](_0x249b2b),_0x1c101f||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x297f83=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4f8c9c}=_0x47f5a2,_0x177a9d=_0x297f83['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4f8c9c,'threadId':_0x4c8005,'commentId':_0x57d4fa})['then'](()=>_0x297f83['remove'](_0x177a9d))['catch'](_0x2a85ec=>{throw console['error'](_0x2a85ec),new _0x3fd207('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x35948c,_0x51dee6){super();const _0x3fa95a=_0x51dee6['isResolvable'];this['channelId']=_0x51dee6['channelId'],this['id']=_0x51dee6['id'],this['comments']=new _0x5d687e(),this['_repository']=_0x35948c,this['_isAttached']=!0x1,this['_isSubmitted']=_0x51dee6['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x35948c,'_permissions',_0x35948c,'_readOnlyChannels',()=>_0x35948c['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x35948c,'_permissions',()=>_0x35948c['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x35948c,'_permissions',()=>{const _0x33346e=_0x35948c['getPermissions'](this['channelId']);return _0x33346e['write']||_0x33346e['admin'];}),this['bind']('isResolvable')['to'](_0x35948c,'_permissions',()=>_0x3fa95a&&_0x35948c['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x51dee6['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x140768,_0x586012)=>_0x140768?_0x586012?_0x140768<_0x586012?_0x140768:_0x586012:_0x140768:_0x586012),this['set']('unlinkedAt',_0x51dee6['unlinkedAt']||null),this['set']('resolvedAt',_0x51dee6['resolvedAt']||null),this['set']('resolvedBy',_0x51dee6['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x332fb8=>!!_0x332fb8),this['set']('attributes',_0x51dee6['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x3685f1,_0x56e507)=>_0x3685f1+_0x56e507['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0x307926,id:_0x3dab8f}=this;this['_repository']['fire'](ai('submitCommentThread',_0x307926),{'channelId':_0x307926,'threadId':_0x3dab8f});}setUnlinkedAt(_0x2141d5){this['_update']({'unlinkedAt':_0x2141d5});}['resolve']({resolvedAt:_0x14186e=new Date(),resolvedBy:_0x489692='',isFromAdapter:_0x26b9b5=!0x1}={}){const _0x403a54=this['_repository']['context']['plugins']['get'](_0x23b29b)['me'],{channelId:_0x12aef3,id:_0x118360}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x12aef3),{'channelId':_0x12aef3,'threadId':_0x118360,'resolvedAt':_0x14186e,'resolvedBy':_0x489692||_0x403a54['id'],'isFromAdapter':_0x26b9b5});}['reopen']({isFromAdapter:_0x2104b8=!0x1}={}){const {channelId:_0x2c28df,id:_0x82d56b}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x2c28df),{'channelId':_0x2c28df,'threadId':_0x82d56b,'isFromAdapter':_0x2104b8});}setContext(_0x4e93ea){this['context']||this['_update']({'context':_0x4e93ea});}setAttribute(_0x50171c,_0x5a95fd){const _0x1b4328=_0x2dad8a(this['attributes']);_0x200648(_0x1b4328,_0x50171c,_0x5a95fd),this['_update']({'attributes':_0x1b4328});}removeAttribute(_0x26ac3b){const _0x4409c3=_0x2dad8a(this['attributes']);_0x4c0a55(_0x4409c3,_0x26ac3b),this['_update']({'attributes':_0x4409c3});}['remove']({isFromAdapter:_0xbf09e0=!0x1}={}){const {channelId:_0x44c97d,id:_0x259cca}=this;this['_repository']['fire'](ai('removeCommentThread',_0x44c97d),{'channelId':_0x44c97d,'threadId':_0x259cca,'isFromAdapter':_0xbf09e0});}attachTo(_0xc60275){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xc60275});}addComment(_0x2020b5){const {channelId:_0xcfd44c,id:_0x43907d}=this;this['_repository']['fire'](ai('addComment',_0xcfd44c,_0x43907d),Object['assign']({'channelId':_0xcfd44c,'threadId':_0x43907d},_0x2020b5));}getComment(_0x42d17c){if('string'!=typeof _0x42d17c)throw new _0x3fd207('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x42d17c});return this['comments']['get'](_0x42d17c);}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'](_0x45b668=>_0x45b668['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2f3451){return this['listenTo'](_0x2f3451,'change:authoredAt',()=>{const _0x5aec04=this['_findOptimalIndex'](_0x2f3451),_0x3d13d6=this['comments'];_0x5aec04-0x1!=_0x3d13d6['getIndex'](_0x2f3451)&&_0x5aec04+0x1!=_0x3d13d6['getIndex'](_0x2f3451)&&(this['_remove'](_0x2f3451),this['_add'](_0x2f3451));}),this['comments']['add'](_0x2f3451,this['_findOptimalIndex'](_0x2f3451));}_update(_0x3a74dd){const {channelId:_0x3fd2a5,id:_0x507dd9}=this;this['_repository']['fire'](ai('updateCommentThread',_0x3fd2a5),{..._0x3a74dd,'channelId':_0x3fd2a5,'threadId':_0x507dd9});}['_remove'](_0xf86e44){return this['stopListening'](_0xf86e44),_0xf86e44['destroy'](),this['comments']['remove'](_0xf86e44);}_findOptimalIndex(_0x27ff23){const _0x47a178=this['comments']['find'](_0x19b64d=>new Date(_0x19b64d['authoredAt'])['getTime']()>new Date(_0x27ff23['authoredAt'])['getTime']());return _0x47a178?this['comments']['getIndex'](_0x47a178):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x31e091,_0xc27955){super();const _0x5f21ea=_0x31e091['context']['plugins']['get'](_0x23b29b)['me'],_0x3b6237=_0x31e091['getCommentThread'](_0xc27955['threadId']),_0x53d864=0x0===_0x3b6237['comments']['length'],_0x2ec38e=_0x5f21ea===_0xc27955['author'];this['id']=_0xc27955['id'],this['threadId']=_0xc27955['threadId'],this['author']=_0xc27955['author'],this['creator']=_0xc27955['creator'],this['set']('content',_0xc27955['content']),this['createdAt']=_0xc27955['createdAt']||new Date(),this['set']('authoredAt',_0xc27955['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3b6237,'resolvedAt'),this['set']('attributes',_0xc27955['attributes']||{}),this['bind']('isEditable')['to'](_0x31e091,'_permissions',()=>{const _0x1f5176=_0x31e091['getPermissions'](_0x3b6237['channelId'])['write'],_0x172c3a=_0x31e091['getPermissions'](_0x3b6237['channelId'])['modifyAll'];return _0x2ec38e&&_0x1f5176||!_0x2ec38e&&_0x172c3a;}),this['bind']('isRemovable')['to'](_0x3b6237,'isRemovable',_0x31e091,'_permissions',_0x2775a9=>{const _0x371616=_0x31e091['getPermissions'](_0x3b6237['channelId'])['write'],_0x21343f=_0x31e091['getPermissions'](_0x3b6237['channelId'])['modifyAll'];return _0x2ec38e&&_0x371616||_0x2775a9&&_0x53d864||!_0x2ec38e&&_0x21343f&&!_0x53d864;}),this['bind']('isReadOnly')['to'](_0x3b6237,'isReadOnly'),this['_repository']=_0x31e091;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x105b4a){const _0x4f989e=document['createElement']('div');return _0x4f989e['innerHTML']=_0x105b4a,_0x4f989e['textContent']['length'];}(this['content']),0xc8);}update(_0x158adb){const {threadId:_0x16e0d3,id:_0x2b0b7e}=this;if(!this['_repository']['hasCommentThread'](_0x16e0d3))throw new _0x3fd207('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5ef944}=this['_repository']['getCommentThread'](_0x16e0d3);this['_repository']['fire'](ai('updateComment',_0x5ef944,_0x16e0d3),{'channelId':_0x5ef944,'threadId':_0x16e0d3,'commentId':_0x2b0b7e,..._0x158adb});}setAttribute(_0x47c46f,_0xb93e33){const _0x108b47=_0x2dad8a(this['attributes']);_0x200648(_0x108b47,_0x47c46f,_0xb93e33),this['update']({'attributes':_0x108b47});}removeAttribute(_0x1cd5f8){const _0xe41560=_0x2dad8a(this['attributes']);_0x4c0a55(_0xe41560,_0x1cd5f8),this['update']({'attributes':_0xe41560});}['remove'](_0x551bd4={}){if(!_0x551bd4['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x60a099,id:_0x29066b}=this;if(!this['_repository']['hasCommentThread'](_0x60a099))throw new _0x3fd207('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x375ddc}=this['_repository']['getCommentThread'](_0x60a099);this['_repository']['fire'](ai('removeComment',_0x375ddc,_0x60a099),{'channelId':_0x375ddc,'threadId':_0x60a099,'commentId':_0x29066b,..._0x551bd4});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x587c82,..._0x47579a){for(const _0x51c810 of _0x47579a)void 0x0!==_0x51c810&&(_0x587c82+=':'+String(_0x51c810));return _0x587c82;}var ci=class extends _0x44703a{constructor(_0x4630f0){super(_0x4630f0),this['set']('hasContent',!0x1);}['refresh'](){const _0x5a73c2=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3e8505 of _0x5a73c2['getRanges']())if(this['_hasContent'](_0x3e8505))return void(this['hasContent']=!0x0);}execute({threadId:_0x4db5c3=_0x185ea0(),ranges:_0xdafc3e,comment:_0x5ed376}={}){const _0x2f4c48=this['editor']['model'],_0x286c5e=_0xdafc3e??Array['from'](_0x2f4c48['document']['selection']['getRanges']()),_0x145c3b=[];for(const _0x225e1c of _0x286c5e)this['_hasContent'](_0x225e1c)&&_0x145c3b['push'](this['_trimToContent'](_0x225e1c));if(!_0x145c3b['length'])throw new _0x3fd207('addcommentthreadcommand-incorrect-ranges',null);_0x5ed376&&this['_createCommentThread'](_0x4db5c3,_0x5ed376),this['_createMarkersFromRanges'](_0x4db5c3,_0x145c3b,!!_0x5ed376);}_createMarkersFromRanges(_0x525bac,_0x4405d3,_0x46246c){this['editor']['model']['change'](_0x5c6c34=>{for(const _0x143ef7 of _0x4405d3){const _0x27ddae='comment:'+_0x525bac+':'+_0x185ea0()['substr'](0x1,0x5);_0x5c6c34['addMarker'](_0x27ddae,{'range':_0x143ef7,'usingOperation':_0x46246c,'affectsData':_0x46246c});}});}_createCommentThread(_0x1d22f8,_0x15b757){const _0x1db476=this['editor']['plugins']['get']('CommentsRepository'),_0xfd9341=this['editor']['config']['get']('collaboration.channelId'),_0x32b0c2=this['editor']['plugins']['get']('Users')['me'];if(!_0x32b0c2)throw new _0x3fd207('addcommentthreadcommand-user-not-found',null);_0x1db476['addCommentThread']({'threadId':_0x1d22f8,'channelId':_0xfd9341,'comments':[{'authorId':_0x32b0c2['id'],'content':_0x15b757,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x359e3c){for(const _0x965d0f of _0x359e3c['getItems']())if(this['_itemIsContent'](_0x965d0f))return!0x0;return!0x1;}_itemIsContent(_0x586e36){return _0x586e36['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x586e36)&&!_0x586e36['is']('element','tableCell');}_trimToContent(_0x665871){const _0x2ab4c0=_0x2247be=>!this['_itemIsContent'](_0x2247be['item']),_0x598d0d=_0x665871['start']['getLastMatchingPosition'](_0x2ab4c0),_0x451b36=_0x665871['end']['getLastMatchingPosition'](_0x2ab4c0,{'direction':'backward'});return this['editor']['model']['createRange'](_0x598d0d,_0x451b36);}},di=class extends _0x12b188{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3fcfa8){super(_0x3fcfa8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x5f55cc=this['editor'],_0x20f846=_0x5f55cc['model']['document']['selection'],_0x1e06ae=_0x98290e(()=>this['refreshSelectedViews'](),0xa);_0x20f846['on']('change:range',(_0x2b8da2,_0x147523)=>{_0x147523['directChange']&&(_0x1e06ae['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5f55cc['editing']['view']['document'],'change:isFocused',(_0x5e8b45,_0x5984b,_0x5c6dac)=>{_0x5c6dac&&_0x1e06ae();}),this['listenTo'](_0x5f55cc['ui']['focusTracker'],'change:isFocused',(_0x2c4fad,_0x5982d3,_0xd21e6c)=>{_0xd21e6c||this['fire']('blur',{'isAnnotationTracked':_0x5ec8de=>this['_editorAnnotationsData']['has'](_0x5ec8de['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0x56a01a){if(this['_editorAnnotations']['has'](_0x56a01a['view']))return;this['_editorAnnotations']['add'](_0x56a01a['view']),this['editor']['ui']['focusTracker']['add'](_0x56a01a['view']['element']);const _0x2fae1e=this['editor']['plugins']['get'](ti);this['listenTo'](_0x2fae1e['collection'],'remove',(_0x598f5d,_0x1ddd16)=>{this['editor']['ui']['focusTracker']['remove'](_0x1ddd16['view']['element']),this['_editorAnnotations']['delete'](_0x1ddd16['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x1745e8){if('function'!=typeof _0x1745e8)throw new _0x3fd207('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1745e8);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x4e1c28,annotations:_0x7f89db}){const _0x157743=[],_0x19ed73=this['editor']['model']['document']['selection'],_0x55dd44=Array['from'](_0x19ed73['getRanges']());for(const [_0x521776,_0xcac468]of this['_editorAnnotationsData']){const _0x171fa1=_0x51413a(_0xcac468),_0x3f8749=_0x7f89db['getByInnerView'](_0x521776);_0x171fa1&&_0x3f8749&&_0x157743['push']({'annotation':_0x3f8749,'range':_0x171fa1});}function _0x51413a(_0x454bf0){for(const _0x4f1b1b of _0x454bf0)for(const _0x4b41d7 of _0x55dd44)if(_0x4f1b1b['containsRange'](_0x4b41d7,!_0x19ed73['isCollapsed']))return _0x4f1b1b;return null;}const _0xcdcf6f=new Map(Array['from'](_0x7f89db,(_0x3d9e7c,_0x519fad)=>[_0x3d9e7c,_0x519fad]));return _0x157743['sort']((_0x46e3d2,_0x31b346)=>{const _0x3b3464=_0x46e3d2['range'],_0x2a625e=_0x31b346['range'];if(!_0x3b3464['isEqual'](_0x2a625e)){if(_0x3b3464['containsRange'](_0x2a625e,!0x0))return 0x1;if(_0x2a625e['containsRange'](_0x3b3464,!0x0))return-0x1;}return _0x46e3d2['annotation']==_0x4e1c28?-0x1:_0x31b346['annotation']==_0x4e1c28?0x1:(_0xcdcf6f['get'](_0x46e3d2['annotation'])??0x0)-(_0xcdcf6f['get'](_0x31b346['annotation'])??0x0);})['map'](_0x52c3f5=>_0x52c3f5['annotation']);}get _editorAnnotationsData(){const _0x3b409c=new Map();for(const _0x30e1bf of Array['from'](this['_dataCollectors']))for(const [_0x3b3062,_0x4d9f35]of _0x30e1bf())_0x3b409c['set'](_0x3b3062,_0x4d9f35);return _0x3b409c;}},li=class extends _0x12b188{afterInit(){const _0x34d1c0=this['editor'];_0x34d1c0['plugins']['has']('RestrictedEditingModeEditing')&&_0x34d1c0['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x12b188{constructor(_0x21caf6){super(_0x21caf6),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x2c77ba=this['editor'],_0x17ab4e=_0x2c77ba['commands']['get']('importWord'),_0x1ed75e=_0x2c77ba['plugins']['get'](_0x23b29b);_0x17ab4e&&(_0x17ab4e['on']('execute',(_0x12ec83,[,_0x246721])=>{_0x246721['collaboration_features']={'comments':!0x0,'user_id':_0x1ed75e['me']['id']};},{'priority':_0x4103ab['high']+0xa}),this['listenTo'](_0x17ab4e,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0x397d69,_0x439f70){const {comment_threads:_0x463c27}=_0x439f70;_0x463c27&&_0x463c27['forEach'](({thread_id:_0x320bbc,comments:_0x20ccd5,is_resolved:_0x971c93})=>{const _0x7b4b72=new Date(),_0x10e523=_0x20ccd5['map'](({author:_0x54e965,content:_0x1558e0,created_at:_0x276bd0})=>({'content':_0x1558e0,'authorId':this['editor']['plugins']['get'](_0x23b29b)['me']['id'],'createdAt':_0x7b4b72,'attributes':{'@external':{'authorName':_0x54e965,'createdAt':_0x276bd0?new Date(_0x276bd0):new Date(),'source':'importWord'}}})),_0x261002=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x261002,'threadId':_0x320bbc,'comments':_0x10e523,'resolvedAt':_0x971c93?_0x7b4b72:null});});}},ui=class extends _0x12b188{constructor(_0x262a83){super(_0x262a83),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x386b26=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x386b26,'contentInsertion',(_0x4070d5,_0x2d033e)=>this['_removeMarkersWithoutThreads'](_0x2d033e['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x333539){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x333539;const _0xfedb0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x58cf8d of _0x333539['keys']()){const [_0x281347,_0x5e725e]=_0x58cf8d['split'](':');'comment'!=_0x281347||_0xfedb0['hasCommentThread'](_0x5e725e)||_0x333539['delete'](_0x58cf8d);}return _0x333539;}_registerMarkerInClipboardPipeline(){const _0x43a295=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x360651=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x360651&&_0x43a295['_registerMarkerToCopy']('comment',_0x360651);}_mapCommentsCopyConfigToRegisterConfiguration(_0x536275){switch(_0x536275){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x499736){const _0x2959e5=_0x499736['split'](':');return{'group':_0x2959e5[0x0],'id':_0x2959e5[0x1],'part':_0x2959e5[0x2]};}var pi=class extends _0x12b188{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d2269,_0x152d81)=>{if(!_0x152d81['options']['showCommentHighlights'])return null;if(_0x152d81['options']['ignoreResolvedComments']){const {id:_0x3e5624}=fi(_0x5d2269['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x3e5624)?.['isResolved']&&_0x5d2269['item'])return _0x152d81['consumable']['consume'](_0x5d2269['item'],'addMarker:'+_0x5d2269['markerName']),_0x152d81['consumable']['consume'](_0x5d2269['item'],'removeMarker:'+_0x5d2269['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2690dc=>{_0x2690dc['on']('addMarker:comment',(_0xcad72d,_0x2e3937,_0x7bf824)=>{if(!_0x7bf824['options']['showCommentHighlights'])return;const _0x1f567a=_0x2e3937['item'];if(!_0x1f567a)return;const _0x2d223e=_0x7bf824['mapper']['toViewElement'](_0x1f567a);this['editor']['model']['schema']['isObject'](_0x1f567a)&&_0x2d223e&&!_0x2d223e['getCustomProperty']('widget')&&_0x2d223e['is']('containerElement')&&Ct(_0x2d223e,_0x7bf824['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x569f1a,{writer:_0x250be5,options:_0x2485c5})=>{if(!_0x2485c5['showCommentHighlights'])return null;const _0x37314c=_0x250be5['createContainerElement']('div'),_0x338939=_0x250be5['createEmptyElement']('hr');return _0x250be5['addClass']('ck-horizontal-line',_0x37314c),_0x250be5['insert'](_0x250be5['createPositionAt'](_0x37314c,0x0),_0x338939),_0x37314c;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x48e589,{writer:_0x1958a3,options:_0x55f580})=>{if(!_0x55f580['showCommentHighlights'])return null;const _0x365755=_0x1958a3['createContainerElement']('span'),_0x20c8b5=_0x1958a3['createEmptyElement']('img');return _0x1958a3['addClass']('image-inline',_0x365755),_0x1958a3['insert'](_0x1958a3['createPositionAt'](_0x365755,0x0),_0x20c8b5),_0x365755;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x368540,{writer:_0x611a75,options:_0x1b2b79})=>{if(_0x1b2b79['showCommentHighlights'])return _0x611a75['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x47cae9,_0x1e010d,_0x56f802)=>{_0x56f802['options']['showCommentHighlights']&&_0x47cae9['stop']();},{'priority':'high'});}},wi=class extends _0x12b188{static get requires(){return[oi,di,_0x23b29b,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xcd736e){super(_0xcd736e),this['set']('isThreadsLoadingPaused',!0x0),_0xcd736e['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x431838,_0x226c7c,_0x118464,_0x55b0c9)=>{const _0x2b14a1=_0xcd736e['plugins']['get'](oi),_0x920d19=_0x118464?fi(_0x118464)['id']:null;_0xcd736e['model']['change'](()=>{if(_0x920d19){const _0x4f2c23=this['getAllMarkersForId'](_0x920d19);for(const _0x1c5481 of _0x4f2c23)_0xcd736e['editing']['reconvertMarker'](_0x1c5481);}if(_0x55b0c9){const {id:_0x4263c4}=fi(_0x55b0c9),_0x29dba2=_0x2b14a1['getCommentThread'](_0x4263c4);if(_0x29dba2&&_0x29dba2['unlinkedAt'])return;if(_0x29dba2&&!_0x29dba2['isAttached'])return;const _0x4049f0=this['getAllMarkersForId'](_0x4263c4);for(const _0x379023 of _0x4049f0)_0xcd736e['editing']['reconvertMarker'](_0x379023);}}),_0x920d19&&this['scrollToThreadMarker'](_0x920d19);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x495ec9=this['editor'],_0x3cccec=_0x495ec9['plugins']['get'](oi),_0x1394eb=_0x495ec9['config']['get']('collaboration.channelId'),_0x180890=_0x3cccec['getCommentThreads']()['filter'](_0x1dff6c=>_0x1dff6c['channelId']!==_0x1394eb);_0x495ec9['commands']['add']('addCommentThread',new ci(_0x495ec9)),this['listenTo'](_0x495ec9,'change:isReadOnly',(_0x4fc34b,_0x3a5a22,_0xbf211a)=>{_0x3cccec['switchReadOnly'](_0xbf211a,_0x495ec9['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3cccec,gi('addCommentThread',_0x1394eb),(_0x4921be,{threadId:_0x4e3bdf})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x4e3bdf)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4e3bdf);}),this['listenTo'](_0x3cccec,gi('removeCommentThread',_0x1394eb),(_0x751279,{threadId:_0x4290ad})=>{_0x495ec9['model']['enqueueChange']({'isUndoable':!0x1},_0x4ee70f=>{const _0x3c9d98=this['getAllMarkersForId'](_0x4290ad);for(const _0x8f6275 of _0x3c9d98)_0x4ee70f['removeMarker'](_0x8f6275);});}),this['listenTo'](_0x3cccec,gi('resolveCommentThread',_0x1394eb),(_0x4cca58,{threadId:_0x5c4f67})=>{this['_reconvertMarkers'](_0x5c4f67);const _0x3f3df4=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x3f3df4['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x5c4f67)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3cccec,gi('reopenCommentThread',_0x1394eb),(_0x5f07cd,{threadId:_0x1f17f7})=>{this['_reconvertMarkers'](_0x1f17f7);},{'priority':'low'}),this['listenTo'](_0x3cccec,gi('addComment',_0x1394eb),(_0x260c2e,{threadId:_0xe263cd,isFromAdapter:_0x3aaccf})=>{const _0x10b1b0=this['getAllMarkersForId'](_0xe263cd);!_0x3aaccf&&0x0!=_0x10b1b0['length']&&_0x3cccec['hasCommentThread'](_0xe263cd)&&0x1===_0x3cccec['getCommentThread'](_0xe263cd)['length']&&_0x495ec9['model']['enqueueChange']({'isUndoable':!0x1},_0x3b50fd=>{for(const _0x551a13 of _0x10b1b0)_0x3b50fd['updateMarker'](_0x551a13,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x180890);}afterInit(){!async function(_0x318ffb){const _0x32ba48='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x8dea20=0x79440,_0x2e4434={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x29cc88(_0x5045f9){const _0xc47546=new window['Promise'](_0x15bfb2=>{_0x5045f9['once']('ready',_0x15bfb2);}),_0x2cac14=window['Date']['now'](),_0x5481fb=_0x5045f9['config']['get']('licenseKey');async function _0x2ae980(){let _0x159e5b,_0x44b63b=null,_0x3fdfb6=null;try{return'GPL'==_0x5481fb?'NotAllowed':(_0x159e5b=_0xf82203(),_0x159e5b?(_0x159e5b['usageEndpoint']&&(_0x3fdfb6=_0x22e3f2(_0x159e5b['usageEndpoint'],_0x159e5b['jti'])),await _0x25e317()?_0x6b920a()?_0x48d1ef()?'Expired':_0x5457b4()?('evaluation'==_0x159e5b['licenseType']&&(_0x44b63b=_0x4d4c62('EvaluationLimit')),await _0x53a75e()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x48d1ef(){const _0x49ad6c=['evaluation','trial']['includes'](_0x159e5b['licenseType'])?_0x2cac14/0x3e8:0xe10*_0x8dea20;return _0x159e5b['exp']<_0x49ad6c;}function _0x6b920a(){const _0x111bd3=_0x159e5b['features'];if(!_0x111bd3)return!0x1;if(_0x111bd3['includes']('*'))return!0x0;if(_0x111bd3['includes']('CMT'))return!0x0;if(_0x111bd3['includes']('TRILIUM')&&_0x3b5c62())return!0x0;if(_0x111bd3['includes']('RCMT')){if(_0x11c9b5())return!0x0;if(_0x336f58()||_0x37d112())return!0x0;}return!0x1;}function _0x5457b4(){const _0x2903bd=_0x159e5b['licensedHosts'];if(!_0x2903bd||0x0==_0x2903bd['length'])return!0x0;const {hostname:_0x2775df}=new URL(window['location']['href']);if(_0x2903bd['includes'](_0x2775df))return!0x0;const _0x10f47b=_0x2775df['split']('.');return _0x2903bd['filter'](_0x378e85=>_0x378e85['includes']('*'))['map'](_0x9aadce=>_0x9aadce['split']('.'))['filter'](_0x108379=>_0x108379['length']<=_0x10f47b['length'])['map'](_0x35305b=>Array(_0x10f47b['length']-_0x35305b['length'])['fill']('*'===_0x35305b[0x0]?'*':'')['concat'](_0x35305b))['some'](_0x3b407c=>_0x10f47b['every']((_0x95ddee,_0x3fa734)=>_0x3b407c[_0x3fa734]===_0x95ddee||'*'===_0x3b407c[_0x3fa734]));}function _0x53a75e(){return _0x44b63b&&_0x3fdfb6?new window['Promise']((_0x439d00,_0x1bea1e)=>{_0x44b63b['then'](_0x439d00,_0x1bea1e),_0x3fdfb6['then'](_0x481c5f=>{'Valid'!=_0x481c5f&&_0x439d00(_0x481c5f);},_0x1bea1e);}):_0x44b63b||_0x3fdfb6||'Valid';}}function _0x22e3f2(_0x41a541,_0x2e44e9){return new window['Promise'](_0x3b528c=>{if(_0x3bd45f())return _0x3b528c('Valid');_0x4580b3(),_0x5045f9['decorate']('_sendUsageRequest');let _0x29665b=!0x1;const _0x237b75=_0x185ea0();function _0x3a343b(_0x21036a){return!!_0x21036a&&('object'==typeof _0x21036a||'function'==typeof _0x21036a)&&'function'==typeof _0x21036a['then']&&'function'==typeof _0x21036a['catch'];}function _0x17bfd0(_0x20cf4c){_0x4e7c06(_0x20cf4c)['then'](_0x32c8b4=>_0x32c8b4&&'ok'==_0x32c8b4['status']?_0x5dea99(_0x4d630d(_0x237b75+_0x2e44e9))!=_0x32c8b4['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x39de35=>(_0x5eed40(),_0x39de35),()=>{const _0x4388f8=_0x18073f();return null==_0x4388f8?(_0x5eed40(),'Valid'):_0x2cac14-_0x4388f8>0x240c8400?'UsageLimit':'Valid';})['then'](_0x3b528c)['catch'](()=>{_0x3b528c('UsageLimit');});const _0x3cbb60=0x36ee80;function _0x5eed40(){const _0x3530f2='llct-'+_0x5dea99(_0x4d630d(_0x41a541)),_0x3707b5=_0x1bd57f(_0x5dea99(window['Math']['ceil'](_0x2cac14/_0x3cbb60)));window['localStorage']['setItem'](_0x3530f2,_0x3707b5);}function _0x18073f(){const _0x12f464='llct-'+_0x5dea99(_0x4d630d(_0x41a541)),_0x482d00=window['localStorage']['getItem'](_0x12f464);return _0x482d00?window['parseInt'](_0x1bd57f(_0x482d00),0x10)*_0x3cbb60:null;}function _0x4e7c06(_0x5ba112){return new window['Promise']((_0x295168,_0x191a62)=>{_0x5ba112['then'](_0x295168,_0x191a62),window['setTimeout'](_0x191a62,0x1d4c0);});}}_0x5045f9['on']('_sendUsageRequest',(_0x3fb637,_0x29b8bb)=>{if(_0x29b8bb[0x0]!=_0x41a541)return _0x3b528c('UsageLimit');_0x29b8bb[0x1]={..._0x29b8bb[0x1],'requestId':_0x237b75};},{'priority':'high'}),_0x5045f9['on']('_sendUsageRequest',_0x184d72=>{_0x3a343b(_0x184d72['return'])&&(_0x29665b=!0x0,_0x17bfd0(_0x184d72['return']));},{'priority':'low'}),_0xc47546['then'](()=>{_0x29665b||_0x3b528c('UsageLimit');});});function _0x3bd45f(){return'auto'==_0x5045f9['editing']['view']['_overlayModeHint'];}function _0x4580b3(){_0x5045f9['editing']['view']['_overlayModeHint']='auto';}}function _0x4d4c62(_0x2d8fb0){const _0x382511=[new window['Promise'](_0x11a024=>setTimeout(_0x11a024,0x93ecc)),_0xc47546['then'](()=>new window['Promise'](_0x57147e=>{let _0x52a095=0x0;_0x5045f9['model']['on']('applyOperation',(_0x5da602,_0x55fdeb)=>{_0x55fdeb[0x0]['isDocumentOperation']&&_0x52a095++,0x5e8==_0x52a095&&(_0x57147e(),_0x5da602['off']());});}))];return window['Promise']['race'](_0x382511)['then'](()=>_0x2d8fb0);}async function _0x4865b3(){await _0xc47546,_0x5045f9['model']['change']=_0x5dfef6,_0x5045f9['model']['enqueueChange']=_0x5dfef6,_0x5045f9['enableReadOnlyMode']('model');}function _0x3b5c62(){return window['glob']&&window['glob']['triliumVersion'];}function _0x11c9b5(){return _0x520049('WebSocketGateway')&&'connected'==_0xcd2ae3('WebSocketGateway')['state'];}function _0x336f58(){return _0x520049('RevisionViewerIntegration');}function _0x37d112(){return _0x520049('TrackChangesDataGetter');}function _0x1a352b(_0x58dc0e){const _0x5ab112=_0x3e990a();_0x5045f9[_0x5ab112]='commentsLicenseKey'+_0x58dc0e,'Valid'!=_0x58dc0e&&_0x4865b3();}function _0x3e990a(){const _0x5ad2b8=window['String'](window['performance']['now']())['replace']('.','');let _0x55cc5e='m';for(let _0x368d42=0x0;_0x368d42<_0x5ad2b8['length'];_0x368d42+=0x2){let _0x3028a2=window['parseInt'](_0x5ad2b8['substring'](_0x368d42,_0x368d42+0x2));_0x3028a2>=0x3e&&(_0x3028a2-=0x3e),_0x55cc5e+=_0x32ba48[_0x3028a2];}return _0x55cc5e;}function _0xf82203(){const _0x533d0f=_0x5481fb['split']('.');if(0x3!=_0x533d0f['length'])return null;return _0x5c0b67(_0x533d0f[0x1]);function _0x5c0b67(_0x5d963d){const _0x288779=_0x23fd63(_0x5d963d);return _0x288779&&_0x175aa1()?_0x288779:null;function _0x175aa1(){const _0x47cad1=_0x288779['jti'],_0xfa3de4=window['parseInt'](_0x47cad1['substring'](_0x47cad1['length']-0x8),0x10),_0x103901={..._0x288779,'jti':_0x47cad1['substring'](0x0,_0x47cad1['length']-0x8)};return delete _0x103901['vc'],_0x4d630d(_0x103901)==_0xfa3de4;}}}async function _0x25e317(){let _0x1f0c07=!0x0;try{const [_0x37295b,_0x1bbd8f,_0x34ad1f]=_0x5481fb['split']('.');return _0x317ecf(_0x37295b),await _0x2d6771(_0x37295b,_0x1bbd8f,_0x34ad1f),_0x1f0c07;}catch{return!0x1;}function _0x317ecf(_0xa27e2d){const _0x143295=_0x23fd63(_0xa27e2d);_0x143295&&'ES256'==_0x143295['alg']||(_0x1f0c07=!0x1);}async function _0x2d6771(_0x13a80a,_0x4deb4c,_0x126983){const _0x25f956=window['Uint8Array']['from'](_0x3396f5(_0x126983),_0x1e28d5=>_0x1e28d5['charCodeAt'](0x0)),_0x433798=new window['TextEncoder']()['encode'](_0x13a80a+'.'+_0x4deb4c),_0x522948=window['crypto']['subtle'];if(!_0x522948)return;const _0x4cef92=await _0x522948['importKey']('jwk',_0x2e4434,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x522948['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x4cef92,_0x25f956,_0x433798)||(_0x1f0c07=!0x1);}}function _0x23fd63(_0x8fc24e){return _0x8fc24e['startsWith']('ey')?JSON['parse'](_0x3396f5(_0x8fc24e)):null;}function _0x3396f5(_0x533508){return window['atob'](_0x533508['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x4d630d(_0x3b2201){let _0xb45a7c=0x1505;function _0x3b89f5(_0x92371f){for(let _0x32c8d6=0x0;_0x32c8d6<_0x92371f['length'];_0x32c8d6++){const _0x4281a7=_0x92371f['charCodeAt'](_0x32c8d6);_0xb45a7c=(_0xb45a7c<<0x5)+_0xb45a7c+_0x4281a7,_0xb45a7c&=_0xb45a7c;}}function _0x202f5b(_0x41a781){Array['isArray'](_0x41a781)?_0x41a781['forEach'](_0x202f5b):_0x41a781&&'object'==typeof _0x41a781?Object['entries'](_0x41a781)['sort']()['forEach'](([_0x245cad,_0x1ae70a])=>{_0x3b89f5(_0x245cad),_0x202f5b(_0x1ae70a);}):_0x3b89f5(window['String'](_0x41a781));}return _0x202f5b(_0x3b2201),_0xb45a7c>>>0x0;}function _0x5dea99(_0xa57399){return _0xa57399['toString'](0x10)['padStart'](0x8,'0');}function _0x1bd57f(_0x3bf5b9){return _0x3bf5b9['split']('')['reverse']()['join']('');}function _0x520049(_0x5862e6){return _0x5045f9['plugins']['has'](_0x5862e6);}function _0xcd2ae3(_0x2b14b9){return _0x5045f9['plugins']['get'](_0x2b14b9);}function _0x5dfef6(){}_0x1a352b(await _0x2ae980());}_0x29cc88(_0x318ffb['editor']);}(this);}destroy(){const _0xb85092=this['editor']['plugins']['get'](oi),_0x36099d=this['editor']['config']['get']('collaboration.channelId');for(const _0x3cff94 of _0xb85092['getCommentThreads']({'channelId':_0x36099d}))_0xb85092['_detachCommentThread'](_0x3cff94['id']),_0xb85092['_threads']['delete'](_0x3cff94['id']);super['destroy']();}['hasMarkerForId'](_0x27cc0d){return this['getAllMarkersForId'](_0x27cc0d)['length']>0x0;}getAllMarkersForId(_0x2d9642){const _0x2f9af7=[];for(const _0x4cf065 of this['editor']['model']['markers'])_0x4cf065['name']['startsWith']('comment:'+_0x2d9642)&&_0x2f9af7['push'](_0x4cf065);return _0x2f9af7;}['scrollToThreadMarker'](_0x5241d0){setTimeout(()=>{const _0x22390a=this['_getTargetForId'](_0x5241d0);_0x22390a&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x5241d0&&_0x38c3bf({'target':_0x22390a[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0xd71a6b){this['editor']['model']['change'](()=>{for(const _0x59850e of this['getAllMarkersForId'](_0xd71a6b))this['editor']['editing']['reconvertMarker'](_0x59850e);});}_attachArchivedThread(_0x178275){const _0x1cc1c=this['editor']['plugins']['get'](oi),_0x39d012=this['editor']['plugins']['get'](di),_0x4bdcd2=_0x1cc1c['getCommentThread'](_0x178275);if(!_0x4bdcd2['isAttached']){const _0x533334=_0x4bdcd2['attachTo'](()=>this['_getTargetForId'](_0x4bdcd2['id']));_0x39d012['registerAnnotation'](_0x533334),_0x4bdcd2['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x1e9ad3=this['editor'],_0x5c3eb6=_0x1e9ad3['plugins']['get'](_0x23b29b);_0x1e9ad3['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x371e26,_0x193eef)=>{const {id:_0x3d3d62}=fi(_0x371e26['markerName']),_0x5835b4=_0x1e9ad3['plugins']['get'](oi)['getCommentThread'](_0x3d3d62),_0x2eddd9=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x3d3d62;let _0x1089b1;if(_0x5835b4&&_0x5835b4['isResolved']&&!_0x2eddd9&&_0x371e26['item'])return _0x193eef['consumable']['consume'](_0x371e26['item'],'addMarker:'+_0x371e26['markerName']),_0x193eef['consumable']['consume'](_0x371e26['item'],'removeMarker:'+_0x371e26['markerName']),null;const _0x226daa=['ck-comment-marker'];return _0x2eddd9&&_0x226daa['push']('ck-comment-marker--active'),_0x1089b1=_0x5835b4?.['length']?_0x5835b4['comments']['first']['author']['id']:_0x5c3eb6['me']['id'],{'classes':_0x226daa,'attributes':{'data-comment':_0x3d3d62,'data-author-id':_0x1089b1}};}}),_0x1e9ad3['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x568439,{options:_0x1f537c})=>{if(_0x1f537c['showCommentHighlights'])return null;const _0xee676c=_0x1e9ad3['plugins']['get'](oi),_0x4eae72=_0x1e9ad3['model']['markers']['get'](_0x568439),{id:_0x4c332e,part:_0x3745c2}=fi(_0x568439);return _0x4eae72&&!_0x4eae72['affectsData']||_0x1f537c['ignoreResolvedComments']&&_0xee676c['getCommentThread'](_0x4c332e)?.['isResolved']?null:{'group':'comment','name':_0x3745c2?_0x4c332e+':'+_0x3745c2:_0x4c332e};}}),_0x1e9ad3['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x7da22b,{writer:_0x586452})=>_0x586452['createElement']('$marker',{'data-name':'comment:'+_0x7da22b['getAttribute']('id')})}),_0x1e9ad3['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x49ddfe=this['editor'],_0x18d3a=_0x49ddfe['plugins']['get'](oi),_0x6ee393=new Set(),_0x47d703=new Set();_0x49ddfe['model']['document']['registerPostFixer'](_0xfa26c4=>{let _0x3e3496=!0x1;for(const {name:_0x2345c6,data:_0x53cf97}of _0x49ddfe['model']['document']['differ']['getChangedMarkers']()){const {group:_0xa2eb01,id:_0x1bd5d8}=fi(_0x2345c6);let _0x595d11=_0x53cf97['newRange'];if('comment'!==_0xa2eb01||!_0x595d11)continue;const _0x21f27c='$graveyard'===_0x595d11['root']['rootName'];_0x21f27c||(_0x595d11=_i(_0x595d11,_0x49ddfe['model']),!_0x595d11||_0x595d11['isCollapsed']||!_0x53cf97['newRange']||_0x595d11['isEqual'](_0x53cf97['newRange']))?_0x49ddfe['model']['hasContent'](_0x595d11)&&!_0x21f27c?this['isThreadsLoadingPaused']?_0x6ee393['add'](_0x2345c6):this['_handleThreadMarker'](_0x2345c6,_0x1bd5d8):(_0x47d703['add'](_0x2345c6),_0x6ee393['delete'](_0x2345c6),_0xfa26c4['removeMarker'](_0x2345c6),_0x3e3496=!0x0):(_0xfa26c4['updateMarker'](_0x2345c6,{'range':_0x595d11}),_0x3e3496=!0x0);}return _0x3e3496;}),this['on']('change:isThreadsLoadingPaused',(_0x3c3a75,_0x286d5f,_0x5b182e)=>{if(!_0x5b182e&&_0x6ee393['size'])for(const _0xcee4b3 of _0x6ee393){const {id:_0x4fc8bb}=fi(_0xcee4b3);_0x6ee393['delete'](_0xcee4b3),_0x49ddfe['model']['markers']['get'](_0xcee4b3)&&this['_handleThreadMarker'](_0xcee4b3,_0x4fc8bb);}}),this['listenTo'](_0x49ddfe['model']['document'],'change',()=>{for(const {name:_0x4cff8a,data:{newRange:_0x44f9aa}}of _0x49ddfe['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2eb2c0,id:_0x1a8e9b}=fi(_0x4cff8a);if('comment'!==_0x2eb2c0)continue;const _0x43b9b2=_0x18d3a['getCommentThread'](_0x1a8e9b),_0x4fd7e3=this['hasMarkerForId'](_0x1a8e9b);_0x43b9b2&&(!_0x43b9b2['_hasTargetInContent']&&_0x44f9aa&&_0x49ddfe['editing']['view']['once']('render',()=>{const _0x5daef6=_0x49ddfe['plugins']['get'](ti),_0x58bcd5=_0x18d3a['_threadToController']['get'](_0x43b9b2)['view'];_0x5daef6['getByInnerView'](_0x58bcd5)['refreshVisibility']();},{'priority':'low'}),_0x43b9b2['_hasTargetInContent']=_0x4fd7e3||!!_0x44f9aa),_0x44f9aa||(_0x47d703['add'](_0x4cff8a),_0x6ee393['delete'](_0x4cff8a));}for(const _0x130c78 of _0x47d703){const {id:_0x483494}=fi(_0x130c78),_0x50d4db=_0x18d3a['getCommentThread'](_0x483494);if(_0x6ee393['delete'](_0x130c78),!_0x50d4db)continue;const _0x3274f3=this['hasMarkerForId'](_0x483494);_0x3274f3||_0x50d4db['isSubmitted']?_0x3274f3||_0x50d4db['unlinkedAt']||_0x50d4db['setUnlinkedAt'](new Date()):_0x50d4db['remove']();}_0x47d703['clear']();});}_handleInitialThreads(_0x1d1d7b){_0x1d1d7b['forEach'](_0x59869e=>{_0x59869e['unlinkedAt']&&this['_attachArchivedThread'](_0x59869e['id']);});}_getTargetForId(_0x2c12f2){const _0x494e7e=this['editor'],_0x3af908=this['getAllMarkersForId'](_0x2c12f2);return _0x71726c(_0x494e7e['editing'],_0x3af908);}_getTextContext(_0x4352bf){const _0xfe86dd=this['getAllMarkersForId'](_0x4352bf);let _0x4c0d55='',_0x3309dd=!0x1;for(const _0x3af153 of _0xfe86dd){const _0x19fc57=_0x3af153['getRange']();for(const _0x227a9d of Array['from'](_0x19fc57['getItems']()))_0x227a9d['is']('$textProxy')?(_0x4c0d55&&_0x3309dd&&(_0x4c0d55+='\x20',_0x3309dd=!0x1),_0x4c0d55+=_0x227a9d['data']):_0x3309dd=!0x0;_0x3309dd=!0x0;}return _0x4c0d55['substring'](0x0,0x96);}_attachMarkerToThread(_0x561a7c,_0x453aa3){const _0x53ee4e=this['editor'],_0x31bea8=_0x53ee4e['plugins']['get'](oi);let _0x3935af=_0x31bea8['getCommentThread'](_0x453aa3);const _0x5c4480=_0x53ee4e['config']['get']('collaboration.channelId'),_0x2a0f84=_0x53ee4e['plugins']['get'](di);return _0x3935af&&(_0x3935af['unlinkedAt']&&_0x3935af['setUnlinkedAt'](null),_0x3935af['isAttached'])||(this['getAllMarkersForId'](_0x453aa3)[0x0]['managedUsingOperations']?_0x31bea8['fetchCommentThread']({'channelId':_0x5c4480,'threadId':_0x453aa3})['then'](_0x540ae2=>{if('destroyed'!==_0x53ee4e['state']){if(_0x3935af=_0x540ae2,_0x3935af&&!_0x3935af['isAttached']){const _0x39f589=_0x3935af['attachTo'](()=>this['_getTargetForId'](_0x453aa3));_0x2a0f84['registerAnnotation'](_0x39f589),_0x3935af['isResolved']&&this['_reconvertMarkers'](_0x453aa3);}else{if(!_0x3935af){const _0x645635=this['getAllMarkersForId'](_0x453aa3);_0x53ee4e['model']['change'](_0x53dafd=>{for(const _0x44f648 of _0x645635)_0x53dafd['removeMarker'](_0x44f648);});}}}}):_0x53ee4e['editing']['view']['once']('render',()=>{if(_0x31bea8['getCommentThread'](_0x453aa3))return;const _0x2e633c=_0x53ee4e['plugins']['get'](ti);_0x3935af=_0x31bea8['openNewCommentThread']({'channelId':_0x5c4480,'threadId':_0x453aa3,'target':()=>this['_getTargetForId'](_0x453aa3),'context':{'type':'text','value':this['_getTextContext'](_0x453aa3)}});const _0x7e5e25=_0x31bea8['_threadToController']['get'](_0x3935af)['view'],_0x5ee211=_0x2e633c['getByInnerView'](_0x7e5e25);_0x5ee211&&_0x2a0f84['registerAnnotation'](_0x5ee211);},{'priority':'low'})),_0x3935af;}['_handleThreadMarker'](_0x15c149,_0x48b201){const _0x7cf440=this['_attachMarkerToThread'](_0x15c149,_0x48b201);_0x7cf440&&!_0x7cf440['context']&&_0x7cf440['setContext']({'type':'text','value':this['_getTextContext'](_0x48b201)});}_initAriaMarkerChangeAnnouncements(){const _0x522f2e=this['editor'];_0x1b50a0(_0x522f2e['model'],({left:_0x23b951,entered:_0x378521})=>{for(const _0x345699 of _0x23b951)if(Ai(_0x345699)){_0x522f2e['ui']['ariaLiveAnnouncer']['announce'](Et(_0x522f2e['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5c1290 of _0x378521)if(Ai(_0x5c1290)){_0x522f2e['ui']['ariaLiveAnnouncer']['announce'](Et(_0x522f2e['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x10baf1(_0x14d518)));break;}});}};function gi(_0x4bc4a4,_0x31533b){return _0x31533b?_0x4bc4a4+':'+_0x31533b:_0x4bc4a4;}function _i(_0x11f325,_0x5e519a){const _0x4601e9=_0x5e519a['schema'],_0x95ef8c=_0x5e519a['createRange'](_0x11f325['start']);for(const _0x1da677 of _0x11f325['getWalker']()){const {type:_0x15942c,item:_0x53074f,nextPosition:_0x3e945c}=_0x1da677;if('text'===_0x15942c||_0x4601e9['isObject'](_0x53074f)){const _0x2ce602=_0x5e519a['createPositionBefore'](_0x53074f);_0x95ef8c['isCollapsed']&&(_0x95ef8c['start']=_0x2ce602),_0x95ef8c['end']=_0x3e945c;}}return _0x95ef8c;}function Ai(_0x4fd141){return'comment'===fi(_0x4fd141['name'])['group'];}var vi=class extends _0x12b188{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x97ed01=this['editor'],_0x2d37b8=_0x97ed01['plugins']['get'](oi),_0x478806=_0x97ed01['plugins']['get'](wi),_0x788aa8=_0x97ed01['plugins']['get'](ti),_0x16d217=_0x97ed01['plugins']['get'](di);_0x97ed01['ui']['componentFactory']['add']('comment',()=>{const _0x3c00cd=this['_createUIButton'](_0x422b1d);return _0x3c00cd['tooltip']=!0x0,_0x3c00cd;}),_0x97ed01['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x16d217['addSourceCollector'](()=>{const _0x140972=[];for(const [_0x19435c,_0x3df7b1]of _0x2d37b8['_threadToController']){const _0x41d9c8=_0x478806['getAllMarkersForId'](_0x19435c['id']),_0x7fa154=_0x41d9c8['map'](_0x223115=>_0x223115['getRange']());_0x41d9c8['length']>0x0&&_0x140972['push']([_0x3df7b1['view'],_0x7fa154]);}return _0x140972;}),this['listenTo'](_0x788aa8,'change:activeAnnotations',(_0x2f5f1b,_0x5b3294,_0x3bb572)=>{const _0x290ff3=Array['from'](_0x3bb572)['map'](_0x17042d=>_0x17042d['innerView'])['find'](_0x3093b6=>_0x2d37b8['_viewToController']['has'](_0x3093b6));if(!_0x290ff3)return void(_0x478806['activeMarker']=null);const _0x44279f=_0x2d37b8['_viewToController']['get'](_0x290ff3)['model']['id'],_0xf8d4ca='comment:'+_0x44279f;_0x44279f&&_0x478806['hasMarkerForId'](_0x44279f)?_0x478806['activeMarker']=_0xf8d4ca:_0x478806['activeMarker']&&(_0x478806['activeMarker']=null);}),this['listenTo'](_0x2d37b8,'removeCommentThread',(_0x11395b,{threadId:_0x546fae,isFromAdapter:_0x1ca09d})=>{!_0x1ca09d&&_0x97ed01['ui']['focusTracker']['isFocused']&&_0x478806['hasMarkerForId'](_0x546fae)&&_0x97ed01['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2d37b8,'addComment',(_0x3a77e8,{threadId:_0x17d6a1,isFromAdapter:_0x2adc22})=>{!_0x2adc22&&_0x478806['hasMarkerForId'](_0x17d6a1)&&_0x2d37b8['hasCommentThread'](_0x17d6a1)&&0x1===_0x2d37b8['getCommentThread'](_0x17d6a1)['length']&&(_0x97ed01['editing']['view']['focus'](),_0x3a77e8['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x423141=[this['editor']];for(const _0x51987c of _0x423141){let _0x4d31f0;for(const _0x532973 in _0x51987c){const _0x478528=_0x532973,_0x4e28f9=_0x51987c[_0x478528];if('commentsLicenseKeyValid'==_0x4e28f9||'commentsLicenseKeyInvalid'==_0x4e28f9||'commentsLicenseKeyExpired'==_0x4e28f9||'commentsLicenseKeyDomainLimit'==_0x4e28f9||'commentsLicenseKeyNotAllowed'==_0x4e28f9||'commentsLicenseKeyEvaluationLimit'==_0x4e28f9||'commentsLicenseKeyUsageLimit'==_0x4e28f9){delete _0x51987c[_0x478528],_0x4d31f0=_0x4e28f9,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4d31f0&&_0x51987c['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4d31f0&&_0x51987c['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4d31f0&&_0x51987c['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4d31f0&&_0x51987c['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4d31f0&&_0x51987c['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x4d31f0&&_0x51987c['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x213ade){const _0x48a0ef=this['editor'],_0x5e7cb3=new _0x213ade(_0x48a0ef['locale']),_0x36a460=_0x48a0ef['commands']['get']('addCommentThread');return _0x5e7cb3['set']({'label':Et(_0x48a0ef['locale'],'Comment'),'icon':_0x1aed3d}),_0x5e7cb3['bind']('isEnabled')['to'](_0x36a460,'isEnabled',_0x36a460,'hasContent',(_0x4aedbc,_0xdc12ba)=>_0x4aedbc&&_0xdc12ba),this['listenTo'](_0x5e7cb3,'execute',()=>{_0x36a460['execute']();}),_0x5e7cb3;}},yi=class extends _0x12b188{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x3ee928){super(_0x3ee928),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x144828,_0x14c81e,_0x7a3e08)=>{_0x7a3e08?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x134410,_0x39b8f1]of this['editor']['commands'])_0x39b8f1['affectsData']&&'addCommentThread'!==_0x134410&&_0x39b8f1['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 _0x190c33=this['editor']['editing']['view']['document'];this['listenTo'](_0x190c33,'cut',_0x112df9=>_0x112df9['stop'](),{'priority':'highest'}),this['listenTo'](_0x190c33,'clipboardInput',_0xae6934=>_0xae6934['stop'](),{'priority':'highest'}),this['listenTo'](_0x190c33,'delete',_0x29284f=>_0x29284f['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x43d769,_0x2eb63d]of this['editor']['commands'])_0x2eb63d['affectsData']&&'addCommentThread'!==_0x43d769&&_0x2eb63d['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']);}},Ti=class extends _0xe32c07{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d0a76){super(_0x4d0a76),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x41ebb4=this['context']['plugins']['get'](ti);this['listenTo'](_0x41ebb4,'_activateAnnotation',(_0x2759d9,_0x18d93d)=>{for(const _0x205667 of this['activeUIs']){const _0x3b8f61=this['_uis']['get'](_0x205667);(0x0,this['uisData']['get'](_0x205667)['filter'])(_0x18d93d)&&_0x3b8f61['setActiveAnnotation'](_0x18d93d);}}),this['listenTo'](_0x41ebb4,'_deactivateAllAnnotations',()=>{for(const _0x97420f of this['activeUIs'])this['_uis']['get'](_0x97420f)['setActiveAnnotation'](null);}),this['listenTo'](_0x41ebb4['_visibleAnnotations'],'add',(_0x4bd147,_0x364eaa)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x364eaa);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x362407){return this['activeUIs']['has'](_0x362407);}activate(_0x3ee74d,_0x219bec=this['defaultFilter']){const _0x4343d0=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x3ee74d))throw new _0x3fd207('annotationsuis-missing-ui',this,{'uiName':_0x3ee74d});this['isActive'](_0x3ee74d)&&this['deactivate'](_0x3ee74d),this['activeUIs']['add'](_0x3ee74d);const _0x12e9e2=new Jt();Qt({'source':_0x4343d0['_visibleAnnotations'],'target':_0x12e9e2,'filter':_0x219bec}),this['uisData']['set'](_0x3ee74d,{'collection':_0x12e9e2,'filter':_0x219bec});const _0x7dac82=this['_uis']['get'](_0x3ee74d);_0x7dac82['attach'](_0x12e9e2),this['listenTo'](_0x7dac82,'change:activeAnnotation',(_0x142760,_0x410503,_0x45d1b0,_0x1d39ba)=>{_0x1d39ba&&_0x4343d0['_removeActiveAnnotation'](_0x1d39ba),_0x45d1b0&&_0x4343d0['_addActiveAnnotation'](_0x45d1b0);});}deactivate(_0x204947){if(this['activeUIs']['delete'](_0x204947),!this['_uis']['has'](_0x204947))throw new _0x3fd207('annotationsuis-missing-ui',this,{'uiName':_0x204947});const _0x30905e=this['_uis']['get'](_0x204947);_0x30905e['detach'](),this['stopListening'](_0x30905e),this['uisData']['get'](_0x204947)['collection']['destroy'](),this['uisData']['delete'](_0x204947);}switchTo(_0x47253e){if(!this['_uis']['has'](_0x47253e))throw new _0x3fd207('annotationsuis-missing-ui',this,{'uiName':_0x47253e});const _0xd599d3=this['context']['plugins']['get'](ti),_0x3f137d=Array['from'](_0xd599d3['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x47253e);const _0x1763f4=this['_uis']['get'](_0x47253e);_0x1763f4['setActiveAnnotation'](_0x3f137d),_0x1763f4['_setSelectedAnnotations']&&_0x3f137d&&_0x1763f4['_setSelectedAnnotations']([_0x3f137d]);}deactivateAll(){for(const _0x1bf476 of this['activeUIs'])this['deactivate'](_0x1bf476);}register(_0x596344,_0x166e58){if(this['_uis']['has'](_0x596344))throw new _0x3fd207('annotationsuis-register-already-registered');if('function'!=typeof _0x166e58['attach']||'function'!=typeof _0x166e58['detach']||'function'!=typeof _0x166e58['setActiveAnnotation'])throw new _0x3fd207('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x596344,_0x166e58);}refilterAnnotations(){const _0x4cc564=this['context']['plugins']['get'](ti)['collection'],_0x2688ce=new Map(),_0x5c4be0=Array['from'](this['activeUIs']);for(const _0x26a21e of this['activeUIs']){const _0xf230ea=this['uisData']['get'](_0x26a21e)['collection'];for(const _0x3bffba of _0xf230ea)_0x2688ce['set'](_0x3bffba,_0x26a21e);}for(const _0x491928 of _0x4cc564){const _0x4d7322=_0x2688ce['get'](_0x491928);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x491928);const _0x41f5e9=_0x5c4be0['find'](_0x4b99a2=>this['uisData']['get'](_0x4b99a2)['filter'](_0x491928));_0x4d7322!==_0x41f5e9&&(_0x4d7322&&this['uisData']['get'](_0x4d7322)['collection']['remove'](_0x491928),_0x41f5e9&&this['uisData']['get'](_0x41f5e9)['collection']['add'](_0x491928));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0x3cab90){const _0xee5f8a=[];for(const _0x40e466 of this['activeUIs']){(0x0,this['uisData']['get'](_0x40e466)['filter'])(_0x3cab90)&&_0xee5f8a['push'](_0x40e466);}if(_0xee5f8a['length']>0x1)throw new _0x3fd207('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xee5f8a,'annotationType':_0x3cab90['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
- _0x26abaa('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x39f3f6){super(_0x39f3f6);const _0x1278a8=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 _0x4804cc(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1278a8['to']('class')],'style':{'minHeight':_0x1278a8['to']('minHeight',_0x2e2070=>'number'==typeof _0x2e2070?Ci(_0x2e2070+0xa):null)},'dir':_0x39f3f6['uiLanguageDirection'],'role':'application','aria-label':Et(_0x39f3f6,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x39f3f6,'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',_0x591fe9=>{this['_updateItemPositionInFocusables'](_0x591fe9['source']);}),this['list']['forEach'](_0x31ff7b=>{this['focusTracker']['add'](_0x31ff7b['element']),this['_updateItemPositionInFocusables'](_0x31ff7b);}),this['list']['on']('change',(_0x52e7b6,_0x217e59)=>{for(const _0x3f6c1f of _0x217e59['removed'])this['focusTracker']['remove'](_0x3f6c1f['element']),this['focusables']['remove'](_0x3f6c1f);for(const _0x47d3ec of _0x217e59['added'])this['focusTracker']['add'](_0x47d3ec['element']),this['_updateItemPositionInFocusables'](_0x47d3ec);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x2d540a){const _0x289dc7=this['focusables']['getIndex'](_0x2d540a);let _0x4896ab,_0x44a3de;for(const _0x12e0d2 of this['focusables'])if(_0x2d540a['top']<_0x12e0d2['top']){_0x4896ab=_0x12e0d2;break;}if(_0x44a3de=_0x4896ab?this['focusables']['getIndex'](_0x4896ab):this['focusables']['length'],-0x1!==_0x289dc7){if(_0x289dc7===_0x44a3de-0x1)return;this['focusables']['remove'](_0x2d540a),_0x44a3de=_0x4896ab?this['focusables']['getIndex'](_0x4896ab):this['focusables']['length'];}this['focusables']['add'](_0x2d540a,_0x44a3de);}};const bi=/* #__PURE__ -- @preserve */
33
- _0x26abaa('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x454be6){super(_0x454be6),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x52c464,_0x5932fa)=>_0x52c464+_0x5932fa),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0xafca0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0xafca0['to']('isAnimationDisabled',_0x3aa3ce=>_0x3aa3ce?'ck-sidebar-item--no-animation':'')],'style':{'top':_0xafca0['to']('top',_0xb3beb7=>bi(_0xb3beb7))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x1af654=this['element']['clientHeight'];_0x1af654&&(this['height']=_0x1af654);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0xe32c07{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x848b0a){super(_0x848b0a),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 _0x5aea61=this['context']['config']['get']('sidebar.container');_0x5aea61&&this['setContainer'](_0x5aea61);}setContainer(_0x441ca0){if(!Oi(_0x441ca0))throw new _0x3fd207('sidebar-setcontainer-invalid-element');this['container']=_0x441ca0;}_attachToContainer({viewClass:_0x52ed99='',spaceBetweenItems:_0x142c81=0x19}={}){if(!Oi(this['container']))throw new _0x3fd207('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x52ed99,this['_spaceBetweenItems']=_0x142c81;}['rearrange']({removedAnnotation:_0x1b5a7b,previousAnnotation:_0x3c5b10,nextAnnotation:_0x43441c}){const _0x486baf=this['getSidebarItemView'](_0x1b5a7b);this['view']['list']['remove'](_0x486baf),this['_destroySidebarItemView'](_0x1b5a7b),_0x3c5b10&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3c5b10)),_0x43441c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x43441c)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x43de77,activatedAnnotation:_0x23f1d8,disableAnimationOnActivatedAnnotation:_0x573cc2}){if(this['_activeAnnotation']=_0x23f1d8,_0x43de77){_0x43de77['isActive']=!0x1;const _0x3e0443=this['getSidebarItemView'](_0x43de77);_0x3e0443&&_0x573cc2&&(_0x3e0443['isAnimationDisabled']=!0x1);}if(_0x23f1d8){const _0x3c8a49=this['getSidebarItemView'](_0x23f1d8);_0x3c8a49&&(_0x23f1d8['isActive']=!0x0,_0x573cc2&&(_0x3c8a49['isAnimationDisabled']=!0x0,_0x3c8a49['top']+=0x1),this['_alignToTargetRect'](_0x3c8a49));}}_detachFromContainer(_0x3d061e){if(this['view']['element']['remove'](),_0x3d061e){for(const _0x2be3b3 of _0x3d061e)this['_destroySidebarItemView'](_0x2be3b3);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x20fa99,_0x5d2b30){_0x5d2b30||(_0x5d2b30=_0x20fa99['view']);const _0x1b40b7=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1b40b7,_0x20fa99),this['_annotationToSidebarItemView']['set'](_0x20fa99,_0x1b40b7),_0x1b40b7['content']['add'](_0x5d2b30),this['listenTo'](_0x20fa99['view'],'change:targetRect',(_0x32bb0a,_0x93d532,_0x3ec6ea)=>{const _0x2d135f=this['_getTargetTop'](_0x20fa99,_0x3ec6ea);_0x1b40b7['_targetTop']!=_0x2d135f&&(_0x1b40b7['_targetTop']=_0x2d135f,this['_setItemTop'](_0x1b40b7,_0x2d135f));}),this['listenTo'](_0x1b40b7,'change:top',()=>{this['_recalculate'](_0x1b40b7,'top');}),this['listenTo'](_0x1b40b7,'change:bottom',()=>{this['_recalculate'](_0x1b40b7,'bottom');}),this['_alignToTargetRect'](_0x1b40b7);const _0x4697fb=this['_getItemBefore'](_0x1b40b7);return _0x4697fb&&this['_alignAfterItem'](_0x4697fb,_0x1b40b7)||this['_alignToTargetRect'](_0x1b40b7),this['_updateLastItem'](),this['view']['list']['add'](_0x1b40b7),_0x1b40b7;}['_alignForTopChange'](_0x250a48){if(!_0x250a48['content']['length'])return;const _0x474370=this['_getItemBefore'](_0x250a48);if(!_0x474370)return;const _0x29b9c9=this['_sidebarItemViewToAnnotation']['get'](_0x474370),_0x286b81=this['_activeAnnotation'];_0x286b81&&_0x286b81===_0x29b9c9?this['_alignAfterItem'](_0x474370,_0x250a48):this['_alignBeforeItem'](_0x250a48,_0x474370);}_alignForBottomChange(_0x1df3fe){if(!_0x1df3fe['content']['length'])return;const _0x14a761=this['_getItemAfter'](_0x1df3fe);if(!_0x14a761)return;const _0x1d0c70=this['_sidebarItemViewToAnnotation']['get'](_0x14a761),_0x3bec4c=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x254afa=this['_activeAnnotation'];_0x254afa&&_0x254afa===_0x1d0c70&&_0x3bec4c?(this['_alignBeforeItem'](_0x14a761,_0x1df3fe),this['_alignAfterItem'](_0x1df3fe,_0x14a761)):_0x254afa&&_0x254afa===_0x1d0c70?this['_alignBeforeItem'](_0x14a761,_0x1df3fe):this['_alignAfterItem'](_0x1df3fe,_0x14a761);}_recalculate(_0x38ea49,_0x538b3c){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x28cfb9,changedProp:_0x48c3e4}of this['_recalculateBuffer'])'top'===_0x48c3e4?this['_alignForTopChange'](_0x28cfb9):this['_alignForBottomChange'](_0x28cfb9);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x38ea49,'changedProp':_0x538b3c});}getSidebarItemView(_0x183431){return this['_annotationToSidebarItemView']['get'](_0x183431);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x539cff){const _0x4986ef=this['getSidebarItemView'](_0x539cff);this['stopListening'](_0x4986ef),this['stopListening'](_0x539cff['view']),_0x4986ef['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x539cff),this['_sidebarItemViewToAnnotation']['delete'](_0x4986ef);}_createSidebarView(){const _0xe15f54=new Ii(this['context']['locale']);return _0xe15f54['render'](),this['on']('change:_lastItem',(_0x1b252f,_0x4b1a35,_0x42f67a,_0x1974cd)=>{_0x1974cd&&_0xe15f54['unbind']('minHeight'),_0x42f67a?_0xe15f54['bind']('minHeight')['to'](_0x42f67a,'bottom'):_0xe15f54['minHeight']=null;}),_0xe15f54;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x37a288){const _0x2996f0=this['_sidebarItemViewToAnnotation']['get'](_0x37a288),_0x18fae9=_0x2996f0&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2996f0)-0x1);return _0x18fae9&&this['getSidebarItemView'](_0x18fae9)||null;}_getItemAfter(_0x36f51b){const _0x36e2c3=this['_sidebarItemViewToAnnotation']['get'](_0x36f51b),_0x18775d=_0x36e2c3&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x36e2c3)+0x1);return _0x18775d&&this['getSidebarItemView'](_0x18775d)||null;}_alignBeforeItem(_0x22792a,_0xa402e1){_0x22792a['updateHeight']();const _0x1fd0fe=Ni(_0xa402e1['bottom']+this['_spaceBetweenItems'],_0x22792a['top']);return!!_0x1fd0fe&&(this['_setItemTop'](_0xa402e1,_0xa402e1['top']-_0x1fd0fe),!0x0);}_alignAfterItem(_0x49e45e,_0x446628){_0x49e45e['updateHeight']();const _0x4f8a5f=Ni(_0x49e45e['bottom']+this['_spaceBetweenItems'],_0x446628['top']);return!!_0x4f8a5f&&(this['_setItemTop'](_0x446628,_0x446628['top']+_0x4f8a5f,!0x1),!0x0);}_alignToTargetRect(_0x118280){const _0xaa9966=this['_sidebarItemViewToAnnotation']['get'](_0x118280);if(!_0xaa9966||!_0xaa9966['target']||!_0xaa9966['targetRect'])return;const _0x12fff9=this['_getTargetTop'](_0xaa9966,_0xaa9966['targetRect']);this['_setItemTop'](_0x118280,_0x12fff9);}_getTargetTop(_0x5d2c99,_0x284841){if(null===_0x284841)return 0x0;if(_0x5d2c99['target']instanceof _0x1f4f60)return _0x284841['top'];{const _0x43690d=new _0x1f4f60(this['view']['element'])['top'];return _0x284841['top']-_0x43690d;}}_setItemTop(_0x3e06fc,_0x2900a3,_0x1dac37=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1dac37&&(_0x2900a3=Math['max'](_0x2900a3,this['_getMaxAvailableTop'](_0x3e06fc))),_0x3e06fc['top']=_0x2900a3;}_getMaxAvailableTop(_0x325789){let _0x3939d8=this['_getItemBefore'](_0x325789),_0x826bf1=0x0;for(;_0x3939d8;)_0x3939d8['updateHeight'](),_0x826bf1+=this['_spaceBetweenItems']+_0x3939d8['height'],_0x3939d8=this['_getItemBefore'](_0x3939d8);return _0x826bf1;}};function Ni(_0x520ebb,_0x19ae46){return Math['max'](_0x520ebb-_0x19ae46,0x0);}function Oi(_0x3291b8){return null!==_0x3291b8&&'object'==typeof _0x3291b8&&0x1===_0x3291b8['nodeType'];}var Mi=class extends _0xe32c07{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56001a){super(_0x56001a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5d687e(),this['_refreshPositioningDebounced']=_0x98290e(()=>{_0x56001a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x196bfe=this['context']['plugins']['get'](Ti),_0x4b844e=this['context']['plugins']['get'](ki);_0x196bfe['register']('wideSidebar',this),_0x4b844e['container']&&_0x196bfe['switchTo']('wideSidebar');}setActiveAnnotation(_0x5c0938){if(_0x5c0938===this['activeAnnotation'])return;const _0x228bd6=this['context']['plugins']['get'](ki);_0x228bd6['_activeAnnotation']=_0x5c0938;const _0xfd25bb=this['activeAnnotation'];_0x228bd6['refresh']({'blurredAnnotation':_0xfd25bb,'activatedAnnotation':_0x5c0938}),this['activeAnnotation']=_0x5c0938;}attach(_0x168ef4){this['annotations']=_0x168ef4;const _0x1a9c35=this['context']['plugins']['get'](ki);if(_0x1a9c35['_annotations']=_0x168ef4,this['isAttached'])throw new _0x3fd207('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1a9c35,'set:container',()=>{this['detach'](),this['listenTo'](_0x1a9c35,'change:container',_0x2a3fa0=>{_0x2a3fa0['off'](),this['attach'](_0x168ef4);});}),_0x1a9c35['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x26b899=_0x461326=>{_0x461326['updateTargetRect'](),_0x1a9c35['addAnnotation'](_0x461326);};for(const _0x26b095 of _0x168ef4)_0x26b899(_0x26b095);this['listenTo'](_0x168ef4,'add',(_0x4aaf99,_0x1e6470)=>{_0x26b899(_0x1e6470);}),this['listenTo'](_0x168ef4,'remove',(_0x3ab46b,_0x5248e3,_0x5ae7d6)=>{_0x1a9c35['rearrange']({'removedAnnotation':_0x5248e3,'previousAnnotation':_0x168ef4['get'](_0x5ae7d6-0x1),'nextAnnotation':_0x168ef4['get'](_0x5ae7d6+0x1)}),_0x5248e3===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x168ef4,'focus',(_0x2ad117,_0x53b5e9)=>{this['setActiveAnnotation'](_0x53b5e9);}),this['listenTo'](_0x168ef4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x49e330=this['context']instanceof _0x4d8ccf?this['context']['editors']:new _0x5d687e([this['context']]);for(const _0x593704 of _0x49e330)this['_integrateWithEditorAnnotations'](_0x593704);this['listenTo'](_0x49e330,'add',(_0x176d62,_0x1af1e0)=>{this['listenTo'](_0x1af1e0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1af1e0);});}),this['listenTo'](_0x49e330,'remove',(_0x33c659,_0x4ac1da)=>{_0x4ac1da['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4ac1da['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x3fd207('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2a68c7=this['context']['plugins']['get'](ki);_0x2a68c7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2a68c7),this['stopListening'](this['annotations']),this['context']instanceof _0x4d8ccf&&this['stopListening'](this['context']['editors']);for(const _0x1548f7 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1548f7);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x437480){if(!_0x437480['plugins']['has']('EditorAnnotations'))return;const _0x2e4fb2=_0x437480['plugins']['get']('EditorAnnotations'),_0x1f7b1b=()=>{const _0xae5da6=_0x2e4fb2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0xae5da6[0x0]||null);};this['listenTo'](_0x2e4fb2,'refresh',_0x1f7b1b),this['listenTo'](_0x2e4fb2,'blur',(_0x98427c,{isAnnotationTracked:_0x46a2f1})=>{this['activeAnnotation']&&_0x46a2f1(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2e4fb2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1d0c60=>{_0x2e4fb2['hasDomSelection']()&&(_0x1f7b1b(),_0x1d0c60['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2e4fb2);}_destroyEditorAnnotationsIntegration(_0x524b1f){this['stopListening'](_0x524b1f),this['_editorAnnotations']['remove'](_0x524b1f);}},Ri=class extends _0x422b1d{counterView;constructor(_0x18c667){super(_0x18c667);const _0x14a056=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x33a3a4,_0x571c31)=>_0x33a3a4?'...':_0x571c31['toString']()),this['set']('annotationType',''),this['icon']=_0x1aed3d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x14a056['to']('annotationType',_0x45f582=>'ck-annotation-counter__badge--'+_0x45f582),_0x14a056['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x14a056['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0xe32c07{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x45680c){super(_0x45680c),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x30f8a8())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5d687e(),this['_refreshPositioningDebounced']=_0x98290e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x456151(this['context']['locale']),this['balloonPanelView']=new _0x4f61cf(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x480aaa){this['annotations']=_0x480aaa;const _0x5ea8a9=this['context']['plugins']['get'](ki),_0xea2127=this['balloonPanelView'];if(_0x5ea8a9['_annotations']=_0x480aaa,this['isAttached'])throw new _0x3fd207('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5ea8a9,'set:container',()=>{this['detach'](),this['listenTo'](_0x5ea8a9,'change:container',_0x2ebab1=>{_0x2ebab1['off'](),this['attach'](_0x480aaa);});}),_0x5ea8a9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3bed31=_0x48037e=>{const _0x322434=new Ri(this['context']['locale']);_0x5ea8a9['addAnnotation'](_0x48037e,_0x322434),this['_annotationToNarrowView']['set'](_0x48037e,_0x322434),_0x322434['bind']('isDirty','annotationType','number')['to'](_0x48037e['view'],'isDirty','type','length'),_0x322434['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xea2127['content']['first']!==_0x48037e['view']?(this['_showBalloon'](_0x48037e),_0x48037e['view']['element']['focus'](),this['setActiveAnnotation'](_0x48037e)):this['setActiveAnnotation'](null);});};for(const _0x1e688f of _0x480aaa)_0x3bed31(_0x1e688f);this['listenTo'](_0x480aaa,'add',(_0x348449,_0x4aaed9)=>{_0x3bed31(_0x4aaed9);}),this['listenTo'](_0x480aaa,'remove',(_0x58f081,_0x31904b,_0x53faaf)=>{this['_annotationToNarrowView']['get'](_0x31904b)['destroy'](),this['_annotationToNarrowView']['delete'](_0x31904b),_0x5ea8a9['rearrange']({'removedAnnotation':_0x31904b,'previousAnnotation':_0x480aaa['get'](_0x53faaf-0x1),'nextAnnotation':_0x480aaa['get'](_0x53faaf+0x1)}),_0x31904b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x480aaa,'focus',(_0x37ceb9,_0x417395)=>{this['setActiveAnnotation'](_0x417395);}),this['listenTo'](_0x480aaa,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2027bb,_0x5cce6b)=>{_0x5cce6b['keyCode']===_0x5f035e['esc']&&_0xea2127['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xea2127['content']['first']),this['_hideBalloon'](),_0x5cce6b['stopPropagation'](),_0x5cce6b['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1d7144,_0x3848d4)=>{const _0x4bfb72=_0x3848d4['target'];_0xea2127['isVisible']&&_0xea2127['element']['contains'](_0x4bfb72)||_0x5ea8a9['view']['element']['contains'](_0x4bfb72)||_0x1d7144['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x23746d=>_0x23746d['contains'](_0x4bfb72))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xabf8bf=this['context']instanceof _0x4d8ccf?this['context']['editors']:new _0x5d687e([this['context']]);for(const _0x36ebe1 of _0xabf8bf)this['_integrateWithEditorAnnotations'](_0x36ebe1);this['listenTo'](_0xabf8bf,'add',(_0x189e8a,_0x2f42c8)=>{this['listenTo'](_0x2f42c8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2f42c8);});}),this['listenTo'](_0xabf8bf,'remove',(_0x54f8ce,_0x4a0e60)=>{_0x4a0e60['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4a0e60['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x36b2e1){if(_0x36b2e1===this['activeAnnotation'])return;const _0x363a57=this['context']['plugins']['get'](ki);_0x363a57['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x36b2e1,'disableAnimationOnActivatedAnnotation':!0x0}),_0x36b2e1&&_0x363a57['getSidebarItemView'](_0x36b2e1)?this['_showBalloon'](_0x36b2e1):this['_hideBalloon'](),this['activeAnnotation']=_0x36b2e1;}detach(){if(!this['isAttached'])throw new _0x3fd207('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3fa490=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5aa4ea=>_0x5aa4ea['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3fa490['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4d8ccf&&this['stopListening'](this['context']['editors']);for(const _0x589a76 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x589a76);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(_0x550ab2){if(!_0x550ab2['plugins']['has']('EditorAnnotations'))return;const _0x1f694a=_0x550ab2['plugins']['get']('EditorAnnotations'),_0x1597ba=this['context']['plugins']['get'](ki),_0xcdbb6f=this['annotations'],_0x73e863=this['balloonPanelView'],_0x4b64db=()=>{const _0x485f46=_0x1f694a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x485f46),this['setActiveAnnotation'](_0x485f46[0x0]||null);};this['listenTo'](_0x1f694a,'refresh',_0x4b64db),this['listenTo'](_0x1f694a,'blur',(_0x36f9c0,{isAnnotationTracked:_0x473745})=>{this['activeAnnotation']&&_0x473745(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1f694a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xcdbb6f,'blur',_0x4e6f55=>{_0x1f694a['hasDomSelection']()&&_0x4e6f55['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xeac3d,_0x2f0353)=>{const _0x656b7a=_0x2f0353['target'];_0x73e863['isVisible']&&_0x73e863['element']['contains'](_0x656b7a)||_0x1597ba['view']['element']['contains'](_0x656b7a)||this['activeAnnotation']&&_0x1f694a['hasDomSelection']()&&(_0x4b64db(),_0xeac3d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1f694a);}_destroyEditorAnnotationsIntegration(_0x199611){_0x199611&&(this['stopListening'](_0x199611),this['_editorAnnotations']['remove'](_0x199611));}_setSelectedAnnotations(_0x30fb77){for(const _0x523365 of this['_selectedAnnotations'])_0x30fb77['includes'](_0x523365)||this['_manuallyClosedAnnotationViews']['delete'](_0x523365['view']);this['_selectedAnnotations']=_0x30fb77;}_refreshPositioning(){const _0x52dc98=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x52dc98['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x45746f){if(this['_manuallyClosedAnnotationViews']['has'](_0x45746f['view']))return;const _0x11b304=this['balloonPanelView']['content']['first'];_0x11b304!==_0x45746f['view']?(_0x11b304&&this['_detachListeners'](_0x11b304),this['_attachListeners'](_0x45746f['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x45746f['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x15d92c=this['balloonPanelView']['content']['first'],_0x4bf81d=_0x15d92c&&this['annotations']['getByView'](_0x15d92c);if(!_0x4bf81d||!this['_annotationToNarrowView']['has'](_0x4bf81d))return;const _0x2e70c1=this['_annotationToNarrowView']['get'](_0x4bf81d)['element'],_0x2f18b7=(function(){const _0x2fdda0=_0x4f61cf['defaultPositions'];return[_0x2fdda0['southArrowNorthEast'],_0x2fdda0['northArrowSouthEast'],_0x2fdda0['southArrowNorth'],_0x2fdda0['northArrowSouth'],_0x2fdda0['southArrowNorthWest'],_0x2fdda0['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2e70c1,'positions':_0x2f18b7});}['_hideBalloon'](){const _0x83fc6c=this['balloonPanelView'],_0x22ad0f=_0x83fc6c['content']['first'];_0x22ad0f&&(this['_detachListeners'](_0x22ad0f),_0x83fc6c['unpin'](),_0x83fc6c['content']['clear']());}_attachListeners(_0x2575a7){this['listenTo'](_0x2575a7,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2575a7,'Esc',(_0x27b717,_0x39be9f)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2575a7),this['_hideBalloon'](),_0x39be9f();});}_detachListeners(_0x2ef4b3){this['stopListening'](_0x2ef4b3);}},xi=class extends _0x12b188{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0xbf878f,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x549051){super(_0x549051),_0x549051['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x549051['plugins']['get'](_0xbf878f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x98290e(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x4363b7=this['editor']['plugins']['get'](Ti);_0x4363b7['context']===this['editor']&&(_0x4363b7['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x2aa1c3,_0x185dae)=>{const _0x269a90=this['_balloon'];if(this['isAttached']&&_0x269a90['visibleView']){const _0x7dacd8=this['annotations']['getByView'](_0x269a90['visibleView']);_0x7dacd8&&this['_closeAnnotation'](_0x7dacd8),_0x185dae();}}));}afterInit(){const _0x1e9b2e=this['editor']['plugins']['get'](Ti);_0x1e9b2e['context']===this['editor']&&(_0x1e9b2e['hasActive']()||_0x1e9b2e['switchTo']('inline'));}setActiveAnnotation(_0x3fa98a){_0x3fa98a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3fa98a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3fa98a)&&this['_addAnnotationToBalloon'](_0x3fa98a,!0x0),_0x3fa98a['isActive']=!0x0),_0x3fa98a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3fa98a);}attach(_0x38689d){this['annotations']=_0x38689d;const _0x7356aa=this['editor']['plugins']['get'](Ti),_0xe1b156=this['_balloon'];if(this['isAttached'])throw new _0x3fd207('inlineannotations-attach-already-attached',this);if(_0x7356aa['context']!==this['editor'])throw new _0x3fd207('inlineannotations-not-allowed-with-context',this);const _0x39d723=this['editor']['plugins']['get'](di);this['listenTo'](_0x39d723,'refresh',()=>{const _0x219432=_0x39d723['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x90cdc1,_0x267023;!this['_forceRefresh']&&(_0x90cdc1=_0x219432,_0x267023=this['_selectedAnnotations'],_0x90cdc1['length']===_0x267023['length']&&_0x90cdc1['every'](_0x2d9363=>_0x267023['includes'](_0x2d9363)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x219432),this['setActiveAnnotation'](_0x219432[0x0]||null));}),this['listenTo'](_0x39d723,'blur',(_0x28c19e,{isAnnotationTracked:_0x31ae8f})=>{this['activeAnnotation']&&_0x31ae8f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x39d723,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x59eb4b,_0x3c5353,_0x500824)=>{_0x500824||this['setActiveAnnotation'](null);}),this['listenTo'](_0x38689d,'remove',(_0xb0c9d9,_0x4805c6)=>{this['_removeAnnotationFromBalloon'](_0x4805c6),_0x4805c6===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe1b156,'change:visibleView',(_0x120d05,_0x4f584b,_0x300056,_0x21984a)=>{_0x21984a&&this['stopListening'](_0x21984a);const _0x252842=_0x38689d['getByView'](_0x300056);_0x300056&&_0x252842&&(this['listenTo'](_0x300056,'change:height',()=>{_0xe1b156['updatePosition']();}),this['listenTo'](_0x300056,'Esc',()=>{this['_closeAnnotation'](_0x252842),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x252842&&this['setActiveAnnotation'](_0x252842));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xe1b156['visibleView']&&_0x38689d['getByView'](_0xe1b156['visibleView'])&&_0xe1b156['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 _0x3fd207('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xc856e4 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xc856e4);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x5486e3){for(const _0x3841d9 of this['_selectedAnnotations'])_0x5486e3['includes'](_0x3841d9)||this['_manuallyClosed']['delete'](_0x3841d9);for(const _0x266093 of this['annotations'])_0x5486e3['includes'](_0x266093)||this['_removeAnnotationFromBalloon'](_0x266093);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1771ad of _0x5486e3)this['_addAnnotationToBalloon'](_0x1771ad);}this['_selectedAnnotations']=_0x5486e3;}_addAnnotationToBalloon(_0xba3da6,_0x37c6d0=!0x1){this['_manuallyClosed']['has'](_0xba3da6)||(this['_addedAnnotations']['has'](_0xba3da6)||this['_balloon']['hasView'](_0xba3da6['view'])||(this['_addedAnnotations']['add'](_0xba3da6),this['_balloon']['add']({'stackId':_0xba3da6['view']['id'],'view':_0xba3da6['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xba3da6)}})),_0x37c6d0&&this['_balloon']['showStack'](_0xba3da6['view']['id']));}_getBalloonTargetForAnnotation(_0x52443e){const _0x8c004d=_0x52443e['target'],_0x28def3=this['editor']['editing']['view'],_0x32dd7f=_0x28def3['document']['selection']['getFirstRange'](),_0x42fc0d=_0x28def3['domConverter']['viewRangeToDom'](_0x32dd7f);if(_0x42fc0d['collapse'](!0x0),_0x8c004d){if(_0x8c004d instanceof _0x1f4f60)return _0x8c004d;let _0x3c630c=[];for(const _0x5a9d53 of _0x8c004d)_0x3c630c['push'](..._0x1f4f60['getDomElementRects'](_0x5a9d53));_0x3c630c=function(_0x1e2321){const _0x21f32a=[];let _0x1c3d0a=_0x1e2321[0x0];for(let _0x30d7d0=0x1;_0x30d7d0<_0x1e2321['length'];_0x30d7d0++)if(Pi(_0x1c3d0a,_0x1e2321[_0x30d7d0])){const _0xc17e12=_0x1e2321[_0x30d7d0]['width'];_0x1c3d0a['width']+=_0xc17e12,_0x1c3d0a['right']+=_0xc17e12;}else _0x21f32a['push'](_0x1c3d0a),_0x1c3d0a=_0x1e2321[_0x30d7d0];return _0x21f32a['push'](_0x1c3d0a),_0x21f32a;}(_0x3c630c);const _0x32067a=_0x42fc0d['getBoundingClientRect']();return _0x3c630c['find'](_0x3396e9=>_0x3396e9['top']<=_0x32067a['top']&&_0x3396e9['bottom']>=_0x32067a['bottom']&&_0x3396e9['left']<=_0x32067a['left']&&_0x3396e9['right']>=_0x32067a['right'])||_0x3c630c[0x0];}return _0x52443e['targetRect']||_0x42fc0d;}_removeAnnotationFromBalloon(_0x412843){this['_addedAnnotations']['has'](_0x412843)&&this['_balloon']['hasView'](_0x412843['view'])&&(this['_addedAnnotations']['delete'](_0x412843),this['_balloon']['remove'](_0x412843['view']));}_closeAnnotation(_0x4f3f0d){this['_manuallyClosed']['add'](_0x4f3f0d),this['_removeAnnotationFromBalloon'](_0x4f3f0d);}};function Pi(_0x187853,_0x4716f4){return _0x187853['top']===_0x4716f4['top']&&_0x187853['bottom']===_0x4716f4['bottom']&&_0x187853['right']===_0x4716f4['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x34e5e7,_0x1439eb){super(_0x34e5e7),this['set']('isEmpty',!_0x1439eb['length']),this['focusTracker']=new _0x4804cc(),this['_annotationViews']=_0x1439eb,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x1439eb,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1439eb,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1439eb,'remove',(_0xc12a24,_0x287171)=>{_0x287171['isActive']&&this['focus'](),_0x1439eb['length']||(this['isEmpty']=!0x0);});const _0x3144b5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x34e5e7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1439eb},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x3144b5['if']('isEmpty','ck-hidden',_0x1f7000=>!_0x1f7000)]},'children':[{'text':Et(_0x34e5e7,'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 _0xdaaaed of this['_annotationViews'])this['focusTracker']['add'](_0xdaaaed['element']);this['_annotationViews']['on']('change',(_0x49b36a,{added:_0x4af26b,removed:_0x552481})=>{for(const _0x307aea of _0x4af26b)this['focusTracker']['add'](_0x307aea['element']);for(const _0x5313ae of _0x552481)this['focusTracker']['remove'](_0x5313ae['element']);});}},Di=class extends _0xe32c07{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x1255cc){super(_0x1255cc),this['archivedThreads']=new _0x5d687e();}init(){const _0x2a48d2=this['context'],_0x3f9bc4=_0x2a48d2['plugins']['get'](oi),_0x3f66af=_0x2a48d2['plugins']['get'](ti);this['listenTo'](_0x3f9bc4,'addCommentThread',(_0x17e7e9,{threadId:_0x180d67})=>{const _0x26f360=_0x3f9bc4['getCommentThread'](_0x180d67);_0x26f360['archivedAt']&&this['archivedThreads']['add'](_0x26f360,this['_calculatePosition'](_0x26f360['archivedAt'])),this['listenTo'](_0x26f360,'change:archivedAt',(_0x268901,_0x317375,_0x3a9249)=>{_0x3a9249?this['archivedThreads']['has'](_0x26f360)||this['archivedThreads']['add'](_0x26f360,this['_calculatePosition'](_0x26f360['archivedAt'])):this['archivedThreads']['has'](_0x26f360)&&this['archivedThreads']['remove'](_0x26f360);});}),this['listenTo'](_0x3f9bc4,'removeCommentThread',(_0x471f09,{threadId:_0x24cb46})=>{const _0x943026=_0x3f9bc4['getCommentThread'](_0x24cb46);this['stopListening'](_0x943026),this['archivedThreads']['has'](_0x943026)&&this['archivedThreads']['remove'](_0x943026);},{'priority':'highest'}),this['listenTo'](_0x3f66af['collection'],'focus',(_0x36e88a,_0x5aac7a)=>{_0x5aac7a['isVisible']||(_0x5aac7a['isActive']=!0x0,_0x3f66af['activate'](_0x5aac7a));});}_calculatePosition(_0x53b549){const _0x1e4365=[...this['archivedThreads']]['findIndex'](_0x38f4d2=>_0x38f4d2['archivedAt']<_0x53b549);return _0x1e4365>-0x1?_0x1e4365:this['archivedThreads']['length'];}},Vi=class extends _0x12b188{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x3da253];}constructor(_0x1d8f5f){super(_0x1d8f5f),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x25d2f8=this['editor'],_0x8eb4c8=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x25d2f8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x422b1d,!0x0)),_0x25d2f8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x318e90=this['_createCommentsArchiveButton'](rt);return _0x318e90['set']({'role':'menuitemcheckbox'}),_0x318e90;});const _0x333640=_0x25d2f8['plugins']['get'](Di),_0x291174=_0x25d2f8['plugins']['get']('Annotations'),_0x17ca9b=_0x25d2f8['plugins']['get']('CommentsRepository');_0x333640['archivedThreads']['forEach'](_0x582a48=>{this['_handleNewThread'](_0x582a48);}),this['listenTo'](_0x333640['archivedThreads'],'add',(_0x36063c,_0x5af929)=>{this['_handleNewThread'](_0x5af929);}),this['listenTo'](_0x291174['collection'],'add',(_0x56121c,_0x2e70b1)=>{const _0x87e4f9=this['_pendingThreads']['find'](_0x42d216=>{const _0x13897e=_0x17ca9b['_threadToController']['get'](_0x42d216);return _0x13897e&&_0x2e70b1['innerView']===_0x13897e['view'];});if(_0x87e4f9){const _0x353c5a=this['_calculatePosition'](_0x87e4f9['archivedAt']);this['_addAnnotationToArchive'](_0x2e70b1,_0x353c5a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x87e4f9),0x1);}}),this['listenTo'](_0x333640['archivedThreads'],'remove',(_0x3d52ce,_0x66f670)=>{const _0x21f541=_0x25d2f8['config']['get']('collaboration.channelId');if(!_0x21f541||_0x66f670['channelId']===_0x21f541){if(this['_pendingThreads']['includes'](_0x66f670))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x66f670),0x1);else{const _0x4c428c=_0x17ca9b['_threadToController']['get'](_0x66f670),_0x3e22ee=_0x291174['getByInnerView'](_0x4c428c['view']);this['annotationViews']['remove'](_0x3e22ee['view']),this['stopListening'](_0x3e22ee),this['stopListening'](_0x3e22ee['focusableElements']);}}}),this['listenTo'](_0x291174['collection'],'add',(_0x285717,_0x1ef0fb)=>{this['listenTo'](_0x1ef0fb,'escape',_0x8eb4c8);}),this['listenTo'](_0x291174['collection'],'remove',(_0x26385a,_0xe073ad)=>{this['stopListening'](_0xe073ad,'escape',_0x8eb4c8);});}_addAnnotationToArchive(_0x550b0b,_0x4d106c){this['listenTo'](_0x550b0b,'set:isVisible',_0xa9d7eb=>{_0xa9d7eb['return']=!0x1,_0xa9d7eb['stop']();}),this['annotationViews']['add'](_0x550b0b['view'],_0x4d106c);}['_handleNewThread'](_0x55865e){const _0x67d8c9=this['editor']['plugins']['get']('CommentsRepository'),_0x297a8a=this['editor']['plugins']['get']('Annotations'),_0x565461=this['editor']['config']['get']('collaboration.channelId');if(!_0x565461||_0x55865e['channelId']===_0x565461){const _0x16b43a=_0x67d8c9['_threadToController']['get'](_0x55865e);if(!_0x16b43a)return void this['_pendingThreads']['push'](_0x55865e);const _0x3dd1d6=this['_calculatePosition'](_0x55865e['archivedAt']),_0x487738=_0x297a8a['getByInnerView'](_0x16b43a['view']);_0x487738['isVisible']&&_0x297a8a['_visibleAnnotations']['remove'](_0x487738),this['_addAnnotationToArchive'](_0x487738,_0x3dd1d6);}}_calculatePosition(_0x1b908d){const _0x106105=this['editor']['config']['get']('collaboration.channelId'),_0x3b03a0=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x26ec1c=>_0x26ec1c['channelId']===_0x106105)['findIndex'](_0x334baf=>_0x334baf['archivedAt']<_0x1b908d);return _0x3b03a0<0x0||_0x3b03a0>this['annotationViews']['length']?this['annotationViews']['length']:_0x3b03a0-0x1;}_toggleDialog(){const _0x30bcd9=this['editor'],_0xde210c=_0x30bcd9['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x30bcd9['locale'],this['annotationViews'])),'commentsArchive'===_0xde210c['id']?_0xde210c['hide']():_0xde210c['show']({'id':'commentsArchive','title':Et(_0x30bcd9['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2a22ba,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x56ba8b['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x2f69d5,_0x456ee3=!0x1){const _0x27d2a1=this['editor']['locale'],_0x5b2108=this['editor']['plugins']['get']('Dialog'),_0xad32d3=new _0x2f69d5(_0x27d2a1);return _0xad32d3['bind']('isEnabled')['to'](this,'isEnabled'),_0xad32d3['bind']('isOn')['to'](_0x5b2108,'id',_0x181cba=>'commentsArchive'===_0x181cba),_0xad32d3['set']({'label':Et(_0x27d2a1,'COMMENTS_ARCHIVE'),'icon':_0x2a22ba,'isToggleable':!0x0}),_0x456ee3&&(_0xad32d3['tooltip']=!0x0),this['listenTo'](_0xad32d3,'execute',()=>this['_toggleDialog']()),_0xad32d3;}_hideDialogOnAnnotationEscape=_0x9560af=>{const _0x459867=_0x9560af['source'];if(!this['annotationViews']['has'](_0x459867['view']))return;const _0xc09d99=this['editor']['plugins']['get']('Dialog');_0xc09d99['isOpen']&&'commentsArchive'===_0xc09d99['id']&&(_0xc09d99['hide'](),_0x9560af['stop']());};},Bi=class extends _0x12b188{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
23
+ import{Command as _0x254461,Context as _0x5d61fe,ContextPlugin as _0x3d8ace,Editor as _0x5d3c65,PendingActions as _0x434878,Plugin as _0x36d238}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0x59fadc,Collection as _0xeae5cd,DomEmitterMixin as _0x34dc61,FocusTracker as _0x1749d2,KeystrokeHandler as _0x2781fd,ObservableMixin as _0x5f10cb,Rect as _0x276b72,diff as _0x355eae,first as _0x102981,getEnvKeystrokeText as _0x5fe013,keyCodes as _0x39b378,priorities as _0x130a0b,scrollViewportToShowTarget as _0x3dd6c4,toUnit as _0x4833c6,uid as _0x144583}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x160d68,ConfirmMixin as _0x2b4f0a,FOCUS_ANNOTATION_KEYSTROKE as _0x235769,LateFocusButtonView as _0x18913b,LateFocusDropdownButtonView as _0x41f32c,UserView as _0x58238e,Users as _0x46e177,getAllMarkersDomElementsSorted as _0x3b4bee,getDateTimeFormatter as _0x4ac7c3,hashObject as _0x8e868c,setupThreadKeyboardNavigation as _0x1cc400,surroundingMarkersDetector as _0x624c26,trimHtml as _0x93f90c}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x4c34d4,debounce as _0xd4e18c,isEqual as _0x2d4811,set as _0x8c206d,throttle as _0x58d35e,unset as _0x4feec0}from'es-toolkit/compat';import{IconAddComment as _0x64587f,IconCheck as _0x29b66f,IconCommentsArchive as _0x453301,IconPencil as _0x27b417,IconRemoveComment as _0x255d55,IconThreeVerticalDots as _0x3ce8b4,IconUndo as _0x284c9a}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x37a9d4,BodyCollection as _0x2c9604,ButtonView as _0x5dc461,ContextualBalloon as _0x34753a,Dialog as _0x11e02b,DialogViewPosition as _0x49c5b3,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
24
+ _0x5f10cb();var bt=class extends It{['model'];['view'];constructor(_0x309ca7,_0x44d505){super(),this['model']=_0x309ca7,this['model']['_isAttached']=!0x0,this['view']=_0x44d505,this['listenTo'](_0x44d505,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x44d505,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x44d505,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x44d505,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x44d505,'addComment',(_0x2dd287,_0x3c696b)=>this['addComment'](_0x3c696b)),this['listenTo'](_0x44d505,'updateComment',(_0x2a5e77,_0x3475fc,_0x51a8e0)=>this['updateComment'](_0x3475fc,_0x51a8e0)),this['listenTo'](_0x44d505,'removeComment',(_0x56e256,_0x1a3cd0)=>this['removeComment'](_0x1a3cd0));}submit(){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}addComment(_0x32b075){this['model']['addComment']({'content':_0x32b075,'authorId':this['view']['_localUser']['id']});}updateComment(_0x326b95,_0xecbf12){this['model']['getComment'](_0x326b95)['update']({'content':_0xecbf12});}removeComment(_0xc5bc5){this['model']['getComment'](_0xc5bc5)['remove']();}destroy(){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x799ce1,_0x388b1a,_0x897f1b){const t=_0x799ce1['t'];switch(_0x388b1a){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'},_0x897f1b);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x897f1b);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'},_0x897f1b);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'},_0x897f1b);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x897f1b);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'},_0x897f1b);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'},_0x897f1b);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'},_0x897f1b);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'';}}var kt=class extends it{['main'];editable;constructor(_0x1a7a3b,_0x214286){super(_0x1a7a3b);const _0x5560c9=_0x144583();this['main']=this['createCollection'](),this['editable']=new st(_0x1a7a3b,_0x214286,void 0x0,{'label':()=>Et(_0x1a7a3b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1a7a3b['uiLanguageDirection'],'lang':_0x1a7a3b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5560c9},'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']();}},Nt=class extends tt{['view'];constructor(_0x47bac1){super(_0x47bac1),this['view']=new kt(_0x47bac1['locale'],_0x47bac1['editing']['view']);}get element(){return this['view']['element'];}init(){const _0x3b975d=this['editor']['editing']['view'],_0x151bc1=this['view']['editable'];_0x151bc1['name']=_0x3b975d['document']['getRoot']()['rootName'],this['view']['render']();const _0xb3c855=_0x151bc1['element'];this['setEditableElement'](_0x151bc1['name'],_0xb3c855),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3b975d['attachDomRoot'](_0xb3c855),this['fire']('ready');}destroy(){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
25
+ _0x5f10cb(_0x5d3c65);var Rt=class CommentEditor extends Mt{static defaultPlugins=/* #__PURE__ -- @preserve */
26
+ ((()=>Ot)());constructor(_0x2e91e8={}){(_0x2e91e8=Object['assign']({},_0x2e91e8))['plugins']||(_0x2e91e8['plugins']=CommentEditor['defaultPlugins']),super(_0x2e91e8),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}create(){const _0x5cc3ba=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5cc3ba))['then'](()=>this['fire']('ready'));}destroy(){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2e0dad=>{const _0x488b8d=this['model']['document']['getRoot'](),_0x377088=_0x488b8d&&_0x488b8d['getChild'](_0x488b8d['childCount']-0x1);_0x2e0dad['setSelection'](_0x377088,'end'),this['editing']['view']['focus']();});}_updatePlaceholder(){const _0x2192d8=this['editing']['view'],_0x169fda=_0x2192d8['document']['getRoot'](),_0x78d48e=_0x169fda['getChild'](0x0);_0x169fda['childCount']>0x1||!_0x78d48e||'p'!=_0x78d48e['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x2192d8,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x78d48e['placeholder']=this['placeholder']),ut({'view':_0x2192d8,'element':_0x78d48e,'keepOnFocus':!0x0}),this['placeholderElement']=_0x78d48e);}},St=class extends ht{keystrokes;['focusTracker'];['focusables'];['focusCycler'];submitButtonView;cancelButtonView;_editorConfig;constructor(_0x18f2fd,_0x3ada0d={}){super(_0x18f2fd),this['editor']=null,this['_editorConfig']=_0x3ada0d,this['set']('value',_0x3ada0d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x18f2fd,'Reply...')),this['set']('submitLabel',Et(_0x18f2fd,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x2781fd(),this['focusTracker']=new _0x1749d2(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x127547=>!_0x127547['defaultPrevented']},'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',(_0x2b665f,_0x5d65f2)=>{this['cancelButtonView']['fire']('execute'),_0x5d65f2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4a88b8,_0x36daa6)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x36daa6());}),this['on']('submit',(_0x17dfe0,_0x2dae31)=>{_0x2dae31['length']>0xfde8?(alert(Et(_0x18f2fd,'TOO_LONG_COMMENT_ALERT',[_0x2dae31['length'],0xfde8])),_0x17dfe0['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}createEditor(){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x28fa7e=this['editor'];this['element']['insertBefore'](_0x28fa7e['ui']['element'],this['element']['firstChild']),_0x28fa7e['model']['document']['on']('change',()=>this['value']=_0x28fa7e['getData']()),_0x28fa7e['bind']('placeholder')['to'](this),this['focusables']['add'](_0x28fa7e['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3e8374){-0x1===_0x3e8374?(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:_0x546ff3}=this,_0x2c070a=new _0x5dc461(_0x546ff3);return _0x2c070a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2c070a['withText']=!0x0,_0x2c070a['bind']('label')['to'](this,'submitLabel'),_0x2c070a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2c070a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x189dc0,_0x2d8d24)=>!_0x2d8d24&&!!_0x189dc0['trim']()),_0x2c070a;}_createCancelButton(){const {locale:_0x22615a}=this,_0x276e7e=new _0x5dc461(_0x22615a);return _0x276e7e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x276e7e['label']=Et(_0x22615a,'Cancel'),_0x276e7e['withText']=!0x0,_0x276e7e['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x276e7e;}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x321303=>{this['focusTracker']['add'](_0x321303['element']);}),this['focusables']['on']('change',(_0x3933d0,_0x45a56b)=>{for(const _0x57adf6 of Array['from'](_0x45a56b['added'])['reverse']())this['focusTracker']['add'](_0x57adf6['element']);});}},xt=class extends ht{constructor(_0x3eba3b,_0x2df31d,_0x487a51){super(_0x3eba3b),this['commentInputView']=new St(_0x3eba3b,_0x487a51),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3c1fe9,_0x53e68e)=>_0x3c1fe9||!!_0x53e68e),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 _0x58238e(_0x3eba3b,_0x2df31d),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'](_0x148289){this['commentInputView']['focus'](_0x148289);}_focusOnNonInteractiveMouseDown(){this['listenTo'](this['element'],'mousedown',(_0x270482,_0x59ff98)=>{const {submitButtonView:_0x1c53d4,cancelButtonView:_0x22c706,editor:_0x29ae7b}=this['commentInputView'];[_0x1c53d4['element'],_0x22c706['element'],_0x29ae7b?_0x29ae7b['editing']['view']['getDomRoot']():null]['filter'](_0x108596=>_0x108596)['some'](_0x198c1c=>_0x198c1c['contains'](_0x59ff98['target']))||(this['focus'](),_0x59ff98['preventDefault']());});}},Pt=class extends ht{constructor(_0x3e5a8a){super(_0x3e5a8a);const _0x488138=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x488138['to']('count',_0x52434f=>Et(_0x3e5a8a,'NUMBER_OF_COMMENTS',_0x52434f))}]});}},Lt=class extends ht{commentViews;resolvedCommentView;['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];_collapsedCommentsView;constructor(_0x46dd8a,_0x349ccf,_0xe7424b){super(_0x46dd8a);const _0x2afd9f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x349ccf['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x349ccf,this['_config']=_0xe7424b,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x488f4d=>this['commentViews']['map'](_0x45a6c3=>_0x45a6c3['element'])['includes'](_0x488f4d['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x46dd8a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2b5f41=>_0x2b5f41-this['_config']['maxCommentsWhenCollapsed']);for(const _0x34c395 of _0x349ccf['comments'])this['_handleNewCommentModel'](_0x34c395);this['_handleInfoComment'](),this['listenTo'](_0x349ccf['comments'],'add',(_0x257003,_0x3f7337)=>{const _0x4c5a81=this['_calculatePosition'](_0x3f7337);this['length']++,this['_handleNewCommentModel'](_0x3f7337,_0x4c5a81),this['refreshVisibleViews']();}),this['listenTo'](_0x349ccf['comments'],'remove',(_0x1bfe6c,_0x1dc310)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1dc310),this['refreshVisibleViews']();}),this['listenTo'](_0x349ccf,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x349ccf,'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',_0x2afd9f['if']('length','ck-hidden',_0x2a9032=>!_0x2a9032)],'aria-label':Et(_0x46dd8a,'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'](_0x2e4629){-0x1===_0x2e4629?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}destroy(){this['_collapsedCommentsView']['destroy']();for(const _0x74fee4 of this['commentViews'])_0x74fee4['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}_handleNewCommentModel(_0x4a64aa,_0xe574e1){const _0x5bdc48=new this['_config']['CommentView'](this['locale'],_0x4a64aa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5bdc48['viewUid']=_0x4a64aa['id'],_0x5bdc48['delegate']('removeComment')['to'](this),_0x5bdc48['delegate']('updateComment')['to'](this),_0x5bdc48['delegate']('resolveCommentThread')['to'](this),_0x5bdc48['delegate']('editorReady')['to'](this),_0x5bdc48['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5bdc48,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5bdc48,_0xe574e1);}_calculatePosition(_0xa07ece){const _0x48ad63=this['_model']['_findOptimalIndex'](_0xa07ece);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xa07ece['authoredAt']?_0x48ad63-0x1:_0x48ad63:_0x48ad63-0x1;}_handleInfoComment(){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x27ad8c={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x27ad8c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x27ad8c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}_handleRemoveCommentModel(_0x50774d){const _0x545852=this['commentViews']['remove'](_0x50774d['id']);this['stopListening'](_0x545852),_0x545852['isEditMode']&&this['_updateHasDirtyComment'](),_0x545852['destroy']();}_updateHasDirtyComment(){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x57ad63=>_0x57ad63['isEditMode']);}['_rearrangeCollapse'](){const _0x2591cf=function(_0x2bb1a8){const _0x5d1525=new _0xeae5cd();for(const _0x13cfca of _0x2bb1a8)_0x5d1525['add'](_0x13cfca);return _0x5d1525;}(this['commentViews']),_0x488d2e=this['_collapsedCommentsView']['count'];for(let _0x329142=0x1;_0x329142<=_0x488d2e;_0x329142++)_0x2591cf['remove'](0x1);for(const _0x44bce4 of _0x2591cf)_0x44bce4['collapse']();_0x488d2e>0x0&&_0x2591cf['add'](this['_collapsedCommentsView'],0x1),Dt(_0x355eae(Array['from'](this['visibleViews']),Array['from'](_0x2591cf)),this['visibleViews'],_0x2591cf);}['_rearrangeExpand'](){Dt(_0x355eae(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1fc51d of this['visibleViews'])_0x1fc51d['expand']();}_setupKeyboardNavigation(){this['commentViews']['forEach'](_0x550f3a=>{this['focusTracker']['add'](_0x550f3a['element']),this['keystrokes']['listenTo'](_0x550f3a['element']);}),this['commentViews']['on']('change',(_0x531aa6,_0x3555a7)=>{for(const _0x558d80 of _0x3555a7['removed'])this['focusTracker']['remove'](_0x558d80['element']),this['keystrokes']['stopListening'](_0x558d80['element']);for(const _0x5d97d2 of Array['from'](_0x3555a7['added'])['reverse']())this['focusTracker']['add'](_0x5d97d2['element']),this['keystrokes']['listenTo'](_0x5d97d2['element']);});}};function Dt(_0xf3f1b6,_0x54a6b1,_0x370d7a){let _0x7d9ffa=0x0;for(const _0x46c9fc of _0xf3f1b6)switch(_0x46c9fc){case'insert':_0x54a6b1['add'](_0x370d7a['get'](_0x7d9ffa),_0x7d9ffa),_0x7d9ffa++;break;case'delete':_0x54a6b1['remove'](_0x7d9ffa);break;case'equal':_0x7d9ffa++;}}var Vt=class extends ht{constructor(_0x1c5ad0){super(_0x1c5ad0);const _0x56415b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x56415b['to']('contextValue',_0x3224f7=>Et(_0x1c5ad0,'THREAD_CONTEXT_LABEL',_0x3224f7)),'tabindex':-0x1},'children':[{'text':_0x56415b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];reopenButtonView;contextView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x21ce39,_0x11a5e1){super(_0x21ce39);const _0x4cc4c5=this['bindTemplate'];this['_model']=_0x11a5e1,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5d770f=>!!_0x5d770f),this['bind']('contextValue')['to'](this['_model'],'context',_0x4bb86b=>_0x4bb86b&&_0x4bb86b['value']?this['_trimContextValue'](_0x4bb86b['value']):Et(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',_0x4cc4c5['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 _0x2d0d2a=new _0x5dc461(this['locale']);return _0x2d0d2a['label']=Et(this['locale'],'Reopen'),_0x2d0d2a['tooltip']=Et(this['locale'],'Reopen'),_0x2d0d2a['icon']=_0x284c9a,_0x2d0d2a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x38f093=>!_0x38f093),_0x2d0d2a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x892c6f,_0x4ae017)=>_0x892c6f&&_0x4ae017),_0x2d0d2a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2d0d2a;}_trimContextValue(_0x582aab){if(_0x582aab['length']<0x96)return _0x582aab;const _0x3e2bc5=_0x582aab['lastIndexOf']('\x20',0x93);return _0x582aab['substring'](0x0,_0x3e2bc5>-0x1?_0x3e2bc5:0x93)+'...';}_attachContextActions(){const _0x3c4ad0=this['element']['querySelector']('.ck-context'),_0x3b0b57=_0x3c4ad0['querySelector']('.ck-context__value');this['listenTo'](_0x3c4ad0,'mouseenter',()=>{_0x3b0b57['offsetWidth']<_0x3b0b57['scrollWidth']&&_0x3c4ad0['classList']['add']('overlay');}),this['listenTo'](_0x3c4ad0,'mouseleave',()=>{_0x3c4ad0['classList']['remove']('overlay');});}_setupKeyboardNavigation(){this['keystrokes']['listenTo'](this['element']);for(const _0x2f532e of this['focusables'])this['focusTracker']['add'](_0x2f532e['element']),this['keystrokes']['listenTo'](_0x2f532e['element']);}_createContextView(){const _0x4a9371=new Vt(this['locale']);return _0x4a9371['bind']('contextValue')['to'](this),_0x4a9371;}},Ht=class extends ht{['_model'];['_config'];commentThreadHeaderView;commentThreadInputView;ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];constructor(_0x4e5b83,_0x186afc,_0x33d3e6,_0x16f7e5){super(_0x4e5b83),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x186afc,this['_localUser']=_0x33d3e6,this['_config']=_0x16f7e5,this['commentThreadHeaderView']=new Bt(_0x4e5b83,_0x186afc),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x160d68(_0x4e5b83,Et(_0x4e5b83,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0x4e5b83,_0x186afc,Object['assign']({'CommentView':this['_config']['CommentView']},_0x16f7e5)),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',(_0x375ff3,_0x51e5c4)=>_0x375ff3||!!_0x51e5c4),this['bind']('isUnlinked')['to'](_0x186afc,'unlinkedAt',_0x38c910=>!!_0x38c910);let _0x749223=null;const _0x113978=()=>{const _0x49e185=this['_model']['comments']['first']||null;_0x49e185!==_0x749223&&(_0x749223&&this['stopListening'](_0x749223,'change:content'),_0x749223=_0x49e185,_0x49e185&&this['listenTo'](_0x49e185,'change:content',_0x113978));const _0x3030fb=_0x49e185?_0x49e185['author']['name']:this['_localUser']['name'],_0x3bf2b0=_0x49e185?new DOMParser()['parseFromString'](_0x93f90c(_0x49e185['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x278b89=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x3030fb]);this['set']('ariaLabel',_0x3bf2b0?_0x278b89+'\x20'+_0x3bf2b0:_0x278b89);};this['listenTo'](this['_model']['comments'],'change',_0x113978),_0x113978(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5b7b90=>_0x5b7b90['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x1cc400(this,this['focusables']);}async destroy(){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}_createCommentThreadInputView(){const _0x11dc93=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2f10b3=_0x11dc93['commentInputView'];return _0x11dc93['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2f10b3,'value',(_0x55eef9,_0x320827,_0x914d4c,_0x2d061f,_0x51d72b)=>!!_0x51d72b||!!_0x2d061f&&_0x914d4c&&!_0x320827||_0x55eef9&&_0x914d4c&&!_0x320827),_0x2f10b3['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xf78b7d,_0x426d8b,_0x442506)=>{let _0x314f83;return _0x314f83=_0x442506&&_0x426d8b?'Reply\x20to\x20reopen\x20discussion...':_0xf78b7d?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x314f83);}),_0x2f10b3['bind']('submitLabel')['to'](this,'length',_0x2184ad=>Et(this['locale'],_0x2184ad?'Reply':'Comment')),_0x2f10b3['on']('submit',(_0x3cc2b4,_0x28acb9)=>{this['fire']('addComment',_0x28acb9),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2f10b3['on']('cancel',()=>{this['focus']();}),_0x2f10b3['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2f10b3['on']('cancel',_0x164520=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x164520['stop']());}),this['on']('change:isActive',(_0x40d572,_0x242c6c,_0x2789b9)=>{_0x2789b9||this['length']||_0x2f10b3['value']||this['fire']('removeCommentThread');}),_0x11dc93;}};const Ft=/* #__PURE__ -- @preserve */
27
+ _0x2b4f0a(Ht);var Ut=class extends Ft{commentThreadChildren;containerElement;resolveButton;_boundFirstCommentView;constructor(_0x1c1bf9,_0x47c86e,_0x55887f,_0x2e60d9){super(_0x1c1bf9,_0x47c86e,_0x55887f,_0x2e60d9),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1c1bf9,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x15f158,_0x1f8991,_0x333b84)=>{_0x333b84||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x38d1bc,_0x1b3516,_0x421fb3)=>{_0x421fb3&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}getTemplate(){const _0x228abd=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x228abd['if']('isActive','ck-thread--active'),_0x228abd['if']('isUnlinked','ck-thread--unlinked'),_0x228abd['to']('actionIndicator',_0x562204=>_0x562204?'ck-thread--'+_0x562204:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x228abd['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 _0x399dbb of this['commentsListView']['commentViews'])_0x399dbb['cancelConfirm']();}_bindFirstCommentView(){const {locale:_0x164c29}=this,_0x174225=this['commentsListView']['commentViews']['get'](0x0);_0x174225===this['_boundFirstCommentView']||_0x174225['isSystemComment']||(this['_boundFirstCommentView']=_0x174225,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x174225,'actionIndicator',_0x39b54e=>'remove'===_0x39b54e?'remove':null),_0x174225['placeholder']=Et(_0x164c29,'Write\x20a\x20comment...'),_0x174225['removeButton']['on']('execute',_0x11404c=>{_0x11404c['stop'](),this['showConfirm'](Et(_0x164c29,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x174225['focus']();}),_0x174225['actionBar']['add'](this['resolveButton'],0x0),_0x174225['focusables']['add'](this['resolveButton'],0x0));}_createResolveButton(){const _0x149ad7=new _0x18913b(this['locale']);return _0x149ad7['label']=Et(this['locale'],'Resolve'),_0x149ad7['tooltip']=Et(this['locale'],'Resolve'),_0x149ad7['icon']=_0x29b66f,_0x149ad7['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x149ad7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x7bcc6f=>!_0x7bcc6f),_0x149ad7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5cb183,_0xd2cef4)=>_0x5cb183&&!_0xd2cef4),_0x149ad7['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x149ad7;}_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']));}},Wt=class extends ht{constructor(_0x2a347a){super(_0x2a347a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0xda48e8,_0x1fe7da,_0x25676b)=>{this['element']['innerHTML']=_0x25676b;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];ariaDescriptionView;['focusables'];['focusTracker'];keystrokes;['focusCycler'];['_model'];['_config'];constructor(_0x4915eb,_0x333b40,_0x53fb2c){super(_0x4915eb),this['_model']=_0x333b40,this['_config']=_0x53fb2c,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x333b40,'content',_0x333b40,'authoredAt',(_0x42ea66,_0x4e446e)=>Et(_0x4915eb,'COMMENT_ARIA_LABEL',[_0x333b40['author']['name'],_0x53fb2c['formatDateTime'](_0x4e446e),new DOMParser()['parseFromString'](_0x42ea66,'text/html')['body']['textContent'],_0x333b40['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x160d68(_0x4915eb,Et(_0x4915eb,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4aef14=>_0x4aef14['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']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}getUserViewNotificationText(){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}_createCommentContentView(){const _0x14511d=new Wt(this['locale']);return _0x14511d['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x150ef9,_0x322619)=>_0x322619?_0x93f90c(_0x150ef9,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x150ef9),_0x14511d;}_createCommentInputView(){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5667be=new St(this['locale'],this['_config']['editorConfig']);return _0x5667be['value']=this['_model']['content'],_0x5667be['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5667be['submitLabel']=Et(this['locale'],'Save'),_0x5667be['on']('submit',(_0x5efcb7,_0x6093ee)=>{this['fire']('updateComment',this['_model']['id'],_0x6093ee),this['switchToDisplayMode'](),this['focus']();}),_0x5667be['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5667be['once']('editorReady',()=>{_0x5667be['focus']();}),_0x5667be['createEditor'](),_0x5667be['delegate']('editorReady')['to'](this),_0x5667be['delegate']('editorDestroyed')['to'](this),_0x5667be;}_setupKeyboardNavigation(){const _0x3d072b=this['element'];this['keystrokes']['listenTo'](_0x3d072b);for(const _0x12f6e5 of this['focusables'])this['focusTracker']['add'](_0x12f6e5['element']),this['keystrokes']['listenTo'](_0x12f6e5['element']);this['focusables']['on']('change',(_0x401e7b,_0x12d1b2)=>{for(const _0x10e478 of _0x12d1b2['removed'])this['focusTracker']['remove'](_0x10e478['element']),this['keystrokes']['stopListening'](_0x10e478['element']);for(const _0x5694ae of _0x12d1b2['added'])this['focusTracker']['add'](_0x5694ae['element']),this['keystrokes']['listenTo'](_0x5694ae['element']);}),this['keystrokes']['set']('enter',(_0x3af631,_0x83ffe8)=>{_0x3d072b===_0x3af631['target']&&(this['focusCycler']['focusFirst'](),_0x83ffe8());}),this['keystrokes']['set']('esc',(_0x5d58ce,_0x43733f)=>{_0x3d072b!==_0x5d58ce['target']&&(this['focus'](),_0x43733f());});}};const Gt=/* #__PURE__ -- @preserve */
28
+ _0x2b4f0a(Kt);var Yt=class extends Gt{actionBar;['userView'];constructor(_0x2767ca,_0x4b21c2,_0x3f0b06){super(_0x2767ca,_0x4b21c2,_0x3f0b06),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x2767ca,'Reply...')),this['bind']('authoredAt')['to'](_0x4b21c2),this['bind']('resolvedAt')['to'](_0x4b21c2),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 _0x58238e(_0x2767ca,_0x4b21c2['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4b21c2,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}getTemplate(){const _0x80819e=this['bindTemplate'],_0x302d53=[{'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':_0x80819e['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x80819e['to']('authoredAt',_0x186dbf=>this['_config']['formatDateTime'](_0x186dbf))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x80819e['if']('isEditMode','ck-comment__actions--hidden'),_0x80819e['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']&&_0x302d53['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x80819e['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x80819e['if']('isEditMode','ck-comment--edit'),_0x80819e['if']('isSystemComment','ck-comment--info'),_0x80819e['to']('actionIndicator',_0x248fda=>_0x248fda?'ck-comment--'+_0x248fda:'')],'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':_0x302d53}]}]};}_createEditButton(){const _0x7a18c=new _0x5dc461(this['locale']);return _0x7a18c['label']=Et(this['locale'],'Edit'),_0x7a18c['icon']=_0x27b417,_0x7a18c['withText']=!0x0,_0x7a18c['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x7a18c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2a888d=>!_0x2a888d),_0x7a18c['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x7a18c['on']('execute',()=>this['switchToEditMode']()),_0x7a18c;}_createRemoveButton(){const _0x51fde7=new _0x5dc461(this['locale']);return _0x51fde7['label']=Et(this['locale'],'Remove'),_0x51fde7['icon']=_0x255d55,_0x51fde7['withText']=!0x0,_0x51fde7['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x51fde7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x370942=>!_0x370942),_0x51fde7['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x51fde7['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x51fde7;}_createDropdown(){const _0x57c09e=ct(this['locale'],_0x41f32c),_0xb9bf32=_0x57c09e['panelView']['children'],_0x57ac6a=new ot(this['locale']),_0x2aaceb=_0x57c09e['bindTemplate'];dt(_0x57c09e,()=>this['items']['find'](_0x17d218=>_0x17d218['isVisible'])),_0x57c09e['extendTemplate']({'attributes':{'class':[_0x2aaceb['if']('isVisible','ck-hidden',_0x242c33=>!_0x242c33)]}});const _0xfb40f1=(_0x30d3bc,_0x59737d=-0x1)=>{const _0x421677=new nt(this['locale']);_0x421677['children']['add'](_0x30d3bc);const _0x25f671=_0x59737d>-0x1?_0x59737d:_0x57ac6a['items']['length'];_0x57ac6a['items']['add'](_0x421677,_0x25f671);const _0x5b8e3a=Array['from'](this['items']);_0x57c09e['unbind']('isEnabled','isVisible'),_0x57c09e['bind']('isEnabled')['toMany'](_0x5b8e3a,'isEnabled',(..._0x22303d)=>_0x22303d['some'](_0x1398f3=>_0x1398f3)),_0x57c09e['bind']('isVisible')['toMany'](_0x5b8e3a,'isVisible',(..._0x3c0cfa)=>_0x3c0cfa['some'](_0x448d71=>_0x448d71));};_0x57c09e['panelPosition']='sw',_0x57c09e['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x3ce8b4});for(const _0x35e42e of this['items'])_0xfb40f1(_0x35e42e);return _0xb9bf32['add'](_0x57ac6a),_0x57c09e['listenTo'](this['items'],'add',(_0xb300e3,_0x5632fa,_0x5b67ae)=>{_0xfb40f1(_0x5632fa,_0x5b67ae);}),_0x57c09e['listenTo'](this['items'],'remove',(_0x2a8a64,_0x1357a1,_0x46904c)=>{_0x57ac6a['items']['remove'](_0x46904c);}),_0x57c09e;}_attachActions(_0x35faab,_0x4ce84c){const _0x40971d=_0x35faab&&_0x35faab['element'];_0x40971d&&(this['listenTo'](_0x40971d,'mouseenter',()=>this['actionIndicator']=_0x4ce84c),this['listenTo'](_0x40971d,'focus',()=>this['actionIndicator']=_0x4ce84c),this['listenTo'](_0x40971d,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x40971d,'blur',()=>this['actionIndicator']=null));}_createCommentInputView(){const _0x321ea0=super['_createCommentInputView']();return _0x321ea0['bind']('placeholder')['to'](this),_0x321ea0;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x50a949){const _0xf8b22d=_0x58d35e(_0x50a949,0x1e),_0x5cfc49=new MutationObserver(_0x117c65=>{for(const _0x39955b of _0x117c65)('attributes'==_0x39955b['type']&&'class'==_0x39955b['attributeName']||'childList'==_0x39955b['type']||'characterData'==_0x39955b['type'])&&_0xf8b22d();});return{'attach'(_0x31e127){_0x5cfc49['observe'](_0x31e127,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5cfc49['disconnect'](),_0xf8b22d['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];keystrokes;content;['mainView'];_mutationObserver;constructor(_0x48c6bd,_0xd656b5){super(_0x48c6bd),this['id']=_0x144583(),this['focusTracker']=new _0x1749d2(),this['keystrokes']=new _0x2781fd(),this['keystrokes']['set']('Esc',(_0x455845,_0x18d1d7)=>this['fire']('Esc',_0x18d1d7)),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'](_0xd656b5),this['mainView']=_0xd656b5;const _0x3599b7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3599b7['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 _0x55b3a0=this['element']['clientHeight'];_0x55b3a0&&(this['height']=_0x55b3a0);}};const jt=/* #__PURE__ -- @preserve */
29
+ _0x5f10cb();var $t=class Annotation extends jt{['view'];focusableElements;_type;_target;constructor({view:_0x5e2106,target:_0x498dc1,type:_0x103b38,isVisible:_0x183788=!0x0}){super(),this['view']=_0x5e2106,this['view']['element']||this['view']['render'](),this['_type']=_0x103b38,this['_target']=_0x498dc1,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0xeae5cd([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x13c85c,_0x115321)=>{this['view']['focusTracker']['add'](_0x115321);}),this['focusableElements']['on']('remove',(_0x2896f0,_0x1aa739)=>{this['view']['focusTracker']['remove'](_0x1aa739);}),this['set']('isVisible',_0x183788);}get type(){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get target(){const _0x1346c5=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x1346c5),_0x1346c5;}get targetRect(){const _0x1ddc29=this['target'];if(null===_0x1ddc29)return null;if(_0x1ddc29 instanceof _0x276b72)return _0x1ddc29;const _0x121ffa=_0x1ddc29['filter'](_0x1d3e70=>function(_0x40ce69){return!!_0x40ce69['offsetParent']||!!_0x40ce69['getClientRects']()['item'](0x0);}(_0x1d3e70));return 0x0===_0x121ffa['length']?null:_0x276b72['getDomElementRects'](_0x121ffa[0x0])[0x0];}get isActive(){return this['view']['isActive'];}set isActive(_0x218c7f){this['view']['isActive']=_0x218c7f,this['view']['mainView']['isActive']=_0x218c7f;}updateTargetRect(){this['view']['targetRect']=this['targetRect'];}destroy(){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}refreshVisibility(){this['isVisible']=!!this['targetRect'];}static _assertCorrectTarget(_0x422f29){if(!(null===_0x422f29||_0x422f29 instanceof _0x276b72||Array['isArray'](_0x422f29)&&_0x422f29['every'](_0x16844f=>zt(_0x16844f))))throw new _0x59fadc('annotation-invalid-target',null,{'target':_0x422f29});}_getNormalizedTarget(){const _0x3a72e5='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x3a72e5)?[_0x3a72e5]:_0x3a72e5;}};function zt(_0x585abe){return null!==_0x585abe&&'object'==typeof _0x585abe&&'nodeType'in _0x585abe&&0x1===_0x585abe['nodeType'];}var Jt=class extends _0xeae5cd{_innerViewToAnnotation;_viewToAnnotation;['_focusTracker'];constructor(_0x291f47=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1749d2(),this['_focusTracker']['on']('change:isFocused',(_0x4897cd,_0xefa70b,_0x1a715d)=>{_0x1a715d||this['fire']('blur');});for(const _0x39ee71 of _0x291f47)this['add'](_0x39ee71);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2ee109){if(this['has'](_0x2ee109))throw new _0x59fadc('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2ee109['innerView'],_0x2ee109),this['_viewToAnnotation']['set'](_0x2ee109['view'],_0x2ee109);for(const _0x3d3f6d of _0x2ee109['focusableElements'])this['_focusTracker']['add'](_0x3d3f6d);if(this['listenTo'](_0x2ee109['focusableElements'],'add',(_0x44d902,_0xd0cd64)=>{this['_focusTracker']['add'](_0xd0cd64);}),this['listenTo'](_0x2ee109['focusableElements'],'remove',(_0x170bf6,_0x1fad18)=>{this['_focusTracker']['remove'](_0x1fad18);}),this['listenTo'](_0x2ee109['view']['focusTracker'],'change:isFocused',(_0x2c0265,_0x516ce1,_0x1ab215)=>{_0x1ab215&&this['fire']('focus',_0x2ee109);}),_0x2ee109['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x88e9af of this)_0x88e9af['updateTargetRect']();}const _0x31a2f2=this['_getOrderInContent'](_0x2ee109['view']['targetRect']);return super['add'](_0x2ee109,_0x31a2f2);}['remove'](_0x2a9301){if(!this['has'](_0x2a9301))throw new _0x59fadc('annotationcollection-not-existing-item',null);this['stopListening'](_0x2a9301['view']['focusTracker']),this['stopListening'](_0x2a9301['focusableElements']);for(const _0x44e211 of _0x2a9301['focusableElements'])this['_focusTracker']['remove'](_0x44e211);return this['_viewToAnnotation']['delete'](_0x2a9301['view']),this['_innerViewToAnnotation']['delete'](_0x2a9301['innerView']),super['remove'](_0x2a9301);}getByInnerView(_0x1c4b0e){return this['_innerViewToAnnotation']['get'](_0x1c4b0e);}getByView(_0x55abad){return this['_viewToAnnotation']['get'](_0x55abad);}destroy(){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}refreshPositioning(){for(const _0x53b16a of this)_0x53b16a['updateTargetRect']();this['_sort']();}_sort(){const _0x55ad0a=Array['from'](this)['sort']((_0x20ec23,_0x50da89)=>Zt(_0x20ec23['view']['targetRect'],_0x50da89['view']['targetRect']));for(let _0x32cd35=_0x55ad0a['length']-0x1;_0x32cd35>0x0;_0x32cd35--){const _0x467631=_0x55ad0a[_0x32cd35];_0x32cd35!==this['getIndex'](_0x467631)&&(this['remove'](_0x467631),this['add'](_0x467631));}}_getOrderInContent(_0x575345){let _0x327490=0x0;if(!_0x575345)return this['length'];for(const _0x162478 of this){const _0x3b98bf=_0x162478['view']['targetRect'];if(_0x3b98bf){if(Zt(_0x575345,_0x3b98bf)<0x0)return _0x327490;_0x327490++;}}return _0x327490;}_areCachedRectsStale(){const _0x6a095e=this['get'](0x0);if(!_0x6a095e)return!0x1;const _0x2192dc=_0x6a095e['view']['targetRect'],_0x115fa0=_0x6a095e['targetRect'];return!(!_0x2192dc||!_0x115fa0)&&(_0x2192dc['top']!==_0x115fa0['top']||_0x2192dc['left']!==_0x115fa0['left']);}};function Qt({source:_0x33beb5,target:_0x1905c6,filter:_0x5b8237}){for(const _0x34d5dd of _0x33beb5)_0x5b8237(_0x34d5dd)&&_0x1905c6['add'](_0x34d5dd);_0x1905c6['listenTo'](_0x33beb5,'add',(_0x5a9837,_0x57082b)=>{_0x5b8237(_0x57082b)&&_0x1905c6['add'](_0x57082b);}),_0x1905c6['listenTo'](_0x33beb5,'remove',(_0x3e28d2,_0x5b6c91)=>{_0x1905c6['has'](_0x5b6c91)&&_0x1905c6['remove'](_0x5b6c91);});}function Zt(_0x491d43,_0x1e08f5){if(null===_0x491d43&&null===_0x1e08f5)return 0x0;if(null===_0x491d43)return-0x1;if(null===_0x1e08f5)return 0x1;const _0x21f3c4=_0x491d43['top']-_0x1e08f5['top'];return 0x0==_0x21f3c4?_0x491d43['left']-_0x1e08f5['left']:_0x21f3c4;}var ti=class extends _0x3d8ace{collection;_visibleAnnotations;static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b3281){if(super(_0x2b3281),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2b3281 instanceof _0x5d3c65){const _0x3e2484=_0x2b3281['locale'];_0x2b3281['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x3e2484,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3f8c86){this['collection']['add'](_0x3f8c86);}['remove'](_0x157b98){this['collection']['remove'](_0x157b98),_0x157b98['destroy']();}refreshVisibility(){for(const _0x281d4f of this['collection'])_0x281d4f['refreshVisibility']();}refreshPositioning(){this['_visibleAnnotations']['refreshPositioning']();}getByInnerView(_0x2317e2){return this['collection']['getByInnerView'](_0x2317e2);}deactivateAll(){this['fire']('_deactivateAllAnnotations');}destroy(){for(const _0x398519 of this['collection'])_0x398519['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}activate(_0x56a49c){this['fire']('_activateAnnotation',_0x56a49c);}createAnnotation(_0x2e45db){return new $t(_0x2e45db);}createAnnotationView(_0x8d3a16,_0x3bccbb){return new qt(_0x8d3a16,_0x3bccbb);}_addActiveAnnotation(_0xe9627b){const _0x189dd5=new Set(this['activeAnnotations']);_0x189dd5['add'](_0xe9627b),this['activeAnnotations']=_0x189dd5;}_removeActiveAnnotation(_0x49f8ef){const _0x278017=new Set(this['activeAnnotations']);_0x278017['delete'](_0x49f8ef),this['activeAnnotations']=_0x278017;}_bindAnnotationsToVisibleAnnotations(){const _0x3a13c8=this['collection'],_0x3a74f4=this['_visibleAnnotations'];function _0x285087(_0x4c2b9a){const _0x4cc02f=_0x4c2b9a['source'];_0x4cc02f['isVisible']&&!_0x3a74f4['has'](_0x4cc02f)?_0x3a74f4['add'](_0x4cc02f):!_0x4cc02f['isVisible']&&_0x3a74f4['has'](_0x4cc02f)&&_0x3a74f4['remove'](_0x4cc02f),_0x4cc02f['view']['focusTracker']['remove'](_0x4cc02f['view']['element']),_0x4cc02f['view']['focusTracker']['add'](_0x4cc02f['view']['element']);}this['listenTo'](_0x3a13c8,'add',(_0x386b62,_0xc7b063)=>{_0xc7b063['isVisible']&&_0x3a74f4['add'](_0xc7b063),this['listenTo'](_0xc7b063,'change:isVisible',_0x285087);}),this['listenTo'](_0x3a13c8,'remove',(_0x3767a4,_0x1675cf)=>{_0x3a74f4['has'](_0x1675cf)&&_0x3a74f4['remove'](_0x1675cf),this['stopListening'](_0x1675cf,'change:isVisible',_0x285087);});}_setupEnterAnnotationKeystroke(){const _0x36171a=_0xb0365=>{_0xb0365['on']('ready',()=>{_0xb0365['keystrokes']['set'](_0x235769,(_0x139be5,_0x5d554d)=>{const _0x260d78=_0x102981(this['activeAnnotations']['values']());_0x260d78&&(_0x260d78['view']['focus'](),_0x5d554d());});});};this['context']instanceof _0x5d3c65?_0x36171a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x12bab5,_0x19e7aa)=>{_0x36171a(_0x19e7aa);});}_setupEscapeAnnotationHandling(){const _0x292e92=_0x1c228d=>{const _0x18241c=_0x1c228d['source'],_0x51577c=[];let _0x532254;if(Array['isArray'](_0x18241c['target'])){_0x532254=_0x18241c['target'][0x0],this['context']instanceof _0x5d3c65?_0x51577c['push'](this['context']):this['context']['editors']&&_0x51577c['push'](...this['context']['editors']);for(const _0x45a276 of _0x51577c)for(const _0x295d85 of _0x45a276['editing']['view']['domRoots']['values']())if(_0x295d85['contains'](_0x532254))return void _0x45a276['editing']['view']['focus']();_0x532254['focus']();}};this['listenTo'](this['collection'],'add',(_0x541b01,_0x4200cc)=>{this['listenTo'](_0x4200cc,'escape',_0x292e92,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x255067,_0x12358e)=>{this['stopListening'](_0x12358e,'escape',_0x292e92);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
30
+ _0x5f10cb(),ni=/* #__PURE__ -- @preserve */
31
+ _0x5f10cb();var oi=class extends _0x3d8ace{_threads;_threadToController;_viewToController;static get requires(){return[ti,_0x434878,_0x46e177];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x32948f){super(_0x32948f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x9e2152=this['context']['config'];_0x9e2152['define']('comments.maxCommentsWhenCollapsed',0x2),_0x9e2152['define']('comments.maxThreadTotalWeight',0x1f4),_0x9e2152['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x9e2152['define']('comments.CommentThreadView',Ut),_0x9e2152['define']('comments.CommentView',Yt),_0x9e2152['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}init(){const _0x33c173=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x299835,_0x57a71e)=>this['_addCommentThread'](_0x57a71e)),this['on']('submitCommentThread',(_0x4d25e9,_0xea510d)=>this['_submitCommentThread'](_0xea510d)),this['on']('resolveCommentThread',(_0x937bf,_0x31ec22)=>this['_resolveCommentThread'](_0x31ec22)),this['on']('resolveCommentThread',(_0x2ffdd8,_0xa8ab49)=>this['_updateActiveAnnotation'](_0xa8ab49),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x59753e,_0x24d6ed)=>this['_reopenCommentThread'](_0x24d6ed)),this['on']('reopenCommentThread',(_0x4b4496,_0x9af588)=>this['_updateActiveAnnotation'](_0x9af588),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x497c63,_0x4d443e)=>this['_removeCommentThread'](_0x4d443e)),this['on']('updateCommentThread',(_0x51dcb7,_0x116e45)=>this['_updateCommentThread'](_0x116e45)),this['on']('updateCommentThread',(_0x4fb75a,_0x4050f4)=>this['_updateActiveAnnotation'](_0x4050f4),{'priority':'lowest'}),this['on']('addComment',(_0x493c9f,_0x315140)=>this['_addComment'](_0x315140)),this['on']('updateComment',(_0x406f75,_0x44d4b8)=>this['_updateComment'](_0x44d4b8)),this['on']('removeComment',(_0x13cd4b,_0x1f8e47)=>this['_removeComment'](_0x1f8e47)),this['on']('addComment',(_0x26a692,{threadId:_0x3b898a,isFromAdapter:_0x497b34})=>{if(_0x497b34)return;const _0x5dfdde=this['getCommentThread'](_0x3b898a),_0x204b4b=_0x5dfdde&&this['_threadToController']['get'](_0x5dfdde);_0x204b4b&&_0x204b4b['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x33c173,'change:activeAnnotations',(_0x36ddd7,_0x24238e,_0x34a95a)=>{const _0x569fa2=Array['from'](_0x34a95a)['map'](_0xf4370d=>this['_viewToController']['get'](_0xf4370d['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x569fa2?_0x569fa2['model']:null;});}set adapter(_0x113c94){if(this['_adapter'])throw new _0x59fadc('commentsrepository-adapter-already-set');this['_adapter']=_0x113c94;}get adapter(){return this['_adapter'];}addCommentThread({channelId:_0x42a074=ii,threadId:_0x5d1cd9=_0x144583(),comments:_0x597dd6=[],unlinkedAt:_0x183265=null,resolvedAt:_0xc4d9e7=null,resolvedBy:_0x3c3934=null,target:_0x39c288=null,context:_0x5b81fe=null,attributes:_0xea185c={},isResolvable:_0x15d038=!0x0,isSubmitted:_0x39f192=!0x1,isFromAdapter:_0x15a78b=!0x1}={}){return this['fire'](ai('addCommentThread',_0x42a074),{'channelId':_0x42a074,'threadId':_0x5d1cd9,'comments':_0x597dd6,'unlinkedAt':_0x183265,'resolvedAt':_0xc4d9e7,'resolvedBy':_0x3c3934,'target':_0x39c288,'context':_0x5b81fe,'attributes':_0xea185c,'isFromAdapter':_0x15a78b,'isResolvable':_0x15d038,'isSubmitted':_0x39f192}),this['getCommentThread'](_0x5d1cd9);}openNewCommentThread({channelId:_0x4a77da=ii,threadId:_0xd55be8=_0x144583(),target:_0x2ca8ba,context:_0x1544ca=null,isResolvable:_0x2b5e6f=!0x0}){if(this['_readOnlyChannels']['has'](_0x4a77da)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2ca8ba)throw new _0x59fadc('commentsrepository-missing-target');const _0x1ca532=this['addCommentThread']({'channelId':_0x4a77da,'threadId':_0xd55be8,'target':_0x2ca8ba,'context':_0x1544ca,'isResolvable':_0x2b5e6f});if(!_0x1ca532)return null;const _0x5b53b8=this['_threadToController']['get'](_0x1ca532),_0x5101b1=_0x5b53b8['view']['commentThreadInputView']['commentInputView'],_0x10e4c4=this['context']['plugins']['get'](ti),_0x3acf1c=_0x10e4c4['getByInnerView'](_0x5b53b8['view']);return _0x10e4c4['activate'](_0x3acf1c),_0x5101b1['once']('editorReady',()=>_0x5101b1['focus']()),_0x1ca532;}hasCommentThread(_0xd415ae){if('string'!=typeof _0xd415ae)throw new _0x59fadc('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0xd415ae);}updateCommentThread({channelId:_0x2a5114=ii,threadId:_0x5d026a,context:_0x5b1c75,unlinkedAt:_0x53f493,attributes:_0x25f136,isFromAdapter:_0x2862dd=!0x1}){return this['fire'](ai('updateCommentThread',_0x2a5114),{'channelId':_0x2a5114,'threadId':_0x5d026a,'context':_0x5b1c75,'unlinkedAt':_0x53f493,'attributes':_0x25f136,'isFromAdapter':_0x2862dd}),this['getCommentThread'](_0x5d026a);}getCommentThread(_0x4cf3b2){if('string'!=typeof _0x4cf3b2)throw new _0x59fadc('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4cf3b2);}fetchCommentThread({channelId:_0x54e5ce,threadId:_0x5f1268}={}){const _0x4eaff7=this['getCommentThread'](_0x5f1268);if(_0x4eaff7)return Promise['resolve'](_0x4eaff7);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x59fadc('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x54e5ce,'threadId':_0x5f1268})['then'](_0xb83db1=>this['hasCommentThread'](_0x5f1268)?this['getCommentThread'](_0x5f1268):_0xb83db1?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x54e5ce},_0xb83db1)):void 0x0)['catch'](_0x390af2=>{throw console['error'](_0x390af2),new _0x59fadc('commentsrepository-fetch-comment-thread',this['context']);});}getCommentThreads({channelId:_0x3e3125,skipNotAttached:_0x242aff=!0x1,skipEmpty:_0x4e0a5a=!0x1,toJSON:_0x1e7f0f=!0x1}={}){const _0x413e86=[];for(const _0x168708 of this['_threads']['values']())_0x3e3125&&_0x168708['channelId']!==_0x3e3125||_0x242aff&&!_0x168708['isAttached']||_0x4e0a5a&&0x0===_0x168708['length']||_0x413e86['push'](_0x168708);return _0x1e7f0f?_0x413e86['map'](_0x468a52=>_0x468a52['toJSON']()):_0x413e86;}getAnnotationForCommentThread(_0x415d33){const _0x5b283a=this['_threadToController']['get'](_0x415d33);return _0x5b283a&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x5b283a['view'])||null;}getCommentThreadForAnnotation(_0x1f85a8){const _0x260ae1=this['_viewToController']['get'](_0x1f85a8['innerView']);return _0x260ae1?_0x260ae1['model']:null;}setActiveCommentThread(_0x4bfadd){const _0x21c005=this['context']['plugins']['get'](ti);if(!_0x4bfadd)return void(this['activeCommentThread']&&_0x21c005['deactivateAll']());const _0x464ccd=this['getCommentThread'](_0x4bfadd);if(!_0x464ccd)throw new _0x59fadc('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4bfadd});if(!this['_threadToController']['has'](_0x464ccd))throw new _0x59fadc('commentsrepository-active-not-attached',null,{'threadId':_0x4bfadd});const _0x31afde=_0x21c005['getByInnerView'](this['_threadToController']['get'](_0x464ccd)['view']);_0x21c005['activate'](_0x31afde);}switchReadOnly(_0x308fba,_0x360af4){_0x308fba?this['_readOnlyChannels']['add'](_0x360af4):this['_readOnlyChannels']['delete'](_0x360af4),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x48d21f){return this['_readOnlyChannels']['has'](_0x48d21f)||this['_readOnlyChannels']['has'](void 0x0);}createCommentThreadController(_0x4bdc7b,_0x374ac8){return new bt(_0x4bdc7b,_0x374ac8);}setPermissions(_0x3c6d63,_0x172cb7=ii){this['_permissions']['set'](_0x172cb7,_0x3c6d63),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}getPermissions(_0x5cb37a=ii){return this['_permissions']['has'](_0x5cb37a)?this['_permissions']['get'](_0x5cb37a):ei;}_addCommentThread({channelId:_0x4b90c3,threadId:_0xac1dec,comments:_0x387edb,unlinkedAt:_0x59f564,resolvedAt:_0x3284d0,resolvedBy:_0xef95c7,target:_0x5ee805,context:_0x4a8e4a,attributes:_0x49b018,isFromAdapter:_0xf93837,isResolvable:_0x1733f3,isSubmitted:_0x440b84}){if('string'!=typeof _0xac1dec)throw new _0x59fadc('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xac1dec});if(this['hasCommentThread'](_0xac1dec))throw new _0x59fadc('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xac1dec});const _0x31cb5a=new ri(this,{'channelId':_0x4b90c3,'id':_0xac1dec,'context':_0x4a8e4a,'attributes':_0x49b018,'unlinkedAt':_0x59f564,'resolvedAt':_0x3284d0,'resolvedBy':_0xef95c7?this['context']['plugins']['get'](_0x46e177)['getUser'](_0xef95c7):null,'isResolvable':_0x1733f3,'isSubmitted':_0x440b84||_0xf93837});this['_threads']['set'](_0xac1dec,_0x31cb5a);for(const _0x5a79f5 of _0x387edb)_0x31cb5a['_add'](this['_createNewComment']({'threadId':_0xac1dec,..._0x5a79f5}));return _0x5ee805&&_0x31cb5a['attachTo'](_0x5ee805),_0xf93837||!_0x31cb5a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4b90c3,'threadId':_0xac1dec});}_submitCommentThread({channelId:_0x4042d0,threadId:_0x363871}){if(!this['hasCommentThread'](_0x363871))throw new _0x59fadc('commentsrepository-missing-comment-thread',this);const _0x4d7d5f=this['getCommentThread'](_0x363871);if(_0x4d7d5f['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4c127b,comments:_0x10d8e3,resolvedAt:_0x2d5d82,resolvedBy:_0x28c0e3,context:_0xe429e,attributes:_0x2844bf}=_0x4d7d5f,_0x1b8929=this['context']['plugins']['get']('PendingActions'),_0x2cecb3=_0x1b8929['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4042d0,'threadId':_0x4c127b,'comments':_0x10d8e3['map'](_0x339184=>_0x339184['toJSON']()),'resolvedAt':_0x2d5d82,'resolvedBy':_0x28c0e3?_0x28c0e3['id']:_0x28c0e3,'context':_0xe429e,'attributes':_0x2844bf})['then'](({comments:_0x3999e2})=>{_0x1b8929['remove'](_0x2cecb3);for(const _0x5b0f94 of _0x3999e2)this['_updateComment']({'channelId':_0x4042d0,'threadId':_0x363871,'commentId':_0x5b0f94['commentId'],'createdAt':_0x5b0f94['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4dd873=>{throw console['error'](_0x4dd873),new _0x59fadc('commentsrepository-add-comment-thread-internal-error',this);});}_attachCommentThread({threadId:_0x36bc27,target:_0x4aa51d}){const _0xe4829e=this['getCommentThread'](_0x36bc27);if(!_0xe4829e)throw new _0x59fadc('commentsrepository-attach-missing-comment-thread',this);const _0x4c0773=this['context']['plugins']['get']('PendingActions'),_0x29f3a6=this['context']['plugins']['get'](ti),_0x39d308=this['_createCommentThreadView'](_0xe4829e),_0xe46a43=new bt(_0xe4829e,_0x39d308);let _0x36ea6e=null;_0x39d308['on']('change:isDirty',(_0x120deb,_0x39520d,_0x18fd88)=>{_0x18fd88?_0x36ea6e=_0x4c0773['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x36ea6e&&(_0x4c0773['remove'](_0x36ea6e),_0x36ea6e=null);}),this['_threadToController']['set'](_0xe4829e,_0xe46a43),this['_viewToController']['set'](_0x39d308,_0xe46a43);const _0x47a3bb=new qt(this['context']['locale'],_0x39d308);_0x47a3bb['bind']('length')['to'](_0x39d308),_0x47a3bb['bind']('isDirty')['to'](_0x39d308,'isDirty',_0x39d308,'length',(_0xe58c7c,_0x4e3ebd)=>_0xe58c7c||!_0x4e3ebd),_0x47a3bb['bind']('isActive')['to'](_0x39d308),_0x47a3bb['type']='comment';const _0xe914c=new $t({'view':_0x47a3bb,'target':_0x4aa51d,'type':'comment','isVisible':!_0xe4829e['archivedAt']&&!!('function'==typeof _0x4aa51d?_0x4aa51d():_0x4aa51d)});return _0x39d308['on']('escape',()=>{_0xe914c['fire']('escape');}),this['_bindAnnotationToEditors'](_0x39d308,_0xe914c),_0x29f3a6['add'](_0xe914c),_0xe914c;}_bindAnnotationToEditors(_0x4f9e21,_0x322dc2){this['listenTo'](_0x4f9e21,'editorReady',(_0x384888,_0x240dbe)=>{const _0x11b12e=_0x240dbe['ui']['view']['body']['bodyCollectionContainer'];_0x322dc2['focusableElements']['add'](_0x11b12e),this['context']instanceof _0x5d3c65&&this['context']['ui']['focusTracker']['add'](_0x11b12e);},{'priority':'highest'}),this['listenTo'](_0x4f9e21,'editorDestroyed',(_0x35b469,_0x4a69fa)=>{const _0x2e270b=_0x4a69fa['ui']['view']['body']['bodyCollectionContainer'];_0x322dc2['focusableElements']['has'](_0x2e270b)&&_0x322dc2['focusableElements']['remove'](_0x2e270b),this['context']instanceof _0x5d3c65&&this['context']['ui']['focusTracker']['remove'](_0x2e270b);});}_unbindEditors(_0x22faed){this['stopListening'](_0x22faed,'editorReady'),this['stopListening'](_0x22faed,'editorDestroyed');}_createCommentThreadView(_0x16907b){const _0x179cc4=this['context']['plugins']['get'](_0x46e177),{config:_0x89a113,locale:_0xc3fe8f}=this['context'],_0xbe7c66=_0x4ac7c3(_0x89a113['get']('locale'),_0xc3fe8f);return new(0x0,(_0x89a113['get']('comments'))['CommentThreadView'])(_0xc3fe8f,_0x16907b,_0x179cc4['me'],{'editorConfig':{..._0x89a113['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x89a113['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x89a113['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x89a113['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x89a113['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xbe7c66,'CommentView':_0x89a113['get']('comments')['CommentView']});}_resolveCommentThread({threadId:_0x240696,channelId:_0x5aa4c6,resolvedAt:_0x397eb0,resolvedBy:_0x3e203e,isFromAdapter:_0x226074}){if(!this['hasCommentThread'](_0x240696))throw new _0x59fadc('commentsrepository-missing-comment-thread',null,{'threadId':_0x240696});const _0x45e970=this['getCommentThread'](_0x240696);if(_0x45e970['isResolved'])throw new _0x59fadc('commentsrepository-resolved-comment-thread',null,{'threadId':_0x240696});const _0x4dbae4=this['context']['plugins']['get'](_0x46e177);if(_0x45e970['resolvedBy']=_0x4dbae4['getUser'](_0x3e203e),_0x45e970['resolvedAt']=_0x397eb0,_0x226074||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x50d951=this['context']['plugins']['get']('PendingActions'),_0x477960=_0x50d951['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x5aa4c6,'threadId':_0x240696})['then'](({resolvedAt:_0x57acc1,resolvedBy:_0x42e592})=>{_0x50d951['remove'](_0x477960),_0x45e970['resolvedBy']['id']!==_0x42e592&&(_0x45e970['resolvedBy']=_0x4dbae4['getUser'](_0x42e592)),_0x45e970['resolvedAt']=_0x57acc1;})['catch'](_0x355f44=>{throw console['error'](_0x355f44),new _0x59fadc('commentsrepository-resolve-comment-thread-internal-error',this);});}_reopenCommentThread({threadId:_0x36db62,channelId:_0x3921de,isFromAdapter:_0xfe1df5}){if(!this['hasCommentThread'](_0x36db62))throw new _0x59fadc('commentsrepository-missing-comment-thread',null,{'threadId':_0x36db62});const _0x2e50f6=this['getCommentThread'](_0x36db62);if(!_0x2e50f6['isResolved'])throw new _0x59fadc('commentsrepository-reopen-comment-thread',null,{'threadId':_0x36db62});if(_0x2e50f6['resolvedBy']=null,_0x2e50f6['resolvedAt']=null,_0xfe1df5||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x53b5f6=this['context']['plugins']['get']('PendingActions'),_0x1da7f=_0x53b5f6['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3921de,'threadId':_0x36db62})['then'](()=>_0x53b5f6['remove'](_0x1da7f))['catch'](_0x405e3a=>{throw console['error'](_0x405e3a),new _0x59fadc('commentsrepository-reopen-comment-thread-internal-error',this);});}_removeCommentThread({threadId:_0x7673bb,isFromAdapter:_0x558346}){const _0x110930=this['getCommentThread'](_0x7673bb);if(!_0x110930)throw new _0x59fadc('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x7673bb),this['_threads']['delete'](_0x7673bb),!_0x110930['isSubmitted']||_0x558346||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x48a66f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x19a036}=_0x110930,_0x828e73=_0x48a66f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x19a036,'threadId':_0x7673bb})['then'](()=>_0x48a66f['remove'](_0x828e73))['catch'](_0x276ac5=>{throw console['error'](_0x276ac5),new _0x59fadc('commentsrepository-remove-comment-thread-internal-error',this);});}_updateCommentThread({threadId:_0x33c016,unlinkedAt:_0x20e5fc,context:_0x111bb0,attributes:_0x45d764,isFromAdapter:_0x18fb66}){if('string'!=typeof _0x33c016)throw new _0x59fadc('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x33c016});if(!this['hasCommentThread'](_0x33c016))throw new _0x59fadc('commentsrepository-missing-comment-thread',null,{'threadId':_0x33c016});const _0x18762b=this['getCommentThread'](_0x33c016);let _0x469fa6=!0x1;if(void 0x0!==_0x111bb0&&_0x18762b['context']!==_0x111bb0&&(_0x18762b['context']=_0x111bb0,_0x469fa6=!0x0),void 0x0!==_0x20e5fc&&_0x18762b['unlinkedAt']!==_0x20e5fc&&(_0x18762b['unlinkedAt']=_0x20e5fc,_0x469fa6=!0x0),_0x45d764&&!_0x2d4811(_0x45d764,_0x18762b['attributes'])&&(_0x18762b['attributes']=_0x45d764,_0x469fa6=!0x0),!_0x469fa6)return Promise['resolve']();if(!_0x18762b['isSubmitted']||_0x18fb66||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xf1165e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x557189}=_0x18762b,_0x471ece=_0xf1165e['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x557189,'threadId':_0x33c016,'context':_0x111bb0,'unlinkedAt':_0x20e5fc,'attributes':_0x45d764})['then'](()=>_0xf1165e['remove'](_0x471ece))['catch'](_0x38adac=>{throw console['error'](_0x38adac),new _0x59fadc('commentsrepository-update-comment-thread-internal-error',this);});}_detachCommentThread(_0x2693a6){const _0x586d54=this['context']['plugins']['get'](ti),_0x4719d7=this['getCommentThread'](_0x2693a6);if(_0x4719d7['_isAttached']=!0x1,this['_threadToController']['has'](_0x4719d7)){const _0x10b462=this['_threadToController']['get'](_0x4719d7),_0x4b4e23=_0x10b462['view'],_0x3f8b62=_0x586d54['getByInnerView'](_0x4b4e23);this['_threadToController']['delete'](_0x4719d7),this['_viewToController']['delete'](_0x4b4e23),_0x3f8b62&&_0x586d54['remove'](_0x3f8b62),_0x10b462['destroy'](),_0x4b4e23['destroy']()['then'](()=>{this['_unbindEditors'](_0x4b4e23);});}}_updateActiveAnnotation({threadId:_0x1b05b4,resolvedAt:_0x838cd0,unlinkedAt:_0x5585a0}){const _0x55239c=!!_0x838cd0,_0x37ab3e=this['context']['plugins']['get'](ti),_0x466729=this['getCommentThread'](_0x1b05b4);if(this['_threadToController']['has'](_0x466729)){const _0x674ef8=this['_threadToController']['get'](_0x466729)['view'],_0xb98fdd=_0x37ab3e['getByInnerView'](_0x674ef8);_0xb98fdd&&(_0x55239c&&_0x37ab3e['_removeActiveAnnotation'](_0xb98fdd),_0x5585a0?_0xb98fdd['isVisible']=!0x1:_0xb98fdd['refreshVisibility']());}}_getExternalAuthor(_0x1cc337){const _0x4a237d=this['context']['plugins']['get'](_0x46e177),_0x48e01e=_0x8e868c('external:'+_0x1cc337),_0x5dee80=_0x4a237d['getUser'](_0x48e01e);return _0x5dee80||_0x4a237d['addUser']({'id':_0x48e01e,'name':_0x1cc337});}_createNewComment({threadId:_0x27afee,commentId:_0x37180f=_0x144583(),content:_0x8bf0b0,authorId:_0x25dbbd,createdAt:_0x2eaaa7,attributes:_0x27e4e7}){if('string'!=typeof _0x37180f)throw new _0x59fadc('commentsrepository-invalid-commentid');if('string'!=typeof _0x25dbbd)throw new _0x59fadc('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x8bf0b0||!_0x8bf0b0['trim']())throw new _0x59fadc('commentsrepository-invalid-comment-content');const _0x2f16a9=this['context']['plugins']['get'](_0x46e177)['getUser'](_0x25dbbd);if(!_0x2f16a9)throw new _0x59fadc('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x25dbbd});let _0x4d7f1d=null,_0x3d2254=_0x2eaaa7;return _0x27e4e7?.['@external']&&(_0x4d7f1d=this['_getExternalAuthor'](_0x27e4e7['@external']['authorName']),_0x3d2254=new Date(_0x27e4e7['@external']['createdAt'])),new hi(this,{'threadId':_0x27afee,'id':_0x37180f,'author':_0x4d7f1d||_0x2f16a9,'creator':_0x2f16a9,'content':_0x8bf0b0,'createdAt':_0x2eaaa7,'authoredAt':_0x3d2254,'attributes':_0x27e4e7});}_addComment(_0x4cd040){let {threadId:_0x68321b,content:_0x4f7e54,attributes:_0x3d4a02,isFromAdapter:_0x8a2a4e}=_0x4cd040;const _0x4dff22=this['getCommentThread'](_0x4cd040['threadId']);if(!_0x4dff22)throw new _0x59fadc('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x6d571b=this['_createNewComment'](_0x4cd040),{id:_0x1322e9}=_0x6d571b;if(_0x4dff22['_add'](_0x6d571b),_0x8a2a4e||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4dff22['isSubmitted'])return Promise['resolve']();const _0x4051cc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x30b658}=_0x4dff22,_0x160c6b=_0x4051cc['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3d4a02||(_0x3d4a02={}),this['adapter']['addComment']({'channelId':_0x30b658,'threadId':_0x68321b,'commentId':_0x1322e9,'content':_0x4f7e54,'attributes':_0x3d4a02})['then'](_0x276654=>{_0x4051cc['remove'](_0x160c6b),_0x276654&&this['_updateComment']({'channelId':_0x30b658,'threadId':_0x68321b,'commentId':_0x1322e9,'createdAt':_0x276654['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5de390=>{throw console['error'](_0x5de390),new _0x59fadc('commentsrepository-add-comment-internal-error',this);});}_updateComment({threadId:_0x43deb1,commentId:_0x3742a0,content:_0x387c9a,createdAt:_0x8006af,attributes:_0x3e3b36,isFromAdapter:_0x21d6ec}){if(void 0x0!==_0x387c9a&&('string'!=typeof _0x387c9a||!_0x387c9a['trim']()['length']))throw new _0x59fadc('commentsrepository-update-comment-invalid-content');const _0x5ee736=this['getCommentThread'](_0x43deb1),_0x4305c8=_0x5ee736['getComment'](_0x3742a0);if(!_0x4305c8)throw new _0x59fadc('commentsrepository-update-missing-comment',this);let _0x753208=!0x1;if(_0x387c9a&&_0x387c9a!==_0x4305c8['content']&&(_0x4305c8['isEditable']||_0x21d6ec)&&(_0x4305c8['content']=_0x387c9a,_0x753208=!0x0),_0x8006af&&_0x8006af!==_0x4305c8['createdAt']&&(_0x4305c8['createdAt']=_0x8006af,_0x4305c8['isExternal']||(_0x4305c8['authoredAt']=_0x8006af),_0x753208=!0x0),_0x3e3b36&&!_0x2d4811(_0x3e3b36,_0x4305c8['attributes'])&&(_0x4305c8['attributes']=_0x3e3b36,_0x753208=!0x0),!_0x753208)return Promise['resolve']();if(_0x5ee736['fire']('commentUpdated'),_0x21d6ec||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x550a3f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x42e905}=this['getCommentThread'](_0x4305c8['threadId']),_0x15ca52=_0x550a3f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x42e905,'threadId':_0x43deb1,'commentId':_0x3742a0,'content':_0x387c9a,'attributes':_0x3e3b36})['then'](()=>_0x550a3f['remove'](_0x15ca52))['catch'](_0x467b41=>{throw console['error'](_0x467b41),new _0x59fadc('commentsrepository-update-comment-internal-error',this);});}_removeComment({threadId:_0x51eb38,commentId:_0x34601b,isFromAdapter:_0xf884df}){const _0x59b97d=this['getCommentThread'](_0x51eb38),_0x5c0484=_0x59b97d['getComment'](_0x34601b);if(!_0x5c0484)throw new _0x59fadc('commentsrepository-remove-missing-comment',this);if(_0x59b97d['_remove'](_0x5c0484),_0xf884df||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xd0f215=this['context']['plugins']['get']('PendingActions'),{channelId:_0x33608f}=_0x59b97d,_0x1f33b9=_0xd0f215['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x33608f,'threadId':_0x51eb38,'commentId':_0x34601b})['then'](()=>_0xd0f215['remove'](_0x1f33b9))['catch'](_0x325fd0=>{throw console['error'](_0x325fd0),new _0x59fadc('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];_isAttached;_isSubmitted;comments;_repository;constructor(_0x4c5cf7,_0x3305c6){super();const _0x14e006=_0x3305c6['isResolvable'];this['channelId']=_0x3305c6['channelId'],this['id']=_0x3305c6['id'],this['comments']=new _0xeae5cd(),this['_repository']=_0x4c5cf7,this['_isAttached']=!0x1,this['_isSubmitted']=_0x3305c6['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4c5cf7,'_permissions',_0x4c5cf7,'_readOnlyChannels',()=>_0x4c5cf7['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4c5cf7,'_permissions',()=>_0x4c5cf7['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4c5cf7,'_permissions',()=>{const _0x22336e=_0x4c5cf7['getPermissions'](this['channelId']);return _0x22336e['write']||_0x22336e['admin'];}),this['bind']('isResolvable')['to'](_0x4c5cf7,'_permissions',()=>_0x14e006&&_0x4c5cf7['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x3305c6['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x38ad97,_0x22a47b)=>_0x38ad97?_0x22a47b?_0x38ad97<_0x22a47b?_0x38ad97:_0x22a47b:_0x38ad97:_0x22a47b),this['set']('unlinkedAt',_0x3305c6['unlinkedAt']||null),this['set']('resolvedAt',_0x3305c6['resolvedAt']||null),this['set']('resolvedBy',_0x3305c6['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x391a63=>!!_0x391a63),this['set']('attributes',_0x3305c6['attributes']||{});}get weight(){return Array['from'](this['comments'])['reduce']((_0x1b3eea,_0x5d4fdc)=>_0x1b3eea+_0x5d4fdc['weight'],0x0);}get length(){return this['comments']['length'];}get isAttached(){return this['_isAttached'];}get isSubmitted(){return this['_isSubmitted'];}submit(){const {channelId:_0xbed12d,id:_0x1dad2b}=this;this['_repository']['fire'](ai('submitCommentThread',_0xbed12d),{'channelId':_0xbed12d,'threadId':_0x1dad2b});}setUnlinkedAt(_0x13c574){this['_update']({'unlinkedAt':_0x13c574});}['resolve']({resolvedAt:_0x868784=new Date(),resolvedBy:_0x492619='',isFromAdapter:_0x528f49=!0x1}={}){const _0x3ad340=this['_repository']['context']['plugins']['get'](_0x46e177)['me'],{channelId:_0x442932,id:_0x140046}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x442932),{'channelId':_0x442932,'threadId':_0x140046,'resolvedAt':_0x868784,'resolvedBy':_0x492619||_0x3ad340['id'],'isFromAdapter':_0x528f49});}['reopen']({isFromAdapter:_0x2dd53a=!0x1}={}){const {channelId:_0xe51c02,id:_0x2af41a}=this;this['_repository']['fire'](ai('reopenCommentThread',_0xe51c02),{'channelId':_0xe51c02,'threadId':_0x2af41a,'isFromAdapter':_0x2dd53a});}setContext(_0x1f21ac){this['context']||this['_update']({'context':_0x1f21ac});}setAttribute(_0xc0ffea,_0x46763d){const _0x58bbf0=_0x4c34d4(this['attributes']);_0x8c206d(_0x58bbf0,_0xc0ffea,_0x46763d),this['_update']({'attributes':_0x58bbf0});}removeAttribute(_0x21ba21){const _0x5629df=_0x4c34d4(this['attributes']);_0x4feec0(_0x5629df,_0x21ba21),this['_update']({'attributes':_0x5629df});}['remove']({isFromAdapter:_0x5bff4b=!0x1}={}){const {channelId:_0x1eb39f,id:_0x1e9e7c}=this;this['_repository']['fire'](ai('removeCommentThread',_0x1eb39f),{'channelId':_0x1eb39f,'threadId':_0x1e9e7c,'isFromAdapter':_0x5bff4b});}attachTo(_0x39187c){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x39187c});}addComment(_0x7984a4){const {channelId:_0x34f4c6,id:_0x2c6ff9}=this;this['_repository']['fire'](ai('addComment',_0x34f4c6,_0x2c6ff9),Object['assign']({'channelId':_0x34f4c6,'threadId':_0x2c6ff9},_0x7984a4));}getComment(_0x55ac27){if('string'!=typeof _0x55ac27)throw new _0x59fadc('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x55ac27});return this['comments']['get'](_0x55ac27);}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'](_0x3bea5e=>_0x3bea5e['toJSON']()),'attributes':this['attributes']};}['_add'](_0x994a6b){return this['listenTo'](_0x994a6b,'change:authoredAt',()=>{const _0x5e7f1f=this['_findOptimalIndex'](_0x994a6b),_0x3b07d1=this['comments'];_0x5e7f1f-0x1!=_0x3b07d1['getIndex'](_0x994a6b)&&_0x5e7f1f+0x1!=_0x3b07d1['getIndex'](_0x994a6b)&&(this['_remove'](_0x994a6b),this['_add'](_0x994a6b));}),this['comments']['add'](_0x994a6b,this['_findOptimalIndex'](_0x994a6b));}_update(_0x10ebf8){const {channelId:_0x47a533,id:_0x50bf52}=this;this['_repository']['fire'](ai('updateCommentThread',_0x47a533),{..._0x10ebf8,'channelId':_0x47a533,'threadId':_0x50bf52});}['_remove'](_0x253923){return this['stopListening'](_0x253923),_0x253923['destroy'](),this['comments']['remove'](_0x253923);}_findOptimalIndex(_0x1d3e33){const _0x3d1396=this['comments']['find'](_0x26edc0=>new Date(_0x26edc0['authoredAt'])['getTime']()>new Date(_0x1d3e33['authoredAt'])['getTime']());return _0x3d1396?this['comments']['getIndex'](_0x3d1396):this['length'];}},hi=class extends ni{['id'];threadId;author;creator;createdAt;_repository;constructor(_0x26c0cd,_0xb7c449){super();const _0x38a3c0=_0x26c0cd['context']['plugins']['get'](_0x46e177)['me'],_0xaef80a=_0x26c0cd['getCommentThread'](_0xb7c449['threadId']),_0x3f48ca=0x0===_0xaef80a['comments']['length'],_0x27f43d=_0x38a3c0===_0xb7c449['author'];this['id']=_0xb7c449['id'],this['threadId']=_0xb7c449['threadId'],this['author']=_0xb7c449['author'],this['creator']=_0xb7c449['creator'],this['set']('content',_0xb7c449['content']),this['createdAt']=_0xb7c449['createdAt']||new Date(),this['set']('authoredAt',_0xb7c449['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xaef80a,'resolvedAt'),this['set']('attributes',_0xb7c449['attributes']||{}),this['bind']('isEditable')['to'](_0x26c0cd,'_permissions',()=>{const _0x574982=_0x26c0cd['getPermissions'](_0xaef80a['channelId'])['write'],_0x4d65a4=_0x26c0cd['getPermissions'](_0xaef80a['channelId'])['modifyAll'];return _0x27f43d&&_0x574982||!_0x27f43d&&_0x4d65a4;}),this['bind']('isRemovable')['to'](_0xaef80a,'isRemovable',_0x26c0cd,'_permissions',_0xa557f7=>{const _0x188001=_0x26c0cd['getPermissions'](_0xaef80a['channelId'])['write'],_0x8a1595=_0x26c0cd['getPermissions'](_0xaef80a['channelId'])['modifyAll'];return _0x27f43d&&_0x188001||_0xa557f7&&_0x3f48ca||!_0x27f43d&&_0x8a1595&&!_0x3f48ca;}),this['bind']('isReadOnly')['to'](_0xaef80a,'isReadOnly'),this['_repository']=_0x26c0cd;}get isExternal(){return Boolean(this['attributes']&&this['attributes']['@external']);}get weight(){return Math['max'](function(_0x55a185){const _0x1dedf2=document['createElement']('div');return _0x1dedf2['innerHTML']=_0x55a185,_0x1dedf2['textContent']['length'];}(this['content']),0xc8);}update(_0x15410b){const {threadId:_0x528617,id:_0x430122}=this;if(!this['_repository']['hasCommentThread'](_0x528617))throw new _0x59fadc('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x449f2c}=this['_repository']['getCommentThread'](_0x528617);this['_repository']['fire'](ai('updateComment',_0x449f2c,_0x528617),{'channelId':_0x449f2c,'threadId':_0x528617,'commentId':_0x430122,..._0x15410b});}setAttribute(_0x261fee,_0x32b115){const _0x3fff49=_0x4c34d4(this['attributes']);_0x8c206d(_0x3fff49,_0x261fee,_0x32b115),this['update']({'attributes':_0x3fff49});}removeAttribute(_0x5da327){const _0x52403b=_0x4c34d4(this['attributes']);_0x4feec0(_0x52403b,_0x5da327),this['update']({'attributes':_0x52403b});}['remove'](_0x8aa851={}){if(!_0x8aa851['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x489293,id:_0xbc600e}=this;if(!this['_repository']['hasCommentThread'](_0x489293))throw new _0x59fadc('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xfafd3e}=this['_repository']['getCommentThread'](_0x489293);this['_repository']['fire'](ai('removeComment',_0xfafd3e,_0x489293),{'channelId':_0xfafd3e,'threadId':_0x489293,'commentId':_0xbc600e,..._0x8aa851});}toJSON(){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}destroy(){this['stopListening']();}};function ai(_0x46f2b5,..._0x245125){for(const _0x2d05c8 of _0x245125)void 0x0!==_0x2d05c8&&(_0x46f2b5+=':'+String(_0x2d05c8));return _0x46f2b5;}var ci=class extends _0x254461{constructor(_0x2b54a9){super(_0x2b54a9),this['set']('hasContent',!0x1);}['refresh'](){const _0x368cbf=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5e2e5e of _0x368cbf['getRanges']())if(this['_hasContent'](_0x5e2e5e))return void(this['hasContent']=!0x0);}execute({threadId:_0x39027c=_0x144583(),ranges:_0x12de7e,comment:_0x8fc196}={}){const _0x2be287=this['editor']['model'],_0x201e9a=_0x12de7e??Array['from'](_0x2be287['document']['selection']['getRanges']()),_0x507e08=[];for(const _0x5657be of _0x201e9a)this['_hasContent'](_0x5657be)&&_0x507e08['push'](this['_trimToContent'](_0x5657be));if(!_0x507e08['length'])throw new _0x59fadc('addcommentthreadcommand-incorrect-ranges',null);_0x8fc196&&this['_createCommentThread'](_0x39027c,_0x8fc196),this['_createMarkersFromRanges'](_0x39027c,_0x507e08,!!_0x8fc196);}_createMarkersFromRanges(_0x532025,_0x12d173,_0x1778fa){this['editor']['model']['change'](_0x335950=>{for(const _0x406ca7 of _0x12d173){const _0x389965='comment:'+_0x532025+':'+_0x144583()['substr'](0x1,0x5);_0x335950['addMarker'](_0x389965,{'range':_0x406ca7,'usingOperation':_0x1778fa,'affectsData':_0x1778fa});}});}_createCommentThread(_0x284a1c,_0xc95409){const _0x1406c3=this['editor']['plugins']['get']('CommentsRepository'),_0x18a5ea=this['editor']['config']['get']('collaboration.channelId'),_0x55df5a=this['editor']['plugins']['get']('Users')['me'];if(!_0x55df5a)throw new _0x59fadc('addcommentthreadcommand-user-not-found',null);_0x1406c3['addCommentThread']({'threadId':_0x284a1c,'channelId':_0x18a5ea,'comments':[{'authorId':_0x55df5a['id'],'content':_0xc95409,'createdAt':new Date(),'attributes':{}}]});}_hasContent(_0x2169fc){for(const _0x8afbc of _0x2169fc['getItems']())if(this['_itemIsContent'](_0x8afbc))return!0x0;return!0x1;}_itemIsContent(_0x41ec94){return _0x41ec94['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x41ec94)&&!_0x41ec94['is']('element','tableCell');}_trimToContent(_0x154610){const _0x19cd40=_0x4b5c31=>!this['_itemIsContent'](_0x4b5c31['item']),_0x17f726=_0x154610['start']['getLastMatchingPosition'](_0x19cd40),_0x1b51c4=_0x154610['end']['getLastMatchingPosition'](_0x19cd40,{'direction':'backward'});return this['editor']['model']['createRange'](_0x17f726,_0x1b51c4);}},di=class extends _0x36d238{_dataCollectors;_editorAnnotations;static get requires(){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1013aa){super(_0x1013aa),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}init(){const _0x2f6ea5=this['editor'],_0x4169d7=_0x2f6ea5['model']['document']['selection'],_0x37c25d=_0xd4e18c(()=>this['refreshSelectedViews'](),0xa);_0x4169d7['on']('change:range',(_0x2a17cb,_0x51378a)=>{_0x51378a['directChange']&&(_0x37c25d['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2f6ea5['editing']['view']['document'],'change:isFocused',(_0x5b7fb3,_0x35d802,_0x301dc9)=>{_0x301dc9&&_0x37c25d();}),this['listenTo'](_0x2f6ea5['ui']['focusTracker'],'change:isFocused',(_0x447b35,_0x234966,_0x25eaf0)=>{_0x25eaf0||this['fire']('blur',{'isAnnotationTracked':_0x44df6a=>this['_editorAnnotationsData']['has'](_0x44df6a['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}registerAnnotation(_0xce5702){if(this['_editorAnnotations']['has'](_0xce5702['view']))return;this['_editorAnnotations']['add'](_0xce5702['view']),this['editor']['ui']['focusTracker']['add'](_0xce5702['view']['element']);const _0xa3592c=this['editor']['plugins']['get'](ti);this['listenTo'](_0xa3592c['collection'],'remove',(_0x1a2735,_0x3ba7cf)=>{this['editor']['ui']['focusTracker']['remove'](_0x3ba7cf['view']['element']),this['_editorAnnotations']['delete'](_0x3ba7cf['view']);});}hasDomSelection(){return this['editor']['editing']['view']['hasDomSelection'];}addSourceCollector(_0x4fa3f6){if('function'!=typeof _0x4fa3f6)throw new _0x59fadc('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4fa3f6);}refreshSelectedViews(){this['fire']('refresh');}getOrderedSelectedAnnotations({activeAnnotation:_0x17abd1,annotations:_0xcd79b2}){const _0x58c45b=[],_0x5b22d5=this['editor']['model']['document']['selection'],_0xda02e1=Array['from'](_0x5b22d5['getRanges']());for(const [_0x40098e,_0x199566]of this['_editorAnnotationsData']){const _0x59aeca=_0x8e28b4(_0x199566),_0x5e2594=_0xcd79b2['getByInnerView'](_0x40098e);_0x59aeca&&_0x5e2594&&_0x58c45b['push']({'annotation':_0x5e2594,'range':_0x59aeca});}function _0x8e28b4(_0x2aec56){for(const _0x10c0a5 of _0x2aec56)for(const _0x5e8fd9 of _0xda02e1)if(_0x10c0a5['containsRange'](_0x5e8fd9,!_0x5b22d5['isCollapsed']))return _0x10c0a5;return null;}const _0x1fb696=new Map(Array['from'](_0xcd79b2,(_0x481eaf,_0x1befd6)=>[_0x481eaf,_0x1befd6]));return _0x58c45b['sort']((_0x3fe0cd,_0x1426af)=>{const _0x57b892=_0x3fe0cd['range'],_0x334162=_0x1426af['range'];if(!_0x57b892['isEqual'](_0x334162)){if(_0x57b892['containsRange'](_0x334162,!0x0))return 0x1;if(_0x334162['containsRange'](_0x57b892,!0x0))return-0x1;}return _0x3fe0cd['annotation']==_0x17abd1?-0x1:_0x1426af['annotation']==_0x17abd1?0x1:(_0x1fb696['get'](_0x3fe0cd['annotation'])??0x0)-(_0x1fb696['get'](_0x1426af['annotation'])??0x0);})['map'](_0x2c85df=>_0x2c85df['annotation']);}get _editorAnnotationsData(){const _0x3510c4=new Map();for(const _0x58945e of Array['from'](this['_dataCollectors']))for(const [_0x581218,_0x509557]of _0x58945e())_0x3510c4['set'](_0x581218,_0x509557);return _0x3510c4;}},li=class extends _0x36d238{afterInit(){const _0x51ad1a=this['editor'];_0x51ad1a['plugins']['has']('RestrictedEditingModeEditing')&&_0x51ad1a['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x36d238{constructor(_0xf21fc8){super(_0xf21fc8),this['editor']['config']['define']('importWord.formatting.comments','basic');}afterInit(){const _0x9b75d5=this['editor'],_0x21f11f=_0x9b75d5['commands']['get']('importWord'),_0x21bf46=_0x9b75d5['plugins']['get'](_0x46e177);_0x21f11f&&(_0x21f11f['on']('execute',(_0x422a38,[,_0x147bcd])=>{_0x147bcd['collaboration_features']={'comments':!0x0,'user_id':_0x21bf46['me']['id']};},{'priority':_0x130a0b['high']+0xa}),this['listenTo'](_0x21f11f,'dataInsert',this['_handleImportedData']));}_handleImportedData(_0xbf9465,_0x344ebd){const {comment_threads:_0x8f230b}=_0x344ebd;_0x8f230b&&_0x8f230b['forEach'](({thread_id:_0x3eb6ea,comments:_0x211bf9,is_resolved:_0x3063b7})=>{const _0x548d32=new Date(),_0xdcc23e=_0x211bf9['map'](({author:_0x32a1e6,content:_0x3c3bef,created_at:_0x1a71d5})=>({'content':_0x3c3bef,'authorId':this['editor']['plugins']['get'](_0x46e177)['me']['id'],'createdAt':_0x548d32,'attributes':{'@external':{'authorName':_0x32a1e6,'createdAt':_0x1a71d5?new Date(_0x1a71d5):new Date(),'source':'importWord'}}})),_0x1c6f4d=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x1c6f4d,'threadId':_0x3eb6ea,'comments':_0xdcc23e,'resolvedAt':_0x3063b7?_0x548d32:null});});}},ui=class extends _0x36d238{constructor(_0xe40d24){super(_0xe40d24),this['editor']['config']['define']('comments.copyMarkers','default');}static get requires(){return[pt,wt];}afterInit(){const _0x1c5f82=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1c5f82,'contentInsertion',(_0x340ba7,_0x2fc2c7)=>this['_removeMarkersWithoutThreads'](_0x2fc2c7['content']['markers']),{'priority':'highest'});}_removeMarkersWithoutThreads(_0x5ab4e8){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5ab4e8;const _0x185983=this['editor']['plugins']['get']('CommentsRepository');for(const _0x455e7c of _0x5ab4e8['keys']()){const [_0x7c8b07,_0x4db7c1]=_0x455e7c['split'](':');'comment'!=_0x7c8b07||_0x185983['hasCommentThread'](_0x4db7c1)||_0x5ab4e8['delete'](_0x455e7c);}return _0x5ab4e8;}_registerMarkerInClipboardPipeline(){const _0x101ce2=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x12602a=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x12602a&&_0x101ce2['_registerMarkerToCopy']('comment',_0x12602a);}_mapCommentsCopyConfigToRegisterConfiguration(_0xbd82b5){switch(_0xbd82b5){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x3977dd){const _0x1b4e3a=_0x3977dd['split'](':');return{'group':_0x1b4e3a[0x0],'id':_0x1b4e3a[0x1],'part':_0x1b4e3a[0x2]};}var pi=class extends _0x36d238{init(){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}overrideMarkerConverters(){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x476697,_0x359be4)=>{if(!_0x359be4['options']['showCommentHighlights'])return null;if(_0x359be4['options']['ignoreResolvedComments']){const {id:_0x1e6aa2}=fi(_0x476697['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1e6aa2)?.['isResolved']&&_0x476697['item'])return _0x359be4['consumable']['consume'](_0x476697['item'],'addMarker:'+_0x476697['markerName']),_0x359be4['consumable']['consume'](_0x476697['item'],'removeMarker:'+_0x476697['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5e3c1b=>{_0x5e3c1b['on']('addMarker:comment',(_0x463c7c,_0x5142a1,_0x3ea732)=>{if(!_0x3ea732['options']['showCommentHighlights'])return;const _0x79ff8f=_0x5142a1['item'];if(!_0x79ff8f)return;const _0x2c8871=_0x3ea732['mapper']['toViewElement'](_0x79ff8f);this['editor']['model']['schema']['isObject'](_0x79ff8f)&&_0x2c8871&&!_0x2c8871['getCustomProperty']('widget')&&_0x2c8871['is']('containerElement')&&Ct(_0x2c8871,_0x3ea732['writer']);},{'priority':'high'});});}overrideHorizontalRuleConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5e42c1,{writer:_0x4319c8,options:_0x1a2fa7})=>{if(!_0x1a2fa7['showCommentHighlights'])return null;const _0x4fd349=_0x4319c8['createContainerElement']('div'),_0x42ffea=_0x4319c8['createEmptyElement']('hr');return _0x4319c8['addClass']('ck-horizontal-line',_0x4fd349),_0x4319c8['insert'](_0x4319c8['createPositionAt'](_0x4fd349,0x0),_0x42ffea),_0x4fd349;},'converterPriority':'high'});}overrideImageInlineConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2fb1f4,{writer:_0x317c52,options:_0x2716cd})=>{if(!_0x2716cd['showCommentHighlights'])return null;const _0xccb704=_0x317c52['createContainerElement']('span'),_0x55fc92=_0x317c52['createEmptyElement']('img');return _0x317c52['addClass']('image-inline',_0xccb704),_0x317c52['insert'](_0x317c52['createPositionAt'](_0xccb704,0x0),_0x55fc92),_0xccb704;},'converterPriority':'high'});}overrideMediaEmbedConverter(){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5bef04,{writer:_0x40734e,options:_0x42c741})=>{if(_0x42c741['showCommentHighlights'])return _0x40734e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2fc58d,_0x20d289,_0x475d5a)=>{_0x475d5a['options']['showCommentHighlights']&&_0x2fc58d['stop']();},{'priority':'high'});}},wi=class extends _0x36d238{static get requires(){return[oi,di,_0x46e177,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x331218){super(_0x331218),this['set']('isThreadsLoadingPaused',!0x0),_0x331218['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2bbeec,_0x271f7f,_0x538062,_0x37f4a9)=>{const _0x251abe=_0x331218['plugins']['get'](oi),_0x4c6220=_0x538062?fi(_0x538062)['id']:null;_0x331218['model']['change'](()=>{if(_0x4c6220){const _0x3c4700=this['getAllMarkersForId'](_0x4c6220);for(const _0x1e0e26 of _0x3c4700)_0x331218['editing']['reconvertMarker'](_0x1e0e26);}if(_0x37f4a9){const {id:_0x24d1f2}=fi(_0x37f4a9),_0x30a4d9=_0x251abe['getCommentThread'](_0x24d1f2);if(_0x30a4d9&&_0x30a4d9['unlinkedAt'])return;if(_0x30a4d9&&!_0x30a4d9['isAttached'])return;const _0x15e80c=this['getAllMarkersForId'](_0x24d1f2);for(const _0x3e284e of _0x15e80c)_0x331218['editing']['reconvertMarker'](_0x3e284e);}}),_0x4c6220&&this['scrollToThreadMarker'](_0x4c6220);}),this['_initAriaMarkerChangeAnnouncements']();}init(){const _0x46ed1c=this['editor'],_0xfdec3f=_0x46ed1c['plugins']['get'](oi),_0x55447e=_0x46ed1c['config']['get']('collaboration.channelId'),_0x5295b2=_0xfdec3f['getCommentThreads']()['filter'](_0x20f364=>_0x20f364['channelId']!==_0x55447e);_0x46ed1c['commands']['add']('addCommentThread',new ci(_0x46ed1c)),this['listenTo'](_0x46ed1c,'change:isReadOnly',(_0x1de9e9,_0xfd42c3,_0x2a21ab)=>{_0xfdec3f['switchReadOnly'](_0x2a21ab,_0x46ed1c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xfdec3f,gi('addCommentThread',_0x55447e),(_0x11c2a6,{threadId:_0x2ba799})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x2ba799)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2ba799);}),this['listenTo'](_0xfdec3f,gi('removeCommentThread',_0x55447e),(_0xa65a54,{threadId:_0x154958})=>{_0x46ed1c['model']['enqueueChange']({'isUndoable':!0x1},_0x4b1162=>{const _0x3d990d=this['getAllMarkersForId'](_0x154958);for(const _0x183d72 of _0x3d990d)_0x4b1162['removeMarker'](_0x183d72);});}),this['listenTo'](_0xfdec3f,gi('resolveCommentThread',_0x55447e),(_0x27bc1c,{threadId:_0x1f3126})=>{this['_reconvertMarkers'](_0x1f3126);const _0x2c0118=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x2c0118['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x1f3126)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xfdec3f,gi('reopenCommentThread',_0x55447e),(_0x50de4a,{threadId:_0x230525})=>{this['_reconvertMarkers'](_0x230525);},{'priority':'low'}),this['listenTo'](_0xfdec3f,gi('addComment',_0x55447e),(_0x17cc46,{threadId:_0x10f4d0,isFromAdapter:_0x84ecc})=>{const _0x3b60ba=this['getAllMarkersForId'](_0x10f4d0);!_0x84ecc&&0x0!=_0x3b60ba['length']&&_0xfdec3f['hasCommentThread'](_0x10f4d0)&&0x1===_0xfdec3f['getCommentThread'](_0x10f4d0)['length']&&_0x46ed1c['model']['enqueueChange']({'isUndoable':!0x1},_0x1a998d=>{for(const _0x4db0cc of _0x3b60ba)_0x1a998d['updateMarker'](_0x4db0cc,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5295b2);}afterInit(){!async function(_0x53f7c1){const _0x5a084c='mr4z2yakM3x0phtD7jBw1T6qRfeUuZcOLNKVgQSPE9iGIHoXlJW8YsCb5AndFv',_0x314196=0x79470,_0x25f063={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'};async function _0x5bbc2c(_0x253243){const _0x162434=new window['Promise'](_0x498611=>{_0x253243['once']('ready',_0x498611);}),_0x56b695=window['Date']['now'](),_0x38e1b5=_0x253243['config']['get']('licenseKey');async function _0x1ce4ad(){let _0xefdaf3,_0x1c7ccf=null,_0x2eaf91=null;try{return'GPL'==_0x38e1b5?'NotAllowed':(_0xefdaf3=_0x18b4d1(),_0xefdaf3?(_0xefdaf3['usageEndpoint']&&(_0x2eaf91=_0x196a2e(_0xefdaf3['usageEndpoint'],_0xefdaf3['jti'])),await _0x1d0d7f()?_0x173213()?_0x6d78bb()?'Expired':_0x5afcab()?('evaluation'==_0xefdaf3['licenseType']&&(_0x1c7ccf=_0x32e093('EvaluationLimit')),await _0xb367a4()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x6d78bb(){const _0x2a60fd=['evaluation','trial']['includes'](_0xefdaf3['licenseType'])?_0x56b695/0x3e8:0xe10*_0x314196;return _0xefdaf3['exp']<_0x2a60fd;}function _0x173213(){const _0x32f50a=_0xefdaf3['features'];if(!_0x32f50a)return!0x1;if(_0x32f50a['includes']('*'))return!0x0;if(_0x32f50a['includes']('CMT'))return!0x0;if(_0x32f50a['includes']('TRILIUM')&&_0xf92540())return!0x0;if(_0x32f50a['includes']('RCMT')){if(_0xb207b6())return!0x0;if(_0x414ede()||_0x30485b())return!0x0;}return!0x1;}function _0x5afcab(){const _0x3acc27=_0xefdaf3['licensedHosts'];if(!_0x3acc27||0x0==_0x3acc27['length'])return!0x0;const {hostname:_0x5ae5cc}=new URL(window['location']['href']);if(_0x3acc27['includes'](_0x5ae5cc))return!0x0;const _0x1976bd=_0x5ae5cc['split']('.');return _0x3acc27['filter'](_0x1f7093=>_0x1f7093['includes']('*'))['map'](_0x50a91b=>_0x50a91b['split']('.'))['filter'](_0x44227e=>_0x44227e['length']<=_0x1976bd['length'])['map'](_0x40cdb8=>Array(_0x1976bd['length']-_0x40cdb8['length'])['fill']('*'===_0x40cdb8[0x0]?'*':'')['concat'](_0x40cdb8))['some'](_0x5aaf1f=>_0x1976bd['every']((_0x5cabdd,_0x5845fb)=>_0x5aaf1f[_0x5845fb]===_0x5cabdd||'*'===_0x5aaf1f[_0x5845fb]));}function _0xb367a4(){return _0x1c7ccf&&_0x2eaf91?new window['Promise']((_0x5bfeb8,_0x70cdef)=>{_0x1c7ccf['then'](_0x5bfeb8,_0x70cdef),_0x2eaf91['then'](_0x15bf6b=>{'Valid'!=_0x15bf6b&&_0x5bfeb8(_0x15bf6b);},_0x70cdef);}):_0x1c7ccf||_0x2eaf91||'Valid';}}function _0x196a2e(_0xc313b0,_0x3fdcde){return new window['Promise'](_0x281c86=>{if(_0x346e66())return _0x281c86('Valid');_0x10a245(),_0x253243['decorate']('_sendUsageRequest');let _0x36700f=!0x1;const _0x5eeefe=_0x144583();function _0x4083cd(_0x5576b6){return!!_0x5576b6&&('object'==typeof _0x5576b6||'function'==typeof _0x5576b6)&&'function'==typeof _0x5576b6['then']&&'function'==typeof _0x5576b6['catch'];}function _0x476f92(_0x544e13){_0x23c9db(_0x544e13)['then'](_0x6570c2=>_0x6570c2&&'ok'==_0x6570c2['status']?_0x42f4a5(_0x1a002f(_0x5eeefe+_0x3fdcde))!=_0x6570c2['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x4fdda5=>(_0xb775c4(),_0x4fdda5),()=>{const _0x5e428f=_0x5179f7();return null==_0x5e428f?(_0xb775c4(),'Valid'):_0x56b695-_0x5e428f>0x240c8400?'UsageLimit':'Valid';})['then'](_0x281c86)['catch'](()=>{_0x281c86('UsageLimit');});const _0x172ee2=0x36ee80;function _0xb775c4(){const _0x428207='llct-'+_0x42f4a5(_0x1a002f(_0xc313b0)),_0xd968d8=_0x6de1a1(_0x42f4a5(window['Math']['ceil'](_0x56b695/_0x172ee2)));window['localStorage']['setItem'](_0x428207,_0xd968d8);}function _0x5179f7(){const _0xa5fe3e='llct-'+_0x42f4a5(_0x1a002f(_0xc313b0)),_0x3f93e5=window['localStorage']['getItem'](_0xa5fe3e);return _0x3f93e5?window['parseInt'](_0x6de1a1(_0x3f93e5),0x10)*_0x172ee2:null;}function _0x23c9db(_0x44f6ce){return new window['Promise']((_0x4c6479,_0x4b8fcc)=>{_0x44f6ce['then'](_0x4c6479,_0x4b8fcc),window['setTimeout'](_0x4b8fcc,0x1d4c0);});}}_0x253243['on']('_sendUsageRequest',(_0x1c6bf2,_0x591f01)=>{if(_0x591f01[0x0]!=_0xc313b0)return _0x281c86('UsageLimit');_0x591f01[0x1]={..._0x591f01[0x1],'requestId':_0x5eeefe};},{'priority':'high'}),_0x253243['on']('_sendUsageRequest',_0x577dec=>{_0x4083cd(_0x577dec['return'])&&(_0x36700f=!0x0,_0x476f92(_0x577dec['return']));},{'priority':'low'}),_0x162434['then'](()=>{_0x36700f||_0x281c86('UsageLimit');});});function _0x346e66(){return'auto'==_0x253243['editing']['view']['_overlayModeHint'];}function _0x10a245(){_0x253243['editing']['view']['_overlayModeHint']='auto';}}function _0x32e093(_0x14fa5d){const _0x5d6fe6=[new window['Promise'](_0x4315b4=>setTimeout(_0x4315b4,0x93ecc)),_0x162434['then'](()=>new window['Promise'](_0xd16b0f=>{let _0x3c240b=0x0;_0x253243['model']['on']('applyOperation',(_0x4bc488,_0x1b555d)=>{_0x1b555d[0x0]['isDocumentOperation']&&_0x3c240b++,0x5e8==_0x3c240b&&(_0xd16b0f(),_0x4bc488['off']());});}))];return window['Promise']['race'](_0x5d6fe6)['then'](()=>_0x14fa5d);}async function _0x3c70fd(){await _0x162434,_0x253243['model']['change']=_0x228139,_0x253243['model']['enqueueChange']=_0x228139,_0x253243['enableReadOnlyMode']('model');}function _0xf92540(){return window['glob']&&window['glob']['triliumVersion'];}function _0xb207b6(){return _0x2903c9('WebSocketGateway')&&'connected'==_0x340431('WebSocketGateway')['state'];}function _0x414ede(){return _0x2903c9('RevisionViewerIntegration');}function _0x30485b(){return _0x2903c9('TrackChangesDataGetter');}function _0x273c29(_0x16c0ea){const _0xd9a922=_0x563fdf();_0x253243[_0xd9a922]='commentsLicenseKey'+_0x16c0ea,'Valid'!=_0x16c0ea&&_0x3c70fd();}function _0x563fdf(){const _0x143784=window['String'](window['performance']['now']())['replace']('.','');let _0xc23692='m';for(let _0x3dd13b=0x0;_0x3dd13b<_0x143784['length'];_0x3dd13b+=0x2){let _0x4042da=window['parseInt'](_0x143784['substring'](_0x3dd13b,_0x3dd13b+0x2));_0x4042da>=0x3e&&(_0x4042da-=0x3e),_0xc23692+=_0x5a084c[_0x4042da];}return _0xc23692;}function _0x18b4d1(){const _0x5d60be=_0x38e1b5['split']('.');if(0x3!=_0x5d60be['length'])return null;return _0x194073(_0x5d60be[0x1]);function _0x194073(_0x149249){const _0x4b83c9=_0x4ff6c3(_0x149249);return _0x4b83c9&&_0x534b62()?_0x4b83c9:null;function _0x534b62(){const _0xad32f9=_0x4b83c9['jti'],_0x272401=window['parseInt'](_0xad32f9['substring'](_0xad32f9['length']-0x8),0x10),_0x43bc5a={..._0x4b83c9,'jti':_0xad32f9['substring'](0x0,_0xad32f9['length']-0x8)};return delete _0x43bc5a['vc'],_0x1a002f(_0x43bc5a)==_0x272401;}}}async function _0x1d0d7f(){let _0x26d71d=!0x0;try{const [_0x2738cb,_0x536ab8,_0x3d9966]=_0x38e1b5['split']('.');return _0x29f972(_0x2738cb),await _0x238abe(_0x2738cb,_0x536ab8,_0x3d9966),_0x26d71d;}catch{return!0x1;}function _0x29f972(_0x125315){const _0x482cb8=_0x4ff6c3(_0x125315);_0x482cb8&&'ES256'==_0x482cb8['alg']||(_0x26d71d=!0x1);}async function _0x238abe(_0x1af640,_0x1f0a92,_0x1317ae){const _0x25fed7=window['Uint8Array']['from'](_0x3a8e31(_0x1317ae),_0x183fa0=>_0x183fa0['charCodeAt'](0x0)),_0x379272=new window['TextEncoder']()['encode'](_0x1af640+'.'+_0x1f0a92),_0x4d4059=window['crypto']['subtle'];if(!_0x4d4059)return;const _0x3e8064=await _0x4d4059['importKey']('jwk',_0x25f063,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x4d4059['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x3e8064,_0x25fed7,_0x379272)||(_0x26d71d=!0x1);}}function _0x4ff6c3(_0x45e4fc){return _0x45e4fc['startsWith']('ey')?JSON['parse'](_0x3a8e31(_0x45e4fc)):null;}function _0x3a8e31(_0x54012e){return window['atob'](_0x54012e['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x1a002f(_0x3ea5c5){let _0x8272e7=0x1505;function _0x2016a5(_0x3f73a6){for(let _0x56b947=0x0;_0x56b947<_0x3f73a6['length'];_0x56b947++){const _0x480748=_0x3f73a6['charCodeAt'](_0x56b947);_0x8272e7=(_0x8272e7<<0x5)+_0x8272e7+_0x480748,_0x8272e7&=_0x8272e7;}}function _0x525c66(_0xa7f484){Array['isArray'](_0xa7f484)?_0xa7f484['forEach'](_0x525c66):_0xa7f484&&'object'==typeof _0xa7f484?Object['entries'](_0xa7f484)['sort']()['forEach'](([_0x817c5e,_0x296492])=>{_0x2016a5(_0x817c5e),_0x525c66(_0x296492);}):_0x2016a5(window['String'](_0xa7f484));}return _0x525c66(_0x3ea5c5),_0x8272e7>>>0x0;}function _0x42f4a5(_0x144487){return _0x144487['toString'](0x10)['padStart'](0x8,'0');}function _0x6de1a1(_0x12c3ba){return _0x12c3ba['split']('')['reverse']()['join']('');}function _0x2903c9(_0x3d76da){return _0x253243['plugins']['has'](_0x3d76da);}function _0x340431(_0x12abcc){return _0x253243['plugins']['get'](_0x12abcc);}function _0x228139(){}_0x273c29(await _0x1ce4ad());}_0x5bbc2c(_0x53f7c1['editor']);}(this);}destroy(){const _0x395693=this['editor']['plugins']['get'](oi),_0x5934db=this['editor']['config']['get']('collaboration.channelId');for(const _0x159cd9 of _0x395693['getCommentThreads']({'channelId':_0x5934db}))_0x395693['_detachCommentThread'](_0x159cd9['id']),_0x395693['_threads']['delete'](_0x159cd9['id']);super['destroy']();}['hasMarkerForId'](_0x4dd7b4){return this['getAllMarkersForId'](_0x4dd7b4)['length']>0x0;}getAllMarkersForId(_0x1fa15c){const _0x1b652d=[];for(const _0x2e8bee of this['editor']['model']['markers'])_0x2e8bee['name']['startsWith']('comment:'+_0x1fa15c)&&_0x1b652d['push'](_0x2e8bee);return _0x1b652d;}['scrollToThreadMarker'](_0xb107aa){setTimeout(()=>{const _0x4e4660=this['_getTargetForId'](_0xb107aa);_0x4e4660&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0xb107aa&&_0x3dd6c4({'target':_0x4e4660[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}_reconvertMarkers(_0x1840d9){this['editor']['model']['change'](()=>{for(const _0x52749f of this['getAllMarkersForId'](_0x1840d9))this['editor']['editing']['reconvertMarker'](_0x52749f);});}_attachArchivedThread(_0x998f5a){const _0x3bd0cf=this['editor']['plugins']['get'](oi),_0x34d32f=this['editor']['plugins']['get'](di),_0x2d8558=_0x3bd0cf['getCommentThread'](_0x998f5a);if(!_0x2d8558['isAttached']){const _0x23379d=_0x2d8558['attachTo'](()=>this['_getTargetForId'](_0x2d8558['id']));_0x34d32f['registerAnnotation'](_0x23379d),_0x2d8558['_hasTargetInContent']=!0x1;}}_initializeMarkerConverters(){const _0x180b4c=this['editor'],_0x108459=_0x180b4c['plugins']['get'](_0x46e177);_0x180b4c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x58ccf8,_0x588e50)=>{const {id:_0x245d79}=fi(_0x58ccf8['markerName']),_0xa250bb=_0x180b4c['plugins']['get'](oi)['getCommentThread'](_0x245d79),_0x28b276=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x245d79;let _0x351df8;if(_0xa250bb&&_0xa250bb['isResolved']&&!_0x28b276&&_0x58ccf8['item'])return _0x588e50['consumable']['consume'](_0x58ccf8['item'],'addMarker:'+_0x58ccf8['markerName']),_0x588e50['consumable']['consume'](_0x58ccf8['item'],'removeMarker:'+_0x58ccf8['markerName']),null;const _0x55eac3=['ck-comment-marker'];return _0x28b276&&_0x55eac3['push']('ck-comment-marker--active'),_0x351df8=_0xa250bb?.['length']?_0xa250bb['comments']['first']['author']['id']:_0x108459['me']['id'],{'classes':_0x55eac3,'attributes':{'data-comment':_0x245d79,'data-author-id':_0x351df8}};}}),_0x180b4c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2ea714,{options:_0x1d67af})=>{if(_0x1d67af['showCommentHighlights'])return null;const _0xad6fe3=_0x180b4c['plugins']['get'](oi),_0x1adba4=_0x180b4c['model']['markers']['get'](_0x2ea714),{id:_0x68c8ad,part:_0xeca8a0}=fi(_0x2ea714);return _0x1adba4&&!_0x1adba4['affectsData']||_0x1d67af['ignoreResolvedComments']&&_0xad6fe3['getCommentThread'](_0x68c8ad)?.['isResolved']?null:{'group':'comment','name':_0xeca8a0?_0x68c8ad+':'+_0xeca8a0:_0x68c8ad};}}),_0x180b4c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2a5f1a,{writer:_0xd90fc4})=>_0xd90fc4['createElement']('$marker',{'data-name':'comment:'+_0x2a5f1a['getAttribute']('id')})}),_0x180b4c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3f63b5=this['editor'],_0xcf4974=_0x3f63b5['plugins']['get'](oi),_0x549ad0=new Set(),_0xe0d2b7=new Set();_0x3f63b5['model']['document']['registerPostFixer'](_0x4ae8ab=>{let _0x6c46b1=!0x1;for(const {name:_0x2c752a,data:_0x328bc0}of _0x3f63b5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3e5bb4,id:_0x2769d2}=fi(_0x2c752a);let _0x4e6a69=_0x328bc0['newRange'];if('comment'!==_0x3e5bb4||!_0x4e6a69)continue;const _0x3dec51='$graveyard'===_0x4e6a69['root']['rootName'];_0x3dec51||(_0x4e6a69=_i(_0x4e6a69,_0x3f63b5['model']),!_0x4e6a69||_0x4e6a69['isCollapsed']||!_0x328bc0['newRange']||_0x4e6a69['isEqual'](_0x328bc0['newRange']))?_0x3f63b5['model']['hasContent'](_0x4e6a69)&&!_0x3dec51?this['isThreadsLoadingPaused']?_0x549ad0['add'](_0x2c752a):this['_handleThreadMarker'](_0x2c752a,_0x2769d2):(_0xe0d2b7['add'](_0x2c752a),_0x549ad0['delete'](_0x2c752a),_0x4ae8ab['removeMarker'](_0x2c752a),_0x6c46b1=!0x0):(_0x4ae8ab['updateMarker'](_0x2c752a,{'range':_0x4e6a69}),_0x6c46b1=!0x0);}return _0x6c46b1;}),this['on']('change:isThreadsLoadingPaused',(_0x4fcd22,_0x2373b4,_0x1e0dc4)=>{if(!_0x1e0dc4&&_0x549ad0['size'])for(const _0x49c722 of _0x549ad0){const {id:_0xf392c3}=fi(_0x49c722);_0x549ad0['delete'](_0x49c722),_0x3f63b5['model']['markers']['get'](_0x49c722)&&this['_handleThreadMarker'](_0x49c722,_0xf392c3);}}),this['listenTo'](_0x3f63b5['model']['document'],'change',()=>{for(const {name:_0x1a4abc,data:{newRange:_0x4dd63b}}of _0x3f63b5['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5365e2,id:_0xbd1a76}=fi(_0x1a4abc);if('comment'!==_0x5365e2)continue;const _0x1e3db1=_0xcf4974['getCommentThread'](_0xbd1a76),_0x362e1e=this['hasMarkerForId'](_0xbd1a76);_0x1e3db1&&(!_0x1e3db1['_hasTargetInContent']&&_0x4dd63b&&_0x3f63b5['editing']['view']['once']('render',()=>{const _0x1f9466=_0x3f63b5['plugins']['get'](ti),_0x140a9d=_0xcf4974['_threadToController']['get'](_0x1e3db1)['view'];_0x1f9466['getByInnerView'](_0x140a9d)['refreshVisibility']();},{'priority':'low'}),_0x1e3db1['_hasTargetInContent']=_0x362e1e||!!_0x4dd63b),_0x4dd63b||(_0xe0d2b7['add'](_0x1a4abc),_0x549ad0['delete'](_0x1a4abc));}for(const _0x371ef1 of _0xe0d2b7){const {id:_0x258545}=fi(_0x371ef1),_0x5a246c=_0xcf4974['getCommentThread'](_0x258545);if(_0x549ad0['delete'](_0x371ef1),!_0x5a246c)continue;const _0x323eaf=this['hasMarkerForId'](_0x258545);_0x323eaf||_0x5a246c['isSubmitted']?_0x323eaf||_0x5a246c['unlinkedAt']||_0x5a246c['setUnlinkedAt'](new Date()):_0x5a246c['remove']();}_0xe0d2b7['clear']();});}_handleInitialThreads(_0x374229){_0x374229['forEach'](_0x2d8c1b=>{_0x2d8c1b['unlinkedAt']&&this['_attachArchivedThread'](_0x2d8c1b['id']);});}_getTargetForId(_0xdf22fc){const _0x39258a=this['editor'],_0x4728a1=this['getAllMarkersForId'](_0xdf22fc);return _0x3b4bee(_0x39258a['editing'],_0x4728a1);}_getTextContext(_0x2d8c58){const _0x2bc954=this['getAllMarkersForId'](_0x2d8c58);let _0x5d431c='',_0x776e05=!0x1;for(const _0x43ea60 of _0x2bc954){const _0x53b51b=_0x43ea60['getRange']();for(const _0x22d011 of Array['from'](_0x53b51b['getItems']()))_0x22d011['is']('$textProxy')?(_0x5d431c&&_0x776e05&&(_0x5d431c+='\x20',_0x776e05=!0x1),_0x5d431c+=_0x22d011['data']):_0x776e05=!0x0;_0x776e05=!0x0;}return _0x5d431c['substring'](0x0,0x96);}_attachMarkerToThread(_0xf6bd3c,_0x5608ce){const _0x3e4757=this['editor'],_0x9d4e4=_0x3e4757['plugins']['get'](oi);let _0x1c545f=_0x9d4e4['getCommentThread'](_0x5608ce);const _0x2026eb=_0x3e4757['config']['get']('collaboration.channelId'),_0x1428c6=_0x3e4757['plugins']['get'](di);return _0x1c545f&&(_0x1c545f['unlinkedAt']&&_0x1c545f['setUnlinkedAt'](null),_0x1c545f['isAttached'])||(this['getAllMarkersForId'](_0x5608ce)[0x0]['managedUsingOperations']?_0x9d4e4['fetchCommentThread']({'channelId':_0x2026eb,'threadId':_0x5608ce})['then'](_0x308211=>{if('destroyed'!==_0x3e4757['state']){if(_0x1c545f=_0x308211,_0x1c545f&&!_0x1c545f['isAttached']){const _0x32897b=_0x1c545f['attachTo'](()=>this['_getTargetForId'](_0x5608ce));_0x1428c6['registerAnnotation'](_0x32897b),_0x1c545f['isResolved']&&this['_reconvertMarkers'](_0x5608ce);}else{if(!_0x1c545f){const _0x120af6=this['getAllMarkersForId'](_0x5608ce);_0x3e4757['model']['change'](_0x294e06=>{for(const _0x2f27d0 of _0x120af6)_0x294e06['removeMarker'](_0x2f27d0);});}}}}):_0x3e4757['editing']['view']['once']('render',()=>{if(_0x9d4e4['getCommentThread'](_0x5608ce))return;const _0xf20c2d=_0x3e4757['plugins']['get'](ti);_0x1c545f=_0x9d4e4['openNewCommentThread']({'channelId':_0x2026eb,'threadId':_0x5608ce,'target':()=>this['_getTargetForId'](_0x5608ce),'context':{'type':'text','value':this['_getTextContext'](_0x5608ce)}});const _0x36660c=_0x9d4e4['_threadToController']['get'](_0x1c545f)['view'],_0x81bf09=_0xf20c2d['getByInnerView'](_0x36660c);_0x81bf09&&_0x1428c6['registerAnnotation'](_0x81bf09);},{'priority':'low'})),_0x1c545f;}['_handleThreadMarker'](_0x4fae3e,_0x374ff2){const _0x2767e3=this['_attachMarkerToThread'](_0x4fae3e,_0x374ff2);_0x2767e3&&!_0x2767e3['context']&&_0x2767e3['setContext']({'type':'text','value':this['_getTextContext'](_0x374ff2)});}_initAriaMarkerChangeAnnouncements(){const _0x116f88=this['editor'];_0x624c26(_0x116f88['model'],({left:_0x23afba,entered:_0x335072})=>{for(const _0xa76c4b of _0x23afba)if(Ai(_0xa76c4b)){_0x116f88['ui']['ariaLiveAnnouncer']['announce'](Et(_0x116f88['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x160298 of _0x335072)if(Ai(_0x160298)){_0x116f88['ui']['ariaLiveAnnouncer']['announce'](Et(_0x116f88['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x5fe013(_0x235769)));break;}});}};function gi(_0x327be3,_0x5c3360){return _0x5c3360?_0x327be3+':'+_0x5c3360:_0x327be3;}function _i(_0x35370c,_0x54ba5b){const _0xafdad4=_0x54ba5b['schema'],_0x50fbac=_0x54ba5b['createRange'](_0x35370c['start']);for(const _0x190647 of _0x35370c['getWalker']()){const {type:_0xf2d954,item:_0x2c7c5f,nextPosition:_0x4f4238}=_0x190647;if('text'===_0xf2d954||_0xafdad4['isObject'](_0x2c7c5f)){const _0x2618f5=_0x54ba5b['createPositionBefore'](_0x2c7c5f);_0x50fbac['isCollapsed']&&(_0x50fbac['start']=_0x2618f5),_0x50fbac['end']=_0x4f4238;}}return _0x50fbac;}function Ai(_0x42e4c5){return'comment'===fi(_0x42e4c5['name'])['group'];}var vi=class extends _0x36d238{['licenseKey'];_licenseKeyCheckInterval;static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,wi,di,ti];}get CommentsListView(){return Lt;}get CommentThreadInputView(){return xt;}init(){const _0x278304=this['editor'],_0x2e3834=_0x278304['plugins']['get'](oi),_0x4f8eea=_0x278304['plugins']['get'](wi),_0x29b40f=_0x278304['plugins']['get'](ti),_0x1a5ac0=_0x278304['plugins']['get'](di);_0x278304['ui']['componentFactory']['add']('comment',()=>{const _0x3aa3af=this['_createUIButton'](_0x5dc461);return _0x3aa3af['tooltip']=!0x0,_0x3aa3af;}),_0x278304['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x1a5ac0['addSourceCollector'](()=>{const _0x42854e=[];for(const [_0x3a8f26,_0x1f10e3]of _0x2e3834['_threadToController']){const _0x37f49b=_0x4f8eea['getAllMarkersForId'](_0x3a8f26['id']),_0x116ceb=_0x37f49b['map'](_0x3538d2=>_0x3538d2['getRange']());_0x37f49b['length']>0x0&&_0x42854e['push']([_0x1f10e3['view'],_0x116ceb]);}return _0x42854e;}),this['listenTo'](_0x29b40f,'change:activeAnnotations',(_0x42ddd0,_0x5d0e77,_0x22b2eb)=>{const _0x5c2821=Array['from'](_0x22b2eb)['map'](_0x578e1c=>_0x578e1c['innerView'])['find'](_0xbe0d31=>_0x2e3834['_viewToController']['has'](_0xbe0d31));if(!_0x5c2821)return void(_0x4f8eea['activeMarker']=null);const _0x5cffe8=_0x2e3834['_viewToController']['get'](_0x5c2821)['model']['id'],_0x4c44bc='comment:'+_0x5cffe8;_0x5cffe8&&_0x4f8eea['hasMarkerForId'](_0x5cffe8)?_0x4f8eea['activeMarker']=_0x4c44bc:_0x4f8eea['activeMarker']&&(_0x4f8eea['activeMarker']=null);}),this['listenTo'](_0x2e3834,'removeCommentThread',(_0x5ebe89,{threadId:_0x4cf600,isFromAdapter:_0x9cf5fd})=>{!_0x9cf5fd&&_0x278304['ui']['focusTracker']['isFocused']&&_0x4f8eea['hasMarkerForId'](_0x4cf600)&&_0x278304['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2e3834,'addComment',(_0x1140ce,{threadId:_0x2fd390,isFromAdapter:_0x1ea83c})=>{!_0x1ea83c&&_0x4f8eea['hasMarkerForId'](_0x2fd390)&&_0x2e3834['hasCommentThread'](_0x2fd390)&&0x1===_0x2e3834['getCommentThread'](_0x2fd390)['length']&&(_0x278304['editing']['view']['focus'](),_0x1140ce['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{const _0x5571a7=[this['editor']];for(const _0x55577b of _0x5571a7){let _0x56f8fa;for(const _0x383617 in _0x55577b){const _0xf72ed=_0x383617,_0x241190=_0x55577b[_0xf72ed];if('commentsLicenseKeyValid'==_0x241190||'commentsLicenseKeyInvalid'==_0x241190||'commentsLicenseKeyExpired'==_0x241190||'commentsLicenseKeyDomainLimit'==_0x241190||'commentsLicenseKeyNotAllowed'==_0x241190||'commentsLicenseKeyEvaluationLimit'==_0x241190||'commentsLicenseKeyUsageLimit'==_0x241190){delete _0x55577b[_0xf72ed],_0x56f8fa=_0x241190,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x56f8fa&&_0x55577b['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x56f8fa&&_0x55577b['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x56f8fa&&_0x55577b['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x56f8fa&&_0x55577b['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x56f8fa&&_0x55577b['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x56f8fa&&_0x55577b['_showLicenseError']('usageLimit');}},0x3e8);}destroy(){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}_createUIButton(_0x4524c8){const _0x3320ea=this['editor'],_0x590745=new _0x4524c8(_0x3320ea['locale']),_0x5cee25=_0x3320ea['commands']['get']('addCommentThread');return _0x590745['set']({'label':Et(_0x3320ea['locale'],'Comment'),'icon':_0x64587f}),_0x590745['bind']('isEnabled')['to'](_0x5cee25,'isEnabled',_0x5cee25,'hasContent',(_0x23af37,_0x389c1e)=>_0x23af37&&_0x389c1e),this['listenTo'](_0x590745,'execute',()=>{_0x5cee25['execute']();}),_0x590745;}},yi=class extends _0x36d238{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[wi];}constructor(_0x3af0df){super(_0x3af0df),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x338bd8,_0x121eda,_0x4c32f5)=>{_0x4c32f5?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}afterInit(){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}_enableCommentsOnlyMode(){for(const [_0x16cb58,_0x58bec2]of this['editor']['commands'])_0x58bec2['affectsData']&&'addCommentThread'!==_0x16cb58&&_0x58bec2['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 _0x173376=this['editor']['editing']['view']['document'];this['listenTo'](_0x173376,'cut',_0x13cba5=>_0x13cba5['stop'](),{'priority':'highest'}),this['listenTo'](_0x173376,'clipboardInput',_0x4fa1ee=>_0x4fa1ee['stop'](),{'priority':'highest'}),this['listenTo'](_0x173376,'delete',_0x11456a=>_0x11456a['stop'](),{'priority':'highest'});}_disableCommentsOnlyMode(){for(const [_0x11c249,_0x48fd18]of this['editor']['commands'])_0x48fd18['affectsData']&&'addCommentThread'!==_0x11c249&&_0x48fd18['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']);}},Ti=class extends _0x3d8ace{activeUIs;uisData;['_uis'];static get requires(){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51ce9b){super(_0x51ce9b),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}init(){const _0x49357d=this['context']['plugins']['get'](ti);this['listenTo'](_0x49357d,'_activateAnnotation',(_0x25e01c,_0x38bb0a)=>{for(const _0x56c9f3 of this['activeUIs']){const _0x1f96aa=this['_uis']['get'](_0x56c9f3);(0x0,this['uisData']['get'](_0x56c9f3)['filter'])(_0x38bb0a)&&_0x1f96aa['setActiveAnnotation'](_0x38bb0a);}}),this['listenTo'](_0x49357d,'_deactivateAllAnnotations',()=>{for(const _0xe2fa4d of this['activeUIs'])this['_uis']['get'](_0xe2fa4d)['setActiveAnnotation'](null);}),this['listenTo'](_0x49357d['_visibleAnnotations'],'add',(_0x3c381c,_0x468ffd)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x468ffd);});}hasActive(){return this['activeUIs']['size']>0x0;}isActive(_0x1f77a8){return this['activeUIs']['has'](_0x1f77a8);}activate(_0x3d093f,_0x55979a=this['defaultFilter']){const _0x3bcfc7=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x3d093f))throw new _0x59fadc('annotationsuis-missing-ui',this,{'uiName':_0x3d093f});this['isActive'](_0x3d093f)&&this['deactivate'](_0x3d093f),this['activeUIs']['add'](_0x3d093f);const _0x163ea7=new Jt();Qt({'source':_0x3bcfc7['_visibleAnnotations'],'target':_0x163ea7,'filter':_0x55979a}),this['uisData']['set'](_0x3d093f,{'collection':_0x163ea7,'filter':_0x55979a});const _0x3d31b1=this['_uis']['get'](_0x3d093f);_0x3d31b1['attach'](_0x163ea7),this['listenTo'](_0x3d31b1,'change:activeAnnotation',(_0x13a728,_0x1f9a2d,_0x1437cc,_0x290a4d)=>{_0x290a4d&&_0x3bcfc7['_removeActiveAnnotation'](_0x290a4d),_0x1437cc&&_0x3bcfc7['_addActiveAnnotation'](_0x1437cc);});}deactivate(_0x55b5a0){if(this['activeUIs']['delete'](_0x55b5a0),!this['_uis']['has'](_0x55b5a0))throw new _0x59fadc('annotationsuis-missing-ui',this,{'uiName':_0x55b5a0});const _0x184dde=this['_uis']['get'](_0x55b5a0);_0x184dde['detach'](),this['stopListening'](_0x184dde),this['uisData']['get'](_0x55b5a0)['collection']['destroy'](),this['uisData']['delete'](_0x55b5a0);}switchTo(_0x1e7570){if(!this['_uis']['has'](_0x1e7570))throw new _0x59fadc('annotationsuis-missing-ui',this,{'uiName':_0x1e7570});const _0xac9371=this['context']['plugins']['get'](ti),_0x446a72=Array['from'](_0xac9371['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1e7570);const _0x38b4a1=this['_uis']['get'](_0x1e7570);_0x38b4a1['setActiveAnnotation'](_0x446a72),_0x38b4a1['_setSelectedAnnotations']&&_0x446a72&&_0x38b4a1['_setSelectedAnnotations']([_0x446a72]);}deactivateAll(){for(const _0xe5f83c of this['activeUIs'])this['deactivate'](_0xe5f83c);}register(_0x5ebbfa,_0x669e3f){if(this['_uis']['has'](_0x5ebbfa))throw new _0x59fadc('annotationsuis-register-already-registered');if('function'!=typeof _0x669e3f['attach']||'function'!=typeof _0x669e3f['detach']||'function'!=typeof _0x669e3f['setActiveAnnotation'])throw new _0x59fadc('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5ebbfa,_0x669e3f);}refilterAnnotations(){const _0x57a946=this['context']['plugins']['get'](ti)['collection'],_0x265ae0=new Map(),_0x24f633=Array['from'](this['activeUIs']);for(const _0x213a4f of this['activeUIs']){const _0x44d4de=this['uisData']['get'](_0x213a4f)['collection'];for(const _0x219d8e of _0x44d4de)_0x265ae0['set'](_0x219d8e,_0x213a4f);}for(const _0x28038c of _0x57a946){const _0x3cbb7e=_0x265ae0['get'](_0x28038c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x28038c);const _0x975912=_0x24f633['find'](_0x428e90=>this['uisData']['get'](_0x428e90)['filter'](_0x28038c));_0x3cbb7e!==_0x975912&&(_0x3cbb7e&&this['uisData']['get'](_0x3cbb7e)['collection']['remove'](_0x28038c),_0x975912&&this['uisData']['get'](_0x975912)['collection']['add'](_0x28038c));}}destroy(){this['deactivateAll'](),super['destroy']();}defaultFilter(){return!0x0;}_assertAnnotationDoesNotBelongToMultipleUIs(_0xd790f7){const _0x2c10fd=[];for(const _0x440eb6 of this['activeUIs']){(0x0,this['uisData']['get'](_0x440eb6)['filter'])(_0xd790f7)&&_0x2c10fd['push'](_0x440eb6);}if(_0x2c10fd['length']>0x1)throw new _0x59fadc('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2c10fd,'annotationType':_0xd790f7['type']});}};const Ci=/* #__PURE__ -- @preserve */
32
+ _0x4833c6('px');var Ii=class extends ht{list;['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1631b3){super(_0x1631b3);const _0x4cb014=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 _0x1749d2(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4cb014['to']('class')],'style':{'minHeight':_0x4cb014['to']('minHeight',_0x154213=>'number'==typeof _0x154213?Ci(_0x154213+0xa):null)},'dir':_0x1631b3['uiLanguageDirection'],'role':'application','aria-label':Et(_0x1631b3,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x1631b3,'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',_0x72ca9b=>{this['_updateItemPositionInFocusables'](_0x72ca9b['source']);}),this['list']['forEach'](_0x713cf=>{this['focusTracker']['add'](_0x713cf['element']),this['_updateItemPositionInFocusables'](_0x713cf);}),this['list']['on']('change',(_0x5224ae,_0x56222f)=>{for(const _0x5894d6 of _0x56222f['removed'])this['focusTracker']['remove'](_0x5894d6['element']),this['focusables']['remove'](_0x5894d6);for(const _0x40e8c4 of _0x56222f['added'])this['focusTracker']['add'](_0x40e8c4['element']),this['_updateItemPositionInFocusables'](_0x40e8c4);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}_updateItemPositionInFocusables(_0x4ff7de){const _0x37be61=this['focusables']['getIndex'](_0x4ff7de);let _0x2afb38,_0x4e08cc;for(const _0x522420 of this['focusables'])if(_0x4ff7de['top']<_0x522420['top']){_0x2afb38=_0x522420;break;}if(_0x4e08cc=_0x2afb38?this['focusables']['getIndex'](_0x2afb38):this['focusables']['length'],-0x1!==_0x37be61){if(_0x37be61===_0x4e08cc-0x1)return;this['focusables']['remove'](_0x4ff7de),_0x4e08cc=_0x2afb38?this['focusables']['getIndex'](_0x2afb38):this['focusables']['length'];}this['focusables']['add'](_0x4ff7de,_0x4e08cc);}};const bi=/* #__PURE__ -- @preserve */
33
+ _0x4833c6('px');var Ei=class extends ht{content;_targetTop;_mutationObserver;constructor(_0x445318){super(_0x445318),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x55a08b,_0x47478b)=>_0x55a08b+_0x47478b),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x1daf49=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x1daf49['to']('isAnimationDisabled',_0x3789a5=>_0x3789a5?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x1daf49['to']('top',_0x411f05=>bi(_0x411f05))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}updateHeight(){const _0x106857=this['element']['clientHeight'];_0x106857&&(this['height']=_0x106857);}destroy(){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x3d8ace{['view'];_activeAnnotation;_annotations;_spaceBetweenItems;_sidebarItemViewToAnnotation;_annotationToSidebarItemView;_recalculateBuffer;static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x32e429){super(_0x32e429),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 _0x3c9b66=this['context']['config']['get']('sidebar.container');_0x3c9b66&&this['setContainer'](_0x3c9b66);}setContainer(_0x8df702){if(!Oi(_0x8df702))throw new _0x59fadc('sidebar-setcontainer-invalid-element');this['container']=_0x8df702;}_attachToContainer({viewClass:_0x1eb379='',spaceBetweenItems:_0x1319a3=0x19}={}){if(!Oi(this['container']))throw new _0x59fadc('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1eb379,this['_spaceBetweenItems']=_0x1319a3;}['rearrange']({removedAnnotation:_0x4b3ffd,previousAnnotation:_0x22cc3a,nextAnnotation:_0x1440cb}){const _0x39e4e9=this['getSidebarItemView'](_0x4b3ffd);this['view']['list']['remove'](_0x39e4e9),this['_destroySidebarItemView'](_0x4b3ffd),_0x22cc3a&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x22cc3a)),_0x1440cb&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1440cb)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1eb97c,activatedAnnotation:_0x18119d,disableAnimationOnActivatedAnnotation:_0x1125d5}){if(this['_activeAnnotation']=_0x18119d,_0x1eb97c){_0x1eb97c['isActive']=!0x1;const _0x347e79=this['getSidebarItemView'](_0x1eb97c);_0x347e79&&_0x1125d5&&(_0x347e79['isAnimationDisabled']=!0x1);}if(_0x18119d){const _0x519c9a=this['getSidebarItemView'](_0x18119d);_0x519c9a&&(_0x18119d['isActive']=!0x0,_0x1125d5&&(_0x519c9a['isAnimationDisabled']=!0x0,_0x519c9a['top']+=0x1),this['_alignToTargetRect'](_0x519c9a));}}_detachFromContainer(_0x560549){if(this['view']['element']['remove'](),_0x560549){for(const _0x4867d1 of _0x560549)this['_destroySidebarItemView'](_0x4867d1);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}addAnnotation(_0x59e524,_0x12f315){_0x12f315||(_0x12f315=_0x59e524['view']);const _0x3c66c8=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3c66c8,_0x59e524),this['_annotationToSidebarItemView']['set'](_0x59e524,_0x3c66c8),_0x3c66c8['content']['add'](_0x12f315),this['listenTo'](_0x59e524['view'],'change:targetRect',(_0x2bb159,_0xb8df42,_0x40c54b)=>{const _0x20b3ba=this['_getTargetTop'](_0x59e524,_0x40c54b);_0x3c66c8['_targetTop']!=_0x20b3ba&&(_0x3c66c8['_targetTop']=_0x20b3ba,this['_setItemTop'](_0x3c66c8,_0x20b3ba));}),this['listenTo'](_0x3c66c8,'change:top',()=>{this['_recalculate'](_0x3c66c8,'top');}),this['listenTo'](_0x3c66c8,'change:bottom',()=>{this['_recalculate'](_0x3c66c8,'bottom');}),this['_alignToTargetRect'](_0x3c66c8);const _0x1a6a4a=this['_getItemBefore'](_0x3c66c8);return _0x1a6a4a&&this['_alignAfterItem'](_0x1a6a4a,_0x3c66c8)||this['_alignToTargetRect'](_0x3c66c8),this['_updateLastItem'](),this['view']['list']['add'](_0x3c66c8),_0x3c66c8;}['_alignForTopChange'](_0x13bc5d){if(!_0x13bc5d['content']['length'])return;const _0xd9f164=this['_getItemBefore'](_0x13bc5d);if(!_0xd9f164)return;const _0x136188=this['_sidebarItemViewToAnnotation']['get'](_0xd9f164),_0x38111e=this['_activeAnnotation'];_0x38111e&&_0x38111e===_0x136188?this['_alignAfterItem'](_0xd9f164,_0x13bc5d):this['_alignBeforeItem'](_0x13bc5d,_0xd9f164);}_alignForBottomChange(_0x21751c){if(!_0x21751c['content']['length'])return;const _0x51f2a1=this['_getItemAfter'](_0x21751c);if(!_0x51f2a1)return;const _0x51dfec=this['_sidebarItemViewToAnnotation']['get'](_0x51f2a1),_0x292deb=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3ee8ab=this['_activeAnnotation'];_0x3ee8ab&&_0x3ee8ab===_0x51dfec&&_0x292deb?(this['_alignBeforeItem'](_0x51f2a1,_0x21751c),this['_alignAfterItem'](_0x21751c,_0x51f2a1)):_0x3ee8ab&&_0x3ee8ab===_0x51dfec?this['_alignBeforeItem'](_0x51f2a1,_0x21751c):this['_alignAfterItem'](_0x21751c,_0x51f2a1);}_recalculate(_0x406b86,_0x19e19b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2c1893,changedProp:_0x4910f9}of this['_recalculateBuffer'])'top'===_0x4910f9?this['_alignForTopChange'](_0x2c1893):this['_alignForBottomChange'](_0x2c1893);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x406b86,'changedProp':_0x19e19b});}getSidebarItemView(_0x58c55d){return this['_annotationToSidebarItemView']['get'](_0x58c55d);}destroy(){this['stopListening'](),this['view']['destroy']();}_destroySidebarItemView(_0x26ab98){const _0x358075=this['getSidebarItemView'](_0x26ab98);this['stopListening'](_0x358075),this['stopListening'](_0x26ab98['view']),_0x358075['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x26ab98),this['_sidebarItemViewToAnnotation']['delete'](_0x358075);}_createSidebarView(){const _0x35da7c=new Ii(this['context']['locale']);return _0x35da7c['render'](),this['on']('change:_lastItem',(_0x3c2755,_0x10c5f1,_0x51ca6e,_0x2f3224)=>{_0x2f3224&&_0x35da7c['unbind']('minHeight'),_0x51ca6e?_0x35da7c['bind']('minHeight')['to'](_0x51ca6e,'bottom'):_0x35da7c['minHeight']=null;}),_0x35da7c;}_updateLastItem(){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}_getItemBefore(_0x20e5d0){const _0x15b70e=this['_sidebarItemViewToAnnotation']['get'](_0x20e5d0),_0x39eb36=_0x15b70e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x15b70e)-0x1);return _0x39eb36&&this['getSidebarItemView'](_0x39eb36)||null;}_getItemAfter(_0x52f7be){const _0x3edf68=this['_sidebarItemViewToAnnotation']['get'](_0x52f7be),_0x64f58a=_0x3edf68&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3edf68)+0x1);return _0x64f58a&&this['getSidebarItemView'](_0x64f58a)||null;}_alignBeforeItem(_0x51ac20,_0x3c3f7e){_0x51ac20['updateHeight']();const _0x4c6251=Ni(_0x3c3f7e['bottom']+this['_spaceBetweenItems'],_0x51ac20['top']);return!!_0x4c6251&&(this['_setItemTop'](_0x3c3f7e,_0x3c3f7e['top']-_0x4c6251),!0x0);}_alignAfterItem(_0x503dd0,_0x19cf14){_0x503dd0['updateHeight']();const _0x5a904e=Ni(_0x503dd0['bottom']+this['_spaceBetweenItems'],_0x19cf14['top']);return!!_0x5a904e&&(this['_setItemTop'](_0x19cf14,_0x19cf14['top']+_0x5a904e,!0x1),!0x0);}_alignToTargetRect(_0x2f2a04){const _0x582480=this['_sidebarItemViewToAnnotation']['get'](_0x2f2a04);if(!_0x582480||!_0x582480['target']||!_0x582480['targetRect'])return;const _0x4ff99e=this['_getTargetTop'](_0x582480,_0x582480['targetRect']);this['_setItemTop'](_0x2f2a04,_0x4ff99e);}_getTargetTop(_0x550ece,_0x29ac05){if(null===_0x29ac05)return 0x0;if(_0x550ece['target']instanceof _0x276b72)return _0x29ac05['top'];{const _0x56eda7=new _0x276b72(this['view']['element'])['top'];return _0x29ac05['top']-_0x56eda7;}}_setItemTop(_0x13bc7c,_0x597589,_0x2bd99b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2bd99b&&(_0x597589=Math['max'](_0x597589,this['_getMaxAvailableTop'](_0x13bc7c))),_0x13bc7c['top']=_0x597589;}_getMaxAvailableTop(_0x3d4d82){let _0x165844=this['_getItemBefore'](_0x3d4d82),_0x25860d=0x0;for(;_0x165844;)_0x165844['updateHeight'](),_0x25860d+=this['_spaceBetweenItems']+_0x165844['height'],_0x165844=this['_getItemBefore'](_0x165844);return _0x25860d;}};function Ni(_0x367db0,_0x5f3058){return Math['max'](_0x367db0-_0x5f3058,0x0);}function Oi(_0x2d5f71){return null!==_0x2d5f71&&'object'==typeof _0x2d5f71&&0x1===_0x2d5f71['nodeType'];}var Mi=class extends _0x3d8ace{isAttached;annotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f1fd2){super(_0x1f1fd2),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0xeae5cd(),this['_refreshPositioningDebounced']=_0xd4e18c(()=>{_0x1f1fd2['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}init(){const _0x3b6800=this['context']['plugins']['get'](Ti),_0x192a26=this['context']['plugins']['get'](ki);_0x3b6800['register']('wideSidebar',this),_0x192a26['container']&&_0x3b6800['switchTo']('wideSidebar');}setActiveAnnotation(_0x44c8d5){if(_0x44c8d5===this['activeAnnotation'])return;const _0x5d9196=this['context']['plugins']['get'](ki);_0x5d9196['_activeAnnotation']=_0x44c8d5;const _0x474d05=this['activeAnnotation'];_0x5d9196['refresh']({'blurredAnnotation':_0x474d05,'activatedAnnotation':_0x44c8d5}),this['activeAnnotation']=_0x44c8d5;}attach(_0x50c6b3){this['annotations']=_0x50c6b3;const _0x41e826=this['context']['plugins']['get'](ki);if(_0x41e826['_annotations']=_0x50c6b3,this['isAttached'])throw new _0x59fadc('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x41e826,'set:container',()=>{this['detach'](),this['listenTo'](_0x41e826,'change:container',_0x1c0ca5=>{_0x1c0ca5['off'](),this['attach'](_0x50c6b3);});}),_0x41e826['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x274568=_0xd2f326=>{_0xd2f326['updateTargetRect'](),_0x41e826['addAnnotation'](_0xd2f326);};for(const _0x12cac8 of _0x50c6b3)_0x274568(_0x12cac8);this['listenTo'](_0x50c6b3,'add',(_0x173783,_0x108851)=>{_0x274568(_0x108851);}),this['listenTo'](_0x50c6b3,'remove',(_0x3584d6,_0x47e203,_0x174c9b)=>{_0x41e826['rearrange']({'removedAnnotation':_0x47e203,'previousAnnotation':_0x50c6b3['get'](_0x174c9b-0x1),'nextAnnotation':_0x50c6b3['get'](_0x174c9b+0x1)}),_0x47e203===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x50c6b3,'focus',(_0x4cda74,_0x5a1c86)=>{this['setActiveAnnotation'](_0x5a1c86);}),this['listenTo'](_0x50c6b3,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1621b7=this['context']instanceof _0x5d61fe?this['context']['editors']:new _0xeae5cd([this['context']]);for(const _0x457525 of _0x1621b7)this['_integrateWithEditorAnnotations'](_0x457525);this['listenTo'](_0x1621b7,'add',(_0x5a877d,_0x37e55a)=>{this['listenTo'](_0x37e55a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x37e55a);});}),this['listenTo'](_0x1621b7,'remove',(_0x3b890f,_0x2cacc0)=>{_0x2cacc0['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2cacc0['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}detach(){if(!this['isAttached'])throw new _0x59fadc('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x23da3b=this['context']['plugins']['get'](ki);_0x23da3b['_detachFromContainer'](this['annotations']),this['stopListening'](_0x23da3b),this['stopListening'](this['annotations']),this['context']instanceof _0x5d61fe&&this['stopListening'](this['context']['editors']);for(const _0x3554d2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3554d2);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach']();}_integrateWithEditorAnnotations(_0x342f97){if(!_0x342f97['plugins']['has']('EditorAnnotations'))return;const _0x365ab9=_0x342f97['plugins']['get']('EditorAnnotations'),_0x4c911b=()=>{const _0x323bba=_0x365ab9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x323bba[0x0]||null);};this['listenTo'](_0x365ab9,'refresh',_0x4c911b),this['listenTo'](_0x365ab9,'blur',(_0x47ab24,{isAnnotationTracked:_0x1b1847})=>{this['activeAnnotation']&&_0x1b1847(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x365ab9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xd13078=>{_0x365ab9['hasDomSelection']()&&(_0x4c911b(),_0xd13078['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x365ab9);}_destroyEditorAnnotationsIntegration(_0x3d4b2d){this['stopListening'](_0x3d4b2d),this['_editorAnnotations']['remove'](_0x3d4b2d);}},Ri=class extends _0x5dc461{counterView;constructor(_0xfae990){super(_0xfae990);const _0x300ec1=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x11089b,_0x292780)=>_0x11089b?'...':_0x292780['toString']()),this['set']('annotationType',''),this['icon']=_0x64587f,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x300ec1['to']('annotationType',_0xd95e66=>'ck-annotation-counter__badge--'+_0xd95e66),_0x300ec1['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x300ec1['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x3d8ace{isAttached;annotations;_manuallyClosedAnnotationViews;_domEmitter;_annotationToNarrowView;_selectedAnnotations;_editorAnnotations;_refreshPositioningDebounced;static get requires(){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2095cf){super(_0x2095cf),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x34dc61())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0xeae5cd(),this['_refreshPositioningDebounced']=_0xd4e18c(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}init(){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2c9604(this['context']['locale']),this['balloonPanelView']=new _0x37a9d4(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}attach(_0x333c32){this['annotations']=_0x333c32;const _0x3b07f6=this['context']['plugins']['get'](ki),_0x1fecb7=this['balloonPanelView'];if(_0x3b07f6['_annotations']=_0x333c32,this['isAttached'])throw new _0x59fadc('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3b07f6,'set:container',()=>{this['detach'](),this['listenTo'](_0x3b07f6,'change:container',_0x1cf1a2=>{_0x1cf1a2['off'](),this['attach'](_0x333c32);});}),_0x3b07f6['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x30d56f=_0x584b01=>{const _0x2e8f10=new Ri(this['context']['locale']);_0x3b07f6['addAnnotation'](_0x584b01,_0x2e8f10),this['_annotationToNarrowView']['set'](_0x584b01,_0x2e8f10),_0x2e8f10['bind']('isDirty','annotationType','number')['to'](_0x584b01['view'],'isDirty','type','length'),_0x2e8f10['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1fecb7['content']['first']!==_0x584b01['view']?(this['_showBalloon'](_0x584b01),_0x584b01['view']['element']['focus'](),this['setActiveAnnotation'](_0x584b01)):this['setActiveAnnotation'](null);});};for(const _0x431d0a of _0x333c32)_0x30d56f(_0x431d0a);this['listenTo'](_0x333c32,'add',(_0x1342c8,_0x203ff2)=>{_0x30d56f(_0x203ff2);}),this['listenTo'](_0x333c32,'remove',(_0x28ad7f,_0x57bb9e,_0x2d1536)=>{this['_annotationToNarrowView']['get'](_0x57bb9e)['destroy'](),this['_annotationToNarrowView']['delete'](_0x57bb9e),_0x3b07f6['rearrange']({'removedAnnotation':_0x57bb9e,'previousAnnotation':_0x333c32['get'](_0x2d1536-0x1),'nextAnnotation':_0x333c32['get'](_0x2d1536+0x1)}),_0x57bb9e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x333c32,'focus',(_0x5055d2,_0x503843)=>{this['setActiveAnnotation'](_0x503843);}),this['listenTo'](_0x333c32,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x51cbe8,_0x292efb)=>{_0x292efb['keyCode']===_0x39b378['esc']&&_0x1fecb7['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1fecb7['content']['first']),this['_hideBalloon'](),_0x292efb['stopPropagation'](),_0x292efb['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1ddd3d,_0x40ff3c)=>{const _0x4d4233=_0x40ff3c['target'];_0x1fecb7['isVisible']&&_0x1fecb7['element']['contains'](_0x4d4233)||_0x3b07f6['view']['element']['contains'](_0x4d4233)||_0x1ddd3d['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x5f16cc=>_0x5f16cc['contains'](_0x4d4233))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x536b78=this['context']instanceof _0x5d61fe?this['context']['editors']:new _0xeae5cd([this['context']]);for(const _0x1ad0ba of _0x536b78)this['_integrateWithEditorAnnotations'](_0x1ad0ba);this['listenTo'](_0x536b78,'add',(_0x311781,_0x52bb9d)=>{this['listenTo'](_0x52bb9d,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x52bb9d);});}),this['listenTo'](_0x536b78,'remove',(_0x501bf7,_0x66362b)=>{_0x66362b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x66362b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}setActiveAnnotation(_0x3a2288){if(_0x3a2288===this['activeAnnotation'])return;const _0x31e91e=this['context']['plugins']['get'](ki);_0x31e91e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3a2288,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3a2288&&_0x31e91e['getSidebarItemView'](_0x3a2288)?this['_showBalloon'](_0x3a2288):this['_hideBalloon'](),this['activeAnnotation']=_0x3a2288;}detach(){if(!this['isAttached'])throw new _0x59fadc('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x55c7a7=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x48fe44=>_0x48fe44['destroy']()),this['_annotationToNarrowView']['clear'](),_0x55c7a7['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x5d61fe&&this['stopListening'](this['context']['editors']);for(const _0x1362ca of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1362ca);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(_0x26a746){if(!_0x26a746['plugins']['has']('EditorAnnotations'))return;const _0x13f53f=_0x26a746['plugins']['get']('EditorAnnotations'),_0x322edf=this['context']['plugins']['get'](ki),_0x1af031=this['annotations'],_0x471d70=this['balloonPanelView'],_0x262402=()=>{const _0x5fd2b8=_0x13f53f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x5fd2b8),this['setActiveAnnotation'](_0x5fd2b8[0x0]||null);};this['listenTo'](_0x13f53f,'refresh',_0x262402),this['listenTo'](_0x13f53f,'blur',(_0x9eb033,{isAnnotationTracked:_0x1a6fd7})=>{this['activeAnnotation']&&_0x1a6fd7(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x13f53f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1af031,'blur',_0x1994bb=>{_0x13f53f['hasDomSelection']()&&_0x1994bb['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x48ff09,_0x429bbd)=>{const _0xae5e00=_0x429bbd['target'];_0x471d70['isVisible']&&_0x471d70['element']['contains'](_0xae5e00)||_0x322edf['view']['element']['contains'](_0xae5e00)||this['activeAnnotation']&&_0x13f53f['hasDomSelection']()&&(_0x262402(),_0x48ff09['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x13f53f);}_destroyEditorAnnotationsIntegration(_0x444faa){_0x444faa&&(this['stopListening'](_0x444faa),this['_editorAnnotations']['remove'](_0x444faa));}_setSelectedAnnotations(_0x1ac723){for(const _0x613c2a of this['_selectedAnnotations'])_0x1ac723['includes'](_0x613c2a)||this['_manuallyClosedAnnotationViews']['delete'](_0x613c2a['view']);this['_selectedAnnotations']=_0x1ac723;}_refreshPositioning(){const _0xa2861=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xa2861['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xfdfbc6){if(this['_manuallyClosedAnnotationViews']['has'](_0xfdfbc6['view']))return;const _0x1a906d=this['balloonPanelView']['content']['first'];_0x1a906d!==_0xfdfbc6['view']?(_0x1a906d&&this['_detachListeners'](_0x1a906d),this['_attachListeners'](_0xfdfbc6['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xfdfbc6['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}_updateBalloonPosition(){const _0x132a55=this['balloonPanelView']['content']['first'],_0x6c9ac1=_0x132a55&&this['annotations']['getByView'](_0x132a55);if(!_0x6c9ac1||!this['_annotationToNarrowView']['has'](_0x6c9ac1))return;const _0x2c676b=this['_annotationToNarrowView']['get'](_0x6c9ac1)['element'],_0x2e89c4=(function(){const _0x8744e0=_0x37a9d4['defaultPositions'];return[_0x8744e0['southArrowNorthEast'],_0x8744e0['northArrowSouthEast'],_0x8744e0['southArrowNorth'],_0x8744e0['northArrowSouth'],_0x8744e0['southArrowNorthWest'],_0x8744e0['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2c676b,'positions':_0x2e89c4});}['_hideBalloon'](){const _0x4684f8=this['balloonPanelView'],_0x51a179=_0x4684f8['content']['first'];_0x51a179&&(this['_detachListeners'](_0x51a179),_0x4684f8['unpin'](),_0x4684f8['content']['clear']());}_attachListeners(_0x99d742){this['listenTo'](_0x99d742,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x99d742,'Esc',(_0x33384d,_0x11c63c)=>{this['_manuallyClosedAnnotationViews']['add'](_0x99d742),this['_hideBalloon'](),_0x11c63c();});}_detachListeners(_0x1fed88){this['stopListening'](_0x1fed88);}},xi=class extends _0x36d238{isAttached;annotations;['_manuallyClosed'];['_balloon'];_addedAnnotations;_selectedAnnotations;['_forceRefresh'];_refreshVisibilityDebounced;static get requires(){return[di,_0x34753a,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5aa2cc){super(_0x5aa2cc),_0x5aa2cc['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x5aa2cc['plugins']['get'](_0x34753a),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0xd4e18c(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}init(){const _0x4485c3=this['editor']['plugins']['get'](Ti);_0x4485c3['context']===this['editor']&&(_0x4485c3['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x810a4a,_0x458c55)=>{const _0x116c09=this['_balloon'];if(this['isAttached']&&_0x116c09['visibleView']){const _0x32253c=this['annotations']['getByView'](_0x116c09['visibleView']);_0x32253c&&this['_closeAnnotation'](_0x32253c),_0x458c55();}}));}afterInit(){const _0x19f631=this['editor']['plugins']['get'](Ti);_0x19f631['context']===this['editor']&&(_0x19f631['hasActive']()||_0x19f631['switchTo']('inline'));}setActiveAnnotation(_0x10994e){_0x10994e!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x10994e&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x10994e)&&this['_addAnnotationToBalloon'](_0x10994e,!0x0),_0x10994e['isActive']=!0x0),_0x10994e||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x10994e);}attach(_0x5a7f66){this['annotations']=_0x5a7f66;const _0x53fc85=this['editor']['plugins']['get'](Ti),_0x1468fc=this['_balloon'];if(this['isAttached'])throw new _0x59fadc('inlineannotations-attach-already-attached',this);if(_0x53fc85['context']!==this['editor'])throw new _0x59fadc('inlineannotations-not-allowed-with-context',this);const _0x4f4498=this['editor']['plugins']['get'](di);this['listenTo'](_0x4f4498,'refresh',()=>{const _0x6d981f=_0x4f4498['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0xa84619,_0x3c4343;!this['_forceRefresh']&&(_0xa84619=_0x6d981f,_0x3c4343=this['_selectedAnnotations'],_0xa84619['length']===_0x3c4343['length']&&_0xa84619['every'](_0x3d97d9=>_0x3c4343['includes'](_0x3d97d9)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x6d981f),this['setActiveAnnotation'](_0x6d981f[0x0]||null));}),this['listenTo'](_0x4f4498,'blur',(_0x40189f,{isAnnotationTracked:_0x2a45d2})=>{this['activeAnnotation']&&_0x2a45d2(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4f4498,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x51f1e0,_0x108ff5,_0x421387)=>{_0x421387||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5a7f66,'remove',(_0x2bb7ca,_0x3a8d4b)=>{this['_removeAnnotationFromBalloon'](_0x3a8d4b),_0x3a8d4b===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1468fc,'change:visibleView',(_0x434ffa,_0x53d8d2,_0x3e3fe3,_0x4089b9)=>{_0x4089b9&&this['stopListening'](_0x4089b9);const _0x425401=_0x5a7f66['getByView'](_0x3e3fe3);_0x3e3fe3&&_0x425401&&(this['listenTo'](_0x3e3fe3,'change:height',()=>{_0x1468fc['updatePosition']();}),this['listenTo'](_0x3e3fe3,'Esc',()=>{this['_closeAnnotation'](_0x425401),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x425401&&this['setActiveAnnotation'](_0x425401));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1468fc['visibleView']&&_0x5a7f66['getByView'](_0x1468fc['visibleView'])&&_0x1468fc['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 _0x59fadc('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x205630 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x205630);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}destroy(){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}_setSelectedAnnotations(_0x3120a1){for(const _0x5bd7ed of this['_selectedAnnotations'])_0x3120a1['includes'](_0x5bd7ed)||this['_manuallyClosed']['delete'](_0x5bd7ed);for(const _0x586f7e of this['annotations'])_0x3120a1['includes'](_0x586f7e)||this['_removeAnnotationFromBalloon'](_0x586f7e);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x19a563 of _0x3120a1)this['_addAnnotationToBalloon'](_0x19a563);}this['_selectedAnnotations']=_0x3120a1;}_addAnnotationToBalloon(_0x331f32,_0x3432a4=!0x1){this['_manuallyClosed']['has'](_0x331f32)||(this['_addedAnnotations']['has'](_0x331f32)||this['_balloon']['hasView'](_0x331f32['view'])||(this['_addedAnnotations']['add'](_0x331f32),this['_balloon']['add']({'stackId':_0x331f32['view']['id'],'view':_0x331f32['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x331f32)}})),_0x3432a4&&this['_balloon']['showStack'](_0x331f32['view']['id']));}_getBalloonTargetForAnnotation(_0x5d46d7){const _0x2ec02e=_0x5d46d7['target'],_0x4742b0=this['editor']['editing']['view'],_0x284b65=_0x4742b0['document']['selection']['getFirstRange'](),_0x45ae05=_0x4742b0['domConverter']['viewRangeToDom'](_0x284b65);if(_0x45ae05['collapse'](!0x0),_0x2ec02e){if(_0x2ec02e instanceof _0x276b72)return _0x2ec02e;let _0x2e13ab=[];for(const _0x1f43dc of _0x2ec02e)_0x2e13ab['push'](..._0x276b72['getDomElementRects'](_0x1f43dc));_0x2e13ab=function(_0x4ad218){const _0x31c543=[];let _0x280db9=_0x4ad218[0x0];for(let _0x150361=0x1;_0x150361<_0x4ad218['length'];_0x150361++)if(Pi(_0x280db9,_0x4ad218[_0x150361])){const _0x40a60f=_0x4ad218[_0x150361]['width'];_0x280db9['width']+=_0x40a60f,_0x280db9['right']+=_0x40a60f;}else _0x31c543['push'](_0x280db9),_0x280db9=_0x4ad218[_0x150361];return _0x31c543['push'](_0x280db9),_0x31c543;}(_0x2e13ab);const _0x32bee5=_0x45ae05['getBoundingClientRect']();return _0x2e13ab['find'](_0x1d39c2=>_0x1d39c2['top']<=_0x32bee5['top']&&_0x1d39c2['bottom']>=_0x32bee5['bottom']&&_0x1d39c2['left']<=_0x32bee5['left']&&_0x1d39c2['right']>=_0x32bee5['right'])||_0x2e13ab[0x0];}return _0x5d46d7['targetRect']||_0x45ae05;}_removeAnnotationFromBalloon(_0x2713c3){this['_addedAnnotations']['has'](_0x2713c3)&&this['_balloon']['hasView'](_0x2713c3['view'])&&(this['_addedAnnotations']['delete'](_0x2713c3),this['_balloon']['remove'](_0x2713c3['view']));}_closeAnnotation(_0x2123a1){this['_manuallyClosed']['add'](_0x2123a1),this['_removeAnnotationFromBalloon'](_0x2123a1);}};function Pi(_0x26d1ed,_0x8d6ba){return _0x26d1ed['top']===_0x8d6ba['top']&&_0x26d1ed['bottom']===_0x8d6ba['bottom']&&_0x26d1ed['right']===_0x8d6ba['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];_annotationViews;constructor(_0x5754a7,_0x4c2824){super(_0x5754a7),this['set']('isEmpty',!_0x4c2824['length']),this['focusTracker']=new _0x1749d2(),this['_annotationViews']=_0x4c2824,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x4c2824,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4c2824,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4c2824,'remove',(_0xed41d6,_0x3033c3)=>{_0x3033c3['isActive']&&this['focus'](),_0x4c2824['length']||(this['isEmpty']=!0x0);});const _0x20a277=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x5754a7,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4c2824},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x20a277['if']('isEmpty','ck-hidden',_0x5f4ef3=>!_0x5f4ef3)]},'children':[{'text':Et(_0x5754a7,'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 _0x4e82f0 of this['_annotationViews'])this['focusTracker']['add'](_0x4e82f0['element']);this['_annotationViews']['on']('change',(_0x31e834,{added:_0x2f73cf,removed:_0x1af6a0})=>{for(const _0x163cac of _0x2f73cf)this['focusTracker']['add'](_0x163cac['element']);for(const _0x2384a1 of _0x1af6a0)this['focusTracker']['remove'](_0x2384a1['element']);});}},Di=class extends _0x3d8ace{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[oi,ti];}constructor(_0x57ea90){super(_0x57ea90),this['archivedThreads']=new _0xeae5cd();}init(){const _0x6612e1=this['context'],_0xe94aab=_0x6612e1['plugins']['get'](oi),_0x46912b=_0x6612e1['plugins']['get'](ti);this['listenTo'](_0xe94aab,'addCommentThread',(_0x36c842,{threadId:_0x212640})=>{const _0x248205=_0xe94aab['getCommentThread'](_0x212640);_0x248205['archivedAt']&&this['archivedThreads']['add'](_0x248205,this['_calculatePosition'](_0x248205['archivedAt'])),this['listenTo'](_0x248205,'change:archivedAt',(_0x6889df,_0x3d6716,_0x2713c4)=>{_0x2713c4?this['archivedThreads']['has'](_0x248205)||this['archivedThreads']['add'](_0x248205,this['_calculatePosition'](_0x248205['archivedAt'])):this['archivedThreads']['has'](_0x248205)&&this['archivedThreads']['remove'](_0x248205);});}),this['listenTo'](_0xe94aab,'removeCommentThread',(_0x13cf5e,{threadId:_0x33db30})=>{const _0xf3069d=_0xe94aab['getCommentThread'](_0x33db30);this['stopListening'](_0xf3069d),this['archivedThreads']['has'](_0xf3069d)&&this['archivedThreads']['remove'](_0xf3069d);},{'priority':'highest'}),this['listenTo'](_0x46912b['collection'],'focus',(_0x1e96d6,_0x44d977)=>{_0x44d977['isVisible']||(_0x44d977['isActive']=!0x0,_0x46912b['activate'](_0x44d977));});}_calculatePosition(_0x55c32d){const _0x540915=[...this['archivedThreads']]['findIndex'](_0x5c3e03=>_0x5c3e03['archivedAt']<_0x55c32d);return _0x540915>-0x1?_0x540915:this['archivedThreads']['length'];}},Vi=class extends _0x36d238{commentsArchiveView;annotationViews;['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get requires(){return[Di,_0x11e02b];}constructor(_0x148aed){super(_0x148aed),this['annotationViews']=new at(),this['_pendingThreads']=[];}init(){const _0x379a77=this['editor'],_0x1a1f9b=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x379a77['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5dc461,!0x0)),_0x379a77['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x25409f=this['_createCommentsArchiveButton'](rt);return _0x25409f['set']({'role':'menuitemcheckbox'}),_0x25409f;});const _0x36f19d=_0x379a77['plugins']['get'](Di),_0x59ac72=_0x379a77['plugins']['get']('Annotations'),_0x234574=_0x379a77['plugins']['get']('CommentsRepository');_0x36f19d['archivedThreads']['forEach'](_0x477613=>{this['_handleNewThread'](_0x477613);}),this['listenTo'](_0x36f19d['archivedThreads'],'add',(_0x2b3042,_0x5307a6)=>{this['_handleNewThread'](_0x5307a6);}),this['listenTo'](_0x59ac72['collection'],'add',(_0x49f910,_0xf87aea)=>{const _0x71cdad=this['_pendingThreads']['find'](_0x541432=>{const _0x472390=_0x234574['_threadToController']['get'](_0x541432);return _0x472390&&_0xf87aea['innerView']===_0x472390['view'];});if(_0x71cdad){const _0x1e588f=this['_calculatePosition'](_0x71cdad['archivedAt']);this['_addAnnotationToArchive'](_0xf87aea,_0x1e588f),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x71cdad),0x1);}}),this['listenTo'](_0x36f19d['archivedThreads'],'remove',(_0x381a75,_0x3f285c)=>{const _0x376a74=_0x379a77['config']['get']('collaboration.channelId');if(!_0x376a74||_0x3f285c['channelId']===_0x376a74){if(this['_pendingThreads']['includes'](_0x3f285c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3f285c),0x1);else{const _0x518961=_0x234574['_threadToController']['get'](_0x3f285c),_0x27e9e6=_0x59ac72['getByInnerView'](_0x518961['view']);this['annotationViews']['remove'](_0x27e9e6['view']),this['stopListening'](_0x27e9e6),this['stopListening'](_0x27e9e6['focusableElements']);}}}),this['listenTo'](_0x59ac72['collection'],'add',(_0x4cd6c7,_0x14c54b)=>{this['listenTo'](_0x14c54b,'escape',_0x1a1f9b);}),this['listenTo'](_0x59ac72['collection'],'remove',(_0x8be235,_0x48382b)=>{this['stopListening'](_0x48382b,'escape',_0x1a1f9b);});}_addAnnotationToArchive(_0x2ef06a,_0x41838b){this['listenTo'](_0x2ef06a,'set:isVisible',_0x6bc71b=>{_0x6bc71b['return']=!0x1,_0x6bc71b['stop']();}),this['annotationViews']['add'](_0x2ef06a['view'],_0x41838b);}['_handleNewThread'](_0x86f3da){const _0x551700=this['editor']['plugins']['get']('CommentsRepository'),_0x57fbd5=this['editor']['plugins']['get']('Annotations'),_0x5ccae6=this['editor']['config']['get']('collaboration.channelId');if(!_0x5ccae6||_0x86f3da['channelId']===_0x5ccae6){const _0x3999f0=_0x551700['_threadToController']['get'](_0x86f3da);if(!_0x3999f0)return void this['_pendingThreads']['push'](_0x86f3da);const _0xdcd3aa=this['_calculatePosition'](_0x86f3da['archivedAt']),_0x14fc16=_0x57fbd5['getByInnerView'](_0x3999f0['view']);_0x14fc16['isVisible']&&_0x57fbd5['_visibleAnnotations']['remove'](_0x14fc16),this['_addAnnotationToArchive'](_0x14fc16,_0xdcd3aa);}}_calculatePosition(_0x188565){const _0x5a51e7=this['editor']['config']['get']('collaboration.channelId'),_0x2c2a11=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x594bf5=>_0x594bf5['channelId']===_0x5a51e7)['findIndex'](_0x55cd2a=>_0x55cd2a['archivedAt']<_0x188565);return _0x2c2a11<0x0||_0x2c2a11>this['annotationViews']['length']?this['annotationViews']['length']:_0x2c2a11-0x1;}_toggleDialog(){const _0xaae6b4=this['editor'],_0xb2e13a=_0xaae6b4['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0xaae6b4['locale'],this['annotationViews'])),'commentsArchive'===_0xb2e13a['id']?_0xb2e13a['hide']():_0xb2e13a['show']({'id':'commentsArchive','title':Et(_0xaae6b4['locale'],'COMMENTS_ARCHIVE'),'icon':_0x453301,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x49c5b3['EDITOR_TOP_SIDE']});}_createCommentsArchiveButton(_0x17d234,_0x20bc87=!0x1){const _0x5a67d9=this['editor']['locale'],_0x19565c=this['editor']['plugins']['get']('Dialog'),_0x2ae619=new _0x17d234(_0x5a67d9);return _0x2ae619['bind']('isEnabled')['to'](this,'isEnabled'),_0x2ae619['bind']('isOn')['to'](_0x19565c,'id',_0x5bc8bf=>'commentsArchive'===_0x5bc8bf),_0x2ae619['set']({'label':Et(_0x5a67d9,'COMMENTS_ARCHIVE'),'icon':_0x453301,'isToggleable':!0x0}),_0x20bc87&&(_0x2ae619['tooltip']=!0x0),this['listenTo'](_0x2ae619,'execute',()=>this['_toggleDialog']()),_0x2ae619;}_hideDialogOnAnnotationEscape=_0x16f49b=>{const _0x49f507=_0x16f49b['source'];if(!this['annotationViews']['has'](_0x49f507['view']))return;const _0x5349c8=this['editor']['plugins']['get']('Dialog');_0x5349c8['isOpen']&&'commentsArchive'===_0x5349c8['id']&&(_0x5349c8['hide'](),_0x16f49b['stop']());};},Bi=class extends _0x36d238{static get requires(){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};