@ckeditor/ckeditor5-comments 47.6.0-alpha.0 → 47.6.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 +19 -19
  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 _0x5ceede,ContextPlugin as _0x603ec2,PendingActions as lt,Command as _0x47f0a2,Plugin as _0x4626af,Context as _0x53ff68}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x486827,uid as _0x8376f1,KeystrokeHandler as jt,FocusTracker as _0x2d4383,diff as _0x49d0d8,Collection as _0x2ba4d0,Rect as _0x1e3fe4,CKEditorError as _0x4482e2,first as _0x1ee127,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x535b73,keyCodes as _0x1e8e2a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3f12b2,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1d9dae,trimHtml as ts,LateFocusDropdownButtonView as _0x3bfc12,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x17a949}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x2a6dac}from'es-toolkit/compat';import{IconUndo as _0x1ee97c,IconCheck as _0x4d1b59,IconPencil as _0x1c565b,IconRemoveComment as _0x149cd7,IconThreeVerticalDots as _0xcf18b3,IconAddComment as _0x1d452d,IconCommentsArchive as _0x40f89d}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0xc7089f,ButtonView as _0x739e9c,ViewCollection as _0x102f07,createDropdown as _0xd8906c,ListView as _0x41457c,focusChildOnDropdownOpen as _0x1bbb62,ListItemView as _0x4488ae,MenuBarMenuListItemButtonView as _0x76ce93,BodyCollection as _0x30b4e7,BalloonPanelView as _0x5cbf50,ContextualBalloon as _0x56a9b4,Dialog as _0xccdd32,DialogViewPosition as _0x3b13b3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x4fddd0}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x5815b3}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x4a5a07}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
- _0x486827(){['model'];['view'];constructor(_0x31060d,_0x1c66ab){super(),this['model']=_0x31060d,this['model']['_isAttached']=!0x0,this['view']=_0x1c66ab,this['listenTo'](_0x1c66ab,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1c66ab,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1c66ab,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1c66ab,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1c66ab,'addComment',(_0x33e3dd,_0x4bbddb)=>this['addComment'](_0x4bbddb)),this['listenTo'](_0x1c66ab,'updateComment',(_0x43c56b,_0x298bb7,_0x5a6e3b)=>this['updateComment'](_0x298bb7,_0x5a6e3b)),this['listenTo'](_0x1c66ab,'removeComment',(_0x1e47a7,_0x2d6215)=>this['removeComment'](_0x2d6215));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1b4c8e){this['model']['addComment']({'content':_0x1b4c8e,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x28477d,_0x481b9a){this['model']['getComment'](_0x28477d)['update']({'content':_0x481b9a});}['removeComment'](_0x3f779d){this['model']['getComment'](_0x3f779d)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x52001,_0x5e8f45,_0xacfe6b){const t=_0x52001['t'];switch(_0x5e8f45){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'},_0xacfe6b);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'},_0xacfe6b);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'},_0xacfe6b);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'},_0xacfe6b);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0xacfe6b);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'},_0xacfe6b);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'},_0xacfe6b);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'},_0xacfe6b);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x508a03,_0x5ad93b){super(_0x508a03);const _0xd56665=_0x8376f1();this['main']=this['createCollection'](),this['editable']=new Vt(_0x508a03,_0x5ad93b,void 0x0,{'label':()=>N(_0x508a03,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x508a03['uiLanguageDirection'],'lang':_0x508a03['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xd56665},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x41bc5b){super(_0x41bc5b),this['view']=new Rt(_0x41bc5b['locale'],_0x41bc5b['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x5913cc=this['editor']['editing']['view'],_0x1a8ad7=this['view']['editable'],_0x51d20a=_0x5913cc['document']['getRoot']();_0x1a8ad7['name']=_0x51d20a['rootName'],this['view']['render']();const _0x13ab77=_0x1a8ad7['element'];this['setEditableElement'](_0x1a8ad7['name'],_0x13ab77),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5913cc['attachDomRoot'](_0x13ab77),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
- _0x486827(_0x5ceede){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
- ((()=>Qt)());constructor(_0x268145={}){function _0x24fb52(_0x42eefe){return _0x42eefe['map'](_0x949e81=>String['fromCharCode'](_0x949e81))['join']('');}(_0x268145=Object['assign']({},_0x268145))['plugins']||(_0x268145['plugins']=hs['defaultPlugins']),super(_0x268145),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x24fb52([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x24fb52([0x76,0x69,0x65,0x77])][_0x24fb52([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x24fb52([0x61,0x75,0x74,0x6f]),this[_0x24fb52([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x24fb52([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x24fb52([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x24fb52([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x24fb52([0x6f,0x6b])});}['create'](){const _0x425adf=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x425adf))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x13a9d1=>{const _0x52d429=this['model']['document']['getRoot'](),_0x24376b=_0x52d429&&_0x52d429['getChild'](_0x52d429['childCount']-0x1);_0x13a9d1['setSelection'](_0x24376b,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2c2361=this['editing']['view'],_0x4ce7e7=_0x2c2361['document']['getRoot'](),_0x13ea07=_0x4ce7e7['getChild'](0x0);_0x4ce7e7['childCount']>0x1||!_0x13ea07||'p'!=_0x13ea07['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x2c2361,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x13ea07['placeholder']=this['placeholder']),Ft({'view':_0x2c2361,'element':_0x13ea07,'keepOnFocus':!0x0}),this['placeholderElement']=_0x13ea07);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0xdc956d,_0x320126={}){super(_0xdc956d),this['editor']=null,this['_editorConfig']=_0x320126,this['set']('value',_0x320126['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0xdc956d,'Reply...')),this['set']('submitLabel',N(_0xdc956d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x2d4383(),this['focusCycler']=new _0xc7089f({'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',(_0x7a288f,_0x4c7818)=>{this['cancelButtonView']['fire']('execute'),_0x4c7818();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3dcf4e,_0x52e531)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x52e531());}),this['on']('submit',(_0x48f0e1,_0xd9399)=>{_0xd9399['length']>0xfde8?(alert(N(_0xdc956d,'TOO_LONG_COMMENT_ALERT',[_0xd9399['length'],0xfde8])),_0x48f0e1['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x549272=this['editor'];this['element']['insertBefore'](_0x549272['ui']['element'],this['element']['firstChild']),_0x549272['model']['document']['on']('change',()=>this['value']=_0x549272['getData']()),_0x549272['bind']('placeholder')['to'](this),this['focusables']['add'](_0x549272['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x598336){-0x1===_0x598336?(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:_0x67badd}=this,_0x3ba4db=new _0x739e9c(_0x67badd);return _0x3ba4db['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3ba4db['withText']=!0x0,_0x3ba4db['bind']('label')['to'](this,'submitLabel'),_0x3ba4db['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3ba4db['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x17fe89,_0x4b92e8)=>!_0x4b92e8&&!!_0x17fe89['trim']()),_0x3ba4db;}['_createCancelButton'](){const {locale:_0x5d1b80}=this,_0x3b6c8f=new _0x739e9c(_0x5d1b80);return _0x3b6c8f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3b6c8f['label']=N(_0x5d1b80,'Cancel'),_0x3b6c8f['withText']=!0x0,_0x3b6c8f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3b6c8f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4c42ed=>{this['focusTracker']['add'](_0x4c42ed['element']);}),this['focusables']['on']('change',(_0x25edb7,_0x64dd5e)=>{for(const _0x339f59 of Array['from'](_0x64dd5e['added'])['reverse']())this['focusTracker']['add'](_0x339f59['element']);});}}class ie extends kt{constructor(_0x1ef024,_0x3ff4b1,_0x43932d){super(_0x1ef024),this['commentInputView']=new es(_0x1ef024,_0x43932d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5b1ec9,_0x47c5ee)=>_0x5b1ec9||!!_0x47c5ee),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 _0x3f12b2(_0x1ef024,_0x3ff4b1),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'](_0x20c14f){this['commentInputView']['focus'](_0x20c14f);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x24aa29,_0x500e8c)=>{const {submitButtonView:_0x2acaf3,cancelButtonView:_0x3d92d0,editor:_0xb6f766}=this['commentInputView'];[_0x2acaf3['element'],_0x3d92d0['element'],_0xb6f766?_0xb6f766['editing']['view']['getDomRoot']():null]['filter'](_0x284eec=>_0x284eec)['some'](_0x1ffc5f=>_0x1ffc5f['contains'](_0x500e8c['target']))||(this['focus'](),_0x500e8c['preventDefault']());});}}class rs extends kt{constructor(_0x4d6733){super(_0x4d6733);const _0xe265c7=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0xe265c7['to']('count',_0xc0f1b8=>N(_0x4d6733,'NUMBER_OF_COMMENTS',_0xc0f1b8))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x33a957,_0x26aa57,_0x8bed70){super(_0x33a957);const _0x1cdb24=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x26aa57['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x26aa57,this['_config']=_0x8bed70,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2d4383(),this['keystrokes']=new jt(),this['focusCycler']=new _0xc7089f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x57ec04=>this['commentViews']['map'](_0x3765ef=>_0x3765ef['element'])['includes'](_0x57ec04['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x33a957),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xf707d6=>_0xf707d6-this['_config']['maxCommentsWhenCollapsed']);for(const _0x300143 of _0x26aa57['comments'])this['_handleNewCommentModel'](_0x300143);this['_handleInfoComment'](),this['listenTo'](_0x26aa57['comments'],'add',(_0x465f4b,_0xc9102)=>{const _0x2622bb=this['_calculatePosition'](_0xc9102);this['length']++,this['_handleNewCommentModel'](_0xc9102,_0x2622bb),this['refreshVisibleViews']();}),this['listenTo'](_0x26aa57['comments'],'remove',(_0x38f927,_0x356001)=>{this['length']--,this['_handleRemoveCommentModel'](_0x356001),this['refreshVisibleViews']();}),this['listenTo'](_0x26aa57,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x26aa57,'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',_0x1cdb24['if']('length','ck-hidden',_0x1ef51b=>!_0x1ef51b)],'aria-label':N(_0x33a957,'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'](_0x3469f6){-0x1===_0x3469f6?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x228d34 of this['commentViews'])_0x228d34['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x106a6f,_0x2008a5){const _0x31fd01=new this['_config']['CommentView'](this['locale'],_0x106a6f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x31fd01['viewUid']=_0x106a6f['id'],_0x31fd01['delegate']('removeComment')['to'](this),_0x31fd01['delegate']('updateComment')['to'](this),_0x31fd01['delegate']('resolveCommentThread')['to'](this),_0x31fd01['delegate']('editorReady')['to'](this),_0x31fd01['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x31fd01,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x31fd01,_0x2008a5);}['_calculatePosition'](_0x2d7c6a){const _0x1397e8=this['_model']['_findOptimalIndex'](_0x2d7c6a);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2d7c6a['authoredAt']?_0x1397e8-0x1:_0x1397e8:_0x1397e8-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x57bb05={'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'],_0x57bb05,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x57bb05));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1c22b2){const _0x334cfb=this['commentViews']['remove'](_0x1c22b2['id']);this['stopListening'](_0x334cfb),_0x334cfb['isEditMode']&&this['_updateHasDirtyComment'](),_0x334cfb['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0xf6c188=>_0xf6c188['isEditMode']);}['_rearrangeCollapse'](){const _0xac7d6a=function(_0x2e28b6){const _0x427e77=new _0x2ba4d0();for(const _0x22b2c6 of _0x2e28b6)_0x427e77['add'](_0x22b2c6);return _0x427e77;}(this['commentViews']),_0xe8c626=this['_collapsedCommentsView']['count'];for(let _0x44a2b7=0x1;_0x44a2b7<=_0xe8c626;_0x44a2b7++)_0xac7d6a['remove'](0x1);for(const _0x308dbb of _0xac7d6a)_0x308dbb['collapse']();_0xe8c626>0x0&&_0xac7d6a['add'](this['_collapsedCommentsView'],0x1),ns(_0x49d0d8(Array['from'](this['visibleViews']),Array['from'](_0xac7d6a)),this['visibleViews'],_0xac7d6a);}['_rearrangeExpand'](){ns(_0x49d0d8(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5d473b of this['visibleViews'])_0x5d473b['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x610fe9=>{this['focusTracker']['add'](_0x610fe9['element']),this['keystrokes']['listenTo'](_0x610fe9['element']);}),this['commentViews']['on']('change',(_0x303984,_0x102f08)=>{for(const _0x8fce67 of _0x102f08['removed'])this['focusTracker']['remove'](_0x8fce67['element']),this['keystrokes']['stopListening'](_0x8fce67['element']);for(const _0x1afc24 of Array['from'](_0x102f08['added'])['reverse']())this['focusTracker']['add'](_0x1afc24['element']),this['keystrokes']['listenTo'](_0x1afc24['element']);});}}function ns(_0x4a3039,_0x404a49,_0x3f06d0){let _0x280faf=0x0;for(const _0xc42c86 of _0x4a3039)switch(_0xc42c86){case'insert':_0x404a49['add'](_0x3f06d0['get'](_0x280faf),_0x280faf),_0x280faf++;break;case'delete':_0x404a49['remove'](_0x280faf);break;case'equal':_0x280faf++;}}class oe extends kt{constructor(_0x583494){super(_0x583494);const _0x3ca9b9=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3ca9b9['to']('contextValue',_0x816561=>N(_0x583494,'THREAD_CONTEXT_LABEL',_0x816561)),'tabindex':-0x1},'children':[{'text':_0x3ca9b9['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x31f415,_0x26bd5a){super(_0x31f415);const _0x140e6a=this['bindTemplate'];this['_model']=_0x26bd5a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2d4383(),this['keystrokes']=new jt(),this['focusCycler']=new _0xc7089f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1092cb=>!!_0x1092cb),this['bind']('contextValue')['to'](this['_model'],'context',_0x5ddac9=>_0x5ddac9&&_0x5ddac9['value']?this['_trimContextValue'](_0x5ddac9['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',_0x140e6a['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 _0x2d39e8=new _0x739e9c(this['locale']);return _0x2d39e8['label']=N(this['locale'],'Reopen'),_0x2d39e8['tooltip']=N(this['locale'],'Reopen'),_0x2d39e8['icon']=_0x1ee97c,_0x2d39e8['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x42246c=>!_0x42246c),_0x2d39e8['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x54c2fe,_0x44626c)=>_0x54c2fe&&_0x44626c),_0x2d39e8['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2d39e8;}['_trimContextValue'](_0x6d84c6){if(_0x6d84c6['length']<0x96)return _0x6d84c6;const _0x78b329=_0x6d84c6['lastIndexOf']('\x20',0x93);return _0x6d84c6['substring'](0x0,_0x78b329>-0x1?_0x78b329:0x93)+'...';}['_attachContextActions'](){const _0x5a7339=this['element']['querySelector']('.ck-context'),_0x15675=_0x5a7339['querySelector']('.ck-context__value');this['listenTo'](_0x5a7339,'mouseenter',()=>{_0x15675['offsetWidth']<_0x15675['scrollWidth']&&_0x5a7339['classList']['add']('overlay');}),this['listenTo'](_0x5a7339,'mouseleave',()=>{_0x5a7339['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x1651ba of this['focusables'])this['focusTracker']['add'](_0x1651ba['element']),this['keystrokes']['listenTo'](_0x1651ba['element']);}['_createContextView'](){const _0x2ea3e1=new oe(this['locale']);return _0x2ea3e1['bind']('contextValue')['to'](this),_0x2ea3e1;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xfd1e03,_0xc3d580,_0x56fd9c,_0x3eaedf){super(_0xfd1e03),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xc3d580,this['_localUser']=_0x56fd9c,this['_config']=_0x3eaedf,this['commentThreadHeaderView']=new Xt(_0xfd1e03,_0xc3d580),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0xfd1e03,N(_0xfd1e03,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0xfd1e03,_0xc3d580,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3eaedf)),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',(_0x4c64c2,_0x446f0d)=>_0x4c64c2||!!_0x446f0d),this['bind']('isUnlinked')['to'](_0xc3d580,'unlinkedAt',_0x59e884=>!!_0x59e884),this['bind']('ariaLabel')['to'](this,'length',_0x3689a4=>{const _0x2c7c5d=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x3689a4,_0x2c7c5d]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2d4383(),this['keystrokes']=new jt(),this['focusCycler']=new _0xc7089f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x40437a=>_0x40437a['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x4f6ab5=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x26fc30=_0x4f6ab5['commentInputView'];return _0x4f6ab5['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x26fc30,'value',(_0x4a38b7,_0x3f6be7,_0x2d588e,_0x575532,_0x584563)=>!!_0x584563||!!_0x575532&&_0x2d588e&&!_0x3f6be7||_0x4a38b7&&_0x2d588e&&!_0x3f6be7),_0x26fc30['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x11b786,_0xf84089,_0x4ba067)=>{let _0x1e0131;return _0x1e0131=_0x4ba067&&_0xf84089?'Reply\x20to\x20reopen\x20discussion...':_0x11b786?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x1e0131);}),_0x26fc30['bind']('submitLabel')['to'](this,'length',_0xfea295=>N(this['locale'],_0xfea295?'Reply':'Comment')),_0x26fc30['on']('submit',(_0xb333dc,_0x4cb317)=>{this['fire']('addComment',_0x4cb317),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x26fc30['on']('cancel',()=>{this['focus']();}),_0x26fc30['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x26fc30['on']('cancel',_0x3fd449=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3fd449['stop']());}),this['on']('change:isActive',(_0x4c75a2,_0x2944a7,_0xab1cfe)=>{_0xab1cfe||this['length']||_0x26fc30['value']||this['fire']('removeCommentThread');}),_0x4f6ab5;}}class gt extends/* #__PURE__ -- @preserve */
27
- ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x6f4922,_0x101e18,_0x209837,_0x24d7a8){super(_0x6f4922,_0x101e18,_0x209837,_0x24d7a8),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x6f4922,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x29ffe8,_0x28407e,_0x1af2ce)=>{_0x1af2ce||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3b1b18,_0x119195,_0x451934)=>{_0x451934&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x30d72c=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x30d72c['if']('isActive','ck-thread--active'),_0x30d72c['if']('isUnlinked','ck-thread--unlinked'),_0x30d72c['to']('actionIndicator',_0x362cb6=>_0x362cb6?'ck-thread--'+_0x362cb6:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x30d72c['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 _0x150006 of this['commentsListView']['commentViews'])_0x150006['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x41d4a3}=this,_0x4430a5=this['commentsListView']['commentViews']['get'](0x0);_0x4430a5===this['_boundFirstCommentView']||_0x4430a5['isSystemComment']||(this['_boundFirstCommentView']=_0x4430a5,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x4430a5,'actionIndicator',_0x493cad=>'remove'===_0x493cad?'remove':null),_0x4430a5['placeholder']=N(_0x41d4a3,'Write\x20a\x20comment...'),_0x4430a5['removeButton']['on']('execute',_0x15a713=>{_0x15a713['stop'](),this['showConfirm'](N(_0x41d4a3,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x4430a5['focus']();}),_0x4430a5['actionBar']['add'](this['resolveButton'],0x0),_0x4430a5['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x3e4d1a=new _0x1d9dae(this['locale']);return _0x3e4d1a['label']=N(this['locale'],'Resolve'),_0x3e4d1a['tooltip']=N(this['locale'],'Resolve'),_0x3e4d1a['icon']=_0x4d1b59,_0x3e4d1a['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3e4d1a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x39b1f8=>!_0x39b1f8),_0x3e4d1a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x35b99f,_0x350b96)=>_0x35b99f&&!_0x350b96),_0x3e4d1a['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3e4d1a;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0xd06ca8){super(_0xd06ca8),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x4b1c2d,_0x2d27,_0x10ece3)=>{this['element']['innerHTML']=_0x10ece3;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5b9c21,_0x38c8f8,_0x3b424f){super(_0x5b9c21),this['_model']=_0x38c8f8,this['_config']=_0x3b424f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x38c8f8,'content',_0x38c8f8,'authoredAt',(_0x5ae4ca,_0x20f18f)=>N(_0x5b9c21,'COMMENT_ARIA_LABEL',[_0x38c8f8['author']['name'],_0x3b424f['formatDateTime'](_0x20f18f),new DOMParser()['parseFromString'](_0x5ae4ca,'text/html')['body']['textContent'],_0x38c8f8['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x5b9c21,N(_0x5b9c21,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x102f07(),this['focusTracker']=new _0x2d4383(),this['keystrokes']=new jt(),this['focusCycler']=new _0xc7089f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x421ecc=>_0x421ecc['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 _0x826582=new is(this['locale']);return _0x826582['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x17c33a,_0x3516c8)=>_0x3516c8?ts(_0x17c33a,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x17c33a),_0x826582;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x1d56ad=new es(this['locale'],this['_config']['editorConfig']);return _0x1d56ad['value']=this['_model']['content'],_0x1d56ad['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1d56ad['submitLabel']=N(this['locale'],'Save'),_0x1d56ad['on']('submit',(_0x391a4c,_0x53f6a0)=>{this['fire']('updateComment',this['_model']['id'],_0x53f6a0),this['switchToDisplayMode'](),this['focus']();}),_0x1d56ad['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x1d56ad['once']('editorReady',()=>{_0x1d56ad['focus']();}),_0x1d56ad['createEditor'](),_0x1d56ad['delegate']('editorReady')['to'](this),_0x1d56ad['delegate']('editorDestroyed')['to'](this),_0x1d56ad;}['_setupKeyboardNavigation'](){const _0x3e0ad0=this['element'];this['keystrokes']['listenTo'](_0x3e0ad0);for(const _0x2db536 of this['focusables'])this['focusTracker']['add'](_0x2db536['element']),this['keystrokes']['listenTo'](_0x2db536['element']);this['focusables']['on']('change',(_0x1daf01,_0x51713e)=>{for(const _0x575ce6 of _0x51713e['removed'])this['focusTracker']['remove'](_0x575ce6['element']),this['keystrokes']['stopListening'](_0x575ce6['element']);for(const _0x8c78e8 of _0x51713e['added'])this['focusTracker']['add'](_0x8c78e8['element']),this['keystrokes']['listenTo'](_0x8c78e8['element']);}),this['keystrokes']['set']('enter',(_0x3653ee,_0xa9fe83)=>{_0x3e0ad0===_0x3653ee['target']&&(this['focusCycler']['focusFirst'](),_0xa9fe83());}),this['keystrokes']['set']('esc',(_0x51a61e,_0x202c87)=>{_0x3e0ad0!==_0x51a61e['target']&&(this['focus'](),_0x202c87());});}}class Tt extends/* #__PURE__ -- @preserve */
28
- ti(di){['actionBar'];['userView'];constructor(_0xece563,_0x533aeb,_0x4be379){super(_0xece563,_0x533aeb,_0x4be379),this['set']('actionIndicator',null),this['set']('placeholder',N(_0xece563,'Reply...')),this['bind']('authoredAt')['to'](_0x533aeb),this['bind']('resolvedAt')['to'](_0x533aeb),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 _0x3f12b2(_0xece563,_0x533aeb['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x533aeb,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x4c7976=this['bindTemplate'],_0x3ad53f=[{'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':_0x4c7976['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x4c7976['to']('authoredAt',_0x36fb86=>this['_config']['formatDateTime'](_0x36fb86))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x4c7976['if']('isEditMode','ck-comment__actions--hidden'),_0x4c7976['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']&&_0x3ad53f['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x4c7976['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x4c7976['if']('isEditMode','ck-comment--edit'),_0x4c7976['if']('isSystemComment','ck-comment--info'),_0x4c7976['to']('actionIndicator',_0x3a02c3=>_0x3a02c3?'ck-comment--'+_0x3a02c3:'')],'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':_0x3ad53f}]}]};}['_createEditButton'](){const _0x25ed8d=new _0x739e9c(this['locale']);return _0x25ed8d['label']=N(this['locale'],'Edit'),_0x25ed8d['icon']=_0x1c565b,_0x25ed8d['withText']=!0x0,_0x25ed8d['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x25ed8d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x388dda=>!_0x388dda),_0x25ed8d['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x25ed8d['on']('execute',()=>this['switchToEditMode']()),_0x25ed8d;}['_createRemoveButton'](){const _0x4247a2=new _0x739e9c(this['locale']);return _0x4247a2['label']=N(this['locale'],'Remove'),_0x4247a2['icon']=_0x149cd7,_0x4247a2['withText']=!0x0,_0x4247a2['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x4247a2['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x43ef2e=>!_0x43ef2e),_0x4247a2['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x4247a2['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x4247a2;}['_createDropdown'](){const _0xc88a8d=_0xd8906c(this['locale'],_0x3bfc12),_0x5a9530=_0xc88a8d['panelView']['children'],_0x28f7f4=new _0x41457c(this['locale']),_0x39e8b0=_0xc88a8d['bindTemplate'];_0x1bbb62(_0xc88a8d,()=>this['items']['find'](_0x483b8a=>_0x483b8a['isVisible'])),_0xc88a8d['extendTemplate']({'attributes':{'class':[_0x39e8b0['if']('isVisible','ck-hidden',_0x51bba4=>!_0x51bba4)]}});const _0x5f2f4b=(_0x534fad,_0x56604c=-0x1)=>{const _0x295de8=new _0x4488ae(this['locale']);_0x295de8['children']['add'](_0x534fad);const _0x1f5c0c=_0x56604c>-0x1?_0x56604c:_0x28f7f4['items']['length'];_0x28f7f4['items']['add'](_0x295de8,_0x1f5c0c);const _0xd2e5b0=Array['from'](this['items']);_0xc88a8d['unbind']('isEnabled','isVisible'),_0xc88a8d['bind']('isEnabled')['toMany'](_0xd2e5b0,'isEnabled',(..._0x2baf44)=>_0x2baf44['some'](_0x52cc4=>_0x52cc4)),_0xc88a8d['bind']('isVisible')['toMany'](_0xd2e5b0,'isVisible',(..._0x10a801)=>_0x10a801['some'](_0x132f3f=>_0x132f3f));};_0xc88a8d['panelPosition']='sw',_0xc88a8d['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0xcf18b3});for(const _0x6e6d1b of this['items'])_0x5f2f4b(_0x6e6d1b);return _0x5a9530['add'](_0x28f7f4),_0xc88a8d['listenTo'](this['items'],'add',(_0x7fcd2e,_0xd62489,_0x4648d8)=>{_0x5f2f4b(_0xd62489,_0x4648d8);}),_0xc88a8d['listenTo'](this['items'],'remove',(_0x4f5d20,_0x5743b5,_0x4dd378)=>{_0x28f7f4['items']['remove'](_0x4dd378);}),_0xc88a8d;}['_attachActions'](_0x5423e6,_0x3f9ae4){const _0xd63ce9=_0x5423e6&&_0x5423e6['element'];_0xd63ce9&&(this['listenTo'](_0xd63ce9,'mouseenter',()=>this['actionIndicator']=_0x3f9ae4),this['listenTo'](_0xd63ce9,'focus',()=>this['actionIndicator']=_0x3f9ae4),this['listenTo'](_0xd63ce9,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0xd63ce9,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x23e570=super['_createCommentInputView']();return _0x23e570['bind']('placeholder')['to'](this),_0x23e570;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x2c4107){const _0x275691=Dt(_0x2c4107,0x1e),_0x1107ab=new MutationObserver(_0x41cefd=>{for(const _0x1eaf9a of _0x41cefd)('attributes'==_0x1eaf9a['type']&&'class'==_0x1eaf9a['attributeName']||'childList'==_0x1eaf9a['type']||'characterData'==_0x1eaf9a['type'])&&_0x275691();});return{'attach'(_0x2b1eaf){_0x1107ab['observe'](_0x2b1eaf,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x1107ab['disconnect'](),_0x275691['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x522103,_0xc381df){super(_0x522103),this['id']=_0x8376f1(),this['focusTracker']=new _0x2d4383(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x370ac9,_0x468862)=>this['fire']('Esc',_0x468862)),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'](_0xc381df),this['mainView']=_0xc381df;const _0x389451=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x389451['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 _0x1033a1=this['element']['clientHeight'];_0x1033a1&&(this['height']=_0x1033a1);}}class T extends/* #__PURE__ -- @preserve */
29
- _0x486827(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5a2f27,target:_0x2629fd,type:_0x39b483,isVisible:_0x6485d7=!0x0}){super(),this['view']=_0x5a2f27,this['view']['element']||this['view']['render'](),this['_type']=_0x39b483,this['_target']=_0x2629fd,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x2ba4d0([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3eba5e,_0x344750)=>{this['view']['focusTracker']['add'](_0x344750);}),this['focusableElements']['on']('remove',(_0x530cfd,_0x5bdb22)=>{this['view']['focusTracker']['remove'](_0x5bdb22);}),this['set']('isVisible',_0x6485d7);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x39bc20=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x39bc20),_0x39bc20;}get['targetRect'](){const _0xe17f57=this['target'];if(null===_0xe17f57)return null;if(_0xe17f57 instanceof _0x1e3fe4)return _0xe17f57;const _0x53f59a=_0xe17f57['filter'](_0x341baf=>function(_0xf25784){const _0x5b92db=_0xf25784['offsetParent'];if(_0x5b92db)return!0x0;const _0x1e473d=_0xf25784['getClientRects']()['item'](0x0);return!!_0x1e473d;}(_0x341baf));return 0x0===_0x53f59a['length']?null:new _0x1e3fe4(_0x53f59a[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x126c56){this['view']['isActive']=_0x126c56,this['view']['mainView']['isActive']=_0x126c56;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3813dd){if(!(null===_0x3813dd||_0x3813dd instanceof _0x1e3fe4||Array['isArray'](_0x3813dd)&&_0x3813dd['every'](_0x3ba077=>fi(_0x3ba077))))throw new _0x4482e2('annotation-invalid-target',null,{'target':_0x3813dd});}['_getNormalizedTarget'](){const _0xf25b73='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0xf25b73)?[_0xf25b73]:_0xf25b73;}}function fi(_0x6426fd){return null!==_0x6426fd&&'object'==typeof _0x6426fd&&'nodeType'in _0x6426fd&&0x1===_0x6426fd['nodeType'];}class S extends _0x2ba4d0{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x309dcc=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2d4383(),this['_focusTracker']['on']('change:isFocused',(_0x50091a,_0x51e7a1,_0x5b0128)=>{_0x5b0128||this['fire']('blur');});for(const _0xb60b35 of _0x309dcc)this['add'](_0xb60b35);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xcd43c6){if(this['has'](_0xcd43c6))throw new _0x4482e2('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xcd43c6['innerView'],_0xcd43c6),this['_viewToAnnotation']['set'](_0xcd43c6['view'],_0xcd43c6);for(const _0x471a63 of _0xcd43c6['focusableElements'])this['_focusTracker']['add'](_0x471a63);this['listenTo'](_0xcd43c6['focusableElements'],'add',(_0x387a76,_0x109cbe)=>{this['_focusTracker']['add'](_0x109cbe);}),this['listenTo'](_0xcd43c6['focusableElements'],'remove',(_0x4d446c,_0xbb85e)=>{this['_focusTracker']['remove'](_0xbb85e);}),this['listenTo'](_0xcd43c6['view']['focusTracker'],'change:isFocused',(_0x223cff,_0x11c0ba,_0x23992f)=>{_0x23992f&&this['fire']('focus',_0xcd43c6);}),_0xcd43c6['updateTargetRect']();const _0x23fc88=this['_getOrderInContent'](_0xcd43c6['view']['targetRect']);return super['add'](_0xcd43c6,_0x23fc88);}['remove'](_0x163bd4){if(!this['has'](_0x163bd4))throw new _0x4482e2('annotationcollection-not-existing-item',null);this['stopListening'](_0x163bd4['view']['focusTracker']),this['stopListening'](_0x163bd4['focusableElements']);for(const _0x69597 of _0x163bd4['focusableElements'])this['_focusTracker']['remove'](_0x69597);return this['_viewToAnnotation']['delete'](_0x163bd4['view']),this['_innerViewToAnnotation']['delete'](_0x163bd4['innerView']),super['remove'](_0x163bd4);}['getByInnerView'](_0x3d4617){return this['_innerViewToAnnotation']['get'](_0x3d4617);}['getByView'](_0x199108){return this['_viewToAnnotation']['get'](_0x199108);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1e0fc4 of this)_0x1e0fc4['updateTargetRect']();this['_sort']();}['_sort'](){const _0xb1b3ef=Array['from'](this)['sort']((_0x6d1b11,_0x1108a0)=>w(_0x6d1b11['view']['targetRect'],_0x1108a0['view']['targetRect']));for(let _0x958a4c=_0xb1b3ef['length']-0x1;_0x958a4c>0x0;_0x958a4c--){const _0x3f79ea=_0xb1b3ef[_0x958a4c];_0x958a4c!==this['getIndex'](_0x3f79ea)&&(this['remove'](_0x3f79ea),this['add'](_0x3f79ea));}}['_getOrderInContent'](_0x299bc4){let _0x23412a=0x0;if(!_0x299bc4)return this['length'];for(const _0x109ae2 of this){const _0x12876a=_0x109ae2['view']['targetRect'];if(_0x12876a){if(w(_0x299bc4,_0x12876a)<0x0)return _0x23412a;_0x23412a++;}}return _0x23412a;}}function v({source:_0x1d8c00,target:_0x16e8a1,filter:_0x228708}){for(const _0x2c1a40 of _0x1d8c00)_0x228708(_0x2c1a40)&&_0x16e8a1['add'](_0x2c1a40);_0x16e8a1['listenTo'](_0x1d8c00,'add',(_0x50b284,_0x55d9d9)=>{_0x228708(_0x55d9d9)&&_0x16e8a1['add'](_0x55d9d9);}),_0x16e8a1['listenTo'](_0x1d8c00,'remove',(_0x4d921d,_0x5bed06)=>{_0x16e8a1['has'](_0x5bed06)&&_0x16e8a1['remove'](_0x5bed06);});}function w(_0x5f2571,_0x58d4a7){if(null===_0x5f2571&&null===_0x58d4a7)return 0x0;if(null===_0x5f2571)return-0x1;if(null===_0x58d4a7)return 0x1;const _0x5334a3=_0x5f2571['top']-_0x58d4a7['top'];return 0x0==_0x5334a3?_0x5f2571['left']-_0x58d4a7['left']:_0x5334a3;}class y extends _0x603ec2{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b7ed4){if(super(_0x2b7ed4),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2b7ed4 instanceof _0x5ceede){const _0x2f2e15=_0x2b7ed4['locale'];_0x2b7ed4['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x2f2e15,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x2f2e15,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x2f2e15,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x2f2e15,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x2f2e15,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x2f2e15,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x2f2e15,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x1f8c60){this['collection']['add'](_0x1f8c60);}['remove'](_0x4e910a){this['collection']['remove'](_0x4e910a),_0x4e910a['destroy']();}['refreshVisibility'](){for(const _0x1adc9c of this['collection'])_0x1adc9c['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2235fc){return this['collection']['getByInnerView'](_0x2235fc);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x443a01 of this['collection'])_0x443a01['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5268bf){this['fire']('_activateAnnotation',_0x5268bf);}['createAnnotation'](_0x389c60){return new T(_0x389c60);}['createAnnotationView'](_0x3c7a81,_0x29f803){return new E(_0x3c7a81,_0x29f803);}['_addActiveAnnotation'](_0x1144da){const _0x3ec7d7=new Set(this['activeAnnotations']);_0x3ec7d7['add'](_0x1144da),this['activeAnnotations']=_0x3ec7d7;}['_removeActiveAnnotation'](_0x1561be){const _0x174d88=new Set(this['activeAnnotations']);_0x174d88['delete'](_0x1561be),this['activeAnnotations']=_0x174d88;}['_bindAnnotationsToVisibleAnnotations'](){const _0x57ab34=this['collection'],_0xcab397=this['_visibleAnnotations'];function _0x16ed98(_0x596171){const _0x3156a7=_0x596171['source'];_0x3156a7['isVisible']&&!_0xcab397['has'](_0x3156a7)?_0xcab397['add'](_0x3156a7):!_0x3156a7['isVisible']&&_0xcab397['has'](_0x3156a7)&&_0xcab397['remove'](_0x3156a7),_0x3156a7['view']['focusTracker']['remove'](_0x3156a7['view']['element']),_0x3156a7['view']['focusTracker']['add'](_0x3156a7['view']['element']);}this['listenTo'](_0x57ab34,'add',(_0x4ac557,_0x3374bf)=>{_0x3374bf['isVisible']&&_0xcab397['add'](_0x3374bf),this['listenTo'](_0x3374bf,'change:isVisible',_0x16ed98);}),this['listenTo'](_0x57ab34,'remove',(_0x5c3fb2,_0x276412)=>{_0xcab397['has'](_0x276412)&&_0xcab397['remove'](_0x276412),this['stopListening'](_0x276412,'change:isVisible',_0x16ed98);});}['_setupEnterAnnotationKeystroke'](){const _0x3750f6=_0x20aeaf=>{_0x20aeaf['on']('ready',()=>{_0x20aeaf['keystrokes']['set'](_0x5815b3,(_0x3aadfb,_0x41fd58)=>{const _0x16da54=_0x1ee127(this['activeAnnotations']['values']());_0x16da54&&(_0x16da54['view']['focus'](),_0x41fd58());});});};this['context']instanceof _0x5ceede?_0x3750f6(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3bc708,_0x3e7b34)=>{_0x3750f6(_0x3e7b34);});}['_setupEscapeAnnotationHandling'](){const _0x55f37a=_0x5bbb34=>{const _0x253b99=_0x5bbb34['source'],_0x8e5eee=[];let _0x500f17;if(Array['isArray'](_0x253b99['target'])){_0x500f17=_0x253b99['target'][0x0],this['context']instanceof _0x5ceede?_0x8e5eee['push'](this['context']):this['context']['editors']&&_0x8e5eee['push'](...this['context']['editors']);for(const _0x403066 of _0x8e5eee)for(const _0x3a829f of _0x403066['editing']['view']['domRoots']['values']())if(_0x3a829f['contains'](_0x500f17))return void _0x403066['editing']['view']['focus']();_0x500f17['focus']();}};this['listenTo'](this['collection'],'add',(_0x57e3f7,_0x47cef4)=>{this['listenTo'](_0x47cef4,'escape',_0x55f37a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x50ff66,_0x4afc1f)=>{this['stopListening'](_0x4afc1f,'escape',_0x55f37a);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x603ec2{['_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(_0x2b3745){super(_0x2b3745),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x535d7b=this['context']['config'];_0x535d7b['define']('comments.maxCommentsWhenCollapsed',0x2),_0x535d7b['define']('comments.maxThreadTotalWeight',0x1f4),_0x535d7b['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x535d7b['define']('comments.CommentThreadView',gt),_0x535d7b['define']('comments.CommentView',Tt),_0x535d7b['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2bb661=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x425278,_0xf1822d)=>this['_addCommentThread'](_0xf1822d)),this['on']('submitCommentThread',(_0x145cdb,_0x1967a9)=>this['_submitCommentThread'](_0x1967a9)),this['on']('resolveCommentThread',(_0x2bc867,_0xfa8dba)=>this['_resolveCommentThread'](_0xfa8dba)),this['on']('resolveCommentThread',(_0x1268b5,_0x34af5e)=>this['_updateActiveAnnotation'](_0x34af5e),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x44ba2a,_0x148ff7)=>this['_reopenCommentThread'](_0x148ff7)),this['on']('reopenCommentThread',(_0x1ce337,_0x11cc77)=>this['_updateActiveAnnotation'](_0x11cc77),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3776ae,_0x5391fd)=>this['_removeCommentThread'](_0x5391fd)),this['on']('updateCommentThread',(_0x515de7,_0x2585ab)=>this['_updateCommentThread'](_0x2585ab)),this['on']('updateCommentThread',(_0x2a469a,_0x30149d)=>this['_updateActiveAnnotation'](_0x30149d),{'priority':'lowest'}),this['on']('addComment',(_0x575e6b,_0x90a0f5)=>this['_addComment'](_0x90a0f5)),this['on']('updateComment',(_0x4320a9,_0x9c03a0)=>this['_updateComment'](_0x9c03a0)),this['on']('removeComment',(_0x42b609,_0x8671f8)=>this['_removeComment'](_0x8671f8)),this['on']('addComment',(_0x23c384,{threadId:_0x16c7d2,isFromAdapter:_0x5abe85})=>{if(_0x5abe85)return;const _0x47b139=this['getCommentThread'](_0x16c7d2),_0x15eb27=_0x47b139&&this['_threadToController']['get'](_0x47b139);_0x15eb27&&_0x15eb27['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2bb661,'change:activeAnnotations',(_0x549658,_0x5340da,_0x534397)=>{const _0x1c5df2=Array['from'](_0x534397)['map'](_0x4d75a3=>this['_viewToController']['get'](_0x4d75a3['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x1c5df2?_0x1c5df2['model']:null;});}set['adapter'](_0x3d53d5){if(this['_adapter'])throw new _0x4482e2('commentsrepository-adapter-already-set');this['_adapter']=_0x3d53d5;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5ac7f9=_t,threadId:_0x17ea7e=_0x8376f1(),comments:_0x459f25=[],unlinkedAt:_0x342134=null,resolvedAt:_0x3b56d3=null,resolvedBy:_0x5a7b85=null,target:_0x397682=null,context:_0x2f2831=null,attributes:_0x1c772b={},isResolvable:_0x41355d=!0x0,isSubmitted:_0x5efaa3=!0x1,isFromAdapter:_0x56f20b=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x5ac7f9),{'channelId':_0x5ac7f9,'threadId':_0x17ea7e,'comments':_0x459f25,'unlinkedAt':_0x342134,'resolvedAt':_0x3b56d3,'resolvedBy':_0x5a7b85,'target':_0x397682,'context':_0x2f2831,'attributes':_0x1c772b,'isFromAdapter':_0x56f20b,'isResolvable':_0x41355d,'isSubmitted':_0x5efaa3}),this['getCommentThread'](_0x17ea7e);}['openNewCommentThread']({channelId:_0x4d53cf=_t,threadId:_0x13529e=_0x8376f1(),target:_0x51f03e,context:_0x1a7d59=null,isResolvable:_0x3a7927=!0x0}){if(this['_readOnlyChannels']['has'](_0x4d53cf)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x51f03e)throw new _0x4482e2('commentsrepository-missing-target');const _0x5187ed=this['addCommentThread']({'channelId':_0x4d53cf,'threadId':_0x13529e,'target':_0x51f03e,'context':_0x1a7d59,'isResolvable':_0x3a7927});if(!_0x5187ed)return null;const _0x597f30=this['_threadToController']['get'](_0x5187ed),_0x23465c=_0x597f30['view']['commentThreadInputView']['commentInputView'],_0x2fbdee=this['context']['plugins']['get'](y),_0x22eff7=_0x2fbdee['getByInnerView'](_0x597f30['view']);return _0x2fbdee['activate'](_0x22eff7),_0x23465c['once']('editorReady',()=>_0x23465c['focus']()),_0x5187ed;}['hasCommentThread'](_0x36cd7b){if('string'!=typeof _0x36cd7b)throw new _0x4482e2('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x36cd7b);}['updateCommentThread']({channelId:_0x24ec13=_t,threadId:_0x6ac581,context:_0x46a778,unlinkedAt:_0x38bee2,attributes:_0x37dc58,isFromAdapter:_0x27a5fc=!0x1}){return this['fire'](Nt('updateCommentThread',_0x24ec13),{'channelId':_0x24ec13,'threadId':_0x6ac581,'context':_0x46a778,'unlinkedAt':_0x38bee2,'attributes':_0x37dc58,'isFromAdapter':_0x27a5fc}),this['getCommentThread'](_0x6ac581);}['getCommentThread'](_0x501fbe){if('string'!=typeof _0x501fbe)throw new _0x4482e2('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x501fbe);}['fetchCommentThread']({channelId:_0xca6f2b,threadId:_0x1e649d}={}){const _0xa424=this['getCommentThread'](_0x1e649d);if(_0xa424)return Promise['resolve'](_0xa424);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4482e2('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0xca6f2b,'threadId':_0x1e649d})['then'](_0x362da3=>this['hasCommentThread'](_0x1e649d)?this['getCommentThread'](_0x1e649d):_0x362da3?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0xca6f2b},_0x362da3)):void 0x0)['catch'](_0x19dd70=>{throw console['error'](_0x19dd70),new _0x4482e2('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x32293e,skipNotAttached:_0x264796=!0x1,skipEmpty:_0x21cff6=!0x1,toJSON:_0x490654=!0x1}={}){const _0x3aa3bb=[];for(const _0x30dc68 of this['_threads']['values']())_0x32293e&&_0x30dc68['channelId']!==_0x32293e||_0x264796&&!_0x30dc68['isAttached']||_0x21cff6&&0x0===_0x30dc68['length']||_0x3aa3bb['push'](_0x30dc68);return _0x490654?_0x3aa3bb['map'](_0x39a45d=>_0x39a45d['toJSON']()):_0x3aa3bb;}['getAnnotationForCommentThread'](_0x30fb37){const _0x191f6b=this['_threadToController']['get'](_0x30fb37);if(!_0x191f6b)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x191f6b['view'])||null;}['getCommentThreadForAnnotation'](_0x19dc80){const _0x5a48d2=this['_viewToController']['get'](_0x19dc80['innerView']);return _0x5a48d2?_0x5a48d2['model']:null;}['setActiveCommentThread'](_0x53d8ab){const _0x54322d=this['context']['plugins']['get'](y);if(!_0x53d8ab)return void(this['activeCommentThread']&&_0x54322d['deactivateAll']());const _0x4a8f6f=this['getCommentThread'](_0x53d8ab);if(!_0x4a8f6f)throw new _0x4482e2('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x53d8ab});if(!this['_threadToController']['has'](_0x4a8f6f))throw new _0x4482e2('commentsrepository-active-not-attached',null,{'threadId':_0x53d8ab});const _0x370c34=_0x54322d['getByInnerView'](this['_threadToController']['get'](_0x4a8f6f)['view']);_0x54322d['activate'](_0x370c34);}['switchReadOnly'](_0x4c93c0,_0x547d09){_0x4c93c0?this['_readOnlyChannels']['add'](_0x547d09):this['_readOnlyChannels']['delete'](_0x547d09),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5278ee){return this['_readOnlyChannels']['has'](_0x5278ee)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2250e7,_0x54d8cc){return new vt(_0x2250e7,_0x54d8cc);}['setPermissions'](_0x50a51d,_0x1d6e4f=_t){this['_permissions']['set'](_0x1d6e4f,_0x50a51d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3a791b=_t){return this['_permissions']['has'](_0x3a791b)?this['_permissions']['get'](_0x3a791b):bt;}['_addCommentThread']({channelId:_0x5bfbba,threadId:_0x42587c,comments:_0x834a6c,unlinkedAt:_0x57a47e,resolvedAt:_0x42ebd5,resolvedBy:_0x33d848,target:_0xb7076c,context:_0x1ee4c6,attributes:_0x544f97,isFromAdapter:_0x115172,isResolvable:_0x45e192,isSubmitted:_0x1b9212}){if('string'!=typeof _0x42587c)throw new _0x4482e2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x42587c});if(this['hasCommentThread'](_0x42587c))throw new _0x4482e2('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x42587c});const _0xcb9fb9=new pi(this,{'channelId':_0x5bfbba,'id':_0x42587c,'context':_0x1ee4c6,'attributes':_0x544f97,'unlinkedAt':_0x57a47e,'resolvedAt':_0x42ebd5,'resolvedBy':_0x33d848?this['context']['plugins']['get'](it)['getUser'](_0x33d848):null,'isResolvable':_0x45e192,'isSubmitted':_0x1b9212||_0x115172});this['_threads']['set'](_0x42587c,_0xcb9fb9);for(const _0x3fe554 of _0x834a6c)_0xcb9fb9['_add'](this['_createNewComment']({'threadId':_0x42587c,..._0x3fe554}));return _0xb7076c&&_0xcb9fb9['attachTo'](_0xb7076c),_0x115172||!_0xcb9fb9['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5bfbba,'threadId':_0x42587c});}['_submitCommentThread']({channelId:_0x3ab61b,threadId:_0x1b2dd3}){if(!this['hasCommentThread'](_0x1b2dd3))throw new _0x4482e2('commentsrepository-missing-comment-thread',this);const _0x37d40c=this['getCommentThread'](_0x1b2dd3);if(_0x37d40c['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xe83210,comments:_0x4b434a,resolvedAt:_0x1b1199,resolvedBy:_0x3f1d73,context:_0x421fd0,attributes:_0x363ca3}=_0x37d40c,_0x188d04=this['context']['plugins']['get']('PendingActions'),_0x1bf7d8=_0x188d04['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3ab61b,'threadId':_0xe83210,'comments':_0x4b434a['map'](_0x196539=>_0x196539['toJSON']()),'resolvedAt':_0x1b1199,'resolvedBy':_0x3f1d73?_0x3f1d73['id']:_0x3f1d73,'context':_0x421fd0,'attributes':_0x363ca3})['then'](({comments:_0x4e38f0})=>{_0x188d04['remove'](_0x1bf7d8);for(const _0x48106f of _0x4e38f0)this['_updateComment']({'channelId':_0x3ab61b,'threadId':_0x1b2dd3,'commentId':_0x48106f['commentId'],'createdAt':_0x48106f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x9124b3=>{throw console['error'](_0x9124b3),new _0x4482e2('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x58f2d3,target:_0xf7821f}){const _0x407661=this['getCommentThread'](_0x58f2d3);if(!_0x407661)throw new _0x4482e2('commentsrepository-attach-missing-comment-thread',this);const _0x77a1dc=this['context']['plugins']['get']('PendingActions'),_0x447564=this['context']['plugins']['get'](y),_0x4254b1=this['_createCommentThreadView'](_0x407661),_0x38423b=new vt(_0x407661,_0x4254b1);let _0x4f5449=null;_0x4254b1['on']('change:isDirty',(_0x215f89,_0x35d5f4,_0xfdf73a)=>{_0xfdf73a?_0x4f5449=_0x77a1dc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4f5449&&(_0x77a1dc['remove'](_0x4f5449),_0x4f5449=null);}),this['_threadToController']['set'](_0x407661,_0x38423b),this['_viewToController']['set'](_0x4254b1,_0x38423b);const _0x13b337=new E(this['context']['locale'],_0x4254b1);_0x13b337['bind']('length')['to'](_0x4254b1),_0x13b337['bind']('isDirty')['to'](_0x4254b1,'isDirty',_0x4254b1,'length',(_0x209454,_0x2c2218)=>_0x209454||!_0x2c2218),_0x13b337['bind']('isActive')['to'](_0x4254b1),_0x13b337['type']='comment';const _0x41181e=new T({'view':_0x13b337,'target':_0xf7821f,'type':'comment','isVisible':!_0x407661['archivedAt']&&!!('function'==typeof _0xf7821f?_0xf7821f():_0xf7821f)});return _0x4254b1['on']('escape',()=>{_0x41181e['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4254b1,_0x41181e),_0x447564['add'](_0x41181e),_0x41181e;}['_bindAnnotationToEditors'](_0x447b5c,_0x428bfb){this['listenTo'](_0x447b5c,'editorReady',(_0x42df9b,_0x5de5ef)=>{const _0x3472f0=_0x5de5ef['ui']['view']['body']['bodyCollectionContainer'];_0x428bfb['focusableElements']['add'](_0x3472f0),this['context']instanceof _0x5ceede&&this['context']['ui']['focusTracker']['add'](_0x3472f0);},{'priority':'highest'}),this['listenTo'](_0x447b5c,'editorDestroyed',(_0x2b3f8b,_0x1ccc85)=>{const _0x5a6425=_0x1ccc85['ui']['view']['body']['bodyCollectionContainer'];_0x428bfb['focusableElements']['has'](_0x5a6425)&&_0x428bfb['focusableElements']['remove'](_0x5a6425),this['context']instanceof _0x5ceede&&this['context']['ui']['focusTracker']['remove'](_0x5a6425);});}['_unbindEditors'](_0x1872b3){this['stopListening'](_0x1872b3,'editorReady'),this['stopListening'](_0x1872b3,'editorDestroyed');}['_createCommentThreadView'](_0x5678f9){const _0x5a98d5=this['context']['plugins']['get'](it),{config:_0x3815b7,locale:_0x324c94}=this['context'],_0x412c45=pt(_0x3815b7['get']('locale'),_0x324c94);return new(0x0,(_0x3815b7['get']('comments'))['CommentThreadView'])(_0x324c94,_0x5678f9,_0x5a98d5['me'],{'editorConfig':{..._0x3815b7['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3815b7['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3815b7['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3815b7['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3815b7['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x412c45,'CommentView':_0x3815b7['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x23af75,channelId:_0x869147,resolvedAt:_0x255faa,resolvedBy:_0x26f9ca,isFromAdapter:_0x34353c}){if(!this['hasCommentThread'](_0x23af75))throw new _0x4482e2('commentsrepository-missing-comment-thread',null,{'threadId':_0x23af75});const _0x2c9316=this['getCommentThread'](_0x23af75);if(_0x2c9316['isResolved'])throw new _0x4482e2('commentsrepository-resolved-comment-thread',null,{'threadId':_0x23af75});const _0x19ca43=this['context']['plugins']['get'](it);if(_0x2c9316['resolvedBy']=_0x19ca43['getUser'](_0x26f9ca),_0x2c9316['resolvedAt']=_0x255faa,_0x34353c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2698a6=this['context']['plugins']['get']('PendingActions'),_0xadee69=_0x2698a6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x869147,'threadId':_0x23af75})['then'](({resolvedAt:_0x49bff6,resolvedBy:_0x3641a3})=>{_0x2698a6['remove'](_0xadee69),_0x2c9316['resolvedBy']['id']!==_0x3641a3&&(_0x2c9316['resolvedBy']=_0x19ca43['getUser'](_0x3641a3)),_0x2c9316['resolvedAt']=_0x49bff6;})['catch'](_0x664224=>{throw console['error'](_0x664224),new _0x4482e2('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x345d92,channelId:_0x48b6ea,isFromAdapter:_0x443d31}){if(!this['hasCommentThread'](_0x345d92))throw new _0x4482e2('commentsrepository-missing-comment-thread',null,{'threadId':_0x345d92});const _0x181546=this['getCommentThread'](_0x345d92);if(!_0x181546['isResolved'])throw new _0x4482e2('commentsrepository-reopen-comment-thread',null,{'threadId':_0x345d92});if(_0x181546['resolvedBy']=null,_0x181546['resolvedAt']=null,_0x443d31||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4567b4=this['context']['plugins']['get']('PendingActions'),_0x68fb85=_0x4567b4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x48b6ea,'threadId':_0x345d92})['then'](()=>_0x4567b4['remove'](_0x68fb85))['catch'](_0x285eaf=>{throw console['error'](_0x285eaf),new _0x4482e2('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x18405e,isFromAdapter:_0x578e25}){const _0xe41e05=this['getCommentThread'](_0x18405e);if(!_0xe41e05)throw new _0x4482e2('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x18405e),this['_threads']['delete'](_0x18405e),!_0xe41e05['isSubmitted']||_0x578e25||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5144b4=this['context']['plugins']['get']('PendingActions'),{channelId:_0xaad31a}=_0xe41e05,_0x23ab77=_0x5144b4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xaad31a,'threadId':_0x18405e})['then'](()=>_0x5144b4['remove'](_0x23ab77))['catch'](_0xab4d37=>{throw console['error'](_0xab4d37),new _0x4482e2('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3e3548,unlinkedAt:_0x567b70,context:_0x479b69,attributes:_0x44c32c,isFromAdapter:_0x1c3476}){if('string'!=typeof _0x3e3548)throw new _0x4482e2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3e3548});if(!this['hasCommentThread'](_0x3e3548))throw new _0x4482e2('commentsrepository-missing-comment-thread',null,{'threadId':_0x3e3548});const _0x4d2632=this['getCommentThread'](_0x3e3548);let _0x5f6148=!0x1;if(void 0x0!==_0x479b69&&_0x4d2632['context']!==_0x479b69&&(_0x4d2632['context']=_0x479b69,_0x5f6148=!0x0),void 0x0!==_0x567b70&&_0x4d2632['unlinkedAt']!==_0x567b70&&(_0x4d2632['unlinkedAt']=_0x567b70,_0x5f6148=!0x0),_0x44c32c&&!At(_0x44c32c,_0x4d2632['attributes'])&&(_0x4d2632['attributes']=_0x44c32c,_0x5f6148=!0x0),!_0x5f6148)return Promise['resolve']();if(!_0x4d2632['isSubmitted']||_0x1c3476||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x447b12=this['context']['plugins']['get']('PendingActions'),{channelId:_0x114331}=_0x4d2632,_0x44e766=_0x447b12['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x114331,'threadId':_0x3e3548,'context':_0x479b69,'unlinkedAt':_0x567b70,'attributes':_0x44c32c})['then'](()=>_0x447b12['remove'](_0x44e766))['catch'](_0x32c716=>{throw console['error'](_0x32c716),new _0x4482e2('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x23aa19){const _0x2f935d=this['context']['plugins']['get'](y),_0x37fd5c=this['getCommentThread'](_0x23aa19);if(_0x37fd5c['_isAttached']=!0x1,this['_threadToController']['has'](_0x37fd5c)){const _0x2f8e9a=this['_threadToController']['get'](_0x37fd5c),_0x5c90a5=_0x2f8e9a['view'],_0x11e5ff=_0x2f935d['getByInnerView'](_0x5c90a5);this['_threadToController']['delete'](_0x37fd5c),this['_viewToController']['delete'](_0x5c90a5),_0x11e5ff&&_0x2f935d['remove'](_0x11e5ff),_0x2f8e9a['destroy'](),_0x5c90a5['destroy']()['then'](()=>{this['_unbindEditors'](_0x5c90a5);});}}['_updateActiveAnnotation']({threadId:_0x5c56d0,resolvedAt:_0xff8e6e,unlinkedAt:_0x1d6399}){const _0x456d65=!!_0xff8e6e,_0x34899f=this['context']['plugins']['get'](y),_0x421299=this['getCommentThread'](_0x5c56d0);if(this['_threadToController']['has'](_0x421299)){const _0x41273e=this['_threadToController']['get'](_0x421299)['view'],_0x5e0b93=_0x34899f['getByInnerView'](_0x41273e);_0x5e0b93&&(_0x456d65&&_0x34899f['_removeActiveAnnotation'](_0x5e0b93),_0x1d6399?_0x5e0b93['isVisible']=!0x1:_0x5e0b93['refreshVisibility']());}}['_getExternalAuthor'](_0x237c6d){const _0xb10b4d=this['context']['plugins']['get'](it),_0x58b897=It('external:'+_0x237c6d),_0x145f7a=_0xb10b4d['getUser'](_0x58b897);return _0x145f7a||_0xb10b4d['addUser']({'id':_0x58b897,'name':_0x237c6d});}['_createNewComment']({threadId:_0x522b8a,commentId:_0x57bc61=_0x8376f1(),content:_0x5a1a89,authorId:_0x40a958,createdAt:_0x556c7f,attributes:_0x4f5b4e}){if('string'!=typeof _0x57bc61)throw new _0x4482e2('commentsrepository-invalid-commentid');if('string'!=typeof _0x40a958)throw new _0x4482e2('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5a1a89||!_0x5a1a89['trim']())throw new _0x4482e2('commentsrepository-invalid-comment-content');const _0x47ffc7=this['context']['plugins']['get'](it)['getUser'](_0x40a958);if(!_0x47ffc7)throw new _0x4482e2('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x40a958});let _0x5397ca=null,_0x21110a=_0x556c7f;return _0x4f5b4e?.['@external']&&(_0x5397ca=this['_getExternalAuthor'](_0x4f5b4e['@external']['authorName']),_0x21110a=new Date(_0x4f5b4e['@external']['createdAt'])),new wi(this,{'threadId':_0x522b8a,'id':_0x57bc61,'author':_0x5397ca||_0x47ffc7,'creator':_0x47ffc7,'content':_0x5a1a89,'createdAt':_0x556c7f,'authoredAt':_0x21110a,'attributes':_0x4f5b4e});}['_addComment'](_0x51a102){let {threadId:_0x4e0772,content:_0x58b066,attributes:_0xb0e512,isFromAdapter:_0x5f1f43}=_0x51a102;const _0x5d7541=this['getCommentThread'](_0x51a102['threadId']);if(!_0x5d7541)throw new _0x4482e2('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x23ef17=this['_createNewComment'](_0x51a102),{id:_0x526909}=_0x23ef17;if(_0x5d7541['_add'](_0x23ef17),_0x5f1f43||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5d7541['isSubmitted'])return Promise['resolve']();const _0x983f9b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5e791f}=_0x5d7541,_0x2e6f9c=_0x983f9b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xb0e512||(_0xb0e512={}),this['adapter']['addComment']({'channelId':_0x5e791f,'threadId':_0x4e0772,'commentId':_0x526909,'content':_0x58b066,'attributes':_0xb0e512})['then'](_0x1789ae=>{_0x983f9b['remove'](_0x2e6f9c),_0x1789ae&&this['_updateComment']({'channelId':_0x5e791f,'threadId':_0x4e0772,'commentId':_0x526909,'createdAt':_0x1789ae['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x30e124=>{throw console['error'](_0x30e124),new _0x4482e2('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x536a08,commentId:_0x59e22b,content:_0x24ec92,createdAt:_0x1cd880,attributes:_0x2f2366,isFromAdapter:_0x11b8a5}){if(void 0x0!==_0x24ec92&&('string'!=typeof _0x24ec92||!_0x24ec92['trim']()['length']))throw new _0x4482e2('commentsrepository-update-comment-invalid-content');const _0xc0d4a9=this['getCommentThread'](_0x536a08),_0xc31a8=_0xc0d4a9['getComment'](_0x59e22b);if(!_0xc31a8)throw new _0x4482e2('commentsrepository-update-missing-comment',this);let _0x416c8c=!0x1;if(_0x24ec92&&_0x24ec92!==_0xc31a8['content']&&(_0xc31a8['isEditable']||_0x11b8a5)&&(_0xc31a8['content']=_0x24ec92,_0x416c8c=!0x0),_0x1cd880&&_0x1cd880!==_0xc31a8['createdAt']&&(_0xc31a8['createdAt']=_0x1cd880,_0xc31a8['attributes']&&_0xc31a8['attributes']['@external']||(_0xc31a8['authoredAt']=_0x1cd880),_0x416c8c=!0x0),_0x2f2366&&!At(_0x2f2366,_0xc31a8['attributes'])&&(_0xc31a8['attributes']=_0x2f2366,_0x416c8c=!0x0),!_0x416c8c)return Promise['resolve']();if(_0xc0d4a9['fire']('commentUpdated'),_0x11b8a5||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x9ca51b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x511857}=this['getCommentThread'](_0xc31a8['threadId']),_0x50320b=_0x9ca51b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x511857,'threadId':_0x536a08,'commentId':_0x59e22b,'content':_0x24ec92,'attributes':_0x2f2366})['then'](()=>_0x9ca51b['remove'](_0x50320b))['catch'](_0x3450e8=>{throw console['error'](_0x3450e8),new _0x4482e2('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1c6873,commentId:_0x413ec1,isFromAdapter:_0xd2cf8e}){const _0x4126ac=this['getCommentThread'](_0x1c6873),_0x9adf11=_0x4126ac['getComment'](_0x413ec1);if(!_0x9adf11)throw new _0x4482e2('commentsrepository-remove-missing-comment',this);if(_0x4126ac['_remove'](_0x9adf11),_0xd2cf8e||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x42068f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4e5ebf}=_0x4126ac,_0x46085d=_0x42068f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4e5ebf,'threadId':_0x1c6873,'commentId':_0x413ec1})['then'](()=>_0x42068f['remove'](_0x46085d))['catch'](_0xfcfbcb=>{throw console['error'](_0xfcfbcb),new _0x4482e2('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
- _0x486827(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x177892,_0x46e061){super();const _0x8032dc=_0x46e061['isResolvable'];this['channelId']=_0x46e061['channelId'],this['id']=_0x46e061['id'],this['comments']=new _0x2ba4d0(),this['_repository']=_0x177892,this['_isAttached']=!0x1,this['_isSubmitted']=_0x46e061['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x177892,'_permissions',_0x177892,'_readOnlyChannels',()=>_0x177892['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x177892,'_permissions',()=>_0x177892['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x177892,'_permissions',()=>{const _0x400f20=_0x177892['getPermissions'](this['channelId']);return _0x400f20['write']||_0x400f20['admin'];}),this['bind']('isResolvable')['to'](_0x177892,'_permissions',()=>_0x8032dc&&_0x177892['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x46e061['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x52014b,_0x1bef30)=>_0x52014b?_0x1bef30?_0x52014b<_0x1bef30?_0x52014b:_0x1bef30:_0x52014b:_0x1bef30),this['set']('unlinkedAt',_0x46e061['unlinkedAt']||null),this['set']('resolvedAt',_0x46e061['resolvedAt']||null),this['set']('resolvedBy',_0x46e061['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x29a908=>!!_0x29a908),this['set']('attributes',_0x46e061['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x394104,_0x1eb062)=>_0x394104+_0x1eb062['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x269264,id:_0x1740fc}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x269264),{'channelId':_0x269264,'threadId':_0x1740fc});}['setUnlinkedAt'](_0x18efe4){this['_update']({'unlinkedAt':_0x18efe4});}['resolve']({resolvedAt:_0x417724=new Date(),resolvedBy:_0x287a42='',isFromAdapter:_0x1d07f1=!0x1}={}){const _0x3a242c=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x2690f3,id:_0x1b6a9c}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x2690f3),{'channelId':_0x2690f3,'threadId':_0x1b6a9c,'resolvedAt':_0x417724,'resolvedBy':_0x287a42||_0x3a242c['id'],'isFromAdapter':_0x1d07f1});}['reopen']({isFromAdapter:_0x2145a2=!0x1}={}){const {channelId:_0x29f075,id:_0x7bb9d9}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x29f075),{'channelId':_0x29f075,'threadId':_0x7bb9d9,'isFromAdapter':_0x2145a2});}['setContext'](_0x1d2a49){this['context']||this['_update']({'context':_0x1d2a49});}['setAttribute'](_0x43e42f,_0x17dff2){const _0x22f109=wt(this['attributes']);yt(_0x22f109,_0x43e42f,_0x17dff2),this['_update']({'attributes':_0x22f109});}['removeAttribute'](_0x184e97){const _0x5ed519=wt(this['attributes']);Ct(_0x5ed519,_0x184e97),this['_update']({'attributes':_0x5ed519});}['remove']({isFromAdapter:_0x144d03=!0x1}={}){const {channelId:_0xd5cf1d,id:_0x529161}=this;this['_repository']['fire'](Nt('removeCommentThread',_0xd5cf1d),{'channelId':_0xd5cf1d,'threadId':_0x529161,'isFromAdapter':_0x144d03});}['attachTo'](_0x209698){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x209698});}['addComment'](_0x37e4e0){const {channelId:_0x3f242e,id:_0x5cd428}=this;this['_repository']['fire'](Nt('addComment',_0x3f242e,_0x5cd428),Object['assign']({'channelId':_0x3f242e,'threadId':_0x5cd428},_0x37e4e0));}['getComment'](_0x23f647){if('string'!=typeof _0x23f647)throw new _0x4482e2('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x23f647});return this['comments']['get'](_0x23f647);}['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'](_0x511f17=>_0x511f17['toJSON']()),'attributes':this['attributes']};}['_add'](_0x489aae){return this['listenTo'](_0x489aae,'change:authoredAt',()=>{const _0x1b58d8=this['_findOptimalIndex'](_0x489aae),_0x232029=this['comments'];_0x1b58d8-0x1!=_0x232029['getIndex'](_0x489aae)&&_0x1b58d8+0x1!=_0x232029['getIndex'](_0x489aae)&&(this['_remove'](_0x489aae),this['_add'](_0x489aae));}),this['comments']['add'](_0x489aae,this['_findOptimalIndex'](_0x489aae));}['_update'](_0xf05638){const {channelId:_0x598db8,id:_0x532f44}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x598db8),{..._0xf05638,'channelId':_0x598db8,'threadId':_0x532f44});}['_remove'](_0x18a315){return this['stopListening'](_0x18a315),_0x18a315['destroy'](),this['comments']['remove'](_0x18a315);}['_findOptimalIndex'](_0x43ea9c){const _0x50027b=this['comments']['find'](_0x174a56=>new Date(_0x174a56['authoredAt'])['getTime']()>new Date(_0x43ea9c['authoredAt'])['getTime']());return _0x50027b?this['comments']['getIndex'](_0x50027b):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
- _0x486827(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5f0261,_0x32f250){super();const _0x47337a=_0x5f0261['context']['plugins']['get'](it)['me'],_0x2dde4a=_0x5f0261['getCommentThread'](_0x32f250['threadId']),_0x4f6b6c=0x0===_0x2dde4a['comments']['length'],_0x1f8bad=_0x47337a===_0x32f250['author'];this['id']=_0x32f250['id'],this['threadId']=_0x32f250['threadId'],this['author']=_0x32f250['author'],this['creator']=_0x32f250['creator'],this['isExternal']=Boolean(_0x32f250['attributes']&&_0x32f250['attributes']['@external']),this['set']('content',_0x32f250['content']),this['createdAt']=_0x32f250['createdAt']||new Date(),this['set']('authoredAt',_0x32f250['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2dde4a,'resolvedAt'),this['set']('attributes',_0x32f250['attributes']||{}),this['bind']('isEditable')['to'](_0x5f0261,'_permissions',()=>{const _0x4bceb7=_0x5f0261['getPermissions'](_0x2dde4a['channelId'])['write'],_0x5f1098=_0x5f0261['getPermissions'](_0x2dde4a['channelId'])['modifyAll'];return _0x1f8bad&&_0x4bceb7||!_0x1f8bad&&_0x5f1098;}),this['bind']('isRemovable')['to'](_0x2dde4a,'isRemovable',_0x5f0261,'_permissions',_0x155159=>{const _0x55b05f=_0x5f0261['getPermissions'](_0x2dde4a['channelId'])['write'],_0x1270a5=_0x5f0261['getPermissions'](_0x2dde4a['channelId'])['modifyAll'];return _0x1f8bad&&_0x55b05f||_0x155159&&_0x4f6b6c||!_0x1f8bad&&_0x1270a5&&!_0x4f6b6c;}),this['bind']('isReadOnly')['to'](_0x2dde4a,'isReadOnly'),this['_repository']=_0x5f0261;}get['weight'](){return Math['max'](function(_0x23690c){const _0x28076c=document['createElement']('div');return _0x28076c['innerHTML']=_0x23690c,_0x28076c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x512e2b){const {threadId:_0x42e5e2,id:_0x198d61}=this;if(!this['_repository']['hasCommentThread'](_0x42e5e2))throw new _0x4482e2('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x523bed}=this['_repository']['getCommentThread'](_0x42e5e2);this['_repository']['fire'](Nt('updateComment',_0x523bed,_0x42e5e2),{'channelId':_0x523bed,'threadId':_0x42e5e2,'commentId':_0x198d61,..._0x512e2b});}['setAttribute'](_0x10aaf6,_0x10465f){const _0x1af5df=wt(this['attributes']);yt(_0x1af5df,_0x10aaf6,_0x10465f),this['update']({'attributes':_0x1af5df});}['removeAttribute'](_0x3f19a8){const _0x331a87=wt(this['attributes']);Ct(_0x331a87,_0x3f19a8),this['update']({'attributes':_0x331a87});}['remove'](_0xac7e39={}){if(!_0xac7e39['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x44551a,id:_0x8859f1}=this;if(!this['_repository']['hasCommentThread'](_0x44551a))throw new _0x4482e2('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x49e218}=this['_repository']['getCommentThread'](_0x44551a);this['_repository']['fire'](Nt('removeComment',_0x49e218,_0x44551a),{'channelId':_0x49e218,'threadId':_0x44551a,'commentId':_0x8859f1,..._0xac7e39});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3efaff,..._0x77a214){for(const _0xee12d5 of _0x77a214)void 0x0!==_0xee12d5&&(_0x3efaff+=':'+String(_0xee12d5));return _0x3efaff;}class ot extends _0x47f0a2{constructor(_0x22ea54){super(_0x22ea54),this['set']('hasContent',!0x1);}['refresh'](){const _0x66edb9=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xc23620 of _0x66edb9['getRanges']())if(this['_hasContent'](_0xc23620))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x25091f=_0x8376f1(),ranges:_0x32d878,comment:_0x4d6f37}={}){const _0x304fc5=this['editor']['model'],_0xea0f8e=_0x32d878??Array['from'](_0x304fc5['document']['selection']['getRanges']()),_0x1cba0c=[];for(const _0x2d20e1 of _0xea0f8e)this['_hasContent'](_0x2d20e1)&&_0x1cba0c['push'](this['_trimToContent'](_0x2d20e1));if(!_0x1cba0c['length'])throw new _0x4482e2('addcommentthreadcommand-incorrect-ranges',null);_0x4d6f37&&this['_createCommentThread'](_0x25091f,_0x4d6f37),this['_createMarkersFromRanges'](_0x25091f,_0x1cba0c,!!_0x4d6f37);}['_createMarkersFromRanges'](_0x3f8f45,_0x48fdc4,_0xf648a5){this['editor']['model']['change'](_0x3c6b36=>{for(const _0x378221 of _0x48fdc4){const _0x498b4f=_0x8376f1()['substr'](0x1,0x5),_0x4969d3='comment:'+_0x3f8f45+':'+_0x498b4f;_0x3c6b36['addMarker'](_0x4969d3,{'range':_0x378221,'usingOperation':_0xf648a5,'affectsData':_0xf648a5});}});}['_createCommentThread'](_0x1e97aa,_0x2e0369){const _0x4ee1b6=this['editor']['plugins']['get']('CommentsRepository'),_0x46d10f=this['editor']['config']['get']('collaboration.channelId'),_0x55c429=this['editor']['plugins']['get']('Users')['me'];if(!_0x55c429)throw new _0x4482e2('addcommentthreadcommand-user-not-found',null);_0x4ee1b6['addCommentThread']({'threadId':_0x1e97aa,'channelId':_0x46d10f,'comments':[{'authorId':_0x55c429['id'],'content':_0x2e0369,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x8d5001){for(const _0x5efba of _0x8d5001['getItems']())if(this['_itemIsContent'](_0x5efba))return!0x0;return!0x1;}['_itemIsContent'](_0x5146ee){return _0x5146ee['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5146ee)&&!_0x5146ee['is']('element','tableCell');}['_trimToContent'](_0x8bd82c){const _0x693938=_0x4ed08f=>!this['_itemIsContent'](_0x4ed08f['item']),_0x132714=_0x8bd82c['start']['getLastMatchingPosition'](_0x693938),_0x59c105=_0x8bd82c['end']['getLastMatchingPosition'](_0x693938,{'direction':'backward'});return this['editor']['model']['createRange'](_0x132714,_0x59c105);}}class b extends _0x4626af{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11c306){super(_0x11c306),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x375253=this['editor'],_0x320edf=_0x375253['model']['document']['selection'],_0x4ad9c2=_0x2a6dac(()=>this['refreshSelectedViews'](),0xa);_0x320edf['on']('change:range',(_0x4f07a0,_0x2e5e72)=>{_0x2e5e72['directChange']&&(_0x4ad9c2['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x375253['editing']['view']['document'],'change:isFocused',(_0x530b58,_0x241829,_0x273934)=>{_0x273934&&_0x4ad9c2();}),this['listenTo'](_0x375253['ui']['focusTracker'],'change:isFocused',(_0x130d0a,_0x432e77,_0x28fd74)=>{_0x28fd74||this['fire']('blur',{'isAnnotationTracked':_0x2860cd=>this['_editorAnnotationsData']['has'](_0x2860cd['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2f4764){if(this['_editorAnnotations']['has'](_0x2f4764['view']))return;this['_editorAnnotations']['add'](_0x2f4764['view']),this['editor']['ui']['focusTracker']['add'](_0x2f4764['view']['element']);const _0x20f7de=this['editor']['plugins']['get'](y);this['listenTo'](_0x20f7de['collection'],'remove',(_0x43e6e5,_0x4ce49d)=>{this['editor']['ui']['focusTracker']['remove'](_0x4ce49d['view']['element']),this['_editorAnnotations']['delete'](_0x4ce49d['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4a9afa){if('function'!=typeof _0x4a9afa)throw new _0x4482e2('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4a9afa);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3bb131,annotations:_0x3c27d7}){const _0x39638d=[],_0x341880=this['editor']['model']['document']['selection'],_0xcba734=Array['from'](_0x341880['getRanges']());for(const [_0x59bb64,_0x15682e]of this['_editorAnnotationsData']){const _0x3baf26=_0xbfaf70(_0x15682e),_0x3c1df8=_0x3c27d7['getByInnerView'](_0x59bb64);_0x3baf26&&_0x3c1df8&&_0x39638d['push']({'annotation':_0x3c1df8,'range':_0x3baf26});}function _0xbfaf70(_0x2d817d){for(const _0x534878 of _0x2d817d)for(const _0x5e3996 of _0xcba734)if(_0x534878['containsRange'](_0x5e3996,!_0x341880['isCollapsed']))return _0x534878;return null;}return _0x39638d['sort']((_0x5a0d38,_0xeb20d5)=>{const _0x52fac2=_0x5a0d38['range'],_0x52c5a6=_0xeb20d5['range'];if(!_0x52fac2['isEqual'](_0x52c5a6)){if(_0x52fac2['containsRange'](_0x52c5a6,!0x0))return 0x1;if(_0x52c5a6['containsRange'](_0x52fac2,!0x0))return-0x1;}return _0x5a0d38['annotation']==_0x3bb131?-0x1:_0xeb20d5['annotation']==_0x3bb131?0x1:0x0;})['map'](_0x2823ad=>_0x2823ad['annotation']);}get['_editorAnnotationsData'](){const _0x2fa29b=new Map();for(const _0x2f83c8 of Array['from'](this['_dataCollectors']))for(const [_0x45adff,_0x491c49]of _0x2f83c8())_0x2fa29b['set'](_0x45adff,_0x491c49);return _0x2fa29b;}}class st extends _0x4626af{['afterInit'](){const _0x31de39=this['editor'];if(!_0x31de39['plugins']['has']('RestrictedEditingModeEditing'))return;_0x31de39['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4626af{constructor(_0xf282a9){super(_0xf282a9),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2b71b0=this['editor'],_0x24b41e=_0x2b71b0['commands']['get']('importWord'),_0x465faa=_0x2b71b0['plugins']['get'](it);_0x24b41e&&(_0x24b41e['on']('execute',(_0x2f3013,[,_0x54d3e9])=>{_0x54d3e9['collaboration_features']={'comments':!0x0,'user_id':_0x465faa['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x24b41e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x528dd9,_0x265395){const {comment_threads:_0x264e79}=_0x265395;_0x264e79&&_0x264e79['forEach'](({thread_id:_0x47be04,comments:_0x3e2d93,is_resolved:_0x224078})=>{const _0xe2da19=new Date(),_0x17d9a8=_0x3e2d93['map'](({author:_0x5b93c3,content:_0x250c8a,created_at:_0x137af7})=>({'content':_0x250c8a,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xe2da19,'attributes':{'@external':{'authorName':_0x5b93c3,'createdAt':_0x137af7?new Date(_0x137af7):new Date(),'source':'importWord'}}})),_0x459191=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x459191,'threadId':_0x47be04,'comments':_0x17d9a8,'resolvedAt':_0x224078?_0xe2da19:null});});}}class at extends _0x4626af{constructor(_0x22fe4a){super(_0x22fe4a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x420867=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x420867,'contentInsertion',(_0x39887f,_0x20749b)=>this['_removeMarkersWithoutThreads'](_0x20749b['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1a2230){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1a2230;const _0x378b7c=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1fa084 of _0x1a2230['keys']()){const [_0x21cfdf,_0x319de7]=_0x1fa084['split'](':');'comment'!=_0x21cfdf||_0x378b7c['hasCommentThread'](_0x319de7)||_0x1a2230['delete'](_0x1fa084);}return _0x1a2230;}['_registerMarkerInClipboardPipeline'](){const _0xb0acdc=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2d2928=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2d2928&&_0xb0acdc['_registerMarkerToCopy']('comment',_0x2d2928);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x58862f){switch(_0x58862f){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x15637d){const _0x38e409=_0x15637d['split'](':');return{'group':_0x38e409[0x0],'id':_0x38e409[0x1],'part':_0x38e409[0x2]};}class ut extends _0x4626af{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x25014a,_0xa05d91)=>{if(!_0xa05d91['options']['showCommentHighlights'])return null;if(_0xa05d91['options']['ignoreResolvedComments']){const {id:_0x5a4591}=ft(_0x25014a['markerName']),_0x11b9fe=this['editor']['plugins']['get'](o);if(_0x11b9fe['getCommentThread'](_0x5a4591)?.['isResolved']&&_0x25014a['item'])return _0xa05d91['consumable']['consume'](_0x25014a['item'],'addMarker:'+_0x25014a['markerName']),_0xa05d91['consumable']['consume'](_0x25014a['item'],'removeMarker:'+_0x25014a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xbcc02f=>{_0xbcc02f['on']('addMarker:comment',(_0x1445a3,_0x4d0634,_0x127c68)=>{if(!_0x127c68['options']['showCommentHighlights'])return;const _0x18c438=_0x4d0634['item'];if(!_0x18c438)return;const _0x5d2a6a=_0x127c68['mapper']['toViewElement'](_0x18c438);this['editor']['model']['schema']['isObject'](_0x18c438)&&_0x5d2a6a&&!_0x5d2a6a['getCustomProperty']('widget')&&_0x5d2a6a['is']('containerElement')&&_0x4a5a07(_0x5d2a6a,_0x127c68['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x11f9bc,{writer:_0x1d4ca5,options:_0x414b48})=>{if(!_0x414b48['showCommentHighlights'])return null;const _0x48ad45=_0x1d4ca5['createContainerElement']('div'),_0x4a137a=_0x1d4ca5['createEmptyElement']('hr');return _0x1d4ca5['addClass']('ck-horizontal-line',_0x48ad45),_0x1d4ca5['insert'](_0x1d4ca5['createPositionAt'](_0x48ad45,0x0),_0x4a137a),_0x48ad45;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x35ea49,{writer:_0x2d5a76,options:_0x57a49e})=>{if(!_0x57a49e['showCommentHighlights'])return null;const _0xe22e53=_0x2d5a76['createContainerElement']('span'),_0x67ea59=_0x2d5a76['createEmptyElement']('img');return _0x2d5a76['addClass']('image-inline',_0xe22e53),_0x2d5a76['insert'](_0x2d5a76['createPositionAt'](_0xe22e53,0x0),_0x67ea59),_0xe22e53;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x3976c8,{writer:_0x1ac18a,options:_0x320992})=>{if(_0x320992['showCommentHighlights'])return _0x1ac18a['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1f3733,_0x3c62d0,_0x597253)=>{_0x597253['options']['showCommentHighlights']&&_0x1f3733['stop']();},{'priority':'high'});}}class r extends _0x4626af{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(_0x3453b0){super(_0x3453b0),this['set']('isThreadsLoadingPaused',!0x0),_0x3453b0['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2934a8,_0x1b0cd3,_0x394df7,_0x2bbb7c)=>{const _0x555f3d=_0x3453b0['plugins']['get'](o),_0x3ebd71=_0x394df7?ft(_0x394df7)['id']:null;_0x3453b0['model']['change'](()=>{if(_0x3ebd71){const _0x415332=this['getAllMarkersForId'](_0x3ebd71);for(const _0x4f0978 of _0x415332)_0x3453b0['editing']['reconvertMarker'](_0x4f0978);}if(_0x2bbb7c){const {id:_0x2c8e5f}=ft(_0x2bbb7c),_0x5c4866=_0x555f3d['getCommentThread'](_0x2c8e5f);if(_0x5c4866&&_0x5c4866['unlinkedAt'])return;if(_0x5c4866&&!_0x5c4866['isAttached'])return;const _0x1f450e=this['getAllMarkersForId'](_0x2c8e5f);for(const _0x42a902 of _0x1f450e)_0x3453b0['editing']['reconvertMarker'](_0x42a902);}}),_0x3ebd71&&this['scrollToThreadMarker'](_0x3ebd71);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2c444f=this['editor'],_0xe60bf7=_0x2c444f['plugins']['get'](o),_0x32c367=_0x2c444f['config']['get']('collaboration.channelId'),_0x4990cd=_0xe60bf7['getCommentThreads']()['filter'](_0x1a8371=>_0x1a8371['channelId']!==_0x32c367);_0x2c444f['commands']['add']('addCommentThread',new ot(_0x2c444f)),this['listenTo'](_0x2c444f,'change:isReadOnly',(_0xae807f,_0x4b5345,_0x220004)=>{_0xe60bf7['switchReadOnly'](_0x220004,_0x2c444f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xe60bf7,dt('addCommentThread',_0x32c367),(_0x100dac,{threadId:_0x23b75f})=>{const _0x569f1b=this['editor']['plugins']['get'](o)['getCommentThread'](_0x23b75f);_0x569f1b?.['unlinkedAt']&&this['_attachArchivedThread'](_0x23b75f);}),this['listenTo'](_0xe60bf7,dt('removeCommentThread',_0x32c367),(_0x345963,{threadId:_0x30d0c9})=>{_0x2c444f['model']['enqueueChange']({'isUndoable':!0x1},_0x431c2f=>{const _0x416cb1=this['getAllMarkersForId'](_0x30d0c9);for(const _0x39e115 of _0x416cb1)_0x431c2f['removeMarker'](_0x39e115);});}),this['listenTo'](_0xe60bf7,dt('resolveCommentThread',_0x32c367),(_0x58bd4e,{threadId:_0x45312d})=>{(this['_reconvertMarkers'](_0x45312d),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x45312d)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xe60bf7,dt('reopenCommentThread',_0x32c367),(_0x3be39e,{threadId:_0x3ae2de})=>{this['_reconvertMarkers'](_0x3ae2de);},{'priority':'low'}),this['listenTo'](_0xe60bf7,dt('addComment',_0x32c367),(_0x32473b,{threadId:_0x19b337,isFromAdapter:_0x423ea2})=>{const _0x11d499=this['getAllMarkersForId'](_0x19b337);if(_0x423ea2||0x0==_0x11d499['length']||!_0xe60bf7['hasCommentThread'](_0x19b337))return;0x1===_0xe60bf7['getCommentThread'](_0x19b337)['length']&&_0x2c444f['model']['enqueueChange']({'isUndoable':!0x1},_0x2ace15=>{for(const _0x45ab17 of _0x11d499)_0x2ace15['updateMarker'](_0x45ab17,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4990cd);}['afterInit'](){!async function(_0x1d3956){const _0x194471=_0x2c35b2([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]),_0x3c9758=0x73460ab3,_0x285a2d=0x7341880b^_0x3c9758,_0x15e05a=window[_0x2c35b2([0x44,0x61,0x74,0x65])][_0x2c35b2([0x6e,0x6f,0x77])](),_0x43a487=_0x1d3956[_0x2c35b2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4d1e86=new window[(_0x2c35b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x525ac4=>{_0x43a487[_0x2c35b2([0x6f,0x6e,0x63,0x65])](_0x2c35b2([0x72,0x65,0x61,0x64,0x79]),_0x525ac4);}),_0x9de6f1={[_0x2c35b2([0x6b,0x74,0x79])]:_0x2c35b2([0x45,0x43]),[_0x2c35b2([0x75,0x73,0x65])]:_0x2c35b2([0x73,0x69,0x67]),[_0x2c35b2([0x63,0x72,0x76])]:_0x2c35b2([0x50,0x2d,0x32,0x35,0x36]),[_0x2c35b2([0x78])]:_0x2c35b2([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]),[_0x2c35b2([0x79])]:_0x2c35b2([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]),[_0x2c35b2([0x61,0x6c,0x67])]:_0x2c35b2([0x45,0x53,0x32,0x35,0x36])},_0x18144a=_0x43a487[_0x2c35b2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2c35b2([0x67,0x65,0x74])](_0x2c35b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x189b92(){let _0x4f3d27,_0x5e0571=null,_0x586b83=null;try{if(_0x18144a==_0x2c35b2([0x47,0x50,0x4c]))return _0x2c35b2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4f3d27=_0x3dede9(),!_0x4f3d27)return _0x2c35b2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4f3d27[_0x2c35b2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x586b83=_0xd5359e(_0x4f3d27[_0x2c35b2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4f3d27[_0x2c35b2([0x6a,0x74,0x69])])),await _0x1d248d()?_0x4f3e22()?_0x1bd989()?_0x2c35b2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x70539()?(_0x4f3d27[_0x2c35b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2c35b2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5e0571=_0x1093d5(_0x2c35b2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2ea69f()):_0x2c35b2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2c35b2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2c35b2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2c35b2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1bd989(){const _0x51af0c=[_0x2c35b2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2c35b2([0x74,0x72,0x69,0x61,0x6c])][_0x2c35b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3d27[_0x2c35b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x15e05a/0x3e8:0xe10*_0x285a2d;return _0x4f3d27[_0x2c35b2([0x65,0x78,0x70])]<_0x51af0c;}function _0x4f3e22(){const _0x558bbd=_0x4f3d27[_0x2c35b2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x558bbd)return!0x1;if(_0x558bbd[_0x2c35b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c35b2([0x2a])))return!0x0;if(_0x558bbd[_0x2c35b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c35b2([0x43,0x4d,0x54])))return!0x0;if(_0x558bbd[_0x2c35b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c35b2([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x92b75a())return!0x0;if(_0x558bbd[_0x2c35b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c35b2([0x52,0x43,0x4d,0x54]))){if(_0x1246e1())return!0x0;if(_0x4333e2()||_0x4e9168())return!0x0;}return!0x1;}function _0x70539(){const _0x5493b7=_0x4f3d27[_0x2c35b2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5493b7||0x0==_0x5493b7[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4d8b8c}=new URL(window[_0x2c35b2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5493b7[_0x2c35b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4d8b8c))return!0x0;const _0x576836=_0x4d8b8c[_0x2c35b2([0x73,0x70,0x6c,0x69,0x74])](_0x2c35b2([0x2e]));return _0x5493b7[_0x2c35b2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf413da=>_0xf413da[_0x2c35b2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c35b2([0x2a])))[_0x2c35b2([0x6d,0x61,0x70])](_0x31eb1a=>_0x31eb1a[_0x2c35b2([0x73,0x70,0x6c,0x69,0x74])](_0x2c35b2([0x2e])))[_0x2c35b2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4a3901=>_0x4a3901[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x576836[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2c35b2([0x6d,0x61,0x70])](_0x459d5b=>Array(_0x576836[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x459d5b[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2c35b2([0x66,0x69,0x6c,0x6c])](_0x459d5b[0x0]===_0x2c35b2([0x2a])?_0x2c35b2([0x2a]):'')[_0x2c35b2([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x459d5b))[_0x2c35b2([0x73,0x6f,0x6d,0x65])](_0x102e96=>_0x576836[_0x2c35b2([0x65,0x76,0x65,0x72,0x79])]((_0x58aaf7,_0x4c3f63)=>_0x102e96[_0x4c3f63]===_0x58aaf7||_0x102e96[_0x4c3f63]===_0x2c35b2([0x2a])));}function _0x2ea69f(){return _0x5e0571&&_0x586b83?new window[(_0x2c35b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x28b28c,_0x102e4e)=>{_0x5e0571[_0x2c35b2([0x74,0x68,0x65,0x6e])](_0x28b28c,_0x102e4e),_0x586b83[_0x2c35b2([0x74,0x68,0x65,0x6e])](_0x4307ad=>{_0x4307ad!=_0x2c35b2([0x56,0x61,0x6c,0x69,0x64])&&_0x28b28c(_0x4307ad);},_0x102e4e);}):_0x5e0571||_0x586b83||_0x2c35b2([0x56,0x61,0x6c,0x69,0x64]);}}function _0xd5359e(_0x660fe0,_0x12aa2d){return new window[(_0x2c35b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x322d62=>{if(_0x6495e4())return _0x322d62(_0x2c35b2([0x56,0x61,0x6c,0x69,0x64]));_0xb0e3e5(),_0x43a487[_0x2c35b2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2c35b2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4e8c5d=!0x1;const _0x2132e6=_0x8376f1();function _0x3ff9fd(_0x371783){return!!_0x371783&&(typeof _0x371783===_0x2c35b2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x371783===_0x2c35b2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x371783[_0x2c35b2([0x74,0x68,0x65,0x6e])]===_0x2c35b2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x371783[_0x2c35b2([0x63,0x61,0x74,0x63,0x68])]===_0x2c35b2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3b3c21(_0x53d607){_0x594a8a(_0x53d607)[_0x2c35b2([0x74,0x68,0x65,0x6e])](_0x5e7e29=>{if(!_0x5e7e29||_0x5e7e29[_0x2c35b2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2c35b2([0x6f,0x6b]))return _0x2c35b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x36c739(_0x46f3ce(_0x2132e6+_0x12aa2d))!=_0x5e7e29[_0x2c35b2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2c35b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2c35b2([0x56,0x61,0x6c,0x69,0x64]);})[_0x2c35b2([0x74,0x68,0x65,0x6e])](_0x70072f=>(_0x46d03d(),_0x70072f),()=>{const _0x4e54a9=_0x191434();return null==_0x4e54a9?(_0x46d03d(),_0x2c35b2([0x56,0x61,0x6c,0x69,0x64])):_0x2c35b2(_0x15e05a-_0x4e54a9>(0x574a8eb3^_0x3c9758)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2c35b2([0x74,0x68,0x65,0x6e])](_0x322d62)[_0x2c35b2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x322d62(_0x2c35b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1627d5=0x7370e433^_0x3c9758;function _0x46d03d(){const _0x1db4b0=_0x2c35b2([0x6c,0x6c,0x63,0x74,0x2d])+_0x36c739(_0x46f3ce(_0x660fe0)),_0x4fd9c4=_0x2b3d7(_0x36c739(window[_0x2c35b2([0x4d,0x61,0x74,0x68])][_0x2c35b2([0x63,0x65,0x69,0x6c])](_0x15e05a/_0x1627d5)));window[_0x2c35b2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2c35b2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1db4b0,_0x4fd9c4);}function _0x191434(){const _0x1c23b7=_0x2c35b2([0x6c,0x6c,0x63,0x74,0x2d])+_0x36c739(_0x46f3ce(_0x660fe0)),_0x3660e0=window[_0x2c35b2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2c35b2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1c23b7);return _0x3660e0?window[_0x2c35b2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2b3d7(_0x3660e0),0x10)*_0x1627d5:null;}function _0x594a8a(_0x34889e){return new window[(_0x2c35b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57209b,_0x30ddea)=>{_0x34889e[_0x2c35b2([0x74,0x68,0x65,0x6e])](_0x57209b,_0x30ddea),window[_0x2c35b2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x30ddea,0x7347de73^_0x3c9758);});}}_0x43a487[_0x2c35b2([0x6f,0x6e])](_0x2c35b2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x4e3dcc,_0x5b5772)=>{if(_0x5b5772[0x0]!=_0x660fe0)return _0x322d62(_0x2c35b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5b5772[0x1]={..._0x5b5772[0x1],[_0x2c35b2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2132e6};},{[_0x2c35b2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2c35b2([0x68,0x69,0x67,0x68])}),_0x43a487[_0x2c35b2([0x6f,0x6e])](_0x2c35b2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4b4f56=>{_0x3ff9fd(_0x4b4f56[_0x2c35b2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4e8c5d=!0x0,_0x3b3c21(_0x4b4f56[_0x2c35b2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2c35b2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2c35b2([0x6c,0x6f,0x77])}),_0x4d1e86[_0x2c35b2([0x74,0x68,0x65,0x6e])](()=>{_0x4e8c5d||_0x322d62(_0x2c35b2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x6495e4(){return _0x43a487[_0x2c35b2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c35b2([0x76,0x69,0x65,0x77])][_0x2c35b2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2c35b2([0x61,0x75,0x74,0x6f]);}function _0xb0e3e5(){_0x43a487[_0x2c35b2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c35b2([0x76,0x69,0x65,0x77])][_0x2c35b2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2c35b2([0x61,0x75,0x74,0x6f]);}}function _0x1093d5(_0x559306){const _0x1a772d=[new window[(_0x2c35b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x194228=>setTimeout(_0x194228,0x734f347f^_0x3c9758)),_0x4d1e86[_0x2c35b2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2c35b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3cf8eb=>{let _0x2de569=0x0;_0x43a487[_0x2c35b2([0x6d,0x6f,0x64,0x65,0x6c])][_0x2c35b2([0x6f,0x6e])](_0x2c35b2([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x48720c,_0x4ee946)=>{_0x4ee946[0x0][_0x2c35b2([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2de569++,_0x2de569==(0x73460f5b^_0x3c9758)&&(_0x3cf8eb(),_0x48720c[_0x2c35b2([0x6f,0x66,0x66])]());});}))];return window[_0x2c35b2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2c35b2([0x72,0x61,0x63,0x65])](_0x1a772d)[_0x2c35b2([0x74,0x68,0x65,0x6e])](()=>_0x559306);}async function _0x1613a5(){await _0x4d1e86,_0x43a487[_0x2c35b2([0x6d,0x6f,0x64,0x65,0x6c])][_0x2c35b2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x325247,_0x43a487[_0x2c35b2([0x6d,0x6f,0x64,0x65,0x6c])][_0x2c35b2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x325247,_0x43a487[_0x2c35b2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2c35b2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x92b75a(){return window[_0x2c35b2([0x67,0x6c,0x6f,0x62])]&&window[_0x2c35b2([0x67,0x6c,0x6f,0x62])][_0x2c35b2([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1246e1(){return _0x6e6da0(_0x2c35b2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3b1d84(_0x2c35b2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2c35b2([0x73,0x74,0x61,0x74,0x65])]==_0x2c35b2([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4333e2(){return _0x6e6da0(_0x2c35b2([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 _0x4e9168(){return _0x6e6da0(_0x2c35b2([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x519616(_0x46ae2a){const _0x187ea1=_0xcf4be();_0x43a487[_0x187ea1]=_0x2c35b2([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x46ae2a,_0x46ae2a!=_0x2c35b2([0x56,0x61,0x6c,0x69,0x64])&&_0x1613a5();}function _0xcf4be(){const _0x38d98b=window[_0x2c35b2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2c35b2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2c35b2([0x6e,0x6f,0x77])]())[_0x2c35b2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2c35b2([0x2e]),'');let _0x202cc1=_0x2c35b2([0x4b]);for(let _0xd55941=0x0;_0xd55941<_0x38d98b[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd55941+=0x2){let _0xc5d076=window[_0x2c35b2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x38d98b[_0x2c35b2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd55941,_0xd55941+0x2));_0xc5d076>=_0x194471[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xc5d076-=_0x194471[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x202cc1+=_0x194471[_0xc5d076];}return _0x202cc1;}function _0x3dede9(){const _0x127ba1=_0x18144a[_0x2c35b2([0x73,0x70,0x6c,0x69,0x74])](_0x2c35b2([0x2e]));if(0x3!=_0x127ba1[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x194b9c(_0x127ba1[0x1]);function _0x194b9c(_0x17c42d){const _0x248e1e=_0x24e244(_0x17c42d);return _0x248e1e&&_0x1a9883()?_0x248e1e:null;function _0x1a9883(){const _0x27ea9a=_0x248e1e[_0x2c35b2([0x6a,0x74,0x69])],_0x2c114b=window[_0x2c35b2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x27ea9a[_0x2c35b2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x27ea9a[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x57012d={..._0x248e1e,[_0x2c35b2([0x6a,0x74,0x69])]:_0x27ea9a[_0x2c35b2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x27ea9a[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x57012d[_0x2c35b2([0x76,0x63])],_0x46f3ce(_0x57012d)==_0x2c114b;}}}async function _0x1d248d(){let _0x782a65=!0x0;try{const _0x3445fd=_0x18144a[_0x2c35b2([0x73,0x70,0x6c,0x69,0x74])](_0x2c35b2([0x2e])),[_0xb2645f,_0x105514,_0x583ca9]=_0x3445fd;return _0x4d0a20(_0xb2645f),await _0x5ceeb4(_0xb2645f,_0x105514,_0x583ca9),_0x782a65;}catch{return!0x1;}function _0x4d0a20(_0x3f4564){const _0x45c2fa=_0x24e244(_0x3f4564);_0x45c2fa&&_0x45c2fa[_0x2c35b2([0x61,0x6c,0x67])]==_0x2c35b2([0x45,0x53,0x32,0x35,0x36])||(_0x782a65=!0x1);}async function _0x5ceeb4(_0x3a2d3d,_0x420214,_0x241094){const _0x457972=window[_0x2c35b2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2c35b2([0x66,0x72,0x6f,0x6d])](_0x5901c0(_0x241094),_0xd37567=>_0xd37567[_0x2c35b2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x23b0c9=new window[(_0x2c35b2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2c35b2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3a2d3d+_0x2c35b2([0x2e])+_0x420214),_0x133835=window[_0x2c35b2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2c35b2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x133835)return;const _0x1ecbac=await _0x133835[_0x2c35b2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2c35b2([0x6a,0x77,0x6b]),_0x9de6f1,{[_0x2c35b2([0x6e,0x61,0x6d,0x65])]:_0x2c35b2([0x45,0x43,0x44,0x53,0x41]),[_0x2c35b2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2c35b2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2c35b2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x133835[_0x2c35b2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2c35b2([0x6e,0x61,0x6d,0x65])]:_0x2c35b2([0x45,0x43,0x44,0x53,0x41]),[_0x2c35b2([0x68,0x61,0x73,0x68])]:{[_0x2c35b2([0x6e,0x61,0x6d,0x65])]:_0x2c35b2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1ecbac,_0x457972,_0x23b0c9)||(_0x782a65=!0x1);}}function _0x24e244(_0x44beac){return _0x44beac[_0x2c35b2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2c35b2([0x65,0x79]))?JSON[_0x2c35b2([0x70,0x61,0x72,0x73,0x65])](_0x5901c0(_0x44beac)):null;}function _0x5901c0(_0x3cc6a6){return window[_0x2c35b2([0x61,0x74,0x6f,0x62])](_0x3cc6a6[_0x2c35b2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2c35b2([0x2b]))[_0x2c35b2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2c35b2([0x2f])));}function _0x46f3ce(_0x5224a3){let _0x1ae0bd=0x1505;function _0x378051(_0x45a1a8){for(let _0x4d9333=0x0;_0x4d9333<_0x45a1a8[_0x2c35b2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d9333++){const _0x471d0f=_0x45a1a8[_0x2c35b2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d9333);_0x1ae0bd=(_0x1ae0bd<<0x5)+_0x1ae0bd+_0x471d0f,_0x1ae0bd&=_0x1ae0bd;}}function _0x446f32(_0x307032){Array[_0x2c35b2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x307032)?_0x307032[_0x2c35b2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x446f32):_0x307032&&typeof _0x307032==_0x2c35b2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2c35b2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x307032)[_0x2c35b2([0x73,0x6f,0x72,0x74])]()[_0x2c35b2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x569e5f,_0x2d38f7])=>{_0x378051(_0x569e5f),_0x446f32(_0x2d38f7);}):_0x378051(window[_0x2c35b2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x307032));}return _0x446f32(_0x5224a3),_0x1ae0bd>>>0x0;}function _0x36c739(_0x5eea8d){return _0x5eea8d[_0x2c35b2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2c35b2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2c35b2([0x30]));}function _0x2b3d7(_0x20044c){return _0x20044c[_0x2c35b2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2c35b2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2c35b2([0x6a,0x6f,0x69,0x6e])]('');}function _0x6e6da0(_0x2a648e){return _0x43a487[_0x2c35b2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2c35b2([0x68,0x61,0x73])](_0x2a648e);}function _0x3b1d84(_0x5a17ee){return _0x43a487[_0x2c35b2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2c35b2([0x67,0x65,0x74])](_0x5a17ee);}function _0x325247(){}function _0x2c35b2(_0x1fad55){return _0x1fad55['map'](_0x1fec9b=>String['fromCharCode'](_0x1fec9b))['join']('');}_0x519616(await _0x189b92());}(this);}['destroy'](){const _0x1805a4=this['editor']['plugins']['get'](o),_0x15f0ab=this['editor']['config']['get']('collaboration.channelId');for(const _0x245a3f of _0x1805a4['getCommentThreads']({'channelId':_0x15f0ab}))_0x1805a4['_detachCommentThread'](_0x245a3f['id']),_0x1805a4['_threads']['delete'](_0x245a3f['id']);super['destroy']();}['hasMarkerForId'](_0x538a41){return this['getAllMarkersForId'](_0x538a41)['length']>0x0;}['getAllMarkersForId'](_0x137e49){const _0x5af73e=[];for(const _0x3ec2d4 of this['editor']['model']['markers'])_0x3ec2d4['name']['startsWith']('comment:'+_0x137e49)&&_0x5af73e['push'](_0x3ec2d4);return _0x5af73e;}['scrollToThreadMarker'](_0x454dc0){setTimeout(()=>{const _0x5a7c49=this['_getTargetForId'](_0x454dc0);if(!_0x5a7c49)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x454dc0&&nt({'target':_0x5a7c49[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5520ab){this['editor']['model']['change'](()=>{for(const _0x5c0023 of this['getAllMarkersForId'](_0x5520ab))this['editor']['editing']['reconvertMarker'](_0x5c0023);});}['_attachArchivedThread'](_0x32e516){const _0x33ebbf=this['editor']['plugins']['get'](o),_0x13113e=this['editor']['plugins']['get'](b),_0x1efaf4=_0x33ebbf['getCommentThread'](_0x32e516);if(!_0x1efaf4['isAttached']){const _0x51475c=_0x1efaf4['attachTo'](()=>this['_getTargetForId'](_0x1efaf4['id']));_0x13113e['registerAnnotation'](_0x51475c),_0x1efaf4['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x304e8e=this['editor'],_0x37a5a9=_0x304e8e['plugins']['get'](it);_0x304e8e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x13399f,_0x99508b)=>{const {id:_0xdd4f25}=ft(_0x13399f['markerName']),_0x3dd977=_0x304e8e['plugins']['get'](o)['getCommentThread'](_0xdd4f25),_0x3ecfb=this['activeMarker']&&ft(this['activeMarker'])['id']===_0xdd4f25;let _0x290a22;if(_0x3dd977&&_0x3dd977['isResolved']&&!_0x3ecfb&&_0x13399f['item'])return _0x99508b['consumable']['consume'](_0x13399f['item'],'addMarker:'+_0x13399f['markerName']),_0x99508b['consumable']['consume'](_0x13399f['item'],'removeMarker:'+_0x13399f['markerName']),null;const _0x2546f6=['ck-comment-marker'];return _0x3ecfb&&_0x2546f6['push']('ck-comment-marker--active'),_0x290a22=_0x3dd977?.['length']?_0x3dd977['comments']['first']['author']['id']:_0x37a5a9['me']['id'],{'classes':_0x2546f6,'attributes':{'data-comment':_0xdd4f25,'data-author-id':_0x290a22}};}}),_0x304e8e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x78a216,{options:_0x30e508})=>{if(_0x30e508['showCommentHighlights'])return null;const _0x3a3ab2=_0x304e8e['plugins']['get'](o),_0x2438b7=_0x304e8e['model']['markers']['get'](_0x78a216),{id:_0xaa18e7,part:_0x1ffec9}=ft(_0x78a216);return _0x2438b7&&!_0x2438b7['affectsData']||_0x30e508['ignoreResolvedComments']&&_0x3a3ab2['getCommentThread'](_0xaa18e7)?.['isResolved']?null:{'group':'comment','name':_0x1ffec9?_0xaa18e7+':'+_0x1ffec9:_0xaa18e7};}}),_0x304e8e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x45c53b,{writer:_0x17035c})=>_0x17035c['createElement']('$marker',{'data-name':'comment:'+_0x45c53b['getAttribute']('id')})}),_0x304e8e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x164054=this['editor'],_0x193dd1=_0x164054['plugins']['get'](o),_0x251963=new Set(),_0x2f4ca4=new Set();_0x164054['model']['document']['registerPostFixer'](_0x5e893a=>{let _0x5352ed=!0x1;for(const {name:_0x2c8de4,data:_0x2f473a}of _0x164054['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3a0bf4,id:_0x311fc8}=ft(_0x2c8de4);let _0x176b0d=_0x2f473a['newRange'];if('comment'!==_0x3a0bf4||!_0x176b0d)continue;const _0x23a51e='$graveyard'===_0x176b0d['root']['rootName'];_0x23a51e||(_0x176b0d=ht(_0x176b0d,_0x164054['model']),!_0x176b0d||_0x176b0d['isCollapsed']||!_0x2f473a['newRange']||_0x176b0d['isEqual'](_0x2f473a['newRange']))?_0x164054['model']['hasContent'](_0x176b0d)&&!_0x23a51e?this['isThreadsLoadingPaused']?_0x251963['add'](_0x2c8de4):this['_handleThreadMarker'](_0x2c8de4,_0x311fc8):(_0x2f4ca4['add'](_0x2c8de4),_0x251963['delete'](_0x2c8de4),_0x5e893a['removeMarker'](_0x2c8de4),_0x5352ed=!0x0):(_0x5e893a['updateMarker'](_0x2c8de4,{'range':_0x176b0d}),_0x5352ed=!0x0);}return _0x5352ed;}),this['on']('change:isThreadsLoadingPaused',(_0x342c33,_0x200cf7,_0x42ed28)=>{if(!_0x42ed28&&_0x251963['size'])for(const _0x1c3ace of _0x251963){const {id:_0x278936}=ft(_0x1c3ace);_0x251963['delete'](_0x1c3ace),_0x164054['model']['markers']['get'](_0x1c3ace)&&this['_handleThreadMarker'](_0x1c3ace,_0x278936);}}),this['listenTo'](_0x164054['model']['document'],'change',()=>{for(const {name:_0x3919b7,data:{newRange:_0xb51d0b}}of _0x164054['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3cb8c2,id:_0x1b0ecb}=ft(_0x3919b7);if('comment'!==_0x3cb8c2)continue;const _0x573d6f=_0x193dd1['getCommentThread'](_0x1b0ecb),_0x42c086=this['hasMarkerForId'](_0x1b0ecb);_0x573d6f&&(!_0x573d6f['_hasTargetInContent']&&_0xb51d0b&&_0x164054['editing']['view']['once']('render',()=>{const _0x283652=_0x164054['plugins']['get'](y),_0x478ff6=_0x193dd1['_threadToController']['get'](_0x573d6f)['view'];_0x283652['getByInnerView'](_0x478ff6)['refreshVisibility']();},{'priority':'low'}),_0x573d6f['_hasTargetInContent']=_0x42c086||!!_0xb51d0b),_0xb51d0b||(_0x2f4ca4['add'](_0x3919b7),_0x251963['delete'](_0x3919b7));}for(const _0x10459d of _0x2f4ca4){const {id:_0x246629}=ft(_0x10459d),_0x30f148=_0x193dd1['getCommentThread'](_0x246629);if(_0x251963['delete'](_0x10459d),!_0x30f148)continue;const _0x3da198=this['hasMarkerForId'](_0x246629);_0x3da198||_0x30f148['isSubmitted']?_0x3da198||_0x30f148['unlinkedAt']||_0x30f148['setUnlinkedAt'](new Date()):_0x30f148['remove']();}_0x2f4ca4['clear']();});}['_handleInitialThreads'](_0x364699){_0x364699['forEach'](_0x36e3d6=>{_0x36e3d6['unlinkedAt']&&this['_attachArchivedThread'](_0x36e3d6['id']);});}['_getTargetForId'](_0x1730c0){const _0x27efac=this['editor'],_0x57de93=this['getAllMarkersForId'](_0x1730c0);return et(_0x27efac['editing'],_0x57de93);}['_getTextContext'](_0x14f1ee){const _0x2e0bf8=this['getAllMarkersForId'](_0x14f1ee);let _0x5d568d='',_0x1da888=!0x1;for(const _0xb09946 of _0x2e0bf8){const _0x5c671=_0xb09946['getRange']();for(const _0x3a5b7c of Array['from'](_0x5c671['getItems']()))_0x3a5b7c['is']('$textProxy')?(_0x5d568d&&_0x1da888&&(_0x5d568d+='\x20',_0x1da888=!0x1),_0x5d568d+=_0x3a5b7c['data']):_0x1da888=!0x0;_0x1da888=!0x0;}return _0x5d568d['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xdf8042,_0x47e554){const _0xbbbf19=this['editor'],_0x512582=_0xbbbf19['plugins']['get'](o);let _0x53a170=_0x512582['getCommentThread'](_0x47e554);const _0x18157c=_0xbbbf19['config']['get']('collaboration.channelId'),_0x4c2d1a=_0xbbbf19['plugins']['get'](b);if(_0x53a170&&(_0x53a170['unlinkedAt']&&_0x53a170['setUnlinkedAt'](null),_0x53a170['isAttached']))return _0x53a170;return!this['getAllMarkersForId'](_0x47e554)[0x0]['managedUsingOperations']?_0xbbbf19['editing']['view']['once']('render',()=>{if(_0x512582['getCommentThread'](_0x47e554))return;const _0x2cdb92=_0xbbbf19['plugins']['get'](y);_0x53a170=_0x512582['openNewCommentThread']({'channelId':_0x18157c,'threadId':_0x47e554,'target':()=>this['_getTargetForId'](_0x47e554),'context':{'type':'text','value':this['_getTextContext'](_0x47e554)}});const _0x4d5ff0=_0x512582['_threadToController']['get'](_0x53a170)['view'],_0x2b9a54=_0x2cdb92['getByInnerView'](_0x4d5ff0);_0x2b9a54&&_0x4c2d1a['registerAnnotation'](_0x2b9a54);},{'priority':'low'}):_0x512582['fetchCommentThread']({'channelId':_0x18157c,'threadId':_0x47e554})['then'](_0x1263c7=>{if('destroyed'!==_0xbbbf19['state']){if(_0x53a170=_0x1263c7,_0x53a170&&!_0x53a170['isAttached']){const _0xd7e282=_0x53a170['attachTo'](()=>this['_getTargetForId'](_0x47e554));_0x4c2d1a['registerAnnotation'](_0xd7e282),_0x53a170['isResolved']&&this['_reconvertMarkers'](_0x47e554);}else{if(!_0x53a170){const _0x190296=this['getAllMarkersForId'](_0x47e554);_0xbbbf19['model']['change'](_0x1aeaa9=>{for(const _0x1eb520 of _0x190296)_0x1aeaa9['removeMarker'](_0x1eb520);});}}}}),_0x53a170;}['_handleThreadMarker'](_0x557b5c,_0x321a7d){const _0x3dce63=this['_attachMarkerToThread'](_0x557b5c,_0x321a7d);_0x3dce63&&!_0x3dce63['context']&&_0x3dce63['setContext']({'type':'text','value':this['_getTextContext'](_0x321a7d)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5b198c=this['editor'];rt(_0x5b198c['model'],({left:_0x20102a,entered:_0x2630ca})=>{for(const _0xd8c3c5 of _0x20102a)if(mt(_0xd8c3c5)){_0x5b198c['ui']['ariaLiveAnnouncer']['announce'](N(_0x5b198c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xf7002 of _0x2630ca)if(mt(_0xf7002)){_0x5b198c['ui']['ariaLiveAnnouncer']['announce'](N(_0x5b198c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x17a949)));break;}});}}function dt(_0x313ebc,_0x98c9){return _0x98c9?_0x313ebc+':'+_0x98c9:_0x313ebc;}function ht(_0x5bf8d1,_0x23e86c){const _0x4e2600=_0x23e86c['schema'],_0x33651e=_0x23e86c['createRange'](_0x5bf8d1['start']);for(const _0x380a9c of _0x5bf8d1['getWalker']()){const {type:_0x3433cd,item:_0x341de8,nextPosition:_0x2d3cf3}=_0x380a9c;if('text'===_0x3433cd||_0x4e2600['isObject'](_0x341de8)){const _0x4c6f56=_0x23e86c['createPositionBefore'](_0x341de8);_0x33651e['isCollapsed']&&(_0x33651e['start']=_0x4c6f56),_0x33651e['end']=_0x2d3cf3;}}return _0x33651e;}function mt(_0x4c0a47){return'comment'===ft(_0x4c0a47['name'])['group'];}class s extends _0x4626af{['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 _0x5d68ad=this['editor'],_0x154036=_0x5d68ad['plugins']['get'](o),_0x2dd5e7=_0x5d68ad['plugins']['get'](r),_0x961e5f=_0x5d68ad['plugins']['get'](y),_0x8633e2=_0x5d68ad['plugins']['get'](b);_0x5d68ad['ui']['componentFactory']['add']('comment',()=>{const _0x492773=this['_createUIButton'](_0x739e9c);return _0x492773['tooltip']=!0x0,_0x492773;}),_0x5d68ad['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x76ce93)),_0x8633e2['addSourceCollector'](()=>{const _0x522fdf=[];for(const [_0x768980,_0xebbdb1]of _0x154036['_threadToController']){const _0x26a4b1=_0x2dd5e7['getAllMarkersForId'](_0x768980['id']),_0x41c047=_0x26a4b1['map'](_0x251c8a=>_0x251c8a['getRange']());_0x26a4b1['length']>0x0&&_0x522fdf['push']([_0xebbdb1['view'],_0x41c047]);}return _0x522fdf;}),this['listenTo'](_0x961e5f,'change:activeAnnotations',(_0x5dd31b,_0x243595,_0xae9b7e)=>{const _0x10f694=Array['from'](_0xae9b7e)['map'](_0x1cab42=>_0x1cab42['innerView'])['find'](_0x43b4fd=>_0x154036['_viewToController']['has'](_0x43b4fd));if(!_0x10f694)return void(_0x2dd5e7['activeMarker']=null);const _0x37407b=_0x154036['_viewToController']['get'](_0x10f694)['model']['id'],_0x3fb7b6='comment:'+_0x37407b;_0x37407b&&_0x2dd5e7['hasMarkerForId'](_0x37407b)?_0x2dd5e7['activeMarker']=_0x3fb7b6:_0x2dd5e7['activeMarker']&&(_0x2dd5e7['activeMarker']=null);}),this['listenTo'](_0x154036,'removeCommentThread',(_0x197bcc,{threadId:_0x3d5ca2,isFromAdapter:_0x30c6e2})=>{!_0x30c6e2&&_0x5d68ad['ui']['focusTracker']['isFocused']&&_0x2dd5e7['hasMarkerForId'](_0x3d5ca2)&&_0x5d68ad['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x154036,'addComment',(_0x46f6ac,{threadId:_0x46ca98,isFromAdapter:_0x20c950})=>{if(_0x20c950||!_0x2dd5e7['hasMarkerForId'](_0x46ca98)||!_0x154036['hasCommentThread'](_0x46ca98))return;0x1===_0x154036['getCommentThread'](_0x46ca98)['length']&&(_0x5d68ad['editing']['view']['focus'](),_0x46f6ac['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5a1efc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27be9e;for(const _0x2c56d8 in _0x5a1efc){const _0x535b28=_0x2c56d8,_0x85d728=_0x5a1efc[_0x535b28];if('commentsLicenseKeyValid'==_0x85d728||'commentsLicenseKeyInvalid'==_0x85d728||'commentsLicenseKeyExpired'==_0x85d728||'commentsLicenseKeyDomainLimit'==_0x85d728||'commentsLicenseKeyNotAllowed'==_0x85d728||'commentsLicenseKeyEvaluationLimit'==_0x85d728||'commentsLicenseKeyUsageLimit'==_0x85d728){delete _0x5a1efc[_0x535b28],_0x27be9e=_0x85d728,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27be9e&&_0x5a1efc['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27be9e&&_0x5a1efc['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27be9e&&_0x5a1efc['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27be9e&&_0x5a1efc['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27be9e&&_0x5a1efc['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x27be9e&&_0x5a1efc['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x14607c){const _0x4dd227=this['editor'],_0x2cf4e9=new _0x14607c(_0x4dd227['locale']),_0x40ca63=_0x4dd227['commands']['get']('addCommentThread');return _0x2cf4e9['set']({'label':N(_0x4dd227['locale'],'Comment'),'icon':_0x1d452d}),_0x2cf4e9['bind']('isEnabled')['to'](_0x40ca63,'isEnabled',_0x40ca63,'hasContent',(_0x29dd1b,_0x386ca9)=>_0x29dd1b&&_0x386ca9),this['listenTo'](_0x2cf4e9,'execute',()=>{_0x40ca63['execute']();}),_0x2cf4e9;}}class i extends _0x4626af{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x24b34c){super(_0x24b34c),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4ca737,_0x29ae70,_0x197814)=>{_0x197814?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x6fa87c,_0x2b228e]of this['editor']['commands'])_0x2b228e['affectsData']&&'addCommentThread'!==_0x6fa87c&&_0x2b228e['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x2a1852=this['editor']['editing']['view']['document'];this['listenTo'](_0x2a1852,'cut',_0x364b9e=>_0x364b9e['stop'](),{'priority':'highest'}),this['listenTo'](_0x2a1852,'clipboardInput',_0x4cb687=>_0x4cb687['stop'](),{'priority':'highest'}),this['listenTo'](_0x2a1852,'delete',_0x533811=>_0x533811['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x51d379,_0x372661]of this['editor']['commands'])_0x372661['affectsData']&&'addCommentThread'!==_0x51d379&&_0x372661['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x603ec2{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1e1712){super(_0x1e1712),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2c6d9b=this['context']['plugins']['get'](y);this['listenTo'](_0x2c6d9b,'_activateAnnotation',(_0x7abc63,_0x1548e0)=>{for(const _0x5a8771 of this['activeUIs']){const _0x4453d7=this['_uis']['get'](_0x5a8771);(0x0,this['uisData']['get'](_0x5a8771)['filter'])(_0x1548e0)&&_0x4453d7['setActiveAnnotation'](_0x1548e0);}}),this['listenTo'](_0x2c6d9b,'_deactivateAllAnnotations',()=>{for(const _0x2774db of this['activeUIs']){this['_uis']['get'](_0x2774db)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2c6d9b['_visibleAnnotations'],'add',(_0x2431cd,_0x5bd528)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5bd528);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4f02ae){return this['activeUIs']['has'](_0x4f02ae);}['activate'](_0x289310,_0x19e7d1=this['defaultFilter']){const _0x5c7563=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x289310))throw new _0x4482e2('annotationsuis-missing-ui',this,{'uiName':_0x289310});this['isActive'](_0x289310)&&this['deactivate'](_0x289310),this['activeUIs']['add'](_0x289310);const _0x21632f=new S();v({'source':_0x5c7563['_visibleAnnotations'],'target':_0x21632f,'filter':_0x19e7d1}),this['uisData']['set'](_0x289310,{'collection':_0x21632f,'filter':_0x19e7d1});const _0x3bf2d2=this['_uis']['get'](_0x289310);_0x3bf2d2['attach'](_0x21632f),this['listenTo'](_0x3bf2d2,'change:activeAnnotation',(_0x494080,_0x103442,_0x3b6588,_0x16239c)=>{_0x16239c&&_0x5c7563['_removeActiveAnnotation'](_0x16239c),_0x3b6588&&_0x5c7563['_addActiveAnnotation'](_0x3b6588);});}['deactivate'](_0x573cbb){if(this['activeUIs']['delete'](_0x573cbb),!this['_uis']['has'](_0x573cbb))throw new _0x4482e2('annotationsuis-missing-ui',this,{'uiName':_0x573cbb});const _0xe424bd=this['_uis']['get'](_0x573cbb);_0xe424bd['detach'](),this['stopListening'](_0xe424bd),this['uisData']['get'](_0x573cbb)['collection']['destroy'](),this['uisData']['delete'](_0x573cbb);}['switchTo'](_0x183a50){if(!this['_uis']['has'](_0x183a50))throw new _0x4482e2('annotationsuis-missing-ui',this,{'uiName':_0x183a50});const _0x46b465=this['context']['plugins']['get'](y),_0x31240c=Array['from'](_0x46b465['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x183a50);const _0xb854e5=this['_uis']['get'](_0x183a50);_0xb854e5['setActiveAnnotation'](_0x31240c),_0xb854e5['_setSelectedAnnotations']&&_0x31240c&&_0xb854e5['_setSelectedAnnotations']([_0x31240c]);}['deactivateAll'](){for(const _0x411f1e of this['activeUIs'])this['deactivate'](_0x411f1e);}['register'](_0x41bcb4,_0x1f4eea){if(this['_uis']['has'](_0x41bcb4))throw new _0x4482e2('annotationsuis-register-already-registered');if('function'!=typeof _0x1f4eea['attach']||'function'!=typeof _0x1f4eea['detach']||'function'!=typeof _0x1f4eea['setActiveAnnotation'])throw new _0x4482e2('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x41bcb4,_0x1f4eea);}['refilterAnnotations'](){const _0x3c97d4=this['context']['plugins']['get'](y)['collection'],_0x2b90d6=new Map(),_0x14e998=Array['from'](this['activeUIs']);for(const _0x31c461 of this['activeUIs']){const _0x4209a5=this['uisData']['get'](_0x31c461)['collection'];for(const _0x4cd1ab of _0x4209a5)_0x2b90d6['set'](_0x4cd1ab,_0x31c461);}for(const _0x2c5041 of _0x3c97d4){const _0x567d1a=_0x2b90d6['get'](_0x2c5041);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2c5041);const _0x354261=_0x14e998['find'](_0x34bfd3=>this['uisData']['get'](_0x34bfd3)['filter'](_0x2c5041));_0x567d1a!==_0x354261&&(_0x567d1a&&this['uisData']['get'](_0x567d1a)['collection']['remove'](_0x2c5041),_0x354261&&this['uisData']['get'](_0x354261)['collection']['add'](_0x2c5041));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4b0ed9){const _0x181117=[];for(const _0x18a9a2 of this['activeUIs']){(0x0,this['uisData']['get'](_0x18a9a2)['filter'])(_0x4b0ed9)&&_0x181117['push'](_0x18a9a2);}if(_0x181117['length']>0x1)throw new _0x4482e2('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x181117,'annotationType':_0x4b0ed9['type']});}}const _i=/* #__PURE__ -- @preserve */
32
- Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x786fc4){super(_0x786fc4);const _0x399466=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 _0x2d4383(),this['focusCycler']=new _0xc7089f({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x399466['to']('class')],'style':{'minHeight':_0x399466['to']('minHeight',_0x19bf61=>'number'==typeof _0x19bf61?_i(_0x19bf61+0xa):null)},'dir':_0x786fc4['uiLanguageDirection'],'role':'application','aria-label':N(_0x786fc4,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x786fc4,'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',_0x340139=>{this['_updateItemPositionInFocusables'](_0x340139['source']);}),this['list']['forEach'](_0xa46446=>{this['focusTracker']['add'](_0xa46446['element']),this['_updateItemPositionInFocusables'](_0xa46446);}),this['list']['on']('change',(_0x49c54d,_0x45f91f)=>{for(const _0x2dc18c of _0x45f91f['removed'])this['focusTracker']['remove'](_0x2dc18c['element']),this['focusables']['remove'](_0x2dc18c);for(const _0x141fcc of _0x45f91f['added'])this['focusTracker']['add'](_0x141fcc['element']),this['_updateItemPositionInFocusables'](_0x141fcc);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x16c7f2){const _0xdee36a=this['focusables']['getIndex'](_0x16c7f2);let _0x2482e1,_0x222aaa;for(const _0x595e5b of this['focusables'])if(_0x16c7f2['top']<_0x595e5b['top']){_0x2482e1=_0x595e5b;break;}if(_0x222aaa=_0x2482e1?this['focusables']['getIndex'](_0x2482e1):this['focusables']['length'],-0x1!==_0xdee36a){if(_0xdee36a===_0x222aaa-0x1)return;this['focusables']['remove'](_0x16c7f2),_0x222aaa=_0x2482e1?this['focusables']['getIndex'](_0x2482e1):this['focusables']['length'];}this['focusables']['add'](_0x16c7f2,_0x222aaa);}}const Ot=/* #__PURE__ -- @preserve */
33
- Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x83162e){super(_0x83162e),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x48875b,_0x34c447)=>_0x48875b+_0x34c447),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2cd2cd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2cd2cd['to']('isAnimationDisabled',_0x544e79=>_0x544e79?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2cd2cd['to']('top',_0x10a659=>Ot(_0x10a659))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3ec064=this['element']['clientHeight'];_0x3ec064&&(this['height']=_0x3ec064);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x603ec2{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x286fde){super(_0x286fde),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 _0x398486=this['context']['config']['get']('sidebar.container');_0x398486&&this['setContainer'](_0x398486);}['setContainer'](_0x1759aa){if(!g(_0x1759aa))throw new _0x4482e2('sidebar-setcontainer-invalid-element');this['container']=_0x1759aa;}['_attachToContainer']({viewClass:_0x570cfb='',spaceBetweenItems:_0x2c0a0a=0x19}={}){if(!g(this['container']))throw new _0x4482e2('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x570cfb,this['_spaceBetweenItems']=_0x2c0a0a;}['rearrange']({removedAnnotation:_0x16bc00,previousAnnotation:_0xa379ab,nextAnnotation:_0x591ba8}){const _0x5ba9e0=this['getSidebarItemView'](_0x16bc00);this['view']['list']['remove'](_0x5ba9e0),this['_destroySidebarItemView'](_0x16bc00),_0xa379ab&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xa379ab)),_0x591ba8&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x591ba8)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5c6e9c,activatedAnnotation:_0xeb5399,disableAnimationOnActivatedAnnotation:_0x1ca494}){if(this['_activeAnnotation']=_0xeb5399,_0x5c6e9c){_0x5c6e9c['isActive']=!0x1;const _0x44c26c=this['getSidebarItemView'](_0x5c6e9c);_0x44c26c&&_0x1ca494&&(_0x44c26c['isAnimationDisabled']=!0x1);}if(_0xeb5399){const _0x11ced9=this['getSidebarItemView'](_0xeb5399);_0x11ced9&&(_0xeb5399['isActive']=!0x0,_0x1ca494&&(_0x11ced9['isAnimationDisabled']=!0x0,_0x11ced9['top']+=0x1),this['_alignToTargetRect'](_0x11ced9));}}['_detachFromContainer'](_0x3b7532){if(this['view']['element']['remove'](),_0x3b7532){for(const _0x51e530 of _0x3b7532)this['_destroySidebarItemView'](_0x51e530);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1df299,_0xf093cb){_0xf093cb||(_0xf093cb=_0x1df299['view']);const _0x532391=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x532391,_0x1df299),this['_annotationToSidebarItemView']['set'](_0x1df299,_0x532391),_0x532391['content']['add'](_0xf093cb),this['listenTo'](_0x1df299['view'],'change:targetRect',(_0x34c153,_0x4c10c1,_0x4ea1cb)=>{const _0x44cb64=this['_getTargetTop'](_0x1df299,_0x4ea1cb);_0x532391['_targetTop']!=_0x44cb64&&(_0x532391['_targetTop']=_0x44cb64,this['_setItemTop'](_0x532391,_0x44cb64));}),this['listenTo'](_0x532391,'change:top',()=>{this['_recalculate'](_0x532391,'top');}),this['listenTo'](_0x532391,'change:bottom',()=>{this['_recalculate'](_0x532391,'bottom');}),this['_alignToTargetRect'](_0x532391);const _0x3424bb=this['_getItemBefore'](_0x532391);if(_0x3424bb)this['_alignAfterItem'](_0x3424bb,_0x532391)||this['_alignToTargetRect'](_0x532391);else this['_alignToTargetRect'](_0x532391);return this['_updateLastItem'](),this['view']['list']['add'](_0x532391),_0x532391;}['_alignForTopChange'](_0x312429){if(!_0x312429['content']['length'])return;const _0x2ae976=this['_getItemBefore'](_0x312429);if(!_0x2ae976)return;const _0x4e220f=this['_sidebarItemViewToAnnotation']['get'](_0x2ae976),_0x5c711c=this['_activeAnnotation'];_0x5c711c&&_0x5c711c===_0x4e220f?this['_alignAfterItem'](_0x2ae976,_0x312429):this['_alignBeforeItem'](_0x312429,_0x2ae976);}['_alignForBottomChange'](_0x120eb8){if(!_0x120eb8['content']['length'])return;const _0x4dfd0f=this['_getItemAfter'](_0x120eb8);if(!_0x4dfd0f)return;const _0x17f6be=this['_sidebarItemViewToAnnotation']['get'](_0x4dfd0f),_0x5b7aa5=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5efed1=this['_activeAnnotation'];_0x5efed1&&_0x5efed1===_0x17f6be&&_0x5b7aa5?(this['_alignBeforeItem'](_0x4dfd0f,_0x120eb8),this['_alignAfterItem'](_0x120eb8,_0x4dfd0f)):_0x5efed1&&_0x5efed1===_0x17f6be?this['_alignBeforeItem'](_0x4dfd0f,_0x120eb8):this['_alignAfterItem'](_0x120eb8,_0x4dfd0f);}['_recalculate'](_0x23b27d,_0x35a11e){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x23b9e5,changedProp:_0x2706a2}of this['_recalculateBuffer'])'top'===_0x2706a2?this['_alignForTopChange'](_0x23b9e5):this['_alignForBottomChange'](_0x23b9e5);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x23b27d,'changedProp':_0x35a11e});}['getSidebarItemView'](_0x29e220){return this['_annotationToSidebarItemView']['get'](_0x29e220);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4deae0){const _0x4f95bb=this['getSidebarItemView'](_0x4deae0);this['stopListening'](_0x4f95bb),this['stopListening'](_0x4deae0['view']),_0x4f95bb['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4deae0),this['_sidebarItemViewToAnnotation']['delete'](_0x4f95bb);}['_createSidebarView'](){const _0x11e928=new H(this['context']['locale']);return _0x11e928['render'](),this['on']('change:_lastItem',(_0x44847a,_0x329324,_0x32dae4,_0x46ca1d)=>{_0x46ca1d&&_0x11e928['unbind']('minHeight'),_0x32dae4?_0x11e928['bind']('minHeight')['to'](_0x32dae4,'bottom'):_0x11e928['minHeight']=null;}),_0x11e928;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x76f489){const _0x19fa2c=this['_sidebarItemViewToAnnotation']['get'](_0x76f489),_0x334a27=_0x19fa2c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x19fa2c)-0x1);return _0x334a27&&this['getSidebarItemView'](_0x334a27)||null;}['_getItemAfter'](_0x21c9d5){const _0x44c576=this['_sidebarItemViewToAnnotation']['get'](_0x21c9d5),_0x293e63=_0x44c576&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x44c576)+0x1);return _0x293e63&&this['getSidebarItemView'](_0x293e63)||null;}['_alignBeforeItem'](_0x5a6bf3,_0x2c5db9){_0x5a6bf3['updateHeight']();const _0x3e25ec=G(_0x2c5db9['bottom']+this['_spaceBetweenItems'],_0x5a6bf3['top']);return!!_0x3e25ec&&(this['_setItemTop'](_0x2c5db9,_0x2c5db9['top']-_0x3e25ec),!0x0);}['_alignAfterItem'](_0x47f5ab,_0xfaac4a){_0x47f5ab['updateHeight']();const _0x3d70d7=G(_0x47f5ab['bottom']+this['_spaceBetweenItems'],_0xfaac4a['top']);return!!_0x3d70d7&&(this['_setItemTop'](_0xfaac4a,_0xfaac4a['top']+_0x3d70d7,!0x1),!0x0);}['_alignToTargetRect'](_0x142728){const _0x57486b=this['_sidebarItemViewToAnnotation']['get'](_0x142728);if(!_0x57486b||!_0x57486b['target']||!_0x57486b['targetRect'])return;const _0x569fc2=this['_getTargetTop'](_0x57486b,_0x57486b['targetRect']);this['_setItemTop'](_0x142728,_0x569fc2);}['_getTargetTop'](_0x3fd7d9,_0x5950a1){if(null===_0x5950a1)return 0x0;if(_0x3fd7d9['target']instanceof _0x1e3fe4)return _0x5950a1['top'];{const _0x4eacf4=new _0x1e3fe4(this['view']['element'])['top'];return _0x5950a1['top']-_0x4eacf4;}}['_setItemTop'](_0xbd6bf2,_0x575385,_0xbcf2a9=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xbcf2a9&&(_0x575385=Math['max'](_0x575385,this['_getMaxAvailableTop'](_0xbd6bf2))),_0xbd6bf2['top']=_0x575385;}['_getMaxAvailableTop'](_0x1a703c){let _0x10749a=this['_getItemBefore'](_0x1a703c),_0x366343=0x0;for(;_0x10749a;)_0x10749a['updateHeight'](),_0x366343+=this['_spaceBetweenItems']+_0x10749a['height'],_0x10749a=this['_getItemBefore'](_0x10749a);return _0x366343;}}function G(_0x1a2f4c,_0x1d28c4){return Math['max'](_0x1a2f4c-_0x1d28c4,0x0);}function g(_0x415b85){return null!==_0x415b85&&'object'==typeof _0x415b85&&0x1===_0x415b85['nodeType'];}class e extends _0x603ec2{['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(_0x5beda6){super(_0x5beda6),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x2ba4d0(),this['_refreshPositioningDebounced']=_0x2a6dac(()=>{_0x5beda6['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x24f78d=this['context']['plugins']['get'](j),_0x143b82=this['context']['plugins']['get'](z);_0x24f78d['register']('wideSidebar',this),_0x143b82['container']&&_0x24f78d['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x51bbf6){if(_0x51bbf6===this['activeAnnotation'])return;const _0x189519=this['context']['plugins']['get'](z);_0x189519['_activeAnnotation']=_0x51bbf6;const _0x1bfd6f=this['activeAnnotation'];_0x189519['refresh']({'blurredAnnotation':_0x1bfd6f,'activatedAnnotation':_0x51bbf6}),this['activeAnnotation']=_0x51bbf6;}['attach'](_0x40f4ab){this['annotations']=_0x40f4ab;const _0x5e1e89=this['context']['plugins']['get'](z);if(_0x5e1e89['_annotations']=_0x40f4ab,this['isAttached'])throw new _0x4482e2('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5e1e89,'set:container',()=>{this['detach'](),this['listenTo'](_0x5e1e89,'change:container',_0x515bb2=>{_0x515bb2['off'](),this['attach'](_0x40f4ab);});}),_0x5e1e89['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2722d2=_0x563629=>{_0x563629['updateTargetRect'](),_0x5e1e89['addAnnotation'](_0x563629);};for(const _0x2c4c98 of _0x40f4ab)_0x2722d2(_0x2c4c98);this['listenTo'](_0x40f4ab,'add',(_0x53600d,_0x3a3deb)=>{_0x2722d2(_0x3a3deb);}),this['listenTo'](_0x40f4ab,'remove',(_0x5d1350,_0x3b239a,_0x194091)=>{_0x5e1e89['rearrange']({'removedAnnotation':_0x3b239a,'previousAnnotation':_0x40f4ab['get'](_0x194091-0x1),'nextAnnotation':_0x40f4ab['get'](_0x194091+0x1)}),_0x3b239a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x40f4ab,'focus',(_0x219113,_0x52e21f)=>{this['setActiveAnnotation'](_0x52e21f);}),this['listenTo'](_0x40f4ab,'blur',()=>{this['setActiveAnnotation'](null);});const _0x34deab=this['context']instanceof _0x53ff68?this['context']['editors']:new _0x2ba4d0([this['context']]);for(const _0x241fee of _0x34deab)this['_integrateWithEditorAnnotations'](_0x241fee);this['listenTo'](_0x34deab,'add',(_0x2e486f,_0x48acb8)=>{this['listenTo'](_0x48acb8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x48acb8);});}),this['listenTo'](_0x34deab,'remove',(_0x4a2930,_0x541d5b)=>{_0x541d5b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x541d5b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4482e2('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1555f2=this['context']['plugins']['get'](z);_0x1555f2['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1555f2),this['stopListening'](this['annotations']),this['context']instanceof _0x53ff68&&this['stopListening'](this['context']['editors']);for(const _0x14fea4 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x14fea4);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x48b633){if(!_0x48b633['plugins']['has']('EditorAnnotations'))return;const _0x4145e1=_0x48b633['plugins']['get']('EditorAnnotations'),_0x2fdfb6=()=>{const _0x212055=_0x4145e1['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x212055[0x0]||null);};this['listenTo'](_0x4145e1,'refresh',_0x2fdfb6),this['listenTo'](_0x4145e1,'blur',(_0xcb4c62,{isAnnotationTracked:_0x3a5bab})=>{this['activeAnnotation']&&_0x3a5bab(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4145e1,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xee3369=>{_0x4145e1['hasDomSelection']()&&(_0x2fdfb6(),_0xee3369['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4145e1);}['_destroyEditorAnnotationsIntegration'](_0x1c31d0){this['stopListening'](_0x1c31d0),this['_editorAnnotations']['remove'](_0x1c31d0);}}class C extends _0x739e9c{['counterView'];constructor(_0x51b85a){super(_0x51b85a);const _0x43bbdd=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3b96d8,_0xef4d57)=>_0x3b96d8?'...':_0xef4d57['toString']()),this['set']('annotationType',''),this['icon']=_0x1d452d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x43bbdd['to']('annotationType',_0x16e9be=>'ck-annotation-counter__badge--'+_0x16e9be),_0x43bbdd['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x43bbdd['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x603ec2{['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(_0x3d8329){super(_0x3d8329),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x535b73())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x2ba4d0(),this['_refreshPositioningDebounced']=_0x2a6dac(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x30b4e7(this['context']['locale']),this['balloonPanelView']=new _0x5cbf50(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x31acc0){this['annotations']=_0x31acc0;const _0x4565bc=this['context']['plugins']['get'](z),_0x89f0d4=this['balloonPanelView'];if(_0x4565bc['_annotations']=_0x31acc0,this['isAttached'])throw new _0x4482e2('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4565bc,'set:container',()=>{this['detach'](),this['listenTo'](_0x4565bc,'change:container',_0x35ac5f=>{_0x35ac5f['off'](),this['attach'](_0x31acc0);});}),_0x4565bc['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2de7bd=_0x65ba4f=>{const _0x444515=new C(this['context']['locale']);_0x4565bc['addAnnotation'](_0x65ba4f,_0x444515),this['_annotationToNarrowView']['set'](_0x65ba4f,_0x444515),_0x444515['bind']('isDirty','annotationType','number')['to'](_0x65ba4f['view'],'isDirty','type','length'),_0x444515['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x89f0d4['content']['first']!==_0x65ba4f['view']?(this['_showBalloon'](_0x65ba4f),_0x65ba4f['view']['element']['focus'](),this['setActiveAnnotation'](_0x65ba4f)):this['setActiveAnnotation'](null);});};for(const _0x40e774 of _0x31acc0)_0x2de7bd(_0x40e774);this['listenTo'](_0x31acc0,'add',(_0x27eeb5,_0x412c71)=>{_0x2de7bd(_0x412c71);}),this['listenTo'](_0x31acc0,'remove',(_0x41cf2e,_0x55a0cd,_0x388fe2)=>{this['_annotationToNarrowView']['get'](_0x55a0cd)['destroy'](),this['_annotationToNarrowView']['delete'](_0x55a0cd),_0x4565bc['rearrange']({'removedAnnotation':_0x55a0cd,'previousAnnotation':_0x31acc0['get'](_0x388fe2-0x1),'nextAnnotation':_0x31acc0['get'](_0x388fe2+0x1)}),_0x55a0cd===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x31acc0,'focus',(_0x49d94f,_0x4f95cc)=>{this['setActiveAnnotation'](_0x4f95cc);}),this['listenTo'](_0x31acc0,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x11140e,_0x3c9510)=>{_0x3c9510['keyCode']===_0x1e8e2a['esc']&&_0x89f0d4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x89f0d4['content']['first']),this['_hideBalloon'](),_0x3c9510['stopPropagation'](),_0x3c9510['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x17fdb0,_0x3ac835)=>{const _0x1b8f45=_0x3ac835['target'];_0x89f0d4['isVisible']&&_0x89f0d4['element']['contains'](_0x1b8f45)||_0x4565bc['view']['element']['contains'](_0x1b8f45)||_0x17fdb0['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x21d5af=>_0x21d5af['contains'](_0x1b8f45))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x539e56=this['context']instanceof _0x53ff68?this['context']['editors']:new _0x2ba4d0([this['context']]);for(const _0x21402e of _0x539e56)this['_integrateWithEditorAnnotations'](_0x21402e);this['listenTo'](_0x539e56,'add',(_0x104025,_0x2e18f2)=>{this['listenTo'](_0x2e18f2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2e18f2);});}),this['listenTo'](_0x539e56,'remove',(_0x1c320d,_0x3c144e)=>{_0x3c144e['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3c144e['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x58204d){if(_0x58204d===this['activeAnnotation'])return;const _0x28e7b4=this['context']['plugins']['get'](z);if(_0x28e7b4['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x58204d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x58204d)_0x28e7b4['getSidebarItemView'](_0x58204d)?this['_showBalloon'](_0x58204d):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x58204d;}['detach'](){if(!this['isAttached'])throw new _0x4482e2('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1153bd=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1dd19a=>_0x1dd19a['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1153bd['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x53ff68&&this['stopListening'](this['context']['editors']);for(const _0x51c170 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x51c170);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'](_0x3b539b){if(!_0x3b539b['plugins']['has']('EditorAnnotations'))return;const _0xb90633=_0x3b539b['plugins']['get']('EditorAnnotations'),_0x5c8215=this['context']['plugins']['get'](z),_0x550e22=this['annotations'],_0x2c3133=this['balloonPanelView'],_0x21b22c=()=>{const _0x56bf0a=_0xb90633['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x56bf0a),this['setActiveAnnotation'](_0x56bf0a[0x0]||null);};this['listenTo'](_0xb90633,'refresh',_0x21b22c),this['listenTo'](_0xb90633,'blur',(_0x5e494a,{isAnnotationTracked:_0x189640})=>{this['activeAnnotation']&&_0x189640(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xb90633,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x550e22,'blur',_0x566688=>{_0xb90633['hasDomSelection']()&&_0x566688['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x25c334,_0x46f859)=>{const _0x529afd=_0x46f859['target'];_0x2c3133['isVisible']&&_0x2c3133['element']['contains'](_0x529afd)||_0x5c8215['view']['element']['contains'](_0x529afd)||this['activeAnnotation']&&_0xb90633['hasDomSelection']()&&(_0x21b22c(),_0x25c334['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0xb90633);}['_destroyEditorAnnotationsIntegration'](_0x47b4be){_0x47b4be&&(this['stopListening'](_0x47b4be),this['_editorAnnotations']['remove'](_0x47b4be));}['_setSelectedAnnotations'](_0x5170e5){for(const _0x2dac02 of this['_selectedAnnotations'])_0x5170e5['includes'](_0x2dac02)||this['_manuallyClosedAnnotationViews']['delete'](_0x2dac02['view']);this['_selectedAnnotations']=_0x5170e5;}['_refreshPositioning'](){const _0x5226e0=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5226e0['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1ba4f8){if(this['_manuallyClosedAnnotationViews']['has'](_0x1ba4f8['view']))return;const _0x4ce305=this['balloonPanelView']['content']['first'];_0x4ce305!==_0x1ba4f8['view']?(_0x4ce305&&this['_detachListeners'](_0x4ce305),this['_attachListeners'](_0x1ba4f8['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1ba4f8['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x131283=this['balloonPanelView']['content']['first'],_0x34e846=_0x131283&&this['annotations']['getByView'](_0x131283);if(!_0x34e846||!this['_annotationToNarrowView']['has'](_0x34e846))return;const _0x336d8f=this['_annotationToNarrowView']['get'](_0x34e846)['element'],_0x441189=(function(){const _0x177484=_0x5cbf50['defaultPositions'];return[_0x177484['southArrowNorthEast'],_0x177484['northArrowSouthEast'],_0x177484['southArrowNorth'],_0x177484['northArrowSouth'],_0x177484['southArrowNorthWest'],_0x177484['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x336d8f,'positions':_0x441189});}['_hideBalloon'](){const _0x3780c7=this['balloonPanelView'],_0x27f0f4=_0x3780c7['content']['first'];_0x27f0f4&&(this['_detachListeners'](_0x27f0f4),_0x3780c7['unpin'](),_0x3780c7['content']['clear']());}['_attachListeners'](_0x93661f){this['listenTo'](_0x93661f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x93661f,'Esc',(_0x48bb30,_0x381eea)=>{this['_manuallyClosedAnnotationViews']['add'](_0x93661f),this['_hideBalloon'](),_0x381eea();});}['_detachListeners'](_0x54761b){this['stopListening'](_0x54761b);}}class c extends _0x4626af{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x56a9b4,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2decbf){super(_0x2decbf),_0x2decbf['editing']['view']['addObserver'](_0x4fddd0),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2decbf['plugins']['get'](_0x56a9b4),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x2a6dac(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x4fc70c=this['editor']['plugins']['get'](j);_0x4fc70c['context']===this['editor']&&(_0x4fc70c['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3f6fec,_0x4c5fe6)=>{const _0x14ebf3=this['_balloon'];if(this['isAttached']&&_0x14ebf3['visibleView']){const _0x4322e7=this['annotations']['getByView'](_0x14ebf3['visibleView']);_0x4322e7&&this['_closeAnnotation'](_0x4322e7),_0x4c5fe6();}}));}['afterInit'](){const _0x442587=this['editor']['plugins']['get'](j);_0x442587['context']===this['editor']&&(_0x442587['hasActive']()||_0x442587['switchTo']('inline'));}['setActiveAnnotation'](_0x25bce4){_0x25bce4!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x25bce4&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x25bce4)&&this['_addAnnotationToBalloon'](_0x25bce4,!0x0),_0x25bce4['isActive']=!0x0),_0x25bce4||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x25bce4);}['attach'](_0x222c1e){this['annotations']=_0x222c1e;const _0x5eeced=this['editor']['plugins']['get'](j),_0xbb2865=this['_balloon'];if(this['isAttached'])throw new _0x4482e2('inlineannotations-attach-already-attached',this);if(_0x5eeced['context']!==this['editor'])throw new _0x4482e2('inlineannotations-not-allowed-with-context',this);const _0x477095=this['editor']['plugins']['get'](b);this['listenTo'](_0x477095,'refresh',()=>{const _0x3abf19=_0x477095['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1033bc,_0x5dbcff;!this['_forceRefresh']&&(_0x1033bc=_0x3abf19,_0x5dbcff=this['_selectedAnnotations'],_0x1033bc['length']===_0x5dbcff['length']&&_0x1033bc['every'](_0x3be332=>_0x5dbcff['includes'](_0x3be332)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3abf19),this['setActiveAnnotation'](_0x3abf19[0x0]||null));}),this['listenTo'](_0x477095,'blur',(_0x2c9864,{isAnnotationTracked:_0x11f622})=>{this['activeAnnotation']&&_0x11f622(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x477095,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x442737,_0x30f231,_0x1e665b)=>{_0x1e665b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x222c1e,'remove',(_0x318c87,_0x4dcf35)=>{this['_removeAnnotationFromBalloon'](_0x4dcf35),_0x4dcf35===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xbb2865,'change:visibleView',(_0x10eb95,_0x37d46f,_0xfc6b11,_0x373544)=>{_0x373544&&this['stopListening'](_0x373544);const _0x395328=_0x222c1e['getByView'](_0xfc6b11);_0xfc6b11&&_0x395328&&(this['listenTo'](_0xfc6b11,'change:height',()=>{_0xbb2865['updatePosition']();}),this['listenTo'](_0xfc6b11,'Esc',()=>{this['_closeAnnotation'](_0x395328),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x395328&&this['setActiveAnnotation'](_0x395328));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xbb2865['visibleView']&&(_0x222c1e['getByView'](_0xbb2865['visibleView'])&&_0xbb2865['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 _0x4482e2('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x47a94e of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x47a94e);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x2c2dc7){for(const _0x2d6dd1 of this['_selectedAnnotations'])_0x2c2dc7['includes'](_0x2d6dd1)||this['_manuallyClosed']['delete'](_0x2d6dd1);for(const _0x13dc65 of this['annotations'])_0x2c2dc7['includes'](_0x13dc65)||this['_removeAnnotationFromBalloon'](_0x13dc65);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x565930 of _0x2c2dc7)this['_addAnnotationToBalloon'](_0x565930);}this['_selectedAnnotations']=_0x2c2dc7;}['_addAnnotationToBalloon'](_0x24e411,_0xd43b51=!0x1){this['_manuallyClosed']['has'](_0x24e411)||(this['_addedAnnotations']['has'](_0x24e411)||this['_balloon']['hasView'](_0x24e411['view'])||(this['_addedAnnotations']['add'](_0x24e411),this['_balloon']['add']({'stackId':_0x24e411['view']['id'],'view':_0x24e411['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x24e411)}})),_0xd43b51&&this['_balloon']['showStack'](_0x24e411['view']['id']));}['_getBalloonTargetForAnnotation'](_0x4d6a1b){const _0x1edebf=_0x4d6a1b['target'],_0xbc0c6d=this['editor']['editing']['view'],_0x140c52=_0xbc0c6d['document']['selection']['getFirstRange'](),_0x5491ea=_0xbc0c6d['domConverter']['viewRangeToDom'](_0x140c52);if(_0x5491ea['collapse'](!0x0),_0x1edebf){if(_0x1edebf instanceof _0x1e3fe4)return _0x1edebf;let _0x1be892=[];for(const _0x33465f of _0x1edebf)_0x1be892['push'](...F(_0x33465f['getClientRects']()));_0x1be892=function(_0x2efb87){const _0x580f3b=[];let _0xf7a506=_0x2efb87[0x0];for(let _0x42e3c5=0x1;_0x42e3c5<_0x2efb87['length'];_0x42e3c5++)P(_0xf7a506,_0x2efb87[_0x42e3c5])?_0xf7a506['width']+=_0x2efb87[_0x42e3c5]['width']:(_0x580f3b['push'](_0xf7a506),_0xf7a506=_0x2efb87[_0x42e3c5]);return _0x580f3b['push'](_0xf7a506),_0x580f3b;}(_0x1be892);const _0x204164=_0x5491ea['getBoundingClientRect']();return _0x1be892['find'](_0x276956=>_0x276956['top']<=_0x204164['top']&&_0x276956['bottom']>=_0x204164['bottom']&&_0x276956['left']<=_0x204164['left']&&_0x276956['right']>=_0x204164['right'])||_0x1be892[0x0];}return _0x4d6a1b['targetRect']||_0x5491ea;}['_removeAnnotationFromBalloon'](_0x5e0f7e){this['_addedAnnotations']['has'](_0x5e0f7e)&&this['_balloon']['hasView'](_0x5e0f7e['view'])&&(this['_addedAnnotations']['delete'](_0x5e0f7e),this['_balloon']['remove'](_0x5e0f7e['view']));}['_closeAnnotation'](_0x446a6d){this['_manuallyClosed']['add'](_0x446a6d),this['_removeAnnotationFromBalloon'](_0x446a6d);}}function F(_0x36ed14){return Array['from'](_0x36ed14)['map'](DOMRect['fromRect']);}function P(_0x59a05c,_0x3391e5){return _0x59a05c['top']===_0x3391e5['top']&&_0x59a05c['bottom']===_0x3391e5['bottom']&&_0x59a05c['right']===_0x3391e5['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x206e03,_0x43343f){super(_0x206e03),this['set']('isEmpty',!_0x43343f['length']),this['focusTracker']=new _0x2d4383(),this['_annotationViews']=_0x43343f,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0xc7089f({'focusables':_0x43343f,'focusTracker':this['focusTracker']}),this['listenTo'](_0x43343f,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x43343f,'remove',(_0x57d1d9,_0x280946)=>{_0x280946['isActive']&&this['focus'](),_0x43343f['length']||(this['isEmpty']=!0x0);});const _0x183bf3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x206e03,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x43343f},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x183bf3['if']('isEmpty','ck-hidden',_0x5a34c9=>!_0x5a34c9)]},'children':[{'text':N(_0x206e03,'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 _0xa2501e of this['_annotationViews'])this['focusTracker']['add'](_0xa2501e['element']);this['_annotationViews']['on']('change',(_0x11b8d5,{added:_0x444fd9,removed:_0x3af060})=>{for(const _0x30ec0e of _0x444fd9)this['focusTracker']['add'](_0x30ec0e['element']);for(const _0x159037 of _0x3af060)this['focusTracker']['remove'](_0x159037['element']);});}}class p extends _0x603ec2{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0xb12621){super(_0xb12621),this['archivedThreads']=new _0x2ba4d0();}['init'](){const _0x5a4f38=this['context'],_0x457a5d=_0x5a4f38['plugins']['get'](o),_0x1e9988=_0x5a4f38['plugins']['get'](y);this['listenTo'](_0x457a5d,'addCommentThread',(_0x3cee18,{threadId:_0x7c5c9})=>{const _0x16aebb=_0x457a5d['getCommentThread'](_0x7c5c9);_0x16aebb['archivedAt']&&this['archivedThreads']['add'](_0x16aebb,this['_calculatePosition'](_0x16aebb['archivedAt'])),this['listenTo'](_0x16aebb,'change:archivedAt',(_0x4d07f2,_0x38c834,_0x5532e6)=>{_0x5532e6?this['archivedThreads']['has'](_0x16aebb)||this['archivedThreads']['add'](_0x16aebb,this['_calculatePosition'](_0x16aebb['archivedAt'])):this['archivedThreads']['has'](_0x16aebb)&&this['archivedThreads']['remove'](_0x16aebb);});}),this['listenTo'](_0x457a5d,'removeCommentThread',(_0x4173c8,{threadId:_0x197ca3})=>{const _0x31156e=_0x457a5d['getCommentThread'](_0x197ca3);this['stopListening'](_0x31156e),this['archivedThreads']['has'](_0x31156e)&&this['archivedThreads']['remove'](_0x31156e);},{'priority':'highest'}),this['listenTo'](_0x1e9988['collection'],'focus',(_0x48a8e1,_0x4f75ee)=>{_0x4f75ee['isVisible']||(_0x4f75ee['isActive']=!0x0,_0x1e9988['activate'](_0x4f75ee));});}['_calculatePosition'](_0x55c13f){const _0x541fa4=[...this['archivedThreads']]['findIndex'](_0x27f53e=>_0x27f53e['archivedAt']<_0x55c13f);return _0x541fa4>-0x1?_0x541fa4:this['archivedThreads']['length'];}}class a extends _0x4626af{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0xccdd32];}constructor(_0x466d5c){super(_0x466d5c),this['annotationViews']=new _0x102f07(),this['_pendingThreads']=[];}['init'](){const _0x2d7d00=this['editor'],_0x28bb2b=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2d7d00['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x739e9c,!0x0)),_0x2d7d00['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x353cea=this['_createCommentsArchiveButton'](_0x76ce93);return _0x353cea['set']({'role':'menuitemcheckbox'}),_0x353cea;});const _0x187dad=_0x2d7d00['plugins']['get'](p),_0x45418f=_0x2d7d00['plugins']['get']('Annotations'),_0x3a5679=_0x2d7d00['plugins']['get']('CommentsRepository');_0x187dad['archivedThreads']['forEach'](_0x1fc510=>{this['_handleNewThread'](_0x1fc510);}),this['listenTo'](_0x187dad['archivedThreads'],'add',(_0x4d2b81,_0x30ce21)=>{this['_handleNewThread'](_0x30ce21);}),this['listenTo'](_0x45418f['collection'],'add',(_0x583442,_0x1ffc90)=>{const _0x16b995=this['_pendingThreads']['find'](_0x36b26a=>{const _0x121fd7=_0x3a5679['_threadToController']['get'](_0x36b26a);return _0x121fd7&&_0x1ffc90['innerView']===_0x121fd7['view'];});if(_0x16b995){const _0x29686e=this['_calculatePosition'](_0x16b995['archivedAt']);this['_addAnnotationToArchive'](_0x1ffc90,_0x29686e),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x16b995),0x1);}}),this['listenTo'](_0x187dad['archivedThreads'],'remove',(_0x4dd3be,_0x301bc2)=>{const _0x49b2e7=_0x2d7d00['config']['get']('collaboration.channelId');if(!_0x49b2e7||_0x301bc2['channelId']===_0x49b2e7){if(this['_pendingThreads']['includes'](_0x301bc2))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x301bc2),0x1);else{const _0x3af3cb=_0x3a5679['_threadToController']['get'](_0x301bc2),_0x1d271a=_0x45418f['getByInnerView'](_0x3af3cb['view']);this['annotationViews']['remove'](_0x1d271a['view']),this['stopListening'](_0x1d271a),this['stopListening'](_0x1d271a['focusableElements']);}}}),this['listenTo'](_0x45418f['collection'],'add',(_0x2ab906,_0x824e4)=>{this['listenTo'](_0x824e4,'escape',_0x28bb2b);}),this['listenTo'](_0x45418f['collection'],'remove',(_0x14d2d1,_0x50c80d)=>{this['stopListening'](_0x50c80d,'escape',_0x28bb2b);});}['_addAnnotationToArchive'](_0x182d21,_0x4fae48){this['listenTo'](_0x182d21,'set:isVisible',_0x3b7e99=>{_0x3b7e99['return']=!0x1,_0x3b7e99['stop']();}),this['annotationViews']['add'](_0x182d21['view'],_0x4fae48);}['_handleNewThread'](_0x39520a){const _0x1401ca=this['editor']['plugins']['get']('CommentsRepository'),_0x309beb=this['editor']['plugins']['get']('Annotations'),_0x35508a=this['editor']['config']['get']('collaboration.channelId');if(!_0x35508a||_0x39520a['channelId']===_0x35508a){const _0x25d52c=_0x1401ca['_threadToController']['get'](_0x39520a);if(!_0x25d52c)return void this['_pendingThreads']['push'](_0x39520a);const _0x44aa72=this['_calculatePosition'](_0x39520a['archivedAt']),_0x2e140b=_0x309beb['getByInnerView'](_0x25d52c['view']);_0x2e140b['isVisible']&&_0x309beb['_visibleAnnotations']['remove'](_0x2e140b),this['_addAnnotationToArchive'](_0x2e140b,_0x44aa72);}}['_calculatePosition'](_0x1e1cec){const _0x284032=this['editor']['config']['get']('collaboration.channelId'),_0x52175e=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x1beb16=>_0x1beb16['channelId']===_0x284032)['findIndex'](_0x515c27=>_0x515c27['archivedAt']<_0x1e1cec);return _0x52175e<0x0||_0x52175e>this['annotationViews']['length']?this['annotationViews']['length']:_0x52175e-0x1;}['_toggleDialog'](){const _0x5cf9f1=this['editor'],_0x1aae6a=_0x5cf9f1['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x5cf9f1['locale'],this['annotationViews'])),'commentsArchive'===_0x1aae6a['id']?_0x1aae6a['hide']():_0x1aae6a['show']({'id':'commentsArchive','title':N(_0x5cf9f1['locale'],'COMMENTS_ARCHIVE'),'icon':_0x40f89d,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3b13b3['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x57842d,_0x5d4067=!0x1){const _0xf5db98=this['editor']['locale'],_0x5561c5=this['editor']['plugins']['get']('Dialog'),_0x2f2737=new _0x57842d(_0xf5db98);return _0x2f2737['bind']('isEnabled')['to'](this,'isEnabled'),_0x2f2737['bind']('isOn')['to'](_0x5561c5,'id',_0x3e7345=>'commentsArchive'===_0x3e7345),_0x2f2737['set']({'label':N(_0xf5db98,'COMMENTS_ARCHIVE'),'icon':_0x40f89d,'isToggleable':!0x0}),_0x5d4067&&(_0x2f2737['tooltip']=!0x0),this['listenTo'](_0x2f2737,'execute',()=>this['_toggleDialog']()),_0x2f2737;}['_hideDialogOnAnnotationEscape']=_0x18ab4a=>{const _0x3036fd=_0x18ab4a['source'];if(!this['annotationViews']['has'](_0x3036fd['view']))return;const _0x30e967=this['editor']['plugins']['get']('Dialog');_0x30e967['isOpen']&&'commentsArchive'===_0x30e967['id']&&(_0x30e967['hide'](),_0x18ab4a['stop']());};}class gi extends _0x4626af{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 _0x3db27d,ContextPlugin as _0x43ff48,PendingActions as lt,Command as _0x3077e4,Plugin as _0x478bf2,Context as _0x4aa052}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x5df269,uid as _0x1ce077,KeystrokeHandler as jt,FocusTracker as _0x67b3fd,diff as _0x2c46da,Collection as _0x842883,Rect as _0x221bff,CKEditorError as _0x552662,first as _0x32a71d,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x122649,keyCodes as _0x25b2ac}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x38294c,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x3a4bb7,trimHtml as ts,LateFocusDropdownButtonView as _0x44e940,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x368341}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x391904}from'es-toolkit/compat';import{IconUndo as _0x5dbd54,IconCheck as _0x3ac145,IconPencil as _0x34e1c9,IconRemoveComment as _0x5eeb8f,IconThreeVerticalDots as _0x13e749,IconAddComment as _0x3ab7aa,IconCommentsArchive as _0x2e02cd}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x19c5c8,ButtonView as _0x503639,ViewCollection as _0x3aecc1,createDropdown as _0x552229,ListView as _0x4289d3,focusChildOnDropdownOpen as _0x238596,ListItemView as _0x489e41,MenuBarMenuListItemButtonView as _0x6f0215,BodyCollection as _0x125bcc,BalloonPanelView as _0x3ec0f5,ContextualBalloon as _0x235f3d,Dialog as _0x104467,DialogViewPosition as _0x493476}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x14edff}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x894944}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2da229}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
24
+ _0x5df269(){['model'];['view'];constructor(_0x371a6d,_0x437bf6){super(),this['model']=_0x371a6d,this['model']['_isAttached']=!0x0,this['view']=_0x437bf6,this['listenTo'](_0x437bf6,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x437bf6,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x437bf6,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x437bf6,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x437bf6,'addComment',(_0x4b7cce,_0x34176c)=>this['addComment'](_0x34176c)),this['listenTo'](_0x437bf6,'updateComment',(_0x4ad6c3,_0x1a8f3a,_0x3cd412)=>this['updateComment'](_0x1a8f3a,_0x3cd412)),this['listenTo'](_0x437bf6,'removeComment',(_0x499a5c,_0x42da92)=>this['removeComment'](_0x42da92));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x68920){this['model']['addComment']({'content':_0x68920,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x5d61cc,_0x1e6962){this['model']['getComment'](_0x5d61cc)['update']({'content':_0x1e6962});}['removeComment'](_0x24bff5){this['model']['getComment'](_0x24bff5)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x5c8cca,_0x28f56f,_0x3dc982){const t=_0x5c8cca['t'];switch(_0x28f56f){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'},_0x3dc982);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'},_0x3dc982);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'},_0x3dc982);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'},_0x3dc982);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x3dc982);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'},_0x3dc982);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'},_0x3dc982);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'},_0x3dc982);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x4b2859,_0x4082f3){super(_0x4b2859);const _0x163a91=_0x1ce077();this['main']=this['createCollection'](),this['editable']=new Vt(_0x4b2859,_0x4082f3,void 0x0,{'label':()=>N(_0x4b2859,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4b2859['uiLanguageDirection'],'lang':_0x4b2859['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x163a91},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x2bc50a){super(_0x2bc50a),this['view']=new Rt(_0x2bc50a['locale'],_0x2bc50a['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x1a0a8c=this['editor']['editing']['view'],_0x86979d=this['view']['editable'],_0x422b34=_0x1a0a8c['document']['getRoot']();_0x86979d['name']=_0x422b34['rootName'],this['view']['render']();const _0x51722e=_0x86979d['element'];this['setEditableElement'](_0x86979d['name'],_0x51722e),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1a0a8c['attachDomRoot'](_0x51722e),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
25
+ _0x5df269(_0x3db27d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
26
+ ((()=>Qt)());constructor(_0x1dbf21={}){function _0x4eb94f(_0x1472a8){return _0x1472a8['map'](_0x20c6ff=>String['fromCharCode'](_0x20c6ff))['join']('');}(_0x1dbf21=Object['assign']({},_0x1dbf21))['plugins']||(_0x1dbf21['plugins']=hs['defaultPlugins']),super(_0x1dbf21),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4eb94f([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4eb94f([0x76,0x69,0x65,0x77])][_0x4eb94f([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4eb94f([0x61,0x75,0x74,0x6f]),this[_0x4eb94f([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4eb94f([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4eb94f([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4eb94f([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4eb94f([0x6f,0x6b])});}['create'](){const _0x55f08f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x55f08f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x301127=>{const _0x3e6343=this['model']['document']['getRoot'](),_0x52a664=_0x3e6343&&_0x3e6343['getChild'](_0x3e6343['childCount']-0x1);_0x301127['setSelection'](_0x52a664,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x50a74a=this['editing']['view'],_0x490cee=_0x50a74a['document']['getRoot'](),_0x1b7de7=_0x490cee['getChild'](0x0);_0x490cee['childCount']>0x1||!_0x1b7de7||'p'!=_0x1b7de7['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x50a74a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1b7de7['placeholder']=this['placeholder']),Ft({'view':_0x50a74a,'element':_0x1b7de7,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1b7de7);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5d71ce,_0x107d8={}){super(_0x5d71ce),this['editor']=null,this['_editorConfig']=_0x107d8,this['set']('value',_0x107d8['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x5d71ce,'Reply...')),this['set']('submitLabel',N(_0x5d71ce,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x67b3fd(),this['focusCycler']=new _0x19c5c8({'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',(_0x291234,_0x5a5532)=>{this['cancelButtonView']['fire']('execute'),_0x5a5532();}),this['keystrokes']['set']('Ctrl+Enter',(_0x206b23,_0x2fe014)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x2fe014());}),this['on']('submit',(_0xce463f,_0x214402)=>{_0x214402['length']>0xfde8?(alert(N(_0x5d71ce,'TOO_LONG_COMMENT_ALERT',[_0x214402['length'],0xfde8])),_0xce463f['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x1b6af1=this['editor'];this['element']['insertBefore'](_0x1b6af1['ui']['element'],this['element']['firstChild']),_0x1b6af1['model']['document']['on']('change',()=>this['value']=_0x1b6af1['getData']()),_0x1b6af1['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1b6af1['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5622f5){-0x1===_0x5622f5?(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:_0xd76785}=this,_0x3e5a5a=new _0x503639(_0xd76785);return _0x3e5a5a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3e5a5a['withText']=!0x0,_0x3e5a5a['bind']('label')['to'](this,'submitLabel'),_0x3e5a5a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3e5a5a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0xec12bb,_0x56ca30)=>!_0x56ca30&&!!_0xec12bb['trim']()),_0x3e5a5a;}['_createCancelButton'](){const {locale:_0x59e02c}=this,_0x6c70f6=new _0x503639(_0x59e02c);return _0x6c70f6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x6c70f6['label']=N(_0x59e02c,'Cancel'),_0x6c70f6['withText']=!0x0,_0x6c70f6['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x6c70f6;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x454b86=>{this['focusTracker']['add'](_0x454b86['element']);}),this['focusables']['on']('change',(_0x4d1c2b,_0x18f691)=>{for(const _0x1bf06e of Array['from'](_0x18f691['added'])['reverse']())this['focusTracker']['add'](_0x1bf06e['element']);});}}class ie extends kt{constructor(_0x3800c3,_0x185b64,_0xfea823){super(_0x3800c3),this['commentInputView']=new es(_0x3800c3,_0xfea823),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5d06e9,_0x2fdcc7)=>_0x5d06e9||!!_0x2fdcc7),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 _0x38294c(_0x3800c3,_0x185b64),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'](_0x4d39b4){this['commentInputView']['focus'](_0x4d39b4);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x525e61,_0x32df85)=>{const {submitButtonView:_0x304ca1,cancelButtonView:_0x317a68,editor:_0x56dc63}=this['commentInputView'];[_0x304ca1['element'],_0x317a68['element'],_0x56dc63?_0x56dc63['editing']['view']['getDomRoot']():null]['filter'](_0x212717=>_0x212717)['some'](_0x1122eb=>_0x1122eb['contains'](_0x32df85['target']))||(this['focus'](),_0x32df85['preventDefault']());});}}class rs extends kt{constructor(_0x42e2d9){super(_0x42e2d9);const _0x5e30a2=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5e30a2['to']('count',_0x2b278f=>N(_0x42e2d9,'NUMBER_OF_COMMENTS',_0x2b278f))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xa89f3a,_0x1a3ad3,_0x37166d){super(_0xa89f3a);const _0x1ef3d2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1a3ad3['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1a3ad3,this['_config']=_0x37166d,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x19c5c8({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1d4a47=>this['commentViews']['map'](_0x2e5607=>_0x2e5607['element'])['includes'](_0x1d4a47['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0xa89f3a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4edb1f=>_0x4edb1f-this['_config']['maxCommentsWhenCollapsed']);for(const _0x475e1d of _0x1a3ad3['comments'])this['_handleNewCommentModel'](_0x475e1d);this['_handleInfoComment'](),this['listenTo'](_0x1a3ad3['comments'],'add',(_0x58a39c,_0x568b36)=>{const _0x3c0355=this['_calculatePosition'](_0x568b36);this['length']++,this['_handleNewCommentModel'](_0x568b36,_0x3c0355),this['refreshVisibleViews']();}),this['listenTo'](_0x1a3ad3['comments'],'remove',(_0x1b436b,_0x30fba8)=>{this['length']--,this['_handleRemoveCommentModel'](_0x30fba8),this['refreshVisibleViews']();}),this['listenTo'](_0x1a3ad3,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1a3ad3,'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',_0x1ef3d2['if']('length','ck-hidden',_0x358255=>!_0x358255)],'aria-label':N(_0xa89f3a,'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'](_0x1850c8){-0x1===_0x1850c8?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x328e7d of this['commentViews'])_0x328e7d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2d8234,_0x43ee02){const _0x436934=new this['_config']['CommentView'](this['locale'],_0x2d8234,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x436934['viewUid']=_0x2d8234['id'],_0x436934['delegate']('removeComment')['to'](this),_0x436934['delegate']('updateComment')['to'](this),_0x436934['delegate']('resolveCommentThread')['to'](this),_0x436934['delegate']('editorReady')['to'](this),_0x436934['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x436934,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x436934,_0x43ee02);}['_calculatePosition'](_0x1eb1c3){const _0x28c0b4=this['_model']['_findOptimalIndex'](_0x1eb1c3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1eb1c3['authoredAt']?_0x28c0b4-0x1:_0x28c0b4:_0x28c0b4-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xe23921={'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'],_0xe23921,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xe23921));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x55327b){const _0x2de31e=this['commentViews']['remove'](_0x55327b['id']);this['stopListening'](_0x2de31e),_0x2de31e['isEditMode']&&this['_updateHasDirtyComment'](),_0x2de31e['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5217b2=>_0x5217b2['isEditMode']);}['_rearrangeCollapse'](){const _0x1fcc51=function(_0x4a4b3f){const _0x57e8db=new _0x842883();for(const _0x1a4db1 of _0x4a4b3f)_0x57e8db['add'](_0x1a4db1);return _0x57e8db;}(this['commentViews']),_0x836d24=this['_collapsedCommentsView']['count'];for(let _0x57f79d=0x1;_0x57f79d<=_0x836d24;_0x57f79d++)_0x1fcc51['remove'](0x1);for(const _0x54ef0a of _0x1fcc51)_0x54ef0a['collapse']();_0x836d24>0x0&&_0x1fcc51['add'](this['_collapsedCommentsView'],0x1),ns(_0x2c46da(Array['from'](this['visibleViews']),Array['from'](_0x1fcc51)),this['visibleViews'],_0x1fcc51);}['_rearrangeExpand'](){ns(_0x2c46da(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1a6213 of this['visibleViews'])_0x1a6213['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2fd65f=>{this['focusTracker']['add'](_0x2fd65f['element']),this['keystrokes']['listenTo'](_0x2fd65f['element']);}),this['commentViews']['on']('change',(_0x3247b2,_0x4a1c90)=>{for(const _0x438a52 of _0x4a1c90['removed'])this['focusTracker']['remove'](_0x438a52['element']),this['keystrokes']['stopListening'](_0x438a52['element']);for(const _0x284881 of Array['from'](_0x4a1c90['added'])['reverse']())this['focusTracker']['add'](_0x284881['element']),this['keystrokes']['listenTo'](_0x284881['element']);});}}function ns(_0x4e9ac0,_0x31f750,_0x3555a6){let _0x442119=0x0;for(const _0x47610d of _0x4e9ac0)switch(_0x47610d){case'insert':_0x31f750['add'](_0x3555a6['get'](_0x442119),_0x442119),_0x442119++;break;case'delete':_0x31f750['remove'](_0x442119);break;case'equal':_0x442119++;}}class oe extends kt{constructor(_0x29266f){super(_0x29266f);const _0x325e5b=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x325e5b['to']('contextValue',_0x5bca93=>N(_0x29266f,'THREAD_CONTEXT_LABEL',_0x5bca93)),'tabindex':-0x1},'children':[{'text':_0x325e5b['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x115d1d,_0x22e667){super(_0x115d1d);const _0x3a1520=this['bindTemplate'];this['_model']=_0x22e667,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x19c5c8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x5e017a=>!!_0x5e017a),this['bind']('contextValue')['to'](this['_model'],'context',_0xb974db=>_0xb974db&&_0xb974db['value']?this['_trimContextValue'](_0xb974db['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',_0x3a1520['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 _0x1fe44b=new _0x503639(this['locale']);return _0x1fe44b['label']=N(this['locale'],'Reopen'),_0x1fe44b['tooltip']=N(this['locale'],'Reopen'),_0x1fe44b['icon']=_0x5dbd54,_0x1fe44b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3fdd59=>!_0x3fdd59),_0x1fe44b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3a76a3,_0x1ff37a)=>_0x3a76a3&&_0x1ff37a),_0x1fe44b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1fe44b;}['_trimContextValue'](_0x5601af){if(_0x5601af['length']<0x96)return _0x5601af;const _0x36660c=_0x5601af['lastIndexOf']('\x20',0x93);return _0x5601af['substring'](0x0,_0x36660c>-0x1?_0x36660c:0x93)+'...';}['_attachContextActions'](){const _0x27a0d0=this['element']['querySelector']('.ck-context'),_0x5da9b3=_0x27a0d0['querySelector']('.ck-context__value');this['listenTo'](_0x27a0d0,'mouseenter',()=>{_0x5da9b3['offsetWidth']<_0x5da9b3['scrollWidth']&&_0x27a0d0['classList']['add']('overlay');}),this['listenTo'](_0x27a0d0,'mouseleave',()=>{_0x27a0d0['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2677ab of this['focusables'])this['focusTracker']['add'](_0x2677ab['element']),this['keystrokes']['listenTo'](_0x2677ab['element']);}['_createContextView'](){const _0x251647=new oe(this['locale']);return _0x251647['bind']('contextValue')['to'](this),_0x251647;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3a494f,_0x34f844,_0x1c61c9,_0x3b733e){super(_0x3a494f),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x34f844,this['_localUser']=_0x1c61c9,this['_config']=_0x3b733e,this['commentThreadHeaderView']=new Xt(_0x3a494f,_0x34f844),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3a494f,N(_0x3a494f,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3a494f,_0x34f844,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3b733e)),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',(_0xdd3d8d,_0x1437fc)=>_0xdd3d8d||!!_0x1437fc),this['bind']('isUnlinked')['to'](_0x34f844,'unlinkedAt',_0x6c6bfb=>!!_0x6c6bfb),this['bind']('ariaLabel')['to'](this,'length',_0x6d7c4e=>{const _0x34074c=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x6d7c4e,_0x34074c]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x19c5c8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xe96758=>_0xe96758['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3b25e4=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5df8e8=_0x3b25e4['commentInputView'];return _0x3b25e4['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5df8e8,'value',(_0x33002f,_0x440792,_0x5c6b6d,_0x5cac80,_0x5dcbae)=>!!_0x5dcbae||!!_0x5cac80&&_0x5c6b6d&&!_0x440792||_0x33002f&&_0x5c6b6d&&!_0x440792),_0x5df8e8['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x88f8c8,_0x1def43,_0xb7ea61)=>{let _0x3f5a59;return _0x3f5a59=_0xb7ea61&&_0x1def43?'Reply\x20to\x20reopen\x20discussion...':_0x88f8c8?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3f5a59);}),_0x5df8e8['bind']('submitLabel')['to'](this,'length',_0x51a309=>N(this['locale'],_0x51a309?'Reply':'Comment')),_0x5df8e8['on']('submit',(_0x40722a,_0x7fc92)=>{this['fire']('addComment',_0x7fc92),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5df8e8['on']('cancel',()=>{this['focus']();}),_0x5df8e8['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5df8e8['on']('cancel',_0x3c7f69=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x3c7f69['stop']());}),this['on']('change:isActive',(_0x259bb1,_0x21b454,_0x4040da)=>{_0x4040da||this['length']||_0x5df8e8['value']||this['fire']('removeCommentThread');}),_0x3b25e4;}}class gt extends/* #__PURE__ -- @preserve */
27
+ ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x43fe43,_0x5a0a60,_0xfbd1a2,_0xb5379e){super(_0x43fe43,_0x5a0a60,_0xfbd1a2,_0xb5379e),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x43fe43,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x4fd735,_0x216366,_0x23d86)=>{_0x23d86||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x19c5ca,_0x3c8804,_0x598029)=>{_0x598029&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x51458c=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x51458c['if']('isActive','ck-thread--active'),_0x51458c['if']('isUnlinked','ck-thread--unlinked'),_0x51458c['to']('actionIndicator',_0x3007a2=>_0x3007a2?'ck-thread--'+_0x3007a2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x51458c['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 _0x7e13a0 of this['commentsListView']['commentViews'])_0x7e13a0['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3092ec}=this,_0x4eca34=this['commentsListView']['commentViews']['get'](0x0);_0x4eca34===this['_boundFirstCommentView']||_0x4eca34['isSystemComment']||(this['_boundFirstCommentView']=_0x4eca34,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x4eca34,'actionIndicator',_0x45fa4f=>'remove'===_0x45fa4f?'remove':null),_0x4eca34['placeholder']=N(_0x3092ec,'Write\x20a\x20comment...'),_0x4eca34['removeButton']['on']('execute',_0x178e3e=>{_0x178e3e['stop'](),this['showConfirm'](N(_0x3092ec,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x4eca34['focus']();}),_0x4eca34['actionBar']['add'](this['resolveButton'],0x0),_0x4eca34['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x15a066=new _0x3a4bb7(this['locale']);return _0x15a066['label']=N(this['locale'],'Resolve'),_0x15a066['tooltip']=N(this['locale'],'Resolve'),_0x15a066['icon']=_0x3ac145,_0x15a066['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x15a066['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x24f20c=>!_0x24f20c),_0x15a066['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5bfca3,_0xd6bbe7)=>_0x5bfca3&&!_0xd6bbe7),_0x15a066['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x15a066;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x202186){super(_0x202186),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x4580aa,_0x41e782,_0x5a131f)=>{this['element']['innerHTML']=_0x5a131f;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x4a1bc9,_0x99cc89,_0x4b17c8){super(_0x4a1bc9),this['_model']=_0x99cc89,this['_config']=_0x4b17c8,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x99cc89,'content',_0x99cc89,'authoredAt',(_0x3262d1,_0x3b2f55)=>N(_0x4a1bc9,'COMMENT_ARIA_LABEL',[_0x99cc89['author']['name'],_0x4b17c8['formatDateTime'](_0x3b2f55),new DOMParser()['parseFromString'](_0x3262d1,'text/html')['body']['textContent'],_0x99cc89['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x4a1bc9,N(_0x4a1bc9,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x3aecc1(),this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['focusCycler']=new _0x19c5c8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x24380e=>_0x24380e['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 _0x454490=new is(this['locale']);return _0x454490['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x5746b6,_0x37c58a)=>_0x37c58a?ts(_0x5746b6,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x5746b6),_0x454490;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x22f189=new es(this['locale'],this['_config']['editorConfig']);return _0x22f189['value']=this['_model']['content'],_0x22f189['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x22f189['submitLabel']=N(this['locale'],'Save'),_0x22f189['on']('submit',(_0x3fdbfd,_0x118f04)=>{this['fire']('updateComment',this['_model']['id'],_0x118f04),this['switchToDisplayMode'](),this['focus']();}),_0x22f189['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x22f189['once']('editorReady',()=>{_0x22f189['focus']();}),_0x22f189['createEditor'](),_0x22f189['delegate']('editorReady')['to'](this),_0x22f189['delegate']('editorDestroyed')['to'](this),_0x22f189;}['_setupKeyboardNavigation'](){const _0x5dfc06=this['element'];this['keystrokes']['listenTo'](_0x5dfc06);for(const _0x4cfb1c of this['focusables'])this['focusTracker']['add'](_0x4cfb1c['element']),this['keystrokes']['listenTo'](_0x4cfb1c['element']);this['focusables']['on']('change',(_0xf112ca,_0x2b4c6d)=>{for(const _0x1e6951 of _0x2b4c6d['removed'])this['focusTracker']['remove'](_0x1e6951['element']),this['keystrokes']['stopListening'](_0x1e6951['element']);for(const _0x5756b0 of _0x2b4c6d['added'])this['focusTracker']['add'](_0x5756b0['element']),this['keystrokes']['listenTo'](_0x5756b0['element']);}),this['keystrokes']['set']('enter',(_0x870576,_0x1a7d32)=>{_0x5dfc06===_0x870576['target']&&(this['focusCycler']['focusFirst'](),_0x1a7d32());}),this['keystrokes']['set']('esc',(_0x318da0,_0x5491bc)=>{_0x5dfc06!==_0x318da0['target']&&(this['focus'](),_0x5491bc());});}}class Tt extends/* #__PURE__ -- @preserve */
28
+ ti(di){['actionBar'];['userView'];constructor(_0x2c0648,_0x5cbce3,_0x2331c8){super(_0x2c0648,_0x5cbce3,_0x2331c8),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x2c0648,'Reply...')),this['bind']('authoredAt')['to'](_0x5cbce3),this['bind']('resolvedAt')['to'](_0x5cbce3),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 _0x38294c(_0x2c0648,_0x5cbce3['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5cbce3,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x347834=this['bindTemplate'],_0x9a970c=[{'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':_0x347834['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x347834['to']('authoredAt',_0x3545d4=>this['_config']['formatDateTime'](_0x3545d4))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x347834['if']('isEditMode','ck-comment__actions--hidden'),_0x347834['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']&&_0x9a970c['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x347834['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x347834['if']('isEditMode','ck-comment--edit'),_0x347834['if']('isSystemComment','ck-comment--info'),_0x347834['to']('actionIndicator',_0x394ced=>_0x394ced?'ck-comment--'+_0x394ced:'')],'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':_0x9a970c}]}]};}['_createEditButton'](){const _0x59a729=new _0x503639(this['locale']);return _0x59a729['label']=N(this['locale'],'Edit'),_0x59a729['icon']=_0x34e1c9,_0x59a729['withText']=!0x0,_0x59a729['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x59a729['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x423c98=>!_0x423c98),_0x59a729['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x59a729['on']('execute',()=>this['switchToEditMode']()),_0x59a729;}['_createRemoveButton'](){const _0xcbd632=new _0x503639(this['locale']);return _0xcbd632['label']=N(this['locale'],'Remove'),_0xcbd632['icon']=_0x5eeb8f,_0xcbd632['withText']=!0x0,_0xcbd632['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xcbd632['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x22edae=>!_0x22edae),_0xcbd632['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xcbd632['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xcbd632;}['_createDropdown'](){const _0x51381b=_0x552229(this['locale'],_0x44e940),_0x535ac5=_0x51381b['panelView']['children'],_0x2facde=new _0x4289d3(this['locale']),_0x106179=_0x51381b['bindTemplate'];_0x238596(_0x51381b,()=>this['items']['find'](_0x2a8c88=>_0x2a8c88['isVisible'])),_0x51381b['extendTemplate']({'attributes':{'class':[_0x106179['if']('isVisible','ck-hidden',_0xf5766=>!_0xf5766)]}});const _0x5e6875=(_0x301328,_0x51dd19=-0x1)=>{const _0x276532=new _0x489e41(this['locale']);_0x276532['children']['add'](_0x301328);const _0x43f47d=_0x51dd19>-0x1?_0x51dd19:_0x2facde['items']['length'];_0x2facde['items']['add'](_0x276532,_0x43f47d);const _0x324b82=Array['from'](this['items']);_0x51381b['unbind']('isEnabled','isVisible'),_0x51381b['bind']('isEnabled')['toMany'](_0x324b82,'isEnabled',(..._0x4aecc4)=>_0x4aecc4['some'](_0x15f878=>_0x15f878)),_0x51381b['bind']('isVisible')['toMany'](_0x324b82,'isVisible',(..._0x201cbe)=>_0x201cbe['some'](_0x110008=>_0x110008));};_0x51381b['panelPosition']='sw',_0x51381b['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x13e749});for(const _0x2a6475 of this['items'])_0x5e6875(_0x2a6475);return _0x535ac5['add'](_0x2facde),_0x51381b['listenTo'](this['items'],'add',(_0x242639,_0x3223b5,_0x1ffe0a)=>{_0x5e6875(_0x3223b5,_0x1ffe0a);}),_0x51381b['listenTo'](this['items'],'remove',(_0x377262,_0x185c5d,_0x5102cb)=>{_0x2facde['items']['remove'](_0x5102cb);}),_0x51381b;}['_attachActions'](_0x2e0ef9,_0x4e29b7){const _0x1ba3a5=_0x2e0ef9&&_0x2e0ef9['element'];_0x1ba3a5&&(this['listenTo'](_0x1ba3a5,'mouseenter',()=>this['actionIndicator']=_0x4e29b7),this['listenTo'](_0x1ba3a5,'focus',()=>this['actionIndicator']=_0x4e29b7),this['listenTo'](_0x1ba3a5,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x1ba3a5,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x184b62=super['_createCommentInputView']();return _0x184b62['bind']('placeholder')['to'](this),_0x184b62;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x3f81c0){const _0x2f072c=Dt(_0x3f81c0,0x1e),_0x230dee=new MutationObserver(_0xe4a26c=>{for(const _0x59d3e4 of _0xe4a26c)('attributes'==_0x59d3e4['type']&&'class'==_0x59d3e4['attributeName']||'childList'==_0x59d3e4['type']||'characterData'==_0x59d3e4['type'])&&_0x2f072c();});return{'attach'(_0x236d18){_0x230dee['observe'](_0x236d18,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x230dee['disconnect'](),_0x2f072c['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2350dc,_0x2c237a){super(_0x2350dc),this['id']=_0x1ce077(),this['focusTracker']=new _0x67b3fd(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x20f56c,_0x455a59)=>this['fire']('Esc',_0x455a59)),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'](_0x2c237a),this['mainView']=_0x2c237a;const _0xbafb7c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xbafb7c['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 _0x25a8a5=this['element']['clientHeight'];_0x25a8a5&&(this['height']=_0x25a8a5);}}class T extends/* #__PURE__ -- @preserve */
29
+ _0x5df269(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2351a5,target:_0x528998,type:_0x4de8fe,isVisible:_0x56a0c1=!0x0}){super(),this['view']=_0x2351a5,this['view']['element']||this['view']['render'](),this['_type']=_0x4de8fe,this['_target']=_0x528998,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x842883([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x318649,_0x591835)=>{this['view']['focusTracker']['add'](_0x591835);}),this['focusableElements']['on']('remove',(_0x180045,_0x3281e7)=>{this['view']['focusTracker']['remove'](_0x3281e7);}),this['set']('isVisible',_0x56a0c1);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3348eb=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x3348eb),_0x3348eb;}get['targetRect'](){const _0x27c902=this['target'];if(null===_0x27c902)return null;if(_0x27c902 instanceof _0x221bff)return _0x27c902;const _0x126ed2=_0x27c902['filter'](_0x485986=>function(_0x5c93a6){const _0x247f4=_0x5c93a6['offsetParent'];if(_0x247f4)return!0x0;const _0xdd38bf=_0x5c93a6['getClientRects']()['item'](0x0);return!!_0xdd38bf;}(_0x485986));return 0x0===_0x126ed2['length']?null:new _0x221bff(_0x126ed2[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1af421){this['view']['isActive']=_0x1af421,this['view']['mainView']['isActive']=_0x1af421;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x316889){if(!(null===_0x316889||_0x316889 instanceof _0x221bff||Array['isArray'](_0x316889)&&_0x316889['every'](_0xb57c1a=>fi(_0xb57c1a))))throw new _0x552662('annotation-invalid-target',null,{'target':_0x316889});}['_getNormalizedTarget'](){const _0x356b5d='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x356b5d)?[_0x356b5d]:_0x356b5d;}}function fi(_0x537c8a){return null!==_0x537c8a&&'object'==typeof _0x537c8a&&'nodeType'in _0x537c8a&&0x1===_0x537c8a['nodeType'];}class S extends _0x842883{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5ebffe=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x67b3fd(),this['_focusTracker']['on']('change:isFocused',(_0x228622,_0x48af20,_0x57c2fa)=>{_0x57c2fa||this['fire']('blur');});for(const _0x2d034e of _0x5ebffe)this['add'](_0x2d034e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x313039){if(this['has'](_0x313039))throw new _0x552662('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x313039['innerView'],_0x313039),this['_viewToAnnotation']['set'](_0x313039['view'],_0x313039);for(const _0x34f474 of _0x313039['focusableElements'])this['_focusTracker']['add'](_0x34f474);this['listenTo'](_0x313039['focusableElements'],'add',(_0x541d0f,_0x4eaa2b)=>{this['_focusTracker']['add'](_0x4eaa2b);}),this['listenTo'](_0x313039['focusableElements'],'remove',(_0x180c7e,_0x209693)=>{this['_focusTracker']['remove'](_0x209693);}),this['listenTo'](_0x313039['view']['focusTracker'],'change:isFocused',(_0x1cca38,_0x50bec6,_0x5e7269)=>{_0x5e7269&&this['fire']('focus',_0x313039);}),_0x313039['updateTargetRect']();const _0x4e2831=this['_getOrderInContent'](_0x313039['view']['targetRect']);return super['add'](_0x313039,_0x4e2831);}['remove'](_0x363418){if(!this['has'](_0x363418))throw new _0x552662('annotationcollection-not-existing-item',null);this['stopListening'](_0x363418['view']['focusTracker']),this['stopListening'](_0x363418['focusableElements']);for(const _0xcc7b88 of _0x363418['focusableElements'])this['_focusTracker']['remove'](_0xcc7b88);return this['_viewToAnnotation']['delete'](_0x363418['view']),this['_innerViewToAnnotation']['delete'](_0x363418['innerView']),super['remove'](_0x363418);}['getByInnerView'](_0x593a14){return this['_innerViewToAnnotation']['get'](_0x593a14);}['getByView'](_0xde776f){return this['_viewToAnnotation']['get'](_0xde776f);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x371884 of this)_0x371884['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3c45b1=Array['from'](this)['sort']((_0x3b00cf,_0x560be0)=>w(_0x3b00cf['view']['targetRect'],_0x560be0['view']['targetRect']));for(let _0x28d85e=_0x3c45b1['length']-0x1;_0x28d85e>0x0;_0x28d85e--){const _0x2dc4df=_0x3c45b1[_0x28d85e];_0x28d85e!==this['getIndex'](_0x2dc4df)&&(this['remove'](_0x2dc4df),this['add'](_0x2dc4df));}}['_getOrderInContent'](_0x28b776){let _0x5687c7=0x0;if(!_0x28b776)return this['length'];for(const _0x353821 of this){const _0x1e4dd5=_0x353821['view']['targetRect'];if(_0x1e4dd5){if(w(_0x28b776,_0x1e4dd5)<0x0)return _0x5687c7;_0x5687c7++;}}return _0x5687c7;}}function v({source:_0x232d48,target:_0x235588,filter:_0x20b293}){for(const _0x54aaa4 of _0x232d48)_0x20b293(_0x54aaa4)&&_0x235588['add'](_0x54aaa4);_0x235588['listenTo'](_0x232d48,'add',(_0x167313,_0x2183e3)=>{_0x20b293(_0x2183e3)&&_0x235588['add'](_0x2183e3);}),_0x235588['listenTo'](_0x232d48,'remove',(_0x5e389d,_0x46bb12)=>{_0x235588['has'](_0x46bb12)&&_0x235588['remove'](_0x46bb12);});}function w(_0x2950f4,_0x5949dd){if(null===_0x2950f4&&null===_0x5949dd)return 0x0;if(null===_0x2950f4)return-0x1;if(null===_0x5949dd)return 0x1;const _0x1016a4=_0x2950f4['top']-_0x5949dd['top'];return 0x0==_0x1016a4?_0x2950f4['left']-_0x5949dd['left']:_0x1016a4;}class y extends _0x43ff48{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xeb075f){if(super(_0xeb075f),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xeb075f instanceof _0x3db27d){const _0xd87e3b=_0xeb075f['locale'];_0xeb075f['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0xd87e3b,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3405b8){this['collection']['add'](_0x3405b8);}['remove'](_0x4fe9a8){this['collection']['remove'](_0x4fe9a8),_0x4fe9a8['destroy']();}['refreshVisibility'](){for(const _0x236af6 of this['collection'])_0x236af6['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2be777){return this['collection']['getByInnerView'](_0x2be777);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x1e5ca8 of this['collection'])_0x1e5ca8['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x14fc3f){this['fire']('_activateAnnotation',_0x14fc3f);}['createAnnotation'](_0x572d8c){return new T(_0x572d8c);}['createAnnotationView'](_0x174455,_0x448b75){return new E(_0x174455,_0x448b75);}['_addActiveAnnotation'](_0x7e00fe){const _0x4a9150=new Set(this['activeAnnotations']);_0x4a9150['add'](_0x7e00fe),this['activeAnnotations']=_0x4a9150;}['_removeActiveAnnotation'](_0xcf5a60){const _0x5352d6=new Set(this['activeAnnotations']);_0x5352d6['delete'](_0xcf5a60),this['activeAnnotations']=_0x5352d6;}['_bindAnnotationsToVisibleAnnotations'](){const _0x39d6ad=this['collection'],_0x2c847e=this['_visibleAnnotations'];function _0x11f74b(_0x100a38){const _0x418f42=_0x100a38['source'];_0x418f42['isVisible']&&!_0x2c847e['has'](_0x418f42)?_0x2c847e['add'](_0x418f42):!_0x418f42['isVisible']&&_0x2c847e['has'](_0x418f42)&&_0x2c847e['remove'](_0x418f42),_0x418f42['view']['focusTracker']['remove'](_0x418f42['view']['element']),_0x418f42['view']['focusTracker']['add'](_0x418f42['view']['element']);}this['listenTo'](_0x39d6ad,'add',(_0x43f8b9,_0x51cd53)=>{_0x51cd53['isVisible']&&_0x2c847e['add'](_0x51cd53),this['listenTo'](_0x51cd53,'change:isVisible',_0x11f74b);}),this['listenTo'](_0x39d6ad,'remove',(_0x2f1902,_0x4d8f32)=>{_0x2c847e['has'](_0x4d8f32)&&_0x2c847e['remove'](_0x4d8f32),this['stopListening'](_0x4d8f32,'change:isVisible',_0x11f74b);});}['_setupEnterAnnotationKeystroke'](){const _0x4737e1=_0x315a18=>{_0x315a18['on']('ready',()=>{_0x315a18['keystrokes']['set'](_0x894944,(_0x4863a7,_0x271da0)=>{const _0x12aba7=_0x32a71d(this['activeAnnotations']['values']());_0x12aba7&&(_0x12aba7['view']['focus'](),_0x271da0());});});};this['context']instanceof _0x3db27d?_0x4737e1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x13de0d,_0x3994b9)=>{_0x4737e1(_0x3994b9);});}['_setupEscapeAnnotationHandling'](){const _0x36a60b=_0x32b98b=>{const _0x325a24=_0x32b98b['source'],_0xf3670f=[];let _0x3e5a65;if(Array['isArray'](_0x325a24['target'])){_0x3e5a65=_0x325a24['target'][0x0],this['context']instanceof _0x3db27d?_0xf3670f['push'](this['context']):this['context']['editors']&&_0xf3670f['push'](...this['context']['editors']);for(const _0x3568ce of _0xf3670f)for(const _0x491324 of _0x3568ce['editing']['view']['domRoots']['values']())if(_0x491324['contains'](_0x3e5a65))return void _0x3568ce['editing']['view']['focus']();_0x3e5a65['focus']();}};this['listenTo'](this['collection'],'add',(_0x5bf4f9,_0x105fee)=>{this['listenTo'](_0x105fee,'escape',_0x36a60b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x44ffaf,_0x6a0bd5)=>{this['stopListening'](_0x6a0bd5,'escape',_0x36a60b);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x43ff48{['_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(_0x1ee196){super(_0x1ee196),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x23ba06=this['context']['config'];_0x23ba06['define']('comments.maxCommentsWhenCollapsed',0x2),_0x23ba06['define']('comments.maxThreadTotalWeight',0x1f4),_0x23ba06['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x23ba06['define']('comments.CommentThreadView',gt),_0x23ba06['define']('comments.CommentView',Tt),_0x23ba06['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x202813=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2f400b,_0x3e5864)=>this['_addCommentThread'](_0x3e5864)),this['on']('submitCommentThread',(_0x4ebbd2,_0x561f64)=>this['_submitCommentThread'](_0x561f64)),this['on']('resolveCommentThread',(_0xbdda93,_0x307b9f)=>this['_resolveCommentThread'](_0x307b9f)),this['on']('resolveCommentThread',(_0x46be1f,_0x268832)=>this['_updateActiveAnnotation'](_0x268832),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x48b631,_0x59ca82)=>this['_reopenCommentThread'](_0x59ca82)),this['on']('reopenCommentThread',(_0x5739aa,_0x446c98)=>this['_updateActiveAnnotation'](_0x446c98),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x353d16,_0x135657)=>this['_removeCommentThread'](_0x135657)),this['on']('updateCommentThread',(_0x1c023f,_0x3167f6)=>this['_updateCommentThread'](_0x3167f6)),this['on']('updateCommentThread',(_0xa397e3,_0x4dde91)=>this['_updateActiveAnnotation'](_0x4dde91),{'priority':'lowest'}),this['on']('addComment',(_0x1f8c08,_0x90d25a)=>this['_addComment'](_0x90d25a)),this['on']('updateComment',(_0xa7c4e1,_0x313ddc)=>this['_updateComment'](_0x313ddc)),this['on']('removeComment',(_0x4b656d,_0x25e943)=>this['_removeComment'](_0x25e943)),this['on']('addComment',(_0x1b8b02,{threadId:_0x19aa64,isFromAdapter:_0x5cafc})=>{if(_0x5cafc)return;const _0x23bf99=this['getCommentThread'](_0x19aa64),_0x1fb7e7=_0x23bf99&&this['_threadToController']['get'](_0x23bf99);_0x1fb7e7&&_0x1fb7e7['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x202813,'change:activeAnnotations',(_0x2faea1,_0x4c0a3e,_0x20b615)=>{const _0xe699f1=Array['from'](_0x20b615)['map'](_0x24dcf6=>this['_viewToController']['get'](_0x24dcf6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xe699f1?_0xe699f1['model']:null;});}set['adapter'](_0x53686b){if(this['_adapter'])throw new _0x552662('commentsrepository-adapter-already-set');this['_adapter']=_0x53686b;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5b2e7e=_t,threadId:_0xaf6907=_0x1ce077(),comments:_0x2fefd7=[],unlinkedAt:_0x5e9312=null,resolvedAt:_0x299b6b=null,resolvedBy:_0x5e4c8b=null,target:_0x527f01=null,context:_0x3a68c8=null,attributes:_0x43e4e5={},isResolvable:_0x2becb0=!0x0,isSubmitted:_0x142150=!0x1,isFromAdapter:_0x1c340c=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x5b2e7e),{'channelId':_0x5b2e7e,'threadId':_0xaf6907,'comments':_0x2fefd7,'unlinkedAt':_0x5e9312,'resolvedAt':_0x299b6b,'resolvedBy':_0x5e4c8b,'target':_0x527f01,'context':_0x3a68c8,'attributes':_0x43e4e5,'isFromAdapter':_0x1c340c,'isResolvable':_0x2becb0,'isSubmitted':_0x142150}),this['getCommentThread'](_0xaf6907);}['openNewCommentThread']({channelId:_0x5995da=_t,threadId:_0x2db3d8=_0x1ce077(),target:_0xdf9a77,context:_0x3a441e=null,isResolvable:_0x237c2c=!0x0}){if(this['_readOnlyChannels']['has'](_0x5995da)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0xdf9a77)throw new _0x552662('commentsrepository-missing-target');const _0x21008f=this['addCommentThread']({'channelId':_0x5995da,'threadId':_0x2db3d8,'target':_0xdf9a77,'context':_0x3a441e,'isResolvable':_0x237c2c});if(!_0x21008f)return null;const _0x3f69c7=this['_threadToController']['get'](_0x21008f),_0x33134d=_0x3f69c7['view']['commentThreadInputView']['commentInputView'],_0x345ccf=this['context']['plugins']['get'](y),_0x5e5692=_0x345ccf['getByInnerView'](_0x3f69c7['view']);return _0x345ccf['activate'](_0x5e5692),_0x33134d['once']('editorReady',()=>_0x33134d['focus']()),_0x21008f;}['hasCommentThread'](_0x4c3d30){if('string'!=typeof _0x4c3d30)throw new _0x552662('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4c3d30);}['updateCommentThread']({channelId:_0x165189=_t,threadId:_0x5186ae,context:_0x627c50,unlinkedAt:_0x2cc842,attributes:_0x3876ab,isFromAdapter:_0x2a91d2=!0x1}){return this['fire'](Nt('updateCommentThread',_0x165189),{'channelId':_0x165189,'threadId':_0x5186ae,'context':_0x627c50,'unlinkedAt':_0x2cc842,'attributes':_0x3876ab,'isFromAdapter':_0x2a91d2}),this['getCommentThread'](_0x5186ae);}['getCommentThread'](_0x2b8244){if('string'!=typeof _0x2b8244)throw new _0x552662('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2b8244);}['fetchCommentThread']({channelId:_0x8f9ebc,threadId:_0x250f61}={}){const _0x5bd4e7=this['getCommentThread'](_0x250f61);if(_0x5bd4e7)return Promise['resolve'](_0x5bd4e7);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x552662('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x8f9ebc,'threadId':_0x250f61})['then'](_0x4b0334=>this['hasCommentThread'](_0x250f61)?this['getCommentThread'](_0x250f61):_0x4b0334?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x8f9ebc},_0x4b0334)):void 0x0)['catch'](_0x99102e=>{throw console['error'](_0x99102e),new _0x552662('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1e8c64,skipNotAttached:_0x236a74=!0x1,skipEmpty:_0x536d78=!0x1,toJSON:_0xc438b2=!0x1}={}){const _0x2114c0=[];for(const _0x47974b of this['_threads']['values']())_0x1e8c64&&_0x47974b['channelId']!==_0x1e8c64||_0x236a74&&!_0x47974b['isAttached']||_0x536d78&&0x0===_0x47974b['length']||_0x2114c0['push'](_0x47974b);return _0xc438b2?_0x2114c0['map'](_0x1cb853=>_0x1cb853['toJSON']()):_0x2114c0;}['getAnnotationForCommentThread'](_0x22f524){const _0x108d85=this['_threadToController']['get'](_0x22f524);if(!_0x108d85)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x108d85['view'])||null;}['getCommentThreadForAnnotation'](_0x4ed316){const _0x44d007=this['_viewToController']['get'](_0x4ed316['innerView']);return _0x44d007?_0x44d007['model']:null;}['setActiveCommentThread'](_0x1c8046){const _0xc715c9=this['context']['plugins']['get'](y);if(!_0x1c8046)return void(this['activeCommentThread']&&_0xc715c9['deactivateAll']());const _0x5e6350=this['getCommentThread'](_0x1c8046);if(!_0x5e6350)throw new _0x552662('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1c8046});if(!this['_threadToController']['has'](_0x5e6350))throw new _0x552662('commentsrepository-active-not-attached',null,{'threadId':_0x1c8046});const _0x53a72e=_0xc715c9['getByInnerView'](this['_threadToController']['get'](_0x5e6350)['view']);_0xc715c9['activate'](_0x53a72e);}['switchReadOnly'](_0x29fa90,_0x6d7b95){_0x29fa90?this['_readOnlyChannels']['add'](_0x6d7b95):this['_readOnlyChannels']['delete'](_0x6d7b95),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x386d92){return this['_readOnlyChannels']['has'](_0x386d92)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x51a1f6,_0x426ef5){return new vt(_0x51a1f6,_0x426ef5);}['setPermissions'](_0x528a3f,_0x29dbcc=_t){this['_permissions']['set'](_0x29dbcc,_0x528a3f),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x50fcfa=_t){return this['_permissions']['has'](_0x50fcfa)?this['_permissions']['get'](_0x50fcfa):bt;}['_addCommentThread']({channelId:_0x17be1b,threadId:_0x46b6c5,comments:_0x5b5c70,unlinkedAt:_0x3d3db8,resolvedAt:_0x2734bd,resolvedBy:_0x18beac,target:_0x3f88a4,context:_0x549073,attributes:_0x458f80,isFromAdapter:_0x36947f,isResolvable:_0x277cfc,isSubmitted:_0x2a1ca3}){if('string'!=typeof _0x46b6c5)throw new _0x552662('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x46b6c5});if(this['hasCommentThread'](_0x46b6c5))throw new _0x552662('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x46b6c5});const _0x42933e=new pi(this,{'channelId':_0x17be1b,'id':_0x46b6c5,'context':_0x549073,'attributes':_0x458f80,'unlinkedAt':_0x3d3db8,'resolvedAt':_0x2734bd,'resolvedBy':_0x18beac?this['context']['plugins']['get'](it)['getUser'](_0x18beac):null,'isResolvable':_0x277cfc,'isSubmitted':_0x2a1ca3||_0x36947f});this['_threads']['set'](_0x46b6c5,_0x42933e);for(const _0x33b8ee of _0x5b5c70)_0x42933e['_add'](this['_createNewComment']({'threadId':_0x46b6c5,..._0x33b8ee}));return _0x3f88a4&&_0x42933e['attachTo'](_0x3f88a4),_0x36947f||!_0x42933e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x17be1b,'threadId':_0x46b6c5});}['_submitCommentThread']({channelId:_0x12aaff,threadId:_0x4d1534}){if(!this['hasCommentThread'](_0x4d1534))throw new _0x552662('commentsrepository-missing-comment-thread',this);const _0x2db813=this['getCommentThread'](_0x4d1534);if(_0x2db813['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x59446b,comments:_0x39d317,resolvedAt:_0x27b71f,resolvedBy:_0x55e6f6,context:_0x11d414,attributes:_0x3993fc}=_0x2db813,_0x4c1f25=this['context']['plugins']['get']('PendingActions'),_0xc9c5ef=_0x4c1f25['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x12aaff,'threadId':_0x59446b,'comments':_0x39d317['map'](_0xaed718=>_0xaed718['toJSON']()),'resolvedAt':_0x27b71f,'resolvedBy':_0x55e6f6?_0x55e6f6['id']:_0x55e6f6,'context':_0x11d414,'attributes':_0x3993fc})['then'](({comments:_0x318edf})=>{_0x4c1f25['remove'](_0xc9c5ef);for(const _0x37a8e8 of _0x318edf)this['_updateComment']({'channelId':_0x12aaff,'threadId':_0x4d1534,'commentId':_0x37a8e8['commentId'],'createdAt':_0x37a8e8['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x442227=>{throw console['error'](_0x442227),new _0x552662('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x27a42f,target:_0xa7dcd2}){const _0x40267b=this['getCommentThread'](_0x27a42f);if(!_0x40267b)throw new _0x552662('commentsrepository-attach-missing-comment-thread',this);const _0x567082=this['context']['plugins']['get']('PendingActions'),_0x505c48=this['context']['plugins']['get'](y),_0x49f85c=this['_createCommentThreadView'](_0x40267b),_0x552610=new vt(_0x40267b,_0x49f85c);let _0x53f8d0=null;_0x49f85c['on']('change:isDirty',(_0x3d2696,_0x563a67,_0x46fd81)=>{_0x46fd81?_0x53f8d0=_0x567082['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x53f8d0&&(_0x567082['remove'](_0x53f8d0),_0x53f8d0=null);}),this['_threadToController']['set'](_0x40267b,_0x552610),this['_viewToController']['set'](_0x49f85c,_0x552610);const _0x1792b0=new E(this['context']['locale'],_0x49f85c);_0x1792b0['bind']('length')['to'](_0x49f85c),_0x1792b0['bind']('isDirty')['to'](_0x49f85c,'isDirty',_0x49f85c,'length',(_0xd7c40,_0x25c4e8)=>_0xd7c40||!_0x25c4e8),_0x1792b0['bind']('isActive')['to'](_0x49f85c),_0x1792b0['type']='comment';const _0x43897a=new T({'view':_0x1792b0,'target':_0xa7dcd2,'type':'comment','isVisible':!_0x40267b['archivedAt']&&!!('function'==typeof _0xa7dcd2?_0xa7dcd2():_0xa7dcd2)});return _0x49f85c['on']('escape',()=>{_0x43897a['fire']('escape');}),this['_bindAnnotationToEditors'](_0x49f85c,_0x43897a),_0x505c48['add'](_0x43897a),_0x43897a;}['_bindAnnotationToEditors'](_0xb928ea,_0x4c829b){this['listenTo'](_0xb928ea,'editorReady',(_0x20edda,_0x4001f4)=>{const _0x5a619a=_0x4001f4['ui']['view']['body']['bodyCollectionContainer'];_0x4c829b['focusableElements']['add'](_0x5a619a),this['context']instanceof _0x3db27d&&this['context']['ui']['focusTracker']['add'](_0x5a619a);},{'priority':'highest'}),this['listenTo'](_0xb928ea,'editorDestroyed',(_0x174579,_0x4583eb)=>{const _0x2ad4c7=_0x4583eb['ui']['view']['body']['bodyCollectionContainer'];_0x4c829b['focusableElements']['has'](_0x2ad4c7)&&_0x4c829b['focusableElements']['remove'](_0x2ad4c7),this['context']instanceof _0x3db27d&&this['context']['ui']['focusTracker']['remove'](_0x2ad4c7);});}['_unbindEditors'](_0x9aa023){this['stopListening'](_0x9aa023,'editorReady'),this['stopListening'](_0x9aa023,'editorDestroyed');}['_createCommentThreadView'](_0x6330e2){const _0x585ebd=this['context']['plugins']['get'](it),{config:_0x3f3834,locale:_0x1360ac}=this['context'],_0x238b0f=pt(_0x3f3834['get']('locale'),_0x1360ac);return new(0x0,(_0x3f3834['get']('comments'))['CommentThreadView'])(_0x1360ac,_0x6330e2,_0x585ebd['me'],{'editorConfig':{..._0x3f3834['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3f3834['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3f3834['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3f3834['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3f3834['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x238b0f,'CommentView':_0x3f3834['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2a80df,channelId:_0xd8c0b4,resolvedAt:_0x3f0267,resolvedBy:_0x57e6c4,isFromAdapter:_0xbd7f52}){if(!this['hasCommentThread'](_0x2a80df))throw new _0x552662('commentsrepository-missing-comment-thread',null,{'threadId':_0x2a80df});const _0x276f4d=this['getCommentThread'](_0x2a80df);if(_0x276f4d['isResolved'])throw new _0x552662('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2a80df});const _0x2a19a4=this['context']['plugins']['get'](it);if(_0x276f4d['resolvedBy']=_0x2a19a4['getUser'](_0x57e6c4),_0x276f4d['resolvedAt']=_0x3f0267,_0xbd7f52||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3271ef=this['context']['plugins']['get']('PendingActions'),_0x2dc723=_0x3271ef['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0xd8c0b4,'threadId':_0x2a80df})['then'](({resolvedAt:_0x421c41,resolvedBy:_0x429bad})=>{_0x3271ef['remove'](_0x2dc723),_0x276f4d['resolvedBy']['id']!==_0x429bad&&(_0x276f4d['resolvedBy']=_0x2a19a4['getUser'](_0x429bad)),_0x276f4d['resolvedAt']=_0x421c41;})['catch'](_0x1f2b99=>{throw console['error'](_0x1f2b99),new _0x552662('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5255d4,channelId:_0x5f3e15,isFromAdapter:_0xf6065}){if(!this['hasCommentThread'](_0x5255d4))throw new _0x552662('commentsrepository-missing-comment-thread',null,{'threadId':_0x5255d4});const _0x152c0e=this['getCommentThread'](_0x5255d4);if(!_0x152c0e['isResolved'])throw new _0x552662('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5255d4});if(_0x152c0e['resolvedBy']=null,_0x152c0e['resolvedAt']=null,_0xf6065||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2a2640=this['context']['plugins']['get']('PendingActions'),_0x5cc6ff=_0x2a2640['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5f3e15,'threadId':_0x5255d4})['then'](()=>_0x2a2640['remove'](_0x5cc6ff))['catch'](_0x599ae6=>{throw console['error'](_0x599ae6),new _0x552662('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x58c5b3,isFromAdapter:_0x272db5}){const _0x50218d=this['getCommentThread'](_0x58c5b3);if(!_0x50218d)throw new _0x552662('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x58c5b3),this['_threads']['delete'](_0x58c5b3),!_0x50218d['isSubmitted']||_0x272db5||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x258c80=this['context']['plugins']['get']('PendingActions'),{channelId:_0x33ad9e}=_0x50218d,_0x42f1d7=_0x258c80['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x33ad9e,'threadId':_0x58c5b3})['then'](()=>_0x258c80['remove'](_0x42f1d7))['catch'](_0x2e58dc=>{throw console['error'](_0x2e58dc),new _0x552662('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5e088c,unlinkedAt:_0x372ffa,context:_0x316548,attributes:_0x32619a,isFromAdapter:_0x3406ef}){if('string'!=typeof _0x5e088c)throw new _0x552662('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5e088c});if(!this['hasCommentThread'](_0x5e088c))throw new _0x552662('commentsrepository-missing-comment-thread',null,{'threadId':_0x5e088c});const _0x3f9d3f=this['getCommentThread'](_0x5e088c);let _0x589377=!0x1;if(void 0x0!==_0x316548&&_0x3f9d3f['context']!==_0x316548&&(_0x3f9d3f['context']=_0x316548,_0x589377=!0x0),void 0x0!==_0x372ffa&&_0x3f9d3f['unlinkedAt']!==_0x372ffa&&(_0x3f9d3f['unlinkedAt']=_0x372ffa,_0x589377=!0x0),_0x32619a&&!At(_0x32619a,_0x3f9d3f['attributes'])&&(_0x3f9d3f['attributes']=_0x32619a,_0x589377=!0x0),!_0x589377)return Promise['resolve']();if(!_0x3f9d3f['isSubmitted']||_0x3406ef||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x858a49=this['context']['plugins']['get']('PendingActions'),{channelId:_0x23f011}=_0x3f9d3f,_0x50d315=_0x858a49['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x23f011,'threadId':_0x5e088c,'context':_0x316548,'unlinkedAt':_0x372ffa,'attributes':_0x32619a})['then'](()=>_0x858a49['remove'](_0x50d315))['catch'](_0x21a495=>{throw console['error'](_0x21a495),new _0x552662('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2bc693){const _0x4b1284=this['context']['plugins']['get'](y),_0x574c58=this['getCommentThread'](_0x2bc693);if(_0x574c58['_isAttached']=!0x1,this['_threadToController']['has'](_0x574c58)){const _0x11b032=this['_threadToController']['get'](_0x574c58),_0x21d068=_0x11b032['view'],_0x504dd1=_0x4b1284['getByInnerView'](_0x21d068);this['_threadToController']['delete'](_0x574c58),this['_viewToController']['delete'](_0x21d068),_0x504dd1&&_0x4b1284['remove'](_0x504dd1),_0x11b032['destroy'](),_0x21d068['destroy']()['then'](()=>{this['_unbindEditors'](_0x21d068);});}}['_updateActiveAnnotation']({threadId:_0x53da21,resolvedAt:_0x263f86,unlinkedAt:_0x1aae3d}){const _0x454f16=!!_0x263f86,_0x5663a1=this['context']['plugins']['get'](y),_0x116062=this['getCommentThread'](_0x53da21);if(this['_threadToController']['has'](_0x116062)){const _0x27da2b=this['_threadToController']['get'](_0x116062)['view'],_0x2895e5=_0x5663a1['getByInnerView'](_0x27da2b);_0x2895e5&&(_0x454f16&&_0x5663a1['_removeActiveAnnotation'](_0x2895e5),_0x1aae3d?_0x2895e5['isVisible']=!0x1:_0x2895e5['refreshVisibility']());}}['_getExternalAuthor'](_0x2b46c9){const _0x53e895=this['context']['plugins']['get'](it),_0x9ece39=It('external:'+_0x2b46c9),_0x3e54ac=_0x53e895['getUser'](_0x9ece39);return _0x3e54ac||_0x53e895['addUser']({'id':_0x9ece39,'name':_0x2b46c9});}['_createNewComment']({threadId:_0x1cff09,commentId:_0x564339=_0x1ce077(),content:_0x55d7e7,authorId:_0x48a533,createdAt:_0x59201a,attributes:_0x186207}){if('string'!=typeof _0x564339)throw new _0x552662('commentsrepository-invalid-commentid');if('string'!=typeof _0x48a533)throw new _0x552662('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x55d7e7||!_0x55d7e7['trim']())throw new _0x552662('commentsrepository-invalid-comment-content');const _0x18c1c8=this['context']['plugins']['get'](it)['getUser'](_0x48a533);if(!_0x18c1c8)throw new _0x552662('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x48a533});let _0x5a654d=null,_0x48c242=_0x59201a;return _0x186207?.['@external']&&(_0x5a654d=this['_getExternalAuthor'](_0x186207['@external']['authorName']),_0x48c242=new Date(_0x186207['@external']['createdAt'])),new wi(this,{'threadId':_0x1cff09,'id':_0x564339,'author':_0x5a654d||_0x18c1c8,'creator':_0x18c1c8,'content':_0x55d7e7,'createdAt':_0x59201a,'authoredAt':_0x48c242,'attributes':_0x186207});}['_addComment'](_0x13aadf){let {threadId:_0x2f9307,content:_0x3c768b,attributes:_0x2ae798,isFromAdapter:_0xc4120c}=_0x13aadf;const _0x30f314=this['getCommentThread'](_0x13aadf['threadId']);if(!_0x30f314)throw new _0x552662('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4904f4=this['_createNewComment'](_0x13aadf),{id:_0x1f0751}=_0x4904f4;if(_0x30f314['_add'](_0x4904f4),_0xc4120c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x30f314['isSubmitted'])return Promise['resolve']();const _0x53e63e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4dea9d}=_0x30f314,_0x2248a5=_0x53e63e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2ae798||(_0x2ae798={}),this['adapter']['addComment']({'channelId':_0x4dea9d,'threadId':_0x2f9307,'commentId':_0x1f0751,'content':_0x3c768b,'attributes':_0x2ae798})['then'](_0x31fbf6=>{_0x53e63e['remove'](_0x2248a5),_0x31fbf6&&this['_updateComment']({'channelId':_0x4dea9d,'threadId':_0x2f9307,'commentId':_0x1f0751,'createdAt':_0x31fbf6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x360ca5=>{throw console['error'](_0x360ca5),new _0x552662('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5e5fd7,commentId:_0x2e4a94,content:_0x3b7fa3,createdAt:_0x41b47c,attributes:_0x294489,isFromAdapter:_0x441d12}){if(void 0x0!==_0x3b7fa3&&('string'!=typeof _0x3b7fa3||!_0x3b7fa3['trim']()['length']))throw new _0x552662('commentsrepository-update-comment-invalid-content');const _0x3d7a9d=this['getCommentThread'](_0x5e5fd7),_0x5d84b1=_0x3d7a9d['getComment'](_0x2e4a94);if(!_0x5d84b1)throw new _0x552662('commentsrepository-update-missing-comment',this);let _0xf9db09=!0x1;if(_0x3b7fa3&&_0x3b7fa3!==_0x5d84b1['content']&&(_0x5d84b1['isEditable']||_0x441d12)&&(_0x5d84b1['content']=_0x3b7fa3,_0xf9db09=!0x0),_0x41b47c&&_0x41b47c!==_0x5d84b1['createdAt']&&(_0x5d84b1['createdAt']=_0x41b47c,_0x5d84b1['attributes']&&_0x5d84b1['attributes']['@external']||(_0x5d84b1['authoredAt']=_0x41b47c),_0xf9db09=!0x0),_0x294489&&!At(_0x294489,_0x5d84b1['attributes'])&&(_0x5d84b1['attributes']=_0x294489,_0xf9db09=!0x0),!_0xf9db09)return Promise['resolve']();if(_0x3d7a9d['fire']('commentUpdated'),_0x441d12||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x125684=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd207f7}=this['getCommentThread'](_0x5d84b1['threadId']),_0x5a9b9f=_0x125684['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xd207f7,'threadId':_0x5e5fd7,'commentId':_0x2e4a94,'content':_0x3b7fa3,'attributes':_0x294489})['then'](()=>_0x125684['remove'](_0x5a9b9f))['catch'](_0x258d8a=>{throw console['error'](_0x258d8a),new _0x552662('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x25d00d,commentId:_0x17ab0a,isFromAdapter:_0x2ee1d2}){const _0x354f84=this['getCommentThread'](_0x25d00d),_0x329f2e=_0x354f84['getComment'](_0x17ab0a);if(!_0x329f2e)throw new _0x552662('commentsrepository-remove-missing-comment',this);if(_0x354f84['_remove'](_0x329f2e),_0x2ee1d2||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x46f081=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2d93c5}=_0x354f84,_0x4b6d50=_0x46f081['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2d93c5,'threadId':_0x25d00d,'commentId':_0x17ab0a})['then'](()=>_0x46f081['remove'](_0x4b6d50))['catch'](_0xa1c11b=>{throw console['error'](_0xa1c11b),new _0x552662('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
30
+ _0x5df269(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x2cc89e,_0x5bc3a7){super();const _0x39a6e8=_0x5bc3a7['isResolvable'];this['channelId']=_0x5bc3a7['channelId'],this['id']=_0x5bc3a7['id'],this['comments']=new _0x842883(),this['_repository']=_0x2cc89e,this['_isAttached']=!0x1,this['_isSubmitted']=_0x5bc3a7['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x2cc89e,'_permissions',_0x2cc89e,'_readOnlyChannels',()=>_0x2cc89e['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x2cc89e,'_permissions',()=>_0x2cc89e['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x2cc89e,'_permissions',()=>{const _0x277be7=_0x2cc89e['getPermissions'](this['channelId']);return _0x277be7['write']||_0x277be7['admin'];}),this['bind']('isResolvable')['to'](_0x2cc89e,'_permissions',()=>_0x39a6e8&&_0x2cc89e['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x5bc3a7['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x4450b3,_0xbb30bf)=>_0x4450b3?_0xbb30bf?_0x4450b3<_0xbb30bf?_0x4450b3:_0xbb30bf:_0x4450b3:_0xbb30bf),this['set']('unlinkedAt',_0x5bc3a7['unlinkedAt']||null),this['set']('resolvedAt',_0x5bc3a7['resolvedAt']||null),this['set']('resolvedBy',_0x5bc3a7['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x52680e=>!!_0x52680e),this['set']('attributes',_0x5bc3a7['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xd5a43b,_0x520585)=>_0xd5a43b+_0x520585['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x108e14,id:_0x2ee77b}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x108e14),{'channelId':_0x108e14,'threadId':_0x2ee77b});}['setUnlinkedAt'](_0x58b24b){this['_update']({'unlinkedAt':_0x58b24b});}['resolve']({resolvedAt:_0x906c59=new Date(),resolvedBy:_0x4db9be='',isFromAdapter:_0x91ea22=!0x1}={}){const _0x14310d=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x2b080e,id:_0x574b0c}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x2b080e),{'channelId':_0x2b080e,'threadId':_0x574b0c,'resolvedAt':_0x906c59,'resolvedBy':_0x4db9be||_0x14310d['id'],'isFromAdapter':_0x91ea22});}['reopen']({isFromAdapter:_0xb4673d=!0x1}={}){const {channelId:_0x203e2f,id:_0x2e2049}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x203e2f),{'channelId':_0x203e2f,'threadId':_0x2e2049,'isFromAdapter':_0xb4673d});}['setContext'](_0x2ce9fc){this['context']||this['_update']({'context':_0x2ce9fc});}['setAttribute'](_0x5301f7,_0x3c202f){const _0x134c3c=wt(this['attributes']);yt(_0x134c3c,_0x5301f7,_0x3c202f),this['_update']({'attributes':_0x134c3c});}['removeAttribute'](_0x30d326){const _0x2f06d8=wt(this['attributes']);Ct(_0x2f06d8,_0x30d326),this['_update']({'attributes':_0x2f06d8});}['remove']({isFromAdapter:_0x4f53c9=!0x1}={}){const {channelId:_0x47ef41,id:_0x57cdd4}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x47ef41),{'channelId':_0x47ef41,'threadId':_0x57cdd4,'isFromAdapter':_0x4f53c9});}['attachTo'](_0xbc5a97){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xbc5a97});}['addComment'](_0xe3b187){const {channelId:_0x123a52,id:_0x30300f}=this;this['_repository']['fire'](Nt('addComment',_0x123a52,_0x30300f),Object['assign']({'channelId':_0x123a52,'threadId':_0x30300f},_0xe3b187));}['getComment'](_0x153834){if('string'!=typeof _0x153834)throw new _0x552662('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x153834});return this['comments']['get'](_0x153834);}['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'](_0x210301=>_0x210301['toJSON']()),'attributes':this['attributes']};}['_add'](_0x275ffc){return this['listenTo'](_0x275ffc,'change:authoredAt',()=>{const _0x52a008=this['_findOptimalIndex'](_0x275ffc),_0x524a52=this['comments'];_0x52a008-0x1!=_0x524a52['getIndex'](_0x275ffc)&&_0x52a008+0x1!=_0x524a52['getIndex'](_0x275ffc)&&(this['_remove'](_0x275ffc),this['_add'](_0x275ffc));}),this['comments']['add'](_0x275ffc,this['_findOptimalIndex'](_0x275ffc));}['_update'](_0x4fad0e){const {channelId:_0x5a7003,id:_0x28f0bd}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x5a7003),{..._0x4fad0e,'channelId':_0x5a7003,'threadId':_0x28f0bd});}['_remove'](_0x46c585){return this['stopListening'](_0x46c585),_0x46c585['destroy'](),this['comments']['remove'](_0x46c585);}['_findOptimalIndex'](_0x4149a5){const _0x5abf1c=this['comments']['find'](_0x4a9297=>new Date(_0x4a9297['authoredAt'])['getTime']()>new Date(_0x4149a5['authoredAt'])['getTime']());return _0x5abf1c?this['comments']['getIndex'](_0x5abf1c):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
31
+ _0x5df269(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x51a780,_0x4d3881){super();const _0xaa440f=_0x51a780['context']['plugins']['get'](it)['me'],_0x5e9a47=_0x51a780['getCommentThread'](_0x4d3881['threadId']),_0x31edeb=0x0===_0x5e9a47['comments']['length'],_0x152228=_0xaa440f===_0x4d3881['author'];this['id']=_0x4d3881['id'],this['threadId']=_0x4d3881['threadId'],this['author']=_0x4d3881['author'],this['creator']=_0x4d3881['creator'],this['isExternal']=Boolean(_0x4d3881['attributes']&&_0x4d3881['attributes']['@external']),this['set']('content',_0x4d3881['content']),this['createdAt']=_0x4d3881['createdAt']||new Date(),this['set']('authoredAt',_0x4d3881['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5e9a47,'resolvedAt'),this['set']('attributes',_0x4d3881['attributes']||{}),this['bind']('isEditable')['to'](_0x51a780,'_permissions',()=>{const _0x588a78=_0x51a780['getPermissions'](_0x5e9a47['channelId'])['write'],_0x4c0fe9=_0x51a780['getPermissions'](_0x5e9a47['channelId'])['modifyAll'];return _0x152228&&_0x588a78||!_0x152228&&_0x4c0fe9;}),this['bind']('isRemovable')['to'](_0x5e9a47,'isRemovable',_0x51a780,'_permissions',_0x2c85d4=>{const _0x51cc7d=_0x51a780['getPermissions'](_0x5e9a47['channelId'])['write'],_0xddaecd=_0x51a780['getPermissions'](_0x5e9a47['channelId'])['modifyAll'];return _0x152228&&_0x51cc7d||_0x2c85d4&&_0x31edeb||!_0x152228&&_0xddaecd&&!_0x31edeb;}),this['bind']('isReadOnly')['to'](_0x5e9a47,'isReadOnly'),this['_repository']=_0x51a780;}get['weight'](){return Math['max'](function(_0x3e6a91){const _0x510fac=document['createElement']('div');return _0x510fac['innerHTML']=_0x3e6a91,_0x510fac['textContent']['length'];}(this['content']),0xc8);}['update'](_0x37953e){const {threadId:_0x1a54dc,id:_0x1e952e}=this;if(!this['_repository']['hasCommentThread'](_0x1a54dc))throw new _0x552662('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x20ab19}=this['_repository']['getCommentThread'](_0x1a54dc);this['_repository']['fire'](Nt('updateComment',_0x20ab19,_0x1a54dc),{'channelId':_0x20ab19,'threadId':_0x1a54dc,'commentId':_0x1e952e,..._0x37953e});}['setAttribute'](_0x9a453c,_0xad673c){const _0x9cf80e=wt(this['attributes']);yt(_0x9cf80e,_0x9a453c,_0xad673c),this['update']({'attributes':_0x9cf80e});}['removeAttribute'](_0x4fb5ad){const _0x5ae9b3=wt(this['attributes']);Ct(_0x5ae9b3,_0x4fb5ad),this['update']({'attributes':_0x5ae9b3});}['remove'](_0x357a61={}){if(!_0x357a61['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3028fb,id:_0x44cd73}=this;if(!this['_repository']['hasCommentThread'](_0x3028fb))throw new _0x552662('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x22e44f}=this['_repository']['getCommentThread'](_0x3028fb);this['_repository']['fire'](Nt('removeComment',_0x22e44f,_0x3028fb),{'channelId':_0x22e44f,'threadId':_0x3028fb,'commentId':_0x44cd73,..._0x357a61});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3340ec,..._0x2ec4d3){for(const _0x11b1f3 of _0x2ec4d3)void 0x0!==_0x11b1f3&&(_0x3340ec+=':'+String(_0x11b1f3));return _0x3340ec;}class ot extends _0x3077e4{constructor(_0x3fcba5){super(_0x3fcba5),this['set']('hasContent',!0x1);}['refresh'](){const _0x357cd4=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5873cf of _0x357cd4['getRanges']())if(this['_hasContent'](_0x5873cf))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x18aee1=_0x1ce077(),ranges:_0x18ee82,comment:_0x1e5f0f}={}){const _0x40d544=this['editor']['model'],_0x2077e9=_0x18ee82??Array['from'](_0x40d544['document']['selection']['getRanges']()),_0x5c5c40=[];for(const _0x515ff5 of _0x2077e9)this['_hasContent'](_0x515ff5)&&_0x5c5c40['push'](this['_trimToContent'](_0x515ff5));if(!_0x5c5c40['length'])throw new _0x552662('addcommentthreadcommand-incorrect-ranges',null);_0x1e5f0f&&this['_createCommentThread'](_0x18aee1,_0x1e5f0f),this['_createMarkersFromRanges'](_0x18aee1,_0x5c5c40,!!_0x1e5f0f);}['_createMarkersFromRanges'](_0x957a04,_0x40a116,_0x16a96f){this['editor']['model']['change'](_0x5ab125=>{for(const _0x424a91 of _0x40a116){const _0x17623e=_0x1ce077()['substr'](0x1,0x5),_0x103082='comment:'+_0x957a04+':'+_0x17623e;_0x5ab125['addMarker'](_0x103082,{'range':_0x424a91,'usingOperation':_0x16a96f,'affectsData':_0x16a96f});}});}['_createCommentThread'](_0x4e37d8,_0x2b372b){const _0x19e08a=this['editor']['plugins']['get']('CommentsRepository'),_0xec98c3=this['editor']['config']['get']('collaboration.channelId'),_0x266a65=this['editor']['plugins']['get']('Users')['me'];if(!_0x266a65)throw new _0x552662('addcommentthreadcommand-user-not-found',null);_0x19e08a['addCommentThread']({'threadId':_0x4e37d8,'channelId':_0xec98c3,'comments':[{'authorId':_0x266a65['id'],'content':_0x2b372b,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4ce182){for(const _0x44b12d of _0x4ce182['getItems']())if(this['_itemIsContent'](_0x44b12d))return!0x0;return!0x1;}['_itemIsContent'](_0x207517){return _0x207517['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x207517)&&!_0x207517['is']('element','tableCell');}['_trimToContent'](_0x57d5f8){const _0x4cddce=_0x3ac8be=>!this['_itemIsContent'](_0x3ac8be['item']),_0x483080=_0x57d5f8['start']['getLastMatchingPosition'](_0x4cddce),_0x29479c=_0x57d5f8['end']['getLastMatchingPosition'](_0x4cddce,{'direction':'backward'});return this['editor']['model']['createRange'](_0x483080,_0x29479c);}}class b extends _0x478bf2{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c4157){super(_0x2c4157),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x17406a=this['editor'],_0x505ddb=_0x17406a['model']['document']['selection'],_0x297291=_0x391904(()=>this['refreshSelectedViews'](),0xa);_0x505ddb['on']('change:range',(_0x7ea7e8,_0xd3e0e1)=>{_0xd3e0e1['directChange']&&(_0x297291['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x17406a['editing']['view']['document'],'change:isFocused',(_0x5f53ec,_0x3d63d9,_0x5e377d)=>{_0x5e377d&&_0x297291();}),this['listenTo'](_0x17406a['ui']['focusTracker'],'change:isFocused',(_0x4ac68a,_0x481ec5,_0x4f2752)=>{_0x4f2752||this['fire']('blur',{'isAnnotationTracked':_0x57af65=>this['_editorAnnotationsData']['has'](_0x57af65['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x148b6e){if(this['_editorAnnotations']['has'](_0x148b6e['view']))return;this['_editorAnnotations']['add'](_0x148b6e['view']),this['editor']['ui']['focusTracker']['add'](_0x148b6e['view']['element']);const _0x2747d9=this['editor']['plugins']['get'](y);this['listenTo'](_0x2747d9['collection'],'remove',(_0x1147e6,_0x3ba2a6)=>{this['editor']['ui']['focusTracker']['remove'](_0x3ba2a6['view']['element']),this['_editorAnnotations']['delete'](_0x3ba2a6['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1f5706){if('function'!=typeof _0x1f5706)throw new _0x552662('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1f5706);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x464f83,annotations:_0x2e9f0b}){const _0x3e207d=[],_0x390e15=this['editor']['model']['document']['selection'],_0xa9e08=Array['from'](_0x390e15['getRanges']());for(const [_0xe8800a,_0x4e7671]of this['_editorAnnotationsData']){const _0xeafce7=_0x50be3e(_0x4e7671),_0x2fe634=_0x2e9f0b['getByInnerView'](_0xe8800a);_0xeafce7&&_0x2fe634&&_0x3e207d['push']({'annotation':_0x2fe634,'range':_0xeafce7});}function _0x50be3e(_0x4a435f){for(const _0x51687c of _0x4a435f)for(const _0x372c51 of _0xa9e08)if(_0x51687c['containsRange'](_0x372c51,!_0x390e15['isCollapsed']))return _0x51687c;return null;}return _0x3e207d['sort']((_0x4ec48c,_0x3840ba)=>{const _0x3f911e=_0x4ec48c['range'],_0x56e398=_0x3840ba['range'];if(!_0x3f911e['isEqual'](_0x56e398)){if(_0x3f911e['containsRange'](_0x56e398,!0x0))return 0x1;if(_0x56e398['containsRange'](_0x3f911e,!0x0))return-0x1;}return _0x4ec48c['annotation']==_0x464f83?-0x1:_0x3840ba['annotation']==_0x464f83?0x1:0x0;})['map'](_0x50bfc0=>_0x50bfc0['annotation']);}get['_editorAnnotationsData'](){const _0x245061=new Map();for(const _0x4c05cc of Array['from'](this['_dataCollectors']))for(const [_0x516ab3,_0x325cc2]of _0x4c05cc())_0x245061['set'](_0x516ab3,_0x325cc2);return _0x245061;}}class st extends _0x478bf2{['afterInit'](){const _0x2d3ff=this['editor'];if(!_0x2d3ff['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2d3ff['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x478bf2{constructor(_0x48704e){super(_0x48704e),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x18fe6e=this['editor'],_0x2f797e=_0x18fe6e['commands']['get']('importWord'),_0x2ee75c=_0x18fe6e['plugins']['get'](it);_0x2f797e&&(_0x2f797e['on']('execute',(_0xbdde68,[,_0x14d8df])=>{_0x14d8df['collaboration_features']={'comments':!0x0,'user_id':_0x2ee75c['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2f797e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x38078c,_0x31e114){const {comment_threads:_0x5efdc2}=_0x31e114;_0x5efdc2&&_0x5efdc2['forEach'](({thread_id:_0x4ab98d,comments:_0x3d56b6,is_resolved:_0x2ed0a7})=>{const _0x3d6610=new Date(),_0x49ddb8=_0x3d56b6['map'](({author:_0x5b7d3f,content:_0x598fb8,created_at:_0x36ca8d})=>({'content':_0x598fb8,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x3d6610,'attributes':{'@external':{'authorName':_0x5b7d3f,'createdAt':_0x36ca8d?new Date(_0x36ca8d):new Date(),'source':'importWord'}}})),_0x898fa5=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x898fa5,'threadId':_0x4ab98d,'comments':_0x49ddb8,'resolvedAt':_0x2ed0a7?_0x3d6610:null});});}}class at extends _0x478bf2{constructor(_0x509f8a){super(_0x509f8a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x3e4f60=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x3e4f60,'contentInsertion',(_0x2fde46,_0xb3dfe5)=>this['_removeMarkersWithoutThreads'](_0xb3dfe5['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4bc30f){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4bc30f;const _0x3d52e7=this['editor']['plugins']['get']('CommentsRepository');for(const _0x1d0b41 of _0x4bc30f['keys']()){const [_0x38f0fb,_0x448642]=_0x1d0b41['split'](':');'comment'!=_0x38f0fb||_0x3d52e7['hasCommentThread'](_0x448642)||_0x4bc30f['delete'](_0x1d0b41);}return _0x4bc30f;}['_registerMarkerInClipboardPipeline'](){const _0x224f47=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x17b352=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x17b352&&_0x224f47['_registerMarkerToCopy']('comment',_0x17b352);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x332daf){switch(_0x332daf){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x2a7537){const _0x5118f4=_0x2a7537['split'](':');return{'group':_0x5118f4[0x0],'id':_0x5118f4[0x1],'part':_0x5118f4[0x2]};}class ut extends _0x478bf2{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xa90f52,_0x288c4e)=>{if(!_0x288c4e['options']['showCommentHighlights'])return null;if(_0x288c4e['options']['ignoreResolvedComments']){const {id:_0x4a9379}=ft(_0xa90f52['markerName']),_0x3fd945=this['editor']['plugins']['get'](o);if(_0x3fd945['getCommentThread'](_0x4a9379)?.['isResolved']&&_0xa90f52['item'])return _0x288c4e['consumable']['consume'](_0xa90f52['item'],'addMarker:'+_0xa90f52['markerName']),_0x288c4e['consumable']['consume'](_0xa90f52['item'],'removeMarker:'+_0xa90f52['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x475cd8=>{_0x475cd8['on']('addMarker:comment',(_0x1a14d9,_0x1ddfe8,_0x5ccd8a)=>{if(!_0x5ccd8a['options']['showCommentHighlights'])return;const _0x5a735a=_0x1ddfe8['item'];if(!_0x5a735a)return;const _0x289c23=_0x5ccd8a['mapper']['toViewElement'](_0x5a735a);this['editor']['model']['schema']['isObject'](_0x5a735a)&&_0x289c23&&!_0x289c23['getCustomProperty']('widget')&&_0x289c23['is']('containerElement')&&_0x2da229(_0x289c23,_0x5ccd8a['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x555fb3,{writer:_0x49bace,options:_0x1f0b9c})=>{if(!_0x1f0b9c['showCommentHighlights'])return null;const _0x175c10=_0x49bace['createContainerElement']('div'),_0xeae1d4=_0x49bace['createEmptyElement']('hr');return _0x49bace['addClass']('ck-horizontal-line',_0x175c10),_0x49bace['insert'](_0x49bace['createPositionAt'](_0x175c10,0x0),_0xeae1d4),_0x175c10;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2ff924,{writer:_0x11e2f0,options:_0x502523})=>{if(!_0x502523['showCommentHighlights'])return null;const _0x203d63=_0x11e2f0['createContainerElement']('span'),_0x1570c0=_0x11e2f0['createEmptyElement']('img');return _0x11e2f0['addClass']('image-inline',_0x203d63),_0x11e2f0['insert'](_0x11e2f0['createPositionAt'](_0x203d63,0x0),_0x1570c0),_0x203d63;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x279d45,{writer:_0x1a7cbd,options:_0x49ebbe})=>{if(_0x49ebbe['showCommentHighlights'])return _0x1a7cbd['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3a74dd,_0x1078f4,_0x1bff27)=>{_0x1bff27['options']['showCommentHighlights']&&_0x3a74dd['stop']();},{'priority':'high'});}}class r extends _0x478bf2{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(_0x12dba9){super(_0x12dba9),this['set']('isThreadsLoadingPaused',!0x0),_0x12dba9['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3e9135,_0x1f89b6,_0x5013a4,_0x295319)=>{const _0x16c9fb=_0x12dba9['plugins']['get'](o),_0x23c8cc=_0x5013a4?ft(_0x5013a4)['id']:null;_0x12dba9['model']['change'](()=>{if(_0x23c8cc){const _0x4322fd=this['getAllMarkersForId'](_0x23c8cc);for(const _0x3ae123 of _0x4322fd)_0x12dba9['editing']['reconvertMarker'](_0x3ae123);}if(_0x295319){const {id:_0x10814f}=ft(_0x295319),_0x449b80=_0x16c9fb['getCommentThread'](_0x10814f);if(_0x449b80&&_0x449b80['unlinkedAt'])return;if(_0x449b80&&!_0x449b80['isAttached'])return;const _0x328b57=this['getAllMarkersForId'](_0x10814f);for(const _0x28bd1a of _0x328b57)_0x12dba9['editing']['reconvertMarker'](_0x28bd1a);}}),_0x23c8cc&&this['scrollToThreadMarker'](_0x23c8cc);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x52e6b1=this['editor'],_0xa4c4a8=_0x52e6b1['plugins']['get'](o),_0x3be37e=_0x52e6b1['config']['get']('collaboration.channelId'),_0x56a946=_0xa4c4a8['getCommentThreads']()['filter'](_0x4559a1=>_0x4559a1['channelId']!==_0x3be37e);_0x52e6b1['commands']['add']('addCommentThread',new ot(_0x52e6b1)),this['listenTo'](_0x52e6b1,'change:isReadOnly',(_0x4f9e78,_0x304d4d,_0x160954)=>{_0xa4c4a8['switchReadOnly'](_0x160954,_0x52e6b1['config']['get']('collaboration.channelId'));}),this['listenTo'](_0xa4c4a8,dt('addCommentThread',_0x3be37e),(_0x4f9154,{threadId:_0x54c681})=>{const _0x28c1c4=this['editor']['plugins']['get'](o)['getCommentThread'](_0x54c681);_0x28c1c4?.['unlinkedAt']&&this['_attachArchivedThread'](_0x54c681);}),this['listenTo'](_0xa4c4a8,dt('removeCommentThread',_0x3be37e),(_0x1ca99d,{threadId:_0x231810})=>{_0x52e6b1['model']['enqueueChange']({'isUndoable':!0x1},_0x589444=>{const _0x3e1237=this['getAllMarkersForId'](_0x231810);for(const _0x33f4b5 of _0x3e1237)_0x589444['removeMarker'](_0x33f4b5);});}),this['listenTo'](_0xa4c4a8,dt('resolveCommentThread',_0x3be37e),(_0x1b58ce,{threadId:_0x43327b})=>{(this['_reconvertMarkers'](_0x43327b),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x43327b)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0xa4c4a8,dt('reopenCommentThread',_0x3be37e),(_0x44a80d,{threadId:_0x5a7bfa})=>{this['_reconvertMarkers'](_0x5a7bfa);},{'priority':'low'}),this['listenTo'](_0xa4c4a8,dt('addComment',_0x3be37e),(_0x1c621f,{threadId:_0x33c0d3,isFromAdapter:_0x60d8c})=>{const _0x576772=this['getAllMarkersForId'](_0x33c0d3);if(_0x60d8c||0x0==_0x576772['length']||!_0xa4c4a8['hasCommentThread'](_0x33c0d3))return;0x1===_0xa4c4a8['getCommentThread'](_0x33c0d3)['length']&&_0x52e6b1['model']['enqueueChange']({'isUndoable':!0x1},_0x32e3ec=>{for(const _0x48b5c4 of _0x576772)_0x32e3ec['updateMarker'](_0x48b5c4,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x56a946);}['afterInit'](){!async function(_0x26b03d){const _0x55c8c1=_0x4f3a13([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]),_0x138ece=0x73460ab3,_0x198ba6=0x73418863^_0x138ece,_0x102ac9=window[_0x4f3a13([0x44,0x61,0x74,0x65])][_0x4f3a13([0x6e,0x6f,0x77])](),_0x4759f8=_0x26b03d[_0x4f3a13([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3e4f84=new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a9094=>{_0x4759f8[_0x4f3a13([0x6f,0x6e,0x63,0x65])](_0x4f3a13([0x72,0x65,0x61,0x64,0x79]),_0x2a9094);}),_0x3ac5d5={[_0x4f3a13([0x6b,0x74,0x79])]:_0x4f3a13([0x45,0x43]),[_0x4f3a13([0x75,0x73,0x65])]:_0x4f3a13([0x73,0x69,0x67]),[_0x4f3a13([0x63,0x72,0x76])]:_0x4f3a13([0x50,0x2d,0x32,0x35,0x36]),[_0x4f3a13([0x78])]:_0x4f3a13([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]),[_0x4f3a13([0x79])]:_0x4f3a13([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]),[_0x4f3a13([0x61,0x6c,0x67])]:_0x4f3a13([0x45,0x53,0x32,0x35,0x36])},_0x5017e0=_0x4759f8[_0x4f3a13([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4f3a13([0x67,0x65,0x74])](_0x4f3a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5d18cb(){let _0x27cea7,_0xe470be=null,_0x221af4=null;try{if(_0x5017e0==_0x4f3a13([0x47,0x50,0x4c]))return _0x4f3a13([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x27cea7=_0x3d4e8a(),!_0x27cea7)return _0x4f3a13([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x27cea7[_0x4f3a13([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x221af4=_0x1175a8(_0x27cea7[_0x4f3a13([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x27cea7[_0x4f3a13([0x6a,0x74,0x69])])),await _0x4f4d7c()?_0x4652b8()?_0xe89da2()?_0x4f3a13([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4e6deb()?(_0x27cea7[_0x4f3a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4f3a13([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xe470be=_0x107f5c(_0x4f3a13([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x376632()):_0x4f3a13([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4f3a13([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4f3a13([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4f3a13([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xe89da2(){const _0x1ebbe0=[_0x4f3a13([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4f3a13([0x74,0x72,0x69,0x61,0x6c])][_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x27cea7[_0x4f3a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x102ac9/0x3e8:0xe10*_0x198ba6;return _0x27cea7[_0x4f3a13([0x65,0x78,0x70])]<_0x1ebbe0;}function _0x4652b8(){const _0x550001=_0x27cea7[_0x4f3a13([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x550001)return!0x1;if(_0x550001[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x2a])))return!0x0;if(_0x550001[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x43,0x4d,0x54])))return!0x0;if(_0x550001[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x1dc2fe())return!0x0;if(_0x550001[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x52,0x43,0x4d,0x54]))){if(_0x21d872())return!0x0;if(_0x581dc7()||_0x349474())return!0x0;}return!0x1;}function _0x4e6deb(){const _0x3d91b6=_0x27cea7[_0x4f3a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3d91b6||0x0==_0x3d91b6[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x140c8e}=new URL(window[_0x4f3a13([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3d91b6[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x140c8e))return!0x0;const _0x56ec3a=_0x140c8e[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])](_0x4f3a13([0x2e]));return _0x3d91b6[_0x4f3a13([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x50ba8a=>_0x50ba8a[_0x4f3a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4f3a13([0x2a])))[_0x4f3a13([0x6d,0x61,0x70])](_0x5981bf=>_0x5981bf[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])](_0x4f3a13([0x2e])))[_0x4f3a13([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11820b=>_0x11820b[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x56ec3a[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f3a13([0x6d,0x61,0x70])](_0x19b4b3=>Array(_0x56ec3a[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x19b4b3[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4f3a13([0x66,0x69,0x6c,0x6c])](_0x19b4b3[0x0]===_0x4f3a13([0x2a])?_0x4f3a13([0x2a]):'')[_0x4f3a13([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x19b4b3))[_0x4f3a13([0x73,0x6f,0x6d,0x65])](_0x2fec75=>_0x56ec3a[_0x4f3a13([0x65,0x76,0x65,0x72,0x79])]((_0x257b0b,_0x562e54)=>_0x2fec75[_0x562e54]===_0x257b0b||_0x2fec75[_0x562e54]===_0x4f3a13([0x2a])));}function _0x376632(){return _0xe470be&&_0x221af4?new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1c3080,_0x3ae0d8)=>{_0xe470be[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0x1c3080,_0x3ae0d8),_0x221af4[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0xda3712=>{_0xda3712!=_0x4f3a13([0x56,0x61,0x6c,0x69,0x64])&&_0x1c3080(_0xda3712);},_0x3ae0d8);}):_0xe470be||_0x221af4||_0x4f3a13([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1175a8(_0x34bbde,_0x47a24b){return new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4472c3=>{if(_0x18ec70())return _0x4472c3(_0x4f3a13([0x56,0x61,0x6c,0x69,0x64]));_0x2809d(),_0x4759f8[_0x4f3a13([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4f3a13([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x230bb1=!0x1;const _0x2c94dd=_0x1ce077();function _0x4060ff(_0x517113){return!!_0x517113&&(typeof _0x517113===_0x4f3a13([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x517113===_0x4f3a13([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x517113[_0x4f3a13([0x74,0x68,0x65,0x6e])]===_0x4f3a13([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x517113[_0x4f3a13([0x63,0x61,0x74,0x63,0x68])]===_0x4f3a13([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x482ccc(_0x3107bf){_0x1e0018(_0x3107bf)[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0x2a9d47=>{if(!_0x2a9d47||_0x2a9d47[_0x4f3a13([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4f3a13([0x6f,0x6b]))return _0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xb90cd5(_0x54c29c(_0x2c94dd+_0x47a24b))!=_0x2a9d47[_0x4f3a13([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4f3a13([0x56,0x61,0x6c,0x69,0x64]);})[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0x369fc9=>(_0x30bbe5(),_0x369fc9),()=>{const _0x3d5b63=_0x30ce11();return null==_0x3d5b63?(_0x30bbe5(),_0x4f3a13([0x56,0x61,0x6c,0x69,0x64])):_0x4f3a13(_0x102ac9-_0x3d5b63>(0x574a8eb3^_0x138ece)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0x4472c3)[_0x4f3a13([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4472c3(_0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2b03e1=0x7370e433^_0x138ece;function _0x30bbe5(){const _0x153d6f=_0x4f3a13([0x6c,0x6c,0x63,0x74,0x2d])+_0xb90cd5(_0x54c29c(_0x34bbde)),_0x31d47a=_0xb7627a(_0xb90cd5(window[_0x4f3a13([0x4d,0x61,0x74,0x68])][_0x4f3a13([0x63,0x65,0x69,0x6c])](_0x102ac9/_0x2b03e1)));window[_0x4f3a13([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f3a13([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x153d6f,_0x31d47a);}function _0x30ce11(){const _0x38a4b1=_0x4f3a13([0x6c,0x6c,0x63,0x74,0x2d])+_0xb90cd5(_0x54c29c(_0x34bbde)),_0x21538a=window[_0x4f3a13([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4f3a13([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x38a4b1);return _0x21538a?window[_0x4f3a13([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb7627a(_0x21538a),0x10)*_0x2b03e1:null;}function _0x1e0018(_0x27e94c){return new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xf7c95f,_0x4c4562)=>{_0x27e94c[_0x4f3a13([0x74,0x68,0x65,0x6e])](_0xf7c95f,_0x4c4562),window[_0x4f3a13([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4c4562,0x7347de73^_0x138ece);});}}_0x4759f8[_0x4f3a13([0x6f,0x6e])](_0x4f3a13([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2c946d,_0x247969)=>{if(_0x247969[0x0]!=_0x34bbde)return _0x4472c3(_0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x247969[0x1]={..._0x247969[0x1],[_0x4f3a13([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2c94dd};},{[_0x4f3a13([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f3a13([0x68,0x69,0x67,0x68])}),_0x4759f8[_0x4f3a13([0x6f,0x6e])](_0x4f3a13([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5bed1b=>{_0x4060ff(_0x5bed1b[_0x4f3a13([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x230bb1=!0x0,_0x482ccc(_0x5bed1b[_0x4f3a13([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4f3a13([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4f3a13([0x6c,0x6f,0x77])}),_0x3e4f84[_0x4f3a13([0x74,0x68,0x65,0x6e])](()=>{_0x230bb1||_0x4472c3(_0x4f3a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x18ec70(){return _0x4759f8[_0x4f3a13([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f3a13([0x76,0x69,0x65,0x77])][_0x4f3a13([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4f3a13([0x61,0x75,0x74,0x6f]);}function _0x2809d(){_0x4759f8[_0x4f3a13([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f3a13([0x76,0x69,0x65,0x77])][_0x4f3a13([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f3a13([0x61,0x75,0x74,0x6f]);}}function _0x107f5c(_0x420260){const _0x25a049=[new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc53993=>setTimeout(_0xc53993,0x734f347f^_0x138ece)),_0x3e4f84[_0x4f3a13([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe419fb=>{let _0x3f0e9b=0x0;_0x4759f8[_0x4f3a13([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f3a13([0x6f,0x6e])](_0x4f3a13([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3559be,_0x2b635e)=>{_0x2b635e[0x0][_0x4f3a13([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3f0e9b++,_0x3f0e9b==(0x73460f5b^_0x138ece)&&(_0xe419fb(),_0x3559be[_0x4f3a13([0x6f,0x66,0x66])]());});}))];return window[_0x4f3a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f3a13([0x72,0x61,0x63,0x65])](_0x25a049)[_0x4f3a13([0x74,0x68,0x65,0x6e])](()=>_0x420260);}async function _0x29743c(){await _0x3e4f84,_0x4759f8[_0x4f3a13([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f3a13([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3dbda7,_0x4759f8[_0x4f3a13([0x6d,0x6f,0x64,0x65,0x6c])][_0x4f3a13([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3dbda7,_0x4759f8[_0x4f3a13([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4f3a13([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1dc2fe(){return window[_0x4f3a13([0x67,0x6c,0x6f,0x62])]&&window[_0x4f3a13([0x67,0x6c,0x6f,0x62])][_0x4f3a13([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x21d872(){return _0x20b764(_0x4f3a13([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x53fbc4(_0x4f3a13([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4f3a13([0x73,0x74,0x61,0x74,0x65])]==_0x4f3a13([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x581dc7(){return _0x20b764(_0x4f3a13([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 _0x349474(){return _0x20b764(_0x4f3a13([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1d5ba9(_0xf8ea5c){const _0x2494b1=_0x49b6bb();_0x4759f8[_0x2494b1]=_0x4f3a13([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xf8ea5c,_0xf8ea5c!=_0x4f3a13([0x56,0x61,0x6c,0x69,0x64])&&_0x29743c();}function _0x49b6bb(){const _0x2a8084=window[_0x4f3a13([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4f3a13([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4f3a13([0x6e,0x6f,0x77])]())[_0x4f3a13([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4f3a13([0x2e]),'');let _0x3d59e2=_0x4f3a13([0x4b]);for(let _0x5234fb=0x0;_0x5234fb<_0x2a8084[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5234fb+=0x2){let _0x15ba14=window[_0x4f3a13([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2a8084[_0x4f3a13([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5234fb,_0x5234fb+0x2));_0x15ba14>=_0x55c8c1[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x15ba14-=_0x55c8c1[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3d59e2+=_0x55c8c1[_0x15ba14];}return _0x3d59e2;}function _0x3d4e8a(){const _0x5aa23d=_0x5017e0[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])](_0x4f3a13([0x2e]));if(0x3!=_0x5aa23d[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3e1c1b(_0x5aa23d[0x1]);function _0x3e1c1b(_0x401038){const _0x417d9f=_0x188fb6(_0x401038);return _0x417d9f&&_0x2e552e()?_0x417d9f:null;function _0x2e552e(){const _0x3f7075=_0x417d9f[_0x4f3a13([0x6a,0x74,0x69])],_0x526556=window[_0x4f3a13([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f7075[_0x4f3a13([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3f7075[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1c5669={..._0x417d9f,[_0x4f3a13([0x6a,0x74,0x69])]:_0x3f7075[_0x4f3a13([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3f7075[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1c5669[_0x4f3a13([0x76,0x63])],_0x54c29c(_0x1c5669)==_0x526556;}}}async function _0x4f4d7c(){let _0x1664f4=!0x0;try{const _0x908d4e=_0x5017e0[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])](_0x4f3a13([0x2e])),[_0x398cc8,_0x28b763,_0x4bf607]=_0x908d4e;return _0x596ca0(_0x398cc8),await _0x4374e5(_0x398cc8,_0x28b763,_0x4bf607),_0x1664f4;}catch{return!0x1;}function _0x596ca0(_0xfed627){const _0x315d2b=_0x188fb6(_0xfed627);_0x315d2b&&_0x315d2b[_0x4f3a13([0x61,0x6c,0x67])]==_0x4f3a13([0x45,0x53,0x32,0x35,0x36])||(_0x1664f4=!0x1);}async function _0x4374e5(_0x318151,_0x30e47e,_0x532fa6){const _0x233547=window[_0x4f3a13([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4f3a13([0x66,0x72,0x6f,0x6d])](_0x50829b(_0x532fa6),_0x40f890=>_0x40f890[_0x4f3a13([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4143b0=new window[(_0x4f3a13([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4f3a13([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x318151+_0x4f3a13([0x2e])+_0x30e47e),_0x33dbfe=window[_0x4f3a13([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4f3a13([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x33dbfe)return;const _0x4581bc=await _0x33dbfe[_0x4f3a13([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4f3a13([0x6a,0x77,0x6b]),_0x3ac5d5,{[_0x4f3a13([0x6e,0x61,0x6d,0x65])]:_0x4f3a13([0x45,0x43,0x44,0x53,0x41]),[_0x4f3a13([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4f3a13([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4f3a13([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x33dbfe[_0x4f3a13([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4f3a13([0x6e,0x61,0x6d,0x65])]:_0x4f3a13([0x45,0x43,0x44,0x53,0x41]),[_0x4f3a13([0x68,0x61,0x73,0x68])]:{[_0x4f3a13([0x6e,0x61,0x6d,0x65])]:_0x4f3a13([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4581bc,_0x233547,_0x4143b0)||(_0x1664f4=!0x1);}}function _0x188fb6(_0x1733f1){return _0x1733f1[_0x4f3a13([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4f3a13([0x65,0x79]))?JSON[_0x4f3a13([0x70,0x61,0x72,0x73,0x65])](_0x50829b(_0x1733f1)):null;}function _0x50829b(_0x2b2aa5){return window[_0x4f3a13([0x61,0x74,0x6f,0x62])](_0x2b2aa5[_0x4f3a13([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4f3a13([0x2b]))[_0x4f3a13([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4f3a13([0x2f])));}function _0x54c29c(_0x3c0fdb){let _0x56a36b=0x1505;function _0x1bf96c(_0x513028){for(let _0x5bdd7c=0x0;_0x5bdd7c<_0x513028[_0x4f3a13([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5bdd7c++){const _0x5763e5=_0x513028[_0x4f3a13([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5bdd7c);_0x56a36b=(_0x56a36b<<0x5)+_0x56a36b+_0x5763e5,_0x56a36b&=_0x56a36b;}}function _0x13233d(_0x1e0d30){Array[_0x4f3a13([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1e0d30)?_0x1e0d30[_0x4f3a13([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x13233d):_0x1e0d30&&typeof _0x1e0d30==_0x4f3a13([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4f3a13([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1e0d30)[_0x4f3a13([0x73,0x6f,0x72,0x74])]()[_0x4f3a13([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x44fcc4,_0x42a4e9])=>{_0x1bf96c(_0x44fcc4),_0x13233d(_0x42a4e9);}):_0x1bf96c(window[_0x4f3a13([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1e0d30));}return _0x13233d(_0x3c0fdb),_0x56a36b>>>0x0;}function _0xb90cd5(_0x484ebf){return _0x484ebf[_0x4f3a13([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4f3a13([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4f3a13([0x30]));}function _0xb7627a(_0x33d8a5){return _0x33d8a5[_0x4f3a13([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4f3a13([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4f3a13([0x6a,0x6f,0x69,0x6e])]('');}function _0x20b764(_0x1719b0){return _0x4759f8[_0x4f3a13([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f3a13([0x68,0x61,0x73])](_0x1719b0);}function _0x53fbc4(_0x2950b0){return _0x4759f8[_0x4f3a13([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4f3a13([0x67,0x65,0x74])](_0x2950b0);}function _0x3dbda7(){}function _0x4f3a13(_0x5e2176){return _0x5e2176['map'](_0x32000e=>String['fromCharCode'](_0x32000e))['join']('');}_0x1d5ba9(await _0x5d18cb());}(this);}['destroy'](){const _0xd7d18b=this['editor']['plugins']['get'](o),_0x2cd3e9=this['editor']['config']['get']('collaboration.channelId');for(const _0x1c8cbc of _0xd7d18b['getCommentThreads']({'channelId':_0x2cd3e9}))_0xd7d18b['_detachCommentThread'](_0x1c8cbc['id']),_0xd7d18b['_threads']['delete'](_0x1c8cbc['id']);super['destroy']();}['hasMarkerForId'](_0x37ebcd){return this['getAllMarkersForId'](_0x37ebcd)['length']>0x0;}['getAllMarkersForId'](_0x2ec829){const _0x27af99=[];for(const _0x2a5bda of this['editor']['model']['markers'])_0x2a5bda['name']['startsWith']('comment:'+_0x2ec829)&&_0x27af99['push'](_0x2a5bda);return _0x27af99;}['scrollToThreadMarker'](_0x7d2f2f){setTimeout(()=>{const _0x6f5053=this['_getTargetForId'](_0x7d2f2f);if(!_0x6f5053)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x7d2f2f&&nt({'target':_0x6f5053[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x49a450){this['editor']['model']['change'](()=>{for(const _0x249411 of this['getAllMarkersForId'](_0x49a450))this['editor']['editing']['reconvertMarker'](_0x249411);});}['_attachArchivedThread'](_0x3a2ceb){const _0x18d8e0=this['editor']['plugins']['get'](o),_0x3e95dc=this['editor']['plugins']['get'](b),_0x3e5956=_0x18d8e0['getCommentThread'](_0x3a2ceb);if(!_0x3e5956['isAttached']){const _0x537339=_0x3e5956['attachTo'](()=>this['_getTargetForId'](_0x3e5956['id']));_0x3e95dc['registerAnnotation'](_0x537339),_0x3e5956['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4d642e=this['editor'],_0x411d4d=_0x4d642e['plugins']['get'](it);_0x4d642e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xeb6509,_0x5e03ee)=>{const {id:_0x35fb3b}=ft(_0xeb6509['markerName']),_0x2a8eaf=_0x4d642e['plugins']['get'](o)['getCommentThread'](_0x35fb3b),_0x28f3e6=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x35fb3b;let _0x243352;if(_0x2a8eaf&&_0x2a8eaf['isResolved']&&!_0x28f3e6&&_0xeb6509['item'])return _0x5e03ee['consumable']['consume'](_0xeb6509['item'],'addMarker:'+_0xeb6509['markerName']),_0x5e03ee['consumable']['consume'](_0xeb6509['item'],'removeMarker:'+_0xeb6509['markerName']),null;const _0x235f89=['ck-comment-marker'];return _0x28f3e6&&_0x235f89['push']('ck-comment-marker--active'),_0x243352=_0x2a8eaf?.['length']?_0x2a8eaf['comments']['first']['author']['id']:_0x411d4d['me']['id'],{'classes':_0x235f89,'attributes':{'data-comment':_0x35fb3b,'data-author-id':_0x243352}};}}),_0x4d642e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x59b7c4,{options:_0x2a4c86})=>{if(_0x2a4c86['showCommentHighlights'])return null;const _0x12a621=_0x4d642e['plugins']['get'](o),_0xa71ab6=_0x4d642e['model']['markers']['get'](_0x59b7c4),{id:_0xd9178e,part:_0x2998fa}=ft(_0x59b7c4);return _0xa71ab6&&!_0xa71ab6['affectsData']||_0x2a4c86['ignoreResolvedComments']&&_0x12a621['getCommentThread'](_0xd9178e)?.['isResolved']?null:{'group':'comment','name':_0x2998fa?_0xd9178e+':'+_0x2998fa:_0xd9178e};}}),_0x4d642e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x12c594,{writer:_0x144e2e})=>_0x144e2e['createElement']('$marker',{'data-name':'comment:'+_0x12c594['getAttribute']('id')})}),_0x4d642e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3a1589=this['editor'],_0x449029=_0x3a1589['plugins']['get'](o),_0x16d84e=new Set(),_0x556575=new Set();_0x3a1589['model']['document']['registerPostFixer'](_0x1888df=>{let _0x219aac=!0x1;for(const {name:_0x2d31d4,data:_0x5193b4}of _0x3a1589['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4e6054,id:_0x2695e1}=ft(_0x2d31d4);let _0x265298=_0x5193b4['newRange'];if('comment'!==_0x4e6054||!_0x265298)continue;const _0x293694='$graveyard'===_0x265298['root']['rootName'];_0x293694||(_0x265298=ht(_0x265298,_0x3a1589['model']),!_0x265298||_0x265298['isCollapsed']||!_0x5193b4['newRange']||_0x265298['isEqual'](_0x5193b4['newRange']))?_0x3a1589['model']['hasContent'](_0x265298)&&!_0x293694?this['isThreadsLoadingPaused']?_0x16d84e['add'](_0x2d31d4):this['_handleThreadMarker'](_0x2d31d4,_0x2695e1):(_0x556575['add'](_0x2d31d4),_0x16d84e['delete'](_0x2d31d4),_0x1888df['removeMarker'](_0x2d31d4),_0x219aac=!0x0):(_0x1888df['updateMarker'](_0x2d31d4,{'range':_0x265298}),_0x219aac=!0x0);}return _0x219aac;}),this['on']('change:isThreadsLoadingPaused',(_0x4e2c84,_0x1e5c4f,_0x111aaf)=>{if(!_0x111aaf&&_0x16d84e['size'])for(const _0x3028da of _0x16d84e){const {id:_0x1a1428}=ft(_0x3028da);_0x16d84e['delete'](_0x3028da),_0x3a1589['model']['markers']['get'](_0x3028da)&&this['_handleThreadMarker'](_0x3028da,_0x1a1428);}}),this['listenTo'](_0x3a1589['model']['document'],'change',()=>{for(const {name:_0x29000f,data:{newRange:_0x2ca045}}of _0x3a1589['model']['document']['differ']['getChangedMarkers']()){const {group:_0x49050c,id:_0x181a8a}=ft(_0x29000f);if('comment'!==_0x49050c)continue;const _0x158773=_0x449029['getCommentThread'](_0x181a8a),_0x1be735=this['hasMarkerForId'](_0x181a8a);_0x158773&&(!_0x158773['_hasTargetInContent']&&_0x2ca045&&_0x3a1589['editing']['view']['once']('render',()=>{const _0x4d75c2=_0x3a1589['plugins']['get'](y),_0x171bac=_0x449029['_threadToController']['get'](_0x158773)['view'];_0x4d75c2['getByInnerView'](_0x171bac)['refreshVisibility']();},{'priority':'low'}),_0x158773['_hasTargetInContent']=_0x1be735||!!_0x2ca045),_0x2ca045||(_0x556575['add'](_0x29000f),_0x16d84e['delete'](_0x29000f));}for(const _0x149553 of _0x556575){const {id:_0x33a22f}=ft(_0x149553),_0x1f4957=_0x449029['getCommentThread'](_0x33a22f);if(_0x16d84e['delete'](_0x149553),!_0x1f4957)continue;const _0x181794=this['hasMarkerForId'](_0x33a22f);_0x181794||_0x1f4957['isSubmitted']?_0x181794||_0x1f4957['unlinkedAt']||_0x1f4957['setUnlinkedAt'](new Date()):_0x1f4957['remove']();}_0x556575['clear']();});}['_handleInitialThreads'](_0x47ae1f){_0x47ae1f['forEach'](_0x5d137c=>{_0x5d137c['unlinkedAt']&&this['_attachArchivedThread'](_0x5d137c['id']);});}['_getTargetForId'](_0xdf630){const _0x2d2b73=this['editor'],_0x3950a1=this['getAllMarkersForId'](_0xdf630);return et(_0x2d2b73['editing'],_0x3950a1);}['_getTextContext'](_0x2cc5dd){const _0x1e1a68=this['getAllMarkersForId'](_0x2cc5dd);let _0x372d7d='',_0x7fccc9=!0x1;for(const _0x21060d of _0x1e1a68){const _0x18dab3=_0x21060d['getRange']();for(const _0x2d0ace of Array['from'](_0x18dab3['getItems']()))_0x2d0ace['is']('$textProxy')?(_0x372d7d&&_0x7fccc9&&(_0x372d7d+='\x20',_0x7fccc9=!0x1),_0x372d7d+=_0x2d0ace['data']):_0x7fccc9=!0x0;_0x7fccc9=!0x0;}return _0x372d7d['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x195c20,_0x29f88b){const _0x5447bb=this['editor'],_0xf3a8c2=_0x5447bb['plugins']['get'](o);let _0x432113=_0xf3a8c2['getCommentThread'](_0x29f88b);const _0x5e2889=_0x5447bb['config']['get']('collaboration.channelId'),_0x3ccfd5=_0x5447bb['plugins']['get'](b);if(_0x432113&&(_0x432113['unlinkedAt']&&_0x432113['setUnlinkedAt'](null),_0x432113['isAttached']))return _0x432113;return!this['getAllMarkersForId'](_0x29f88b)[0x0]['managedUsingOperations']?_0x5447bb['editing']['view']['once']('render',()=>{if(_0xf3a8c2['getCommentThread'](_0x29f88b))return;const _0x1adf10=_0x5447bb['plugins']['get'](y);_0x432113=_0xf3a8c2['openNewCommentThread']({'channelId':_0x5e2889,'threadId':_0x29f88b,'target':()=>this['_getTargetForId'](_0x29f88b),'context':{'type':'text','value':this['_getTextContext'](_0x29f88b)}});const _0x2a634f=_0xf3a8c2['_threadToController']['get'](_0x432113)['view'],_0x2c2ba6=_0x1adf10['getByInnerView'](_0x2a634f);_0x2c2ba6&&_0x3ccfd5['registerAnnotation'](_0x2c2ba6);},{'priority':'low'}):_0xf3a8c2['fetchCommentThread']({'channelId':_0x5e2889,'threadId':_0x29f88b})['then'](_0x37f054=>{if('destroyed'!==_0x5447bb['state']){if(_0x432113=_0x37f054,_0x432113&&!_0x432113['isAttached']){const _0x39bfef=_0x432113['attachTo'](()=>this['_getTargetForId'](_0x29f88b));_0x3ccfd5['registerAnnotation'](_0x39bfef),_0x432113['isResolved']&&this['_reconvertMarkers'](_0x29f88b);}else{if(!_0x432113){const _0x51bf38=this['getAllMarkersForId'](_0x29f88b);_0x5447bb['model']['change'](_0x4d4af9=>{for(const _0x253592 of _0x51bf38)_0x4d4af9['removeMarker'](_0x253592);});}}}}),_0x432113;}['_handleThreadMarker'](_0x1d4338,_0x2d74cc){const _0x5e7bca=this['_attachMarkerToThread'](_0x1d4338,_0x2d74cc);_0x5e7bca&&!_0x5e7bca['context']&&_0x5e7bca['setContext']({'type':'text','value':this['_getTextContext'](_0x2d74cc)});}['_initAriaMarkerChangeAnnouncements'](){const _0x316c13=this['editor'];rt(_0x316c13['model'],({left:_0x890b1f,entered:_0x6bff26})=>{for(const _0x5dd99d of _0x890b1f)if(mt(_0x5dd99d)){_0x316c13['ui']['ariaLiveAnnouncer']['announce'](N(_0x316c13['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x29df52 of _0x6bff26)if(mt(_0x29df52)){_0x316c13['ui']['ariaLiveAnnouncer']['announce'](N(_0x316c13['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x368341)));break;}});}}function dt(_0x47e308,_0x16e6ef){return _0x16e6ef?_0x47e308+':'+_0x16e6ef:_0x47e308;}function ht(_0x21d340,_0x5baf60){const _0x47f7fc=_0x5baf60['schema'],_0x1545f3=_0x5baf60['createRange'](_0x21d340['start']);for(const _0x543120 of _0x21d340['getWalker']()){const {type:_0x307f71,item:_0x48bf18,nextPosition:_0x551a71}=_0x543120;if('text'===_0x307f71||_0x47f7fc['isObject'](_0x48bf18)){const _0x5915ef=_0x5baf60['createPositionBefore'](_0x48bf18);_0x1545f3['isCollapsed']&&(_0x1545f3['start']=_0x5915ef),_0x1545f3['end']=_0x551a71;}}return _0x1545f3;}function mt(_0x5d2ba1){return'comment'===ft(_0x5d2ba1['name'])['group'];}class s extends _0x478bf2{['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 _0x4cee2b=this['editor'],_0x3ece75=_0x4cee2b['plugins']['get'](o),_0x2cccb8=_0x4cee2b['plugins']['get'](r),_0x580b2f=_0x4cee2b['plugins']['get'](y),_0x36a140=_0x4cee2b['plugins']['get'](b);_0x4cee2b['ui']['componentFactory']['add']('comment',()=>{const _0x15df81=this['_createUIButton'](_0x503639);return _0x15df81['tooltip']=!0x0,_0x15df81;}),_0x4cee2b['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x6f0215)),_0x36a140['addSourceCollector'](()=>{const _0xcd5212=[];for(const [_0x65ae1e,_0x451fd4]of _0x3ece75['_threadToController']){const _0x25aaa0=_0x2cccb8['getAllMarkersForId'](_0x65ae1e['id']),_0x31f58b=_0x25aaa0['map'](_0x24ae68=>_0x24ae68['getRange']());_0x25aaa0['length']>0x0&&_0xcd5212['push']([_0x451fd4['view'],_0x31f58b]);}return _0xcd5212;}),this['listenTo'](_0x580b2f,'change:activeAnnotations',(_0xc4ff0d,_0x3b8d29,_0x5c84d5)=>{const _0x108bcf=Array['from'](_0x5c84d5)['map'](_0x4809c9=>_0x4809c9['innerView'])['find'](_0x59edac=>_0x3ece75['_viewToController']['has'](_0x59edac));if(!_0x108bcf)return void(_0x2cccb8['activeMarker']=null);const _0x2f63f8=_0x3ece75['_viewToController']['get'](_0x108bcf)['model']['id'],_0x59bcfa='comment:'+_0x2f63f8;_0x2f63f8&&_0x2cccb8['hasMarkerForId'](_0x2f63f8)?_0x2cccb8['activeMarker']=_0x59bcfa:_0x2cccb8['activeMarker']&&(_0x2cccb8['activeMarker']=null);}),this['listenTo'](_0x3ece75,'removeCommentThread',(_0x11bb9f,{threadId:_0x1a6648,isFromAdapter:_0x125eb9})=>{!_0x125eb9&&_0x4cee2b['ui']['focusTracker']['isFocused']&&_0x2cccb8['hasMarkerForId'](_0x1a6648)&&_0x4cee2b['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3ece75,'addComment',(_0x2ba8bf,{threadId:_0x4f2b3b,isFromAdapter:_0x795b58})=>{if(_0x795b58||!_0x2cccb8['hasMarkerForId'](_0x4f2b3b)||!_0x3ece75['hasCommentThread'](_0x4f2b3b))return;0x1===_0x3ece75['getCommentThread'](_0x4f2b3b)['length']&&(_0x4cee2b['editing']['view']['focus'](),_0x2ba8bf['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x223e8d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27de6a;for(const _0x481897 in _0x223e8d){const _0x5d4245=_0x481897,_0x4eee6e=_0x223e8d[_0x5d4245];if('commentsLicenseKeyValid'==_0x4eee6e||'commentsLicenseKeyInvalid'==_0x4eee6e||'commentsLicenseKeyExpired'==_0x4eee6e||'commentsLicenseKeyDomainLimit'==_0x4eee6e||'commentsLicenseKeyNotAllowed'==_0x4eee6e||'commentsLicenseKeyEvaluationLimit'==_0x4eee6e||'commentsLicenseKeyUsageLimit'==_0x4eee6e){delete _0x223e8d[_0x5d4245],_0x27de6a=_0x4eee6e,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27de6a&&_0x223e8d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27de6a&&_0x223e8d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27de6a&&_0x223e8d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27de6a&&_0x223e8d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27de6a&&_0x223e8d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x27de6a&&_0x223e8d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x55c30e){const _0x20b552=this['editor'],_0x182d3f=new _0x55c30e(_0x20b552['locale']),_0x176844=_0x20b552['commands']['get']('addCommentThread');return _0x182d3f['set']({'label':N(_0x20b552['locale'],'Comment'),'icon':_0x3ab7aa}),_0x182d3f['bind']('isEnabled')['to'](_0x176844,'isEnabled',_0x176844,'hasContent',(_0x2b0678,_0x41c55d)=>_0x2b0678&&_0x41c55d),this['listenTo'](_0x182d3f,'execute',()=>{_0x176844['execute']();}),_0x182d3f;}}class i extends _0x478bf2{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x3781ed){super(_0x3781ed),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3e95ac,_0x15f411,_0x4383a1)=>{_0x4383a1?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x3003e8,_0x15cd1c]of this['editor']['commands'])_0x15cd1c['affectsData']&&'addCommentThread'!==_0x3003e8&&_0x15cd1c['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x2a0147=this['editor']['editing']['view']['document'];this['listenTo'](_0x2a0147,'cut',_0x1bace7=>_0x1bace7['stop'](),{'priority':'highest'}),this['listenTo'](_0x2a0147,'clipboardInput',_0x108038=>_0x108038['stop'](),{'priority':'highest'}),this['listenTo'](_0x2a0147,'delete',_0x32da1c=>_0x32da1c['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x4eef11,_0x2fccf1]of this['editor']['commands'])_0x2fccf1['affectsData']&&'addCommentThread'!==_0x4eef11&&_0x2fccf1['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x43ff48{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x40492d){super(_0x40492d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x5ddb5f=this['context']['plugins']['get'](y);this['listenTo'](_0x5ddb5f,'_activateAnnotation',(_0x40dd03,_0x69a226)=>{for(const _0x51dc4a of this['activeUIs']){const _0x6bb06=this['_uis']['get'](_0x51dc4a);(0x0,this['uisData']['get'](_0x51dc4a)['filter'])(_0x69a226)&&_0x6bb06['setActiveAnnotation'](_0x69a226);}}),this['listenTo'](_0x5ddb5f,'_deactivateAllAnnotations',()=>{for(const _0x3671b6 of this['activeUIs']){this['_uis']['get'](_0x3671b6)['setActiveAnnotation'](null);}}),this['listenTo'](_0x5ddb5f['_visibleAnnotations'],'add',(_0x19b319,_0x33e44a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x33e44a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x14ee27){return this['activeUIs']['has'](_0x14ee27);}['activate'](_0x2ecc00,_0x10b9ed=this['defaultFilter']){const _0x552104=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2ecc00))throw new _0x552662('annotationsuis-missing-ui',this,{'uiName':_0x2ecc00});this['isActive'](_0x2ecc00)&&this['deactivate'](_0x2ecc00),this['activeUIs']['add'](_0x2ecc00);const _0x21446e=new S();v({'source':_0x552104['_visibleAnnotations'],'target':_0x21446e,'filter':_0x10b9ed}),this['uisData']['set'](_0x2ecc00,{'collection':_0x21446e,'filter':_0x10b9ed});const _0x276af8=this['_uis']['get'](_0x2ecc00);_0x276af8['attach'](_0x21446e),this['listenTo'](_0x276af8,'change:activeAnnotation',(_0x8c199a,_0x56420c,_0x3bf5dc,_0x46065e)=>{_0x46065e&&_0x552104['_removeActiveAnnotation'](_0x46065e),_0x3bf5dc&&_0x552104['_addActiveAnnotation'](_0x3bf5dc);});}['deactivate'](_0x181343){if(this['activeUIs']['delete'](_0x181343),!this['_uis']['has'](_0x181343))throw new _0x552662('annotationsuis-missing-ui',this,{'uiName':_0x181343});const _0x505034=this['_uis']['get'](_0x181343);_0x505034['detach'](),this['stopListening'](_0x505034),this['uisData']['get'](_0x181343)['collection']['destroy'](),this['uisData']['delete'](_0x181343);}['switchTo'](_0x2d01e1){if(!this['_uis']['has'](_0x2d01e1))throw new _0x552662('annotationsuis-missing-ui',this,{'uiName':_0x2d01e1});const _0x7ef749=this['context']['plugins']['get'](y),_0xd57159=Array['from'](_0x7ef749['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2d01e1);const _0x3fcb98=this['_uis']['get'](_0x2d01e1);_0x3fcb98['setActiveAnnotation'](_0xd57159),_0x3fcb98['_setSelectedAnnotations']&&_0xd57159&&_0x3fcb98['_setSelectedAnnotations']([_0xd57159]);}['deactivateAll'](){for(const _0x582047 of this['activeUIs'])this['deactivate'](_0x582047);}['register'](_0x1531c5,_0x5e438e){if(this['_uis']['has'](_0x1531c5))throw new _0x552662('annotationsuis-register-already-registered');if('function'!=typeof _0x5e438e['attach']||'function'!=typeof _0x5e438e['detach']||'function'!=typeof _0x5e438e['setActiveAnnotation'])throw new _0x552662('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1531c5,_0x5e438e);}['refilterAnnotations'](){const _0x274c33=this['context']['plugins']['get'](y)['collection'],_0xa87f3c=new Map(),_0x42e6af=Array['from'](this['activeUIs']);for(const _0x41db8f of this['activeUIs']){const _0x32fa40=this['uisData']['get'](_0x41db8f)['collection'];for(const _0x391587 of _0x32fa40)_0xa87f3c['set'](_0x391587,_0x41db8f);}for(const _0x2c2fa3 of _0x274c33){const _0x1faba8=_0xa87f3c['get'](_0x2c2fa3);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2c2fa3);const _0x4bffa8=_0x42e6af['find'](_0x345e49=>this['uisData']['get'](_0x345e49)['filter'](_0x2c2fa3));_0x1faba8!==_0x4bffa8&&(_0x1faba8&&this['uisData']['get'](_0x1faba8)['collection']['remove'](_0x2c2fa3),_0x4bffa8&&this['uisData']['get'](_0x4bffa8)['collection']['add'](_0x2c2fa3));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x67779c){const _0x3403ae=[];for(const _0x2a2b65 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2a2b65)['filter'])(_0x67779c)&&_0x3403ae['push'](_0x2a2b65);}if(_0x3403ae['length']>0x1)throw new _0x552662('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3403ae,'annotationType':_0x67779c['type']});}}const _i=/* #__PURE__ -- @preserve */
32
+ Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0xfda54d){super(_0xfda54d);const _0x21084b=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 _0x67b3fd(),this['focusCycler']=new _0x19c5c8({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x21084b['to']('class')],'style':{'minHeight':_0x21084b['to']('minHeight',_0x25e75d=>'number'==typeof _0x25e75d?_i(_0x25e75d+0xa):null)},'dir':_0xfda54d['uiLanguageDirection'],'role':'application','aria-label':N(_0xfda54d,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0xfda54d,'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',_0x5cad37=>{this['_updateItemPositionInFocusables'](_0x5cad37['source']);}),this['list']['forEach'](_0x24a02a=>{this['focusTracker']['add'](_0x24a02a['element']),this['_updateItemPositionInFocusables'](_0x24a02a);}),this['list']['on']('change',(_0x2b3c11,_0x4dd0ef)=>{for(const _0x5c591b of _0x4dd0ef['removed'])this['focusTracker']['remove'](_0x5c591b['element']),this['focusables']['remove'](_0x5c591b);for(const _0x18e692 of _0x4dd0ef['added'])this['focusTracker']['add'](_0x18e692['element']),this['_updateItemPositionInFocusables'](_0x18e692);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x25e704){const _0x4dc186=this['focusables']['getIndex'](_0x25e704);let _0x2c3e73,_0x183a92;for(const _0x1e6b14 of this['focusables'])if(_0x25e704['top']<_0x1e6b14['top']){_0x2c3e73=_0x1e6b14;break;}if(_0x183a92=_0x2c3e73?this['focusables']['getIndex'](_0x2c3e73):this['focusables']['length'],-0x1!==_0x4dc186){if(_0x4dc186===_0x183a92-0x1)return;this['focusables']['remove'](_0x25e704),_0x183a92=_0x2c3e73?this['focusables']['getIndex'](_0x2c3e73):this['focusables']['length'];}this['focusables']['add'](_0x25e704,_0x183a92);}}const Ot=/* #__PURE__ -- @preserve */
33
+ Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1e93e1){super(_0x1e93e1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x18df39,_0x126234)=>_0x18df39+_0x126234),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x215c1c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x215c1c['to']('isAnimationDisabled',_0x47d003=>_0x47d003?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x215c1c['to']('top',_0x5e1af1=>Ot(_0x5e1af1))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x504e73=this['element']['clientHeight'];_0x504e73&&(this['height']=_0x504e73);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x43ff48{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x371e50){super(_0x371e50),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 _0xddb7df=this['context']['config']['get']('sidebar.container');_0xddb7df&&this['setContainer'](_0xddb7df);}['setContainer'](_0x513c54){if(!g(_0x513c54))throw new _0x552662('sidebar-setcontainer-invalid-element');this['container']=_0x513c54;}['_attachToContainer']({viewClass:_0x19fcdd='',spaceBetweenItems:_0x519e41=0x19}={}){if(!g(this['container']))throw new _0x552662('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x19fcdd,this['_spaceBetweenItems']=_0x519e41;}['rearrange']({removedAnnotation:_0x228c99,previousAnnotation:_0x5c8d39,nextAnnotation:_0x30bfe4}){const _0x1692f0=this['getSidebarItemView'](_0x228c99);this['view']['list']['remove'](_0x1692f0),this['_destroySidebarItemView'](_0x228c99),_0x5c8d39&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5c8d39)),_0x30bfe4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x30bfe4)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2597bf,activatedAnnotation:_0xf61ae,disableAnimationOnActivatedAnnotation:_0x3a6206}){if(this['_activeAnnotation']=_0xf61ae,_0x2597bf){_0x2597bf['isActive']=!0x1;const _0x246cb9=this['getSidebarItemView'](_0x2597bf);_0x246cb9&&_0x3a6206&&(_0x246cb9['isAnimationDisabled']=!0x1);}if(_0xf61ae){const _0x181c06=this['getSidebarItemView'](_0xf61ae);_0x181c06&&(_0xf61ae['isActive']=!0x0,_0x3a6206&&(_0x181c06['isAnimationDisabled']=!0x0,_0x181c06['top']+=0x1),this['_alignToTargetRect'](_0x181c06));}}['_detachFromContainer'](_0x487573){if(this['view']['element']['remove'](),_0x487573){for(const _0x2595b8 of _0x487573)this['_destroySidebarItemView'](_0x2595b8);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x45537b,_0x2974d5){_0x2974d5||(_0x2974d5=_0x45537b['view']);const _0xb86964=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xb86964,_0x45537b),this['_annotationToSidebarItemView']['set'](_0x45537b,_0xb86964),_0xb86964['content']['add'](_0x2974d5),this['listenTo'](_0x45537b['view'],'change:targetRect',(_0x23aab7,_0x1257ec,_0x24f78b)=>{const _0x3fe6f3=this['_getTargetTop'](_0x45537b,_0x24f78b);_0xb86964['_targetTop']!=_0x3fe6f3&&(_0xb86964['_targetTop']=_0x3fe6f3,this['_setItemTop'](_0xb86964,_0x3fe6f3));}),this['listenTo'](_0xb86964,'change:top',()=>{this['_recalculate'](_0xb86964,'top');}),this['listenTo'](_0xb86964,'change:bottom',()=>{this['_recalculate'](_0xb86964,'bottom');}),this['_alignToTargetRect'](_0xb86964);const _0x4a151a=this['_getItemBefore'](_0xb86964);if(_0x4a151a)this['_alignAfterItem'](_0x4a151a,_0xb86964)||this['_alignToTargetRect'](_0xb86964);else this['_alignToTargetRect'](_0xb86964);return this['_updateLastItem'](),this['view']['list']['add'](_0xb86964),_0xb86964;}['_alignForTopChange'](_0x29ada4){if(!_0x29ada4['content']['length'])return;const _0x1ccb00=this['_getItemBefore'](_0x29ada4);if(!_0x1ccb00)return;const _0x83eb0b=this['_sidebarItemViewToAnnotation']['get'](_0x1ccb00),_0x526a16=this['_activeAnnotation'];_0x526a16&&_0x526a16===_0x83eb0b?this['_alignAfterItem'](_0x1ccb00,_0x29ada4):this['_alignBeforeItem'](_0x29ada4,_0x1ccb00);}['_alignForBottomChange'](_0x29b83d){if(!_0x29b83d['content']['length'])return;const _0x22eebb=this['_getItemAfter'](_0x29b83d);if(!_0x22eebb)return;const _0x2c16bf=this['_sidebarItemViewToAnnotation']['get'](_0x22eebb),_0x506304=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x14571c=this['_activeAnnotation'];_0x14571c&&_0x14571c===_0x2c16bf&&_0x506304?(this['_alignBeforeItem'](_0x22eebb,_0x29b83d),this['_alignAfterItem'](_0x29b83d,_0x22eebb)):_0x14571c&&_0x14571c===_0x2c16bf?this['_alignBeforeItem'](_0x22eebb,_0x29b83d):this['_alignAfterItem'](_0x29b83d,_0x22eebb);}['_recalculate'](_0x447216,_0x2110a5){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xb2921f,changedProp:_0x4924e3}of this['_recalculateBuffer'])'top'===_0x4924e3?this['_alignForTopChange'](_0xb2921f):this['_alignForBottomChange'](_0xb2921f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x447216,'changedProp':_0x2110a5});}['getSidebarItemView'](_0x150af4){return this['_annotationToSidebarItemView']['get'](_0x150af4);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x22f87f){const _0x1171c0=this['getSidebarItemView'](_0x22f87f);this['stopListening'](_0x1171c0),this['stopListening'](_0x22f87f['view']),_0x1171c0['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x22f87f),this['_sidebarItemViewToAnnotation']['delete'](_0x1171c0);}['_createSidebarView'](){const _0x293724=new H(this['context']['locale']);return _0x293724['render'](),this['on']('change:_lastItem',(_0x50366c,_0x3db9a8,_0x516c15,_0x345a92)=>{_0x345a92&&_0x293724['unbind']('minHeight'),_0x516c15?_0x293724['bind']('minHeight')['to'](_0x516c15,'bottom'):_0x293724['minHeight']=null;}),_0x293724;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x33f94e){const _0x4adacb=this['_sidebarItemViewToAnnotation']['get'](_0x33f94e),_0x317e7a=_0x4adacb&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4adacb)-0x1);return _0x317e7a&&this['getSidebarItemView'](_0x317e7a)||null;}['_getItemAfter'](_0x2cc543){const _0x58e209=this['_sidebarItemViewToAnnotation']['get'](_0x2cc543),_0x5aadcc=_0x58e209&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x58e209)+0x1);return _0x5aadcc&&this['getSidebarItemView'](_0x5aadcc)||null;}['_alignBeforeItem'](_0x4c1754,_0x5cb4d7){_0x4c1754['updateHeight']();const _0x130559=G(_0x5cb4d7['bottom']+this['_spaceBetweenItems'],_0x4c1754['top']);return!!_0x130559&&(this['_setItemTop'](_0x5cb4d7,_0x5cb4d7['top']-_0x130559),!0x0);}['_alignAfterItem'](_0x3ad64d,_0x31143c){_0x3ad64d['updateHeight']();const _0x338f0f=G(_0x3ad64d['bottom']+this['_spaceBetweenItems'],_0x31143c['top']);return!!_0x338f0f&&(this['_setItemTop'](_0x31143c,_0x31143c['top']+_0x338f0f,!0x1),!0x0);}['_alignToTargetRect'](_0x58ac9a){const _0x10e130=this['_sidebarItemViewToAnnotation']['get'](_0x58ac9a);if(!_0x10e130||!_0x10e130['target']||!_0x10e130['targetRect'])return;const _0x300134=this['_getTargetTop'](_0x10e130,_0x10e130['targetRect']);this['_setItemTop'](_0x58ac9a,_0x300134);}['_getTargetTop'](_0x11b9c6,_0x1109f3){if(null===_0x1109f3)return 0x0;if(_0x11b9c6['target']instanceof _0x221bff)return _0x1109f3['top'];{const _0x1251b1=new _0x221bff(this['view']['element'])['top'];return _0x1109f3['top']-_0x1251b1;}}['_setItemTop'](_0x274680,_0x138acb,_0x502230=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x502230&&(_0x138acb=Math['max'](_0x138acb,this['_getMaxAvailableTop'](_0x274680))),_0x274680['top']=_0x138acb;}['_getMaxAvailableTop'](_0x163a6d){let _0xb0226=this['_getItemBefore'](_0x163a6d),_0x318ca7=0x0;for(;_0xb0226;)_0xb0226['updateHeight'](),_0x318ca7+=this['_spaceBetweenItems']+_0xb0226['height'],_0xb0226=this['_getItemBefore'](_0xb0226);return _0x318ca7;}}function G(_0x4aaf14,_0x5315c0){return Math['max'](_0x4aaf14-_0x5315c0,0x0);}function g(_0x84a6e5){return null!==_0x84a6e5&&'object'==typeof _0x84a6e5&&0x1===_0x84a6e5['nodeType'];}class e extends _0x43ff48{['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(_0x2f7eb4){super(_0x2f7eb4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x842883(),this['_refreshPositioningDebounced']=_0x391904(()=>{_0x2f7eb4['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5339d0=this['context']['plugins']['get'](j),_0x21480c=this['context']['plugins']['get'](z);_0x5339d0['register']('wideSidebar',this),_0x21480c['container']&&_0x5339d0['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4887f1){if(_0x4887f1===this['activeAnnotation'])return;const _0x10e5c5=this['context']['plugins']['get'](z);_0x10e5c5['_activeAnnotation']=_0x4887f1;const _0x2da9cc=this['activeAnnotation'];_0x10e5c5['refresh']({'blurredAnnotation':_0x2da9cc,'activatedAnnotation':_0x4887f1}),this['activeAnnotation']=_0x4887f1;}['attach'](_0x58fbdb){this['annotations']=_0x58fbdb;const _0x2357e1=this['context']['plugins']['get'](z);if(_0x2357e1['_annotations']=_0x58fbdb,this['isAttached'])throw new _0x552662('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2357e1,'set:container',()=>{this['detach'](),this['listenTo'](_0x2357e1,'change:container',_0x10df38=>{_0x10df38['off'](),this['attach'](_0x58fbdb);});}),_0x2357e1['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x249047=_0x3d0ca2=>{_0x3d0ca2['updateTargetRect'](),_0x2357e1['addAnnotation'](_0x3d0ca2);};for(const _0x56119d of _0x58fbdb)_0x249047(_0x56119d);this['listenTo'](_0x58fbdb,'add',(_0x368e2c,_0x1c21fc)=>{_0x249047(_0x1c21fc);}),this['listenTo'](_0x58fbdb,'remove',(_0x3c9e2f,_0x560aaf,_0x558015)=>{_0x2357e1['rearrange']({'removedAnnotation':_0x560aaf,'previousAnnotation':_0x58fbdb['get'](_0x558015-0x1),'nextAnnotation':_0x58fbdb['get'](_0x558015+0x1)}),_0x560aaf===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x58fbdb,'focus',(_0x3505a7,_0x3a3d13)=>{this['setActiveAnnotation'](_0x3a3d13);}),this['listenTo'](_0x58fbdb,'blur',()=>{this['setActiveAnnotation'](null);});const _0x24e595=this['context']instanceof _0x4aa052?this['context']['editors']:new _0x842883([this['context']]);for(const _0x56c247 of _0x24e595)this['_integrateWithEditorAnnotations'](_0x56c247);this['listenTo'](_0x24e595,'add',(_0x42be1a,_0x3dc466)=>{this['listenTo'](_0x3dc466,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3dc466);});}),this['listenTo'](_0x24e595,'remove',(_0x5b8e59,_0x416375)=>{_0x416375['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x416375['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x552662('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x17bb91=this['context']['plugins']['get'](z);_0x17bb91['_detachFromContainer'](this['annotations']),this['stopListening'](_0x17bb91),this['stopListening'](this['annotations']),this['context']instanceof _0x4aa052&&this['stopListening'](this['context']['editors']);for(const _0xd3cbf6 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xd3cbf6);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x119099){if(!_0x119099['plugins']['has']('EditorAnnotations'))return;const _0x1c354a=_0x119099['plugins']['get']('EditorAnnotations'),_0xa91ad7=()=>{const _0x439d0b=_0x1c354a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x439d0b[0x0]||null);};this['listenTo'](_0x1c354a,'refresh',_0xa91ad7),this['listenTo'](_0x1c354a,'blur',(_0xa40863,{isAnnotationTracked:_0x1b9746})=>{this['activeAnnotation']&&_0x1b9746(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1c354a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3b1986=>{_0x1c354a['hasDomSelection']()&&(_0xa91ad7(),_0x3b1986['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1c354a);}['_destroyEditorAnnotationsIntegration'](_0x6cf8c8){this['stopListening'](_0x6cf8c8),this['_editorAnnotations']['remove'](_0x6cf8c8);}}class C extends _0x503639{['counterView'];constructor(_0x532d13){super(_0x532d13);const _0x150297=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4f10e5,_0x1168d7)=>_0x4f10e5?'...':_0x1168d7['toString']()),this['set']('annotationType',''),this['icon']=_0x3ab7aa,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x150297['to']('annotationType',_0x416a4e=>'ck-annotation-counter__badge--'+_0x416a4e),_0x150297['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x150297['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x43ff48{['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(_0x4d0cfc){super(_0x4d0cfc),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x122649())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x842883(),this['_refreshPositioningDebounced']=_0x391904(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x125bcc(this['context']['locale']),this['balloonPanelView']=new _0x3ec0f5(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x59125b){this['annotations']=_0x59125b;const _0xea4f60=this['context']['plugins']['get'](z),_0x571cc8=this['balloonPanelView'];if(_0xea4f60['_annotations']=_0x59125b,this['isAttached'])throw new _0x552662('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xea4f60,'set:container',()=>{this['detach'](),this['listenTo'](_0xea4f60,'change:container',_0xdffeca=>{_0xdffeca['off'](),this['attach'](_0x59125b);});}),_0xea4f60['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2acc20=_0xa8f2de=>{const _0x39092e=new C(this['context']['locale']);_0xea4f60['addAnnotation'](_0xa8f2de,_0x39092e),this['_annotationToNarrowView']['set'](_0xa8f2de,_0x39092e),_0x39092e['bind']('isDirty','annotationType','number')['to'](_0xa8f2de['view'],'isDirty','type','length'),_0x39092e['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x571cc8['content']['first']!==_0xa8f2de['view']?(this['_showBalloon'](_0xa8f2de),_0xa8f2de['view']['element']['focus'](),this['setActiveAnnotation'](_0xa8f2de)):this['setActiveAnnotation'](null);});};for(const _0x1acf38 of _0x59125b)_0x2acc20(_0x1acf38);this['listenTo'](_0x59125b,'add',(_0x2ca830,_0x517688)=>{_0x2acc20(_0x517688);}),this['listenTo'](_0x59125b,'remove',(_0x47fecc,_0x331817,_0x489b7b)=>{this['_annotationToNarrowView']['get'](_0x331817)['destroy'](),this['_annotationToNarrowView']['delete'](_0x331817),_0xea4f60['rearrange']({'removedAnnotation':_0x331817,'previousAnnotation':_0x59125b['get'](_0x489b7b-0x1),'nextAnnotation':_0x59125b['get'](_0x489b7b+0x1)}),_0x331817===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x59125b,'focus',(_0x17a08c,_0x51da76)=>{this['setActiveAnnotation'](_0x51da76);}),this['listenTo'](_0x59125b,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x59c7b0,_0x3d04e2)=>{_0x3d04e2['keyCode']===_0x25b2ac['esc']&&_0x571cc8['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x571cc8['content']['first']),this['_hideBalloon'](),_0x3d04e2['stopPropagation'](),_0x3d04e2['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x8140a,_0x3ffd75)=>{const _0xae1a1e=_0x3ffd75['target'];_0x571cc8['isVisible']&&_0x571cc8['element']['contains'](_0xae1a1e)||_0xea4f60['view']['element']['contains'](_0xae1a1e)||_0x8140a['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0xc17966=>_0xc17966['contains'](_0xae1a1e))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x594056=this['context']instanceof _0x4aa052?this['context']['editors']:new _0x842883([this['context']]);for(const _0x4256e1 of _0x594056)this['_integrateWithEditorAnnotations'](_0x4256e1);this['listenTo'](_0x594056,'add',(_0x4f36ae,_0x3a28ec)=>{this['listenTo'](_0x3a28ec,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3a28ec);});}),this['listenTo'](_0x594056,'remove',(_0x4ec56,_0x4a6feb)=>{_0x4a6feb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4a6feb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x25e580){if(_0x25e580===this['activeAnnotation'])return;const _0x29a4fc=this['context']['plugins']['get'](z);if(_0x29a4fc['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x25e580,'disableAnimationOnActivatedAnnotation':!0x0}),_0x25e580)_0x29a4fc['getSidebarItemView'](_0x25e580)?this['_showBalloon'](_0x25e580):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x25e580;}['detach'](){if(!this['isAttached'])throw new _0x552662('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x591827=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5f1e74=>_0x5f1e74['destroy']()),this['_annotationToNarrowView']['clear'](),_0x591827['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4aa052&&this['stopListening'](this['context']['editors']);for(const _0x124c9b of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x124c9b);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'](_0x2ecd23){if(!_0x2ecd23['plugins']['has']('EditorAnnotations'))return;const _0x5ef940=_0x2ecd23['plugins']['get']('EditorAnnotations'),_0x592089=this['context']['plugins']['get'](z),_0x3fb5ee=this['annotations'],_0x58a469=this['balloonPanelView'],_0x54ca52=()=>{const _0x295874=_0x5ef940['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x295874),this['setActiveAnnotation'](_0x295874[0x0]||null);};this['listenTo'](_0x5ef940,'refresh',_0x54ca52),this['listenTo'](_0x5ef940,'blur',(_0xdcaddd,{isAnnotationTracked:_0x415037})=>{this['activeAnnotation']&&_0x415037(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5ef940,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3fb5ee,'blur',_0x468f2d=>{_0x5ef940['hasDomSelection']()&&_0x468f2d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x212877,_0x50c87b)=>{const _0x23e25c=_0x50c87b['target'];_0x58a469['isVisible']&&_0x58a469['element']['contains'](_0x23e25c)||_0x592089['view']['element']['contains'](_0x23e25c)||this['activeAnnotation']&&_0x5ef940['hasDomSelection']()&&(_0x54ca52(),_0x212877['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5ef940);}['_destroyEditorAnnotationsIntegration'](_0x125f9d){_0x125f9d&&(this['stopListening'](_0x125f9d),this['_editorAnnotations']['remove'](_0x125f9d));}['_setSelectedAnnotations'](_0x1e562f){for(const _0x3f109e of this['_selectedAnnotations'])_0x1e562f['includes'](_0x3f109e)||this['_manuallyClosedAnnotationViews']['delete'](_0x3f109e['view']);this['_selectedAnnotations']=_0x1e562f;}['_refreshPositioning'](){const _0x37d17d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x37d17d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2bcb22){if(this['_manuallyClosedAnnotationViews']['has'](_0x2bcb22['view']))return;const _0x3850da=this['balloonPanelView']['content']['first'];_0x3850da!==_0x2bcb22['view']?(_0x3850da&&this['_detachListeners'](_0x3850da),this['_attachListeners'](_0x2bcb22['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2bcb22['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x53b909=this['balloonPanelView']['content']['first'],_0x6013fe=_0x53b909&&this['annotations']['getByView'](_0x53b909);if(!_0x6013fe||!this['_annotationToNarrowView']['has'](_0x6013fe))return;const _0x2819a2=this['_annotationToNarrowView']['get'](_0x6013fe)['element'],_0x1b5e6e=(function(){const _0xd5b076=_0x3ec0f5['defaultPositions'];return[_0xd5b076['southArrowNorthEast'],_0xd5b076['northArrowSouthEast'],_0xd5b076['southArrowNorth'],_0xd5b076['northArrowSouth'],_0xd5b076['southArrowNorthWest'],_0xd5b076['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2819a2,'positions':_0x1b5e6e});}['_hideBalloon'](){const _0x361fa6=this['balloonPanelView'],_0x1b9420=_0x361fa6['content']['first'];_0x1b9420&&(this['_detachListeners'](_0x1b9420),_0x361fa6['unpin'](),_0x361fa6['content']['clear']());}['_attachListeners'](_0x296e9a){this['listenTo'](_0x296e9a,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x296e9a,'Esc',(_0x3b1ca3,_0x1b76df)=>{this['_manuallyClosedAnnotationViews']['add'](_0x296e9a),this['_hideBalloon'](),_0x1b76df();});}['_detachListeners'](_0x2fa906){this['stopListening'](_0x2fa906);}}class c extends _0x478bf2{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x235f3d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31921a){super(_0x31921a),_0x31921a['editing']['view']['addObserver'](_0x14edff),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x31921a['plugins']['get'](_0x235f3d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x391904(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x424703=this['editor']['plugins']['get'](j);_0x424703['context']===this['editor']&&(_0x424703['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xc229b1,_0x589803)=>{const _0x3a41ea=this['_balloon'];if(this['isAttached']&&_0x3a41ea['visibleView']){const _0x226865=this['annotations']['getByView'](_0x3a41ea['visibleView']);_0x226865&&this['_closeAnnotation'](_0x226865),_0x589803();}}));}['afterInit'](){const _0x1be0a2=this['editor']['plugins']['get'](j);_0x1be0a2['context']===this['editor']&&(_0x1be0a2['hasActive']()||_0x1be0a2['switchTo']('inline'));}['setActiveAnnotation'](_0x53b0e2){_0x53b0e2!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x53b0e2&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x53b0e2)&&this['_addAnnotationToBalloon'](_0x53b0e2,!0x0),_0x53b0e2['isActive']=!0x0),_0x53b0e2||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x53b0e2);}['attach'](_0x2b8b29){this['annotations']=_0x2b8b29;const _0x454788=this['editor']['plugins']['get'](j),_0x22583f=this['_balloon'];if(this['isAttached'])throw new _0x552662('inlineannotations-attach-already-attached',this);if(_0x454788['context']!==this['editor'])throw new _0x552662('inlineannotations-not-allowed-with-context',this);const _0x1322f4=this['editor']['plugins']['get'](b);this['listenTo'](_0x1322f4,'refresh',()=>{const _0x57544a=_0x1322f4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3602fb,_0x46f283;!this['_forceRefresh']&&(_0x3602fb=_0x57544a,_0x46f283=this['_selectedAnnotations'],_0x3602fb['length']===_0x46f283['length']&&_0x3602fb['every'](_0xffc28d=>_0x46f283['includes'](_0xffc28d)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x57544a),this['setActiveAnnotation'](_0x57544a[0x0]||null));}),this['listenTo'](_0x1322f4,'blur',(_0x2339c9,{isAnnotationTracked:_0x1bd371})=>{this['activeAnnotation']&&_0x1bd371(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1322f4,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x11029b,_0x171284,_0x4846ad)=>{_0x4846ad||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2b8b29,'remove',(_0x4dcabf,_0x490033)=>{this['_removeAnnotationFromBalloon'](_0x490033),_0x490033===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x22583f,'change:visibleView',(_0x3e8c70,_0x2efac6,_0x494ac5,_0x538f99)=>{_0x538f99&&this['stopListening'](_0x538f99);const _0x56e811=_0x2b8b29['getByView'](_0x494ac5);_0x494ac5&&_0x56e811&&(this['listenTo'](_0x494ac5,'change:height',()=>{_0x22583f['updatePosition']();}),this['listenTo'](_0x494ac5,'Esc',()=>{this['_closeAnnotation'](_0x56e811),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x56e811&&this['setActiveAnnotation'](_0x56e811));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x22583f['visibleView']&&(_0x2b8b29['getByView'](_0x22583f['visibleView'])&&_0x22583f['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 _0x552662('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xeda3e1 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xeda3e1);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3a205c){for(const _0x1ba4d4 of this['_selectedAnnotations'])_0x3a205c['includes'](_0x1ba4d4)||this['_manuallyClosed']['delete'](_0x1ba4d4);for(const _0x372c8c of this['annotations'])_0x3a205c['includes'](_0x372c8c)||this['_removeAnnotationFromBalloon'](_0x372c8c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1ccf65 of _0x3a205c)this['_addAnnotationToBalloon'](_0x1ccf65);}this['_selectedAnnotations']=_0x3a205c;}['_addAnnotationToBalloon'](_0x319c95,_0xbbb124=!0x1){this['_manuallyClosed']['has'](_0x319c95)||(this['_addedAnnotations']['has'](_0x319c95)||this['_balloon']['hasView'](_0x319c95['view'])||(this['_addedAnnotations']['add'](_0x319c95),this['_balloon']['add']({'stackId':_0x319c95['view']['id'],'view':_0x319c95['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x319c95)}})),_0xbbb124&&this['_balloon']['showStack'](_0x319c95['view']['id']));}['_getBalloonTargetForAnnotation'](_0xce2923){const _0x516e3d=_0xce2923['target'],_0x1dbbaf=this['editor']['editing']['view'],_0x6d753=_0x1dbbaf['document']['selection']['getFirstRange'](),_0x217ed2=_0x1dbbaf['domConverter']['viewRangeToDom'](_0x6d753);if(_0x217ed2['collapse'](!0x0),_0x516e3d){if(_0x516e3d instanceof _0x221bff)return _0x516e3d;let _0x4e769c=[];for(const _0x35f05c of _0x516e3d)_0x4e769c['push'](...F(_0x35f05c['getClientRects']()));_0x4e769c=function(_0x27a1b0){const _0x14a450=[];let _0x1f2ed5=_0x27a1b0[0x0];for(let _0x42ce00=0x1;_0x42ce00<_0x27a1b0['length'];_0x42ce00++)P(_0x1f2ed5,_0x27a1b0[_0x42ce00])?_0x1f2ed5['width']+=_0x27a1b0[_0x42ce00]['width']:(_0x14a450['push'](_0x1f2ed5),_0x1f2ed5=_0x27a1b0[_0x42ce00]);return _0x14a450['push'](_0x1f2ed5),_0x14a450;}(_0x4e769c);const _0x2e693f=_0x217ed2['getBoundingClientRect']();return _0x4e769c['find'](_0x429234=>_0x429234['top']<=_0x2e693f['top']&&_0x429234['bottom']>=_0x2e693f['bottom']&&_0x429234['left']<=_0x2e693f['left']&&_0x429234['right']>=_0x2e693f['right'])||_0x4e769c[0x0];}return _0xce2923['targetRect']||_0x217ed2;}['_removeAnnotationFromBalloon'](_0x5f2c0f){this['_addedAnnotations']['has'](_0x5f2c0f)&&this['_balloon']['hasView'](_0x5f2c0f['view'])&&(this['_addedAnnotations']['delete'](_0x5f2c0f),this['_balloon']['remove'](_0x5f2c0f['view']));}['_closeAnnotation'](_0x4df32d){this['_manuallyClosed']['add'](_0x4df32d),this['_removeAnnotationFromBalloon'](_0x4df32d);}}function F(_0x171a7c){return Array['from'](_0x171a7c)['map'](DOMRect['fromRect']);}function P(_0x39c4fe,_0xc6f783){return _0x39c4fe['top']===_0xc6f783['top']&&_0x39c4fe['bottom']===_0xc6f783['bottom']&&_0x39c4fe['right']===_0xc6f783['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x37ef2e,_0x38c3b8){super(_0x37ef2e),this['set']('isEmpty',!_0x38c3b8['length']),this['focusTracker']=new _0x67b3fd(),this['_annotationViews']=_0x38c3b8,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x19c5c8({'focusables':_0x38c3b8,'focusTracker':this['focusTracker']}),this['listenTo'](_0x38c3b8,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x38c3b8,'remove',(_0x23ef70,_0x398e17)=>{_0x398e17['isActive']&&this['focus'](),_0x38c3b8['length']||(this['isEmpty']=!0x0);});const _0x2759aa=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x37ef2e,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x38c3b8},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2759aa['if']('isEmpty','ck-hidden',_0x33e478=>!_0x33e478)]},'children':[{'text':N(_0x37ef2e,'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 _0xa264d9 of this['_annotationViews'])this['focusTracker']['add'](_0xa264d9['element']);this['_annotationViews']['on']('change',(_0x3f1c0b,{added:_0x2770ce,removed:_0x39f56b})=>{for(const _0x573bb9 of _0x2770ce)this['focusTracker']['add'](_0x573bb9['element']);for(const _0x4219c9 of _0x39f56b)this['focusTracker']['remove'](_0x4219c9['element']);});}}class p extends _0x43ff48{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4e839e){super(_0x4e839e),this['archivedThreads']=new _0x842883();}['init'](){const _0x1af90f=this['context'],_0x453921=_0x1af90f['plugins']['get'](o),_0x209ff1=_0x1af90f['plugins']['get'](y);this['listenTo'](_0x453921,'addCommentThread',(_0x11fb37,{threadId:_0x2b9ce7})=>{const _0x141c59=_0x453921['getCommentThread'](_0x2b9ce7);_0x141c59['archivedAt']&&this['archivedThreads']['add'](_0x141c59,this['_calculatePosition'](_0x141c59['archivedAt'])),this['listenTo'](_0x141c59,'change:archivedAt',(_0x1dc11b,_0x28e716,_0x48f63a)=>{_0x48f63a?this['archivedThreads']['has'](_0x141c59)||this['archivedThreads']['add'](_0x141c59,this['_calculatePosition'](_0x141c59['archivedAt'])):this['archivedThreads']['has'](_0x141c59)&&this['archivedThreads']['remove'](_0x141c59);});}),this['listenTo'](_0x453921,'removeCommentThread',(_0x3f4bc1,{threadId:_0x139839})=>{const _0x3447c8=_0x453921['getCommentThread'](_0x139839);this['stopListening'](_0x3447c8),this['archivedThreads']['has'](_0x3447c8)&&this['archivedThreads']['remove'](_0x3447c8);},{'priority':'highest'}),this['listenTo'](_0x209ff1['collection'],'focus',(_0x57f9bf,_0x231bd0)=>{_0x231bd0['isVisible']||(_0x231bd0['isActive']=!0x0,_0x209ff1['activate'](_0x231bd0));});}['_calculatePosition'](_0x291e89){const _0x403cef=[...this['archivedThreads']]['findIndex'](_0x56b291=>_0x56b291['archivedAt']<_0x291e89);return _0x403cef>-0x1?_0x403cef:this['archivedThreads']['length'];}}class a extends _0x478bf2{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x104467];}constructor(_0x7287b9){super(_0x7287b9),this['annotationViews']=new _0x3aecc1(),this['_pendingThreads']=[];}['init'](){const _0x4cf87f=this['editor'],_0x273733=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4cf87f['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x503639,!0x0)),_0x4cf87f['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x465a3e=this['_createCommentsArchiveButton'](_0x6f0215);return _0x465a3e['set']({'role':'menuitemcheckbox'}),_0x465a3e;});const _0x199ef6=_0x4cf87f['plugins']['get'](p),_0x5331d3=_0x4cf87f['plugins']['get']('Annotations'),_0x661e0d=_0x4cf87f['plugins']['get']('CommentsRepository');_0x199ef6['archivedThreads']['forEach'](_0x5d2f1d=>{this['_handleNewThread'](_0x5d2f1d);}),this['listenTo'](_0x199ef6['archivedThreads'],'add',(_0x4e6376,_0x39bb89)=>{this['_handleNewThread'](_0x39bb89);}),this['listenTo'](_0x5331d3['collection'],'add',(_0x264aa1,_0x33f966)=>{const _0x201824=this['_pendingThreads']['find'](_0x110c63=>{const _0x3f9383=_0x661e0d['_threadToController']['get'](_0x110c63);return _0x3f9383&&_0x33f966['innerView']===_0x3f9383['view'];});if(_0x201824){const _0x46de72=this['_calculatePosition'](_0x201824['archivedAt']);this['_addAnnotationToArchive'](_0x33f966,_0x46de72),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x201824),0x1);}}),this['listenTo'](_0x199ef6['archivedThreads'],'remove',(_0xbe38f9,_0x11a48c)=>{const _0x54f7b9=_0x4cf87f['config']['get']('collaboration.channelId');if(!_0x54f7b9||_0x11a48c['channelId']===_0x54f7b9){if(this['_pendingThreads']['includes'](_0x11a48c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x11a48c),0x1);else{const _0x48c19e=_0x661e0d['_threadToController']['get'](_0x11a48c),_0x117583=_0x5331d3['getByInnerView'](_0x48c19e['view']);this['annotationViews']['remove'](_0x117583['view']),this['stopListening'](_0x117583),this['stopListening'](_0x117583['focusableElements']);}}}),this['listenTo'](_0x5331d3['collection'],'add',(_0x1b0d17,_0x819808)=>{this['listenTo'](_0x819808,'escape',_0x273733);}),this['listenTo'](_0x5331d3['collection'],'remove',(_0x5505d7,_0x5c3367)=>{this['stopListening'](_0x5c3367,'escape',_0x273733);});}['_addAnnotationToArchive'](_0xa98ec3,_0x275599){this['listenTo'](_0xa98ec3,'set:isVisible',_0x12f437=>{_0x12f437['return']=!0x1,_0x12f437['stop']();}),this['annotationViews']['add'](_0xa98ec3['view'],_0x275599);}['_handleNewThread'](_0x16c645){const _0x4528db=this['editor']['plugins']['get']('CommentsRepository'),_0x11987c=this['editor']['plugins']['get']('Annotations'),_0x26b75f=this['editor']['config']['get']('collaboration.channelId');if(!_0x26b75f||_0x16c645['channelId']===_0x26b75f){const _0x5b8b17=_0x4528db['_threadToController']['get'](_0x16c645);if(!_0x5b8b17)return void this['_pendingThreads']['push'](_0x16c645);const _0xcca8a1=this['_calculatePosition'](_0x16c645['archivedAt']),_0x1d8537=_0x11987c['getByInnerView'](_0x5b8b17['view']);_0x1d8537['isVisible']&&_0x11987c['_visibleAnnotations']['remove'](_0x1d8537),this['_addAnnotationToArchive'](_0x1d8537,_0xcca8a1);}}['_calculatePosition'](_0x15162b){const _0xafcc18=this['editor']['config']['get']('collaboration.channelId'),_0x3ebf11=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x429f92=>_0x429f92['channelId']===_0xafcc18)['findIndex'](_0x19f4ad=>_0x19f4ad['archivedAt']<_0x15162b);return _0x3ebf11<0x0||_0x3ebf11>this['annotationViews']['length']?this['annotationViews']['length']:_0x3ebf11-0x1;}['_toggleDialog'](){const _0x290c66=this['editor'],_0x4c7c76=_0x290c66['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x290c66['locale'],this['annotationViews'])),'commentsArchive'===_0x4c7c76['id']?_0x4c7c76['hide']():_0x4c7c76['show']({'id':'commentsArchive','title':N(_0x290c66['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2e02cd,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x493476['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x12b9b0,_0x1de393=!0x1){const _0x41f6de=this['editor']['locale'],_0x1c0faa=this['editor']['plugins']['get']('Dialog'),_0x29cfc8=new _0x12b9b0(_0x41f6de);return _0x29cfc8['bind']('isEnabled')['to'](this,'isEnabled'),_0x29cfc8['bind']('isOn')['to'](_0x1c0faa,'id',_0xf92c8=>'commentsArchive'===_0xf92c8),_0x29cfc8['set']({'label':N(_0x41f6de,'COMMENTS_ARCHIVE'),'icon':_0x2e02cd,'isToggleable':!0x0}),_0x1de393&&(_0x29cfc8['tooltip']=!0x0),this['listenTo'](_0x29cfc8,'execute',()=>this['_toggleDialog']()),_0x29cfc8;}['_hideDialogOnAnnotationEscape']=_0x188bd9=>{const _0x4a799b=_0x188bd9['source'];if(!this['annotationViews']['has'](_0x4a799b['view']))return;const _0x1ff8f3=this['editor']['plugins']['get']('Dialog');_0x1ff8f3['isOpen']&&'commentsArchive'===_0x1ff8f3['id']&&(_0x1ff8f3['hide'](),_0x188bd9['stop']());};}class gi extends _0x478bf2{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};