@ckeditor/ckeditor5-comments 38.2.0-alpha.0 → 38.2.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 (85) hide show
  1. package/build/comments.js +1 -1
  2. package/package.json +3 -3
  3. package/src/annotations/annotation.d.ts +6 -6
  4. package/src/annotations/annotation.js +1 -1
  5. package/src/annotations/annotationcollection.d.ts +3 -3
  6. package/src/annotations/annotationcollection.js +1 -1
  7. package/src/annotations/annotations.d.ts +6 -6
  8. package/src/annotations/annotations.js +1 -1
  9. package/src/annotations/annotationsuis.d.ts +5 -5
  10. package/src/annotations/annotationsuis.js +1 -1
  11. package/src/annotations/editorannotations.d.ts +4 -4
  12. package/src/annotations/editorannotations.js +1 -1
  13. package/src/annotations/inlineannotations.d.ts +6 -6
  14. package/src/annotations/inlineannotations.js +1 -1
  15. package/src/annotations/narrowsidebar.d.ts +6 -6
  16. package/src/annotations/narrowsidebar.js +1 -1
  17. package/src/annotations/sidebar.d.ts +5 -5
  18. package/src/annotations/sidebar.js +1 -1
  19. package/src/annotations/view/annotationcounterbuttonview.d.ts +2 -2
  20. package/src/annotations/view/annotationcounterbuttonview.js +1 -1
  21. package/src/annotations/view/annotationview.d.ts +2 -2
  22. package/src/annotations/view/annotationview.js +1 -1
  23. package/src/annotations/view/sidebaritemview.d.ts +2 -2
  24. package/src/annotations/view/sidebaritemview.js +1 -1
  25. package/src/annotations/view/sidebarview.d.ts +2 -2
  26. package/src/annotations/view/sidebarview.js +1 -1
  27. package/src/annotations/widesidebar.d.ts +5 -5
  28. package/src/annotations/widesidebar.js +1 -1
  29. package/src/augmentation.d.ts +1 -1
  30. package/src/comments/addcommentthreadcommand.d.ts +1 -1
  31. package/src/comments/addcommentthreadcommand.js +1 -1
  32. package/src/comments/commentsarchive.d.ts +4 -4
  33. package/src/comments/commentsarchive.js +1 -1
  34. package/src/comments/commentsarchiveui.d.ts +5 -5
  35. package/src/comments/commentsarchiveui.js +1 -1
  36. package/src/comments/commentsediting.d.ts +6 -6
  37. package/src/comments/commentsediting.js +1 -1
  38. package/src/comments/commentsrepository.d.ts +11 -11
  39. package/src/comments/commentsrepository.js +1 -1
  40. package/src/comments/commentsui.d.ts +5 -5
  41. package/src/comments/commentsui.js +1 -1
  42. package/src/comments/integrations/commentsrestrictededitingmode.d.ts +1 -1
  43. package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
  44. package/src/comments/integrations/importword.d.ts +1 -1
  45. package/src/comments/integrations/importword.js +1 -1
  46. package/src/comments/ui/commenteditor/commenteditor.d.ts +4 -4
  47. package/src/comments/ui/commenteditor/commenteditor.js +1 -1
  48. package/src/comments/ui/commenteditor/commenteditorui.d.ts +3 -3
  49. package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
  50. package/src/comments/ui/commenteditor/commenteditoruiview.d.ts +3 -3
  51. package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
  52. package/src/comments/ui/commentthreadcontroller.d.ts +4 -4
  53. package/src/comments/ui/commentthreadcontroller.js +1 -1
  54. package/src/comments/ui/view/basecommentthreadview.d.ts +8 -8
  55. package/src/comments/ui/view/basecommentthreadview.js +1 -1
  56. package/src/comments/ui/view/basecommentview.d.ts +4 -4
  57. package/src/comments/ui/view/basecommentview.js +1 -1
  58. package/src/comments/ui/view/collapsedcommentsview.d.ts +2 -2
  59. package/src/comments/ui/view/collapsedcommentsview.js +1 -1
  60. package/src/comments/ui/view/commentcontentview.d.ts +2 -2
  61. package/src/comments/ui/view/commentcontentview.js +1 -1
  62. package/src/comments/ui/view/commentinputview.d.ts +4 -4
  63. package/src/comments/ui/view/commentinputview.js +1 -1
  64. package/src/comments/ui/view/commentsarchiveview.d.ts +3 -3
  65. package/src/comments/ui/view/commentsarchiveview.js +1 -1
  66. package/src/comments/ui/view/commentslistview.d.ts +5 -5
  67. package/src/comments/ui/view/commentslistview.js +1 -1
  68. package/src/comments/ui/view/commentthreadheaderview.d.ts +3 -3
  69. package/src/comments/ui/view/commentthreadheaderview.js +1 -1
  70. package/src/comments/ui/view/commentthreadinputview.d.ts +5 -5
  71. package/src/comments/ui/view/commentthreadinputview.js +1 -1
  72. package/src/comments/ui/view/commentthreadview.d.ts +7 -7
  73. package/src/comments/ui/view/commentthreadview.js +1 -1
  74. package/src/comments/ui/view/commentview.d.ts +8 -8
  75. package/src/comments/ui/view/commentview.js +1 -1
  76. package/src/comments.d.ts +10 -10
  77. package/src/comments.js +1 -1
  78. package/src/commentsonly.d.ts +2 -2
  79. package/src/commentsonly.js +1 -1
  80. package/src/config.d.ts +7 -7
  81. package/src/index.d.ts +21 -21
  82. package/src/index.js +1 -1
  83. package/src/utils/common-translations.d.ts +1 -1
  84. package/src/utils/common-translations.js +1 -1
  85. package/src/utils/createmutationobserver.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-comments",
3
- "version": "38.2.0-alpha.0",
3
+ "version": "38.2.0-alpha.1",
4
4
  "description": "Collaborative comments feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -44,8 +44,8 @@
44
44
  "CHANGELOG.md"
45
45
  ],
46
46
  "dependencies": {
47
- "ckeditor5": "38.2.0-alpha.0",
48
- "ckeditor5-collaboration": "38.2.0-alpha.0",
47
+ "ckeditor5": "38.2.0-alpha.1",
48
+ "ckeditor5-collaboration": "38.2.0-alpha.1",
49
49
  "lodash-es": "^4.17.11"
50
50
  },
