@ckeditor/ckeditor5-comments 48.2.0-alpha.6 → 48.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/dist/index.js +11 -11
  2. package/dist/translations/af.js +1 -1
  3. package/dist/translations/af.umd.js +1 -1
  4. package/dist/translations/ar.js +1 -1
  5. package/dist/translations/ar.umd.js +1 -1
  6. package/dist/translations/ast.js +1 -1
  7. package/dist/translations/ast.umd.js +1 -1
  8. package/dist/translations/az.js +1 -1
  9. package/dist/translations/az.umd.js +1 -1
  10. package/dist/translations/be.js +1 -1
  11. package/dist/translations/be.umd.js +1 -1
  12. package/dist/translations/bg.js +1 -1
  13. package/dist/translations/bg.umd.js +1 -1
  14. package/dist/translations/bn.js +1 -1
  15. package/dist/translations/bn.umd.js +1 -1
  16. package/dist/translations/bs.js +1 -1
  17. package/dist/translations/bs.umd.js +1 -1
  18. package/dist/translations/ca.js +1 -1
  19. package/dist/translations/ca.umd.js +1 -1
  20. package/dist/translations/cs.js +1 -1
  21. package/dist/translations/cs.umd.js +1 -1
  22. package/dist/translations/da.js +1 -1
  23. package/dist/translations/da.umd.js +1 -1
  24. package/dist/translations/de-ch.js +1 -1
  25. package/dist/translations/de-ch.umd.js +1 -1
  26. package/dist/translations/de.js +1 -1
  27. package/dist/translations/de.umd.js +1 -1
  28. package/dist/translations/el.js +1 -1
  29. package/dist/translations/el.umd.js +1 -1
  30. package/dist/translations/en-au.js +1 -1
  31. package/dist/translations/en-au.umd.js +1 -1
  32. package/dist/translations/en-gb.js +1 -1
  33. package/dist/translations/en-gb.umd.js +1 -1
  34. package/dist/translations/en.js +1 -1
  35. package/dist/translations/en.umd.js +1 -1
  36. package/dist/translations/eo.js +1 -1
  37. package/dist/translations/eo.umd.js +1 -1
  38. package/dist/translations/es-co.js +1 -1
  39. package/dist/translations/es-co.umd.js +1 -1
  40. package/dist/translations/es.js +1 -1
  41. package/dist/translations/es.umd.js +1 -1
  42. package/dist/translations/et.js +1 -1
  43. package/dist/translations/et.umd.js +1 -1
  44. package/dist/translations/eu.js +1 -1
  45. package/dist/translations/eu.umd.js +1 -1
  46. package/dist/translations/fa.js +1 -1
  47. package/dist/translations/fa.umd.js +1 -1
  48. package/dist/translations/fi.js +1 -1
  49. package/dist/translations/fi.umd.js +1 -1
  50. package/dist/translations/fr.js +1 -1
  51. package/dist/translations/fr.umd.js +1 -1
  52. package/dist/translations/gl.js +1 -1
  53. package/dist/translations/gl.umd.js +1 -1
  54. package/dist/translations/gu.js +1 -1
  55. package/dist/translations/gu.umd.js +1 -1
  56. package/dist/translations/he.js +1 -1
  57. package/dist/translations/he.umd.js +1 -1
  58. package/dist/translations/hi.js +1 -1
  59. package/dist/translations/hi.umd.js +1 -1
  60. package/dist/translations/hr.js +1 -1
  61. package/dist/translations/hr.umd.js +1 -1
  62. package/dist/translations/hu.js +1 -1
  63. package/dist/translations/hu.umd.js +1 -1
  64. package/dist/translations/hy.js +1 -1
  65. package/dist/translations/hy.umd.js +1 -1
  66. package/dist/translations/id.js +1 -1
  67. package/dist/translations/id.umd.js +1 -1
  68. package/dist/translations/it.js +1 -1
  69. package/dist/translations/it.umd.js +1 -1
  70. package/dist/translations/ja.js +1 -1
  71. package/dist/translations/ja.umd.js +1 -1
  72. package/dist/translations/jv.js +1 -1
  73. package/dist/translations/jv.umd.js +1 -1
  74. package/dist/translations/kk.js +1 -1
  75. package/dist/translations/kk.umd.js +1 -1
  76. package/dist/translations/km.js +1 -1
  77. package/dist/translations/km.umd.js +1 -1
  78. package/dist/translations/kn.js +1 -1
  79. package/dist/translations/kn.umd.js +1 -1
  80. package/dist/translations/ko.js +1 -1
  81. package/dist/translations/ko.umd.js +1 -1
  82. package/dist/translations/ku.js +1 -1
  83. package/dist/translations/ku.umd.js +1 -1
  84. package/dist/translations/lt.js +1 -1
  85. package/dist/translations/lt.umd.js +1 -1
  86. package/dist/translations/lv.js +1 -1
  87. package/dist/translations/lv.umd.js +1 -1
  88. package/dist/translations/ms.js +1 -1
  89. package/dist/translations/ms.umd.js +1 -1
  90. package/dist/translations/nb.js +1 -1
  91. package/dist/translations/nb.umd.js +1 -1
  92. package/dist/translations/ne.js +1 -1
  93. package/dist/translations/ne.umd.js +1 -1
  94. package/dist/translations/nl.js +1 -1
  95. package/dist/translations/nl.umd.js +1 -1
  96. package/dist/translations/no.js +1 -1
  97. package/dist/translations/no.umd.js +1 -1
  98. package/dist/translations/oc.js +1 -1
  99. package/dist/translations/oc.umd.js +1 -1
  100. package/dist/translations/pl.js +1 -1
  101. package/dist/translations/pl.umd.js +1 -1
  102. package/dist/translations/pt-br.js +1 -1
  103. package/dist/translations/pt-br.umd.js +1 -1
  104. package/dist/translations/pt.js +1 -1
  105. package/dist/translations/pt.umd.js +1 -1
  106. package/dist/translations/ro.js +1 -1
  107. package/dist/translations/ro.umd.js +1 -1
  108. package/dist/translations/ru.js +1 -1
  109. package/dist/translations/ru.umd.js +1 -1
  110. package/dist/translations/si.js +1 -1
  111. package/dist/translations/si.umd.js +1 -1
  112. package/dist/translations/sk.js +1 -1
  113. package/dist/translations/sk.umd.js +1 -1
  114. package/dist/translations/sl.js +1 -1
  115. package/dist/translations/sl.umd.js +1 -1
  116. package/dist/translations/sq.js +1 -1
  117. package/dist/translations/sq.umd.js +1 -1
  118. package/dist/translations/sr-latn.js +1 -1
  119. package/dist/translations/sr-latn.umd.js +1 -1
  120. package/dist/translations/sr.js +1 -1
  121. package/dist/translations/sr.umd.js +1 -1
  122. package/dist/translations/sv.js +1 -1
  123. package/dist/translations/sv.umd.js +1 -1
  124. package/dist/translations/th.js +1 -1
  125. package/dist/translations/th.umd.js +1 -1
  126. package/dist/translations/ti.js +1 -1
  127. package/dist/translations/ti.umd.js +1 -1
  128. package/dist/translations/tk.js +1 -1
  129. package/dist/translations/tk.umd.js +1 -1
  130. package/dist/translations/tr.js +1 -1
  131. package/dist/translations/tr.umd.js +1 -1
  132. package/dist/translations/tt.js +1 -1
  133. package/dist/translations/tt.umd.js +1 -1
  134. package/dist/translations/ug.js +1 -1
  135. package/dist/translations/ug.umd.js +1 -1
  136. package/dist/translations/uk.js +1 -1
  137. package/dist/translations/uk.umd.js +1 -1
  138. package/dist/translations/ur.js +1 -1
  139. package/dist/translations/ur.umd.js +1 -1
  140. package/dist/translations/uz.js +1 -1
  141. package/dist/translations/uz.umd.js +1 -1
  142. package/dist/translations/vi.js +1 -1
  143. package/dist/translations/vi.umd.js +1 -1
  144. package/dist/translations/zh-cn.js +1 -1
  145. package/dist/translations/zh-cn.umd.js +1 -1
  146. package/dist/translations/zh.js +1 -1
  147. package/dist/translations/zh.umd.js +1 -1
  148. package/package.json +16 -16
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x5e934d,ContextPlugin as _0x2a95a9,PendingActions as _0x13c2e5,Command as _0x4b2d4d,Plugin as _0x557e23,Context as _0x1011db}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x5693a9,uid as _0x42dee5,KeystrokeHandler as _0x20c910,FocusTracker as _0x3dcbcb,diff as _0x1b5063,Collection as _0x4c964f,Rect as _0xb1c7e3,CKEditorError as _0x2fe563,first as _0x3d5b3c,priorities as _0x241b73,scrollViewportToShowTarget as _0x413622,getEnvKeystrokeText as _0xf5ebd6,toUnit as _0x1cf4f3,DomEmitterMixin as _0xb08716,keyCodes as _0x48723d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0xbceec,AriaDescriptionView as _0x19e970,setupThreadKeyboardNavigation as _0x207f0f,ConfirmMixin as _0x1bbc9c,LateFocusButtonView as _0x4df16c,trimHtml as _0x38103c,LateFocusDropdownButtonView as _0x4c58bd,FOCUS_ANNOTATION_KEYSTROKE as _0x4b1251,Users as _0x553121,getDateTimeFormatter as _0x4c9bee,hashObject as _0x1f1b92,getAllMarkersDomElementsSorted as _0x3519e2,surroundingMarkersDetector as _0x655cf7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x4042a4,cloneDeep as _0x2d234d,set as _0x19d9b2,unset as _0x30bcc7,isEqual as _0x3c009b,debounce as _0x4fd98b}from'es-toolkit/compat';import{IconUndo as _0x1d8f7b,IconCheck as _0x452cd4,IconPencil as _0xfa7b63,IconRemoveComment as _0x40eea3,IconThreeVerticalDots as _0x1314e0,IconAddComment as _0x2fd654,IconCommentsArchive as _0x4f886b}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x30a417,InlineEditableUIView as _0x137c84,EditorUI as _0x2a10c1,View as _0x5e7531,FocusCycler as _0x429799,ButtonView as _0x46c68b,ViewCollection as tt,createDropdown as et,ListView as it,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as mt,enableViewPlaceholder as lt,MouseObserver as ut}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as At,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Ct}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as _t}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Tt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as It}from'@ckeditor/ckeditor5-widget/dist/index.js';class CommentThreadController extends/* #__PURE__ -- @preserve */
24
- _0x5693a9(){['model'];['view'];constructor(_0x25b9c1,_0x23d02d){super(),this['model']=_0x25b9c1,this['model']['_isAttached']=!0x0,this['view']=_0x23d02d,this['listenTo'](_0x23d02d,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x23d02d,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x23d02d,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x23d02d,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x23d02d,'addComment',(_0x47fdc3,_0xe6c773)=>this['addComment'](_0xe6c773)),this['listenTo'](_0x23d02d,'updateComment',(_0x2223be,_0x5b0b16,_0x53d99)=>this['updateComment'](_0x5b0b16,_0x53d99)),this['listenTo'](_0x23d02d,'removeComment',(_0x148d62,_0x14848a)=>this['removeComment'](_0x14848a));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x2cd0d7){this['model']['addComment']({'content':_0x2cd0d7,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3f726b,_0x1e81f4){this['model']['getComment'](_0x3f726b)['update']({'content':_0x1e81f4});}['removeComment'](_0x2f4194){this['model']['getComment'](_0x2f4194)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function vt(_0x308c45,_0x5b98f0,_0x5ece67){const t=_0x308c45['t'];switch(_0x5b98f0){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'},_0x5ece67);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x5ece67);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'},_0x5ece67);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'},_0x5ece67);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x5ece67);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'},_0x5ece67);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'},_0x5ece67);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'},_0x5ece67);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class CommentEditorUIView extends _0x30a417{['main'];['editable'];constructor(_0x295023,_0x5dafdf){super(_0x295023);const _0x210036=_0x42dee5();this['main']=this['createCollection'](),this['editable']=new _0x137c84(_0x295023,_0x5dafdf,void 0x0,{'label':()=>vt(_0x295023,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x295023['uiLanguageDirection'],'lang':_0x295023['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x210036},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class CommentEditorUI extends _0x2a10c1{['view'];constructor(_0x48320c){super(_0x48320c),this['view']=new CommentEditorUIView(_0x48320c['locale'],_0x48320c['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x4eca7d=this['editor']['editing']['view'],_0x1a9032=this['view']['editable'],_0x3095e4=_0x4eca7d['document']['getRoot']();_0x1a9032['name']=_0x3095e4['rootName'],this['view']['render']();const _0x5157fc=_0x1a9032['element'];this['setEditableElement'](_0x1a9032['name'],_0x5157fc),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x4eca7d['attachDomRoot'](_0x5157fc),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const bt=[ft,At,gt,Ct,_t,Tt,yt];class CommentEditor extends/* #__PURE__ -- @preserve */
25
- _0x5693a9(_0x5e934d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>bt)());constructor(_0x38f3e9={}){function _0x160406(_0x11fa7f){return _0x11fa7f['map'](_0x5ad9b1=>String['fromCharCode'](_0x5ad9b1))['join']('');}(_0x38f3e9=Object['assign']({},_0x38f3e9))['plugins']||(_0x38f3e9['plugins']=CommentEditor['defaultPlugins']),super(_0x38f3e9),this['ui']=new CommentEditorUI(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x160406([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x160406([0x76,0x69,0x65,0x77])][_0x160406([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x160406([0x61,0x75,0x74,0x6f]),this[_0x160406([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x160406([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x160406([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x160406([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x160406([0x6f,0x6b])});}['create'](){const _0x4e138=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4e138))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x725665=>{const _0x40821b=this['model']['document']['getRoot'](),_0x1aa45d=_0x40821b&&_0x40821b['getChild'](_0x40821b['childCount']-0x1);_0x725665['setSelection'](_0x1aa45d,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x57ca7a=this['editing']['view'],_0x18859f=_0x57ca7a['document']['getRoot'](),_0x2b005a=_0x18859f['getChild'](0x0);_0x18859f['childCount']>0x1||!_0x2b005a||'p'!=_0x2b005a['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x57ca7a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2b005a['placeholder']=this['placeholder']),lt({'view':_0x57ca7a,'element':_0x2b005a,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2b005a);}}class CommentInputView extends _0x5e7531{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4255b6,_0x55e783={}){super(_0x4255b6),this['editor']=null,this['_editorConfig']=_0x55e783,this['set']('value',_0x55e783['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',vt(_0x4255b6,'Reply...')),this['set']('submitLabel',vt(_0x4255b6,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x20c910(),this['focusTracker']=new _0x3dcbcb(),this['focusCycler']=new _0x429799({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x29fc7f=>!_0x29fc7f['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',(_0x54573b,_0x3cc30a)=>{this['cancelButtonView']['fire']('execute'),_0x3cc30a();}),this['keystrokes']['set']('Ctrl+Enter',(_0x509949,_0x3a6321)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3a6321());}),this['on']('submit',(_0x4c9580,_0x20d18b)=>{_0x20d18b['length']>0xfde8?(alert(vt(_0x4255b6,'TOO_LONG_COMMENT_ALERT',[_0x20d18b['length'],0xfde8])),_0x4c9580['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new CommentEditor(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3532b3=this['editor'];this['element']['insertBefore'](_0x3532b3['ui']['element'],this['element']['firstChild']),_0x3532b3['model']['document']['on']('change',()=>this['value']=_0x3532b3['getData']()),_0x3532b3['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3532b3['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5b72ab){-0x1===_0x5b72ab?(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:_0x1af526}=this,_0x32559c=new _0x46c68b(_0x1af526);return _0x32559c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x32559c['withText']=!0x0,_0x32559c['bind']('label')['to'](this,'submitLabel'),_0x32559c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x32559c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5004ef,_0xbe697b)=>!_0xbe697b&&!!_0x5004ef['trim']()),_0x32559c;}['_createCancelButton'](){const {locale:_0x2de562}=this,_0x1555aa=new _0x46c68b(_0x2de562);return _0x1555aa['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1555aa['label']=vt(_0x2de562,'Cancel'),_0x1555aa['withText']=!0x0,_0x1555aa['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1555aa;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4895c0=>{this['focusTracker']['add'](_0x4895c0['element']);}),this['focusables']['on']('change',(_0x421e73,_0x11fb73)=>{for(const _0x1e17b2 of Array['from'](_0x11fb73['added'])['reverse']())this['focusTracker']['add'](_0x1e17b2['element']);});}}class CommentThreadInputView extends _0x5e7531{constructor(_0x23ba60,_0x536344,_0x524485){super(_0x23ba60),this['commentInputView']=new CommentInputView(_0x23ba60,_0x524485),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2ba170,_0x459da5)=>_0x2ba170||!!_0x459da5),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 _0xbceec(_0x23ba60,_0x536344),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'](_0x2982f0){this['commentInputView']['focus'](_0x2982f0);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x509e66,_0xd26d8f)=>{const {submitButtonView:_0x360066,cancelButtonView:_0x14b299,editor:_0x966df}=this['commentInputView'];[_0x360066['element'],_0x14b299['element'],_0x966df?_0x966df['editing']['view']['getDomRoot']():null]['filter'](_0x407f0b=>_0x407f0b)['some'](_0x521abb=>_0x521abb['contains'](_0xd26d8f['target']))||(this['focus'](),_0xd26d8f['preventDefault']());});}}class CollapsedCommentsView extends _0x5e7531{constructor(_0x2492e6){super(_0x2492e6);const _0x3b2c39=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3b2c39['to']('count',_0x5c4e12=>vt(_0x2492e6,'NUMBER_OF_COMMENTS',_0x5c4e12))}]});}}class CommentsListView extends _0x5e7531{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x4b1768,_0x40e084,_0x331d48){super(_0x4b1768);const _0x1874d8=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x40e084['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x40e084,this['_config']=_0x331d48,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3dcbcb(),this['keystrokes']=new _0x20c910(),this['focusCycler']=new _0x429799({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1949a7=>this['commentViews']['map'](_0x247900=>_0x247900['element'])['includes'](_0x1949a7['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new CollapsedCommentsView(_0x4b1768),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4aaa05=>_0x4aaa05-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2038ee of _0x40e084['comments'])this['_handleNewCommentModel'](_0x2038ee);this['_handleInfoComment'](),this['listenTo'](_0x40e084['comments'],'add',(_0x458d12,_0x3fc39f)=>{const _0x3cddb1=this['_calculatePosition'](_0x3fc39f);this['length']++,this['_handleNewCommentModel'](_0x3fc39f,_0x3cddb1),this['refreshVisibleViews']();}),this['listenTo'](_0x40e084['comments'],'remove',(_0x1b1d7f,_0x1b1395)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1b1395),this['refreshVisibleViews']();}),this['listenTo'](_0x40e084,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x40e084,'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',_0x1874d8['if']('length','ck-hidden',_0x2f11bf=>!_0x2f11bf)],'aria-label':vt(_0x4b1768,'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'](_0x245175){-0x1===_0x245175?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x1b1231 of this['commentViews'])_0x1b1231['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x15a0ad,_0x174d54){const _0x4c1970=new this['_config']['CommentView'](this['locale'],_0x15a0ad,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4c1970['viewUid']=_0x15a0ad['id'],_0x4c1970['delegate']('removeComment')['to'](this),_0x4c1970['delegate']('updateComment')['to'](this),_0x4c1970['delegate']('resolveCommentThread')['to'](this),_0x4c1970['delegate']('editorReady')['to'](this),_0x4c1970['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4c1970,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4c1970,_0x174d54);}['_calculatePosition'](_0x12adea){const _0x5f0d76=this['_model']['_findOptimalIndex'](_0x12adea);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x12adea['authoredAt']?_0x5f0d76-0x1:_0x5f0d76:_0x5f0d76-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x31f060={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':vt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x31f060,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x31f060));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x28caf0){const _0x1d465a=this['commentViews']['remove'](_0x28caf0['id']);this['stopListening'](_0x1d465a),_0x1d465a['isEditMode']&&this['_updateHasDirtyComment'](),_0x1d465a['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x295d5f=>_0x295d5f['isEditMode']);}['_rearrangeCollapse'](){const _0x1c38b4=function(_0x5bcdda){const _0x2865bf=new _0x4c964f();for(const _0x339186 of _0x5bcdda)_0x2865bf['add'](_0x339186);return _0x2865bf;}(this['commentViews']),_0x2d8330=this['_collapsedCommentsView']['count'];for(let _0x1d729a=0x1;_0x1d729a<=_0x2d8330;_0x1d729a++)_0x1c38b4['remove'](0x1);for(const _0x294219 of _0x1c38b4)_0x294219['collapse']();_0x2d8330>0x0&&_0x1c38b4['add'](this['_collapsedCommentsView'],0x1),Et(_0x1b5063(Array['from'](this['visibleViews']),Array['from'](_0x1c38b4)),this['visibleViews'],_0x1c38b4);}['_rearrangeExpand'](){Et(_0x1b5063(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4f6667 of this['visibleViews'])_0x4f6667['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x360fb8=>{this['focusTracker']['add'](_0x360fb8['element']),this['keystrokes']['listenTo'](_0x360fb8['element']);}),this['commentViews']['on']('change',(_0x35f010,_0x47db64)=>{for(const _0x275c08 of _0x47db64['removed'])this['focusTracker']['remove'](_0x275c08['element']),this['keystrokes']['stopListening'](_0x275c08['element']);for(const _0x3a8572 of Array['from'](_0x47db64['added'])['reverse']())this['focusTracker']['add'](_0x3a8572['element']),this['keystrokes']['listenTo'](_0x3a8572['element']);});}}function Et(_0x1da967,_0x58a1c8,_0x1fe73c){let _0x20ef1b=0x0;for(const _0x2a3e33 of _0x1da967)switch(_0x2a3e33){case'insert':_0x58a1c8['add'](_0x1fe73c['get'](_0x20ef1b),_0x20ef1b),_0x20ef1b++;break;case'delete':_0x58a1c8['remove'](_0x20ef1b);break;case'equal':_0x20ef1b++;}}class CommentThreadHeaderContextView extends _0x5e7531{constructor(_0x23b54e){super(_0x23b54e);const _0x18db8c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x18db8c['to']('contextValue',_0x24fe4d=>vt(_0x23b54e,'THREAD_CONTEXT_LABEL',_0x24fe4d)),'tabindex':-0x1},'children':[{'text':_0x18db8c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class CommentThreadHeaderView extends _0x5e7531{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2ec357,_0xa88764){super(_0x2ec357);const _0x5ce8d5=this['bindTemplate'];this['_model']=_0xa88764,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3dcbcb(),this['keystrokes']=new _0x20c910(),this['focusCycler']=new _0x429799({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x49b6dd=>!!_0x49b6dd),this['bind']('contextValue')['to'](this['_model'],'context',_0x121ce9=>_0x121ce9&&_0x121ce9['value']?this['_trimContextValue'](_0x121ce9['value']):vt(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',_0x5ce8d5['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 _0x27a9ba=new _0x46c68b(this['locale']);return _0x27a9ba['label']=vt(this['locale'],'Reopen'),_0x27a9ba['tooltip']=vt(this['locale'],'Reopen'),_0x27a9ba['icon']=_0x1d8f7b,_0x27a9ba['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x53d4b4=>!_0x53d4b4),_0x27a9ba['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3ba18d,_0xc2b597)=>_0x3ba18d&&_0xc2b597),_0x27a9ba['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x27a9ba;}['_trimContextValue'](_0xdcfc52){if(_0xdcfc52['length']<0x96)return _0xdcfc52;const _0xfcd59f=_0xdcfc52['lastIndexOf']('\x20',0x93);return _0xdcfc52['substring'](0x0,_0xfcd59f>-0x1?_0xfcd59f:0x93)+'...';}['_attachContextActions'](){const _0x2b1bcc=this['element']['querySelector']('.ck-context'),_0x54f473=_0x2b1bcc['querySelector']('.ck-context__value');this['listenTo'](_0x2b1bcc,'mouseenter',()=>{_0x54f473['offsetWidth']<_0x54f473['scrollWidth']&&_0x2b1bcc['classList']['add']('overlay');}),this['listenTo'](_0x2b1bcc,'mouseleave',()=>{_0x2b1bcc['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x1679ea of this['focusables'])this['focusTracker']['add'](_0x1679ea['element']),this['keystrokes']['listenTo'](_0x1679ea['element']);}['_createContextView'](){const _0x3f00a3=new CommentThreadHeaderContextView(this['locale']);return _0x3f00a3['bind']('contextValue')['to'](this),_0x3f00a3;}}class BaseCommentThreadView extends _0x5e7531{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xc6c33a,_0xd62153,_0x39e65f,_0x2d5e3e){super(_0xc6c33a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xd62153,this['_localUser']=_0x39e65f,this['_config']=_0x2d5e3e,this['commentThreadHeaderView']=new CommentThreadHeaderView(_0xc6c33a,_0xd62153),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x19e970(_0xc6c33a,vt(_0xc6c33a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new CommentsListView(_0xc6c33a,_0xd62153,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2d5e3e)),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',(_0x4ffae5,_0x293dcb)=>_0x4ffae5||!!_0x293dcb),this['bind']('isUnlinked')['to'](_0xd62153,'unlinkedAt',_0xdf436a=>!!_0xdf436a),this['bind']('ariaLabel')['to'](this,'length',_0x49bcfa=>{const _0x4323ad=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return vt(this['locale'],'COMMENT_THREAD_LABEL',[_0x49bcfa,_0x4323ad]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3dcbcb(),this['keystrokes']=new _0x20c910(),this['focusCycler']=new _0x429799({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4a504c=>_0x4a504c['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x207f0f(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3f9c08=new CommentThreadInputView(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5780c3=_0x3f9c08['commentInputView'];return _0x3f9c08['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5780c3,'value',(_0x2bf0e1,_0x516e45,_0xf18305,_0xf435fd,_0x39b0b5)=>!!_0x39b0b5||!!_0xf435fd&&_0xf18305&&!_0x516e45||_0x2bf0e1&&_0xf18305&&!_0x516e45),_0x5780c3['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x52c087,_0x235984,_0x196054)=>{let _0x6ae59;return _0x6ae59=_0x196054&&_0x235984?'Reply\x20to\x20reopen\x20discussion...':_0x52c087?'Reply...':'Write\x20a\x20comment...',vt(this['locale'],_0x6ae59);}),_0x5780c3['bind']('submitLabel')['to'](this,'length',_0x597d82=>vt(this['locale'],_0x597d82?'Reply':'Comment')),_0x5780c3['on']('submit',(_0x37deaa,_0x1e8e6f)=>{this['fire']('addComment',_0x1e8e6f),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5780c3['on']('cancel',()=>{this['focus']();}),_0x5780c3['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5780c3['on']('cancel',_0x36c194=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x36c194['stop']());}),this['on']('change:isActive',(_0x42d156,_0x3bdb61,_0x4a2926)=>{_0x4a2926||this['length']||_0x5780c3['value']||this['fire']('removeCommentThread');}),_0x3f9c08;}}class CommentThreadView extends/* #__PURE__ -- @preserve */
27
- _0x1bbc9c(BaseCommentThreadView){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x25b9d4,_0x4a1815,_0x3bb11d,_0x3a3c2e){super(_0x25b9d4,_0x4a1815,_0x3bb11d,_0x3a3c2e),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x25b9d4,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x53a79b,_0x23bffa,_0x3bf492)=>{_0x3bf492||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0xc634d9,_0x3448a4,_0x52423f)=>{_0x52423f&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x2a7c74=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2a7c74['if']('isActive','ck-thread--active'),_0x2a7c74['if']('isUnlinked','ck-thread--unlinked'),_0x2a7c74['to']('actionIndicator',_0x454a91=>_0x454a91?'ck-thread--'+_0x454a91:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2a7c74['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 _0x49f2ce of this['commentsListView']['commentViews'])_0x49f2ce['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x40128e}=this,_0x2c9437=this['commentsListView']['commentViews']['get'](0x0);_0x2c9437===this['_boundFirstCommentView']||_0x2c9437['isSystemComment']||(this['_boundFirstCommentView']=_0x2c9437,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x2c9437,'actionIndicator',_0x1f6d75=>'remove'===_0x1f6d75?'remove':null),_0x2c9437['placeholder']=vt(_0x40128e,'Write\x20a\x20comment...'),_0x2c9437['removeButton']['on']('execute',_0x4d2a51=>{_0x4d2a51['stop'](),this['showConfirm'](vt(_0x40128e,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x2c9437['focus']();}),_0x2c9437['actionBar']['add'](this['resolveButton'],0x0),_0x2c9437['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2113b9=new _0x4df16c(this['locale']);return _0x2113b9['label']=vt(this['locale'],'Resolve'),_0x2113b9['tooltip']=vt(this['locale'],'Resolve'),_0x2113b9['icon']=_0x452cd4,_0x2113b9['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2113b9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x443e39=>!_0x443e39),_0x2113b9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1eeb25,_0x995219)=>_0x1eeb25&&!_0x995219),_0x2113b9['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2113b9;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class CommentContentView extends _0x5e7531{constructor(_0x466144){super(_0x466144),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1d255b,_0x37a601,_0x4ae73d)=>{this['element']['innerHTML']=_0x4ae73d;}),this['element']['innerHTML']=this['content'];}}class BaseCommentView extends _0x5e7531{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x3b081c,_0x2d3120,_0xf89168){super(_0x3b081c),this['_model']=_0x2d3120,this['_config']=_0xf89168,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x2d3120,'content',_0x2d3120,'authoredAt',(_0x1d9be2,_0x2f0241)=>vt(_0x3b081c,'COMMENT_ARIA_LABEL',[_0x2d3120['author']['name'],_0xf89168['formatDateTime'](_0x2f0241),new DOMParser()['parseFromString'](_0x1d9be2,'text/html')['body']['textContent'],_0x2d3120['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x19e970(_0x3b081c,vt(_0x3b081c,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x3dcbcb(),this['keystrokes']=new _0x20c910(),this['focusCycler']=new _0x429799({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x591f0a=>_0x591f0a['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']?vt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):vt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?vt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):vt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0xf1e036=new CommentContentView(this['locale']);return _0xf1e036['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x1c35e9,_0x323fb9)=>_0x323fb9?_0x38103c(_0x1c35e9,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x1c35e9),_0xf1e036;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x316fab=new CommentInputView(this['locale'],this['_config']['editorConfig']);return _0x316fab['value']=this['_model']['content'],_0x316fab['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x316fab['submitLabel']=vt(this['locale'],'Save'),_0x316fab['on']('submit',(_0x1a88be,_0x526cf6)=>{this['fire']('updateComment',this['_model']['id'],_0x526cf6),this['switchToDisplayMode'](),this['focus']();}),_0x316fab['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x316fab['once']('editorReady',()=>{_0x316fab['focus']();}),_0x316fab['createEditor'](),_0x316fab['delegate']('editorReady')['to'](this),_0x316fab['delegate']('editorDestroyed')['to'](this),_0x316fab;}['_setupKeyboardNavigation'](){const _0x5a765e=this['element'];this['keystrokes']['listenTo'](_0x5a765e);for(const _0x4d8de2 of this['focusables'])this['focusTracker']['add'](_0x4d8de2['element']),this['keystrokes']['listenTo'](_0x4d8de2['element']);this['focusables']['on']('change',(_0x32e91c,_0x82993d)=>{for(const _0x515177 of _0x82993d['removed'])this['focusTracker']['remove'](_0x515177['element']),this['keystrokes']['stopListening'](_0x515177['element']);for(const _0x54ac77 of _0x82993d['added'])this['focusTracker']['add'](_0x54ac77['element']),this['keystrokes']['listenTo'](_0x54ac77['element']);}),this['keystrokes']['set']('enter',(_0xccd097,_0xbcb564)=>{_0x5a765e===_0xccd097['target']&&(this['focusCycler']['focusFirst'](),_0xbcb564());}),this['keystrokes']['set']('esc',(_0x547ba8,_0x2bde1d)=>{_0x5a765e!==_0x547ba8['target']&&(this['focus'](),_0x2bde1d());});}}class CommentView extends/* #__PURE__ -- @preserve */
28
- _0x1bbc9c(BaseCommentView){['actionBar'];['userView'];constructor(_0x5297e4,_0x540d3b,_0x1cce3e){super(_0x5297e4,_0x540d3b,_0x1cce3e),this['set']('actionIndicator',null),this['set']('placeholder',vt(_0x5297e4,'Reply...')),this['bind']('authoredAt')['to'](_0x540d3b),this['bind']('resolvedAt')['to'](_0x540d3b),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 _0xbceec(_0x5297e4,_0x540d3b['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x540d3b,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x90817=this['bindTemplate'],_0x5d0d29=[{'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':_0x90817['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x90817['to']('authoredAt',_0x4ab914=>this['_config']['formatDateTime'](_0x4ab914))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x90817['if']('isEditMode','ck-comment__actions--hidden'),_0x90817['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']&&_0x5d0d29['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x90817['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x90817['if']('isEditMode','ck-comment--edit'),_0x90817['if']('isSystemComment','ck-comment--info'),_0x90817['to']('actionIndicator',_0x294131=>_0x294131?'ck-comment--'+_0x294131:'')],'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':_0x5d0d29}]}]};}['_createEditButton'](){const _0x36b63e=new _0x46c68b(this['locale']);return _0x36b63e['label']=vt(this['locale'],'Edit'),_0x36b63e['icon']=_0xfa7b63,_0x36b63e['withText']=!0x0,_0x36b63e['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x36b63e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xc3f0c1=>!_0xc3f0c1),_0x36b63e['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x36b63e['on']('execute',()=>this['switchToEditMode']()),_0x36b63e;}['_createRemoveButton'](){const _0x75ad95=new _0x46c68b(this['locale']);return _0x75ad95['label']=vt(this['locale'],'Remove'),_0x75ad95['icon']=_0x40eea3,_0x75ad95['withText']=!0x0,_0x75ad95['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x75ad95['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1e3919=>!_0x1e3919),_0x75ad95['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x75ad95['on']('execute',()=>{this['showConfirm'](vt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x75ad95;}['_createDropdown'](){const _0x3d45cc=et(this['locale'],_0x4c58bd),_0xa2ffd5=_0x3d45cc['panelView']['children'],_0x31423f=new it(this['locale']),_0x34702c=_0x3d45cc['bindTemplate'];st(_0x3d45cc,()=>this['items']['find'](_0x1c4b14=>_0x1c4b14['isVisible'])),_0x3d45cc['extendTemplate']({'attributes':{'class':[_0x34702c['if']('isVisible','ck-hidden',_0x71dc24=>!_0x71dc24)]}});const _0x4d4e73=(_0x3eefd4,_0x45bef2=-0x1)=>{const _0x417dd2=new nt(this['locale']);_0x417dd2['children']['add'](_0x3eefd4);const _0x2250cc=_0x45bef2>-0x1?_0x45bef2:_0x31423f['items']['length'];_0x31423f['items']['add'](_0x417dd2,_0x2250cc);const _0x1f418a=Array['from'](this['items']);_0x3d45cc['unbind']('isEnabled','isVisible'),_0x3d45cc['bind']('isEnabled')['toMany'](_0x1f418a,'isEnabled',(..._0x201484)=>_0x201484['some'](_0x747625=>_0x747625)),_0x3d45cc['bind']('isVisible')['toMany'](_0x1f418a,'isVisible',(..._0x4cd553)=>_0x4cd553['some'](_0x2b7d1c=>_0x2b7d1c));};_0x3d45cc['panelPosition']='sw',_0x3d45cc['buttonView']['set']({'label':vt(this['locale'],'Show\x20more\x20items'),'icon':_0x1314e0});for(const _0x18a3d3 of this['items'])_0x4d4e73(_0x18a3d3);return _0xa2ffd5['add'](_0x31423f),_0x3d45cc['listenTo'](this['items'],'add',(_0x1124d4,_0x5a39e2,_0x50beaa)=>{_0x4d4e73(_0x5a39e2,_0x50beaa);}),_0x3d45cc['listenTo'](this['items'],'remove',(_0x5899e1,_0xebdec2,_0x45a9e9)=>{_0x31423f['items']['remove'](_0x45a9e9);}),_0x3d45cc;}['_attachActions'](_0xb4136d,_0x241aee){const _0x5d8019=_0xb4136d&&_0xb4136d['element'];_0x5d8019&&(this['listenTo'](_0x5d8019,'mouseenter',()=>this['actionIndicator']=_0x241aee),this['listenTo'](_0x5d8019,'focus',()=>this['actionIndicator']=_0x241aee),this['listenTo'](_0x5d8019,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x5d8019,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x8b9683=super['_createCommentInputView']();return _0x8b9683['bind']('placeholder')['to'](this),_0x8b9683;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Nt(_0x5a8f52){const _0x2b22e3=_0x4042a4(_0x5a8f52,0x1e),_0x1b386c=new MutationObserver(_0x578561=>{for(const _0x1451b1 of _0x578561)('attributes'==_0x1451b1['type']&&'class'==_0x1451b1['attributeName']||'childList'==_0x1451b1['type']||'characterData'==_0x1451b1['type'])&&_0x2b22e3();});return{'attach'(_0x8b261c){_0x1b386c['observe'](_0x8b261c,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x1b386c['disconnect'](),_0x2b22e3['cancel']();}};}class AnnotationView extends _0x5e7531{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x3d0190,_0x370e1b){super(_0x3d0190),this['id']=_0x42dee5(),this['focusTracker']=new _0x3dcbcb(),this['keystrokes']=new _0x20c910(),this['keystrokes']['set']('Esc',(_0x452fdd,_0x1f07d6)=>this['fire']('Esc',_0x1f07d6)),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']=Nt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x370e1b),this['mainView']=_0x370e1b;const _0x640f47=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x640f47['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 _0x6777a8=this['element']['clientHeight'];_0x6777a8&&(this['height']=_0x6777a8);}}class Annotation extends/* #__PURE__ -- @preserve */
29
- _0x5693a9(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2a8069,target:_0x590f03,type:_0x4937a3,isVisible:_0x621eb6=!0x0}){super(),this['view']=_0x2a8069,this['view']['element']||this['view']['render'](),this['_type']=_0x4937a3,this['_target']=_0x590f03,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4c964f([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3dc4e0,_0x151536)=>{this['view']['focusTracker']['add'](_0x151536);}),this['focusableElements']['on']('remove',(_0x5bd785,_0x2415d9)=>{this['view']['focusTracker']['remove'](_0x2415d9);}),this['set']('isVisible',_0x621eb6);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xb6cccd=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0xb6cccd),_0xb6cccd;}get['targetRect'](){const _0x36e8b3=this['target'];if(null===_0x36e8b3)return null;if(_0x36e8b3 instanceof _0xb1c7e3)return _0x36e8b3;const _0x400dfe=_0x36e8b3['filter'](_0x321f58=>function(_0x2d6591){const _0x42ce26=_0x2d6591['offsetParent'];if(_0x42ce26)return!0x0;const _0x34b4fa=_0x2d6591['getClientRects']()['item'](0x0);return!!_0x34b4fa;}(_0x321f58));return 0x0===_0x400dfe['length']?null:_0xb1c7e3['getDomElementRects'](_0x400dfe[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x196962){this['view']['isActive']=_0x196962,this['view']['mainView']['isActive']=_0x196962;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x1b45ef){if(!(null===_0x1b45ef||_0x1b45ef instanceof _0xb1c7e3||Array['isArray'](_0x1b45ef)&&_0x1b45ef['every'](_0x4ef9bb=>kt(_0x4ef9bb))))throw new _0x2fe563('annotation-invalid-target',null,{'target':_0x1b45ef});}['_getNormalizedTarget'](){const _0x4d37ae='function'==typeof this['_target']?this['_target']():this['_target'];return kt(_0x4d37ae)?[_0x4d37ae]:_0x4d37ae;}}function kt(_0x443068){return null!==_0x443068&&'object'==typeof _0x443068&&'nodeType'in _0x443068&&0x1===_0x443068['nodeType'];}class AnnotationCollection extends _0x4c964f{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2649fc=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3dcbcb(),this['_focusTracker']['on']('change:isFocused',(_0x4e11a3,_0x197023,_0x5e0847)=>{_0x5e0847||this['fire']('blur');});for(const _0x56ddeb of _0x2649fc)this['add'](_0x56ddeb);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3db772){if(this['has'](_0x3db772))throw new _0x2fe563('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3db772['innerView'],_0x3db772),this['_viewToAnnotation']['set'](_0x3db772['view'],_0x3db772);for(const _0x1d549c of _0x3db772['focusableElements'])this['_focusTracker']['add'](_0x1d549c);if(this['listenTo'](_0x3db772['focusableElements'],'add',(_0x29b359,_0x1de5e1)=>{this['_focusTracker']['add'](_0x1de5e1);}),this['listenTo'](_0x3db772['focusableElements'],'remove',(_0x27ee3b,_0x13dc67)=>{this['_focusTracker']['remove'](_0x13dc67);}),this['listenTo'](_0x3db772['view']['focusTracker'],'change:isFocused',(_0x2efb0a,_0x4b9fed,_0x4fc8fd)=>{_0x4fc8fd&&this['fire']('focus',_0x3db772);}),_0x3db772['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x2e1a6d of this)_0x2e1a6d['updateTargetRect']();}const _0x13fa6f=this['_getOrderInContent'](_0x3db772['view']['targetRect']);return super['add'](_0x3db772,_0x13fa6f);}['remove'](_0x200009){if(!this['has'](_0x200009))throw new _0x2fe563('annotationcollection-not-existing-item',null);this['stopListening'](_0x200009['view']['focusTracker']),this['stopListening'](_0x200009['focusableElements']);for(const _0x67225b of _0x200009['focusableElements'])this['_focusTracker']['remove'](_0x67225b);return this['_viewToAnnotation']['delete'](_0x200009['view']),this['_innerViewToAnnotation']['delete'](_0x200009['innerView']),super['remove'](_0x200009);}['getByInnerView'](_0x2a57d7){return this['_innerViewToAnnotation']['get'](_0x2a57d7);}['getByView'](_0x202ede){return this['_viewToAnnotation']['get'](_0x202ede);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x153136 of this)_0x153136['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3015fc=Array['from'](this)['sort']((_0x54b0fc,_0x24c457)=>Rt(_0x54b0fc['view']['targetRect'],_0x24c457['view']['targetRect']));for(let _0x4a1508=_0x3015fc['length']-0x1;_0x4a1508>0x0;_0x4a1508--){const _0xa986b6=_0x3015fc[_0x4a1508];_0x4a1508!==this['getIndex'](_0xa986b6)&&(this['remove'](_0xa986b6),this['add'](_0xa986b6));}}['_getOrderInContent'](_0x2438e6){let _0x8ad21a=0x0;if(!_0x2438e6)return this['length'];for(const _0x138b80 of this){const _0x4c96a5=_0x138b80['view']['targetRect'];if(_0x4c96a5){if(Rt(_0x2438e6,_0x4c96a5)<0x0)return _0x8ad21a;_0x8ad21a++;}}return _0x8ad21a;}['_areCachedRectsStale'](){const _0x1b9fc5=this['get'](0x0);if(!_0x1b9fc5)return!0x1;const _0xd9814a=_0x1b9fc5['view']['targetRect'],_0x493178=_0x1b9fc5['targetRect'];return!(!_0xd9814a||!_0x493178)&&(_0xd9814a['top']!==_0x493178['top']||_0xd9814a['left']!==_0x493178['left']);}}function Ot({source:_0x26d730,target:_0x4db5b3,filter:_0x3c577e}){for(const _0x252675 of _0x26d730)_0x3c577e(_0x252675)&&_0x4db5b3['add'](_0x252675);_0x4db5b3['listenTo'](_0x26d730,'add',(_0x11d8a4,_0x191618)=>{_0x3c577e(_0x191618)&&_0x4db5b3['add'](_0x191618);}),_0x4db5b3['listenTo'](_0x26d730,'remove',(_0x13d2cc,_0xecb18a)=>{_0x4db5b3['has'](_0xecb18a)&&_0x4db5b3['remove'](_0xecb18a);});}function Rt(_0xb58817,_0x2cb0ba){if(null===_0xb58817&&null===_0x2cb0ba)return 0x0;if(null===_0xb58817)return-0x1;if(null===_0x2cb0ba)return 0x1;const _0x40b183=_0xb58817['top']-_0x2cb0ba['top'];return 0x0==_0x40b183?_0xb58817['left']-_0x2cb0ba['left']:_0x40b183;}class Annotations extends _0x2a95a9{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x560db7){if(super(_0x560db7),this['collection']=new AnnotationCollection(),this['_visibleAnnotations']=new AnnotationCollection(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x560db7 instanceof _0x5e934d){const _0x363ae7=_0x560db7['locale'];_0x560db7['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':vt(_0x363ae7,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':vt(_0x363ae7,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':vt(_0x363ae7,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':vt(_0x363ae7,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':vt(_0x363ae7,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':vt(_0x363ae7,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':vt(_0x363ae7,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x328324){this['collection']['add'](_0x328324);}['remove'](_0x5428f6){this['collection']['remove'](_0x5428f6),_0x5428f6['destroy']();}['refreshVisibility'](){for(const _0x46aabe of this['collection'])_0x46aabe['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3f4e8e){return this['collection']['getByInnerView'](_0x3f4e8e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x280381 of this['collection'])_0x280381['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x3f2c70){this['fire']('_activateAnnotation',_0x3f2c70);}['createAnnotation'](_0x2d817f){return new Annotation(_0x2d817f);}['createAnnotationView'](_0x2f546a,_0x399129){return new AnnotationView(_0x2f546a,_0x399129);}['_addActiveAnnotation'](_0x5af4f4){const _0x2afeba=new Set(this['activeAnnotations']);_0x2afeba['add'](_0x5af4f4),this['activeAnnotations']=_0x2afeba;}['_removeActiveAnnotation'](_0x518418){const _0x10c304=new Set(this['activeAnnotations']);_0x10c304['delete'](_0x518418),this['activeAnnotations']=_0x10c304;}['_bindAnnotationsToVisibleAnnotations'](){const _0x349908=this['collection'],_0x4bf71a=this['_visibleAnnotations'];function _0x130bc6(_0x2c12e2){const _0x368645=_0x2c12e2['source'];_0x368645['isVisible']&&!_0x4bf71a['has'](_0x368645)?_0x4bf71a['add'](_0x368645):!_0x368645['isVisible']&&_0x4bf71a['has'](_0x368645)&&_0x4bf71a['remove'](_0x368645),_0x368645['view']['focusTracker']['remove'](_0x368645['view']['element']),_0x368645['view']['focusTracker']['add'](_0x368645['view']['element']);}this['listenTo'](_0x349908,'add',(_0x18173b,_0x3b75ae)=>{_0x3b75ae['isVisible']&&_0x4bf71a['add'](_0x3b75ae),this['listenTo'](_0x3b75ae,'change:isVisible',_0x130bc6);}),this['listenTo'](_0x349908,'remove',(_0x11beca,_0x5c8e8a)=>{_0x4bf71a['has'](_0x5c8e8a)&&_0x4bf71a['remove'](_0x5c8e8a),this['stopListening'](_0x5c8e8a,'change:isVisible',_0x130bc6);});}['_setupEnterAnnotationKeystroke'](){const _0x9d30ed=_0x3aa56a=>{_0x3aa56a['on']('ready',()=>{_0x3aa56a['keystrokes']['set'](_0x4b1251,(_0x40be90,_0x45e609)=>{const _0x39198b=_0x3d5b3c(this['activeAnnotations']['values']());_0x39198b&&(_0x39198b['view']['focus'](),_0x45e609());});});};this['context']instanceof _0x5e934d?_0x9d30ed(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x45598e,_0x189647)=>{_0x9d30ed(_0x189647);});}['_setupEscapeAnnotationHandling'](){const _0x273e1c=_0x2a5158=>{const _0x727dc6=_0x2a5158['source'],_0x24da9d=[];let _0x399f85;if(Array['isArray'](_0x727dc6['target'])){_0x399f85=_0x727dc6['target'][0x0],this['context']instanceof _0x5e934d?_0x24da9d['push'](this['context']):this['context']['editors']&&_0x24da9d['push'](...this['context']['editors']);for(const _0x3ca0cb of _0x24da9d)for(const _0x13239d of _0x3ca0cb['editing']['view']['domRoots']['values']())if(_0x13239d['contains'](_0x399f85))return void _0x3ca0cb['editing']['view']['focus']();_0x399f85['focus']();}};this['listenTo'](this['collection'],'add',(_0x3105c1,_0x4d66b2)=>{this['listenTo'](_0x4d66b2,'escape',_0x273e1c,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x41db85,_0x2f402a)=>{this['stopListening'](_0x2f402a,'escape',_0x273e1c);});}}const Mt=Symbol('noChannel'),St={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class CommentsRepository extends _0x2a95a9{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[Annotations,_0x13c2e5,_0x553121];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51d3b7){super(_0x51d3b7),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x23a7f3=this['context']['config'];_0x23a7f3['define']('comments.maxCommentsWhenCollapsed',0x2),_0x23a7f3['define']('comments.maxThreadTotalWeight',0x1f4),_0x23a7f3['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x23a7f3['define']('comments.CommentThreadView',CommentThreadView),_0x23a7f3['define']('comments.CommentView',CommentView),_0x23a7f3['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x414302=this['context']['plugins']['get'](Annotations);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x24d7e0,_0x13d7a1)=>this['_addCommentThread'](_0x13d7a1)),this['on']('submitCommentThread',(_0x33028f,_0x2af9c3)=>this['_submitCommentThread'](_0x2af9c3)),this['on']('resolveCommentThread',(_0x51a09b,_0x9690f0)=>this['_resolveCommentThread'](_0x9690f0)),this['on']('resolveCommentThread',(_0x2889b2,_0xd4b32b)=>this['_updateActiveAnnotation'](_0xd4b32b),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3a4ba9,_0x4c71e3)=>this['_reopenCommentThread'](_0x4c71e3)),this['on']('reopenCommentThread',(_0x55dc79,_0x4956f2)=>this['_updateActiveAnnotation'](_0x4956f2),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3581cc,_0x530849)=>this['_removeCommentThread'](_0x530849)),this['on']('updateCommentThread',(_0x128bd8,_0x3a3936)=>this['_updateCommentThread'](_0x3a3936)),this['on']('updateCommentThread',(_0x535988,_0x155d73)=>this['_updateActiveAnnotation'](_0x155d73),{'priority':'lowest'}),this['on']('addComment',(_0x4cacd7,_0x323a9c)=>this['_addComment'](_0x323a9c)),this['on']('updateComment',(_0xd20d59,_0x3d2d96)=>this['_updateComment'](_0x3d2d96)),this['on']('removeComment',(_0xf8f75,_0x1bd6bc)=>this['_removeComment'](_0x1bd6bc)),this['on']('addComment',(_0x3caf7c,{threadId:_0x22d8e8,isFromAdapter:_0x5665ad})=>{if(_0x5665ad)return;const _0x5ab8fd=this['getCommentThread'](_0x22d8e8),_0x51427c=_0x5ab8fd&&this['_threadToController']['get'](_0x5ab8fd);_0x51427c&&_0x51427c['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x414302,'change:activeAnnotations',(_0x3ad042,_0x5987fb,_0x88b034)=>{const _0x522f80=Array['from'](_0x88b034)['map'](_0x827728=>this['_viewToController']['get'](_0x827728['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x522f80?_0x522f80['model']:null;});}set['adapter'](_0xfebd79){if(this['_adapter'])throw new _0x2fe563('commentsrepository-adapter-already-set');this['_adapter']=_0xfebd79;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2f7c44=Mt,threadId:_0x3658cc=_0x42dee5(),comments:_0x29e166=[],unlinkedAt:_0x489176=null,resolvedAt:_0x4be980=null,resolvedBy:_0x57e593=null,target:_0x46a181=null,context:_0x51239f=null,attributes:_0x4a0764={},isResolvable:_0x4b66ab=!0x0,isSubmitted:_0x3752bd=!0x1,isFromAdapter:_0x433929=!0x1}={}){return this['fire'](xt('addCommentThread',_0x2f7c44),{'channelId':_0x2f7c44,'threadId':_0x3658cc,'comments':_0x29e166,'unlinkedAt':_0x489176,'resolvedAt':_0x4be980,'resolvedBy':_0x57e593,'target':_0x46a181,'context':_0x51239f,'attributes':_0x4a0764,'isFromAdapter':_0x433929,'isResolvable':_0x4b66ab,'isSubmitted':_0x3752bd}),this['getCommentThread'](_0x3658cc);}['openNewCommentThread']({channelId:_0x113d0c=Mt,threadId:_0x5c68ec=_0x42dee5(),target:_0x12d132,context:_0x2cf7b9=null,isResolvable:_0x14d684=!0x0}){if(this['_readOnlyChannels']['has'](_0x113d0c)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x12d132)throw new _0x2fe563('commentsrepository-missing-target');const _0x15c080=this['addCommentThread']({'channelId':_0x113d0c,'threadId':_0x5c68ec,'target':_0x12d132,'context':_0x2cf7b9,'isResolvable':_0x14d684});if(!_0x15c080)return null;const _0x26d9d2=this['_threadToController']['get'](_0x15c080),_0x541558=_0x26d9d2['view']['commentThreadInputView']['commentInputView'],_0x3ca89f=this['context']['plugins']['get'](Annotations),_0x3d88b6=_0x3ca89f['getByInnerView'](_0x26d9d2['view']);return _0x3ca89f['activate'](_0x3d88b6),_0x541558['once']('editorReady',()=>_0x541558['focus']()),_0x15c080;}['hasCommentThread'](_0x51062a){if('string'!=typeof _0x51062a)throw new _0x2fe563('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x51062a);}['updateCommentThread']({channelId:_0x5ce1e3=Mt,threadId:_0x566e94,context:_0xa530fa,unlinkedAt:_0x4e9f36,attributes:_0x132c69,isFromAdapter:_0x415ac6=!0x1}){return this['fire'](xt('updateCommentThread',_0x5ce1e3),{'channelId':_0x5ce1e3,'threadId':_0x566e94,'context':_0xa530fa,'unlinkedAt':_0x4e9f36,'attributes':_0x132c69,'isFromAdapter':_0x415ac6}),this['getCommentThread'](_0x566e94);}['getCommentThread'](_0x2204ec){if('string'!=typeof _0x2204ec)throw new _0x2fe563('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2204ec);}['fetchCommentThread']({channelId:_0x1d6821,threadId:_0x4f3193}={}){const _0x2ff82a=this['getCommentThread'](_0x4f3193);if(_0x2ff82a)return Promise['resolve'](_0x2ff82a);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2fe563('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1d6821,'threadId':_0x4f3193})['then'](_0x17e7c7=>this['hasCommentThread'](_0x4f3193)?this['getCommentThread'](_0x4f3193):_0x17e7c7?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1d6821},_0x17e7c7)):void 0x0)['catch'](_0x22a543=>{throw console['error'](_0x22a543),new _0x2fe563('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x38c346,skipNotAttached:_0x3756de=!0x1,skipEmpty:_0x1aa5a1=!0x1,toJSON:_0x322abe=!0x1}={}){const _0x5ef447=[];for(const _0x3a6d6e of this['_threads']['values']())_0x38c346&&_0x3a6d6e['channelId']!==_0x38c346||_0x3756de&&!_0x3a6d6e['isAttached']||_0x1aa5a1&&0x0===_0x3a6d6e['length']||_0x5ef447['push'](_0x3a6d6e);return _0x322abe?_0x5ef447['map'](_0x1ddaaf=>_0x1ddaaf['toJSON']()):_0x5ef447;}['getAnnotationForCommentThread'](_0x77a8b4){const _0x4be440=this['_threadToController']['get'](_0x77a8b4);if(!_0x4be440)return null;return this['context']['plugins']['get'](Annotations)['getByInnerView'](_0x4be440['view'])||null;}['getCommentThreadForAnnotation'](_0x2f8d52){const _0x35cce3=this['_viewToController']['get'](_0x2f8d52['innerView']);return _0x35cce3?_0x35cce3['model']:null;}['setActiveCommentThread'](_0x2e0e68){const _0x5aa93e=this['context']['plugins']['get'](Annotations);if(!_0x2e0e68)return void(this['activeCommentThread']&&_0x5aa93e['deactivateAll']());const _0xb45f11=this['getCommentThread'](_0x2e0e68);if(!_0xb45f11)throw new _0x2fe563('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2e0e68});if(!this['_threadToController']['has'](_0xb45f11))throw new _0x2fe563('commentsrepository-active-not-attached',null,{'threadId':_0x2e0e68});const _0x4a31f5=_0x5aa93e['getByInnerView'](this['_threadToController']['get'](_0xb45f11)['view']);_0x5aa93e['activate'](_0x4a31f5);}['switchReadOnly'](_0x54dcb0,_0x3afa65){_0x54dcb0?this['_readOnlyChannels']['add'](_0x3afa65):this['_readOnlyChannels']['delete'](_0x3afa65),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xda6fd5){return this['_readOnlyChannels']['has'](_0xda6fd5)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x500d23,_0x35cd45){return new CommentThreadController(_0x500d23,_0x35cd45);}['setPermissions'](_0x325f43,_0x10d678=Mt){this['_permissions']['set'](_0x10d678,_0x325f43),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x594858=Mt){return this['_permissions']['has'](_0x594858)?this['_permissions']['get'](_0x594858):St;}['_addCommentThread']({channelId:_0x33c7a8,threadId:_0x2f11ed,comments:_0x880041,unlinkedAt:_0x2d2e6b,resolvedAt:_0x58fc45,resolvedBy:_0x25623b,target:_0x11b9f4,context:_0x418d30,attributes:_0xe5122a,isFromAdapter:_0x3fbc84,isResolvable:_0x4071ac,isSubmitted:_0x5386f1}){if('string'!=typeof _0x2f11ed)throw new _0x2fe563('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2f11ed});if(this['hasCommentThread'](_0x2f11ed))throw new _0x2fe563('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2f11ed});const _0x24eaf6=new CommentThread(this,{'channelId':_0x33c7a8,'id':_0x2f11ed,'context':_0x418d30,'attributes':_0xe5122a,'unlinkedAt':_0x2d2e6b,'resolvedAt':_0x58fc45,'resolvedBy':_0x25623b?this['context']['plugins']['get'](_0x553121)['getUser'](_0x25623b):null,'isResolvable':_0x4071ac,'isSubmitted':_0x5386f1||_0x3fbc84});this['_threads']['set'](_0x2f11ed,_0x24eaf6);for(const _0x2e7a4a of _0x880041)_0x24eaf6['_add'](this['_createNewComment']({'threadId':_0x2f11ed,..._0x2e7a4a}));return _0x11b9f4&&_0x24eaf6['attachTo'](_0x11b9f4),_0x3fbc84||!_0x24eaf6['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x33c7a8,'threadId':_0x2f11ed});}['_submitCommentThread']({channelId:_0x42c148,threadId:_0x55f527}){if(!this['hasCommentThread'](_0x55f527))throw new _0x2fe563('commentsrepository-missing-comment-thread',this);const _0x848e18=this['getCommentThread'](_0x55f527);if(_0x848e18['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4c992c,comments:_0x3af0e4,resolvedAt:_0x4c00a8,resolvedBy:_0x1397c6,context:_0x29ec52,attributes:_0x24ae83}=_0x848e18,_0x36b0c3=this['context']['plugins']['get']('PendingActions'),_0x13b767=_0x36b0c3['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x42c148,'threadId':_0x4c992c,'comments':_0x3af0e4['map'](_0x33c8f0=>_0x33c8f0['toJSON']()),'resolvedAt':_0x4c00a8,'resolvedBy':_0x1397c6?_0x1397c6['id']:_0x1397c6,'context':_0x29ec52,'attributes':_0x24ae83})['then'](({comments:_0x120a52})=>{_0x36b0c3['remove'](_0x13b767);for(const _0xcc6255 of _0x120a52)this['_updateComment']({'channelId':_0x42c148,'threadId':_0x55f527,'commentId':_0xcc6255['commentId'],'createdAt':_0xcc6255['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x57c1cf=>{throw console['error'](_0x57c1cf),new _0x2fe563('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x162dbd,target:_0x2b029d}){const _0x5e260d=this['getCommentThread'](_0x162dbd);if(!_0x5e260d)throw new _0x2fe563('commentsrepository-attach-missing-comment-thread',this);const _0x14cef7=this['context']['plugins']['get']('PendingActions'),_0x2223e2=this['context']['plugins']['get'](Annotations),_0x23ad0f=this['_createCommentThreadView'](_0x5e260d),_0x5b2d1a=new CommentThreadController(_0x5e260d,_0x23ad0f);let _0x4dc976=null;_0x23ad0f['on']('change:isDirty',(_0x359921,_0x3f046d,_0x1b4ba2)=>{_0x1b4ba2?_0x4dc976=_0x14cef7['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4dc976&&(_0x14cef7['remove'](_0x4dc976),_0x4dc976=null);}),this['_threadToController']['set'](_0x5e260d,_0x5b2d1a),this['_viewToController']['set'](_0x23ad0f,_0x5b2d1a);const _0x49b552=new AnnotationView(this['context']['locale'],_0x23ad0f);_0x49b552['bind']('length')['to'](_0x23ad0f),_0x49b552['bind']('isDirty')['to'](_0x23ad0f,'isDirty',_0x23ad0f,'length',(_0x111421,_0x2faf4b)=>_0x111421||!_0x2faf4b),_0x49b552['bind']('isActive')['to'](_0x23ad0f),_0x49b552['type']='comment';const _0x403099=new Annotation({'view':_0x49b552,'target':_0x2b029d,'type':'comment','isVisible':!_0x5e260d['archivedAt']&&!!('function'==typeof _0x2b029d?_0x2b029d():_0x2b029d)});return _0x23ad0f['on']('escape',()=>{_0x403099['fire']('escape');}),this['_bindAnnotationToEditors'](_0x23ad0f,_0x403099),_0x2223e2['add'](_0x403099),_0x403099;}['_bindAnnotationToEditors'](_0x1fe25e,_0x3a9ec1){this['listenTo'](_0x1fe25e,'editorReady',(_0x12294b,_0x208e7b)=>{const _0x2d574e=_0x208e7b['ui']['view']['body']['bodyCollectionContainer'];_0x3a9ec1['focusableElements']['add'](_0x2d574e),this['context']instanceof _0x5e934d&&this['context']['ui']['focusTracker']['add'](_0x2d574e);},{'priority':'highest'}),this['listenTo'](_0x1fe25e,'editorDestroyed',(_0x1f8218,_0x14e5c9)=>{const _0x45d353=_0x14e5c9['ui']['view']['body']['bodyCollectionContainer'];_0x3a9ec1['focusableElements']['has'](_0x45d353)&&_0x3a9ec1['focusableElements']['remove'](_0x45d353),this['context']instanceof _0x5e934d&&this['context']['ui']['focusTracker']['remove'](_0x45d353);});}['_unbindEditors'](_0x308adc){this['stopListening'](_0x308adc,'editorReady'),this['stopListening'](_0x308adc,'editorDestroyed');}['_createCommentThreadView'](_0x4d79cf){const _0x1da68f=this['context']['plugins']['get'](_0x553121),{config:_0x39bb96,locale:_0x17b3a7}=this['context'],_0x5059b2=_0x4c9bee(_0x39bb96['get']('locale'),_0x17b3a7);return new(0x0,(_0x39bb96['get']('comments'))['CommentThreadView'])(_0x17b3a7,_0x4d79cf,_0x1da68f['me'],{'editorConfig':{..._0x39bb96['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x39bb96['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x39bb96['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x39bb96['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x39bb96['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5059b2,'CommentView':_0x39bb96['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2ac3a2,channelId:_0x141849,resolvedAt:_0x1e8423,resolvedBy:_0x3790ab,isFromAdapter:_0x46f570}){if(!this['hasCommentThread'](_0x2ac3a2))throw new _0x2fe563('commentsrepository-missing-comment-thread',null,{'threadId':_0x2ac3a2});const _0x321e36=this['getCommentThread'](_0x2ac3a2);if(_0x321e36['isResolved'])throw new _0x2fe563('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2ac3a2});const _0x20b274=this['context']['plugins']['get'](_0x553121);if(_0x321e36['resolvedBy']=_0x20b274['getUser'](_0x3790ab),_0x321e36['resolvedAt']=_0x1e8423,_0x46f570||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2347f8=this['context']['plugins']['get']('PendingActions'),_0x4c5e4d=_0x2347f8['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x141849,'threadId':_0x2ac3a2})['then'](({resolvedAt:_0x21979a,resolvedBy:_0x349e25})=>{_0x2347f8['remove'](_0x4c5e4d),_0x321e36['resolvedBy']['id']!==_0x349e25&&(_0x321e36['resolvedBy']=_0x20b274['getUser'](_0x349e25)),_0x321e36['resolvedAt']=_0x21979a;})['catch'](_0x54d0af=>{throw console['error'](_0x54d0af),new _0x2fe563('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3f126e,channelId:_0x176503,isFromAdapter:_0x2ba729}){if(!this['hasCommentThread'](_0x3f126e))throw new _0x2fe563('commentsrepository-missing-comment-thread',null,{'threadId':_0x3f126e});const _0x5361d2=this['getCommentThread'](_0x3f126e);if(!_0x5361d2['isResolved'])throw new _0x2fe563('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3f126e});if(_0x5361d2['resolvedBy']=null,_0x5361d2['resolvedAt']=null,_0x2ba729||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3cb732=this['context']['plugins']['get']('PendingActions'),_0x1b60b5=_0x3cb732['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x176503,'threadId':_0x3f126e})['then'](()=>_0x3cb732['remove'](_0x1b60b5))['catch'](_0x4e0716=>{throw console['error'](_0x4e0716),new _0x2fe563('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x266baa,isFromAdapter:_0x2aa1fa}){const _0x35d4e0=this['getCommentThread'](_0x266baa);if(!_0x35d4e0)throw new _0x2fe563('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x266baa),this['_threads']['delete'](_0x266baa),!_0x35d4e0['isSubmitted']||_0x2aa1fa||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x147e9e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4d73b4}=_0x35d4e0,_0x144b95=_0x147e9e['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4d73b4,'threadId':_0x266baa})['then'](()=>_0x147e9e['remove'](_0x144b95))['catch'](_0x4bbe3b=>{throw console['error'](_0x4bbe3b),new _0x2fe563('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x56eb03,unlinkedAt:_0xd61636,context:_0x21284f,attributes:_0x4acfa1,isFromAdapter:_0xb73c2b}){if('string'!=typeof _0x56eb03)throw new _0x2fe563('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x56eb03});if(!this['hasCommentThread'](_0x56eb03))throw new _0x2fe563('commentsrepository-missing-comment-thread',null,{'threadId':_0x56eb03});const _0xd3e17e=this['getCommentThread'](_0x56eb03);let _0x40ea1f=!0x1;if(void 0x0!==_0x21284f&&_0xd3e17e['context']!==_0x21284f&&(_0xd3e17e['context']=_0x21284f,_0x40ea1f=!0x0),void 0x0!==_0xd61636&&_0xd3e17e['unlinkedAt']!==_0xd61636&&(_0xd3e17e['unlinkedAt']=_0xd61636,_0x40ea1f=!0x0),_0x4acfa1&&!_0x3c009b(_0x4acfa1,_0xd3e17e['attributes'])&&(_0xd3e17e['attributes']=_0x4acfa1,_0x40ea1f=!0x0),!_0x40ea1f)return Promise['resolve']();if(!_0xd3e17e['isSubmitted']||_0xb73c2b||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x8428f3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x53ac9e}=_0xd3e17e,_0xefc3cf=_0x8428f3['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x53ac9e,'threadId':_0x56eb03,'context':_0x21284f,'unlinkedAt':_0xd61636,'attributes':_0x4acfa1})['then'](()=>_0x8428f3['remove'](_0xefc3cf))['catch'](_0x4086f7=>{throw console['error'](_0x4086f7),new _0x2fe563('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xe15f55){const _0x54b18c=this['context']['plugins']['get'](Annotations),_0x5abb77=this['getCommentThread'](_0xe15f55);if(_0x5abb77['_isAttached']=!0x1,this['_threadToController']['has'](_0x5abb77)){const _0x5da797=this['_threadToController']['get'](_0x5abb77),_0x5c27e2=_0x5da797['view'],_0x4e3aa4=_0x54b18c['getByInnerView'](_0x5c27e2);this['_threadToController']['delete'](_0x5abb77),this['_viewToController']['delete'](_0x5c27e2),_0x4e3aa4&&_0x54b18c['remove'](_0x4e3aa4),_0x5da797['destroy'](),_0x5c27e2['destroy']()['then'](()=>{this['_unbindEditors'](_0x5c27e2);});}}['_updateActiveAnnotation']({threadId:_0x1ab3a7,resolvedAt:_0x584b68,unlinkedAt:_0x5e91e9}){const _0x414b2f=!!_0x584b68,_0x4d1c3d=this['context']['plugins']['get'](Annotations),_0x57a091=this['getCommentThread'](_0x1ab3a7);if(this['_threadToController']['has'](_0x57a091)){const _0x215815=this['_threadToController']['get'](_0x57a091)['view'],_0xf05320=_0x4d1c3d['getByInnerView'](_0x215815);_0xf05320&&(_0x414b2f&&_0x4d1c3d['_removeActiveAnnotation'](_0xf05320),_0x5e91e9?_0xf05320['isVisible']=!0x1:_0xf05320['refreshVisibility']());}}['_getExternalAuthor'](_0x500653){const _0x2891b2=this['context']['plugins']['get'](_0x553121),_0x3b99df=_0x1f1b92('external:'+_0x500653),_0x32f181=_0x2891b2['getUser'](_0x3b99df);return _0x32f181||_0x2891b2['addUser']({'id':_0x3b99df,'name':_0x500653});}['_createNewComment']({threadId:_0x4e43b5,commentId:_0x394253=_0x42dee5(),content:_0xc7b7c1,authorId:_0x53b6fe,createdAt:_0x30cf53,attributes:_0x132b6d}){if('string'!=typeof _0x394253)throw new _0x2fe563('commentsrepository-invalid-commentid');if('string'!=typeof _0x53b6fe)throw new _0x2fe563('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xc7b7c1||!_0xc7b7c1['trim']())throw new _0x2fe563('commentsrepository-invalid-comment-content');const _0x4d3ff3=this['context']['plugins']['get'](_0x553121)['getUser'](_0x53b6fe);if(!_0x4d3ff3)throw new _0x2fe563('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x53b6fe});let _0x13d8da=null,_0x5e0114=_0x30cf53;return _0x132b6d?.['@external']&&(_0x13d8da=this['_getExternalAuthor'](_0x132b6d['@external']['authorName']),_0x5e0114=new Date(_0x132b6d['@external']['createdAt'])),new Comment(this,{'threadId':_0x4e43b5,'id':_0x394253,'author':_0x13d8da||_0x4d3ff3,'creator':_0x4d3ff3,'content':_0xc7b7c1,'createdAt':_0x30cf53,'authoredAt':_0x5e0114,'attributes':_0x132b6d});}['_addComment'](_0x47f4b0){let {threadId:_0x62af76,content:_0x4b400c,attributes:_0x1fc658,isFromAdapter:_0x36ea74}=_0x47f4b0;const _0x29e3de=this['getCommentThread'](_0x47f4b0['threadId']);if(!_0x29e3de)throw new _0x2fe563('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x1dc923=this['_createNewComment'](_0x47f4b0),{id:_0x31fe2e}=_0x1dc923;if(_0x29e3de['_add'](_0x1dc923),_0x36ea74||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x29e3de['isSubmitted'])return Promise['resolve']();const _0x325d26=this['context']['plugins']['get']('PendingActions'),{channelId:_0x39df21}=_0x29e3de,_0x230a9d=_0x325d26['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1fc658||(_0x1fc658={}),this['adapter']['addComment']({'channelId':_0x39df21,'threadId':_0x62af76,'commentId':_0x31fe2e,'content':_0x4b400c,'attributes':_0x1fc658})['then'](_0x34621b=>{_0x325d26['remove'](_0x230a9d),_0x34621b&&this['_updateComment']({'channelId':_0x39df21,'threadId':_0x62af76,'commentId':_0x31fe2e,'createdAt':_0x34621b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x339e05=>{throw console['error'](_0x339e05),new _0x2fe563('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x1d4308,commentId:_0x385960,content:_0x5af03e,createdAt:_0x325f72,attributes:_0x11491f,isFromAdapter:_0x40cd4a}){if(void 0x0!==_0x5af03e&&('string'!=typeof _0x5af03e||!_0x5af03e['trim']()['length']))throw new _0x2fe563('commentsrepository-update-comment-invalid-content');const _0x15c6c2=this['getCommentThread'](_0x1d4308),_0x560785=_0x15c6c2['getComment'](_0x385960);if(!_0x560785)throw new _0x2fe563('commentsrepository-update-missing-comment',this);let _0xcdd505=!0x1;if(_0x5af03e&&_0x5af03e!==_0x560785['content']&&(_0x560785['isEditable']||_0x40cd4a)&&(_0x560785['content']=_0x5af03e,_0xcdd505=!0x0),_0x325f72&&_0x325f72!==_0x560785['createdAt']&&(_0x560785['createdAt']=_0x325f72,_0x560785['attributes']&&_0x560785['attributes']['@external']||(_0x560785['authoredAt']=_0x325f72),_0xcdd505=!0x0),_0x11491f&&!_0x3c009b(_0x11491f,_0x560785['attributes'])&&(_0x560785['attributes']=_0x11491f,_0xcdd505=!0x0),!_0xcdd505)return Promise['resolve']();if(_0x15c6c2['fire']('commentUpdated'),_0x40cd4a||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x548d3b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4eb225}=this['getCommentThread'](_0x560785['threadId']),_0x2a1583=_0x548d3b['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4eb225,'threadId':_0x1d4308,'commentId':_0x385960,'content':_0x5af03e,'attributes':_0x11491f})['then'](()=>_0x548d3b['remove'](_0x2a1583))['catch'](_0x5a4dc6=>{throw console['error'](_0x5a4dc6),new _0x2fe563('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x4a6fa3,commentId:_0x3f6803,isFromAdapter:_0x4ec0a8}){const _0x48f92f=this['getCommentThread'](_0x4a6fa3),_0x14dec6=_0x48f92f['getComment'](_0x3f6803);if(!_0x14dec6)throw new _0x2fe563('commentsrepository-remove-missing-comment',this);if(_0x48f92f['_remove'](_0x14dec6),_0x4ec0a8||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5a87cf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x53a90e}=_0x48f92f,_0x31e5f1=_0x5a87cf['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x53a90e,'threadId':_0x4a6fa3,'commentId':_0x3f6803})['then'](()=>_0x5a87cf['remove'](_0x31e5f1))['catch'](_0x20a77c=>{throw console['error'](_0x20a77c),new _0x2fe563('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
30
- _0x5693a9(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x2ac572,_0x40d17f){super();const _0x1f6a7a=_0x40d17f['isResolvable'];this['channelId']=_0x40d17f['channelId'],this['id']=_0x40d17f['id'],this['comments']=new _0x4c964f(),this['_repository']=_0x2ac572,this['_isAttached']=!0x1,this['_isSubmitted']=_0x40d17f['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2ac572,'_permissions',_0x2ac572,'_readOnlyChannels',()=>_0x2ac572['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2ac572,'_permissions',()=>_0x2ac572['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2ac572,'_permissions',()=>{const _0x9ce5a3=_0x2ac572['getPermissions'](this['channelId']);return _0x9ce5a3['write']||_0x9ce5a3['admin'];}),this['bind']('isResolvable')['to'](_0x2ac572,'_permissions',()=>_0x1f6a7a&&_0x2ac572['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x40d17f['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4642fe,_0x4f7ad7)=>_0x4642fe?_0x4f7ad7?_0x4642fe<_0x4f7ad7?_0x4642fe:_0x4f7ad7:_0x4642fe:_0x4f7ad7),this['set']('unlinkedAt',_0x40d17f['unlinkedAt']||null),this['set']('resolvedAt',_0x40d17f['resolvedAt']||null),this['set']('resolvedBy',_0x40d17f['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x113119=>!!_0x113119),this['set']('attributes',_0x40d17f['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x98a7c8,_0xe86b77)=>_0x98a7c8+_0xe86b77['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x1363a3,id:_0x3f7d58}=this;this['_repository']['fire'](xt('submitCommentThread',_0x1363a3),{'channelId':_0x1363a3,'threadId':_0x3f7d58});}['setUnlinkedAt'](_0x28ab7e){this['_update']({'unlinkedAt':_0x28ab7e});}['resolve']({resolvedAt:_0x29ce77=new Date(),resolvedBy:_0x3108d5='',isFromAdapter:_0x1069ec=!0x1}={}){const _0x5b8429=this['_repository']['context']['plugins']['get'](_0x553121)['me'],{channelId:_0x5b4ef8,id:_0x2c35ca}=this;this['_repository']['fire'](xt('resolveCommentThread',_0x5b4ef8),{'channelId':_0x5b4ef8,'threadId':_0x2c35ca,'resolvedAt':_0x29ce77,'resolvedBy':_0x3108d5||_0x5b8429['id'],'isFromAdapter':_0x1069ec});}['reopen']({isFromAdapter:_0x21907a=!0x1}={}){const {channelId:_0x539dde,id:_0x4bf4e5}=this;this['_repository']['fire'](xt('reopenCommentThread',_0x539dde),{'channelId':_0x539dde,'threadId':_0x4bf4e5,'isFromAdapter':_0x21907a});}['setContext'](_0x537674){this['context']||this['_update']({'context':_0x537674});}['setAttribute'](_0x1b4b66,_0x3fb2ed){const _0xd72a13=_0x2d234d(this['attributes']);_0x19d9b2(_0xd72a13,_0x1b4b66,_0x3fb2ed),this['_update']({'attributes':_0xd72a13});}['removeAttribute'](_0x13c331){const _0x5367a8=_0x2d234d(this['attributes']);_0x30bcc7(_0x5367a8,_0x13c331),this['_update']({'attributes':_0x5367a8});}['remove']({isFromAdapter:_0xf6f911=!0x1}={}){const {channelId:_0x8e0068,id:_0x5e07cb}=this;this['_repository']['fire'](xt('removeCommentThread',_0x8e0068),{'channelId':_0x8e0068,'threadId':_0x5e07cb,'isFromAdapter':_0xf6f911});}['attachTo'](_0x2f0919){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2f0919});}['addComment'](_0x564fcc){const {channelId:_0x6d7ddc,id:_0x51160a}=this;this['_repository']['fire'](xt('addComment',_0x6d7ddc,_0x51160a),Object['assign']({'channelId':_0x6d7ddc,'threadId':_0x51160a},_0x564fcc));}['getComment'](_0x89c01c){if('string'!=typeof _0x89c01c)throw new _0x2fe563('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x89c01c});return this['comments']['get'](_0x89c01c);}['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'](_0x5308d5=>_0x5308d5['toJSON']()),'attributes':this['attributes']};}['_add'](_0x492406){return this['listenTo'](_0x492406,'change:authoredAt',()=>{const _0x41ff0b=this['_findOptimalIndex'](_0x492406),_0x36010b=this['comments'];_0x41ff0b-0x1!=_0x36010b['getIndex'](_0x492406)&&_0x41ff0b+0x1!=_0x36010b['getIndex'](_0x492406)&&(this['_remove'](_0x492406),this['_add'](_0x492406));}),this['comments']['add'](_0x492406,this['_findOptimalIndex'](_0x492406));}['_update'](_0x2dcc87){const {channelId:_0x258c5a,id:_0x5a080a}=this;this['_repository']['fire'](xt('updateCommentThread',_0x258c5a),{..._0x2dcc87,'channelId':_0x258c5a,'threadId':_0x5a080a});}['_remove'](_0x2e0be9){return this['stopListening'](_0x2e0be9),_0x2e0be9['destroy'](),this['comments']['remove'](_0x2e0be9);}['_findOptimalIndex'](_0x413f41){const _0x312ed5=this['comments']['find'](_0x1c1c29=>new Date(_0x1c1c29['authoredAt'])['getTime']()>new Date(_0x413f41['authoredAt'])['getTime']());return _0x312ed5?this['comments']['getIndex'](_0x312ed5):this['length'];}}class Comment extends/* #__PURE__ -- @preserve */
31
- _0x5693a9(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x482864,_0x4d4dcd){super();const _0x439c32=_0x482864['context']['plugins']['get'](_0x553121)['me'],_0x154b5c=_0x482864['getCommentThread'](_0x4d4dcd['threadId']),_0x31ad87=0x0===_0x154b5c['comments']['length'],_0x4b0559=_0x439c32===_0x4d4dcd['author'];this['id']=_0x4d4dcd['id'],this['threadId']=_0x4d4dcd['threadId'],this['author']=_0x4d4dcd['author'],this['creator']=_0x4d4dcd['creator'],this['isExternal']=Boolean(_0x4d4dcd['attributes']&&_0x4d4dcd['attributes']['@external']),this['set']('content',_0x4d4dcd['content']),this['createdAt']=_0x4d4dcd['createdAt']||new Date(),this['set']('authoredAt',_0x4d4dcd['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x154b5c,'resolvedAt'),this['set']('attributes',_0x4d4dcd['attributes']||{}),this['bind']('isEditable')['to'](_0x482864,'_permissions',()=>{const _0xdd6ad4=_0x482864['getPermissions'](_0x154b5c['channelId'])['write'],_0x58e9ff=_0x482864['getPermissions'](_0x154b5c['channelId'])['modifyAll'];return _0x4b0559&&_0xdd6ad4||!_0x4b0559&&_0x58e9ff;}),this['bind']('isRemovable')['to'](_0x154b5c,'isRemovable',_0x482864,'_permissions',_0x57e298=>{const _0x3bc55a=_0x482864['getPermissions'](_0x154b5c['channelId'])['write'],_0x442a4b=_0x482864['getPermissions'](_0x154b5c['channelId'])['modifyAll'];return _0x4b0559&&_0x3bc55a||_0x57e298&&_0x31ad87||!_0x4b0559&&_0x442a4b&&!_0x31ad87;}),this['bind']('isReadOnly')['to'](_0x154b5c,'isReadOnly'),this['_repository']=_0x482864;}get['weight'](){return Math['max'](function(_0x3adac9){const _0x2d3f04=document['createElement']('div');return _0x2d3f04['innerHTML']=_0x3adac9,_0x2d3f04['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3ab9b0){const {threadId:_0x2214d5,id:_0x2e456b}=this;if(!this['_repository']['hasCommentThread'](_0x2214d5))throw new _0x2fe563('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5b1621}=this['_repository']['getCommentThread'](_0x2214d5);this['_repository']['fire'](xt('updateComment',_0x5b1621,_0x2214d5),{'channelId':_0x5b1621,'threadId':_0x2214d5,'commentId':_0x2e456b,..._0x3ab9b0});}['setAttribute'](_0x495592,_0x4ff423){const _0x326673=_0x2d234d(this['attributes']);_0x19d9b2(_0x326673,_0x495592,_0x4ff423),this['update']({'attributes':_0x326673});}['removeAttribute'](_0x1bdd79){const _0x2140e3=_0x2d234d(this['attributes']);_0x30bcc7(_0x2140e3,_0x1bdd79),this['update']({'attributes':_0x2140e3});}['remove'](_0x27422d={}){if(!_0x27422d['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x5a5d44,id:_0xc61c79}=this;if(!this['_repository']['hasCommentThread'](_0x5a5d44))throw new _0x2fe563('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x297949}=this['_repository']['getCommentThread'](_0x5a5d44);this['_repository']['fire'](xt('removeComment',_0x297949,_0x5a5d44),{'channelId':_0x297949,'threadId':_0x5a5d44,'commentId':_0xc61c79,..._0x27422d});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x4e03ea,..._0x20c799){for(const _0x3c2ed5 of _0x20c799)void 0x0!==_0x3c2ed5&&(_0x4e03ea+=':'+String(_0x3c2ed5));return _0x4e03ea;}class AddCommentThreadCommand extends _0x4b2d4d{constructor(_0x4dfe1d){super(_0x4dfe1d),this['set']('hasContent',!0x1);}['refresh'](){const _0x3dce52=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x176962 of _0x3dce52['getRanges']())if(this['_hasContent'](_0x176962))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x132f05=_0x42dee5(),ranges:_0x41cd71,comment:_0x10ec46}={}){const _0x529a3f=this['editor']['model'],_0x489e2c=_0x41cd71??Array['from'](_0x529a3f['document']['selection']['getRanges']()),_0x449a52=[];for(const _0xf0b5b9 of _0x489e2c)this['_hasContent'](_0xf0b5b9)&&_0x449a52['push'](this['_trimToContent'](_0xf0b5b9));if(!_0x449a52['length'])throw new _0x2fe563('addcommentthreadcommand-incorrect-ranges',null);_0x10ec46&&this['_createCommentThread'](_0x132f05,_0x10ec46),this['_createMarkersFromRanges'](_0x132f05,_0x449a52,!!_0x10ec46);}['_createMarkersFromRanges'](_0x2f5fb9,_0x1089e1,_0x310582){this['editor']['model']['change'](_0x31f95b=>{for(const _0x5ef31b of _0x1089e1){const _0x4f4e4c=_0x42dee5()['substr'](0x1,0x5),_0x1f2aa3='comment:'+_0x2f5fb9+':'+_0x4f4e4c;_0x31f95b['addMarker'](_0x1f2aa3,{'range':_0x5ef31b,'usingOperation':_0x310582,'affectsData':_0x310582});}});}['_createCommentThread'](_0x2b1245,_0x4e4bb8){const _0x46e333=this['editor']['plugins']['get']('CommentsRepository'),_0x4c710d=this['editor']['config']['get']('collaboration.channelId'),_0x20b789=this['editor']['plugins']['get']('Users')['me'];if(!_0x20b789)throw new _0x2fe563('addcommentthreadcommand-user-not-found',null);_0x46e333['addCommentThread']({'threadId':_0x2b1245,'channelId':_0x4c710d,'comments':[{'authorId':_0x20b789['id'],'content':_0x4e4bb8,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x929313){for(const _0x3d051a of _0x929313['getItems']())if(this['_itemIsContent'](_0x3d051a))return!0x0;return!0x1;}['_itemIsContent'](_0x29404a){return _0x29404a['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x29404a)&&!_0x29404a['is']('element','tableCell');}['_trimToContent'](_0x5279d4){const _0x148157=_0x3386dc=>!this['_itemIsContent'](_0x3386dc['item']),_0x489d79=_0x5279d4['start']['getLastMatchingPosition'](_0x148157),_0x36cc4d=_0x5279d4['end']['getLastMatchingPosition'](_0x148157,{'direction':'backward'});return this['editor']['model']['createRange'](_0x489d79,_0x36cc4d);}}class EditorAnnotations extends _0x557e23{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[Annotations];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x404ab2){super(_0x404ab2),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x26b31e=this['editor'],_0x294991=_0x26b31e['model']['document']['selection'],_0x4fdf39=_0x4fd98b(()=>this['refreshSelectedViews'](),0xa);_0x294991['on']('change:range',(_0x16b8f2,_0x460e6a)=>{_0x460e6a['directChange']&&(_0x4fdf39['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x26b31e['editing']['view']['document'],'change:isFocused',(_0x1b3b88,_0x3d1fb1,_0x80d2d6)=>{_0x80d2d6&&_0x4fdf39();}),this['listenTo'](_0x26b31e['ui']['focusTracker'],'change:isFocused',(_0x378bdb,_0x231c1e,_0x25919e)=>{_0x25919e||this['fire']('blur',{'isAnnotationTracked':_0x264a95=>this['_editorAnnotationsData']['has'](_0x264a95['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x29b32f){if(this['_editorAnnotations']['has'](_0x29b32f['view']))return;this['_editorAnnotations']['add'](_0x29b32f['view']),this['editor']['ui']['focusTracker']['add'](_0x29b32f['view']['element']);const _0x501262=this['editor']['plugins']['get'](Annotations);this['listenTo'](_0x501262['collection'],'remove',(_0x27bb38,_0x13c13a)=>{this['editor']['ui']['focusTracker']['remove'](_0x13c13a['view']['element']),this['_editorAnnotations']['delete'](_0x13c13a['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4826d7){if('function'!=typeof _0x4826d7)throw new _0x2fe563('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4826d7);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x5bc430,annotations:_0xa0327}){const _0x1825e9=[],_0x32b08d=this['editor']['model']['document']['selection'],_0x5e7546=Array['from'](_0x32b08d['getRanges']());for(const [_0x251502,_0x20d3b9]of this['_editorAnnotationsData']){const _0x50bcef=_0x2eb234(_0x20d3b9),_0x597126=_0xa0327['getByInnerView'](_0x251502);_0x50bcef&&_0x597126&&_0x1825e9['push']({'annotation':_0x597126,'range':_0x50bcef});}function _0x2eb234(_0x2bcfc1){for(const _0xb7e9c8 of _0x2bcfc1)for(const _0x2aad21 of _0x5e7546)if(_0xb7e9c8['containsRange'](_0x2aad21,!_0x32b08d['isCollapsed']))return _0xb7e9c8;return null;}return _0x1825e9['sort']((_0x337040,_0x1ccf4b)=>{const _0x44715b=_0x337040['range'],_0x344d50=_0x1ccf4b['range'];if(!_0x44715b['isEqual'](_0x344d50)){if(_0x44715b['containsRange'](_0x344d50,!0x0))return 0x1;if(_0x344d50['containsRange'](_0x44715b,!0x0))return-0x1;}return _0x337040['annotation']==_0x5bc430?-0x1:_0x1ccf4b['annotation']==_0x5bc430?0x1:0x0;})['map'](_0x2d50fe=>_0x2d50fe['annotation']);}get['_editorAnnotationsData'](){const _0x210806=new Map();for(const _0x915e60 of Array['from'](this['_dataCollectors']))for(const [_0x2787b9,_0x95cdf8]of _0x915e60())_0x210806['set'](_0x2787b9,_0x95cdf8);return _0x210806;}}class CommentsRestrictedEditingMode extends _0x557e23{['afterInit'](){const _0x460e1b=this['editor'];if(!_0x460e1b['plugins']['has']('RestrictedEditingModeEditing'))return;_0x460e1b['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class CommentsImportWord extends _0x557e23{constructor(_0x1f042b){super(_0x1f042b),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x14456b=this['editor'],_0x343957=_0x14456b['commands']['get']('importWord'),_0x2ab94d=_0x14456b['plugins']['get'](_0x553121);_0x343957&&(_0x343957['on']('execute',(_0x56573e,[,_0x309f98])=>{_0x309f98['collaboration_features']={'comments':!0x0,'user_id':_0x2ab94d['me']['id']};},{'priority':_0x241b73['high']+0xa}),this['listenTo'](_0x343957,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x568a9d,_0x5179fb){const {comment_threads:_0x30bf07}=_0x5179fb;_0x30bf07&&_0x30bf07['forEach'](({thread_id:_0x59125b,comments:_0x555eb2,is_resolved:_0x1f2234})=>{const _0x2a612b=new Date(),_0x2f6dcb=_0x555eb2['map'](({author:_0x24aa48,content:_0x2be0c0,created_at:_0x1e081c})=>({'content':_0x2be0c0,'authorId':this['editor']['plugins']['get'](_0x553121)['me']['id'],'createdAt':_0x2a612b,'attributes':{'@external':{'authorName':_0x24aa48,'createdAt':_0x1e081c?new Date(_0x1e081c):new Date(),'source':'importWord'}}})),_0x5e8dfa=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](CommentsRepository)['addCommentThread']({'channelId':_0x5e8dfa,'threadId':_0x59125b,'comments':_0x2f6dcb,'resolvedAt':_0x1f2234?_0x2a612b:null});});}}class CommentsClipboard extends _0x557e23{constructor(_0x4513d3){super(_0x4513d3),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x519c3a=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x519c3a,'contentInsertion',(_0x272998,_0x40c795)=>this['_removeMarkersWithoutThreads'](_0x40c795['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x33ad46){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x33ad46;const _0x4848ea=this['editor']['plugins']['get']('CommentsRepository');for(const _0x42820f of _0x33ad46['keys']()){const [_0x3e6c1f,_0xe6cd13]=_0x42820f['split'](':');'comment'!=_0x3e6c1f||_0x4848ea['hasCommentThread'](_0xe6cd13)||_0x33ad46['delete'](_0x42820f);}return _0x33ad46;}['_registerMarkerInClipboardPipeline'](){const _0x4cfe57=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x55be53=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x55be53&&_0x4cfe57['_registerMarkerToCopy']('comment',_0x55be53);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x35af1c){switch(_0x35af1c){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function Pt(_0x1fa39e){const _0x263003=_0x1fa39e['split'](':');return{'group':_0x263003[0x0],'id':_0x263003[0x1],'part':_0x263003[0x2]};}class ShowCommentHighlights extends _0x557e23{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x446f19,_0x57770f)=>{if(!_0x57770f['options']['showCommentHighlights'])return null;if(_0x57770f['options']['ignoreResolvedComments']){const {id:_0x554c54}=Pt(_0x446f19['markerName']),_0x590e2f=this['editor']['plugins']['get'](CommentsRepository);if(_0x590e2f['getCommentThread'](_0x554c54)?.['isResolved']&&_0x446f19['item'])return _0x57770f['consumable']['consume'](_0x446f19['item'],'addMarker:'+_0x446f19['markerName']),_0x57770f['consumable']['consume'](_0x446f19['item'],'removeMarker:'+_0x446f19['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x57d8f5=>{_0x57d8f5['on']('addMarker:comment',(_0x44b295,_0x4a8eba,_0x1241ae)=>{if(!_0x1241ae['options']['showCommentHighlights'])return;const _0x30335c=_0x4a8eba['item'];if(!_0x30335c)return;const _0x2ddde7=_0x1241ae['mapper']['toViewElement'](_0x30335c);this['editor']['model']['schema']['isObject'](_0x30335c)&&_0x2ddde7&&!_0x2ddde7['getCustomProperty']('widget')&&_0x2ddde7['is']('containerElement')&&It(_0x2ddde7,_0x1241ae['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3de117,{writer:_0x12ffbe,options:_0x67cf67})=>{if(!_0x67cf67['showCommentHighlights'])return null;const _0x205558=_0x12ffbe['createContainerElement']('div'),_0x2f03ce=_0x12ffbe['createEmptyElement']('hr');return _0x12ffbe['addClass']('ck-horizontal-line',_0x205558),_0x12ffbe['insert'](_0x12ffbe['createPositionAt'](_0x205558,0x0),_0x2f03ce),_0x205558;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5bf599,{writer:_0x48b10a,options:_0x69ffaa})=>{if(!_0x69ffaa['showCommentHighlights'])return null;const _0x3e112c=_0x48b10a['createContainerElement']('span'),_0x21707f=_0x48b10a['createEmptyElement']('img');return _0x48b10a['addClass']('image-inline',_0x3e112c),_0x48b10a['insert'](_0x48b10a['createPositionAt'](_0x3e112c,0x0),_0x21707f),_0x3e112c;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x552f3b,{writer:_0x5b5f2c,options:_0x5d191c})=>{if(_0x5d191c['showCommentHighlights'])return _0x5b5f2c['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x48b41c,_0x3ce8c5,_0x5e7d5b)=>{_0x5e7d5b['options']['showCommentHighlights']&&_0x48b41c['stop']();},{'priority':'high'});}}class CommentsEditing extends _0x557e23{static get['requires'](){return[CommentsRepository,EditorAnnotations,_0x553121,CommentsRestrictedEditingMode,CommentsImportWord,CommentsClipboard,ShowCommentHighlights];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x30f18f){super(_0x30f18f),this['set']('isThreadsLoadingPaused',!0x0),_0x30f18f['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5b7368,_0x26cdbf,_0x5f569f,_0x5553d9)=>{const _0x2e2a75=_0x30f18f['plugins']['get'](CommentsRepository),_0x19133e=_0x5f569f?Pt(_0x5f569f)['id']:null;_0x30f18f['model']['change'](()=>{if(_0x19133e){const _0x196f23=this['getAllMarkersForId'](_0x19133e);for(const _0xc0c0a3 of _0x196f23)_0x30f18f['editing']['reconvertMarker'](_0xc0c0a3);}if(_0x5553d9){const {id:_0x58c18b}=Pt(_0x5553d9),_0x3c255e=_0x2e2a75['getCommentThread'](_0x58c18b);if(_0x3c255e&&_0x3c255e['unlinkedAt'])return;if(_0x3c255e&&!_0x3c255e['isAttached'])return;const _0x19c8a1=this['getAllMarkersForId'](_0x58c18b);for(const _0xaf3c9a of _0x19c8a1)_0x30f18f['editing']['reconvertMarker'](_0xaf3c9a);}}),_0x19133e&&this['scrollToThreadMarker'](_0x19133e);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x309d9f=this['editor'],_0x3d36cb=_0x309d9f['plugins']['get'](CommentsRepository),_0x3c5a8d=_0x309d9f['config']['get']('collaboration.channelId'),_0x21ce07=_0x3d36cb['getCommentThreads']()['filter'](_0x3bd4a7=>_0x3bd4a7['channelId']!==_0x3c5a8d);_0x309d9f['commands']['add']('addCommentThread',new AddCommentThreadCommand(_0x309d9f)),this['listenTo'](_0x309d9f,'change:isReadOnly',(_0x3dd15f,_0x3c13c2,_0x218ec9)=>{_0x3d36cb['switchReadOnly'](_0x218ec9,_0x309d9f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3d36cb,Vt('addCommentThread',_0x3c5a8d),(_0x142df8,{threadId:_0x5a4728})=>{const _0x430917=this['editor']['plugins']['get'](CommentsRepository)['getCommentThread'](_0x5a4728);_0x430917?.['unlinkedAt']&&this['_attachArchivedThread'](_0x5a4728);}),this['listenTo'](_0x3d36cb,Vt('removeCommentThread',_0x3c5a8d),(_0x4e18e5,{threadId:_0x2788c4})=>{_0x309d9f['model']['enqueueChange']({'isUndoable':!0x1},_0x13f695=>{const _0x3578ad=this['getAllMarkersForId'](_0x2788c4);for(const _0x26c54a of _0x3578ad)_0x13f695['removeMarker'](_0x26c54a);});}),this['listenTo'](_0x3d36cb,Vt('resolveCommentThread',_0x3c5a8d),(_0x714514,{threadId:_0x272a29})=>{this['_reconvertMarkers'](_0x272a29);const _0x2205bd=this['editor']['plugins']['get'](Annotations);(this['editor']['editing']['view']['hasDomSelection']||_0x2205bd['collection']['isFocused'])&&(this['editor']['plugins']['get'](CommentsRepository)['getCommentThread'](_0x272a29)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3d36cb,Vt('reopenCommentThread',_0x3c5a8d),(_0x40d42f,{threadId:_0x1c58c0})=>{this['_reconvertMarkers'](_0x1c58c0);},{'priority':'low'}),this['listenTo'](_0x3d36cb,Vt('addComment',_0x3c5a8d),(_0x5599f4,{threadId:_0x423605,isFromAdapter:_0x34776a})=>{const _0x5d6a14=this['getAllMarkersForId'](_0x423605);if(_0x34776a||0x0==_0x5d6a14['length']||!_0x3d36cb['hasCommentThread'](_0x423605))return;0x1===_0x3d36cb['getCommentThread'](_0x423605)['length']&&_0x309d9f['model']['enqueueChange']({'isUndoable':!0x1},_0x4116dd=>{for(const _0x136eca of _0x5d6a14)_0x4116dd['updateMarker'](_0x136eca,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x21ce07);}['afterInit'](){!async function(_0x38f2ea){const _0x5b5284=_0x512fb0([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x2f7fed=0x73460ab3,_0x3185c6=0x7341810b^_0x2f7fed,_0x14293f=window[_0x512fb0([0x44,0x61,0x74,0x65])][_0x512fb0([0x6e,0x6f,0x77])](),_0x4497c2=_0x38f2ea[_0x512fb0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x40bfe3=new window[(_0x512fb0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x14a443=>{_0x4497c2[_0x512fb0([0x6f,0x6e,0x63,0x65])](_0x512fb0([0x72,0x65,0x61,0x64,0x79]),_0x14a443);}),_0x2bd0c0={[_0x512fb0([0x6b,0x74,0x79])]:_0x512fb0([0x45,0x43]),[_0x512fb0([0x75,0x73,0x65])]:_0x512fb0([0x73,0x69,0x67]),[_0x512fb0([0x63,0x72,0x76])]:_0x512fb0([0x50,0x2d,0x32,0x35,0x36]),[_0x512fb0([0x78])]:_0x512fb0([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x512fb0([0x79])]:_0x512fb0([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x512fb0([0x61,0x6c,0x67])]:_0x512fb0([0x45,0x53,0x32,0x35,0x36])},_0x56b1c0=_0x4497c2[_0x512fb0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x512fb0([0x67,0x65,0x74])](_0x512fb0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x14db25(){let _0x530456,_0x53219b=null,_0x28dded=null;try{if(_0x56b1c0==_0x512fb0([0x47,0x50,0x4c]))return _0x512fb0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x530456=_0x5ebcec(),!_0x530456)return _0x512fb0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x530456[_0x512fb0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x28dded=_0x48af36(_0x530456[_0x512fb0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x530456[_0x512fb0([0x6a,0x74,0x69])])),await _0x4eeeb2()?_0x5e8132()?_0x45cf2b()?_0x512fb0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2edf8d()?(_0x530456[_0x512fb0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x512fb0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x53219b=_0x65aec7(_0x512fb0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0xb8b07a()):_0x512fb0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x512fb0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x512fb0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x512fb0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x45cf2b(){const _0x3a0a2e=[_0x512fb0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x512fb0([0x74,0x72,0x69,0x61,0x6c])][_0x512fb0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x530456[_0x512fb0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x14293f/0x3e8:0xe10*_0x3185c6;return _0x530456[_0x512fb0([0x65,0x78,0x70])]<_0x3a0a2e;}function _0x5e8132(){const _0x47a5c2=_0x530456[_0x512fb0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x47a5c2)return!0x1;if(_0x47a5c2[_0x512fb0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x512fb0([0x2a])))return!0x0;if(_0x47a5c2[_0x512fb0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x512fb0([0x43,0x4d,0x54])))return!0x0;if(_0x47a5c2[_0x512fb0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x512fb0([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x53da2b())return!0x0;if(_0x47a5c2[_0x512fb0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x512fb0([0x52,0x43,0x4d,0x54]))){if(_0x39c5c2())return!0x0;if(_0x11cce6()||_0xe7ab1e())return!0x0;}return!0x1;}function _0x2edf8d(){const _0xa5fddb=_0x530456[_0x512fb0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xa5fddb||0x0==_0xa5fddb[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x59e912}=new URL(window[_0x512fb0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xa5fddb[_0x512fb0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59e912))return!0x0;const _0x41b276=_0x59e912[_0x512fb0([0x73,0x70,0x6c,0x69,0x74])](_0x512fb0([0x2e]));return _0xa5fddb[_0x512fb0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x14fff4=>_0x14fff4[_0x512fb0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x512fb0([0x2a])))[_0x512fb0([0x6d,0x61,0x70])](_0x170359=>_0x170359[_0x512fb0([0x73,0x70,0x6c,0x69,0x74])](_0x512fb0([0x2e])))[_0x512fb0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x336b08=>_0x336b08[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x41b276[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x512fb0([0x6d,0x61,0x70])](_0x22396a=>Array(_0x41b276[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x22396a[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x512fb0([0x66,0x69,0x6c,0x6c])](_0x22396a[0x0]===_0x512fb0([0x2a])?_0x512fb0([0x2a]):'')[_0x512fb0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x22396a))[_0x512fb0([0x73,0x6f,0x6d,0x65])](_0x1e3495=>_0x41b276[_0x512fb0([0x65,0x76,0x65,0x72,0x79])]((_0xa719d2,_0xf77fc3)=>_0x1e3495[_0xf77fc3]===_0xa719d2||_0x1e3495[_0xf77fc3]===_0x512fb0([0x2a])));}function _0xb8b07a(){return _0x53219b&&_0x28dded?new window[(_0x512fb0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x34600f,_0x2b2c92)=>{_0x53219b[_0x512fb0([0x74,0x68,0x65,0x6e])](_0x34600f,_0x2b2c92),_0x28dded[_0x512fb0([0x74,0x68,0x65,0x6e])](_0x572f5b=>{_0x572f5b!=_0x512fb0([0x56,0x61,0x6c,0x69,0x64])&&_0x34600f(_0x572f5b);},_0x2b2c92);}):_0x53219b||_0x28dded||_0x512fb0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x48af36(_0x3dfba6,_0xe9719){return new window[(_0x512fb0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x594eba=>{if(_0x504200())return _0x594eba(_0x512fb0([0x56,0x61,0x6c,0x69,0x64]));_0x54b437(),_0x4497c2[_0x512fb0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x512fb0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x455094=!0x1;const _0x5db953=_0x42dee5();function _0x388a4e(_0x230cc9){return!!_0x230cc9&&(typeof _0x230cc9===_0x512fb0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x230cc9===_0x512fb0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x230cc9[_0x512fb0([0x74,0x68,0x65,0x6e])]===_0x512fb0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x230cc9[_0x512fb0([0x63,0x61,0x74,0x63,0x68])]===_0x512fb0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xa146dc(_0x1363b2){_0x1d079d(_0x1363b2)[_0x512fb0([0x74,0x68,0x65,0x6e])](_0x50e2e0=>{if(!_0x50e2e0||_0x50e2e0[_0x512fb0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x512fb0([0x6f,0x6b]))return _0x512fb0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1f337a(_0x5bf992(_0x5db953+_0xe9719))!=_0x50e2e0[_0x512fb0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x512fb0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x512fb0([0x56,0x61,0x6c,0x69,0x64]);})[_0x512fb0([0x74,0x68,0x65,0x6e])](_0x23433d=>(_0x36461e(),_0x23433d),()=>{const _0x4c33e5=_0x4dcc21();return null==_0x4c33e5?(_0x36461e(),_0x512fb0([0x56,0x61,0x6c,0x69,0x64])):_0x512fb0(_0x14293f-_0x4c33e5>(0x574a8eb3^_0x2f7fed)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x512fb0([0x74,0x68,0x65,0x6e])](_0x594eba)[_0x512fb0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x594eba(_0x512fb0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2653ac=0x7370e433^_0x2f7fed;function _0x36461e(){const _0x4a0aa1=_0x512fb0([0x6c,0x6c,0x63,0x74,0x2d])+_0x1f337a(_0x5bf992(_0x3dfba6)),_0x2978df=_0x132b69(_0x1f337a(window[_0x512fb0([0x4d,0x61,0x74,0x68])][_0x512fb0([0x63,0x65,0x69,0x6c])](_0x14293f/_0x2653ac)));window[_0x512fb0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x512fb0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a0aa1,_0x2978df);}function _0x4dcc21(){const _0xbec7b9=_0x512fb0([0x6c,0x6c,0x63,0x74,0x2d])+_0x1f337a(_0x5bf992(_0x3dfba6)),_0xeabfcf=window[_0x512fb0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x512fb0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xbec7b9);return _0xeabfcf?window[_0x512fb0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x132b69(_0xeabfcf),0x10)*_0x2653ac:null;}function _0x1d079d(_0x247d58){return new window[(_0x512fb0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x37de9f,_0xfd917c)=>{_0x247d58[_0x512fb0([0x74,0x68,0x65,0x6e])](_0x37de9f,_0xfd917c),window[_0x512fb0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xfd917c,0x7347de73^_0x2f7fed);});}}_0x4497c2[_0x512fb0([0x6f,0x6e])](_0x512fb0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x193780,_0x4f771e)=>{if(_0x4f771e[0x0]!=_0x3dfba6)return _0x594eba(_0x512fb0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4f771e[0x1]={..._0x4f771e[0x1],[_0x512fb0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5db953};},{[_0x512fb0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x512fb0([0x68,0x69,0x67,0x68])}),_0x4497c2[_0x512fb0([0x6f,0x6e])](_0x512fb0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5e2621=>{_0x388a4e(_0x5e2621[_0x512fb0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x455094=!0x0,_0xa146dc(_0x5e2621[_0x512fb0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x512fb0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x512fb0([0x6c,0x6f,0x77])}),_0x40bfe3[_0x512fb0([0x74,0x68,0x65,0x6e])](()=>{_0x455094||_0x594eba(_0x512fb0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x504200(){return _0x4497c2[_0x512fb0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x512fb0([0x76,0x69,0x65,0x77])][_0x512fb0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x512fb0([0x61,0x75,0x74,0x6f]);}function _0x54b437(){_0x4497c2[_0x512fb0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x512fb0([0x76,0x69,0x65,0x77])][_0x512fb0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x512fb0([0x61,0x75,0x74,0x6f]);}}function _0x65aec7(_0x32c900){const _0x23154f=[new window[(_0x512fb0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57c048=>setTimeout(_0x57c048,0x734f347f^_0x2f7fed)),_0x40bfe3[_0x512fb0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x512fb0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20ad7f=>{let _0x3b724e=0x0;_0x4497c2[_0x512fb0([0x6d,0x6f,0x64,0x65,0x6c])][_0x512fb0([0x6f,0x6e])](_0x512fb0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x130036,_0x536851)=>{_0x536851[0x0][_0x512fb0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3b724e++,_0x3b724e==(0x73460f5b^_0x2f7fed)&&(_0x20ad7f(),_0x130036[_0x512fb0([0x6f,0x66,0x66])]());});}))];return window[_0x512fb0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x512fb0([0x72,0x61,0x63,0x65])](_0x23154f)[_0x512fb0([0x74,0x68,0x65,0x6e])](()=>_0x32c900);}async function _0x465737(){await _0x40bfe3,_0x4497c2[_0x512fb0([0x6d,0x6f,0x64,0x65,0x6c])][_0x512fb0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x23dd3f,_0x4497c2[_0x512fb0([0x6d,0x6f,0x64,0x65,0x6c])][_0x512fb0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x23dd3f,_0x4497c2[_0x512fb0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x512fb0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x53da2b(){return window[_0x512fb0([0x67,0x6c,0x6f,0x62])]&&window[_0x512fb0([0x67,0x6c,0x6f,0x62])][_0x512fb0([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x39c5c2(){return _0x170b07(_0x512fb0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x18f117(_0x512fb0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x512fb0([0x73,0x74,0x61,0x74,0x65])]==_0x512fb0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x11cce6(){return _0x170b07(_0x512fb0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0xe7ab1e(){return _0x170b07(_0x512fb0([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4b4c35(_0x390dcf){const _0x3a9d32=_0x185621();_0x4497c2[_0x3a9d32]=_0x512fb0([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x390dcf,_0x390dcf!=_0x512fb0([0x56,0x61,0x6c,0x69,0x64])&&_0x465737();}function _0x185621(){const _0x4a1e30=window[_0x512fb0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x512fb0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x512fb0([0x6e,0x6f,0x77])]())[_0x512fb0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x512fb0([0x2e]),'');let _0x7a51de=_0x512fb0([0x4b]);for(let _0x5ea09f=0x0;_0x5ea09f<_0x4a1e30[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5ea09f+=0x2){let _0x52e457=window[_0x512fb0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4a1e30[_0x512fb0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5ea09f,_0x5ea09f+0x2));_0x52e457>=_0x5b5284[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x52e457-=_0x5b5284[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x7a51de+=_0x5b5284[_0x52e457];}return _0x7a51de;}function _0x5ebcec(){const _0x4dc6bb=_0x56b1c0[_0x512fb0([0x73,0x70,0x6c,0x69,0x74])](_0x512fb0([0x2e]));if(0x3!=_0x4dc6bb[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4192be(_0x4dc6bb[0x1]);function _0x4192be(_0x162187){const _0x22d02a=_0x4c6e7f(_0x162187);return _0x22d02a&&_0x2a123c()?_0x22d02a:null;function _0x2a123c(){const _0x32887c=_0x22d02a[_0x512fb0([0x6a,0x74,0x69])],_0x470976=window[_0x512fb0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x32887c[_0x512fb0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x32887c[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2eefac={..._0x22d02a,[_0x512fb0([0x6a,0x74,0x69])]:_0x32887c[_0x512fb0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x32887c[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2eefac[_0x512fb0([0x76,0x63])],_0x5bf992(_0x2eefac)==_0x470976;}}}async function _0x4eeeb2(){let _0x5652ed=!0x0;try{const _0x350ee7=_0x56b1c0[_0x512fb0([0x73,0x70,0x6c,0x69,0x74])](_0x512fb0([0x2e])),[_0x3cc360,_0x465a6a,_0x51924d]=_0x350ee7;return _0x553de2(_0x3cc360),await _0x2f20c7(_0x3cc360,_0x465a6a,_0x51924d),_0x5652ed;}catch{return!0x1;}function _0x553de2(_0xf2a012){const _0x13143a=_0x4c6e7f(_0xf2a012);_0x13143a&&_0x13143a[_0x512fb0([0x61,0x6c,0x67])]==_0x512fb0([0x45,0x53,0x32,0x35,0x36])||(_0x5652ed=!0x1);}async function _0x2f20c7(_0x2e559f,_0x4c1b5d,_0x2010f7){const _0x21e296=window[_0x512fb0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x512fb0([0x66,0x72,0x6f,0x6d])](_0x4d1132(_0x2010f7),_0x21ed43=>_0x21ed43[_0x512fb0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2907a0=new window[(_0x512fb0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x512fb0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2e559f+_0x512fb0([0x2e])+_0x4c1b5d),_0x3aa874=window[_0x512fb0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x512fb0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3aa874)return;const _0x1d80e3=await _0x3aa874[_0x512fb0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x512fb0([0x6a,0x77,0x6b]),_0x2bd0c0,{[_0x512fb0([0x6e,0x61,0x6d,0x65])]:_0x512fb0([0x45,0x43,0x44,0x53,0x41]),[_0x512fb0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x512fb0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x512fb0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3aa874[_0x512fb0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x512fb0([0x6e,0x61,0x6d,0x65])]:_0x512fb0([0x45,0x43,0x44,0x53,0x41]),[_0x512fb0([0x68,0x61,0x73,0x68])]:{[_0x512fb0([0x6e,0x61,0x6d,0x65])]:_0x512fb0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1d80e3,_0x21e296,_0x2907a0)||(_0x5652ed=!0x1);}}function _0x4c6e7f(_0x5b543f){return _0x5b543f[_0x512fb0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x512fb0([0x65,0x79]))?JSON[_0x512fb0([0x70,0x61,0x72,0x73,0x65])](_0x4d1132(_0x5b543f)):null;}function _0x4d1132(_0x11b3ba){return window[_0x512fb0([0x61,0x74,0x6f,0x62])](_0x11b3ba[_0x512fb0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x512fb0([0x2b]))[_0x512fb0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x512fb0([0x2f])));}function _0x5bf992(_0x296223){let _0x4fc515=0x1505;function _0x555fb3(_0x464c73){for(let _0x5473ff=0x0;_0x5473ff<_0x464c73[_0x512fb0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5473ff++){const _0x9de195=_0x464c73[_0x512fb0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5473ff);_0x4fc515=(_0x4fc515<<0x5)+_0x4fc515+_0x9de195,_0x4fc515&=_0x4fc515;}}function _0x21cbde(_0x500216){Array[_0x512fb0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x500216)?_0x500216[_0x512fb0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x21cbde):_0x500216&&typeof _0x500216==_0x512fb0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x512fb0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x500216)[_0x512fb0([0x73,0x6f,0x72,0x74])]()[_0x512fb0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4bc979,_0x1999cf])=>{_0x555fb3(_0x4bc979),_0x21cbde(_0x1999cf);}):_0x555fb3(window[_0x512fb0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x500216));}return _0x21cbde(_0x296223),_0x4fc515>>>0x0;}function _0x1f337a(_0x5a44dc){return _0x5a44dc[_0x512fb0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x512fb0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x512fb0([0x30]));}function _0x132b69(_0x1261ed){return _0x1261ed[_0x512fb0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x512fb0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x512fb0([0x6a,0x6f,0x69,0x6e])]('');}function _0x170b07(_0x3408e1){return _0x4497c2[_0x512fb0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x512fb0([0x68,0x61,0x73])](_0x3408e1);}function _0x18f117(_0x28e2e1){return _0x4497c2[_0x512fb0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x512fb0([0x67,0x65,0x74])](_0x28e2e1);}function _0x23dd3f(){}function _0x512fb0(_0x47ebea){return _0x47ebea['map'](_0x53d71d=>String['fromCharCode'](_0x53d71d))['join']('');}_0x4b4c35(await _0x14db25());}(this);}['destroy'](){const _0x2ae292=this['editor']['plugins']['get'](CommentsRepository),_0x2439ea=this['editor']['config']['get']('collaboration.channelId');for(const _0x1a776f of _0x2ae292['getCommentThreads']({'channelId':_0x2439ea}))_0x2ae292['_detachCommentThread'](_0x1a776f['id']),_0x2ae292['_threads']['delete'](_0x1a776f['id']);super['destroy']();}['hasMarkerForId'](_0x572628){return this['getAllMarkersForId'](_0x572628)['length']>0x0;}['getAllMarkersForId'](_0x381ba3){const _0x461019=[];for(const _0x3d5855 of this['editor']['model']['markers'])_0x3d5855['name']['startsWith']('comment:'+_0x381ba3)&&_0x461019['push'](_0x3d5855);return _0x461019;}['scrollToThreadMarker'](_0x32ab44){setTimeout(()=>{const _0x3986d5=this['_getTargetForId'](_0x32ab44);if(!_0x3986d5)return;this['activeMarker']&&Pt(this['activeMarker'])['id']===_0x32ab44&&_0x413622({'target':_0x3986d5[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x22d820){this['editor']['model']['change'](()=>{for(const _0x100442 of this['getAllMarkersForId'](_0x22d820))this['editor']['editing']['reconvertMarker'](_0x100442);});}['_attachArchivedThread'](_0x4ef3db){const _0x5db82b=this['editor']['plugins']['get'](CommentsRepository),_0x37ada0=this['editor']['plugins']['get'](EditorAnnotations),_0xe7ed1f=_0x5db82b['getCommentThread'](_0x4ef3db);if(!_0xe7ed1f['isAttached']){const _0x587ecf=_0xe7ed1f['attachTo'](()=>this['_getTargetForId'](_0xe7ed1f['id']));_0x37ada0['registerAnnotation'](_0x587ecf),_0xe7ed1f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x199a5f=this['editor'],_0xbd8125=_0x199a5f['plugins']['get'](_0x553121);_0x199a5f['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x45079d,_0x2790b8)=>{const {id:_0x10486f}=Pt(_0x45079d['markerName']),_0x175199=_0x199a5f['plugins']['get'](CommentsRepository)['getCommentThread'](_0x10486f),_0x4e67b6=this['activeMarker']&&Pt(this['activeMarker'])['id']===_0x10486f;let _0x2694b0;if(_0x175199&&_0x175199['isResolved']&&!_0x4e67b6&&_0x45079d['item'])return _0x2790b8['consumable']['consume'](_0x45079d['item'],'addMarker:'+_0x45079d['markerName']),_0x2790b8['consumable']['consume'](_0x45079d['item'],'removeMarker:'+_0x45079d['markerName']),null;const _0x59a3c8=['ck-comment-marker'];return _0x4e67b6&&_0x59a3c8['push']('ck-comment-marker--active'),_0x2694b0=_0x175199?.['length']?_0x175199['comments']['first']['author']['id']:_0xbd8125['me']['id'],{'classes':_0x59a3c8,'attributes':{'data-comment':_0x10486f,'data-author-id':_0x2694b0}};}}),_0x199a5f['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x2b780c,{options:_0x309a90})=>{if(_0x309a90['showCommentHighlights'])return null;const _0x559a7b=_0x199a5f['plugins']['get'](CommentsRepository),_0x4aa4db=_0x199a5f['model']['markers']['get'](_0x2b780c),{id:_0x4288d3,part:_0x3fd4f5}=Pt(_0x2b780c);return _0x4aa4db&&!_0x4aa4db['affectsData']||_0x309a90['ignoreResolvedComments']&&_0x559a7b['getCommentThread'](_0x4288d3)?.['isResolved']?null:{'group':'comment','name':_0x3fd4f5?_0x4288d3+':'+_0x3fd4f5:_0x4288d3};}}),_0x199a5f['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x36b0eb,{writer:_0x44e841})=>_0x44e841['createElement']('$marker',{'data-name':'comment:'+_0x36b0eb['getAttribute']('id')})}),_0x199a5f['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x271c2f=this['editor'],_0x5a9641=_0x271c2f['plugins']['get'](CommentsRepository),_0x497fc9=new Set(),_0x1d0d9f=new Set();_0x271c2f['model']['document']['registerPostFixer'](_0x31bf61=>{let _0x19752f=!0x1;for(const {name:_0x11a241,data:_0x5ea0b9}of _0x271c2f['model']['document']['differ']['getChangedMarkers']()){const {group:_0xd600f,id:_0x267626}=Pt(_0x11a241);let _0x34c11a=_0x5ea0b9['newRange'];if('comment'!==_0xd600f||!_0x34c11a)continue;const _0x181d89='$graveyard'===_0x34c11a['root']['rootName'];_0x181d89||(_0x34c11a=Lt(_0x34c11a,_0x271c2f['model']),!_0x34c11a||_0x34c11a['isCollapsed']||!_0x5ea0b9['newRange']||_0x34c11a['isEqual'](_0x5ea0b9['newRange']))?_0x271c2f['model']['hasContent'](_0x34c11a)&&!_0x181d89?this['isThreadsLoadingPaused']?_0x497fc9['add'](_0x11a241):this['_handleThreadMarker'](_0x11a241,_0x267626):(_0x1d0d9f['add'](_0x11a241),_0x497fc9['delete'](_0x11a241),_0x31bf61['removeMarker'](_0x11a241),_0x19752f=!0x0):(_0x31bf61['updateMarker'](_0x11a241,{'range':_0x34c11a}),_0x19752f=!0x0);}return _0x19752f;}),this['on']('change:isThreadsLoadingPaused',(_0x2c5d7d,_0x38a44c,_0x20e0b7)=>{if(!_0x20e0b7&&_0x497fc9['size'])for(const _0xc1607c of _0x497fc9){const {id:_0xa9c280}=Pt(_0xc1607c);_0x497fc9['delete'](_0xc1607c),_0x271c2f['model']['markers']['get'](_0xc1607c)&&this['_handleThreadMarker'](_0xc1607c,_0xa9c280);}}),this['listenTo'](_0x271c2f['model']['document'],'change',()=>{for(const {name:_0x412ae2,data:{newRange:_0x3324c1}}of _0x271c2f['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1b1aa3,id:_0x583fc6}=Pt(_0x412ae2);if('comment'!==_0x1b1aa3)continue;const _0x2e5af1=_0x5a9641['getCommentThread'](_0x583fc6),_0x52e509=this['hasMarkerForId'](_0x583fc6);_0x2e5af1&&(!_0x2e5af1['_hasTargetInContent']&&_0x3324c1&&_0x271c2f['editing']['view']['once']('render',()=>{const _0x5f22d5=_0x271c2f['plugins']['get'](Annotations),_0x3264d5=_0x5a9641['_threadToController']['get'](_0x2e5af1)['view'];_0x5f22d5['getByInnerView'](_0x3264d5)['refreshVisibility']();},{'priority':'low'}),_0x2e5af1['_hasTargetInContent']=_0x52e509||!!_0x3324c1),_0x3324c1||(_0x1d0d9f['add'](_0x412ae2),_0x497fc9['delete'](_0x412ae2));}for(const _0x4c5133 of _0x1d0d9f){const {id:_0x282e47}=Pt(_0x4c5133),_0x653bd1=_0x5a9641['getCommentThread'](_0x282e47);if(_0x497fc9['delete'](_0x4c5133),!_0x653bd1)continue;const _0x1382c4=this['hasMarkerForId'](_0x282e47);_0x1382c4||_0x653bd1['isSubmitted']?_0x1382c4||_0x653bd1['unlinkedAt']||_0x653bd1['setUnlinkedAt'](new Date()):_0x653bd1['remove']();}_0x1d0d9f['clear']();});}['_handleInitialThreads'](_0x4bae7e){_0x4bae7e['forEach'](_0x10c125=>{_0x10c125['unlinkedAt']&&this['_attachArchivedThread'](_0x10c125['id']);});}['_getTargetForId'](_0x3b6929){const _0x133990=this['editor'],_0x1ec135=this['getAllMarkersForId'](_0x3b6929);return _0x3519e2(_0x133990['editing'],_0x1ec135);}['_getTextContext'](_0x4d1486){const _0x4871e9=this['getAllMarkersForId'](_0x4d1486);let _0x28ee31='',_0x947efd=!0x1;for(const _0x138140 of _0x4871e9){const _0x3c7318=_0x138140['getRange']();for(const _0x401a7c of Array['from'](_0x3c7318['getItems']()))_0x401a7c['is']('$textProxy')?(_0x28ee31&&_0x947efd&&(_0x28ee31+='\x20',_0x947efd=!0x1),_0x28ee31+=_0x401a7c['data']):_0x947efd=!0x0;_0x947efd=!0x0;}return _0x28ee31['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x174f59,_0x38cbbe){const _0x21aadd=this['editor'],_0xf5c00c=_0x21aadd['plugins']['get'](CommentsRepository);let _0x26ccab=_0xf5c00c['getCommentThread'](_0x38cbbe);const _0x1cc960=_0x21aadd['config']['get']('collaboration.channelId'),_0x20a078=_0x21aadd['plugins']['get'](EditorAnnotations);if(_0x26ccab&&(_0x26ccab['unlinkedAt']&&_0x26ccab['setUnlinkedAt'](null),_0x26ccab['isAttached']))return _0x26ccab;return!this['getAllMarkersForId'](_0x38cbbe)[0x0]['managedUsingOperations']?_0x21aadd['editing']['view']['once']('render',()=>{if(_0xf5c00c['getCommentThread'](_0x38cbbe))return;const _0x3d9234=_0x21aadd['plugins']['get'](Annotations);_0x26ccab=_0xf5c00c['openNewCommentThread']({'channelId':_0x1cc960,'threadId':_0x38cbbe,'target':()=>this['_getTargetForId'](_0x38cbbe),'context':{'type':'text','value':this['_getTextContext'](_0x38cbbe)}});const _0x3a4866=_0xf5c00c['_threadToController']['get'](_0x26ccab)['view'],_0x49980d=_0x3d9234['getByInnerView'](_0x3a4866);_0x49980d&&_0x20a078['registerAnnotation'](_0x49980d);},{'priority':'low'}):_0xf5c00c['fetchCommentThread']({'channelId':_0x1cc960,'threadId':_0x38cbbe})['then'](_0x44c512=>{if('destroyed'!==_0x21aadd['state']){if(_0x26ccab=_0x44c512,_0x26ccab&&!_0x26ccab['isAttached']){const _0x47a213=_0x26ccab['attachTo'](()=>this['_getTargetForId'](_0x38cbbe));_0x20a078['registerAnnotation'](_0x47a213),_0x26ccab['isResolved']&&this['_reconvertMarkers'](_0x38cbbe);}else{if(!_0x26ccab){const _0xaaf6b6=this['getAllMarkersForId'](_0x38cbbe);_0x21aadd['model']['change'](_0x288953=>{for(const _0x40357a of _0xaaf6b6)_0x288953['removeMarker'](_0x40357a);});}}}}),_0x26ccab;}['_handleThreadMarker'](_0x141b42,_0x67a17f){const _0x54d676=this['_attachMarkerToThread'](_0x141b42,_0x67a17f);_0x54d676&&!_0x54d676['context']&&_0x54d676['setContext']({'type':'text','value':this['_getTextContext'](_0x67a17f)});}['_initAriaMarkerChangeAnnouncements'](){const _0x2c0213=this['editor'];_0x655cf7(_0x2c0213['model'],({left:_0x505996,entered:_0x14e437})=>{for(const _0x5bca6f of _0x505996)if(Dt(_0x5bca6f)){_0x2c0213['ui']['ariaLiveAnnouncer']['announce'](vt(_0x2c0213['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2a2954 of _0x14e437)if(Dt(_0x2a2954)){_0x2c0213['ui']['ariaLiveAnnouncer']['announce'](vt(_0x2c0213['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0xf5ebd6(_0x4b1251)));break;}});}}function Vt(_0x176e19,_0x41d181){return _0x41d181?_0x176e19+':'+_0x41d181:_0x176e19;}function Lt(_0x43d16c,_0x349b9a){const _0xd6ae1b=_0x349b9a['schema'],_0x100d64=_0x349b9a['createRange'](_0x43d16c['start']);for(const _0x1242aa of _0x43d16c['getWalker']()){const {type:_0xc431e1,item:_0x485d62,nextPosition:_0x3d8c73}=_0x1242aa;if('text'===_0xc431e1||_0xd6ae1b['isObject'](_0x485d62)){const _0x416b3f=_0x349b9a['createPositionBefore'](_0x485d62);_0x100d64['isCollapsed']&&(_0x100d64['start']=_0x416b3f),_0x100d64['end']=_0x3d8c73;}}return _0x100d64;}function Dt(_0x5ab517){return'comment'===Pt(_0x5ab517['name'])['group'];}class CommentsUI extends _0x557e23{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsRepository,CommentsEditing,EditorAnnotations,Annotations];}get['CommentsListView'](){return CommentsListView;}get['CommentThreadInputView'](){return CommentThreadInputView;}['init'](){const _0x32f3a8=this['editor'],_0x40b44e=_0x32f3a8['plugins']['get'](CommentsRepository),_0x343614=_0x32f3a8['plugins']['get'](CommentsEditing),_0xc3a970=_0x32f3a8['plugins']['get'](Annotations),_0x1512f9=_0x32f3a8['plugins']['get'](EditorAnnotations);_0x32f3a8['ui']['componentFactory']['add']('comment',()=>{const _0x17ae98=this['_createUIButton'](_0x46c68b);return _0x17ae98['tooltip']=!0x0,_0x17ae98;}),_0x32f3a8['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x1512f9['addSourceCollector'](()=>{const _0x1ac403=[];for(const [_0x518690,_0x5ad0d4]of _0x40b44e['_threadToController']){const _0x20e55d=_0x343614['getAllMarkersForId'](_0x518690['id']),_0x4ff5eb=_0x20e55d['map'](_0x3684e4=>_0x3684e4['getRange']());_0x20e55d['length']>0x0&&_0x1ac403['push']([_0x5ad0d4['view'],_0x4ff5eb]);}return _0x1ac403;}),this['listenTo'](_0xc3a970,'change:activeAnnotations',(_0x1b6358,_0x47a550,_0x463fce)=>{const _0x2aea71=Array['from'](_0x463fce)['map'](_0x52d3dc=>_0x52d3dc['innerView'])['find'](_0x369e15=>_0x40b44e['_viewToController']['has'](_0x369e15));if(!_0x2aea71)return void(_0x343614['activeMarker']=null);const _0x15acb7=_0x40b44e['_viewToController']['get'](_0x2aea71)['model']['id'],_0x42de12='comment:'+_0x15acb7;_0x15acb7&&_0x343614['hasMarkerForId'](_0x15acb7)?_0x343614['activeMarker']=_0x42de12:_0x343614['activeMarker']&&(_0x343614['activeMarker']=null);}),this['listenTo'](_0x40b44e,'removeCommentThread',(_0x131b88,{threadId:_0x3bc3d4,isFromAdapter:_0x3f264e})=>{!_0x3f264e&&_0x32f3a8['ui']['focusTracker']['isFocused']&&_0x343614['hasMarkerForId'](_0x3bc3d4)&&_0x32f3a8['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x40b44e,'addComment',(_0x5d6403,{threadId:_0x4d5100,isFromAdapter:_0x5e976d})=>{if(_0x5e976d||!_0x343614['hasMarkerForId'](_0x4d5100)||!_0x40b44e['hasCommentThread'](_0x4d5100))return;0x1===_0x40b44e['getCommentThread'](_0x4d5100)['length']&&(_0x32f3a8['editing']['view']['focus'](),_0x5d6403['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x503c1a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4719b7;for(const _0x33d476 in _0x503c1a){const _0xf5a4d9=_0x33d476,_0x1538c7=_0x503c1a[_0xf5a4d9];if('commentsLicenseKeyValid'==_0x1538c7||'commentsLicenseKeyInvalid'==_0x1538c7||'commentsLicenseKeyExpired'==_0x1538c7||'commentsLicenseKeyDomainLimit'==_0x1538c7||'commentsLicenseKeyNotAllowed'==_0x1538c7||'commentsLicenseKeyEvaluationLimit'==_0x1538c7||'commentsLicenseKeyUsageLimit'==_0x1538c7){delete _0x503c1a[_0xf5a4d9],_0x4719b7=_0x1538c7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4719b7&&_0x503c1a['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4719b7&&_0x503c1a['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4719b7&&_0x503c1a['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4719b7&&_0x503c1a['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4719b7&&_0x503c1a['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x4719b7&&_0x503c1a['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x227d0f){const _0x461ae0=this['editor'],_0x47658d=new _0x227d0f(_0x461ae0['locale']),_0x475b10=_0x461ae0['commands']['get']('addCommentThread');return _0x47658d['set']({'label':vt(_0x461ae0['locale'],'Comment'),'icon':_0x2fd654}),_0x47658d['bind']('isEnabled')['to'](_0x475b10,'isEnabled',_0x475b10,'hasContent',(_0x161325,_0x40b023)=>_0x161325&&_0x40b023),this['listenTo'](_0x47658d,'execute',()=>{_0x475b10['execute']();}),_0x47658d;}}class CommentsOnly extends _0x557e23{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsEditing];}constructor(_0x38cce0){super(_0x38cce0),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x49e766,_0x42e741,_0x546c1d)=>{_0x546c1d?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5b61d4,_0x247161]of this['editor']['commands'])_0x247161['affectsData']&&'addCommentThread'!==_0x5b61d4&&_0x247161['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 _0xcafc31=this['editor']['editing']['view']['document'];this['listenTo'](_0xcafc31,'cut',_0x2fcd8c=>_0x2fcd8c['stop'](),{'priority':'highest'}),this['listenTo'](_0xcafc31,'clipboardInput',_0x51a414=>_0x51a414['stop'](),{'priority':'highest'}),this['listenTo'](_0xcafc31,'delete',_0x3ecf6b=>_0x3ecf6b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0xa135e0,_0x5b14cd]of this['editor']['commands'])_0x5b14cd['affectsData']&&'addCommentThread'!==_0xa135e0&&_0x5b14cd['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class AnnotationsUIs extends _0x2a95a9{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[Annotations];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xbb028d){super(_0xbb028d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x422774=this['context']['plugins']['get'](Annotations);this['listenTo'](_0x422774,'_activateAnnotation',(_0x4ee7e6,_0x5a3c71)=>{for(const _0x3bf747 of this['activeUIs']){const _0x26fbf5=this['_uis']['get'](_0x3bf747);(0x0,this['uisData']['get'](_0x3bf747)['filter'])(_0x5a3c71)&&_0x26fbf5['setActiveAnnotation'](_0x5a3c71);}}),this['listenTo'](_0x422774,'_deactivateAllAnnotations',()=>{for(const _0x5635b of this['activeUIs']){this['_uis']['get'](_0x5635b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x422774['_visibleAnnotations'],'add',(_0x59597b,_0x4739e0)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4739e0);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3ac409){return this['activeUIs']['has'](_0x3ac409);}['activate'](_0x28d2c4,_0x282a5f=this['defaultFilter']){const _0x305651=this['context']['plugins']['get'](Annotations);if(!this['_uis']['has'](_0x28d2c4))throw new _0x2fe563('annotationsuis-missing-ui',this,{'uiName':_0x28d2c4});this['isActive'](_0x28d2c4)&&this['deactivate'](_0x28d2c4),this['activeUIs']['add'](_0x28d2c4);const _0x1ac50c=new AnnotationCollection();Ot({'source':_0x305651['_visibleAnnotations'],'target':_0x1ac50c,'filter':_0x282a5f}),this['uisData']['set'](_0x28d2c4,{'collection':_0x1ac50c,'filter':_0x282a5f});const _0x5c6f16=this['_uis']['get'](_0x28d2c4);_0x5c6f16['attach'](_0x1ac50c),this['listenTo'](_0x5c6f16,'change:activeAnnotation',(_0x3eba5e,_0x372566,_0x1e8075,_0x2c20d1)=>{_0x2c20d1&&_0x305651['_removeActiveAnnotation'](_0x2c20d1),_0x1e8075&&_0x305651['_addActiveAnnotation'](_0x1e8075);});}['deactivate'](_0x1d9066){if(this['activeUIs']['delete'](_0x1d9066),!this['_uis']['has'](_0x1d9066))throw new _0x2fe563('annotationsuis-missing-ui',this,{'uiName':_0x1d9066});const _0x14aefa=this['_uis']['get'](_0x1d9066);_0x14aefa['detach'](),this['stopListening'](_0x14aefa),this['uisData']['get'](_0x1d9066)['collection']['destroy'](),this['uisData']['delete'](_0x1d9066);}['switchTo'](_0x24a572){if(!this['_uis']['has'](_0x24a572))throw new _0x2fe563('annotationsuis-missing-ui',this,{'uiName':_0x24a572});const _0x22450a=this['context']['plugins']['get'](Annotations),_0xf4b1af=Array['from'](_0x22450a['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x24a572);const _0x4ce336=this['_uis']['get'](_0x24a572);_0x4ce336['setActiveAnnotation'](_0xf4b1af),_0x4ce336['_setSelectedAnnotations']&&_0xf4b1af&&_0x4ce336['_setSelectedAnnotations']([_0xf4b1af]);}['deactivateAll'](){for(const _0x44ae8a of this['activeUIs'])this['deactivate'](_0x44ae8a);}['register'](_0x4fdcf8,_0x3c2c06){if(this['_uis']['has'](_0x4fdcf8))throw new _0x2fe563('annotationsuis-register-already-registered');if('function'!=typeof _0x3c2c06['attach']||'function'!=typeof _0x3c2c06['detach']||'function'!=typeof _0x3c2c06['setActiveAnnotation'])throw new _0x2fe563('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x4fdcf8,_0x3c2c06);}['refilterAnnotations'](){const _0x416e28=this['context']['plugins']['get'](Annotations)['collection'],_0x56a6dd=new Map(),_0x9d720f=Array['from'](this['activeUIs']);for(const _0x289ceb of this['activeUIs']){const _0x3d99b9=this['uisData']['get'](_0x289ceb)['collection'];for(const _0x374f94 of _0x3d99b9)_0x56a6dd['set'](_0x374f94,_0x289ceb);}for(const _0x23314c of _0x416e28){const _0x560051=_0x56a6dd['get'](_0x23314c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x23314c);const _0x419f7a=_0x9d720f['find'](_0x30fbcb=>this['uisData']['get'](_0x30fbcb)['filter'](_0x23314c));_0x560051!==_0x419f7a&&(_0x560051&&this['uisData']['get'](_0x560051)['collection']['remove'](_0x23314c),_0x419f7a&&this['uisData']['get'](_0x419f7a)['collection']['add'](_0x23314c));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x24cc96){const _0x2914f2=[];for(const _0x35fcda of this['activeUIs']){(0x0,this['uisData']['get'](_0x35fcda)['filter'])(_0x24cc96)&&_0x2914f2['push'](_0x35fcda);}if(_0x2914f2['length']>0x1)throw new _0x2fe563('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2914f2,'annotationType':_0x24cc96['type']});}}const Bt=/* #__PURE__ -- @preserve */
32
- _0x1cf4f3('px');class AnnotationsSidebarView extends _0x5e7531{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x55abf2){super(_0x55abf2);const _0x30ef89=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 _0x3dcbcb(),this['focusCycler']=new _0x429799({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x30ef89['to']('class')],'style':{'minHeight':_0x30ef89['to']('minHeight',_0x258895=>'number'==typeof _0x258895?Bt(_0x258895+0xa):null)},'dir':_0x55abf2['uiLanguageDirection'],'role':'application','aria-label':vt(_0x55abf2,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':vt(_0x55abf2,'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',_0x507413=>{this['_updateItemPositionInFocusables'](_0x507413['source']);}),this['list']['forEach'](_0xd19fc1=>{this['focusTracker']['add'](_0xd19fc1['element']),this['_updateItemPositionInFocusables'](_0xd19fc1);}),this['list']['on']('change',(_0x4528a9,_0x2e8a74)=>{for(const _0x231357 of _0x2e8a74['removed'])this['focusTracker']['remove'](_0x231357['element']),this['focusables']['remove'](_0x231357);for(const _0x47d080 of _0x2e8a74['added'])this['focusTracker']['add'](_0x47d080['element']),this['_updateItemPositionInFocusables'](_0x47d080);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x37baae){const _0x2bcfaf=this['focusables']['getIndex'](_0x37baae);let _0x301d5a,_0x3209ed;for(const _0x5f3818 of this['focusables'])if(_0x37baae['top']<_0x5f3818['top']){_0x301d5a=_0x5f3818;break;}if(_0x3209ed=_0x301d5a?this['focusables']['getIndex'](_0x301d5a):this['focusables']['length'],-0x1!==_0x2bcfaf){if(_0x2bcfaf===_0x3209ed-0x1)return;this['focusables']['remove'](_0x37baae),_0x3209ed=_0x301d5a?this['focusables']['getIndex'](_0x301d5a):this['focusables']['length'];}this['focusables']['add'](_0x37baae,_0x3209ed);}}const Ht=/* #__PURE__ -- @preserve */
33
- _0x1cf4f3('px');class AnnotationsSidebarItemView extends _0x5e7531{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x39e5c4){super(_0x39e5c4),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x269de0,_0x12f85c)=>_0x269de0+_0x12f85c),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Nt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x13a387=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x13a387['to']('isAnimationDisabled',_0x489e20=>_0x489e20?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x13a387['to']('top',_0x62e804=>Ht(_0x62e804))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3c345d=this['element']['clientHeight'];_0x3c345d&&(this['height']=_0x3c345d);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Sidebar extends _0x2a95a9{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5976a1){super(_0x5976a1),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 _0x171b01=this['context']['config']['get']('sidebar.container');_0x171b01&&this['setContainer'](_0x171b01);}['setContainer'](_0x20b254){if(!Ft(_0x20b254))throw new _0x2fe563('sidebar-setcontainer-invalid-element');this['container']=_0x20b254;}['_attachToContainer']({viewClass:_0x3b3966='',spaceBetweenItems:_0xeb3e7e=0x19}={}){if(!Ft(this['container']))throw new _0x2fe563('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x3b3966,this['_spaceBetweenItems']=_0xeb3e7e;}['rearrange']({removedAnnotation:_0x51fb20,previousAnnotation:_0x21a783,nextAnnotation:_0x215b5f}){const _0x183251=this['getSidebarItemView'](_0x51fb20);this['view']['list']['remove'](_0x183251),this['_destroySidebarItemView'](_0x51fb20),_0x21a783&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x21a783)),_0x215b5f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x215b5f)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x224841,activatedAnnotation:_0x472d64,disableAnimationOnActivatedAnnotation:_0x248b9f}){if(this['_activeAnnotation']=_0x472d64,_0x224841){_0x224841['isActive']=!0x1;const _0xa68ce0=this['getSidebarItemView'](_0x224841);_0xa68ce0&&_0x248b9f&&(_0xa68ce0['isAnimationDisabled']=!0x1);}if(_0x472d64){const _0x2cabf5=this['getSidebarItemView'](_0x472d64);_0x2cabf5&&(_0x472d64['isActive']=!0x0,_0x248b9f&&(_0x2cabf5['isAnimationDisabled']=!0x0,_0x2cabf5['top']+=0x1),this['_alignToTargetRect'](_0x2cabf5));}}['_detachFromContainer'](_0x444a9f){if(this['view']['element']['remove'](),_0x444a9f){for(const _0x19e8a8 of _0x444a9f)this['_destroySidebarItemView'](_0x19e8a8);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2331d1,_0x4d56f7){_0x4d56f7||(_0x4d56f7=_0x2331d1['view']);const _0x25292d=new AnnotationsSidebarItemView(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x25292d,_0x2331d1),this['_annotationToSidebarItemView']['set'](_0x2331d1,_0x25292d),_0x25292d['content']['add'](_0x4d56f7),this['listenTo'](_0x2331d1['view'],'change:targetRect',(_0x50f029,_0x117386,_0x30fe1e)=>{const _0x26188b=this['_getTargetTop'](_0x2331d1,_0x30fe1e);_0x25292d['_targetTop']!=_0x26188b&&(_0x25292d['_targetTop']=_0x26188b,this['_setItemTop'](_0x25292d,_0x26188b));}),this['listenTo'](_0x25292d,'change:top',()=>{this['_recalculate'](_0x25292d,'top');}),this['listenTo'](_0x25292d,'change:bottom',()=>{this['_recalculate'](_0x25292d,'bottom');}),this['_alignToTargetRect'](_0x25292d);const _0x3dd391=this['_getItemBefore'](_0x25292d);if(_0x3dd391)this['_alignAfterItem'](_0x3dd391,_0x25292d)||this['_alignToTargetRect'](_0x25292d);else this['_alignToTargetRect'](_0x25292d);return this['_updateLastItem'](),this['view']['list']['add'](_0x25292d),_0x25292d;}['_alignForTopChange'](_0x17ecfc){if(!_0x17ecfc['content']['length'])return;const _0x588095=this['_getItemBefore'](_0x17ecfc);if(!_0x588095)return;const _0x1525bf=this['_sidebarItemViewToAnnotation']['get'](_0x588095),_0x419bd9=this['_activeAnnotation'];_0x419bd9&&_0x419bd9===_0x1525bf?this['_alignAfterItem'](_0x588095,_0x17ecfc):this['_alignBeforeItem'](_0x17ecfc,_0x588095);}['_alignForBottomChange'](_0x3a0a6a){if(!_0x3a0a6a['content']['length'])return;const _0x586f3c=this['_getItemAfter'](_0x3a0a6a);if(!_0x586f3c)return;const _0x2baa0d=this['_sidebarItemViewToAnnotation']['get'](_0x586f3c),_0x3a358f=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3d98d8=this['_activeAnnotation'];_0x3d98d8&&_0x3d98d8===_0x2baa0d&&_0x3a358f?(this['_alignBeforeItem'](_0x586f3c,_0x3a0a6a),this['_alignAfterItem'](_0x3a0a6a,_0x586f3c)):_0x3d98d8&&_0x3d98d8===_0x2baa0d?this['_alignBeforeItem'](_0x586f3c,_0x3a0a6a):this['_alignAfterItem'](_0x3a0a6a,_0x586f3c);}['_recalculate'](_0x37f1bc,_0x2a1518){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4bf2cd,changedProp:_0x3d555c}of this['_recalculateBuffer'])'top'===_0x3d555c?this['_alignForTopChange'](_0x4bf2cd):this['_alignForBottomChange'](_0x4bf2cd);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x37f1bc,'changedProp':_0x2a1518});}['getSidebarItemView'](_0x3cd3bb){return this['_annotationToSidebarItemView']['get'](_0x3cd3bb);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1b9e9c){const _0xc844a2=this['getSidebarItemView'](_0x1b9e9c);this['stopListening'](_0xc844a2),this['stopListening'](_0x1b9e9c['view']),_0xc844a2['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1b9e9c),this['_sidebarItemViewToAnnotation']['delete'](_0xc844a2);}['_createSidebarView'](){const _0x1088da=new AnnotationsSidebarView(this['context']['locale']);return _0x1088da['render'](),this['on']('change:_lastItem',(_0xd71b24,_0x21a7f5,_0x13a41d,_0x54dfa6)=>{_0x54dfa6&&_0x1088da['unbind']('minHeight'),_0x13a41d?_0x1088da['bind']('minHeight')['to'](_0x13a41d,'bottom'):_0x1088da['minHeight']=null;}),_0x1088da;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x371e48){const _0x3c4c10=this['_sidebarItemViewToAnnotation']['get'](_0x371e48),_0x1f6adb=_0x3c4c10&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3c4c10)-0x1);return _0x1f6adb&&this['getSidebarItemView'](_0x1f6adb)||null;}['_getItemAfter'](_0x4396a7){const _0x2cb5b5=this['_sidebarItemViewToAnnotation']['get'](_0x4396a7),_0x16cbe0=_0x2cb5b5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2cb5b5)+0x1);return _0x16cbe0&&this['getSidebarItemView'](_0x16cbe0)||null;}['_alignBeforeItem'](_0x4890b7,_0x1de03a){_0x4890b7['updateHeight']();const _0x7082c9=Ut(_0x1de03a['bottom']+this['_spaceBetweenItems'],_0x4890b7['top']);return!!_0x7082c9&&(this['_setItemTop'](_0x1de03a,_0x1de03a['top']-_0x7082c9),!0x0);}['_alignAfterItem'](_0x712730,_0x318391){_0x712730['updateHeight']();const _0x41d8c7=Ut(_0x712730['bottom']+this['_spaceBetweenItems'],_0x318391['top']);return!!_0x41d8c7&&(this['_setItemTop'](_0x318391,_0x318391['top']+_0x41d8c7,!0x1),!0x0);}['_alignToTargetRect'](_0x4a0993){const _0x2b14f7=this['_sidebarItemViewToAnnotation']['get'](_0x4a0993);if(!_0x2b14f7||!_0x2b14f7['target']||!_0x2b14f7['targetRect'])return;const _0x584e46=this['_getTargetTop'](_0x2b14f7,_0x2b14f7['targetRect']);this['_setItemTop'](_0x4a0993,_0x584e46);}['_getTargetTop'](_0x4e33ae,_0xc51724){if(null===_0xc51724)return 0x0;if(_0x4e33ae['target']instanceof _0xb1c7e3)return _0xc51724['top'];{const _0x5befc4=new _0xb1c7e3(this['view']['element'])['top'];return _0xc51724['top']-_0x5befc4;}}['_setItemTop'](_0x435300,_0x468d0e,_0x206e75=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x206e75&&(_0x468d0e=Math['max'](_0x468d0e,this['_getMaxAvailableTop'](_0x435300))),_0x435300['top']=_0x468d0e;}['_getMaxAvailableTop'](_0x1173f1){let _0xb14bff=this['_getItemBefore'](_0x1173f1),_0x1d7397=0x0;for(;_0xb14bff;)_0xb14bff['updateHeight'](),_0x1d7397+=this['_spaceBetweenItems']+_0xb14bff['height'],_0xb14bff=this['_getItemBefore'](_0xb14bff);return _0x1d7397;}}function Ut(_0x39a3c,_0xa356eb){return Math['max'](_0x39a3c-_0xa356eb,0x0);}function Ft(_0x571a93){return null!==_0x571a93&&'object'==typeof _0x571a93&&0x1===_0x571a93['nodeType'];}class WideSidebar extends _0x2a95a9{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Sidebar,AnnotationsUIs];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x173261){super(_0x173261),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4c964f(),this['_refreshPositioningDebounced']=_0x4fd98b(()=>{_0x173261['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x359c29=this['context']['plugins']['get'](AnnotationsUIs),_0x26bfe2=this['context']['plugins']['get'](Sidebar);_0x359c29['register']('wideSidebar',this),_0x26bfe2['container']&&_0x359c29['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1ff584){if(_0x1ff584===this['activeAnnotation'])return;const _0x1f97c4=this['context']['plugins']['get'](Sidebar);_0x1f97c4['_activeAnnotation']=_0x1ff584;const _0xb82e43=this['activeAnnotation'];_0x1f97c4['refresh']({'blurredAnnotation':_0xb82e43,'activatedAnnotation':_0x1ff584}),this['activeAnnotation']=_0x1ff584;}['attach'](_0x3385e4){this['annotations']=_0x3385e4;const _0x44399b=this['context']['plugins']['get'](Sidebar);if(_0x44399b['_annotations']=_0x3385e4,this['isAttached'])throw new _0x2fe563('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x44399b,'set:container',()=>{this['detach'](),this['listenTo'](_0x44399b,'change:container',_0x1ca94b=>{_0x1ca94b['off'](),this['attach'](_0x3385e4);});}),_0x44399b['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1077c5=_0x3e7d79=>{_0x3e7d79['updateTargetRect'](),_0x44399b['addAnnotation'](_0x3e7d79);};for(const _0x5abdb6 of _0x3385e4)_0x1077c5(_0x5abdb6);this['listenTo'](_0x3385e4,'add',(_0x4f32df,_0x3bf586)=>{_0x1077c5(_0x3bf586);}),this['listenTo'](_0x3385e4,'remove',(_0x317fc0,_0x38d770,_0x260ef6)=>{_0x44399b['rearrange']({'removedAnnotation':_0x38d770,'previousAnnotation':_0x3385e4['get'](_0x260ef6-0x1),'nextAnnotation':_0x3385e4['get'](_0x260ef6+0x1)}),_0x38d770===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3385e4,'focus',(_0x38e830,_0x35f88b)=>{this['setActiveAnnotation'](_0x35f88b);}),this['listenTo'](_0x3385e4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1c3d70=this['context']instanceof _0x1011db?this['context']['editors']:new _0x4c964f([this['context']]);for(const _0x563a44 of _0x1c3d70)this['_integrateWithEditorAnnotations'](_0x563a44);this['listenTo'](_0x1c3d70,'add',(_0x2b9be4,_0x2eda4a)=>{this['listenTo'](_0x2eda4a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2eda4a);});}),this['listenTo'](_0x1c3d70,'remove',(_0x57c868,_0x1f9691)=>{_0x1f9691['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1f9691['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2fe563('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x20cb08=this['context']['plugins']['get'](Sidebar);_0x20cb08['_detachFromContainer'](this['annotations']),this['stopListening'](_0x20cb08),this['stopListening'](this['annotations']),this['context']instanceof _0x1011db&&this['stopListening'](this['context']['editors']);for(const _0x342183 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x342183);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1e8198){if(!_0x1e8198['plugins']['has']('EditorAnnotations'))return;const _0x471b94=_0x1e8198['plugins']['get']('EditorAnnotations'),_0x9c8008=()=>{const _0x131e77=_0x471b94['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x131e77[0x0]||null);};this['listenTo'](_0x471b94,'refresh',_0x9c8008),this['listenTo'](_0x471b94,'blur',(_0x2acad5,{isAnnotationTracked:_0xb3f44})=>{this['activeAnnotation']&&_0xb3f44(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x471b94,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x53a150=>{_0x471b94['hasDomSelection']()&&(_0x9c8008(),_0x53a150['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x471b94);}['_destroyEditorAnnotationsIntegration'](_0x4fcbcf){this['stopListening'](_0x4fcbcf),this['_editorAnnotations']['remove'](_0x4fcbcf);}}class AnnotationCounterButtonView extends _0x46c68b{['counterView'];constructor(_0x527b6b){super(_0x527b6b);const _0x594532=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5cc61e,_0x3070d5)=>_0x5cc61e?'...':_0x3070d5['toString']()),this['set']('annotationType',''),this['icon']=_0x2fd654,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x5e7531(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x594532['to']('annotationType',_0x159c5e=>'ck-annotation-counter__badge--'+_0x159c5e),_0x594532['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x594532['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class NarrowSidebar extends _0x2a95a9{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Sidebar,AnnotationsUIs];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4b7ce2){super(_0x4b7ce2),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xb08716())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4c964f(),this['_refreshPositioningDebounced']=_0x4fd98b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](AnnotationsUIs)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x190fdd){this['annotations']=_0x190fdd;const _0x5b7f01=this['context']['plugins']['get'](Sidebar),_0x23c4cd=this['balloonPanelView'];if(_0x5b7f01['_annotations']=_0x190fdd,this['isAttached'])throw new _0x2fe563('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5b7f01,'set:container',()=>{this['detach'](),this['listenTo'](_0x5b7f01,'change:container',_0x2f3a03=>{_0x2f3a03['off'](),this['attach'](_0x190fdd);});}),_0x5b7f01['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3898e2=_0x1f8286=>{const _0xe673c=new AnnotationCounterButtonView(this['context']['locale']);_0x5b7f01['addAnnotation'](_0x1f8286,_0xe673c),this['_annotationToNarrowView']['set'](_0x1f8286,_0xe673c),_0xe673c['bind']('isDirty','annotationType','number')['to'](_0x1f8286['view'],'isDirty','type','length'),_0xe673c['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x23c4cd['content']['first']!==_0x1f8286['view']?(this['_showBalloon'](_0x1f8286),_0x1f8286['view']['element']['focus'](),this['setActiveAnnotation'](_0x1f8286)):this['setActiveAnnotation'](null);});};for(const _0x36c2b1 of _0x190fdd)_0x3898e2(_0x36c2b1);this['listenTo'](_0x190fdd,'add',(_0x38dff3,_0x34c36f)=>{_0x3898e2(_0x34c36f);}),this['listenTo'](_0x190fdd,'remove',(_0x2ccef7,_0x115375,_0x472dd6)=>{this['_annotationToNarrowView']['get'](_0x115375)['destroy'](),this['_annotationToNarrowView']['delete'](_0x115375),_0x5b7f01['rearrange']({'removedAnnotation':_0x115375,'previousAnnotation':_0x190fdd['get'](_0x472dd6-0x1),'nextAnnotation':_0x190fdd['get'](_0x472dd6+0x1)}),_0x115375===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x190fdd,'focus',(_0x523338,_0x3c4f39)=>{this['setActiveAnnotation'](_0x3c4f39);}),this['listenTo'](_0x190fdd,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x186806,_0x5e06a9)=>{_0x5e06a9['keyCode']===_0x48723d['esc']&&_0x23c4cd['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x23c4cd['content']['first']),this['_hideBalloon'](),_0x5e06a9['stopPropagation'](),_0x5e06a9['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0xa8ead7,_0x59b5d8)=>{const _0xd699a1=_0x59b5d8['target'];_0x23c4cd['isVisible']&&_0x23c4cd['element']['contains'](_0xd699a1)||_0x5b7f01['view']['element']['contains'](_0xd699a1)||_0xa8ead7['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x106c85=>_0x106c85['contains'](_0xd699a1))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5c97c1=this['context']instanceof _0x1011db?this['context']['editors']:new _0x4c964f([this['context']]);for(const _0x54a4bb of _0x5c97c1)this['_integrateWithEditorAnnotations'](_0x54a4bb);this['listenTo'](_0x5c97c1,'add',(_0x4a95b6,_0x491f96)=>{this['listenTo'](_0x491f96,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x491f96);});}),this['listenTo'](_0x5c97c1,'remove',(_0x434719,_0x22423d)=>{_0x22423d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x22423d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x124fac){if(_0x124fac===this['activeAnnotation'])return;const _0x25c489=this['context']['plugins']['get'](Sidebar);if(_0x25c489['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x124fac,'disableAnimationOnActivatedAnnotation':!0x0}),_0x124fac)_0x25c489['getSidebarItemView'](_0x124fac)?this['_showBalloon'](_0x124fac):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x124fac;}['detach'](){if(!this['isAttached'])throw new _0x2fe563('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1d300c=this['context']['plugins']['get'](Sidebar);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x18a97e=>_0x18a97e['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1d300c['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1011db&&this['stopListening'](this['context']['editors']);for(const _0x9c08ea of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x9c08ea);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'](_0x1fd55c){if(!_0x1fd55c['plugins']['has']('EditorAnnotations'))return;const _0x175cc0=_0x1fd55c['plugins']['get']('EditorAnnotations'),_0x332987=this['context']['plugins']['get'](Sidebar),_0x1d9120=this['annotations'],_0x226e65=this['balloonPanelView'],_0x29af30=()=>{const _0xd17c62=_0x175cc0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xd17c62),this['setActiveAnnotation'](_0xd17c62[0x0]||null);};this['listenTo'](_0x175cc0,'refresh',_0x29af30),this['listenTo'](_0x175cc0,'blur',(_0x3a2d3f,{isAnnotationTracked:_0x274af5})=>{this['activeAnnotation']&&_0x274af5(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x175cc0,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1d9120,'blur',_0x229139=>{_0x175cc0['hasDomSelection']()&&_0x229139['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4dc7dd,_0x1479b4)=>{const _0x19e41e=_0x1479b4['target'];_0x226e65['isVisible']&&_0x226e65['element']['contains'](_0x19e41e)||_0x332987['view']['element']['contains'](_0x19e41e)||this['activeAnnotation']&&_0x175cc0['hasDomSelection']()&&(_0x29af30(),_0x4dc7dd['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x175cc0);}['_destroyEditorAnnotationsIntegration'](_0x5e014f){_0x5e014f&&(this['stopListening'](_0x5e014f),this['_editorAnnotations']['remove'](_0x5e014f));}['_setSelectedAnnotations'](_0x5e592e){for(const _0x5128fd of this['_selectedAnnotations'])_0x5e592e['includes'](_0x5128fd)||this['_manuallyClosedAnnotationViews']['delete'](_0x5128fd['view']);this['_selectedAnnotations']=_0x5e592e;}['_refreshPositioning'](){const _0x4e88c7=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4e88c7['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x32acb6){if(this['_manuallyClosedAnnotationViews']['has'](_0x32acb6['view']))return;const _0x46831e=this['balloonPanelView']['content']['first'];_0x46831e!==_0x32acb6['view']?(_0x46831e&&this['_detachListeners'](_0x46831e),this['_attachListeners'](_0x32acb6['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x32acb6['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2f4c71=this['balloonPanelView']['content']['first'],_0x30cb60=_0x2f4c71&&this['annotations']['getByView'](_0x2f4c71);if(!_0x30cb60||!this['_annotationToNarrowView']['has'](_0x30cb60))return;const _0x1d3c36=this['_annotationToNarrowView']['get'](_0x30cb60)['element'],_0x18b306=(function(){const _0x34d12e=ht['defaultPositions'];return[_0x34d12e['southArrowNorthEast'],_0x34d12e['northArrowSouthEast'],_0x34d12e['southArrowNorth'],_0x34d12e['northArrowSouth'],_0x34d12e['southArrowNorthWest'],_0x34d12e['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1d3c36,'positions':_0x18b306});}['_hideBalloon'](){const _0x4b1291=this['balloonPanelView'],_0x432c43=_0x4b1291['content']['first'];_0x432c43&&(this['_detachListeners'](_0x432c43),_0x4b1291['unpin'](),_0x4b1291['content']['clear']());}['_attachListeners'](_0xeddd88){this['listenTo'](_0xeddd88,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0xeddd88,'Esc',(_0x3a2f10,_0x5c2c2a)=>{this['_manuallyClosedAnnotationViews']['add'](_0xeddd88),this['_hideBalloon'](),_0x5c2c2a();});}['_detachListeners'](_0x114e15){this['stopListening'](_0x114e15);}}class InlineAnnotations extends _0x557e23{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[EditorAnnotations,at,AnnotationsUIs];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1407a6){super(_0x1407a6),_0x1407a6['editing']['view']['addObserver'](ut),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1407a6['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x4fd98b(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x24c656=this['editor']['plugins']['get'](AnnotationsUIs);_0x24c656['context']===this['editor']&&(_0x24c656['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x28842e,_0x345274)=>{const _0x2ec422=this['_balloon'];if(this['isAttached']&&_0x2ec422['visibleView']){const _0x1b20a9=this['annotations']['getByView'](_0x2ec422['visibleView']);_0x1b20a9&&this['_closeAnnotation'](_0x1b20a9),_0x345274();}}));}['afterInit'](){const _0x3f9416=this['editor']['plugins']['get'](AnnotationsUIs);_0x3f9416['context']===this['editor']&&(_0x3f9416['hasActive']()||_0x3f9416['switchTo']('inline'));}['setActiveAnnotation'](_0x200a97){_0x200a97!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x200a97&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x200a97)&&this['_addAnnotationToBalloon'](_0x200a97,!0x0),_0x200a97['isActive']=!0x0),_0x200a97||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x200a97);}['attach'](_0x4a9332){this['annotations']=_0x4a9332;const _0x1503ac=this['editor']['plugins']['get'](AnnotationsUIs),_0x191861=this['_balloon'];if(this['isAttached'])throw new _0x2fe563('inlineannotations-attach-already-attached',this);if(_0x1503ac['context']!==this['editor'])throw new _0x2fe563('inlineannotations-not-allowed-with-context',this);const _0x341411=this['editor']['plugins']['get'](EditorAnnotations);this['listenTo'](_0x341411,'refresh',()=>{const _0x4b26e4=_0x341411['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x21088d,_0x1f9929;!this['_forceRefresh']&&(_0x21088d=_0x4b26e4,_0x1f9929=this['_selectedAnnotations'],_0x21088d['length']===_0x1f9929['length']&&_0x21088d['every'](_0x26af95=>_0x1f9929['includes'](_0x26af95)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4b26e4),this['setActiveAnnotation'](_0x4b26e4[0x0]||null));}),this['listenTo'](_0x341411,'blur',(_0x54b434,{isAnnotationTracked:_0x274b21})=>{this['activeAnnotation']&&_0x274b21(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x341411,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x59e1b9,_0x1b981e,_0x384bf6)=>{_0x384bf6||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4a9332,'remove',(_0x39797a,_0x879d69)=>{this['_removeAnnotationFromBalloon'](_0x879d69),_0x879d69===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x191861,'change:visibleView',(_0x3a4c8d,_0xc713ef,_0x324086,_0xd40dab)=>{_0xd40dab&&this['stopListening'](_0xd40dab);const _0x104a5c=_0x4a9332['getByView'](_0x324086);_0x324086&&_0x104a5c&&(this['listenTo'](_0x324086,'change:height',()=>{_0x191861['updatePosition']();}),this['listenTo'](_0x324086,'Esc',()=>{this['_closeAnnotation'](_0x104a5c),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x104a5c&&this['setActiveAnnotation'](_0x104a5c));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x191861['visibleView']&&(_0x4a9332['getByView'](_0x191861['visibleView'])&&_0x191861['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 _0x2fe563('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x521592 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x521592);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x224fc7){for(const _0x5dddda of this['_selectedAnnotations'])_0x224fc7['includes'](_0x5dddda)||this['_manuallyClosed']['delete'](_0x5dddda);for(const _0x130b72 of this['annotations'])_0x224fc7['includes'](_0x130b72)||this['_removeAnnotationFromBalloon'](_0x130b72);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x439271 of _0x224fc7)this['_addAnnotationToBalloon'](_0x439271);}this['_selectedAnnotations']=_0x224fc7;}['_addAnnotationToBalloon'](_0x1fd3ab,_0x3d39a0=!0x1){this['_manuallyClosed']['has'](_0x1fd3ab)||(this['_addedAnnotations']['has'](_0x1fd3ab)||this['_balloon']['hasView'](_0x1fd3ab['view'])||(this['_addedAnnotations']['add'](_0x1fd3ab),this['_balloon']['add']({'stackId':_0x1fd3ab['view']['id'],'view':_0x1fd3ab['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1fd3ab)}})),_0x3d39a0&&this['_balloon']['showStack'](_0x1fd3ab['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2f7cc4){const _0x3719d4=_0x2f7cc4['target'],_0x14bd2d=this['editor']['editing']['view'],_0x218336=_0x14bd2d['document']['selection']['getFirstRange'](),_0x386c86=_0x14bd2d['domConverter']['viewRangeToDom'](_0x218336);if(_0x386c86['collapse'](!0x0),_0x3719d4){if(_0x3719d4 instanceof _0xb1c7e3)return _0x3719d4;let _0x4efc6e=[];for(const _0x2ee381 of _0x3719d4)_0x4efc6e['push'](..._0xb1c7e3['getDomElementRects'](_0x2ee381));_0x4efc6e=function(_0x4cf025){const _0x5a2e6e=[];let _0x15032f=_0x4cf025[0x0];for(let _0x472320=0x1;_0x472320<_0x4cf025['length'];_0x472320++)if(Wt(_0x15032f,_0x4cf025[_0x472320])){const _0x21fe73=_0x4cf025[_0x472320]['width'];_0x15032f['width']+=_0x21fe73,_0x15032f['right']+=_0x21fe73;}else _0x5a2e6e['push'](_0x15032f),_0x15032f=_0x4cf025[_0x472320];return _0x5a2e6e['push'](_0x15032f),_0x5a2e6e;}(_0x4efc6e);const _0x2016d7=_0x386c86['getBoundingClientRect']();return _0x4efc6e['find'](_0x4543b7=>_0x4543b7['top']<=_0x2016d7['top']&&_0x4543b7['bottom']>=_0x2016d7['bottom']&&_0x4543b7['left']<=_0x2016d7['left']&&_0x4543b7['right']>=_0x2016d7['right'])||_0x4efc6e[0x0];}return _0x2f7cc4['targetRect']||_0x386c86;}['_removeAnnotationFromBalloon'](_0x13c4eb){this['_addedAnnotations']['has'](_0x13c4eb)&&this['_balloon']['hasView'](_0x13c4eb['view'])&&(this['_addedAnnotations']['delete'](_0x13c4eb),this['_balloon']['remove'](_0x13c4eb['view']));}['_closeAnnotation'](_0x41ea7){this['_manuallyClosed']['add'](_0x41ea7),this['_removeAnnotationFromBalloon'](_0x41ea7);}}function Wt(_0x392c4d,_0x1bc37c){return _0x392c4d['top']===_0x1bc37c['top']&&_0x392c4d['bottom']===_0x1bc37c['bottom']&&_0x392c4d['right']===_0x1bc37c['left'];}class CommentsArchiveView extends _0x5e7531{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x642c95,_0x3c6222){super(_0x642c95),this['set']('isEmpty',!_0x3c6222['length']),this['focusTracker']=new _0x3dcbcb(),this['_annotationViews']=_0x3c6222,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x429799({'focusables':_0x3c6222,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3c6222,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3c6222,'remove',(_0x147311,_0x15eb12)=>{_0x15eb12['isActive']&&this['focus'](),_0x3c6222['length']||(this['isEmpty']=!0x0);});const _0x6831f2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':vt(_0x642c95,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3c6222},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x6831f2['if']('isEmpty','ck-hidden',_0x57e544=>!_0x57e544)]},'children':[{'text':vt(_0x642c95,'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 _0x95a83 of this['_annotationViews'])this['focusTracker']['add'](_0x95a83['element']);this['_annotationViews']['on']('change',(_0x6d989a,{added:_0x4ba73b,removed:_0x4b3463})=>{for(const _0x34a459 of _0x4ba73b)this['focusTracker']['add'](_0x34a459['element']);for(const _0x4114de of _0x4b3463)this['focusTracker']['remove'](_0x4114de['element']);});}}class CommentsArchive extends _0x2a95a9{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsRepository,Annotations];}constructor(_0x5b7cfc){super(_0x5b7cfc),this['archivedThreads']=new _0x4c964f();}['init'](){const _0x5445a3=this['context'],_0xe999d4=_0x5445a3['plugins']['get'](CommentsRepository),_0x553ddf=_0x5445a3['plugins']['get'](Annotations);this['listenTo'](_0xe999d4,'addCommentThread',(_0x2b9344,{threadId:_0x3f608b})=>{const _0xd87679=_0xe999d4['getCommentThread'](_0x3f608b);_0xd87679['archivedAt']&&this['archivedThreads']['add'](_0xd87679,this['_calculatePosition'](_0xd87679['archivedAt'])),this['listenTo'](_0xd87679,'change:archivedAt',(_0x1ee392,_0x3aac19,_0x131956)=>{_0x131956?this['archivedThreads']['has'](_0xd87679)||this['archivedThreads']['add'](_0xd87679,this['_calculatePosition'](_0xd87679['archivedAt'])):this['archivedThreads']['has'](_0xd87679)&&this['archivedThreads']['remove'](_0xd87679);});}),this['listenTo'](_0xe999d4,'removeCommentThread',(_0xe40312,{threadId:_0x28eb9e})=>{const _0x683e94=_0xe999d4['getCommentThread'](_0x28eb9e);this['stopListening'](_0x683e94),this['archivedThreads']['has'](_0x683e94)&&this['archivedThreads']['remove'](_0x683e94);},{'priority':'highest'}),this['listenTo'](_0x553ddf['collection'],'focus',(_0x36f717,_0x71db0b)=>{_0x71db0b['isVisible']||(_0x71db0b['isActive']=!0x0,_0x553ddf['activate'](_0x71db0b));});}['_calculatePosition'](_0x5a47b2){const _0x271069=[...this['archivedThreads']]['findIndex'](_0x1d6c09=>_0x1d6c09['archivedAt']<_0x5a47b2);return _0x271069>-0x1?_0x271069:this['archivedThreads']['length'];}}class CommentsArchiveUI extends _0x557e23{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsArchive,ct];}constructor(_0x32562e){super(_0x32562e),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4ad3b9=this['editor'],_0x32eab6=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4ad3b9['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x46c68b,!0x0)),_0x4ad3b9['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x7c641f=this['_createCommentsArchiveButton'](ot);return _0x7c641f['set']({'role':'menuitemcheckbox'}),_0x7c641f;});const _0x5311c8=_0x4ad3b9['plugins']['get'](CommentsArchive),_0x37deee=_0x4ad3b9['plugins']['get']('Annotations'),_0x447eed=_0x4ad3b9['plugins']['get']('CommentsRepository');_0x5311c8['archivedThreads']['forEach'](_0x453fc7=>{this['_handleNewThread'](_0x453fc7);}),this['listenTo'](_0x5311c8['archivedThreads'],'add',(_0x1f0031,_0x311dd6)=>{this['_handleNewThread'](_0x311dd6);}),this['listenTo'](_0x37deee['collection'],'add',(_0x55b6b4,_0x2a30c6)=>{const _0x4a975f=this['_pendingThreads']['find'](_0x4dfff6=>{const _0x20543f=_0x447eed['_threadToController']['get'](_0x4dfff6);return _0x20543f&&_0x2a30c6['innerView']===_0x20543f['view'];});if(_0x4a975f){const _0x79e7fe=this['_calculatePosition'](_0x4a975f['archivedAt']);this['_addAnnotationToArchive'](_0x2a30c6,_0x79e7fe),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4a975f),0x1);}}),this['listenTo'](_0x5311c8['archivedThreads'],'remove',(_0x350577,_0x1e6f38)=>{const _0x4add11=_0x4ad3b9['config']['get']('collaboration.channelId');if(!_0x4add11||_0x1e6f38['channelId']===_0x4add11){if(this['_pendingThreads']['includes'](_0x1e6f38))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1e6f38),0x1);else{const _0x7738ae=_0x447eed['_threadToController']['get'](_0x1e6f38),_0x57aa87=_0x37deee['getByInnerView'](_0x7738ae['view']);this['annotationViews']['remove'](_0x57aa87['view']),this['stopListening'](_0x57aa87),this['stopListening'](_0x57aa87['focusableElements']);}}}),this['listenTo'](_0x37deee['collection'],'add',(_0x3766d3,_0x15bc6c)=>{this['listenTo'](_0x15bc6c,'escape',_0x32eab6);}),this['listenTo'](_0x37deee['collection'],'remove',(_0x4d057e,_0x3087bc)=>{this['stopListening'](_0x3087bc,'escape',_0x32eab6);});}['_addAnnotationToArchive'](_0x2583d0,_0x29536c){this['listenTo'](_0x2583d0,'set:isVisible',_0x135420=>{_0x135420['return']=!0x1,_0x135420['stop']();}),this['annotationViews']['add'](_0x2583d0['view'],_0x29536c);}['_handleNewThread'](_0x587c2c){const _0x5521cc=this['editor']['plugins']['get']('CommentsRepository'),_0x4ccf7e=this['editor']['plugins']['get']('Annotations'),_0x11956f=this['editor']['config']['get']('collaboration.channelId');if(!_0x11956f||_0x587c2c['channelId']===_0x11956f){const _0x5cfd96=_0x5521cc['_threadToController']['get'](_0x587c2c);if(!_0x5cfd96)return void this['_pendingThreads']['push'](_0x587c2c);const _0x141d18=this['_calculatePosition'](_0x587c2c['archivedAt']),_0x2aeefa=_0x4ccf7e['getByInnerView'](_0x5cfd96['view']);_0x2aeefa['isVisible']&&_0x4ccf7e['_visibleAnnotations']['remove'](_0x2aeefa),this['_addAnnotationToArchive'](_0x2aeefa,_0x141d18);}}['_calculatePosition'](_0x50b064){const _0x481d27=this['editor']['config']['get']('collaboration.channelId'),_0x2a38cf=[...this['editor']['plugins']['get'](CommentsArchive)['archivedThreads']]['filter'](_0x53bf8b=>_0x53bf8b['channelId']===_0x481d27)['findIndex'](_0x16dd54=>_0x16dd54['archivedAt']<_0x50b064);return _0x2a38cf<0x0||_0x2a38cf>this['annotationViews']['length']?this['annotationViews']['length']:_0x2a38cf-0x1;}['_toggleDialog'](){const _0x6f0394=this['editor'],_0x5b9c37=_0x6f0394['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new CommentsArchiveView(_0x6f0394['locale'],this['annotationViews'])),'commentsArchive'===_0x5b9c37['id']?_0x5b9c37['hide']():_0x5b9c37['show']({'id':'commentsArchive','title':vt(_0x6f0394['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4f886b,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x288f3c,_0x9f02b2=!0x1){const _0x3bf7e5=this['editor']['locale'],_0x421904=this['editor']['plugins']['get']('Dialog'),_0x5b4dca=new _0x288f3c(_0x3bf7e5);return _0x5b4dca['bind']('isEnabled')['to'](this,'isEnabled'),_0x5b4dca['bind']('isOn')['to'](_0x421904,'id',_0x3ae623=>'commentsArchive'===_0x3ae623),_0x5b4dca['set']({'label':vt(_0x3bf7e5,'COMMENTS_ARCHIVE'),'icon':_0x4f886b,'isToggleable':!0x0}),_0x9f02b2&&(_0x5b4dca['tooltip']=!0x0),this['listenTo'](_0x5b4dca,'execute',()=>this['_toggleDialog']()),_0x5b4dca;}['_hideDialogOnAnnotationEscape']=_0x40a318=>{const _0x283819=_0x40a318['source'];if(!this['annotationViews']['has'](_0x283819['view']))return;const _0x208dfb=this['editor']['plugins']['get']('Dialog');_0x208dfb['isOpen']&&'commentsArchive'===_0x208dfb['id']&&(_0x208dfb['hide'](),_0x40a318['stop']());};}class Comments extends _0x557e23{static get['requires'](){return[CommentsRepository,CommentsEditing,CommentsUI,CommentsArchive,CommentsArchiveUI,CommentsOnly,WideSidebar,NarrowSidebar,InlineAnnotations];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{AddCommentThreadCommand,Annotation,AnnotationCollection,AnnotationCounterButtonView,AnnotationView,Annotations,AnnotationsSidebarItemView,AnnotationsSidebarView,AnnotationsUIs,BaseCommentThreadView,BaseCommentView,Comment,CommentThread,CommentThreadController,CommentThreadInputView,CommentThreadView,CommentView,Comments,CommentsArchive,CommentsArchiveUI,CommentsEditing,CommentsListView,CommentsOnly,CommentsRepository,CommentsUI,EditorAnnotations,InlineAnnotations,NarrowSidebar,Sidebar,WideSidebar,Ot as bindAnnotationCollections};
23
+ import{Editor as _0x441226,ContextPlugin as _0x283925,PendingActions as _0x1dce2a,Command as _0x11f7ba,Plugin as _0x4e3a6a,Context as _0x353685}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1861d7,uid as _0x308b6,KeystrokeHandler as _0x846282,FocusTracker as _0x252bbd,diff as _0xdd14c4,Collection as _0x499a27,Rect as _0x416d7d,CKEditorError as _0x21ce1d,first as _0x548c32,priorities as _0x45a290,scrollViewportToShowTarget as _0x590e11,getEnvKeystrokeText as _0x23bd78,toUnit as _0x2746e8,DomEmitterMixin as _0x1f5773,keyCodes as _0x4350d7}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x159892,AriaDescriptionView as _0x3182ea,setupThreadKeyboardNavigation as _0xa38b70,ConfirmMixin as _0xd164fc,LateFocusButtonView as _0x4090a8,trimHtml as _0x6e9498,LateFocusDropdownButtonView as _0x3e25c5,FOCUS_ANNOTATION_KEYSTROKE as _0x130533,Users as _0x3bef93,getDateTimeFormatter as _0x3a40bc,hashObject as _0x4a0ba1,getAllMarkersDomElementsSorted as _0x28774f,surroundingMarkersDetector as _0xb7f08d}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{throttle as _0x94919a,cloneDeep as _0x2211cc,set as _0x40cab1,unset as _0x27a806,isEqual as _0x187522,debounce as _0x4aa75f}from'es-toolkit/compat';import{IconUndo as _0x15ef58,IconCheck as _0x463891,IconPencil as _0x34d770,IconRemoveComment as _0x246a50,IconThreeVerticalDots as _0x2040c2,IconAddComment as _0x15a2cf,IconCommentsArchive as _0x56a931}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x35564b,InlineEditableUIView as _0x321159,EditorUI as _0x1b2dd2,View as _0x4e8972,FocusCycler as _0x10e0b,ButtonView as _0x1bde71,ViewCollection as tt,createDropdown as et,ListView as it,focusChildOnDropdownOpen as st,ListItemView as nt,MenuBarMenuListItemButtonView as ot,BodyCollection as rt,BalloonPanelView as ht,ContextualBalloon as at,Dialog as ct,DialogViewPosition as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as mt,enableViewPlaceholder as lt,MouseObserver as ut}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as At,ShiftEnter as gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Ct}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as _t}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Tt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as yt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{toWidget as It}from'@ckeditor/ckeditor5-widget/dist/index.js';class CommentThreadController extends/* #__PURE__ -- @preserve */
24
+ _0x1861d7(){['model'];['view'];constructor(_0x1a7fac,_0x8f6c22){super(),this['model']=_0x1a7fac,this['model']['_isAttached']=!0x0,this['view']=_0x8f6c22,this['listenTo'](_0x8f6c22,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x8f6c22,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x8f6c22,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x8f6c22,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x8f6c22,'addComment',(_0x3e15a4,_0x33aa6a)=>this['addComment'](_0x33aa6a)),this['listenTo'](_0x8f6c22,'updateComment',(_0x2378fa,_0x3a7191,_0x24d981)=>this['updateComment'](_0x3a7191,_0x24d981)),this['listenTo'](_0x8f6c22,'removeComment',(_0x405325,_0x27225c)=>this['removeComment'](_0x27225c));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x5da16a){this['model']['addComment']({'content':_0x5da16a,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xa9c500,_0x3174df){this['model']['getComment'](_0xa9c500)['update']({'content':_0x3174df});}['removeComment'](_0x301236){this['model']['getComment'](_0x301236)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function vt(_0x1d54b0,_0x2549fa,_0x5209a3){const t=_0x1d54b0['t'];switch(_0x2549fa){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'},_0x5209a3);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x5209a3);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'},_0x5209a3);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'},_0x5209a3);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x5209a3);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'},_0x5209a3);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'},_0x5209a3);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'},_0x5209a3);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class CommentEditorUIView extends _0x35564b{['main'];['editable'];constructor(_0x54843b,_0x3c94ab){super(_0x54843b);const _0xc48406=_0x308b6();this['main']=this['createCollection'](),this['editable']=new _0x321159(_0x54843b,_0x3c94ab,void 0x0,{'label':()=>vt(_0x54843b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x54843b['uiLanguageDirection'],'lang':_0x54843b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xc48406},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class CommentEditorUI extends _0x1b2dd2{['view'];constructor(_0x11bb1b){super(_0x11bb1b),this['view']=new CommentEditorUIView(_0x11bb1b['locale'],_0x11bb1b['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x518a91=this['editor']['editing']['view'],_0x15b2b2=this['view']['editable'],_0x2f2388=_0x518a91['document']['getRoot']();_0x15b2b2['name']=_0x2f2388['rootName'],this['view']['render']();const _0x455e5d=_0x15b2b2['element'];this['setEditableElement'](_0x15b2b2['name'],_0x455e5d),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x518a91['attachDomRoot'](_0x455e5d),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const bt=[ft,At,gt,Ct,_t,Tt,yt];class CommentEditor extends/* #__PURE__ -- @preserve */
25
+ _0x1861d7(_0x441226){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>bt)());constructor(_0x102b11={}){function _0x535737(_0x46edbc){return _0x46edbc['map'](_0xa92c1f=>String['fromCharCode'](_0xa92c1f))['join']('');}(_0x102b11=Object['assign']({},_0x102b11))['plugins']||(_0x102b11['plugins']=CommentEditor['defaultPlugins']),super(_0x102b11),this['ui']=new CommentEditorUI(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x535737([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x535737([0x76,0x69,0x65,0x77])][_0x535737([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x535737([0x61,0x75,0x74,0x6f]),this[_0x535737([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x535737([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x535737([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x535737([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x535737([0x6f,0x6b])});}['create'](){const _0x30aaf2=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x30aaf2))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x49ceb0=>{const _0x1353fd=this['model']['document']['getRoot'](),_0x1c4df5=_0x1353fd&&_0x1353fd['getChild'](_0x1353fd['childCount']-0x1);_0x49ceb0['setSelection'](_0x1c4df5,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3e13d3=this['editing']['view'],_0x11f825=_0x3e13d3['document']['getRoot'](),_0x21dfee=_0x11f825['getChild'](0x0);_0x11f825['childCount']>0x1||!_0x21dfee||'p'!=_0x21dfee['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x3e13d3,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x21dfee['placeholder']=this['placeholder']),lt({'view':_0x3e13d3,'element':_0x21dfee,'keepOnFocus':!0x0}),this['placeholderElement']=_0x21dfee);}}class CommentInputView extends _0x4e8972{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x48d42c,_0x4a9b86={}){super(_0x48d42c),this['editor']=null,this['_editorConfig']=_0x4a9b86,this['set']('value',_0x4a9b86['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',vt(_0x48d42c,'Reply...')),this['set']('submitLabel',vt(_0x48d42c,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x846282(),this['focusTracker']=new _0x252bbd(),this['focusCycler']=new _0x10e0b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x466374=>!_0x466374['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',(_0x29679a,_0x31f07c)=>{this['cancelButtonView']['fire']('execute'),_0x31f07c();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3b1325,_0x4f651e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4f651e());}),this['on']('submit',(_0x475b87,_0x8a9449)=>{_0x8a9449['length']>0xfde8?(alert(vt(_0x48d42c,'TOO_LONG_COMMENT_ALERT',[_0x8a9449['length'],0xfde8])),_0x475b87['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new CommentEditor(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x324882=this['editor'];this['element']['insertBefore'](_0x324882['ui']['element'],this['element']['firstChild']),_0x324882['model']['document']['on']('change',()=>this['value']=_0x324882['getData']()),_0x324882['bind']('placeholder')['to'](this),this['focusables']['add'](_0x324882['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x103909){-0x1===_0x103909?(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:_0x4b54b5}=this,_0x2caa9f=new _0x1bde71(_0x4b54b5);return _0x2caa9f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2caa9f['withText']=!0x0,_0x2caa9f['bind']('label')['to'](this,'submitLabel'),_0x2caa9f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2caa9f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4f6cc2,_0x8dff61)=>!_0x8dff61&&!!_0x4f6cc2['trim']()),_0x2caa9f;}['_createCancelButton'](){const {locale:_0x48dcbb}=this,_0x1dbb3e=new _0x1bde71(_0x48dcbb);return _0x1dbb3e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1dbb3e['label']=vt(_0x48dcbb,'Cancel'),_0x1dbb3e['withText']=!0x0,_0x1dbb3e['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1dbb3e;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2ddaf0=>{this['focusTracker']['add'](_0x2ddaf0['element']);}),this['focusables']['on']('change',(_0x2ec0d2,_0x111bc0)=>{for(const _0xf24348 of Array['from'](_0x111bc0['added'])['reverse']())this['focusTracker']['add'](_0xf24348['element']);});}}class CommentThreadInputView extends _0x4e8972{constructor(_0x11f6ed,_0x51799d,_0x35d891){super(_0x11f6ed),this['commentInputView']=new CommentInputView(_0x11f6ed,_0x35d891),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3d89fd,_0x5bd5b7)=>_0x3d89fd||!!_0x5bd5b7),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 _0x159892(_0x11f6ed,_0x51799d),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'](_0x41efa8){this['commentInputView']['focus'](_0x41efa8);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x376ae6,_0x2d22d2)=>{const {submitButtonView:_0x2ed883,cancelButtonView:_0x443b44,editor:_0xb87896}=this['commentInputView'];[_0x2ed883['element'],_0x443b44['element'],_0xb87896?_0xb87896['editing']['view']['getDomRoot']():null]['filter'](_0x523478=>_0x523478)['some'](_0x5d2ec6=>_0x5d2ec6['contains'](_0x2d22d2['target']))||(this['focus'](),_0x2d22d2['preventDefault']());});}}class CollapsedCommentsView extends _0x4e8972{constructor(_0x2b0dbd){super(_0x2b0dbd);const _0x23c1c8=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x23c1c8['to']('count',_0x1fd650=>vt(_0x2b0dbd,'NUMBER_OF_COMMENTS',_0x1fd650))}]});}}class CommentsListView extends _0x4e8972{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1db52b,_0x5cdb49,_0x19230b){super(_0x1db52b);const _0x5b1863=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5cdb49['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5cdb49,this['_config']=_0x19230b,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x252bbd(),this['keystrokes']=new _0x846282(),this['focusCycler']=new _0x10e0b({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x251f96=>this['commentViews']['map'](_0x27635d=>_0x27635d['element'])['includes'](_0x251f96['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new CollapsedCommentsView(_0x1db52b),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x26a0e6=>_0x26a0e6-this['_config']['maxCommentsWhenCollapsed']);for(const _0xcb91f6 of _0x5cdb49['comments'])this['_handleNewCommentModel'](_0xcb91f6);this['_handleInfoComment'](),this['listenTo'](_0x5cdb49['comments'],'add',(_0x5782fe,_0x1980f7)=>{const _0x4bb8a2=this['_calculatePosition'](_0x1980f7);this['length']++,this['_handleNewCommentModel'](_0x1980f7,_0x4bb8a2),this['refreshVisibleViews']();}),this['listenTo'](_0x5cdb49['comments'],'remove',(_0x3aa1b2,_0x2a4cdf)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2a4cdf),this['refreshVisibleViews']();}),this['listenTo'](_0x5cdb49,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5cdb49,'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',_0x5b1863['if']('length','ck-hidden',_0x483684=>!_0x483684)],'aria-label':vt(_0x1db52b,'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'](_0x280128){-0x1===_0x280128?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4b3d4d of this['commentViews'])_0x4b3d4d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x36c004,_0x35e30a){const _0x3a7f38=new this['_config']['CommentView'](this['locale'],_0x36c004,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3a7f38['viewUid']=_0x36c004['id'],_0x3a7f38['delegate']('removeComment')['to'](this),_0x3a7f38['delegate']('updateComment')['to'](this),_0x3a7f38['delegate']('resolveCommentThread')['to'](this),_0x3a7f38['delegate']('editorReady')['to'](this),_0x3a7f38['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3a7f38,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3a7f38,_0x35e30a);}['_calculatePosition'](_0x59ff97){const _0x399c68=this['_model']['_findOptimalIndex'](_0x59ff97);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x59ff97['authoredAt']?_0x399c68-0x1:_0x399c68:_0x399c68-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5df575={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':vt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x5df575,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5df575));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x263c7e){const _0x4d2859=this['commentViews']['remove'](_0x263c7e['id']);this['stopListening'](_0x4d2859),_0x4d2859['isEditMode']&&this['_updateHasDirtyComment'](),_0x4d2859['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x13fc16=>_0x13fc16['isEditMode']);}['_rearrangeCollapse'](){const _0x2bf46b=function(_0x14c195){const _0x6a15d7=new _0x499a27();for(const _0xc6fab1 of _0x14c195)_0x6a15d7['add'](_0xc6fab1);return _0x6a15d7;}(this['commentViews']),_0x1ad04b=this['_collapsedCommentsView']['count'];for(let _0x2efed1=0x1;_0x2efed1<=_0x1ad04b;_0x2efed1++)_0x2bf46b['remove'](0x1);for(const _0x5b7698 of _0x2bf46b)_0x5b7698['collapse']();_0x1ad04b>0x0&&_0x2bf46b['add'](this['_collapsedCommentsView'],0x1),Et(_0xdd14c4(Array['from'](this['visibleViews']),Array['from'](_0x2bf46b)),this['visibleViews'],_0x2bf46b);}['_rearrangeExpand'](){Et(_0xdd14c4(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x42635e of this['visibleViews'])_0x42635e['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4669b7=>{this['focusTracker']['add'](_0x4669b7['element']),this['keystrokes']['listenTo'](_0x4669b7['element']);}),this['commentViews']['on']('change',(_0x5d3745,_0x9cc04f)=>{for(const _0x30a7b9 of _0x9cc04f['removed'])this['focusTracker']['remove'](_0x30a7b9['element']),this['keystrokes']['stopListening'](_0x30a7b9['element']);for(const _0x296f99 of Array['from'](_0x9cc04f['added'])['reverse']())this['focusTracker']['add'](_0x296f99['element']),this['keystrokes']['listenTo'](_0x296f99['element']);});}}function Et(_0x181c70,_0x22537e,_0x46d061){let _0x4884ac=0x0;for(const _0x422e46 of _0x181c70)switch(_0x422e46){case'insert':_0x22537e['add'](_0x46d061['get'](_0x4884ac),_0x4884ac),_0x4884ac++;break;case'delete':_0x22537e['remove'](_0x4884ac);break;case'equal':_0x4884ac++;}}class CommentThreadHeaderContextView extends _0x4e8972{constructor(_0x23cdc3){super(_0x23cdc3);const _0x5abfef=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5abfef['to']('contextValue',_0x473de8=>vt(_0x23cdc3,'THREAD_CONTEXT_LABEL',_0x473de8)),'tabindex':-0x1},'children':[{'text':_0x5abfef['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class CommentThreadHeaderView extends _0x4e8972{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xb0f464,_0xbcb683){super(_0xb0f464);const _0x35b6c5=this['bindTemplate'];this['_model']=_0xbcb683,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x252bbd(),this['keystrokes']=new _0x846282(),this['focusCycler']=new _0x10e0b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x585147=>!!_0x585147),this['bind']('contextValue')['to'](this['_model'],'context',_0x59d9d8=>_0x59d9d8&&_0x59d9d8['value']?this['_trimContextValue'](_0x59d9d8['value']):vt(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',_0x35b6c5['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 _0x3083c3=new _0x1bde71(this['locale']);return _0x3083c3['label']=vt(this['locale'],'Reopen'),_0x3083c3['tooltip']=vt(this['locale'],'Reopen'),_0x3083c3['icon']=_0x15ef58,_0x3083c3['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x16f2ac=>!_0x16f2ac),_0x3083c3['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3cf733,_0x26b526)=>_0x3cf733&&_0x26b526),_0x3083c3['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3083c3;}['_trimContextValue'](_0x3b6c66){if(_0x3b6c66['length']<0x96)return _0x3b6c66;const _0x19a192=_0x3b6c66['lastIndexOf']('\x20',0x93);return _0x3b6c66['substring'](0x0,_0x19a192>-0x1?_0x19a192:0x93)+'...';}['_attachContextActions'](){const _0x20b77c=this['element']['querySelector']('.ck-context'),_0x3d48e5=_0x20b77c['querySelector']('.ck-context__value');this['listenTo'](_0x20b77c,'mouseenter',()=>{_0x3d48e5['offsetWidth']<_0x3d48e5['scrollWidth']&&_0x20b77c['classList']['add']('overlay');}),this['listenTo'](_0x20b77c,'mouseleave',()=>{_0x20b77c['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4d24aa of this['focusables'])this['focusTracker']['add'](_0x4d24aa['element']),this['keystrokes']['listenTo'](_0x4d24aa['element']);}['_createContextView'](){const _0xde9e33=new CommentThreadHeaderContextView(this['locale']);return _0xde9e33['bind']('contextValue')['to'](this),_0xde9e33;}}class BaseCommentThreadView extends _0x4e8972{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5326c8,_0x173032,_0x50bb2a,_0x4e858d){super(_0x5326c8),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x173032,this['_localUser']=_0x50bb2a,this['_config']=_0x4e858d,this['commentThreadHeaderView']=new CommentThreadHeaderView(_0x5326c8,_0x173032),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x3182ea(_0x5326c8,vt(_0x5326c8,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new CommentsListView(_0x5326c8,_0x173032,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4e858d)),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',(_0x5cfacf,_0x2d8fcc)=>_0x5cfacf||!!_0x2d8fcc),this['bind']('isUnlinked')['to'](_0x173032,'unlinkedAt',_0x493be1=>!!_0x493be1),this['bind']('ariaLabel')['to'](this,'length',_0x3ed18e=>{const _0x17c70e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return vt(this['locale'],'COMMENT_THREAD_LABEL',[_0x3ed18e,_0x17c70e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x252bbd(),this['keystrokes']=new _0x846282(),this['focusCycler']=new _0x10e0b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x59bb79=>_0x59bb79['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0xa38b70(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x509f57=new CommentThreadInputView(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x2af7c5=_0x509f57['commentInputView'];return _0x509f57['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x2af7c5,'value',(_0x1383cc,_0x3a8ad5,_0x511a5a,_0x584674,_0x4a33e3)=>!!_0x4a33e3||!!_0x584674&&_0x511a5a&&!_0x3a8ad5||_0x1383cc&&_0x511a5a&&!_0x3a8ad5),_0x2af7c5['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4dc5e2,_0x1aede1,_0x1857e0)=>{let _0x760f8c;return _0x760f8c=_0x1857e0&&_0x1aede1?'Reply\x20to\x20reopen\x20discussion...':_0x4dc5e2?'Reply...':'Write\x20a\x20comment...',vt(this['locale'],_0x760f8c);}),_0x2af7c5['bind']('submitLabel')['to'](this,'length',_0x5ec999=>vt(this['locale'],_0x5ec999?'Reply':'Comment')),_0x2af7c5['on']('submit',(_0x34da39,_0x5bfb8d)=>{this['fire']('addComment',_0x5bfb8d),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x2af7c5['on']('cancel',()=>{this['focus']();}),_0x2af7c5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2af7c5['on']('cancel',_0x39cde5=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x39cde5['stop']());}),this['on']('change:isActive',(_0x3391f8,_0x282970,_0x32fbe9)=>{_0x32fbe9||this['length']||_0x2af7c5['value']||this['fire']('removeCommentThread');}),_0x509f57;}}class CommentThreadView extends/* #__PURE__ -- @preserve */
27
+ _0xd164fc(BaseCommentThreadView){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xe4c109,_0x8c6c0a,_0x5a936a,_0x44d5bd){super(_0xe4c109,_0x8c6c0a,_0x5a936a,_0x44d5bd),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xe4c109,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x4d8e69,_0x52f285,_0x3a6b99)=>{_0x3a6b99||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x54feca,_0x30be2b,_0x446d01)=>{_0x446d01&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x454e19=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x454e19['if']('isActive','ck-thread--active'),_0x454e19['if']('isUnlinked','ck-thread--unlinked'),_0x454e19['to']('actionIndicator',_0xa6a36a=>_0xa6a36a?'ck-thread--'+_0xa6a36a:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x454e19['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 _0x517477 of this['commentsListView']['commentViews'])_0x517477['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x1b7df3}=this,_0x178a82=this['commentsListView']['commentViews']['get'](0x0);_0x178a82===this['_boundFirstCommentView']||_0x178a82['isSystemComment']||(this['_boundFirstCommentView']=_0x178a82,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x178a82,'actionIndicator',_0x3faa58=>'remove'===_0x3faa58?'remove':null),_0x178a82['placeholder']=vt(_0x1b7df3,'Write\x20a\x20comment...'),_0x178a82['removeButton']['on']('execute',_0x40835d=>{_0x40835d['stop'](),this['showConfirm'](vt(_0x1b7df3,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x178a82['focus']();}),_0x178a82['actionBar']['add'](this['resolveButton'],0x0),_0x178a82['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x15f11d=new _0x4090a8(this['locale']);return _0x15f11d['label']=vt(this['locale'],'Resolve'),_0x15f11d['tooltip']=vt(this['locale'],'Resolve'),_0x15f11d['icon']=_0x463891,_0x15f11d['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x15f11d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3054c3=>!_0x3054c3),_0x15f11d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5e391f,_0x377f5e)=>_0x5e391f&&!_0x377f5e),_0x15f11d['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x15f11d;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class CommentContentView extends _0x4e8972{constructor(_0x46fae0){super(_0x46fae0),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x42dc19,_0x51d576,_0x4ea66a)=>{this['element']['innerHTML']=_0x4ea66a;}),this['element']['innerHTML']=this['content'];}}class BaseCommentView extends _0x4e8972{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x359b44,_0x4ca790,_0x168b06){super(_0x359b44),this['_model']=_0x4ca790,this['_config']=_0x168b06,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x4ca790,'content',_0x4ca790,'authoredAt',(_0x5c7082,_0x1ab228)=>vt(_0x359b44,'COMMENT_ARIA_LABEL',[_0x4ca790['author']['name'],_0x168b06['formatDateTime'](_0x1ab228),new DOMParser()['parseFromString'](_0x5c7082,'text/html')['body']['textContent'],_0x4ca790['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x3182ea(_0x359b44,vt(_0x359b44,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new tt(),this['focusTracker']=new _0x252bbd(),this['keystrokes']=new _0x846282(),this['focusCycler']=new _0x10e0b({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2c237a=>_0x2c237a['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']?vt(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):vt(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?vt(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):vt(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x20b714=new CommentContentView(this['locale']);return _0x20b714['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x10aac0,_0x276c20)=>_0x276c20?_0x6e9498(_0x10aac0,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x10aac0),_0x20b714;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4f7d80=new CommentInputView(this['locale'],this['_config']['editorConfig']);return _0x4f7d80['value']=this['_model']['content'],_0x4f7d80['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4f7d80['submitLabel']=vt(this['locale'],'Save'),_0x4f7d80['on']('submit',(_0x42eba0,_0x4502e0)=>{this['fire']('updateComment',this['_model']['id'],_0x4502e0),this['switchToDisplayMode'](),this['focus']();}),_0x4f7d80['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4f7d80['once']('editorReady',()=>{_0x4f7d80['focus']();}),_0x4f7d80['createEditor'](),_0x4f7d80['delegate']('editorReady')['to'](this),_0x4f7d80['delegate']('editorDestroyed')['to'](this),_0x4f7d80;}['_setupKeyboardNavigation'](){const _0x3d6ffb=this['element'];this['keystrokes']['listenTo'](_0x3d6ffb);for(const _0x48cc79 of this['focusables'])this['focusTracker']['add'](_0x48cc79['element']),this['keystrokes']['listenTo'](_0x48cc79['element']);this['focusables']['on']('change',(_0x22ea27,_0x11089a)=>{for(const _0x17e29b of _0x11089a['removed'])this['focusTracker']['remove'](_0x17e29b['element']),this['keystrokes']['stopListening'](_0x17e29b['element']);for(const _0x10b9a0 of _0x11089a['added'])this['focusTracker']['add'](_0x10b9a0['element']),this['keystrokes']['listenTo'](_0x10b9a0['element']);}),this['keystrokes']['set']('enter',(_0x1c3248,_0x3e7d40)=>{_0x3d6ffb===_0x1c3248['target']&&(this['focusCycler']['focusFirst'](),_0x3e7d40());}),this['keystrokes']['set']('esc',(_0x56bcbe,_0x17ae04)=>{_0x3d6ffb!==_0x56bcbe['target']&&(this['focus'](),_0x17ae04());});}}class CommentView extends/* #__PURE__ -- @preserve */
28
+ _0xd164fc(BaseCommentView){['actionBar'];['userView'];constructor(_0x355aba,_0x37f880,_0x50a053){super(_0x355aba,_0x37f880,_0x50a053),this['set']('actionIndicator',null),this['set']('placeholder',vt(_0x355aba,'Reply...')),this['bind']('authoredAt')['to'](_0x37f880),this['bind']('resolvedAt')['to'](_0x37f880),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 _0x159892(_0x355aba,_0x37f880['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x37f880,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x23f808=this['bindTemplate'],_0x4442cb=[{'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':_0x23f808['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x23f808['to']('authoredAt',_0x11a5e1=>this['_config']['formatDateTime'](_0x11a5e1))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x23f808['if']('isEditMode','ck-comment__actions--hidden'),_0x23f808['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']&&_0x4442cb['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x23f808['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x23f808['if']('isEditMode','ck-comment--edit'),_0x23f808['if']('isSystemComment','ck-comment--info'),_0x23f808['to']('actionIndicator',_0x1db974=>_0x1db974?'ck-comment--'+_0x1db974:'')],'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':_0x4442cb}]}]};}['_createEditButton'](){const _0xd96e6c=new _0x1bde71(this['locale']);return _0xd96e6c['label']=vt(this['locale'],'Edit'),_0xd96e6c['icon']=_0x34d770,_0xd96e6c['withText']=!0x0,_0xd96e6c['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xd96e6c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xaefdd7=>!_0xaefdd7),_0xd96e6c['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xd96e6c['on']('execute',()=>this['switchToEditMode']()),_0xd96e6c;}['_createRemoveButton'](){const _0x4a23ec=new _0x1bde71(this['locale']);return _0x4a23ec['label']=vt(this['locale'],'Remove'),_0x4a23ec['icon']=_0x246a50,_0x4a23ec['withText']=!0x0,_0x4a23ec['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4a23ec['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x459d73=>!_0x459d73),_0x4a23ec['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4a23ec['on']('execute',()=>{this['showConfirm'](vt(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4a23ec;}['_createDropdown'](){const _0xacba00=et(this['locale'],_0x3e25c5),_0x16580f=_0xacba00['panelView']['children'],_0x55f1a8=new it(this['locale']),_0x421ce5=_0xacba00['bindTemplate'];st(_0xacba00,()=>this['items']['find'](_0x37d5a4=>_0x37d5a4['isVisible'])),_0xacba00['extendTemplate']({'attributes':{'class':[_0x421ce5['if']('isVisible','ck-hidden',_0x2e8b7d=>!_0x2e8b7d)]}});const _0x10dc2c=(_0x4a879b,_0x11bcdc=-0x1)=>{const _0x1d1a29=new nt(this['locale']);_0x1d1a29['children']['add'](_0x4a879b);const _0x590fda=_0x11bcdc>-0x1?_0x11bcdc:_0x55f1a8['items']['length'];_0x55f1a8['items']['add'](_0x1d1a29,_0x590fda);const _0x351048=Array['from'](this['items']);_0xacba00['unbind']('isEnabled','isVisible'),_0xacba00['bind']('isEnabled')['toMany'](_0x351048,'isEnabled',(..._0x32f2df)=>_0x32f2df['some'](_0x2e72a0=>_0x2e72a0)),_0xacba00['bind']('isVisible')['toMany'](_0x351048,'isVisible',(..._0x42f3a6)=>_0x42f3a6['some'](_0x351ca2=>_0x351ca2));};_0xacba00['panelPosition']='sw',_0xacba00['buttonView']['set']({'label':vt(this['locale'],'Show\x20more\x20items'),'icon':_0x2040c2});for(const _0x273fb8 of this['items'])_0x10dc2c(_0x273fb8);return _0x16580f['add'](_0x55f1a8),_0xacba00['listenTo'](this['items'],'add',(_0x1dc549,_0x22cd69,_0x1077e0)=>{_0x10dc2c(_0x22cd69,_0x1077e0);}),_0xacba00['listenTo'](this['items'],'remove',(_0x1d6b2e,_0x4acc3b,_0x1d65f4)=>{_0x55f1a8['items']['remove'](_0x1d65f4);}),_0xacba00;}['_attachActions'](_0x25da2d,_0x1722a3){const _0x406052=_0x25da2d&&_0x25da2d['element'];_0x406052&&(this['listenTo'](_0x406052,'mouseenter',()=>this['actionIndicator']=_0x1722a3),this['listenTo'](_0x406052,'focus',()=>this['actionIndicator']=_0x1722a3),this['listenTo'](_0x406052,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x406052,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1bc8ce=super['_createCommentInputView']();return _0x1bc8ce['bind']('placeholder')['to'](this),_0x1bc8ce;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Nt(_0x3ce16b){const _0x5d4efc=_0x94919a(_0x3ce16b,0x1e),_0x394607=new MutationObserver(_0x59f12e=>{for(const _0x319f16 of _0x59f12e)('attributes'==_0x319f16['type']&&'class'==_0x319f16['attributeName']||'childList'==_0x319f16['type']||'characterData'==_0x319f16['type'])&&_0x5d4efc();});return{'attach'(_0x440f1){_0x394607['observe'](_0x440f1,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x394607['disconnect'](),_0x5d4efc['cancel']();}};}class AnnotationView extends _0x4e8972{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x3c38b4,_0x3075ad){super(_0x3c38b4),this['id']=_0x308b6(),this['focusTracker']=new _0x252bbd(),this['keystrokes']=new _0x846282(),this['keystrokes']['set']('Esc',(_0x43763b,_0x39dfcf)=>this['fire']('Esc',_0x39dfcf)),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']=Nt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x3075ad),this['mainView']=_0x3075ad;const _0x1b0d2f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x1b0d2f['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 _0x498eb1=this['element']['clientHeight'];_0x498eb1&&(this['height']=_0x498eb1);}}class Annotation extends/* #__PURE__ -- @preserve */
29
+ _0x1861d7(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xa287ef,target:_0x4850f9,type:_0x14503a,isVisible:_0x1e327c=!0x0}){super(),this['view']=_0xa287ef,this['view']['element']||this['view']['render'](),this['_type']=_0x14503a,this['_target']=_0x4850f9,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x499a27([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1ead53,_0x3fe945)=>{this['view']['focusTracker']['add'](_0x3fe945);}),this['focusableElements']['on']('remove',(_0x5eedf9,_0xa5b248)=>{this['view']['focusTracker']['remove'](_0xa5b248);}),this['set']('isVisible',_0x1e327c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3b5f94=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x3b5f94),_0x3b5f94;}get['targetRect'](){const _0x4e291c=this['target'];if(null===_0x4e291c)return null;if(_0x4e291c instanceof _0x416d7d)return _0x4e291c;const _0x5462e6=_0x4e291c['filter'](_0x1c38c1=>function(_0x428428){const _0x48827d=_0x428428['offsetParent'];if(_0x48827d)return!0x0;const _0x99b676=_0x428428['getClientRects']()['item'](0x0);return!!_0x99b676;}(_0x1c38c1));return 0x0===_0x5462e6['length']?null:_0x416d7d['getDomElementRects'](_0x5462e6[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x534e67){this['view']['isActive']=_0x534e67,this['view']['mainView']['isActive']=_0x534e67;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x5d1645){if(!(null===_0x5d1645||_0x5d1645 instanceof _0x416d7d||Array['isArray'](_0x5d1645)&&_0x5d1645['every'](_0x19e2b7=>kt(_0x19e2b7))))throw new _0x21ce1d('annotation-invalid-target',null,{'target':_0x5d1645});}['_getNormalizedTarget'](){const _0x54950e='function'==typeof this['_target']?this['_target']():this['_target'];return kt(_0x54950e)?[_0x54950e]:_0x54950e;}}function kt(_0x390e58){return null!==_0x390e58&&'object'==typeof _0x390e58&&'nodeType'in _0x390e58&&0x1===_0x390e58['nodeType'];}class AnnotationCollection extends _0x499a27{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0xf7d841=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x252bbd(),this['_focusTracker']['on']('change:isFocused',(_0x42e6a2,_0x1d099c,_0x39fb05)=>{_0x39fb05||this['fire']('blur');});for(const _0x81b0b4 of _0xf7d841)this['add'](_0x81b0b4);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xf9e47f){if(this['has'](_0xf9e47f))throw new _0x21ce1d('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xf9e47f['innerView'],_0xf9e47f),this['_viewToAnnotation']['set'](_0xf9e47f['view'],_0xf9e47f);for(const _0x2d8199 of _0xf9e47f['focusableElements'])this['_focusTracker']['add'](_0x2d8199);if(this['listenTo'](_0xf9e47f['focusableElements'],'add',(_0x353770,_0x1559d7)=>{this['_focusTracker']['add'](_0x1559d7);}),this['listenTo'](_0xf9e47f['focusableElements'],'remove',(_0xfe240e,_0x22455f)=>{this['_focusTracker']['remove'](_0x22455f);}),this['listenTo'](_0xf9e47f['view']['focusTracker'],'change:isFocused',(_0x5e93a6,_0x370c04,_0x1a9aaf)=>{_0x1a9aaf&&this['fire']('focus',_0xf9e47f);}),_0xf9e47f['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x16c714 of this)_0x16c714['updateTargetRect']();}const _0x38bb4f=this['_getOrderInContent'](_0xf9e47f['view']['targetRect']);return super['add'](_0xf9e47f,_0x38bb4f);}['remove'](_0x343763){if(!this['has'](_0x343763))throw new _0x21ce1d('annotationcollection-not-existing-item',null);this['stopListening'](_0x343763['view']['focusTracker']),this['stopListening'](_0x343763['focusableElements']);for(const _0x38fff4 of _0x343763['focusableElements'])this['_focusTracker']['remove'](_0x38fff4);return this['_viewToAnnotation']['delete'](_0x343763['view']),this['_innerViewToAnnotation']['delete'](_0x343763['innerView']),super['remove'](_0x343763);}['getByInnerView'](_0x254c49){return this['_innerViewToAnnotation']['get'](_0x254c49);}['getByView'](_0x4fbed5){return this['_viewToAnnotation']['get'](_0x4fbed5);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2c4735 of this)_0x2c4735['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1f79eb=Array['from'](this)['sort']((_0x425505,_0x1c850d)=>Rt(_0x425505['view']['targetRect'],_0x1c850d['view']['targetRect']));for(let _0x99444c=_0x1f79eb['length']-0x1;_0x99444c>0x0;_0x99444c--){const _0x56cfcb=_0x1f79eb[_0x99444c];_0x99444c!==this['getIndex'](_0x56cfcb)&&(this['remove'](_0x56cfcb),this['add'](_0x56cfcb));}}['_getOrderInContent'](_0x56fe36){let _0x1df83e=0x0;if(!_0x56fe36)return this['length'];for(const _0x1766e8 of this){const _0x31d5ce=_0x1766e8['view']['targetRect'];if(_0x31d5ce){if(Rt(_0x56fe36,_0x31d5ce)<0x0)return _0x1df83e;_0x1df83e++;}}return _0x1df83e;}['_areCachedRectsStale'](){const _0x59ce2b=this['get'](0x0);if(!_0x59ce2b)return!0x1;const _0x53fc2c=_0x59ce2b['view']['targetRect'],_0x144894=_0x59ce2b['targetRect'];return!(!_0x53fc2c||!_0x144894)&&(_0x53fc2c['top']!==_0x144894['top']||_0x53fc2c['left']!==_0x144894['left']);}}function Ot({source:_0x131409,target:_0x290e9f,filter:_0x1bbb68}){for(const _0x270703 of _0x131409)_0x1bbb68(_0x270703)&&_0x290e9f['add'](_0x270703);_0x290e9f['listenTo'](_0x131409,'add',(_0x5cd6f2,_0x3e658e)=>{_0x1bbb68(_0x3e658e)&&_0x290e9f['add'](_0x3e658e);}),_0x290e9f['listenTo'](_0x131409,'remove',(_0x22fc2f,_0x10c0b6)=>{_0x290e9f['has'](_0x10c0b6)&&_0x290e9f['remove'](_0x10c0b6);});}function Rt(_0x511d77,_0xa3497d){if(null===_0x511d77&&null===_0xa3497d)return 0x0;if(null===_0x511d77)return-0x1;if(null===_0xa3497d)return 0x1;const _0x14b4a9=_0x511d77['top']-_0xa3497d['top'];return 0x0==_0x14b4a9?_0x511d77['left']-_0xa3497d['left']:_0x14b4a9;}class Annotations extends _0x283925{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19aabb){if(super(_0x19aabb),this['collection']=new AnnotationCollection(),this['_visibleAnnotations']=new AnnotationCollection(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x19aabb instanceof _0x441226){const _0xab3f56=_0x19aabb['locale'];_0x19aabb['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':vt(_0xab3f56,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2cb927){this['collection']['add'](_0x2cb927);}['remove'](_0xd120cf){this['collection']['remove'](_0xd120cf),_0xd120cf['destroy']();}['refreshVisibility'](){for(const _0x63d996 of this['collection'])_0x63d996['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x353243){return this['collection']['getByInnerView'](_0x353243);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xfffa00 of this['collection'])_0xfffa00['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1d46cc){this['fire']('_activateAnnotation',_0x1d46cc);}['createAnnotation'](_0x379575){return new Annotation(_0x379575);}['createAnnotationView'](_0x525505,_0x9b7cc1){return new AnnotationView(_0x525505,_0x9b7cc1);}['_addActiveAnnotation'](_0x2de883){const _0x5708bb=new Set(this['activeAnnotations']);_0x5708bb['add'](_0x2de883),this['activeAnnotations']=_0x5708bb;}['_removeActiveAnnotation'](_0x52b723){const _0x662710=new Set(this['activeAnnotations']);_0x662710['delete'](_0x52b723),this['activeAnnotations']=_0x662710;}['_bindAnnotationsToVisibleAnnotations'](){const _0x396f8a=this['collection'],_0x1a0c98=this['_visibleAnnotations'];function _0x36bdbe(_0x2a294b){const _0x33aca4=_0x2a294b['source'];_0x33aca4['isVisible']&&!_0x1a0c98['has'](_0x33aca4)?_0x1a0c98['add'](_0x33aca4):!_0x33aca4['isVisible']&&_0x1a0c98['has'](_0x33aca4)&&_0x1a0c98['remove'](_0x33aca4),_0x33aca4['view']['focusTracker']['remove'](_0x33aca4['view']['element']),_0x33aca4['view']['focusTracker']['add'](_0x33aca4['view']['element']);}this['listenTo'](_0x396f8a,'add',(_0x2b0077,_0x122512)=>{_0x122512['isVisible']&&_0x1a0c98['add'](_0x122512),this['listenTo'](_0x122512,'change:isVisible',_0x36bdbe);}),this['listenTo'](_0x396f8a,'remove',(_0x4dfd89,_0x49c06c)=>{_0x1a0c98['has'](_0x49c06c)&&_0x1a0c98['remove'](_0x49c06c),this['stopListening'](_0x49c06c,'change:isVisible',_0x36bdbe);});}['_setupEnterAnnotationKeystroke'](){const _0x52f528=_0x16fd43=>{_0x16fd43['on']('ready',()=>{_0x16fd43['keystrokes']['set'](_0x130533,(_0x1e3a93,_0xf4017b)=>{const _0x4e3899=_0x548c32(this['activeAnnotations']['values']());_0x4e3899&&(_0x4e3899['view']['focus'](),_0xf4017b());});});};this['context']instanceof _0x441226?_0x52f528(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5417e1,_0xf9d793)=>{_0x52f528(_0xf9d793);});}['_setupEscapeAnnotationHandling'](){const _0x4f09bf=_0x5595fa=>{const _0x57c0a4=_0x5595fa['source'],_0x2a72c5=[];let _0x441871;if(Array['isArray'](_0x57c0a4['target'])){_0x441871=_0x57c0a4['target'][0x0],this['context']instanceof _0x441226?_0x2a72c5['push'](this['context']):this['context']['editors']&&_0x2a72c5['push'](...this['context']['editors']);for(const _0x85688d of _0x2a72c5)for(const _0xdb0e6e of _0x85688d['editing']['view']['domRoots']['values']())if(_0xdb0e6e['contains'](_0x441871))return void _0x85688d['editing']['view']['focus']();_0x441871['focus']();}};this['listenTo'](this['collection'],'add',(_0x263942,_0x34f6f9)=>{this['listenTo'](_0x34f6f9,'escape',_0x4f09bf,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x326a1d,_0x35ab3f)=>{this['stopListening'](_0x35ab3f,'escape',_0x4f09bf);});}}const Mt=Symbol('noChannel'),St={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class CommentsRepository extends _0x283925{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[Annotations,_0x1dce2a,_0x3bef93];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2d551b){super(_0x2d551b),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3facf8=this['context']['config'];_0x3facf8['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3facf8['define']('comments.maxThreadTotalWeight',0x1f4),_0x3facf8['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3facf8['define']('comments.CommentThreadView',CommentThreadView),_0x3facf8['define']('comments.CommentView',CommentView),_0x3facf8['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5ef50e=this['context']['plugins']['get'](Annotations);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5eeb05,_0x47c089)=>this['_addCommentThread'](_0x47c089)),this['on']('submitCommentThread',(_0x5ad326,_0x3e2c8d)=>this['_submitCommentThread'](_0x3e2c8d)),this['on']('resolveCommentThread',(_0xbf0e13,_0x138944)=>this['_resolveCommentThread'](_0x138944)),this['on']('resolveCommentThread',(_0x447a2f,_0xab248a)=>this['_updateActiveAnnotation'](_0xab248a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x42e987,_0x56d8eb)=>this['_reopenCommentThread'](_0x56d8eb)),this['on']('reopenCommentThread',(_0x538022,_0x4ff1e8)=>this['_updateActiveAnnotation'](_0x4ff1e8),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2c98d0,_0x4f9f37)=>this['_removeCommentThread'](_0x4f9f37)),this['on']('updateCommentThread',(_0x1b5bc0,_0x2df4f3)=>this['_updateCommentThread'](_0x2df4f3)),this['on']('updateCommentThread',(_0x2f03d7,_0x52d1a8)=>this['_updateActiveAnnotation'](_0x52d1a8),{'priority':'lowest'}),this['on']('addComment',(_0x25955d,_0xc49ff)=>this['_addComment'](_0xc49ff)),this['on']('updateComment',(_0x1c6c21,_0x443cc8)=>this['_updateComment'](_0x443cc8)),this['on']('removeComment',(_0x4d1af4,_0x21b6ea)=>this['_removeComment'](_0x21b6ea)),this['on']('addComment',(_0x18f87d,{threadId:_0x48279c,isFromAdapter:_0x1c328a})=>{if(_0x1c328a)return;const _0x1d0e7e=this['getCommentThread'](_0x48279c),_0x37281e=_0x1d0e7e&&this['_threadToController']['get'](_0x1d0e7e);_0x37281e&&_0x37281e['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5ef50e,'change:activeAnnotations',(_0x437327,_0x38262a,_0x2e2214)=>{const _0xcff0d=Array['from'](_0x2e2214)['map'](_0x424068=>this['_viewToController']['get'](_0x424068['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xcff0d?_0xcff0d['model']:null;});}set['adapter'](_0x4cd08c){if(this['_adapter'])throw new _0x21ce1d('commentsrepository-adapter-already-set');this['_adapter']=_0x4cd08c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4848fb=Mt,threadId:_0x4e1f28=_0x308b6(),comments:_0x51ed94=[],unlinkedAt:_0x2c878e=null,resolvedAt:_0x3b2b6a=null,resolvedBy:_0x4f29cb=null,target:_0x6781ec=null,context:_0x219788=null,attributes:_0x98630c={},isResolvable:_0x316c4e=!0x0,isSubmitted:_0x83b52d=!0x1,isFromAdapter:_0x232886=!0x1}={}){return this['fire'](xt('addCommentThread',_0x4848fb),{'channelId':_0x4848fb,'threadId':_0x4e1f28,'comments':_0x51ed94,'unlinkedAt':_0x2c878e,'resolvedAt':_0x3b2b6a,'resolvedBy':_0x4f29cb,'target':_0x6781ec,'context':_0x219788,'attributes':_0x98630c,'isFromAdapter':_0x232886,'isResolvable':_0x316c4e,'isSubmitted':_0x83b52d}),this['getCommentThread'](_0x4e1f28);}['openNewCommentThread']({channelId:_0x2d8bbe=Mt,threadId:_0x5d14d4=_0x308b6(),target:_0x228094,context:_0x472244=null,isResolvable:_0x2b2ff7=!0x0}){if(this['_readOnlyChannels']['has'](_0x2d8bbe)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x228094)throw new _0x21ce1d('commentsrepository-missing-target');const _0x42a7f6=this['addCommentThread']({'channelId':_0x2d8bbe,'threadId':_0x5d14d4,'target':_0x228094,'context':_0x472244,'isResolvable':_0x2b2ff7});if(!_0x42a7f6)return null;const _0x312e60=this['_threadToController']['get'](_0x42a7f6),_0x4803b1=_0x312e60['view']['commentThreadInputView']['commentInputView'],_0x2ecb05=this['context']['plugins']['get'](Annotations),_0x5a6112=_0x2ecb05['getByInnerView'](_0x312e60['view']);return _0x2ecb05['activate'](_0x5a6112),_0x4803b1['once']('editorReady',()=>_0x4803b1['focus']()),_0x42a7f6;}['hasCommentThread'](_0x38ba75){if('string'!=typeof _0x38ba75)throw new _0x21ce1d('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x38ba75);}['updateCommentThread']({channelId:_0x3fed68=Mt,threadId:_0x4e2d49,context:_0x2d5c5c,unlinkedAt:_0x1e35de,attributes:_0x5bdd40,isFromAdapter:_0x4cd7f6=!0x1}){return this['fire'](xt('updateCommentThread',_0x3fed68),{'channelId':_0x3fed68,'threadId':_0x4e2d49,'context':_0x2d5c5c,'unlinkedAt':_0x1e35de,'attributes':_0x5bdd40,'isFromAdapter':_0x4cd7f6}),this['getCommentThread'](_0x4e2d49);}['getCommentThread'](_0x1e115c){if('string'!=typeof _0x1e115c)throw new _0x21ce1d('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1e115c);}['fetchCommentThread']({channelId:_0x44e228,threadId:_0x37a47f}={}){const _0x1a5300=this['getCommentThread'](_0x37a47f);if(_0x1a5300)return Promise['resolve'](_0x1a5300);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x21ce1d('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x44e228,'threadId':_0x37a47f})['then'](_0x2df4a7=>this['hasCommentThread'](_0x37a47f)?this['getCommentThread'](_0x37a47f):_0x2df4a7?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x44e228},_0x2df4a7)):void 0x0)['catch'](_0x5d80c1=>{throw console['error'](_0x5d80c1),new _0x21ce1d('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x267eac,skipNotAttached:_0x3fefeb=!0x1,skipEmpty:_0x2b8df9=!0x1,toJSON:_0x378622=!0x1}={}){const _0x428f3e=[];for(const _0x5d8a6e of this['_threads']['values']())_0x267eac&&_0x5d8a6e['channelId']!==_0x267eac||_0x3fefeb&&!_0x5d8a6e['isAttached']||_0x2b8df9&&0x0===_0x5d8a6e['length']||_0x428f3e['push'](_0x5d8a6e);return _0x378622?_0x428f3e['map'](_0x723a9e=>_0x723a9e['toJSON']()):_0x428f3e;}['getAnnotationForCommentThread'](_0x35f58f){const _0x138e60=this['_threadToController']['get'](_0x35f58f);if(!_0x138e60)return null;return this['context']['plugins']['get'](Annotations)['getByInnerView'](_0x138e60['view'])||null;}['getCommentThreadForAnnotation'](_0x4025d3){const _0x31da9d=this['_viewToController']['get'](_0x4025d3['innerView']);return _0x31da9d?_0x31da9d['model']:null;}['setActiveCommentThread'](_0x28cc8a){const _0x4e6ed5=this['context']['plugins']['get'](Annotations);if(!_0x28cc8a)return void(this['activeCommentThread']&&_0x4e6ed5['deactivateAll']());const _0x1529a9=this['getCommentThread'](_0x28cc8a);if(!_0x1529a9)throw new _0x21ce1d('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x28cc8a});if(!this['_threadToController']['has'](_0x1529a9))throw new _0x21ce1d('commentsrepository-active-not-attached',null,{'threadId':_0x28cc8a});const _0x3efb2d=_0x4e6ed5['getByInnerView'](this['_threadToController']['get'](_0x1529a9)['view']);_0x4e6ed5['activate'](_0x3efb2d);}['switchReadOnly'](_0x444f35,_0x13f673){_0x444f35?this['_readOnlyChannels']['add'](_0x13f673):this['_readOnlyChannels']['delete'](_0x13f673),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1e2f13){return this['_readOnlyChannels']['has'](_0x1e2f13)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2efa08,_0x45aed7){return new CommentThreadController(_0x2efa08,_0x45aed7);}['setPermissions'](_0x43f759,_0x289621=Mt){this['_permissions']['set'](_0x289621,_0x43f759),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x52d692=Mt){return this['_permissions']['has'](_0x52d692)?this['_permissions']['get'](_0x52d692):St;}['_addCommentThread']({channelId:_0x3957d1,threadId:_0x53447b,comments:_0xd0389e,unlinkedAt:_0x5f4e2b,resolvedAt:_0x82b4a1,resolvedBy:_0x40b979,target:_0x4673c4,context:_0x30fb08,attributes:_0x4eeb03,isFromAdapter:_0x13ab22,isResolvable:_0xf96e14,isSubmitted:_0x7aad69}){if('string'!=typeof _0x53447b)throw new _0x21ce1d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x53447b});if(this['hasCommentThread'](_0x53447b))throw new _0x21ce1d('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x53447b});const _0x2f238b=new CommentThread(this,{'channelId':_0x3957d1,'id':_0x53447b,'context':_0x30fb08,'attributes':_0x4eeb03,'unlinkedAt':_0x5f4e2b,'resolvedAt':_0x82b4a1,'resolvedBy':_0x40b979?this['context']['plugins']['get'](_0x3bef93)['getUser'](_0x40b979):null,'isResolvable':_0xf96e14,'isSubmitted':_0x7aad69||_0x13ab22});this['_threads']['set'](_0x53447b,_0x2f238b);for(const _0x266614 of _0xd0389e)_0x2f238b['_add'](this['_createNewComment']({'threadId':_0x53447b,..._0x266614}));return _0x4673c4&&_0x2f238b['attachTo'](_0x4673c4),_0x13ab22||!_0x2f238b['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3957d1,'threadId':_0x53447b});}['_submitCommentThread']({channelId:_0x2894a8,threadId:_0x37c2bd}){if(!this['hasCommentThread'](_0x37c2bd))throw new _0x21ce1d('commentsrepository-missing-comment-thread',this);const _0x299bb9=this['getCommentThread'](_0x37c2bd);if(_0x299bb9['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x18d568,comments:_0x4e8044,resolvedAt:_0x695b17,resolvedBy:_0x2f7b57,context:_0x39109f,attributes:_0x81d4ef}=_0x299bb9,_0x1da6b1=this['context']['plugins']['get']('PendingActions'),_0x15f292=_0x1da6b1['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2894a8,'threadId':_0x18d568,'comments':_0x4e8044['map'](_0xd2619e=>_0xd2619e['toJSON']()),'resolvedAt':_0x695b17,'resolvedBy':_0x2f7b57?_0x2f7b57['id']:_0x2f7b57,'context':_0x39109f,'attributes':_0x81d4ef})['then'](({comments:_0x4c731c})=>{_0x1da6b1['remove'](_0x15f292);for(const _0x1a25dc of _0x4c731c)this['_updateComment']({'channelId':_0x2894a8,'threadId':_0x37c2bd,'commentId':_0x1a25dc['commentId'],'createdAt':_0x1a25dc['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1fb214=>{throw console['error'](_0x1fb214),new _0x21ce1d('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4deaea,target:_0x9d20d0}){const _0x273942=this['getCommentThread'](_0x4deaea);if(!_0x273942)throw new _0x21ce1d('commentsrepository-attach-missing-comment-thread',this);const _0x3a7154=this['context']['plugins']['get']('PendingActions'),_0x350082=this['context']['plugins']['get'](Annotations),_0x282656=this['_createCommentThreadView'](_0x273942),_0x18f56d=new CommentThreadController(_0x273942,_0x282656);let _0x4d8775=null;_0x282656['on']('change:isDirty',(_0x2aeafc,_0x21b349,_0x508a6a)=>{_0x508a6a?_0x4d8775=_0x3a7154['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4d8775&&(_0x3a7154['remove'](_0x4d8775),_0x4d8775=null);}),this['_threadToController']['set'](_0x273942,_0x18f56d),this['_viewToController']['set'](_0x282656,_0x18f56d);const _0x5b3738=new AnnotationView(this['context']['locale'],_0x282656);_0x5b3738['bind']('length')['to'](_0x282656),_0x5b3738['bind']('isDirty')['to'](_0x282656,'isDirty',_0x282656,'length',(_0x47cbff,_0x39ecb4)=>_0x47cbff||!_0x39ecb4),_0x5b3738['bind']('isActive')['to'](_0x282656),_0x5b3738['type']='comment';const _0x553f16=new Annotation({'view':_0x5b3738,'target':_0x9d20d0,'type':'comment','isVisible':!_0x273942['archivedAt']&&!!('function'==typeof _0x9d20d0?_0x9d20d0():_0x9d20d0)});return _0x282656['on']('escape',()=>{_0x553f16['fire']('escape');}),this['_bindAnnotationToEditors'](_0x282656,_0x553f16),_0x350082['add'](_0x553f16),_0x553f16;}['_bindAnnotationToEditors'](_0x544ecb,_0x54818b){this['listenTo'](_0x544ecb,'editorReady',(_0x4b254e,_0x35a500)=>{const _0x3d7097=_0x35a500['ui']['view']['body']['bodyCollectionContainer'];_0x54818b['focusableElements']['add'](_0x3d7097),this['context']instanceof _0x441226&&this['context']['ui']['focusTracker']['add'](_0x3d7097);},{'priority':'highest'}),this['listenTo'](_0x544ecb,'editorDestroyed',(_0x38c14c,_0x5167df)=>{const _0x4bfa8c=_0x5167df['ui']['view']['body']['bodyCollectionContainer'];_0x54818b['focusableElements']['has'](_0x4bfa8c)&&_0x54818b['focusableElements']['remove'](_0x4bfa8c),this['context']instanceof _0x441226&&this['context']['ui']['focusTracker']['remove'](_0x4bfa8c);});}['_unbindEditors'](_0x450969){this['stopListening'](_0x450969,'editorReady'),this['stopListening'](_0x450969,'editorDestroyed');}['_createCommentThreadView'](_0x25daa8){const _0xa8e954=this['context']['plugins']['get'](_0x3bef93),{config:_0x8af9ac,locale:_0x2b4546}=this['context'],_0x48f355=_0x3a40bc(_0x8af9ac['get']('locale'),_0x2b4546);return new(0x0,(_0x8af9ac['get']('comments'))['CommentThreadView'])(_0x2b4546,_0x25daa8,_0xa8e954['me'],{'editorConfig':{..._0x8af9ac['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x8af9ac['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x8af9ac['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x8af9ac['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x8af9ac['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x48f355,'CommentView':_0x8af9ac['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x4f63d4,channelId:_0x23cbf5,resolvedAt:_0x964a48,resolvedBy:_0x2fcfe6,isFromAdapter:_0x45907e}){if(!this['hasCommentThread'](_0x4f63d4))throw new _0x21ce1d('commentsrepository-missing-comment-thread',null,{'threadId':_0x4f63d4});const _0x1c865b=this['getCommentThread'](_0x4f63d4);if(_0x1c865b['isResolved'])throw new _0x21ce1d('commentsrepository-resolved-comment-thread',null,{'threadId':_0x4f63d4});const _0x59ec59=this['context']['plugins']['get'](_0x3bef93);if(_0x1c865b['resolvedBy']=_0x59ec59['getUser'](_0x2fcfe6),_0x1c865b['resolvedAt']=_0x964a48,_0x45907e||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2e7f8d=this['context']['plugins']['get']('PendingActions'),_0x5743c8=_0x2e7f8d['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x23cbf5,'threadId':_0x4f63d4})['then'](({resolvedAt:_0x357449,resolvedBy:_0x129ee})=>{_0x2e7f8d['remove'](_0x5743c8),_0x1c865b['resolvedBy']['id']!==_0x129ee&&(_0x1c865b['resolvedBy']=_0x59ec59['getUser'](_0x129ee)),_0x1c865b['resolvedAt']=_0x357449;})['catch'](_0x56addf=>{throw console['error'](_0x56addf),new _0x21ce1d('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2ea4e5,channelId:_0x177074,isFromAdapter:_0x46fd02}){if(!this['hasCommentThread'](_0x2ea4e5))throw new _0x21ce1d('commentsrepository-missing-comment-thread',null,{'threadId':_0x2ea4e5});const _0x352b86=this['getCommentThread'](_0x2ea4e5);if(!_0x352b86['isResolved'])throw new _0x21ce1d('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2ea4e5});if(_0x352b86['resolvedBy']=null,_0x352b86['resolvedAt']=null,_0x46fd02||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4ff93f=this['context']['plugins']['get']('PendingActions'),_0x2cbc52=_0x4ff93f['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x177074,'threadId':_0x2ea4e5})['then'](()=>_0x4ff93f['remove'](_0x2cbc52))['catch'](_0x5242e1=>{throw console['error'](_0x5242e1),new _0x21ce1d('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1b3055,isFromAdapter:_0x3dbb23}){const _0x4a50ad=this['getCommentThread'](_0x1b3055);if(!_0x4a50ad)throw new _0x21ce1d('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1b3055),this['_threads']['delete'](_0x1b3055),!_0x4a50ad['isSubmitted']||_0x3dbb23||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2862ad=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44ce56}=_0x4a50ad,_0x335494=_0x2862ad['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x44ce56,'threadId':_0x1b3055})['then'](()=>_0x2862ad['remove'](_0x335494))['catch'](_0x67f438=>{throw console['error'](_0x67f438),new _0x21ce1d('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4acbd1,unlinkedAt:_0x3d7c43,context:_0x47089d,attributes:_0x3a9b05,isFromAdapter:_0x3dd193}){if('string'!=typeof _0x4acbd1)throw new _0x21ce1d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4acbd1});if(!this['hasCommentThread'](_0x4acbd1))throw new _0x21ce1d('commentsrepository-missing-comment-thread',null,{'threadId':_0x4acbd1});const _0x5d8c3b=this['getCommentThread'](_0x4acbd1);let _0x409a3e=!0x1;if(void 0x0!==_0x47089d&&_0x5d8c3b['context']!==_0x47089d&&(_0x5d8c3b['context']=_0x47089d,_0x409a3e=!0x0),void 0x0!==_0x3d7c43&&_0x5d8c3b['unlinkedAt']!==_0x3d7c43&&(_0x5d8c3b['unlinkedAt']=_0x3d7c43,_0x409a3e=!0x0),_0x3a9b05&&!_0x187522(_0x3a9b05,_0x5d8c3b['attributes'])&&(_0x5d8c3b['attributes']=_0x3a9b05,_0x409a3e=!0x0),!_0x409a3e)return Promise['resolve']();if(!_0x5d8c3b['isSubmitted']||_0x3dd193||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4ab6b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5bf4a3}=_0x5d8c3b,_0x1fc90e=_0x4ab6b2['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5bf4a3,'threadId':_0x4acbd1,'context':_0x47089d,'unlinkedAt':_0x3d7c43,'attributes':_0x3a9b05})['then'](()=>_0x4ab6b2['remove'](_0x1fc90e))['catch'](_0x561b4e=>{throw console['error'](_0x561b4e),new _0x21ce1d('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x8f11e4){const _0x59ef5e=this['context']['plugins']['get'](Annotations),_0x191f6b=this['getCommentThread'](_0x8f11e4);if(_0x191f6b['_isAttached']=!0x1,this['_threadToController']['has'](_0x191f6b)){const _0x3801c1=this['_threadToController']['get'](_0x191f6b),_0xa80ea5=_0x3801c1['view'],_0x519280=_0x59ef5e['getByInnerView'](_0xa80ea5);this['_threadToController']['delete'](_0x191f6b),this['_viewToController']['delete'](_0xa80ea5),_0x519280&&_0x59ef5e['remove'](_0x519280),_0x3801c1['destroy'](),_0xa80ea5['destroy']()['then'](()=>{this['_unbindEditors'](_0xa80ea5);});}}['_updateActiveAnnotation']({threadId:_0x4be2d1,resolvedAt:_0x1da3ae,unlinkedAt:_0x2dda91}){const _0x174c4f=!!_0x1da3ae,_0x465280=this['context']['plugins']['get'](Annotations),_0xe77a73=this['getCommentThread'](_0x4be2d1);if(this['_threadToController']['has'](_0xe77a73)){const _0x2a146b=this['_threadToController']['get'](_0xe77a73)['view'],_0xbc931e=_0x465280['getByInnerView'](_0x2a146b);_0xbc931e&&(_0x174c4f&&_0x465280['_removeActiveAnnotation'](_0xbc931e),_0x2dda91?_0xbc931e['isVisible']=!0x1:_0xbc931e['refreshVisibility']());}}['_getExternalAuthor'](_0x2bc50a){const _0x8bb4ce=this['context']['plugins']['get'](_0x3bef93),_0x144ed4=_0x4a0ba1('external:'+_0x2bc50a),_0x20f632=_0x8bb4ce['getUser'](_0x144ed4);return _0x20f632||_0x8bb4ce['addUser']({'id':_0x144ed4,'name':_0x2bc50a});}['_createNewComment']({threadId:_0x483d3e,commentId:_0x158597=_0x308b6(),content:_0x34ed34,authorId:_0x4d874e,createdAt:_0x359d42,attributes:_0x17d4d3}){if('string'!=typeof _0x158597)throw new _0x21ce1d('commentsrepository-invalid-commentid');if('string'!=typeof _0x4d874e)throw new _0x21ce1d('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x34ed34||!_0x34ed34['trim']())throw new _0x21ce1d('commentsrepository-invalid-comment-content');const _0x11b3f4=this['context']['plugins']['get'](_0x3bef93)['getUser'](_0x4d874e);if(!_0x11b3f4)throw new _0x21ce1d('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4d874e});let _0x456f3c=null,_0x348438=_0x359d42;return _0x17d4d3?.['@external']&&(_0x456f3c=this['_getExternalAuthor'](_0x17d4d3['@external']['authorName']),_0x348438=new Date(_0x17d4d3['@external']['createdAt'])),new Comment(this,{'threadId':_0x483d3e,'id':_0x158597,'author':_0x456f3c||_0x11b3f4,'creator':_0x11b3f4,'content':_0x34ed34,'createdAt':_0x359d42,'authoredAt':_0x348438,'attributes':_0x17d4d3});}['_addComment'](_0x2557d2){let {threadId:_0x36aa6b,content:_0x527a8e,attributes:_0x27cca8,isFromAdapter:_0x430b6c}=_0x2557d2;const _0x2c9787=this['getCommentThread'](_0x2557d2['threadId']);if(!_0x2c9787)throw new _0x21ce1d('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x14132f=this['_createNewComment'](_0x2557d2),{id:_0x94d82}=_0x14132f;if(_0x2c9787['_add'](_0x14132f),_0x430b6c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2c9787['isSubmitted'])return Promise['resolve']();const _0x3e9bb2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x43b0f8}=_0x2c9787,_0x40225f=_0x3e9bb2['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x27cca8||(_0x27cca8={}),this['adapter']['addComment']({'channelId':_0x43b0f8,'threadId':_0x36aa6b,'commentId':_0x94d82,'content':_0x527a8e,'attributes':_0x27cca8})['then'](_0x447e83=>{_0x3e9bb2['remove'](_0x40225f),_0x447e83&&this['_updateComment']({'channelId':_0x43b0f8,'threadId':_0x36aa6b,'commentId':_0x94d82,'createdAt':_0x447e83['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x169acd=>{throw console['error'](_0x169acd),new _0x21ce1d('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4ce2fe,commentId:_0x102835,content:_0x15bb22,createdAt:_0x238716,attributes:_0x177043,isFromAdapter:_0x34b78c}){if(void 0x0!==_0x15bb22&&('string'!=typeof _0x15bb22||!_0x15bb22['trim']()['length']))throw new _0x21ce1d('commentsrepository-update-comment-invalid-content');const _0x11cab0=this['getCommentThread'](_0x4ce2fe),_0x92cb6d=_0x11cab0['getComment'](_0x102835);if(!_0x92cb6d)throw new _0x21ce1d('commentsrepository-update-missing-comment',this);let _0x4e7982=!0x1;if(_0x15bb22&&_0x15bb22!==_0x92cb6d['content']&&(_0x92cb6d['isEditable']||_0x34b78c)&&(_0x92cb6d['content']=_0x15bb22,_0x4e7982=!0x0),_0x238716&&_0x238716!==_0x92cb6d['createdAt']&&(_0x92cb6d['createdAt']=_0x238716,_0x92cb6d['attributes']&&_0x92cb6d['attributes']['@external']||(_0x92cb6d['authoredAt']=_0x238716),_0x4e7982=!0x0),_0x177043&&!_0x187522(_0x177043,_0x92cb6d['attributes'])&&(_0x92cb6d['attributes']=_0x177043,_0x4e7982=!0x0),!_0x4e7982)return Promise['resolve']();if(_0x11cab0['fire']('commentUpdated'),_0x34b78c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1c0d27=this['context']['plugins']['get']('PendingActions'),{channelId:_0x150160}=this['getCommentThread'](_0x92cb6d['threadId']),_0x15f6be=_0x1c0d27['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x150160,'threadId':_0x4ce2fe,'commentId':_0x102835,'content':_0x15bb22,'attributes':_0x177043})['then'](()=>_0x1c0d27['remove'](_0x15f6be))['catch'](_0x218c07=>{throw console['error'](_0x218c07),new _0x21ce1d('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x4ab56e,commentId:_0x44e1d3,isFromAdapter:_0x16aee3}){const _0x5b8cfd=this['getCommentThread'](_0x4ab56e),_0x1dfe3b=_0x5b8cfd['getComment'](_0x44e1d3);if(!_0x1dfe3b)throw new _0x21ce1d('commentsrepository-remove-missing-comment',this);if(_0x5b8cfd['_remove'](_0x1dfe3b),_0x16aee3||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1f666e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x19159d}=_0x5b8cfd,_0x6a3ae5=_0x1f666e['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x19159d,'threadId':_0x4ab56e,'commentId':_0x44e1d3})['then'](()=>_0x1f666e['remove'](_0x6a3ae5))['catch'](_0x39b850=>{throw console['error'](_0x39b850),new _0x21ce1d('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
30
+ _0x1861d7(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4c5f39,_0xb29043){super();const _0x1bbbb4=_0xb29043['isResolvable'];this['channelId']=_0xb29043['channelId'],this['id']=_0xb29043['id'],this['comments']=new _0x499a27(),this['_repository']=_0x4c5f39,this['_isAttached']=!0x1,this['_isSubmitted']=_0xb29043['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4c5f39,'_permissions',_0x4c5f39,'_readOnlyChannels',()=>_0x4c5f39['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4c5f39,'_permissions',()=>_0x4c5f39['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4c5f39,'_permissions',()=>{const _0x42c18e=_0x4c5f39['getPermissions'](this['channelId']);return _0x42c18e['write']||_0x42c18e['admin'];}),this['bind']('isResolvable')['to'](_0x4c5f39,'_permissions',()=>_0x1bbbb4&&_0x4c5f39['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0xb29043['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x587635,_0x593b38)=>_0x587635?_0x593b38?_0x587635<_0x593b38?_0x587635:_0x593b38:_0x587635:_0x593b38),this['set']('unlinkedAt',_0xb29043['unlinkedAt']||null),this['set']('resolvedAt',_0xb29043['resolvedAt']||null),this['set']('resolvedBy',_0xb29043['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x381cd2=>!!_0x381cd2),this['set']('attributes',_0xb29043['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xe35850,_0xa11309)=>_0xe35850+_0xa11309['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x362c86,id:_0x26a663}=this;this['_repository']['fire'](xt('submitCommentThread',_0x362c86),{'channelId':_0x362c86,'threadId':_0x26a663});}['setUnlinkedAt'](_0xefb802){this['_update']({'unlinkedAt':_0xefb802});}['resolve']({resolvedAt:_0x2aa7a7=new Date(),resolvedBy:_0x2697dc='',isFromAdapter:_0x5c6aa6=!0x1}={}){const _0x590162=this['_repository']['context']['plugins']['get'](_0x3bef93)['me'],{channelId:_0x4706ac,id:_0x35159e}=this;this['_repository']['fire'](xt('resolveCommentThread',_0x4706ac),{'channelId':_0x4706ac,'threadId':_0x35159e,'resolvedAt':_0x2aa7a7,'resolvedBy':_0x2697dc||_0x590162['id'],'isFromAdapter':_0x5c6aa6});}['reopen']({isFromAdapter:_0x5145db=!0x1}={}){const {channelId:_0x439fef,id:_0x35ffc3}=this;this['_repository']['fire'](xt('reopenCommentThread',_0x439fef),{'channelId':_0x439fef,'threadId':_0x35ffc3,'isFromAdapter':_0x5145db});}['setContext'](_0x2416b1){this['context']||this['_update']({'context':_0x2416b1});}['setAttribute'](_0x27c2c1,_0x1c9c7e){const _0x6acfd6=_0x2211cc(this['attributes']);_0x40cab1(_0x6acfd6,_0x27c2c1,_0x1c9c7e),this['_update']({'attributes':_0x6acfd6});}['removeAttribute'](_0x12acb2){const _0x143251=_0x2211cc(this['attributes']);_0x27a806(_0x143251,_0x12acb2),this['_update']({'attributes':_0x143251});}['remove']({isFromAdapter:_0x49d1db=!0x1}={}){const {channelId:_0x4b7489,id:_0x58ccda}=this;this['_repository']['fire'](xt('removeCommentThread',_0x4b7489),{'channelId':_0x4b7489,'threadId':_0x58ccda,'isFromAdapter':_0x49d1db});}['attachTo'](_0x2b5712){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x2b5712});}['addComment'](_0x51ed96){const {channelId:_0x44da35,id:_0x4b5953}=this;this['_repository']['fire'](xt('addComment',_0x44da35,_0x4b5953),Object['assign']({'channelId':_0x44da35,'threadId':_0x4b5953},_0x51ed96));}['getComment'](_0x449242){if('string'!=typeof _0x449242)throw new _0x21ce1d('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x449242});return this['comments']['get'](_0x449242);}['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'](_0x126324=>_0x126324['toJSON']()),'attributes':this['attributes']};}['_add'](_0x583f81){return this['listenTo'](_0x583f81,'change:authoredAt',()=>{const _0x57cea6=this['_findOptimalIndex'](_0x583f81),_0x561901=this['comments'];_0x57cea6-0x1!=_0x561901['getIndex'](_0x583f81)&&_0x57cea6+0x1!=_0x561901['getIndex'](_0x583f81)&&(this['_remove'](_0x583f81),this['_add'](_0x583f81));}),this['comments']['add'](_0x583f81,this['_findOptimalIndex'](_0x583f81));}['_update'](_0x4588ce){const {channelId:_0xe7012e,id:_0x1e1377}=this;this['_repository']['fire'](xt('updateCommentThread',_0xe7012e),{..._0x4588ce,'channelId':_0xe7012e,'threadId':_0x1e1377});}['_remove'](_0x26df7e){return this['stopListening'](_0x26df7e),_0x26df7e['destroy'](),this['comments']['remove'](_0x26df7e);}['_findOptimalIndex'](_0x500bd4){const _0x59358d=this['comments']['find'](_0x552d3b=>new Date(_0x552d3b['authoredAt'])['getTime']()>new Date(_0x500bd4['authoredAt'])['getTime']());return _0x59358d?this['comments']['getIndex'](_0x59358d):this['length'];}}class Comment extends/* #__PURE__ -- @preserve */
31
+ _0x1861d7(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x241904,_0x3addaf){super();const _0xb7fae4=_0x241904['context']['plugins']['get'](_0x3bef93)['me'],_0x4d1a7f=_0x241904['getCommentThread'](_0x3addaf['threadId']),_0x25d66b=0x0===_0x4d1a7f['comments']['length'],_0x4f275e=_0xb7fae4===_0x3addaf['author'];this['id']=_0x3addaf['id'],this['threadId']=_0x3addaf['threadId'],this['author']=_0x3addaf['author'],this['creator']=_0x3addaf['creator'],this['isExternal']=Boolean(_0x3addaf['attributes']&&_0x3addaf['attributes']['@external']),this['set']('content',_0x3addaf['content']),this['createdAt']=_0x3addaf['createdAt']||new Date(),this['set']('authoredAt',_0x3addaf['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4d1a7f,'resolvedAt'),this['set']('attributes',_0x3addaf['attributes']||{}),this['bind']('isEditable')['to'](_0x241904,'_permissions',()=>{const _0x4bfd8a=_0x241904['getPermissions'](_0x4d1a7f['channelId'])['write'],_0x3c2bf1=_0x241904['getPermissions'](_0x4d1a7f['channelId'])['modifyAll'];return _0x4f275e&&_0x4bfd8a||!_0x4f275e&&_0x3c2bf1;}),this['bind']('isRemovable')['to'](_0x4d1a7f,'isRemovable',_0x241904,'_permissions',_0x2d4e33=>{const _0x5c7c48=_0x241904['getPermissions'](_0x4d1a7f['channelId'])['write'],_0x2f0f8b=_0x241904['getPermissions'](_0x4d1a7f['channelId'])['modifyAll'];return _0x4f275e&&_0x5c7c48||_0x2d4e33&&_0x25d66b||!_0x4f275e&&_0x2f0f8b&&!_0x25d66b;}),this['bind']('isReadOnly')['to'](_0x4d1a7f,'isReadOnly'),this['_repository']=_0x241904;}get['weight'](){return Math['max'](function(_0x89e034){const _0x5987c0=document['createElement']('div');return _0x5987c0['innerHTML']=_0x89e034,_0x5987c0['textContent']['length'];}(this['content']),0xc8);}['update'](_0x22b6d9){const {threadId:_0x4df1b0,id:_0x2a11ac}=this;if(!this['_repository']['hasCommentThread'](_0x4df1b0))throw new _0x21ce1d('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x45e87c}=this['_repository']['getCommentThread'](_0x4df1b0);this['_repository']['fire'](xt('updateComment',_0x45e87c,_0x4df1b0),{'channelId':_0x45e87c,'threadId':_0x4df1b0,'commentId':_0x2a11ac,..._0x22b6d9});}['setAttribute'](_0x23c29f,_0x5207bf){const _0xba3bc5=_0x2211cc(this['attributes']);_0x40cab1(_0xba3bc5,_0x23c29f,_0x5207bf),this['update']({'attributes':_0xba3bc5});}['removeAttribute'](_0x5ecfb9){const _0x5ce07e=_0x2211cc(this['attributes']);_0x27a806(_0x5ce07e,_0x5ecfb9),this['update']({'attributes':_0x5ce07e});}['remove'](_0x3bb1ae={}){if(!_0x3bb1ae['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x247313,id:_0x5a0c86}=this;if(!this['_repository']['hasCommentThread'](_0x247313))throw new _0x21ce1d('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x189a1e}=this['_repository']['getCommentThread'](_0x247313);this['_repository']['fire'](xt('removeComment',_0x189a1e,_0x247313),{'channelId':_0x189a1e,'threadId':_0x247313,'commentId':_0x5a0c86,..._0x3bb1ae});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0x1bf6c2,..._0xbdbe88){for(const _0x1333a1 of _0xbdbe88)void 0x0!==_0x1333a1&&(_0x1bf6c2+=':'+String(_0x1333a1));return _0x1bf6c2;}class AddCommentThreadCommand extends _0x11f7ba{constructor(_0x1c7234){super(_0x1c7234),this['set']('hasContent',!0x1);}['refresh'](){const _0x1a42dd=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4dcd37 of _0x1a42dd['getRanges']())if(this['_hasContent'](_0x4dcd37))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x340141=_0x308b6(),ranges:_0x4ed44a,comment:_0x376e10}={}){const _0x312577=this['editor']['model'],_0x3a82bb=_0x4ed44a??Array['from'](_0x312577['document']['selection']['getRanges']()),_0x53486c=[];for(const _0x23f555 of _0x3a82bb)this['_hasContent'](_0x23f555)&&_0x53486c['push'](this['_trimToContent'](_0x23f555));if(!_0x53486c['length'])throw new _0x21ce1d('addcommentthreadcommand-incorrect-ranges',null);_0x376e10&&this['_createCommentThread'](_0x340141,_0x376e10),this['_createMarkersFromRanges'](_0x340141,_0x53486c,!!_0x376e10);}['_createMarkersFromRanges'](_0x240dde,_0x2b8ba3,_0x2bd0b9){this['editor']['model']['change'](_0x203154=>{for(const _0x74dc6a of _0x2b8ba3){const _0x293e71=_0x308b6()['substr'](0x1,0x5),_0x388e19='comment:'+_0x240dde+':'+_0x293e71;_0x203154['addMarker'](_0x388e19,{'range':_0x74dc6a,'usingOperation':_0x2bd0b9,'affectsData':_0x2bd0b9});}});}['_createCommentThread'](_0x29c623,_0x5d8765){const _0x5bc78d=this['editor']['plugins']['get']('CommentsRepository'),_0x2867b0=this['editor']['config']['get']('collaboration.channelId'),_0x3b7b2b=this['editor']['plugins']['get']('Users')['me'];if(!_0x3b7b2b)throw new _0x21ce1d('addcommentthreadcommand-user-not-found',null);_0x5bc78d['addCommentThread']({'threadId':_0x29c623,'channelId':_0x2867b0,'comments':[{'authorId':_0x3b7b2b['id'],'content':_0x5d8765,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4b85ad){for(const _0x3ccfaa of _0x4b85ad['getItems']())if(this['_itemIsContent'](_0x3ccfaa))return!0x0;return!0x1;}['_itemIsContent'](_0x28959c){return _0x28959c['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x28959c)&&!_0x28959c['is']('element','tableCell');}['_trimToContent'](_0xed57ea){const _0x18147c=_0x40b9d6=>!this['_itemIsContent'](_0x40b9d6['item']),_0x5dd40b=_0xed57ea['start']['getLastMatchingPosition'](_0x18147c),_0x406bff=_0xed57ea['end']['getLastMatchingPosition'](_0x18147c,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5dd40b,_0x406bff);}}class EditorAnnotations extends _0x4e3a6a{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[Annotations];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a6d21){super(_0x3a6d21),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x715d64=this['editor'],_0x2d51de=_0x715d64['model']['document']['selection'],_0xb42218=_0x4aa75f(()=>this['refreshSelectedViews'](),0xa);_0x2d51de['on']('change:range',(_0x445d7a,_0x250723)=>{_0x250723['directChange']&&(_0xb42218['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x715d64['editing']['view']['document'],'change:isFocused',(_0x2f6987,_0x509da3,_0xc5832d)=>{_0xc5832d&&_0xb42218();}),this['listenTo'](_0x715d64['ui']['focusTracker'],'change:isFocused',(_0x5cbafc,_0x1b52bb,_0x114489)=>{_0x114489||this['fire']('blur',{'isAnnotationTracked':_0x59ae06=>this['_editorAnnotationsData']['has'](_0x59ae06['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x12d34f){if(this['_editorAnnotations']['has'](_0x12d34f['view']))return;this['_editorAnnotations']['add'](_0x12d34f['view']),this['editor']['ui']['focusTracker']['add'](_0x12d34f['view']['element']);const _0x326d0a=this['editor']['plugins']['get'](Annotations);this['listenTo'](_0x326d0a['collection'],'remove',(_0x45f356,_0x211df9)=>{this['editor']['ui']['focusTracker']['remove'](_0x211df9['view']['element']),this['_editorAnnotations']['delete'](_0x211df9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x465fcd){if('function'!=typeof _0x465fcd)throw new _0x21ce1d('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x465fcd);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3ae3ce,annotations:_0x3731ed}){const _0x35a2fc=[],_0x45bc6e=this['editor']['model']['document']['selection'],_0x31e774=Array['from'](_0x45bc6e['getRanges']());for(const [_0x1a4e55,_0x43b56e]of this['_editorAnnotationsData']){const _0x445192=_0x7a6891(_0x43b56e),_0x4f59ed=_0x3731ed['getByInnerView'](_0x1a4e55);_0x445192&&_0x4f59ed&&_0x35a2fc['push']({'annotation':_0x4f59ed,'range':_0x445192});}function _0x7a6891(_0x5279df){for(const _0x35646d of _0x5279df)for(const _0xe79ed1 of _0x31e774)if(_0x35646d['containsRange'](_0xe79ed1,!_0x45bc6e['isCollapsed']))return _0x35646d;return null;}return _0x35a2fc['sort']((_0x5cf34c,_0x3df2f0)=>{const _0x3f5509=_0x5cf34c['range'],_0x367a48=_0x3df2f0['range'];if(!_0x3f5509['isEqual'](_0x367a48)){if(_0x3f5509['containsRange'](_0x367a48,!0x0))return 0x1;if(_0x367a48['containsRange'](_0x3f5509,!0x0))return-0x1;}return _0x5cf34c['annotation']==_0x3ae3ce?-0x1:_0x3df2f0['annotation']==_0x3ae3ce?0x1:0x0;})['map'](_0x43e72f=>_0x43e72f['annotation']);}get['_editorAnnotationsData'](){const _0x164a2f=new Map();for(const _0x1850ad of Array['from'](this['_dataCollectors']))for(const [_0x1d342d,_0x4715b1]of _0x1850ad())_0x164a2f['set'](_0x1d342d,_0x4715b1);return _0x164a2f;}}class CommentsRestrictedEditingMode extends _0x4e3a6a{['afterInit'](){const _0x4e52f1=this['editor'];if(!_0x4e52f1['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4e52f1['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class CommentsImportWord extends _0x4e3a6a{constructor(_0x399d08){super(_0x399d08),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2b2e74=this['editor'],_0x37b0c1=_0x2b2e74['commands']['get']('importWord'),_0x1b74c8=_0x2b2e74['plugins']['get'](_0x3bef93);_0x37b0c1&&(_0x37b0c1['on']('execute',(_0x3f294e,[,_0x5c05dd])=>{_0x5c05dd['collaboration_features']={'comments':!0x0,'user_id':_0x1b74c8['me']['id']};},{'priority':_0x45a290['high']+0xa}),this['listenTo'](_0x37b0c1,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2b7956,_0x1e529f){const {comment_threads:_0x14ec0e}=_0x1e529f;_0x14ec0e&&_0x14ec0e['forEach'](({thread_id:_0x56e890,comments:_0x30d725,is_resolved:_0x4d0eca})=>{const _0x15f434=new Date(),_0x37215a=_0x30d725['map'](({author:_0x5c5569,content:_0x4b4284,created_at:_0x3e8c8c})=>({'content':_0x4b4284,'authorId':this['editor']['plugins']['get'](_0x3bef93)['me']['id'],'createdAt':_0x15f434,'attributes':{'@external':{'authorName':_0x5c5569,'createdAt':_0x3e8c8c?new Date(_0x3e8c8c):new Date(),'source':'importWord'}}})),_0x25908a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](CommentsRepository)['addCommentThread']({'channelId':_0x25908a,'threadId':_0x56e890,'comments':_0x37215a,'resolvedAt':_0x4d0eca?_0x15f434:null});});}}class CommentsClipboard extends _0x4e3a6a{constructor(_0x31e906){super(_0x31e906),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x51bbb4=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x51bbb4,'contentInsertion',(_0x4e12a4,_0x9aff)=>this['_removeMarkersWithoutThreads'](_0x9aff['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x29cdc5){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x29cdc5;const _0x57bca0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x552c03 of _0x29cdc5['keys']()){const [_0x35949c,_0x309d46]=_0x552c03['split'](':');'comment'!=_0x35949c||_0x57bca0['hasCommentThread'](_0x309d46)||_0x29cdc5['delete'](_0x552c03);}return _0x29cdc5;}['_registerMarkerInClipboardPipeline'](){const _0x1ba179=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x56bb0e=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x56bb0e&&_0x1ba179['_registerMarkerToCopy']('comment',_0x56bb0e);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x53e654){switch(_0x53e654){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function Pt(_0x110939){const _0x2981d6=_0x110939['split'](':');return{'group':_0x2981d6[0x0],'id':_0x2981d6[0x1],'part':_0x2981d6[0x2]};}class ShowCommentHighlights extends _0x4e3a6a{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1b880,_0x3bbec7)=>{if(!_0x3bbec7['options']['showCommentHighlights'])return null;if(_0x3bbec7['options']['ignoreResolvedComments']){const {id:_0x36aa72}=Pt(_0x1b880['markerName']),_0x2b36a4=this['editor']['plugins']['get'](CommentsRepository);if(_0x2b36a4['getCommentThread'](_0x36aa72)?.['isResolved']&&_0x1b880['item'])return _0x3bbec7['consumable']['consume'](_0x1b880['item'],'addMarker:'+_0x1b880['markerName']),_0x3bbec7['consumable']['consume'](_0x1b880['item'],'removeMarker:'+_0x1b880['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1caa76=>{_0x1caa76['on']('addMarker:comment',(_0x135746,_0x211908,_0x559658)=>{if(!_0x559658['options']['showCommentHighlights'])return;const _0x448217=_0x211908['item'];if(!_0x448217)return;const _0x532cef=_0x559658['mapper']['toViewElement'](_0x448217);this['editor']['model']['schema']['isObject'](_0x448217)&&_0x532cef&&!_0x532cef['getCustomProperty']('widget')&&_0x532cef['is']('containerElement')&&It(_0x532cef,_0x559658['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2aa54f,{writer:_0x67432,options:_0x229803})=>{if(!_0x229803['showCommentHighlights'])return null;const _0x28b8c0=_0x67432['createContainerElement']('div'),_0x4f8252=_0x67432['createEmptyElement']('hr');return _0x67432['addClass']('ck-horizontal-line',_0x28b8c0),_0x67432['insert'](_0x67432['createPositionAt'](_0x28b8c0,0x0),_0x4f8252),_0x28b8c0;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1c98b3,{writer:_0x1dd5fd,options:_0x15d15e})=>{if(!_0x15d15e['showCommentHighlights'])return null;const _0x1aaa25=_0x1dd5fd['createContainerElement']('span'),_0x5b4e15=_0x1dd5fd['createEmptyElement']('img');return _0x1dd5fd['addClass']('image-inline',_0x1aaa25),_0x1dd5fd['insert'](_0x1dd5fd['createPositionAt'](_0x1aaa25,0x0),_0x5b4e15),_0x1aaa25;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x50ee04,{writer:_0x3fce57,options:_0x76e8d6})=>{if(_0x76e8d6['showCommentHighlights'])return _0x3fce57['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4a7771,_0x13ff6c,_0x545191)=>{_0x545191['options']['showCommentHighlights']&&_0x4a7771['stop']();},{'priority':'high'});}}class CommentsEditing extends _0x4e3a6a{static get['requires'](){return[CommentsRepository,EditorAnnotations,_0x3bef93,CommentsRestrictedEditingMode,CommentsImportWord,CommentsClipboard,ShowCommentHighlights];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d52e6){super(_0x1d52e6),this['set']('isThreadsLoadingPaused',!0x0),_0x1d52e6['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3a2116,_0x1379a1,_0x53e66f,_0x2fde9b)=>{const _0x105304=_0x1d52e6['plugins']['get'](CommentsRepository),_0x2349ce=_0x53e66f?Pt(_0x53e66f)['id']:null;_0x1d52e6['model']['change'](()=>{if(_0x2349ce){const _0xc67567=this['getAllMarkersForId'](_0x2349ce);for(const _0x41affa of _0xc67567)_0x1d52e6['editing']['reconvertMarker'](_0x41affa);}if(_0x2fde9b){const {id:_0x5aff7b}=Pt(_0x2fde9b),_0x38c2e6=_0x105304['getCommentThread'](_0x5aff7b);if(_0x38c2e6&&_0x38c2e6['unlinkedAt'])return;if(_0x38c2e6&&!_0x38c2e6['isAttached'])return;const _0x53bd30=this['getAllMarkersForId'](_0x5aff7b);for(const _0x465f84 of _0x53bd30)_0x1d52e6['editing']['reconvertMarker'](_0x465f84);}}),_0x2349ce&&this['scrollToThreadMarker'](_0x2349ce);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5e2010=this['editor'],_0x78eeb6=_0x5e2010['plugins']['get'](CommentsRepository),_0xe19650=_0x5e2010['config']['get']('collaboration.channelId'),_0x4f1a06=_0x78eeb6['getCommentThreads']()['filter'](_0x1da7e9=>_0x1da7e9['channelId']!==_0xe19650);_0x5e2010['commands']['add']('addCommentThread',new AddCommentThreadCommand(_0x5e2010)),this['listenTo'](_0x5e2010,'change:isReadOnly',(_0x452112,_0x158f42,_0x1b7052)=>{_0x78eeb6['switchReadOnly'](_0x1b7052,_0x5e2010['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x78eeb6,Vt('addCommentThread',_0xe19650),(_0x12862d,{threadId:_0x3a3478})=>{const _0xe40251=this['editor']['plugins']['get'](CommentsRepository)['getCommentThread'](_0x3a3478);_0xe40251?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3a3478);}),this['listenTo'](_0x78eeb6,Vt('removeCommentThread',_0xe19650),(_0x2d1d2c,{threadId:_0x277dce})=>{_0x5e2010['model']['enqueueChange']({'isUndoable':!0x1},_0x5716ed=>{const _0x383e0b=this['getAllMarkersForId'](_0x277dce);for(const _0x53772c of _0x383e0b)_0x5716ed['removeMarker'](_0x53772c);});}),this['listenTo'](_0x78eeb6,Vt('resolveCommentThread',_0xe19650),(_0x30c10d,{threadId:_0x3c754f})=>{this['_reconvertMarkers'](_0x3c754f);const _0x409b3d=this['editor']['plugins']['get'](Annotations);(this['editor']['editing']['view']['hasDomSelection']||_0x409b3d['collection']['isFocused'])&&(this['editor']['plugins']['get'](CommentsRepository)['getCommentThread'](_0x3c754f)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x78eeb6,Vt('reopenCommentThread',_0xe19650),(_0x3a0560,{threadId:_0x416364})=>{this['_reconvertMarkers'](_0x416364);},{'priority':'low'}),this['listenTo'](_0x78eeb6,Vt('addComment',_0xe19650),(_0x10875c,{threadId:_0x180e4d,isFromAdapter:_0x467117})=>{const _0x11c6e5=this['getAllMarkersForId'](_0x180e4d);if(_0x467117||0x0==_0x11c6e5['length']||!_0x78eeb6['hasCommentThread'](_0x180e4d))return;0x1===_0x78eeb6['getCommentThread'](_0x180e4d)['length']&&_0x5e2010['model']['enqueueChange']({'isUndoable':!0x1},_0xba624a=>{for(const _0xadb98 of _0x11c6e5)_0xba624a['updateMarker'](_0xadb98,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4f1a06);}['afterInit'](){!async function(_0x11f8db){const _0x4498cf=_0x395db5([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x5bf90d=0x73460ab3,_0x5504a7=0x73418163^_0x5bf90d,_0x2aaded=window[_0x395db5([0x44,0x61,0x74,0x65])][_0x395db5([0x6e,0x6f,0x77])](),_0x1786dd=_0x11f8db[_0x395db5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x334c46=new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c43d1=>{_0x1786dd[_0x395db5([0x6f,0x6e,0x63,0x65])](_0x395db5([0x72,0x65,0x61,0x64,0x79]),_0x4c43d1);}),_0x3b0fbf={[_0x395db5([0x6b,0x74,0x79])]:_0x395db5([0x45,0x43]),[_0x395db5([0x75,0x73,0x65])]:_0x395db5([0x73,0x69,0x67]),[_0x395db5([0x63,0x72,0x76])]:_0x395db5([0x50,0x2d,0x32,0x35,0x36]),[_0x395db5([0x78])]:_0x395db5([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x395db5([0x79])]:_0x395db5([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x395db5([0x61,0x6c,0x67])]:_0x395db5([0x45,0x53,0x32,0x35,0x36])},_0x3e805b=_0x1786dd[_0x395db5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x395db5([0x67,0x65,0x74])](_0x395db5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1a6d75(){let _0x2c1453,_0x36651a=null,_0x31771f=null;try{if(_0x3e805b==_0x395db5([0x47,0x50,0x4c]))return _0x395db5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2c1453=_0x5d96c7(),!_0x2c1453)return _0x395db5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2c1453[_0x395db5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x31771f=_0x308e78(_0x2c1453[_0x395db5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2c1453[_0x395db5([0x6a,0x74,0x69])])),await _0x2953d7()?_0x3371d5()?_0x389777()?_0x395db5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x27fada()?(_0x2c1453[_0x395db5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x395db5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x36651a=_0x24f84a(_0x395db5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3e6956()):_0x395db5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x395db5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x395db5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x395db5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x389777(){const _0x21469c=[_0x395db5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x395db5([0x74,0x72,0x69,0x61,0x6c])][_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c1453[_0x395db5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2aaded/0x3e8:0xe10*_0x5504a7;return _0x2c1453[_0x395db5([0x65,0x78,0x70])]<_0x21469c;}function _0x3371d5(){const _0xb63b7c=_0x2c1453[_0x395db5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xb63b7c)return!0x1;if(_0xb63b7c[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x2a])))return!0x0;if(_0xb63b7c[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x43,0x4d,0x54])))return!0x0;if(_0xb63b7c[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x403de9())return!0x0;if(_0xb63b7c[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x52,0x43,0x4d,0x54]))){if(_0x3f6b1())return!0x0;if(_0x2f96cf()||_0x3d82b3())return!0x0;}return!0x1;}function _0x27fada(){const _0x7d51db=_0x2c1453[_0x395db5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x7d51db||0x0==_0x7d51db[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1bdf52}=new URL(window[_0x395db5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x7d51db[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1bdf52))return!0x0;const _0x71d7b0=_0x1bdf52[_0x395db5([0x73,0x70,0x6c,0x69,0x74])](_0x395db5([0x2e]));return _0x7d51db[_0x395db5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x6062dc=>_0x6062dc[_0x395db5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x395db5([0x2a])))[_0x395db5([0x6d,0x61,0x70])](_0x265841=>_0x265841[_0x395db5([0x73,0x70,0x6c,0x69,0x74])](_0x395db5([0x2e])))[_0x395db5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x141696=>_0x141696[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x71d7b0[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x395db5([0x6d,0x61,0x70])](_0x34855d=>Array(_0x71d7b0[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x34855d[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x395db5([0x66,0x69,0x6c,0x6c])](_0x34855d[0x0]===_0x395db5([0x2a])?_0x395db5([0x2a]):'')[_0x395db5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x34855d))[_0x395db5([0x73,0x6f,0x6d,0x65])](_0x3ffe2f=>_0x71d7b0[_0x395db5([0x65,0x76,0x65,0x72,0x79])]((_0x146465,_0xce5653)=>_0x3ffe2f[_0xce5653]===_0x146465||_0x3ffe2f[_0xce5653]===_0x395db5([0x2a])));}function _0x3e6956(){return _0x36651a&&_0x31771f?new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57df04,_0x1bb62d)=>{_0x36651a[_0x395db5([0x74,0x68,0x65,0x6e])](_0x57df04,_0x1bb62d),_0x31771f[_0x395db5([0x74,0x68,0x65,0x6e])](_0x473e12=>{_0x473e12!=_0x395db5([0x56,0x61,0x6c,0x69,0x64])&&_0x57df04(_0x473e12);},_0x1bb62d);}):_0x36651a||_0x31771f||_0x395db5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x308e78(_0x479f13,_0x746be7){return new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36b362=>{if(_0x258965())return _0x36b362(_0x395db5([0x56,0x61,0x6c,0x69,0x64]));_0x115ca0(),_0x1786dd[_0x395db5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x395db5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4734d8=!0x1;const _0x5ddfef=_0x308b6();function _0x24d312(_0x11ac55){return!!_0x11ac55&&(typeof _0x11ac55===_0x395db5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x11ac55===_0x395db5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x11ac55[_0x395db5([0x74,0x68,0x65,0x6e])]===_0x395db5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x11ac55[_0x395db5([0x63,0x61,0x74,0x63,0x68])]===_0x395db5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5d66fc(_0x1e2801){_0x4928be(_0x1e2801)[_0x395db5([0x74,0x68,0x65,0x6e])](_0x25fff2=>{if(!_0x25fff2||_0x25fff2[_0x395db5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x395db5([0x6f,0x6b]))return _0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1f8670(_0x212df7(_0x5ddfef+_0x746be7))!=_0x25fff2[_0x395db5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x395db5([0x56,0x61,0x6c,0x69,0x64]);})[_0x395db5([0x74,0x68,0x65,0x6e])](_0x38b65a=>(_0x471400(),_0x38b65a),()=>{const _0x539cac=_0x49edf4();return null==_0x539cac?(_0x471400(),_0x395db5([0x56,0x61,0x6c,0x69,0x64])):_0x395db5(_0x2aaded-_0x539cac>(0x574a8eb3^_0x5bf90d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x395db5([0x74,0x68,0x65,0x6e])](_0x36b362)[_0x395db5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x36b362(_0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2bda8b=0x7370e433^_0x5bf90d;function _0x471400(){const _0x2fabba=_0x395db5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1f8670(_0x212df7(_0x479f13)),_0x7c42be=_0x307cc6(_0x1f8670(window[_0x395db5([0x4d,0x61,0x74,0x68])][_0x395db5([0x63,0x65,0x69,0x6c])](_0x2aaded/_0x2bda8b)));window[_0x395db5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x395db5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2fabba,_0x7c42be);}function _0x49edf4(){const _0x4ba0e0=_0x395db5([0x6c,0x6c,0x63,0x74,0x2d])+_0x1f8670(_0x212df7(_0x479f13)),_0x55d80e=window[_0x395db5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x395db5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4ba0e0);return _0x55d80e?window[_0x395db5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x307cc6(_0x55d80e),0x10)*_0x2bda8b:null;}function _0x4928be(_0x38d552){return new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x31a547,_0x1c01a8)=>{_0x38d552[_0x395db5([0x74,0x68,0x65,0x6e])](_0x31a547,_0x1c01a8),window[_0x395db5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1c01a8,0x7347de73^_0x5bf90d);});}}_0x1786dd[_0x395db5([0x6f,0x6e])](_0x395db5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xe1e9dd,_0x532caf)=>{if(_0x532caf[0x0]!=_0x479f13)return _0x36b362(_0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x532caf[0x1]={..._0x532caf[0x1],[_0x395db5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5ddfef};},{[_0x395db5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x395db5([0x68,0x69,0x67,0x68])}),_0x1786dd[_0x395db5([0x6f,0x6e])](_0x395db5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1ac8ac=>{_0x24d312(_0x1ac8ac[_0x395db5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4734d8=!0x0,_0x5d66fc(_0x1ac8ac[_0x395db5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x395db5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x395db5([0x6c,0x6f,0x77])}),_0x334c46[_0x395db5([0x74,0x68,0x65,0x6e])](()=>{_0x4734d8||_0x36b362(_0x395db5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x258965(){return _0x1786dd[_0x395db5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x395db5([0x76,0x69,0x65,0x77])][_0x395db5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x395db5([0x61,0x75,0x74,0x6f]);}function _0x115ca0(){_0x1786dd[_0x395db5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x395db5([0x76,0x69,0x65,0x77])][_0x395db5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x395db5([0x61,0x75,0x74,0x6f]);}}function _0x24f84a(_0x592bd2){const _0x15fe3f=[new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x549e79=>setTimeout(_0x549e79,0x734f347f^_0x5bf90d)),_0x334c46[_0x395db5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x315623=>{let _0x79a3e8=0x0;_0x1786dd[_0x395db5([0x6d,0x6f,0x64,0x65,0x6c])][_0x395db5([0x6f,0x6e])](_0x395db5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1682bf,_0x23abce)=>{_0x23abce[0x0][_0x395db5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x79a3e8++,_0x79a3e8==(0x73460f5b^_0x5bf90d)&&(_0x315623(),_0x1682bf[_0x395db5([0x6f,0x66,0x66])]());});}))];return window[_0x395db5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x395db5([0x72,0x61,0x63,0x65])](_0x15fe3f)[_0x395db5([0x74,0x68,0x65,0x6e])](()=>_0x592bd2);}async function _0x4cd29a(){await _0x334c46,_0x1786dd[_0x395db5([0x6d,0x6f,0x64,0x65,0x6c])][_0x395db5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x20e812,_0x1786dd[_0x395db5([0x6d,0x6f,0x64,0x65,0x6c])][_0x395db5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x20e812,_0x1786dd[_0x395db5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x395db5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x403de9(){return window[_0x395db5([0x67,0x6c,0x6f,0x62])]&&window[_0x395db5([0x67,0x6c,0x6f,0x62])][_0x395db5([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x3f6b1(){return _0x3f76c0(_0x395db5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x171a09(_0x395db5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x395db5([0x73,0x74,0x61,0x74,0x65])]==_0x395db5([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2f96cf(){return _0x3f76c0(_0x395db5([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x3d82b3(){return _0x3f76c0(_0x395db5([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x302d0e(_0x2f1dda){const _0x4d326f=_0x24d1df();_0x1786dd[_0x4d326f]=_0x395db5([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2f1dda,_0x2f1dda!=_0x395db5([0x56,0x61,0x6c,0x69,0x64])&&_0x4cd29a();}function _0x24d1df(){const _0x1f928e=window[_0x395db5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x395db5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x395db5([0x6e,0x6f,0x77])]())[_0x395db5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x395db5([0x2e]),'');let _0xfde316=_0x395db5([0x4b]);for(let _0x145463=0x0;_0x145463<_0x1f928e[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x145463+=0x2){let _0x1282e6=window[_0x395db5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f928e[_0x395db5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x145463,_0x145463+0x2));_0x1282e6>=_0x4498cf[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1282e6-=_0x4498cf[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xfde316+=_0x4498cf[_0x1282e6];}return _0xfde316;}function _0x5d96c7(){const _0x54bbf5=_0x3e805b[_0x395db5([0x73,0x70,0x6c,0x69,0x74])](_0x395db5([0x2e]));if(0x3!=_0x54bbf5[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3874e9(_0x54bbf5[0x1]);function _0x3874e9(_0x226bb1){const _0x3503ad=_0x23b846(_0x226bb1);return _0x3503ad&&_0x254bd2()?_0x3503ad:null;function _0x254bd2(){const _0x272def=_0x3503ad[_0x395db5([0x6a,0x74,0x69])],_0xcb01ab=window[_0x395db5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x272def[_0x395db5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x272def[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x46e3a1={..._0x3503ad,[_0x395db5([0x6a,0x74,0x69])]:_0x272def[_0x395db5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x272def[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x46e3a1[_0x395db5([0x76,0x63])],_0x212df7(_0x46e3a1)==_0xcb01ab;}}}async function _0x2953d7(){let _0x3886a5=!0x0;try{const _0x1388da=_0x3e805b[_0x395db5([0x73,0x70,0x6c,0x69,0x74])](_0x395db5([0x2e])),[_0xb0438,_0x17514e,_0x5797a1]=_0x1388da;return _0x14abf1(_0xb0438),await _0x21fd33(_0xb0438,_0x17514e,_0x5797a1),_0x3886a5;}catch{return!0x1;}function _0x14abf1(_0x629e2){const _0x26bf09=_0x23b846(_0x629e2);_0x26bf09&&_0x26bf09[_0x395db5([0x61,0x6c,0x67])]==_0x395db5([0x45,0x53,0x32,0x35,0x36])||(_0x3886a5=!0x1);}async function _0x21fd33(_0x477f8c,_0x5d038e,_0x2d0ba2){const _0x18dd94=window[_0x395db5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x395db5([0x66,0x72,0x6f,0x6d])](_0xa95c7f(_0x2d0ba2),_0x1e46df=>_0x1e46df[_0x395db5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x91f7c7=new window[(_0x395db5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x395db5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x477f8c+_0x395db5([0x2e])+_0x5d038e),_0x47f411=window[_0x395db5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x395db5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x47f411)return;const _0x46a0ec=await _0x47f411[_0x395db5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x395db5([0x6a,0x77,0x6b]),_0x3b0fbf,{[_0x395db5([0x6e,0x61,0x6d,0x65])]:_0x395db5([0x45,0x43,0x44,0x53,0x41]),[_0x395db5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x395db5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x395db5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x47f411[_0x395db5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x395db5([0x6e,0x61,0x6d,0x65])]:_0x395db5([0x45,0x43,0x44,0x53,0x41]),[_0x395db5([0x68,0x61,0x73,0x68])]:{[_0x395db5([0x6e,0x61,0x6d,0x65])]:_0x395db5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x46a0ec,_0x18dd94,_0x91f7c7)||(_0x3886a5=!0x1);}}function _0x23b846(_0x1e49c2){return _0x1e49c2[_0x395db5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x395db5([0x65,0x79]))?JSON[_0x395db5([0x70,0x61,0x72,0x73,0x65])](_0xa95c7f(_0x1e49c2)):null;}function _0xa95c7f(_0x9b7efd){return window[_0x395db5([0x61,0x74,0x6f,0x62])](_0x9b7efd[_0x395db5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x395db5([0x2b]))[_0x395db5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x395db5([0x2f])));}function _0x212df7(_0x3d399a){let _0x43e31f=0x1505;function _0x207b73(_0x5e1eec){for(let _0xcdba3=0x0;_0xcdba3<_0x5e1eec[_0x395db5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcdba3++){const _0x569b46=_0x5e1eec[_0x395db5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xcdba3);_0x43e31f=(_0x43e31f<<0x5)+_0x43e31f+_0x569b46,_0x43e31f&=_0x43e31f;}}function _0x11854e(_0x5052cf){Array[_0x395db5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5052cf)?_0x5052cf[_0x395db5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x11854e):_0x5052cf&&typeof _0x5052cf==_0x395db5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x395db5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5052cf)[_0x395db5([0x73,0x6f,0x72,0x74])]()[_0x395db5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4cf97d,_0xa01d18])=>{_0x207b73(_0x4cf97d),_0x11854e(_0xa01d18);}):_0x207b73(window[_0x395db5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5052cf));}return _0x11854e(_0x3d399a),_0x43e31f>>>0x0;}function _0x1f8670(_0xad80d3){return _0xad80d3[_0x395db5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x395db5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x395db5([0x30]));}function _0x307cc6(_0xee7d42){return _0xee7d42[_0x395db5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x395db5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x395db5([0x6a,0x6f,0x69,0x6e])]('');}function _0x3f76c0(_0x4a2101){return _0x1786dd[_0x395db5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x395db5([0x68,0x61,0x73])](_0x4a2101);}function _0x171a09(_0x5e09ee){return _0x1786dd[_0x395db5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x395db5([0x67,0x65,0x74])](_0x5e09ee);}function _0x20e812(){}function _0x395db5(_0x3aa956){return _0x3aa956['map'](_0xc78e1d=>String['fromCharCode'](_0xc78e1d))['join']('');}_0x302d0e(await _0x1a6d75());}(this);}['destroy'](){const _0x494dc2=this['editor']['plugins']['get'](CommentsRepository),_0x5da4df=this['editor']['config']['get']('collaboration.channelId');for(const _0x369b39 of _0x494dc2['getCommentThreads']({'channelId':_0x5da4df}))_0x494dc2['_detachCommentThread'](_0x369b39['id']),_0x494dc2['_threads']['delete'](_0x369b39['id']);super['destroy']();}['hasMarkerForId'](_0x320b3e){return this['getAllMarkersForId'](_0x320b3e)['length']>0x0;}['getAllMarkersForId'](_0x5b98a9){const _0x3f9392=[];for(const _0x197f24 of this['editor']['model']['markers'])_0x197f24['name']['startsWith']('comment:'+_0x5b98a9)&&_0x3f9392['push'](_0x197f24);return _0x3f9392;}['scrollToThreadMarker'](_0x1f9674){setTimeout(()=>{const _0x57f81d=this['_getTargetForId'](_0x1f9674);if(!_0x57f81d)return;this['activeMarker']&&Pt(this['activeMarker'])['id']===_0x1f9674&&_0x590e11({'target':_0x57f81d[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x25efe4){this['editor']['model']['change'](()=>{for(const _0x2b75b4 of this['getAllMarkersForId'](_0x25efe4))this['editor']['editing']['reconvertMarker'](_0x2b75b4);});}['_attachArchivedThread'](_0x5aea04){const _0x4613fd=this['editor']['plugins']['get'](CommentsRepository),_0x39f357=this['editor']['plugins']['get'](EditorAnnotations),_0x56e52b=_0x4613fd['getCommentThread'](_0x5aea04);if(!_0x56e52b['isAttached']){const _0x10a77f=_0x56e52b['attachTo'](()=>this['_getTargetForId'](_0x56e52b['id']));_0x39f357['registerAnnotation'](_0x10a77f),_0x56e52b['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x598c3a=this['editor'],_0x53adda=_0x598c3a['plugins']['get'](_0x3bef93);_0x598c3a['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xe52807,_0x1e24f8)=>{const {id:_0x36fa92}=Pt(_0xe52807['markerName']),_0xf18536=_0x598c3a['plugins']['get'](CommentsRepository)['getCommentThread'](_0x36fa92),_0x374ee0=this['activeMarker']&&Pt(this['activeMarker'])['id']===_0x36fa92;let _0x480592;if(_0xf18536&&_0xf18536['isResolved']&&!_0x374ee0&&_0xe52807['item'])return _0x1e24f8['consumable']['consume'](_0xe52807['item'],'addMarker:'+_0xe52807['markerName']),_0x1e24f8['consumable']['consume'](_0xe52807['item'],'removeMarker:'+_0xe52807['markerName']),null;const _0x51e56d=['ck-comment-marker'];return _0x374ee0&&_0x51e56d['push']('ck-comment-marker--active'),_0x480592=_0xf18536?.['length']?_0xf18536['comments']['first']['author']['id']:_0x53adda['me']['id'],{'classes':_0x51e56d,'attributes':{'data-comment':_0x36fa92,'data-author-id':_0x480592}};}}),_0x598c3a['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x405281,{options:_0x608322})=>{if(_0x608322['showCommentHighlights'])return null;const _0x52467c=_0x598c3a['plugins']['get'](CommentsRepository),_0x15484f=_0x598c3a['model']['markers']['get'](_0x405281),{id:_0x4c44d1,part:_0x291cfb}=Pt(_0x405281);return _0x15484f&&!_0x15484f['affectsData']||_0x608322['ignoreResolvedComments']&&_0x52467c['getCommentThread'](_0x4c44d1)?.['isResolved']?null:{'group':'comment','name':_0x291cfb?_0x4c44d1+':'+_0x291cfb:_0x4c44d1};}}),_0x598c3a['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3dd5d5,{writer:_0x539eb2})=>_0x539eb2['createElement']('$marker',{'data-name':'comment:'+_0x3dd5d5['getAttribute']('id')})}),_0x598c3a['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x8271b4=this['editor'],_0x357487=_0x8271b4['plugins']['get'](CommentsRepository),_0x4fa16e=new Set(),_0x4e1455=new Set();_0x8271b4['model']['document']['registerPostFixer'](_0x3c85a3=>{let _0x381e15=!0x1;for(const {name:_0x3a128c,data:_0x4fb3af}of _0x8271b4['model']['document']['differ']['getChangedMarkers']()){const {group:_0x55fd36,id:_0x2f08cb}=Pt(_0x3a128c);let _0x5193e0=_0x4fb3af['newRange'];if('comment'!==_0x55fd36||!_0x5193e0)continue;const _0x3cdb27='$graveyard'===_0x5193e0['root']['rootName'];_0x3cdb27||(_0x5193e0=Lt(_0x5193e0,_0x8271b4['model']),!_0x5193e0||_0x5193e0['isCollapsed']||!_0x4fb3af['newRange']||_0x5193e0['isEqual'](_0x4fb3af['newRange']))?_0x8271b4['model']['hasContent'](_0x5193e0)&&!_0x3cdb27?this['isThreadsLoadingPaused']?_0x4fa16e['add'](_0x3a128c):this['_handleThreadMarker'](_0x3a128c,_0x2f08cb):(_0x4e1455['add'](_0x3a128c),_0x4fa16e['delete'](_0x3a128c),_0x3c85a3['removeMarker'](_0x3a128c),_0x381e15=!0x0):(_0x3c85a3['updateMarker'](_0x3a128c,{'range':_0x5193e0}),_0x381e15=!0x0);}return _0x381e15;}),this['on']('change:isThreadsLoadingPaused',(_0x28ffed,_0x3ab011,_0x52b8fb)=>{if(!_0x52b8fb&&_0x4fa16e['size'])for(const _0x5be49d of _0x4fa16e){const {id:_0x264540}=Pt(_0x5be49d);_0x4fa16e['delete'](_0x5be49d),_0x8271b4['model']['markers']['get'](_0x5be49d)&&this['_handleThreadMarker'](_0x5be49d,_0x264540);}}),this['listenTo'](_0x8271b4['model']['document'],'change',()=>{for(const {name:_0x5c0ef4,data:{newRange:_0x5371e9}}of _0x8271b4['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d9828,id:_0x17173c}=Pt(_0x5c0ef4);if('comment'!==_0x3d9828)continue;const _0xc962e7=_0x357487['getCommentThread'](_0x17173c),_0x537fed=this['hasMarkerForId'](_0x17173c);_0xc962e7&&(!_0xc962e7['_hasTargetInContent']&&_0x5371e9&&_0x8271b4['editing']['view']['once']('render',()=>{const _0x175e22=_0x8271b4['plugins']['get'](Annotations),_0x236bab=_0x357487['_threadToController']['get'](_0xc962e7)['view'];_0x175e22['getByInnerView'](_0x236bab)['refreshVisibility']();},{'priority':'low'}),_0xc962e7['_hasTargetInContent']=_0x537fed||!!_0x5371e9),_0x5371e9||(_0x4e1455['add'](_0x5c0ef4),_0x4fa16e['delete'](_0x5c0ef4));}for(const _0x4b00b4 of _0x4e1455){const {id:_0x1d35d1}=Pt(_0x4b00b4),_0x139dc3=_0x357487['getCommentThread'](_0x1d35d1);if(_0x4fa16e['delete'](_0x4b00b4),!_0x139dc3)continue;const _0x5dc96c=this['hasMarkerForId'](_0x1d35d1);_0x5dc96c||_0x139dc3['isSubmitted']?_0x5dc96c||_0x139dc3['unlinkedAt']||_0x139dc3['setUnlinkedAt'](new Date()):_0x139dc3['remove']();}_0x4e1455['clear']();});}['_handleInitialThreads'](_0x26e177){_0x26e177['forEach'](_0x502d49=>{_0x502d49['unlinkedAt']&&this['_attachArchivedThread'](_0x502d49['id']);});}['_getTargetForId'](_0x5acb28){const _0x8a15b7=this['editor'],_0x4934ae=this['getAllMarkersForId'](_0x5acb28);return _0x28774f(_0x8a15b7['editing'],_0x4934ae);}['_getTextContext'](_0xdac88a){const _0x5e5c06=this['getAllMarkersForId'](_0xdac88a);let _0x54ba5e='',_0x4d2223=!0x1;for(const _0x3b56c7 of _0x5e5c06){const _0x5ec994=_0x3b56c7['getRange']();for(const _0x9f4b44 of Array['from'](_0x5ec994['getItems']()))_0x9f4b44['is']('$textProxy')?(_0x54ba5e&&_0x4d2223&&(_0x54ba5e+='\x20',_0x4d2223=!0x1),_0x54ba5e+=_0x9f4b44['data']):_0x4d2223=!0x0;_0x4d2223=!0x0;}return _0x54ba5e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x138dfe,_0x266398){const _0x2031ae=this['editor'],_0x43f0cd=_0x2031ae['plugins']['get'](CommentsRepository);let _0x144e60=_0x43f0cd['getCommentThread'](_0x266398);const _0x5e42d9=_0x2031ae['config']['get']('collaboration.channelId'),_0x4c6153=_0x2031ae['plugins']['get'](EditorAnnotations);if(_0x144e60&&(_0x144e60['unlinkedAt']&&_0x144e60['setUnlinkedAt'](null),_0x144e60['isAttached']))return _0x144e60;return!this['getAllMarkersForId'](_0x266398)[0x0]['managedUsingOperations']?_0x2031ae['editing']['view']['once']('render',()=>{if(_0x43f0cd['getCommentThread'](_0x266398))return;const _0xc88859=_0x2031ae['plugins']['get'](Annotations);_0x144e60=_0x43f0cd['openNewCommentThread']({'channelId':_0x5e42d9,'threadId':_0x266398,'target':()=>this['_getTargetForId'](_0x266398),'context':{'type':'text','value':this['_getTextContext'](_0x266398)}});const _0x2879eb=_0x43f0cd['_threadToController']['get'](_0x144e60)['view'],_0x1c26ec=_0xc88859['getByInnerView'](_0x2879eb);_0x1c26ec&&_0x4c6153['registerAnnotation'](_0x1c26ec);},{'priority':'low'}):_0x43f0cd['fetchCommentThread']({'channelId':_0x5e42d9,'threadId':_0x266398})['then'](_0x5041f4=>{if('destroyed'!==_0x2031ae['state']){if(_0x144e60=_0x5041f4,_0x144e60&&!_0x144e60['isAttached']){const _0x105689=_0x144e60['attachTo'](()=>this['_getTargetForId'](_0x266398));_0x4c6153['registerAnnotation'](_0x105689),_0x144e60['isResolved']&&this['_reconvertMarkers'](_0x266398);}else{if(!_0x144e60){const _0xa20d26=this['getAllMarkersForId'](_0x266398);_0x2031ae['model']['change'](_0x2c4096=>{for(const _0x1b6432 of _0xa20d26)_0x2c4096['removeMarker'](_0x1b6432);});}}}}),_0x144e60;}['_handleThreadMarker'](_0x44d281,_0x4882c6){const _0x15fe25=this['_attachMarkerToThread'](_0x44d281,_0x4882c6);_0x15fe25&&!_0x15fe25['context']&&_0x15fe25['setContext']({'type':'text','value':this['_getTextContext'](_0x4882c6)});}['_initAriaMarkerChangeAnnouncements'](){const _0x2f5d99=this['editor'];_0xb7f08d(_0x2f5d99['model'],({left:_0x1a865c,entered:_0x21fa05})=>{for(const _0x537d13 of _0x1a865c)if(Dt(_0x537d13)){_0x2f5d99['ui']['ariaLiveAnnouncer']['announce'](vt(_0x2f5d99['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x220975 of _0x21fa05)if(Dt(_0x220975)){_0x2f5d99['ui']['ariaLiveAnnouncer']['announce'](vt(_0x2f5d99['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x23bd78(_0x130533)));break;}});}}function Vt(_0x4662bd,_0x464bfd){return _0x464bfd?_0x4662bd+':'+_0x464bfd:_0x4662bd;}function Lt(_0x3b7f2d,_0x527636){const _0xaa7d48=_0x527636['schema'],_0x3b31b5=_0x527636['createRange'](_0x3b7f2d['start']);for(const _0x585c5f of _0x3b7f2d['getWalker']()){const {type:_0x4fddac,item:_0x30a782,nextPosition:_0x15f533}=_0x585c5f;if('text'===_0x4fddac||_0xaa7d48['isObject'](_0x30a782)){const _0x34687e=_0x527636['createPositionBefore'](_0x30a782);_0x3b31b5['isCollapsed']&&(_0x3b31b5['start']=_0x34687e),_0x3b31b5['end']=_0x15f533;}}return _0x3b31b5;}function Dt(_0x533acd){return'comment'===Pt(_0x533acd['name'])['group'];}class CommentsUI extends _0x4e3a6a{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsRepository,CommentsEditing,EditorAnnotations,Annotations];}get['CommentsListView'](){return CommentsListView;}get['CommentThreadInputView'](){return CommentThreadInputView;}['init'](){const _0x385b57=this['editor'],_0x294c10=_0x385b57['plugins']['get'](CommentsRepository),_0x28cc2d=_0x385b57['plugins']['get'](CommentsEditing),_0x1473e6=_0x385b57['plugins']['get'](Annotations),_0x3a39da=_0x385b57['plugins']['get'](EditorAnnotations);_0x385b57['ui']['componentFactory']['add']('comment',()=>{const _0x410748=this['_createUIButton'](_0x1bde71);return _0x410748['tooltip']=!0x0,_0x410748;}),_0x385b57['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x3a39da['addSourceCollector'](()=>{const _0x412a4b=[];for(const [_0xd118f6,_0x1241df]of _0x294c10['_threadToController']){const _0x45e346=_0x28cc2d['getAllMarkersForId'](_0xd118f6['id']),_0xd0921b=_0x45e346['map'](_0x3dbed2=>_0x3dbed2['getRange']());_0x45e346['length']>0x0&&_0x412a4b['push']([_0x1241df['view'],_0xd0921b]);}return _0x412a4b;}),this['listenTo'](_0x1473e6,'change:activeAnnotations',(_0x368f5a,_0x3b8409,_0x57220a)=>{const _0x5b0d88=Array['from'](_0x57220a)['map'](_0x4c8462=>_0x4c8462['innerView'])['find'](_0x3c5488=>_0x294c10['_viewToController']['has'](_0x3c5488));if(!_0x5b0d88)return void(_0x28cc2d['activeMarker']=null);const _0x49712e=_0x294c10['_viewToController']['get'](_0x5b0d88)['model']['id'],_0x6f3e97='comment:'+_0x49712e;_0x49712e&&_0x28cc2d['hasMarkerForId'](_0x49712e)?_0x28cc2d['activeMarker']=_0x6f3e97:_0x28cc2d['activeMarker']&&(_0x28cc2d['activeMarker']=null);}),this['listenTo'](_0x294c10,'removeCommentThread',(_0x3df038,{threadId:_0x118d14,isFromAdapter:_0x5c1fdd})=>{!_0x5c1fdd&&_0x385b57['ui']['focusTracker']['isFocused']&&_0x28cc2d['hasMarkerForId'](_0x118d14)&&_0x385b57['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x294c10,'addComment',(_0x9de3a4,{threadId:_0x5e321b,isFromAdapter:_0x3c3ba9})=>{if(_0x3c3ba9||!_0x28cc2d['hasMarkerForId'](_0x5e321b)||!_0x294c10['hasCommentThread'](_0x5e321b))return;0x1===_0x294c10['getCommentThread'](_0x5e321b)['length']&&(_0x385b57['editing']['view']['focus'](),_0x9de3a4['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1117f1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x275db8;for(const _0x3e7c5a in _0x1117f1){const _0x33b15c=_0x3e7c5a,_0x4e3570=_0x1117f1[_0x33b15c];if('commentsLicenseKeyValid'==_0x4e3570||'commentsLicenseKeyInvalid'==_0x4e3570||'commentsLicenseKeyExpired'==_0x4e3570||'commentsLicenseKeyDomainLimit'==_0x4e3570||'commentsLicenseKeyNotAllowed'==_0x4e3570||'commentsLicenseKeyEvaluationLimit'==_0x4e3570||'commentsLicenseKeyUsageLimit'==_0x4e3570){delete _0x1117f1[_0x33b15c],_0x275db8=_0x4e3570,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x275db8&&_0x1117f1['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x275db8&&_0x1117f1['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x275db8&&_0x1117f1['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x275db8&&_0x1117f1['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x275db8&&_0x1117f1['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x275db8&&_0x1117f1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2237bd){const _0x53f3e1=this['editor'],_0x14cfc5=new _0x2237bd(_0x53f3e1['locale']),_0x3d466b=_0x53f3e1['commands']['get']('addCommentThread');return _0x14cfc5['set']({'label':vt(_0x53f3e1['locale'],'Comment'),'icon':_0x15a2cf}),_0x14cfc5['bind']('isEnabled')['to'](_0x3d466b,'isEnabled',_0x3d466b,'hasContent',(_0x548cf5,_0x14d2a2)=>_0x548cf5&&_0x14d2a2),this['listenTo'](_0x14cfc5,'execute',()=>{_0x3d466b['execute']();}),_0x14cfc5;}}class CommentsOnly extends _0x4e3a6a{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsEditing];}constructor(_0x517dda){super(_0x517dda),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x15c4ac,_0x480d8d,_0x2a1d32)=>{_0x2a1d32?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1185f8,_0x4e853e]of this['editor']['commands'])_0x4e853e['affectsData']&&'addCommentThread'!==_0x1185f8&&_0x4e853e['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 _0xde158b=this['editor']['editing']['view']['document'];this['listenTo'](_0xde158b,'cut',_0x539f72=>_0x539f72['stop'](),{'priority':'highest'}),this['listenTo'](_0xde158b,'clipboardInput',_0x4b960d=>_0x4b960d['stop'](),{'priority':'highest'}),this['listenTo'](_0xde158b,'delete',_0x3d183f=>_0x3d183f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3a59c6,_0x2bc5cc]of this['editor']['commands'])_0x2bc5cc['affectsData']&&'addCommentThread'!==_0x3a59c6&&_0x2bc5cc['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class AnnotationsUIs extends _0x283925{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[Annotations];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x186d50){super(_0x186d50),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x26d5eb=this['context']['plugins']['get'](Annotations);this['listenTo'](_0x26d5eb,'_activateAnnotation',(_0x521fa5,_0x187a7a)=>{for(const _0x39f178 of this['activeUIs']){const _0x41953b=this['_uis']['get'](_0x39f178);(0x0,this['uisData']['get'](_0x39f178)['filter'])(_0x187a7a)&&_0x41953b['setActiveAnnotation'](_0x187a7a);}}),this['listenTo'](_0x26d5eb,'_deactivateAllAnnotations',()=>{for(const _0x237bd9 of this['activeUIs']){this['_uis']['get'](_0x237bd9)['setActiveAnnotation'](null);}}),this['listenTo'](_0x26d5eb['_visibleAnnotations'],'add',(_0x524c48,_0x4f6935)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4f6935);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3fc478){return this['activeUIs']['has'](_0x3fc478);}['activate'](_0x58e486,_0xb78472=this['defaultFilter']){const _0x4c340b=this['context']['plugins']['get'](Annotations);if(!this['_uis']['has'](_0x58e486))throw new _0x21ce1d('annotationsuis-missing-ui',this,{'uiName':_0x58e486});this['isActive'](_0x58e486)&&this['deactivate'](_0x58e486),this['activeUIs']['add'](_0x58e486);const _0x318ce1=new AnnotationCollection();Ot({'source':_0x4c340b['_visibleAnnotations'],'target':_0x318ce1,'filter':_0xb78472}),this['uisData']['set'](_0x58e486,{'collection':_0x318ce1,'filter':_0xb78472});const _0x1474d7=this['_uis']['get'](_0x58e486);_0x1474d7['attach'](_0x318ce1),this['listenTo'](_0x1474d7,'change:activeAnnotation',(_0x502c0a,_0x141f66,_0x2a0fde,_0x1f8d78)=>{_0x1f8d78&&_0x4c340b['_removeActiveAnnotation'](_0x1f8d78),_0x2a0fde&&_0x4c340b['_addActiveAnnotation'](_0x2a0fde);});}['deactivate'](_0x51cd79){if(this['activeUIs']['delete'](_0x51cd79),!this['_uis']['has'](_0x51cd79))throw new _0x21ce1d('annotationsuis-missing-ui',this,{'uiName':_0x51cd79});const _0xc7ff57=this['_uis']['get'](_0x51cd79);_0xc7ff57['detach'](),this['stopListening'](_0xc7ff57),this['uisData']['get'](_0x51cd79)['collection']['destroy'](),this['uisData']['delete'](_0x51cd79);}['switchTo'](_0x209397){if(!this['_uis']['has'](_0x209397))throw new _0x21ce1d('annotationsuis-missing-ui',this,{'uiName':_0x209397});const _0x57a221=this['context']['plugins']['get'](Annotations),_0x498b82=Array['from'](_0x57a221['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x209397);const _0x9133c0=this['_uis']['get'](_0x209397);_0x9133c0['setActiveAnnotation'](_0x498b82),_0x9133c0['_setSelectedAnnotations']&&_0x498b82&&_0x9133c0['_setSelectedAnnotations']([_0x498b82]);}['deactivateAll'](){for(const _0xf39372 of this['activeUIs'])this['deactivate'](_0xf39372);}['register'](_0x32fe89,_0x43af6d){if(this['_uis']['has'](_0x32fe89))throw new _0x21ce1d('annotationsuis-register-already-registered');if('function'!=typeof _0x43af6d['attach']||'function'!=typeof _0x43af6d['detach']||'function'!=typeof _0x43af6d['setActiveAnnotation'])throw new _0x21ce1d('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x32fe89,_0x43af6d);}['refilterAnnotations'](){const _0x5b7c1d=this['context']['plugins']['get'](Annotations)['collection'],_0xcd0a15=new Map(),_0x58f2dc=Array['from'](this['activeUIs']);for(const _0x2a5d51 of this['activeUIs']){const _0x21751b=this['uisData']['get'](_0x2a5d51)['collection'];for(const _0x5116cf of _0x21751b)_0xcd0a15['set'](_0x5116cf,_0x2a5d51);}for(const _0x1b5f19 of _0x5b7c1d){const _0x3ab6e4=_0xcd0a15['get'](_0x1b5f19);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1b5f19);const _0x4e3a39=_0x58f2dc['find'](_0x5e8205=>this['uisData']['get'](_0x5e8205)['filter'](_0x1b5f19));_0x3ab6e4!==_0x4e3a39&&(_0x3ab6e4&&this['uisData']['get'](_0x3ab6e4)['collection']['remove'](_0x1b5f19),_0x4e3a39&&this['uisData']['get'](_0x4e3a39)['collection']['add'](_0x1b5f19));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x413438){const _0x2e821c=[];for(const _0x3c6648 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3c6648)['filter'])(_0x413438)&&_0x2e821c['push'](_0x3c6648);}if(_0x2e821c['length']>0x1)throw new _0x21ce1d('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2e821c,'annotationType':_0x413438['type']});}}const Bt=/* #__PURE__ -- @preserve */
32
+ _0x2746e8('px');class AnnotationsSidebarView extends _0x4e8972{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5682e7){super(_0x5682e7);const _0x2dd88d=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 _0x252bbd(),this['focusCycler']=new _0x10e0b({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2dd88d['to']('class')],'style':{'minHeight':_0x2dd88d['to']('minHeight',_0x3250b8=>'number'==typeof _0x3250b8?Bt(_0x3250b8+0xa):null)},'dir':_0x5682e7['uiLanguageDirection'],'role':'application','aria-label':vt(_0x5682e7,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':vt(_0x5682e7,'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',_0x26e916=>{this['_updateItemPositionInFocusables'](_0x26e916['source']);}),this['list']['forEach'](_0xe94338=>{this['focusTracker']['add'](_0xe94338['element']),this['_updateItemPositionInFocusables'](_0xe94338);}),this['list']['on']('change',(_0x5475ed,_0x2620da)=>{for(const _0x5bd21f of _0x2620da['removed'])this['focusTracker']['remove'](_0x5bd21f['element']),this['focusables']['remove'](_0x5bd21f);for(const _0x4acd55 of _0x2620da['added'])this['focusTracker']['add'](_0x4acd55['element']),this['_updateItemPositionInFocusables'](_0x4acd55);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x287999){const _0xe5b88a=this['focusables']['getIndex'](_0x287999);let _0x758d73,_0x2b7ea6;for(const _0x50cf29 of this['focusables'])if(_0x287999['top']<_0x50cf29['top']){_0x758d73=_0x50cf29;break;}if(_0x2b7ea6=_0x758d73?this['focusables']['getIndex'](_0x758d73):this['focusables']['length'],-0x1!==_0xe5b88a){if(_0xe5b88a===_0x2b7ea6-0x1)return;this['focusables']['remove'](_0x287999),_0x2b7ea6=_0x758d73?this['focusables']['getIndex'](_0x758d73):this['focusables']['length'];}this['focusables']['add'](_0x287999,_0x2b7ea6);}}const Ht=/* #__PURE__ -- @preserve */
33
+ _0x2746e8('px');class AnnotationsSidebarItemView extends _0x4e8972{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x545e21){super(_0x545e21),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4b7ed7,_0x5b6d26)=>_0x4b7ed7+_0x5b6d26),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Nt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4cafae=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4cafae['to']('isAnimationDisabled',_0x248a30=>_0x248a30?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4cafae['to']('top',_0x18ac19=>Ht(_0x18ac19))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x53d30c=this['element']['clientHeight'];_0x53d30c&&(this['height']=_0x53d30c);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Sidebar extends _0x283925{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b19db){super(_0x2b19db),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 _0x219688=this['context']['config']['get']('sidebar.container');_0x219688&&this['setContainer'](_0x219688);}['setContainer'](_0x453b3e){if(!Ft(_0x453b3e))throw new _0x21ce1d('sidebar-setcontainer-invalid-element');this['container']=_0x453b3e;}['_attachToContainer']({viewClass:_0x397de6='',spaceBetweenItems:_0x489e30=0x19}={}){if(!Ft(this['container']))throw new _0x21ce1d('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x397de6,this['_spaceBetweenItems']=_0x489e30;}['rearrange']({removedAnnotation:_0x5374c5,previousAnnotation:_0x39c917,nextAnnotation:_0x27fae8}){const _0x34a20f=this['getSidebarItemView'](_0x5374c5);this['view']['list']['remove'](_0x34a20f),this['_destroySidebarItemView'](_0x5374c5),_0x39c917&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x39c917)),_0x27fae8&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x27fae8)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3a5efb,activatedAnnotation:_0x31a971,disableAnimationOnActivatedAnnotation:_0x47cf80}){if(this['_activeAnnotation']=_0x31a971,_0x3a5efb){_0x3a5efb['isActive']=!0x1;const _0x56af56=this['getSidebarItemView'](_0x3a5efb);_0x56af56&&_0x47cf80&&(_0x56af56['isAnimationDisabled']=!0x1);}if(_0x31a971){const _0x32c6e5=this['getSidebarItemView'](_0x31a971);_0x32c6e5&&(_0x31a971['isActive']=!0x0,_0x47cf80&&(_0x32c6e5['isAnimationDisabled']=!0x0,_0x32c6e5['top']+=0x1),this['_alignToTargetRect'](_0x32c6e5));}}['_detachFromContainer'](_0xb319d3){if(this['view']['element']['remove'](),_0xb319d3){for(const _0x1094f5 of _0xb319d3)this['_destroySidebarItemView'](_0x1094f5);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x4293d8,_0x436c78){_0x436c78||(_0x436c78=_0x4293d8['view']);const _0x437b38=new AnnotationsSidebarItemView(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x437b38,_0x4293d8),this['_annotationToSidebarItemView']['set'](_0x4293d8,_0x437b38),_0x437b38['content']['add'](_0x436c78),this['listenTo'](_0x4293d8['view'],'change:targetRect',(_0x2aac0f,_0x4126b5,_0x17e1f8)=>{const _0x4cd0f7=this['_getTargetTop'](_0x4293d8,_0x17e1f8);_0x437b38['_targetTop']!=_0x4cd0f7&&(_0x437b38['_targetTop']=_0x4cd0f7,this['_setItemTop'](_0x437b38,_0x4cd0f7));}),this['listenTo'](_0x437b38,'change:top',()=>{this['_recalculate'](_0x437b38,'top');}),this['listenTo'](_0x437b38,'change:bottom',()=>{this['_recalculate'](_0x437b38,'bottom');}),this['_alignToTargetRect'](_0x437b38);const _0x4bbf1a=this['_getItemBefore'](_0x437b38);if(_0x4bbf1a)this['_alignAfterItem'](_0x4bbf1a,_0x437b38)||this['_alignToTargetRect'](_0x437b38);else this['_alignToTargetRect'](_0x437b38);return this['_updateLastItem'](),this['view']['list']['add'](_0x437b38),_0x437b38;}['_alignForTopChange'](_0x33136e){if(!_0x33136e['content']['length'])return;const _0x8e2903=this['_getItemBefore'](_0x33136e);if(!_0x8e2903)return;const _0x4a72fa=this['_sidebarItemViewToAnnotation']['get'](_0x8e2903),_0x3f21c1=this['_activeAnnotation'];_0x3f21c1&&_0x3f21c1===_0x4a72fa?this['_alignAfterItem'](_0x8e2903,_0x33136e):this['_alignBeforeItem'](_0x33136e,_0x8e2903);}['_alignForBottomChange'](_0x2b271e){if(!_0x2b271e['content']['length'])return;const _0x1c5a05=this['_getItemAfter'](_0x2b271e);if(!_0x1c5a05)return;const _0x29bffc=this['_sidebarItemViewToAnnotation']['get'](_0x1c5a05),_0xf374a5=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2d397b=this['_activeAnnotation'];_0x2d397b&&_0x2d397b===_0x29bffc&&_0xf374a5?(this['_alignBeforeItem'](_0x1c5a05,_0x2b271e),this['_alignAfterItem'](_0x2b271e,_0x1c5a05)):_0x2d397b&&_0x2d397b===_0x29bffc?this['_alignBeforeItem'](_0x1c5a05,_0x2b271e):this['_alignAfterItem'](_0x2b271e,_0x1c5a05);}['_recalculate'](_0x2412ca,_0x3b2d98){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x8af405,changedProp:_0x3a2ca3}of this['_recalculateBuffer'])'top'===_0x3a2ca3?this['_alignForTopChange'](_0x8af405):this['_alignForBottomChange'](_0x8af405);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2412ca,'changedProp':_0x3b2d98});}['getSidebarItemView'](_0x268cac){return this['_annotationToSidebarItemView']['get'](_0x268cac);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3dd218){const _0x59d71b=this['getSidebarItemView'](_0x3dd218);this['stopListening'](_0x59d71b),this['stopListening'](_0x3dd218['view']),_0x59d71b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3dd218),this['_sidebarItemViewToAnnotation']['delete'](_0x59d71b);}['_createSidebarView'](){const _0x10e177=new AnnotationsSidebarView(this['context']['locale']);return _0x10e177['render'](),this['on']('change:_lastItem',(_0x39e4f9,_0x258920,_0xf4f5bb,_0x334cc6)=>{_0x334cc6&&_0x10e177['unbind']('minHeight'),_0xf4f5bb?_0x10e177['bind']('minHeight')['to'](_0xf4f5bb,'bottom'):_0x10e177['minHeight']=null;}),_0x10e177;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2def78){const _0x196df2=this['_sidebarItemViewToAnnotation']['get'](_0x2def78),_0x3a2585=_0x196df2&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x196df2)-0x1);return _0x3a2585&&this['getSidebarItemView'](_0x3a2585)||null;}['_getItemAfter'](_0x3c658a){const _0x587d24=this['_sidebarItemViewToAnnotation']['get'](_0x3c658a),_0x24d9ec=_0x587d24&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x587d24)+0x1);return _0x24d9ec&&this['getSidebarItemView'](_0x24d9ec)||null;}['_alignBeforeItem'](_0x3bb2c7,_0x499576){_0x3bb2c7['updateHeight']();const _0xa6e2ce=Ut(_0x499576['bottom']+this['_spaceBetweenItems'],_0x3bb2c7['top']);return!!_0xa6e2ce&&(this['_setItemTop'](_0x499576,_0x499576['top']-_0xa6e2ce),!0x0);}['_alignAfterItem'](_0x55ccaa,_0x3567cb){_0x55ccaa['updateHeight']();const _0x22fbbe=Ut(_0x55ccaa['bottom']+this['_spaceBetweenItems'],_0x3567cb['top']);return!!_0x22fbbe&&(this['_setItemTop'](_0x3567cb,_0x3567cb['top']+_0x22fbbe,!0x1),!0x0);}['_alignToTargetRect'](_0x357dcf){const _0x571abb=this['_sidebarItemViewToAnnotation']['get'](_0x357dcf);if(!_0x571abb||!_0x571abb['target']||!_0x571abb['targetRect'])return;const _0x1b3a82=this['_getTargetTop'](_0x571abb,_0x571abb['targetRect']);this['_setItemTop'](_0x357dcf,_0x1b3a82);}['_getTargetTop'](_0x4c9a62,_0xedcefc){if(null===_0xedcefc)return 0x0;if(_0x4c9a62['target']instanceof _0x416d7d)return _0xedcefc['top'];{const _0x52c54a=new _0x416d7d(this['view']['element'])['top'];return _0xedcefc['top']-_0x52c54a;}}['_setItemTop'](_0x5c85bb,_0x3d847f,_0x3b0770=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x3b0770&&(_0x3d847f=Math['max'](_0x3d847f,this['_getMaxAvailableTop'](_0x5c85bb))),_0x5c85bb['top']=_0x3d847f;}['_getMaxAvailableTop'](_0x1192ee){let _0x275a84=this['_getItemBefore'](_0x1192ee),_0x3f78a4=0x0;for(;_0x275a84;)_0x275a84['updateHeight'](),_0x3f78a4+=this['_spaceBetweenItems']+_0x275a84['height'],_0x275a84=this['_getItemBefore'](_0x275a84);return _0x3f78a4;}}function Ut(_0x12b49d,_0x4601c5){return Math['max'](_0x12b49d-_0x4601c5,0x0);}function Ft(_0x642f51){return null!==_0x642f51&&'object'==typeof _0x642f51&&0x1===_0x642f51['nodeType'];}class WideSidebar extends _0x283925{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Sidebar,AnnotationsUIs];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x978f5b){super(_0x978f5b),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x499a27(),this['_refreshPositioningDebounced']=_0x4aa75f(()=>{_0x978f5b['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x56bc8f=this['context']['plugins']['get'](AnnotationsUIs),_0x1874da=this['context']['plugins']['get'](Sidebar);_0x56bc8f['register']('wideSidebar',this),_0x1874da['container']&&_0x56bc8f['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x209ec4){if(_0x209ec4===this['activeAnnotation'])return;const _0x2bbf03=this['context']['plugins']['get'](Sidebar);_0x2bbf03['_activeAnnotation']=_0x209ec4;const _0x3d09d0=this['activeAnnotation'];_0x2bbf03['refresh']({'blurredAnnotation':_0x3d09d0,'activatedAnnotation':_0x209ec4}),this['activeAnnotation']=_0x209ec4;}['attach'](_0x560120){this['annotations']=_0x560120;const _0x55ee83=this['context']['plugins']['get'](Sidebar);if(_0x55ee83['_annotations']=_0x560120,this['isAttached'])throw new _0x21ce1d('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x55ee83,'set:container',()=>{this['detach'](),this['listenTo'](_0x55ee83,'change:container',_0x3bd429=>{_0x3bd429['off'](),this['attach'](_0x560120);});}),_0x55ee83['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4ddc55=_0x25d702=>{_0x25d702['updateTargetRect'](),_0x55ee83['addAnnotation'](_0x25d702);};for(const _0x5003f9 of _0x560120)_0x4ddc55(_0x5003f9);this['listenTo'](_0x560120,'add',(_0x3ef16f,_0x427100)=>{_0x4ddc55(_0x427100);}),this['listenTo'](_0x560120,'remove',(_0x364b97,_0xba62d0,_0x11582c)=>{_0x55ee83['rearrange']({'removedAnnotation':_0xba62d0,'previousAnnotation':_0x560120['get'](_0x11582c-0x1),'nextAnnotation':_0x560120['get'](_0x11582c+0x1)}),_0xba62d0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x560120,'focus',(_0x46e3bb,_0x3fc16f)=>{this['setActiveAnnotation'](_0x3fc16f);}),this['listenTo'](_0x560120,'blur',()=>{this['setActiveAnnotation'](null);});const _0xed9fc3=this['context']instanceof _0x353685?this['context']['editors']:new _0x499a27([this['context']]);for(const _0x314032 of _0xed9fc3)this['_integrateWithEditorAnnotations'](_0x314032);this['listenTo'](_0xed9fc3,'add',(_0x5d2294,_0x35bfcf)=>{this['listenTo'](_0x35bfcf,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x35bfcf);});}),this['listenTo'](_0xed9fc3,'remove',(_0x45c1b5,_0x2e03b1)=>{_0x2e03b1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2e03b1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x21ce1d('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x318f31=this['context']['plugins']['get'](Sidebar);_0x318f31['_detachFromContainer'](this['annotations']),this['stopListening'](_0x318f31),this['stopListening'](this['annotations']),this['context']instanceof _0x353685&&this['stopListening'](this['context']['editors']);for(const _0xad547a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xad547a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x53c70e){if(!_0x53c70e['plugins']['has']('EditorAnnotations'))return;const _0x592ce7=_0x53c70e['plugins']['get']('EditorAnnotations'),_0x4ea467=()=>{const _0x22ac6e=_0x592ce7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x22ac6e[0x0]||null);};this['listenTo'](_0x592ce7,'refresh',_0x4ea467),this['listenTo'](_0x592ce7,'blur',(_0x5926b2,{isAnnotationTracked:_0x23d536})=>{this['activeAnnotation']&&_0x23d536(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x592ce7,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x17c3bb=>{_0x592ce7['hasDomSelection']()&&(_0x4ea467(),_0x17c3bb['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x592ce7);}['_destroyEditorAnnotationsIntegration'](_0x21d3be){this['stopListening'](_0x21d3be),this['_editorAnnotations']['remove'](_0x21d3be);}}class AnnotationCounterButtonView extends _0x1bde71{['counterView'];constructor(_0x1e60ef){super(_0x1e60ef);const _0x5cad9b=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x195b81,_0x22a56c)=>_0x195b81?'...':_0x22a56c['toString']()),this['set']('annotationType',''),this['icon']=_0x15a2cf,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0x4e8972(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5cad9b['to']('annotationType',_0xe97998=>'ck-annotation-counter__badge--'+_0xe97998),_0x5cad9b['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5cad9b['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class NarrowSidebar extends _0x283925{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Sidebar,AnnotationsUIs];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d5fd1){super(_0x5d5fd1),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1f5773())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x499a27(),this['_refreshPositioningDebounced']=_0x4aa75f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](AnnotationsUIs)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x10fae3){this['annotations']=_0x10fae3;const _0x5301f9=this['context']['plugins']['get'](Sidebar),_0x1bb9a4=this['balloonPanelView'];if(_0x5301f9['_annotations']=_0x10fae3,this['isAttached'])throw new _0x21ce1d('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5301f9,'set:container',()=>{this['detach'](),this['listenTo'](_0x5301f9,'change:container',_0x563e72=>{_0x563e72['off'](),this['attach'](_0x10fae3);});}),_0x5301f9['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1e86ba=_0x4a94f7=>{const _0x205e65=new AnnotationCounterButtonView(this['context']['locale']);_0x5301f9['addAnnotation'](_0x4a94f7,_0x205e65),this['_annotationToNarrowView']['set'](_0x4a94f7,_0x205e65),_0x205e65['bind']('isDirty','annotationType','number')['to'](_0x4a94f7['view'],'isDirty','type','length'),_0x205e65['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1bb9a4['content']['first']!==_0x4a94f7['view']?(this['_showBalloon'](_0x4a94f7),_0x4a94f7['view']['element']['focus'](),this['setActiveAnnotation'](_0x4a94f7)):this['setActiveAnnotation'](null);});};for(const _0x37c31e of _0x10fae3)_0x1e86ba(_0x37c31e);this['listenTo'](_0x10fae3,'add',(_0x4cfa1a,_0x3b2473)=>{_0x1e86ba(_0x3b2473);}),this['listenTo'](_0x10fae3,'remove',(_0x517427,_0x450678,_0x1d6c44)=>{this['_annotationToNarrowView']['get'](_0x450678)['destroy'](),this['_annotationToNarrowView']['delete'](_0x450678),_0x5301f9['rearrange']({'removedAnnotation':_0x450678,'previousAnnotation':_0x10fae3['get'](_0x1d6c44-0x1),'nextAnnotation':_0x10fae3['get'](_0x1d6c44+0x1)}),_0x450678===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x10fae3,'focus',(_0x5db1be,_0x52fa40)=>{this['setActiveAnnotation'](_0x52fa40);}),this['listenTo'](_0x10fae3,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x17faa8,_0x4b6604)=>{_0x4b6604['keyCode']===_0x4350d7['esc']&&_0x1bb9a4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1bb9a4['content']['first']),this['_hideBalloon'](),_0x4b6604['stopPropagation'](),_0x4b6604['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5ec4c2,_0x3e2af1)=>{const _0x12140d=_0x3e2af1['target'];_0x1bb9a4['isVisible']&&_0x1bb9a4['element']['contains'](_0x12140d)||_0x5301f9['view']['element']['contains'](_0x12140d)||_0x5ec4c2['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x498271=>_0x498271['contains'](_0x12140d))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x4750c9=this['context']instanceof _0x353685?this['context']['editors']:new _0x499a27([this['context']]);for(const _0x576952 of _0x4750c9)this['_integrateWithEditorAnnotations'](_0x576952);this['listenTo'](_0x4750c9,'add',(_0x2b7aa8,_0xba7550)=>{this['listenTo'](_0xba7550,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xba7550);});}),this['listenTo'](_0x4750c9,'remove',(_0x13beaa,_0x212a13)=>{_0x212a13['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x212a13['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x11cd1f){if(_0x11cd1f===this['activeAnnotation'])return;const _0xacc491=this['context']['plugins']['get'](Sidebar);if(_0xacc491['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x11cd1f,'disableAnimationOnActivatedAnnotation':!0x0}),_0x11cd1f)_0xacc491['getSidebarItemView'](_0x11cd1f)?this['_showBalloon'](_0x11cd1f):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x11cd1f;}['detach'](){if(!this['isAttached'])throw new _0x21ce1d('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x427103=this['context']['plugins']['get'](Sidebar);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3cf1fc=>_0x3cf1fc['destroy']()),this['_annotationToNarrowView']['clear'](),_0x427103['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x353685&&this['stopListening'](this['context']['editors']);for(const _0x5a599c of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5a599c);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'](_0x1967fc){if(!_0x1967fc['plugins']['has']('EditorAnnotations'))return;const _0x2faf70=_0x1967fc['plugins']['get']('EditorAnnotations'),_0x3c59df=this['context']['plugins']['get'](Sidebar),_0x1282a1=this['annotations'],_0x166094=this['balloonPanelView'],_0x3ea66f=()=>{const _0x2eb508=_0x2faf70['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2eb508),this['setActiveAnnotation'](_0x2eb508[0x0]||null);};this['listenTo'](_0x2faf70,'refresh',_0x3ea66f),this['listenTo'](_0x2faf70,'blur',(_0x4197d4,{isAnnotationTracked:_0x50f254})=>{this['activeAnnotation']&&_0x50f254(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2faf70,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1282a1,'blur',_0x5942b3=>{_0x2faf70['hasDomSelection']()&&_0x5942b3['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3be0e9,_0x27ff6c)=>{const _0x342b34=_0x27ff6c['target'];_0x166094['isVisible']&&_0x166094['element']['contains'](_0x342b34)||_0x3c59df['view']['element']['contains'](_0x342b34)||this['activeAnnotation']&&_0x2faf70['hasDomSelection']()&&(_0x3ea66f(),_0x3be0e9['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2faf70);}['_destroyEditorAnnotationsIntegration'](_0x4955f1){_0x4955f1&&(this['stopListening'](_0x4955f1),this['_editorAnnotations']['remove'](_0x4955f1));}['_setSelectedAnnotations'](_0xe02ac){for(const _0xe3db4f of this['_selectedAnnotations'])_0xe02ac['includes'](_0xe3db4f)||this['_manuallyClosedAnnotationViews']['delete'](_0xe3db4f['view']);this['_selectedAnnotations']=_0xe02ac;}['_refreshPositioning'](){const _0x45b70d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x45b70d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3e8d38){if(this['_manuallyClosedAnnotationViews']['has'](_0x3e8d38['view']))return;const _0x4a8e27=this['balloonPanelView']['content']['first'];_0x4a8e27!==_0x3e8d38['view']?(_0x4a8e27&&this['_detachListeners'](_0x4a8e27),this['_attachListeners'](_0x3e8d38['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3e8d38['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3e3bbf=this['balloonPanelView']['content']['first'],_0x2ac4e3=_0x3e3bbf&&this['annotations']['getByView'](_0x3e3bbf);if(!_0x2ac4e3||!this['_annotationToNarrowView']['has'](_0x2ac4e3))return;const _0x1ddb8f=this['_annotationToNarrowView']['get'](_0x2ac4e3)['element'],_0x435da2=(function(){const _0x496b43=ht['defaultPositions'];return[_0x496b43['southArrowNorthEast'],_0x496b43['northArrowSouthEast'],_0x496b43['southArrowNorth'],_0x496b43['northArrowSouth'],_0x496b43['southArrowNorthWest'],_0x496b43['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1ddb8f,'positions':_0x435da2});}['_hideBalloon'](){const _0x2299fd=this['balloonPanelView'],_0x2dc201=_0x2299fd['content']['first'];_0x2dc201&&(this['_detachListeners'](_0x2dc201),_0x2299fd['unpin'](),_0x2299fd['content']['clear']());}['_attachListeners'](_0x106e15){this['listenTo'](_0x106e15,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x106e15,'Esc',(_0x34c175,_0x59deca)=>{this['_manuallyClosedAnnotationViews']['add'](_0x106e15),this['_hideBalloon'](),_0x59deca();});}['_detachListeners'](_0x152a81){this['stopListening'](_0x152a81);}}class InlineAnnotations extends _0x4e3a6a{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[EditorAnnotations,at,AnnotationsUIs];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x566443){super(_0x566443),_0x566443['editing']['view']['addObserver'](ut),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x566443['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x4aa75f(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x4417df=this['editor']['plugins']['get'](AnnotationsUIs);_0x4417df['context']===this['editor']&&(_0x4417df['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x22ad60,_0x2db378)=>{const _0x27bbe8=this['_balloon'];if(this['isAttached']&&_0x27bbe8['visibleView']){const _0x1a6dfe=this['annotations']['getByView'](_0x27bbe8['visibleView']);_0x1a6dfe&&this['_closeAnnotation'](_0x1a6dfe),_0x2db378();}}));}['afterInit'](){const _0x308f5c=this['editor']['plugins']['get'](AnnotationsUIs);_0x308f5c['context']===this['editor']&&(_0x308f5c['hasActive']()||_0x308f5c['switchTo']('inline'));}['setActiveAnnotation'](_0x3c29b8){_0x3c29b8!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3c29b8&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3c29b8)&&this['_addAnnotationToBalloon'](_0x3c29b8,!0x0),_0x3c29b8['isActive']=!0x0),_0x3c29b8||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3c29b8);}['attach'](_0x595f0b){this['annotations']=_0x595f0b;const _0x408ecf=this['editor']['plugins']['get'](AnnotationsUIs),_0xaccf7=this['_balloon'];if(this['isAttached'])throw new _0x21ce1d('inlineannotations-attach-already-attached',this);if(_0x408ecf['context']!==this['editor'])throw new _0x21ce1d('inlineannotations-not-allowed-with-context',this);const _0x24c796=this['editor']['plugins']['get'](EditorAnnotations);this['listenTo'](_0x24c796,'refresh',()=>{const _0x9bc794=_0x24c796['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4d591c,_0x47056d;!this['_forceRefresh']&&(_0x4d591c=_0x9bc794,_0x47056d=this['_selectedAnnotations'],_0x4d591c['length']===_0x47056d['length']&&_0x4d591c['every'](_0x1ebdaa=>_0x47056d['includes'](_0x1ebdaa)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x9bc794),this['setActiveAnnotation'](_0x9bc794[0x0]||null));}),this['listenTo'](_0x24c796,'blur',(_0x2da0ab,{isAnnotationTracked:_0x462db5})=>{this['activeAnnotation']&&_0x462db5(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x24c796,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x55ad8b,_0xdd504a,_0x5e4c03)=>{_0x5e4c03||this['setActiveAnnotation'](null);}),this['listenTo'](_0x595f0b,'remove',(_0x14d677,_0x1415a9)=>{this['_removeAnnotationFromBalloon'](_0x1415a9),_0x1415a9===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xaccf7,'change:visibleView',(_0x8de4fd,_0x34cd88,_0x5d91bb,_0x638f9b)=>{_0x638f9b&&this['stopListening'](_0x638f9b);const _0x587bb8=_0x595f0b['getByView'](_0x5d91bb);_0x5d91bb&&_0x587bb8&&(this['listenTo'](_0x5d91bb,'change:height',()=>{_0xaccf7['updatePosition']();}),this['listenTo'](_0x5d91bb,'Esc',()=>{this['_closeAnnotation'](_0x587bb8),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x587bb8&&this['setActiveAnnotation'](_0x587bb8));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xaccf7['visibleView']&&(_0x595f0b['getByView'](_0xaccf7['visibleView'])&&_0xaccf7['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 _0x21ce1d('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x7d7b5a of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x7d7b5a);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x63dbd5){for(const _0x2844c8 of this['_selectedAnnotations'])_0x63dbd5['includes'](_0x2844c8)||this['_manuallyClosed']['delete'](_0x2844c8);for(const _0x352814 of this['annotations'])_0x63dbd5['includes'](_0x352814)||this['_removeAnnotationFromBalloon'](_0x352814);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3741ca of _0x63dbd5)this['_addAnnotationToBalloon'](_0x3741ca);}this['_selectedAnnotations']=_0x63dbd5;}['_addAnnotationToBalloon'](_0x4f371d,_0x3b70a0=!0x1){this['_manuallyClosed']['has'](_0x4f371d)||(this['_addedAnnotations']['has'](_0x4f371d)||this['_balloon']['hasView'](_0x4f371d['view'])||(this['_addedAnnotations']['add'](_0x4f371d),this['_balloon']['add']({'stackId':_0x4f371d['view']['id'],'view':_0x4f371d['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4f371d)}})),_0x3b70a0&&this['_balloon']['showStack'](_0x4f371d['view']['id']));}['_getBalloonTargetForAnnotation'](_0xe37d84){const _0x4e9d71=_0xe37d84['target'],_0x188125=this['editor']['editing']['view'],_0x3f0d09=_0x188125['document']['selection']['getFirstRange'](),_0x2f7d68=_0x188125['domConverter']['viewRangeToDom'](_0x3f0d09);if(_0x2f7d68['collapse'](!0x0),_0x4e9d71){if(_0x4e9d71 instanceof _0x416d7d)return _0x4e9d71;let _0x2c397f=[];for(const _0x325413 of _0x4e9d71)_0x2c397f['push'](..._0x416d7d['getDomElementRects'](_0x325413));_0x2c397f=function(_0x3c26da){const _0x22a45f=[];let _0x222c1b=_0x3c26da[0x0];for(let _0x34e10a=0x1;_0x34e10a<_0x3c26da['length'];_0x34e10a++)if(Wt(_0x222c1b,_0x3c26da[_0x34e10a])){const _0x385cad=_0x3c26da[_0x34e10a]['width'];_0x222c1b['width']+=_0x385cad,_0x222c1b['right']+=_0x385cad;}else _0x22a45f['push'](_0x222c1b),_0x222c1b=_0x3c26da[_0x34e10a];return _0x22a45f['push'](_0x222c1b),_0x22a45f;}(_0x2c397f);const _0x3af51b=_0x2f7d68['getBoundingClientRect']();return _0x2c397f['find'](_0x1715f7=>_0x1715f7['top']<=_0x3af51b['top']&&_0x1715f7['bottom']>=_0x3af51b['bottom']&&_0x1715f7['left']<=_0x3af51b['left']&&_0x1715f7['right']>=_0x3af51b['right'])||_0x2c397f[0x0];}return _0xe37d84['targetRect']||_0x2f7d68;}['_removeAnnotationFromBalloon'](_0x5b613e){this['_addedAnnotations']['has'](_0x5b613e)&&this['_balloon']['hasView'](_0x5b613e['view'])&&(this['_addedAnnotations']['delete'](_0x5b613e),this['_balloon']['remove'](_0x5b613e['view']));}['_closeAnnotation'](_0x13f5f3){this['_manuallyClosed']['add'](_0x13f5f3),this['_removeAnnotationFromBalloon'](_0x13f5f3);}}function Wt(_0x3a9105,_0x264d17){return _0x3a9105['top']===_0x264d17['top']&&_0x3a9105['bottom']===_0x264d17['bottom']&&_0x3a9105['right']===_0x264d17['left'];}class CommentsArchiveView extends _0x4e8972{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0xe5827,_0x54c3f5){super(_0xe5827),this['set']('isEmpty',!_0x54c3f5['length']),this['focusTracker']=new _0x252bbd(),this['_annotationViews']=_0x54c3f5,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x10e0b({'focusables':_0x54c3f5,'focusTracker':this['focusTracker']}),this['listenTo'](_0x54c3f5,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x54c3f5,'remove',(_0x10fbd1,_0x3a5487)=>{_0x3a5487['isActive']&&this['focus'](),_0x54c3f5['length']||(this['isEmpty']=!0x0);});const _0x4cd8c4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':vt(_0xe5827,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x54c3f5},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4cd8c4['if']('isEmpty','ck-hidden',_0x28bcec=>!_0x28bcec)]},'children':[{'text':vt(_0xe5827,'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 _0x46ed45 of this['_annotationViews'])this['focusTracker']['add'](_0x46ed45['element']);this['_annotationViews']['on']('change',(_0x4fb5d5,{added:_0x17b885,removed:_0x41f845})=>{for(const _0x5a1169 of _0x17b885)this['focusTracker']['add'](_0x5a1169['element']);for(const _0x3ad843 of _0x41f845)this['focusTracker']['remove'](_0x3ad843['element']);});}}class CommentsArchive extends _0x283925{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsRepository,Annotations];}constructor(_0x262ea2){super(_0x262ea2),this['archivedThreads']=new _0x499a27();}['init'](){const _0x1afc17=this['context'],_0x5858eb=_0x1afc17['plugins']['get'](CommentsRepository),_0x3adc33=_0x1afc17['plugins']['get'](Annotations);this['listenTo'](_0x5858eb,'addCommentThread',(_0x563fa0,{threadId:_0x59747f})=>{const _0x2159b3=_0x5858eb['getCommentThread'](_0x59747f);_0x2159b3['archivedAt']&&this['archivedThreads']['add'](_0x2159b3,this['_calculatePosition'](_0x2159b3['archivedAt'])),this['listenTo'](_0x2159b3,'change:archivedAt',(_0x35b0ca,_0x2c430d,_0x1110c2)=>{_0x1110c2?this['archivedThreads']['has'](_0x2159b3)||this['archivedThreads']['add'](_0x2159b3,this['_calculatePosition'](_0x2159b3['archivedAt'])):this['archivedThreads']['has'](_0x2159b3)&&this['archivedThreads']['remove'](_0x2159b3);});}),this['listenTo'](_0x5858eb,'removeCommentThread',(_0x1eadb9,{threadId:_0x46df38})=>{const _0x3f30ab=_0x5858eb['getCommentThread'](_0x46df38);this['stopListening'](_0x3f30ab),this['archivedThreads']['has'](_0x3f30ab)&&this['archivedThreads']['remove'](_0x3f30ab);},{'priority':'highest'}),this['listenTo'](_0x3adc33['collection'],'focus',(_0x5d52ca,_0x7ad2c6)=>{_0x7ad2c6['isVisible']||(_0x7ad2c6['isActive']=!0x0,_0x3adc33['activate'](_0x7ad2c6));});}['_calculatePosition'](_0x28c4d0){const _0x31dd1f=[...this['archivedThreads']]['findIndex'](_0x338b17=>_0x338b17['archivedAt']<_0x28c4d0);return _0x31dd1f>-0x1?_0x31dd1f:this['archivedThreads']['length'];}}class CommentsArchiveUI extends _0x4e3a6a{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsArchive,ct];}constructor(_0x2e8517){super(_0x2e8517),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4103c3=this['editor'],_0x3eafb1=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4103c3['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1bde71,!0x0)),_0x4103c3['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4b4b7b=this['_createCommentsArchiveButton'](ot);return _0x4b4b7b['set']({'role':'menuitemcheckbox'}),_0x4b4b7b;});const _0x26f540=_0x4103c3['plugins']['get'](CommentsArchive),_0x1bfa3d=_0x4103c3['plugins']['get']('Annotations'),_0xd80707=_0x4103c3['plugins']['get']('CommentsRepository');_0x26f540['archivedThreads']['forEach'](_0x30d5a7=>{this['_handleNewThread'](_0x30d5a7);}),this['listenTo'](_0x26f540['archivedThreads'],'add',(_0x1e6d10,_0x3c04c7)=>{this['_handleNewThread'](_0x3c04c7);}),this['listenTo'](_0x1bfa3d['collection'],'add',(_0x19b2a1,_0x25e98c)=>{const _0x28f93b=this['_pendingThreads']['find'](_0x5d58fb=>{const _0x20ce4b=_0xd80707['_threadToController']['get'](_0x5d58fb);return _0x20ce4b&&_0x25e98c['innerView']===_0x20ce4b['view'];});if(_0x28f93b){const _0x5eac2e=this['_calculatePosition'](_0x28f93b['archivedAt']);this['_addAnnotationToArchive'](_0x25e98c,_0x5eac2e),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x28f93b),0x1);}}),this['listenTo'](_0x26f540['archivedThreads'],'remove',(_0x53699e,_0x1aa500)=>{const _0x526850=_0x4103c3['config']['get']('collaboration.channelId');if(!_0x526850||_0x1aa500['channelId']===_0x526850){if(this['_pendingThreads']['includes'](_0x1aa500))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1aa500),0x1);else{const _0x58b6f3=_0xd80707['_threadToController']['get'](_0x1aa500),_0x403189=_0x1bfa3d['getByInnerView'](_0x58b6f3['view']);this['annotationViews']['remove'](_0x403189['view']),this['stopListening'](_0x403189),this['stopListening'](_0x403189['focusableElements']);}}}),this['listenTo'](_0x1bfa3d['collection'],'add',(_0x41ec4c,_0x13dbb7)=>{this['listenTo'](_0x13dbb7,'escape',_0x3eafb1);}),this['listenTo'](_0x1bfa3d['collection'],'remove',(_0x3d21a9,_0x1d9064)=>{this['stopListening'](_0x1d9064,'escape',_0x3eafb1);});}['_addAnnotationToArchive'](_0x7b1d4d,_0x13508e){this['listenTo'](_0x7b1d4d,'set:isVisible',_0x1e0122=>{_0x1e0122['return']=!0x1,_0x1e0122['stop']();}),this['annotationViews']['add'](_0x7b1d4d['view'],_0x13508e);}['_handleNewThread'](_0xc9a70){const _0x464194=this['editor']['plugins']['get']('CommentsRepository'),_0xe868c4=this['editor']['plugins']['get']('Annotations'),_0x3506a1=this['editor']['config']['get']('collaboration.channelId');if(!_0x3506a1||_0xc9a70['channelId']===_0x3506a1){const _0x4b1a26=_0x464194['_threadToController']['get'](_0xc9a70);if(!_0x4b1a26)return void this['_pendingThreads']['push'](_0xc9a70);const _0x383c08=this['_calculatePosition'](_0xc9a70['archivedAt']),_0x19f19f=_0xe868c4['getByInnerView'](_0x4b1a26['view']);_0x19f19f['isVisible']&&_0xe868c4['_visibleAnnotations']['remove'](_0x19f19f),this['_addAnnotationToArchive'](_0x19f19f,_0x383c08);}}['_calculatePosition'](_0x1d5880){const _0x188501=this['editor']['config']['get']('collaboration.channelId'),_0x232e51=[...this['editor']['plugins']['get'](CommentsArchive)['archivedThreads']]['filter'](_0x745ae6=>_0x745ae6['channelId']===_0x188501)['findIndex'](_0x331a24=>_0x331a24['archivedAt']<_0x1d5880);return _0x232e51<0x0||_0x232e51>this['annotationViews']['length']?this['annotationViews']['length']:_0x232e51-0x1;}['_toggleDialog'](){const _0x5f15ae=this['editor'],_0x47ebc9=_0x5f15ae['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new CommentsArchiveView(_0x5f15ae['locale'],this['annotationViews'])),'commentsArchive'===_0x47ebc9['id']?_0x47ebc9['hide']():_0x47ebc9['show']({'id':'commentsArchive','title':vt(_0x5f15ae['locale'],'COMMENTS_ARCHIVE'),'icon':_0x56a931,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x8ec7c3,_0x2bd7a8=!0x1){const _0x52d6e0=this['editor']['locale'],_0x22b9f6=this['editor']['plugins']['get']('Dialog'),_0x2a2a14=new _0x8ec7c3(_0x52d6e0);return _0x2a2a14['bind']('isEnabled')['to'](this,'isEnabled'),_0x2a2a14['bind']('isOn')['to'](_0x22b9f6,'id',_0x58629f=>'commentsArchive'===_0x58629f),_0x2a2a14['set']({'label':vt(_0x52d6e0,'COMMENTS_ARCHIVE'),'icon':_0x56a931,'isToggleable':!0x0}),_0x2bd7a8&&(_0x2a2a14['tooltip']=!0x0),this['listenTo'](_0x2a2a14,'execute',()=>this['_toggleDialog']()),_0x2a2a14;}['_hideDialogOnAnnotationEscape']=_0x2df739=>{const _0x59a9f7=_0x2df739['source'];if(!this['annotationViews']['has'](_0x59a9f7['view']))return;const _0x1c399f=this['editor']['plugins']['get']('Dialog');_0x1c399f['isOpen']&&'commentsArchive'===_0x1c399f['id']&&(_0x1c399f['hide'](),_0x2df739['stop']());};}class Comments extends _0x4e3a6a{static get['requires'](){return[CommentsRepository,CommentsEditing,CommentsUI,CommentsArchive,CommentsArchiveUI,CommentsOnly,WideSidebar,NarrowSidebar,InlineAnnotations];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{AddCommentThreadCommand,Annotation,AnnotationCollection,AnnotationCounterButtonView,AnnotationView,Annotations,AnnotationsSidebarItemView,AnnotationsSidebarView,AnnotationsUIs,BaseCommentThreadView,BaseCommentView,Comment,CommentThread,CommentThreadController,CommentThreadInputView,CommentThreadView,CommentView,Comments,CommentsArchive,CommentsArchiveUI,CommentsEditing,CommentsListView,CommentsOnly,CommentsRepository,CommentsUI,EditorAnnotations,InlineAnnotations,NarrowSidebar,Sidebar,WideSidebar,Ot as bindAnnotationCollections};