@ckeditor/ckeditor5-comments 46.0.3 → 46.1.0-alpha.1

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 (194) hide show
  1. package/build/comments.js +1 -1
  2. package/dist/index.js +11 -11
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +18 -18
  150. package/src/annotations/annotation.js +2 -2
  151. package/src/annotations/annotationcollection.js +1 -1
  152. package/src/annotations/annotations.js +1 -1
  153. package/src/annotations/annotationsuis.js +1 -1
  154. package/src/annotations/editorannotations.js +1 -1
  155. package/src/annotations/inlineannotations.js +1 -1
  156. package/src/annotations/narrowsidebar.js +1 -1
  157. package/src/annotations/sidebar.js +1 -1
  158. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  159. package/src/annotations/view/annotationview.js +1 -1
  160. package/src/annotations/view/sidebaritemview.js +2 -2
  161. package/src/annotations/view/sidebarview.js +2 -2
  162. package/src/annotations/widesidebar.js +1 -1
  163. package/src/comments/addcommentthreadcommand.js +1 -1
  164. package/src/comments/commentsarchive.js +1 -1
  165. package/src/comments/commentsarchiveui.js +1 -1
  166. package/src/comments/commentsediting.js +1 -1
  167. package/src/comments/commentsrepository.js +3 -3
  168. package/src/comments/commentsui.js +1 -1
  169. package/src/comments/integrations/clipboard.js +1 -1
  170. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  171. package/src/comments/integrations/importword.js +1 -1
  172. package/src/comments/integrations/showcommenthighlights.js +1 -1
  173. package/src/comments/ui/commenteditor/commenteditor.js +2 -2
  174. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  175. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  176. package/src/comments/ui/commentthreadcontroller.js +2 -2
  177. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  178. package/src/comments/ui/view/basecommentview.js +1 -1
  179. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  180. package/src/comments/ui/view/commentcontentview.js +1 -1
  181. package/src/comments/ui/view/commentinputview.js +1 -1
  182. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  183. package/src/comments/ui/view/commentslistview.js +1 -1
  184. package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
  185. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  186. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  187. package/src/comments/ui/view/commentthreadview.js +2 -2
  188. package/src/comments/ui/view/commentview.js +2 -2
  189. package/src/comments.js +1 -1
  190. package/src/commentsonly.js +1 -1
  191. package/src/index.js +1 -1
  192. package/src/utils/common-translations.js +1 -1
  193. package/src/utils/createmutationobserver.js +1 -1
  194. package/src/utils/splitmarkername.js +1 -1
package/dist/index.js CHANGED
@@ -20,14 +20,14 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Editor as _0x1b0da7,ContextPlugin as _0x313b3a,PendingActions as lt,Command as _0x2d7805,Plugin as _0x6d2056,Context as _0x4d6295}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3e3063,uid as _0x2f2703,KeystrokeHandler as jt,FocusTracker as _0x5f12d6,diff as _0x54c417,Collection as _0x4d5d77,Rect as _0x23d655,CKEditorError as _0x2cc838,first as _0x1f0347,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x1147f3,keyCodes as _0x2ff53f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3f7232,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x2eee69,trimHtml as _0x471ff4,LateFocusDropdownButtonView as _0x4f1863,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x3f042c}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x35ab00}from'es-toolkit/compat';import{IconUndo as _0xb49e9d,IconCheck as _0x48c961,IconPencil as _0x4128fc,IconRemoveComment as _0x33f560,IconThreeVerticalDots as _0x5944a9,IconAddComment as _0x57f000,IconCommentsArchive as _0x445ed3}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x349db7,ButtonView as _0x3596fa,ViewCollection as _0x118739,createDropdown as _0x40a70c,ListView as _0x1118c0,focusChildOnDropdownOpen as _0xf4a41c,ListItemView as _0x30e474,MenuBarMenuListItemButtonView as _0x1a9c60,BodyCollection as _0x4e9d65,BalloonPanelView as _0x39affa,ContextualBalloon as _0x1b4ef4,Dialog as _0x1c0817,DialogViewPosition as _0x324a55}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x21fed6}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0xab76d7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x3d60c9}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0x3e3063(){['model'];['view'];constructor(_0x5bb33c,_0x448e78){super(),this['model']=_0x5bb33c,this['model']['_isAttached']=!0x0,this['view']=_0x448e78,this['listenTo'](_0x448e78,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x448e78,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x448e78,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x448e78,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x448e78,'addComment',(_0x4c43eb,_0x3f2b8a)=>this['addComment'](_0x3f2b8a)),this['listenTo'](_0x448e78,'updateComment',(_0x693adf,_0x2c3e65,_0x4248cf)=>this['updateComment'](_0x2c3e65,_0x4248cf)),this['listenTo'](_0x448e78,'removeComment',(_0x59f577,_0x2c4ac1)=>this['removeComment'](_0x2c4ac1));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x341c68){this['model']['addComment']({'content':_0x341c68,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x4f8a3f,_0x171366){this['model']['getComment'](_0x4f8a3f)['update']({'content':_0x171366});}['removeComment'](_0x3c6ab2){this['model']['getComment'](_0x3c6ab2)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x5b4fec,_0xd8e970,_0x340262){const t=_0x5b4fec['t'];switch(_0xd8e970){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'},_0x340262);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'},_0x340262);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'},_0x340262);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'},_0x340262);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x340262);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'},_0x340262);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'},_0x340262);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'},_0x340262);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x2430ba,_0x3ff025){super(_0x2430ba);const _0xd2f2ff=_0x2f2703();this['main']=this['createCollection'](),this['editable']=new $t(_0x2430ba,_0x3ff025,void 0x0,{'label':()=>N(_0x2430ba,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x2430ba['uiLanguageDirection'],'lang':_0x2430ba['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xd2f2ff},'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 Ft extends Ut{['view'];constructor(_0x396844){super(_0x396844),this['view']=new Vt(_0x396844['locale'],_0x396844['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x23218c=this['editor']['editing']['view'],_0x1ad372=this['view']['editable'],_0x193dd8=_0x23218c['document']['getRoot']();_0x1ad372['name']=_0x193dd8['rootName'],this['view']['render']();const _0x4a543f=_0x1ad372['element'];this['setEditableElement'](_0x1ad372['name'],_0x4a543f),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x23218c['attachDomRoot'](_0x4a543f),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
25
- _0x3e3063(_0x1b0da7){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x4aec43={}){function _0x2c2497(_0x1608b9){return _0x1608b9['map'](_0x248fa3=>String['fromCharCode'](_0x248fa3))['join']('');}(_0x4aec43=Object['assign']({},_0x4aec43))['plugins']||(_0x4aec43['plugins']=Rt['defaultPlugins']),super(_0x4aec43),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2c2497([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c2497([0x76,0x69,0x65,0x77])][_0x2c2497([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2c2497([0x61,0x75,0x74,0x6f]),this[_0x2c2497([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2c2497([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2c2497([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2c2497([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2c2497([0x6f,0x6b])});}['create'](){const _0x4948a9=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4948a9))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x24c953=>{const _0x3d3b57=this['model']['document']['getRoot'](),_0x3dcf34=_0x3d3b57&&_0x3d3b57['getChild'](_0x3d3b57['childCount']-0x1);_0x24c953['setSelection'](_0x3dcf34,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xf4275a=this['editing']['view'],_0x1dc037=_0xf4275a['document']['getRoot'](),_0x4a07b5=_0x1dc037['getChild'](0x0);_0x1dc037['childCount']>0x1||!_0x4a07b5||'p'!=_0x4a07b5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0xf4275a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4a07b5['placeholder']=this['placeholder']),St({'view':_0xf4275a,'element':_0x4a07b5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4a07b5);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x29808f,_0x4c0dc5={}){super(_0x29808f),this['editor']=null,this['_editorConfig']=_0x4c0dc5,this['set']('value',_0x4c0dc5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x29808f,'Reply...')),this['set']('submitLabel',N(_0x29808f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5f12d6(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x3fff06,_0x1df4a)=>{this['cancelButtonView']['fire']('execute'),_0x1df4a();}),this['keystrokes']['set']('Ctrl+Enter',(_0x23234b,_0x5b0d7e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5b0d7e());}),this['on']('submit',(_0x503e47,_0x3c076d)=>{_0x3c076d['length']>0xfde8?(alert(N(_0x29808f,'TOO_LONG_COMMENT_ALERT',[_0x3c076d['length'],0xfde8])),_0x503e47['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x9e1861=this['editor'];this['element']['insertBefore'](_0x9e1861['ui']['element'],this['element']['firstChild']),_0x9e1861['model']['document']['on']('change',()=>this['value']=_0x9e1861['getData']()),_0x9e1861['bind']('placeholder')['to'](this),this['focusables']['add'](_0x9e1861['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x9f6175){-0x1===_0x9f6175?(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:_0x2e5ce0}=this,_0x116558=new _0x3596fa(_0x2e5ce0);return _0x116558['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x116558['withText']=!0x0,_0x116558['bind']('label')['to'](this,'submitLabel'),_0x116558['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x116558['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x22f531,_0x1338d1)=>!_0x1338d1&&!!_0x22f531['trim']()),_0x116558;}['_createCancelButton'](){const {locale:_0x543541}=this,_0x21295c=new _0x3596fa(_0x543541);return _0x21295c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x21295c['label']=N(_0x543541,'Cancel'),_0x21295c['withText']=!0x0,_0x21295c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x21295c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xdc7bd5=>{this['focusTracker']['add'](_0xdc7bd5['element']);}),this['focusables']['on']('change',(_0x538633,_0x3a10e9)=>{for(const _0x437c04 of Array['from'](_0x3a10e9['added'])['reverse']())this['focusTracker']['add'](_0x437c04['element']);});}}class ie extends kt{constructor(_0x31d81d,_0x4cffb4,_0x3f8944){super(_0x31d81d),this['commentInputView']=new os(_0x31d81d,_0x3f8944),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x12b49f,_0x5be5f9)=>_0x12b49f||!!_0x5be5f9),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 _0x3f7232(_0x31d81d,_0x4cffb4),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'](_0x3ec2c4){this['commentInputView']['focus'](_0x3ec2c4);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3d52d5,_0x7fad78)=>{const {submitButtonView:_0x324732,cancelButtonView:_0x12ad26,editor:_0x2530d5}=this['commentInputView'];[_0x324732['element'],_0x12ad26['element'],_0x2530d5?_0x2530d5['editing']['view']['getDomRoot']():null]['filter'](_0x35a40c=>_0x35a40c)['some'](_0x42b20d=>_0x42b20d['contains'](_0x7fad78['target']))||(this['focus'](),_0x7fad78['preventDefault']());});}}class rs extends kt{constructor(_0x3506ae){super(_0x3506ae);const _0x2afe13=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2afe13['to']('count',_0x5f4d11=>N(_0x3506ae,'NUMBER_OF_COMMENTS',_0x5f4d11))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5bae54,_0x35f428,_0x419fe1){super(_0x5bae54);const _0xb9571e=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x35f428['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x35f428,this['_config']=_0x419fe1,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x22e7a3=>this['commentViews']['map'](_0x2cdb48=>_0x2cdb48['element'])['includes'](_0x22e7a3['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5bae54),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4e09ac=>_0x4e09ac-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5a4588 of _0x35f428['comments'])this['_handleNewCommentModel'](_0x5a4588);this['_handleInfoComment'](),this['listenTo'](_0x35f428['comments'],'add',(_0x4a22e5,_0x59321b)=>{const _0x533598=this['_calculatePosition'](_0x59321b);this['length']++,this['_handleNewCommentModel'](_0x59321b,_0x533598),this['refreshVisibleViews']();}),this['listenTo'](_0x35f428['comments'],'remove',(_0x38ff44,_0xc4fcd6)=>{this['length']--,this['_handleRemoveCommentModel'](_0xc4fcd6),this['refreshVisibleViews']();}),this['listenTo'](_0x35f428,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x35f428,'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',_0xb9571e['if']('length','ck-hidden',_0x3e66d1=>!_0x3e66d1)],'aria-label':N(_0x5bae54,'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'](_0x135d68){-0x1===_0x135d68?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2202a2 of this['commentViews'])_0x2202a2['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1afc42,_0x798efa){const _0x108950=new this['_config']['CommentView'](this['locale'],_0x1afc42,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x108950['viewUid']=_0x1afc42['id'],_0x108950['delegate']('removeComment')['to'](this),_0x108950['delegate']('updateComment')['to'](this),_0x108950['delegate']('resolveCommentThread')['to'](this),_0x108950['delegate']('editorReady')['to'](this),_0x108950['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x108950,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x108950,_0x798efa);}['_calculatePosition'](_0x532a8f){const _0x5bee5f=this['_model']['_findOptimalIndex'](_0x532a8f);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x532a8f['authoredAt']?_0x5bee5f-0x1:_0x5bee5f:_0x5bee5f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3c91c9={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3c91c9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3c91c9));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xe614a4){const _0x23e44c=this['commentViews']['remove'](_0xe614a4['id']);this['stopListening'](_0x23e44c),_0x23e44c['isEditMode']&&this['_updateHasDirtyComment'](),_0x23e44c['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4e5d50=>_0x4e5d50['isEditMode']);}['_rearrangeCollapse'](){const _0x8e75b5=function(_0x599e6c){const _0x9e6773=new _0x4d5d77();for(const _0x2abe9e of _0x599e6c)_0x9e6773['add'](_0x2abe9e);return _0x9e6773;}(this['commentViews']),_0xb1b3e6=this['_collapsedCommentsView']['count'];for(let _0x3b8b79=0x1;_0x3b8b79<=_0xb1b3e6;_0x3b8b79++)_0x8e75b5['remove'](0x1);for(const _0x449a80 of _0x8e75b5)_0x449a80['collapse']();_0xb1b3e6>0x0&&_0x8e75b5['add'](this['_collapsedCommentsView'],0x1),ns(_0x54c417(Array['from'](this['visibleViews']),Array['from'](_0x8e75b5)),this['visibleViews'],_0x8e75b5);}['_rearrangeExpand'](){ns(_0x54c417(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x58f403 of this['visibleViews'])_0x58f403['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1d451e=>{this['focusTracker']['add'](_0x1d451e['element']),this['keystrokes']['listenTo'](_0x1d451e['element']);}),this['commentViews']['on']('change',(_0x21deaf,_0xb5adcb)=>{for(const _0x5e0e80 of _0xb5adcb['removed'])this['focusTracker']['remove'](_0x5e0e80['element']),this['keystrokes']['stopListening'](_0x5e0e80['element']);for(const _0x48844d of Array['from'](_0xb5adcb['added'])['reverse']())this['focusTracker']['add'](_0x48844d['element']),this['keystrokes']['listenTo'](_0x48844d['element']);});}}function ns(_0x431faa,_0x4612d5,_0xc8402b){let _0x424ce9=0x0;for(const _0x5243e5 of _0x431faa)switch(_0x5243e5){case'insert':_0x4612d5['add'](_0xc8402b['get'](_0x424ce9),_0x424ce9),_0x424ce9++;break;case'delete':_0x4612d5['remove'](_0x424ce9);break;case'equal':_0x424ce9++;}}class oe extends kt{constructor(_0xff5afe){super(_0xff5afe);const _0x3dcc8c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3dcc8c['to']('contextValue',_0x565301=>N(_0xff5afe,'THREAD_CONTEXT_LABEL',_0x565301)),'tabindex':-0x1},'children':[{'text':_0x3dcc8c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x87502f,_0x4e0703){super(_0x87502f);const _0x55e4bc=this['bindTemplate'];this['_model']=_0x4e0703,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2c2628=>!!_0x2c2628),this['bind']('contextValue')['to'](this['_model'],'context',_0x3e9ecf=>_0x3e9ecf&&_0x3e9ecf['value']?this['_trimContextValue'](_0x3e9ecf['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x55e4bc['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 _0x1b7a47=new _0x3596fa(this['locale']);return _0x1b7a47['label']=N(this['locale'],'Reopen'),_0x1b7a47['tooltip']=N(this['locale'],'Reopen'),_0x1b7a47['icon']=_0xb49e9d,_0x1b7a47['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x37c715=>!_0x37c715),_0x1b7a47['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x457809,_0x55703e)=>_0x457809&&_0x55703e),_0x1b7a47['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1b7a47;}['_trimContextValue'](_0x4d773a){if(_0x4d773a['length']<0x96)return _0x4d773a;const _0x2457d7=_0x4d773a['lastIndexOf']('\x20',0x93);return _0x4d773a['substring'](0x0,_0x2457d7>-0x1?_0x2457d7:0x93)+'...';}['_attachContextActions'](){const _0x3714c2=this['element']['querySelector']('.ck-context'),_0x4125bb=_0x3714c2['querySelector']('.ck-context__value');this['listenTo'](_0x3714c2,'mouseenter',()=>{_0x4125bb['offsetWidth']<_0x4125bb['scrollWidth']&&_0x3714c2['classList']['add']('overlay');}),this['listenTo'](_0x3714c2,'mouseleave',()=>{_0x3714c2['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x599e6b of this['focusables'])this['focusTracker']['add'](_0x599e6b['element']),this['keystrokes']['listenTo'](_0x599e6b['element']);}['_createContextView'](){const _0x962210=new oe(this['locale']);return _0x962210['bind']('contextValue')['to'](this),_0x962210;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x11a80d,_0x3a3de1,_0x193722,_0x1e092e){super(_0x11a80d),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3a3de1,this['_localUser']=_0x193722,this['_config']=_0x1e092e,this['commentThreadHeaderView']=new Yt(_0x11a80d,_0x3a3de1),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x11a80d,N(_0x11a80d,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x11a80d,_0x3a3de1,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1e092e)),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',(_0x25f67c,_0x1fd3df)=>_0x25f67c||!!_0x1fd3df),this['bind']('isUnlinked')['to'](_0x3a3de1,'unlinkedAt',_0x550153=>!!_0x550153),this['bind']('ariaLabel')['to'](this,'length',_0x2a977c=>{const _0x4d5cb6=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2a977c,_0x4d5cb6]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x358eb9=>_0x358eb9['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x278c83=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x216a81=_0x278c83['commentInputView'];return _0x278c83['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x216a81,'value',(_0xf002b5,_0x121831,_0x305c16,_0x5c002e,_0x4cf7a1)=>!!_0x4cf7a1||!!_0x5c002e&&_0x305c16&&!_0x121831||_0xf002b5&&_0x305c16&&!_0x121831),_0x216a81['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x977154,_0x374b78,_0x463859)=>{let _0x36285f;return _0x36285f=_0x463859&&_0x374b78?'Reply\x20to\x20reopen\x20discussion...':_0x977154?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x36285f);}),_0x216a81['bind']('submitLabel')['to'](this,'length',_0x5a93d2=>N(this['locale'],_0x5a93d2?'Reply':'Comment')),_0x216a81['on']('submit',(_0x51b8cd,_0xe7715d)=>{this['fire']('addComment',_0xe7715d),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x216a81['on']('cancel',()=>{this['focus']();}),_0x216a81['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x216a81['on']('cancel',_0x244f12=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x244f12['stop']());}),this['on']('change:isActive',(_0x432b6f,_0x3c684b,_0xceee3e)=>{_0xceee3e||this['length']||_0x216a81['value']||this['fire']('removeCommentThread');}),_0x278c83;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4db3c9,_0xc2d3f3,_0x136e2d,_0x2d4137){super(_0x4db3c9,_0xc2d3f3,_0x136e2d,_0x2d4137),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4db3c9,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2c8df6,_0xfe9d4c,_0x555769)=>{_0x555769||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x28a31a,_0x4d33e2,_0x26e55c)=>{_0x26e55c&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x19f0d1=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x19f0d1['if']('isActive','ck-thread--active'),_0x19f0d1['if']('isUnlinked','ck-thread--unlinked'),_0x19f0d1['if']('isConfirm','ck-thread--remove-confirmation'),_0x19f0d1['to']('actionIndicator',_0x24f6bf=>_0x24f6bf?'ck-thread--'+_0x24f6bf:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x19f0d1['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 _0x4621ce of this['commentsListView']['commentViews'])_0x4621ce['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3f2bba}=this,_0x50dba5=this['commentsListView']['commentViews']['get'](0x0);_0x50dba5===this['_boundFirstCommentView']||_0x50dba5['isSystemComment']||(this['_boundFirstCommentView']=_0x50dba5,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x50dba5,'actionIndicator',_0x202507=>'remove'===_0x202507?'remove':null),_0x50dba5['placeholder']=N(_0x3f2bba,'Write\x20a\x20comment...'),_0x50dba5['removeButton']['on']('execute',_0x46caec=>{_0x46caec['stop'](),this['showConfirm'](N(_0x3f2bba,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x50dba5['focus']();}),_0x50dba5['actionBar']['add'](this['resolveButton'],0x0),_0x50dba5['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2538bb=new _0x2eee69(this['locale']);return _0x2538bb['label']=N(this['locale'],'Resolve'),_0x2538bb['tooltip']=N(this['locale'],'Resolve'),_0x2538bb['icon']=_0x48c961,_0x2538bb['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2538bb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5c5913=>!_0x5c5913),_0x2538bb['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x342e85,_0x5ddc8c)=>_0x342e85&&!_0x5ddc8c),_0x2538bb['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2538bb;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x4e08a6){super(_0x4e08a6),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x453270,_0x52bdc7,_0x2feb7b)=>{this['element']['innerHTML']=_0x2feb7b;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5cb125,_0xea4085,_0x7d4aca){super(_0x5cb125),this['_model']=_0xea4085,this['_config']=_0x7d4aca,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0xea4085,'content',_0xea4085,'authoredAt',(_0x4dba6b,_0x453469)=>N(_0x5cb125,'COMMENT_ARIA_LABEL',[_0xea4085['author']['name'],_0x7d4aca['formatDateTime'](_0x453469),new DOMParser()['parseFromString'](_0x4dba6b,'text/html')['body']['textContent'],_0xea4085['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x5cb125,N(_0x5cb125,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x118739(),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x54e16b=>_0x54e16b['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0xfa70d0=new es(this['locale']);return _0xfa70d0['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4caaac,_0x5dc199)=>_0x5dc199?_0x471ff4(_0x4caaac,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4caaac),_0xfa70d0;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x335326=new os(this['locale'],this['_config']['editorConfig']);return _0x335326['value']=this['_model']['content'],_0x335326['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x335326['submitLabel']=N(this['locale'],'Save'),_0x335326['on']('submit',(_0x1e36ab,_0x27315d)=>{this['fire']('updateComment',this['_model']['id'],_0x27315d),this['switchToDisplayMode'](),this['focus']();}),_0x335326['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x335326['once']('editorReady',()=>{_0x335326['focus']();}),_0x335326['createEditor'](),_0x335326['delegate']('editorReady')['to'](this),_0x335326['delegate']('editorDestroyed')['to'](this),_0x335326;}['_setupKeyboardNavigation'](){const _0x276f5a=this['element'];this['keystrokes']['listenTo'](_0x276f5a);for(const _0x5df1b2 of this['focusables'])this['focusTracker']['add'](_0x5df1b2['element']),this['keystrokes']['listenTo'](_0x5df1b2['element']);this['focusables']['on']('change',(_0x1be898,_0x30362a)=>{for(const _0x216134 of _0x30362a['removed'])this['focusTracker']['remove'](_0x216134['element']),this['keystrokes']['stopListening'](_0x216134['element']);for(const _0x1ab793 of _0x30362a['added'])this['focusTracker']['add'](_0x1ab793['element']),this['keystrokes']['listenTo'](_0x1ab793['element']);}),this['keystrokes']['set']('enter',(_0x5308ee,_0xbe7c62)=>{_0x276f5a===_0x5308ee['target']&&(this['focusCycler']['focusFirst'](),_0xbe7c62());}),this['keystrokes']['set']('esc',(_0x4b3bc6,_0x2385dc)=>{_0x276f5a!==_0x4b3bc6['target']&&(this['focus'](),_0x2385dc());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0x4f2642,_0x4abed0,_0x575c05){super(_0x4f2642,_0x4abed0,_0x575c05),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x4f2642,'Reply...')),this['bind']('authoredAt')['to'](_0x4abed0),this['bind']('resolvedAt')['to'](_0x4abed0),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 _0x3f7232(_0x4f2642,_0x4abed0['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4abed0,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x5a9f1b=this['bindTemplate'],_0x32e3b9=[{'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':_0x5a9f1b['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x5a9f1b['to']('authoredAt',_0x61933=>this['_config']['formatDateTime'](_0x61933))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x5a9f1b['if']('isEditMode','ck-comment__actions--hidden'),_0x5a9f1b['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']&&_0x32e3b9['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x5a9f1b['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x5a9f1b['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x5a9f1b['if']('isEditMode','ck-comment--edit'),_0x5a9f1b['if']('isSystemComment','ck-comment--info'),_0x5a9f1b['to']('actionIndicator',_0x345b16=>_0x345b16?'ck-comment--'+_0x345b16:'')],'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':_0x32e3b9}]}]};}['_createEditButton'](){const _0x1bc2ec=new _0x3596fa(this['locale']);return _0x1bc2ec['label']=N(this['locale'],'Edit'),_0x1bc2ec['icon']=_0x4128fc,_0x1bc2ec['withText']=!0x0,_0x1bc2ec['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1bc2ec['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1ef200=>!_0x1ef200),_0x1bc2ec['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1bc2ec['on']('execute',()=>this['switchToEditMode']()),_0x1bc2ec;}['_createRemoveButton'](){const _0xbe0397=new _0x3596fa(this['locale']);return _0xbe0397['label']=N(this['locale'],'Remove'),_0xbe0397['icon']=_0x33f560,_0xbe0397['withText']=!0x0,_0xbe0397['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xbe0397['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x271447=>!_0x271447),_0xbe0397['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xbe0397['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xbe0397;}['_createDropdown'](){const _0x232e9f=_0x40a70c(this['locale'],_0x4f1863),_0xba0e21=_0x232e9f['panelView']['children'],_0x1e82bf=new _0x1118c0(this['locale']),_0x224d0a=_0x232e9f['bindTemplate'];_0xf4a41c(_0x232e9f,()=>this['items']['find'](_0x10ee4d=>_0x10ee4d['isVisible'])),_0x232e9f['extendTemplate']({'attributes':{'class':[_0x224d0a['if']('isVisible','ck-hidden',_0x290dc2=>!_0x290dc2)]}});const _0x42c29f=(_0x3cc305,_0x64cbc=-0x1)=>{const _0x382958=new _0x30e474(this['locale']);_0x382958['children']['add'](_0x3cc305);const _0x3b0870=_0x64cbc>-0x1?_0x64cbc:_0x1e82bf['items']['length'];_0x1e82bf['items']['add'](_0x382958,_0x3b0870);const _0x502ed1=Array['from'](this['items']);_0x232e9f['unbind']('isEnabled','isVisible'),_0x232e9f['bind']('isEnabled')['toMany'](_0x502ed1,'isEnabled',(..._0x56d388)=>_0x56d388['some'](_0x18858=>_0x18858)),_0x232e9f['bind']('isVisible')['toMany'](_0x502ed1,'isVisible',(..._0x356966)=>_0x356966['some'](_0x298ce7=>_0x298ce7));};_0x232e9f['panelPosition']='sw',_0x232e9f['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x5944a9});for(const _0x215b51 of this['items'])_0x42c29f(_0x215b51);return _0xba0e21['add'](_0x1e82bf),_0x232e9f['listenTo'](this['items'],'add',(_0x1552bf,_0x5217a9,_0x4e7f1a)=>{_0x42c29f(_0x5217a9,_0x4e7f1a);}),_0x232e9f['listenTo'](this['items'],'remove',(_0x5cd86c,_0x29b831,_0x1bbbb3)=>{_0x1e82bf['items']['remove'](_0x1bbbb3);}),_0x232e9f;}['_attachActions'](_0x4f99ab,_0x31836c){const _0x305d2c=_0x4f99ab&&_0x4f99ab['element'];_0x305d2c&&(this['listenTo'](_0x305d2c,'mouseenter',()=>this['actionIndicator']=_0x31836c),this['listenTo'](_0x305d2c,'focus',()=>this['actionIndicator']=_0x31836c),this['listenTo'](_0x305d2c,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x305d2c,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x41fca8=super['_createCommentInputView']();return _0x41fca8['bind']('placeholder')['to'](this),_0x41fca8;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x191092){const _0x513e95=Dt(_0x191092,0x1e),_0x479d3f=new MutationObserver(_0x1043f0=>{for(const _0x2d8c25 of _0x1043f0)('attributes'==_0x2d8c25['type']&&'class'==_0x2d8c25['attributeName']||'childList'==_0x2d8c25['type']||'characterData'==_0x2d8c25['type'])&&_0x513e95();});return{'attach'(_0x2d0775){_0x479d3f['observe'](_0x2d0775,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x479d3f['disconnect'](),_0x513e95['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5d43ec,_0x474f5e){super(_0x5d43ec),this['id']=_0x2f2703(),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5be1d0,_0x44962b)=>this['fire']('Esc',_0x44962b)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x474f5e),this['mainView']=_0x474f5e;const _0x362e35=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x362e35['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 _0x2116bb=this['element']['clientHeight'];_0x2116bb&&(this['height']=_0x2116bb);}}class T extends/* #__PURE__ -- @preserve */
29
- _0x3e3063(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x250235,target:_0x14b01d,type:_0x3e6267,isVisible:_0x203d80=!0x0}){super(),this['view']=_0x250235,this['view']['element']||this['view']['render'](),this['_type']=_0x3e6267,this['_target']=_0x14b01d,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4d5d77([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x16c4bc,_0x1135e7)=>{this['view']['focusTracker']['add'](_0x1135e7);}),this['focusableElements']['on']('remove',(_0x4e6483,_0x1e919d)=>{this['view']['focusTracker']['remove'](_0x1e919d);}),this['set']('isVisible',_0x203d80);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x51225e=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x51225e),_0x51225e;}get['targetRect'](){const _0x1f3199=this['target'];if(null===_0x1f3199)return null;if(_0x1f3199 instanceof _0x23d655)return _0x1f3199;const _0x258d5e=_0x1f3199['filter'](_0x5c2b29=>function(_0x426f65){const _0x298498=_0x426f65['offsetParent'];if(_0x298498)return!0x0;const _0x3026cb=_0x426f65['getClientRects']()['item'](0x0);return!!_0x3026cb;}(_0x5c2b29));return 0x0===_0x258d5e['length']?null:new _0x23d655(_0x258d5e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5b4856){this['view']['isActive']=_0x5b4856,this['view']['mainView']['isActive']=_0x5b4856;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3d3d52){if(!(null===_0x3d3d52||_0x3d3d52 instanceof _0x23d655||Array['isArray'](_0x3d3d52)&&_0x3d3d52['every'](_0x17d82e=>fi(_0x17d82e))))throw new _0x2cc838('annotation-invalid-target',null,{'target':_0x3d3d52});}['_getNormalizedTarget'](){const _0x6a295='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x6a295)?[_0x6a295]:_0x6a295;}}function fi(_0x4f6f6d){return null!==_0x4f6f6d&&'object'==typeof _0x4f6f6d&&'nodeType'in _0x4f6f6d&&0x1===_0x4f6f6d['nodeType'];}class S extends _0x4d5d77{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x280c38=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5f12d6(),this['_focusTracker']['on']('change:isFocused',(_0x42ef1f,_0x21f359,_0x6b31c2)=>{_0x6b31c2||this['fire']('blur');});for(const _0x4b1ada of _0x280c38)this['add'](_0x4b1ada);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x323627){if(this['has'](_0x323627))throw new _0x2cc838('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x323627['innerView'],_0x323627),this['_viewToAnnotation']['set'](_0x323627['view'],_0x323627);for(const _0x114859 of _0x323627['focusableElements'])this['_focusTracker']['add'](_0x114859);this['listenTo'](_0x323627['focusableElements'],'add',(_0xd4c7ac,_0x319972)=>{this['_focusTracker']['add'](_0x319972);}),this['listenTo'](_0x323627['focusableElements'],'remove',(_0x49d71d,_0x12a3d3)=>{this['_focusTracker']['remove'](_0x12a3d3);}),this['listenTo'](_0x323627['view']['focusTracker'],'change:isFocused',(_0x9b0632,_0x1013ed,_0x18e2d2)=>{_0x18e2d2&&this['fire']('focus',_0x323627);}),_0x323627['updateTargetRect']();const _0x186bf7=this['_getOrderInContent'](_0x323627['view']['targetRect']);return super['add'](_0x323627,_0x186bf7);}['remove'](_0x2fd5a5){if(!this['has'](_0x2fd5a5))throw new _0x2cc838('annotationcollection-not-existing-item',null);this['stopListening'](_0x2fd5a5['view']['focusTracker']),this['stopListening'](_0x2fd5a5['focusableElements']);for(const _0x5599ec of _0x2fd5a5['focusableElements'])this['_focusTracker']['remove'](_0x5599ec);return this['_viewToAnnotation']['delete'](_0x2fd5a5['view']),this['_innerViewToAnnotation']['delete'](_0x2fd5a5['innerView']),super['remove'](_0x2fd5a5);}['getByInnerView'](_0x3aa678){return this['_innerViewToAnnotation']['get'](_0x3aa678);}['getByView'](_0x291a80){return this['_viewToAnnotation']['get'](_0x291a80);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x212247 of this)_0x212247['updateTargetRect']();this['_sort']();}['_sort'](){const _0xcfbabb=Array['from'](this)['sort']((_0x5e891e,_0x25639a)=>w(_0x5e891e['view']['targetRect'],_0x25639a['view']['targetRect']));for(let _0x2e2df1=_0xcfbabb['length']-0x1;_0x2e2df1>0x0;_0x2e2df1--){const _0x1b413f=_0xcfbabb[_0x2e2df1];_0x2e2df1!==this['getIndex'](_0x1b413f)&&(this['remove'](_0x1b413f),this['add'](_0x1b413f));}}['_getOrderInContent'](_0x26c8a0){let _0x322991=0x0;if(!_0x26c8a0)return this['length'];for(const _0x1a1d44 of this){const _0x57bf20=_0x1a1d44['view']['targetRect'];if(_0x57bf20){if(w(_0x26c8a0,_0x57bf20)<0x0)return _0x322991;_0x322991++;}}return _0x322991;}}function v({source:_0x2511a4,target:_0x15d8e2,filter:_0x46c3cd}){for(const _0xf35631 of _0x2511a4)_0x46c3cd(_0xf35631)&&_0x15d8e2['add'](_0xf35631);_0x15d8e2['listenTo'](_0x2511a4,'add',(_0x18607d,_0x46de61)=>{_0x46c3cd(_0x46de61)&&_0x15d8e2['add'](_0x46de61);}),_0x15d8e2['listenTo'](_0x2511a4,'remove',(_0x313e63,_0x46f317)=>{_0x15d8e2['has'](_0x46f317)&&_0x15d8e2['remove'](_0x46f317);});}function w(_0x43df97,_0x548646){if(null===_0x43df97&&null===_0x548646)return 0x0;if(null===_0x43df97)return-0x1;if(null===_0x548646)return 0x1;const _0x47b642=_0x43df97['top']-_0x548646['top'];return 0x0==_0x47b642?_0x43df97['left']-_0x548646['left']:_0x47b642;}class y extends _0x313b3a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2cba8e){if(super(_0x2cba8e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2cba8e instanceof _0x1b0da7){const _0x202c45=_0x2cba8e['locale'];_0x2cba8e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x282cc7){this['collection']['add'](_0x282cc7);}['remove'](_0x512f76){this['collection']['remove'](_0x512f76),_0x512f76['destroy']();}['refreshVisibility'](){for(const _0x429346 of this['collection'])_0x429346['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x523e7e){return this['collection']['getByInnerView'](_0x523e7e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x14aaf1 of this['collection'])_0x14aaf1['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1a5e1d){this['fire']('_activateAnnotation',_0x1a5e1d);}['createAnnotation'](_0x59d73b){return new T(_0x59d73b);}['createAnnotationView'](_0x1336b0,_0x27063c){return new E(_0x1336b0,_0x27063c);}['_addActiveAnnotation'](_0xaa2b91){const _0x59cc6d=new Set(this['activeAnnotations']);_0x59cc6d['add'](_0xaa2b91),this['activeAnnotations']=_0x59cc6d;}['_removeActiveAnnotation'](_0x322bde){const _0x595ed7=new Set(this['activeAnnotations']);_0x595ed7['delete'](_0x322bde),this['activeAnnotations']=_0x595ed7;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2ff525=this['collection'],_0x1c0f90=this['_visibleAnnotations'];function _0x44577d(_0x104620){const _0xccf3f=_0x104620['source'];_0xccf3f['isVisible']&&!_0x1c0f90['has'](_0xccf3f)?_0x1c0f90['add'](_0xccf3f):!_0xccf3f['isVisible']&&_0x1c0f90['has'](_0xccf3f)&&_0x1c0f90['remove'](_0xccf3f),_0xccf3f['view']['focusTracker']['remove'](_0xccf3f['view']['element']),_0xccf3f['view']['focusTracker']['add'](_0xccf3f['view']['element']);}this['listenTo'](_0x2ff525,'add',(_0x2ba171,_0x280fbb)=>{_0x280fbb['isVisible']&&_0x1c0f90['add'](_0x280fbb),this['listenTo'](_0x280fbb,'change:isVisible',_0x44577d);}),this['listenTo'](_0x2ff525,'remove',(_0x10317f,_0x2abbfb)=>{_0x1c0f90['has'](_0x2abbfb)&&_0x1c0f90['remove'](_0x2abbfb),this['stopListening'](_0x2abbfb,'change:isVisible',_0x44577d);});}['_setupEnterAnnotationKeystroke'](){const _0x1b112e=_0x13b3a4=>{_0x13b3a4['on']('ready',()=>{_0x13b3a4['keystrokes']['set'](_0xab76d7,(_0x19f6b4,_0x26da4c)=>{const _0x36a249=_0x1f0347(this['activeAnnotations']['values']());_0x36a249&&(_0x36a249['view']['focus'](),_0x26da4c());});});};this['context']instanceof _0x1b0da7?_0x1b112e(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x483d77,_0x1cc392)=>{_0x1b112e(_0x1cc392);});}['_setupEscapeAnnotationHandling'](){const _0x7675ce=_0x4c36f5=>{const _0x491e55=_0x4c36f5['source'],_0x3c839c=[];let _0x12e2ac;if(Array['isArray'](_0x491e55['target'])){_0x12e2ac=_0x491e55['target'][0x0],this['context']instanceof _0x1b0da7?_0x3c839c['push'](this['context']):this['context']['editors']&&_0x3c839c['push'](...this['context']['editors']);for(const _0x4352c8 of _0x3c839c)for(const _0x548820 of _0x4352c8['editing']['view']['domRoots']['values']())if(_0x548820['contains'](_0x12e2ac))return void _0x4352c8['editing']['view']['focus']();_0x12e2ac['focus']();}};this['listenTo'](this['collection'],'add',(_0x3885f9,_0x3b24ee)=>{this['listenTo'](_0x3b24ee,'escape',_0x7675ce,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x250485,_0x1b0cb9)=>{this['stopListening'](_0x1b0cb9,'escape',_0x7675ce);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x313b3a{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d9f3f){super(_0x1d9f3f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1de600=this['context']['config'];_0x1de600['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1de600['define']('comments.maxThreadTotalWeight',0x1f4),_0x1de600['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1de600['define']('comments.CommentThreadView',gt),_0x1de600['define']('comments.CommentView',Tt),_0x1de600['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3e6a0f=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x43b616,_0x41bbff)=>this['_addCommentThread'](_0x41bbff)),this['on']('submitCommentThread',(_0x2898ba,_0x1a7f02)=>this['_submitCommentThread'](_0x1a7f02)),this['on']('resolveCommentThread',(_0x1b4c3b,_0x225427)=>this['_resolveCommentThread'](_0x225427)),this['on']('resolveCommentThread',(_0x389864,_0x3fdb64)=>this['_updateActiveAnnotation'](_0x3fdb64),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x464074,_0x2f90de)=>this['_reopenCommentThread'](_0x2f90de)),this['on']('reopenCommentThread',(_0xf6026e,_0x473db0)=>this['_updateActiveAnnotation'](_0x473db0),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2cb463,_0x43694f)=>this['_removeCommentThread'](_0x43694f)),this['on']('updateCommentThread',(_0x30155c,_0x4d0b70)=>this['_updateCommentThread'](_0x4d0b70)),this['on']('updateCommentThread',(_0x104534,_0x4503ec)=>this['_updateActiveAnnotation'](_0x4503ec),{'priority':'lowest'}),this['on']('addComment',(_0x429761,_0x187d8b)=>this['_addComment'](_0x187d8b)),this['on']('updateComment',(_0x1c9c1b,_0x6d219)=>this['_updateComment'](_0x6d219)),this['on']('removeComment',(_0x2fd058,_0x50ee69)=>this['_removeComment'](_0x50ee69)),this['on']('addComment',(_0x5ccaac,{threadId:_0x1204cc,isFromAdapter:_0x15f698})=>{if(_0x15f698)return;const _0x878528=this['getCommentThread'](_0x1204cc),_0x26eaa1=_0x878528&&this['_threadToController']['get'](_0x878528);_0x26eaa1&&_0x26eaa1['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3e6a0f,'change:activeAnnotations',(_0x4c3673,_0x146ddb,_0x2139a0)=>{const _0x39ae80=Array['from'](_0x2139a0)['map'](_0x22095a=>this['_viewToController']['get'](_0x22095a['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x39ae80?_0x39ae80['model']:null;});}set['adapter'](_0x51ac0d){if(this['_adapter'])throw new _0x2cc838('commentsrepository-adapter-already-set');this['_adapter']=_0x51ac0d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x1e368a=_t,threadId:_0x340333=_0x2f2703(),comments:_0xa773a5=[],unlinkedAt:_0x3e1a7e=null,resolvedAt:_0xb2935d=null,resolvedBy:_0x9f6504=null,target:_0x233369=null,context:_0x11dd4a=null,attributes:_0x39f0b3={},isResolvable:_0x4d1840=!0x0,isSubmitted:_0x20fb8f=!0x1,isFromAdapter:_0x5590f9=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x1e368a),{'channelId':_0x1e368a,'threadId':_0x340333,'comments':_0xa773a5,'unlinkedAt':_0x3e1a7e,'resolvedAt':_0xb2935d,'resolvedBy':_0x9f6504,'target':_0x233369,'context':_0x11dd4a,'attributes':_0x39f0b3,'isFromAdapter':_0x5590f9,'isResolvable':_0x4d1840,'isSubmitted':_0x20fb8f}),this['getCommentThread'](_0x340333);}['openNewCommentThread']({channelId:_0x2b0852=_t,threadId:_0x1bc2df=_0x2f2703(),target:_0x245776,context:_0x4581c8=null,isResolvable:_0x550b36=!0x0}){if(this['_readOnlyChannels']['has'](_0x2b0852)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x245776)throw new _0x2cc838('commentsrepository-missing-target');const _0x1a81f7=this['addCommentThread']({'channelId':_0x2b0852,'threadId':_0x1bc2df,'target':_0x245776,'context':_0x4581c8,'isResolvable':_0x550b36});if(!_0x1a81f7)return null;const _0x3fd01d=this['_threadToController']['get'](_0x1a81f7),_0x53ad3f=_0x3fd01d['view']['commentThreadInputView']['commentInputView'],_0x17674a=this['context']['plugins']['get'](y),_0x5b1a9e=_0x17674a['getByInnerView'](_0x3fd01d['view']);return _0x17674a['activate'](_0x5b1a9e),_0x53ad3f['once']('editorReady',()=>_0x53ad3f['focus']()),_0x1a81f7;}['hasCommentThread'](_0x3662f3){if('string'!=typeof _0x3662f3)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3662f3);}['updateCommentThread']({channelId:_0x3ce1c1=_t,threadId:_0x306dab,context:_0x5c066f,unlinkedAt:_0x4d2b1f,attributes:_0xd74564,isFromAdapter:_0x373e92=!0x1}){return this['fire'](Nt('updateCommentThread',_0x3ce1c1),{'channelId':_0x3ce1c1,'threadId':_0x306dab,'context':_0x5c066f,'unlinkedAt':_0x4d2b1f,'attributes':_0xd74564,'isFromAdapter':_0x373e92}),this['getCommentThread'](_0x306dab);}['getCommentThread'](_0x133ae0){if('string'!=typeof _0x133ae0)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x133ae0);}['fetchCommentThread']({channelId:_0x36ae3b,threadId:_0xd509d6}={}){const _0x2b2aea=this['getCommentThread'](_0xd509d6);if(_0x2b2aea)return Promise['resolve'](_0x2b2aea);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2cc838('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x36ae3b,'threadId':_0xd509d6})['then'](_0x1db47e=>this['hasCommentThread'](_0xd509d6)?this['getCommentThread'](_0xd509d6):_0x1db47e?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x36ae3b},_0x1db47e)):void 0x0)['catch'](_0x1fa9a5=>{throw console['error'](_0x1fa9a5),new _0x2cc838('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x18daf9,skipNotAttached:_0x2a4a0c=!0x1,skipEmpty:_0x40342a=!0x1,toJSON:_0x36b320=!0x1}={}){const _0x5ada87=[];for(const _0x19901d of this['_threads']['values']())_0x18daf9&&_0x19901d['channelId']!==_0x18daf9||_0x2a4a0c&&!_0x19901d['isAttached']||_0x40342a&&0x0===_0x19901d['length']||_0x5ada87['push'](_0x19901d);return _0x36b320?_0x5ada87['map'](_0x433d71=>_0x433d71['toJSON']()):_0x5ada87;}['getAnnotationForCommentThread'](_0x3a2271){const _0xb5d3fa=this['_threadToController']['get'](_0x3a2271);if(!_0xb5d3fa)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0xb5d3fa['view'])||null;}['getCommentThreadForAnnotation'](_0x1c3f88){const _0x65278b=this['_viewToController']['get'](_0x1c3f88['innerView']);return _0x65278b?_0x65278b['model']:null;}['setActiveCommentThread'](_0x104c64){const _0x42cd6e=this['context']['plugins']['get'](y);if(!_0x104c64)return void(this['activeCommentThread']&&_0x42cd6e['deactivateAll']());const _0x314961=this['getCommentThread'](_0x104c64);if(!_0x314961)throw new _0x2cc838('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x104c64});if(!this['_threadToController']['has'](_0x314961))throw new _0x2cc838('commentsrepository-active-not-attached',null,{'threadId':_0x104c64});const _0x45d1a8=_0x42cd6e['getByInnerView'](this['_threadToController']['get'](_0x314961)['view']);_0x42cd6e['activate'](_0x45d1a8);}['switchReadOnly'](_0x4ff0cb,_0x15c0ac){_0x4ff0cb?this['_readOnlyChannels']['add'](_0x15c0ac):this['_readOnlyChannels']['delete'](_0x15c0ac),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x366db0){return this['_readOnlyChannels']['has'](_0x366db0)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3a1a9c,_0x453abc){return new vt(_0x3a1a9c,_0x453abc);}['setPermissions'](_0x35908c,_0x29e493=_t){this['_permissions']['set'](_0x29e493,_0x35908c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3006cc=_t){return this['_permissions']['has'](_0x3006cc)?this['_permissions']['get'](_0x3006cc):bt;}['_addCommentThread']({channelId:_0x2c63b1,threadId:_0x2bb0ae,comments:_0x36d6ed,unlinkedAt:_0x36cb6e,resolvedAt:_0x3d966c,resolvedBy:_0x4caee0,target:_0x74044d,context:_0x140c19,attributes:_0x599ded,isFromAdapter:_0x5e63ed,isResolvable:_0x37ff82,isSubmitted:_0x48b3b4}){if('string'!=typeof _0x2bb0ae)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2bb0ae});if(this['hasCommentThread'](_0x2bb0ae))throw new _0x2cc838('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2bb0ae});const _0x5b7ccd=new pi(this,{'channelId':_0x2c63b1,'id':_0x2bb0ae,'context':_0x140c19,'attributes':_0x599ded,'unlinkedAt':_0x36cb6e,'resolvedAt':_0x3d966c,'resolvedBy':_0x4caee0?this['context']['plugins']['get'](it)['getUser'](_0x4caee0):null,'isResolvable':_0x37ff82,'isSubmitted':_0x48b3b4||_0x5e63ed});this['_threads']['set'](_0x2bb0ae,_0x5b7ccd);for(const _0x1a4b05 of _0x36d6ed)_0x5b7ccd['_add'](this['_createNewComment']({'threadId':_0x2bb0ae,..._0x1a4b05}));return _0x74044d&&_0x5b7ccd['attachTo'](_0x74044d),_0x5e63ed||!_0x5b7ccd['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2c63b1,'threadId':_0x2bb0ae});}['_submitCommentThread']({channelId:_0x1a5dc2,threadId:_0x359933}){if(!this['hasCommentThread'](_0x359933))throw new _0x2cc838('commentsrepository-missing-comment-thread',this);const _0x885caa=this['getCommentThread'](_0x359933);if(_0x885caa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4ed894,comments:_0x1682a4,resolvedAt:_0x38ef5e,resolvedBy:_0x3336ac,context:_0xc22ed9,attributes:_0x25a084}=_0x885caa,_0x2265c5=this['context']['plugins']['get']('PendingActions'),_0x4df3eb=_0x2265c5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1a5dc2,'threadId':_0x4ed894,'comments':_0x1682a4['map'](_0x10df11=>_0x10df11['toJSON']()),'resolvedAt':_0x38ef5e,'resolvedBy':_0x3336ac?_0x3336ac['id']:_0x3336ac,'context':_0xc22ed9,'attributes':_0x25a084})['then'](({comments:_0x5bfd9a})=>{_0x2265c5['remove'](_0x4df3eb);for(const _0xcffd94 of _0x5bfd9a)this['_updateComment']({'channelId':_0x1a5dc2,'threadId':_0x359933,'commentId':_0xcffd94['commentId'],'createdAt':_0xcffd94['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x35c6a3=>{throw console['error'](_0x35c6a3),new _0x2cc838('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5c0b3b,target:_0xb5933f}){const _0x35739e=this['getCommentThread'](_0x5c0b3b);if(!_0x35739e)throw new _0x2cc838('commentsrepository-attach-missing-comment-thread',this);const _0x4b68c0=this['context']['plugins']['get']('PendingActions'),_0x5f082a=this['context']['plugins']['get'](y),_0x643f2a=this['_createCommentThreadView'](_0x35739e),_0x32cdef=new vt(_0x35739e,_0x643f2a);let _0xdea1ec=null;_0x643f2a['on']('change:isDirty',(_0x133b51,_0x4e3ea8,_0x5e4292)=>{_0x5e4292?_0xdea1ec=_0x4b68c0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xdea1ec&&(_0x4b68c0['remove'](_0xdea1ec),_0xdea1ec=null);}),this['_threadToController']['set'](_0x35739e,_0x32cdef),this['_viewToController']['set'](_0x643f2a,_0x32cdef);const _0x1bac2b=new E(this['context']['locale'],_0x643f2a);_0x1bac2b['bind']('length')['to'](_0x643f2a),_0x1bac2b['bind']('isDirty')['to'](_0x643f2a,'isDirty',_0x643f2a,'length',(_0x55abde,_0x2d0421)=>_0x55abde||!_0x2d0421),_0x1bac2b['bind']('isActive')['to'](_0x643f2a),_0x1bac2b['type']='comment';const _0x5b2f90=new T({'view':_0x1bac2b,'target':_0xb5933f,'type':'comment','isVisible':!_0x35739e['archivedAt']&&!!('function'==typeof _0xb5933f?_0xb5933f():_0xb5933f)});return _0x643f2a['on']('escape',()=>{_0x5b2f90['fire']('escape');}),this['_bindAnnotationToEditors'](_0x643f2a,_0x5b2f90),_0x5f082a['add'](_0x5b2f90),_0x5b2f90;}['_bindAnnotationToEditors'](_0x5dd4c4,_0x33c517){this['listenTo'](_0x5dd4c4,'editorReady',(_0x71ca53,_0x18fa47)=>{const _0x2e20d8=_0x18fa47['ui']['view']['body']['bodyCollectionContainer'];_0x33c517['focusableElements']['add'](_0x2e20d8),this['context']instanceof _0x1b0da7&&this['context']['ui']['focusTracker']['add'](_0x2e20d8);},{'priority':'highest'}),this['listenTo'](_0x5dd4c4,'editorDestroyed',(_0x486ede,_0x34b132)=>{const _0x7c219d=_0x34b132['ui']['view']['body']['bodyCollectionContainer'];_0x33c517['focusableElements']['has'](_0x7c219d)&&_0x33c517['focusableElements']['remove'](_0x7c219d),this['context']instanceof _0x1b0da7&&this['context']['ui']['focusTracker']['remove'](_0x7c219d);});}['_unbindEditors'](_0x433011){this['stopListening'](_0x433011,'editorReady'),this['stopListening'](_0x433011,'editorDestroyed');}['_createCommentThreadView'](_0xeb81a2){const _0x1e24ff=this['context']['plugins']['get'](it),{config:_0x4dd957,locale:_0x4c03c6}=this['context'],_0x457ef5=pt(_0x4dd957['get']('locale'),_0x4c03c6);return new(0x0,(_0x4dd957['get']('comments'))['CommentThreadView'])(_0x4c03c6,_0xeb81a2,_0x1e24ff['me'],{'editorConfig':{..._0x4dd957['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4dd957['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4dd957['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4dd957['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4dd957['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x457ef5,'CommentView':_0x4dd957['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x311a4c,channelId:_0x124212,resolvedAt:_0x2224de,resolvedBy:_0x55dc81,isFromAdapter:_0x4a157b}){if(!this['hasCommentThread'](_0x311a4c))throw new _0x2cc838('commentsrepository-missing-comment-thread',null,{'threadId':_0x311a4c});const _0x395305=this['getCommentThread'](_0x311a4c);if(_0x395305['isResolved'])throw new _0x2cc838('commentsrepository-resolved-comment-thread',null,{'threadId':_0x311a4c});const _0x2a0a00=this['context']['plugins']['get'](it);if(_0x395305['resolvedBy']=_0x2a0a00['getUser'](_0x55dc81),_0x395305['resolvedAt']=_0x2224de,_0x4a157b||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3bdec3=this['context']['plugins']['get']('PendingActions'),_0x2413a7=_0x3bdec3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x124212,'threadId':_0x311a4c})['then'](({resolvedAt:_0x25d09b,resolvedBy:_0x347dbc})=>{_0x3bdec3['remove'](_0x2413a7),_0x395305['resolvedBy']['id']!==_0x347dbc&&(_0x395305['resolvedBy']=_0x2a0a00['getUser'](_0x347dbc)),_0x395305['resolvedAt']=_0x25d09b;})['catch'](_0x5b1c6a=>{throw console['error'](_0x5b1c6a),new _0x2cc838('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x440a68,channelId:_0x5621c4,isFromAdapter:_0x31fbb5}){if(!this['hasCommentThread'](_0x440a68))throw new _0x2cc838('commentsrepository-missing-comment-thread',null,{'threadId':_0x440a68});const _0x467dc6=this['getCommentThread'](_0x440a68);if(!_0x467dc6['isResolved'])throw new _0x2cc838('commentsrepository-reopen-comment-thread',null,{'threadId':_0x440a68});if(_0x467dc6['resolvedBy']=null,_0x467dc6['resolvedAt']=null,_0x31fbb5||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x388925=this['context']['plugins']['get']('PendingActions'),_0x94694f=_0x388925['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5621c4,'threadId':_0x440a68})['then'](()=>_0x388925['remove'](_0x94694f))['catch'](_0x193fef=>{throw console['error'](_0x193fef),new _0x2cc838('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2e0665,isFromAdapter:_0xb82c23}){const _0x3bd9b2=this['getCommentThread'](_0x2e0665);if(!_0x3bd9b2)throw new _0x2cc838('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2e0665),this['_threads']['delete'](_0x2e0665),!_0x3bd9b2['isSubmitted']||_0xb82c23||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x37e4a8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x42da1e}=_0x3bd9b2,_0x34a2d6=_0x37e4a8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x42da1e,'threadId':_0x2e0665})['then'](()=>_0x37e4a8['remove'](_0x34a2d6))['catch'](_0xe21051=>{throw console['error'](_0xe21051),new _0x2cc838('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5580c4,unlinkedAt:_0xd18a94,context:_0x5002a1,attributes:_0x2af075,isFromAdapter:_0x2a9806}){if('string'!=typeof _0x5580c4)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5580c4});if(!this['hasCommentThread'](_0x5580c4))throw new _0x2cc838('commentsrepository-missing-comment-thread',null,{'threadId':_0x5580c4});const _0x37c6f4=this['getCommentThread'](_0x5580c4);let _0x5753f8=!0x1;if(void 0x0!==_0x5002a1&&_0x37c6f4['context']!==_0x5002a1&&(_0x37c6f4['context']=_0x5002a1,_0x5753f8=!0x0),void 0x0!==_0xd18a94&&_0x37c6f4['unlinkedAt']!==_0xd18a94&&(_0x37c6f4['unlinkedAt']=_0xd18a94,_0x5753f8=!0x0),_0x2af075&&!At(_0x2af075,_0x37c6f4['attributes'])&&(_0x37c6f4['attributes']=_0x2af075,_0x5753f8=!0x0),!_0x5753f8)return Promise['resolve']();if(!_0x37c6f4['isSubmitted']||_0x2a9806||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x12cdfd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1960ea}=_0x37c6f4,_0x3130b9=_0x12cdfd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1960ea,'threadId':_0x5580c4,'context':_0x5002a1,'unlinkedAt':_0xd18a94,'attributes':_0x2af075})['then'](()=>_0x12cdfd['remove'](_0x3130b9))['catch'](_0x282009=>{throw console['error'](_0x282009),new _0x2cc838('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1c9296){const _0x136334=this['context']['plugins']['get'](y),_0x34d49c=this['getCommentThread'](_0x1c9296);if(_0x34d49c['_isAttached']=!0x1,this['_threadToController']['has'](_0x34d49c)){const _0x7ac81a=this['_threadToController']['get'](_0x34d49c),_0x11803b=_0x7ac81a['view'],_0x147111=_0x136334['getByInnerView'](_0x11803b);this['_threadToController']['delete'](_0x34d49c),this['_viewToController']['delete'](_0x11803b),_0x147111&&_0x136334['remove'](_0x147111),_0x7ac81a['destroy'](),_0x11803b['destroy']()['then'](()=>{this['_unbindEditors'](_0x11803b);});}}['_updateActiveAnnotation']({threadId:_0x420b0b,resolvedAt:_0x321b9d,unlinkedAt:_0x33da56}){const _0x48df13=!!_0x321b9d,_0x1e383c=this['context']['plugins']['get'](y),_0x588714=this['getCommentThread'](_0x420b0b);if(this['_threadToController']['has'](_0x588714)){const _0xcd8249=this['_threadToController']['get'](_0x588714)['view'],_0x20eb6d=_0x1e383c['getByInnerView'](_0xcd8249);_0x20eb6d&&(_0x48df13&&_0x1e383c['_removeActiveAnnotation'](_0x20eb6d),_0x33da56?_0x20eb6d['isVisible']=!0x1:_0x20eb6d['refreshVisibility']());}}['_getExternalAuthor'](_0x4964e6){const _0x2a2ac3=this['context']['plugins']['get'](it),_0x5e18c5=It('external:'+_0x4964e6),_0x35e5cb=_0x2a2ac3['getUser'](_0x5e18c5);return _0x35e5cb||_0x2a2ac3['addUser']({'id':_0x5e18c5,'name':_0x4964e6});}['_createNewComment']({threadId:_0x4aa1d0,commentId:_0x17de47=_0x2f2703(),content:_0x3cb91e,authorId:_0x5996b6,createdAt:_0x5055df,attributes:_0x3103f8}){if('string'!=typeof _0x17de47)throw new _0x2cc838('commentsrepository-invalid-commentid');if('string'!=typeof _0x5996b6)throw new _0x2cc838('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3cb91e||!_0x3cb91e['trim']())throw new _0x2cc838('commentsrepository-invalid-comment-content');const _0x3df70f=this['context']['plugins']['get'](it)['getUser'](_0x5996b6);if(!_0x3df70f)throw new _0x2cc838('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5996b6});let _0x4c012e=null,_0x14a3a7=_0x5055df;return _0x3103f8?.['@external']&&(_0x4c012e=this['_getExternalAuthor'](_0x3103f8['@external']['authorName']),_0x14a3a7=new Date(_0x3103f8['@external']['createdAt'])),new wi(this,{'threadId':_0x4aa1d0,'id':_0x17de47,'author':_0x4c012e||_0x3df70f,'creator':_0x3df70f,'content':_0x3cb91e,'createdAt':_0x5055df,'authoredAt':_0x14a3a7,'attributes':_0x3103f8});}['_addComment'](_0x461791){let {threadId:_0x126779,content:_0x5a11ed,attributes:_0x400258,isFromAdapter:_0x16fc00}=_0x461791;const _0x36ad83=this['getCommentThread'](_0x461791['threadId']);if(!_0x36ad83)throw new _0x2cc838('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2b482f=this['_createNewComment'](_0x461791),{id:_0x2ce3ba}=_0x2b482f;if(_0x36ad83['_add'](_0x2b482f),_0x16fc00||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x36ad83['isSubmitted'])return Promise['resolve']();const _0x644f06=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7f0dfd}=_0x36ad83,_0x4442c9=_0x644f06['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x400258||(_0x400258={}),this['adapter']['addComment']({'channelId':_0x7f0dfd,'threadId':_0x126779,'commentId':_0x2ce3ba,'content':_0x5a11ed,'attributes':_0x400258})['then'](_0x3ed7a4=>{_0x644f06['remove'](_0x4442c9),_0x3ed7a4&&this['_updateComment']({'channelId':_0x7f0dfd,'threadId':_0x126779,'commentId':_0x2ce3ba,'createdAt':_0x3ed7a4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x218f6a=>{throw console['error'](_0x218f6a),new _0x2cc838('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x237e1c,commentId:_0x20a46b,content:_0x324278,createdAt:_0x5284aa,attributes:_0x31b146,isFromAdapter:_0x2d03d3}){if(void 0x0!==_0x324278&&('string'!=typeof _0x324278||!_0x324278['trim']()['length']))throw new _0x2cc838('commentsrepository-update-comment-invalid-content');const _0x2229c1=this['getCommentThread'](_0x237e1c),_0x28efca=_0x2229c1['getComment'](_0x20a46b);if(!_0x28efca)throw new _0x2cc838('commentsrepository-update-missing-comment',this);let _0x39778f=!0x1;if(_0x324278&&_0x324278!==_0x28efca['content']&&(_0x28efca['isEditable']||_0x2d03d3)&&(_0x28efca['content']=_0x324278,_0x39778f=!0x0),_0x5284aa&&_0x5284aa!==_0x28efca['createdAt']&&(_0x28efca['createdAt']=_0x5284aa,_0x28efca['attributes']&&_0x28efca['attributes']['@external']||(_0x28efca['authoredAt']=_0x5284aa),_0x39778f=!0x0),_0x31b146&&!At(_0x31b146,_0x28efca['attributes'])&&(_0x28efca['attributes']=_0x31b146,_0x39778f=!0x0),!_0x39778f)return Promise['resolve']();if(_0x2229c1['fire']('commentUpdated'),_0x2d03d3||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2eb26b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x21d050}=this['getCommentThread'](_0x28efca['threadId']),_0x5b6f46=_0x2eb26b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x21d050,'threadId':_0x237e1c,'commentId':_0x20a46b,'content':_0x324278,'attributes':_0x31b146})['then'](()=>_0x2eb26b['remove'](_0x5b6f46))['catch'](_0xf34a9e=>{throw console['error'](_0xf34a9e),new _0x2cc838('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x4de302,commentId:_0x33aa7c,isFromAdapter:_0x49af17}){const _0x16d18a=this['getCommentThread'](_0x4de302),_0x372d50=_0x16d18a['getComment'](_0x33aa7c);if(!_0x372d50)throw new _0x2cc838('commentsrepository-remove-missing-comment',this);if(_0x16d18a['_remove'](_0x372d50),_0x49af17||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3c3c5c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2b95c3}=_0x16d18a,_0x240bc2=_0x3c3c5c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2b95c3,'threadId':_0x4de302,'commentId':_0x33aa7c})['then'](()=>_0x3c3c5c['remove'](_0x240bc2))['catch'](_0x5a80d8=>{throw console['error'](_0x5a80d8),new _0x2cc838('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0x3e3063(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1f1514,_0x10f5f2){super();const _0x4777d9=_0x10f5f2['isResolvable'];this['channelId']=_0x10f5f2['channelId'],this['id']=_0x10f5f2['id'],this['comments']=new _0x4d5d77(),this['_repository']=_0x1f1514,this['_isAttached']=!0x1,this['_isSubmitted']=_0x10f5f2['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1f1514,'_permissions',_0x1f1514,'_readOnlyChannels',()=>_0x1f1514['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1f1514,'_permissions',()=>_0x1f1514['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1f1514,'_permissions',()=>{const _0x3d159e=_0x1f1514['getPermissions'](this['channelId']);return _0x3d159e['write']||_0x3d159e['admin'];}),this['bind']('isResolvable')['to'](_0x1f1514,'_permissions',()=>_0x4777d9&&_0x1f1514['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x10f5f2['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1988f0,_0x2170dc)=>_0x1988f0?_0x2170dc?_0x1988f0<_0x2170dc?_0x1988f0:_0x2170dc:_0x1988f0:_0x2170dc),this['set']('unlinkedAt',_0x10f5f2['unlinkedAt']||null),this['set']('resolvedAt',_0x10f5f2['resolvedAt']||null),this['set']('resolvedBy',_0x10f5f2['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x542160=>!!_0x542160),this['set']('attributes',_0x10f5f2['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x229776,_0x146b8a)=>_0x229776+_0x146b8a['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x438c5e,id:_0x108b05}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x438c5e),{'channelId':_0x438c5e,'threadId':_0x108b05});}['setUnlinkedAt'](_0x5499cc){this['_update']({'unlinkedAt':_0x5499cc});}['resolve']({resolvedAt:_0x2aaca4=new Date(),resolvedBy:_0x253dc3=null,isFromAdapter:_0x2ac236=!0x1}={}){const _0x129f35=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x9e32a7,id:_0x5c45e0}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x9e32a7),{'channelId':_0x9e32a7,'threadId':_0x5c45e0,'resolvedAt':_0x2aaca4,'resolvedBy':_0x253dc3||_0x129f35['id'],'isFromAdapter':_0x2ac236});}['reopen']({isFromAdapter:_0x4968f7=!0x1}={}){const {channelId:_0x7dc3ec,id:_0x34b9b5}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x7dc3ec),{'channelId':_0x7dc3ec,'threadId':_0x34b9b5,'isFromAdapter':_0x4968f7});}['setContext'](_0x481ebe){this['context']||this['_update']({'context':_0x481ebe});}['setAttribute'](_0x4f1c72,_0x54b416){const _0x215889=wt(this['attributes']);yt(_0x215889,_0x4f1c72,_0x54b416),this['_update']({'attributes':_0x215889});}['removeAttribute'](_0x175f85){const _0x1248d7=wt(this['attributes']);Ct(_0x1248d7,_0x175f85),this['_update']({'attributes':_0x1248d7});}['remove']({isFromAdapter:_0x26e4ee=!0x1}={}){const {channelId:_0x1b9f2d,id:_0x1fe3c5}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x1b9f2d),{'channelId':_0x1b9f2d,'threadId':_0x1fe3c5,'isFromAdapter':_0x26e4ee});}['attachTo'](_0x48c48c){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x48c48c});}['addComment'](_0xd5b4b1){const {channelId:_0x3769c3,id:_0x21392b}=this;this['_repository']['fire'](Nt('addComment',_0x3769c3,_0x21392b),Object['assign']({'channelId':_0x3769c3,'threadId':_0x21392b},_0xd5b4b1));}['getComment'](_0x3ac3fe){if('string'!=typeof _0x3ac3fe)throw new _0x2cc838('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x3ac3fe});return this['comments']['get'](_0x3ac3fe);}['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'](_0x1241bf=>_0x1241bf['toJSON']()),'attributes':this['attributes']};}['_add'](_0x29660b){return this['listenTo'](_0x29660b,'change:authoredAt',()=>{const _0x5301f8=this['_findOptimalIndex'](_0x29660b),_0x1ab6e5=this['comments'];_0x5301f8-0x1!=_0x1ab6e5['getIndex'](_0x29660b)&&_0x5301f8+0x1!=_0x1ab6e5['getIndex'](_0x29660b)&&(this['_remove'](_0x29660b),this['_add'](_0x29660b));}),this['comments']['add'](_0x29660b,this['_findOptimalIndex'](_0x29660b));}['_update'](_0x5c7091){const {channelId:_0x388abc,id:_0x342da3}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x388abc),{..._0x5c7091,'channelId':_0x388abc,'threadId':_0x342da3});}['_remove'](_0x3f6948){return this['stopListening'](_0x3f6948),_0x3f6948['destroy'](),this['comments']['remove'](_0x3f6948);}['_findOptimalIndex'](_0x120ff4){const _0x5c1d8a=this['comments']['find'](_0x161578=>new Date(_0x161578['authoredAt'])['getTime']()>new Date(_0x120ff4['authoredAt'])['getTime']());return _0x5c1d8a?this['comments']['getIndex'](_0x5c1d8a):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0x3e3063(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1d6b0c,_0x336b10){super();const _0x259979=_0x1d6b0c['context']['plugins']['get'](it)['me'],_0x3d7dfc=_0x1d6b0c['getCommentThread'](_0x336b10['threadId']),_0x3599d2=0x0===_0x3d7dfc['comments']['length'],_0x5b6421=_0x259979===_0x336b10['author'];this['id']=_0x336b10['id'],this['threadId']=_0x336b10['threadId'],this['author']=_0x336b10['author'],this['creator']=_0x336b10['creator'],this['isExternal']=Boolean(_0x336b10['attributes']&&_0x336b10['attributes']['@external']),this['set']('content',_0x336b10['content']),this['createdAt']=_0x336b10['createdAt']||new Date(),this['set']('authoredAt',_0x336b10['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3d7dfc,'resolvedAt'),this['set']('attributes',_0x336b10['attributes']||{}),this['bind']('isEditable')['to'](_0x1d6b0c,'_permissions',()=>{const _0x235912=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['write'],_0x2163a1=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['modifyAll'];return _0x5b6421&&_0x235912||!_0x5b6421&&_0x2163a1;}),this['bind']('isRemovable')['to'](_0x3d7dfc,'isRemovable',_0x1d6b0c,'_permissions',_0x4b388c=>{const _0x145af3=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['write'],_0x7ae242=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['modifyAll'];return _0x5b6421&&_0x145af3||_0x4b388c&&_0x3599d2||!_0x5b6421&&_0x7ae242&&!_0x3599d2;}),this['bind']('isReadOnly')['to'](_0x3d7dfc,'isReadOnly'),this['_repository']=_0x1d6b0c;}get['weight'](){return Math['max'](function(_0x1b1fc3){const _0x379083=document['createElement']('div');return _0x379083['innerHTML']=_0x1b1fc3,_0x379083['textContent']['length'];}(this['content']),0xc8);}['update'](_0x409c36){const {threadId:_0x5aa64d,id:_0x2931ca}=this;if(!this['_repository']['hasCommentThread'](_0x5aa64d))throw new _0x2cc838('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x545c3d}=this['_repository']['getCommentThread'](_0x5aa64d);this['_repository']['fire'](Nt('updateComment',_0x545c3d,_0x5aa64d),{'channelId':_0x545c3d,'threadId':_0x5aa64d,'commentId':_0x2931ca,..._0x409c36});}['setAttribute'](_0x38d147,_0x345dda){const _0xf2f29b=wt(this['attributes']);yt(_0xf2f29b,_0x38d147,_0x345dda),this['update']({'attributes':_0xf2f29b});}['removeAttribute'](_0x13aace){const _0x159bc5=wt(this['attributes']);Ct(_0x159bc5,_0x13aace),this['update']({'attributes':_0x159bc5});}['remove'](_0x51ef2c={}){if(!_0x51ef2c['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xd15db4,id:_0x5f2af1}=this;if(!this['_repository']['hasCommentThread'](_0xd15db4))throw new _0x2cc838('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x157531}=this['_repository']['getCommentThread'](_0xd15db4);this['_repository']['fire'](Nt('removeComment',_0x157531,_0xd15db4),{'channelId':_0x157531,'threadId':_0xd15db4,'commentId':_0x5f2af1,..._0x51ef2c});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x446f02,..._0x18e2e3){for(const _0x2da497 of _0x18e2e3)void 0x0!==_0x2da497&&(_0x446f02+=':'+String(_0x2da497));return _0x446f02;}class ot extends _0x2d7805{constructor(_0x26b13f){super(_0x26b13f),this['set']('hasContent',!0x1);}['refresh'](){const _0x6319cc=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x38c2e8 of _0x6319cc['getRanges']())if(this['_hasContent'](_0x38c2e8))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3fe051=_0x2f2703(),ranges:_0x1c3139,comment:_0x40888f}={}){const _0x200a12=this['editor']['model'],_0x11e3d7=_0x1c3139??Array['from'](_0x200a12['document']['selection']['getRanges']()),_0x438a8b=[];for(const _0x1f90e5 of _0x11e3d7)this['_hasContent'](_0x1f90e5)&&_0x438a8b['push'](this['_trimToContent'](_0x1f90e5));if(!_0x438a8b['length'])throw new _0x2cc838('addcommentthreadcommand-incorrect-ranges',null);_0x40888f&&this['_createCommentThread'](_0x3fe051,_0x40888f),this['_createMarkersFromRanges'](_0x3fe051,_0x438a8b,!!_0x40888f);}['_createMarkersFromRanges'](_0x35c67b,_0x5df179,_0x462ada){this['editor']['model']['change'](_0x40e172=>{for(const _0x3fc86e of _0x5df179){const _0x21f19a=_0x2f2703()['substr'](0x1,0x5),_0x5369f1='comment:'+_0x35c67b+':'+_0x21f19a;_0x40e172['addMarker'](_0x5369f1,{'range':_0x3fc86e,'usingOperation':_0x462ada,'affectsData':_0x462ada});}});}['_createCommentThread'](_0x3d801c,_0x2f3266){const _0x1d4643=this['editor']['plugins']['get']('CommentsRepository'),_0x5450f7=this['editor']['config']['get']('collaboration.channelId'),_0x3c73c0=this['editor']['plugins']['get']('Users')['me'];if(!_0x3c73c0)throw new _0x2cc838('addcommentthreadcommand-user-not-found',null);_0x1d4643['addCommentThread']({'threadId':_0x3d801c,'channelId':_0x5450f7,'comments':[{'authorId':_0x3c73c0['id'],'content':_0x2f3266,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x386fa0){for(const _0x226cc7 of _0x386fa0['getItems']())if(this['_itemIsContent'](_0x226cc7))return!0x0;return!0x1;}['_itemIsContent'](_0x7d4818){return _0x7d4818['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x7d4818)&&!_0x7d4818['is']('element','tableCell');}['_trimToContent'](_0x2df054){const _0x42fa2e=_0x3c503a=>!this['_itemIsContent'](_0x3c503a['item']),_0x1d7c2b=_0x2df054['start']['getLastMatchingPosition'](_0x42fa2e),_0x1e9e78=_0x2df054['end']['getLastMatchingPosition'](_0x42fa2e,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1d7c2b,_0x1e9e78);}}class b extends _0x6d2056{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5cacc0){super(_0x5cacc0),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1a93d5=this['editor'],_0x577d18=_0x1a93d5['model']['document']['selection'],_0x2db02d=_0x35ab00(()=>this['refreshSelectedViews'](),0xa);_0x577d18['on']('change:range',(_0x420110,_0xb5d22a)=>{_0xb5d22a['directChange']&&(_0x2db02d['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1a93d5['editing']['view']['document'],'change:isFocused',(_0x5f2459,_0xa02d20,_0x2c7bdf)=>{_0x2c7bdf&&_0x2db02d();}),this['listenTo'](_0x1a93d5['ui']['focusTracker'],'change:isFocused',(_0x562331,_0x1997a9,_0x33ba2e)=>{_0x33ba2e||this['fire']('blur',{'isAnnotationTracked':_0x528ca6=>this['_editorAnnotationsData']['has'](_0x528ca6['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5136db){if(this['_editorAnnotations']['has'](_0x5136db['view']))return;this['_editorAnnotations']['add'](_0x5136db['view']),this['editor']['ui']['focusTracker']['add'](_0x5136db['view']['element']);const _0x5a3a6c=this['editor']['plugins']['get'](y);this['listenTo'](_0x5a3a6c['collection'],'remove',(_0x33c2f4,_0x3aa74a)=>{this['editor']['ui']['focusTracker']['remove'](_0x3aa74a['view']['element']),this['_editorAnnotations']['delete'](_0x3aa74a['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x311e74){if('function'!=typeof _0x311e74)throw new _0x2cc838('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x311e74);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xdfd8a3,annotations:_0x1f60c9}){const _0x2fd4b0=[],_0x19a129=this['editor']['model']['document']['selection'],_0x5f25c5=Array['from'](_0x19a129['getRanges']());for(const [_0x460ccf,_0x379443]of this['_editorAnnotationsData']){const _0x27694d=_0x1bb795(_0x379443),_0x4eddc3=_0x1f60c9['getByInnerView'](_0x460ccf);_0x27694d&&_0x4eddc3&&_0x2fd4b0['push']({'annotation':_0x4eddc3,'range':_0x27694d});}function _0x1bb795(_0x856fc7){for(const _0xdf69ee of _0x856fc7)for(const _0x3f261d of _0x5f25c5)if(_0xdf69ee['containsRange'](_0x3f261d,!_0x19a129['isCollapsed']))return _0xdf69ee;return null;}return _0x2fd4b0['sort']((_0x33f35e,_0x5c7b23)=>{const _0x5cd4cb=_0x33f35e['range'],_0x4fd2db=_0x5c7b23['range'];if(!_0x5cd4cb['isEqual'](_0x4fd2db)){if(_0x5cd4cb['containsRange'](_0x4fd2db,!0x0))return 0x1;if(_0x4fd2db['containsRange'](_0x5cd4cb,!0x0))return-0x1;}return _0x33f35e['annotation']==_0xdfd8a3?-0x1:_0x5c7b23['annotation']==_0xdfd8a3?0x1:0x0;})['map'](_0x48041c=>_0x48041c['annotation']);}get['_editorAnnotationsData'](){const _0x555290=new Map();for(const _0x308995 of Array['from'](this['_dataCollectors']))for(const [_0x16d12b,_0x2049ad]of _0x308995())_0x555290['set'](_0x16d12b,_0x2049ad);return _0x555290;}}class st extends _0x6d2056{['afterInit'](){const _0x303441=this['editor'];if(!_0x303441['plugins']['has']('RestrictedEditingModeEditing'))return;_0x303441['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x6d2056{constructor(_0x37e932){super(_0x37e932),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2affe0=this['editor'],_0x130d98=_0x2affe0['commands']['get']('importWord'),_0x190fae=_0x2affe0['plugins']['get'](it);_0x130d98&&(_0x130d98['on']('execute',(_0x1dc417,[,_0x3c03bf])=>{_0x3c03bf['collaboration_features']={'comments':!0x0,'user_id':_0x190fae['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x130d98,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x55ea29,_0x12e940){const {comment_threads:_0x378425}=_0x12e940;_0x378425&&_0x378425['forEach'](({thread_id:_0x1524fc,comments:_0x3fea25,is_resolved:_0x462d3d})=>{const _0x16c0e6=new Date(),_0x504d04=_0x3fea25['map'](({author:_0x115b71,content:_0x2de15c,created_at:_0x2b075f})=>({'content':_0x2de15c,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x16c0e6,'attributes':{'@external':{'authorName':_0x115b71,'createdAt':_0x2b075f?new Date(_0x2b075f):new Date(),'source':'importWord'}}})),_0x3b29ef=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3b29ef,'threadId':_0x1524fc,'comments':_0x504d04,'resolvedAt':_0x462d3d?_0x16c0e6:null});});}}class at extends _0x6d2056{constructor(_0x37d336){super(_0x37d336),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5f4077=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5f4077,'contentInsertion',(_0x3367a7,_0x6e2b0d)=>this['_removeMarkersWithoutThreads'](_0x6e2b0d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x6353e7){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x6353e7;const _0x3f422d=this['editor']['plugins']['get']('CommentsRepository');for(const _0x11e984 of _0x6353e7['keys']()){const [_0x286918,_0x44e6c0]=_0x11e984['split'](':');'comment'!=_0x286918||_0x3f422d['hasCommentThread'](_0x44e6c0)||_0x6353e7['delete'](_0x11e984);}return _0x6353e7;}['_registerMarkerInClipboardPipeline'](){const _0x47c247=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x49c1a5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x49c1a5&&_0x47c247['_registerMarkerToCopy']('comment',_0x49c1a5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2715af){switch(_0x2715af){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5ec4d9){const _0x411889=_0x5ec4d9['split'](':');return{'group':_0x411889[0x0],'id':_0x411889[0x1],'part':_0x411889[0x2]};}class ut extends _0x6d2056{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3cd63e,_0xc19e64)=>{if(!_0xc19e64['options']['showCommentHighlights'])return null;if(_0xc19e64['options']['ignoreResolvedComments']){const {id:_0x3fd657}=ft(_0x3cd63e['markerName']),_0xdf495a=this['editor']['plugins']['get'](o);if(_0xdf495a['getCommentThread'](_0x3fd657)?.['isResolved']&&_0x3cd63e['item'])return _0xc19e64['consumable']['consume'](_0x3cd63e['item'],'addMarker:'+_0x3cd63e['markerName']),_0xc19e64['consumable']['consume'](_0x3cd63e['item'],'removeMarker:'+_0x3cd63e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5ef63f=>{_0x5ef63f['on']('addMarker:comment',(_0x1efc0,_0x4830bf,_0x1e2ed8)=>{if(!_0x1e2ed8['options']['showCommentHighlights'])return;const _0x3e2922=_0x4830bf['item'];if(!_0x3e2922)return;const _0xf27d0c=_0x1e2ed8['mapper']['toViewElement'](_0x3e2922);this['editor']['model']['schema']['isObject'](_0x3e2922)&&_0xf27d0c&&!_0xf27d0c['getCustomProperty']('widget')&&_0xf27d0c['is']('containerElement')&&_0x3d60c9(_0xf27d0c,_0x1e2ed8['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5dfe9c,{writer:_0x3c5e1d,options:_0x443a9a})=>{if(!_0x443a9a['showCommentHighlights'])return null;const _0x21d98e=_0x3c5e1d['createContainerElement']('div'),_0x220705=_0x3c5e1d['createEmptyElement']('hr');return _0x3c5e1d['addClass']('ck-horizontal-line',_0x21d98e),_0x3c5e1d['insert'](_0x3c5e1d['createPositionAt'](_0x21d98e,0x0),_0x220705),_0x21d98e;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x488cea,{writer:_0x500da2,options:_0x4a5502})=>{if(!_0x4a5502['showCommentHighlights'])return null;const _0x1928b3=_0x500da2['createContainerElement']('span'),_0x798e5b=_0x500da2['createEmptyElement']('img');return _0x500da2['addClass']('image-inline',_0x1928b3),_0x500da2['insert'](_0x500da2['createPositionAt'](_0x1928b3,0x0),_0x798e5b),_0x1928b3;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x66de85,{writer:_0x4a1721,options:_0x21f5b1})=>{if(_0x21f5b1['showCommentHighlights'])return _0x4a1721['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2aeb2e,_0x3f820f,_0x3c8bad)=>{_0x3c8bad['options']['showCommentHighlights']&&_0x2aeb2e['stop']();},{'priority':'high'});}}class r extends _0x6d2056{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19f109){super(_0x19f109),this['set']('isThreadsLoadingPaused',!0x0),_0x19f109['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1ae9e9,_0x47d2bb,_0x545352,_0x458feb)=>{const _0x4bc907=_0x19f109['plugins']['get'](o),_0x445479=_0x545352?ft(_0x545352)['id']:null;_0x19f109['model']['change'](()=>{if(_0x445479){const _0x5e7bce=this['getAllMarkersForId'](_0x445479);for(const _0x37e73a of _0x5e7bce)_0x19f109['editing']['reconvertMarker'](_0x37e73a);}if(_0x458feb){const {id:_0x170730}=ft(_0x458feb),_0x242bc1=_0x4bc907['getCommentThread'](_0x170730);if(_0x242bc1&&_0x242bc1['unlinkedAt'])return;if(_0x242bc1&&!_0x242bc1['isAttached'])return;const _0x2fe6be=this['getAllMarkersForId'](_0x170730);for(const _0x1a256c of _0x2fe6be)_0x19f109['editing']['reconvertMarker'](_0x1a256c);}}),_0x445479&&this['scrollToThreadMarker'](_0x445479);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x1d719c=this['editor'],_0x2e5829=_0x1d719c['plugins']['get'](o),_0x50a6cb=_0x1d719c['config']['get']('collaboration.channelId'),_0x287056=_0x2e5829['getCommentThreads']()['filter'](_0x147bcd=>_0x147bcd['channelId']!==_0x50a6cb);_0x1d719c['commands']['add']('addCommentThread',new ot(_0x1d719c)),this['listenTo'](_0x1d719c,'change:isReadOnly',(_0x23088a,_0xb1dd5b,_0x5aa870)=>{_0x2e5829['switchReadOnly'](_0x5aa870,_0x1d719c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2e5829,dt('addCommentThread',_0x50a6cb),(_0x21e911,{threadId:_0x4fde66})=>{const _0x2ec32b=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4fde66);_0x2ec32b?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4fde66);}),this['listenTo'](_0x2e5829,dt('removeCommentThread',_0x50a6cb),(_0xa77f0f,{threadId:_0x138d87})=>{_0x1d719c['model']['enqueueChange']({'isUndoable':!0x1},_0x1ef85f=>{const _0x80e49a=this['getAllMarkersForId'](_0x138d87);for(const _0x54166b of _0x80e49a)_0x1ef85f['removeMarker'](_0x54166b);});}),this['listenTo'](_0x2e5829,dt('resolveCommentThread',_0x50a6cb),(_0x5025c4,{threadId:_0x5d19c7})=>{(this['_reconvertMarkers'](_0x5d19c7),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5d19c7)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2e5829,dt('reopenCommentThread',_0x50a6cb),(_0x44d82a,{threadId:_0xf4d149})=>{this['_reconvertMarkers'](_0xf4d149);},{'priority':'low'}),this['listenTo'](_0x2e5829,dt('addComment',_0x50a6cb),(_0x18b3f8,{threadId:_0x305dcf,isFromAdapter:_0x38e46c})=>{const _0x40d75f=this['getAllMarkersForId'](_0x305dcf);if(_0x38e46c||0x0==_0x40d75f['length']||!_0x2e5829['hasCommentThread'](_0x305dcf))return;0x1===_0x2e5829['getCommentThread'](_0x305dcf)['length']&&_0x1d719c['model']['enqueueChange']({'isUndoable':!0x1},_0x495897=>{for(const _0x43d822 of _0x40d75f)_0x495897['updateMarker'](_0x43d822,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x287056);}['afterInit'](){!async function(_0xa7ae8e){const _0x12ccfd=_0x304d83([0x4d,0x4e,0x4c,0x45,0x4f,0x50,0x57,0x58,0x5a,0x69,0x6f,0x68,0x31,0x54,0x38,0x70,0x56,0x75,0x77,0x61,0x6c,0x65,0x34,0x39,0x76,0x32,0x37,0x42,0x36,0x6b,0x6a,0x52,0x6d,0x49,0x51,0x63,0x78,0x62,0x47,0x48,0x30,0x59,0x79,0x7a,0x66,0x4a,0x46,0x41,0x43,0x4b,0x71,0x44,0x53,0x6e,0x73,0x64,0x35,0x33,0x74,0x55,0x72,0x67]),_0x331356=0x213e51b3,_0x4b7f02=0x213923e3^_0x331356,_0x6ec92=window[_0x304d83([0x44,0x61,0x74,0x65])][_0x304d83([0x6e,0x6f,0x77])](),_0x424d62=_0xa7ae8e[_0x304d83([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x43e1ac=new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17eaf3=>{_0x424d62[_0x304d83([0x6f,0x6e,0x63,0x65])](_0x304d83([0x72,0x65,0x61,0x64,0x79]),_0x17eaf3);}),_0x357450={[_0x304d83([0x6b,0x74,0x79])]:_0x304d83([0x45,0x43]),[_0x304d83([0x75,0x73,0x65])]:_0x304d83([0x73,0x69,0x67]),[_0x304d83([0x63,0x72,0x76])]:_0x304d83([0x50,0x2d,0x32,0x35,0x36]),[_0x304d83([0x78])]:_0x304d83([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]),[_0x304d83([0x79])]:_0x304d83([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]),[_0x304d83([0x61,0x6c,0x67])]:_0x304d83([0x45,0x53,0x32,0x35,0x36])},_0x5e04d2=_0x424d62[_0x304d83([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x304d83([0x67,0x65,0x74])](_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x405082(){let _0x1d1137,_0x3197ac=null,_0x3733b3=null;try{if(_0x5e04d2==_0x304d83([0x47,0x50,0x4c]))return _0x304d83([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1d1137=_0x1de278(),!_0x1d1137)return _0x304d83([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1d1137[_0x304d83([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3733b3=_0x1efa49(_0x1d1137[_0x304d83([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1d1137[_0x304d83([0x6a,0x74,0x69])])),await _0x9817e2()?_0xf3b585()?_0x181661()?_0x304d83([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x363c0b()?(_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x304d83([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3197ac=_0x17916a(_0x304d83([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x304d83([0x74,0x72,0x69,0x61,0x6c])&&(_0x3197ac=_0x17916a(_0x304d83([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x53d50c()):_0x304d83([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x304d83([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x304d83([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x304d83([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x181661(){const _0xae1d08=[_0x304d83([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x304d83([0x74,0x72,0x69,0x61,0x6c])][_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x6ec92/0x3e8:0xe10*_0x4b7f02;return _0x1d1137[_0x304d83([0x65,0x78,0x70])]<_0xae1d08;}function _0xf3b585(){const _0x539bab=_0x1d1137[_0x304d83([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x539bab)return!0x1;if(_0x539bab[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x2a])))return!0x0;if(_0x539bab[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x43,0x4d,0x54])))return!0x0;if(_0x539bab[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x52,0x43,0x4d,0x54]))){if(_0x172e89())return!0x0;if(_0x2b2120()||_0x3fe7d3())return!0x0;}return!0x1;}function _0x363c0b(){const _0x51d234=_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x51d234||0x0==_0x51d234[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xb6c678}=new URL(window[_0x304d83([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x51d234[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb6c678))return!0x0;const _0x368735=_0xb6c678[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e]));return _0x51d234[_0x304d83([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3e0402=>_0x3e0402[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x2a])))[_0x304d83([0x6d,0x61,0x70])](_0x22dba3=>_0x22dba3[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e])))[_0x304d83([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11d016=>_0x11d016[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x368735[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x304d83([0x6d,0x61,0x70])](_0x885145=>Array(_0x368735[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x885145[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x304d83([0x66,0x69,0x6c,0x6c])](_0x885145[0x0]===_0x304d83([0x2a])?_0x304d83([0x2a]):'')[_0x304d83([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x885145))[_0x304d83([0x73,0x6f,0x6d,0x65])](_0x483ccf=>_0x368735[_0x304d83([0x65,0x76,0x65,0x72,0x79])]((_0x5ad9e4,_0x457276)=>_0x483ccf[_0x457276]===_0x5ad9e4||_0x483ccf[_0x457276]===_0x304d83([0x2a])));}function _0x53d50c(){return _0x3197ac&&_0x3733b3?new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3bd79c,_0x5bbb0e)=>{_0x3197ac[_0x304d83([0x74,0x68,0x65,0x6e])](_0x3bd79c,_0x5bbb0e),_0x3733b3[_0x304d83([0x74,0x68,0x65,0x6e])](_0x5e97ee=>{_0x5e97ee!=_0x304d83([0x56,0x61,0x6c,0x69,0x64])&&_0x3bd79c(_0x5e97ee);},_0x5bbb0e);}):_0x3197ac||_0x3733b3||_0x304d83([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1efa49(_0x4248ee,_0x5e72b6){return new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2cf861=>{if(_0x52cb22())return _0x2cf861(_0x304d83([0x56,0x61,0x6c,0x69,0x64]));_0x35b36a(),_0x424d62[_0x304d83([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x304d83([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x23b7f0=!0x1;const _0x6d5627=_0x2f2703();function _0x24fe69(_0x5a6d5d){return!!_0x5a6d5d&&(typeof _0x5a6d5d===_0x304d83([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5a6d5d===_0x304d83([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5a6d5d[_0x304d83([0x74,0x68,0x65,0x6e])]===_0x304d83([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5a6d5d[_0x304d83([0x63,0x61,0x74,0x63,0x68])]===_0x304d83([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1b3caf(_0x1e9b86){_0x488172(_0x1e9b86)[_0x304d83([0x74,0x68,0x65,0x6e])](_0xfa2d1d=>{if(!_0xfa2d1d||_0xfa2d1d[_0x304d83([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x304d83([0x6f,0x6b]))return _0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1da36b(_0x40651f(_0x6d5627+_0x5e72b6))!=_0xfa2d1d[_0x304d83([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x304d83([0x56,0x61,0x6c,0x69,0x64]);})[_0x304d83([0x74,0x68,0x65,0x6e])](_0x2375c3=>(_0x2a61e3(),_0x2375c3),()=>{const _0x5065b8=_0x5d6aa8();return null==_0x5065b8?(_0x2a61e3(),_0x304d83([0x56,0x61,0x6c,0x69,0x64])):_0x304d83(_0x6ec92-_0x5065b8>(0x532d5b3^_0x331356)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x304d83([0x74,0x68,0x65,0x6e])](_0x2cf861)[_0x304d83([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2cf861(_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4d8fc5=0x2108bf33^_0x331356;function _0x2a61e3(){const _0x127877=_0x304d83([0x6c,0x6c,0x63,0x74,0x2d])+_0x1da36b(_0x40651f(_0x4248ee)),_0x39c817=_0x10813a(_0x1da36b(window[_0x304d83([0x4d,0x61,0x74,0x68])][_0x304d83([0x63,0x65,0x69,0x6c])](_0x6ec92/_0x4d8fc5)));window[_0x304d83([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x304d83([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x127877,_0x39c817);}function _0x5d6aa8(){const _0xd4226c=_0x304d83([0x6c,0x6c,0x63,0x74,0x2d])+_0x1da36b(_0x40651f(_0x4248ee)),_0xbd8371=window[_0x304d83([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x304d83([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd4226c);return _0xbd8371?window[_0x304d83([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10813a(_0xbd8371),0x10)*_0x4d8fc5:null;}function _0x488172(_0x1ef958){return new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xccc14a,_0x2c7ca5)=>{_0x1ef958[_0x304d83([0x74,0x68,0x65,0x6e])](_0xccc14a,_0x2c7ca5),window[_0x304d83([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2c7ca5,0x213f8573^_0x331356);});}}_0x424d62[_0x304d83([0x6f,0x6e])](_0x304d83([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1f4f76,_0x1f8f78)=>{if(_0x1f8f78[0x0]!=_0x4248ee)return _0x2cf861(_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1f8f78[0x1]={..._0x1f8f78[0x1],[_0x304d83([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x6d5627};},{[_0x304d83([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x304d83([0x68,0x69,0x67,0x68])}),_0x424d62[_0x304d83([0x6f,0x6e])](_0x304d83([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x469193=>{_0x24fe69(_0x469193[_0x304d83([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x23b7f0=!0x0,_0x1b3caf(_0x469193[_0x304d83([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x304d83([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x304d83([0x6c,0x6f,0x77])}),_0x43e1ac[_0x304d83([0x74,0x68,0x65,0x6e])](()=>{_0x23b7f0||_0x2cf861(_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52cb22(){return _0x424d62[_0x304d83([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x304d83([0x76,0x69,0x65,0x77])][_0x304d83([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x304d83([0x61,0x75,0x74,0x6f]);}function _0x35b36a(){_0x424d62[_0x304d83([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x304d83([0x76,0x69,0x65,0x77])][_0x304d83([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x304d83([0x61,0x75,0x74,0x6f]);}}function _0x17916a(_0x29fd5c){const _0x24eeaa=[new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xcf5a9=>setTimeout(_0xcf5a9,0x21376f7f^_0x331356)),_0x43e1ac[_0x304d83([0x74,0x68,0x65,0x6e])](()=>new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ae218=>{let _0x1cd314=0x0;_0x424d62[_0x304d83([0x6d,0x6f,0x64,0x65,0x6c])][_0x304d83([0x6f,0x6e])](_0x304d83([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x420d62,_0x37773a)=>{_0x37773a[0x0][_0x304d83([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1cd314++,_0x1cd314==(0x213e504b^_0x331356)&&(_0x3ae218(),_0x420d62[_0x304d83([0x6f,0x66,0x66])]());});}))];return window[_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x304d83([0x72,0x61,0x63,0x65])](_0x24eeaa)[_0x304d83([0x74,0x68,0x65,0x6e])](()=>_0x29fd5c);}async function _0x310f4c(){await _0x43e1ac,_0x424d62[_0x304d83([0x6d,0x6f,0x64,0x65,0x6c])][_0x304d83([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1d866f,_0x424d62[_0x304d83([0x6d,0x6f,0x64,0x65,0x6c])][_0x304d83([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1d866f,_0x424d62[_0x304d83([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x304d83([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x172e89(){return _0x4b4645(_0x304d83([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4be3c2(_0x304d83([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x304d83([0x73,0x74,0x61,0x74,0x65])]==_0x304d83([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2b2120(){return _0x4b4645(_0x304d83([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 _0x3fe7d3(){return _0x4b4645(_0x304d83([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x110dab(_0x548920){const _0x8b67b4=_0x1abb03();_0x424d62[_0x8b67b4]=_0x304d83([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x548920,_0x548920!=_0x304d83([0x56,0x61,0x6c,0x69,0x64])&&_0x310f4c();}function _0x1abb03(){const _0x242662=window[_0x304d83([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x304d83([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x304d83([0x6e,0x6f,0x77])]())[_0x304d83([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x304d83([0x2e]),'');let _0x3777e2=_0x304d83([0x4d]);for(let _0x63065c=0x0;_0x63065c<_0x242662[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x63065c+=0x2){let _0x1788db=window[_0x304d83([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x242662[_0x304d83([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x63065c,_0x63065c+0x2));_0x1788db>=_0x12ccfd[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1788db-=_0x12ccfd[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3777e2+=_0x12ccfd[_0x1788db];}return _0x3777e2;}function _0x1de278(){const _0x1e0a58=_0x5e04d2[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e]));if(0x3!=_0x1e0a58[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3a4654(_0x1e0a58[0x1]);function _0x3a4654(_0x29d4e9){const _0x10d3a7=_0x21d067(_0x29d4e9);return _0x10d3a7&&_0x45f574()?_0x10d3a7:null;function _0x45f574(){const _0x29de8d=_0x10d3a7[_0x304d83([0x6a,0x74,0x69])],_0x3cbb77=window[_0x304d83([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29de8d[_0x304d83([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x29de8d[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2e3cd6={..._0x10d3a7,[_0x304d83([0x6a,0x74,0x69])]:_0x29de8d[_0x304d83([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x29de8d[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2e3cd6[_0x304d83([0x76,0x63])],_0x40651f(_0x2e3cd6)==_0x3cbb77;}}}async function _0x9817e2(){let _0x2d7d2a=!0x0;try{const _0x552126=_0x5e04d2[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e])),[_0x4794c7,_0x4555a0,_0x10d7e6]=_0x552126;return _0x131d58(_0x4794c7),await _0x2b0b8e(_0x4794c7,_0x4555a0,_0x10d7e6),_0x2d7d2a;}catch{return!0x1;}function _0x131d58(_0x2c09c2){const _0x3c8684=_0x21d067(_0x2c09c2);_0x3c8684&&_0x3c8684[_0x304d83([0x61,0x6c,0x67])]==_0x304d83([0x45,0x53,0x32,0x35,0x36])||(_0x2d7d2a=!0x1);}async function _0x2b0b8e(_0x460701,_0x51f79c,_0x43a74b){const _0x516afc=window[_0x304d83([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x304d83([0x66,0x72,0x6f,0x6d])](_0x181b7f(_0x43a74b),_0x3e2977=>_0x3e2977[_0x304d83([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x157fca=new window[(_0x304d83([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x304d83([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x460701+_0x304d83([0x2e])+_0x51f79c),_0x49802c=window[_0x304d83([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x304d83([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x49802c)return;const _0x1429ef=await _0x49802c[_0x304d83([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x304d83([0x6a,0x77,0x6b]),_0x357450,{[_0x304d83([0x6e,0x61,0x6d,0x65])]:_0x304d83([0x45,0x43,0x44,0x53,0x41]),[_0x304d83([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x304d83([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x304d83([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x49802c[_0x304d83([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x304d83([0x6e,0x61,0x6d,0x65])]:_0x304d83([0x45,0x43,0x44,0x53,0x41]),[_0x304d83([0x68,0x61,0x73,0x68])]:{[_0x304d83([0x6e,0x61,0x6d,0x65])]:_0x304d83([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1429ef,_0x516afc,_0x157fca)||(_0x2d7d2a=!0x1);}}function _0x21d067(_0x183199){return _0x183199[_0x304d83([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x304d83([0x65,0x79]))?JSON[_0x304d83([0x70,0x61,0x72,0x73,0x65])](_0x181b7f(_0x183199)):null;}function _0x181b7f(_0x46741e){return window[_0x304d83([0x61,0x74,0x6f,0x62])](_0x46741e[_0x304d83([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x304d83([0x2b]))[_0x304d83([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x304d83([0x2f])));}function _0x40651f(_0x154f50){let _0x5eeaf9=0x1505;function _0x1e5977(_0x5edae6){for(let _0x134a3e=0x0;_0x134a3e<_0x5edae6[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x134a3e++){const _0x3279ed=_0x5edae6[_0x304d83([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x134a3e);_0x5eeaf9=(_0x5eeaf9<<0x5)+_0x5eeaf9+_0x3279ed,_0x5eeaf9&=_0x5eeaf9;}}function _0x3767b3(_0x5b2c86){Array[_0x304d83([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b2c86)?_0x5b2c86[_0x304d83([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3767b3):_0x5b2c86&&typeof _0x5b2c86==_0x304d83([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x304d83([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b2c86)[_0x304d83([0x73,0x6f,0x72,0x74])]()[_0x304d83([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3dbe30,_0x2c5b34])=>{_0x1e5977(_0x3dbe30),_0x3767b3(_0x2c5b34);}):_0x1e5977(window[_0x304d83([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b2c86));}return _0x3767b3(_0x154f50),_0x5eeaf9>>>0x0;}function _0x1da36b(_0x21d852){return _0x21d852[_0x304d83([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x304d83([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x304d83([0x30]));}function _0x10813a(_0x381c57){return _0x381c57[_0x304d83([0x73,0x70,0x6c,0x69,0x74])]('')[_0x304d83([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x304d83([0x6a,0x6f,0x69,0x6e])]('');}function _0x4b4645(_0x2f39b5){return _0x424d62[_0x304d83([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x304d83([0x68,0x61,0x73])](_0x2f39b5);}function _0x4be3c2(_0x21b6f9){return _0x424d62[_0x304d83([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x304d83([0x67,0x65,0x74])](_0x21b6f9);}function _0x1d866f(){}function _0x304d83(_0x5bc92c){return _0x5bc92c['map'](_0x43f356=>String['fromCharCode'](_0x43f356))['join']('');}_0x110dab(await _0x405082());}(this);}['destroy'](){const _0x52ae2c=this['editor']['plugins']['get'](o),_0x50f4b5=this['editor']['config']['get']('collaboration.channelId');for(const _0x2a836f of _0x52ae2c['getCommentThreads']({'channelId':_0x50f4b5}))_0x52ae2c['_detachCommentThread'](_0x2a836f['id']),_0x52ae2c['_threads']['delete'](_0x2a836f['id']);super['destroy']();}['hasMarkerForId'](_0x5f3969){return this['getAllMarkersForId'](_0x5f3969)['length']>0x0;}['getAllMarkersForId'](_0x4cdd1a){const _0x1cd1f2=[];for(const _0x37d69b of this['editor']['model']['markers'])_0x37d69b['name']['startsWith']('comment:'+_0x4cdd1a)&&_0x1cd1f2['push'](_0x37d69b);return _0x1cd1f2;}['scrollToThreadMarker'](_0x385fc6){setTimeout(()=>{const _0x57ee44=this['_getTargetForId'](_0x385fc6);if(!_0x57ee44)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x385fc6&&nt({'target':_0x57ee44[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2ecedf){this['editor']['model']['change'](()=>{for(const _0x58a451 of this['getAllMarkersForId'](_0x2ecedf))this['editor']['editing']['reconvertMarker'](_0x58a451);});}['_attachArchivedThread'](_0x1d4eb2){const _0xb1127e=this['editor']['plugins']['get'](o),_0x27f775=this['editor']['plugins']['get'](b),_0x3945e6=_0xb1127e['getCommentThread'](_0x1d4eb2);if(!_0x3945e6['isAttached']){const _0x538556=_0x3945e6['attachTo'](()=>this['_getTargetForId'](_0x3945e6['id']));_0x27f775['registerAnnotation'](_0x538556),_0x3945e6['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1f9a55=this['editor'],_0x2ad2d5=_0x1f9a55['plugins']['get'](it);_0x1f9a55['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4460ff,_0x839edf)=>{const {id:_0x225ff1}=ft(_0x4460ff['markerName']),_0x2c8951=_0x1f9a55['plugins']['get'](o)['getCommentThread'](_0x225ff1),_0x3c2b0e=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x225ff1;let _0x4e2d65;if(_0x2c8951&&_0x2c8951['isResolved']&&!_0x3c2b0e&&_0x4460ff['item'])return _0x839edf['consumable']['consume'](_0x4460ff['item'],'addMarker:'+_0x4460ff['markerName']),_0x839edf['consumable']['consume'](_0x4460ff['item'],'removeMarker:'+_0x4460ff['markerName']),null;const _0x909c99=['ck-comment-marker'];return _0x3c2b0e&&_0x909c99['push']('ck-comment-marker--active'),_0x4e2d65=_0x2c8951?.['length']?_0x2c8951['comments']['first']['author']['id']:_0x2ad2d5['me']['id'],{'classes':_0x909c99,'attributes':{'data-comment':_0x225ff1,'data-author-id':_0x4e2d65}};}}),_0x1f9a55['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x55fb8c,{options:_0x4a0571})=>{if(_0x4a0571['showCommentHighlights'])return null;const _0xbdfc2=_0x1f9a55['plugins']['get'](o),_0x485295=_0x1f9a55['model']['markers']['get'](_0x55fb8c),{id:_0x3d7cde,part:_0x1ec587}=ft(_0x55fb8c);return _0x485295&&!_0x485295['affectsData']||_0x4a0571['ignoreResolvedComments']&&_0xbdfc2['getCommentThread'](_0x3d7cde)?.['isResolved']?null:{'group':'comment','name':_0x1ec587?_0x3d7cde+':'+_0x1ec587:_0x3d7cde};}}),_0x1f9a55['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2b06d3,{writer:_0x24cc79})=>_0x24cc79['createElement']('$marker',{'data-name':'comment:'+_0x2b06d3['getAttribute']('id')})}),_0x1f9a55['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x317f1e=this['editor'],_0x23ad3d=_0x317f1e['plugins']['get'](o),_0x4cd130=new Set(),_0x5d2cbb=new Set();_0x317f1e['model']['document']['registerPostFixer'](_0x10824e=>{let _0x624ede=!0x1;for(const {name:_0x319c49,data:_0x35ebb8}of _0x317f1e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x21c8f7,id:_0x2975ec}=ft(_0x319c49);let _0x1c8163=_0x35ebb8['newRange'];if('comment'!==_0x21c8f7||!_0x1c8163)continue;const _0x1dcb85='$graveyard'===_0x1c8163['root']['rootName'];_0x1dcb85||(_0x1c8163=ht(_0x1c8163,_0x317f1e['model']),!_0x1c8163||_0x1c8163['isCollapsed']||!_0x35ebb8['newRange']||_0x1c8163['isEqual'](_0x35ebb8['newRange']))?_0x317f1e['model']['hasContent'](_0x1c8163)&&!_0x1dcb85?this['isThreadsLoadingPaused']?_0x4cd130['add'](_0x319c49):this['_handleThreadMarker'](_0x319c49,_0x2975ec):(_0x5d2cbb['add'](_0x319c49),_0x4cd130['delete'](_0x319c49),_0x10824e['removeMarker'](_0x319c49),_0x624ede=!0x0):(_0x10824e['updateMarker'](_0x319c49,{'range':_0x1c8163}),_0x624ede=!0x0);}return _0x624ede;}),this['on']('change:isThreadsLoadingPaused',(_0x19df27,_0x1bafbc,_0x5164c6)=>{if(!_0x5164c6&&_0x4cd130['size'])for(const _0x1dbae3 of _0x4cd130){const {id:_0xa551ea}=ft(_0x1dbae3);_0x4cd130['delete'](_0x1dbae3),_0x317f1e['model']['markers']['get'](_0x1dbae3)&&this['_handleThreadMarker'](_0x1dbae3,_0xa551ea);}}),this['listenTo'](_0x317f1e['model']['document'],'change',()=>{for(const {name:_0x179f70,data:{newRange:_0x39c386}}of _0x317f1e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2c166c,id:_0x2409f3}=ft(_0x179f70);if('comment'!==_0x2c166c)continue;const _0x2bd6b1=_0x23ad3d['getCommentThread'](_0x2409f3),_0x4cf22a=this['hasMarkerForId'](_0x2409f3);_0x2bd6b1&&(!_0x2bd6b1['_hasTargetInContent']&&_0x39c386&&_0x317f1e['editing']['view']['once']('render',()=>{const _0x142447=_0x317f1e['plugins']['get'](y),_0x1c3806=_0x23ad3d['_threadToController']['get'](_0x2bd6b1)['view'];_0x142447['getByInnerView'](_0x1c3806)['refreshVisibility']();},{'priority':'low'}),_0x2bd6b1['_hasTargetInContent']=_0x4cf22a||!!_0x39c386),_0x39c386||(_0x5d2cbb['add'](_0x179f70),_0x4cd130['delete'](_0x179f70));}for(const _0x5020df of _0x5d2cbb){const {id:_0x439596}=ft(_0x5020df),_0x1a527d=_0x23ad3d['getCommentThread'](_0x439596);if(_0x4cd130['delete'](_0x5020df),!_0x1a527d)continue;const _0x18f362=this['hasMarkerForId'](_0x439596);_0x18f362||_0x1a527d['isSubmitted']?_0x18f362||_0x1a527d['unlinkedAt']||_0x1a527d['setUnlinkedAt'](new Date()):_0x1a527d['remove']();}_0x5d2cbb['clear']();});}['_handleInitialThreads'](_0x33e5e3){_0x33e5e3['forEach'](_0x518d66=>{_0x518d66['unlinkedAt']&&this['_attachArchivedThread'](_0x518d66['id']);});}['_getTargetForId'](_0x102b88){const _0x4601b1=this['editor'],_0x4c9ca7=this['getAllMarkersForId'](_0x102b88);return et(_0x4601b1['editing'],_0x4c9ca7);}['_getTextContext'](_0x5f2e0c){const _0x32732e=this['getAllMarkersForId'](_0x5f2e0c);let _0x31e839='',_0x3866ef=!0x1;for(const _0x43f442 of _0x32732e){const _0x254d4f=_0x43f442['getRange']();for(const _0x4ed73b of Array['from'](_0x254d4f['getItems']()))_0x4ed73b['is']('$textProxy')?(_0x31e839&&_0x3866ef&&(_0x31e839+='\x20',_0x3866ef=!0x1),_0x31e839+=_0x4ed73b['data']):_0x3866ef=!0x0;_0x3866ef=!0x0;}return _0x31e839['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3a566c,_0x1ead6c){const _0x177256=this['editor'],_0x5cb7af=_0x177256['plugins']['get'](o);let _0x4a6985=_0x5cb7af['getCommentThread'](_0x1ead6c);const _0x1dc562=_0x177256['config']['get']('collaboration.channelId'),_0x505375=_0x177256['plugins']['get'](b);if(_0x4a6985&&(_0x4a6985['unlinkedAt']&&_0x4a6985['setUnlinkedAt'](null),_0x4a6985['isAttached']))return _0x4a6985;return!this['getAllMarkersForId'](_0x1ead6c)[0x0]['managedUsingOperations']?_0x177256['editing']['view']['once']('render',()=>{if(_0x5cb7af['getCommentThread'](_0x1ead6c))return;const _0x3819b8=_0x177256['plugins']['get'](y);_0x4a6985=_0x5cb7af['openNewCommentThread']({'channelId':_0x1dc562,'threadId':_0x1ead6c,'target':()=>this['_getTargetForId'](_0x1ead6c),'context':{'type':'text','value':this['_getTextContext'](_0x1ead6c)}});const _0x6c64a0=_0x5cb7af['_threadToController']['get'](_0x4a6985)['view'],_0x3d4761=_0x3819b8['getByInnerView'](_0x6c64a0);_0x3d4761&&_0x505375['registerAnnotation'](_0x3d4761);},{'priority':'low'}):_0x5cb7af['fetchCommentThread']({'channelId':_0x1dc562,'threadId':_0x1ead6c})['then'](_0x422d1f=>{if('destroyed'!==_0x177256['state']){if(_0x4a6985=_0x422d1f,_0x4a6985&&!_0x4a6985['isAttached']){const _0x3dfe31=_0x4a6985['attachTo'](()=>this['_getTargetForId'](_0x1ead6c));_0x505375['registerAnnotation'](_0x3dfe31),_0x4a6985['isResolved']&&this['_reconvertMarkers'](_0x1ead6c);}else{if(!_0x4a6985){const _0x53b2b8=this['getAllMarkersForId'](_0x1ead6c);_0x177256['model']['change'](_0x13654b=>{for(const _0x2b5553 of _0x53b2b8)_0x13654b['removeMarker'](_0x2b5553);});}}}}),_0x4a6985;}['_handleThreadMarker'](_0x2622bc,_0x3d24a9){const _0x1113bc=this['_attachMarkerToThread'](_0x2622bc,_0x3d24a9);_0x1113bc&&!_0x1113bc['context']&&_0x1113bc['setContext']({'type':'text','value':this['_getTextContext'](_0x3d24a9)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3d8664=this['editor'];rt(_0x3d8664['model'],({left:_0x491993,entered:_0xe8c515})=>{for(const _0x63339d of _0x491993)if(mt(_0x63339d)){_0x3d8664['ui']['ariaLiveAnnouncer']['announce'](N(_0x3d8664['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xbd136 of _0xe8c515)if(mt(_0xbd136)){_0x3d8664['ui']['ariaLiveAnnouncer']['announce'](N(_0x3d8664['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x3f042c)));break;}});}}function dt(_0x3148c7,_0x1b724e){return _0x1b724e?_0x3148c7+':'+_0x1b724e:_0x3148c7;}function ht(_0x2338a9,_0xc62eb0){const _0x24dd3f=_0xc62eb0['schema'],_0x527f84=_0xc62eb0['createRange'](_0x2338a9['start']);for(const _0x57e573 of _0x2338a9['getWalker']()){const {type:_0x30d6a1,item:_0x1f8b76,nextPosition:_0x4be4d8}=_0x57e573;if('text'===_0x30d6a1||_0x24dd3f['isObject'](_0x1f8b76)){const _0x74ba77=_0xc62eb0['createPositionBefore'](_0x1f8b76);_0x527f84['isCollapsed']&&(_0x527f84['start']=_0x74ba77),_0x527f84['end']=_0x4be4d8;}}return _0x527f84;}function mt(_0x5193c8){return'comment'===ft(_0x5193c8['name'])['group'];}class s extends _0x6d2056{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x2f8f3b=this['editor'],_0xb6efa2=_0x2f8f3b['plugins']['get'](o),_0x9a7125=_0x2f8f3b['plugins']['get'](r),_0x4d1137=_0x2f8f3b['plugins']['get'](y),_0x45956e=_0x2f8f3b['plugins']['get'](b);_0x2f8f3b['ui']['componentFactory']['add']('comment',()=>{const _0x58d12d=this['_createUIButton'](_0x3596fa);return _0x58d12d['tooltip']=!0x0,_0x58d12d;}),_0x2f8f3b['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1a9c60)),_0x45956e['addSourceCollector'](()=>{const _0x5af8b6=[];for(const [_0x17d0e6,_0x22452a]of _0xb6efa2['_threadToController']){const _0x1efe9d=_0x9a7125['getAllMarkersForId'](_0x17d0e6['id']),_0x3c8307=_0x1efe9d['map'](_0x2b933f=>_0x2b933f['getRange']());_0x1efe9d['length']>0x0&&_0x5af8b6['push']([_0x22452a['view'],_0x3c8307]);}return _0x5af8b6;}),this['listenTo'](_0x4d1137,'change:activeAnnotations',(_0x3ce338,_0x423228,_0x1951f3)=>{const _0x521007=Array['from'](_0x1951f3)['map'](_0x5f45a=>_0x5f45a['innerView'])['find'](_0x167eca=>_0xb6efa2['_viewToController']['has'](_0x167eca));if(!_0x521007)return void(_0x9a7125['activeMarker']=null);const _0x2dfd49=_0xb6efa2['_viewToController']['get'](_0x521007)['model']['id'],_0x5e9eb0='comment:'+_0x2dfd49;_0x2dfd49&&_0x9a7125['hasMarkerForId'](_0x2dfd49)?_0x9a7125['activeMarker']=_0x5e9eb0:_0x9a7125['activeMarker']&&(_0x9a7125['activeMarker']=null);}),this['listenTo'](_0xb6efa2,'removeCommentThread',(_0x1151ae,{threadId:_0x15da74,isFromAdapter:_0x1f7798})=>{!_0x1f7798&&_0x2f8f3b['ui']['focusTracker']['isFocused']&&_0x9a7125['hasMarkerForId'](_0x15da74)&&_0x2f8f3b['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xb6efa2,'addComment',(_0x5b10a,{threadId:_0x58b4fa,isFromAdapter:_0x197a5b})=>{if(_0x197a5b||!_0x9a7125['hasMarkerForId'](_0x58b4fa)||!_0xb6efa2['hasCommentThread'](_0x58b4fa))return;0x1===_0xb6efa2['getCommentThread'](_0x58b4fa)['length']&&(_0x2f8f3b['editing']['view']['focus'](),_0x5b10a['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3704b3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x44c594;for(const _0x307ecf in _0x3704b3){const _0x5e1148=_0x307ecf,_0x4c8464=_0x3704b3[_0x5e1148];if('commentsLicenseKeyValid'==_0x4c8464||'commentsLicenseKeyInvalid'==_0x4c8464||'commentsLicenseKeyExpired'==_0x4c8464||'commentsLicenseKeyDomainLimit'==_0x4c8464||'commentsLicenseKeyNotAllowed'==_0x4c8464||'commentsLicenseKeyEvaluationLimit'==_0x4c8464||'commentsLicenseKeyTrialLimit'==_0x4c8464||'commentsLicenseKeyUsageLimit'==_0x4c8464){delete _0x3704b3[_0x5e1148],_0x44c594=_0x4c8464,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x44c594&&_0x3704b3['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x44c594&&_0x3704b3['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x44c594&&_0x3704b3['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x559659){const _0x15261d=this['editor'],_0x43d48d=new _0x559659(_0x15261d['locale']),_0x59d4cc=_0x15261d['commands']['get']('addCommentThread');return _0x43d48d['set']({'label':N(_0x15261d['locale'],'Comment'),'icon':_0x57f000}),_0x43d48d['bind']('isEnabled')['to'](_0x59d4cc,'hasContent'),this['listenTo'](_0x43d48d,'execute',()=>{_0x59d4cc['execute']();}),_0x43d48d;}}class i extends _0x6d2056{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x566367){super(_0x566367),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3d33f1,_0x50350f,_0x497adc)=>{_0x497adc?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x11701c,_0x2f5f79]of this['editor']['commands'])_0x2f5f79['affectsData']&&'addCommentThread'!==_0x11701c&&_0x2f5f79['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4d8866=this['editor']['editing']['view']['document'];this['listenTo'](_0x4d8866,'cut',_0x4ad505=>_0x4ad505['stop'](),{'priority':'highest'}),this['listenTo'](_0x4d8866,'clipboardInput',_0x44c6be=>_0x44c6be['stop'](),{'priority':'highest'}),this['listenTo'](_0x4d8866,'delete',_0x571952=>_0x571952['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x24f506,_0x877f1d]of this['editor']['commands'])_0x877f1d['affectsData']&&'addCommentThread'!==_0x24f506&&_0x877f1d['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x313b3a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x9aabc0){super(_0x9aabc0),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x52ab13=this['context']['plugins']['get'](y);this['listenTo'](_0x52ab13,'_activateAnnotation',(_0x5cd5d4,_0x201e2b)=>{for(const _0x55c921 of this['activeUIs']){const _0x43d2d9=this['_uis']['get'](_0x55c921);(0x0,this['uisData']['get'](_0x55c921)['filter'])(_0x201e2b)&&_0x43d2d9['setActiveAnnotation'](_0x201e2b);}}),this['listenTo'](_0x52ab13,'_deactivateAllAnnotations',()=>{for(const _0x342714 of this['activeUIs']){this['_uis']['get'](_0x342714)['setActiveAnnotation'](null);}}),this['listenTo'](_0x52ab13['_visibleAnnotations'],'add',(_0x4bfbf8,_0x2187d5)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2187d5);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x50d44d){return this['activeUIs']['has'](_0x50d44d);}['activate'](_0x4e5efb,_0x50250b=this['defaultFilter']){const _0xb8a5e9=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x4e5efb))throw new _0x2cc838('annotationsuis-missing-ui',this,{'uiName':_0x4e5efb});this['isActive'](_0x4e5efb)&&this['deactivate'](_0x4e5efb),this['activeUIs']['add'](_0x4e5efb);const _0x387cbc=new S();v({'source':_0xb8a5e9['_visibleAnnotations'],'target':_0x387cbc,'filter':_0x50250b}),this['uisData']['set'](_0x4e5efb,{'collection':_0x387cbc,'filter':_0x50250b});const _0x14232e=this['_uis']['get'](_0x4e5efb);_0x14232e['attach'](_0x387cbc),this['listenTo'](_0x14232e,'change:activeAnnotation',(_0x16705c,_0x3838a5,_0x9d1ba2,_0x2b690d)=>{_0x2b690d&&_0xb8a5e9['_removeActiveAnnotation'](_0x2b690d),_0x9d1ba2&&_0xb8a5e9['_addActiveAnnotation'](_0x9d1ba2);});}['deactivate'](_0x36f350){if(this['activeUIs']['delete'](_0x36f350),!this['_uis']['has'](_0x36f350))throw new _0x2cc838('annotationsuis-missing-ui',this,{'uiName':_0x36f350});const _0x519ff2=this['_uis']['get'](_0x36f350);_0x519ff2['detach'](),this['stopListening'](_0x519ff2),this['uisData']['get'](_0x36f350)['collection']['destroy'](),this['uisData']['delete'](_0x36f350);}['switchTo'](_0x4a8c27){if(!this['_uis']['has'](_0x4a8c27))throw new _0x2cc838('annotationsuis-missing-ui',this,{'uiName':_0x4a8c27});const _0x49ba88=this['context']['plugins']['get'](y),_0x472a15=Array['from'](_0x49ba88['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4a8c27);const _0x203fc9=this['_uis']['get'](_0x4a8c27);_0x203fc9['setActiveAnnotation'](_0x472a15),_0x203fc9['_setSelectedAnnotations']&&_0x472a15&&_0x203fc9['_setSelectedAnnotations']([_0x472a15]);}['deactivateAll'](){for(const _0x2200fb of this['activeUIs'])this['deactivate'](_0x2200fb);}['register'](_0x25921d,_0x308481){if(this['_uis']['has'](_0x25921d))throw new _0x2cc838('annotationsuis-register-already-registered');if('function'!=typeof _0x308481['attach']||'function'!=typeof _0x308481['detach']||'function'!=typeof _0x308481['setActiveAnnotation'])throw new _0x2cc838('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x25921d,_0x308481);}['refilterAnnotations'](){const _0x106fef=this['context']['plugins']['get'](y)['collection'],_0x151ca6=new Map(),_0x2442cd=Array['from'](this['activeUIs']);for(const _0x1b20a6 of this['activeUIs']){const _0x245255=this['uisData']['get'](_0x1b20a6)['collection'];for(const _0x385237 of _0x245255)_0x151ca6['set'](_0x385237,_0x1b20a6);}for(const _0xd94761 of _0x106fef){const _0x1c168d=_0x151ca6['get'](_0xd94761);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd94761);const _0x3a9808=_0x2442cd['find'](_0x4e2e12=>this['uisData']['get'](_0x4e2e12)['filter'](_0xd94761));_0x1c168d!==_0x3a9808&&(_0x1c168d&&this['uisData']['get'](_0x1c168d)['collection']['remove'](_0xd94761),_0x3a9808&&this['uisData']['get'](_0x3a9808)['collection']['add'](_0xd94761));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd4dc26){const _0x506a87=[];for(const _0x2773b0 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2773b0)['filter'])(_0xd4dc26)&&_0x506a87['push'](_0x2773b0);}if(_0x506a87['length']>0x1)throw new _0x2cc838('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x506a87,'annotationType':_0xd4dc26['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2462e6){super(_0x2462e6);const _0x46b3b7=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 _0x5f12d6(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x46b3b7['to']('class')],'style':{'minHeight':_0x46b3b7['to']('minHeight',_0x16361f=>'number'==typeof _0x16361f?_i(_0x16361f+0xa):null)},'dir':_0x2462e6['uiLanguageDirection'],'role':'application','aria-label':N(_0x2462e6,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x2462e6,'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',_0x13164a=>{this['_updateItemPositionInFocusables'](_0x13164a['source']);}),this['list']['forEach'](_0x355862=>{this['focusTracker']['add'](_0x355862['element']),this['_updateItemPositionInFocusables'](_0x355862);}),this['list']['on']('change',(_0x4e5498,_0x25a5f6)=>{for(const _0x487665 of _0x25a5f6['removed'])this['focusTracker']['remove'](_0x487665['element']),this['focusables']['remove'](_0x487665);for(const _0x21c43b of _0x25a5f6['added'])this['focusTracker']['add'](_0x21c43b['element']),this['_updateItemPositionInFocusables'](_0x21c43b);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0xe94f07){const _0x50428f=this['focusables']['getIndex'](_0xe94f07);let _0x3d5cfc,_0x263c40;for(const _0x5e5a58 of this['focusables'])if(_0xe94f07['top']<_0x5e5a58['top']){_0x3d5cfc=_0x5e5a58;break;}if(_0x263c40=_0x3d5cfc?this['focusables']['getIndex'](_0x3d5cfc):this['focusables']['length'],-0x1!==_0x50428f){if(_0x50428f===_0x263c40-0x1)return;this['focusables']['remove'](_0xe94f07),_0x263c40=_0x3d5cfc?this['focusables']['getIndex'](_0x3d5cfc):this['focusables']['length'];}this['focusables']['add'](_0xe94f07,_0x263c40);}}const Ot=/* #__PURE__ -- @preserve */
33
- Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4a02fa){super(_0x4a02fa),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2fb385,_0x12e097)=>_0x2fb385+_0x12e097),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4af58a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4af58a['to']('isAnimationDisabled',_0x36ce81=>_0x36ce81?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4af58a['to']('top',_0x45f7ad=>Ot(_0x45f7ad))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x22993e=this['element']['clientHeight'];_0x22993e&&(this['height']=_0x22993e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x313b3a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8da636){super(_0x8da636),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 _0x550d16=this['context']['config']['get']('sidebar.container');_0x550d16&&this['setContainer'](_0x550d16);}['setContainer'](_0x400a2f){if(!g(_0x400a2f))throw new _0x2cc838('sidebar-setcontainer-invalid-element');this['container']=_0x400a2f;}['_attachToContainer']({viewClass:_0x509097='',spaceBetweenItems:_0x46a409=0x19}={}){if(!g(this['container']))throw new _0x2cc838('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x509097,this['_spaceBetweenItems']=_0x46a409;}['rearrange']({removedAnnotation:_0x92a7e,previousAnnotation:_0x3983c9,nextAnnotation:_0x58de9c}){const _0x1bf15c=this['getSidebarItemView'](_0x92a7e);this['view']['list']['remove'](_0x1bf15c),this['_destroySidebarItemView'](_0x92a7e),_0x3983c9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3983c9)),_0x58de9c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x58de9c)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5276ff,activatedAnnotation:_0x43b569,disableAnimationOnActivatedAnnotation:_0x5837c7}){if(this['_activeAnnotation']=_0x43b569,_0x5276ff){_0x5276ff['isActive']=!0x1;const _0x4f152c=this['getSidebarItemView'](_0x5276ff);_0x4f152c&&_0x5837c7&&(_0x4f152c['isAnimationDisabled']=!0x1);}if(_0x43b569){const _0x40b4d5=this['getSidebarItemView'](_0x43b569);_0x40b4d5&&(_0x43b569['isActive']=!0x0,_0x5837c7&&(_0x40b4d5['isAnimationDisabled']=!0x0,_0x40b4d5['top']+=0x1),this['_alignToTargetRect'](_0x40b4d5));}}['_detachFromContainer'](_0x4bcea9){if(this['view']['element']['remove'](),_0x4bcea9){for(const _0x53bde2 of _0x4bcea9)this['_destroySidebarItemView'](_0x53bde2);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1239fd,_0x23572d){_0x23572d||(_0x23572d=_0x1239fd['view']);const _0x4e4e8f=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4e4e8f,_0x1239fd),this['_annotationToSidebarItemView']['set'](_0x1239fd,_0x4e4e8f),_0x4e4e8f['content']['add'](_0x23572d),this['listenTo'](_0x1239fd['view'],'change:targetRect',(_0x3bafe9,_0x171ee6,_0x4b97af)=>{const _0x1a4275=this['_getTargetTop'](_0x1239fd,_0x4b97af);_0x4e4e8f['_targetTop']!=_0x1a4275&&(_0x4e4e8f['_targetTop']=_0x1a4275,this['_setItemTop'](_0x4e4e8f,_0x1a4275));}),this['listenTo'](_0x4e4e8f,'change:top',()=>{this['_recalculate'](_0x4e4e8f,'top');}),this['listenTo'](_0x4e4e8f,'change:bottom',()=>{this['_recalculate'](_0x4e4e8f,'bottom');}),this['_alignToTargetRect'](_0x4e4e8f);const _0x1d2ef6=this['_getItemBefore'](_0x4e4e8f);if(_0x1d2ef6)this['_alignAfterItem'](_0x1d2ef6,_0x4e4e8f)||this['_alignToTargetRect'](_0x4e4e8f);else this['_alignToTargetRect'](_0x4e4e8f);return this['_updateLastItem'](),this['view']['list']['add'](_0x4e4e8f),_0x4e4e8f;}['_alignForTopChange'](_0x44c6d6){if(!_0x44c6d6['content']['length'])return;const _0x42f434=this['_getItemBefore'](_0x44c6d6);if(!_0x42f434)return;const _0x71d84f=this['_sidebarItemViewToAnnotation']['get'](_0x42f434),_0x2f1c63=this['_activeAnnotation'];_0x2f1c63&&_0x2f1c63===_0x71d84f?this['_alignAfterItem'](_0x42f434,_0x44c6d6):this['_alignBeforeItem'](_0x44c6d6,_0x42f434);}['_alignForBottomChange'](_0xe453ed){if(!_0xe453ed['content']['length'])return;const _0x78ec80=this['_getItemAfter'](_0xe453ed);if(!_0x78ec80)return;const _0x55f295=this['_sidebarItemViewToAnnotation']['get'](_0x78ec80),_0x18b62e=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1c90d7=this['_activeAnnotation'];_0x1c90d7&&_0x1c90d7===_0x55f295&&_0x18b62e?(this['_alignBeforeItem'](_0x78ec80,_0xe453ed),this['_alignAfterItem'](_0xe453ed,_0x78ec80)):_0x1c90d7&&_0x1c90d7===_0x55f295?this['_alignBeforeItem'](_0x78ec80,_0xe453ed):this['_alignAfterItem'](_0xe453ed,_0x78ec80);}['_recalculate'](_0x98f6f5,_0x30aaaa){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5b1c98,changedProp:_0x35511d}of this['_recalculateBuffer'])'top'===_0x35511d?this['_alignForTopChange'](_0x5b1c98):this['_alignForBottomChange'](_0x5b1c98);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x98f6f5,'changedProp':_0x30aaaa});}['getSidebarItemView'](_0x5a5f4e){return this['_annotationToSidebarItemView']['get'](_0x5a5f4e);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2069c4){const _0x35d871=this['getSidebarItemView'](_0x2069c4);this['stopListening'](_0x35d871),this['stopListening'](_0x2069c4['view']),_0x35d871['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2069c4),this['_sidebarItemViewToAnnotation']['delete'](_0x35d871);}['_createSidebarView'](){const _0x5a73fe=new H(this['context']['locale']);return _0x5a73fe['render'](),this['on']('change:_lastItem',(_0x4ce7e0,_0x11dd81,_0x1041a7,_0x164393)=>{_0x164393&&_0x5a73fe['unbind']('minHeight'),_0x1041a7?_0x5a73fe['bind']('minHeight')['to'](_0x1041a7,'bottom'):_0x5a73fe['minHeight']=null;}),_0x5a73fe;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x44c5ce){const _0x3d33a4=this['_sidebarItemViewToAnnotation']['get'](_0x44c5ce),_0x17ad62=_0x3d33a4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3d33a4)-0x1);return _0x17ad62&&this['getSidebarItemView'](_0x17ad62)||null;}['_getItemAfter'](_0x2c8f40){const _0x4d05ef=this['_sidebarItemViewToAnnotation']['get'](_0x2c8f40),_0x529be6=_0x4d05ef&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4d05ef)+0x1);return _0x529be6&&this['getSidebarItemView'](_0x529be6)||null;}['_alignBeforeItem'](_0x2eecc2,_0x4acc75){_0x2eecc2['updateHeight']();const _0x420fa8=G(_0x4acc75['bottom']+this['_spaceBetweenItems'],_0x2eecc2['top']);return!!_0x420fa8&&(this['_setItemTop'](_0x4acc75,_0x4acc75['top']-_0x420fa8),!0x0);}['_alignAfterItem'](_0x2427f4,_0x300b00){_0x2427f4['updateHeight']();const _0x24b469=G(_0x2427f4['bottom']+this['_spaceBetweenItems'],_0x300b00['top']);return!!_0x24b469&&(this['_setItemTop'](_0x300b00,_0x300b00['top']+_0x24b469,!0x1),!0x0);}['_alignToTargetRect'](_0x1870fe){const _0x57f73b=this['_sidebarItemViewToAnnotation']['get'](_0x1870fe);if(!_0x57f73b||!_0x57f73b['target']||!_0x57f73b['targetRect'])return;const _0x25e925=this['_getTargetTop'](_0x57f73b,_0x57f73b['targetRect']);this['_setItemTop'](_0x1870fe,_0x25e925);}['_getTargetTop'](_0x1769f4,_0x13fd12){if(null===_0x13fd12)return 0x0;if(_0x1769f4['target']instanceof _0x23d655)return _0x13fd12['top'];{const _0x293cfd=new _0x23d655(this['view']['element'])['top'];return _0x13fd12['top']-_0x293cfd;}}['_setItemTop'](_0x4814a5,_0x1286fc,_0x372064=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x372064&&(_0x1286fc=Math['max'](_0x1286fc,this['_getMaxAvailableTop'](_0x4814a5))),_0x4814a5['top']=_0x1286fc;}['_getMaxAvailableTop'](_0x5c7755){let _0x411e9d=this['_getItemBefore'](_0x5c7755),_0x87d2b0=0x0;for(;_0x411e9d;)_0x411e9d['updateHeight'](),_0x87d2b0+=this['_spaceBetweenItems']+_0x411e9d['height'],_0x411e9d=this['_getItemBefore'](_0x411e9d);return _0x87d2b0;}}function G(_0x1686c7,_0x1f3dd4){return Math['max'](_0x1686c7-_0x1f3dd4,0x0);}function g(_0x1bca65){return null!==_0x1bca65&&'object'==typeof _0x1bca65&&0x1===_0x1bca65['nodeType'];}class e extends _0x313b3a{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f02e9){super(_0x3f02e9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4d5d77(),this['_refreshPositioningDebounced']=_0x35ab00(()=>{_0x3f02e9['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x54400a=this['context']['plugins']['get'](j),_0x4fa11d=this['context']['plugins']['get'](z);_0x54400a['register']('wideSidebar',this),_0x4fa11d['container']&&_0x54400a['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x471fa3){if(_0x471fa3===this['activeAnnotation'])return;const _0x4314b8=this['context']['plugins']['get'](z);_0x4314b8['_activeAnnotation']=_0x471fa3;const _0x23cf97=this['activeAnnotation'];_0x4314b8['refresh']({'blurredAnnotation':_0x23cf97,'activatedAnnotation':_0x471fa3}),this['activeAnnotation']=_0x471fa3;}['attach'](_0x2629be){this['annotations']=_0x2629be;const _0x566956=this['context']['plugins']['get'](z);if(_0x566956['_annotations']=_0x2629be,this['isAttached'])throw new _0x2cc838('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x566956,'set:container',()=>{this['detach'](),this['listenTo'](_0x566956,'change:container',_0x429a44=>{_0x429a44['off'](),this['attach'](_0x2629be);});}),_0x566956['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5049a9=_0x154657=>{_0x154657['updateTargetRect'](),_0x566956['addAnnotation'](_0x154657);};for(const _0x560402 of _0x2629be)_0x5049a9(_0x560402);this['listenTo'](_0x2629be,'add',(_0xb779b8,_0x4ba3d2)=>{_0x5049a9(_0x4ba3d2);}),this['listenTo'](_0x2629be,'remove',(_0x30bc13,_0x3fe25d,_0x33b27a)=>{_0x566956['rearrange']({'removedAnnotation':_0x3fe25d,'previousAnnotation':_0x2629be['get'](_0x33b27a-0x1),'nextAnnotation':_0x2629be['get'](_0x33b27a+0x1)}),_0x3fe25d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2629be,'focus',(_0x5c666b,_0x56f0d1)=>{this['setActiveAnnotation'](_0x56f0d1);}),this['listenTo'](_0x2629be,'blur',()=>{this['setActiveAnnotation'](null);});const _0x17fb3e=this['context']instanceof _0x4d6295?this['context']['editors']:new _0x4d5d77([this['context']]);for(const _0x2c1871 of _0x17fb3e)this['_integrateWithEditorAnnotations'](_0x2c1871);this['listenTo'](_0x17fb3e,'add',(_0x3783b5,_0x57b570)=>{this['listenTo'](_0x57b570,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x57b570);});}),this['listenTo'](_0x17fb3e,'remove',(_0x560550,_0x33a77c)=>{_0x33a77c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x33a77c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2cc838('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4e0c44=this['context']['plugins']['get'](z);_0x4e0c44['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4e0c44),this['stopListening'](this['annotations']),this['context']instanceof _0x4d6295&&this['stopListening'](this['context']['editors']);for(const _0x49744d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x49744d);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5c18ab){if(!_0x5c18ab['plugins']['has']('EditorAnnotations'))return;const _0xce7772=_0x5c18ab['plugins']['get']('EditorAnnotations'),_0x4da1ec=()=>{const _0x33d335=_0xce7772['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x33d335[0x0]||null);};this['listenTo'](_0xce7772,'refresh',_0x4da1ec),this['listenTo'](_0xce7772,'blur',(_0x3d909e,{isAnnotationTracked:_0x53715b})=>{this['activeAnnotation']&&_0x53715b(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xce7772,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5a2856=>{_0xce7772['hasDomSelection']()&&(_0x4da1ec(),_0x5a2856['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xce7772);}['_destroyEditorAnnotationsIntegration'](_0x255caf){this['stopListening'](_0x255caf),this['_editorAnnotations']['remove'](_0x255caf);}}class C extends _0x3596fa{['counterView'];constructor(_0x4af072){super(_0x4af072);const _0x3ef960=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x384288,_0x233280)=>_0x384288?'...':_0x233280['toString']()),this['set']('annotationType',''),this['icon']=_0x57f000,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3ef960['to']('annotationType',_0xa86949=>'ck-annotation-counter__badge--'+_0xa86949),_0x3ef960['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3ef960['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x313b3a{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3a7865){super(_0x3a7865),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1147f3())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4d5d77(),this['_refreshPositioningDebounced']=_0x35ab00(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4e9d65(this['context']['locale']),this['balloonPanelView']=new _0x39affa(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5ca996){this['annotations']=_0x5ca996;const _0x12ba04=this['context']['plugins']['get'](z),_0x6a7807=this['balloonPanelView'];if(_0x12ba04['_annotations']=_0x5ca996,this['isAttached'])throw new _0x2cc838('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x12ba04,'set:container',()=>{this['detach'](),this['listenTo'](_0x12ba04,'change:container',_0x40eb76=>{_0x40eb76['off'](),this['attach'](_0x5ca996);});}),_0x12ba04['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x499e2b=_0x4b2d9d=>{const _0x5048fc=new C(this['context']['locale']);_0x12ba04['addAnnotation'](_0x4b2d9d,_0x5048fc),this['_annotationToNarrowView']['set'](_0x4b2d9d,_0x5048fc),_0x5048fc['bind']('isDirty','annotationType','number')['to'](_0x4b2d9d['view'],'isDirty','type','length'),_0x5048fc['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x6a7807['content']['first']!==_0x4b2d9d['view']?(this['_showBalloon'](_0x4b2d9d),_0x4b2d9d['view']['element']['focus'](),this['setActiveAnnotation'](_0x4b2d9d)):this['setActiveAnnotation'](null);});};for(const _0x55af2f of _0x5ca996)_0x499e2b(_0x55af2f);this['listenTo'](_0x5ca996,'add',(_0x494d0b,_0x1fed91)=>{_0x499e2b(_0x1fed91);}),this['listenTo'](_0x5ca996,'remove',(_0x31d462,_0x50dd92,_0xdc309c)=>{this['_annotationToNarrowView']['get'](_0x50dd92)['destroy'](),this['_annotationToNarrowView']['delete'](_0x50dd92),_0x12ba04['rearrange']({'removedAnnotation':_0x50dd92,'previousAnnotation':_0x5ca996['get'](_0xdc309c-0x1),'nextAnnotation':_0x5ca996['get'](_0xdc309c+0x1)}),_0x50dd92===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5ca996,'focus',(_0x3772f1,_0x19c9c5)=>{this['setActiveAnnotation'](_0x19c9c5);}),this['listenTo'](_0x5ca996,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3cadc0,_0x1e1a95)=>{_0x1e1a95['keyCode']===_0x2ff53f['esc']&&_0x6a7807['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x6a7807['content']['first']),this['_hideBalloon'](),_0x1e1a95['stopPropagation'](),_0x1e1a95['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x551c9f,_0x2af19c)=>{const _0x3f2eca=_0x2af19c['target'];_0x6a7807['isVisible']&&_0x6a7807['element']['contains'](_0x3f2eca)||_0x12ba04['view']['element']['contains'](_0x3f2eca)||_0x551c9f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3bb35c=>_0x3bb35c['contains'](_0x3f2eca))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x38debb=this['context']instanceof _0x4d6295?this['context']['editors']:new _0x4d5d77([this['context']]);for(const _0x4a1e58 of _0x38debb)this['_integrateWithEditorAnnotations'](_0x4a1e58);this['listenTo'](_0x38debb,'add',(_0x56f237,_0x5abb60)=>{this['listenTo'](_0x5abb60,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5abb60);});}),this['listenTo'](_0x38debb,'remove',(_0x3bdbb3,_0x3cd6e9)=>{_0x3cd6e9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3cd6e9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x299718){if(_0x299718===this['activeAnnotation'])return;const _0x1c2727=this['context']['plugins']['get'](z);if(_0x1c2727['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x299718,'disableAnimationOnActivatedAnnotation':!0x0}),_0x299718)_0x1c2727['getSidebarItemView'](_0x299718)?this['_showBalloon'](_0x299718):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x299718;}['detach'](){if(!this['isAttached'])throw new _0x2cc838('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x767511=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3fe185=>_0x3fe185['destroy']()),this['_annotationToNarrowView']['clear'](),_0x767511['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4d6295&&this['stopListening'](this['context']['editors']);for(const _0x47cd7d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x47cd7d);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'](_0x577d41){if(!_0x577d41['plugins']['has']('EditorAnnotations'))return;const _0x19e132=_0x577d41['plugins']['get']('EditorAnnotations'),_0x1e06a7=this['context']['plugins']['get'](z),_0x565b0f=this['annotations'],_0x3c69b3=this['balloonPanelView'],_0x2d9d3f=()=>{const _0x13f94=_0x19e132['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x13f94),this['setActiveAnnotation'](_0x13f94[0x0]||null);};this['listenTo'](_0x19e132,'refresh',_0x2d9d3f),this['listenTo'](_0x19e132,'blur',(_0x17a773,{isAnnotationTracked:_0x3aa3d1})=>{this['activeAnnotation']&&_0x3aa3d1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x19e132,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x565b0f,'blur',_0x1877fd=>{_0x19e132['hasDomSelection']()&&_0x1877fd['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x14ad26,_0x1ef8a0)=>{const _0x1f318d=_0x1ef8a0['target'];_0x3c69b3['isVisible']&&_0x3c69b3['element']['contains'](_0x1f318d)||_0x1e06a7['view']['element']['contains'](_0x1f318d)||this['activeAnnotation']&&_0x19e132['hasDomSelection']()&&(_0x2d9d3f(),_0x14ad26['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x19e132);}['_destroyEditorAnnotationsIntegration'](_0xe56195){_0xe56195&&(this['stopListening'](_0xe56195),this['_editorAnnotations']['remove'](_0xe56195));}['_setSelectedAnnotations'](_0x58ef4d){for(const _0x1442ea of this['_selectedAnnotations'])_0x58ef4d['includes'](_0x1442ea)||this['_manuallyClosedAnnotationViews']['delete'](_0x1442ea['view']);this['_selectedAnnotations']=_0x58ef4d;}['_refreshPositioning'](){const _0x5a3f61=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5a3f61['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2838bf){if(this['_manuallyClosedAnnotationViews']['has'](_0x2838bf['view']))return;const _0xe7337c=this['balloonPanelView']['content']['first'];_0xe7337c!==_0x2838bf['view']?(_0xe7337c&&this['_detachListeners'](_0xe7337c),this['_attachListeners'](_0x2838bf['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2838bf['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x6f5e9c=this['balloonPanelView']['content']['first'],_0x2679a9=_0x6f5e9c&&this['annotations']['getByView'](_0x6f5e9c);if(!_0x2679a9||!this['_annotationToNarrowView']['has'](_0x2679a9))return;const _0x3d35fd=this['_annotationToNarrowView']['get'](_0x2679a9)['element'],_0x5bc0f0=(function(){const _0x5e30ad=_0x39affa['defaultPositions'];return[_0x5e30ad['southArrowNorthEast'],_0x5e30ad['northArrowSouthEast'],_0x5e30ad['southArrowNorth'],_0x5e30ad['northArrowSouth'],_0x5e30ad['southArrowNorthWest'],_0x5e30ad['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3d35fd,'positions':_0x5bc0f0});}['_hideBalloon'](){const _0xe771f=this['balloonPanelView'],_0x3d877b=_0xe771f['content']['first'];_0x3d877b&&(this['_detachListeners'](_0x3d877b),_0xe771f['unpin'](),_0xe771f['content']['clear']());}['_attachListeners'](_0x136575){this['listenTo'](_0x136575,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x136575,'Esc',(_0x3a3c69,_0x55aa9d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x136575),this['_hideBalloon'](),_0x55aa9d();});}['_detachListeners'](_0x3069a1){this['stopListening'](_0x3069a1);}}class c extends _0x6d2056{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x1b4ef4,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ed044){super(_0x4ed044),_0x4ed044['editing']['view']['addObserver'](_0x21fed6),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4ed044['plugins']['get'](_0x1b4ef4),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3703e3=this['editor']['plugins']['get'](j);_0x3703e3['context']===this['editor']&&(_0x3703e3['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x39a325,_0x59a630)=>{const _0xca0ab=this['_balloon'];if(this['isAttached']&&_0xca0ab['visibleView']){const _0x3f46a6=this['annotations']['getByView'](_0xca0ab['visibleView']);_0x3f46a6&&this['_closeAnnotation'](_0x3f46a6),_0x59a630();}}));}['afterInit'](){const _0x210c6b=this['editor']['plugins']['get'](j);_0x210c6b['context']===this['editor']&&(_0x210c6b['hasActive']()||_0x210c6b['switchTo']('inline'));}['setActiveAnnotation'](_0x2047c7){_0x2047c7!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2047c7&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2047c7)&&this['_addAnnotationToBalloon'](_0x2047c7,!0x0),_0x2047c7['isActive']=!0x0),_0x2047c7||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2047c7);}['attach'](_0x4d952e){this['annotations']=_0x4d952e;const _0x51f0a4=this['editor']['plugins']['get'](j),_0x38fd2c=this['_balloon'];if(this['isAttached'])throw new _0x2cc838('inlineannotations-attach-already-attached',this);if(_0x51f0a4['context']!==this['editor'])throw new _0x2cc838('inlineannotations-not-allowed-with-context',this);const _0x35b35c=this['editor']['plugins']['get'](b);this['listenTo'](_0x35b35c,'refresh',()=>{const _0xacaeda=_0x35b35c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2c81c8,_0x89363b;!this['_forceRefresh']&&(_0x2c81c8=_0xacaeda,_0x89363b=this['_selectedAnnotations'],_0x2c81c8['length']===_0x89363b['length']&&_0x2c81c8['every'](_0x326fdf=>_0x89363b['includes'](_0x326fdf)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xacaeda),this['setActiveAnnotation'](_0xacaeda[0x0]||null));}),this['listenTo'](_0x35b35c,'blur',(_0x48fc41,{isAnnotationTracked:_0x2cfb1e})=>{this['activeAnnotation']&&_0x2cfb1e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3ec74e,_0x247c53,_0x5c24d3)=>{_0x5c24d3||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4d952e,'remove',(_0x4ceebc,_0x3ca461)=>{this['_removeAnnotationFromBalloon'](_0x3ca461),_0x3ca461===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x38fd2c,'change:visibleView',(_0x2aa3dc,_0x780442,_0x456258,_0x4ef989)=>{_0x4ef989&&this['stopListening'](_0x4ef989);const _0x5a0b41=_0x4d952e['getByView'](_0x456258);_0x456258&&_0x5a0b41&&(this['listenTo'](_0x456258,'change:height',()=>{_0x38fd2c['updatePosition']();}),this['listenTo'](_0x456258,'Esc',()=>{this['_closeAnnotation'](_0x5a0b41),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5a0b41&&this['setActiveAnnotation'](_0x5a0b41));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x38fd2c['visibleView']&&(_0x4d952e['getByView'](_0x38fd2c['visibleView'])&&_0x38fd2c['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 _0x2cc838('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4a4419 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4a4419);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x23a031){for(const _0x133809 of this['_selectedAnnotations'])_0x23a031['includes'](_0x133809)||this['_manuallyClosed']['delete'](_0x133809);for(const _0x38515c of this['annotations'])_0x23a031['includes'](_0x38515c)||this['_removeAnnotationFromBalloon'](_0x38515c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x7cff2a of _0x23a031)this['_addAnnotationToBalloon'](_0x7cff2a);}this['_selectedAnnotations']=_0x23a031;}['_addAnnotationToBalloon'](_0x1e5f41,_0x18e27e=!0x1){this['_manuallyClosed']['has'](_0x1e5f41)||(this['_addedAnnotations']['has'](_0x1e5f41)||this['_balloon']['hasView'](_0x1e5f41['view'])||(this['_addedAnnotations']['add'](_0x1e5f41),this['_balloon']['add']({'stackId':_0x1e5f41['view']['id'],'view':_0x1e5f41['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1e5f41)}})),_0x18e27e&&this['_balloon']['showStack'](_0x1e5f41['view']['id']));}['_getBalloonTargetForAnnotation'](_0x50af96){const _0x41bc50=_0x50af96['target'],_0x214e47=this['editor']['editing']['view'],_0x4eb01e=_0x214e47['document']['selection']['getFirstRange'](),_0x5bf77b=_0x214e47['domConverter']['viewRangeToDom'](_0x4eb01e);if(_0x5bf77b['collapse'](!0x0),_0x41bc50){if(_0x41bc50 instanceof _0x23d655)return _0x41bc50;let _0x18248b=[];for(const _0x4d4028 of _0x41bc50)_0x18248b['push'](...F(_0x4d4028['getClientRects']()));_0x18248b=function(_0xdb2d6c){const _0x4f1589=[];let _0x212d78=_0xdb2d6c[0x0];for(let _0x4e9c66=0x1;_0x4e9c66<_0xdb2d6c['length'];_0x4e9c66++)P(_0x212d78,_0xdb2d6c[_0x4e9c66])?_0x212d78['width']+=_0xdb2d6c[_0x4e9c66]['width']:(_0x4f1589['push'](_0x212d78),_0x212d78=_0xdb2d6c[_0x4e9c66]);return _0x4f1589['push'](_0x212d78),_0x4f1589;}(_0x18248b);const _0x509881=_0x5bf77b['getBoundingClientRect']();return _0x18248b['find'](_0x1a6993=>_0x1a6993['top']<=_0x509881['top']&&_0x1a6993['bottom']>=_0x509881['bottom']&&_0x1a6993['left']<=_0x509881['left']&&_0x1a6993['right']>=_0x509881['right'])||_0x18248b[0x0];}return _0x50af96['targetRect']||_0x5bf77b;}['_removeAnnotationFromBalloon'](_0x156637){this['_addedAnnotations']['has'](_0x156637)&&this['_balloon']['hasView'](_0x156637['view'])&&(this['_addedAnnotations']['delete'](_0x156637),this['_balloon']['remove'](_0x156637['view']));}['_closeAnnotation'](_0x25bb98){this['_manuallyClosed']['add'](_0x25bb98),this['_removeAnnotationFromBalloon'](_0x25bb98);}}function F(_0x43f9e2){return Array['from'](_0x43f9e2)['map'](DOMRect['fromRect']);}function P(_0x41e1f6,_0x1f2a9a){return _0x41e1f6['top']===_0x1f2a9a['top']&&_0x41e1f6['bottom']===_0x1f2a9a['bottom']&&_0x41e1f6['right']===_0x1f2a9a['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x59eb73,_0x4acc80){super(_0x59eb73),this['set']('isEmpty',!_0x4acc80['length']),this['focusTracker']=new _0x5f12d6(),this['_annotationViews']=_0x4acc80,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x349db7({'focusables':_0x4acc80,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4acc80,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4acc80,'remove',(_0x3cb408,_0x13bf88)=>{_0x13bf88['isActive']&&this['focus'](),_0x4acc80['length']||(this['isEmpty']=!0x0);});const _0x44f767=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x59eb73,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4acc80},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x44f767['if']('isEmpty','ck-hidden',_0x334b7d=>!_0x334b7d)]},'children':[{'text':N(_0x59eb73,'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 _0x50aa33 of this['_annotationViews'])this['focusTracker']['add'](_0x50aa33['element']);this['_annotationViews']['on']('change',(_0x1ac178,{added:_0x20346d,removed:_0x1ab8f0})=>{for(const _0x3a0723 of _0x20346d)this['focusTracker']['add'](_0x3a0723['element']);for(const _0x1b3225 of _0x1ab8f0)this['focusTracker']['remove'](_0x1b3225['element']);});}}class p extends _0x313b3a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x315d89){super(_0x315d89),this['archivedThreads']=new _0x4d5d77();}['init'](){const _0x45b28e=this['context'],_0x4b007b=_0x45b28e['plugins']['get'](o),_0x239699=_0x45b28e['plugins']['get'](y);this['listenTo'](_0x4b007b,'addCommentThread',(_0x2c5df0,{threadId:_0x1124e6})=>{const _0x1daf16=_0x4b007b['getCommentThread'](_0x1124e6);_0x1daf16['archivedAt']&&this['archivedThreads']['add'](_0x1daf16,this['_calculatePosition'](_0x1daf16['archivedAt'])),this['listenTo'](_0x1daf16,'change:archivedAt',(_0x4528a8,_0xa4cc2c,_0x34df2e)=>{_0x34df2e?this['archivedThreads']['has'](_0x1daf16)||this['archivedThreads']['add'](_0x1daf16,this['_calculatePosition'](_0x1daf16['archivedAt'])):this['archivedThreads']['has'](_0x1daf16)&&this['archivedThreads']['remove'](_0x1daf16);});}),this['listenTo'](_0x4b007b,'removeCommentThread',(_0x1d8344,{threadId:_0x44d6d3})=>{const _0x238b68=_0x4b007b['getCommentThread'](_0x44d6d3);this['stopListening'](_0x238b68),this['archivedThreads']['has'](_0x238b68)&&this['archivedThreads']['remove'](_0x238b68);},{'priority':'highest'}),this['listenTo'](_0x239699['collection'],'focus',(_0x35fbe8,_0x26dd81)=>{_0x26dd81['isVisible']||(_0x26dd81['isActive']=!0x0,_0x239699['activate'](_0x26dd81));});}['_calculatePosition'](_0x3b83d2){const _0x3b1ccf=[...this['archivedThreads']]['findIndex'](_0x1738c3=>_0x1738c3['archivedAt']<_0x3b83d2);return _0x3b1ccf>-0x1?_0x3b1ccf:this['archivedThreads']['length'];}}class a extends _0x6d2056{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1c0817];}constructor(_0x569f94){super(_0x569f94),this['annotationViews']=new _0x118739(),this['_pendingThreads']=[];}['init'](){const _0x44c2c8=this['editor'],_0x584148=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x44c2c8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3596fa,!0x0)),_0x44c2c8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2df3da=this['_createCommentsArchiveButton'](_0x1a9c60);return _0x2df3da['set']({'role':'menuitemcheckbox'}),_0x2df3da;});const _0x3b40a4=_0x44c2c8['plugins']['get'](p),_0x4e8042=_0x44c2c8['plugins']['get']('Annotations'),_0x21d232=_0x44c2c8['plugins']['get']('CommentsRepository');_0x3b40a4['archivedThreads']['forEach'](_0x35f226=>{this['_handleNewThread'](_0x35f226);}),this['listenTo'](_0x3b40a4['archivedThreads'],'add',(_0x350847,_0x5cb7d4)=>{this['_handleNewThread'](_0x5cb7d4);}),this['listenTo'](_0x4e8042['collection'],'add',(_0x4817d1,_0x5cd8fb)=>{const _0x394964=this['_pendingThreads']['find'](_0x448732=>{const _0xbd08fd=_0x21d232['_threadToController']['get'](_0x448732);return _0xbd08fd&&_0x5cd8fb['innerView']===_0xbd08fd['view'];});if(_0x394964){const _0xed0e18=this['_calculatePosition'](_0x394964['archivedAt']);this['_addAnnotationToArchive'](_0x5cd8fb,_0xed0e18),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x394964),0x1);}}),this['listenTo'](_0x3b40a4['archivedThreads'],'remove',(_0x5ca7cf,_0x31be4b)=>{const _0x1f6da9=_0x44c2c8['config']['get']('collaboration.channelId');if(!_0x1f6da9||_0x31be4b['channelId']===_0x1f6da9){if(this['_pendingThreads']['includes'](_0x31be4b))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x31be4b),0x1);else{const _0xd50263=_0x21d232['_threadToController']['get'](_0x31be4b),_0x4d15aa=_0x4e8042['getByInnerView'](_0xd50263['view']);this['annotationViews']['remove'](_0x4d15aa['view']),this['stopListening'](_0x4d15aa),this['stopListening'](_0x4d15aa['focusableElements']);}}}),this['listenTo'](_0x4e8042['collection'],'add',(_0x5866df,_0x38d40d)=>{this['listenTo'](_0x38d40d,'escape',_0x584148);}),this['listenTo'](_0x4e8042['collection'],'remove',(_0x575b80,_0x199bbf)=>{this['stopListening'](_0x199bbf,'escape',_0x584148);});}['_addAnnotationToArchive'](_0x5bc0bb,_0x31818c){this['listenTo'](_0x5bc0bb,'set:isVisible',_0x41beff=>{_0x41beff['return']=!0x1,_0x41beff['stop']();}),this['annotationViews']['add'](_0x5bc0bb['view'],_0x31818c);}['_handleNewThread'](_0x28c644){const _0x32b28a=this['editor']['plugins']['get']('CommentsRepository'),_0x20e116=this['editor']['plugins']['get']('Annotations'),_0x441390=this['editor']['config']['get']('collaboration.channelId');if(!_0x441390||_0x28c644['channelId']===_0x441390){const _0x3f7682=_0x32b28a['_threadToController']['get'](_0x28c644);if(!_0x3f7682)return void this['_pendingThreads']['push'](_0x28c644);const _0x1292d4=this['_calculatePosition'](_0x28c644['archivedAt']),_0x3ce210=_0x20e116['getByInnerView'](_0x3f7682['view']);_0x3ce210['isVisible']&&_0x20e116['_visibleAnnotations']['remove'](_0x3ce210),this['_addAnnotationToArchive'](_0x3ce210,_0x1292d4);}}['_calculatePosition'](_0x4f2769){const _0x43b7c4=this['editor']['config']['get']('collaboration.channelId'),_0x5476e7=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x7f07af=>_0x7f07af['channelId']===_0x43b7c4)['findIndex'](_0x43de74=>_0x43de74['archivedAt']<_0x4f2769);return _0x5476e7<0x0||_0x5476e7>this['annotationViews']['length']?this['annotationViews']['length']:_0x5476e7-0x1;}['_toggleDialog'](){const _0x15a40a=this['editor'],_0xa4d6f7=_0x15a40a['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x15a40a['locale'],this['annotationViews'])),'commentsArchive'===_0xa4d6f7['id']?_0xa4d6f7['hide']():_0xa4d6f7['show']({'id':'commentsArchive','title':N(_0x15a40a['locale'],'COMMENTS_ARCHIVE'),'icon':_0x445ed3,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x324a55['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x499f0c,_0x4e5979=!0x1){const _0x1226ac=this['editor']['locale'],_0x356caf=this['editor']['plugins']['get']('Dialog'),_0x562cba=new _0x499f0c(_0x1226ac);return _0x562cba['bind']('isEnabled')['to'](this,'isEnabled'),_0x562cba['bind']('isOn')['to'](_0x356caf,'id',_0xd02979=>'commentsArchive'===_0xd02979),_0x562cba['set']({'label':N(_0x1226ac,'COMMENTS_ARCHIVE'),'icon':_0x445ed3,'isToggleable':!0x0}),_0x4e5979&&(_0x562cba['tooltip']=!0x0),this['listenTo'](_0x562cba,'execute',()=>this['_toggleDialog']()),_0x562cba;}['_hideDialogOnAnnotationEscape']=_0x31a8d9=>{const _0x1b4615=_0x31a8d9['source'];if(!this['annotationViews']['has'](_0x1b4615['view']))return;const _0x3ace16=this['editor']['plugins']['get']('Dialog');_0x3ace16['isOpen']&&'commentsArchive'===_0x3ace16['id']&&(_0x3ace16['hide'](),_0x31a8d9['stop']());};}class gi extends _0x6d2056{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
23
+ import{Editor as _0x5b3a53,ContextPlugin as _0x5118e4,PendingActions as lt,Command as _0x160ab1,Plugin as _0x1a8a89,Context as _0x9cd991}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x10759b,uid as _0x3a8278,KeystrokeHandler as jt,FocusTracker as _0xcadfab,diff as _0x4ae71d,Collection as _0x4c94f2,Rect as _0x4a235e,CKEditorError as _0x14d322,first as _0xae91ba,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x27c92b,keyCodes as _0x4fa850}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x51e309,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x4dab59,trimHtml as _0x4d7375,LateFocusDropdownButtonView as _0x9749c4,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x40265e}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x59bbc8}from'es-toolkit/compat';import{IconUndo as _0x56b05b,IconCheck as _0x10bce4,IconPencil as _0x42e82c,IconRemoveComment as _0x617441,IconThreeVerticalDots as _0x32289c,IconAddComment as _0x3dc0ca,IconCommentsArchive as _0x336738}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x591d39,ButtonView as _0xd97268,ViewCollection as _0x147aaa,createDropdown as _0x4a1fd1,ListView as _0x6f1eb1,focusChildOnDropdownOpen as _0x36d920,ListItemView as _0x5354d7,MenuBarMenuListItemButtonView as _0xf18d98,BodyCollection as _0x2529d9,BalloonPanelView as _0x1d9749,ContextualBalloon as _0x18064d,Dialog as _0x2a3d54,DialogViewPosition as _0x151e91}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0xa02bd3}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x4eab4a}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2b3498}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0x10759b(){['model'];['view'];constructor(_0x5e97e2,_0xa77bf6){super(),this['model']=_0x5e97e2,this['model']['_isAttached']=!0x0,this['view']=_0xa77bf6,this['listenTo'](_0xa77bf6,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0xa77bf6,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0xa77bf6,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0xa77bf6,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0xa77bf6,'addComment',(_0x29badc,_0x2da5da)=>this['addComment'](_0x2da5da)),this['listenTo'](_0xa77bf6,'updateComment',(_0x123329,_0x5881de,_0x1ea1dc)=>this['updateComment'](_0x5881de,_0x1ea1dc)),this['listenTo'](_0xa77bf6,'removeComment',(_0x4b820c,_0x59eaa7)=>this['removeComment'](_0x59eaa7));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1a7e3d){this['model']['addComment']({'content':_0x1a7e3d,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x465ad5,_0xe536e5){this['model']['getComment'](_0x465ad5)['update']({'content':_0xe536e5});}['removeComment'](_0x2cdd64){this['model']['getComment'](_0x2cdd64)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x507ff0,_0x526d42,_0x1b7df9){const t=_0x507ff0['t'];switch(_0x526d42){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'},_0x1b7df9);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'},_0x1b7df9);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'},_0x1b7df9);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'},_0x1b7df9);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1b7df9);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'},_0x1b7df9);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'},_0x1b7df9);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'},_0x1b7df9);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x2ad228,_0x585be8){super(_0x2ad228);const _0x415993=_0x3a8278();this['main']=this['createCollection'](),this['editable']=new $t(_0x2ad228,_0x585be8,void 0x0,{'label':()=>N(_0x2ad228,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x2ad228['uiLanguageDirection'],'lang':_0x2ad228['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x415993},'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 Ft extends Ut{['view'];constructor(_0x136021){super(_0x136021),this['view']=new Vt(_0x136021['locale'],_0x136021['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x449ab5=this['editor']['editing']['view'],_0x2ea12d=this['view']['editable'],_0xb48cea=_0x449ab5['document']['getRoot']();_0x2ea12d['name']=_0xb48cea['rootName'],this['view']['render']();const _0x23caac=_0x2ea12d['element'];this['setEditableElement'](_0x2ea12d['name'],_0x23caac),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x449ab5['attachDomRoot'](_0x23caac),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
25
+ _0x10759b(_0x5b3a53){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x2c7553={}){function _0x56e471(_0x410af9){return _0x410af9['map'](_0x582462=>String['fromCharCode'](_0x582462))['join']('');}(_0x2c7553=Object['assign']({},_0x2c7553))['plugins']||(_0x2c7553['plugins']=Rt['defaultPlugins']),super(_0x2c7553),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x56e471([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x56e471([0x76,0x69,0x65,0x77])][_0x56e471([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x56e471([0x61,0x75,0x74,0x6f]),this[_0x56e471([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x56e471([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x56e471([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x56e471([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x56e471([0x6f,0x6b])});}['create'](){const _0x2d43e3=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2d43e3))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3fd0ad=>{const _0x4c126a=this['model']['document']['getRoot'](),_0xd92c02=_0x4c126a&&_0x4c126a['getChild'](_0x4c126a['childCount']-0x1);_0x3fd0ad['setSelection'](_0xd92c02,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x22f1f6=this['editing']['view'],_0x1d6b46=_0x22f1f6['document']['getRoot'](),_0x4767dc=_0x1d6b46['getChild'](0x0);_0x1d6b46['childCount']>0x1||!_0x4767dc||'p'!=_0x4767dc['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x22f1f6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4767dc['placeholder']=this['placeholder']),St({'view':_0x22f1f6,'element':_0x4767dc,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4767dc);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x334075,_0x343b65={}){super(_0x334075),this['editor']=null,this['_editorConfig']=_0x343b65,this['set']('value',_0x343b65['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x334075,'Reply...')),this['set']('submitLabel',N(_0x334075,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xcadfab(),this['focusCycler']=new _0x591d39({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x21afa3,_0x3b23af)=>{this['cancelButtonView']['fire']('execute'),_0x3b23af();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4cb284,_0x5e5c9f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5e5c9f());}),this['on']('submit',(_0x1b20e2,_0x4aad8a)=>{_0x4aad8a['length']>0xfde8?(alert(N(_0x334075,'TOO_LONG_COMMENT_ALERT',[_0x4aad8a['length'],0xfde8])),_0x1b20e2['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3facb6=this['editor'];this['element']['insertBefore'](_0x3facb6['ui']['element'],this['element']['firstChild']),_0x3facb6['model']['document']['on']('change',()=>this['value']=_0x3facb6['getData']()),_0x3facb6['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3facb6['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x194fa7){-0x1===_0x194fa7?(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:_0x3fa0c1}=this,_0xaf3da6=new _0xd97268(_0x3fa0c1);return _0xaf3da6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xaf3da6['withText']=!0x0,_0xaf3da6['bind']('label')['to'](this,'submitLabel'),_0xaf3da6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xaf3da6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xd97570,_0x1bfd14)=>!_0x1bfd14&&!!_0xd97570['trim']()),_0xaf3da6;}['_createCancelButton'](){const {locale:_0x584934}=this,_0x56e1e1=new _0xd97268(_0x584934);return _0x56e1e1['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x56e1e1['label']=N(_0x584934,'Cancel'),_0x56e1e1['withText']=!0x0,_0x56e1e1['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x56e1e1;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x321fe5=>{this['focusTracker']['add'](_0x321fe5['element']);}),this['focusables']['on']('change',(_0xe27a89,_0x4c6503)=>{for(const _0x25afe4 of Array['from'](_0x4c6503['added'])['reverse']())this['focusTracker']['add'](_0x25afe4['element']);});}}class ie extends kt{constructor(_0x1c8b4e,_0x300fc2,_0x2e603f){super(_0x1c8b4e),this['commentInputView']=new os(_0x1c8b4e,_0x2e603f),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x39307a,_0x45913b)=>_0x39307a||!!_0x45913b),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 _0x51e309(_0x1c8b4e,_0x300fc2),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'](_0x3dbd91){this['commentInputView']['focus'](_0x3dbd91);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5b50e6,_0x1f5080)=>{const {submitButtonView:_0x23213b,cancelButtonView:_0x25f2f9,editor:_0x374006}=this['commentInputView'];[_0x23213b['element'],_0x25f2f9['element'],_0x374006?_0x374006['editing']['view']['getDomRoot']():null]['filter'](_0x1a4e32=>_0x1a4e32)['some'](_0x5bc835=>_0x5bc835['contains'](_0x1f5080['target']))||(this['focus'](),_0x1f5080['preventDefault']());});}}class rs extends kt{constructor(_0xeb3349){super(_0xeb3349);const _0x297627=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x297627['to']('count',_0x2ad255=>N(_0xeb3349,'NUMBER_OF_COMMENTS',_0x2ad255))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x296472,_0x1f8d46,_0x3923d8){super(_0x296472);const _0x3bb3e0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1f8d46['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1f8d46,this['_config']=_0x3923d8,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xcadfab(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591d39({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x39ba1f=>this['commentViews']['map'](_0x3544a4=>_0x3544a4['element'])['includes'](_0x39ba1f['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x296472),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x33993a=>_0x33993a-this['_config']['maxCommentsWhenCollapsed']);for(const _0x467372 of _0x1f8d46['comments'])this['_handleNewCommentModel'](_0x467372);this['_handleInfoComment'](),this['listenTo'](_0x1f8d46['comments'],'add',(_0x591b24,_0x41c6be)=>{const _0x1dfcd7=this['_calculatePosition'](_0x41c6be);this['length']++,this['_handleNewCommentModel'](_0x41c6be,_0x1dfcd7),this['refreshVisibleViews']();}),this['listenTo'](_0x1f8d46['comments'],'remove',(_0x185493,_0x46e9f2)=>{this['length']--,this['_handleRemoveCommentModel'](_0x46e9f2),this['refreshVisibleViews']();}),this['listenTo'](_0x1f8d46,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1f8d46,'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',_0x3bb3e0['if']('length','ck-hidden',_0x458874=>!_0x458874)],'aria-label':N(_0x296472,'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'](_0x13493f){-0x1===_0x13493f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x584598 of this['commentViews'])_0x584598['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1684b0,_0x3a3a47){const _0x4f88d2=new this['_config']['CommentView'](this['locale'],_0x1684b0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4f88d2['viewUid']=_0x1684b0['id'],_0x4f88d2['delegate']('removeComment')['to'](this),_0x4f88d2['delegate']('updateComment')['to'](this),_0x4f88d2['delegate']('resolveCommentThread')['to'](this),_0x4f88d2['delegate']('editorReady')['to'](this),_0x4f88d2['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4f88d2,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4f88d2,_0x3a3a47);}['_calculatePosition'](_0x1e429d){const _0x2ce277=this['_model']['_findOptimalIndex'](_0x1e429d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1e429d['authoredAt']?_0x2ce277-0x1:_0x2ce277:_0x2ce277-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3a56f6={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3a56f6,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3a56f6));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x151c03){const _0x142dfa=this['commentViews']['remove'](_0x151c03['id']);this['stopListening'](_0x142dfa),_0x142dfa['isEditMode']&&this['_updateHasDirtyComment'](),_0x142dfa['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5579cb=>_0x5579cb['isEditMode']);}['_rearrangeCollapse'](){const _0x4a95fb=function(_0x113caf){const _0x2f8970=new _0x4c94f2();for(const _0x45d40a of _0x113caf)_0x2f8970['add'](_0x45d40a);return _0x2f8970;}(this['commentViews']),_0x235f65=this['_collapsedCommentsView']['count'];for(let _0x3b8f6b=0x1;_0x3b8f6b<=_0x235f65;_0x3b8f6b++)_0x4a95fb['remove'](0x1);for(const _0x40376f of _0x4a95fb)_0x40376f['collapse']();_0x235f65>0x0&&_0x4a95fb['add'](this['_collapsedCommentsView'],0x1),ns(_0x4ae71d(Array['from'](this['visibleViews']),Array['from'](_0x4a95fb)),this['visibleViews'],_0x4a95fb);}['_rearrangeExpand'](){ns(_0x4ae71d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x424704 of this['visibleViews'])_0x424704['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x18d857=>{this['focusTracker']['add'](_0x18d857['element']),this['keystrokes']['listenTo'](_0x18d857['element']);}),this['commentViews']['on']('change',(_0x417a14,_0x19b490)=>{for(const _0x43055d of _0x19b490['removed'])this['focusTracker']['remove'](_0x43055d['element']),this['keystrokes']['stopListening'](_0x43055d['element']);for(const _0x3f59ed of Array['from'](_0x19b490['added'])['reverse']())this['focusTracker']['add'](_0x3f59ed['element']),this['keystrokes']['listenTo'](_0x3f59ed['element']);});}}function ns(_0x5bac87,_0x48eec7,_0x4420e9){let _0x4a4eff=0x0;for(const _0x52401c of _0x5bac87)switch(_0x52401c){case'insert':_0x48eec7['add'](_0x4420e9['get'](_0x4a4eff),_0x4a4eff),_0x4a4eff++;break;case'delete':_0x48eec7['remove'](_0x4a4eff);break;case'equal':_0x4a4eff++;}}class oe extends kt{constructor(_0xbd5a28){super(_0xbd5a28);const _0x2dd3d2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2dd3d2['to']('contextValue',_0xeca2b6=>N(_0xbd5a28,'THREAD_CONTEXT_LABEL',_0xeca2b6)),'tabindex':-0x1},'children':[{'text':_0x2dd3d2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3bc6db,_0x309614){super(_0x3bc6db);const _0x4c8950=this['bindTemplate'];this['_model']=_0x309614,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xcadfab(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591d39({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x30ac37=>!!_0x30ac37),this['bind']('contextValue')['to'](this['_model'],'context',_0x2209e7=>_0x2209e7&&_0x2209e7['value']?this['_trimContextValue'](_0x2209e7['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x4c8950['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 _0x74a49d=new _0xd97268(this['locale']);return _0x74a49d['label']=N(this['locale'],'Reopen'),_0x74a49d['tooltip']=N(this['locale'],'Reopen'),_0x74a49d['icon']=_0x56b05b,_0x74a49d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1b3f49=>!_0x1b3f49),_0x74a49d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2e70a1,_0x555fc3)=>_0x2e70a1&&_0x555fc3),_0x74a49d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x74a49d;}['_trimContextValue'](_0x1368cc){if(_0x1368cc['length']<0x96)return _0x1368cc;const _0x586359=_0x1368cc['lastIndexOf']('\x20',0x93);return _0x1368cc['substring'](0x0,_0x586359>-0x1?_0x586359:0x93)+'...';}['_attachContextActions'](){const _0x33d366=this['element']['querySelector']('.ck-context'),_0x105d28=_0x33d366['querySelector']('.ck-context__value');this['listenTo'](_0x33d366,'mouseenter',()=>{_0x105d28['offsetWidth']<_0x105d28['scrollWidth']&&_0x33d366['classList']['add']('overlay');}),this['listenTo'](_0x33d366,'mouseleave',()=>{_0x33d366['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x410925 of this['focusables'])this['focusTracker']['add'](_0x410925['element']),this['keystrokes']['listenTo'](_0x410925['element']);}['_createContextView'](){const _0x3e9959=new oe(this['locale']);return _0x3e9959['bind']('contextValue')['to'](this),_0x3e9959;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x463655,_0x33c483,_0x8962c3,_0x4748fa){super(_0x463655),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x33c483,this['_localUser']=_0x8962c3,this['_config']=_0x4748fa,this['commentThreadHeaderView']=new Yt(_0x463655,_0x33c483),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x463655,N(_0x463655,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x463655,_0x33c483,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4748fa)),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',(_0x2447e3,_0xe9f8f1)=>_0x2447e3||!!_0xe9f8f1),this['bind']('isUnlinked')['to'](_0x33c483,'unlinkedAt',_0x49a085=>!!_0x49a085),this['bind']('ariaLabel')['to'](this,'length',_0x85cf40=>{const _0x1dc9a7=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x85cf40,_0x1dc9a7]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xcadfab(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591d39({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x286e31=>_0x286e31['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x55cf56=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x40d29f=_0x55cf56['commentInputView'];return _0x55cf56['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x40d29f,'value',(_0x1b1513,_0x4c962b,_0x73ea9c,_0x54137c,_0x2347da)=>!!_0x2347da||!!_0x54137c&&_0x73ea9c&&!_0x4c962b||_0x1b1513&&_0x73ea9c&&!_0x4c962b),_0x40d29f['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3995c4,_0x5f2f75,_0x23175d)=>{let _0x283357;return _0x283357=_0x23175d&&_0x5f2f75?'Reply\x20to\x20reopen\x20discussion...':_0x3995c4?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x283357);}),_0x40d29f['bind']('submitLabel')['to'](this,'length',_0x547ef1=>N(this['locale'],_0x547ef1?'Reply':'Comment')),_0x40d29f['on']('submit',(_0x1cdc3d,_0x1735fe)=>{this['fire']('addComment',_0x1735fe),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x40d29f['on']('cancel',()=>{this['focus']();}),_0x40d29f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x40d29f['on']('cancel',_0x29740e=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x29740e['stop']());}),this['on']('change:isActive',(_0x1fd697,_0x1eabbf,_0x406e10)=>{_0x406e10||this['length']||_0x40d29f['value']||this['fire']('removeCommentThread');}),_0x55cf56;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1b3274,_0x4a7e09,_0x1e77a1,_0x2f8ac1){super(_0x1b3274,_0x4a7e09,_0x1e77a1,_0x2f8ac1),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1b3274,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x30bb29,_0x413fdf,_0x566989)=>{_0x566989||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x430b92,_0x454949,_0x176980)=>{_0x176980&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4fa4d8=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4fa4d8['if']('isActive','ck-thread--active'),_0x4fa4d8['if']('isUnlinked','ck-thread--unlinked'),_0x4fa4d8['if']('isConfirm','ck-thread--remove-confirmation'),_0x4fa4d8['to']('actionIndicator',_0x4af59e=>_0x4af59e?'ck-thread--'+_0x4af59e:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4fa4d8['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 _0x5a3be9 of this['commentsListView']['commentViews'])_0x5a3be9['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x15c844}=this,_0xab6434=this['commentsListView']['commentViews']['get'](0x0);_0xab6434===this['_boundFirstCommentView']||_0xab6434['isSystemComment']||(this['_boundFirstCommentView']=_0xab6434,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0xab6434,'actionIndicator',_0x5d7e2=>'remove'===_0x5d7e2?'remove':null),_0xab6434['placeholder']=N(_0x15c844,'Write\x20a\x20comment...'),_0xab6434['removeButton']['on']('execute',_0x240443=>{_0x240443['stop'](),this['showConfirm'](N(_0x15c844,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0xab6434['focus']();}),_0xab6434['actionBar']['add'](this['resolveButton'],0x0),_0xab6434['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0xcc6a7c=new _0x4dab59(this['locale']);return _0xcc6a7c['label']=N(this['locale'],'Resolve'),_0xcc6a7c['tooltip']=N(this['locale'],'Resolve'),_0xcc6a7c['icon']=_0x10bce4,_0xcc6a7c['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0xcc6a7c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x37f453=>!_0x37f453),_0xcc6a7c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1e104a,_0x47c677)=>_0x1e104a&&!_0x47c677),_0xcc6a7c['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0xcc6a7c;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x5c2803){super(_0x5c2803),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x44f54f,_0x3c52f8,_0x26107e)=>{this['element']['innerHTML']=_0x26107e;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1e73cb,_0x44f159,_0x834f94){super(_0x1e73cb),this['_model']=_0x44f159,this['_config']=_0x834f94,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x44f159,'content',_0x44f159,'authoredAt',(_0x17e985,_0x35f23c)=>N(_0x1e73cb,'COMMENT_ARIA_LABEL',[_0x44f159['author']['name'],_0x834f94['formatDateTime'](_0x35f23c),new DOMParser()['parseFromString'](_0x17e985,'text/html')['body']['textContent'],_0x44f159['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x1e73cb,N(_0x1e73cb,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x147aaa(),this['focusTracker']=new _0xcadfab(),this['keystrokes']=new jt(),this['focusCycler']=new _0x591d39({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3423d9=>_0x3423d9['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x16d95c=new es(this['locale']);return _0x16d95c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x182b0d,_0x41e7e0)=>_0x41e7e0?_0x4d7375(_0x182b0d,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x182b0d),_0x16d95c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4738f6=new os(this['locale'],this['_config']['editorConfig']);return _0x4738f6['value']=this['_model']['content'],_0x4738f6['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4738f6['submitLabel']=N(this['locale'],'Save'),_0x4738f6['on']('submit',(_0x10e3de,_0xa5ef7)=>{this['fire']('updateComment',this['_model']['id'],_0xa5ef7),this['switchToDisplayMode'](),this['focus']();}),_0x4738f6['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4738f6['once']('editorReady',()=>{_0x4738f6['focus']();}),_0x4738f6['createEditor'](),_0x4738f6['delegate']('editorReady')['to'](this),_0x4738f6['delegate']('editorDestroyed')['to'](this),_0x4738f6;}['_setupKeyboardNavigation'](){const _0x3353cf=this['element'];this['keystrokes']['listenTo'](_0x3353cf);for(const _0x48b0ba of this['focusables'])this['focusTracker']['add'](_0x48b0ba['element']),this['keystrokes']['listenTo'](_0x48b0ba['element']);this['focusables']['on']('change',(_0x128ab2,_0x4f2bb1)=>{for(const _0x5c66f9 of _0x4f2bb1['removed'])this['focusTracker']['remove'](_0x5c66f9['element']),this['keystrokes']['stopListening'](_0x5c66f9['element']);for(const _0x1a1425 of _0x4f2bb1['added'])this['focusTracker']['add'](_0x1a1425['element']),this['keystrokes']['listenTo'](_0x1a1425['element']);}),this['keystrokes']['set']('enter',(_0x1354fd,_0x49d509)=>{_0x3353cf===_0x1354fd['target']&&(this['focusCycler']['focusFirst'](),_0x49d509());}),this['keystrokes']['set']('esc',(_0x21efa2,_0x314a7d)=>{_0x3353cf!==_0x21efa2['target']&&(this['focus'](),_0x314a7d());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(di){['actionBar'];['userView'];constructor(_0x241747,_0x9e50db,_0x57adb9){super(_0x241747,_0x9e50db,_0x57adb9),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x241747,'Reply...')),this['bind']('authoredAt')['to'](_0x9e50db),this['bind']('resolvedAt')['to'](_0x9e50db),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 _0x51e309(_0x241747,_0x9e50db['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x9e50db,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x544a25=this['bindTemplate'],_0x210206=[{'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':_0x544a25['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x544a25['to']('authoredAt',_0x2e3a3b=>this['_config']['formatDateTime'](_0x2e3a3b))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x544a25['if']('isEditMode','ck-comment__actions--hidden'),_0x544a25['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']&&_0x210206['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x544a25['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x544a25['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x544a25['if']('isEditMode','ck-comment--edit'),_0x544a25['if']('isSystemComment','ck-comment--info'),_0x544a25['to']('actionIndicator',_0x3482e8=>_0x3482e8?'ck-comment--'+_0x3482e8:'')],'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':_0x210206}]}]};}['_createEditButton'](){const _0x4115d6=new _0xd97268(this['locale']);return _0x4115d6['label']=N(this['locale'],'Edit'),_0x4115d6['icon']=_0x42e82c,_0x4115d6['withText']=!0x0,_0x4115d6['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x4115d6['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x19fdbb=>!_0x19fdbb),_0x4115d6['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x4115d6['on']('execute',()=>this['switchToEditMode']()),_0x4115d6;}['_createRemoveButton'](){const _0x4961eb=new _0xd97268(this['locale']);return _0x4961eb['label']=N(this['locale'],'Remove'),_0x4961eb['icon']=_0x617441,_0x4961eb['withText']=!0x0,_0x4961eb['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4961eb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x54af37=>!_0x54af37),_0x4961eb['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4961eb['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4961eb;}['_createDropdown'](){const _0x24d36e=_0x4a1fd1(this['locale'],_0x9749c4),_0x5b333b=_0x24d36e['panelView']['children'],_0x5eb667=new _0x6f1eb1(this['locale']),_0x25c6d1=_0x24d36e['bindTemplate'];_0x36d920(_0x24d36e,()=>this['items']['find'](_0x53054b=>_0x53054b['isVisible'])),_0x24d36e['extendTemplate']({'attributes':{'class':[_0x25c6d1['if']('isVisible','ck-hidden',_0x5716d1=>!_0x5716d1)]}});const _0x7cdf87=(_0x1aad4e,_0x49a6bd=-0x1)=>{const _0x129578=new _0x5354d7(this['locale']);_0x129578['children']['add'](_0x1aad4e);const _0xf0724f=_0x49a6bd>-0x1?_0x49a6bd:_0x5eb667['items']['length'];_0x5eb667['items']['add'](_0x129578,_0xf0724f);const _0x4994e8=Array['from'](this['items']);_0x24d36e['unbind']('isEnabled','isVisible'),_0x24d36e['bind']('isEnabled')['toMany'](_0x4994e8,'isEnabled',(..._0xd26ebf)=>_0xd26ebf['some'](_0x427ab0=>_0x427ab0)),_0x24d36e['bind']('isVisible')['toMany'](_0x4994e8,'isVisible',(..._0x1de26d)=>_0x1de26d['some'](_0x2a7240=>_0x2a7240));};_0x24d36e['panelPosition']='sw',_0x24d36e['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x32289c});for(const _0x342365 of this['items'])_0x7cdf87(_0x342365);return _0x5b333b['add'](_0x5eb667),_0x24d36e['listenTo'](this['items'],'add',(_0x44a0bb,_0x48ec8f,_0x465573)=>{_0x7cdf87(_0x48ec8f,_0x465573);}),_0x24d36e['listenTo'](this['items'],'remove',(_0x1d73a2,_0x5584d1,_0x551d3c)=>{_0x5eb667['items']['remove'](_0x551d3c);}),_0x24d36e;}['_attachActions'](_0x563374,_0x440ed7){const _0x589473=_0x563374&&_0x563374['element'];_0x589473&&(this['listenTo'](_0x589473,'mouseenter',()=>this['actionIndicator']=_0x440ed7),this['listenTo'](_0x589473,'focus',()=>this['actionIndicator']=_0x440ed7),this['listenTo'](_0x589473,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x589473,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x44e5b5=super['_createCommentInputView']();return _0x44e5b5['bind']('placeholder')['to'](this),_0x44e5b5;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x270dba){const _0x21379e=Dt(_0x270dba,0x1e),_0x5eb8b6=new MutationObserver(_0x2578fa=>{for(const _0x371b7f of _0x2578fa)('attributes'==_0x371b7f['type']&&'class'==_0x371b7f['attributeName']||'childList'==_0x371b7f['type']||'characterData'==_0x371b7f['type'])&&_0x21379e();});return{'attach'(_0x49ef77){_0x5eb8b6['observe'](_0x49ef77,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x5eb8b6['disconnect'](),_0x21379e['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4a167a,_0x33835f){super(_0x4a167a),this['id']=_0x3a8278(),this['focusTracker']=new _0xcadfab(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x3985c0,_0x278d25)=>this['fire']('Esc',_0x278d25)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x33835f),this['mainView']=_0x33835f;const _0x544183=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x544183['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 _0x4cf950=this['element']['clientHeight'];_0x4cf950&&(this['height']=_0x4cf950);}}class T extends/* #__PURE__ -- @preserve */
29
+ _0x10759b(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x23ea3f,target:_0x2b9f13,type:_0x3f5673,isVisible:_0x53668a=!0x0}){super(),this['view']=_0x23ea3f,this['view']['element']||this['view']['render'](),this['_type']=_0x3f5673,this['_target']=_0x2b9f13,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4c94f2([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5d051d,_0x3a986a)=>{this['view']['focusTracker']['add'](_0x3a986a);}),this['focusableElements']['on']('remove',(_0xe76ef6,_0x4923ae)=>{this['view']['focusTracker']['remove'](_0x4923ae);}),this['set']('isVisible',_0x53668a);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x31fb5b=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x31fb5b),_0x31fb5b;}get['targetRect'](){const _0x4b6948=this['target'];if(null===_0x4b6948)return null;if(_0x4b6948 instanceof _0x4a235e)return _0x4b6948;const _0x33b6f1=_0x4b6948['filter'](_0x3210b7=>function(_0x2b2856){const _0x9125f4=_0x2b2856['offsetParent'];if(_0x9125f4)return!0x0;const _0x489329=_0x2b2856['getClientRects']()['item'](0x0);return!!_0x489329;}(_0x3210b7));return 0x0===_0x33b6f1['length']?null:new _0x4a235e(_0x33b6f1[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2104ab){this['view']['isActive']=_0x2104ab,this['view']['mainView']['isActive']=_0x2104ab;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x341397){if(!(null===_0x341397||_0x341397 instanceof _0x4a235e||Array['isArray'](_0x341397)&&_0x341397['every'](_0x43d177=>fi(_0x43d177))))throw new _0x14d322('annotation-invalid-target',null,{'target':_0x341397});}['_getNormalizedTarget'](){const _0x691ea='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x691ea)?[_0x691ea]:_0x691ea;}}function fi(_0x55863c){return null!==_0x55863c&&'object'==typeof _0x55863c&&'nodeType'in _0x55863c&&0x1===_0x55863c['nodeType'];}class S extends _0x4c94f2{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x225329=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xcadfab(),this['_focusTracker']['on']('change:isFocused',(_0x5256d1,_0x44df2c,_0x3a3aa6)=>{_0x3a3aa6||this['fire']('blur');});for(const _0x411517 of _0x225329)this['add'](_0x411517);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x45af64){if(this['has'](_0x45af64))throw new _0x14d322('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x45af64['innerView'],_0x45af64),this['_viewToAnnotation']['set'](_0x45af64['view'],_0x45af64);for(const _0x4a348e of _0x45af64['focusableElements'])this['_focusTracker']['add'](_0x4a348e);this['listenTo'](_0x45af64['focusableElements'],'add',(_0x13f054,_0x281151)=>{this['_focusTracker']['add'](_0x281151);}),this['listenTo'](_0x45af64['focusableElements'],'remove',(_0xfb8492,_0x156984)=>{this['_focusTracker']['remove'](_0x156984);}),this['listenTo'](_0x45af64['view']['focusTracker'],'change:isFocused',(_0x14e5d2,_0x3e8bc9,_0x2b291a)=>{_0x2b291a&&this['fire']('focus',_0x45af64);}),_0x45af64['updateTargetRect']();const _0x465f1a=this['_getOrderInContent'](_0x45af64['view']['targetRect']);return super['add'](_0x45af64,_0x465f1a);}['remove'](_0x13493c){if(!this['has'](_0x13493c))throw new _0x14d322('annotationcollection-not-existing-item',null);this['stopListening'](_0x13493c['view']['focusTracker']),this['stopListening'](_0x13493c['focusableElements']);for(const _0x433770 of _0x13493c['focusableElements'])this['_focusTracker']['remove'](_0x433770);return this['_viewToAnnotation']['delete'](_0x13493c['view']),this['_innerViewToAnnotation']['delete'](_0x13493c['innerView']),super['remove'](_0x13493c);}['getByInnerView'](_0x1a0c93){return this['_innerViewToAnnotation']['get'](_0x1a0c93);}['getByView'](_0x4dec8b){return this['_viewToAnnotation']['get'](_0x4dec8b);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x77e704 of this)_0x77e704['updateTargetRect']();this['_sort']();}['_sort'](){const _0xdf22=Array['from'](this)['sort']((_0x57699c,_0x1c2d4c)=>w(_0x57699c['view']['targetRect'],_0x1c2d4c['view']['targetRect']));for(let _0x22cb5f=_0xdf22['length']-0x1;_0x22cb5f>0x0;_0x22cb5f--){const _0x2f7833=_0xdf22[_0x22cb5f];_0x22cb5f!==this['getIndex'](_0x2f7833)&&(this['remove'](_0x2f7833),this['add'](_0x2f7833));}}['_getOrderInContent'](_0x573c84){let _0x1b2731=0x0;if(!_0x573c84)return this['length'];for(const _0x3cca40 of this){const _0x4c0a26=_0x3cca40['view']['targetRect'];if(_0x4c0a26){if(w(_0x573c84,_0x4c0a26)<0x0)return _0x1b2731;_0x1b2731++;}}return _0x1b2731;}}function v({source:_0xbb9bde,target:_0x29da3c,filter:_0x43b8b8}){for(const _0xe469fd of _0xbb9bde)_0x43b8b8(_0xe469fd)&&_0x29da3c['add'](_0xe469fd);_0x29da3c['listenTo'](_0xbb9bde,'add',(_0x281792,_0x1f3eb8)=>{_0x43b8b8(_0x1f3eb8)&&_0x29da3c['add'](_0x1f3eb8);}),_0x29da3c['listenTo'](_0xbb9bde,'remove',(_0x5a5bee,_0x2cbf98)=>{_0x29da3c['has'](_0x2cbf98)&&_0x29da3c['remove'](_0x2cbf98);});}function w(_0x21b5d9,_0x42b201){if(null===_0x21b5d9&&null===_0x42b201)return 0x0;if(null===_0x21b5d9)return-0x1;if(null===_0x42b201)return 0x1;const _0x1c9dfe=_0x21b5d9['top']-_0x42b201['top'];return 0x0==_0x1c9dfe?_0x21b5d9['left']-_0x42b201['left']:_0x1c9dfe;}class y extends _0x5118e4{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5467e7){if(super(_0x5467e7),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x5467e7 instanceof _0x5b3a53){const _0xa8e14e=_0x5467e7['locale'];_0x5467e7['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0xa8e14e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0xa8e14e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0xa8e14e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0xa8e14e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0xa8e14e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0xa8e14e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0xa8e14e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x19128f){this['collection']['add'](_0x19128f);}['remove'](_0x1df78e){this['collection']['remove'](_0x1df78e),_0x1df78e['destroy']();}['refreshVisibility'](){for(const _0x2d52db of this['collection'])_0x2d52db['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x14b002){return this['collection']['getByInnerView'](_0x14b002);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x502d69 of this['collection'])_0x502d69['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x48574f){this['fire']('_activateAnnotation',_0x48574f);}['createAnnotation'](_0x1da3c5){return new T(_0x1da3c5);}['createAnnotationView'](_0x5a5fe6,_0x1135ca){return new E(_0x5a5fe6,_0x1135ca);}['_addActiveAnnotation'](_0x2f1c06){const _0xd9d3b2=new Set(this['activeAnnotations']);_0xd9d3b2['add'](_0x2f1c06),this['activeAnnotations']=_0xd9d3b2;}['_removeActiveAnnotation'](_0x324f50){const _0xc84170=new Set(this['activeAnnotations']);_0xc84170['delete'](_0x324f50),this['activeAnnotations']=_0xc84170;}['_bindAnnotationsToVisibleAnnotations'](){const _0x46881e=this['collection'],_0x42c45b=this['_visibleAnnotations'];function _0x4707bf(_0x2d42c1){const _0x5276a9=_0x2d42c1['source'];_0x5276a9['isVisible']&&!_0x42c45b['has'](_0x5276a9)?_0x42c45b['add'](_0x5276a9):!_0x5276a9['isVisible']&&_0x42c45b['has'](_0x5276a9)&&_0x42c45b['remove'](_0x5276a9),_0x5276a9['view']['focusTracker']['remove'](_0x5276a9['view']['element']),_0x5276a9['view']['focusTracker']['add'](_0x5276a9['view']['element']);}this['listenTo'](_0x46881e,'add',(_0x4b0a07,_0x3d023c)=>{_0x3d023c['isVisible']&&_0x42c45b['add'](_0x3d023c),this['listenTo'](_0x3d023c,'change:isVisible',_0x4707bf);}),this['listenTo'](_0x46881e,'remove',(_0x22459d,_0x450395)=>{_0x42c45b['has'](_0x450395)&&_0x42c45b['remove'](_0x450395),this['stopListening'](_0x450395,'change:isVisible',_0x4707bf);});}['_setupEnterAnnotationKeystroke'](){const _0x527386=_0xaebf3c=>{_0xaebf3c['on']('ready',()=>{_0xaebf3c['keystrokes']['set'](_0x4eab4a,(_0x230250,_0x5d090d)=>{const _0x526e18=_0xae91ba(this['activeAnnotations']['values']());_0x526e18&&(_0x526e18['view']['focus'](),_0x5d090d());});});};this['context']instanceof _0x5b3a53?_0x527386(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4bcdb3,_0x31dcde)=>{_0x527386(_0x31dcde);});}['_setupEscapeAnnotationHandling'](){const _0x4bb991=_0x49155b=>{const _0x31b695=_0x49155b['source'],_0x472ec2=[];let _0x5374a5;if(Array['isArray'](_0x31b695['target'])){_0x5374a5=_0x31b695['target'][0x0],this['context']instanceof _0x5b3a53?_0x472ec2['push'](this['context']):this['context']['editors']&&_0x472ec2['push'](...this['context']['editors']);for(const _0x177b10 of _0x472ec2)for(const _0x363dfd of _0x177b10['editing']['view']['domRoots']['values']())if(_0x363dfd['contains'](_0x5374a5))return void _0x177b10['editing']['view']['focus']();_0x5374a5['focus']();}};this['listenTo'](this['collection'],'add',(_0x4e742d,_0x5e4a8f)=>{this['listenTo'](_0x5e4a8f,'escape',_0x4bb991,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x41f6a6,_0x171347)=>{this['stopListening'](_0x171347,'escape',_0x4bb991);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x5118e4{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e8e73){super(_0x1e8e73),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x388f80=this['context']['config'];_0x388f80['define']('comments.maxCommentsWhenCollapsed',0x2),_0x388f80['define']('comments.maxThreadTotalWeight',0x1f4),_0x388f80['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x388f80['define']('comments.CommentThreadView',gt),_0x388f80['define']('comments.CommentView',Tt),_0x388f80['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x38f1ec=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x31a8b9,_0x5668fd)=>this['_addCommentThread'](_0x5668fd)),this['on']('submitCommentThread',(_0x3c737b,_0x39d6be)=>this['_submitCommentThread'](_0x39d6be)),this['on']('resolveCommentThread',(_0x18f5a2,_0x1b1b59)=>this['_resolveCommentThread'](_0x1b1b59)),this['on']('resolveCommentThread',(_0x2c6c26,_0x4e7754)=>this['_updateActiveAnnotation'](_0x4e7754),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3667e5,_0x5bc59e)=>this['_reopenCommentThread'](_0x5bc59e)),this['on']('reopenCommentThread',(_0x514846,_0x417ef1)=>this['_updateActiveAnnotation'](_0x417ef1),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x18718e,_0x1264a0)=>this['_removeCommentThread'](_0x1264a0)),this['on']('updateCommentThread',(_0x5a549f,_0x4dd205)=>this['_updateCommentThread'](_0x4dd205)),this['on']('updateCommentThread',(_0x25c984,_0x16366a)=>this['_updateActiveAnnotation'](_0x16366a),{'priority':'lowest'}),this['on']('addComment',(_0x57afe2,_0x409895)=>this['_addComment'](_0x409895)),this['on']('updateComment',(_0x5e24ac,_0x5a01ff)=>this['_updateComment'](_0x5a01ff)),this['on']('removeComment',(_0x437037,_0x5d8aef)=>this['_removeComment'](_0x5d8aef)),this['on']('addComment',(_0x41b1a7,{threadId:_0x5347bd,isFromAdapter:_0x5e06e5})=>{if(_0x5e06e5)return;const _0x4a2975=this['getCommentThread'](_0x5347bd),_0x2b559b=_0x4a2975&&this['_threadToController']['get'](_0x4a2975);_0x2b559b&&_0x2b559b['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x38f1ec,'change:activeAnnotations',(_0xa3ae05,_0x341596,_0x4e3cc1)=>{const _0x2b3c99=Array['from'](_0x4e3cc1)['map'](_0x458bd8=>this['_viewToController']['get'](_0x458bd8['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x2b3c99?_0x2b3c99['model']:null;});}set['adapter'](_0xaccb88){if(this['_adapter'])throw new _0x14d322('commentsrepository-adapter-already-set');this['_adapter']=_0xaccb88;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4acefc=_t,threadId:_0x87c89f=_0x3a8278(),comments:_0x1b72fa=[],unlinkedAt:_0xab7279=null,resolvedAt:_0x3924a7=null,resolvedBy:_0x565063=null,target:_0x5208f7=null,context:_0x115dcb=null,attributes:_0x51e1e0={},isResolvable:_0x422f16=!0x0,isSubmitted:_0x1465b9=!0x1,isFromAdapter:_0x2ba128=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4acefc),{'channelId':_0x4acefc,'threadId':_0x87c89f,'comments':_0x1b72fa,'unlinkedAt':_0xab7279,'resolvedAt':_0x3924a7,'resolvedBy':_0x565063,'target':_0x5208f7,'context':_0x115dcb,'attributes':_0x51e1e0,'isFromAdapter':_0x2ba128,'isResolvable':_0x422f16,'isSubmitted':_0x1465b9}),this['getCommentThread'](_0x87c89f);}['openNewCommentThread']({channelId:_0x3212a7=_t,threadId:_0x51d746=_0x3a8278(),target:_0x4161bf,context:_0x38a536=null,isResolvable:_0x506040=!0x0}){if(this['_readOnlyChannels']['has'](_0x3212a7)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4161bf)throw new _0x14d322('commentsrepository-missing-target');const _0x4fa3d8=this['addCommentThread']({'channelId':_0x3212a7,'threadId':_0x51d746,'target':_0x4161bf,'context':_0x38a536,'isResolvable':_0x506040});if(!_0x4fa3d8)return null;const _0x47fdd4=this['_threadToController']['get'](_0x4fa3d8),_0x48665f=_0x47fdd4['view']['commentThreadInputView']['commentInputView'],_0x866057=this['context']['plugins']['get'](y),_0x13200f=_0x866057['getByInnerView'](_0x47fdd4['view']);return _0x866057['activate'](_0x13200f),_0x48665f['once']('editorReady',()=>_0x48665f['focus']()),_0x4fa3d8;}['hasCommentThread'](_0x5007fd){if('string'!=typeof _0x5007fd)throw new _0x14d322('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x5007fd);}['updateCommentThread']({channelId:_0x53dd02=_t,threadId:_0x3567f6,context:_0x49f219,unlinkedAt:_0x1b092a,attributes:_0x19d77a,isFromAdapter:_0x4c70d2=!0x1}){return this['fire'](Nt('updateCommentThread',_0x53dd02),{'channelId':_0x53dd02,'threadId':_0x3567f6,'context':_0x49f219,'unlinkedAt':_0x1b092a,'attributes':_0x19d77a,'isFromAdapter':_0x4c70d2}),this['getCommentThread'](_0x3567f6);}['getCommentThread'](_0x2f0b6c){if('string'!=typeof _0x2f0b6c)throw new _0x14d322('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2f0b6c);}['fetchCommentThread']({channelId:_0x3bfe67,threadId:_0x415f5f}={}){const _0x539252=this['getCommentThread'](_0x415f5f);if(_0x539252)return Promise['resolve'](_0x539252);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x14d322('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3bfe67,'threadId':_0x415f5f})['then'](_0x1e95f2=>this['hasCommentThread'](_0x415f5f)?this['getCommentThread'](_0x415f5f):_0x1e95f2?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3bfe67},_0x1e95f2)):void 0x0)['catch'](_0x39d910=>{throw console['error'](_0x39d910),new _0x14d322('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x56a450,skipNotAttached:_0x5afb20=!0x1,skipEmpty:_0x1caf16=!0x1,toJSON:_0x1ee591=!0x1}={}){const _0x25b748=[];for(const _0x26bf66 of this['_threads']['values']())_0x56a450&&_0x26bf66['channelId']!==_0x56a450||_0x5afb20&&!_0x26bf66['isAttached']||_0x1caf16&&0x0===_0x26bf66['length']||_0x25b748['push'](_0x26bf66);return _0x1ee591?_0x25b748['map'](_0x1a6482=>_0x1a6482['toJSON']()):_0x25b748;}['getAnnotationForCommentThread'](_0x3f34d1){const _0x5885bb=this['_threadToController']['get'](_0x3f34d1);if(!_0x5885bb)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x5885bb['view'])||null;}['getCommentThreadForAnnotation'](_0x3e6722){const _0x5a3902=this['_viewToController']['get'](_0x3e6722['innerView']);return _0x5a3902?_0x5a3902['model']:null;}['setActiveCommentThread'](_0x22bac0){const _0xdfe820=this['context']['plugins']['get'](y);if(!_0x22bac0)return void(this['activeCommentThread']&&_0xdfe820['deactivateAll']());const _0x42dafa=this['getCommentThread'](_0x22bac0);if(!_0x42dafa)throw new _0x14d322('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x22bac0});if(!this['_threadToController']['has'](_0x42dafa))throw new _0x14d322('commentsrepository-active-not-attached',null,{'threadId':_0x22bac0});const _0x5961d5=_0xdfe820['getByInnerView'](this['_threadToController']['get'](_0x42dafa)['view']);_0xdfe820['activate'](_0x5961d5);}['switchReadOnly'](_0x41431d,_0x42379d){_0x41431d?this['_readOnlyChannels']['add'](_0x42379d):this['_readOnlyChannels']['delete'](_0x42379d),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5b2f74){return this['_readOnlyChannels']['has'](_0x5b2f74)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1c903c,_0x129142){return new vt(_0x1c903c,_0x129142);}['setPermissions'](_0x3a6f51,_0x1117eb=_t){this['_permissions']['set'](_0x1117eb,_0x3a6f51),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x8c7a9b=_t){return this['_permissions']['has'](_0x8c7a9b)?this['_permissions']['get'](_0x8c7a9b):bt;}['_addCommentThread']({channelId:_0x5bcdc2,threadId:_0x2e5d69,comments:_0x3c418d,unlinkedAt:_0x4054c8,resolvedAt:_0x3d8419,resolvedBy:_0x4a92fb,target:_0x25a7dc,context:_0x5704d4,attributes:_0x25c9d3,isFromAdapter:_0x14f108,isResolvable:_0x3ec8e1,isSubmitted:_0x3812f6}){if('string'!=typeof _0x2e5d69)throw new _0x14d322('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2e5d69});if(this['hasCommentThread'](_0x2e5d69))throw new _0x14d322('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2e5d69});const _0x589748=new pi(this,{'channelId':_0x5bcdc2,'id':_0x2e5d69,'context':_0x5704d4,'attributes':_0x25c9d3,'unlinkedAt':_0x4054c8,'resolvedAt':_0x3d8419,'resolvedBy':_0x4a92fb?this['context']['plugins']['get'](it)['getUser'](_0x4a92fb):null,'isResolvable':_0x3ec8e1,'isSubmitted':_0x3812f6||_0x14f108});this['_threads']['set'](_0x2e5d69,_0x589748);for(const _0x26216d of _0x3c418d)_0x589748['_add'](this['_createNewComment']({'threadId':_0x2e5d69,..._0x26216d}));return _0x25a7dc&&_0x589748['attachTo'](_0x25a7dc),_0x14f108||!_0x589748['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5bcdc2,'threadId':_0x2e5d69});}['_submitCommentThread']({channelId:_0x262f63,threadId:_0x5de4a7}){if(!this['hasCommentThread'](_0x5de4a7))throw new _0x14d322('commentsrepository-missing-comment-thread',this);const _0x4f21fb=this['getCommentThread'](_0x5de4a7);if(_0x4f21fb['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x53342c,comments:_0x122fb0,resolvedAt:_0x178de6,resolvedBy:_0x2f24ba,context:_0x22c6d8,attributes:_0x2c9473}=_0x4f21fb,_0x56eeb5=this['context']['plugins']['get']('PendingActions'),_0x3080fe=_0x56eeb5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x262f63,'threadId':_0x53342c,'comments':_0x122fb0['map'](_0x3cbc73=>_0x3cbc73['toJSON']()),'resolvedAt':_0x178de6,'resolvedBy':_0x2f24ba?_0x2f24ba['id']:_0x2f24ba,'context':_0x22c6d8,'attributes':_0x2c9473})['then'](({comments:_0x2b02fb})=>{_0x56eeb5['remove'](_0x3080fe);for(const _0x5d6182 of _0x2b02fb)this['_updateComment']({'channelId':_0x262f63,'threadId':_0x5de4a7,'commentId':_0x5d6182['commentId'],'createdAt':_0x5d6182['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2194aa=>{throw console['error'](_0x2194aa),new _0x14d322('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x34ac51,target:_0x1c8bf5}){const _0x49a223=this['getCommentThread'](_0x34ac51);if(!_0x49a223)throw new _0x14d322('commentsrepository-attach-missing-comment-thread',this);const _0x3b0845=this['context']['plugins']['get']('PendingActions'),_0x3de325=this['context']['plugins']['get'](y),_0x364b8a=this['_createCommentThreadView'](_0x49a223),_0x3538c8=new vt(_0x49a223,_0x364b8a);let _0x125fc9=null;_0x364b8a['on']('change:isDirty',(_0x39b288,_0x502d50,_0x5ac336)=>{_0x5ac336?_0x125fc9=_0x3b0845['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x125fc9&&(_0x3b0845['remove'](_0x125fc9),_0x125fc9=null);}),this['_threadToController']['set'](_0x49a223,_0x3538c8),this['_viewToController']['set'](_0x364b8a,_0x3538c8);const _0x262adb=new E(this['context']['locale'],_0x364b8a);_0x262adb['bind']('length')['to'](_0x364b8a),_0x262adb['bind']('isDirty')['to'](_0x364b8a,'isDirty',_0x364b8a,'length',(_0xd02d9f,_0x4c7e29)=>_0xd02d9f||!_0x4c7e29),_0x262adb['bind']('isActive')['to'](_0x364b8a),_0x262adb['type']='comment';const _0x1923ec=new T({'view':_0x262adb,'target':_0x1c8bf5,'type':'comment','isVisible':!_0x49a223['archivedAt']&&!!('function'==typeof _0x1c8bf5?_0x1c8bf5():_0x1c8bf5)});return _0x364b8a['on']('escape',()=>{_0x1923ec['fire']('escape');}),this['_bindAnnotationToEditors'](_0x364b8a,_0x1923ec),_0x3de325['add'](_0x1923ec),_0x1923ec;}['_bindAnnotationToEditors'](_0x4806bd,_0x3f3327){this['listenTo'](_0x4806bd,'editorReady',(_0x907355,_0x466759)=>{const _0x3b47ab=_0x466759['ui']['view']['body']['bodyCollectionContainer'];_0x3f3327['focusableElements']['add'](_0x3b47ab),this['context']instanceof _0x5b3a53&&this['context']['ui']['focusTracker']['add'](_0x3b47ab);},{'priority':'highest'}),this['listenTo'](_0x4806bd,'editorDestroyed',(_0x1484c4,_0x1fbdf1)=>{const _0x1d7f56=_0x1fbdf1['ui']['view']['body']['bodyCollectionContainer'];_0x3f3327['focusableElements']['has'](_0x1d7f56)&&_0x3f3327['focusableElements']['remove'](_0x1d7f56),this['context']instanceof _0x5b3a53&&this['context']['ui']['focusTracker']['remove'](_0x1d7f56);});}['_unbindEditors'](_0x507109){this['stopListening'](_0x507109,'editorReady'),this['stopListening'](_0x507109,'editorDestroyed');}['_createCommentThreadView'](_0x3fa422){const _0x1143d8=this['context']['plugins']['get'](it),{config:_0x2cc642,locale:_0x27be0c}=this['context'],_0x5e8ac2=pt(_0x2cc642['get']('locale'),_0x27be0c);return new(0x0,(_0x2cc642['get']('comments'))['CommentThreadView'])(_0x27be0c,_0x3fa422,_0x1143d8['me'],{'editorConfig':{..._0x2cc642['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x2cc642['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x2cc642['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x2cc642['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x2cc642['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5e8ac2,'CommentView':_0x2cc642['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3f73ee,channelId:_0x2327d1,resolvedAt:_0x51700f,resolvedBy:_0x2d4d54,isFromAdapter:_0x36cecc}){if(!this['hasCommentThread'](_0x3f73ee))throw new _0x14d322('commentsrepository-missing-comment-thread',null,{'threadId':_0x3f73ee});const _0x21554a=this['getCommentThread'](_0x3f73ee);if(_0x21554a['isResolved'])throw new _0x14d322('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3f73ee});const _0x1248f2=this['context']['plugins']['get'](it);if(_0x21554a['resolvedBy']=_0x1248f2['getUser'](_0x2d4d54),_0x21554a['resolvedAt']=_0x51700f,_0x36cecc||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x36959f=this['context']['plugins']['get']('PendingActions'),_0x1ba2c4=_0x36959f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2327d1,'threadId':_0x3f73ee})['then'](({resolvedAt:_0x37785e,resolvedBy:_0x302392})=>{_0x36959f['remove'](_0x1ba2c4),_0x21554a['resolvedBy']['id']!==_0x302392&&(_0x21554a['resolvedBy']=_0x1248f2['getUser'](_0x302392)),_0x21554a['resolvedAt']=_0x37785e;})['catch'](_0x26a251=>{throw console['error'](_0x26a251),new _0x14d322('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3df062,channelId:_0x386d58,isFromAdapter:_0x3efc15}){if(!this['hasCommentThread'](_0x3df062))throw new _0x14d322('commentsrepository-missing-comment-thread',null,{'threadId':_0x3df062});const _0x448930=this['getCommentThread'](_0x3df062);if(!_0x448930['isResolved'])throw new _0x14d322('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3df062});if(_0x448930['resolvedBy']=null,_0x448930['resolvedAt']=null,_0x3efc15||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x34cfb8=this['context']['plugins']['get']('PendingActions'),_0x2b74ea=_0x34cfb8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x386d58,'threadId':_0x3df062})['then'](()=>_0x34cfb8['remove'](_0x2b74ea))['catch'](_0x5ed7e0=>{throw console['error'](_0x5ed7e0),new _0x14d322('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x949f09,isFromAdapter:_0x116cc8}){const _0x544002=this['getCommentThread'](_0x949f09);if(!_0x544002)throw new _0x14d322('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x949f09),this['_threads']['delete'](_0x949f09),!_0x544002['isSubmitted']||_0x116cc8||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x12ccf3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5cab85}=_0x544002,_0x30bbf0=_0x12ccf3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x5cab85,'threadId':_0x949f09})['then'](()=>_0x12ccf3['remove'](_0x30bbf0))['catch'](_0x591531=>{throw console['error'](_0x591531),new _0x14d322('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x448688,unlinkedAt:_0xbc9a7f,context:_0x564324,attributes:_0x1b4f6b,isFromAdapter:_0x461326}){if('string'!=typeof _0x448688)throw new _0x14d322('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x448688});if(!this['hasCommentThread'](_0x448688))throw new _0x14d322('commentsrepository-missing-comment-thread',null,{'threadId':_0x448688});const _0x1b2097=this['getCommentThread'](_0x448688);let _0x2a1c3c=!0x1;if(void 0x0!==_0x564324&&_0x1b2097['context']!==_0x564324&&(_0x1b2097['context']=_0x564324,_0x2a1c3c=!0x0),void 0x0!==_0xbc9a7f&&_0x1b2097['unlinkedAt']!==_0xbc9a7f&&(_0x1b2097['unlinkedAt']=_0xbc9a7f,_0x2a1c3c=!0x0),_0x1b4f6b&&!At(_0x1b4f6b,_0x1b2097['attributes'])&&(_0x1b2097['attributes']=_0x1b4f6b,_0x2a1c3c=!0x0),!_0x2a1c3c)return Promise['resolve']();if(!_0x1b2097['isSubmitted']||_0x461326||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2699b5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5db859}=_0x1b2097,_0x555c3a=_0x2699b5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x5db859,'threadId':_0x448688,'context':_0x564324,'unlinkedAt':_0xbc9a7f,'attributes':_0x1b4f6b})['then'](()=>_0x2699b5['remove'](_0x555c3a))['catch'](_0x52f51b=>{throw console['error'](_0x52f51b),new _0x14d322('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x32f2a4){const _0x28bebd=this['context']['plugins']['get'](y),_0x62fb47=this['getCommentThread'](_0x32f2a4);if(_0x62fb47['_isAttached']=!0x1,this['_threadToController']['has'](_0x62fb47)){const _0x557305=this['_threadToController']['get'](_0x62fb47),_0x3d0f89=_0x557305['view'],_0x23ed85=_0x28bebd['getByInnerView'](_0x3d0f89);this['_threadToController']['delete'](_0x62fb47),this['_viewToController']['delete'](_0x3d0f89),_0x23ed85&&_0x28bebd['remove'](_0x23ed85),_0x557305['destroy'](),_0x3d0f89['destroy']()['then'](()=>{this['_unbindEditors'](_0x3d0f89);});}}['_updateActiveAnnotation']({threadId:_0x32be70,resolvedAt:_0x485896,unlinkedAt:_0x19afa8}){const _0x42b121=!!_0x485896,_0x69a5e8=this['context']['plugins']['get'](y),_0x2ff505=this['getCommentThread'](_0x32be70);if(this['_threadToController']['has'](_0x2ff505)){const _0x507db0=this['_threadToController']['get'](_0x2ff505)['view'],_0x4e5565=_0x69a5e8['getByInnerView'](_0x507db0);_0x4e5565&&(_0x42b121&&_0x69a5e8['_removeActiveAnnotation'](_0x4e5565),_0x19afa8?_0x4e5565['isVisible']=!0x1:_0x4e5565['refreshVisibility']());}}['_getExternalAuthor'](_0x1d54fb){const _0x57663b=this['context']['plugins']['get'](it),_0xbd4a49=It('external:'+_0x1d54fb),_0x4c7d8f=_0x57663b['getUser'](_0xbd4a49);return _0x4c7d8f||_0x57663b['addUser']({'id':_0xbd4a49,'name':_0x1d54fb});}['_createNewComment']({threadId:_0x4eb759,commentId:_0xd9d710=_0x3a8278(),content:_0x1afcb7,authorId:_0x5cef91,createdAt:_0x3da424,attributes:_0x3af726}){if('string'!=typeof _0xd9d710)throw new _0x14d322('commentsrepository-invalid-commentid');if('string'!=typeof _0x5cef91)throw new _0x14d322('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1afcb7||!_0x1afcb7['trim']())throw new _0x14d322('commentsrepository-invalid-comment-content');const _0x58e4d0=this['context']['plugins']['get'](it)['getUser'](_0x5cef91);if(!_0x58e4d0)throw new _0x14d322('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5cef91});let _0x3f72ac=null,_0x47ca65=_0x3da424;return _0x3af726?.['@external']&&(_0x3f72ac=this['_getExternalAuthor'](_0x3af726['@external']['authorName']),_0x47ca65=new Date(_0x3af726['@external']['createdAt'])),new wi(this,{'threadId':_0x4eb759,'id':_0xd9d710,'author':_0x3f72ac||_0x58e4d0,'creator':_0x58e4d0,'content':_0x1afcb7,'createdAt':_0x3da424,'authoredAt':_0x47ca65,'attributes':_0x3af726});}['_addComment'](_0x2e95bf){let {threadId:_0x580bb6,content:_0x118d9f,attributes:_0x4fdea8,isFromAdapter:_0x2d25c1}=_0x2e95bf;const _0x3d1327=this['getCommentThread'](_0x2e95bf['threadId']);if(!_0x3d1327)throw new _0x14d322('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x467c47=this['_createNewComment'](_0x2e95bf),{id:_0x33f310}=_0x467c47;if(_0x3d1327['_add'](_0x467c47),_0x2d25c1||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x3d1327['isSubmitted'])return Promise['resolve']();const _0x13f58c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5c33ad}=_0x3d1327,_0x16bbbf=_0x13f58c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4fdea8||(_0x4fdea8={}),this['adapter']['addComment']({'channelId':_0x5c33ad,'threadId':_0x580bb6,'commentId':_0x33f310,'content':_0x118d9f,'attributes':_0x4fdea8})['then'](_0xdab3e6=>{_0x13f58c['remove'](_0x16bbbf),_0xdab3e6&&this['_updateComment']({'channelId':_0x5c33ad,'threadId':_0x580bb6,'commentId':_0x33f310,'createdAt':_0xdab3e6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2534a6=>{throw console['error'](_0x2534a6),new _0x14d322('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x595b8f,commentId:_0x3e5479,content:_0x196e8d,createdAt:_0x26449e,attributes:_0x2ada75,isFromAdapter:_0x2a2d46}){if(void 0x0!==_0x196e8d&&('string'!=typeof _0x196e8d||!_0x196e8d['trim']()['length']))throw new _0x14d322('commentsrepository-update-comment-invalid-content');const _0x19ac99=this['getCommentThread'](_0x595b8f),_0x31c5f4=_0x19ac99['getComment'](_0x3e5479);if(!_0x31c5f4)throw new _0x14d322('commentsrepository-update-missing-comment',this);let _0x38f5fd=!0x1;if(_0x196e8d&&_0x196e8d!==_0x31c5f4['content']&&(_0x31c5f4['isEditable']||_0x2a2d46)&&(_0x31c5f4['content']=_0x196e8d,_0x38f5fd=!0x0),_0x26449e&&_0x26449e!==_0x31c5f4['createdAt']&&(_0x31c5f4['createdAt']=_0x26449e,_0x31c5f4['attributes']&&_0x31c5f4['attributes']['@external']||(_0x31c5f4['authoredAt']=_0x26449e),_0x38f5fd=!0x0),_0x2ada75&&!At(_0x2ada75,_0x31c5f4['attributes'])&&(_0x31c5f4['attributes']=_0x2ada75,_0x38f5fd=!0x0),!_0x38f5fd)return Promise['resolve']();if(_0x19ac99['fire']('commentUpdated'),_0x2a2d46||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4b57a6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1bf0cc}=this['getCommentThread'](_0x31c5f4['threadId']),_0x1d1b57=_0x4b57a6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1bf0cc,'threadId':_0x595b8f,'commentId':_0x3e5479,'content':_0x196e8d,'attributes':_0x2ada75})['then'](()=>_0x4b57a6['remove'](_0x1d1b57))['catch'](_0x228602=>{throw console['error'](_0x228602),new _0x14d322('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x3bd925,commentId:_0x31510c,isFromAdapter:_0x36f6ac}){const _0x3682fa=this['getCommentThread'](_0x3bd925),_0x5ebb3e=_0x3682fa['getComment'](_0x31510c);if(!_0x5ebb3e)throw new _0x14d322('commentsrepository-remove-missing-comment',this);if(_0x3682fa['_remove'](_0x5ebb3e),_0x36f6ac||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xd81524=this['context']['plugins']['get']('PendingActions'),{channelId:_0x102334}=_0x3682fa,_0x3338aa=_0xd81524['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x102334,'threadId':_0x3bd925,'commentId':_0x31510c})['then'](()=>_0xd81524['remove'](_0x3338aa))['catch'](_0x3e2275=>{throw console['error'](_0x3e2275),new _0x14d322('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
+ _0x10759b(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x2a3701,_0x318efb){super();const _0x4622e6=_0x318efb['isResolvable'];this['channelId']=_0x318efb['channelId'],this['id']=_0x318efb['id'],this['comments']=new _0x4c94f2(),this['_repository']=_0x2a3701,this['_isAttached']=!0x1,this['_isSubmitted']=_0x318efb['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2a3701,'_permissions',_0x2a3701,'_readOnlyChannels',()=>_0x2a3701['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2a3701,'_permissions',()=>_0x2a3701['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2a3701,'_permissions',()=>{const _0x5f2910=_0x2a3701['getPermissions'](this['channelId']);return _0x5f2910['write']||_0x5f2910['admin'];}),this['bind']('isResolvable')['to'](_0x2a3701,'_permissions',()=>_0x4622e6&&_0x2a3701['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x318efb['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0xa991ff,_0x3c061d)=>_0xa991ff?_0x3c061d?_0xa991ff<_0x3c061d?_0xa991ff:_0x3c061d:_0xa991ff:_0x3c061d),this['set']('unlinkedAt',_0x318efb['unlinkedAt']||null),this['set']('resolvedAt',_0x318efb['resolvedAt']||null),this['set']('resolvedBy',_0x318efb['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x460c3d=>!!_0x460c3d),this['set']('attributes',_0x318efb['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x1edd90,_0x3d804c)=>_0x1edd90+_0x3d804c['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2f4e08,id:_0x528a45}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x2f4e08),{'channelId':_0x2f4e08,'threadId':_0x528a45});}['setUnlinkedAt'](_0xc0ea4d){this['_update']({'unlinkedAt':_0xc0ea4d});}['resolve']({resolvedAt:_0x16c1ab=new Date(),resolvedBy:_0x327c7e=null,isFromAdapter:_0x4d5ad2=!0x1}={}){const _0x7d9a07=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x49ed9f,id:_0x409361}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x49ed9f),{'channelId':_0x49ed9f,'threadId':_0x409361,'resolvedAt':_0x16c1ab,'resolvedBy':_0x327c7e||_0x7d9a07['id'],'isFromAdapter':_0x4d5ad2});}['reopen']({isFromAdapter:_0xd29c98=!0x1}={}){const {channelId:_0x2d7b44,id:_0x28ab8d}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2d7b44),{'channelId':_0x2d7b44,'threadId':_0x28ab8d,'isFromAdapter':_0xd29c98});}['setContext'](_0x290dc8){this['context']||this['_update']({'context':_0x290dc8});}['setAttribute'](_0x5bad8a,_0x3427c7){const _0x54c3a6=wt(this['attributes']);yt(_0x54c3a6,_0x5bad8a,_0x3427c7),this['_update']({'attributes':_0x54c3a6});}['removeAttribute'](_0x8a104){const _0x4b19d4=wt(this['attributes']);Ct(_0x4b19d4,_0x8a104),this['_update']({'attributes':_0x4b19d4});}['remove']({isFromAdapter:_0x5b0e18=!0x1}={}){const {channelId:_0x461953,id:_0x3be5f3}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x461953),{'channelId':_0x461953,'threadId':_0x3be5f3,'isFromAdapter':_0x5b0e18});}['attachTo'](_0x4bbb27){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x4bbb27});}['addComment'](_0x4c710f){const {channelId:_0x57b7f9,id:_0x29bdd4}=this;this['_repository']['fire'](Nt('addComment',_0x57b7f9,_0x29bdd4),Object['assign']({'channelId':_0x57b7f9,'threadId':_0x29bdd4},_0x4c710f));}['getComment'](_0x4866aa){if('string'!=typeof _0x4866aa)throw new _0x14d322('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x4866aa});return this['comments']['get'](_0x4866aa);}['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'](_0x11c79d=>_0x11c79d['toJSON']()),'attributes':this['attributes']};}['_add'](_0x49bcef){return this['listenTo'](_0x49bcef,'change:authoredAt',()=>{const _0x317ef9=this['_findOptimalIndex'](_0x49bcef),_0x43a3bd=this['comments'];_0x317ef9-0x1!=_0x43a3bd['getIndex'](_0x49bcef)&&_0x317ef9+0x1!=_0x43a3bd['getIndex'](_0x49bcef)&&(this['_remove'](_0x49bcef),this['_add'](_0x49bcef));}),this['comments']['add'](_0x49bcef,this['_findOptimalIndex'](_0x49bcef));}['_update'](_0x163431){const {channelId:_0x357443,id:_0x40135b}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x357443),{..._0x163431,'channelId':_0x357443,'threadId':_0x40135b});}['_remove'](_0x16748d){return this['stopListening'](_0x16748d),_0x16748d['destroy'](),this['comments']['remove'](_0x16748d);}['_findOptimalIndex'](_0x564f5c){const _0x40511a=this['comments']['find'](_0x57adf7=>new Date(_0x57adf7['authoredAt'])['getTime']()>new Date(_0x564f5c['authoredAt'])['getTime']());return _0x40511a?this['comments']['getIndex'](_0x40511a):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
+ _0x10759b(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x45a17c,_0x28b2fa){super();const _0x4d5252=_0x45a17c['context']['plugins']['get'](it)['me'],_0x2c63d0=_0x45a17c['getCommentThread'](_0x28b2fa['threadId']),_0x4552be=0x0===_0x2c63d0['comments']['length'],_0x350fc9=_0x4d5252===_0x28b2fa['author'];this['id']=_0x28b2fa['id'],this['threadId']=_0x28b2fa['threadId'],this['author']=_0x28b2fa['author'],this['creator']=_0x28b2fa['creator'],this['isExternal']=Boolean(_0x28b2fa['attributes']&&_0x28b2fa['attributes']['@external']),this['set']('content',_0x28b2fa['content']),this['createdAt']=_0x28b2fa['createdAt']||new Date(),this['set']('authoredAt',_0x28b2fa['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2c63d0,'resolvedAt'),this['set']('attributes',_0x28b2fa['attributes']||{}),this['bind']('isEditable')['to'](_0x45a17c,'_permissions',()=>{const _0x22140a=_0x45a17c['getPermissions'](_0x2c63d0['channelId'])['write'],_0x1cd9d2=_0x45a17c['getPermissions'](_0x2c63d0['channelId'])['modifyAll'];return _0x350fc9&&_0x22140a||!_0x350fc9&&_0x1cd9d2;}),this['bind']('isRemovable')['to'](_0x2c63d0,'isRemovable',_0x45a17c,'_permissions',_0x4dc316=>{const _0x5e4c28=_0x45a17c['getPermissions'](_0x2c63d0['channelId'])['write'],_0x28fa0c=_0x45a17c['getPermissions'](_0x2c63d0['channelId'])['modifyAll'];return _0x350fc9&&_0x5e4c28||_0x4dc316&&_0x4552be||!_0x350fc9&&_0x28fa0c&&!_0x4552be;}),this['bind']('isReadOnly')['to'](_0x2c63d0,'isReadOnly'),this['_repository']=_0x45a17c;}get['weight'](){return Math['max'](function(_0x12541c){const _0x52482a=document['createElement']('div');return _0x52482a['innerHTML']=_0x12541c,_0x52482a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3c3744){const {threadId:_0xbe9fc5,id:_0x4a0eaf}=this;if(!this['_repository']['hasCommentThread'](_0xbe9fc5))throw new _0x14d322('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x552900}=this['_repository']['getCommentThread'](_0xbe9fc5);this['_repository']['fire'](Nt('updateComment',_0x552900,_0xbe9fc5),{'channelId':_0x552900,'threadId':_0xbe9fc5,'commentId':_0x4a0eaf,..._0x3c3744});}['setAttribute'](_0x4df211,_0x41d83e){const _0x39eb2d=wt(this['attributes']);yt(_0x39eb2d,_0x4df211,_0x41d83e),this['update']({'attributes':_0x39eb2d});}['removeAttribute'](_0x42ccff){const _0x55223a=wt(this['attributes']);Ct(_0x55223a,_0x42ccff),this['update']({'attributes':_0x55223a});}['remove'](_0x494742={}){if(!_0x494742['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xb5deab,id:_0x55b19a}=this;if(!this['_repository']['hasCommentThread'](_0xb5deab))throw new _0x14d322('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x27b9f7}=this['_repository']['getCommentThread'](_0xb5deab);this['_repository']['fire'](Nt('removeComment',_0x27b9f7,_0xb5deab),{'channelId':_0x27b9f7,'threadId':_0xb5deab,'commentId':_0x55b19a,..._0x494742});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x4013e6,..._0x5d394f){for(const _0x35094f of _0x5d394f)void 0x0!==_0x35094f&&(_0x4013e6+=':'+String(_0x35094f));return _0x4013e6;}class ot extends _0x160ab1{constructor(_0x2948ed){super(_0x2948ed),this['set']('hasContent',!0x1);}['refresh'](){const _0x4578b1=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x303fd6 of _0x4578b1['getRanges']())if(this['_hasContent'](_0x303fd6))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x553a70=_0x3a8278(),ranges:_0x1da902,comment:_0x127b91}={}){const _0x3d557f=this['editor']['model'],_0xfbbe3f=_0x1da902??Array['from'](_0x3d557f['document']['selection']['getRanges']()),_0x5532ba=[];for(const _0x9e38d2 of _0xfbbe3f)this['_hasContent'](_0x9e38d2)&&_0x5532ba['push'](this['_trimToContent'](_0x9e38d2));if(!_0x5532ba['length'])throw new _0x14d322('addcommentthreadcommand-incorrect-ranges',null);_0x127b91&&this['_createCommentThread'](_0x553a70,_0x127b91),this['_createMarkersFromRanges'](_0x553a70,_0x5532ba,!!_0x127b91);}['_createMarkersFromRanges'](_0x686038,_0x495020,_0x37e974){this['editor']['model']['change'](_0x397a00=>{for(const _0x529b1f of _0x495020){const _0x5e6de9=_0x3a8278()['substr'](0x1,0x5),_0x3b90ce='comment:'+_0x686038+':'+_0x5e6de9;_0x397a00['addMarker'](_0x3b90ce,{'range':_0x529b1f,'usingOperation':_0x37e974,'affectsData':_0x37e974});}});}['_createCommentThread'](_0x1336fc,_0x1d1926){const _0x1742d3=this['editor']['plugins']['get']('CommentsRepository'),_0x35eaba=this['editor']['config']['get']('collaboration.channelId'),_0x4eeb4f=this['editor']['plugins']['get']('Users')['me'];if(!_0x4eeb4f)throw new _0x14d322('addcommentthreadcommand-user-not-found',null);_0x1742d3['addCommentThread']({'threadId':_0x1336fc,'channelId':_0x35eaba,'comments':[{'authorId':_0x4eeb4f['id'],'content':_0x1d1926,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x516dce){for(const _0x5b778a of _0x516dce['getItems']())if(this['_itemIsContent'](_0x5b778a))return!0x0;return!0x1;}['_itemIsContent'](_0x36d316){return _0x36d316['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x36d316)&&!_0x36d316['is']('element','tableCell');}['_trimToContent'](_0x400136){const _0x402ef8=_0x3e73c9=>!this['_itemIsContent'](_0x3e73c9['item']),_0x24cb74=_0x400136['start']['getLastMatchingPosition'](_0x402ef8),_0x338bc3=_0x400136['end']['getLastMatchingPosition'](_0x402ef8,{'direction':'backward'});return this['editor']['model']['createRange'](_0x24cb74,_0x338bc3);}}class b extends _0x1a8a89{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e5193){super(_0x2e5193),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3c2ec6=this['editor'],_0x146c68=_0x3c2ec6['model']['document']['selection'],_0x4a9fa1=_0x59bbc8(()=>this['refreshSelectedViews'](),0xa);_0x146c68['on']('change:range',(_0x4bf6c5,_0x1d400a)=>{_0x1d400a['directChange']&&(_0x4a9fa1['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3c2ec6['editing']['view']['document'],'change:isFocused',(_0x1f10ea,_0x490218,_0x1dcb2d)=>{_0x1dcb2d&&_0x4a9fa1();}),this['listenTo'](_0x3c2ec6['ui']['focusTracker'],'change:isFocused',(_0x2a4c7e,_0x376a90,_0x2b9d60)=>{_0x2b9d60||this['fire']('blur',{'isAnnotationTracked':_0x38783e=>this['_editorAnnotationsData']['has'](_0x38783e['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x733ac6){if(this['_editorAnnotations']['has'](_0x733ac6['view']))return;this['_editorAnnotations']['add'](_0x733ac6['view']),this['editor']['ui']['focusTracker']['add'](_0x733ac6['view']['element']);const _0x4c84e6=this['editor']['plugins']['get'](y);this['listenTo'](_0x4c84e6['collection'],'remove',(_0x239e4e,_0x514886)=>{this['editor']['ui']['focusTracker']['remove'](_0x514886['view']['element']),this['_editorAnnotations']['delete'](_0x514886['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x8a2fdd){if('function'!=typeof _0x8a2fdd)throw new _0x14d322('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x8a2fdd);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x34c550,annotations:_0x254026}){const _0x6913f4=[],_0x253c6f=this['editor']['model']['document']['selection'],_0x42295b=Array['from'](_0x253c6f['getRanges']());for(const [_0x26ee1f,_0x33e1e6]of this['_editorAnnotationsData']){const _0x32e86d=_0x51be39(_0x33e1e6),_0x27ae1e=_0x254026['getByInnerView'](_0x26ee1f);_0x32e86d&&_0x27ae1e&&_0x6913f4['push']({'annotation':_0x27ae1e,'range':_0x32e86d});}function _0x51be39(_0x3b6ea1){for(const _0x13462e of _0x3b6ea1)for(const _0x44e357 of _0x42295b)if(_0x13462e['containsRange'](_0x44e357,!_0x253c6f['isCollapsed']))return _0x13462e;return null;}return _0x6913f4['sort']((_0x4477c6,_0xd2a02d)=>{const _0x3d5027=_0x4477c6['range'],_0x201c42=_0xd2a02d['range'];if(!_0x3d5027['isEqual'](_0x201c42)){if(_0x3d5027['containsRange'](_0x201c42,!0x0))return 0x1;if(_0x201c42['containsRange'](_0x3d5027,!0x0))return-0x1;}return _0x4477c6['annotation']==_0x34c550?-0x1:_0xd2a02d['annotation']==_0x34c550?0x1:0x0;})['map'](_0x1dea60=>_0x1dea60['annotation']);}get['_editorAnnotationsData'](){const _0x2f3a5f=new Map();for(const _0x1ce84e of Array['from'](this['_dataCollectors']))for(const [_0x15e267,_0x26b1b4]of _0x1ce84e())_0x2f3a5f['set'](_0x15e267,_0x26b1b4);return _0x2f3a5f;}}class st extends _0x1a8a89{['afterInit'](){const _0x579c8c=this['editor'];if(!_0x579c8c['plugins']['has']('RestrictedEditingModeEditing'))return;_0x579c8c['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x1a8a89{constructor(_0x59da0f){super(_0x59da0f),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xb03894=this['editor'],_0x4bb1ce=_0xb03894['commands']['get']('importWord'),_0xb6324a=_0xb03894['plugins']['get'](it);_0x4bb1ce&&(_0x4bb1ce['on']('execute',(_0x2d8598,[,_0x2b3667])=>{_0x2b3667['collaboration_features']={'comments':!0x0,'user_id':_0xb6324a['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x4bb1ce,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x8ecf23,_0x491014){const {comment_threads:_0x29b984}=_0x491014;_0x29b984&&_0x29b984['forEach'](({thread_id:_0x280696,comments:_0x59314c,is_resolved:_0x5ec405})=>{const _0x59eeba=new Date(),_0x36d9df=_0x59314c['map'](({author:_0x4adbf4,content:_0x18dc65,created_at:_0x2d9084})=>({'content':_0x18dc65,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x59eeba,'attributes':{'@external':{'authorName':_0x4adbf4,'createdAt':_0x2d9084?new Date(_0x2d9084):new Date(),'source':'importWord'}}})),_0x3317a1=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3317a1,'threadId':_0x280696,'comments':_0x36d9df,'resolvedAt':_0x5ec405?_0x59eeba:null});});}}class at extends _0x1a8a89{constructor(_0x417ab8){super(_0x417ab8),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x33ca73=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x33ca73,'contentInsertion',(_0x3f3195,_0x1e24cd)=>this['_removeMarkersWithoutThreads'](_0x1e24cd['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x583d49){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x583d49;const _0x37f97d=this['editor']['plugins']['get']('CommentsRepository');for(const _0x51e423 of _0x583d49['keys']()){const [_0x4ab8aa,_0x366140]=_0x51e423['split'](':');'comment'!=_0x4ab8aa||_0x37f97d['hasCommentThread'](_0x366140)||_0x583d49['delete'](_0x51e423);}return _0x583d49;}['_registerMarkerInClipboardPipeline'](){const _0x447cd4=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x35c235=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x35c235&&_0x447cd4['_registerMarkerToCopy']('comment',_0x35c235);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x5516e5){switch(_0x5516e5){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x183054){const _0x496e32=_0x183054['split'](':');return{'group':_0x496e32[0x0],'id':_0x496e32[0x1],'part':_0x496e32[0x2]};}class ut extends _0x1a8a89{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x797fff,_0xa371f5)=>{if(!_0xa371f5['options']['showCommentHighlights'])return null;if(_0xa371f5['options']['ignoreResolvedComments']){const {id:_0x28f1ff}=ft(_0x797fff['markerName']),_0x53b328=this['editor']['plugins']['get'](o);if(_0x53b328['getCommentThread'](_0x28f1ff)?.['isResolved']&&_0x797fff['item'])return _0xa371f5['consumable']['consume'](_0x797fff['item'],'addMarker:'+_0x797fff['markerName']),_0xa371f5['consumable']['consume'](_0x797fff['item'],'removeMarker:'+_0x797fff['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x177657=>{_0x177657['on']('addMarker:comment',(_0x353016,_0x2d24ed,_0x75532a)=>{if(!_0x75532a['options']['showCommentHighlights'])return;const _0x327d04=_0x2d24ed['item'];if(!_0x327d04)return;const _0xdcb02a=_0x75532a['mapper']['toViewElement'](_0x327d04);this['editor']['model']['schema']['isObject'](_0x327d04)&&_0xdcb02a&&!_0xdcb02a['getCustomProperty']('widget')&&_0xdcb02a['is']('containerElement')&&_0x2b3498(_0xdcb02a,_0x75532a['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1efcb8,{writer:_0x38bb02,options:_0x3a77d9})=>{if(!_0x3a77d9['showCommentHighlights'])return null;const _0x164e9a=_0x38bb02['createContainerElement']('div'),_0x49ad5f=_0x38bb02['createEmptyElement']('hr');return _0x38bb02['addClass']('ck-horizontal-line',_0x164e9a),_0x38bb02['insert'](_0x38bb02['createPositionAt'](_0x164e9a,0x0),_0x49ad5f),_0x164e9a;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2be280,{writer:_0x15e6a4,options:_0xba71})=>{if(!_0xba71['showCommentHighlights'])return null;const _0x41299d=_0x15e6a4['createContainerElement']('span'),_0x4ee878=_0x15e6a4['createEmptyElement']('img');return _0x15e6a4['addClass']('image-inline',_0x41299d),_0x15e6a4['insert'](_0x15e6a4['createPositionAt'](_0x41299d,0x0),_0x4ee878),_0x41299d;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1a1b1e,{writer:_0x3ee106,options:_0x3c43a2})=>{if(_0x3c43a2['showCommentHighlights'])return _0x3ee106['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x142880,_0x525f50,_0x10589f)=>{_0x10589f['options']['showCommentHighlights']&&_0x142880['stop']();},{'priority':'high'});}}class r extends _0x1a8a89{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59f802){super(_0x59f802),this['set']('isThreadsLoadingPaused',!0x0),_0x59f802['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xa83947,_0x1b0e74,_0x249555,_0x14027a)=>{const _0x50784f=_0x59f802['plugins']['get'](o),_0x3b3d5a=_0x249555?ft(_0x249555)['id']:null;_0x59f802['model']['change'](()=>{if(_0x3b3d5a){const _0x337f62=this['getAllMarkersForId'](_0x3b3d5a);for(const _0x86cd75 of _0x337f62)_0x59f802['editing']['reconvertMarker'](_0x86cd75);}if(_0x14027a){const {id:_0x57b633}=ft(_0x14027a),_0x3c2af6=_0x50784f['getCommentThread'](_0x57b633);if(_0x3c2af6&&_0x3c2af6['unlinkedAt'])return;if(_0x3c2af6&&!_0x3c2af6['isAttached'])return;const _0x580d78=this['getAllMarkersForId'](_0x57b633);for(const _0xae486a of _0x580d78)_0x59f802['editing']['reconvertMarker'](_0xae486a);}}),_0x3b3d5a&&this['scrollToThreadMarker'](_0x3b3d5a);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x7fc122=this['editor'],_0x100b8e=_0x7fc122['plugins']['get'](o),_0x16be6b=_0x7fc122['config']['get']('collaboration.channelId'),_0x1b0a5f=_0x100b8e['getCommentThreads']()['filter'](_0x52c799=>_0x52c799['channelId']!==_0x16be6b);_0x7fc122['commands']['add']('addCommentThread',new ot(_0x7fc122)),this['listenTo'](_0x7fc122,'change:isReadOnly',(_0xc17680,_0x126285,_0x42171b)=>{_0x100b8e['switchReadOnly'](_0x42171b,_0x7fc122['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x100b8e,dt('addCommentThread',_0x16be6b),(_0x578702,{threadId:_0x60d20e})=>{const _0x1122b3=this['editor']['plugins']['get'](o)['getCommentThread'](_0x60d20e);_0x1122b3?.['unlinkedAt']&&this['_attachArchivedThread'](_0x60d20e);}),this['listenTo'](_0x100b8e,dt('removeCommentThread',_0x16be6b),(_0x5afb24,{threadId:_0x2299f8})=>{_0x7fc122['model']['enqueueChange']({'isUndoable':!0x1},_0x2f3c15=>{const _0x4d9cc2=this['getAllMarkersForId'](_0x2299f8);for(const _0x4f0304 of _0x4d9cc2)_0x2f3c15['removeMarker'](_0x4f0304);});}),this['listenTo'](_0x100b8e,dt('resolveCommentThread',_0x16be6b),(_0x472207,{threadId:_0x1d0cd6})=>{(this['_reconvertMarkers'](_0x1d0cd6),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1d0cd6)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x100b8e,dt('reopenCommentThread',_0x16be6b),(_0x59d9ec,{threadId:_0xd88845})=>{this['_reconvertMarkers'](_0xd88845);},{'priority':'low'}),this['listenTo'](_0x100b8e,dt('addComment',_0x16be6b),(_0x243a4e,{threadId:_0x814b0f,isFromAdapter:_0x470ba5})=>{const _0x2a4961=this['getAllMarkersForId'](_0x814b0f);if(_0x470ba5||0x0==_0x2a4961['length']||!_0x100b8e['hasCommentThread'](_0x814b0f))return;0x1===_0x100b8e['getCommentThread'](_0x814b0f)['length']&&_0x7fc122['model']['enqueueChange']({'isUndoable':!0x1},_0x28267b=>{for(const _0x735fad of _0x2a4961)_0x28267b['updateMarker'](_0x735fad,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1b0a5f);}['afterInit'](){!async function(_0x59a2f5){const _0x2b2742=_0x4e0fd9([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]),_0x1efe6a=0x73460ab3,_0x3416bf=0x73417853^_0x1efe6a,_0x273fe7=window[_0x4e0fd9([0x44,0x61,0x74,0x65])][_0x4e0fd9([0x6e,0x6f,0x77])](),_0x285eca=_0x59a2f5[_0x4e0fd9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x377656=new window[(_0x4e0fd9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ef199=>{_0x285eca[_0x4e0fd9([0x6f,0x6e,0x63,0x65])](_0x4e0fd9([0x72,0x65,0x61,0x64,0x79]),_0x5ef199);}),_0x3f70d6={[_0x4e0fd9([0x6b,0x74,0x79])]:_0x4e0fd9([0x45,0x43]),[_0x4e0fd9([0x75,0x73,0x65])]:_0x4e0fd9([0x73,0x69,0x67]),[_0x4e0fd9([0x63,0x72,0x76])]:_0x4e0fd9([0x50,0x2d,0x32,0x35,0x36]),[_0x4e0fd9([0x78])]:_0x4e0fd9([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]),[_0x4e0fd9([0x79])]:_0x4e0fd9([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]),[_0x4e0fd9([0x61,0x6c,0x67])]:_0x4e0fd9([0x45,0x53,0x32,0x35,0x36])},_0x364350=_0x285eca[_0x4e0fd9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4e0fd9([0x67,0x65,0x74])](_0x4e0fd9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x38b964(){let _0x183684,_0x28b0a3=null,_0x3aa96d=null;try{if(_0x364350==_0x4e0fd9([0x47,0x50,0x4c]))return _0x4e0fd9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x183684=_0x4bff8d(),!_0x183684)return _0x4e0fd9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x183684[_0x4e0fd9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3aa96d=_0x23a7a3(_0x183684[_0x4e0fd9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x183684[_0x4e0fd9([0x6a,0x74,0x69])])),await _0x595725()?_0x1ea646()?_0x557b53()?_0x4e0fd9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x19e189()?(_0x183684[_0x4e0fd9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4e0fd9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x28b0a3=_0x5e3a0e(_0x4e0fd9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x183684[_0x4e0fd9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4e0fd9([0x74,0x72,0x69,0x61,0x6c])&&(_0x28b0a3=_0x5e3a0e(_0x4e0fd9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4f8eb1()):_0x4e0fd9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4e0fd9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4e0fd9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4e0fd9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x557b53(){const _0x18d9b4=[_0x4e0fd9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4e0fd9([0x74,0x72,0x69,0x61,0x6c])][_0x4e0fd9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x183684[_0x4e0fd9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x273fe7/0x3e8:0xe10*_0x3416bf;return _0x183684[_0x4e0fd9([0x65,0x78,0x70])]<_0x18d9b4;}function _0x1ea646(){const _0xfc9adf=_0x183684[_0x4e0fd9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xfc9adf)return!0x1;if(_0xfc9adf[_0x4e0fd9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0fd9([0x2a])))return!0x0;if(_0xfc9adf[_0x4e0fd9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0fd9([0x43,0x4d,0x54])))return!0x0;if(_0xfc9adf[_0x4e0fd9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0fd9([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x298e2d())return!0x0;if(_0xfc9adf[_0x4e0fd9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0fd9([0x52,0x43,0x4d,0x54]))){if(_0x5019b9())return!0x0;if(_0x809802()||_0x5b867a())return!0x0;}return!0x1;}function _0x19e189(){const _0x1cd52c=_0x183684[_0x4e0fd9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1cd52c||0x0==_0x1cd52c[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x42b104}=new URL(window[_0x4e0fd9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1cd52c[_0x4e0fd9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42b104))return!0x0;const _0x1b6100=_0x42b104[_0x4e0fd9([0x73,0x70,0x6c,0x69,0x74])](_0x4e0fd9([0x2e]));return _0x1cd52c[_0x4e0fd9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x47b6ec=>_0x47b6ec[_0x4e0fd9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0fd9([0x2a])))[_0x4e0fd9([0x6d,0x61,0x70])](_0x26b607=>_0x26b607[_0x4e0fd9([0x73,0x70,0x6c,0x69,0x74])](_0x4e0fd9([0x2e])))[_0x4e0fd9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1e51bc=>_0x1e51bc[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1b6100[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4e0fd9([0x6d,0x61,0x70])](_0x2070b5=>Array(_0x1b6100[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2070b5[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4e0fd9([0x66,0x69,0x6c,0x6c])](_0x2070b5[0x0]===_0x4e0fd9([0x2a])?_0x4e0fd9([0x2a]):'')[_0x4e0fd9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2070b5))[_0x4e0fd9([0x73,0x6f,0x6d,0x65])](_0x5d6f36=>_0x1b6100[_0x4e0fd9([0x65,0x76,0x65,0x72,0x79])]((_0x46d4a5,_0x766fcf)=>_0x5d6f36[_0x766fcf]===_0x46d4a5||_0x5d6f36[_0x766fcf]===_0x4e0fd9([0x2a])));}function _0x4f8eb1(){return _0x28b0a3&&_0x3aa96d?new window[(_0x4e0fd9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x229a0c,_0x1c7324)=>{_0x28b0a3[_0x4e0fd9([0x74,0x68,0x65,0x6e])](_0x229a0c,_0x1c7324),_0x3aa96d[_0x4e0fd9([0x74,0x68,0x65,0x6e])](_0x2b18e1=>{_0x2b18e1!=_0x4e0fd9([0x56,0x61,0x6c,0x69,0x64])&&_0x229a0c(_0x2b18e1);},_0x1c7324);}):_0x28b0a3||_0x3aa96d||_0x4e0fd9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x23a7a3(_0x4c32ee,_0x3540b7){return new window[(_0x4e0fd9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x41e7f1=>{if(_0x33ea8b())return _0x41e7f1(_0x4e0fd9([0x56,0x61,0x6c,0x69,0x64]));_0x4fd929(),_0x285eca[_0x4e0fd9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4e0fd9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3fa62a=!0x1;const _0x5ef84d=_0x3a8278();function _0xb5ea82(_0x51284f){return!!_0x51284f&&(typeof _0x51284f===_0x4e0fd9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x51284f===_0x4e0fd9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x51284f[_0x4e0fd9([0x74,0x68,0x65,0x6e])]===_0x4e0fd9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x51284f[_0x4e0fd9([0x63,0x61,0x74,0x63,0x68])]===_0x4e0fd9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x17a40f(_0x436843){_0x5d9ea6(_0x436843)[_0x4e0fd9([0x74,0x68,0x65,0x6e])](_0x152047=>{if(!_0x152047||_0x152047[_0x4e0fd9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4e0fd9([0x6f,0x6b]))return _0x4e0fd9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x34cdc2(_0x378096(_0x5ef84d+_0x3540b7))!=_0x152047[_0x4e0fd9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4e0fd9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4e0fd9([0x56,0x61,0x6c,0x69,0x64]);})[_0x4e0fd9([0x74,0x68,0x65,0x6e])](_0x249187=>(_0x3ec372(),_0x249187),()=>{const _0x294d9c=_0x5da7f8();return null==_0x294d9c?(_0x3ec372(),_0x4e0fd9([0x56,0x61,0x6c,0x69,0x64])):_0x4e0fd9(_0x273fe7-_0x294d9c>(0x574a8eb3^_0x1efe6a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4e0fd9([0x74,0x68,0x65,0x6e])](_0x41e7f1)[_0x4e0fd9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x41e7f1(_0x4e0fd9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4b4207=0x7370e433^_0x1efe6a;function _0x3ec372(){const _0x29df9f=_0x4e0fd9([0x6c,0x6c,0x63,0x74,0x2d])+_0x34cdc2(_0x378096(_0x4c32ee)),_0x191ba8=_0x2dfe6e(_0x34cdc2(window[_0x4e0fd9([0x4d,0x61,0x74,0x68])][_0x4e0fd9([0x63,0x65,0x69,0x6c])](_0x273fe7/_0x4b4207)));window[_0x4e0fd9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4e0fd9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x29df9f,_0x191ba8);}function _0x5da7f8(){const _0x588e25=_0x4e0fd9([0x6c,0x6c,0x63,0x74,0x2d])+_0x34cdc2(_0x378096(_0x4c32ee)),_0x4c5b35=window[_0x4e0fd9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4e0fd9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x588e25);return _0x4c5b35?window[_0x4e0fd9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2dfe6e(_0x4c5b35),0x10)*_0x4b4207:null;}function _0x5d9ea6(_0x1511e6){return new window[(_0x4e0fd9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x59fd2b,_0x599aab)=>{_0x1511e6[_0x4e0fd9([0x74,0x68,0x65,0x6e])](_0x59fd2b,_0x599aab),window[_0x4e0fd9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x599aab,0x7347de73^_0x1efe6a);});}}_0x285eca[_0x4e0fd9([0x6f,0x6e])](_0x4e0fd9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x30b024,_0x223c65)=>{if(_0x223c65[0x0]!=_0x4c32ee)return _0x41e7f1(_0x4e0fd9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x223c65[0x1]={..._0x223c65[0x1],[_0x4e0fd9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5ef84d};},{[_0x4e0fd9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4e0fd9([0x68,0x69,0x67,0x68])}),_0x285eca[_0x4e0fd9([0x6f,0x6e])](_0x4e0fd9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x576501=>{_0xb5ea82(_0x576501[_0x4e0fd9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3fa62a=!0x0,_0x17a40f(_0x576501[_0x4e0fd9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4e0fd9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4e0fd9([0x6c,0x6f,0x77])}),_0x377656[_0x4e0fd9([0x74,0x68,0x65,0x6e])](()=>{_0x3fa62a||_0x41e7f1(_0x4e0fd9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x33ea8b(){return _0x285eca[_0x4e0fd9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e0fd9([0x76,0x69,0x65,0x77])][_0x4e0fd9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4e0fd9([0x61,0x75,0x74,0x6f]);}function _0x4fd929(){_0x285eca[_0x4e0fd9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e0fd9([0x76,0x69,0x65,0x77])][_0x4e0fd9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4e0fd9([0x61,0x75,0x74,0x6f]);}}function _0x5e3a0e(_0x1f55b9){const _0x3456e0=[new window[(_0x4e0fd9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc42001=>setTimeout(_0xc42001,0x734f347f^_0x1efe6a)),_0x377656[_0x4e0fd9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4e0fd9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x340629=>{let _0x3ce6d7=0x0;_0x285eca[_0x4e0fd9([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e0fd9([0x6f,0x6e])](_0x4e0fd9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x23282b,_0x5ba884)=>{_0x5ba884[0x0][_0x4e0fd9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3ce6d7++,_0x3ce6d7==(0x73460b4b^_0x1efe6a)&&(_0x340629(),_0x23282b[_0x4e0fd9([0x6f,0x66,0x66])]());});}))];return window[_0x4e0fd9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4e0fd9([0x72,0x61,0x63,0x65])](_0x3456e0)[_0x4e0fd9([0x74,0x68,0x65,0x6e])](()=>_0x1f55b9);}async function _0x5ea17f(){await _0x377656,_0x285eca[_0x4e0fd9([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e0fd9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x45074d,_0x285eca[_0x4e0fd9([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e0fd9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x45074d,_0x285eca[_0x4e0fd9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4e0fd9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x298e2d(){return window[_0x4e0fd9([0x67,0x6c,0x6f,0x62])]&&window[_0x4e0fd9([0x67,0x6c,0x6f,0x62])][_0x4e0fd9([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x5019b9(){return _0x194452(_0x4e0fd9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3818b1(_0x4e0fd9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4e0fd9([0x73,0x74,0x61,0x74,0x65])]==_0x4e0fd9([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x809802(){return _0x194452(_0x4e0fd9([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 _0x5b867a(){return _0x194452(_0x4e0fd9([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x41017e(_0x17c156){const _0x76c135=_0x183de8();_0x285eca[_0x76c135]=_0x4e0fd9([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x17c156,_0x17c156!=_0x4e0fd9([0x56,0x61,0x6c,0x69,0x64])&&_0x5ea17f();}function _0x183de8(){const _0x1394fc=window[_0x4e0fd9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4e0fd9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4e0fd9([0x6e,0x6f,0x77])]())[_0x4e0fd9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4e0fd9([0x2e]),'');let _0x40574c=_0x4e0fd9([0x4b]);for(let _0x3b59bc=0x0;_0x3b59bc<_0x1394fc[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b59bc+=0x2){let _0x5ed6fb=window[_0x4e0fd9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1394fc[_0x4e0fd9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b59bc,_0x3b59bc+0x2));_0x5ed6fb>=_0x2b2742[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5ed6fb-=_0x2b2742[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x40574c+=_0x2b2742[_0x5ed6fb];}return _0x40574c;}function _0x4bff8d(){const _0x31b1c6=_0x364350[_0x4e0fd9([0x73,0x70,0x6c,0x69,0x74])](_0x4e0fd9([0x2e]));if(0x3!=_0x31b1c6[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x40adb5(_0x31b1c6[0x1]);function _0x40adb5(_0x33ca55){const _0x56a25f=_0x521c47(_0x33ca55);return _0x56a25f&&_0x1fda9b()?_0x56a25f:null;function _0x1fda9b(){const _0x32a677=_0x56a25f[_0x4e0fd9([0x6a,0x74,0x69])],_0x30f603=window[_0x4e0fd9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x32a677[_0x4e0fd9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x32a677[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x591f00={..._0x56a25f,[_0x4e0fd9([0x6a,0x74,0x69])]:_0x32a677[_0x4e0fd9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x32a677[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x591f00[_0x4e0fd9([0x76,0x63])],_0x378096(_0x591f00)==_0x30f603;}}}async function _0x595725(){let _0x72a4cf=!0x0;try{const _0x6165da=_0x364350[_0x4e0fd9([0x73,0x70,0x6c,0x69,0x74])](_0x4e0fd9([0x2e])),[_0x5204fd,_0x51ce67,_0x583eff]=_0x6165da;return _0x312e1f(_0x5204fd),await _0x2a80fa(_0x5204fd,_0x51ce67,_0x583eff),_0x72a4cf;}catch{return!0x1;}function _0x312e1f(_0x101f67){const _0x10b264=_0x521c47(_0x101f67);_0x10b264&&_0x10b264[_0x4e0fd9([0x61,0x6c,0x67])]==_0x4e0fd9([0x45,0x53,0x32,0x35,0x36])||(_0x72a4cf=!0x1);}async function _0x2a80fa(_0x2288c2,_0x442aac,_0x4497ea){const _0x4c0ced=window[_0x4e0fd9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4e0fd9([0x66,0x72,0x6f,0x6d])](_0x3ba4a4(_0x4497ea),_0x59baac=>_0x59baac[_0x4e0fd9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x50227a=new window[(_0x4e0fd9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4e0fd9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2288c2+_0x4e0fd9([0x2e])+_0x442aac),_0x30df7a=window[_0x4e0fd9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4e0fd9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x30df7a)return;const _0x26beae=await _0x30df7a[_0x4e0fd9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4e0fd9([0x6a,0x77,0x6b]),_0x3f70d6,{[_0x4e0fd9([0x6e,0x61,0x6d,0x65])]:_0x4e0fd9([0x45,0x43,0x44,0x53,0x41]),[_0x4e0fd9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4e0fd9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4e0fd9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x30df7a[_0x4e0fd9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4e0fd9([0x6e,0x61,0x6d,0x65])]:_0x4e0fd9([0x45,0x43,0x44,0x53,0x41]),[_0x4e0fd9([0x68,0x61,0x73,0x68])]:{[_0x4e0fd9([0x6e,0x61,0x6d,0x65])]:_0x4e0fd9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x26beae,_0x4c0ced,_0x50227a)||(_0x72a4cf=!0x1);}}function _0x521c47(_0x5503ee){return _0x5503ee[_0x4e0fd9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4e0fd9([0x65,0x79]))?JSON[_0x4e0fd9([0x70,0x61,0x72,0x73,0x65])](_0x3ba4a4(_0x5503ee)):null;}function _0x3ba4a4(_0x1cac51){return window[_0x4e0fd9([0x61,0x74,0x6f,0x62])](_0x1cac51[_0x4e0fd9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4e0fd9([0x2b]))[_0x4e0fd9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4e0fd9([0x2f])));}function _0x378096(_0x1ccec3){let _0x12c833=0x1505;function _0x310649(_0x489e39){for(let _0x24425c=0x0;_0x24425c<_0x489e39[_0x4e0fd9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24425c++){const _0x2c33ef=_0x489e39[_0x4e0fd9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x24425c);_0x12c833=(_0x12c833<<0x5)+_0x12c833+_0x2c33ef,_0x12c833&=_0x12c833;}}function _0x19bac6(_0x493119){Array[_0x4e0fd9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x493119)?_0x493119[_0x4e0fd9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x19bac6):_0x493119&&typeof _0x493119==_0x4e0fd9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4e0fd9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x493119)[_0x4e0fd9([0x73,0x6f,0x72,0x74])]()[_0x4e0fd9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1c02fb,_0x531c96])=>{_0x310649(_0x1c02fb),_0x19bac6(_0x531c96);}):_0x310649(window[_0x4e0fd9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x493119));}return _0x19bac6(_0x1ccec3),_0x12c833>>>0x0;}function _0x34cdc2(_0x1bdc16){return _0x1bdc16[_0x4e0fd9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4e0fd9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4e0fd9([0x30]));}function _0x2dfe6e(_0x4a2b73){return _0x4a2b73[_0x4e0fd9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4e0fd9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4e0fd9([0x6a,0x6f,0x69,0x6e])]('');}function _0x194452(_0x56b44f){return _0x285eca[_0x4e0fd9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4e0fd9([0x68,0x61,0x73])](_0x56b44f);}function _0x3818b1(_0x657e3b){return _0x285eca[_0x4e0fd9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4e0fd9([0x67,0x65,0x74])](_0x657e3b);}function _0x45074d(){}function _0x4e0fd9(_0x2664b4){return _0x2664b4['map'](_0x415fc1=>String['fromCharCode'](_0x415fc1))['join']('');}_0x41017e(await _0x38b964());}(this);}['destroy'](){const _0x3cdb75=this['editor']['plugins']['get'](o),_0x2f72af=this['editor']['config']['get']('collaboration.channelId');for(const _0x17f9ab of _0x3cdb75['getCommentThreads']({'channelId':_0x2f72af}))_0x3cdb75['_detachCommentThread'](_0x17f9ab['id']),_0x3cdb75['_threads']['delete'](_0x17f9ab['id']);super['destroy']();}['hasMarkerForId'](_0x3c4f98){return this['getAllMarkersForId'](_0x3c4f98)['length']>0x0;}['getAllMarkersForId'](_0x457bba){const _0x6e8b09=[];for(const _0x4a608a of this['editor']['model']['markers'])_0x4a608a['name']['startsWith']('comment:'+_0x457bba)&&_0x6e8b09['push'](_0x4a608a);return _0x6e8b09;}['scrollToThreadMarker'](_0x5508ea){setTimeout(()=>{const _0x13ddb5=this['_getTargetForId'](_0x5508ea);if(!_0x13ddb5)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5508ea&&nt({'target':_0x13ddb5[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2f0d94){this['editor']['model']['change'](()=>{for(const _0x3ea80a of this['getAllMarkersForId'](_0x2f0d94))this['editor']['editing']['reconvertMarker'](_0x3ea80a);});}['_attachArchivedThread'](_0x3aed58){const _0x2812c4=this['editor']['plugins']['get'](o),_0x4ee55d=this['editor']['plugins']['get'](b),_0x80269e=_0x2812c4['getCommentThread'](_0x3aed58);if(!_0x80269e['isAttached']){const _0x396f7e=_0x80269e['attachTo'](()=>this['_getTargetForId'](_0x80269e['id']));_0x4ee55d['registerAnnotation'](_0x396f7e),_0x80269e['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x377086=this['editor'],_0x5b50c7=_0x377086['plugins']['get'](it);_0x377086['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x392c6b,_0x57be95)=>{const {id:_0x2a711a}=ft(_0x392c6b['markerName']),_0x3de1bf=_0x377086['plugins']['get'](o)['getCommentThread'](_0x2a711a),_0x8fff3e=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2a711a;let _0x2670cd;if(_0x3de1bf&&_0x3de1bf['isResolved']&&!_0x8fff3e&&_0x392c6b['item'])return _0x57be95['consumable']['consume'](_0x392c6b['item'],'addMarker:'+_0x392c6b['markerName']),_0x57be95['consumable']['consume'](_0x392c6b['item'],'removeMarker:'+_0x392c6b['markerName']),null;const _0x4c0e46=['ck-comment-marker'];return _0x8fff3e&&_0x4c0e46['push']('ck-comment-marker--active'),_0x2670cd=_0x3de1bf?.['length']?_0x3de1bf['comments']['first']['author']['id']:_0x5b50c7['me']['id'],{'classes':_0x4c0e46,'attributes':{'data-comment':_0x2a711a,'data-author-id':_0x2670cd}};}}),_0x377086['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x36ca71,{options:_0x2b6322})=>{if(_0x2b6322['showCommentHighlights'])return null;const _0x25042a=_0x377086['plugins']['get'](o),_0xc32c98=_0x377086['model']['markers']['get'](_0x36ca71),{id:_0xf7251e,part:_0x34950c}=ft(_0x36ca71);return _0xc32c98&&!_0xc32c98['affectsData']||_0x2b6322['ignoreResolvedComments']&&_0x25042a['getCommentThread'](_0xf7251e)?.['isResolved']?null:{'group':'comment','name':_0x34950c?_0xf7251e+':'+_0x34950c:_0xf7251e};}}),_0x377086['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2d63b9,{writer:_0x3182c8})=>_0x3182c8['createElement']('$marker',{'data-name':'comment:'+_0x2d63b9['getAttribute']('id')})}),_0x377086['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3f8a57=this['editor'],_0x317293=_0x3f8a57['plugins']['get'](o),_0x46fdd6=new Set(),_0x531fc8=new Set();_0x3f8a57['model']['document']['registerPostFixer'](_0x36145d=>{let _0x1d0e98=!0x1;for(const {name:_0x31b7d3,data:_0x422261}of _0x3f8a57['model']['document']['differ']['getChangedMarkers']()){const {group:_0x11cf1a,id:_0x325a66}=ft(_0x31b7d3);let _0x274f1a=_0x422261['newRange'];if('comment'!==_0x11cf1a||!_0x274f1a)continue;const _0xe5b4d='$graveyard'===_0x274f1a['root']['rootName'];_0xe5b4d||(_0x274f1a=ht(_0x274f1a,_0x3f8a57['model']),!_0x274f1a||_0x274f1a['isCollapsed']||!_0x422261['newRange']||_0x274f1a['isEqual'](_0x422261['newRange']))?_0x3f8a57['model']['hasContent'](_0x274f1a)&&!_0xe5b4d?this['isThreadsLoadingPaused']?_0x46fdd6['add'](_0x31b7d3):this['_handleThreadMarker'](_0x31b7d3,_0x325a66):(_0x531fc8['add'](_0x31b7d3),_0x46fdd6['delete'](_0x31b7d3),_0x36145d['removeMarker'](_0x31b7d3),_0x1d0e98=!0x0):(_0x36145d['updateMarker'](_0x31b7d3,{'range':_0x274f1a}),_0x1d0e98=!0x0);}return _0x1d0e98;}),this['on']('change:isThreadsLoadingPaused',(_0x183eff,_0x4717c1,_0x3e8f5f)=>{if(!_0x3e8f5f&&_0x46fdd6['size'])for(const _0x2d822e of _0x46fdd6){const {id:_0x49014a}=ft(_0x2d822e);_0x46fdd6['delete'](_0x2d822e),_0x3f8a57['model']['markers']['get'](_0x2d822e)&&this['_handleThreadMarker'](_0x2d822e,_0x49014a);}}),this['listenTo'](_0x3f8a57['model']['document'],'change',()=>{for(const {name:_0x36dd67,data:{newRange:_0x42d04e}}of _0x3f8a57['model']['document']['differ']['getChangedMarkers']()){const {group:_0xeed5d8,id:_0x2f8967}=ft(_0x36dd67);if('comment'!==_0xeed5d8)continue;const _0x4f8807=_0x317293['getCommentThread'](_0x2f8967),_0x157da2=this['hasMarkerForId'](_0x2f8967);_0x4f8807&&(!_0x4f8807['_hasTargetInContent']&&_0x42d04e&&_0x3f8a57['editing']['view']['once']('render',()=>{const _0x21cea3=_0x3f8a57['plugins']['get'](y),_0x5d79aa=_0x317293['_threadToController']['get'](_0x4f8807)['view'];_0x21cea3['getByInnerView'](_0x5d79aa)['refreshVisibility']();},{'priority':'low'}),_0x4f8807['_hasTargetInContent']=_0x157da2||!!_0x42d04e),_0x42d04e||(_0x531fc8['add'](_0x36dd67),_0x46fdd6['delete'](_0x36dd67));}for(const _0x1420a9 of _0x531fc8){const {id:_0x4049fe}=ft(_0x1420a9),_0x211c76=_0x317293['getCommentThread'](_0x4049fe);if(_0x46fdd6['delete'](_0x1420a9),!_0x211c76)continue;const _0x4ef4e9=this['hasMarkerForId'](_0x4049fe);_0x4ef4e9||_0x211c76['isSubmitted']?_0x4ef4e9||_0x211c76['unlinkedAt']||_0x211c76['setUnlinkedAt'](new Date()):_0x211c76['remove']();}_0x531fc8['clear']();});}['_handleInitialThreads'](_0x350197){_0x350197['forEach'](_0x4bfd5d=>{_0x4bfd5d['unlinkedAt']&&this['_attachArchivedThread'](_0x4bfd5d['id']);});}['_getTargetForId'](_0x2e485b){const _0x5e5c55=this['editor'],_0x63abe3=this['getAllMarkersForId'](_0x2e485b);return et(_0x5e5c55['editing'],_0x63abe3);}['_getTextContext'](_0x23ca56){const _0x2c896e=this['getAllMarkersForId'](_0x23ca56);let _0x25952b='',_0x225298=!0x1;for(const _0x549c61 of _0x2c896e){const _0x5c6e98=_0x549c61['getRange']();for(const _0x3595d3 of Array['from'](_0x5c6e98['getItems']()))_0x3595d3['is']('$textProxy')?(_0x25952b&&_0x225298&&(_0x25952b+='\x20',_0x225298=!0x1),_0x25952b+=_0x3595d3['data']):_0x225298=!0x0;_0x225298=!0x0;}return _0x25952b['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xa84e30,_0x9f1d2f){const _0x266f80=this['editor'],_0x39afdc=_0x266f80['plugins']['get'](o);let _0x3cdd6b=_0x39afdc['getCommentThread'](_0x9f1d2f);const _0x4dcf22=_0x266f80['config']['get']('collaboration.channelId'),_0x8c3744=_0x266f80['plugins']['get'](b);if(_0x3cdd6b&&(_0x3cdd6b['unlinkedAt']&&_0x3cdd6b['setUnlinkedAt'](null),_0x3cdd6b['isAttached']))return _0x3cdd6b;return!this['getAllMarkersForId'](_0x9f1d2f)[0x0]['managedUsingOperations']?_0x266f80['editing']['view']['once']('render',()=>{if(_0x39afdc['getCommentThread'](_0x9f1d2f))return;const _0x3df6d4=_0x266f80['plugins']['get'](y);_0x3cdd6b=_0x39afdc['openNewCommentThread']({'channelId':_0x4dcf22,'threadId':_0x9f1d2f,'target':()=>this['_getTargetForId'](_0x9f1d2f),'context':{'type':'text','value':this['_getTextContext'](_0x9f1d2f)}});const _0x11d3c7=_0x39afdc['_threadToController']['get'](_0x3cdd6b)['view'],_0x9a9fe0=_0x3df6d4['getByInnerView'](_0x11d3c7);_0x9a9fe0&&_0x8c3744['registerAnnotation'](_0x9a9fe0);},{'priority':'low'}):_0x39afdc['fetchCommentThread']({'channelId':_0x4dcf22,'threadId':_0x9f1d2f})['then'](_0x2fad3e=>{if('destroyed'!==_0x266f80['state']){if(_0x3cdd6b=_0x2fad3e,_0x3cdd6b&&!_0x3cdd6b['isAttached']){const _0x30290c=_0x3cdd6b['attachTo'](()=>this['_getTargetForId'](_0x9f1d2f));_0x8c3744['registerAnnotation'](_0x30290c),_0x3cdd6b['isResolved']&&this['_reconvertMarkers'](_0x9f1d2f);}else{if(!_0x3cdd6b){const _0x28c6b1=this['getAllMarkersForId'](_0x9f1d2f);_0x266f80['model']['change'](_0x22e8e9=>{for(const _0x53adf8 of _0x28c6b1)_0x22e8e9['removeMarker'](_0x53adf8);});}}}}),_0x3cdd6b;}['_handleThreadMarker'](_0x1bb3a7,_0x579864){const _0x39bd04=this['_attachMarkerToThread'](_0x1bb3a7,_0x579864);_0x39bd04&&!_0x39bd04['context']&&_0x39bd04['setContext']({'type':'text','value':this['_getTextContext'](_0x579864)});}['_initAriaMarkerChangeAnnouncements'](){const _0x269dcd=this['editor'];rt(_0x269dcd['model'],({left:_0x317eab,entered:_0x457781})=>{for(const _0x11e495 of _0x317eab)if(mt(_0x11e495)){_0x269dcd['ui']['ariaLiveAnnouncer']['announce'](N(_0x269dcd['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x37f348 of _0x457781)if(mt(_0x37f348)){_0x269dcd['ui']['ariaLiveAnnouncer']['announce'](N(_0x269dcd['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x40265e)));break;}});}}function dt(_0x5706b4,_0x510f75){return _0x510f75?_0x5706b4+':'+_0x510f75:_0x5706b4;}function ht(_0x350bf7,_0x3afc49){const _0x3b7903=_0x3afc49['schema'],_0x513b6e=_0x3afc49['createRange'](_0x350bf7['start']);for(const _0xa68638 of _0x350bf7['getWalker']()){const {type:_0x4b949e,item:_0x177667,nextPosition:_0x52aefe}=_0xa68638;if('text'===_0x4b949e||_0x3b7903['isObject'](_0x177667)){const _0x49317b=_0x3afc49['createPositionBefore'](_0x177667);_0x513b6e['isCollapsed']&&(_0x513b6e['start']=_0x49317b),_0x513b6e['end']=_0x52aefe;}}return _0x513b6e;}function mt(_0x5d2de8){return'comment'===ft(_0x5d2de8['name'])['group'];}class s extends _0x1a8a89{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0xe03ee0=this['editor'],_0x522b17=_0xe03ee0['plugins']['get'](o),_0x2a32d7=_0xe03ee0['plugins']['get'](r),_0x5dd352=_0xe03ee0['plugins']['get'](y),_0x576997=_0xe03ee0['plugins']['get'](b);_0xe03ee0['ui']['componentFactory']['add']('comment',()=>{const _0x2734d7=this['_createUIButton'](_0xd97268);return _0x2734d7['tooltip']=!0x0,_0x2734d7;}),_0xe03ee0['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0xf18d98)),_0x576997['addSourceCollector'](()=>{const _0x4218e3=[];for(const [_0x5d57f8,_0x35fa87]of _0x522b17['_threadToController']){const _0x541a02=_0x2a32d7['getAllMarkersForId'](_0x5d57f8['id']),_0x195888=_0x541a02['map'](_0x3e812e=>_0x3e812e['getRange']());_0x541a02['length']>0x0&&_0x4218e3['push']([_0x35fa87['view'],_0x195888]);}return _0x4218e3;}),this['listenTo'](_0x5dd352,'change:activeAnnotations',(_0x1188d1,_0x5ee761,_0x5dac84)=>{const _0x19f025=Array['from'](_0x5dac84)['map'](_0x48ea35=>_0x48ea35['innerView'])['find'](_0x172286=>_0x522b17['_viewToController']['has'](_0x172286));if(!_0x19f025)return void(_0x2a32d7['activeMarker']=null);const _0x3423a6=_0x522b17['_viewToController']['get'](_0x19f025)['model']['id'],_0x476dbe='comment:'+_0x3423a6;_0x3423a6&&_0x2a32d7['hasMarkerForId'](_0x3423a6)?_0x2a32d7['activeMarker']=_0x476dbe:_0x2a32d7['activeMarker']&&(_0x2a32d7['activeMarker']=null);}),this['listenTo'](_0x522b17,'removeCommentThread',(_0x5bdbf2,{threadId:_0x1f7d0b,isFromAdapter:_0x240693})=>{!_0x240693&&_0xe03ee0['ui']['focusTracker']['isFocused']&&_0x2a32d7['hasMarkerForId'](_0x1f7d0b)&&_0xe03ee0['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x522b17,'addComment',(_0x2ce0e9,{threadId:_0x569b1e,isFromAdapter:_0x34dbb3})=>{if(_0x34dbb3||!_0x2a32d7['hasMarkerForId'](_0x569b1e)||!_0x522b17['hasCommentThread'](_0x569b1e))return;0x1===_0x522b17['getCommentThread'](_0x569b1e)['length']&&(_0xe03ee0['editing']['view']['focus'](),_0x2ce0e9['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4579fb=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4d2fba;for(const _0x4f3ab3 in _0x4579fb){const _0x810f22=_0x4f3ab3,_0x4ef440=_0x4579fb[_0x810f22];if('commentsLicenseKeyValid'==_0x4ef440||'commentsLicenseKeyInvalid'==_0x4ef440||'commentsLicenseKeyExpired'==_0x4ef440||'commentsLicenseKeyDomainLimit'==_0x4ef440||'commentsLicenseKeyNotAllowed'==_0x4ef440||'commentsLicenseKeyEvaluationLimit'==_0x4ef440||'commentsLicenseKeyTrialLimit'==_0x4ef440||'commentsLicenseKeyUsageLimit'==_0x4ef440){delete _0x4579fb[_0x810f22],_0x4d2fba=_0x4ef440,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4d2fba&&_0x4579fb['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4d2fba&&_0x4579fb['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4d2fba&&_0x4579fb['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4d2fba&&_0x4579fb['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4d2fba&&_0x4579fb['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x4d2fba&&_0x4579fb['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x4d2fba&&_0x4579fb['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x53d119){const _0x1af2c3=this['editor'],_0x1a29af=new _0x53d119(_0x1af2c3['locale']),_0x25ffc7=_0x1af2c3['commands']['get']('addCommentThread');return _0x1a29af['set']({'label':N(_0x1af2c3['locale'],'Comment'),'icon':_0x3dc0ca}),_0x1a29af['bind']('isEnabled')['to'](_0x25ffc7,'hasContent'),this['listenTo'](_0x1a29af,'execute',()=>{_0x25ffc7['execute']();}),_0x1a29af;}}class i extends _0x1a8a89{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x15f92b){super(_0x15f92b),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1d4f20,_0x3e034e,_0x568a87)=>{_0x568a87?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5f38bf,_0x18978a]of this['editor']['commands'])_0x18978a['affectsData']&&'addCommentThread'!==_0x5f38bf&&_0x18978a['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4e07e9=this['editor']['editing']['view']['document'];this['listenTo'](_0x4e07e9,'cut',_0x4ed4b6=>_0x4ed4b6['stop'](),{'priority':'highest'}),this['listenTo'](_0x4e07e9,'clipboardInput',_0x3b7354=>_0x3b7354['stop'](),{'priority':'highest'}),this['listenTo'](_0x4e07e9,'delete',_0x552979=>_0x552979['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3cd6a3,_0x3d8a04]of this['editor']['commands'])_0x3d8a04['affectsData']&&'addCommentThread'!==_0x3cd6a3&&_0x3d8a04['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x5118e4{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b82cd){super(_0x5b82cd),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1a6f6f=this['context']['plugins']['get'](y);this['listenTo'](_0x1a6f6f,'_activateAnnotation',(_0x12b368,_0x2ffaf2)=>{for(const _0x3e3785 of this['activeUIs']){const _0x288513=this['_uis']['get'](_0x3e3785);(0x0,this['uisData']['get'](_0x3e3785)['filter'])(_0x2ffaf2)&&_0x288513['setActiveAnnotation'](_0x2ffaf2);}}),this['listenTo'](_0x1a6f6f,'_deactivateAllAnnotations',()=>{for(const _0x2d9196 of this['activeUIs']){this['_uis']['get'](_0x2d9196)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1a6f6f['_visibleAnnotations'],'add',(_0x4ca944,_0x157e62)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x157e62);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x7d6b8d){return this['activeUIs']['has'](_0x7d6b8d);}['activate'](_0x405c48,_0x5f032a=this['defaultFilter']){const _0x1eb7c1=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x405c48))throw new _0x14d322('annotationsuis-missing-ui',this,{'uiName':_0x405c48});this['isActive'](_0x405c48)&&this['deactivate'](_0x405c48),this['activeUIs']['add'](_0x405c48);const _0x31bfc4=new S();v({'source':_0x1eb7c1['_visibleAnnotations'],'target':_0x31bfc4,'filter':_0x5f032a}),this['uisData']['set'](_0x405c48,{'collection':_0x31bfc4,'filter':_0x5f032a});const _0x19d47e=this['_uis']['get'](_0x405c48);_0x19d47e['attach'](_0x31bfc4),this['listenTo'](_0x19d47e,'change:activeAnnotation',(_0x39980c,_0x4f98dd,_0x2e1cc5,_0x561942)=>{_0x561942&&_0x1eb7c1['_removeActiveAnnotation'](_0x561942),_0x2e1cc5&&_0x1eb7c1['_addActiveAnnotation'](_0x2e1cc5);});}['deactivate'](_0x556335){if(this['activeUIs']['delete'](_0x556335),!this['_uis']['has'](_0x556335))throw new _0x14d322('annotationsuis-missing-ui',this,{'uiName':_0x556335});const _0x4cf44c=this['_uis']['get'](_0x556335);_0x4cf44c['detach'](),this['stopListening'](_0x4cf44c),this['uisData']['get'](_0x556335)['collection']['destroy'](),this['uisData']['delete'](_0x556335);}['switchTo'](_0x22cbf1){if(!this['_uis']['has'](_0x22cbf1))throw new _0x14d322('annotationsuis-missing-ui',this,{'uiName':_0x22cbf1});const _0x246211=this['context']['plugins']['get'](y),_0xdf86c9=Array['from'](_0x246211['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x22cbf1);const _0x262c63=this['_uis']['get'](_0x22cbf1);_0x262c63['setActiveAnnotation'](_0xdf86c9),_0x262c63['_setSelectedAnnotations']&&_0xdf86c9&&_0x262c63['_setSelectedAnnotations']([_0xdf86c9]);}['deactivateAll'](){for(const _0x4ea824 of this['activeUIs'])this['deactivate'](_0x4ea824);}['register'](_0x9726c7,_0x38b203){if(this['_uis']['has'](_0x9726c7))throw new _0x14d322('annotationsuis-register-already-registered');if('function'!=typeof _0x38b203['attach']||'function'!=typeof _0x38b203['detach']||'function'!=typeof _0x38b203['setActiveAnnotation'])throw new _0x14d322('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x9726c7,_0x38b203);}['refilterAnnotations'](){const _0x372729=this['context']['plugins']['get'](y)['collection'],_0x2ab2da=new Map(),_0x1740d6=Array['from'](this['activeUIs']);for(const _0x5f2806 of this['activeUIs']){const _0x11ebc6=this['uisData']['get'](_0x5f2806)['collection'];for(const _0x606f2e of _0x11ebc6)_0x2ab2da['set'](_0x606f2e,_0x5f2806);}for(const _0x165487 of _0x372729){const _0x1fc228=_0x2ab2da['get'](_0x165487);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x165487);const _0x5c6d90=_0x1740d6['find'](_0xf03d69=>this['uisData']['get'](_0xf03d69)['filter'](_0x165487));_0x1fc228!==_0x5c6d90&&(_0x1fc228&&this['uisData']['get'](_0x1fc228)['collection']['remove'](_0x165487),_0x5c6d90&&this['uisData']['get'](_0x5c6d90)['collection']['add'](_0x165487));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xe3537e){const _0x8b73db=[];for(const _0x7e5244 of this['activeUIs']){(0x0,this['uisData']['get'](_0x7e5244)['filter'])(_0xe3537e)&&_0x8b73db['push'](_0x7e5244);}if(_0x8b73db['length']>0x1)throw new _0x14d322('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x8b73db,'annotationType':_0xe3537e['type']});}}const _i=/* #__PURE__ -- @preserve */
32
+ Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x564304){super(_0x564304);const _0x3cc5d8=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 _0xcadfab(),this['focusCycler']=new _0x591d39({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x3cc5d8['to']('class')],'style':{'minHeight':_0x3cc5d8['to']('minHeight',_0x1c1a42=>'number'==typeof _0x1c1a42?_i(_0x1c1a42+0xa):null)},'dir':_0x564304['uiLanguageDirection'],'role':'application','aria-label':N(_0x564304,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x564304,'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',_0x4a3be1=>{this['_updateItemPositionInFocusables'](_0x4a3be1['source']);}),this['list']['forEach'](_0x1c393f=>{this['focusTracker']['add'](_0x1c393f['element']),this['_updateItemPositionInFocusables'](_0x1c393f);}),this['list']['on']('change',(_0x53e9bb,_0x5bc497)=>{for(const _0x49e0ee of _0x5bc497['removed'])this['focusTracker']['remove'](_0x49e0ee['element']),this['focusables']['remove'](_0x49e0ee);for(const _0x2120ba of _0x5bc497['added'])this['focusTracker']['add'](_0x2120ba['element']),this['_updateItemPositionInFocusables'](_0x2120ba);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x2fc3e8){const _0xa1339b=this['focusables']['getIndex'](_0x2fc3e8);let _0x272be2,_0x5e55ab;for(const _0x2dfbe6 of this['focusables'])if(_0x2fc3e8['top']<_0x2dfbe6['top']){_0x272be2=_0x2dfbe6;break;}if(_0x5e55ab=_0x272be2?this['focusables']['getIndex'](_0x272be2):this['focusables']['length'],-0x1!==_0xa1339b){if(_0xa1339b===_0x5e55ab-0x1)return;this['focusables']['remove'](_0x2fc3e8),_0x5e55ab=_0x272be2?this['focusables']['getIndex'](_0x272be2):this['focusables']['length'];}this['focusables']['add'](_0x2fc3e8,_0x5e55ab);}}const Ot=/* #__PURE__ -- @preserve */
33
+ Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x34ff87){super(_0x34ff87),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x56c9b3,_0x5678b1)=>_0x56c9b3+_0x5678b1),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x29949e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x29949e['to']('isAnimationDisabled',_0x36f57f=>_0x36f57f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x29949e['to']('top',_0x4bc094=>Ot(_0x4bc094))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x496084=this['element']['clientHeight'];_0x496084&&(this['height']=_0x496084);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x5118e4{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4949d8){super(_0x4949d8),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 _0x50436a=this['context']['config']['get']('sidebar.container');_0x50436a&&this['setContainer'](_0x50436a);}['setContainer'](_0x5de576){if(!g(_0x5de576))throw new _0x14d322('sidebar-setcontainer-invalid-element');this['container']=_0x5de576;}['_attachToContainer']({viewClass:_0x30293c='',spaceBetweenItems:_0x4f8f79=0x19}={}){if(!g(this['container']))throw new _0x14d322('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x30293c,this['_spaceBetweenItems']=_0x4f8f79;}['rearrange']({removedAnnotation:_0xad97e2,previousAnnotation:_0x321bd2,nextAnnotation:_0x43e3b9}){const _0x193f89=this['getSidebarItemView'](_0xad97e2);this['view']['list']['remove'](_0x193f89),this['_destroySidebarItemView'](_0xad97e2),_0x321bd2&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x321bd2)),_0x43e3b9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x43e3b9)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5d5680,activatedAnnotation:_0x2ceb63,disableAnimationOnActivatedAnnotation:_0x1033e4}){if(this['_activeAnnotation']=_0x2ceb63,_0x5d5680){_0x5d5680['isActive']=!0x1;const _0x4c8e54=this['getSidebarItemView'](_0x5d5680);_0x4c8e54&&_0x1033e4&&(_0x4c8e54['isAnimationDisabled']=!0x1);}if(_0x2ceb63){const _0x5a5008=this['getSidebarItemView'](_0x2ceb63);_0x5a5008&&(_0x2ceb63['isActive']=!0x0,_0x1033e4&&(_0x5a5008['isAnimationDisabled']=!0x0,_0x5a5008['top']+=0x1),this['_alignToTargetRect'](_0x5a5008));}}['_detachFromContainer'](_0x8f76b6){if(this['view']['element']['remove'](),_0x8f76b6){for(const _0x598d0b of _0x8f76b6)this['_destroySidebarItemView'](_0x598d0b);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5aee28,_0xee1a46){_0xee1a46||(_0xee1a46=_0x5aee28['view']);const _0x4c2e51=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4c2e51,_0x5aee28),this['_annotationToSidebarItemView']['set'](_0x5aee28,_0x4c2e51),_0x4c2e51['content']['add'](_0xee1a46),this['listenTo'](_0x5aee28['view'],'change:targetRect',(_0x578925,_0x464e5c,_0x4d80f8)=>{const _0xff5213=this['_getTargetTop'](_0x5aee28,_0x4d80f8);_0x4c2e51['_targetTop']!=_0xff5213&&(_0x4c2e51['_targetTop']=_0xff5213,this['_setItemTop'](_0x4c2e51,_0xff5213));}),this['listenTo'](_0x4c2e51,'change:top',()=>{this['_recalculate'](_0x4c2e51,'top');}),this['listenTo'](_0x4c2e51,'change:bottom',()=>{this['_recalculate'](_0x4c2e51,'bottom');}),this['_alignToTargetRect'](_0x4c2e51);const _0x3e421d=this['_getItemBefore'](_0x4c2e51);if(_0x3e421d)this['_alignAfterItem'](_0x3e421d,_0x4c2e51)||this['_alignToTargetRect'](_0x4c2e51);else this['_alignToTargetRect'](_0x4c2e51);return this['_updateLastItem'](),this['view']['list']['add'](_0x4c2e51),_0x4c2e51;}['_alignForTopChange'](_0x1bb9ad){if(!_0x1bb9ad['content']['length'])return;const _0x3c6f20=this['_getItemBefore'](_0x1bb9ad);if(!_0x3c6f20)return;const _0x1d6be1=this['_sidebarItemViewToAnnotation']['get'](_0x3c6f20),_0x5c6046=this['_activeAnnotation'];_0x5c6046&&_0x5c6046===_0x1d6be1?this['_alignAfterItem'](_0x3c6f20,_0x1bb9ad):this['_alignBeforeItem'](_0x1bb9ad,_0x3c6f20);}['_alignForBottomChange'](_0x4b0e09){if(!_0x4b0e09['content']['length'])return;const _0x26bc40=this['_getItemAfter'](_0x4b0e09);if(!_0x26bc40)return;const _0x5c4f35=this['_sidebarItemViewToAnnotation']['get'](_0x26bc40),_0x3304f2=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x17ab31=this['_activeAnnotation'];_0x17ab31&&_0x17ab31===_0x5c4f35&&_0x3304f2?(this['_alignBeforeItem'](_0x26bc40,_0x4b0e09),this['_alignAfterItem'](_0x4b0e09,_0x26bc40)):_0x17ab31&&_0x17ab31===_0x5c4f35?this['_alignBeforeItem'](_0x26bc40,_0x4b0e09):this['_alignAfterItem'](_0x4b0e09,_0x26bc40);}['_recalculate'](_0x2e2c71,_0x77df87){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x25424e,changedProp:_0x16d1ff}of this['_recalculateBuffer'])'top'===_0x16d1ff?this['_alignForTopChange'](_0x25424e):this['_alignForBottomChange'](_0x25424e);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2e2c71,'changedProp':_0x77df87});}['getSidebarItemView'](_0x1b2e8a){return this['_annotationToSidebarItemView']['get'](_0x1b2e8a);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1d4177){const _0x506e95=this['getSidebarItemView'](_0x1d4177);this['stopListening'](_0x506e95),this['stopListening'](_0x1d4177['view']),_0x506e95['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1d4177),this['_sidebarItemViewToAnnotation']['delete'](_0x506e95);}['_createSidebarView'](){const _0x2f5b40=new H(this['context']['locale']);return _0x2f5b40['render'](),this['on']('change:_lastItem',(_0xdb9c7e,_0x47b7af,_0x53eb7d,_0x9bec1c)=>{_0x9bec1c&&_0x2f5b40['unbind']('minHeight'),_0x53eb7d?_0x2f5b40['bind']('minHeight')['to'](_0x53eb7d,'bottom'):_0x2f5b40['minHeight']=null;}),_0x2f5b40;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3e4a4f){const _0x44418d=this['_sidebarItemViewToAnnotation']['get'](_0x3e4a4f),_0x5416a7=_0x44418d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x44418d)-0x1);return _0x5416a7&&this['getSidebarItemView'](_0x5416a7)||null;}['_getItemAfter'](_0x275f46){const _0x18307d=this['_sidebarItemViewToAnnotation']['get'](_0x275f46),_0x42c50e=_0x18307d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x18307d)+0x1);return _0x42c50e&&this['getSidebarItemView'](_0x42c50e)||null;}['_alignBeforeItem'](_0x26218f,_0x791ba0){_0x26218f['updateHeight']();const _0x5f37f6=G(_0x791ba0['bottom']+this['_spaceBetweenItems'],_0x26218f['top']);return!!_0x5f37f6&&(this['_setItemTop'](_0x791ba0,_0x791ba0['top']-_0x5f37f6),!0x0);}['_alignAfterItem'](_0x3a7536,_0x413de7){_0x3a7536['updateHeight']();const _0x35b064=G(_0x3a7536['bottom']+this['_spaceBetweenItems'],_0x413de7['top']);return!!_0x35b064&&(this['_setItemTop'](_0x413de7,_0x413de7['top']+_0x35b064,!0x1),!0x0);}['_alignToTargetRect'](_0x491e0c){const _0x226aff=this['_sidebarItemViewToAnnotation']['get'](_0x491e0c);if(!_0x226aff||!_0x226aff['target']||!_0x226aff['targetRect'])return;const _0x6f4968=this['_getTargetTop'](_0x226aff,_0x226aff['targetRect']);this['_setItemTop'](_0x491e0c,_0x6f4968);}['_getTargetTop'](_0x567c53,_0x12b869){if(null===_0x12b869)return 0x0;if(_0x567c53['target']instanceof _0x4a235e)return _0x12b869['top'];{const _0xe79caa=new _0x4a235e(this['view']['element'])['top'];return _0x12b869['top']-_0xe79caa;}}['_setItemTop'](_0x47aa6b,_0x39eaba,_0x2e0d3a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2e0d3a&&(_0x39eaba=Math['max'](_0x39eaba,this['_getMaxAvailableTop'](_0x47aa6b))),_0x47aa6b['top']=_0x39eaba;}['_getMaxAvailableTop'](_0x338f8b){let _0x159fb8=this['_getItemBefore'](_0x338f8b),_0x3aa391=0x0;for(;_0x159fb8;)_0x159fb8['updateHeight'](),_0x3aa391+=this['_spaceBetweenItems']+_0x159fb8['height'],_0x159fb8=this['_getItemBefore'](_0x159fb8);return _0x3aa391;}}function G(_0xd1b662,_0x4c9b04){return Math['max'](_0xd1b662-_0x4c9b04,0x0);}function g(_0x5890a8){return null!==_0x5890a8&&'object'==typeof _0x5890a8&&0x1===_0x5890a8['nodeType'];}class e extends _0x5118e4{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56fb1f){super(_0x56fb1f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4c94f2(),this['_refreshPositioningDebounced']=_0x59bbc8(()=>{_0x56fb1f['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3e8cec=this['context']['plugins']['get'](j),_0x9327ac=this['context']['plugins']['get'](z);_0x3e8cec['register']('wideSidebar',this),_0x9327ac['container']&&_0x3e8cec['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5b5a6f){if(_0x5b5a6f===this['activeAnnotation'])return;const _0x23ad71=this['context']['plugins']['get'](z);_0x23ad71['_activeAnnotation']=_0x5b5a6f;const _0x59eed0=this['activeAnnotation'];_0x23ad71['refresh']({'blurredAnnotation':_0x59eed0,'activatedAnnotation':_0x5b5a6f}),this['activeAnnotation']=_0x5b5a6f;}['attach'](_0x3bd07b){this['annotations']=_0x3bd07b;const _0x2c9f9a=this['context']['plugins']['get'](z);if(_0x2c9f9a['_annotations']=_0x3bd07b,this['isAttached'])throw new _0x14d322('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2c9f9a,'set:container',()=>{this['detach'](),this['listenTo'](_0x2c9f9a,'change:container',_0x17ef7c=>{_0x17ef7c['off'](),this['attach'](_0x3bd07b);});}),_0x2c9f9a['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x6ac188=_0x304352=>{_0x304352['updateTargetRect'](),_0x2c9f9a['addAnnotation'](_0x304352);};for(const _0x5b4b76 of _0x3bd07b)_0x6ac188(_0x5b4b76);this['listenTo'](_0x3bd07b,'add',(_0x46cc0c,_0x21055d)=>{_0x6ac188(_0x21055d);}),this['listenTo'](_0x3bd07b,'remove',(_0x3858e0,_0x159cac,_0x27616d)=>{_0x2c9f9a['rearrange']({'removedAnnotation':_0x159cac,'previousAnnotation':_0x3bd07b['get'](_0x27616d-0x1),'nextAnnotation':_0x3bd07b['get'](_0x27616d+0x1)}),_0x159cac===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3bd07b,'focus',(_0x118934,_0x226e2e)=>{this['setActiveAnnotation'](_0x226e2e);}),this['listenTo'](_0x3bd07b,'blur',()=>{this['setActiveAnnotation'](null);});const _0x437634=this['context']instanceof _0x9cd991?this['context']['editors']:new _0x4c94f2([this['context']]);for(const _0x554907 of _0x437634)this['_integrateWithEditorAnnotations'](_0x554907);this['listenTo'](_0x437634,'add',(_0x429bec,_0x4424c9)=>{this['listenTo'](_0x4424c9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4424c9);});}),this['listenTo'](_0x437634,'remove',(_0x332791,_0x3c80ed)=>{_0x3c80ed['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3c80ed['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x14d322('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x213087=this['context']['plugins']['get'](z);_0x213087['_detachFromContainer'](this['annotations']),this['stopListening'](_0x213087),this['stopListening'](this['annotations']),this['context']instanceof _0x9cd991&&this['stopListening'](this['context']['editors']);for(const _0x13d309 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x13d309);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x21eced){if(!_0x21eced['plugins']['has']('EditorAnnotations'))return;const _0xa54c2d=_0x21eced['plugins']['get']('EditorAnnotations'),_0x216b1d=()=>{const _0x4c12cb=_0xa54c2d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4c12cb[0x0]||null);};this['listenTo'](_0xa54c2d,'refresh',_0x216b1d),this['listenTo'](_0xa54c2d,'blur',(_0x44384f,{isAnnotationTracked:_0x5b3401})=>{this['activeAnnotation']&&_0x5b3401(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xa54c2d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3d1899=>{_0xa54c2d['hasDomSelection']()&&(_0x216b1d(),_0x3d1899['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xa54c2d);}['_destroyEditorAnnotationsIntegration'](_0x186d0a){this['stopListening'](_0x186d0a),this['_editorAnnotations']['remove'](_0x186d0a);}}class C extends _0xd97268{['counterView'];constructor(_0x4afe72){super(_0x4afe72);const _0x20c9b8=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x29405b,_0x5924e5)=>_0x29405b?'...':_0x5924e5['toString']()),this['set']('annotationType',''),this['icon']=_0x3dc0ca,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x20c9b8['to']('annotationType',_0x18a2d4=>'ck-annotation-counter__badge--'+_0x18a2d4),_0x20c9b8['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x20c9b8['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x5118e4{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x14db42){super(_0x14db42),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x27c92b())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4c94f2(),this['_refreshPositioningDebounced']=_0x59bbc8(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2529d9(this['context']['locale']),this['balloonPanelView']=new _0x1d9749(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x12a4ec){this['annotations']=_0x12a4ec;const _0x4740f8=this['context']['plugins']['get'](z),_0x405fbf=this['balloonPanelView'];if(_0x4740f8['_annotations']=_0x12a4ec,this['isAttached'])throw new _0x14d322('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4740f8,'set:container',()=>{this['detach'](),this['listenTo'](_0x4740f8,'change:container',_0xb32487=>{_0xb32487['off'](),this['attach'](_0x12a4ec);});}),_0x4740f8['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x457491=_0x5b7b6a=>{const _0x28dfd8=new C(this['context']['locale']);_0x4740f8['addAnnotation'](_0x5b7b6a,_0x28dfd8),this['_annotationToNarrowView']['set'](_0x5b7b6a,_0x28dfd8),_0x28dfd8['bind']('isDirty','annotationType','number')['to'](_0x5b7b6a['view'],'isDirty','type','length'),_0x28dfd8['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x405fbf['content']['first']!==_0x5b7b6a['view']?(this['_showBalloon'](_0x5b7b6a),_0x5b7b6a['view']['element']['focus'](),this['setActiveAnnotation'](_0x5b7b6a)):this['setActiveAnnotation'](null);});};for(const _0x1885a0 of _0x12a4ec)_0x457491(_0x1885a0);this['listenTo'](_0x12a4ec,'add',(_0x31535e,_0x3faced)=>{_0x457491(_0x3faced);}),this['listenTo'](_0x12a4ec,'remove',(_0x3474e2,_0x4175da,_0x46b5dd)=>{this['_annotationToNarrowView']['get'](_0x4175da)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4175da),_0x4740f8['rearrange']({'removedAnnotation':_0x4175da,'previousAnnotation':_0x12a4ec['get'](_0x46b5dd-0x1),'nextAnnotation':_0x12a4ec['get'](_0x46b5dd+0x1)}),_0x4175da===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x12a4ec,'focus',(_0x26a07a,_0x4dc5e7)=>{this['setActiveAnnotation'](_0x4dc5e7);}),this['listenTo'](_0x12a4ec,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x470d7f,_0x2b6229)=>{_0x2b6229['keyCode']===_0x4fa850['esc']&&_0x405fbf['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x405fbf['content']['first']),this['_hideBalloon'](),_0x2b6229['stopPropagation'](),_0x2b6229['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x163cf3,_0x508e42)=>{const _0x4afa60=_0x508e42['target'];_0x405fbf['isVisible']&&_0x405fbf['element']['contains'](_0x4afa60)||_0x4740f8['view']['element']['contains'](_0x4afa60)||_0x163cf3['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1aea03=>_0x1aea03['contains'](_0x4afa60))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x937554=this['context']instanceof _0x9cd991?this['context']['editors']:new _0x4c94f2([this['context']]);for(const _0x3a583d of _0x937554)this['_integrateWithEditorAnnotations'](_0x3a583d);this['listenTo'](_0x937554,'add',(_0x55ba34,_0x477a2f)=>{this['listenTo'](_0x477a2f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x477a2f);});}),this['listenTo'](_0x937554,'remove',(_0x4b50e9,_0x420d72)=>{_0x420d72['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x420d72['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5637de){if(_0x5637de===this['activeAnnotation'])return;const _0x304a22=this['context']['plugins']['get'](z);if(_0x304a22['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5637de,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5637de)_0x304a22['getSidebarItemView'](_0x5637de)?this['_showBalloon'](_0x5637de):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5637de;}['detach'](){if(!this['isAttached'])throw new _0x14d322('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x50b02f=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3a959c=>_0x3a959c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x50b02f['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x9cd991&&this['stopListening'](this['context']['editors']);for(const _0x5e27c0 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5e27c0);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'](_0xcdd9ca){if(!_0xcdd9ca['plugins']['has']('EditorAnnotations'))return;const _0x81016b=_0xcdd9ca['plugins']['get']('EditorAnnotations'),_0xd4aaa5=this['context']['plugins']['get'](z),_0xa67022=this['annotations'],_0x6c6faf=this['balloonPanelView'],_0x370f4a=()=>{const _0x53ed6f=_0x81016b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x53ed6f),this['setActiveAnnotation'](_0x53ed6f[0x0]||null);};this['listenTo'](_0x81016b,'refresh',_0x370f4a),this['listenTo'](_0x81016b,'blur',(_0x310238,{isAnnotationTracked:_0x2bf24b})=>{this['activeAnnotation']&&_0x2bf24b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x81016b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xa67022,'blur',_0x362c81=>{_0x81016b['hasDomSelection']()&&_0x362c81['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x467954,_0x5aeb26)=>{const _0x28788f=_0x5aeb26['target'];_0x6c6faf['isVisible']&&_0x6c6faf['element']['contains'](_0x28788f)||_0xd4aaa5['view']['element']['contains'](_0x28788f)||this['activeAnnotation']&&_0x81016b['hasDomSelection']()&&(_0x370f4a(),_0x467954['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x81016b);}['_destroyEditorAnnotationsIntegration'](_0x1eb800){_0x1eb800&&(this['stopListening'](_0x1eb800),this['_editorAnnotations']['remove'](_0x1eb800));}['_setSelectedAnnotations'](_0x4cbb7b){for(const _0xb55aa5 of this['_selectedAnnotations'])_0x4cbb7b['includes'](_0xb55aa5)||this['_manuallyClosedAnnotationViews']['delete'](_0xb55aa5['view']);this['_selectedAnnotations']=_0x4cbb7b;}['_refreshPositioning'](){const _0x2465b8=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x2465b8['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4ce084){if(this['_manuallyClosedAnnotationViews']['has'](_0x4ce084['view']))return;const _0x32a7c4=this['balloonPanelView']['content']['first'];_0x32a7c4!==_0x4ce084['view']?(_0x32a7c4&&this['_detachListeners'](_0x32a7c4),this['_attachListeners'](_0x4ce084['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4ce084['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2c431a=this['balloonPanelView']['content']['first'],_0x1b3e46=_0x2c431a&&this['annotations']['getByView'](_0x2c431a);if(!_0x1b3e46||!this['_annotationToNarrowView']['has'](_0x1b3e46))return;const _0xe1663a=this['_annotationToNarrowView']['get'](_0x1b3e46)['element'],_0xd4dc87=(function(){const _0x463dec=_0x1d9749['defaultPositions'];return[_0x463dec['southArrowNorthEast'],_0x463dec['northArrowSouthEast'],_0x463dec['southArrowNorth'],_0x463dec['northArrowSouth'],_0x463dec['southArrowNorthWest'],_0x463dec['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xe1663a,'positions':_0xd4dc87});}['_hideBalloon'](){const _0x4579e6=this['balloonPanelView'],_0x5e3374=_0x4579e6['content']['first'];_0x5e3374&&(this['_detachListeners'](_0x5e3374),_0x4579e6['unpin'](),_0x4579e6['content']['clear']());}['_attachListeners'](_0x463bfb){this['listenTo'](_0x463bfb,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x463bfb,'Esc',(_0x429321,_0x105f72)=>{this['_manuallyClosedAnnotationViews']['add'](_0x463bfb),this['_hideBalloon'](),_0x105f72();});}['_detachListeners'](_0x50d01f){this['stopListening'](_0x50d01f);}}class c extends _0x1a8a89{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x18064d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2911d7){super(_0x2911d7),_0x2911d7['editing']['view']['addObserver'](_0xa02bd3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2911d7['plugins']['get'](_0x18064d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x36b1ae=this['editor']['plugins']['get'](j);_0x36b1ae['context']===this['editor']&&(_0x36b1ae['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x16d32f,_0x54ad2b)=>{const _0x2812a8=this['_balloon'];if(this['isAttached']&&_0x2812a8['visibleView']){const _0x137f03=this['annotations']['getByView'](_0x2812a8['visibleView']);_0x137f03&&this['_closeAnnotation'](_0x137f03),_0x54ad2b();}}));}['afterInit'](){const _0x1efcc0=this['editor']['plugins']['get'](j);_0x1efcc0['context']===this['editor']&&(_0x1efcc0['hasActive']()||_0x1efcc0['switchTo']('inline'));}['setActiveAnnotation'](_0x437229){_0x437229!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x437229&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x437229)&&this['_addAnnotationToBalloon'](_0x437229,!0x0),_0x437229['isActive']=!0x0),_0x437229||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x437229);}['attach'](_0xe2c6fe){this['annotations']=_0xe2c6fe;const _0x3f3294=this['editor']['plugins']['get'](j),_0x586c2f=this['_balloon'];if(this['isAttached'])throw new _0x14d322('inlineannotations-attach-already-attached',this);if(_0x3f3294['context']!==this['editor'])throw new _0x14d322('inlineannotations-not-allowed-with-context',this);const _0x20b135=this['editor']['plugins']['get'](b);this['listenTo'](_0x20b135,'refresh',()=>{const _0x431b20=_0x20b135['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1c81cf,_0x5c16d9;!this['_forceRefresh']&&(_0x1c81cf=_0x431b20,_0x5c16d9=this['_selectedAnnotations'],_0x1c81cf['length']===_0x5c16d9['length']&&_0x1c81cf['every'](_0x5884d5=>_0x5c16d9['includes'](_0x5884d5)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x431b20),this['setActiveAnnotation'](_0x431b20[0x0]||null));}),this['listenTo'](_0x20b135,'blur',(_0x5a7ebf,{isAnnotationTracked:_0xbcf130})=>{this['activeAnnotation']&&_0xbcf130(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x34f20a,_0x3f4fd5,_0x30f376)=>{_0x30f376||this['setActiveAnnotation'](null);}),this['listenTo'](_0xe2c6fe,'remove',(_0x1624f7,_0x2d18bf)=>{this['_removeAnnotationFromBalloon'](_0x2d18bf),_0x2d18bf===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x586c2f,'change:visibleView',(_0x5e7094,_0x338e78,_0x7c141,_0x284747)=>{_0x284747&&this['stopListening'](_0x284747);const _0x38bc27=_0xe2c6fe['getByView'](_0x7c141);_0x7c141&&_0x38bc27&&(this['listenTo'](_0x7c141,'change:height',()=>{_0x586c2f['updatePosition']();}),this['listenTo'](_0x7c141,'Esc',()=>{this['_closeAnnotation'](_0x38bc27),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x38bc27&&this['setActiveAnnotation'](_0x38bc27));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x586c2f['visibleView']&&(_0xe2c6fe['getByView'](_0x586c2f['visibleView'])&&_0x586c2f['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 _0x14d322('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x157a02 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x157a02);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x224f4a){for(const _0x1122f of this['_selectedAnnotations'])_0x224f4a['includes'](_0x1122f)||this['_manuallyClosed']['delete'](_0x1122f);for(const _0x2c5a48 of this['annotations'])_0x224f4a['includes'](_0x2c5a48)||this['_removeAnnotationFromBalloon'](_0x2c5a48);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x31a043 of _0x224f4a)this['_addAnnotationToBalloon'](_0x31a043);}this['_selectedAnnotations']=_0x224f4a;}['_addAnnotationToBalloon'](_0x4492c9,_0x11c8ac=!0x1){this['_manuallyClosed']['has'](_0x4492c9)||(this['_addedAnnotations']['has'](_0x4492c9)||this['_balloon']['hasView'](_0x4492c9['view'])||(this['_addedAnnotations']['add'](_0x4492c9),this['_balloon']['add']({'stackId':_0x4492c9['view']['id'],'view':_0x4492c9['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4492c9)}})),_0x11c8ac&&this['_balloon']['showStack'](_0x4492c9['view']['id']));}['_getBalloonTargetForAnnotation'](_0x10ea28){const _0x3b109d=_0x10ea28['target'],_0x1a665e=this['editor']['editing']['view'],_0x1fc86e=_0x1a665e['document']['selection']['getFirstRange'](),_0x4c0c92=_0x1a665e['domConverter']['viewRangeToDom'](_0x1fc86e);if(_0x4c0c92['collapse'](!0x0),_0x3b109d){if(_0x3b109d instanceof _0x4a235e)return _0x3b109d;let _0x1c3701=[];for(const _0x842595 of _0x3b109d)_0x1c3701['push'](...F(_0x842595['getClientRects']()));_0x1c3701=function(_0x3636cc){const _0x1dd8e6=[];let _0x58dfe8=_0x3636cc[0x0];for(let _0x122512=0x1;_0x122512<_0x3636cc['length'];_0x122512++)P(_0x58dfe8,_0x3636cc[_0x122512])?_0x58dfe8['width']+=_0x3636cc[_0x122512]['width']:(_0x1dd8e6['push'](_0x58dfe8),_0x58dfe8=_0x3636cc[_0x122512]);return _0x1dd8e6['push'](_0x58dfe8),_0x1dd8e6;}(_0x1c3701);const _0x5bd08b=_0x4c0c92['getBoundingClientRect']();return _0x1c3701['find'](_0x4373c8=>_0x4373c8['top']<=_0x5bd08b['top']&&_0x4373c8['bottom']>=_0x5bd08b['bottom']&&_0x4373c8['left']<=_0x5bd08b['left']&&_0x4373c8['right']>=_0x5bd08b['right'])||_0x1c3701[0x0];}return _0x10ea28['targetRect']||_0x4c0c92;}['_removeAnnotationFromBalloon'](_0xc39742){this['_addedAnnotations']['has'](_0xc39742)&&this['_balloon']['hasView'](_0xc39742['view'])&&(this['_addedAnnotations']['delete'](_0xc39742),this['_balloon']['remove'](_0xc39742['view']));}['_closeAnnotation'](_0xb65da4){this['_manuallyClosed']['add'](_0xb65da4),this['_removeAnnotationFromBalloon'](_0xb65da4);}}function F(_0x586fe9){return Array['from'](_0x586fe9)['map'](DOMRect['fromRect']);}function P(_0x4af893,_0x33bd03){return _0x4af893['top']===_0x33bd03['top']&&_0x4af893['bottom']===_0x33bd03['bottom']&&_0x4af893['right']===_0x33bd03['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x46765b,_0xcf3e65){super(_0x46765b),this['set']('isEmpty',!_0xcf3e65['length']),this['focusTracker']=new _0xcadfab(),this['_annotationViews']=_0xcf3e65,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x591d39({'focusables':_0xcf3e65,'focusTracker':this['focusTracker']}),this['listenTo'](_0xcf3e65,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0xcf3e65,'remove',(_0x173e03,_0x5bf7f4)=>{_0x5bf7f4['isActive']&&this['focus'](),_0xcf3e65['length']||(this['isEmpty']=!0x0);});const _0x8a52d2=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x46765b,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0xcf3e65},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x8a52d2['if']('isEmpty','ck-hidden',_0x41679d=>!_0x41679d)]},'children':[{'text':N(_0x46765b,'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 _0x1ce70e of this['_annotationViews'])this['focusTracker']['add'](_0x1ce70e['element']);this['_annotationViews']['on']('change',(_0x5df1cd,{added:_0x242a4c,removed:_0x3be6c7})=>{for(const _0x393edc of _0x242a4c)this['focusTracker']['add'](_0x393edc['element']);for(const _0x6a7981 of _0x3be6c7)this['focusTracker']['remove'](_0x6a7981['element']);});}}class p extends _0x5118e4{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x51738b){super(_0x51738b),this['archivedThreads']=new _0x4c94f2();}['init'](){const _0x33c5ac=this['context'],_0x208742=_0x33c5ac['plugins']['get'](o),_0x32a9d8=_0x33c5ac['plugins']['get'](y);this['listenTo'](_0x208742,'addCommentThread',(_0x14145b,{threadId:_0x434292})=>{const _0xbdf9eb=_0x208742['getCommentThread'](_0x434292);_0xbdf9eb['archivedAt']&&this['archivedThreads']['add'](_0xbdf9eb,this['_calculatePosition'](_0xbdf9eb['archivedAt'])),this['listenTo'](_0xbdf9eb,'change:archivedAt',(_0x5a23ed,_0x3c03ea,_0x1519df)=>{_0x1519df?this['archivedThreads']['has'](_0xbdf9eb)||this['archivedThreads']['add'](_0xbdf9eb,this['_calculatePosition'](_0xbdf9eb['archivedAt'])):this['archivedThreads']['has'](_0xbdf9eb)&&this['archivedThreads']['remove'](_0xbdf9eb);});}),this['listenTo'](_0x208742,'removeCommentThread',(_0xf5fe6f,{threadId:_0x40bcc6})=>{const _0x437a97=_0x208742['getCommentThread'](_0x40bcc6);this['stopListening'](_0x437a97),this['archivedThreads']['has'](_0x437a97)&&this['archivedThreads']['remove'](_0x437a97);},{'priority':'highest'}),this['listenTo'](_0x32a9d8['collection'],'focus',(_0x35cd6f,_0x61a962)=>{_0x61a962['isVisible']||(_0x61a962['isActive']=!0x0,_0x32a9d8['activate'](_0x61a962));});}['_calculatePosition'](_0x544fd3){const _0x4cb44b=[...this['archivedThreads']]['findIndex'](_0x230274=>_0x230274['archivedAt']<_0x544fd3);return _0x4cb44b>-0x1?_0x4cb44b:this['archivedThreads']['length'];}}class a extends _0x1a8a89{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x2a3d54];}constructor(_0x4236be){super(_0x4236be),this['annotationViews']=new _0x147aaa(),this['_pendingThreads']=[];}['init'](){const _0x4c7335=this['editor'],_0x3ce37b=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4c7335['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xd97268,!0x0)),_0x4c7335['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4b0478=this['_createCommentsArchiveButton'](_0xf18d98);return _0x4b0478['set']({'role':'menuitemcheckbox'}),_0x4b0478;});const _0xca71a4=_0x4c7335['plugins']['get'](p),_0x684188=_0x4c7335['plugins']['get']('Annotations'),_0x51a91b=_0x4c7335['plugins']['get']('CommentsRepository');_0xca71a4['archivedThreads']['forEach'](_0x57c4fa=>{this['_handleNewThread'](_0x57c4fa);}),this['listenTo'](_0xca71a4['archivedThreads'],'add',(_0x717ced,_0x251994)=>{this['_handleNewThread'](_0x251994);}),this['listenTo'](_0x684188['collection'],'add',(_0x16db4b,_0x4c5a37)=>{const _0x4ef6a9=this['_pendingThreads']['find'](_0x2f4be5=>{const _0x1977dd=_0x51a91b['_threadToController']['get'](_0x2f4be5);return _0x1977dd&&_0x4c5a37['innerView']===_0x1977dd['view'];});if(_0x4ef6a9){const _0x585a1e=this['_calculatePosition'](_0x4ef6a9['archivedAt']);this['_addAnnotationToArchive'](_0x4c5a37,_0x585a1e),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4ef6a9),0x1);}}),this['listenTo'](_0xca71a4['archivedThreads'],'remove',(_0x3671d8,_0x59a89b)=>{const _0xaad188=_0x4c7335['config']['get']('collaboration.channelId');if(!_0xaad188||_0x59a89b['channelId']===_0xaad188){if(this['_pendingThreads']['includes'](_0x59a89b))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x59a89b),0x1);else{const _0x3c4eb2=_0x51a91b['_threadToController']['get'](_0x59a89b),_0x14eaaa=_0x684188['getByInnerView'](_0x3c4eb2['view']);this['annotationViews']['remove'](_0x14eaaa['view']),this['stopListening'](_0x14eaaa),this['stopListening'](_0x14eaaa['focusableElements']);}}}),this['listenTo'](_0x684188['collection'],'add',(_0x510605,_0x2089f6)=>{this['listenTo'](_0x2089f6,'escape',_0x3ce37b);}),this['listenTo'](_0x684188['collection'],'remove',(_0x28eea,_0xa6f8e7)=>{this['stopListening'](_0xa6f8e7,'escape',_0x3ce37b);});}['_addAnnotationToArchive'](_0x590b14,_0x45012a){this['listenTo'](_0x590b14,'set:isVisible',_0x2eae2c=>{_0x2eae2c['return']=!0x1,_0x2eae2c['stop']();}),this['annotationViews']['add'](_0x590b14['view'],_0x45012a);}['_handleNewThread'](_0x3a4daa){const _0x25f558=this['editor']['plugins']['get']('CommentsRepository'),_0x126fd2=this['editor']['plugins']['get']('Annotations'),_0x3b97d=this['editor']['config']['get']('collaboration.channelId');if(!_0x3b97d||_0x3a4daa['channelId']===_0x3b97d){const _0x1dc356=_0x25f558['_threadToController']['get'](_0x3a4daa);if(!_0x1dc356)return void this['_pendingThreads']['push'](_0x3a4daa);const _0x44accc=this['_calculatePosition'](_0x3a4daa['archivedAt']),_0x1ee398=_0x126fd2['getByInnerView'](_0x1dc356['view']);_0x1ee398['isVisible']&&_0x126fd2['_visibleAnnotations']['remove'](_0x1ee398),this['_addAnnotationToArchive'](_0x1ee398,_0x44accc);}}['_calculatePosition'](_0xa25b40){const _0x58c336=this['editor']['config']['get']('collaboration.channelId'),_0x1d880d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x51ca49=>_0x51ca49['channelId']===_0x58c336)['findIndex'](_0x12c33d=>_0x12c33d['archivedAt']<_0xa25b40);return _0x1d880d<0x0||_0x1d880d>this['annotationViews']['length']?this['annotationViews']['length']:_0x1d880d-0x1;}['_toggleDialog'](){const _0x2871f3=this['editor'],_0x4a1fdd=_0x2871f3['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x2871f3['locale'],this['annotationViews'])),'commentsArchive'===_0x4a1fdd['id']?_0x4a1fdd['hide']():_0x4a1fdd['show']({'id':'commentsArchive','title':N(_0x2871f3['locale'],'COMMENTS_ARCHIVE'),'icon':_0x336738,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x151e91['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2262d5,_0x4e81ed=!0x1){const _0x1589af=this['editor']['locale'],_0x359788=this['editor']['plugins']['get']('Dialog'),_0x367563=new _0x2262d5(_0x1589af);return _0x367563['bind']('isEnabled')['to'](this,'isEnabled'),_0x367563['bind']('isOn')['to'](_0x359788,'id',_0x308c09=>'commentsArchive'===_0x308c09),_0x367563['set']({'label':N(_0x1589af,'COMMENTS_ARCHIVE'),'icon':_0x336738,'isToggleable':!0x0}),_0x4e81ed&&(_0x367563['tooltip']=!0x0),this['listenTo'](_0x367563,'execute',()=>this['_toggleDialog']()),_0x367563;}['_hideDialogOnAnnotationEscape']=_0x3e9dc2=>{const _0x123e22=_0x3e9dc2['source'];if(!this['annotationViews']['has'](_0x123e22['view']))return;const _0x8078ea=this['editor']['plugins']['get']('Dialog');_0x8078ea['isOpen']&&'commentsArchive'===_0x8078ea['id']&&(_0x8078ea['hide'](),_0x3e9dc2['stop']());};}class gi extends _0x1a8a89{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};