51
51
  "engines": {
@@ -2,13 +2,13 @@
2
2
  * @module comments/annotations/annotation
3
3
  * @publicApi
4
4
  */
5
- import { Rect, Collection } from 'ckeditor5/src/utils';
6
- import type { View } from 'ckeditor5/src/ui';
7
- import type AnnotationView from './view/annotationview';
8
- import type { AnnotationOptions } from './annotations';
5
+ import { Rect, Collection } from 'ckeditor5/src/utils.js';
6
+ import type { View } from 'ckeditor5/src/ui.js';
7
+ import type AnnotationView from './view/annotationview.js';
8
+ import type { AnnotationOptions } from './annotations.js';
9
9
  declare const Annotation_base: {
10
- new (): import("ckeditor5/src/utils").Observable;
11
- prototype: import("ckeditor5/src/utils").Observable;
10
+ new (): import("ckeditor5/src/utils.js").Observable;
11
+ prototype: import("ckeditor5/src/utils.js").Observable;
12
12
  };
13
13
  /**
14
14
  * Represents an annotation.
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1310=['stopListening','annotation-invalid-target','getClientRects','nodeType','every','target','isArray','add','offsetParent','length','type','_getNormalizedTarget','destroy','function','item','element','targetRect','_id','remove','focusTracker','refreshVisibility','isActive','focusableElements','filter','updateTargetRect','innerView','object','view','_assertCorrectTarget','_target','set','render','_type'];(function(_0x4f3596,_0x131052){const _0x5a4fe9=function(_0x26b3e3){while(--_0x26b3e3){_0x4f3596['push'](_0x4f3596['shift']());}};_0x5a4fe9(++_0x131052);}(_0x1310,0x1b1));const _0x5a4f=function(_0x4f3596,_0x131052){_0x4f3596=_0x4f3596-0x0;let _0x5a4fe9=_0x1310[_0x4f3596];return _0x5a4fe9;};import{CKEditorError as _0x56b2aa,Rect as _0x49cd5c,Collection as _0x18bae5,ObservableMixin as _0x5b956c}from'ckeditor5/src/utils';export default class d extends _0x5b956c(){constructor({view:_0x24fecb,target:_0x209a52,type:_0x1e456f,isVisible:_0x357c6a=!0x0}){super(),this['view']=_0x24fecb,this['view'][_0x5a4f('0xb')]||this['view'][_0x5a4f('0x1b')](),this['_type']=_0x1e456f,this[_0x5a4f('0x19')]=_0x209a52,d[_0x5a4f('0x18')](this[_0x5a4f('0x7')]()),this[_0x5a4f('0x12')]=new _0x18bae5([this['view'][_0x5a4f('0xb')]],{'idProperty':_0x5a4f('0xd')}),this[_0x5a4f('0x12')]['on'](_0x5a4f('0x3'),(_0x17103a,_0x5ecfc6)=>{this[_0x5a4f('0x17')][_0x5a4f('0xf')][_0x5a4f('0x3')](_0x5ecfc6);}),this['focusableElements']['on'](_0x5a4f('0xe'),(_0x29dd2a,_0x3a744b)=>{this['view']['focusTracker'][_0x5a4f('0xe')](_0x3a744b);}),this[_0x5a4f('0x1a')]('isVisible',_0x357c6a);}get[_0x5a4f('0x6')](){return _0x5a4f('0x9')==typeof this[_0x5a4f('0x1c')]?this['_type']():this[_0x5a4f('0x1c')];}get[_0x5a4f('0x15')](){return this[_0x5a4f('0x17')]['mainView'];}get[_0x5a4f('0x1')](){const _0x147602=this['_getNormalizedTarget']();return d[_0x5a4f('0x18')](_0x147602),_0x147602;}get[_0x5a4f('0xc')](){const _0x3bf929=this[_0x5a4f('0x1')];if(null===_0x3bf929)return null;if(_0x3bf929 instanceof _0x49cd5c)return _0x3bf929;const _0x176ec1=_0x3bf929[_0x5a4f('0x13')](_0x44e322=>function(_0x7e5cee){const _0x3acf75=_0x7e5cee[_0x5a4f('0x4')];if(_0x3acf75)return!0x0;const _0x81920d=_0x7e5cee['getClientRects']()['item'](0x0);return!!_0x81920d;}(_0x44e322));return 0x0===_0x176ec1[_0x5a4f('0x5')]?null:new _0x49cd5c(_0x176ec1[0x0][_0x5a4f('0x1f')]()[_0x5a4f('0xa')](0x0));}get[_0x5a4f('0x11')](){return this[_0x5a4f('0x17')][_0x5a4f('0x11')];}set[_0x5a4f('0x11')](_0x2ac95d){this[_0x5a4f('0x17')]['isActive']=_0x2ac95d,this[_0x5a4f('0x17')]['mainView'][_0x5a4f('0x11')]=_0x2ac95d;}[_0x5a4f('0x14')](){this[_0x5a4f('0x17')][_0x5a4f('0xc')]=this['targetRect'];}[_0x5a4f('0x8')](){this[_0x5a4f('0x12')][_0x5a4f('0x1d')](),this[_0x5a4f('0x12')]['clear'](),this[_0x5a4f('0x1d')]();}[_0x5a4f('0x10')](){this['isVisible']=!!this[_0x5a4f('0xc')];}static[_0x5a4f('0x18')](_0x2b0902){if(!(null===_0x2b0902||_0x2b0902 instanceof _0x49cd5c||Array[_0x5a4f('0x2')](_0x2b0902)&&_0x2b0902[_0x5a4f('0x0')](_0x355714=>y(_0x355714))))throw new _0x56b2aa(_0x5a4f('0x1e'),null,{'target':_0x2b0902});}[_0x5a4f('0x7')](){const _0x4d708=_0x5a4f('0x9')==typeof this[_0x5a4f('0x19')]?this['_target']():this[_0x5a4f('0x19')];return y(_0x4d708)?[_0x4d708]:_0x4d708;}}function y(_0x2e04bf){return null!==_0x2e04bf&&_0x5a4f('0x16')==typeof _0x2e04bf&&_0x5a4f('0x20')in _0x2e04bf&&0x1===_0x2e04bf[_0x5a4f('0x20')];}
23
+ const _0x7d4a=['annotation-invalid-target','view','set','focusableElements','add','every','filter','destroy','targetRect','isArray','remove','function','_getNormalizedTarget','_type','refreshVisibility','render','target','item','mainView','_target','_assertCorrectTarget','isActive','stopListening','focusTracker','nodeType','offsetParent','isVisible','innerView'];(function(_0x504d8a,_0x7d4a06){const _0x59dd62=function(_0x3e80b2){while(--_0x3e80b2){_0x504d8a['push'](_0x504d8a['shift']());}};_0x59dd62(++_0x7d4a06);}(_0x7d4a,0x1b5));const _0x59dd=function(_0x504d8a,_0x7d4a06){_0x504d8a=_0x504d8a-0x0;let _0x59dd62=_0x7d4a[_0x504d8a];return _0x59dd62;};import{CKEditorError as _0xa45750,Rect as _0x3e2b36,Collection as _0x2ad174,ObservableMixin as _0x3bb101}from'ckeditor5/src/utils.js';export default class d extends _0x3bb101(){constructor({view:_0x211616,target:_0x31ce7f,type:_0x3e88d7,isVisible:_0x18d2f4=!0x0}){super(),this[_0x59dd('0xc')]=_0x211616,this[_0x59dd('0xc')]['element']||this['view'][_0x59dd('0x1a')](),this[_0x59dd('0x18')]=_0x3e88d7,this[_0x59dd('0x2')]=_0x31ce7f,d['_assertCorrectTarget'](this[_0x59dd('0x17')]()),this[_0x59dd('0xe')]=new _0x2ad174([this[_0x59dd('0xc')]['element']],{'idProperty':'_id'}),this['focusableElements']['on'](_0x59dd('0xf'),(_0x8d3004,_0x379474)=>{this[_0x59dd('0xc')]['focusTracker'][_0x59dd('0xf')](_0x379474);}),this[_0x59dd('0xe')]['on'](_0x59dd('0x15'),(_0x53b9fc,_0x46c2e0)=>{this[_0x59dd('0xc')][_0x59dd('0x6')]['remove'](_0x46c2e0);}),this[_0x59dd('0xd')](_0x59dd('0x9'),_0x18d2f4);}get['type'](){return _0x59dd('0x16')==typeof this[_0x59dd('0x18')]?this[_0x59dd('0x18')]():this[_0x59dd('0x18')];}get[_0x59dd('0xa')](){return this[_0x59dd('0xc')][_0x59dd('0x1')];}get[_0x59dd('0x1b')](){const _0x517248=this[_0x59dd('0x17')]();return d[_0x59dd('0x3')](_0x517248),_0x517248;}get['targetRect'](){const _0x435a17=this['target'];if(null===_0x435a17)return null;if(_0x435a17 instanceof _0x3e2b36)return _0x435a17;const _0x3d6dfc=_0x435a17[_0x59dd('0x11')](_0x32bea4=>function(_0x48449f){const _0xbc8711=_0x48449f[_0x59dd('0x8')];if(_0xbc8711)return!0x0;const _0x1f9c8e=_0x48449f['getClientRects']()['item'](0x0);return!!_0x1f9c8e;}(_0x32bea4));return 0x0===_0x3d6dfc['length']?null:new _0x3e2b36(_0x3d6dfc[0x0]['getClientRects']()[_0x59dd('0x0')](0x0));}get['isActive'](){return this[_0x59dd('0xc')]['isActive'];}set[_0x59dd('0x4')](_0x7bc304){this[_0x59dd('0xc')][_0x59dd('0x4')]=_0x7bc304,this[_0x59dd('0xc')][_0x59dd('0x1')][_0x59dd('0x4')]=_0x7bc304;}['updateTargetRect'](){this[_0x59dd('0xc')][_0x59dd('0x13')]=this[_0x59dd('0x13')];}[_0x59dd('0x12')](){this[_0x59dd('0xe')]['stopListening'](),this['focusableElements']['clear'](),this[_0x59dd('0x5')]();}[_0x59dd('0x19')](){this[_0x59dd('0x9')]=!!this[_0x59dd('0x13')];}static[_0x59dd('0x3')](_0x1ce8f7){if(!(null===_0x1ce8f7||_0x1ce8f7 instanceof _0x3e2b36||Array[_0x59dd('0x14')](_0x1ce8f7)&&_0x1ce8f7[_0x59dd('0x10')](_0x579a58=>y(_0x579a58))))throw new _0xa45750(_0x59dd('0xb'),null,{'target':_0x1ce8f7});}['_getNormalizedTarget'](){const _0x5861b5=_0x59dd('0x16')==typeof this['_target']?this[_0x59dd('0x2')]():this[_0x59dd('0x2')];return y(_0x5861b5)?[_0x5861b5]:_0x5861b5;}}function y(_0x414a91){return null!==_0x414a91&&'object'==typeof _0x414a91&&_0x59dd('0x7')in _0x414a91&&0x1===_0x414a91['nodeType'];}
@@ -2,9 +2,9 @@
2
2
  * @module comments/annotations/annotationcollection
3
3
  * @publicApi
4
4
  */
5
- import { Collection } from 'ckeditor5/src/utils';
6
- import type { View } from 'ckeditor5/src/ui';
7
- import type Annotation from './annotation';
5
+ import { Collection } from 'ckeditor5/src/utils.js';
6
+ import type { View } from 'ckeditor5/src/ui.js';
7
+ import type Annotation from './annotation.js';
8
8
  /**
9
9
  * A collection of {@link module:comments/annotations/annotation~Annotation annotations}.
10
10
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1469=['focus','getByView','_sort','focusTracker','delete','innerView','change:isFocused','set','_getOrderInContent','_focusTracker','view','_viewToAnnotation','annotationcollection-not-existing-item','sort','annotationcollection-duplicated-item','targetRect','getByInnerView','isFocused','add','remove','listenTo','blur','destroy','length','clear','get','focusableElements','top','updateTargetRect','from','stopListening','_innerViewToAnnotation','fire','refreshPositioning','has'];(function(_0x39a9d9,_0x14699f){const _0x50b333=function(_0x273be8){while(--_0x273be8){_0x39a9d9['push'](_0x39a9d9['shift']());}};_0x50b333(++_0x14699f);}(_0x1469,0x156));const _0x50b3=function(_0x39a9d9,_0x14699f){_0x39a9d9=_0x39a9d9-0x0;let _0x50b333=_0x1469[_0x39a9d9];return _0x50b333;};import{CKEditorError as _0x41abc5,Collection as _0x4405ac,FocusTracker as _0x130fd9}from'ckeditor5/src/utils';export default class x extends _0x4405ac{constructor(_0x5360b8=[]){super(),this[_0x50b3('0x4')]=new Map(),this['_viewToAnnotation']=new Map(),this[_0x50b3('0x11')]=new _0x130fd9(),this['_focusTracker']['on'](_0x50b3('0xe'),(_0x22a4a3,_0x287b93,_0x3aa8a0)=>{_0x3aa8a0||this[_0x50b3('0x5')](_0x50b3('0x1d'));});for(const _0x407479 of _0x5360b8)this['add'](_0x407479);}get[_0x50b3('0x19')](){return this[_0x50b3('0x11')][_0x50b3('0x19')];}[_0x50b3('0x1a')](_0x5a294b){if(this[_0x50b3('0x7')](_0x5a294b))throw new _0x41abc5(_0x50b3('0x16'),null);this[_0x50b3('0x4')][_0x50b3('0xf')](_0x5a294b['innerView'],_0x5a294b),this[_0x50b3('0x13')][_0x50b3('0xf')](_0x5a294b['view'],_0x5a294b);for(const _0x7fbf15 of _0x5a294b[_0x50b3('0x22')])this[_0x50b3('0x11')][_0x50b3('0x1a')](_0x7fbf15);this[_0x50b3('0x1c')](_0x5a294b[_0x50b3('0x22')],_0x50b3('0x1a'),(_0x15edda,_0x416e1e)=>{this[_0x50b3('0x11')]['add'](_0x416e1e);}),this[_0x50b3('0x1c')](_0x5a294b['focusableElements'],_0x50b3('0x1b'),(_0x7d2fba,_0x314e27)=>{this[_0x50b3('0x11')][_0x50b3('0x1b')](_0x314e27);}),this[_0x50b3('0x1c')](_0x5a294b[_0x50b3('0x12')][_0x50b3('0xb')],_0x50b3('0xe'),(_0x18493e,_0x45ff75,_0x36d407)=>{_0x36d407&&this[_0x50b3('0x5')](_0x50b3('0x8'),_0x5a294b);}),_0x5a294b[_0x50b3('0x1')]();const _0x20348d=this[_0x50b3('0x10')](_0x5a294b[_0x50b3('0x12')]['targetRect']);return super[_0x50b3('0x1a')](_0x5a294b,_0x20348d);}[_0x50b3('0x1b')](_0x5c0765){if(!this[_0x50b3('0x7')](_0x5c0765))throw new _0x41abc5(_0x50b3('0x14'),null);this[_0x50b3('0x3')](_0x5c0765[_0x50b3('0x12')][_0x50b3('0xb')]),this['stopListening'](_0x5c0765[_0x50b3('0x22')]);for(const _0x5cb36a of _0x5c0765[_0x50b3('0x22')])this['_focusTracker'][_0x50b3('0x1b')](_0x5cb36a);return this[_0x50b3('0x13')][_0x50b3('0xc')](_0x5c0765[_0x50b3('0x12')]),this[_0x50b3('0x4')]['delete'](_0x5c0765[_0x50b3('0xd')]),super[_0x50b3('0x1b')](_0x5c0765);}[_0x50b3('0x18')](_0x4617ac){return this[_0x50b3('0x4')][_0x50b3('0x21')](_0x4617ac);}[_0x50b3('0x9')](_0x318810){return this[_0x50b3('0x13')][_0x50b3('0x21')](_0x318810);}[_0x50b3('0x1e')](){super[_0x50b3('0x20')](),this[_0x50b3('0x3')](),this[_0x50b3('0x4')][_0x50b3('0x20')](),this[_0x50b3('0x13')][_0x50b3('0x20')](),this[_0x50b3('0x11')][_0x50b3('0x1e')]();}[_0x50b3('0x6')](){for(const _0x289121 of this)_0x289121[_0x50b3('0x1')]();this[_0x50b3('0xa')]();}[_0x50b3('0xa')](){const _0x3fd54f=Array[_0x50b3('0x2')](this)[_0x50b3('0x15')]((_0x478683,_0x5de0aa)=>v(_0x478683[_0x50b3('0x12')][_0x50b3('0x17')],_0x5de0aa[_0x50b3('0x12')][_0x50b3('0x17')]));for(let _0x140814=_0x3fd54f[_0x50b3('0x1f')]-0x1;_0x140814>0x0;_0x140814--){const _0x59022b=_0x3fd54f[_0x140814];_0x140814!==this['getIndex'](_0x59022b)&&(this[_0x50b3('0x1b')](_0x59022b),this[_0x50b3('0x1a')](_0x59022b));}}[_0x50b3('0x10')](_0x10cafe){let _0xc74ffe=0x0;if(!_0x10cafe)return this[_0x50b3('0x1f')];for(const _0x137d38 of this){const _0x8f6bee=_0x137d38[_0x50b3('0x12')][_0x50b3('0x17')];if(_0x8f6bee){if(v(_0x10cafe,_0x8f6bee)<0x0)return _0xc74ffe;_0xc74ffe++;}}return _0xc74ffe;}}export function bindAnnotationCollections({source:_0x3a724f,target:_0x28480d,filter:_0x32a33b}){for(const _0x3b25f2 of _0x3a724f)_0x32a33b(_0x3b25f2)&&_0x28480d[_0x50b3('0x1a')](_0x3b25f2);_0x28480d[_0x50b3('0x1c')](_0x3a724f,_0x50b3('0x1a'),(_0x23fdbe,_0x48cd92)=>{_0x32a33b(_0x48cd92)&&_0x28480d['add'](_0x48cd92);}),_0x28480d[_0x50b3('0x1c')](_0x3a724f,_0x50b3('0x1b'),(_0xfa7d8d,_0x4e2d8a)=>{_0x28480d[_0x50b3('0x7')](_0x4e2d8a)&&_0x28480d['remove'](_0x4e2d8a);});}function v(_0x56c7f9,_0x4a1fd2){if(null===_0x56c7f9&&null===_0x4a1fd2)return 0x0;if(null===_0x56c7f9)return-0x1;if(null===_0x4a1fd2)return 0x1;const _0x574ba6=_0x56c7f9[_0x50b3('0x0')]-_0x4a1fd2[_0x50b3('0x0')];return 0x0==_0x574ba6?_0x56c7f9['left']-_0x4a1fd2['left']:_0x574ba6;}
23
+ const _0x101e=['updateTargetRect','_focusTracker','destroy','fire','getByInnerView','view','left','getByView','_innerViewToAnnotation','change:isFocused','add','annotationcollection-duplicated-item','innerView','isFocused','annotationcollection-not-existing-item','focusTracker','getIndex','from','_sort','listenTo','set','get','_viewToAnnotation','_getOrderInContent','has','sort','clear','remove','focusableElements','targetRect','top','stopListening','length','delete','blur'];(function(_0x55457a,_0x101e05){const _0xe04e4b=function(_0x4ef2da){while(--_0x4ef2da){_0x55457a['push'](_0x55457a['shift']());}};_0xe04e4b(++_0x101e05);}(_0x101e,0x1ca));const _0xe04e=function(_0x55457a,_0x101e05){_0x55457a=_0x55457a-0x0;let _0xe04e4b=_0x101e[_0x55457a];return _0xe04e4b;};import{CKEditorError as _0xaa3ab7,Collection as _0x26cb33,FocusTracker as _0x339725}from'ckeditor5/src/utils.js';export default class x extends _0x26cb33{constructor(_0x2a8091=[]){super(),this['_innerViewToAnnotation']=new Map(),this[_0xe04e('0x13')]=new Map(),this['_focusTracker']=new _0x339725(),this['_focusTracker']['on'](_0xe04e('0x6'),(_0x1becd6,_0x3e48f4,_0x5f2210)=>{_0x5f2210||this['fire'](_0xe04e('0x1f'));});for(const _0xf3be07 of _0x2a8091)this[_0xe04e('0x7')](_0xf3be07);}get[_0xe04e('0xa')](){return this[_0xe04e('0x21')][_0xe04e('0xa')];}[_0xe04e('0x7')](_0xa4d2c6){if(this['has'](_0xa4d2c6))throw new _0xaa3ab7(_0xe04e('0x8'),null);this[_0xe04e('0x5')]['set'](_0xa4d2c6[_0xe04e('0x9')],_0xa4d2c6),this[_0xe04e('0x13')][_0xe04e('0x11')](_0xa4d2c6[_0xe04e('0x2')],_0xa4d2c6);for(const _0x97943 of _0xa4d2c6[_0xe04e('0x19')])this['_focusTracker'][_0xe04e('0x7')](_0x97943);this['listenTo'](_0xa4d2c6[_0xe04e('0x19')],_0xe04e('0x7'),(_0x3264a8,_0x198f96)=>{this[_0xe04e('0x21')]['add'](_0x198f96);}),this[_0xe04e('0x10')](_0xa4d2c6['focusableElements'],_0xe04e('0x18'),(_0xf11a48,_0x2d9520)=>{this[_0xe04e('0x21')][_0xe04e('0x18')](_0x2d9520);}),this[_0xe04e('0x10')](_0xa4d2c6[_0xe04e('0x2')][_0xe04e('0xc')],_0xe04e('0x6'),(_0x11b79f,_0x5235b2,_0xcb138f)=>{_0xcb138f&&this[_0xe04e('0x0')]('focus',_0xa4d2c6);}),_0xa4d2c6[_0xe04e('0x20')]();const _0x201d93=this[_0xe04e('0x14')](_0xa4d2c6[_0xe04e('0x2')]['targetRect']);return super['add'](_0xa4d2c6,_0x201d93);}[_0xe04e('0x18')](_0x3863dd){if(!this[_0xe04e('0x15')](_0x3863dd))throw new _0xaa3ab7(_0xe04e('0xb'),null);this[_0xe04e('0x1c')](_0x3863dd[_0xe04e('0x2')]['focusTracker']),this['stopListening'](_0x3863dd[_0xe04e('0x19')]);for(const _0x587c04 of _0x3863dd[_0xe04e('0x19')])this[_0xe04e('0x21')]['remove'](_0x587c04);return this[_0xe04e('0x13')][_0xe04e('0x1e')](_0x3863dd[_0xe04e('0x2')]),this[_0xe04e('0x5')][_0xe04e('0x1e')](_0x3863dd[_0xe04e('0x9')]),super[_0xe04e('0x18')](_0x3863dd);}[_0xe04e('0x1')](_0x5ebfa5){return this[_0xe04e('0x5')][_0xe04e('0x12')](_0x5ebfa5);}[_0xe04e('0x4')](_0x423c58){return this['_viewToAnnotation'][_0xe04e('0x12')](_0x423c58);}[_0xe04e('0x22')](){super[_0xe04e('0x17')](),this['stopListening'](),this['_innerViewToAnnotation'][_0xe04e('0x17')](),this[_0xe04e('0x13')][_0xe04e('0x17')](),this[_0xe04e('0x21')]['destroy']();}['refreshPositioning'](){for(const _0x4b0c06 of this)_0x4b0c06[_0xe04e('0x20')]();this[_0xe04e('0xf')]();}[_0xe04e('0xf')](){const _0x204071=Array[_0xe04e('0xe')](this)[_0xe04e('0x16')]((_0x17510a,_0x39a16d)=>v(_0x17510a[_0xe04e('0x2')][_0xe04e('0x1a')],_0x39a16d[_0xe04e('0x2')][_0xe04e('0x1a')]));for(let _0x520d0b=_0x204071['length']-0x1;_0x520d0b>0x0;_0x520d0b--){const _0x353a44=_0x204071[_0x520d0b];_0x520d0b!==this[_0xe04e('0xd')](_0x353a44)&&(this['remove'](_0x353a44),this[_0xe04e('0x7')](_0x353a44));}}['_getOrderInContent'](_0xb2d1f2){let _0x114243=0x0;if(!_0xb2d1f2)return this[_0xe04e('0x1d')];for(const _0xbea4fc of this){const _0x57026c=_0xbea4fc[_0xe04e('0x2')][_0xe04e('0x1a')];if(_0x57026c){if(v(_0xb2d1f2,_0x57026c)<0x0)return _0x114243;_0x114243++;}}return _0x114243;}}export function bindAnnotationCollections({source:_0x5320d2,target:_0xc6a7c2,filter:_0x4dfe48}){for(const _0x25b9f1 of _0x5320d2)_0x4dfe48(_0x25b9f1)&&_0xc6a7c2[_0xe04e('0x7')](_0x25b9f1);_0xc6a7c2[_0xe04e('0x10')](_0x5320d2,_0xe04e('0x7'),(_0x5d529b,_0x5a94de)=>{_0x4dfe48(_0x5a94de)&&_0xc6a7c2[_0xe04e('0x7')](_0x5a94de);}),_0xc6a7c2['listenTo'](_0x5320d2,_0xe04e('0x18'),(_0x542d68,_0x1393ff)=>{_0xc6a7c2[_0xe04e('0x15')](_0x1393ff)&&_0xc6a7c2[_0xe04e('0x18')](_0x1393ff);});}function v(_0x347684,_0x3a99b7){if(null===_0x347684&&null===_0x3a99b7)return 0x0;if(null===_0x347684)return-0x1;if(null===_0x3a99b7)return 0x1;const _0x48d24f=_0x347684[_0xe04e('0x1b')]-_0x3a99b7[_0xe04e('0x1b')];return 0x0==_0x48d24f?_0x347684[_0xe04e('0x3')]-_0x3a99b7[_0xe04e('0x3')]:_0x48d24f;}
@@ -2,12 +2,12 @@
2
2
  * @module comments/annotations/annotations
3
3
  * @publicApi
4
4
  */
5
- import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core';
6
- import type { View } from 'ckeditor5/src/ui';
7
- import { type Locale } from 'ckeditor5/src/utils';
8
- import Annotation, { type AnnotationTarget } from './annotation';
9
- import AnnotationCollection from './annotationcollection';
10
- import AnnotationView, { type AnnotationMainView } from './view/annotationview';
5
+ import { ContextPlugin, type Context, type Editor } from 'ckeditor5/src/core.js';
6
+ import type { View } from 'ckeditor5/src/ui.js';
7
+ import { type Locale } from 'ckeditor5/src/utils.js';
8
+ import Annotation, { type AnnotationTarget } from './annotation.js';
9
+ import AnnotationCollection from './annotationcollection.js';
10
+ import AnnotationView, { type AnnotationMainView } from './view/annotationview.js';
11
11
  /**
12
12
  * Stores and manages all {@link module:comments/annotations/annotation~Annotation annotations} created
13
13
  * for the entire {@link module:core/context~Context} or {@link module:core/editor/editor~Editor}.
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x54b3=['_activateAnnotation','_visibleAnnotations','listenTo','activate','source','isVisible','set','view','fire','_removeActiveAnnotation','change:isVisible','_bindAnnotationsToVisibleAnnotations','element','has','activeAnnotations','remove','_deactivateAllAnnotations','focusTracker','createAnnotationView','_addActiveAnnotation','createAnnotation','destroy','getByInnerView','collection','add','refreshPositioning','refreshVisibility','pluginName'];(function(_0x32f68c,_0x54b31e){const _0x9eed36=function(_0x4c6eb2){while(--_0x4c6eb2){_0x32f68c['push'](_0x32f68c['shift']());}};_0x9eed36(++_0x54b31e);}(_0x54b3,0x13a));const _0x9eed=function(_0x32f68c,_0x54b31e){_0x32f68c=_0x32f68c-0x0;let _0x9eed36=_0x54b3[_0x32f68c];return _0x9eed36;};import{ContextPlugin as _0x940f92}from'ckeditor5/src/core';import _0x444793 from'./annotation';import _0x206587 from'./annotationcollection';import _0x323588 from'./view/annotationview';export default class b extends _0x940f92{static get[_0x9eed('0x15')](){return'Annotations';}constructor(_0x5ee7ab){super(_0x5ee7ab),this[_0x9eed('0x11')]=new _0x206587(),this[_0x9eed('0x17')]=new _0x206587(),this[_0x9eed('0x0')](_0x9eed('0x8'),new Set()),this[_0x9eed('0x5')]();}['add'](_0x386c0d){this[_0x9eed('0x11')]['add'](_0x386c0d);}[_0x9eed('0x9')](_0xb7cff1){this['collection'][_0x9eed('0x9')](_0xb7cff1),_0xb7cff1[_0x9eed('0xf')]();}[_0x9eed('0x14')](){for(const _0x28671a of this[_0x9eed('0x11')])_0x28671a[_0x9eed('0x14')]();}['refreshPositioning'](){this[_0x9eed('0x17')][_0x9eed('0x13')]();}[_0x9eed('0x10')](_0x21b122){return this[_0x9eed('0x11')][_0x9eed('0x10')](_0x21b122);}['deactivateAll'](){this[_0x9eed('0x2')](_0x9eed('0xa'));}[_0x9eed('0xf')](){for(const _0x5360ec of this[_0x9eed('0x11')])_0x5360ec[_0x9eed('0xf')]();this[_0x9eed('0x17')][_0x9eed('0xf')](),this[_0x9eed('0x11')]['destroy'](),super[_0x9eed('0xf')]();}[_0x9eed('0x19')](_0x5cb1f7){this[_0x9eed('0x2')](_0x9eed('0x16'),_0x5cb1f7);}[_0x9eed('0xe')](_0x52b586){return new _0x444793(_0x52b586);}[_0x9eed('0xc')](_0x496a24,_0x50ea2d){return new _0x323588(_0x496a24,_0x50ea2d);}[_0x9eed('0xd')](_0x13735d){const _0x4cb698=new Set(this[_0x9eed('0x8')]);_0x4cb698['add'](_0x13735d),this[_0x9eed('0x8')]=_0x4cb698;}[_0x9eed('0x3')](_0x5cf153){const _0x21bd5a=new Set(this['activeAnnotations']);_0x21bd5a['delete'](_0x5cf153),this['activeAnnotations']=_0x21bd5a;}['_bindAnnotationsToVisibleAnnotations'](){const _0xe86117=this['collection'],_0x157236=this[_0x9eed('0x17')];function _0x220f31(_0x38823b){const _0x21ac48=_0x38823b[_0x9eed('0x1a')];_0x21ac48[_0x9eed('0x1b')]&&!_0x157236[_0x9eed('0x7')](_0x21ac48)?_0x157236[_0x9eed('0x12')](_0x21ac48):!_0x21ac48[_0x9eed('0x1b')]&&_0x157236[_0x9eed('0x7')](_0x21ac48)&&_0x157236['remove'](_0x21ac48),_0x21ac48[_0x9eed('0x1')][_0x9eed('0xb')][_0x9eed('0x9')](_0x21ac48[_0x9eed('0x1')][_0x9eed('0x6')]),_0x21ac48[_0x9eed('0x1')]['focusTracker']['add'](_0x21ac48[_0x9eed('0x1')]['element']);}this[_0x9eed('0x18')](_0xe86117,'add',(_0x3c77ea,_0x111a2e)=>{_0x111a2e[_0x9eed('0x1b')]&&_0x157236[_0x9eed('0x12')](_0x111a2e),this[_0x9eed('0x18')](_0x111a2e,_0x9eed('0x4'),_0x220f31);}),this[_0x9eed('0x18')](_0xe86117,_0x9eed('0x9'),(_0xcb1069,_0x1cd157)=>{_0x157236['has'](_0x1cd157)&&_0x157236[_0x9eed('0x9')](_0x1cd157),this['stopListening'](_0x1cd157,_0x9eed('0x4'),_0x220f31);});}}
23
+ const _0x5a99=['element','focusTracker','listenTo','Annotations','deactivateAll','_addActiveAnnotation','collection','getByInnerView','add','change:isVisible','stopListening','_bindAnnotationsToVisibleAnnotations','refreshVisibility','delete','pluginName','refreshPositioning','has','view','fire','destroy','_activateAnnotation','_visibleAnnotations','remove','activeAnnotations','isVisible','source'];(function(_0x59d138,_0x5a9928){const _0x5a84f9=function(_0x18fa55){while(--_0x18fa55){_0x59d138['push'](_0x59d138['shift']());}};_0x5a84f9(++_0x5a9928);}(_0x5a99,0x1dd));const _0x5a84=function(_0x59d138,_0x5a9928){_0x59d138=_0x59d138-0x0;let _0x5a84f9=_0x5a99[_0x59d138];return _0x5a84f9;};import{ContextPlugin as _0x14d2ba}from'ckeditor5/src/core.js';import _0x3d0bdf from'./annotation.js';import _0x18883b from'./annotationcollection.js';import _0x28232b from'./view/annotationview.js';export default class b extends _0x14d2ba{static get[_0x5a84('0x5')](){return _0x5a84('0x14');}constructor(_0x47ddb4){super(_0x47ddb4),this[_0x5a84('0x17')]=new _0x18883b(),this['_visibleAnnotations']=new _0x18883b(),this['set']('activeAnnotations',new Set()),this[_0x5a84('0x2')]();}[_0x5a84('0x19')](_0x5b217c){this[_0x5a84('0x17')][_0x5a84('0x19')](_0x5b217c);}[_0x5a84('0xd')](_0x502335){this[_0x5a84('0x17')][_0x5a84('0xd')](_0x502335),_0x502335[_0x5a84('0xa')]();}[_0x5a84('0x3')](){for(const _0x37531d of this['collection'])_0x37531d[_0x5a84('0x3')]();}[_0x5a84('0x6')](){this['_visibleAnnotations'][_0x5a84('0x6')]();}[_0x5a84('0x18')](_0x4a6554){return this[_0x5a84('0x17')]['getByInnerView'](_0x4a6554);}[_0x5a84('0x15')](){this['fire']('_deactivateAllAnnotations');}[_0x5a84('0xa')](){for(const _0x34665c of this[_0x5a84('0x17')])_0x34665c[_0x5a84('0xa')]();this[_0x5a84('0xc')][_0x5a84('0xa')](),this[_0x5a84('0x17')][_0x5a84('0xa')](),super[_0x5a84('0xa')]();}['activate'](_0x48e6c0){this[_0x5a84('0x9')](_0x5a84('0xb'),_0x48e6c0);}['createAnnotation'](_0xa2492){return new _0x3d0bdf(_0xa2492);}['createAnnotationView'](_0x35c266,_0x42f684){return new _0x28232b(_0x35c266,_0x42f684);}[_0x5a84('0x16')](_0x1c528d){const _0x1c9701=new Set(this[_0x5a84('0xe')]);_0x1c9701[_0x5a84('0x19')](_0x1c528d),this[_0x5a84('0xe')]=_0x1c9701;}['_removeActiveAnnotation'](_0x5953b7){const _0x3f02df=new Set(this[_0x5a84('0xe')]);_0x3f02df[_0x5a84('0x4')](_0x5953b7),this['activeAnnotations']=_0x3f02df;}[_0x5a84('0x2')](){const _0x37781a=this[_0x5a84('0x17')],_0x1c5a41=this['_visibleAnnotations'];function _0x50a938(_0x4228e2){const _0x371cb6=_0x4228e2[_0x5a84('0x10')];_0x371cb6[_0x5a84('0xf')]&&!_0x1c5a41['has'](_0x371cb6)?_0x1c5a41[_0x5a84('0x19')](_0x371cb6):!_0x371cb6['isVisible']&&_0x1c5a41[_0x5a84('0x7')](_0x371cb6)&&_0x1c5a41[_0x5a84('0xd')](_0x371cb6),_0x371cb6[_0x5a84('0x8')][_0x5a84('0x12')][_0x5a84('0xd')](_0x371cb6['view'][_0x5a84('0x11')]),_0x371cb6[_0x5a84('0x8')]['focusTracker'][_0x5a84('0x19')](_0x371cb6['view'][_0x5a84('0x11')]);}this[_0x5a84('0x13')](_0x37781a,_0x5a84('0x19'),(_0x1689fc,_0x4a0dab)=>{_0x4a0dab[_0x5a84('0xf')]&&_0x1c5a41['add'](_0x4a0dab),this['listenTo'](_0x4a0dab,_0x5a84('0x0'),_0x50a938);}),this['listenTo'](_0x37781a,_0x5a84('0xd'),(_0x410f44,_0x3d9224)=>{_0x1c5a41[_0x5a84('0x7')](_0x3d9224)&&_0x1c5a41[_0x5a84('0xd')](_0x3d9224),this[_0x5a84('0x1')](_0x3d9224,_0x5a84('0x0'),_0x50a938);});}}
@@ -2,11 +2,11 @@
2
2
  * @module comments/annotations/annotationsuis
3
3
  * @publicApi
4
4
  */
5
- import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core';
6
- import { type Emitter } from 'ckeditor5/src/utils';
7
- import AnnotationCollection from './annotationcollection';
8
- import Annotations from './annotations';
9
- import type Annotation from './annotation';
5
+ import { ContextPlugin, type Plugin, type Editor, type Context } from 'ckeditor5/src/core.js';
6
+ import { type Emitter } from 'ckeditor5/src/utils.js';
7
+ import AnnotationCollection from './annotationcollection.js';
8
+ import Annotations from './annotations.js';
9
+ import type Annotation from './annotation.js';
10
10
  /**
11
11
  * A repository of annotations UIs.
12
12
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4199=['context','refilterAnnotations','pluginName','function','_activateAnnotation','destroy','annotationsuis-missing-ui','_uis','AnnotationsUIs','filter','register','annotationsuis-register-invalid-interface','deactivateAll','type','activate','setActiveAnnotation','plugins','_setSelectedAnnotations','annotationsuis-register-already-registered','activeUIs','get','deactivate','_addActiveAnnotation','switchTo','init','collection','_assertAnnotationDoesNotBelongToMultipleUIs','set','delete','_removeActiveAnnotation','_visibleAnnotations','has','attach','listenTo','remove','requires','find','from','push','isActive','size','_uisData'];(function(_0x43ab4c,_0x419990){const _0xa9614f=function(_0x1ca3ca){while(--_0x1ca3ca){_0x43ab4c['push'](_0x43ab4c['shift']());}};_0xa9614f(++_0x419990);}(_0x4199,0x180));const _0xa961=function(_0x43ab4c,_0x419990){_0x43ab4c=_0x43ab4c-0x0;let _0xa9614f=_0x4199[_0x43ab4c];return _0xa9614f;};import{ContextPlugin as _0x5a582e}from'ckeditor5/src/core';import{CKEditorError as _0x202ed0}from'ckeditor5/src/utils';import _0x1e51e4,{bindAnnotationCollections as _0xfc1eed}from'./annotationcollection';import _0x53a941 from'./annotations';export default class M extends _0x5a582e{static get[_0xa961('0x1d')](){return[_0x53a941];}static get[_0xa961('0x26')](){return _0xa961('0x2');}constructor(_0x159716){super(_0x159716),this[_0xa961('0xd')]=new Set(),this[_0xa961('0x1')]=new Map(),this['_uisData']=new Map();}[_0xa961('0x12')](){const _0x8d1504=this['context'][_0xa961('0xa')][_0xa961('0xe')](_0x53a941);this[_0xa961('0x1b')](_0x8d1504,_0xa961('0x28'),(_0x7128bb,_0x14c947)=>{for(const _0xc6088b of this[_0xa961('0xd')]){const _0x1f8fff=this[_0xa961('0x1')][_0xa961('0xe')](_0xc6088b);(0x0,this['_uisData'][_0xa961('0xe')](_0xc6088b)[_0xa961('0x3')])(_0x14c947)&&_0x1f8fff[_0xa961('0x9')](_0x14c947);}}),this[_0xa961('0x1b')](_0x8d1504,'_deactivateAllAnnotations',()=>{for(const _0x19749b of this[_0xa961('0xd')]){this[_0xa961('0x1')][_0xa961('0xe')](_0x19749b)[_0xa961('0x9')](null);}}),this[_0xa961('0x1b')](_0x8d1504[_0xa961('0x18')],'add',(_0x13f8ad,_0x111516)=>{this[_0xa961('0x14')](_0x111516);});}['hasActive'](){return this['activeUIs'][_0xa961('0x22')]>0x0;}[_0xa961('0x21')](_0x1d4713){return this[_0xa961('0xd')]['has'](_0x1d4713);}[_0xa961('0x8')](_0x11269b,_0x25e0b4=()=>!0x0){const _0x29d10a=this[_0xa961('0x24')]['plugins'][_0xa961('0xe')](_0x53a941);if(!this['_uis'][_0xa961('0x19')](_0x11269b))throw new _0x202ed0(_0xa961('0x0'),this,{'uiName':_0x11269b});this[_0xa961('0x21')](_0x11269b)&&this[_0xa961('0xf')](_0x11269b),this[_0xa961('0xd')]['add'](_0x11269b);const _0x297efe=new _0x1e51e4(),_0x45d887=_0x29d10a[_0xa961('0x18')];_0xfc1eed({'source':_0x45d887,'target':_0x297efe,'filter':_0x25e0b4}),this['_uisData']['set'](_0x11269b,{'collection':_0x297efe,'filter':_0x25e0b4});const _0x2690da=this[_0xa961('0x1')]['get'](_0x11269b);_0x2690da['attach'](_0x297efe),this[_0xa961('0x1b')](_0x2690da,'change:activeAnnotation',(_0x1061a2,_0x5a9158,_0x3779eb,_0x4080ae)=>{_0x4080ae&&_0x29d10a[_0xa961('0x17')](_0x4080ae),_0x3779eb&&_0x29d10a[_0xa961('0x10')](_0x3779eb);});}['deactivate'](_0x30bf13){if(this['activeUIs'][_0xa961('0x16')](_0x30bf13),!this['_uis']['has'](_0x30bf13))throw new _0x202ed0('annotationsuis-missing-ui',this,{'uiName':_0x30bf13});const _0x890175=this['_uis'][_0xa961('0xe')](_0x30bf13);_0x890175['detach'](),this['stopListening'](_0x890175),this[_0xa961('0x23')][_0xa961('0xe')](_0x30bf13)[_0xa961('0x13')][_0xa961('0x29')](),this['_uisData'][_0xa961('0x16')](_0x30bf13);}[_0xa961('0x11')](_0x229f24){if(!this['_uis'][_0xa961('0x19')](_0x229f24))throw new _0x202ed0(_0xa961('0x0'),this,{'uiName':_0x229f24});const _0x294113=this[_0xa961('0x24')]['plugins'][_0xa961('0xe')](_0x53a941),_0xef39a6=Array[_0xa961('0x1f')](_0x294113['activeAnnotations'])[0x0]||null;this[_0xa961('0x6')](),this[_0xa961('0x8')](_0x229f24);const _0x5dfd76=this[_0xa961('0x1')]['get'](_0x229f24);_0x5dfd76[_0xa961('0x9')](_0xef39a6),_0x5dfd76['_setSelectedAnnotations']&&_0xef39a6&&_0x5dfd76[_0xa961('0xb')]([_0xef39a6]);}['deactivateAll'](){for(const _0x2694d1 of this[_0xa961('0xd')])this[_0xa961('0xf')](_0x2694d1);}[_0xa961('0x4')](_0x8a0c0b,_0x3935bf){if(this[_0xa961('0x1')][_0xa961('0x19')](_0x8a0c0b))throw new _0x202ed0(_0xa961('0xc'));if(_0xa961('0x27')!=typeof _0x3935bf[_0xa961('0x1a')]||_0xa961('0x27')!=typeof _0x3935bf['detach']||'function'!=typeof _0x3935bf['setActiveAnnotation'])throw new _0x202ed0(_0xa961('0x5'),null);this[_0xa961('0x1')][_0xa961('0x15')](_0x8a0c0b,_0x3935bf);}[_0xa961('0x25')](){const _0x21aa71=this[_0xa961('0x24')]['plugins']['get'](_0x53a941)[_0xa961('0x13')],_0x164801=new Map(),_0x5b9876=Array['from'](this[_0xa961('0xd')]);for(const _0x4f9ce2 of this[_0xa961('0xd')]){const _0x45aed=this[_0xa961('0x23')][_0xa961('0xe')](_0x4f9ce2)[_0xa961('0x13')];for(const _0x260037 of _0x45aed)_0x164801[_0xa961('0x15')](_0x260037,_0x4f9ce2);}for(const _0x3abe41 of _0x21aa71){const _0x4ee59c=_0x164801[_0xa961('0xe')](_0x3abe41);this[_0xa961('0x14')](_0x3abe41);const _0x5b333e=_0x5b9876[_0xa961('0x1e')](_0x2af4ff=>this[_0xa961('0x23')][_0xa961('0xe')](_0x2af4ff)[_0xa961('0x3')](_0x3abe41));_0x4ee59c!==_0x5b333e&&(_0x4ee59c&&this[_0xa961('0x23')][_0xa961('0xe')](_0x4ee59c)[_0xa961('0x13')][_0xa961('0x1c')](_0x3abe41),_0x5b333e&&this[_0xa961('0x23')]['get'](_0x5b333e)['collection']['add'](_0x3abe41));}}[_0xa961('0x29')](){this['deactivateAll'](),super[_0xa961('0x29')]();}[_0xa961('0x14')](_0x47303e){const _0x343aa6=[];for(const _0x2c18f7 of this['activeUIs']){(0x0,this[_0xa961('0x23')][_0xa961('0xe')](_0x2c18f7)[_0xa961('0x3')])(_0x47303e)&&_0x343aa6[_0xa961('0x20')](_0x2c18f7);}if(_0x343aa6['length']>0x1)throw new _0x202ed0('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x343aa6,'annotationType':_0x47303e[_0xa961('0x7')]});}}
23
+ const _0x1f0f=['refilterAnnotations','context','annotationsuis-register-invalid-interface','destroy','deactivate','from','filter','stopListening','has','register','collection','annotationsuis-annotation-mismatch','isActive','_assertAnnotationDoesNotBelongToMultipleUIs','activeUIs','hasActive','setActiveAnnotation','_uis','_setSelectedAnnotations','_uisData','listenTo','function','find','length','detach','switchTo','pluginName','attach','delete','get','_deactivateAllAnnotations','annotationsuis-register-already-registered','size','plugins','remove','add','deactivateAll','change:activeAnnotation','annotationsuis-missing-ui','_activateAnnotation','_visibleAnnotations','_removeActiveAnnotation','set','activate','push'];(function(_0x53383d,_0x1f0f67){const _0x297bf6=function(_0x548cf3){while(--_0x548cf3){_0x53383d['push'](_0x53383d['shift']());}};_0x297bf6(++_0x1f0f67);}(_0x1f0f,0x1c1));const _0x297b=function(_0x53383d,_0x1f0f67){_0x53383d=_0x53383d-0x0;let _0x297bf6=_0x1f0f[_0x53383d];return _0x297bf6;};import{ContextPlugin as _0x40411a}from'ckeditor5/src/core.js';import{CKEditorError as _0x376d14}from'ckeditor5/src/utils.js';import _0x24fd78,{bindAnnotationCollections as _0x1b4c36}from'./annotationcollection.js';import _0x34fbae from'./annotations.js';export default class j extends _0x40411a{static get['requires'](){return[_0x34fbae];}static get[_0x297b('0x1b')](){return'AnnotationsUIs';}constructor(_0xb8ec72){super(_0xb8ec72),this[_0x297b('0xf')]=new Set(),this['_uis']=new Map(),this[_0x297b('0x14')]=new Map();}['init'](){const _0x10f672=this[_0x297b('0x2')][_0x297b('0x22')][_0x297b('0x1e')](_0x34fbae);this[_0x297b('0x15')](_0x10f672,_0x297b('0x28'),(_0x4994ff,_0x4fdd63)=>{for(const _0x4edef9 of this['activeUIs']){const _0x542d41=this['_uis'][_0x297b('0x1e')](_0x4edef9);(0x0,this[_0x297b('0x14')][_0x297b('0x1e')](_0x4edef9)['filter'])(_0x4fdd63)&&_0x542d41[_0x297b('0x11')](_0x4fdd63);}}),this['listenTo'](_0x10f672,_0x297b('0x1f'),()=>{for(const _0x16ab6a of this[_0x297b('0xf')]){this[_0x297b('0x12')]['get'](_0x16ab6a)[_0x297b('0x11')](null);}}),this[_0x297b('0x15')](_0x10f672[_0x297b('0x29')],_0x297b('0x24'),(_0x349dd8,_0x3cc24d)=>{this[_0x297b('0xe')](_0x3cc24d);});}[_0x297b('0x10')](){return this[_0x297b('0xf')][_0x297b('0x21')]>0x0;}[_0x297b('0xd')](_0x17ad99){return this[_0x297b('0xf')][_0x297b('0x9')](_0x17ad99);}[_0x297b('0x2c')](_0x133e8a,_0x53c8d2=()=>!0x0){const _0x33a5ab=this[_0x297b('0x2')][_0x297b('0x22')][_0x297b('0x1e')](_0x34fbae);if(!this[_0x297b('0x12')][_0x297b('0x9')](_0x133e8a))throw new _0x376d14(_0x297b('0x27'),this,{'uiName':_0x133e8a});this['isActive'](_0x133e8a)&&this[_0x297b('0x5')](_0x133e8a),this[_0x297b('0xf')]['add'](_0x133e8a);const _0x260361=new _0x24fd78(),_0x2e51f8=_0x33a5ab[_0x297b('0x29')];_0x1b4c36({'source':_0x2e51f8,'target':_0x260361,'filter':_0x53c8d2}),this['_uisData'][_0x297b('0x2b')](_0x133e8a,{'collection':_0x260361,'filter':_0x53c8d2});const _0x4beaa7=this[_0x297b('0x12')][_0x297b('0x1e')](_0x133e8a);_0x4beaa7['attach'](_0x260361),this[_0x297b('0x15')](_0x4beaa7,_0x297b('0x26'),(_0x376256,_0x2b3408,_0x15392a,_0x245935)=>{_0x245935&&_0x33a5ab[_0x297b('0x2a')](_0x245935),_0x15392a&&_0x33a5ab['_addActiveAnnotation'](_0x15392a);});}[_0x297b('0x5')](_0xedc3d7){if(this[_0x297b('0xf')][_0x297b('0x1d')](_0xedc3d7),!this[_0x297b('0x12')][_0x297b('0x9')](_0xedc3d7))throw new _0x376d14(_0x297b('0x27'),this,{'uiName':_0xedc3d7});const _0x803254=this[_0x297b('0x12')][_0x297b('0x1e')](_0xedc3d7);_0x803254['detach'](),this[_0x297b('0x8')](_0x803254),this[_0x297b('0x14')][_0x297b('0x1e')](_0xedc3d7)['collection'][_0x297b('0x4')](),this[_0x297b('0x14')][_0x297b('0x1d')](_0xedc3d7);}[_0x297b('0x1a')](_0x22a62b){if(!this[_0x297b('0x12')][_0x297b('0x9')](_0x22a62b))throw new _0x376d14(_0x297b('0x27'),this,{'uiName':_0x22a62b});const _0xb93b30=this[_0x297b('0x2')]['plugins']['get'](_0x34fbae),_0x19d223=Array[_0x297b('0x6')](_0xb93b30['activeAnnotations'])[0x0]||null;this[_0x297b('0x25')](),this[_0x297b('0x2c')](_0x22a62b);const _0x3a939c=this[_0x297b('0x12')][_0x297b('0x1e')](_0x22a62b);_0x3a939c[_0x297b('0x11')](_0x19d223),_0x3a939c[_0x297b('0x13')]&&_0x19d223&&_0x3a939c[_0x297b('0x13')]([_0x19d223]);}[_0x297b('0x25')](){for(const _0x290885 of this[_0x297b('0xf')])this[_0x297b('0x5')](_0x290885);}[_0x297b('0xa')](_0x1e6242,_0x36edfc){if(this[_0x297b('0x12')][_0x297b('0x9')](_0x1e6242))throw new _0x376d14(_0x297b('0x20'));if(_0x297b('0x16')!=typeof _0x36edfc[_0x297b('0x1c')]||_0x297b('0x16')!=typeof _0x36edfc[_0x297b('0x19')]||_0x297b('0x16')!=typeof _0x36edfc[_0x297b('0x11')])throw new _0x376d14(_0x297b('0x3'),null);this[_0x297b('0x12')][_0x297b('0x2b')](_0x1e6242,_0x36edfc);}[_0x297b('0x1')](){const _0x49e854=this[_0x297b('0x2')][_0x297b('0x22')]['get'](_0x34fbae)[_0x297b('0xb')],_0x3b121d=new Map(),_0x2d4590=Array[_0x297b('0x6')](this['activeUIs']);for(const _0x53ee29 of this['activeUIs']){const _0x4635da=this[_0x297b('0x14')]['get'](_0x53ee29)[_0x297b('0xb')];for(const _0x1cdd0e of _0x4635da)_0x3b121d[_0x297b('0x2b')](_0x1cdd0e,_0x53ee29);}for(const _0x250660 of _0x49e854){const _0x2e9a8a=_0x3b121d['get'](_0x250660);this[_0x297b('0xe')](_0x250660);const _0x4a74bd=_0x2d4590[_0x297b('0x17')](_0x1692f0=>this['_uisData'][_0x297b('0x1e')](_0x1692f0)[_0x297b('0x7')](_0x250660));_0x2e9a8a!==_0x4a74bd&&(_0x2e9a8a&&this[_0x297b('0x14')][_0x297b('0x1e')](_0x2e9a8a)[_0x297b('0xb')][_0x297b('0x23')](_0x250660),_0x4a74bd&&this[_0x297b('0x14')][_0x297b('0x1e')](_0x4a74bd)[_0x297b('0xb')]['add'](_0x250660));}}[_0x297b('0x4')](){this[_0x297b('0x25')](),super[_0x297b('0x4')]();}[_0x297b('0xe')](_0x110b3b){const _0x40e22f=[];for(const _0x7b3efc of this[_0x297b('0xf')]){(0x0,this[_0x297b('0x14')][_0x297b('0x1e')](_0x7b3efc)[_0x297b('0x7')])(_0x110b3b)&&_0x40e22f[_0x297b('0x0')](_0x7b3efc);}if(_0x40e22f[_0x297b('0x18')]>0x1)throw new _0x376d14(_0x297b('0xc'),null,{'matchedUIs':_0x40e22f,'annotationType':_0x110b3b['type']});}}
@@ -2,10 +2,10 @@
2
2
  * @module comments/annotations/editorannotations
3
3
  * @publicApi
4
4
  */
5
- import { Plugin, type Editor } from 'ckeditor5/src/core';
6
- import Annotations from './annotations';
7
- import type Annotation from './annotation';
8
- import type AnnotationCollection from './annotationcollection';
5
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
6
+ import Annotations from './annotations.js';
7
+ import type Annotation from './annotation.js';
8
+ import type AnnotationCollection from './annotationcollection.js';
9
9
  /**
10
10
  * Integrates {@link module:comments/annotations/annotations~Annotations annotations} with the editor to provide proper behavior
11
11
  * for annotations created through the editor features.
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2996=['innerView','has','from','get','function','containsRange','isEqual','_editorAnnotationsData','hasDomSelection','view','change:range','refreshSelectedViews','init','change:isFocused','collection','_editorAnnotations','directChange','getOrderedSelectedAnnotations','editing','remove','pluginName','_dataCollectors','uiUpdate','update','blur','focusTracker','element','editor','getRanges','push','addSourceCollector','document','cancel','selection','add','editorannotations-invalid-source-callback','sort','annotation','requires','fire','listenTo','map','delete','refresh','range','set','EditorAnnotations'];(function(_0x163a67,_0x2996f2){const _0xacb694=function(_0x55d28b){while(--_0x55d28b){_0x163a67['push'](_0x163a67['shift']());}};_0xacb694(++_0x2996f2);}(_0x2996,0xc1));const _0xacb6=function(_0x163a67,_0x2996f2){_0x163a67=_0x163a67-0x0;let _0xacb694=_0x2996[_0x163a67];return _0xacb694;};import{Plugin as _0x3da581}from'ckeditor5/src/core';import{CKEditorError as _0x5e4360}from'ckeditor5/src/utils';import{debounce as _0x26f3e6}from'lodash-es';import _0x2da36f from'./annotations';export default class k extends _0x3da581{static get[_0xacb6('0x21')](){return[_0x2da36f];}static get[_0xacb6('0xf')](){return _0xacb6('0x29');}constructor(_0x3b86ee){super(_0x3b86ee),this[_0xacb6('0x10')]=new Set(),this[_0xacb6('0xa')]=new Set();}[_0xacb6('0x7')](){const _0x34d0f9=this['editor'],_0x22a039=_0x34d0f9['model'][_0xacb6('0x1a')]['selection'],_0x521d62=_0x26f3e6(()=>this[_0xacb6('0x6')](),0xa);_0x22a039['on'](_0xacb6('0x5'),(_0x38be54,_0x556267)=>{_0x556267[_0xacb6('0xb')]&&(_0x521d62[_0xacb6('0x1b')](),this[_0xacb6('0x6')]());}),this['listenTo'](_0x34d0f9['editing']['view'][_0xacb6('0x1a')],_0xacb6('0x8'),(_0x48b651,_0x3fa9c1,_0x6677ab)=>{_0x6677ab&&_0x521d62();}),this[_0xacb6('0x23')](_0x34d0f9['ui'][_0xacb6('0x14')],_0xacb6('0x8'),(_0x3e7298,_0x2f94be,_0x1f2cbb)=>{_0x1f2cbb||_0x34d0f9['isReadOnly']||this['fire'](_0xacb6('0x13'),{'isAnnotationTracked':_0x1419c7=>this[_0xacb6('0x2')][_0xacb6('0x2b')](_0x1419c7[_0xacb6('0x2a')])});}),this['listenTo'](this[_0xacb6('0x16')]['ui'],_0xacb6('0x12'),()=>this['fire'](_0xacb6('0x11')));}['registerAnnotation'](_0x4a1b3d){if(this[_0xacb6('0xa')][_0xacb6('0x2b')](_0x4a1b3d[_0xacb6('0x4')]))return;this[_0xacb6('0xa')][_0xacb6('0x1d')](_0x4a1b3d[_0xacb6('0x4')]),this[_0xacb6('0x16')]['ui']['focusTracker'][_0xacb6('0x1d')](_0x4a1b3d['view'][_0xacb6('0x15')]);const _0x3585dc=this['editor']['plugins'][_0xacb6('0x2d')](_0x2da36f);this[_0xacb6('0x23')](_0x3585dc[_0xacb6('0x9')],'remove',(_0x209284,_0x1fe197)=>{this[_0xacb6('0x16')]['ui'][_0xacb6('0x14')][_0xacb6('0xe')](_0x1fe197['view'][_0xacb6('0x15')]),this[_0xacb6('0xa')][_0xacb6('0x25')](_0x1fe197['view']);});}[_0xacb6('0x3')](){return this['editor'][_0xacb6('0xd')]['view'][_0xacb6('0x3')];}[_0xacb6('0x19')](_0x407054){if(_0xacb6('0x2e')!=typeof _0x407054)throw new _0x5e4360(_0xacb6('0x1e'));this[_0xacb6('0x10')][_0xacb6('0x1d')](_0x407054);}[_0xacb6('0x6')](){this[_0xacb6('0x22')](_0xacb6('0x26'));}[_0xacb6('0xc')]({activeAnnotation:_0xf626ad,annotations:_0x364025}){const _0x3fa67b=[],_0x470503=this['editor']['model'][_0xacb6('0x1a')][_0xacb6('0x1c')],_0xb85c1=Array[_0xacb6('0x2c')](_0x470503[_0xacb6('0x17')]());for(const [_0x397cc8,_0x1131b3]of this[_0xacb6('0x2')]){const _0x149085=_0x447d39(_0x1131b3),_0x40d5c9=_0x364025['getByInnerView'](_0x397cc8);_0x149085&&_0x40d5c9&&_0x3fa67b[_0xacb6('0x18')]({'annotation':_0x40d5c9,'range':_0x149085});}function _0x447d39(_0x5e1b88){for(const _0x37cc2b of _0x5e1b88)for(const _0x4b0d30 of _0xb85c1)if(_0x37cc2b[_0xacb6('0x0')](_0x4b0d30,!_0x470503['isCollapsed']))return _0x37cc2b;return null;}return _0x3fa67b[_0xacb6('0x1f')]((_0x4ea226,_0x29e330)=>{const _0x3c63da=_0x4ea226['range'],_0x522f69=_0x29e330[_0xacb6('0x27')];if(!_0x3c63da[_0xacb6('0x1')](_0x522f69)){if(_0x3c63da[_0xacb6('0x0')](_0x522f69,!0x0))return 0x1;if(_0x522f69[_0xacb6('0x0')](_0x3c63da,!0x0))return-0x1;}return _0x4ea226[_0xacb6('0x20')]==_0xf626ad?-0x1:_0x29e330[_0xacb6('0x20')]==_0xf626ad?0x1:0x0;})[_0xacb6('0x24')](_0x206e72=>_0x206e72['annotation']);}get[_0xacb6('0x2')](){const _0x19518e=new Map();for(const _0x4a0e9c of Array[_0xacb6('0x2c')](this[_0xacb6('0x10')]))for(const [_0x5c25fe,_0xf9264e]of _0x4a0e9c())_0x19518e[_0xacb6('0x28')](_0x5c25fe,_0xf9264e);return _0x19518e;}}
23
+ const _0x5270=['editorannotations-invalid-source-callback','getOrderedSelectedAnnotations','function','remove','selection','focusTracker','isCollapsed','hasDomSelection','uiUpdate','from','_dataCollectors','change:isFocused','element','directChange','push','fire','getByInnerView','innerView','refresh','listenTo','blur','model','view','refreshSelectedViews','has','cancel','range','containsRange','change:range','plugins','requires','isEqual','document','pluginName','_editorAnnotationsData','annotation','EditorAnnotations','editing','map','get','add','isReadOnly','getRanges','editor','update','_editorAnnotations'];(function(_0x30fa39,_0x5270e1){const _0x2c5c94=function(_0x54386a){while(--_0x54386a){_0x30fa39['push'](_0x30fa39['shift']());}};_0x2c5c94(++_0x5270e1);}(_0x5270,0x131));const _0x2c5c=function(_0x30fa39,_0x5270e1){_0x30fa39=_0x30fa39-0x0;let _0x2c5c94=_0x5270[_0x30fa39];return _0x2c5c94;};import{Plugin as _0x20b683}from'ckeditor5/src/core.js';import{CKEditorError as _0x3cf08c}from'ckeditor5/src/utils.js';import{debounce as _0x39d604}from'lodash-es';import _0x319f93 from'./annotations.js';export default class k extends _0x20b683{static get[_0x2c5c('0x1')](){return[_0x319f93];}static get[_0x2c5c('0x4')](){return _0x2c5c('0x7');}constructor(_0x3f427a){super(_0x3f427a),this[_0x2c5c('0x1b')]=new Set(),this[_0x2c5c('0x10')]=new Set();}['init'](){const _0x2b1ca2=this[_0x2c5c('0xe')],_0x2146da=_0x2b1ca2[_0x2c5c('0x26')]['document'][_0x2c5c('0x15')],_0x3e3aa0=_0x39d604(()=>this[_0x2c5c('0x28')](),0xa);_0x2146da['on'](_0x2c5c('0x2d'),(_0xb0b203,_0x4d84f1)=>{_0x4d84f1[_0x2c5c('0x1e')]&&(_0x3e3aa0[_0x2c5c('0x2a')](),this['refreshSelectedViews']());}),this[_0x2c5c('0x24')](_0x2b1ca2[_0x2c5c('0x8')][_0x2c5c('0x27')][_0x2c5c('0x3')],'change:isFocused',(_0x43e546,_0x9ca4ac,_0x516cde)=>{_0x516cde&&_0x3e3aa0();}),this[_0x2c5c('0x24')](_0x2b1ca2['ui'][_0x2c5c('0x16')],_0x2c5c('0x1c'),(_0x2b0ba0,_0x16a01b,_0x21f294)=>{_0x21f294||_0x2b1ca2[_0x2c5c('0xc')]||this[_0x2c5c('0x20')](_0x2c5c('0x25'),{'isAnnotationTracked':_0x5c49c2=>this['_editorAnnotationsData'][_0x2c5c('0x29')](_0x5c49c2[_0x2c5c('0x22')])});}),this[_0x2c5c('0x24')](this['editor']['ui'],_0x2c5c('0xf'),()=>this[_0x2c5c('0x20')](_0x2c5c('0x19')));}['registerAnnotation'](_0x594687){if(this['_editorAnnotations']['has'](_0x594687[_0x2c5c('0x27')]))return;this[_0x2c5c('0x10')][_0x2c5c('0xb')](_0x594687[_0x2c5c('0x27')]),this['editor']['ui'][_0x2c5c('0x16')][_0x2c5c('0xb')](_0x594687['view'][_0x2c5c('0x1d')]);const _0x52b7fc=this[_0x2c5c('0xe')][_0x2c5c('0x0')][_0x2c5c('0xa')](_0x319f93);this[_0x2c5c('0x24')](_0x52b7fc['collection'],_0x2c5c('0x14'),(_0x493e51,_0x4a358a)=>{this[_0x2c5c('0xe')]['ui'][_0x2c5c('0x16')]['remove'](_0x4a358a[_0x2c5c('0x27')][_0x2c5c('0x1d')]),this[_0x2c5c('0x10')]['delete'](_0x4a358a[_0x2c5c('0x27')]);});}[_0x2c5c('0x18')](){return this[_0x2c5c('0xe')][_0x2c5c('0x8')][_0x2c5c('0x27')][_0x2c5c('0x18')];}['addSourceCollector'](_0xf991d8){if(_0x2c5c('0x13')!=typeof _0xf991d8)throw new _0x3cf08c(_0x2c5c('0x11'));this[_0x2c5c('0x1b')][_0x2c5c('0xb')](_0xf991d8);}[_0x2c5c('0x28')](){this[_0x2c5c('0x20')](_0x2c5c('0x23'));}[_0x2c5c('0x12')]({activeAnnotation:_0x5911e2,annotations:_0x30fafc}){const _0x261d92=[],_0x776d9f=this[_0x2c5c('0xe')][_0x2c5c('0x26')][_0x2c5c('0x3')][_0x2c5c('0x15')],_0x24c262=Array['from'](_0x776d9f[_0x2c5c('0xd')]());for(const [_0x3532a1,_0x2521ed]of this[_0x2c5c('0x5')]){const _0x27793a=_0x37cd13(_0x2521ed),_0x184df2=_0x30fafc[_0x2c5c('0x21')](_0x3532a1);_0x27793a&&_0x184df2&&_0x261d92[_0x2c5c('0x1f')]({'annotation':_0x184df2,'range':_0x27793a});}function _0x37cd13(_0x54df90){for(const _0x4655d0 of _0x54df90)for(const _0x155556 of _0x24c262)if(_0x4655d0['containsRange'](_0x155556,!_0x776d9f[_0x2c5c('0x17')]))return _0x4655d0;return null;}return _0x261d92['sort']((_0x117af9,_0x3acf27)=>{const _0x217291=_0x117af9[_0x2c5c('0x2b')],_0x4d9026=_0x3acf27[_0x2c5c('0x2b')];if(!_0x217291[_0x2c5c('0x2')](_0x4d9026)){if(_0x217291[_0x2c5c('0x2c')](_0x4d9026,!0x0))return 0x1;if(_0x4d9026['containsRange'](_0x217291,!0x0))return-0x1;}return _0x117af9[_0x2c5c('0x6')]==_0x5911e2?-0x1:_0x3acf27[_0x2c5c('0x6')]==_0x5911e2?0x1:0x0;})[_0x2c5c('0x9')](_0x325062=>_0x325062[_0x2c5c('0x6')]);}get['_editorAnnotationsData'](){const _0x18c184=new Map();for(const _0x3845ba of Array[_0x2c5c('0x1a')](this['_dataCollectors']))for(const [_0x25d46d,_0x265182]of _0x3845ba())_0x18c184['set'](_0x25d46d,_0x265182);return _0x18c184;}}
@@ -2,13 +2,13 @@
2
2
  * @module comments/annotations/inlineannotations
3
3
  * @publicApi
4
4
  */
5
- import { Plugin, type Editor } from 'ckeditor5/src/core';
6
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
7
- import EditorAnnotations from './editorannotations';
8
- import { ContextualBalloon } from 'ckeditor5/src/ui';
5
+ import { Plugin, type Editor } from 'ckeditor5/src/core.js';
6
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
7
+ import EditorAnnotations from './editorannotations.js';
8
+ import { ContextualBalloon } from 'ckeditor5/src/ui.js';
9
9
  import './../../theme/annotation-inline.css';
10
- import type Annotation from './annotation';
11
- import type AnnotationCollection from './annotationcollection';
10
+ import type Annotation from './annotation.js';
11
+ import type AnnotationCollection from './annotationcollection.js';
12
12
  /**
13
13
  * The popup-style UI for displaying annotations next to editor target elements.
14
14
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x391f=['target','_getBalloonTargetForAnnotation','refresh','has','remove','switchTo','hasActive','isActive','add','width','_closeAnnotation','editing','_addAnnotationToBalloon','get','left','set','getFirstRange','blur','getClientRects','delete','annotations','length','_selectedAnnotations','Esc','change:height','pluginName','inlineannotations-detach-not-attached','every','hasView','targetRect','attach','destroy','right','editableElement','detach','_forceRefresh','register','_manuallyClosed','bottom','focus','stopListening','_removeAnnotationFromBalloon','editor','getByView','visibleView','afterInit','mousedown','_addedAnnotations','includes','fromRect','viewRangeToDom','focusTracker','_balloon','keystrokes','change:visibleView','plugins','inline','selection','isFocused','view','push','activeAnnotation','isAttached','collapse','listenTo','inlineannotations-not-allowed-with-context','_setSelectedAnnotations','from','top','document','setActiveAnnotation','requires','showStack','domConverter','find'];(function(_0x33dc5f,_0x391f8b){const _0x4a68bd=function(_0x2c0668){while(--_0x2c0668){_0x33dc5f['push'](_0x33dc5f['shift']());}};_0x4a68bd(++_0x391f8b);}(_0x391f,0x13e));const _0x4a68=function(_0x33dc5f,_0x391f8b){_0x33dc5f=_0x33dc5f-0x0;let _0x4a68bd=_0x391f[_0x33dc5f];return _0x4a68bd;};import{Plugin as _0x277289}from'ckeditor5/src/core';import _0x521572 from'./annotationsuis';import _0x1be3e7 from'./editorannotations';import{ContextualBalloon as _0x4b4aff}from'ckeditor5/src/ui';import{MouseObserver as _0x5a0419}from'ckeditor5/src/engine';import{CKEditorError as _0x4edebf,Rect as _0x5d4839}from'ckeditor5/src/utils';import'./../../theme/annotation-inline.css';export default class c extends _0x277289{static get[_0x4a68('0x35')](){return[_0x1be3e7,_0x4b4aff,_0x521572];}static get[_0x4a68('0x7')](){return'InlineAnnotations';}constructor(_0x2e7a96){super(_0x2e7a96),_0x2e7a96[_0x4a68('0x44')][_0x4a68('0x29')]['addObserver'](_0x5a0419),this['isAttached']=!0x1,this[_0x4a68('0x48')]('activeAnnotation',null),this['annotations']=null,this[_0x4a68('0x13')]=new Set(),this[_0x4a68('0x22')]=_0x2e7a96[_0x4a68('0x25')]['get'](_0x4b4aff),this[_0x4a68('0x1d')]=new Set(),this[_0x4a68('0x4')]=[],this['_forceRefresh']=!0x1;}['init'](){const _0xab3ba6=this[_0x4a68('0x18')][_0x4a68('0x25')]['get'](_0x521572);_0xab3ba6['context']===this[_0x4a68('0x18')]&&(_0xab3ba6[_0x4a68('0x12')](_0x4a68('0x26'),this),this[_0x4a68('0x18')][_0x4a68('0x23')][_0x4a68('0x48')]('Esc',(_0x5de5fc,_0x3805f5)=>{const _0xffb410=this['_balloon'];if(this[_0x4a68('0x2c')]&&_0xffb410[_0x4a68('0x1a')]){const _0x1e24ee=this[_0x4a68('0x2')][_0x4a68('0x19')](_0xffb410[_0x4a68('0x1a')]);_0x1e24ee&&this[_0x4a68('0x43')](_0x1e24ee),_0x3805f5();}}));}[_0x4a68('0x1b')](){const _0x3941b0=this[_0x4a68('0x18')][_0x4a68('0x25')][_0x4a68('0x46')](_0x521572);_0x3941b0['context']===this[_0x4a68('0x18')]&&(_0x3941b0[_0x4a68('0x3f')]()||_0x3941b0[_0x4a68('0x3e')]('inline'));}['setActiveAnnotation'](_0xa8bbb8){_0xa8bbb8!==this['activeAnnotation']&&(this[_0x4a68('0x2b')]&&(this[_0x4a68('0x2b')][_0x4a68('0x40')]=!0x1),_0xa8bbb8&&this['editor']['ui'][_0x4a68('0x21')][_0x4a68('0x28')]&&(this[_0x4a68('0x2')][_0x4a68('0x3c')](_0xa8bbb8)&&this[_0x4a68('0x45')](_0xa8bbb8,!0x0),_0xa8bbb8[_0x4a68('0x40')]=!0x0),_0xa8bbb8||this[_0x4a68('0x30')]([]),this['activeAnnotation']=_0xa8bbb8);}[_0x4a68('0xc')](_0x4c3d4c){this['annotations']=_0x4c3d4c;const _0x1b1b35=this['editor']['plugins']['get'](_0x521572),_0x3411bd=this[_0x4a68('0x22')];if(this[_0x4a68('0x2c')])throw new _0x4edebf('inlineannotations-attach-already-attached',this);if(_0x1b1b35['context']!==this[_0x4a68('0x18')])throw new _0x4edebf(_0x4a68('0x2f'),this);const _0x50b4bd=this['editor'][_0x4a68('0x25')][_0x4a68('0x46')](_0x1be3e7);this[_0x4a68('0x2e')](_0x50b4bd,_0x4a68('0x3b'),()=>{const _0x4d0e04=_0x50b4bd['getOrderedSelectedAnnotations']({'annotations':this[_0x4a68('0x2')],'activeAnnotation':this['activeAnnotation']});var _0x3b403f,_0x51b33f;!this['_forceRefresh']&&(_0x3b403f=_0x4d0e04,_0x51b33f=this['_selectedAnnotations'],_0x3b403f['length']===_0x51b33f[_0x4a68('0x3')]&&_0x3b403f[_0x4a68('0x9')](_0x25da34=>_0x51b33f[_0x4a68('0x1e')](_0x25da34)))||(this[_0x4a68('0x11')]=!0x1,this[_0x4a68('0x30')](_0x4d0e04),this[_0x4a68('0x34')](_0x4d0e04[0x0]||null));}),this['listenTo'](_0x50b4bd,_0x4a68('0x4a'),(_0x37f47e,{isAnnotationTracked:_0x453551})=>{this[_0x4a68('0x2b')]&&_0x453551(this[_0x4a68('0x2b')])&&(this[_0x4a68('0x30')]([]),this['setActiveAnnotation'](null));}),this[_0x4a68('0x2e')](this[_0x4a68('0x18')]['ui'][_0x4a68('0x21')],'change:isFocused',(_0x3eeca3,_0x4d55ce,_0x39a272)=>{_0x39a272||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4c3d4c,'remove',(_0x33bc4e,_0x2cbde0)=>{this[_0x4a68('0x17')](_0x2cbde0),_0x2cbde0===this[_0x4a68('0x2b')]&&this[_0x4a68('0x34')](null);}),this[_0x4a68('0x2e')](_0x3411bd,_0x4a68('0x24'),(_0xcb288d,_0x20d808,_0x419754,_0x36dbcd)=>{_0x36dbcd&&this[_0x4a68('0x16')](_0x36dbcd);const _0x57500c=_0x4c3d4c[_0x4a68('0x19')](_0x419754);_0x419754&&_0x57500c&&(this['listenTo'](_0x419754,_0x4a68('0x6'),()=>{_0x3411bd['updatePosition']();}),this[_0x4a68('0x2e')](_0x419754,_0x4a68('0x5'),()=>{this[_0x4a68('0x43')](_0x57500c),this[_0x4a68('0x18')][_0x4a68('0x44')]['view']['focus']();}),this[_0x4a68('0x2b')]!==_0x57500c&&this[_0x4a68('0x34')](_0x57500c));}),this[_0x4a68('0x2e')](this[_0x4a68('0x18')]['ui'],'update',()=>{_0x3411bd[_0x4a68('0x1a')]&&(_0x4c3d4c[_0x4a68('0x19')](_0x3411bd[_0x4a68('0x1a')])&&_0x3411bd['updatePosition']());}),this[_0x4a68('0x2e')](this[_0x4a68('0x18')]['editing'][_0x4a68('0x29')][_0x4a68('0x33')],_0x4a68('0x1c'),()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this[_0x4a68('0x18')][_0x4a68('0x44')]['view'][_0x4a68('0x33')]['selection'][_0x4a68('0xf')]&&this[_0x4a68('0x18')][_0x4a68('0x44')]['view'][_0x4a68('0x15')](),this[_0x4a68('0x2c')]=!0x0;}[_0x4a68('0x10')](){if(!this[_0x4a68('0x2c')])throw new _0x4edebf(_0x4a68('0x8'),this);this[_0x4a68('0x34')](null);for(const _0xe9c4a1 of this[_0x4a68('0x1d')])this[_0x4a68('0x17')](_0xe9c4a1);this[_0x4a68('0x16')](),this[_0x4a68('0x2c')]=!0x1,this[_0x4a68('0x2')]=null;}[_0x4a68('0xd')](){this['isAttached']&&this[_0x4a68('0x10')]();}[_0x4a68('0x30')](_0x235648){for(const _0x690a18 of this[_0x4a68('0x4')])_0x235648[_0x4a68('0x1e')](_0x690a18)||this[_0x4a68('0x13')][_0x4a68('0x1')](_0x690a18);for(const _0x3af44e of this[_0x4a68('0x2')])_0x235648['includes'](_0x3af44e)||this[_0x4a68('0x17')](_0x3af44e);if(this[_0x4a68('0x18')]['ui']['focusTracker'][_0x4a68('0x28')])for(const _0x58505a of _0x235648)this['_addAnnotationToBalloon'](_0x58505a);this[_0x4a68('0x4')]=_0x235648;}[_0x4a68('0x45')](_0x407403,_0x5cfba8=!0x1){this[_0x4a68('0x13')]['has'](_0x407403)||(this[_0x4a68('0x1d')][_0x4a68('0x3c')](_0x407403)||this[_0x4a68('0x22')][_0x4a68('0xa')](_0x407403[_0x4a68('0x29')])||(this[_0x4a68('0x1d')][_0x4a68('0x41')](_0x407403),this[_0x4a68('0x22')][_0x4a68('0x41')]({'stackId':_0x407403[_0x4a68('0x29')]['id'],'view':_0x407403['view'],'position':{'target':()=>this[_0x4a68('0x3a')](_0x407403)}})),_0x5cfba8&&this[_0x4a68('0x22')][_0x4a68('0x36')](_0x407403['view']['id']));}[_0x4a68('0x3a')](_0x402df5){const _0x111964=_0x402df5[_0x4a68('0x39')],_0x34d626=this['editor'][_0x4a68('0x44')][_0x4a68('0x29')],_0x3fea29=_0x34d626[_0x4a68('0x33')][_0x4a68('0x27')][_0x4a68('0x49')](),_0x10b4ec=_0x34d626[_0x4a68('0x37')][_0x4a68('0x20')](_0x3fea29);if(_0x10b4ec[_0x4a68('0x2d')](!0x0),_0x111964){if(_0x111964 instanceof _0x5d4839)return _0x111964;let _0x502d70=[];for(const _0x566101 of _0x111964)_0x502d70[_0x4a68('0x2a')](...(_0x2aab3a=_0x566101[_0x4a68('0x0')](),Array[_0x4a68('0x31')](_0x2aab3a)['map'](DOMRect[_0x4a68('0x1f')])));_0x502d70=function(_0x39d92a){const _0x26d9c9=[];let _0x10af80=_0x39d92a[0x0];for(let _0x2efacc=0x1;_0x2efacc<_0x39d92a['length'];_0x2efacc++)F(_0x10af80,_0x39d92a[_0x2efacc])?_0x10af80[_0x4a68('0x42')]+=_0x39d92a[_0x2efacc][_0x4a68('0x42')]:(_0x26d9c9[_0x4a68('0x2a')](_0x10af80),_0x10af80=_0x39d92a[_0x2efacc]);return _0x26d9c9[_0x4a68('0x2a')](_0x10af80),_0x26d9c9;}(_0x502d70);const _0x39b346=_0x10b4ec['getBoundingClientRect']();return _0x502d70[_0x4a68('0x38')](_0x1829ed=>_0x1829ed[_0x4a68('0x32')]<=_0x39b346[_0x4a68('0x32')]&&_0x1829ed['bottom']>=_0x39b346[_0x4a68('0x14')]&&_0x1829ed[_0x4a68('0x47')]<=_0x39b346[_0x4a68('0x47')]&&_0x1829ed[_0x4a68('0xe')]>=_0x39b346[_0x4a68('0xe')])||_0x502d70[0x0];}var _0x2aab3a;return _0x402df5[_0x4a68('0xb')]||_0x10b4ec;}['_removeAnnotationFromBalloon'](_0x1623e3){this[_0x4a68('0x1d')][_0x4a68('0x3c')](_0x1623e3)&&this[_0x4a68('0x22')][_0x4a68('0xa')](_0x1623e3[_0x4a68('0x29')])&&(this[_0x4a68('0x1d')][_0x4a68('0x1')](_0x1623e3),this[_0x4a68('0x22')][_0x4a68('0x3d')](_0x1623e3[_0x4a68('0x29')]));}['_closeAnnotation'](_0x2ff071){this['_manuallyClosed'][_0x4a68('0x41')](_0x2ff071),this[_0x4a68('0x17')](_0x2ff071);}}function F(_0x38f86d,_0x47b13e){return _0x38f86d[_0x4a68('0x32')]===_0x47b13e['top']&&_0x38f86d[_0x4a68('0x14')]===_0x47b13e[_0x4a68('0x14')]&&_0x38f86d['right']===_0x47b13e[_0x4a68('0x47')];}
23
+ const _0x29aa=['add','domConverter','context','keystrokes','update','_addedAnnotations','detach','hasActive','annotations','isFocused','getByView','editableElement','bottom','focus','_selectedAnnotations','_forceRefresh','right','delete','isAttached','change:visibleView','setActiveAnnotation','Esc','showStack','view','InlineAnnotations','pluginName','plugins','find','inlineannotations-not-allowed-with-context','visibleView','getFirstRange','editing','targetRect','includes','afterInit','_balloon','from','length','change:height','every','hasView','stopListening','editor','width','left','collapse','_addAnnotationToBalloon','isActive','has','_manuallyClosed','change:isFocused','_closeAnnotation','requires','focusTracker','get','refresh','mousedown','set','activeAnnotation','addObserver','switchTo','top','selection','inlineannotations-attach-already-attached','remove','inline','getBoundingClientRect','clear','_removeAnnotationFromBalloon','target','listenTo','document','getClientRects','register','_setSelectedAnnotations','_getBalloonTargetForAnnotation','push','updatePosition'];(function(_0x29b6df,_0x29aa63){const _0x5b265e=function(_0x4f6504){while(--_0x4f6504){_0x29b6df['push'](_0x29b6df['shift']());}};_0x5b265e(++_0x29aa63);}(_0x29aa,0x113));const _0x5b26=function(_0x29b6df,_0x29aa63){_0x29b6df=_0x29b6df-0x0;let _0x5b265e=_0x29aa[_0x29b6df];return _0x5b265e;};import{Plugin as _0x28f0fa}from'ckeditor5/src/core.js';import _0x3fb22b from'./annotationsuis.js';import _0x79915c from'./editorannotations.js';import{ContextualBalloon as _0x17c37d}from'ckeditor5/src/ui.js';import{MouseObserver as _0x31d23a}from'ckeditor5/src/engine.js';import{CKEditorError as _0xf89ff9,Rect as _0x54d489}from'ckeditor5/src/utils.js';import'./../../theme/annotation-inline.css';export default class c extends _0x28f0fa{static get[_0x5b26('0xb')](){return[_0x79915c,_0x17c37d,_0x3fb22b];}static get[_0x5b26('0x3e')](){return _0x5b26('0x3d');}constructor(_0x1625de){super(_0x1625de),_0x1625de[_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x12')](_0x31d23a),this[_0x5b26('0x37')]=!0x1,this[_0x5b26('0x10')](_0x5b26('0x11'),null),this[_0x5b26('0x2d')]=null,this[_0x5b26('0x8')]=new Set(),this[_0x5b26('0x48')]=_0x1625de[_0x5b26('0x3f')]['get'](_0x17c37d),this['_addedAnnotations']=new Set(),this[_0x5b26('0x33')]=[],this[_0x5b26('0x34')]=!0x1;}['init'](){const _0x5829b6=this[_0x5b26('0x1')][_0x5b26('0x3f')]['get'](_0x3fb22b);_0x5829b6[_0x5b26('0x27')]===this[_0x5b26('0x1')]&&(_0x5829b6[_0x5b26('0x20')](_0x5b26('0x18'),this),this[_0x5b26('0x1')][_0x5b26('0x28')][_0x5b26('0x10')](_0x5b26('0x3a'),(_0x408e4a,_0x5a40d7)=>{const _0x5bd676=this['_balloon'];if(this[_0x5b26('0x37')]&&_0x5bd676[_0x5b26('0x42')]){const _0x5d7fb4=this['annotations'][_0x5b26('0x2f')](_0x5bd676['visibleView']);_0x5d7fb4&&this['_closeAnnotation'](_0x5d7fb4),_0x5a40d7();}}));}[_0x5b26('0x47')](){const _0x2f45f2=this['editor']['plugins'][_0x5b26('0xd')](_0x3fb22b);_0x2f45f2[_0x5b26('0x27')]===this['editor']&&(_0x2f45f2[_0x5b26('0x2c')]()||_0x2f45f2[_0x5b26('0x13')](_0x5b26('0x18')));}['setActiveAnnotation'](_0xaa0552){_0xaa0552!==this[_0x5b26('0x11')]&&(this['activeAnnotation']&&(this[_0x5b26('0x11')][_0x5b26('0x6')]=!0x1),_0xaa0552&&this['editor']['ui'][_0x5b26('0xc')][_0x5b26('0x2e')]&&(this[_0x5b26('0x2d')]['has'](_0xaa0552)&&this[_0x5b26('0x5')](_0xaa0552,!0x0),_0xaa0552[_0x5b26('0x6')]=!0x0),_0xaa0552||this[_0x5b26('0x21')]([]),this[_0x5b26('0x11')]=_0xaa0552);}['attach'](_0x5ad459){this[_0x5b26('0x2d')]=_0x5ad459;const _0x39edce=this[_0x5b26('0x1')][_0x5b26('0x3f')][_0x5b26('0xd')](_0x3fb22b),_0x3d4f7d=this[_0x5b26('0x48')];if(this[_0x5b26('0x37')])throw new _0xf89ff9(_0x5b26('0x16'),this);if(_0x39edce[_0x5b26('0x27')]!==this[_0x5b26('0x1')])throw new _0xf89ff9(_0x5b26('0x41'),this);const _0x18d196=this['editor'][_0x5b26('0x3f')]['get'](_0x79915c);this[_0x5b26('0x1d')](_0x18d196,_0x5b26('0xe'),()=>{const _0x4e12a6=_0x18d196['getOrderedSelectedAnnotations']({'annotations':this[_0x5b26('0x2d')],'activeAnnotation':this[_0x5b26('0x11')]});var _0x3ebf1f,_0x36dd5d;!this[_0x5b26('0x34')]&&(_0x3ebf1f=_0x4e12a6,_0x36dd5d=this[_0x5b26('0x33')],_0x3ebf1f[_0x5b26('0x4a')]===_0x36dd5d[_0x5b26('0x4a')]&&_0x3ebf1f[_0x5b26('0x4c')](_0xdf860c=>_0x36dd5d[_0x5b26('0x46')](_0xdf860c)))||(this[_0x5b26('0x34')]=!0x1,this[_0x5b26('0x21')](_0x4e12a6),this['setActiveAnnotation'](_0x4e12a6[0x0]||null));}),this['listenTo'](_0x18d196,'blur',(_0x371fdb,{isAnnotationTracked:_0x4ca3a2})=>{this[_0x5b26('0x11')]&&_0x4ca3a2(this['activeAnnotation'])&&(this[_0x5b26('0x21')]([]),this['setActiveAnnotation'](null));}),this[_0x5b26('0x1d')](this[_0x5b26('0x1')]['ui'][_0x5b26('0xc')],_0x5b26('0x9'),(_0x44f975,_0x50b1ee,_0x4b5f1b)=>{_0x4b5f1b||this['setActiveAnnotation'](null);}),this[_0x5b26('0x1d')](_0x5ad459,_0x5b26('0x17'),(_0x128f95,_0x604f2)=>{this[_0x5b26('0x1b')](_0x604f2),_0x604f2===this['activeAnnotation']&&this[_0x5b26('0x39')](null);}),this[_0x5b26('0x1d')](_0x3d4f7d,_0x5b26('0x38'),(_0x116a60,_0x57a1e8,_0x49e4d6,_0x3dd117)=>{_0x3dd117&&this['stopListening'](_0x3dd117);const _0x535bba=_0x5ad459['getByView'](_0x49e4d6);_0x49e4d6&&_0x535bba&&(this['listenTo'](_0x49e4d6,_0x5b26('0x4b'),()=>{_0x3d4f7d[_0x5b26('0x24')]();}),this['listenTo'](_0x49e4d6,_0x5b26('0x3a'),()=>{this[_0x5b26('0xa')](_0x535bba),this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x32')]();}),this[_0x5b26('0x11')]!==_0x535bba&&this[_0x5b26('0x39')](_0x535bba));}),this[_0x5b26('0x1d')](this[_0x5b26('0x1')]['ui'],_0x5b26('0x29'),()=>{_0x3d4f7d[_0x5b26('0x42')]&&(_0x5ad459['getByView'](_0x3d4f7d[_0x5b26('0x42')])&&_0x3d4f7d[_0x5b26('0x24')]());}),this[_0x5b26('0x1d')](this['editor'][_0x5b26('0x44')][_0x5b26('0x3c')]['document'],_0x5b26('0xf'),()=>{this[_0x5b26('0x34')]=!0x0,this[_0x5b26('0x8')][_0x5b26('0x1a')]();}),this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x1e')]['selection'][_0x5b26('0x30')]&&this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')][_0x5b26('0x32')](),this[_0x5b26('0x37')]=!0x0;}[_0x5b26('0x2b')](){if(!this[_0x5b26('0x37')])throw new _0xf89ff9('inlineannotations-detach-not-attached',this);this[_0x5b26('0x39')](null);for(const _0x36ebc8 of this[_0x5b26('0x2a')])this[_0x5b26('0x1b')](_0x36ebc8);this[_0x5b26('0x0')](),this['isAttached']=!0x1,this[_0x5b26('0x2d')]=null;}['destroy'](){this[_0x5b26('0x37')]&&this[_0x5b26('0x2b')]();}[_0x5b26('0x21')](_0x4e5bae){for(const _0x19cc09 of this['_selectedAnnotations'])_0x4e5bae['includes'](_0x19cc09)||this['_manuallyClosed'][_0x5b26('0x36')](_0x19cc09);for(const _0xa7ff14 of this[_0x5b26('0x2d')])_0x4e5bae['includes'](_0xa7ff14)||this[_0x5b26('0x1b')](_0xa7ff14);if(this[_0x5b26('0x1')]['ui'][_0x5b26('0xc')][_0x5b26('0x2e')])for(const _0x51df62 of _0x4e5bae)this[_0x5b26('0x5')](_0x51df62);this[_0x5b26('0x33')]=_0x4e5bae;}['_addAnnotationToBalloon'](_0x540e12,_0x4fa06c=!0x1){this[_0x5b26('0x8')][_0x5b26('0x7')](_0x540e12)||(this[_0x5b26('0x2a')][_0x5b26('0x7')](_0x540e12)||this['_balloon'][_0x5b26('0x4d')](_0x540e12['view'])||(this[_0x5b26('0x2a')][_0x5b26('0x25')](_0x540e12),this['_balloon']['add']({'stackId':_0x540e12['view']['id'],'view':_0x540e12[_0x5b26('0x3c')],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x540e12)}})),_0x4fa06c&&this['_balloon'][_0x5b26('0x3b')](_0x540e12[_0x5b26('0x3c')]['id']));}[_0x5b26('0x22')](_0x4720d3){const _0x15507b=_0x4720d3[_0x5b26('0x1c')],_0x34106d=this[_0x5b26('0x1')][_0x5b26('0x44')][_0x5b26('0x3c')],_0x41bdf3=_0x34106d['document'][_0x5b26('0x15')][_0x5b26('0x43')](),_0x419ff3=_0x34106d[_0x5b26('0x26')]['viewRangeToDom'](_0x41bdf3);if(_0x419ff3[_0x5b26('0x4')](!0x0),_0x15507b){if(_0x15507b instanceof _0x54d489)return _0x15507b;let _0x6d09c3=[];for(const _0x31ef6d of _0x15507b)_0x6d09c3[_0x5b26('0x23')](...(_0x245fae=_0x31ef6d[_0x5b26('0x1f')](),Array[_0x5b26('0x49')](_0x245fae)['map'](DOMRect['fromRect'])));_0x6d09c3=function(_0x5c8da1){const _0x497801=[];let _0x594d5e=_0x5c8da1[0x0];for(let _0x351fd5=0x1;_0x351fd5<_0x5c8da1[_0x5b26('0x4a')];_0x351fd5++)F(_0x594d5e,_0x5c8da1[_0x351fd5])?_0x594d5e[_0x5b26('0x2')]+=_0x5c8da1[_0x351fd5][_0x5b26('0x2')]:(_0x497801[_0x5b26('0x23')](_0x594d5e),_0x594d5e=_0x5c8da1[_0x351fd5]);return _0x497801[_0x5b26('0x23')](_0x594d5e),_0x497801;}(_0x6d09c3);const _0x4e9f4c=_0x419ff3[_0x5b26('0x19')]();return _0x6d09c3[_0x5b26('0x40')](_0x102802=>_0x102802[_0x5b26('0x14')]<=_0x4e9f4c[_0x5b26('0x14')]&&_0x102802[_0x5b26('0x31')]>=_0x4e9f4c[_0x5b26('0x31')]&&_0x102802[_0x5b26('0x3')]<=_0x4e9f4c[_0x5b26('0x3')]&&_0x102802[_0x5b26('0x35')]>=_0x4e9f4c['right'])||_0x6d09c3[0x0];}var _0x245fae;return _0x4720d3[_0x5b26('0x45')]||_0x419ff3;}[_0x5b26('0x1b')](_0x1ece28){this[_0x5b26('0x2a')][_0x5b26('0x7')](_0x1ece28)&&this[_0x5b26('0x48')][_0x5b26('0x4d')](_0x1ece28['view'])&&(this[_0x5b26('0x2a')]['delete'](_0x1ece28),this['_balloon'][_0x5b26('0x17')](_0x1ece28[_0x5b26('0x3c')]));}[_0x5b26('0xa')](_0x3326fa){this['_manuallyClosed'][_0x5b26('0x25')](_0x3326fa),this[_0x5b26('0x1b')](_0x3326fa);}}function F(_0x19b089,_0x2b857b){return _0x19b089['top']===_0x2b857b[_0x5b26('0x14')]&&_0x19b089[_0x5b26('0x31')]===_0x2b857b[_0x5b26('0x31')]&&_0x19b089['right']===_0x2b857b[_0x5b26('0x3')];}
@@ -2,13 +2,13 @@
2
2
  * @module comments/annotations/narrowsidebar
3
3
  * @publicApi
4
4
  */
5
- import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core';
6
- import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis';
7
- import Sidebar from './sidebar';
8
- import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui';
5
+ import { ContextPlugin, Context, type Editor } from 'ckeditor5/src/core.js';
6
+ import AnnotationsUIs, { type AnnotationsUI } from './annotationsuis.js';
7
+ import Sidebar from './sidebar.js';
8
+ import { BalloonPanelView, BodyCollection } from 'ckeditor5/src/ui.js';
9
9
  import '../../theme/sidebar-narrow.css';
10
- import type Annotation from './annotation';
11
- import type { default as AnnotationCollection } from './annotationcollection';
10
+ import type Annotation from './annotation.js';
11
+ import type { default as AnnotationCollection } from './annotationcollection.js';
12
12
  /**
13
13
  * The narrow sidebar UI for displaying annotations.
14
14
  *
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x390b=['_manuallyClosedAnnotationViews','Esc','stopPropagation','annotations','annotationType','resize','getOrderedSelectedAnnotations','contains','_destroyEditorAnnotationsIntegration','change:container','low','destroy','addEventListener','keyCode','isVisible','keydown','get','refreshPositioning','activeAnnotation','_showBalloon','_updateBalloonPosition','content','clear','addAnnotation','_annotationToNarrowView','change:height','_setSelectedAnnotations','set','_detachFromContainer','bodyCollection','values','hasDomSelection','focus','balloonPanelView','attach','context','detachFromDom','_attachListeners','execute','delete','_integrateWithEditorAnnotations','setActiveAnnotation','stopListening','high','has','northArrowSouthWest','mousedown','unpin','refresh','_refreshPositioning','requires','element','isDirty','target','getByView','listenTo','detach','narrowsidebar-attach-already-attached','ck-sidebar--narrow','southArrowNorthEast','EditorAnnotations','isAttached','length','_selectedAnnotations','editors','set:container','_hideBalloon','_domEmitter','preventClosingBalloon','view','locale','defaultPositions','uiUpdate','first','_editorAnnotations','pin','pluginName','from','add','northArrowSouth','_refreshPositioningDebounced','number','plugins','ready'];(function(_0x50303e,_0x390bbb){const _0x51261a=function(_0x5e636d){while(--_0x5e636d){_0x50303e['push'](_0x50303e['shift']());}};_0x51261a(++_0x390bbb);}(_0x390b,0x1b5));const _0x5126=function(_0x50303e,_0x390bbb){_0x50303e=_0x50303e-0x0;let _0x51261a=_0x390b[_0x50303e];return _0x51261a;};import{ContextPlugin as _0x2846b7,Context as _0x5a7a59}from'ckeditor5/src/core';import _0x3a3f61 from'./annotationsuis';import _0x37f915 from'./sidebar';import _0x10757b from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x4a6cab,BodyCollection as _0x165188}from'ckeditor5/src/ui';import{CKEditorError as _0x23077e,DomEmitterMixin as _0x5ac559,keyCodes as _0x32cf3a,Collection as _0x2547c8}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{debounce as _0x13ea55}from'lodash-es';import _0x116da8 from'./editorannotations';export default class s extends _0x2846b7{static get[_0x5126('0x21')](){return[_0x37f915,_0x3a3f61];}static get[_0x5126('0x3b')](){return'NarrowSidebar';}constructor(_0x39b71e){super(_0x39b71e),this[_0x5126('0x2c')]=!0x1,this[_0x5126('0x43')]=new Set(),this[_0x5126('0x32')]=Object['create'](_0x5ac559),this['_annotationToNarrowView']=new Map(),this[_0x5126('0xa')]('activeAnnotation',null),this[_0x5126('0x46')]=null,this[_0x5126('0x2e')]=[],this['_editorAnnotations']=new _0x2547c8(),this['_refreshPositioningDebounced']=_0x13ea55(()=>{this[_0x5126('0x20')]();},0xfa,{'leading':!0x1});}['init'](){this[_0x5126('0x12')]['plugins'][_0x5126('0x53')](_0x3a3f61)['register']('narrowSidebar',this),this[_0x5126('0xc')]=new _0x165188(this[_0x5126('0x12')][_0x5126('0x35')]),this[_0x5126('0x10')]=new _0x4a6cab(this[_0x5126('0x12')]['locale']),this[_0x5126('0xc')]['attachToDom'](),this['bodyCollection'][_0x5126('0x3d')](this['balloonPanelView']);}[_0x5126('0x11')](_0x180b22){this[_0x5126('0x46')]=_0x180b22;const _0x2b64ec=this[_0x5126('0x12')][_0x5126('0x41')][_0x5126('0x53')](_0x37f915),_0x3f0ad9=this[_0x5126('0x10')];if(_0x2b64ec['_annotations']=_0x180b22,this[_0x5126('0x2c')])throw new _0x23077e(_0x5126('0x28'),this);this['isAttached']=!0x0,this[_0x5126('0x26')](_0x2b64ec,_0x5126('0x30'),()=>{this[_0x5126('0x27')](),this['listenTo'](_0x2b64ec,_0x5126('0x4c'),_0x47bfe2=>{_0x47bfe2['off'](),this[_0x5126('0x11')](_0x180b22);});}),_0x2b64ec['_attachToContainer']({'viewClass':_0x5126('0x29'),'spaceBetweenItems':0x5});const _0x4ed55b=_0x50c753=>{const _0x1d508f=new _0x10757b(this['context'][_0x5126('0x35')]);_0x2b64ec[_0x5126('0x6')](_0x50c753,_0x1d508f),this['_annotationToNarrowView'][_0x5126('0xa')](_0x50c753,_0x1d508f),_0x1d508f['bind'](_0x5126('0x23'),_0x5126('0x47'),_0x5126('0x40'))['to'](_0x50c753[_0x5126('0x34')],_0x5126('0x23'),'type',_0x5126('0x2d')),_0x1d508f['on'](_0x5126('0x15'),()=>{this[_0x5126('0x43')][_0x5126('0x5')](),_0x3f0ad9[_0x5126('0x4')][_0x5126('0x38')]!==_0x50c753[_0x5126('0x34')]?(this[_0x5126('0x2')](_0x50c753),_0x50c753['view']['element'][_0x5126('0xf')](),this[_0x5126('0x18')](_0x50c753)):this['setActiveAnnotation'](null);});};for(const _0x57590f of _0x180b22)_0x4ed55b(_0x57590f);this[_0x5126('0x26')](_0x180b22,_0x5126('0x3d'),(_0x54ad92,_0x55bf7a)=>{_0x4ed55b(_0x55bf7a);}),this['listenTo'](_0x180b22,'remove',(_0x40d0fc,_0x434ed0,_0x57e469)=>{this[_0x5126('0x7')][_0x5126('0x53')](_0x434ed0)[_0x5126('0x4e')](),this[_0x5126('0x7')][_0x5126('0x16')](_0x434ed0),_0x2b64ec['rearrange']({'removedAnnotation':_0x434ed0,'previousAnnotation':_0x180b22[_0x5126('0x53')](_0x57e469-0x1),'nextAnnotation':_0x180b22[_0x5126('0x53')](_0x57e469+0x1)}),_0x434ed0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':_0x5126('0x4d')}),this[_0x5126('0x26')](_0x180b22,_0x5126('0xf'),(_0x53931c,_0x239ecc)=>{this['setActiveAnnotation'](_0x239ecc);}),this[_0x5126('0x26')](_0x180b22,'blur',()=>{this[_0x5126('0x18')](null);}),this[_0x5126('0x32')][_0x5126('0x26')](document,_0x5126('0x52'),(_0x1ed0ce,_0x2128ee)=>{_0x2128ee[_0x5126('0x50')]===_0x32cf3a['esc']&&_0x3f0ad9['isVisible']&&(this[_0x5126('0x43')][_0x5126('0x3d')](_0x3f0ad9[_0x5126('0x4')][_0x5126('0x38')]),this[_0x5126('0x31')](),_0x2128ee[_0x5126('0x45')](),_0x2128ee['preventDefault']());}),this[_0x5126('0x32')][_0x5126('0x26')](document,_0x5126('0x1d'),(_0x41f8fd,_0x949ee1)=>{const _0x418d29=_0x949ee1[_0x5126('0x24')];_0x3f0ad9[_0x5126('0x51')]&&_0x3f0ad9[_0x5126('0x22')]['contains'](_0x418d29)||_0x2b64ec[_0x5126('0x34')]['element']['contains'](_0x418d29)||_0x41f8fd['preventClosingBalloon']||(this[_0x5126('0x43')]['clear'](),this[_0x5126('0x31')](),this['setActiveAnnotation'](null));});const _0x471260=this[_0x5126('0x12')]instanceof _0x5a7a59?this[_0x5126('0x12')][_0x5126('0x2f')]:new _0x2547c8([this[_0x5126('0x12')]]);for(const _0x256230 of _0x471260)this[_0x5126('0x17')](_0x256230);this[_0x5126('0x26')](_0x471260,_0x5126('0x3d'),(_0x4cc023,_0x145f16)=>{this[_0x5126('0x26')](_0x145f16,_0x5126('0x42'),()=>{this[_0x5126('0x17')](_0x145f16);});}),this['listenTo'](_0x471260,'remove',(_0x16ece8,_0x2deadd)=>{_0x2deadd['plugins'][_0x5126('0x1b')](_0x5126('0x2b'))&&this[_0x5126('0x4b')](_0x2deadd[_0x5126('0x41')]['get'](_0x5126('0x2b')));}),window[_0x5126('0x4f')](_0x5126('0x48'),this[_0x5126('0x3f')]),this[_0x5126('0x20')]();}[_0x5126('0x18')](_0x1d82e7){if(_0x1d82e7===this[_0x5126('0x1')])return;const _0x24e947=this[_0x5126('0x12')]['plugins'][_0x5126('0x53')](_0x37f915);if(_0x24e947[_0x5126('0x1f')]({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1d82e7,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1d82e7)_0x24e947['getSidebarItemView'](_0x1d82e7)?this[_0x5126('0x2')](_0x1d82e7):this['_hideBalloon']();else this[_0x5126('0x31')]();this[_0x5126('0x1')]=_0x1d82e7;}['detach'](){if(!this['isAttached'])throw new _0x23077e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x342e6b=this[_0x5126('0x12')][_0x5126('0x41')][_0x5126('0x53')](_0x37f915);this[_0x5126('0x31')](),Array[_0x5126('0x3c')](this[_0x5126('0x7')][_0x5126('0xd')](),_0x2a03d0=>_0x2a03d0[_0x5126('0x4e')]()),this[_0x5126('0x7')]['clear'](),_0x342e6b[_0x5126('0xb')](this[_0x5126('0x46')]),this[_0x5126('0x19')](),this[_0x5126('0x32')][_0x5126('0x19')](),this[_0x5126('0x12')]instanceof _0x5a7a59&&this[_0x5126('0x19')](this['context'][_0x5126('0x2f')]);for(const _0x5b2447 of Array['from'](this[_0x5126('0x39')]))this[_0x5126('0x4b')](_0x5b2447);window['removeEventListener'](_0x5126('0x48'),this[_0x5126('0x3f')]),this[_0x5126('0x3f')]['cancel'](),this[_0x5126('0x2e')]=[],this[_0x5126('0x2c')]=!0x1,this[_0x5126('0x46')]=null;}[_0x5126('0x4e')](){this[_0x5126('0x2c')]&&this[_0x5126('0x27')](),this[_0x5126('0xc')][_0x5126('0x13')]();}[_0x5126('0x17')](_0x5ecb0f){const _0x33b034=_0x5ecb0f[_0x5126('0x41')][_0x5126('0x53')](_0x116da8),_0x392568=this[_0x5126('0x12')][_0x5126('0x41')][_0x5126('0x53')](_0x37f915),_0x374089=this[_0x5126('0x46')],_0x259550=this[_0x5126('0x10')],_0x38fe0d=()=>{const _0x569c17=_0x33b034[_0x5126('0x49')]({'annotations':this[_0x5126('0x46')],'activeAnnotation':this[_0x5126('0x1')]});this[_0x5126('0x9')](_0x569c17),this[_0x5126('0x18')](_0x569c17[0x0]||null);};this[_0x5126('0x26')](_0x33b034,_0x5126('0x1f'),_0x38fe0d),this['listenTo'](_0x33b034,'blur',(_0x4e7cb7,{isAnnotationTracked:_0x6f747b})=>{this[_0x5126('0x1')]&&_0x6f747b(this['activeAnnotation'])&&(this[_0x5126('0x9')]([]),this[_0x5126('0x18')](null));}),this[_0x5126('0x26')](_0x33b034,_0x5126('0x37'),()=>{this[_0x5126('0x3f')]();}),this[_0x5126('0x26')](_0x374089,'blur',_0x3f7527=>{_0x33b034[_0x5126('0xe')]()&&_0x3f7527['stop']();},{'priority':_0x5126('0x1a')}),this[_0x5126('0x26')](this['_domEmitter'],_0x5126('0x1d'),(_0x21c978,_0x21d275)=>{const _0x54770c=_0x21d275[_0x5126('0x24')];_0x259550[_0x5126('0x51')]&&_0x259550[_0x5126('0x22')][_0x5126('0x4a')](_0x54770c)||_0x392568[_0x5126('0x34')]['element'][_0x5126('0x4a')](_0x54770c)||this[_0x5126('0x1')]&&_0x33b034[_0x5126('0xe')]()&&(_0x38fe0d(),_0x21c978[_0x5126('0x33')]=!0x0);},{'priority':_0x5126('0x1a')}),this[_0x5126('0x39')][_0x5126('0x3d')](_0x33b034);}[_0x5126('0x4b')](_0xa6dd0d){_0xa6dd0d&&(this[_0x5126('0x19')](_0xa6dd0d),this['_editorAnnotations']['remove'](_0xa6dd0d));}[_0x5126('0x9')](_0x428932){for(const _0x3aa95c of this[_0x5126('0x2e')])_0x428932['includes'](_0x3aa95c)||this['_manuallyClosedAnnotationViews']['delete'](_0x3aa95c[_0x5126('0x34')]);this[_0x5126('0x2e')]=_0x428932;}[_0x5126('0x20')](){const _0x10aac8=this[_0x5126('0x10')];this[_0x5126('0x46')][_0x5126('0x0')](),_0x10aac8[_0x5126('0x51')]&&this[_0x5126('0x3')]();}[_0x5126('0x2')](_0x1126d6){if(this[_0x5126('0x43')][_0x5126('0x1b')](_0x1126d6['view']))return;const _0x519f3e=this[_0x5126('0x10')][_0x5126('0x4')][_0x5126('0x38')];_0x519f3e!==_0x1126d6[_0x5126('0x34')]?(_0x519f3e&&this['_detachListeners'](_0x519f3e),this[_0x5126('0x14')](_0x1126d6[_0x5126('0x34')]),this[_0x5126('0x10')]['content'][_0x5126('0x5')](),this[_0x5126('0x10')][_0x5126('0x4')]['add'](_0x1126d6[_0x5126('0x34')]),this[_0x5126('0x3')]()):this[_0x5126('0x3')]();}['_updateBalloonPosition'](){const _0x5546a2=this['balloonPanelView'][_0x5126('0x4')][_0x5126('0x38')],_0x65a631=_0x5546a2&&this[_0x5126('0x46')][_0x5126('0x25')](_0x5546a2);if(!_0x65a631||!this['_annotationToNarrowView'][_0x5126('0x1b')](_0x65a631))return;const _0x3e37e3=this[_0x5126('0x7')][_0x5126('0x53')](_0x65a631)[_0x5126('0x22')],_0x3418b6=function(){const _0x4598ce=_0x4a6cab[_0x5126('0x36')];return[_0x4598ce[_0x5126('0x2a')],_0x4598ce['northArrowSouthEast'],_0x4598ce['southArrowNorth'],_0x4598ce[_0x5126('0x3e')],_0x4598ce['southArrowNorthWest'],_0x4598ce[_0x5126('0x1c')]];}();this[_0x5126('0x10')][_0x5126('0x3a')]({'target':_0x3e37e3,'positions':_0x3418b6});}['_hideBalloon'](){const _0x1ba3f2=this[_0x5126('0x10')],_0x2abd38=_0x1ba3f2[_0x5126('0x4')][_0x5126('0x38')];_0x2abd38&&(this['_detachListeners'](_0x2abd38),_0x1ba3f2[_0x5126('0x1e')](),_0x1ba3f2[_0x5126('0x4')][_0x5126('0x5')]());}[_0x5126('0x14')](_0x311b5e){this[_0x5126('0x26')](_0x311b5e,_0x5126('0x8'),()=>this[_0x5126('0x3')]()),this['listenTo'](_0x311b5e,_0x5126('0x44'),(_0x32d9d9,_0x24673f)=>{this[_0x5126('0x43')][_0x5126('0x3d')](_0x311b5e),this[_0x5126('0x31')](),_0x24673f();});}['_detachListeners'](_0x3bd5e2){this['stopListening'](_0x3bd5e2);}}
23
+ const _0x7adf=['_detachFromContainer','southArrowNorth','northArrowSouth','ready','removeEventListener','detach','narrowsidebar-detach-not-attached','length','_updateBalloonPosition','stopListening','focusableElements','annotationType','contains','content','blur','attach','_manuallyClosedAnnotationViews','remove','_showBalloon','type','mousedown','delete','add','_attachListeners','_setSelectedAnnotations','high','EditorAnnotations','from','isAttached','set','northArrowSouthEast','isDirty','get','context','resize','_attachToContainer','_refreshPositioningDebounced','_annotationToNarrowView','editors','getOrderedSelectedAnnotations','keyCode','cancel','isVisible','target','init','getByView','northArrowSouthWest','register','_refreshPositioning','narrowsidebar-attach-already-attached','_editorAnnotations','bind','plugins','refresh','focus','locale','change:container','execute','_destroyEditorAnnotationsIntegration','annotations','defaultPositions','has','addAnnotation','activeAnnotation','listenTo','getSidebarItemView','keydown','first','Esc','preventDefault','preventClosingBalloon','element','low','setActiveAnnotation','balloonPanelView','narrowSidebar','ck-sidebar--narrow','_integrateWithEditorAnnotations','_selectedAnnotations','number','change:height','_domEmitter','view','southArrowNorthEast','set:container','destroy','bodyCollection','stopPropagation','_hideBalloon','_detachListeners','values','pin','_annotations','find','hasDomSelection'];(function(_0x379305,_0x7adf6a){const _0x9de2b9=function(_0x2f5d93){while(--_0x2f5d93){_0x379305['push'](_0x379305['shift']());}};_0x9de2b9(++_0x7adf6a);}(_0x7adf,0x14d));const _0x9de2=function(_0x379305,_0x7adf6a){_0x379305=_0x379305-0x0;let _0x9de2b9=_0x7adf[_0x379305];return _0x9de2b9;};import{ContextPlugin as _0x3fc041,Context as _0x1ffb9e}from'ckeditor5/src/core.js';import _0x1f5aa4 from'./annotationsuis.js';import _0x3c0dc3 from'./sidebar.js';import _0x42c2a9 from'./view/annotationcounterbuttonview.js';import{BalloonPanelView as _0x413905,BodyCollection as _0x2b3093}from'ckeditor5/src/ui.js';import{CKEditorError as _0xb1407,DomEmitterMixin as _0x4cadf5,keyCodes as _0x16f04b,Collection as _0x4f82ae}from'ckeditor5/src/utils.js';import'../../theme/sidebar-narrow.css';import{debounce as _0x17dd3f}from'lodash-es';import _0x314388 from'./editorannotations.js';export default class i extends _0x3fc041{static get['requires'](){return[_0x3c0dc3,_0x1f5aa4];}static get['pluginName'](){return'NarrowSidebar';}constructor(_0x531251){super(_0x531251),this[_0x9de2('0x4b')]=!0x1,this[_0x9de2('0x3f')]=new Set(),this[_0x9de2('0x21')]=Object['create'](_0x4cadf5),this[_0x9de2('0x54')]=new Map(),this[_0x9de2('0x4c')](_0x9de2('0xf'),null),this[_0x9de2('0xb')]=null,this[_0x9de2('0x1e')]=[],this[_0x9de2('0x2')]=new _0x4f82ae(),this['_refreshPositioningDebounced']=_0x17dd3f(()=>{this[_0x9de2('0x0')]();},0xfa,{'leading':!0x1});}[_0x9de2('0x5b')](){this[_0x9de2('0x50')][_0x9de2('0x4')][_0x9de2('0x4f')](_0x1f5aa4)[_0x9de2('0x5e')](_0x9de2('0x1b'),this),this['bodyCollection']=new _0x2b3093(this[_0x9de2('0x50')][_0x9de2('0x7')]),this[_0x9de2('0x1a')]=new _0x413905(this[_0x9de2('0x50')][_0x9de2('0x7')]),this[_0x9de2('0x26')]['attachToDom'](),this['bodyCollection'][_0x9de2('0x45')](this[_0x9de2('0x1a')]);}[_0x9de2('0x3e')](_0x1ea26a){this['annotations']=_0x1ea26a;const _0x295f26=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3),_0x2e9e48=this[_0x9de2('0x1a')];if(_0x295f26[_0x9de2('0x2c')]=_0x1ea26a,this[_0x9de2('0x4b')])throw new _0xb1407(_0x9de2('0x1'),this);this[_0x9de2('0x4b')]=!0x0,this[_0x9de2('0x10')](_0x295f26,_0x9de2('0x24'),()=>{this[_0x9de2('0x34')](),this[_0x9de2('0x10')](_0x295f26,_0x9de2('0x8'),_0x1a7ada=>{_0x1a7ada['off'](),this[_0x9de2('0x3e')](_0x1ea26a);});}),_0x295f26[_0x9de2('0x52')]({'viewClass':_0x9de2('0x1c'),'spaceBetweenItems':0x5});const _0x5826c0=_0x2ec63e=>{const _0x4266f0=new _0x42c2a9(this['context'][_0x9de2('0x7')]);_0x295f26[_0x9de2('0xe')](_0x2ec63e,_0x4266f0),this[_0x9de2('0x54')][_0x9de2('0x4c')](_0x2ec63e,_0x4266f0),_0x4266f0[_0x9de2('0x3')]('isDirty',_0x9de2('0x3a'),_0x9de2('0x1f'))['to'](_0x2ec63e[_0x9de2('0x22')],_0x9de2('0x4e'),_0x9de2('0x42'),_0x9de2('0x36')),_0x4266f0['on'](_0x9de2('0x9'),()=>{this[_0x9de2('0x3f')]['clear'](),_0x2e9e48['content'][_0x9de2('0x13')]!==_0x2ec63e[_0x9de2('0x22')]?(this[_0x9de2('0x41')](_0x2ec63e),_0x2ec63e['view'][_0x9de2('0x17')]['focus'](),this[_0x9de2('0x19')](_0x2ec63e)):this[_0x9de2('0x19')](null);});};for(const _0x5cc5c9 of _0x1ea26a)_0x5826c0(_0x5cc5c9);this[_0x9de2('0x10')](_0x1ea26a,_0x9de2('0x45'),(_0x4943cd,_0x585878)=>{_0x5826c0(_0x585878);}),this[_0x9de2('0x10')](_0x1ea26a,'remove',(_0x2523d2,_0x18ef2f,_0x273a2e)=>{this['_annotationToNarrowView'][_0x9de2('0x4f')](_0x18ef2f)['destroy'](),this[_0x9de2('0x54')][_0x9de2('0x44')](_0x18ef2f),_0x295f26['rearrange']({'removedAnnotation':_0x18ef2f,'previousAnnotation':_0x1ea26a[_0x9de2('0x4f')](_0x273a2e-0x1),'nextAnnotation':_0x1ea26a[_0x9de2('0x4f')](_0x273a2e+0x1)}),_0x18ef2f===this[_0x9de2('0xf')]&&this[_0x9de2('0x19')](null);},{'priority':_0x9de2('0x18')}),this['listenTo'](_0x1ea26a,_0x9de2('0x6'),(_0x354d90,_0x13bb46)=>{this[_0x9de2('0x19')](_0x13bb46);}),this[_0x9de2('0x10')](_0x1ea26a,_0x9de2('0x3d'),()=>{this[_0x9de2('0x19')](null);}),this['_domEmitter'][_0x9de2('0x10')](document,_0x9de2('0x12'),(_0x577a8c,_0x5a96c8)=>{_0x5a96c8[_0x9de2('0x57')]===_0x16f04b['esc']&&_0x2e9e48['isVisible']&&(this[_0x9de2('0x3f')]['add'](_0x2e9e48[_0x9de2('0x3c')][_0x9de2('0x13')]),this[_0x9de2('0x28')](),_0x5a96c8[_0x9de2('0x27')](),_0x5a96c8[_0x9de2('0x15')]());}),this[_0x9de2('0x21')]['listenTo'](document,_0x9de2('0x43'),(_0x2f5b41,_0x1b61aa)=>{const _0xefb7f2=_0x1b61aa[_0x9de2('0x5a')];_0x2e9e48[_0x9de2('0x59')]&&_0x2e9e48[_0x9de2('0x17')][_0x9de2('0x3b')](_0xefb7f2)||_0x295f26[_0x9de2('0x22')][_0x9de2('0x17')][_0x9de2('0x3b')](_0xefb7f2)||_0x2f5b41['preventClosingBalloon']||this[_0x9de2('0xf')]&&this[_0x9de2('0xf')][_0x9de2('0x39')][_0x9de2('0x2d')](_0x1c59a7=>_0x1c59a7[_0x9de2('0x3b')](_0xefb7f2))||(this['_manuallyClosedAnnotationViews']['clear'](),this[_0x9de2('0x28')](),this[_0x9de2('0x19')](null));});const _0x497e26=this['context']instanceof _0x1ffb9e?this[_0x9de2('0x50')][_0x9de2('0x55')]:new _0x4f82ae([this['context']]);for(const _0x584bd2 of _0x497e26)this['_integrateWithEditorAnnotations'](_0x584bd2);this[_0x9de2('0x10')](_0x497e26,_0x9de2('0x45'),(_0x1f9e68,_0x4a81ca)=>{this[_0x9de2('0x10')](_0x4a81ca,_0x9de2('0x32'),()=>{this[_0x9de2('0x1d')](_0x4a81ca);});}),this[_0x9de2('0x10')](_0x497e26,_0x9de2('0x40'),(_0x376aca,_0x38a3ae)=>{_0x38a3ae['plugins'][_0x9de2('0xd')](_0x9de2('0x49'))&&this['_destroyEditorAnnotationsIntegration'](_0x38a3ae[_0x9de2('0x4')][_0x9de2('0x4f')](_0x9de2('0x49')));}),window['addEventListener'](_0x9de2('0x51'),this[_0x9de2('0x53')]),this[_0x9de2('0x0')]();}['setActiveAnnotation'](_0x22ca18){if(_0x22ca18===this[_0x9de2('0xf')])return;const _0x49e114=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3);if(_0x49e114[_0x9de2('0x5')]({'blurredAnnotation':this[_0x9de2('0xf')],'activatedAnnotation':_0x22ca18,'disableAnimationOnActivatedAnnotation':!0x0}),_0x22ca18)_0x49e114[_0x9de2('0x11')](_0x22ca18)?this[_0x9de2('0x41')](_0x22ca18):this[_0x9de2('0x28')]();else this[_0x9de2('0x28')]();this[_0x9de2('0xf')]=_0x22ca18;}[_0x9de2('0x34')](){if(!this[_0x9de2('0x4b')])throw new _0xb1407(_0x9de2('0x35'),this);this[_0x9de2('0x19')](null);const _0x23df14=this[_0x9de2('0x50')][_0x9de2('0x4')]['get'](_0x3c0dc3);this[_0x9de2('0x28')](),Array[_0x9de2('0x4a')](this[_0x9de2('0x54')][_0x9de2('0x2a')](),_0x27a5f0=>_0x27a5f0[_0x9de2('0x25')]()),this[_0x9de2('0x54')]['clear'](),_0x23df14[_0x9de2('0x2f')](this[_0x9de2('0xb')]),this[_0x9de2('0x38')](),this[_0x9de2('0x21')][_0x9de2('0x38')](),this[_0x9de2('0x50')]instanceof _0x1ffb9e&&this[_0x9de2('0x38')](this[_0x9de2('0x50')][_0x9de2('0x55')]);for(const _0x57ea8a of Array[_0x9de2('0x4a')](this[_0x9de2('0x2')]))this[_0x9de2('0xa')](_0x57ea8a);window[_0x9de2('0x33')](_0x9de2('0x51'),this[_0x9de2('0x53')]),this[_0x9de2('0x53')][_0x9de2('0x58')](),this[_0x9de2('0x1e')]=[],this['isAttached']=!0x1,this[_0x9de2('0xb')]=null;}[_0x9de2('0x25')](){this[_0x9de2('0x4b')]&&this[_0x9de2('0x34')](),this[_0x9de2('0x26')]['detachFromDom']();}[_0x9de2('0x1d')](_0x4fd4c6){const _0xbb04ca=_0x4fd4c6[_0x9de2('0x4')][_0x9de2('0x4f')](_0x314388),_0x666bb4=this[_0x9de2('0x50')]['plugins'][_0x9de2('0x4f')](_0x3c0dc3),_0x330a5b=this['annotations'],_0x2e8471=this[_0x9de2('0x1a')],_0x2c6ef9=()=>{const _0x4f361c=_0xbb04ca[_0x9de2('0x56')]({'annotations':this[_0x9de2('0xb')],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4f361c),this['setActiveAnnotation'](_0x4f361c[0x0]||null);};this[_0x9de2('0x10')](_0xbb04ca,'refresh',_0x2c6ef9),this['listenTo'](_0xbb04ca,_0x9de2('0x3d'),(_0x501b3d,{isAnnotationTracked:_0x1348b9})=>{this['activeAnnotation']&&_0x1348b9(this[_0x9de2('0xf')])&&(this['_setSelectedAnnotations']([]),this[_0x9de2('0x19')](null));}),this['listenTo'](_0xbb04ca,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this[_0x9de2('0x10')](_0x330a5b,'blur',_0x45bd9d=>{_0xbb04ca['hasDomSelection']()&&_0x45bd9d['stop']();},{'priority':_0x9de2('0x48')}),this[_0x9de2('0x10')](this['_domEmitter'],_0x9de2('0x43'),(_0x5e575e,_0x1f73ed)=>{const _0xc7437b=_0x1f73ed[_0x9de2('0x5a')];_0x2e8471[_0x9de2('0x59')]&&_0x2e8471[_0x9de2('0x17')][_0x9de2('0x3b')](_0xc7437b)||_0x666bb4[_0x9de2('0x22')][_0x9de2('0x17')][_0x9de2('0x3b')](_0xc7437b)||this[_0x9de2('0xf')]&&_0xbb04ca[_0x9de2('0x2e')]()&&(_0x2c6ef9(),_0x5e575e[_0x9de2('0x16')]=!0x0);},{'priority':_0x9de2('0x48')}),this[_0x9de2('0x2')]['add'](_0xbb04ca);}[_0x9de2('0xa')](_0x286c88){_0x286c88&&(this[_0x9de2('0x38')](_0x286c88),this[_0x9de2('0x2')][_0x9de2('0x40')](_0x286c88));}[_0x9de2('0x47')](_0x44c7fe){for(const _0x41c825 of this['_selectedAnnotations'])_0x44c7fe['includes'](_0x41c825)||this[_0x9de2('0x3f')]['delete'](_0x41c825[_0x9de2('0x22')]);this[_0x9de2('0x1e')]=_0x44c7fe;}[_0x9de2('0x0')](){const _0x3fb89f=this[_0x9de2('0x1a')];this['annotations']['refreshPositioning'](),_0x3fb89f[_0x9de2('0x59')]&&this['_updateBalloonPosition']();}[_0x9de2('0x41')](_0x51d801){if(this[_0x9de2('0x3f')]['has'](_0x51d801[_0x9de2('0x22')]))return;const _0x5c0c7e=this[_0x9de2('0x1a')][_0x9de2('0x3c')][_0x9de2('0x13')];_0x5c0c7e!==_0x51d801[_0x9de2('0x22')]?(_0x5c0c7e&&this[_0x9de2('0x29')](_0x5c0c7e),this['_attachListeners'](_0x51d801[_0x9de2('0x22')]),this[_0x9de2('0x1a')][_0x9de2('0x3c')]['clear'](),this['balloonPanelView']['content']['add'](_0x51d801['view']),this['_updateBalloonPosition']()):this[_0x9de2('0x37')]();}['_updateBalloonPosition'](){const _0x3ff643=this[_0x9de2('0x1a')][_0x9de2('0x3c')][_0x9de2('0x13')],_0x59e4cf=_0x3ff643&&this[_0x9de2('0xb')][_0x9de2('0x5c')](_0x3ff643);if(!_0x59e4cf||!this[_0x9de2('0x54')][_0x9de2('0xd')](_0x59e4cf))return;const _0x345bbe=this[_0x9de2('0x54')][_0x9de2('0x4f')](_0x59e4cf)[_0x9de2('0x17')],_0x111aac=function(){const _0x5017e7=_0x413905[_0x9de2('0xc')];return[_0x5017e7[_0x9de2('0x23')],_0x5017e7[_0x9de2('0x4d')],_0x5017e7[_0x9de2('0x30')],_0x5017e7[_0x9de2('0x31')],_0x5017e7['southArrowNorthWest'],_0x5017e7[_0x9de2('0x5d')]];}();this['balloonPanelView'][_0x9de2('0x2b')]({'target':_0x345bbe,'positions':_0x111aac});}[_0x9de2('0x28')](){const _0x379dcd=this[_0x9de2('0x1a')],_0x563520=_0x379dcd[_0x9de2('0x3c')][_0x9de2('0x13')];_0x563520&&(this[_0x9de2('0x29')](_0x563520),_0x379dcd['unpin'](),_0x379dcd[_0x9de2('0x3c')]['clear']());}[_0x9de2('0x46')](_0xc109d7){this['listenTo'](_0xc109d7,_0x9de2('0x20'),()=>this[_0x9de2('0x37')]()),this[_0x9de2('0x10')](_0xc109d7,_0x9de2('0x14'),(_0x11c58f,_0x326900)=>{this[_0x9de2('0x3f')]['add'](_0xc109d7),this[_0x9de2('0x28')](),_0x326900();});}[_0x9de2('0x29')](_0x5058db){this[_0x9de2('0x38')](_0x5058db);}}