@ckeditor/ckeditor5-revision-history 0.0.0-nightly-next-20250304.0 → 0.0.0-nightly-20250305.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/LICENSE.md +1 -1
  2. package/build/revision-history.js +1 -1
  3. package/ckeditor5-metadata.json +1 -1
  4. package/dist/index.js +6 -6
  5. package/dist/translations/af.js +1 -1
  6. package/dist/translations/af.umd.js +1 -1
  7. package/dist/translations/ar.js +1 -1
  8. package/dist/translations/ar.umd.js +1 -1
  9. package/dist/translations/ast.js +1 -1
  10. package/dist/translations/ast.umd.js +1 -1
  11. package/dist/translations/az.js +1 -1
  12. package/dist/translations/az.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +11 -12
  150. package/src/changeitem.js +2 -2
  151. package/src/editor/revisionviewereditor.js +2 -2
  152. package/src/editor/revisionviewereditorui.js +1 -1
  153. package/src/editor/revisionviewereditoruiview.js +1 -1
  154. package/src/index.js +1 -1
  155. package/src/revision.js +2 -2
  156. package/src/revisiondiff.js +1 -1
  157. package/src/revisionhistory.js +1 -1
  158. package/src/revisionsrepository.js +1 -1
  159. package/src/revisiontracker.js +1 -1
  160. package/src/revisionviewer.js +1 -1
  161. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  162. package/src/ui/revision/revisionauthorview.js +1 -1
  163. package/src/ui/revision/revisionnameview.js +1 -1
  164. package/src/ui/revision/revisionview.js +2 -2
  165. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  166. package/src/ui/revision/subrevisionview.js +1 -1
  167. package/src/ui/revision/utils.js +1 -1
  168. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
  169. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  170. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  171. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  172. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  173. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  174. package/src/ui/revisionssidebar/utils.js +1 -1
  175. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  176. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  177. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  178. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  179. package/src/utils/common-translations.js +1 -1
  180. package/theme/icons/arrow-down.svg +1 -0
  181. package/theme/icons/arrow-up.svg +1 -0
  182. package/theme/icons/revision-history.svg +1 -0
  183. package/theme/icons/user.svg +1 -0
package/dist/index.js CHANGED
@@ -20,10 +20,10 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x3d781,uid as _0x4e207b,Collection as _0x8dad72,logWarning as _0x2d052d,FocusTracker as _0x539dec,KeystrokeHandler as _0x573fdc,scrollViewportToShowTarget as _0x9531a1,ResizeObserver as pt,ElementReplacer as ht,CKEditorError as _0x194013}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x22418a,set as _0x30405c,unset as _0x414922,isEqual as _0x2a48d6}from'es-toolkit/compat';import{Plugin as _0x26fb00,PendingActions as _0x5c7714,Command as _0x233339,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x134057,getMarkerDomElement as _0x12c61c,ConfirmMixin as _0x1f12de,sanitizeEditorConfig as _0x4802af}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x56f6be,Element as ut,Range as ft,ViewUIElement as _0x22652a,ViewRawElement as _0x2cbc43,ViewEmptyElement as _0x48a8b3,ViewAttributeElement as _0x30fb6c,ViewContainerElement as _0xbee4c,Position as vt,ViewText as _0xc3b70e,ViewElement as _0x42d694,DocumentFragment as gt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x5d107e,IconChevronUp as _0x1e91b5,IconChevronDown as _0x263d4b,IconUndo as _0x4f97fe,IconUser as _0x409b87,IconThreeVerticalDots as _0x3b73b4}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x5c59b1,injectCssTransitionDisabler as ts,submitHandler as _0x414a21,LabeledFieldView as at,createLabeledInputText as ti,createDropdown as _0x43bd05,ListView as _0x11f175,ListItemView as te,ButtonView as _0x1514b3,MenuBarMenuView as _0x37c1b7,MenuBarMenuListView as _0x4572c7,MenuBarMenuListItemView as _0x2e24f1,MenuBarMenuListItemButtonView as _0x1fe456,ContextualBalloon as _0x788d43,ToolbarSeparatorView as _0x33a9ee,IconView as _0x35e69b,addListToDropdown as _0x177c45,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as nt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x30cf25}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
- _0x3d781(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2b8026){super(),this['id']=_0x2b8026['id']||_0x4e207b(),this['creator']=_0x2b8026['creator']||null,this['authors']=_0x2b8026['authors']||[],this['diffData']=_0x2b8026['diffData']||null,this['toVersion']=_0x2b8026['toVersion']||0x0,this['fromVersion']=_0x2b8026['fromVersion']||0x0,this['set']('name',_0x2b8026['name']||''),this['set']('createdAt',_0x2b8026['createdAt']||new Date()),this['set']('attributes',_0x2b8026['attributes']||{});}['setName'](_0x2edc0c){this['_update']({'name':_0x2edc0c});}['setAttribute'](_0x1ca59d,_0x379dd0){const _0x23f5f9=_0x22418a(this['attributes']);_0x30405c(_0x23f5f9,_0x1ca59d,_0x379dd0),this['_update']({'attributes':_0x23f5f9});}['removeAttribute'](_0x121eff){const _0x3e67b6=_0x22418a(this['attributes']);_0x414922(_0x3e67b6,_0x121eff),this['_update']({'attributes':_0x3e67b6});}['_update'](_0x311603,_0x42cee3=!0x1){let _0x3f3e4c=!0x1;const _0x246e4f={'id':this['id']},_0xadb3c6=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x375760 of _0xadb3c6){const _0x5ea682=_0x311603[_0x375760];void 0x0!==_0x5ea682&&_0x5ea682!==this[_0x375760]&&(this[_0x375760]=_0x5ea682,_0x246e4f[_0x375760]=_0x5ea682,_0x3f3e4c=!0x0);}_0x3f3e4c&&(_0x246e4f['authors']&&(_0x246e4f['authorsIds']=_0x246e4f['authors']['map'](_0x4d12bd=>_0x4d12bd['id']),delete _0x246e4f['authors']),this['fire']('_update',_0x246e4f,_0x42cee3));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x578f62=>_0x578f62['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x26fb00{['_revisions'];static get['requires'](){return[_0x134057];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x5899b9){super(_0x5899b9),this['_revisions']=new _0x8dad72();}['afterInit'](){!async function(_0x50ac7e){const _0x53c624=_0x589049([0x72,0x79,0x58,0x6c,0x4d,0x52,0x57,0x45,0x73,0x31,0x33,0x30,0x56,0x4a,0x41,0x59,0x65,0x78,0x50,0x75,0x39,0x37,0x43,0x49,0x4b,0x77,0x4e,0x47,0x51,0x74,0x34,0x68,0x55,0x76,0x46,0x6e,0x6b,0x38,0x66,0x61,0x53,0x6f,0x36,0x64,0x44,0x70,0x6a,0x67,0x35,0x42,0x6d,0x4f,0x54,0x69,0x63,0x32,0x5a,0x48,0x7a,0x71,0x62,0x4c]),_0x2c1ce1=0xeb829,_0x3e6aae=0x5607b186,_0x5b4900=0x5600d0ae^_0x3e6aae,_0x170ba0=window[_0x589049([0x44,0x61,0x74,0x65])][_0x589049([0x6e,0x6f,0x77])](),_0x129b28=_0x50ac7e[_0x589049([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5e0ef3=new window[(_0x589049([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x55cff3=>{_0x129b28[_0x589049([0x6f,0x6e,0x63,0x65])](_0x589049([0x72,0x65,0x61,0x64,0x79]),_0x55cff3);}),_0x8efefc={[_0x589049([0x6b,0x74,0x79])]:_0x589049([0x45,0x43]),[_0x589049([0x75,0x73,0x65])]:_0x589049([0x73,0x69,0x67]),[_0x589049([0x63,0x72,0x76])]:_0x589049([0x50,0x2d,0x32,0x35,0x36]),[_0x589049([0x78])]:_0x589049([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x589049([0x79])]:_0x589049([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x589049([0x61,0x6c,0x67])]:_0x589049([0x45,0x53,0x32,0x35,0x36])},_0x54a847=_0x129b28[_0x589049([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x589049([0x67,0x65,0x74])](_0x589049([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x370610(){let _0x2aef5f,_0x491e90=null,_0x41e2b1=null;try{if(_0x54a847==_0x589049([0x47,0x50,0x4c]))return _0x589049([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2aef5f=_0x14a655(),!_0x2aef5f)return _0x589049([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2aef5f[_0x589049([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x41e2b1=_0x1ed265(_0x2aef5f[_0x589049([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2aef5f[_0x589049([0x6a,0x74,0x69])])),await _0x36bf9a()?_0x24cd4()?_0xb0d720()?_0x589049([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1aa332()?(_0x2aef5f[_0x589049([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x589049([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x491e90=_0x3c1e26(_0x589049([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2aef5f[_0x589049([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x589049([0x74,0x72,0x69,0x61,0x6c])&&(_0x491e90=_0x3c1e26(_0x589049([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x33af58()):_0x589049([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x589049([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x589049([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x22871d){return _0x589049([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xb0d720(){const _0x369a64=[_0x589049([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x589049([0x74,0x72,0x69,0x61,0x6c])][_0x589049([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2aef5f[_0x589049([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x170ba0/0x3e8:0xe10*_0x5b4900;return _0x2aef5f[_0x589049([0x65,0x78,0x70])]<_0x369a64;}function _0x24cd4(){const _0x275240=_0x2aef5f[_0x589049([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x275240)return!0x1;if(_0x275240[_0x589049([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x589049([0x2a])))return!0x0;if(_0x275240[_0x589049([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x589049([0x52,0x48])))return!0x0;if(_0x275240[_0x589049([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x589049([0x52,0x52,0x48]))){if(_0x5f220c())return!0x0;if(_0xd1450a()||_0x15d029())return!0x0;}return!0x1;}function _0x1aa332(){const _0x3158c5=_0x2aef5f[_0x589049([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3158c5||0x0==_0x3158c5[_0x589049([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5692b1}=new URL(window[_0x589049([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3158c5[_0x589049([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5692b1))return!0x0;const _0x3e2759=_0x5692b1[_0x589049([0x73,0x70,0x6c,0x69,0x74])](_0x589049([0x2e]));return _0x3158c5[_0x589049([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x244e62=>_0x244e62[_0x589049([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x589049([0x2a])))[_0x589049([0x6d,0x61,0x70])](_0x558c3d=>_0x558c3d[_0x589049([0x73,0x70,0x6c,0x69,0x74])](_0x589049([0x2e])))[_0x589049([0x73,0x6f,0x6d,0x65])](_0x4e0901=>_0x3e2759[_0x589049([0x65,0x76,0x65,0x72,0x79])]((_0x46fe01,_0xd2c1d)=>_0x4e0901[_0xd2c1d]===_0x46fe01||_0x4e0901[_0xd2c1d]===_0x589049([0x2a])));}function _0x33af58(){return _0x491e90&&_0x41e2b1?new window[(_0x589049([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x37a9ad,_0x4b9106)=>{_0x491e90[_0x589049([0x74,0x68,0x65,0x6e])](_0x37a9ad,_0x4b9106),_0x41e2b1[_0x589049([0x74,0x68,0x65,0x6e])](_0x3065bb=>{_0x3065bb!=_0x589049([0x56,0x61,0x6c,0x69,0x64])&&_0x37a9ad(_0x3065bb);},_0x4b9106);}):_0x491e90||_0x41e2b1||_0x589049([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1ed265(_0x3a0270,_0x194ddf){return new window[(_0x589049([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe34aba=>{if(_0x45c1f1())return _0xe34aba(_0x589049([0x56,0x61,0x6c,0x69,0x64]));_0x58e8c7(),_0x129b28[_0x589049([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x589049([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2b0f78=!0x1;const _0x2e04bb=_0x4e207b();function _0x54654b(_0x273a14){return!!_0x273a14&&(typeof _0x273a14===_0x589049([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x273a14===_0x589049([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x273a14[_0x589049([0x74,0x68,0x65,0x6e])]===_0x589049([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x273a14[_0x589049([0x63,0x61,0x74,0x63,0x68])]===_0x589049([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3f21b6(_0x164c87){_0x22a962(_0x164c87)[_0x589049([0x74,0x68,0x65,0x6e])](_0x4f9d69=>{if(!_0x4f9d69||_0x4f9d69[_0x589049([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x589049([0x6f,0x6b]))return _0x589049([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3d1f75(_0x243475(_0x2e04bb+_0x194ddf))!=_0x4f9d69[_0x589049([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x589049([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x589049([0x56,0x61,0x6c,0x69,0x64]);})[_0x589049([0x74,0x68,0x65,0x6e])](_0x127ba4=>(_0x1f5835(),_0x127ba4),()=>{const _0x561047=_0x264dcc();return null==_0x561047?(_0x1f5835(),_0x589049([0x56,0x61,0x6c,0x69,0x64])):_0x589049(_0x170ba0-_0x561047>(0x720b3586^_0x3e6aae)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x589049([0x74,0x68,0x65,0x6e])](_0xe34aba)[_0x589049([0x63,0x61,0x74,0x63,0x68])](()=>{_0xe34aba(_0x589049([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x53a760=0x56315f06^_0x3e6aae;function _0x1f5835(){const _0x46ec33=_0x589049([0x6c,0x6c,0x63,0x74,0x2d])+_0x3d1f75(_0x243475(_0x3a0270)),_0x2f65d7=_0xec5883(_0x3d1f75(window[_0x589049([0x4d,0x61,0x74,0x68])][_0x589049([0x63,0x65,0x69,0x6c])](_0x170ba0/_0x53a760)));window[_0x589049([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x589049([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46ec33,_0x2f65d7);}function _0x264dcc(){const _0x1d1450=_0x589049([0x6c,0x6c,0x63,0x74,0x2d])+_0x3d1f75(_0x243475(_0x3a0270)),_0x2fec16=window[_0x589049([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x589049([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1d1450);return _0x2fec16?window[_0x589049([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xec5883(_0x2fec16),0x10)*_0x53a760:null;}function _0x22a962(_0x7c3d11){return new window[(_0x589049([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x27f2bf,_0x1ca353)=>{_0x7c3d11[_0x589049([0x74,0x68,0x65,0x6e])](_0x27f2bf,_0x1ca353),window[_0x589049([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1ca353,0x56066546^_0x3e6aae);});}}_0x129b28[_0x589049([0x6f,0x6e])](_0x589049([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3edbcc,_0x3064c7)=>{if(_0x3064c7[0x0]!=_0x3a0270)return _0xe34aba(_0x589049([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3064c7[0x1]={..._0x3064c7[0x1],[_0x589049([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2e04bb};},{[_0x589049([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x589049([0x68,0x69,0x67,0x68])}),_0x129b28[_0x589049([0x6f,0x6e])](_0x589049([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x304818=>{_0x54654b(_0x304818[_0x589049([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2b0f78=!0x0,_0x3f21b6(_0x304818[_0x589049([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x589049([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x589049([0x6c,0x6f,0x77])}),_0x5e0ef3[_0x589049([0x74,0x68,0x65,0x6e])](()=>{_0x2b0f78||_0xe34aba(_0x589049([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x45c1f1(){return _0x129b28[_0x589049([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x589049([0x76,0x69,0x65,0x77])][_0x589049([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x589049([0x61,0x75,0x74,0x6f]);}function _0x58e8c7(){_0x129b28[_0x589049([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x589049([0x76,0x69,0x65,0x77])][_0x589049([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x589049([0x61,0x75,0x74,0x6f]);}}function _0x3c1e26(_0x12c55b){const _0x94759=[new window[(_0x589049([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d580d=>setTimeout(_0x3d580d,0x560e8f4a^_0x3e6aae)),_0x5e0ef3[_0x589049([0x74,0x68,0x65,0x6e])](()=>new window[(_0x589049([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa8be73=>{const _0x4fa60c=0x5607b181^_0x3e6aae,_0x4c58e1=_0x50ac7e[_0x589049([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x3cf605(){_0x4c58e1[_0x589049([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x4fa60c&&_0xa8be73();}_0x3cf605(),_0x4c58e1[_0x589049([0x6f,0x6e])](_0x589049([0x61,0x64,0x64]),_0x3cf605);})),new window[(_0x589049([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35c83f=>{function _0xc6dafa(){for(const _0x59409c in window)if(window[_0x589049([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x589049([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x59409c))&&window[_0x59409c]==_0x2c1ce1)return _0x35c83f();_0x129b28[_0x589049([0x73,0x74,0x61,0x74,0x65])]!=_0x589049([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x589049([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xc6dafa,0x5607a20e^_0x3e6aae);}_0x431f56(_0x589049([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0xc6dafa();})];return window[_0x589049([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x589049([0x72,0x61,0x63,0x65])](_0x94759)[_0x589049([0x74,0x68,0x65,0x6e])](()=>_0x12c55b);}async function _0x728bd7(){if(await _0x5e0ef3,_0x431f56(_0x589049([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x2d0a61=_0x50ac7e[_0x589049([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x173c72=_0x50ac7e[_0x589049([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x2d0a61[_0x589049([0x69,0x64])]),_0x22326e=_0x3339e8(_0x589049([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x22326e[_0x589049([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x2d0a61['id'],_0x173c72?_0x173c72['id']:null,!0x0),_0x22326e[_0x589049([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x589049([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x22326e[_0x589049([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x22326e[_0x589049([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x390d1e,void(_0x22326e[_0x589049([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x390d1e);}if(_0x431f56(_0x589049([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1bdfd3=_0x3339e8(_0x589049([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1bdfd3[_0x589049([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x589049([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1bdfd3[_0x589049([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1bdfd3[_0x589049([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x390d1e,_0x1bdfd3[_0x589049([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x390d1e;}_0x129b28[_0x589049([0x6d,0x6f,0x64,0x65,0x6c])][_0x589049([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x390d1e,_0x129b28[_0x589049([0x6d,0x6f,0x64,0x65,0x6c])][_0x589049([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x390d1e,_0x129b28[_0x589049([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x589049([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5f220c(){return _0x431f56(_0x589049([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3339e8(_0x589049([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x589049([0x73,0x74,0x61,0x74,0x65])]==_0x589049([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xd1450a(){return _0x431f56(_0x589049([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x15d029(){return _0x431f56(_0x589049([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4a759e(_0x4ee59d){const _0x2baeb6=_0xd8f7c7();_0x129b28[_0x2baeb6]=_0x589049([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4ee59d,_0x4ee59d[_0x589049([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x589049([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0xd8f7c7()]=_0x2c1ce1),_0x4ee59d!=_0x589049([0x56,0x61,0x6c,0x69,0x64])&&_0x728bd7();}function _0xd8f7c7(){const _0x3a5bf0=window[_0x589049([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x589049([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x589049([0x6e,0x6f,0x77])]())[_0x589049([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x589049([0x2e]),'');let _0x19308c=_0x589049([0x72]);for(let _0x33f349=0x0;_0x33f349<_0x3a5bf0[_0x589049([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33f349+=0x2){let _0x42d124=window[_0x589049([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a5bf0[_0x589049([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x33f349,_0x33f349+0x2));_0x42d124>=_0x53c624[_0x589049([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x42d124-=_0x53c624[_0x589049([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x19308c+=_0x53c624[_0x42d124];}return _0x19308c;}function _0x14a655(){const _0x15ccf4=_0x54a847[_0x589049([0x73,0x70,0x6c,0x69,0x74])](_0x589049([0x2e]));if(0x3!=_0x15ccf4[_0x589049([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x31b9e0(_0x15ccf4[0x1]);function _0x31b9e0(_0x4fafa6){const _0x5e8691=_0x582236(_0x4fafa6);return _0x5e8691&&_0x23a0f1()?_0x5e8691:null;function _0x23a0f1(){const _0x2b6afd=_0x5e8691[_0x589049([0x6a,0x74,0x69])],_0x4fafae=window[_0x589049([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2b6afd[_0x589049([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2b6afd[_0x589049([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x200a77={..._0x5e8691,[_0x589049([0x6a,0x74,0x69])]:_0x2b6afd[_0x589049([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2b6afd[_0x589049([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x200a77[_0x589049([0x76,0x63])],_0x243475(_0x200a77)==_0x4fafae;}}}async function _0x36bf9a(){let _0x192239=!0x0;try{const _0xca2b98=_0x54a847[_0x589049([0x73,0x70,0x6c,0x69,0x74])](_0x589049([0x2e])),[_0x5b55c0,_0x3c3d88,_0x3bb672]=_0xca2b98;return _0x4b23f6(_0x5b55c0),await _0x2912a6(_0x5b55c0,_0x3c3d88,_0x3bb672),_0x192239;}catch(_0x25b893){return!0x1;}function _0x4b23f6(_0xafc0dc){const _0xe0a168=_0x582236(_0xafc0dc);_0xe0a168&&_0xe0a168[_0x589049([0x61,0x6c,0x67])]==_0x589049([0x45,0x53,0x32,0x35,0x36])||(_0x192239=!0x1);}async function _0x2912a6(_0x372530,_0x1b476a,_0x518c1c){const _0x3d3d83=window[_0x589049([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x589049([0x66,0x72,0x6f,0x6d])](_0x235788(_0x518c1c),_0x1c3882=>_0x1c3882[_0x589049([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x380feb=new window[(_0x589049([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x589049([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x372530+_0x589049([0x2e])+_0x1b476a),_0x55b219=window[_0x589049([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x589049([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x55b219)return;const _0x4fc25d=await _0x55b219[_0x589049([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x589049([0x6a,0x77,0x6b]),_0x8efefc,{[_0x589049([0x6e,0x61,0x6d,0x65])]:_0x589049([0x45,0x43,0x44,0x53,0x41]),[_0x589049([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x589049([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x589049([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x55b219[_0x589049([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x589049([0x6e,0x61,0x6d,0x65])]:_0x589049([0x45,0x43,0x44,0x53,0x41]),[_0x589049([0x68,0x61,0x73,0x68])]:{[_0x589049([0x6e,0x61,0x6d,0x65])]:_0x589049([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4fc25d,_0x3d3d83,_0x380feb)||(_0x192239=!0x1);}}function _0x582236(_0x2da4d8){return _0x2da4d8[_0x589049([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x589049([0x65,0x79]))?JSON[_0x589049([0x70,0x61,0x72,0x73,0x65])](_0x235788(_0x2da4d8)):null;}function _0x235788(_0x4f3701){return window[_0x589049([0x61,0x74,0x6f,0x62])](_0x4f3701[_0x589049([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x589049([0x2b]))[_0x589049([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x589049([0x2f])));}function _0x243475(_0x385bb1){let _0x3518dc=0x1505;function _0x5744a8(_0x7cc53d){for(let _0x23d7fc=0x0;_0x23d7fc<_0x7cc53d[_0x589049([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x23d7fc++){const _0x5efaef=_0x7cc53d[_0x589049([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x23d7fc);_0x3518dc=(_0x3518dc<<0x5)+_0x3518dc+_0x5efaef,_0x3518dc&=_0x3518dc;}}function _0x57333e(_0x58a3c0){Array[_0x589049([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x58a3c0)?_0x58a3c0[_0x589049([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x57333e):_0x58a3c0&&typeof _0x58a3c0==_0x589049([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x589049([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x58a3c0)[_0x589049([0x73,0x6f,0x72,0x74])]()[_0x589049([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x25bb70,_0x344397])=>{_0x5744a8(_0x25bb70),_0x57333e(_0x344397);}):_0x5744a8(window[_0x589049([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x58a3c0));}return _0x57333e(_0x385bb1),_0x3518dc>>>0x0;}function _0x3d1f75(_0x2f2a93){return _0x2f2a93[_0x589049([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x589049([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x589049([0x30]));}function _0xec5883(_0x3c7ded){return _0x3c7ded[_0x589049([0x73,0x70,0x6c,0x69,0x74])]('')[_0x589049([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x589049([0x6a,0x6f,0x69,0x6e])]('');}function _0x431f56(_0x48a11a){return _0x129b28[_0x589049([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x589049([0x68,0x61,0x73])](_0x48a11a);}function _0x3339e8(_0x5c8bac){return _0x129b28[_0x589049([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x589049([0x67,0x65,0x74])](_0x5c8bac);}function _0x390d1e(){}function _0x589049(_0x426e55){return _0x426e55['map'](_0x401f8d=>String['fromCharCode'](_0x401f8d))['join']('');}_0x4a759e(await _0x370610());}(this);}['createRevision'](_0x254ea1){const _0x585a30=this['editor']['plugins']['get']('Users');return new h({'id':_0x254ea1['id'],'name':_0x254ea1['name'],'creator':_0x254ea1['creatorId']?_0x585a30['getUser'](_0x254ea1['creatorId']):null,'diffData':_0x254ea1['diffData']||_0x254ea1['data'],'authors':_0x254ea1['authorsIds']['map'](_0x196777=>_0x585a30['getUser'](_0x196777)),'createdAt':new Date(_0x254ea1['createdAt']),'attributes':_0x254ea1['attributes'],'fromVersion':_0x254ea1['fromVersion'],'toVersion':_0x254ea1['toVersion']});}['addRevision'](_0x21b310,_0x4637fe=0x0){this['_revisions']['add'](_0x21b310,_0x4637fe);}['getRevision'](_0x3eff53){return this['_revisions']['get'](_0x3eff53);}['getRevisions'](_0x20f7b7={'toJSON':!0x1}){const _0x5ac496=Array['from'](this['_revisions']);return _0x5ac496['reverse'](),_0x20f7b7['toJSON']?_0x5ac496['map'](_0x3c353e=>_0x3c353e['toJSON']()):_0x5ac496;}['getIndex'](_0x331fd1){return this['_revisions']['getIndex'](_0x331fd1);}['getEarlierVisibleRevision'](_0x5abe3f){const [,_0x1987b0]=this['getRevisionsIterator'](_0x5abe3f,{'direction':'earlier'});return _0x1987b0;}['getLaterVisibleRevision'](_0x44fcb5){const [,_0x129800]=this['getRevisionsIterator'](_0x44fcb5,{'direction':'later'});return _0x129800;}['getRevisionsInDiff'](_0x4c4a62){const _0x34bf4=[];for(const _0x2062df of this['getRevisionsIterator'](_0x4c4a62['newRevisionId']))if(_0x34bf4['push'](_0x2062df),_0x2062df['id']===_0x4c4a62['oldRevisionId'])break;return _0x34bf4;}*['getRevisionsIterator'](_0x4dbbe7,{direction:_0x5542c9='earlier',filter:_0x187944=()=>!0x0}={}){const _0x4ee7c5='earlier'===_0x5542c9?0x1:-0x1;let _0x5b3828=this['_revisions']['get'](_0x4dbbe7),_0x493151=this['getIndex'](_0x5b3828);for(yield _0x5b3828;_0x5b3828;){if(_0x493151+=_0x4ee7c5,_0x5b3828=this['getRevision'](_0x493151),!_0x5b3828)return;_0x187944(_0x5b3828)&&(yield _0x5b3828);}}}function m(_0x157206,_0x3da559,_0x384365){const t=_0x157206['t'];switch(_0x3da559){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0x384365);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x384365);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const E={'c':_0xbee4c,'a':_0x30fb6c,'e':_0x48a8b3,'r':_0x2cbc43,'u':_0x22652a};class u extends _0x26fb00{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x134057,j,_0x5c7714];}constructor(_0x285c40){super(_0x285c40),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x341f6d=_0x4e207b();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x341f6d},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x3cfc35=this['repository']['getRevision'](0x0),_0xc7a458=_0x3cfc35&&null===_0x3cfc35['creator']?_0x3cfc35:null;if(this['_continueCurrentRevision']=!!_0xc7a458&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x7861cf=this['_source']['getCurrentRevisionId'](),_0x164dce=this['repository']['getRevision'](_0x7861cf);if(_0x164dce)this['_startingVersion']=_0x164dce['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1b0274=this['_source']['history']['_operations']['find'](_0xa5aa02=>!_0xa5aa02['_isInit']),_0x137d31=_0x1b0274?_0x1b0274['baseVersion']:this['_source']['history']['version'];_0x3cfc35?(_0x3cfc35['toVersion']<_0x137d31&&_0x3cfc35['_update']({'toVersion':_0x137d31}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xc7a458['id'],this['_startingVersion']=_0xc7a458['fromVersion']):(this['_startingVersion']=_0x3cfc35['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x137d31,this['_continueCurrentRevision']=!0x1);}}else _0xc7a458&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xc7a458['toVersion'],this['editor']['model']['document']['history']['version']),_0xc7a458['fromVersion']===_0xc7a458['toVersion']?(0x0!==_0xc7a458['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xc7a458['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xc7a458['id'],this['_startingVersion']=_0xc7a458['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x7f9c83=>!_0x7f9c83),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2b4f3a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1c6311;for(const _0x71ec2a in _0x2b4f3a){const _0xce1b37=_0x71ec2a,_0x48c5e3=_0x2b4f3a[_0xce1b37];if('revisionHistoryLicenseKeyValid'==_0x48c5e3||'revisionHistoryLicenseKeyInvalid'==_0x48c5e3||'revisionHistoryLicenseKeyExpired'==_0x48c5e3||'revisionHistoryLicenseKeyDomainLimit'==_0x48c5e3||'revisionHistoryLicenseKeyNotAllowed'==_0x48c5e3||'revisionHistoryLicenseKeyEvaluationLimit'==_0x48c5e3||'revisionHistoryLicenseKeyTrialLimit'==_0x48c5e3||'revisionHistoryLicenseKeyUsageLimit'==_0x48c5e3){delete _0x2b4f3a[_0xce1b37],_0x1c6311=_0x48c5e3,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x1c6311&&_0x2b4f3a['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x1c6311&&_0x2b4f3a['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x1c6311&&_0x2b4f3a['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x1c6311&&_0x2b4f3a['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x1c6311&&_0x2b4f3a['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x1c6311&&_0x2b4f3a['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x1c6311&&_0x2b4f3a['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x11a6b5=this['repository']['getRevision'](0x0),_0x18e6a7=await this['getRevisionDocumentData'](_0x11a6b5),_0x27ed17=await this['getRevisionRootsAttributes'](_0x11a6b5);this['_replaceEditorDataWithRevisionData'](_0x18e6a7,_0x27ed17);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x12997c){this['_source']=_0x12997c;}async['update'](){const _0x176801=await this['_source']['getLatestVersion']();if(_0x176801>this['currentRevision']['toVersion']){await this['_loadState']();const _0x39f318=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x176801});_0x39f318['authors']=_0x39f318['authorsIds']['map'](_0x583569=>this['editor']['plugins']['get']('Users')['getUser'](_0x583569)),this['currentRevision']['_update'](_0x39f318);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x423a60={},_0x371c46=null){const _0x5731e3=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x371c46>this['currentRevision']['toVersion']&&(_0x371c46=null),null===_0x371c46&&(_0x371c46=await this['_source']['getLatestVersion']());const _0x3923c0=this['_getFromVersion'](_0x371c46),_0x2d7f77=this['buildRevisionData']({'from':_0x3923c0,'to':_0x371c46});if(this['currentRevision']['toVersion']<_0x371c46){const _0x4815f7=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x371c46,'to':_0x371c46});_0x4815f7['authors']=[],_0x4815f7['authorsIds']=[],_0x4815f7['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4815f7,!0x0),delete _0x4815f7['authors'],_0x5731e3['push'](_0x4815f7);}_0x423a60['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x423a60['name']=_0x423a60['name']||null,_0x423a60['id']=_0x423a60['id']||_0x4e207b(),_0x423a60={..._0x423a60,..._0x2d7f77};const _0x352508=this['addRevisionData'](_0x423a60);_0x5731e3['push'](_0x423a60);const _0x477c60=this['repository']['getIndex'](_0x352508);if(0x0!==_0x477c60){const _0x958769=this['repository']['getRevision'](_0x477c60-0x1);if(_0x958769['fromVersion']!==_0x371c46){const _0x45d20c=this['_revisionDataBuilder']['getData'](_0x371c46,_0x958769['toVersion']),_0x3e1860={'id':_0x958769['id'],'diffData':_0x45d20c['diffData'],'authorsIds':_0x45d20c['authorsIds'],'authors':_0x45d20c['authorsIds']['map'](_0x3cc419=>this['editor']['plugins']['get']('Users')['getUser'](_0x3cc419)),'fromVersion':_0x371c46};_0x958769===this['currentRevision']&&(_0x3e1860['createdAt']=new Date(_0x423a60['createdAt']['getTime']()+0xa)),_0x958769['_update'](_0x3e1860,!0x0),delete _0x3e1860['authors'],_0x5731e3['push'](_0x3e1860);}}if(this['adapter']){for(const _0x4b4729 of _0x5731e3)this['_bufferUpdate'](_0x4b4729['id'],_0x4b4729,!0x0);this['sendBufferedUpdates']();}return _0x352508;}['addRevisionData'](_0x3feb61){const _0x2dc59c=this['repository']['createRevision'](_0x3feb61);return this['adapter']&&_0x2dc59c['on']('_update',(_0x12b599,_0x236818,_0x2ab786)=>{_0x2ab786||(this['_bufferUpdate'](_0x236818['id'],_0x236818,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x2dc59c,this['_findInsertionIndex'](_0x2dc59c)),_0x2dc59c;}async['getRevisionDocumentData'](_0x385913){await this['_loadRevisionData'](_0x385913);const _0x27be4e={};for(const _0x483513 in _0x385913['diffData']){if(_0x385913['diffData'][_0x483513]['attachChange']&&!_0x385913['diffData'][_0x483513]['attachChange']['isAttached'])continue;const _0x5c762b=this['_removeRevisionMarkers'](JSON['parse'](_0x385913['diffData'][_0x483513]['insertions'])),_0x46942a=this['editor']['editing']['view']['document'],_0x1336f6=new _0x56f6be(_0x46942a,_0x5c762b['map'](_0x4c101b=>P(_0x4c101b,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x27be4e[_0x483513]=this['editor']['data']['processor']['toData'](_0x1336f6),this['editor']['data']['processor']['useFillerType']('default');}return _0x27be4e;}async['getRevisionRootsAttributes'](_0x2a1f38){await this['_loadRevisionData'](_0x2a1f38);const _0x5df0ff={};for(const _0x3b8b1a in _0x2a1f38['diffData'])_0x2a1f38['diffData'][_0x3b8b1a]['attachChange']&&!_0x2a1f38['diffData'][_0x3b8b1a]['attachChange']['isAttached']||(_0x5df0ff[_0x3b8b1a]=_0x2a1f38['diffData'][_0x3b8b1a]['attributesAfter']||{});return _0x5df0ff;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0xfc0010=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x557f62=0x0;_0x557f62<_0xfc0010['length'];_0x557f62++){const _0x1d9b80=_0xfc0010[_0x557f62];let _0x1a3540=!0x1;for(const _0x3d2be4 of Object['keys'](_0x1d9b80))void 0x0===_0x1d9b80[_0x3d2be4]?delete _0x1d9b80[_0x3d2be4]:'id'!==_0x3d2be4&&(_0x1a3540=!0x0);_0x1a3540||(_0xfc0010[_0x557f62]=null);}if(_0xfc0010=_0xfc0010['filter'](_0x2733b3=>null!==_0x2733b3),!_0xfc0010['length'])return;for(let _0x1e9215=0x0;_0x1e9215<_0xfc0010['length'];_0x1e9215++){const _0x5ee0df=_0xfc0010[_0x1e9215];void 0x0!==_0x5ee0df['fromVersion']&&void 0x0===_0x5ee0df['toVersion']&&(_0x5ee0df['toVersion']=this['repository']['getRevision'](_0x5ee0df['id'])['toVersion']),void 0x0!==_0x5ee0df['toVersion']&&void 0x0===_0x5ee0df['fromVersion']&&(_0x5ee0df['fromVersion']=this['repository']['getRevision'](_0x5ee0df['id'])['fromVersion']);}const _0x17cf6b=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0xfc0010,_0x17cf6b)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4eb873=>{if(_0x4eb873){for(const _0x18c980 of _0x4eb873)this['setRevisionData']({'id':_0x18c980['id'],'createdAt':_0x18c980['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x393cbe,_0x1bd9d2){let _0x318356=this['editor']['config']['get']('initialData'),_0x394cf3=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x318356){_0x318356={};for(const _0x1261b8 of this['editor']['model']['document']['getRootNames']())_0x318356[_0x1261b8]='';}if('string'==typeof _0x318356&&(_0x318356={'main':_0x318356}),void 0x0===_0x394cf3){_0x394cf3={};for(const _0x267735 of this['editor']['model']['document']['getRootNames']())_0x394cf3[_0x267735]={};}let _0x5a6baf=!0x1;const _0x48490c=Object['keys'](_0x318356),_0x1c29ba=Object['keys'](_0x393cbe);for(const _0xdab985 of _0x48490c){if(_0x318356[_0xdab985]!==_0x393cbe[_0xdab985]&&''!==_0x318356[_0xdab985]['trim']()){_0x5a6baf=!0x0;break;}if(!_0x2a48d6(_0x394cf3[_0xdab985],_0x1bd9d2[_0xdab985])&&Object['keys'](_0x394cf3[_0xdab985])['length']>0x0){_0x5a6baf=!0x0;break;}}_0x5a6baf||(_0x5a6baf=_0x1c29ba['some'](_0x5cb8e0=>!this['editor']['model']['document']['getRoot'](_0x5cb8e0))),_0x5a6baf&&_0x2d052d('editor-initial-data-replaced-with-revision-data',{'editorData':_0x318356,'editorRootsAttributes':_0x394cf3,'revisionData':_0x393cbe,'revisionRootsAttributes':_0x1bd9d2}),this['editor']['config']['set']('initialData',_0x393cbe),this['editor']['config']['set']('rootsAttributes',_0x1bd9d2);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x67014e=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x67014e['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x30c093){const _0x50fec8=this['repository']['getRevisions']();_0x50fec8['reverse']();let _0x280b1d=0x0;for(;_0x280b1d<_0x50fec8['length'];){const _0x1f6a55=_0x50fec8[_0x280b1d];if(_0x1f6a55===this['currentRevision']){_0x280b1d++;continue;}if(_0x1f6a55['id']===this['_initialRevisionId'])break;const _0x328b57=_0x30c093['toVersion']-_0x1f6a55['toVersion']||_0x30c093['fromVersion']-_0x1f6a55['fromVersion'];if(_0x328b57>0x0)break;if(_0x328b57<0x0)_0x280b1d++;else{if(!_0x30c093['creator']&&_0x1f6a55['creator'])break;if(_0x1f6a55['creator']||!_0x30c093['creator']){if(_0x30c093['createdAt']>_0x1f6a55['createdAt'])break;_0x280b1d++;}else _0x280b1d++;}}return _0x280b1d;}['setRevisionData'](_0x5247e4){const _0x53eaac=this['repository']['getRevision'](_0x5247e4['id']);if(_0x5247e4['createdAt']&&(_0x5247e4['createdAt']=new Date(_0x5247e4['createdAt'])),_0x5247e4['authorsIds']){const _0x7e0936=this['editor']['plugins']['get']('Users');_0x5247e4['authors']=_0x5247e4['authorsIds']['map'](_0x1d6544=>_0x7e0936['getUser'](_0x1d6544));}_0x53eaac['_update'](_0x5247e4,!0x0);}['buildRevisionData']({revision:_0x243a10=null,from:_0x342cdc=null,to:_0x5e1c0b=null}){_0x342cdc=null!==_0x342cdc?_0x342cdc:_0x243a10['fromVersion'],_0x5e1c0b=null!==_0x5e1c0b?_0x5e1c0b:_0x243a10['toVersion'];const _0x1daa2d=this['_revisionDataBuilder']['getData'](_0x342cdc,_0x5e1c0b),_0x11ecf5={'diffData':_0x1daa2d['diffData'],'authorsIds':_0x1daa2d['authorsIds'],'fromVersion':_0x342cdc,'toVersion':_0x5e1c0b};if(!_0x243a10||_0x5e1c0b!==_0x243a10['toVersion']){const _0x543bb1=_0x5e1c0b-0x1,_0x8fd6b6=this['_source']['history']['getOperation'](_0x543bb1);_0x11ecf5['createdAt']=_0x8fd6b6&&_0x8fd6b6['createdAt']||new Date();}if(this['_loadedStateData']&&_0x342cdc===this['_loadedStateData']['fromVersion']){for(const _0x27b99e of this['_loadedStateData']['authors'])_0x11ecf5['authorsIds']['includes'](_0x27b99e['id'])||_0x11ecf5['authorsIds']['push'](_0x27b99e['id']);}return _0x11ecf5;}['_loadRevisionData'](_0x10d0a1){if(!_0x10d0a1||_0x10d0a1['diffData'])return Promise['resolve']();{const _0x17dc88=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x17dc88,'revisionId':_0x10d0a1['id']})['then'](_0x11ae17=>{_0x10d0a1['diffData']=_0x11ae17['diffData'];});}}['_bufferUpdate'](_0x4eb568,_0x309f33,_0x34a89b){if(this['_bufferedUpdates']['has'](_0x4eb568)){const _0x2fa0e6=this['_bufferedUpdates']['get'](_0x4eb568);_0x309f33=_0x34a89b?{..._0x2fa0e6,..._0x309f33}:{..._0x309f33,..._0x2fa0e6};}this['_bufferedUpdates']['set'](_0x4eb568,_0x309f33);}['_getFromVersion'](_0x581fe7){const _0x41ecd1=this['repository']['getRevisions']();_0x41ecd1['reverse'](),_0x41ecd1['shift']();const _0x50951e=_0x41ecd1['find'](_0x386868=>_0x386868['toVersion']<=_0x581fe7)['toVersion'];return _0x50951e<this['_startingVersion']?this['_startingVersion']:_0x50951e;}['_createInitialRevision'](_0x533d87){const _0x92ecc=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x92ecc)this['_initialRevisionId']=_0x92ecc['id'];else{const _0x21b3ae=!this['editor']['model']['document']['roots']['find'](_0xc3376=>this['editor']['model']['hasContent'](_0xc3376)),_0x47a713=this['editor']['plugins']['get']('Users')['me']['id'],_0x388187=m(this['editor']['locale'],_0x21b3ae?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x533d87,'to':_0x533d87,'id':this['_initialRevisionId'],'name':_0x388187,'creatorId':_0x47a713});}}['_createCurrentRevision'](_0x2368e5){const _0x2e7202=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2e7202),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2368e5,'to':_0x2368e5,'id':_0x2e7202,'name':'','creatorId':null}));}['_makeRevision']({name:_0x339b61,from:_0x4040f6,to:_0x56fa37,creatorId:_0x1b508b,id:_0x58587f}){const _0x3acf75=this['buildRevisionData']({'from':_0x4040f6,'to':_0x56fa37});_0x3acf75['name']=_0x339b61,_0x3acf75['creatorId']=_0x1b508b,_0x3acf75['id']=_0x58587f;const _0x46b999=this['addRevisionData'](_0x3acf75);return this['adapter']&&this['_bufferUpdate'](_0x3acf75['id'],_0x3acf75,!0x0),_0x46b999;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x3825d7){return(_0x3825d7=_0x3825d7['filter'](_0x248a13=>!_0x248a13['name']||'revision-start'!==_0x248a13['name']&&'revision-end'!==_0x248a13['name']))['forEach'](_0x127a83=>{'string'!=typeof _0x127a83&&(_0x127a83['children']=this['_removeRevisionMarkers'](_0x127a83['children']),_0x127a83['attributes']=_0x127a83['attributes']['filter'](_0x48c52e=>!_0x48c52e[0x0]['startsWith']('data-revision-')));}),_0x3825d7;}}function P(_0x29c4b3,_0x5ed2b2){const _0x570938=_0x5ed2b2['editing']['view']['document'];if('string'==typeof _0x29c4b3)return new _0xc3b70e(_0x570938,_0x29c4b3);{const _0x3dc7d9=_0x29c4b3['children']['map'](_0x43be3c=>P(_0x43be3c,_0x5ed2b2));return new(E[_0x29c4b3['type']]||_0x42d694)(_0x570938,_0x29c4b3['name'],_0x29c4b3['attributes'],_0x3dc7d9);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x15e904){this['editor']=_0x15e904,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0x4b21f6){this['source']=_0x4b21f6;const _0x44cedd=new Map(),_0x3722d=new Map(),_0x3253eb=this['editor']['model']['document']['roots']['map'](_0x565249=>_0x565249['rootName']);for(const _0xb8bc4 of _0x3253eb){const _0x30d068=this['editor']['model']['document']['getRoot'](_0xb8bc4),_0x114b45=T(_0x30d068);_0x44cedd['set'](_0xb8bc4,_0x114b45),_0x3722d['set'](_0xb8bc4,Object['fromEntries'](_0x30d068['getAttributes']()));}const _0x4b9e91=Array['from'](this['editor']['model']['markers'])['map'](_0x2a01cf=>[_0x2a01cf['name'],_0x2a01cf['getRange']()]),_0xe335c5=this['source']['version'];this['_saveMetaData'](_0xe335c5,_0x44cedd,_0x4b9e91,_0x3722d),this['_startingRevisionId']=this['_revisionId'];const _0x38d0f6=new Map(),_0x534dc2=new Map();for(const _0x46463e of _0x3253eb){const _0x1731ae=F(_0x46463e);_0x38d0f6['set'](_0x46463e,_0x1731ae),_0x534dc2['set'](_0x46463e,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x38d0f6,[],_0x534dc2);}['getData'](_0x4f98e8,_0x3a832d){if(this['_lastFrom']===_0x4f98e8&&this['_lastTo']<=_0x3a832d)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3a832d,!0x0);else{if(!this['_savedMetaData']['has'](_0x4f98e8)){const _0x33895b=this['_getPreviousFrom'](_0x4f98e8);this['_calculateMetaData'](_0x33895b,_0x4f98e8,!0x1);}this['_calculateMetaData'](_0x4f98e8,_0x3a832d,!0x0);}return this['_lastFrom']=_0x4f98e8,this['_lastTo']=_0x3a832d,this['_getState']();}['loadState'](_0x264f2b){this['_reset'](),this['_lastFrom']=_0x264f2b['fromVersion'],this['_lastTo']=_0x264f2b['toVersion'];for(const _0x33e8d5 in _0x264f2b['diffData']){const _0xf04ee5=_0x264f2b['diffData'][_0x33e8d5]['attachChange'],_0x380287=_0x22418a(_0x264f2b['diffData'][_0x33e8d5]['attributesBefore'])||{},_0x12b967=this['_makeModelFromViewString'](_0x264f2b['diffData'][_0x33e8d5]['deletions']);_0x12b967['rootName']=_0x33e8d5,_0x12b967['_isAttached']=!_0xf04ee5||!_0xf04ee5['isAttached'],_0x12b967['isAttached']=()=>_0x12b967['_isAttached'],this['_baseRoots']['set'](_0x33e8d5,_0x12b967),this['_baseRootsAttributes']['set'](_0x33e8d5,_0x380287),_0xf04ee5&&this['_touchedRoots']['set'](_0x33e8d5,_0xf04ee5);const _0x111eca=this['_makeIdsRoot'](_0x12b967);this['_baseIdsRoots']['set'](_0x33e8d5,_0x111eca);for(const [_0x53abb6,_0x5c0b43]of _0x12b967['markers']){if(!_0x53abb6['startsWith']('revision:'))continue;const _0xeec38f=_0x53abb6['split'](':')[0x2];for(const _0x13baed of _0x5c0b43['getWalker']({'singleCharacters':!0x0})){const _0x33eb12=this['_getVidAttributeName'](_0x13baed),_0xf7fbbf='elementEnd'==_0x13baed['type']?_0x13baed['previousPosition']['path']['slice'](0x0,-0x1):_0x13baed['previousPosition']['path'],_0x13b985=_0x111eca['getNodeByPath'](_0xf7fbbf)['getAttribute'](_0x33eb12);this['_touched']['set'](_0x13b985,{'userId':_0xeec38f});}}}this['_startingRevisionId']=this['_revisionId'];const _0x49b19e=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x409c7c=>!this['_touched']['has'](_0x409c7c));let _0x313b85=0x0;const _0x2dede7=new Map();for(const _0x4e9c09 in _0x264f2b['diffData']){const _0x529111=_0x264f2b['diffData'][_0x4e9c09]['attachChange'],_0x3d13a8=_0x22418a(_0x264f2b['diffData'][_0x4e9c09]['attributesAfter'])||{},_0x37d48b=this['_makeModelFromViewString'](_0x264f2b['diffData'][_0x4e9c09]['insertions']);_0x37d48b['rootName']=_0x4e9c09,_0x37d48b['_isAttached']=!_0x529111||_0x529111['isAttached'],_0x37d48b['isAttached']=()=>_0x37d48b['_isAttached'],this['_diffRoots']['set'](_0x4e9c09,_0x37d48b),this['_diffRootsAttributes']['set'](_0x4e9c09,_0x3d13a8);const _0x5800e7=this['_makeIdsRoot'](_0x37d48b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x4e9c09,_0x5800e7),_0x2dede7['set'](_0x4e9c09,_0x37d48b['isAttached']()?_0x3d13a8:{});for(const [_0x30886a,_0x99975f]of _0x37d48b['markers']){if(!_0x30886a['startsWith']('revision:'))continue;const _0x113bc4=_0x30886a['split'](':')[0x2];for(const _0x2eb5d3 of _0x99975f['getWalker']({'singleCharacters':!0x0})){const _0x23e8d8=this['_getVidAttributeName'](_0x2eb5d3),_0x5c688f=this['_revisionId']++,_0x3f9a67='elementEnd'==_0x2eb5d3['type']?_0x2eb5d3['previousPosition']['path']['slice'](0x0,-0x1):_0x2eb5d3['previousPosition']['path'];_0x5800e7['getNodeByPath'](_0x3f9a67)['_setAttribute'](_0x23e8d8,_0x5c688f),this['_touched']['set'](_0x5c688f,{'userId':_0x113bc4});}}for(const _0x2e709f of this['editor']['model']['createRangeIn'](_0x37d48b)['getWalker']({'singleCharacters':!0x0})){const _0xf33ce6=this['_getVidAttributeName'](_0x2e709f),_0x1cd5d6='elementEnd'==_0x2e709f['type']?_0x2e709f['previousPosition']['path']['slice'](0x0,-0x1):_0x2e709f['previousPosition']['path'],_0x395b4a=_0x5800e7['getNodeByPath'](_0x1cd5d6);_0x395b4a['getAttribute'](_0xf33ce6)>0x0||_0x395b4a['_setAttribute'](_0xf33ce6,_0x49b19e[_0x313b85++]);}for(const [_0x3c2136,_0x400c20]of _0x37d48b['markers'])_0x3c2136['startsWith']('revision:')||this['_markers']['set'](_0x3c2136,_0x400c20);}const _0x33bbb9=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x33bbb9),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x33bbb9,0x1));const _0x1b4730=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x1b4730),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1b4730,0x1));const _0x4b2f90=Array['from'](this['_diffRoots'])['map'](([_0x544c2f,_0x544dbd])=>[_0x544c2f,T(_0x544dbd)]);this['_saveMetaData'](this['_lastTo'],_0x4b2f90,this['_markers'],_0x2dede7);}['_makeModelFromViewString'](_0x2cbc41){const _0xd3a858=JSON['parse'](_0x2cbc41),_0x1bf622=this['editor']['editing']['view']['document'],_0x52cbe3=new _0x56f6be(_0x1bf622,_0xd3a858['map'](_0x28c1a2=>P(_0x28c1a2,this['editor'])));return this['editor']['data']['toModel'](_0x52cbe3);}['_saveMetaData'](_0xcf872e,_0x2d1b3f,_0x123cd4,_0xbbc583){const _0x4eb030=new Map(_0x2d1b3f),_0x6acce1=new Map(_0x22418a(_0xbbc583)),_0x92687b=new Map();for(const [_0x1661ec,_0x3d1a3f]of _0x123cd4)_0x92687b['set'](_0x1661ec,{'start':_0x3d1a3f['start']['clone'](),'end':_0x3d1a3f['end']['clone'](),'rootName':_0x3d1a3f['root']['rootName']});this['_savedMetaData']['set'](_0xcf872e,{'roots':_0x4eb030,'markers':_0x92687b,'rootsAttributes':_0x6acce1});}['_removeMetaData'](_0x5c9e83){this['_savedMetaData']['delete'](_0x5c9e83);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x14915c,_0x2925d9=null){let _0x434fc7=null;_0x14915c['is']('documentFragment')||(_0x434fc7=new ut(_0x14915c['name'],{'vid_start':null===_0x2925d9?this['_revisionId']++:_0x2925d9++}));const _0x4f65d8=[];for(const _0x25252b of _0x14915c['getChildren']())if(_0x25252b['is']('element')){_0x4f65d8['push'](this['_makeIdsRoot'](_0x25252b,_0x2925d9));const _0x35896a=_0x4f65d8[_0x4f65d8['length']-0x1];null!==_0x2925d9&&(_0x2925d9=_0x35896a['is']('element','$text')?_0x35896a['getAttribute']('vid')+0x1:_0x35896a['getAttribute']('vid_end')+0x1);}else{for(let _0x92c502=0x0;_0x92c502<_0x25252b['offsetSize'];_0x92c502++)_0x4f65d8['push'](new ut('$text',{'vid':null===_0x2925d9?this['_revisionId']++:_0x2925d9++}));}if(_0x14915c['is']('documentFragment')){const _0x5b4e97=F(_0x14915c['rootName']);return _0x5b4e97['_insertChild'](0x0,_0x4f65d8),_0x5b4e97;}return _0x434fc7['_setAttribute']('vid_end',null===_0x2925d9?this['_revisionId']++:_0x2925d9++),_0x434fc7['_insertChild'](0x0,_0x4f65d8),_0x434fc7;}['_calculateMetaData'](_0x19503a,_0x3d2404,_0x52e389){this['_reset']();const {roots:_0x522832,markers:_0x1d07da,rootsAttributes:_0x3740d5}=this['_savedMetaData']['get'](_0x19503a);this['_baseRoots']=new Map(_0x522832),this['_baseRootsAttributes']=new Map(_0x22418a(_0x3740d5));for(const [_0x19f23c,_0x14ecc0]of this['_baseRoots'])if('$graveyard'!==_0x19f23c&&(this['_diffRoots']['set'](_0x19f23c,T(_0x14ecc0)),this['_diffRootsAttributes']=new Map(_0x22418a(_0x3740d5)),_0x52e389)){const _0x3fd573=this['_revisionId'];this['_idsRoots']['set'](_0x19f23c,this['_makeIdsRoot'](_0x14ecc0)),this['_baseIdsRoots']['set'](_0x19f23c,this['_makeIdsRoot'](_0x14ecc0,_0x3fd573));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x52e389&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x45703c,_0x2a61a3]of _0x1d07da){const _0x32c9fa=this['_baseRoots']['get'](_0x2a61a3['rootName']),_0x360629=this['_diffRoots']['get'](_0x2a61a3['rootName']),_0x4ac24e=new ft(this['_fixPosition'](_0x2a61a3['start'],_0x32c9fa),this['_fixPosition'](_0x2a61a3['end'],_0x32c9fa)),_0x2cae7c=this['_fixRange'](_0x4ac24e,_0x360629);_0x32c9fa['markers']['set'](_0x45703c,_0x4ac24e),this['_markers']['set'](_0x45703c,_0x2cae7c);}this['_applyOperations'](_0x19503a,_0x3d2404,_0x52e389);}['_applyOperations'](_0x27ab9f,_0x5f2939,_0x4fbd12){for(const _0x1a1346 of this['source']['getOperations'](_0x27ab9f,_0x5f2939))this['_handleOperation'](_0x1a1346,_0x4fbd12);for(const _0x5b0983 of this['_diffRoots']['values']())_0x5b0983['markers']['clear']();for(const [_0x5ecf31,_0x52c480]of this['_markers']){this['_diffRoots']['get'](_0x52c480['root']['rootName'])['markers']['set'](_0x5ecf31,_0x52c480['clone']());}const _0x323684=new Map(),_0x50fa17=new Map();for(const [_0x1a8832,_0x25b3f6]of this['_diffRoots'])_0x323684['set'](_0x1a8832,T(_0x25b3f6)),_0x50fa17['set'](_0x1a8832,this['_diffRootsAttributes']['get'](_0x1a8832));this['_saveMetaData'](_0x5f2939,_0x323684,this['_markers'],_0x50fa17);}['_getPreviousFrom'](_0x3f36cf){const _0x4c54c1=Array['from'](this['_savedMetaData']['keys']());_0x4c54c1['sort']((_0x231ea6,_0x46ca55)=>_0x231ea6-_0x46ca55),_0x4c54c1['reverse']();for(const _0x13da9d of _0x4c54c1)if(_0x13da9d<_0x3f36cf)return _0x13da9d;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1d5f79,_0x33748d){const _0xe4eee5=Array['from'](_0x33748d['markers'])['map'](([_0x1eb2d6,_0x4fef45])=>[_0x1eb2d6,this['_fixRange'](_0x4fef45,_0x1d5f79)]);_0x1d5f79['markers']=new Map(_0xe4eee5);}['_transformMarkers'](_0x50d8e2){for(const _0x1c9ae9 of this['_markers']['values']()){const _0x778d0a=_0x1c9ae9['getTransformedByOperation'](_0x50d8e2),_0x569cd8=ft['_createFromRanges'](_0x778d0a);_0x1c9ae9['start']=_0x569cd8['start'],_0x1c9ae9['end']=_0x569cd8['end'];}}['_handleOperation'](_0x167c36,_0xefaff8){if('addRoot'!=_0x167c36['type']&&'detachRoot'!=_0x167c36['type']){if('insert'==_0x167c36['type']){const _0x35b915=_0x167c36['position']['root']['rootName'];this['_diffRoots']['has'](_0x35b915)||(this['_diffRoots']['set'](_0x35b915,F(_0x35b915,!0x0)),this['_diffRootsAttributes']['set'](_0x35b915,{}),_0xefaff8&&this['_idsRoots']['set'](_0x35b915,F(_0x35b915,!0x0)));}else{if('addRootAttribute'==_0x167c36['type']||'removeRootAttribute'==_0x167c36['type']||'changeRootAttribute'==_0x167c36['type'])return void this['_handleRootAttributeOperation'](_0x167c36);'marker'==_0x167c36['type']&&this['_handleMarkerOperation'](_0x167c36);}if('marker'!==_0x167c36['type']){const _0xbbcd1e=this['_cloneOperation'](_0x167c36,this['_diffRoots']);_0xbbcd1e['_execute'](),this['_transformMarkers'](_0xbbcd1e);}if(_0xefaff8)switch(_0x167c36['type']){case'insert':this['_handleInsertOperation'](_0x167c36);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x167c36);break;case'merge':this['_handleMergeOperation'](_0x167c36);break;case'split':this['_handleSplitOperation'](_0x167c36);}}else this['_handleRootOperation'](_0x167c36,_0xefaff8);}['_cloneOperation'](_0x1061ed,_0x598dd9){const _0x33b689=_0x1061ed['clone']();return _0x33b689['_authorId']=_0x1061ed['_authorId'],this['_fixOperation'](_0x33b689,_0x598dd9),_0x33b689;}['_getBaseVids'](_0x50e3c5){return _0x50e3c5['map'](_0x125107=>{const _0x145df1=this['_getVidAttributeName'](_0x125107);return Number(_0x125107['item']['getAttribute'](_0x145df1));});}['_generateTape'](_0x343242,_0x513f03){if(_0x343242['is']('element','$text'))_0x513f03['push']({'item':_0x343242,'type':'text'});else{_0x343242['is']('element')&&_0x513f03['push']({'item':_0x343242,'type':'elementStart'});for(const _0x23b7fc of _0x343242['getChildren']())this['_generateTape'](_0x23b7fc,_0x513f03);_0x343242['is']('element')&&_0x513f03['push']({'item':_0x343242,'type':'elementEnd'});}return _0x513f03;}['_getState'](){const _0x999a8b=new Map(this['_touched']),_0x4d9902=new Map(_0x999a8b),_0x1a627d=new Map(),_0x1bf7f0={'insertions':{},'deletions':{}},_0x4d858c={'insertions':{},'deletions':{}},_0x187e9f=new Map(),_0x1e1d10=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x1e1d10['delete']('$graveyard');for(const _0x48eb92 of _0x1e1d10){const _0x7785b4=this['_diffRoots']['get'](_0x48eb92)||F(_0x48eb92,!0x1),_0x4037de=this['_baseRoots']['get'](_0x48eb92)||F(_0x48eb92,!0x1);_0x7785b4['isAttached']()||_0x4037de['isAttached']()?(_0x1bf7f0['insertions'][_0x48eb92]=T(_0x7785b4),_0x1bf7f0['deletions'][_0x48eb92]=T(_0x4037de),this['_copyMarkers'](_0x1bf7f0['deletions'][_0x48eb92],_0x4037de),this['_copyMarkers'](_0x1bf7f0['insertions'][_0x48eb92],_0x7785b4),_0x4d858c['insertions'][_0x48eb92]=this['_generateTape'](this['_idsRoots']['get'](_0x48eb92),[]),_0x4d858c['deletions'][_0x48eb92]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x48eb92)||F(_0x48eb92,!0x1),[])):_0x1e1d10['delete'](_0x48eb92);}for(const _0x12ad73 of _0x1e1d10){const _0x52aaa=_0x4d858c['insertions'][_0x12ad73];for(const _0x5da0ce of _0x52aaa){const _0x58eaa5=this['_getVidAttributeName'](_0x5da0ce),_0x4f9f91=_0x5da0ce['item']['getAttribute'](_0x58eaa5);_0x4d9902['delete'](_0x4f9f91),_0x4f9f91>=this['_startingRevisionId']&&_0x1a627d['set'](_0x4f9f91,_0x999a8b['get'](_0x4f9f91));}}for(const _0x3cd806 of _0x1e1d10){const _0x1e9202=_0x4d858c['insertions'][_0x3cd806],_0x151363=this['_getBaseVids'](_0x4d858c['deletions'][_0x3cd806]);let _0x48d654=0x0;for(const _0xcd5ace of _0x1e9202){const _0x34f11c=this['_getVidAttributeName'](_0xcd5ace),_0x4826ec=_0xcd5ace['item']['getAttribute'](_0x34f11c);if(!_0x1a627d['has'](_0x4826ec)&&!_0x187e9f['has'](_0x4826ec)){if(_0x4d9902['has'](_0x4826ec))_0x48d654++;else{if(_0x4826ec!=_0x151363[_0x48d654]){const _0x1e1087=_0x999a8b['get'](_0x4826ec)||_0x999a8b['get'](_0x151363[_0x48d654]);for(;_0x4826ec!=_0x151363[_0x48d654];)_0x4d9902['has'](_0x151363[_0x48d654])||(_0x187e9f['set'](_0x151363[_0x48d654],_0x1e1087),_0x999a8b['set'](_0x151363[_0x48d654],_0x1e1087)),_0x48d654++;}_0x48d654++;}}}}for(const _0x33a7b9 of _0x1e1d10){const _0x5993f1=_0x4d858c['insertions'][_0x33a7b9];for(const _0x21d36f of _0x5993f1){const _0x11a23e=this['_getVidAttributeName'](_0x21d36f),_0x5a160c=_0x21d36f['item']['getAttribute'](_0x11a23e);if(_0x187e9f['has'](_0x5a160c)){const _0x4d0598=_0x187e9f['get'](_0x5a160c);_0x4d9902['has'](_0x5a160c)||_0x4d9902['set'](_0x5a160c,{..._0x4d0598}),_0x1a627d['set'](_0x5a160c,{..._0x4d0598});}}}for(const _0x90e3f6 of _0x4d9902['keys']())_0x90e3f6>=this['_startingRevisionId']&&_0x4d9902['delete'](_0x90e3f6);const _0x223efb=new Map();for(const _0x21aa44 of _0x1e1d10){let _0xec503=_0x4d858c['insertions'][_0x21aa44];for(const _0x342e5e of _0xec503)if(_0x342e5e['item']['is']('element','tableCell')){const _0x1b09f6=this['_getVidAttributeName'](_0x342e5e),_0x54d5c1=_0x342e5e['item']['getAttribute'](_0x1b09f6);if(_0x1a627d['has'](_0x54d5c1)){const _0x30c261=_0x342e5e['item']['parent']['parent']['getAttribute']('vid_start'),_0x561b90=_0x223efb['get'](_0x30c261)||new Set();_0x561b90['add'](_0x1a627d['get'](_0x54d5c1)['userId']),_0x223efb['set'](_0x30c261,_0x561b90);}}_0xec503=_0x4d858c['deletions'][_0x21aa44];for(const _0x32d8aa of _0xec503)if(_0x32d8aa['item']['is']('element','tableCell')){const _0x2a9a87=this['_getVidAttributeName'](_0x32d8aa),_0x5b8fa6=_0x32d8aa['item']['getAttribute'](_0x2a9a87);if(_0x4d9902['has'](_0x5b8fa6)){const _0x3d60db=_0x32d8aa['item']['parent']['parent']['getAttribute']('vid_start'),_0x46d1c1=_0x223efb['get'](_0x3d60db)||new Set();_0x46d1c1['add'](_0x4d9902['get'](_0x5b8fa6)['userId']),_0x223efb['set'](_0x3d60db,_0x46d1c1);}}for(const _0x2e1f09 of _0x223efb['keys']())(_0x1a627d['has'](_0x2e1f09)||_0x4d9902['has'](_0x2e1f09))&&_0x223efb['delete'](_0x2e1f09);}for(const _0x3447b6 of _0x1e1d10){const _0x13425b=_0x4d858c['insertions'][_0x3447b6];let _0x57d3f7=null,_0x5d90b6=null;for(const _0x5c4ea7 of _0x13425b){const _0x173f22=this['_getVidAttributeName'](_0x5c4ea7),_0x5269c4=_0x5c4ea7['item']['getAttribute'](_0x173f22),_0x333817=_0x223efb['get'](_0x5269c4);_0x333817&&'elementStart'==_0x5c4ea7['type']&&(_0x57d3f7=Array['from'](_0x333817)[0x0],_0x5d90b6=_0x5c4ea7['item']['getAttribute']('vid_end')),_0x57d3f7&&(_0x4d9902['set'](_0x5269c4,{'userId':_0x57d3f7}),_0x1a627d['set'](_0x5269c4,{'userId':_0x57d3f7})),_0x5269c4==_0x5d90b6&&(_0x57d3f7=null,_0x5d90b6=null);}}const _0x1f703e={},_0x2c4ea2=new Set();for(const _0x4f3c84 of _0x1e1d10){const _0x56ebbc=_0x1bf7f0['deletions'][_0x4f3c84],_0x2c7811=_0x1bf7f0['insertions'][_0x4f3c84];for(const {userId:_0x1c0c7e}of this['_touchedMarkers']['values']())null!==_0x1c0c7e&&_0x2c4ea2['add'](_0x1c0c7e);for(const {userId:_0x391bde}of this['_touchedRoots']['values']())null!==_0x391bde&&_0x2c4ea2['add'](_0x391bde);this['_markChanges'](_0x2c7811,_0x4d858c['insertions'][_0x4f3c84],_0x1a627d,'insertion',_0x2c4ea2),this['_markChanges'](_0x56ebbc,_0x4d858c['deletions'][_0x4f3c84],_0x4d9902,'deletion',_0x2c4ea2),_0x1f703e[_0x4f3c84]={'insertions':this['_prepareViewToSave'](_0x2c7811),'deletions':this['_prepareViewToSave'](_0x56ebbc),'attachChange':this['_touchedRoots']['get'](_0x4f3c84)||null,'attributesBefore':_0x22418a(this['_baseRootsAttributes']['get'](_0x4f3c84))||{},'attributesAfter':_0x22418a(this['_diffRootsAttributes']['get'](_0x4f3c84))};}return{'diffData':_0x1f703e,'authorsIds':Array['from'](_0x2c4ea2)};}['_processRootBeforeSave'](_0x27f611){for(const [,_0x50000e]of _0x27f611['markers']){const _0x5b33e3=_0x50000e['start']['getAncestors']()['filter'](_0x22ac7f=>'tableCell'==_0x22ac7f['name']);for(const _0x435718 of _0x5b33e3)0x1==_0x435718['childCount']&&_0x435718['getChild'](0x0)['is']('element','paragraph')&&_0x435718['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x2c36aa){this['_processRootBeforeSave'](_0x2c36aa);const _0x2418d1=this['editor']['data']['toView'](_0x2c36aa,{}),_0x3c2bfd=Array['from'](_0x2418d1['getChildren']())['map'](_0x2bd057=>this['_getViewJson'](_0x2bd057));return JSON['stringify'](_0x3c2bfd);}['_getViewJson'](_0x171057){if(_0x171057['is']('$text'))return _0x171057['data'];{const _0x3af939=_0x171057;return{'type':Object['keys'](E)['find'](_0xeed7f2=>_0x171057 instanceof E[_0xeed7f2]),'name':_0x3af939['name'],'attributes':Array['from'](_0x3af939['getAttributes']()),'children':Array['from'](_0x3af939['getChildren']())['map'](_0x560e17=>this['_getViewJson'](_0x560e17))};}}['_markChanges'](_0x262c0c,_0x1221d7,_0x3beb33,_0x81da62,_0x21e23d){let _0x3db272=null,_0x11e6ef=null,_0x4a6da6=0x0;const _0x36c465=this['editor']['model'];for(let _0x35b3db=0x0;_0x35b3db<_0x1221d7['length'];_0x35b3db++){const _0x3432cd=this['_getVidAttributeName'](_0x1221d7[_0x35b3db]),_0x3db022=_0x1221d7[_0x35b3db]['item']['getAttribute'](_0x3432cd),_0x55d596=_0x3beb33['get'](_0x3db022),_0x2bb2f8=_0x35b3db==_0x1221d7['length']-0x1;(!_0x3db272&&_0x55d596&&(_0x3db272=_0x55d596,_0x11e6ef=_0x1221d7[_0x35b3db]),_0x3db272&&(!_0x55d596||_0x55d596['userId']!=_0x3db272['userId']))&&(_0xdc1550(_0x55d596,B(_0x11e6ef,_0x262c0c,_0x36c465),B(_0x1221d7[_0x35b3db],_0x262c0c,_0x36c465)),_0x3db272=_0x55d596||null,_0x11e6ef=_0x55d596?_0x1221d7[_0x35b3db]:null),_0x3db272&&_0x2bb2f8&&_0xdc1550(_0x55d596,B(_0x11e6ef,_0x262c0c,_0x36c465),J(_0x1221d7[_0x35b3db],_0x262c0c,_0x36c465));}function _0xdc1550(_0x97ace2,_0x57a687,_0x489b46){const _0x58fdcd=_0x3db272['userId'],_0x577e8c='revision:'+_0x81da62+':'+_0x58fdcd+':'+_0x4a6da6++,_0x447e43=_0x36c465['createRange'](_0x57a687,_0x489b46);_0x262c0c['markers']['set'](_0x577e8c,_0x447e43),null!==_0x58fdcd&&_0x21e23d['add'](_0x58fdcd);}}['_getVidAttributeName'](_0x5b6fb5){switch(_0x5b6fb5['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1259da,_0x32153){_0x1259da['baseVersion']=null;for(const _0x595581 in _0x1259da){const _0x1657a0=_0x1259da[_0x595581];if(_0x1657a0 instanceof vt){const _0x3ffbda=_0x32153['get'](_0x1657a0['root']['rootName']);_0x1259da[_0x595581]=this['_fixPosition'](_0x1657a0,_0x3ffbda);}if(_0x1657a0 instanceof ft){const _0x4a9bf0=_0x32153['get'](_0x1657a0['root']['rootName']);_0x1259da[_0x595581]=this['_fixRange'](_0x1657a0,_0x4a9bf0);}'root'===_0x595581&&(_0x1259da['root']=_0x32153['get'](_0x1259da['root']['rootName']));}}['_fixRange'](_0x23da25,_0x597a69){return this['editor']['model']['createRange'](this['_fixPosition'](_0x23da25['start'],_0x597a69),this['_fixPosition'](_0x23da25['end'],_0x597a69));}['_fixPosition'](_0x5773ce,_0x4cd026){return this['editor']['model']['createPositionFromPath'](_0x4cd026,_0x5773ce['path'],_0x5773ce['stickiness']);}['_handleInsertOperation'](_0x595c1d){const _0x18cfbe=this['_idsRoots']['get'](_0x595c1d['position']['root']['rootName']),_0x4d4739=this['_fixPosition'](_0x595c1d['position'],_0x18cfbe),_0x3a7f77=null===_0x595c1d['_authorId']?null:_0x595c1d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x207937=_0x4d4739['parent'],_0x4520f2=this['_revisionId'],_0x494f5b=[];for(const _0x49b4c1 of _0x595c1d['nodes'])if(_0x49b4c1['is']('element'))_0x494f5b['push'](this['_makeIdsRoot'](_0x49b4c1));else{for(let _0x27b0f3=0x0;_0x27b0f3<_0x49b4c1['offsetSize'];_0x27b0f3++)_0x494f5b['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x430537=this['_revisionId'];for(let _0x1e84a9=_0x4520f2;_0x1e84a9<_0x430537;_0x1e84a9++)this['_touched']['set'](_0x1e84a9,{'userId':_0x3a7f77});_0x207937['_insertChild'](_0x4d4739['offset'],_0x494f5b);}['_handleMoveOperation'](_0x284e6a){(_0x284e6a=this['_cloneOperation'](_0x284e6a,this['_idsRoots']))['_execute']();const _0x24d59b=null===_0x284e6a['_authorId']?null:_0x284e6a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x48555b=_0x284e6a['getMovedRangeStart'](),_0x305ada=_0x48555b['parent'],_0x3b0e7d=_0x48555b['offset'];!function _0x500b9e(_0x29455d,_0x598b11,_0x2a2c1b,_0x26d4a8){for(let _0x4a59f6=_0x2a2c1b;_0x4a59f6<_0x26d4a8;_0x4a59f6++){const _0x2acb2b=_0x598b11['getChild'](_0x4a59f6);_0x2acb2b['is']('element','$text')?_0x29455d['set'](_0x2acb2b['getAttribute']('vid'),{'userId':_0x24d59b}):(_0x29455d['set'](_0x2acb2b['getAttribute']('vid_start'),{'userId':_0x24d59b}),_0x500b9e(_0x29455d,_0x2acb2b,0x0,_0x2acb2b['childCount']),_0x29455d['set'](_0x2acb2b['getAttribute']('vid_end'),{'userId':_0x24d59b}));}}(this['_touched'],_0x305ada,_0x3b0e7d,_0x3b0e7d+_0x284e6a['howMany']);}['_handleMergeOperation'](_0x41db40){const _0x3284dd=null===(_0x41db40=this['_cloneOperation'](_0x41db40,this['_idsRoots']))['_authorId']?null:_0x41db40['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x26381c=_0x41db40['targetPosition']['parent'],_0x5ca8dc=_0x41db40['sourcePosition']['parent'],_0x192a65=_0x26381c['getAttribute']('vid_end'),_0x47f853=_0x5ca8dc['getAttribute']('vid_start');_0x26381c['_setAttribute']('vid_end',_0x5ca8dc['getAttribute']('vid_end')),_0x5ca8dc['_setAttribute']('vid_end',_0x192a65),this['_touched']['set'](_0x47f853,{'userId':_0x3284dd}),this['_touched']['set'](_0x192a65,{'userId':_0x3284dd}),_0x41db40['_execute']();}['_handleSplitOperation'](_0x3c7758){const _0x40cb24=null===(_0x3c7758=this['_cloneOperation'](_0x3c7758,this['_idsRoots']))['_authorId']?null:_0x3c7758['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1d79ce=_0x3c7758['graveyardPosition'],_0x3d7e05=_0x3c7758['splitPosition']['parent'];_0x3c7758['_execute']();const _0x19b32c=_0x3d7e05['getAttribute']('vid_end'),_0x4e1bdc=_0x3c7758['insertionPosition']['nodeAfter'];if(_0x1d79ce){const _0x389fcf=_0x4e1bdc['getAttribute']('vid_end'),_0x4dae96=_0x3d7e05['getAttribute']('vid_end');_0x3d7e05['_setAttribute']('vid_end',_0x389fcf),_0x4e1bdc['_setAttribute']('vid_end',_0x4dae96),this['_touched']['set'](_0x3d7e05['getAttribute']('vid_end'),{'userId':_0x40cb24}),this['_touched']['set'](_0x4e1bdc['getAttribute']('vid_start'),{'userId':_0x40cb24});}else{const _0x378ce5=this['_revisionId']++,_0x40fe64=this['_revisionId']++;_0x3d7e05['_setAttribute']('vid_end',_0x378ce5),_0x4e1bdc['_setAttribute']('vid_start',_0x40fe64),_0x4e1bdc['_setAttribute']('vid_end',_0x19b32c),this['_touched']['set'](_0x378ce5,{'userId':_0x40cb24}),this['_touched']['set'](_0x40fe64,{'userId':_0x40cb24});}}['_handleMarkerOperation'](_0x32d2e3){if(!_0x32d2e3['affectsData'])return;const _0xd94cc9=(_0x32d2e3=this['_cloneOperation'](_0x32d2e3,this['_diffRoots']))['oldRange']?_0x32d2e3['oldRange']['root']:null,_0x1f7dd5=_0x32d2e3['newRange']?_0x32d2e3['newRange']['root']:null;_0xd94cc9&&this['_markers']['delete'](_0x32d2e3['name']),_0x1f7dd5&&this['_markers']['set'](_0x32d2e3['name'],_0x32d2e3['newRange']['clone']());const _0x5114e8=null===_0x32d2e3['_authorId']?null:_0x32d2e3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4db597=_0x32d2e3['name'];if(!this['_touchedMarkers']['has'](_0x4db597))return void this['_touchedMarkers']['set'](_0x4db597,{'range':_0x32d2e3['oldRange'],'userId':_0x5114e8});const _0x26f91f=this['_touchedMarkers']['get'](_0x4db597),_0x12e47a=_0x26f91f['range'],_0x29907b=_0x32d2e3['newRange'];null==_0x12e47a&&null==_0x29907b||_0x12e47a&&_0x29907b&&_0x12e47a['isEqual'](_0x29907b)?this['_touchedMarkers']['delete'](_0x32d2e3['name']):_0x26f91f['userId']=_0x5114e8;}['_handleRootOperation'](_0x88aa55,_0x40b68d){this['_diffRoots']['has'](_0x88aa55['rootName'])?this['_diffRoots']['get'](_0x88aa55['rootName'])['_isAttached']=_0x88aa55['isAdd']:(this['_diffRoots']['set'](_0x88aa55['rootName'],F(_0x88aa55['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x88aa55['rootName'],{}),_0x40b68d&&this['_idsRoots']['set'](_0x88aa55['rootName'],F(_0x88aa55['rootName'],!0x0)));const _0x5eb997=null===_0x88aa55['_authorId']?null:_0x88aa55['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4ac687=this['_touchedRoots']['get'](_0x88aa55['rootName']);_0x4ac687&&_0x4ac687['userId']===_0x5eb997?this['_touchedRoots']['delete'](_0x88aa55['rootName']):this['_touchedRoots']['set'](_0x88aa55['rootName'],{'userId':_0x5eb997,'isAttached':_0x88aa55['isAdd']});}['_handleRootAttributeOperation'](_0x539c0b){const _0x54bea2=this['_diffRootsAttributes']['get'](_0x539c0b['root']['rootName']);null===_0x539c0b['newValue']?delete _0x54bea2[_0x539c0b['key']]:_0x54bea2[_0x539c0b['key']]=_0x539c0b['newValue'];}}function T(_0x4a9543){const _0x347116=F(_0x4a9543['rootName'],_0x4a9543['isAttached']());for(const _0x1c79d4 of _0x4a9543['getChildren']()){const _0x2ee668=_0x1c79d4['_clone'](!0x0);_0x347116['_appendChild'](_0x2ee668);}return _0x347116;}function F(_0x519516,_0xc56297=!0x0){const _0x306ba8=new gt();return _0x306ba8['rootName']=_0x519516,_0x306ba8['_isAttached']=_0xc56297,_0x306ba8['isAttached']=()=>_0x306ba8['_isAttached'],_0x306ba8;}function B(_0x13175c,_0x9f8e1f,_0x473e8f){const _0x453904='elementEnd'==_0x13175c['type']?_0x473e8f['createPositionAt'](_0x13175c['item'],'end'):_0x473e8f['createPositionBefore'](_0x13175c['item']);return _0x473e8f['createPositionFromPath'](_0x9f8e1f,_0x453904['path'],_0x453904['stickiness']);}function J(_0xe669c6,_0x112b3c,_0x155b99){const _0x259e01='elementStart'==_0xe669c6['type']?_0x155b99['createPositionAt'](_0xe669c6['item'],0x0):_0x155b99['createPositionAfter'](_0xe669c6['item']);return _0x155b99['createPositionFromPath'](_0x112b3c,_0x259e01['path'],_0x259e01['stickiness']);}class os extends _0x5c59b1{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x3bf025,_0xa364db){super(_0x3bf025),this['focusTracker']=new _0x539dec(),this['keystrokes']=new _0x573fdc(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0xa364db),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x414a21({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x194742=_0x3d3b8d=>_0x3d3b8d['stopPropagation']();this['keystrokes']['set']('arrowright',_0x194742),this['keystrokes']['set']('arrowleft',_0x194742),this['keystrokes']['set']('arrowup',_0x194742),this['keystrokes']['set']('arrowdown',_0x194742);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0xa2976f){this['revisionNameInputView']['fieldView']['element']['value']=_0xa2976f['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0xb6517f){const _0x2e54bc=new at(this['locale'],ti),_0x5c0beb=_0x2e54bc['fieldView'];_0x5c0beb['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x2c9c3c=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0xb6517f&&(_0x2c9c3c+='\x20('+m(this['locale'],'optional')+')'),(_0x2e54bc['label']=_0x2c9c3c,_0x5c0beb['on']('input',()=>{this['revisionNameInputValue']=_0x5c0beb['element']['value']['trim']();}),_0x2e54bc);}}class f extends _0x26fb00{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x2ccd5f=this['editor'],_0x2c6f07=_0x2ccd5f['plugins']['get']('RevisionTracker');_0x2ccd5f['ui']['componentFactory']['add']('revisionHistory',_0x9e5bee=>{const _0x5acd94=_0x43bd05(_0x9e5bee),_0x43bc7a=_0x5acd94['panelView']['children'],_0x5121b8=new _0x11f175(_0x9e5bee),_0x14231e=new te(_0x9e5bee),_0x372712=new _0x1514b3(_0x9e5bee),_0x4beddb=new te(_0x9e5bee),_0x3318a6=new _0x1514b3(_0x9e5bee);return _0x5acd94['bind']('isEnabled')['to'](_0x2c6f07,'isReady',_0x2c6f07,'isEnabled',_0x2ccd5f,'isReadOnly',(_0x6c8630,_0x338863,_0x33029c)=>_0x6c8630&&_0x338863&&!_0x33029c),_0x5acd94['buttonView']['set']({'icon':_0x5d107e,'label':m(_0x9e5bee,'Revision\x20history'),'tooltip':!0x0}),_0x372712['set']({'label':m(_0x9e5bee,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x372712['bind']('isEnabled')['to'](_0x2c6f07,'isReady',_0x2c6f07,'isEnabled',_0x2ccd5f,'isReadOnly',(_0x4b3b48,_0x1f97f4,_0xe9b41e)=>_0x4b3b48&&_0x1f97f4&&!_0xe9b41e),_0x372712['on']('execute',()=>this['_showDialog']()),_0x3318a6['set']({'label':m(_0x9e5bee,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x3318a6['bind']('isEnabled')['to'](_0x2c6f07,'isReady',_0x2ccd5f,'isReadOnly',(_0x154b23,_0x5dbfc4)=>_0x154b23&&!_0x5dbfc4),_0x3318a6['on']('execute',()=>{_0x2ccd5f['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x5acd94['isOpen']=!0x1,_0x2ccd5f['editing']['view']['focus']();}),_0x14231e['children']['add'](_0x372712),_0x4beddb['children']['add'](_0x3318a6),_0x5121b8['role']='menu',_0x5121b8['items']['addMany']([_0x14231e,_0x4beddb]),_0x43bc7a['add'](_0x5121b8),_0x5acd94;}),_0x2ccd5f['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x56ca9f=this['editor'],_0xdae823=_0x56ca9f['locale'],_0x29e15b=new _0x37c1b7(_0xdae823),_0x1b44ba=new _0x4572c7(_0xdae823);_0x29e15b['buttonView']['set']({'icon':_0x5d107e,'label':m(_0xdae823,'Revision\x20history')});const _0xd73ee6=new _0x2e24f1(_0xdae823,_0x29e15b),_0x2f0ccc=new _0x1fe456(_0xdae823);_0x2f0ccc['set']({'label':m(_0xdae823,'Save\x20current\x20revision')}),_0x2f0ccc['delegate']('execute')['to'](_0x29e15b),_0x2f0ccc['on']('execute',()=>{this['_showDialog']();}),_0xd73ee6['children']['add'](_0x2f0ccc),_0x1b44ba['items']['add'](_0xd73ee6);const _0x28372f=new _0x2e24f1(_0xdae823,_0x29e15b),_0xcf3db0=new _0x1fe456(_0xdae823);return _0xcf3db0['set']({'label':m(_0xdae823,'Open\x20revision\x20history')}),_0xcf3db0['delegate']('execute')['to'](_0x29e15b),_0xcf3db0['on']('execute',()=>{_0x56ca9f['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x28372f['children']['add'](_0xcf3db0),_0x1b44ba['items']['add'](_0x28372f),_0x29e15b['panelView']['children']['add'](_0x1b44ba),_0x29e15b;}['_showDialog'](){const _0x1f01c6=this['editor'],_0x3d5d82=_0x1f01c6['locale'],_0x513668=_0x1f01c6['plugins']['get']('Dialog'),_0x40db8f=_0x1f01c6['plugins']['get']('RevisionTracker');function _0x377503(_0x27f76b){_0x1f01c6['config']['get']('revisionHistory.requireRevisionName')&&''===_0x27f76b['revisionName']?_0x27f76b['revisionNameInputView']['errorText']=m(_0x3d5d82,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x1f01c6['plugins']['get'](u)['saveRevision']({'name':_0x27f76b['revisionName']}),_0x513668['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x377503(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x513668['show']({'id':'revisionSave','title':m(_0x3d5d82,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x1f01c6['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x513668['hide']()},{'label':m(_0x1f01c6['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x55d353){_0x55d353['bind']('isEnabled')['to'](_0x40db8f,'isReady',_0x40db8f,'isEnabled',_0x1f01c6,'isReadOnly',(_0xa07813,_0x248f17,_0x46e1fd)=>_0xa07813&&_0x248f17&&!_0x46e1fd);},'onExecute':()=>_0x377503(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x29d57e=this['editor'],_0x3164c6=_0x29d57e['locale'];this['_saveRevisionFormView']=new os(_0x3164c6,_0x29d57e['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x5c59b1{['changeId'];['_model'];constructor(_0x12c11b,_0x28b3dd){super(_0x12c11b),this['_model']=_0x28b3dd,this['changeId']=_0x28b3dd['id'];const _0x5b5d08=this['bindTemplate'],_0x37dc1e=m(_0x12c11b,_0x28b3dd['data']['isSuggestion']?'Suggested\x20by':'add'==_0x28b3dd['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x28b3dd['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5b5d08['to']('type',_0x4902e5=>'ck-revision-change__'+_0x4902e5)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x37dc1e}]},{'text':'\x20'+_0x28b3dd['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
- _0x3d781(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x1918ba){super(),this['id']=_0x1918ba['id']||_0x4e207b(),this['author']=_0x1918ba['author'],this['type']=_0x1918ba['type'],this['data']=_0x1918ba['data']||{},this['rootName']=_0x1918ba['rootName'],this['set']('createdAt',_0x1918ba['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x106255,_0x3c0399){this['newRevisionId']=_0x106255,this['oldRevisionId']=_0x3c0399,this['changes']=new _0x8dad72();}['_setChanges'](_0x4bf353){for(const _0x218b86 of _0x4bf353)this['changes']['add'](_0x218b86);}}const Y={'c':_0xbee4c,'a':_0x30fb6c,'e':_0x48a8b3,'r':_0x2cbc43,'u':_0x22652a};class d extends _0x26fb00{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x134057,_0x788d43,j];}constructor(_0x54dcb3){super(_0x54dcb3),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x1aed81,_0x4fc508,_0x20f1de)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x25d85b=>{for(const _0x3571a7 of this['editor']['editing']['view']['document']['roots'])_0x20f1de?_0x25d85b['removeClass']('ck-editor__editable__overlay',_0x3571a7):_0x25d85b['addClass']('ck-editor__editable__overlay',_0x3571a7);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x17e595=>null!==_0x17e595),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x563eba,_0x370c12,_0x13bfc2)=>_0x563eba&&_0x13bfc2?_0x370c12['changes']['getIndex'](_0x13bfc2):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x52689f,_0x1d95a0)=>_0x52689f?_0x1d95a0['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x788d43);}['init'](){const _0x235886=this['editor'],_0x19dfa0=new yt(_0x235886,{'direction':'backward'}),_0x4c5817=new yt(_0x235886,{'direction':'forward'});(_0x235886['commands']['add']('showPreviousChange',_0x19dfa0),_0x235886['commands']['add']('showNextChange',_0x4c5817),_0x235886['commands']['add']('restoreRevision',new _t(_0x235886)),this['on']('change:numberOfChanges',()=>{_0x19dfa0['refresh'](),_0x4c5817['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x235886['enableReadOnlyMode']('revision-viewer'),_0x235886['plugins']['has']('WidgetToolbarRepository'))&&_0x235886['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x175e36){await this['loadRevisionData'](_0x175e36);const _0x49caeb={};for(const _0xabaaa3 in _0x175e36['diffData']){if(_0x175e36['diffData'][_0xabaaa3]['attachChange']&&!_0x175e36['diffData'][_0xabaaa3]['attachChange']['isAttached'])continue;const _0x118508=this['_removeRevisionMarkers'](JSON['parse'](_0x175e36['diffData'][_0xabaaa3]['insertions'])),_0x3afffc=this['editor']['editing']['view']['document'],_0x55d59c=new _0x56f6be(_0x3afffc,_0x118508['map'](_0x207a77=>this['_getViewObj'](_0x207a77)));this['editor']['data']['processor']['useFillerType']('marked'),_0x49caeb[_0xabaaa3]=this['editor']['data']['processor']['toData'](_0x55d59c),this['editor']['data']['processor']['useFillerType']('default');}return _0x49caeb;}async['getRevisionRootsAttributes'](_0x39632f){await this['loadRevisionData'](_0x39632f);const _0x4f6d20={};for(const _0x3f3774 in _0x39632f['diffData'])_0x39632f['diffData'][_0x3f3774]['attachChange']&&!_0x39632f['diffData'][_0x3f3774]['attachChange']['isAttached']||(_0x4f6d20[_0x3f3774]=_0x39632f['diffData'][_0x3f3774]['attributesAfter']||{});return _0x4f6d20;}['_removeRevisionMarkers'](_0xd3abca){return(_0xd3abca=_0xd3abca['filter'](_0x3b25a1=>!_0x3b25a1['name']||'revision-start'!==_0x3b25a1['name']&&'revision-end'!==_0x3b25a1['name']))['forEach'](_0x2bc223=>{'string'!=typeof _0x2bc223&&(_0x2bc223['children']=this['_removeRevisionMarkers'](_0x2bc223['children']),_0x2bc223['attributes']=_0x2bc223['attributes']['filter'](_0x415547=>!_0x415547[0x0]['startsWith']('data-revision-')));}),_0xd3abca;}async['compare'](_0x1615d5,_0x16b0e9,_0x4771dc=!0x1){if(!this['isEnabled'])return;const _0x230185=this['diff'],_0x5c9956=this['repository'],_0x2d5796='string'==typeof _0x1615d5?_0x5c9956['getRevision'](_0x1615d5):_0x1615d5,_0x23eb21='string'==typeof _0x16b0e9?_0x5c9956['getRevision'](_0x16b0e9):_0x16b0e9,_0xb398dc=_0x2d5796['id'],_0x4db3e5=_0x23eb21?_0x23eb21['id']:null;if(!_0x4771dc&&this['diff']&&this['diff']['newRevisionId']===_0xb398dc&&this['diff']['oldRevisionId']===_0x4db3e5)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0xb398dc,_0x4db3e5);const _0x1e878c=this['_getRevisionsRange'](_0x2d5796,_0x23eb21,!0x0)['map'](_0x49095f=>this['loadRevisionData'](_0x49095f));return _0x1e878c['push'](new Promise(_0x305428=>{setTimeout(_0x305428,0x14);})),Promise['all'](_0x1e878c)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0xde575b=this['_getDiff'](_0xb398dc,_0x4db3e5);for(const _0x177838 of _0xde575b['changes'])this['_changeIdToChange']['set'](_0x177838['id'],_0x177838);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x389803=>{for(const _0x239c64 of this['editor']['model']['document']['getRootNames']())_0x389803['detachRoot'](_0x239c64);for(const _0x1f9843 of Object['keys'](_0xde575b['model'])){const _0xfb2ebe=_0x389803['addRoot'](_0x1f9843);for(const _0xff26da of Object['keys'](_0xde575b['attributes'][_0x1f9843]))_0x389803['setAttribute'](_0xff26da,_0xde575b['attributes'][_0x1f9843][_0xff26da],_0xfb2ebe);_0x389803['insert'](_0xde575b['model'][_0x1f9843],_0xfb2ebe,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0xde575b['changes'])),this['isReady']=!0x0;})['catch'](_0x33d716=>{console['error'](_0x33d716),this['_cleanUp'](),_0x230185&&(this['diff']=_0x230185),this['isReady']=!0x0;});}['addRevisionData'](_0x221d0b,_0x32b7f3){const _0x1301c7=this['repository']['createRevision'](_0x221d0b);return _0x1301c7['on']('_update',(_0x162a5f,_0x494f91,_0x221531)=>_0x32b7f3(_0x494f91,_0x221531,_0x1301c7)),this['repository']['addRevision'](_0x1301c7),_0x1301c7;}['loadRevisionData'](_0x943f0a){if(!_0x943f0a||_0x943f0a['diffData'])return Promise['resolve']();{const _0x45c930=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x45c930,'revisionId':_0x943f0a['id']})['then'](_0x29ec72=>{_0x943f0a['_update']({'diffData':_0x29ec72['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x13dcf8=>{for(const _0x59e8e6 of this['editor']['model']['document']['getRootNames']())_0x13dcf8['detachRoot'](_0x59e8e6);});}['_sortAndFilterDiffChanges'](_0x586627){const _0x478871=[],_0x2f1698=new Map();for(const _0x181540 of this['editor']['model']['document']['getRootNames']()){const _0x1031c6=this['editor']['editing']['view']['getDomRoot'](_0x181540);if(!_0x1031c6)continue;const _0x3efd08=_0x1031c6['getClientRects']()['item'](0x0);_0x3efd08&&(_0x478871['push'](_0x181540),_0x2f1698['set'](_0x181540,_0x3efd08));}return _0x478871['sort']((_0x8192b1,_0x69f6ef)=>{const _0x28906a=_0x2f1698['get'](_0x8192b1),_0x35bbff=_0x2f1698['get'](_0x69f6ef);return _0x28906a['y']-_0x35bbff['y']||_0x28906a['x']-_0x35bbff['x'];}),(_0x586627=_0x586627['filter'](_0x5256e0=>_0x478871['includes'](_0x5256e0['rootName'])))['sort']((_0x93c264,_0x3f8d47)=>_0x478871['indexOf'](_0x93c264['rootName'])-_0x478871['indexOf'](_0x3f8d47['rootName'])),_0x586627;}['_makeTape'](_0x3dccd5){const _0x200fae=Array['from'](_0x3dccd5['markers'])['filter'](([_0x1a0a23,_0x130ada])=>_0x1a0a23['startsWith']('revision:')&&!_0x130ada['isCollapsed']),_0x3114ad=Array['from'](this['editor']['model']['createRangeIn'](_0x3dccd5)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x200fae['length'])for(const _0x497014 of _0x3114ad){const [_0xc95793,_0x1caba0]=_0x200fae[0x0],[,_0x1cc7ee,_0x551465]=_0xc95793['split'](':');if(_0x1caba0['end']['isEqual'](_0x497014['nextPosition'])&&_0x200fae['shift'](),(_0x497014['previousPosition']['isEqual'](_0x1caba0['start'])||_0x497014['previousPosition']['isAfter'](_0x1caba0['start']))&&('insertion'==_0x1cc7ee?_0x497014['isAdded']={'userId':_0x551465}:'deletion'==_0x1cc7ee&&(_0x497014['isRemoved']={'userId':_0x551465})),0x0==_0x200fae['length'])break;}return _0x3114ad;}['_refreshStartEndIndex'](_0x53c071){const _0x430775=new Map();for(let _0x2b8908=0x0;_0x2b8908<_0x53c071['length'];_0x2b8908++)'text'===_0x53c071[_0x2b8908]['type']?(_0x53c071[_0x2b8908]['item']['startIndex']=_0x2b8908,_0x53c071[_0x2b8908]['item']['endIndex']=_0x2b8908):('elementStart'===_0x53c071[_0x2b8908]['type']?_0x53c071[_0x2b8908]['item']['startIndex']=_0x2b8908:'elementEnd'===_0x53c071[_0x2b8908]['type']&&(_0x53c071[_0x2b8908]['item']['endIndex']=_0x2b8908),_0x430775['set'](_0x53c071[_0x2b8908]['id'],_0x2b8908));for(const _0x5d1e88 of _0x430775['values']())'elementStart'===_0x53c071[_0x5d1e88]['type']?_0x53c071[_0x5d1e88]['item']['endIndex']=_0x430775['get'](_0x53c071[_0x5d1e88]['pairId']):'elementEnd'===_0x53c071[_0x5d1e88]['type']&&(_0x53c071[_0x5d1e88]['item']['startIndex']=_0x430775['get'](_0x53c071[_0x5d1e88]['pairId']));}['_processTape'](_0x3b47d1){for(let _0x6e5bb8=0x0;_0x6e5bb8<_0x3b47d1['length'];_0x6e5bb8++){if('elementStart'===_0x3b47d1[_0x6e5bb8]['type'])_0x3b47d1[_0x6e5bb8]['item']['startIndex']=_0x6e5bb8;else{if('elementEnd'===_0x3b47d1[_0x6e5bb8]['type']){_0x3b47d1[_0x6e5bb8]['item']['endIndex']=_0x6e5bb8;const _0x36a109=_0x3b47d1[_0x6e5bb8]['item']['startIndex'];_0x3b47d1[_0x36a109]['pairId']=_0x3b47d1[_0x6e5bb8]['id'],_0x3b47d1[_0x6e5bb8]['pairId']=_0x3b47d1[_0x36a109]['id'];}else _0x3b47d1[_0x6e5bb8]['item']['startIndex']=_0x6e5bb8,_0x3b47d1[_0x6e5bb8]['item']['endIndex']=_0x6e5bb8,_0x3b47d1[_0x6e5bb8]['pairId']=null;}_0x3b47d1[_0x6e5bb8]['markersStart']||(_0x3b47d1[_0x6e5bb8]['markersStart']=[],_0x3b47d1[_0x6e5bb8]['markersEnd']=[]);}}['_markInsertions'](_0x49bc16,_0x2ed2c9){const _0x55d603=_0x49bc16['filter'](_0x4fdf94=>!_0x4fdf94['isAdded']);for(let _0x3dadc2=0x0;_0x3dadc2<_0x2ed2c9['length'];_0x3dadc2++)_0x2ed2c9[_0x3dadc2]['isAdded']&&(_0x55d603[_0x3dadc2]['isAdded']=_0x2ed2c9[_0x3dadc2]['isAdded']);}['_makeModelFromViewString'](_0x2f4e92){const _0x526282=JSON['parse'](_0x2f4e92),_0x28a648=this['editor']['editing']['view']['document'],_0x5ad7cb=new _0x56f6be(_0x28a648,_0x526282['map'](_0x31285d=>this['_getViewObj'](_0x31285d)));return this['editor']['data']['toModel'](_0x5ad7cb);}['_getViewObj'](_0xc53668){const _0x3de021=this['editor']['editing']['view']['document'];if('string'==typeof _0xc53668)return new _0xc3b70e(_0x3de021,_0xc53668);{const _0x16e165=_0xc53668['children']['map'](_0x4e85dd=>this['_getViewObj'](_0x4e85dd));return new(Y[_0xc53668['type']]||_0x42d694)(_0x3de021,_0xc53668['name'],_0xc53668['attributes'],_0x16e165);}}['_getDiff'](_0x218b9c,_0x5be207=null){const _0x45c922=this['repository']['getRevision'](_0x218b9c),_0xece014=_0x5be207?this['repository']['getRevision'](_0x5be207):null,_0x377871=this['_getRevisionsRange'](_0x45c922,_0xece014),_0x101292=_0x377871[_0x377871['length']-0x1],_0x47687f=new Map(),_0x3c2347={'model':{},'attributes':{},'changes':[]},_0x34e228=new Set(),_0x70ead9=new Map();for(let _0xd23f62=_0x377871['length']-0x1;_0xd23f62>=0x0;_0xd23f62--){const _0x508628=_0x377871[_0xd23f62];for(const _0x17d41e of Object['keys'](_0x508628['diffData']))if(_0x508628['diffData'][_0x17d41e]['attachChange']){const _0x2d4da2=_0x508628['diffData'][_0x17d41e]['attachChange'];_0x2d4da2['isAttached']?(_0x34e228['add'](_0x17d41e),_0x70ead9['has'](_0x17d41e)&&_0x70ead9['get'](_0x17d41e)['userId']==_0x2d4da2['userId']?_0x70ead9['delete'](_0x17d41e):_0x70ead9['set'](_0x17d41e,_0x2d4da2)):_0x70ead9['has'](_0x17d41e)?(_0x34e228['delete'](_0x17d41e),_0x70ead9['delete'](_0x17d41e)):(_0x34e228['add'](_0x17d41e),_0x70ead9['set'](_0x17d41e,_0x2d4da2));}else _0x34e228['add'](_0x17d41e);}for(const _0x4ff11b of _0x34e228){const _0x288620=_0x70ead9['has'](_0x4ff11b)&&!_0x70ead9['get'](_0x4ff11b)['isAttached'];let _0x1deebc=_0x288620?_0x377871['length']-0x1:0x0;const _0xb37d18=_0x288620?-0x1:0x1;for(;_0x377871[_0x1deebc];){const _0x251894=_0x377871[_0x1deebc];if(_0x251894['diffData'][_0x4ff11b]){const _0x579097=_0x288620?_0x251894['diffData'][_0x4ff11b]['attributesBefore']:_0x251894['diffData'][_0x4ff11b]['attributesAfter'];_0x3c2347['attributes'][_0x4ff11b]=_0x579097?_0x22418a(_0x579097):{};break;}_0x1deebc+=_0xb37d18;}}for(const _0x4dc4bf of _0x377871){_0x4dc4bf['model']={};for(const _0x29558b of _0x4dc4bf['authors'])_0x47687f['set'](_0x29558b['id'],_0x29558b);for(const _0x565fcb of _0x34e228){const _0x2d26f4=_0x4dc4bf['diffData'][_0x565fcb]?_0x4dc4bf['diffData'][_0x565fcb]['insertions']:'[]',_0x1e47a3=_0x4dc4bf['diffData'][_0x565fcb]?_0x4dc4bf['diffData'][_0x565fcb]['deletions']:'[]';_0x4dc4bf['model'][_0x565fcb]={'insertions':this['_makeModelFromViewString'](_0x2d26f4),'deletions':this['_makeModelFromViewString'](_0x1e47a3)};}}for(const _0x3dbb4c of _0x34e228){let _0x23eb75=null,_0x594894=0x0;const _0x279861=new Map(Array['from'](_0x45c922['model'][_0x3dbb4c]['insertions']['markers'])['filter'](([_0xa75941])=>!_0xa75941['startsWith']('revision:')));let _0x2a149b=0x0;for(const _0x4fc351 of _0x377871){const _0x2beea3=this['_makeTape'](_0x4fc351['model'][_0x3dbb4c]['insertions']);_0x4fc351==_0x45c922?(_0x23eb75=_0x2beea3,_0x594894=_0x23eb75['length'],_0x23eb75['forEach'](_0x2e1082=>{_0x2e1082['id']=_0x2a149b++;}),this['_processTape'](_0x23eb75)):this['_markInsertions'](_0x23eb75,_0x2beea3);const _0x505391=_0x23eb75['filter'](_0x563e11=>!_0x563e11['isAdded'])['map'](_0x30e665=>_0x30e665['id']);let _0x313212=0x0;const _0x44220c=this['_makeTape'](_0x4fc351['model'][_0x3dbb4c]['deletions']);_0x44220c['forEach'](_0x4debb2=>{_0x4debb2['isRemoved']?_0x4debb2['id']=_0x594894++:_0x4debb2['id']=_0x505391[_0x313212++];}),this['_processTape'](_0x44220c),this['_setDistance'](_0x23eb75,'isAdded'),this['_setDistance'](_0x44220c,'isRemoved'),_0x4fc351==_0x45c922&&this['_markMarkers'](_0x23eb75,_0x279861),_0x23eb75=this['_joinTapes'](_0x23eb75,_0x44220c),this['_refreshStartEndIndex'](_0x23eb75),this['_setDistance'](_0x23eb75,'isRemoved');}_0x23eb75=_0x23eb75['filter'](_0x27e0ea=>!(_0x27e0ea['isAdded']&&_0x27e0ea['isRemoved']));const _0x2e2890=new Map(_0x101292['model'][_0x3dbb4c]['deletions']['markers']),_0x444e2d=new Set(_0x279861['keys']());for(const _0xe9b14c of _0x2e2890['keys']())_0x444e2d['delete'](_0xe9b14c);this['_markSuggestions'](_0x23eb75,_0x444e2d),this['_fixObsoleteTags'](_0x23eb75),_0x23eb75=this['_removeMissingPairs'](_0x23eb75),_0x23eb75=this['_markMismatchedRemovedTags'](_0x23eb75),_0x23eb75=this['_removeUnsupportedChanges'](_0x23eb75);const {root:_0x14ca84,changes:_0xac9205}=this['_makeModelFromTape'](_0x23eb75,_0x47687f,_0x3dbb4c);_0x3c2347['model'][_0x3dbb4c]=_0x14ca84;const _0x17cd68=_0x70ead9['get'](_0x3dbb4c);if(_0x17cd68){const _0x31ba3e=_0x47687f['get'](_0x17cd68['userId']),_0x4f9153=new r({'author':_0x31ba3e,'type':_0x17cd68['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3dbb4c});_0xac9205['unshift'](_0x4f9153),_0x3c2347['attributes'][_0x3dbb4c]['revisionHistoryAttachChange']=_0x4f9153['id'];}_0x3c2347['changes']=_0x3c2347['changes']['concat'](_0xac9205);}return _0x3c2347;}['_markMarkers'](_0x5677b6,_0x4e5170){for(let _0x3b7456=0x0;_0x3b7456<_0x5677b6['length'];_0x3b7456++)for(const [_0x4a1f28,_0x4fa578]of _0x4e5170)_0x4fa578['start']['isEqual'](_0x5677b6[_0x3b7456]['previousPosition'])&&_0x5677b6[_0x3b7456]['markersStart']['push'](_0x4a1f28),_0x4fa578['end']['isEqual'](_0x5677b6[_0x3b7456]['nextPosition'])&&_0x5677b6[_0x3b7456]['markersEnd']['push'](_0x4a1f28);}['_joinTapes'](_0x59f059,_0x2be81e){let _0x50346d=[],_0xfa335a=0x0,_0x41085b=0x0;for(;_0xfa335a<_0x59f059['length']||_0x41085b<_0x2be81e['length'];){const _0x108270=_0x59f059[_0xfa335a]||{},_0x2dc561=_0x2be81e[_0x41085b]||{};if(_0x108270['id']==_0x2dc561['id'])_0xfa335a++,_0x41085b++,_0x50346d['push'](_0x108270);else{if(_0x2dc561['isRemoved']&&_0x108270['isAdded']){const {commonTape:_0x3055e9,iEnd:_0x58bdf5,jEnd:_0x431d75}=this['_threeWayMerge'](_0x59f059,_0xfa335a,_0x2be81e,_0x41085b);_0x50346d=_0x50346d['concat'](_0x3055e9),_0xfa335a=_0x58bdf5,_0x41085b=_0x431d75;}else _0x2dc561['isRemoved']?(_0x41085b++,_0x50346d['push'](_0x2dc561)):(_0xfa335a++,_0x50346d['push'](_0x108270));}}return _0x50346d;}['_markSuggestions'](_0x2efe48,_0x2d1c0d){const _0x2d4d01=[];for(let _0x416d63=0x0;_0x416d63<_0x2efe48['length'];_0x416d63++){for(let _0x3f3664=0x0;_0x3f3664<_0x2efe48[_0x416d63]['markersStart']['length'];_0x3f3664++){const _0xdfa175=_0x2efe48[_0x416d63]['markersStart'][_0x3f3664];if(!_0x2d1c0d['has'](_0xdfa175))continue;const {group:_0x513424,type:_0x35e6df,authorId:_0x1d120a}=_0x44c982(_0xdfa175);'revision-suggestion'!=_0x513424||'insertion'!=_0x35e6df&&'deletion'!=_0x35e6df||(_0x2d4d01['unshift']({'type':_0x35e6df,'name':_0xdfa175,'userId':_0x1d120a}),_0x2efe48[_0x416d63]['markersStart']['splice'](_0x3f3664,0x1),_0x3f3664--);}_0x20c8a5(_0x2efe48[_0x416d63]);for(let _0x36b7cd=0x0;_0x36b7cd<_0x2efe48[_0x416d63]['markersEnd']['length'];_0x36b7cd++){const _0x5fe69=_0x2efe48[_0x416d63]['markersEnd'][_0x36b7cd];if(!_0x2d1c0d['has'](_0x5fe69))continue;const {group:_0x3aec5e,type:_0xb0e223}=_0x44c982(_0x5fe69);if('revision-suggestion'!=_0x3aec5e||'insertion'!=_0xb0e223&&'deletion'!=_0xb0e223)continue;_0x2efe48[_0x416d63]['markersEnd']['splice'](_0x36b7cd,0x1),_0x36b7cd--;const _0xaaf03c=_0x2d4d01['findIndex'](_0x5a1d48=>_0x5a1d48['name']==_0x5fe69);_0xaaf03c>-0x1&&_0x2d4d01['splice'](_0xaaf03c,0x1);}}function _0x44c982(_0x528cc4){const _0x51ec30=_0x528cc4['split'](':');return{'group':_0x51ec30[0x0],'type':_0x51ec30[0x1],'subType':_0x51ec30['length']>=0x5?_0x51ec30[0x2]:null,'id':_0x51ec30['length']<0x5?_0x51ec30[0x2]:_0x51ec30[0x3],'authorId':_0x51ec30['length']<0x5?_0x51ec30[0x3]:_0x51ec30[0x4],'markerCount':0x6==_0x51ec30['length']?_0x51ec30[0x5]:null};}function _0x20c8a5(_0x5e4476){for(let _0x5a57eb=0x0;_0x5a57eb<_0x2d4d01['length'];_0x5a57eb++){if(_0x5e4476['isAdded']&&'insertion'==_0x2d4d01[_0x5a57eb]['type'])return _0x5e4476['isAddSuggestion']=_0x2d4d01[_0x5a57eb],void delete _0x5e4476['isAdded'];if(!_0x5e4476['isAdded']&&!_0x5e4476['isRemoved']&&'deletion'==_0x2d4d01[_0x5a57eb]['type'])return void(_0x5e4476['isRemoveSuggestion']=_0x2d4d01[_0x5a57eb]);}}}['_setDistance'](_0x94a7a6,_0x3c3e9a){let _0x2fcdd6=0x0,_0x16ac77=!0x1;const _0x428516=new Map();for(const _0x439de3 of _0x94a7a6)_0x439de3[_0x3c3e9a]?_0x16ac77&&(_0x2fcdd6++,_0x16ac77=!0x1):(_0x2fcdd6++,_0x16ac77=!0x0),_0x428516['set'](_0x439de3['id'],_0x2fcdd6);for(let _0x757246=0x0;_0x757246<_0x94a7a6['length'];_0x757246++){if('isRemoved'==_0x3c3e9a&&_0x94a7a6[_0x757246]['isAdded']||'isAdded'==_0x3c3e9a&&_0x94a7a6[_0x757246]['isRemoved'])continue;if('text'==_0x94a7a6[_0x757246]['type']){_0x94a7a6[_0x757246]['distance']=0x0;continue;}const _0x55e113=_0x428516['get'](_0x94a7a6[_0x757246]['pairId']),_0x7aa63d=_0x428516['get'](_0x94a7a6[_0x757246]['id']);_0x94a7a6[_0x757246]['distance']=_0x55e113-_0x7aa63d;}}['_getRevisionsRange'](_0x3b2f65,_0x502fdb,_0x3bf153=!0x1){const _0x40bd8b=[];let _0x16dc27=this['repository']['getIndex'](_0x3b2f65),_0x4c4d52=this['repository']['getIndex'](_0x502fdb);for(-0x1==_0x4c4d52&&(_0x4c4d52=this['repository']['_revisions']['length'],_0x3bf153=!0x1);_0x16dc27<_0x4c4d52;)_0x40bd8b['push'](this['repository']['getRevision'](_0x16dc27)),_0x16dc27++;return _0x3bf153&&_0x40bd8b['push'](this['repository']['getRevision'](_0x16dc27)),_0x40bd8b;}['_threeWayMerge'](_0x375635,_0x1e1a62,_0xb0f639,_0x8b59af){const _0x27102a=this['editor']['model']['schema'];let _0xbe02ba=_0x1e1a62;for(;_0x375635[_0xbe02ba]&&_0x375635[_0xbe02ba]['isAdded'];)_0xbe02ba++;let _0xa9bff4=_0x8b59af;for(;_0xb0f639[_0xa9bff4]&&_0xb0f639[_0xa9bff4]['isRemoved'];)_0xa9bff4++;_0x21ad57(_0x375635,_0x1e1a62,_0xbe02ba),_0x21ad57(_0xb0f639,_0x8b59af,_0xa9bff4);const _0x346f27=_0xb0f639['slice'](_0x8b59af,_0xa9bff4)['concat'](_0x375635['slice'](_0x1e1a62,_0xbe02ba));return _0x346f27['sort']((_0x1a0f5f,_0x5cd3f0)=>_0x1a0f5f['side']!=_0x5cd3f0['side']?_0x1a0f5f['side']-_0x5cd3f0['side']:_0x1a0f5f['level']!=_0x5cd3f0['level']?_0x1a0f5f['level']-_0x5cd3f0['level']:_0x1a0f5f['distance']!=_0x5cd3f0['distance']?_0x5cd3f0['distance']-_0x1a0f5f['distance']:!!_0x1a0f5f['isAdded']!=!!_0x5cd3f0['isAdded']?-0x1==_0x1a0f5f['side']||0x0==_0x1a0f5f['side']?_0x1a0f5f['isAdded']?-0x1:0x1:_0x1a0f5f['isAdded']?0x1:-0x1:_0x1a0f5f['index']-_0x5cd3f0['index']),{'commonTape':_0x346f27,'iEnd':_0xbe02ba,'jEnd':_0xa9bff4};function _0x21ad57(_0x45c19d,_0x3a54f7,_0x833fd3){let _0x32c4b9=-0x1,_0x4b3d80=Number['POSITIVE_INFINITY'],_0x3fd4e6=!0x0;for(let _0x4e3fbb=_0x3a54f7;_0x4e3fbb<_0x833fd3;_0x4e3fbb++)if(_0x27102a['isInline'](_0x45c19d[_0x4e3fbb]['item'])||(_0x3fd4e6=!0x1),_0x45c19d[_0x4e3fbb]['item']['startIndex']<_0x3a54f7&&(_0x32c4b9=_0x4e3fbb),_0x45c19d[_0x4e3fbb]['item']['endIndex']>=_0x833fd3){_0x4b3d80=_0x4e3fbb;break;}_0x3fd4e6&&(_0x32c4b9=_0x833fd3-0x1);for(let _0x47629d=_0x3a54f7;_0x47629d<_0x833fd3;_0x47629d++)_0x45c19d[_0x47629d]['side']=_0x47629d<=_0x32c4b9?-0x1:_0x47629d<_0x4b3d80?0x0:0x1,_0x45c19d[_0x47629d]['index']=_0x47629d;let _0x12cf3c=0x0;for(let _0x4b2850=_0x3a54f7;_0x4b2850<=_0x32c4b9;_0x4b2850++)0x0==_0x45c19d[_0x4b2850]['distance']?_0x45c19d[_0x4b2850]['level']=_0x12cf3c:(_0x12cf3c++,_0x45c19d[_0x4b2850]['level']=_0x12cf3c,_0x12cf3c++);for(let _0x5b3048=_0x3a54f7;_0x5b3048<_0x833fd3;_0x5b3048++)0x0==_0x45c19d[_0x5b3048]['side']&&(_0x45c19d[_0x5b3048]['level']=_0x12cf3c);_0x12cf3c=0x0;for(let _0x534bba=_0x833fd3-0x1;_0x534bba>=_0x4b3d80;_0x534bba--)0x0==_0x45c19d[_0x534bba]['distance']?_0x45c19d[_0x534bba]['level']=_0x12cf3c:(_0x12cf3c--,_0x45c19d[_0x534bba]['level']=_0x12cf3c,_0x12cf3c--);}}['_fixObsoleteTags'](_0x5e82a5){const _0x44cd62=new Map(),_0xfc7667=this['editor']['model']['schema'];for(let _0x1cc1cf=0x1;_0x1cc1cf<_0x5e82a5['length'];_0x1cc1cf++){let _0x367c3e,_0x27b5d7,_0x3b7245;const _0x169856=_0x5e82a5[_0x1cc1cf],_0x2956d4=_0x5e82a5[_0x1cc1cf-0x1];if('text'==_0x169856['type'])continue;if(_0x169856['type']!=_0x2956d4['type'])continue;if(!_0xfc7667['isBlock'](_0x2956d4['item'])||_0xfc7667['isLimit'](_0x2956d4['item']))continue;if(!_0xfc7667['isBlock'](_0x169856['item'])||_0xfc7667['isLimit'](_0x169856['item']))continue;if((_0x5e82a5[_0x1cc1cf]['isAdded']||_0x5e82a5[_0x1cc1cf]['isAddSuggestion'])&&_0x5e82a5[_0x1cc1cf-0x1]['isRemoved'])_0x367c3e=_0x5e82a5[_0x1cc1cf],_0x27b5d7=_0x5e82a5[_0x1cc1cf-0x1],_0x3b7245=_0x1cc1cf-0x1;else{if(!_0x5e82a5[_0x1cc1cf]['isRemoved']||!_0x5e82a5[_0x1cc1cf-0x1]['isAdded']&&!_0x5e82a5[_0x1cc1cf-0x1]['isAddSuggestion'])continue;_0x367c3e=_0x5e82a5[_0x1cc1cf-0x1],_0x27b5d7=_0x5e82a5[_0x1cc1cf],_0x3b7245=_0x1cc1cf;}const _0x569e78=_0x367c3e['level']==_0x27b5d7['level'],_0xdc9a30=Math['abs'](_0x367c3e['level'])<Math['abs'](_0x27b5d7['level'])&&0x0==_0x27b5d7['distance'];(_0x569e78||_0xdc9a30)&&(_0x44cd62['set'](_0x27b5d7['id'],_0x367c3e['id']),_0x5e82a5['splice'](_0x3b7245,0x1),_0x1cc1cf--,_0x367c3e['isAdded']=!0x1);}for(let _0x299ecb=0x0;_0x299ecb<_0x5e82a5['length'];_0x299ecb++)_0x44cd62['has'](_0x5e82a5[_0x299ecb]['pairId'])&&(_0x5e82a5[_0x299ecb]['pairId']=_0x44cd62['get'](_0x5e82a5[_0x299ecb]['pairId']));}['_removeMissingPairs'](_0x42775e){const _0x2c04c9=new Set(_0x42775e['map'](_0x4739cc=>_0x4739cc['id']));for(let _0x7cf985=0x0;_0x7cf985<_0x42775e['length'];_0x7cf985++)_0x2c04c9['has'](_0x42775e[_0x7cf985]['pairId'])||0x0==_0x42775e[_0x7cf985]['distance']||(_0x42775e[_0x7cf985]['isIncorrect']=!0x0);return _0x42775e['filter'](_0x33e819=>!_0x33e819['isIncorrect']);}['_markMismatchedRemovedTags'](_0x5a14f8){const _0x2fb6af=new Set();for(let _0x172903=0x0;_0x172903<_0x5a14f8['length'];_0x172903++){if(_0x2fb6af['has'](_0x5a14f8[_0x172903]['id'])&&_0x5a14f8[_0x172903]['isRemoved']&&(_0x5a14f8[_0x172903]['isIncorrect']=!0x0),_0x5a14f8[_0x172903]['isIncorrect'])continue;if(0x0==_0x5a14f8[_0x172903]['distance'])continue;if('elementStart'!=_0x5a14f8[_0x172903]['type'])continue;if(null==_0x5a14f8[_0x172903]['pairId'])continue;let _0x495fd1=_0x172903+0x1,_0x20005b=0x0;for(;_0x5a14f8[_0x495fd1]['id']!=_0x5a14f8[_0x172903]['pairId'];)'elementStart'==_0x5a14f8[_0x495fd1]['type']?_0x20005b++:'elementEnd'==_0x5a14f8[_0x495fd1]['type']&&_0x20005b--,_0x495fd1++;if(0x0!=_0x20005b){if(_0x5a14f8[_0x172903]['isRemoved'])_0x5a14f8[_0x172903]['isIncorrect']=!0x0;else{for(;_0x495fd1!=_0x172903;)_0x5a14f8[_0x495fd1]['isRemoved']&&0x0!=_0x5a14f8[_0x495fd1]['distance']&&(_0x5a14f8[_0x495fd1]['isIncorrect']=!0x0,_0x2fb6af['add'](_0x5a14f8[_0x495fd1]['pairId'])),_0x495fd1--;}}}return _0x5a14f8['filter'](_0x39a14d=>!_0x39a14d['isIncorrect']);}['_removeUnsupportedChanges'](_0x4d127a){const _0x564df8=this['editor']['model']['schema'];for(let _0xc96b55=0x0;_0xc96b55<_0x4d127a['length'];_0xc96b55++){if(!(_0x4d127a[_0xc96b55]['isAdded']||_0x4d127a[_0xc96b55]['isAddSuggestion']||_0x4d127a[_0xc96b55]['isRemoved']||_0x4d127a[_0xc96b55]['isRemoveSuggestion']))continue;if(0x0==_0x4d127a[_0xc96b55]['distance'])continue;const _0x14e051=_0x4d127a[_0xc96b55]['item'];_0x564df8['isBlock'](_0x14e051)||_0x564df8['isLimit'](_0x14e051)||(_0x4d127a[_0xc96b55]['isAdded']&&delete _0x4d127a[_0xc96b55]['isAdded'],_0x4d127a[_0xc96b55]['isAddSuggestion']&&delete _0x4d127a[_0xc96b55]['isAddSuggestion'],_0x4d127a[_0xc96b55]['isRemoveSuggestion']&&delete _0x4d127a[_0xc96b55]['isRemoveSuggestion'],_0x4d127a[_0xc96b55]['isRemoved']&&(_0x4d127a[_0xc96b55]['isIncorrect']=!0x0));}return _0x4d127a['filter'](_0xc79cea=>!_0xc79cea['isIncorrect']);}['_makeModelFromTape'](_0x5f1936,_0x5e7781,_0x3d9038){const _0x214bbd=new gt(),_0x13f1de=[],_0x5e54bc=new Map(),_0x4b8005=this['editor']['model'],_0x48f758=_0x4b8005['schema'],_0x5c7a37=[_0x214bbd],_0x45689c={},_0x11e2cf={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5ced17=null;const _0x30456d=[0x0];for(let _0x8b81b0=0x0;_0x8b81b0<_0x5f1936['length'];_0x8b81b0++)if('elementStart'===_0x5f1936[_0x8b81b0]['type']){_0x5f1936[_0x8b81b0]['previousPosition']=_0x4b8005['createPositionFromPath'](_0x214bbd,_0x30456d);const _0x547745=new ut(_0x5f1936[_0x8b81b0]['item']['name'],_0x5f1936[_0x8b81b0]['item']['getAttributes']());_0x5c7a37[0x0]['_appendChild'](_0x547745),_0x30456d['push'](0x0),_0x5c7a37['unshift'](_0x547745),_0x5f1936[_0x8b81b0]['nextPosition']=_0x4b8005['createPositionFromPath'](_0x214bbd,_0x30456d);}else'elementEnd'===_0x5f1936[_0x8b81b0]['type']?(_0x5c7a37['shift'](),_0x5f1936[_0x8b81b0]['previousPosition']=_0x4b8005['createPositionFromPath'](_0x214bbd,_0x30456d),_0x30456d['pop'](),_0x30456d[_0x30456d['length']-0x1]++,_0x5f1936[_0x8b81b0]['nextPosition']=_0x4b8005['createPositionFromPath'](_0x214bbd,_0x30456d)):(_0x5f1936[_0x8b81b0]['previousPosition']=_0x4b8005['createPositionFromPath'](_0x214bbd,_0x30456d),_0x5ced17?_0x5ced17['_data']+=_0x5f1936[_0x8b81b0]['item']['data']:_0x5ced17=new wt(_0x5f1936[_0x8b81b0]['item']['data'],_0x5f1936[_0x8b81b0]['item']['getAttributes']()),_0x5f1936[_0x8b81b0+0x1]&&'text'===_0x5f1936[_0x8b81b0+0x1]['type']&&_0x25cb49(_0x5ced17,_0x5f1936[_0x8b81b0+0x1]['item'])||(_0x5c7a37[0x0]['_appendChild'](_0x5ced17),_0x5ced17=null),_0x30456d[_0x30456d['length']-0x1]+=_0x5f1936[_0x8b81b0]['item']['offsetSize'],_0x5f1936[_0x8b81b0]['nextPosition']=_0x4b8005['createPositionFromPath'](_0x214bbd,_0x30456d));for(let _0x4aa88d=0x0;_0x4aa88d<_0x5f1936['length'];_0x4aa88d++){const _0xb20e42=_0x5f1936[_0x4aa88d]['previousPosition'],_0x2c201c=_0x5f1936[_0x4aa88d]['nextPosition'];for(const _0x17e04e of _0x5f1936[_0x4aa88d]['markersStart'])_0x5e54bc['set'](_0x17e04e,{'start':_0xb20e42,'end':null});_0x12bcc8('isRemoveSuggestion',_0x4aa88d,_0xb20e42,_0x2c201c),_0x12bcc8('isAddSuggestion',_0x4aa88d,_0xb20e42,_0x2c201c),_0x12bcc8('isRemoved',_0x4aa88d,_0xb20e42,_0x2c201c),_0x12bcc8('isAdded',_0x4aa88d,_0xb20e42,_0x2c201c);for(const _0x3d2290 of _0x5f1936[_0x4aa88d]['markersEnd']){_0x5e54bc['get'](_0x3d2290)['end']=_0x2c201c;}}for(const [_0x50a0ab,_0x2dc001]of _0x5e54bc){const _0x5898b6=this['editor']['model']['createRange'](_0x2dc001['start'],_0x2dc001['end']);_0x214bbd['markers']['set'](_0x50a0ab,_0x5898b6);}return _0x13f1de['sort']((_0x416b42,_0x5ca3a5)=>{const _0x149cf0=_0x214bbd['markers']['get']('revision:'+_0x416b42['id']),_0xb23c5e=_0x214bbd['markers']['get']('revision:'+_0x5ca3a5['id']);return _0x149cf0['start']['isBefore'](_0xb23c5e['start'])?-0x1:_0x149cf0['start']['isAfter'](_0xb23c5e['start'])?0x1:_0x149cf0['end']['isBefore'](_0xb23c5e['end'])?-0x1:_0x149cf0['end']['isAfter'](_0xb23c5e['end'])?0x1:'add'===_0x416b42['type']?-0x1:0x1;}),{'root':_0x214bbd,'changes':_0x13f1de};function _0x12bcc8(_0xb03de9,_0x38b791,_0x149cf3,_0x33eea2){const _0x1a6eff=!!_0x5f1936[_0x38b791][_0xb03de9],_0x50ee74=_0x1a6eff?_0x5f1936[_0x38b791][_0xb03de9]['userId']:null,_0x82ba5d=_0x38b791===_0x5f1936['length']-0x1,_0x552ea5=_0x11e2cf[_0xb03de9][0x0],_0xe3ea18=_0x48f758['isObject'](_0x5f1936[_0x38b791]['item']);!_0x45689c[_0xb03de9]&&_0x1a6eff?_0x45689c[_0xb03de9]={'start':_0x149cf3,'tapeItem':_0x5f1936[_0x38b791],'userId':_0x50ee74,'type':_0xb03de9}:_0x45689c[_0xb03de9]&&!_0x1a6eff?(_0x45689c[_0xb03de9]['end']=_0x149cf3,_0x2f30a8(_0x45689c[_0xb03de9]),_0x45689c[_0xb03de9]=null):_0x45689c[_0xb03de9]&&_0x1a6eff&&_0x45689c[_0xb03de9]['userId']!==_0x50ee74&&(_0x45689c[_0xb03de9]['end']=_0x149cf3,_0x552ea5&&_0x552ea5['userId']===_0x45689c[_0xb03de9]['userId']||_0x2f30a8(_0x45689c[_0xb03de9]),_0x45689c[_0xb03de9]={'start':_0x149cf3,'tapeItem':_0x5f1936[_0x38b791],'userId':_0x50ee74,'type':_0xb03de9}),_0x45689c[_0xb03de9]&&_0xe3ea18&&('elementStart'!==_0x5f1936[_0x38b791]['type']||_0x552ea5&&_0x552ea5['userId']===_0x50ee74||_0x11e2cf[_0xb03de9]['unshift']({'userId':_0x50ee74,'object':_0x5f1936[_0x38b791]['item'],'change':_0x45689c[_0xb03de9]}),'elementEnd'===_0x5f1936[_0x38b791]['type']&&_0x552ea5&&_0x552ea5['object']===_0x5f1936[_0x38b791]['item']&&(_0x11e2cf[_0xb03de9]['shift'](),_0x45689c[_0xb03de9]=_0x552ea5['change'])),_0x45689c[_0xb03de9]&&_0x82ba5d&&(_0x45689c[_0xb03de9]['end']=_0x33eea2,_0x2f30a8(_0x45689c[_0xb03de9]),_0x45689c[_0xb03de9]=null);}function _0x2f30a8({start:_0x17a398,end:_0x47f1cd,tapeItem:_0x3a6a70,userId:_0x1d821f,type:_0x42fff8}){const _0x2fca3a=_0x3a6a70['item'],_0x22661a=_0x4b8005['schema']['isBlock'](_0x2fca3a)&&!_0x4b8005['schema']['isLimit'](_0x2fca3a),_0x79c6bd=_0x17a398['nodeAfter']==_0x47f1cd['parent']&&_0x47f1cd['isAtStart'];if(_0x22661a&&_0x79c6bd)return;const _0x1c6c8a=_0x4b8005['createRange'](_0x17a398,_0x47f1cd),_0x252fe8=_0x5e7781['get'](_0x1d821f),_0x2fc144=new r({'author':_0x252fe8,'type':'isAdded'==_0x42fff8||'isAddSuggestion'==_0x42fff8?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x42fff8||'isRemoveSuggestion'==_0x42fff8},'createdAt':new Date(),'rootName':_0x3d9038});_0x13f1de['push'](_0x2fc144),_0x214bbd['markers']['set']('revision:'+_0x2fc144['id'],_0x1c6c8a);}function _0x25cb49(_0x1c08b3,_0x25d4c6){const _0x4d3156=_0x1c08b3['getAttributes'](),_0x368041=_0x25d4c6['getAttributes']();for(const _0x1db7da of _0x4d3156){if(_0x1db7da[0x1]!==_0x25d4c6['getAttribute'](_0x1db7da[0x0]))return!0x1;_0x368041['next']();}return _0x368041['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1d1985=>{const _0x149fd1=_0x1d1985['markerName']['split'](':')[0x1],_0x2c7d87=this['_getChangeFromId'](_0x149fd1);if(!_0x2c7d87)return null;const _0x11fb91='add'==_0x2c7d87['type']?'insertion':'deletion',_0x3295b0=['ck-suggestion-marker','ck-suggestion-marker-'+_0x11fb91];return _0x2c7d87['data']['isSuggestion']&&_0x3295b0['push']('ck-suggestion-marker-'+_0x11fb91+'-new'),this['activeChange']==_0x2c7d87&&_0x3295b0['push']('ck-suggestion-marker--active'),{'classes':_0x3295b0,'attributes':{'data-change-id':_0x149fd1}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x4f5302=>{_0x4f5302['on']('element:pre',(_0x1dc964,_0x445be2,_0x4948b4)=>{const _0x30fcd3=_0x445be2['viewItem']['getChild'](0x0);if(!_0x30fcd3||!_0x30fcd3['is']('element','code'))return;if(!_0x4948b4['consumable']['consume'](_0x30fcd3,{'attributes':['vid_start','vid_end']}))return;const _0x4002da=_0x445be2['modelRange']['start']['nodeAfter'];_0x4948b4['writer']['setAttribute']('vid_start',_0x30fcd3['getAttribute']('vid_start'),_0x4002da),_0x4948b4['writer']['setAttribute']('vid_end',_0x30fcd3['getAttribute']('vid_end'),_0x4002da);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x298b46=>{_0x298b46['on']('element',(_0x42db0d,_0x3e6e65,_0x171549)=>{if(!_0x171549['consumable']['consume'](_0x3e6e65['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3e6e65['modelRange']['isCollapsed'])return;const _0x44843a=_0x3e6e65['modelRange']['start']['nodeAfter'];_0x44843a['hasAttribute']('vid_start')||_0x44843a['hasAttribute']('vid')||(_0x171549['writer']['setAttribute']('vid_start',_0x3e6e65['viewItem']['getAttribute']('vid_start'),_0x44843a),_0x171549['writer']['setAttribute']('vid_end',_0x3e6e65['viewItem']['getAttribute']('vid_end'),_0x44843a));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1b5473=>_0x1b5473['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x184a13,[,_0x4efbc3])=>{['vid_start','vid_end','vid']['includes'](_0x4efbc3)&&(_0x184a13['return']=!0x0,_0x184a13['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x884795=>{_0x884795['on']('attribute:vid',(_0x282d1f,_0x2348f9,_0x3e4619)=>{if('\x20'!=_0x2348f9['item']['data']||_0x2348f9['item']['parent']['maxOffset']>0x1)return;if(!_0x3e4619['consumable']['consume'](_0x2348f9['item'],_0x282d1f['name']))return;const _0xc5e83a=_0x3e4619['writer'],_0x26278a=_0x3e4619['mapper']['toViewRange'](_0x2348f9['range']);_0xc5e83a['wrap'](_0x26278a,_0xc5e83a['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x179558){const _0x435c8b=_0x179558['plugins']['get']('RevisionViewer');return(_0x54a067,_0x4b1ebc,_0x112bbf)=>{const _0x326c4f=_0x4b1ebc['markerName']['split'](':')[0x1],_0x9f050f=_0x435c8b['_getChangeFromId'](_0x326c4f);if(!_0x9f050f)return null;const _0x330320='add'==_0x9f050f['type']?'split':'merge';if(!_0x112bbf['consumable']['test'](_0x4b1ebc['markerRange'],_0x54a067['name']))return;const _0x4ad916=_0x4b1ebc['markerRange']['getWalker'](),_0x1d7626=_0x4b1ebc['markerRange']['start'],_0x420ba5=_0x179558['model']['schema'];let _0x100663=null,_0x314555=null,_0x2dfea2=!0x1,_0x141b86=!0x1;for(const _0x362319 of _0x4ad916){const _0x3cf2de=_0x362319['item'];_0x2dfea2=_0x2dfea2||_0x420ba5['isContent'](_0x3cf2de);const _0x45a89f=_0x112bbf['mapper']['toViewElement'](_0x3cf2de);if(_0x45a89f&&_0x45a89f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x362319['type']&&(_0x420ba5['isBlock'](_0x3cf2de)&&!_0x420ba5['isLimit'](_0x3cf2de)&&(_0x3cf2de['nextSibling']||_0x1d7626['isAtEnd']?_0x100663&&_0x100663['parent']==_0x3cf2de||(_0x100663=_0x3cf2de,_0x1910fe(_0x362319['previousPosition']),_0x141b86=!0x0):_0x314555=_0x314555||_0x362319['previousPosition']));}function _0x1910fe(_0x5f98a6){const _0x43b864=_0x112bbf['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x330320}),_0x5d98c6=_0x112bbf['mapper']['toViewPosition'](_0x5f98a6);_0x9f050f['data']['isSuggestion']&&_0x112bbf['writer']['addClass']('ck-suggestion-marker-'+_0x330320+'-new',_0x43b864),_0x435c8b['activeChange']==_0x9f050f&&_0x112bbf['writer']['addClass']('ck-suggestion-marker--active',_0x43b864),_0x112bbf['writer']['insert'](_0x5d98c6,_0x43b864),_0x112bbf['mapper']['bindElementToMarker'](_0x43b864,_0x4b1ebc['markerName']);}_0x2dfea2||_0x141b86||!_0x314555||_0x1910fe(_0x314555);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x11cb20,_0x18cb4c,_0x4b0dd9)=>{const _0x1e3dc4=_0x4b0dd9['mapper']['markerNameToElements'](_0x18cb4c['markerName']);if(_0x1e3dc4){for(const _0x1e3928 of _0x1e3dc4)(_0x1e3928['hasClass']('ck-suggestion-marker-split')||_0x1e3928['hasClass']('ck-suggestion-marker-merge'))&&(_0x4b0dd9['mapper']['unbindElementFromMarkerName'](_0x1e3928,_0x18cb4c['markerName']),_0x4b0dd9['writer']['remove'](_0x1e3928));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4c6ef8,_0x10ba0e,_0x438598)=>{const _0x362b93=_0x10ba0e['markerName']['split'](':')[0x1],_0x2b4d07=this['_getChangeFromId'](_0x362b93);if(!_0x2b4d07)return null;const _0x2b4f5a='add'==_0x2b4d07['type']?'split':'merge';if(_0x438598['consumable']['test'](_0x10ba0e['markerRange'],_0x4c6ef8['name']))for(const _0x35bf36 of _0x10ba0e['markerRange']['getItems']()){if(!_0x35bf36['is']('element','softBreak'))continue;const _0x11b7c7=_0x438598['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2b4f5a}),_0x50f5d4=_0x438598['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x35bf36));_0x2b4d07['data']['isSuggestion']&&_0x438598['writer']['addClass']('ck-suggestion-marker-'+_0x2b4f5a+'-new',_0x11b7c7),this['activeChange']==_0x2b4d07&&_0x438598['writer']['addClass']('ck-suggestion-marker--active',_0x11b7c7),_0x438598['writer']['insert'](_0x50f5d4,_0x11b7c7),_0x438598['mapper']['bindElementToMarker'](_0x11b7c7,_0x10ba0e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x559bb2=>{for(const _0x1be892 of this['editor']['model']['document']['getRootNames']()){const _0x3eaa9a=this['editor']['model']['document']['getRoot'](_0x1be892),_0x36d5ca=this['editor']['editing']['view']['document']['getRoot'](_0x1be892);if(_0x36d5ca){const _0x19b3bb=_0x3eaa9a['getAttribute']('revisionHistoryAttachChange');if(_0x559bb2['removeAttribute']('data-change-id',_0x36d5ca),_0x559bb2['removeClass']('ck-revision-history-root-add',_0x36d5ca),_0x559bb2['removeClass']('ck-revision-history-root-remove',_0x36d5ca),_0x559bb2['removeClass']('ck-revision-history-root--active',_0x36d5ca),_0x19b3bb){const _0x5468b3=this['_getChangeFromId'](_0x19b3bb);if(!_0x5468b3)return null;_0x559bb2['setAttribute']('data-change-id',_0x19b3bb,_0x36d5ca),_0x559bb2['addClass']('ck-revision-history-root-'+_0x5468b3['type'],_0x36d5ca),this['activeChange']==_0x5468b3&&_0x559bb2['addClass']('ck-revision-history-root--active',_0x36d5ca);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x26bd2d=>'revision-comment:'+_0x26bd2d,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x3d98cd=>'revision-suggestion:'+_0x3d98cd,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4aafab=>({'name':'suggestion:'+_0x4aafab,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xccb8cd=>{const _0x2b58d2=_0xccb8cd['markerName']['split'](':')[0x1];return'insertion'!=_0x2b58d2&&'deletion'!=_0x2b58d2?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2b58d2]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x222f28,_0x437aa4,_0x17fa39)=>{const _0x46e58d=_0x17fa39['mapper']['markerNameToElements'](_0x437aa4['markerName']);if(_0x46e58d){for(const _0x3ac8b6 of _0x46e58d)_0x3ac8b6['is']('uiElement')&&(_0x17fa39['mapper']['unbindElementFromMarkerName'](_0x3ac8b6,_0x437aa4['markerName']),_0x17fa39['writer']['remove'](_0x3ac8b6));}},{'priority':'high'});}['_getChangeFromId'](_0x5721f7){return this['_changeIdToChange']['get'](_0x5721f7);}['_getViewForChange'](_0x54cfa0){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x54cfa0),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x27758b,_0x566639,_0x4e5f17,_0x2769a0)=>{_0x2769a0&&this['_balloon']['remove'](_0x2769a0),_0x4e5f17&&(this['_balloon']['add']({'view':_0x4e5f17,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0xa17be9=this['editor']['editing'],_0x1237d6=this['_getChangeFromId'](_0x4e5f17['changeId']);let _0x211db5;if(_0x1237d6['data']['isOnRoot']){const _0x479574=_0xa17be9['view']['getDomRoot'](_0x1237d6['rootName']);_0x211db5=Array['from'](_0x479574['getClientRects']());}else{const _0xd4c00f=this['editor']['model']['markers']['get']('revision:'+_0x4e5f17['changeId']);_0x211db5=Array['from'](_0xa17be9['mapper']['markerNameToElements'](_0xd4c00f['name']))['map'](_0x2a3a81=>_0xa17be9['view']['domConverter']['mapViewToDom'](_0x2a3a81))['map'](_0x4587b3=>Array['from'](_0x4587b3['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x211db5[0x0];return _0x211db5['find'](_0x369b5a=>_0x369b5a['top']-0x3<=this['_activeViewTarget']['y']&&_0x369b5a['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x369b5a['left']-0x3<=this['_activeViewTarget']['x']&&_0x369b5a['right']+0x3>=this['_activeViewTarget']['x'])||_0x211db5[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5ee28e,_0x4b2809,_0x3783e3,_0x4d3885)=>{this['activeView']=_0x3783e3?this['_getViewForChange'](_0x3783e3):null,this['editor']['model']['change'](()=>{const _0x38b358=this['editor']['editing'];_0x4d3885&&(_0x4d3885['data']['isOnRoot']?_0x38b358['view']['change'](_0xc2acb2=>{_0xc2acb2['removeClass']('ck-revision-history-root--active',_0x38b358['view']['document']['getRoot'](_0x4d3885['rootName']));}):_0x38b358['reconvertMarker']('revision:'+_0x4d3885['id'])),_0x3783e3&&(_0x3783e3['data']['isOnRoot']?_0x38b358['view']['change'](_0x41609a=>{_0x41609a['addClass']('ck-revision-history-root--active',_0x38b358['view']['document']['getRoot'](_0x3783e3['rootName']));}):_0x38b358['reconvertMarker']('revision:'+_0x3783e3['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x50a6cf,_0x4eeb05)=>{if(this['activeChange'])return;const _0x33d835=this['_findChangeIdFromDomTarget'](_0x4eeb05['target']),_0x18928f=this['_changeIdToChange']['get'](_0x33d835);_0x18928f?(this['_activeViewTarget']={'x':_0x4eeb05['domEvent']['x'],'y':_0x4eeb05['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x18928f)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x626d92,_0x4e99b0)=>{const _0x1b6044=this['_findChangeIdFromDomTarget'](_0x4e99b0['target']),_0x9897f0=this['_changeIdToChange']['get'](_0x1b6044);_0x9897f0?(this['_activeViewTarget']={'x':_0x4e99b0['domEvent']['x'],'y':_0x4e99b0['domEvent']['y']},_0x9897f0===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x9897f0):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x3e6814){do{const _0x24fb31=_0x3e6814['getAttribute']('data-change-id');if(_0x24fb31)return _0x24fb31;_0x3e6814=_0x3e6814['parent'];}while(_0x3e6814);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x42975a=>{for(const _0x166593 of this['editor']['model']['markers'])_0x42975a['removeMarker'](_0x166593);});}}function Z(_0x27ed73,_0xb49c2a){return(_0x45bd42,_0x4958c0,_0x18301e)=>{if(!_0x18301e['consumable']['test'](_0x4958c0['markerRange'],_0x45bd42['name']))return;const _0x2c550c=_0x4958c0['markerRange']['getWalker'](),_0x574815=_0x4958c0['markerRange']['start'],_0x2af4cf=_0x27ed73['model']['schema'];let _0x389149=null,_0x2bffa9=null,_0x2f440f=!0x1,_0x4badb2=!0x1;for(const _0x2fdec2 of _0x2c550c){const _0x32d751=_0x2fdec2['item'];_0x2f440f=_0x2f440f||_0x2af4cf['isContent'](_0x32d751);const _0xc2432f=_0x18301e['mapper']['toViewElement'](_0x32d751);if(_0xc2432f&&_0xc2432f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2fdec2['type']&&(_0x2af4cf['isBlock'](_0x32d751)&&!_0x2af4cf['isLimit'](_0x32d751)&&(_0x32d751['nextSibling']||_0x574815['isAtEnd']?_0x389149&&_0x389149['parent']==_0x32d751||(_0x389149=_0x32d751,_0x143e80(_0x2fdec2['previousPosition']),_0x4badb2=!0x0):_0x2bffa9=_0x2bffa9||_0x2fdec2['previousPosition']));}function _0x143e80(_0x17a6c6){const _0xf28355=_0x18301e['mapper']['toViewPosition'](_0x17a6c6),_0xc80c0b=_0x18301e['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0xb49c2a});_0x18301e['writer']['insert'](_0xf28355,_0xc80c0b),_0x18301e['mapper']['bindElementToMarker'](_0xc80c0b,_0x4958c0['markerName']);}_0x2f440f||_0x4badb2||!_0x2bffa9||_0x143e80(_0x2bffa9);};}class _t extends _0x233339{constructor(_0x4305dd){super(_0x4305dd);const _0x5dee17=_0x4305dd['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x5dee17,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5dee17,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x541438=this['editor'],_0x3d977f=_0x541438['plugins']['get'](d),_0x235bf7=_0x3d977f['isReady']?_0x3d977f['diff']['newRevisionId']:null;_0x541438['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x235bf7);}['refresh'](){const {isReady:_0x28acfe,isEnabled:_0x3ee55a,repository:_0x460274,diff:_0x33360b}=this['editor']['plugins']['get'](d),_0x58f8de=_0x33360b&&_0x460274['getLaterVisibleRevision'](_0x33360b['newRevisionId']);this['isEnabled']=_0x28acfe&&_0x3ee55a&&Boolean(_0x58f8de);}}class yt extends _0x233339{['_step'];constructor(_0x4c57fb,{direction:_0x3d3199}){super(_0x4c57fb);const _0xf330be=_0x4c57fb['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x3d3199?0x1:-0x1,this['listenTo'](_0xf330be,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xf330be,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0xf330be,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1f171a=this['editor'],_0x1be067=_0x1f171a['plugins']['get'](d),{isNavigationMode:_0x7925e,currentChangeNumber:_0x29172f}=_0x1be067;let _0x1ae80a;if(_0x1be067['activeChange']=_0x7925e?_0x1be067['diff']['changes']['get'](_0x29172f+this['_step']):_0x1be067['diff']['changes']['first'],_0x1be067['activeChange']['data']['isOnRoot'])_0x1ae80a=_0x1f171a['editing']['view']['getDomRoot'](_0x1be067['activeChange']['rootName']);else{const _0x341de8=_0x1f171a['model']['markers']['get']('revision:'+_0x1be067['activeChange']['id']);_0x1ae80a=_0x12c61c(_0x1f171a['editing'],_0x341de8);}_0x9531a1({'target':_0x1ae80a,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x45158b,currentChangeNumber:_0x45cab4,numberOfChanges:_0xb7ba57,isReady:_0x205f0b,isEnabled:_0x53c1e9}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x53c1e9&&_0x205f0b&&_0xb7ba57)&&(!_0x45158b||(0x1===this['_step']?_0x45cab4<_0xb7ba57-0x1:_0x45cab4>0x0));}}class _i extends _0x5c59b1{constructor(_0x1e5a03){super(_0x1e5a03);const _0x2903f4=this['bindTemplate'],_0x3e79fe=new _0x1514b3(_0x1e5a03),_0x20c7f8=new _0x1514b3(_0x1e5a03);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0xdca180,_0x2045bb)=>_0xdca180&&_0x2045bb>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0xc98491,_0x11bd43,_0x30e62c,_0x579eaa)=>{if(!_0xc98491)return m(_0x1e5a03,'Loading...');if(!_0x30e62c)return m(_0x1e5a03,'No\x20changes');const _0x1ffc67=m(_0x1e5a03,'NUMBER_OF_CHANGES',_0x30e62c);return _0x579eaa?m(_0x1e5a03,'X_OF_Y_CHANGES',[_0x11bd43+0x1,_0x30e62c]):_0x1ffc67;}),_0x3e79fe['set']({'label':m(_0x1e5a03,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1e91b5}),_0x20c7f8['set']({'label':m(_0x1e5a03,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x263d4b}),_0x3e79fe['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x20c7f8['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x3e79fe['on']('execute',()=>this['fire']('execute','backward')),_0x20c7f8['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x2903f4['if']('_isStatusLabelVisible','ck-hidden',_0x40c156=>!_0x40c156)]},'children':[{'text':_0x2903f4['to']('isNavigationMode',_0x1ba034=>_0x1ba034?m(_0x1e5a03,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x1e5a03,'Total')+':\x20')}]},{'text':_0x2903f4['to']('_statusText')}]},new _0x33a9ee(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x3e79fe,_0x20c7f8]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x26fb00{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1b9921=this['editor']['editing']['view'];_0x1b9921['change'](_0x38b28b=>{for(const _0x37674a of _0x1b9921['document']['roots'])_0x38b28b['addClass'](ce,_0x37674a);});}['hide'](){const _0x29e2b7=this['editor']['editing']['view'];_0x29e2b7['change'](_0x43471c=>{for(const _0x103fd1 of _0x29e2b7['document']['roots'])_0x43471c['removeClass'](ce,_0x103fd1);});}}class w extends _0x26fb00{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x336215=this['editor'],_0x88d382=_0x336215['plugins']['get'](d),_0x1334a0=_0x336215['plugins']['get'](le);_0x336215['ui']['componentFactory']['add']('exitToEditing',_0x61ec35=>{const _0x3311f8=new _0x1514b3(_0x61ec35);return _0x3311f8['set']({'label':m(_0x61ec35,'Back\x20to\x20editing'),'icon':_0x4f97fe,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3311f8,'execute',()=>{_0x336215['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3311f8;}),_0x336215['ui']['componentFactory']['add']('restoreRevision',_0x4b9dea=>{const _0x34adff=new _0x1514b3(_0x4b9dea);return _0x34adff['set']({'label':m(_0x4b9dea,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x34adff['bind']('isEnabled')['to'](_0x336215['commands']['get']('restoreRevision')),this['listenTo'](_0x34adff,'execute',()=>_0x336215['execute']('restoreRevision')),_0x34adff;}),_0x336215['ui']['componentFactory']['add']('changesNavigation',_0x4d39b6=>{const _0x494f40=new _i(_0x4d39b6),_0x3a3296=_0x336215['commands']['get']('showPreviousChange'),_0x466964=_0x336215['commands']['get']('showNextChange');return _0x494f40['bind']('isBackwardNavigationEnabled')['to'](_0x3a3296,'isEnabled'),_0x494f40['bind']('isForwardNavigationEnabled')['to'](_0x466964,'isEnabled'),_0x494f40['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x88d382),this['listenTo'](_0x494f40,'execute',(_0x47d69c,_0x2cfbc9)=>{_0x336215['execute']('forward'===_0x2cfbc9?'showNextChange':'showPreviousChange');}),_0x494f40;}),_0x1334a0['show'](),_0x88d382['on']('change:isReady',(_0x6598f4,_0x3c6c84,_0x1d2999)=>{_0x1d2999?_0x1334a0['hide']():_0x1334a0['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x48d938,_0x578270){super(_0x48d938,_0x578270);const _0x3b3bb1=this['bindTemplate'];this['set']({'label':m(_0x48d938,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x48d938,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3b3bb1['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5762a2=this['fieldView']['element'];this['_tooltipString']=_0x5762a2['scrollWidth']>_0x5762a2['clientWidth']&&_0x5762a2['value']||'';}}class oi extends _0x5c59b1{constructor(_0x5ebe95,_0x45aba9,_0x46acdf){super(_0x5ebe95);const _0x49d529=new _0x35e69b();_0x49d529['set']({'content':_0x409b87,'viewBox':'0\x200\x2011\x2010'});const _0x217ea5=['ck','ck-revision-history-sidebar__revision-author'];_0x46acdf&&_0x217ea5['push']('ck-revision-history-sidebar__revision-author_creator');const _0x19226a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x5ebe95,_0x46acdf?'Revision\x20creator':'Revision\x20author')},'children':[_0x49d529,_0x45aba9['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x217ea5},'children':_0x19226a});}}function ni(_0x545508,_0x478af9){const _0x278f47=_0x545508['bindTemplate'],_0x5a11b1=_0x545508['locale'],_0x46368d=_0x43bd05(_0x5a11b1);_0x46368d['panelPosition']='sw';const _0x2a4bae=function(_0xd8ad06,_0x384110){const _0x52b454=function(_0x3ecaf8,_0x2bcdb2){const _0x50f43b=_0x3ecaf8['locale'],_0x2ea541={'Compare\x20against\x20selected':m(_0x50f43b,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x50f43b,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x50f43b,'Restore\x20this\x20revision')};return _0x2bcdb2['map'](_0x350abf=>{const _0xa2ab3c=_0x2ea541[_0x350abf['name']];return _0xa2ab3c&&_0xa2ab3c!==_0x350abf['name']&&(_0x350abf['name']=_0xa2ab3c),_0x350abf;});}(_0xd8ad06,_0x384110),_0xa5f92a=new _0x8dad72();for(const _0x3baf92 of _0x52b454){const _0x3d4f64={'type':'button','model':new to({'label':_0x3baf92['name'],'class':_0x3baf92['class'],'withText':!0x0,'role':'menuitem','_action':_0x3baf92['action']})};_0x3d4f64['model']['bind']('isEnabled')['to'](_0xd8ad06,'isActionsDropdownOpen',_0x447ff2=>'function'!=typeof _0x3baf92['isEnabled']||(!_0x447ff2||_0x3baf92['isEnabled'](_0xd8ad06))),_0xa5f92a['add'](_0x3d4f64);}return _0xa5f92a;}(_0x545508,_0x478af9);return _0x545508['bind']('isActionsDropdownOpen')['to'](_0x46368d,'isOpen'),_0x46368d['buttonView']['set']({'label':m(_0x5a11b1,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3b73b4}),_0x46368d['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x278f47['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x278f47['to'](_0x12c55d=>_0x12c55d['stopPropagation']())}}),_0x46368d['on']('execute',_0x55dbe3=>{_0x545508['isReady']&&'function'==typeof _0x55dbe3['source']['_action']&&_0x55dbe3['source']['_action'](_0x545508);}),_0x177c45(_0x46368d,_0x2a4bae,{'role':'menu'}),_0x46368d['listenTo'](_0x545508,'change:isActionsDropdownOpen',(_0x363324,_0xc8eaaf,_0x5a8257)=>{if(_0x5a8257)for(const _0x874fb8 of _0x46368d['listView']['items']){const _0x133a08=_0x874fb8['children']['first'],_0x3fabc7=_0x478af9['find'](_0x4a9c2f=>_0x4a9c2f['action']===_0x133a08['_action'])['isVisible'];_0x874fb8['isVisible']=void 0x0===_0x3fabc7||_0x3fabc7(_0x545508);}}),_0x46368d;}class ai extends/* #__PURE__ -- @preserve */
26
- _0x1f12de(_0x5c59b1){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x54812b,_0x2f900e,_0x986239,_0x246d86){super(_0x54812b);const _0x17b4c3=this['bindTemplate'],_0x4bcacc=function(_0x3d1c21,_0x21b72a){const _0x40a804=Array['from'](_0x21b72a['authors'])['filter'](_0x5f0232=>_0x5f0232!=_0x21b72a['creator']);return _0x21b72a['creator']&&_0x40a804['unshift'](_0x21b72a['creator']),_0x40a804['map'](_0x183b09=>new oi(_0x3d1c21,_0x183b09,_0x183b09==_0x21b72a['creator']));}(_0x54812b,_0x2f900e);this['id']=_0x2f900e['id'],this['_revision']=_0x2f900e,this['_requireRevisionName']=_0x246d86,this['bind']('name','createdAt')['to'](_0x2f900e),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x3ddb0d=>{return _0x50cc43=_0x54812b['uiLanguage'],(_0x53b9cc=_0x3ddb0d)['toLocaleDateString'](_0x50cc43,{'month':'long','day':'numeric'})+',\x20'+_0x53b9cc['toLocaleTimeString'](_0x50cc43,{'hour':'numeric','minute':'numeric'});var _0x50cc43,_0x53b9cc;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new mt(_0x54812b,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4eb6eb=>_0x4eb6eb||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x20d59c,_0x564cee)=>_0x20d59c&&_0x564cee),this['revisionActionsView']=_0x986239&&_0x986239['length']?ni(this,_0x986239):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x17b4c3['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x17b4c3['if']('isEnabled','ck-disabled',_0x600622=>!_0x600622),_0x17b4c3['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x17b4c3['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x17b4c3['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x17b4c3['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x4bcacc}]},this['revisionActionsView']],'on':{'click':_0x17b4c3['to'](_0x36f436=>{_0x36f436['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x5c10ae=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x5c10ae,'change',()=>{this['_requireRevisionName']&&!_0x5c10ae['value']||this['fire']('setName',{'id':this['id'],'name':_0x5c10ae['value']}),_0x5c10ae['value']||(_0x5c10ae['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function vi(_0xe12cc8,_0x5cba42){const _0x1e76eb=_0x30cf25['fromJSDate'](_0xe12cc8)['setLocale'](_0x5cba42),_0x324a3e=_0x30cf25['local'](),_0x2fe7fc=_0x324a3e['minus']({'days':0x1})['startOf']('day');let _0x165cc5,_0x47aae5;return _0x1e76eb['hasSame'](_0x324a3e,'day')?(_0x165cc5=_0x1e76eb['startOf']('day')['toJSDate'](),_0x47aae5=_0x1e76eb['toRelativeCalendar']()):_0x1e76eb['hasSame'](_0x2fe7fc,'day')?(_0x165cc5=_0x2fe7fc['toJSDate'](),_0x47aae5=_0x1e76eb['toRelativeCalendar']()):_0x1e76eb['hasSame'](_0x324a3e,'week')?(_0x165cc5=_0x1e76eb['startOf']('week')['toJSDate'](),_0x47aae5=_0x1e76eb['weekdayLong']||''):_0x1e76eb['hasSame'](_0x324a3e,'year')?(_0x165cc5=_0x1e76eb['startOf']('month')['toJSDate'](),_0x47aae5=_0x1e76eb['monthLong']||''):(_0x165cc5=_0x1e76eb['startOf']('year')['toJSDate'](),_0x47aae5=String(_0x1e76eb['year'])),{'startDate':_0x165cc5,'localizedPeriodName':_0x47aae5};}class mi extends _0x5c59b1{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4c286e,_0x20bc35,_0x4974a0,_0x3de516){super(_0x4c286e);const _0x52a457=vi(_0x20bc35,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x20bc35,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x4974a0,this['_requireRevisionName']=_0x3de516,this['revisionViews']['delegate']('select')['to'](this),this['revisionViews']['delegate']('setName')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period']},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__label']},'children':[{'text':_0x52a457}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x52e543){const _0x2f75ff=new ai(this['locale'],_0x52e543,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x2f75ff);}['removeRevision'](_0x28b4c4){const _0x44a857=this['revisionViews']['find'](_0x89f477=>_0x89f477['id']===_0x28b4c4['id']);this['revisionViews']['remove'](_0x44a857);}}class as extends _0x5c59b1{constructor(_0x447e9c){super(_0x447e9c);const _0x5e57cd=new _0x35e69b();_0x5e57cd['content']=_0x5d107e,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x5e57cd,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x447e9c,'Revision\x20history')]}]});}}class di extends _0x5c59b1{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x168c6b,_0x2feed6,_0x191a0c,_0x529cb3){super(_0x168c6b);const _0x5255f0=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x2feed6,this['_revisionActions']=_0x191a0c,this['_requireRevisionName']=_0x529cb3,this['on']('select',(_0x4d34bf,_0x284805)=>{this['fire']('revisionSelected',_0x284805);}),this['on']('setName',(_0x51639b,_0x58951b)=>{this['fire']('revisionSetName',_0x58951b);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x168c6b),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x5255f0['if']('isEnabled','ck-disabled',_0x4fe2ba=>!_0x4fe2ba)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x10e50d of this['_revisions'])this['_addRevision'](_0x10e50d);this['_revisions']['on']('add',(_0x32ecda,_0x3c91f2)=>{this['_addRevision'](_0x3c91f2);}),this['_revisions']['on']('remove',(_0x16fe1b,_0x1eee39)=>{this['_removeRevision'](_0x1eee39);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x5c0305=>_0x5c0305['revisionViews']['map'](_0x2dfeb6=>_0x2dfeb6))['flat']();}['selectRevision'](_0x47fe0a){for(const _0x4a629f of this['revisionViews'])_0x47fe0a&&_0x47fe0a['id']===_0x4a629f['id']?_0x4a629f['select']():_0x4a629f['deselect']();}['highlightRevisions'](_0x52c5f7){for(const _0x2c2663 of this['revisionViews'])_0x52c5f7['some'](({id:_0x1fde93})=>_0x1fde93===_0x2c2663['id'])?_0x2c2663['highlight']():_0x2c2663['unhighlight']();}['_addRevision'](_0x521557){const _0x48ebcb=vi(_0x521557['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x273de6=this['timePeriodViews']['get'](0x0);_0x273de6&&_0x273de6['startDate']['getTime']()===_0x48ebcb['getTime']()||(_0x273de6=new mi(this['locale'],_0x48ebcb,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x273de6)),_0x273de6['addRevision'](_0x521557);}['_removeRevision'](_0x368e51){const _0x5c639f=vi(_0x368e51['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x5c639f)['removeRevision'](_0x368e51);}['_getTimePeriodViewByStartDate'](_0x52d004){return this['timePeriodViews']['find'](_0x5f4224=>_0x5f4224['startDate']['getTime']()===_0x52d004['getTime']());}}class g extends _0x26fb00{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x3565b7,uid as _0x315034,Collection as _0x604cb8,logWarning as _0x3f4788,FocusTracker as _0x6ef35b,KeystrokeHandler as _0x2730cf,scrollViewportToShowTarget as _0x73e1e0,ResizeObserver as at,ElementReplacer as ht,CKEditorError as _0x1e64e5}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x25f479,set as _0x1128dd,unset as _0x2a076e,isEqual as _0x580e1d}from'lodash-es';import{Plugin as _0x33f6b4,PendingActions as _0x370779,icons as _0x2dd3b5,Command as _0x70568d,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x28c3db,getMarkerDomElement as _0x49e725,ConfirmMixin as _0x58316b,sanitizeEditorConfig as _0x38d51a}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0xb1a3bf,Element as ft,Range as vt,ViewUIElement as _0x539225,ViewRawElement as _0x163a0c,ViewEmptyElement as _0x7df5b5,ViewAttributeElement as _0xbf9b23,ViewContainerElement as _0x2684a7,Position as gt,ViewText as _0x14b10c,ViewElement as _0x5d7b17,DocumentFragment as mt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as _0x2bb680,injectCssTransitionDisabler as ts,submitHandler as _0x141e59,LabeledFieldView as nt,createLabeledInputText as _0x5e8146,createDropdown as _0x34ab13,ListView as _0x139113,ListItemView as _0x3929f2,ButtonView as _0x3d2807,MenuBarMenuView as _0x4e62e4,MenuBarMenuListView as _0x20f98c,MenuBarMenuListItemView as _0x1d1bd8,MenuBarMenuListItemButtonView as _0x5e8199,ContextualBalloon as _0x530aeb,ToolbarSeparatorView as _0x9a3880,IconView as _0x15b257,addListToDropdown as _0x46520c,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as ut,ToolbarView as lt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0xcce083}from'luxon';class a extends/* #__PURE__ -- @preserve */
24
+ _0x3565b7(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0xdada83){super(),this['id']=_0xdada83['id']||_0x315034(),this['creator']=_0xdada83['creator']||null,this['authors']=_0xdada83['authors']||[],this['diffData']=_0xdada83['diffData']||null,this['toVersion']=_0xdada83['toVersion']||0x0,this['fromVersion']=_0xdada83['fromVersion']||0x0,this['set']('name',_0xdada83['name']||''),this['set']('createdAt',_0xdada83['createdAt']||new Date()),this['set']('attributes',_0xdada83['attributes']||{});}['setName'](_0xe5cafa){this['_update']({'name':_0xe5cafa});}['setAttribute'](_0x72887c,_0xb1f1e0){const _0x10765e=_0x25f479(this['attributes']);_0x1128dd(_0x10765e,_0x72887c,_0xb1f1e0),this['_update']({'attributes':_0x10765e});}['removeAttribute'](_0x59fe56){const _0x39023c=_0x25f479(this['attributes']);_0x2a076e(_0x39023c,_0x59fe56),this['_update']({'attributes':_0x39023c});}['_update'](_0x581d10,_0x3cc370=!0x1){let _0x5370e4=!0x1;const _0x156cd1={'id':this['id']},_0x231699=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x3817a6 of _0x231699){const _0x3b54a3=_0x581d10[_0x3817a6];void 0x0!==_0x3b54a3&&_0x3b54a3!==this[_0x3817a6]&&(this[_0x3817a6]=_0x3b54a3,_0x156cd1[_0x3817a6]=_0x3b54a3,_0x5370e4=!0x0);}_0x5370e4&&(_0x156cd1['authors']&&(_0x156cd1['authorsIds']=_0x156cd1['authors']['map'](_0x1762f4=>_0x1762f4['id']),delete _0x156cd1['authors']),this['fire']('_update',_0x156cd1,_0x3cc370));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x260520=>_0x260520['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x33f6b4{['_revisions'];static get['requires'](){return[_0x28c3db];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x3e448a){super(_0x3e448a),this['_revisions']=new _0x604cb8();}['afterInit'](){!async function(_0x2efc74){const _0x338ae1=_0x22e326([0x6e,0x35,0x4f,0x70,0x50,0x41,0x79,0x57,0x51,0x48,0x6b,0x33,0x7a,0x68,0x56,0x61,0x62,0x43,0x67,0x54,0x4a,0x53,0x58,0x71,0x38,0x45,0x6f,0x30,0x4d,0x31,0x32,0x64,0x65,0x76,0x59,0x66,0x77,0x74,0x78,0x42,0x49,0x55,0x52,0x63,0x47,0x36,0x6d,0x4b,0x4c,0x75,0x6c,0x72,0x73,0x69,0x6a,0x46,0x5a,0x34,0x39,0x37,0x4e,0x44]),_0x2c46e5=0xeb829,_0x481c4a=0x1332484f,_0x67c6f0=0x1335290f^_0x481c4a,_0x2562c2=window[_0x22e326([0x44,0x61,0x74,0x65])][_0x22e326([0x6e,0x6f,0x77])](),_0x3fb409=_0x2efc74[_0x22e326([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x278517=new window[(_0x22e326([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x376591=>{_0x3fb409[_0x22e326([0x6f,0x6e,0x63,0x65])](_0x22e326([0x72,0x65,0x61,0x64,0x79]),_0x376591);}),_0x397d9a={[_0x22e326([0x6b,0x74,0x79])]:_0x22e326([0x45,0x43]),[_0x22e326([0x75,0x73,0x65])]:_0x22e326([0x73,0x69,0x67]),[_0x22e326([0x63,0x72,0x76])]:_0x22e326([0x50,0x2d,0x32,0x35,0x36]),[_0x22e326([0x78])]:_0x22e326([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x22e326([0x79])]:_0x22e326([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x22e326([0x61,0x6c,0x67])]:_0x22e326([0x45,0x53,0x32,0x35,0x36])},_0x1584c6=_0x3fb409[_0x22e326([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x22e326([0x67,0x65,0x74])](_0x22e326([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2089b6(){let _0x4e0180,_0x891709=null,_0x427c1d=null;try{if(_0x1584c6==_0x22e326([0x47,0x50,0x4c]))return _0x22e326([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4e0180=_0x2f1584(),!_0x4e0180)return _0x22e326([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4e0180[_0x22e326([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x427c1d=_0x5bb707(_0x4e0180[_0x22e326([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4e0180[_0x22e326([0x6a,0x74,0x69])])),await _0x48341e()?_0x5f0792()?_0x4fdea0()?_0x22e326([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5065af()?(_0x4e0180[_0x22e326([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x22e326([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x891709=_0x5be22d(_0x22e326([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4e0180[_0x22e326([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x22e326([0x74,0x72,0x69,0x61,0x6c])&&(_0x891709=_0x5be22d(_0x22e326([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4f1ee2()):_0x22e326([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x22e326([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x22e326([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x2c78b1){return _0x22e326([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4fdea0(){const _0x5a85ca=[_0x22e326([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x22e326([0x74,0x72,0x69,0x61,0x6c])][_0x22e326([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0180[_0x22e326([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2562c2/0x3e8:0xe10*_0x67c6f0;return _0x4e0180[_0x22e326([0x65,0x78,0x70])]<_0x5a85ca;}function _0x5f0792(){const _0x505492=_0x4e0180[_0x22e326([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x505492)return!0x1;if(_0x505492[_0x22e326([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22e326([0x2a])))return!0x0;if(_0x505492[_0x22e326([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22e326([0x52,0x48])))return!0x0;if(_0x505492[_0x22e326([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22e326([0x52,0x52,0x48]))){if(_0x2dbc85())return!0x0;if(_0x4508bd()||_0x2db1f6())return!0x0;}return!0x1;}function _0x5065af(){const _0x2f561e=_0x4e0180[_0x22e326([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2f561e||0x0==_0x2f561e[_0x22e326([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x51a90e}=new URL(window[_0x22e326([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2f561e[_0x22e326([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51a90e))return!0x0;const _0x1369de=_0x51a90e[_0x22e326([0x73,0x70,0x6c,0x69,0x74])](_0x22e326([0x2e]));return _0x2f561e[_0x22e326([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x433ac5=>_0x433ac5[_0x22e326([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x22e326([0x2a])))[_0x22e326([0x6d,0x61,0x70])](_0x2c6191=>_0x2c6191[_0x22e326([0x73,0x70,0x6c,0x69,0x74])](_0x22e326([0x2e])))[_0x22e326([0x73,0x6f,0x6d,0x65])](_0x4fe87c=>_0x1369de[_0x22e326([0x65,0x76,0x65,0x72,0x79])]((_0x353e92,_0x37c9da)=>_0x4fe87c[_0x37c9da]===_0x353e92||_0x4fe87c[_0x37c9da]===_0x22e326([0x2a])));}function _0x4f1ee2(){return _0x891709&&_0x427c1d?new window[(_0x22e326([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2a79ea,_0x28aee2)=>{_0x891709[_0x22e326([0x74,0x68,0x65,0x6e])](_0x2a79ea,_0x28aee2),_0x427c1d[_0x22e326([0x74,0x68,0x65,0x6e])](_0x8a7883=>{_0x8a7883!=_0x22e326([0x56,0x61,0x6c,0x69,0x64])&&_0x2a79ea(_0x8a7883);},_0x28aee2);}):_0x891709||_0x427c1d||_0x22e326([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5bb707(_0x338018,_0x33f87d){return new window[(_0x22e326([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36e090=>{if(_0x3e512e())return _0x36e090(_0x22e326([0x56,0x61,0x6c,0x69,0x64]));_0x2b1f56(),_0x3fb409[_0x22e326([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x22e326([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xace79d=!0x1;const _0x51009a=_0x315034();function _0xd2965e(_0x329b85){return!!_0x329b85&&(typeof _0x329b85===_0x22e326([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x329b85===_0x22e326([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x329b85[_0x22e326([0x74,0x68,0x65,0x6e])]===_0x22e326([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x329b85[_0x22e326([0x63,0x61,0x74,0x63,0x68])]===_0x22e326([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1bcf3a(_0x5161d2){_0xc7da32(_0x5161d2)[_0x22e326([0x74,0x68,0x65,0x6e])](_0x1eb499=>{if(!_0x1eb499||_0x1eb499[_0x22e326([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x22e326([0x6f,0x6b]))return _0x22e326([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x11f24d(_0x1bc059(_0x51009a+_0x33f87d))!=_0x1eb499[_0x22e326([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x22e326([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x22e326([0x56,0x61,0x6c,0x69,0x64]);})[_0x22e326([0x74,0x68,0x65,0x6e])](_0x4ebbbc=>(_0x4b2768(),_0x4ebbbc),()=>{const _0x4e4b77=_0x4dc157();return null==_0x4e4b77?(_0x4b2768(),_0x22e326([0x56,0x61,0x6c,0x69,0x64])):_0x22e326(_0x2562c2-_0x4e4b77>(0x373ecc4f^_0x481c4a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x22e326([0x74,0x68,0x65,0x6e])](_0x36e090)[_0x22e326([0x63,0x61,0x74,0x63,0x68])](()=>{_0x36e090(_0x22e326([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x6092d9=0x1304a6cf^_0x481c4a;function _0x4b2768(){const _0x393201=_0x22e326([0x6c,0x6c,0x63,0x74,0x2d])+_0x11f24d(_0x1bc059(_0x338018)),_0x42884e=_0x5d68ed(_0x11f24d(window[_0x22e326([0x4d,0x61,0x74,0x68])][_0x22e326([0x63,0x65,0x69,0x6c])](_0x2562c2/_0x6092d9)));window[_0x22e326([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x22e326([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x393201,_0x42884e);}function _0x4dc157(){const _0x5a4c8a=_0x22e326([0x6c,0x6c,0x63,0x74,0x2d])+_0x11f24d(_0x1bc059(_0x338018)),_0x448842=window[_0x22e326([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x22e326([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5a4c8a);return _0x448842?window[_0x22e326([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d68ed(_0x448842),0x10)*_0x6092d9:null;}function _0xc7da32(_0x5887e4){return new window[(_0x22e326([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x238799,_0x4feaf5)=>{_0x5887e4[_0x22e326([0x74,0x68,0x65,0x6e])](_0x238799,_0x4feaf5),window[_0x22e326([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4feaf5,0x13339c8f^_0x481c4a);});}}_0x3fb409[_0x22e326([0x6f,0x6e])](_0x22e326([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xedd9b8,_0x404051)=>{if(_0x404051[0x0]!=_0x338018)return _0x36e090(_0x22e326([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x404051[0x1]={..._0x404051[0x1],[_0x22e326([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x51009a};},{[_0x22e326([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x22e326([0x68,0x69,0x67,0x68])}),_0x3fb409[_0x22e326([0x6f,0x6e])](_0x22e326([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x9a00c7=>{_0xd2965e(_0x9a00c7[_0x22e326([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xace79d=!0x0,_0x1bcf3a(_0x9a00c7[_0x22e326([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x22e326([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x22e326([0x6c,0x6f,0x77])}),_0x278517[_0x22e326([0x74,0x68,0x65,0x6e])](()=>{_0xace79d||_0x36e090(_0x22e326([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3e512e(){return _0x3fb409[_0x22e326([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22e326([0x76,0x69,0x65,0x77])][_0x22e326([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x22e326([0x61,0x75,0x74,0x6f]);}function _0x2b1f56(){_0x3fb409[_0x22e326([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x22e326([0x76,0x69,0x65,0x77])][_0x22e326([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x22e326([0x61,0x75,0x74,0x6f]);}}function _0x5be22d(_0x1af2f9){const _0x1386da=[new window[(_0x22e326([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x46cc21=>setTimeout(_0x46cc21,0x133b7683^_0x481c4a)),_0x278517[_0x22e326([0x74,0x68,0x65,0x6e])](()=>new window[(_0x22e326([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5cb326=>{const _0x59b45c=0x13324848^_0x481c4a,_0x335387=_0x2efc74[_0x22e326([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x556b16(){_0x335387[_0x22e326([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x59b45c&&_0x5cb326();}_0x556b16(),_0x335387[_0x22e326([0x6f,0x6e])](_0x22e326([0x61,0x64,0x64]),_0x556b16);})),new window[(_0x22e326([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x11d0c9=>{function _0x1a416a(){for(const _0x1e47b7 in window)if(window[_0x22e326([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x22e326([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1e47b7))&&window[_0x1e47b7]==_0x2c46e5)return _0x11d0c9();_0x3fb409[_0x22e326([0x73,0x74,0x61,0x74,0x65])]!=_0x22e326([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x22e326([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1a416a,0x13325bc7^_0x481c4a);}_0x32a05e(_0x22e326([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x1a416a();})];return window[_0x22e326([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x22e326([0x72,0x61,0x63,0x65])](_0x1386da)[_0x22e326([0x74,0x68,0x65,0x6e])](()=>_0x1af2f9);}async function _0xa7e5e2(){if(await _0x278517,_0x32a05e(_0x22e326([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x25aa78=_0x2efc74[_0x22e326([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x57a606=_0x2efc74[_0x22e326([0x67,0x65,0x74,0x45,0x61,0x72,0x6c,0x69,0x65,0x72,0x56,0x69,0x73,0x69,0x62,0x6c,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](_0x25aa78[_0x22e326([0x69,0x64])]),_0x48a67=_0x5a415a(_0x22e326([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x48a67[_0x22e326([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x25aa78['id'],_0x57a606?_0x57a606['id']:null,!0x0),_0x48a67[_0x22e326([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x22e326([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x48a67[_0x22e326([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x48a67[_0x22e326([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3e22f0,void(_0x48a67[_0x22e326([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3e22f0);}if(_0x32a05e(_0x22e326([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4b06f6=_0x5a415a(_0x22e326([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4b06f6[_0x22e326([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x22e326([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4b06f6[_0x22e326([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4b06f6[_0x22e326([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3e22f0,_0x4b06f6[_0x22e326([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3e22f0;}_0x3fb409[_0x22e326([0x6d,0x6f,0x64,0x65,0x6c])][_0x22e326([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3e22f0,_0x3fb409[_0x22e326([0x6d,0x6f,0x64,0x65,0x6c])][_0x22e326([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3e22f0,_0x3fb409[_0x22e326([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x22e326([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2dbc85(){return _0x32a05e(_0x22e326([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5a415a(_0x22e326([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x22e326([0x73,0x74,0x61,0x74,0x65])]==_0x22e326([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4508bd(){return _0x32a05e(_0x22e326([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x2db1f6(){return _0x32a05e(_0x22e326([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x45751c(_0x2f558c){const _0x6d77c7=_0x47fadf();_0x3fb409[_0x6d77c7]=_0x22e326([0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x48,0x69,0x73,0x74,0x6f,0x72,0x79,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2f558c,_0x2f558c[_0x22e326([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x22e326([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x47fadf()]=_0x2c46e5),_0x2f558c!=_0x22e326([0x56,0x61,0x6c,0x69,0x64])&&_0xa7e5e2();}function _0x47fadf(){const _0x48867d=window[_0x22e326([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x22e326([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x22e326([0x6e,0x6f,0x77])]())[_0x22e326([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x22e326([0x2e]),'');let _0x5d4514=_0x22e326([0x6e]);for(let _0x7cdcfb=0x0;_0x7cdcfb<_0x48867d[_0x22e326([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x7cdcfb+=0x2){let _0x106818=window[_0x22e326([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x48867d[_0x22e326([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x7cdcfb,_0x7cdcfb+0x2));_0x106818>=_0x338ae1[_0x22e326([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x106818-=_0x338ae1[_0x22e326([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5d4514+=_0x338ae1[_0x106818];}return _0x5d4514;}function _0x2f1584(){const _0x304db0=_0x1584c6[_0x22e326([0x73,0x70,0x6c,0x69,0x74])](_0x22e326([0x2e]));if(0x3!=_0x304db0[_0x22e326([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x301c1b(_0x304db0[0x1]);function _0x301c1b(_0x191b3f){const _0x8a5e16=_0x172003(_0x191b3f);return _0x8a5e16&&_0x2b1c53()?_0x8a5e16:null;function _0x2b1c53(){const _0x3d730b=_0x8a5e16[_0x22e326([0x6a,0x74,0x69])],_0x3c3857=window[_0x22e326([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3d730b[_0x22e326([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d730b[_0x22e326([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4baa8e={..._0x8a5e16,[_0x22e326([0x6a,0x74,0x69])]:_0x3d730b[_0x22e326([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3d730b[_0x22e326([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4baa8e[_0x22e326([0x76,0x63])],_0x1bc059(_0x4baa8e)==_0x3c3857;}}}async function _0x48341e(){let _0x326a2b=!0x0;try{const _0x1a9acd=_0x1584c6[_0x22e326([0x73,0x70,0x6c,0x69,0x74])](_0x22e326([0x2e])),[_0x5f0da1,_0x2a2ac5,_0x58a473]=_0x1a9acd;return _0x41644b(_0x5f0da1),await _0x3b5a92(_0x5f0da1,_0x2a2ac5,_0x58a473),_0x326a2b;}catch(_0xdd498a){return!0x1;}function _0x41644b(_0x463fa7){const _0x207304=_0x172003(_0x463fa7);_0x207304&&_0x207304[_0x22e326([0x61,0x6c,0x67])]==_0x22e326([0x45,0x53,0x32,0x35,0x36])||(_0x326a2b=!0x1);}async function _0x3b5a92(_0x495b34,_0x342af9,_0x2645df){const _0x33a72e=window[_0x22e326([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x22e326([0x66,0x72,0x6f,0x6d])](_0x3fab4a(_0x2645df),_0x10cb3d=>_0x10cb3d[_0x22e326([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3ad241=new window[(_0x22e326([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x22e326([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x495b34+_0x22e326([0x2e])+_0x342af9),_0x193d05=window[_0x22e326([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x22e326([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x193d05)return;const _0x2df167=await _0x193d05[_0x22e326([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x22e326([0x6a,0x77,0x6b]),_0x397d9a,{[_0x22e326([0x6e,0x61,0x6d,0x65])]:_0x22e326([0x45,0x43,0x44,0x53,0x41]),[_0x22e326([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x22e326([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x22e326([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x193d05[_0x22e326([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x22e326([0x6e,0x61,0x6d,0x65])]:_0x22e326([0x45,0x43,0x44,0x53,0x41]),[_0x22e326([0x68,0x61,0x73,0x68])]:{[_0x22e326([0x6e,0x61,0x6d,0x65])]:_0x22e326([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2df167,_0x33a72e,_0x3ad241)||(_0x326a2b=!0x1);}}function _0x172003(_0x25b2c2){return _0x25b2c2[_0x22e326([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x22e326([0x65,0x79]))?JSON[_0x22e326([0x70,0x61,0x72,0x73,0x65])](_0x3fab4a(_0x25b2c2)):null;}function _0x3fab4a(_0x1996be){return window[_0x22e326([0x61,0x74,0x6f,0x62])](_0x1996be[_0x22e326([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x22e326([0x2b]))[_0x22e326([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x22e326([0x2f])));}function _0x1bc059(_0x2faca9){let _0x2d9545=0x1505;function _0x450ecf(_0x168d41){for(let _0x4efa0b=0x0;_0x4efa0b<_0x168d41[_0x22e326([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4efa0b++){const _0x256842=_0x168d41[_0x22e326([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4efa0b);_0x2d9545=(_0x2d9545<<0x5)+_0x2d9545+_0x256842,_0x2d9545&=_0x2d9545;}}function _0x465a12(_0x400fc8){Array[_0x22e326([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x400fc8)?_0x400fc8[_0x22e326([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x465a12):_0x400fc8&&typeof _0x400fc8==_0x22e326([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x22e326([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x400fc8)[_0x22e326([0x73,0x6f,0x72,0x74])]()[_0x22e326([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2165ea,_0x54f1e1])=>{_0x450ecf(_0x2165ea),_0x465a12(_0x54f1e1);}):_0x450ecf(window[_0x22e326([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x400fc8));}return _0x465a12(_0x2faca9),_0x2d9545>>>0x0;}function _0x11f24d(_0x49921f){return _0x49921f[_0x22e326([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x22e326([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x22e326([0x30]));}function _0x5d68ed(_0x183c41){return _0x183c41[_0x22e326([0x73,0x70,0x6c,0x69,0x74])]('')[_0x22e326([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x22e326([0x6a,0x6f,0x69,0x6e])]('');}function _0x32a05e(_0x337d02){return _0x3fb409[_0x22e326([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x22e326([0x68,0x61,0x73])](_0x337d02);}function _0x5a415a(_0x479b78){return _0x3fb409[_0x22e326([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x22e326([0x67,0x65,0x74])](_0x479b78);}function _0x3e22f0(){}function _0x22e326(_0xc50f13){return _0xc50f13['map'](_0xc2818b=>String['fromCharCode'](_0xc2818b))['join']('');}_0x45751c(await _0x2089b6());}(this);}['createRevision'](_0x3ec54b){const _0xbd2c33=this['editor']['plugins']['get']('Users');return new a({'id':_0x3ec54b['id'],'name':_0x3ec54b['name'],'creator':_0x3ec54b['creatorId']?_0xbd2c33['getUser'](_0x3ec54b['creatorId']):null,'diffData':_0x3ec54b['diffData']||_0x3ec54b['data'],'authors':_0x3ec54b['authorsIds']['map'](_0x34f21c=>_0xbd2c33['getUser'](_0x34f21c)),'createdAt':new Date(_0x3ec54b['createdAt']),'attributes':_0x3ec54b['attributes'],'fromVersion':_0x3ec54b['fromVersion'],'toVersion':_0x3ec54b['toVersion']});}['addRevision'](_0xeae197,_0x3a7cf9=0x0){this['_revisions']['add'](_0xeae197,_0x3a7cf9);}['getRevision'](_0x130d63){return this['_revisions']['get'](_0x130d63);}['getRevisions'](_0x2e5b19={'toJSON':!0x1}){const _0x2803ea=Array['from'](this['_revisions']);return _0x2803ea['reverse'](),_0x2e5b19['toJSON']?_0x2803ea['map'](_0x49550b=>_0x49550b['toJSON']()):_0x2803ea;}['getIndex'](_0x705364){return this['_revisions']['getIndex'](_0x705364);}['getEarlierVisibleRevision'](_0x52bb22){const [,_0x1e7dd7]=this['getRevisionsIterator'](_0x52bb22,{'direction':'earlier'});return _0x1e7dd7;}['getLaterVisibleRevision'](_0xd96b65){const [,_0x57828c]=this['getRevisionsIterator'](_0xd96b65,{'direction':'later'});return _0x57828c;}['getRevisionsInDiff'](_0x319b56){const _0x159b79=[];for(const _0x2da8a2 of this['getRevisionsIterator'](_0x319b56['newRevisionId']))if(_0x159b79['push'](_0x2da8a2),_0x2da8a2['id']===_0x319b56['oldRevisionId'])break;return _0x159b79;}*['getRevisionsIterator'](_0x4a5652,{direction:_0xe840a2='earlier',filter:_0x592129=()=>!0x0}={}){const _0x1471ea='earlier'===_0xe840a2?0x1:-0x1;let _0xdcd123=this['_revisions']['get'](_0x4a5652),_0x3a8f22=this['getIndex'](_0xdcd123);for(yield _0xdcd123;_0xdcd123;){if(_0x3a8f22+=_0x1471ea,_0xdcd123=this['getRevision'](_0x3a8f22),!_0xdcd123)return;_0x592129(_0xdcd123)&&(yield _0xdcd123);}}}function m(_0xc43da9,_0x44d88f,_0x526216){const t=_0xc43da9['t'];switch(_0x44d88f){case'Revision\x20history':return t('Revision\x20history');case'Open\x20revision\x20history':return t('Open\x20revision\x20history');case'Restored':return t('Restored');case'Empty\x20document':return t('Empty\x20document');case'Initial\x20revision':return t('Initial\x20revision');case'Suggested\x20by':return t('Suggested\x20by');case'Added\x20by':return t('Added\x20by');case'Removed\x20by':return t('Removed\x20by');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Compare\x20against\x20selected':return t('Compare\x20against\x20selected');case'Name\x20this\x20revision':return t('Name\x20this\x20revision');case'Restore\x20this\x20revision':return t('Restore\x20this\x20revision');case'Back\x20to\x20editing':return t('Back\x20to\x20editing');case'Loading...':return t('Loading...');case'No\x20changes':return t('No\x20changes');case'NUMBER_OF_CHANGES':return t({'string':'%0\x20change','plural':'%0\x20changes','id':'NUMBER_OF_CHANGES'},_0x526216);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x526216);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const P={'c':_0x2684a7,'a':_0xbf9b23,'e':_0x7df5b5,'r':_0x163a0c,'u':_0x539225};class l extends _0x33f6b4{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x28c3db,j,_0x370779];}constructor(_0x2d5457){super(_0x2d5457),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x3fa972=_0x315034();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x3fa972},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x68487f=this['repository']['getRevision'](0x0),_0x170a1d=_0x68487f&&null===_0x68487f['creator']?_0x68487f:null;if(this['_continueCurrentRevision']=!!_0x170a1d&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x35187c=this['_source']['getCurrentRevisionId'](),_0x59bc4a=this['repository']['getRevision'](_0x35187c);if(_0x59bc4a)this['_startingVersion']=_0x59bc4a['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x534ad4=this['_source']['history']['_operations']['find'](_0x3fc6f0=>!_0x3fc6f0['_isInit']),_0x5d206a=_0x534ad4?_0x534ad4['baseVersion']:this['_source']['history']['version'];_0x68487f?(_0x68487f['toVersion']<_0x5d206a&&_0x68487f['_update']({'toVersion':_0x5d206a}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x170a1d['id'],this['_startingVersion']=_0x170a1d['fromVersion']):(this['_startingVersion']=_0x68487f['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x5d206a,this['_continueCurrentRevision']=!0x1);}}else _0x170a1d&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x170a1d['toVersion'],this['editor']['model']['document']['history']['version']),_0x170a1d['fromVersion']===_0x170a1d['toVersion']?(0x0!==_0x170a1d['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x170a1d['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x170a1d['id'],this['_startingVersion']=_0x170a1d['fromVersion'])),this['_continueCurrentRevision']||(this['_startingVersion']=this['editor']['model']['document']['version']);this['_revisionDataBuilder']['init'](this['_source']['history']),this['_createInitialRevision'](this['_startingVersion']),this['_createCurrentRevision'](this['_startingVersion']),this['adapter']&&this['sendBufferedUpdates']();}),this['bind']('isReady')['to'](this,'_isPendingUpdate',_0x3ef71c=>!_0x3ef71c),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x36bf13=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2b904e;for(const _0x5060c6 in _0x36bf13){const _0x2e4c22=_0x5060c6,_0x24930b=_0x36bf13[_0x2e4c22];if('revisionHistoryLicenseKeyValid'==_0x24930b||'revisionHistoryLicenseKeyInvalid'==_0x24930b||'revisionHistoryLicenseKeyExpired'==_0x24930b||'revisionHistoryLicenseKeyDomainLimit'==_0x24930b||'revisionHistoryLicenseKeyNotAllowed'==_0x24930b||'revisionHistoryLicenseKeyEvaluationLimit'==_0x24930b||'revisionHistoryLicenseKeyTrialLimit'==_0x24930b||'revisionHistoryLicenseKeyUsageLimit'==_0x24930b){delete _0x36bf13[_0x2e4c22],_0x2b904e=_0x24930b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2b904e&&_0x36bf13['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2b904e&&_0x36bf13['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2b904e&&_0x36bf13['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2b904e&&_0x36bf13['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2b904e&&_0x36bf13['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x2b904e&&_0x36bf13['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2b904e&&_0x36bf13['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x2c84ed=this['repository']['getRevision'](0x0),_0x288681=await this['getRevisionDocumentData'](_0x2c84ed),_0x33deda=await this['getRevisionRootsAttributes'](_0x2c84ed);this['_replaceEditorDataWithRevisionData'](_0x288681,_0x33deda);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x27e212){this['_source']=_0x27e212;}async['update'](){const _0x683032=await this['_source']['getLatestVersion']();if(_0x683032>this['currentRevision']['toVersion']){await this['_loadState']();const _0x8c56d7=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x683032});_0x8c56d7['authors']=_0x8c56d7['authorsIds']['map'](_0x11fd57=>this['editor']['plugins']['get']('Users')['getUser'](_0x11fd57)),this['currentRevision']['_update'](_0x8c56d7);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x29bb76={},_0x38a338=null){const _0xbc9bb7=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x38a338>this['currentRevision']['toVersion']&&(_0x38a338=null),null===_0x38a338&&(_0x38a338=await this['_source']['getLatestVersion']());const _0x1a7b52=this['_getFromVersion'](_0x38a338),_0x4bf60e=this['buildRevisionData']({'from':_0x1a7b52,'to':_0x38a338});if(this['currentRevision']['toVersion']<_0x38a338){const _0x395477=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x38a338,'to':_0x38a338});_0x395477['authors']=[],_0x395477['authorsIds']=[],_0x395477['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x395477,!0x0),delete _0x395477['authors'],_0xbc9bb7['push'](_0x395477);}_0x29bb76['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x29bb76['name']=_0x29bb76['name']||null,_0x29bb76['id']=_0x29bb76['id']||_0x315034(),_0x29bb76={..._0x29bb76,..._0x4bf60e};const _0x537673=this['addRevisionData'](_0x29bb76);_0xbc9bb7['push'](_0x29bb76);const _0x38774b=this['repository']['getIndex'](_0x537673);if(0x0!==_0x38774b){const _0x510710=this['repository']['getRevision'](_0x38774b-0x1);if(_0x510710['fromVersion']!==_0x38a338){const _0x1b8c0f=this['_revisionDataBuilder']['getData'](_0x38a338,_0x510710['toVersion']),_0x5e17df={'id':_0x510710['id'],'diffData':_0x1b8c0f['diffData'],'authorsIds':_0x1b8c0f['authorsIds'],'authors':_0x1b8c0f['authorsIds']['map'](_0x55a525=>this['editor']['plugins']['get']('Users')['getUser'](_0x55a525)),'fromVersion':_0x38a338};_0x510710===this['currentRevision']&&(_0x5e17df['createdAt']=new Date(_0x29bb76['createdAt']['getTime']()+0xa)),_0x510710['_update'](_0x5e17df,!0x0),delete _0x5e17df['authors'],_0xbc9bb7['push'](_0x5e17df);}}if(this['adapter']){for(const _0x1f7b5f of _0xbc9bb7)this['_bufferUpdate'](_0x1f7b5f['id'],_0x1f7b5f,!0x0);this['sendBufferedUpdates']();}return _0x537673;}['addRevisionData'](_0x430373){const _0x5e7abc=this['repository']['createRevision'](_0x430373);return this['adapter']&&_0x5e7abc['on']('_update',(_0x478e8c,_0x9d213a,_0xdc88bd)=>{_0xdc88bd||(this['_bufferUpdate'](_0x9d213a['id'],_0x9d213a,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5e7abc,this['_findInsertionIndex'](_0x5e7abc)),_0x5e7abc;}async['getRevisionDocumentData'](_0x5a9d49){await this['_loadRevisionData'](_0x5a9d49);const _0x59d74b={};for(const _0x502ec3 in _0x5a9d49['diffData']){if(_0x5a9d49['diffData'][_0x502ec3]['attachChange']&&!_0x5a9d49['diffData'][_0x502ec3]['attachChange']['isAttached'])continue;const _0x146768=this['_removeRevisionMarkers'](JSON['parse'](_0x5a9d49['diffData'][_0x502ec3]['insertions'])),_0x3b80cc=this['editor']['editing']['view']['document'],_0x3bfd57=new _0xb1a3bf(_0x3b80cc,_0x146768['map'](_0x1f201f=>C(_0x1f201f,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x59d74b[_0x502ec3]=this['editor']['data']['processor']['toData'](_0x3bfd57),this['editor']['data']['processor']['useFillerType']('default');}return _0x59d74b;}async['getRevisionRootsAttributes'](_0x2a4cc6){await this['_loadRevisionData'](_0x2a4cc6);const _0x455bc2={};for(const _0x4a715a in _0x2a4cc6['diffData'])_0x2a4cc6['diffData'][_0x4a715a]['attachChange']&&!_0x2a4cc6['diffData'][_0x4a715a]['attachChange']['isAttached']||(_0x455bc2[_0x4a715a]=_0x2a4cc6['diffData'][_0x4a715a]['attributesAfter']||{});return _0x455bc2;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1b5305=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1d923b=0x0;_0x1d923b<_0x1b5305['length'];_0x1d923b++){const _0x3cb7c9=_0x1b5305[_0x1d923b];let _0x57cdae=!0x1;for(const _0x5bfa84 of Object['keys'](_0x3cb7c9))void 0x0===_0x3cb7c9[_0x5bfa84]?delete _0x3cb7c9[_0x5bfa84]:'id'!==_0x5bfa84&&(_0x57cdae=!0x0);_0x57cdae||(_0x1b5305[_0x1d923b]=null);}if(_0x1b5305=_0x1b5305['filter'](_0x48107a=>null!==_0x48107a),!_0x1b5305['length'])return;for(let _0x19ccfd=0x0;_0x19ccfd<_0x1b5305['length'];_0x19ccfd++){const _0x34850e=_0x1b5305[_0x19ccfd];void 0x0!==_0x34850e['fromVersion']&&void 0x0===_0x34850e['toVersion']&&(_0x34850e['toVersion']=this['repository']['getRevision'](_0x34850e['id'])['toVersion']),void 0x0!==_0x34850e['toVersion']&&void 0x0===_0x34850e['fromVersion']&&(_0x34850e['fromVersion']=this['repository']['getRevision'](_0x34850e['id'])['fromVersion']);}const _0x40d642=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1b5305,_0x40d642)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0xe43620=>{if(_0xe43620){for(const _0x211c97 of _0xe43620)this['setRevisionData']({'id':_0x211c97['id'],'createdAt':_0x211c97['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x2ec951,_0x9e5039){let _0x185579=this['editor']['config']['get']('initialData'),_0x3941b8=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x185579){_0x185579={};for(const _0x1fa353 of this['editor']['model']['document']['getRootNames']())_0x185579[_0x1fa353]='';}if('string'==typeof _0x185579&&(_0x185579={'main':_0x185579}),void 0x0===_0x3941b8){_0x3941b8={};for(const _0x2e486d of this['editor']['model']['document']['getRootNames']())_0x3941b8[_0x2e486d]={};}let _0x2439c0=!0x1;const _0x9e134d=Object['keys'](_0x185579),_0x472ae6=Object['keys'](_0x2ec951);for(const _0x3f600e of _0x9e134d){if(_0x185579[_0x3f600e]!==_0x2ec951[_0x3f600e]&&''!==_0x185579[_0x3f600e]['trim']()){_0x2439c0=!0x0;break;}if(!_0x580e1d(_0x3941b8[_0x3f600e],_0x9e5039[_0x3f600e])&&Object['keys'](_0x3941b8[_0x3f600e])['length']>0x0){_0x2439c0=!0x0;break;}}_0x2439c0||(_0x2439c0=_0x472ae6['some'](_0x22512c=>!this['editor']['model']['document']['getRoot'](_0x22512c))),_0x2439c0&&_0x3f4788('editor-initial-data-replaced-with-revision-data',{'editorData':_0x185579,'editorRootsAttributes':_0x3941b8,'revisionData':_0x2ec951,'revisionRootsAttributes':_0x9e5039}),this['editor']['config']['set']('initialData',_0x2ec951),this['editor']['config']['set']('rootsAttributes',_0x9e5039);}['_addPendingAction'](){if(!this['_pendingAction']){const _0xcb512d=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0xcb512d['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4fd061){const _0x1bfffd=this['repository']['getRevisions']();_0x1bfffd['reverse']();let _0x2a05bd=0x0;for(;_0x2a05bd<_0x1bfffd['length'];){const _0xbf5f18=_0x1bfffd[_0x2a05bd];if(_0xbf5f18===this['currentRevision']){_0x2a05bd++;continue;}if(_0xbf5f18['id']===this['_initialRevisionId'])break;const _0x3fa450=_0x4fd061['toVersion']-_0xbf5f18['toVersion']||_0x4fd061['fromVersion']-_0xbf5f18['fromVersion'];if(_0x3fa450>0x0)break;if(_0x3fa450<0x0)_0x2a05bd++;else{if(!_0x4fd061['creator']&&_0xbf5f18['creator'])break;if(_0xbf5f18['creator']||!_0x4fd061['creator']){if(_0x4fd061['createdAt']>_0xbf5f18['createdAt'])break;_0x2a05bd++;}else _0x2a05bd++;}}return _0x2a05bd;}['setRevisionData'](_0xc884f6){const _0x58632c=this['repository']['getRevision'](_0xc884f6['id']);if(_0xc884f6['createdAt']&&(_0xc884f6['createdAt']=new Date(_0xc884f6['createdAt'])),_0xc884f6['authorsIds']){const _0x2a130d=this['editor']['plugins']['get']('Users');_0xc884f6['authors']=_0xc884f6['authorsIds']['map'](_0x1c0ae5=>_0x2a130d['getUser'](_0x1c0ae5));}_0x58632c['_update'](_0xc884f6,!0x0);}['buildRevisionData']({revision:_0x3fa855=null,from:_0x56efd2=null,to:_0x2f6825=null}){_0x56efd2=null!==_0x56efd2?_0x56efd2:_0x3fa855['fromVersion'],_0x2f6825=null!==_0x2f6825?_0x2f6825:_0x3fa855['toVersion'];const _0x6f1842=this['_revisionDataBuilder']['getData'](_0x56efd2,_0x2f6825),_0x434c0b={'diffData':_0x6f1842['diffData'],'authorsIds':_0x6f1842['authorsIds'],'fromVersion':_0x56efd2,'toVersion':_0x2f6825};if(!_0x3fa855||_0x2f6825!==_0x3fa855['toVersion']){const _0x47a97f=_0x2f6825-0x1,_0x51a74b=this['_source']['history']['getOperation'](_0x47a97f);_0x434c0b['createdAt']=_0x51a74b&&_0x51a74b['createdAt']||new Date();}if(this['_loadedStateData']&&_0x56efd2===this['_loadedStateData']['fromVersion']){for(const _0x53f4e3 of this['_loadedStateData']['authors'])_0x434c0b['authorsIds']['includes'](_0x53f4e3['id'])||_0x434c0b['authorsIds']['push'](_0x53f4e3['id']);}return _0x434c0b;}['_loadRevisionData'](_0x13d3c6){if(!_0x13d3c6||_0x13d3c6['diffData'])return Promise['resolve']();{const _0x18c045=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x18c045,'revisionId':_0x13d3c6['id']})['then'](_0x4921f0=>{_0x13d3c6['diffData']=_0x4921f0['diffData'];});}}['_bufferUpdate'](_0x13fd11,_0x44b622,_0x57c642){if(this['_bufferedUpdates']['has'](_0x13fd11)){const _0x3e3a5a=this['_bufferedUpdates']['get'](_0x13fd11);_0x44b622=_0x57c642?{..._0x3e3a5a,..._0x44b622}:{..._0x44b622,..._0x3e3a5a};}this['_bufferedUpdates']['set'](_0x13fd11,_0x44b622);}['_getFromVersion'](_0x8a1408){const _0x52bd9c=this['repository']['getRevisions']();_0x52bd9c['reverse'](),_0x52bd9c['shift']();const _0x2cad5e=_0x52bd9c['find'](_0x486171=>_0x486171['toVersion']<=_0x8a1408)['toVersion'];return _0x2cad5e<this['_startingVersion']?this['_startingVersion']:_0x2cad5e;}['_createInitialRevision'](_0x95000){const _0x4210d5=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x4210d5)this['_initialRevisionId']=_0x4210d5['id'];else{const _0x5d4a1b=!this['editor']['model']['document']['roots']['find'](_0x101ddc=>this['editor']['model']['hasContent'](_0x101ddc)),_0x3b79c0=this['editor']['plugins']['get']('Users')['me']['id'],_0xdc354c=m(this['editor']['locale'],_0x5d4a1b?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x95000,'to':_0x95000,'id':this['_initialRevisionId'],'name':_0xdc354c,'creatorId':_0x3b79c0});}}['_createCurrentRevision'](_0x349ddc){const _0x1db045=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x1db045),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x349ddc,'to':_0x349ddc,'id':_0x1db045,'name':'','creatorId':null}));}['_makeRevision']({name:_0x113061,from:_0x32590a,to:_0x4bff44,creatorId:_0x2f2a1f,id:_0x5fe024}){const _0x547bb2=this['buildRevisionData']({'from':_0x32590a,'to':_0x4bff44});_0x547bb2['name']=_0x113061,_0x547bb2['creatorId']=_0x2f2a1f,_0x547bb2['id']=_0x5fe024;const _0x2fe7cd=this['addRevisionData'](_0x547bb2);return this['adapter']&&this['_bufferUpdate'](_0x547bb2['id'],_0x547bb2,!0x0),_0x2fe7cd;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x10dde4){return(_0x10dde4=_0x10dde4['filter'](_0x2190b0=>!_0x2190b0['name']||'revision-start'!==_0x2190b0['name']&&'revision-end'!==_0x2190b0['name']))['forEach'](_0x3c8997=>{'string'!=typeof _0x3c8997&&(_0x3c8997['children']=this['_removeRevisionMarkers'](_0x3c8997['children']),_0x3c8997['attributes']=_0x3c8997['attributes']['filter'](_0x563567=>!_0x563567[0x0]['startsWith']('data-revision-')));}),_0x10dde4;}}function C(_0x847967,_0x11fd5c){const _0x1ac924=_0x11fd5c['editing']['view']['document'];if('string'==typeof _0x847967)return new _0x14b10c(_0x1ac924,_0x847967);{const _0x578015=_0x847967['children']['map'](_0xfae503=>C(_0xfae503,_0x11fd5c));return new(P[_0x847967['type']]||_0x5d7b17)(_0x1ac924,_0x847967['name'],_0x847967['attributes'],_0x578015);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x23bd2b){this['editor']=_0x23bd2b,this['_savedMetaData']=new Map(),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_markers']=new Map(),this['_diffRoots']=new Map(),this['_diffRootsAttributes']=new Map(),this['_baseRoots']=new Map(),this['_baseRootsAttributes']=new Map(),this['_idsRoots']=new Map(),this['_baseIdsRoots']=new Map(),this['_touched']=new Map(),this['_touchedMarkers']=new Map(),this['_touchedRoots']=new Map(),this['_revisionId']=0x1;}['init'](_0x33ee4c){this['source']=_0x33ee4c;const _0x158082=new Map(),_0x334521=new Map(),_0x1ce827=this['editor']['model']['document']['roots']['map'](_0x58faab=>_0x58faab['rootName']);for(const _0x298685 of _0x1ce827){const _0x458978=this['editor']['model']['document']['getRoot'](_0x298685),_0x3886f0=T(_0x458978);_0x158082['set'](_0x298685,_0x3886f0),_0x334521['set'](_0x298685,Object['fromEntries'](_0x458978['getAttributes']()));}const _0x211e91=Array['from'](this['editor']['model']['markers'])['map'](_0x5b58dd=>[_0x5b58dd['name'],_0x5b58dd['getRange']()]),_0x12d0c1=this['source']['version'];this['_saveMetaData'](_0x12d0c1,_0x158082,_0x211e91,_0x334521),this['_startingRevisionId']=this['_revisionId'];const _0x34bfa0=new Map(),_0x51604b=new Map();for(const _0x4dfa02 of _0x1ce827){const _0x2a0d45=F(_0x4dfa02);_0x34bfa0['set'](_0x4dfa02,_0x2a0d45),_0x51604b['set'](_0x4dfa02,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x34bfa0,[],_0x51604b);}['getData'](_0xfe91d0,_0xce16c1){if(this['_lastFrom']===_0xfe91d0&&this['_lastTo']<=_0xce16c1)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0xce16c1,!0x0);else{if(!this['_savedMetaData']['has'](_0xfe91d0)){const _0x20bd88=this['_getPreviousFrom'](_0xfe91d0);this['_calculateMetaData'](_0x20bd88,_0xfe91d0,!0x1);}this['_calculateMetaData'](_0xfe91d0,_0xce16c1,!0x0);}return this['_lastFrom']=_0xfe91d0,this['_lastTo']=_0xce16c1,this['_getState']();}['loadState'](_0x33409c){this['_reset'](),this['_lastFrom']=_0x33409c['fromVersion'],this['_lastTo']=_0x33409c['toVersion'];for(const _0x2d2088 in _0x33409c['diffData']){const _0x5e066a=_0x33409c['diffData'][_0x2d2088]['attachChange'],_0x444f16=_0x25f479(_0x33409c['diffData'][_0x2d2088]['attributesBefore'])||{},_0x7e98bf=this['_makeModelFromViewString'](_0x33409c['diffData'][_0x2d2088]['deletions']);_0x7e98bf['rootName']=_0x2d2088,_0x7e98bf['_isAttached']=!_0x5e066a||!_0x5e066a['isAttached'],_0x7e98bf['isAttached']=()=>_0x7e98bf['_isAttached'],this['_baseRoots']['set'](_0x2d2088,_0x7e98bf),this['_baseRootsAttributes']['set'](_0x2d2088,_0x444f16),_0x5e066a&&this['_touchedRoots']['set'](_0x2d2088,_0x5e066a);const _0x7317ce=this['_makeIdsRoot'](_0x7e98bf);this['_baseIdsRoots']['set'](_0x2d2088,_0x7317ce);for(const [_0x51b67c,_0x2636a4]of _0x7e98bf['markers']){if(!_0x51b67c['startsWith']('revision:'))continue;const _0x34ac97=_0x51b67c['split'](':')[0x2];for(const _0xf3b32f of _0x2636a4['getWalker']({'singleCharacters':!0x0})){const _0x3a32ef=this['_getVidAttributeName'](_0xf3b32f),_0x1dc34f='elementEnd'==_0xf3b32f['type']?_0xf3b32f['previousPosition']['path']['slice'](0x0,-0x1):_0xf3b32f['previousPosition']['path'],_0x525022=_0x7317ce['getNodeByPath'](_0x1dc34f)['getAttribute'](_0x3a32ef);this['_touched']['set'](_0x525022,{'userId':_0x34ac97});}}}this['_startingRevisionId']=this['_revisionId'];const _0x48934b=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2d4cea=>!this['_touched']['has'](_0x2d4cea));let _0x4d6f24=0x0;const _0x151d87=new Map();for(const _0x357dbd in _0x33409c['diffData']){const _0x57984e=_0x33409c['diffData'][_0x357dbd]['attachChange'],_0x5519c6=_0x25f479(_0x33409c['diffData'][_0x357dbd]['attributesAfter'])||{},_0x45384e=this['_makeModelFromViewString'](_0x33409c['diffData'][_0x357dbd]['insertions']);_0x45384e['rootName']=_0x357dbd,_0x45384e['_isAttached']=!_0x57984e||_0x57984e['isAttached'],_0x45384e['isAttached']=()=>_0x45384e['_isAttached'],this['_diffRoots']['set'](_0x357dbd,_0x45384e),this['_diffRootsAttributes']['set'](_0x357dbd,_0x5519c6);const _0x4b2a69=this['_makeIdsRoot'](_0x45384e,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x357dbd,_0x4b2a69),_0x151d87['set'](_0x357dbd,_0x45384e['isAttached']()?_0x5519c6:{});for(const [_0x313ba4,_0x1dab29]of _0x45384e['markers']){if(!_0x313ba4['startsWith']('revision:'))continue;const _0x254fab=_0x313ba4['split'](':')[0x2];for(const _0x2886db of _0x1dab29['getWalker']({'singleCharacters':!0x0})){const _0xd8b3dd=this['_getVidAttributeName'](_0x2886db),_0x3af236=this['_revisionId']++,_0x572a5b='elementEnd'==_0x2886db['type']?_0x2886db['previousPosition']['path']['slice'](0x0,-0x1):_0x2886db['previousPosition']['path'];_0x4b2a69['getNodeByPath'](_0x572a5b)['_setAttribute'](_0xd8b3dd,_0x3af236),this['_touched']['set'](_0x3af236,{'userId':_0x254fab});}}for(const _0x2a9263 of this['editor']['model']['createRangeIn'](_0x45384e)['getWalker']({'singleCharacters':!0x0})){const _0x1db5a3=this['_getVidAttributeName'](_0x2a9263),_0x59f8bf='elementEnd'==_0x2a9263['type']?_0x2a9263['previousPosition']['path']['slice'](0x0,-0x1):_0x2a9263['previousPosition']['path'],_0x426521=_0x4b2a69['getNodeByPath'](_0x59f8bf);_0x426521['getAttribute'](_0x1db5a3)>0x0||_0x426521['_setAttribute'](_0x1db5a3,_0x48934b[_0x4d6f24++]);}for(const [_0x1c0364,_0x18c4f1]of _0x45384e['markers'])_0x1c0364['startsWith']('revision:')||this['_markers']['set'](_0x1c0364,_0x18c4f1);}const _0x3730d2=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x3730d2),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x3730d2,0x1));const _0x2728bb=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x2728bb),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2728bb,0x1));const _0x3614df=Array['from'](this['_diffRoots'])['map'](([_0x1d7fe6,_0x512217])=>[_0x1d7fe6,T(_0x512217)]);this['_saveMetaData'](this['_lastTo'],_0x3614df,this['_markers'],_0x151d87);}['_makeModelFromViewString'](_0x378858){const _0x433343=JSON['parse'](_0x378858),_0x4e812a=this['editor']['editing']['view']['document'],_0x18dd4b=new _0xb1a3bf(_0x4e812a,_0x433343['map'](_0x45c7d3=>C(_0x45c7d3,this['editor'])));return this['editor']['data']['toModel'](_0x18dd4b);}['_saveMetaData'](_0x1dbb03,_0x59dbfa,_0xd01ac9,_0x1fde73){const _0x5d2a41=new Map(_0x59dbfa),_0x1d2799=new Map(_0x25f479(_0x1fde73)),_0x1a2e98=new Map();for(const [_0x4037a0,_0x181922]of _0xd01ac9)_0x1a2e98['set'](_0x4037a0,{'start':_0x181922['start']['clone'](),'end':_0x181922['end']['clone'](),'rootName':_0x181922['root']['rootName']});this['_savedMetaData']['set'](_0x1dbb03,{'roots':_0x5d2a41,'markers':_0x1a2e98,'rootsAttributes':_0x1d2799});}['_removeMetaData'](_0x48aa51){this['_savedMetaData']['delete'](_0x48aa51);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x469b36,_0x10aab2=null){let _0x3d4899=null;_0x469b36['is']('documentFragment')||(_0x3d4899=new ft(_0x469b36['name'],{'vid_start':null===_0x10aab2?this['_revisionId']++:_0x10aab2++}));const _0x39945a=[];for(const _0x4da0e0 of _0x469b36['getChildren']())if(_0x4da0e0['is']('element')){_0x39945a['push'](this['_makeIdsRoot'](_0x4da0e0,_0x10aab2));const _0x5875f2=_0x39945a[_0x39945a['length']-0x1];null!==_0x10aab2&&(_0x10aab2=_0x5875f2['is']('element','$text')?_0x5875f2['getAttribute']('vid')+0x1:_0x5875f2['getAttribute']('vid_end')+0x1);}else{for(let _0x45fc4f=0x0;_0x45fc4f<_0x4da0e0['offsetSize'];_0x45fc4f++)_0x39945a['push'](new ft('$text',{'vid':null===_0x10aab2?this['_revisionId']++:_0x10aab2++}));}if(_0x469b36['is']('documentFragment')){const _0x312571=F(_0x469b36['rootName']);return _0x312571['_insertChild'](0x0,_0x39945a),_0x312571;}return _0x3d4899['_setAttribute']('vid_end',null===_0x10aab2?this['_revisionId']++:_0x10aab2++),_0x3d4899['_insertChild'](0x0,_0x39945a),_0x3d4899;}['_calculateMetaData'](_0x4190d8,_0x4129e5,_0x4a4f0c){this['_reset']();const {roots:_0x23a558,markers:_0x18b557,rootsAttributes:_0x1ddf3a}=this['_savedMetaData']['get'](_0x4190d8);this['_baseRoots']=new Map(_0x23a558),this['_baseRootsAttributes']=new Map(_0x25f479(_0x1ddf3a));for(const [_0x13f020,_0x1c98cf]of this['_baseRoots'])if('$graveyard'!==_0x13f020&&(this['_diffRoots']['set'](_0x13f020,T(_0x1c98cf)),this['_diffRootsAttributes']=new Map(_0x25f479(_0x1ddf3a)),_0x4a4f0c)){const _0x1edb14=this['_revisionId'];this['_idsRoots']['set'](_0x13f020,this['_makeIdsRoot'](_0x1c98cf)),this['_baseIdsRoots']['set'](_0x13f020,this['_makeIdsRoot'](_0x1c98cf,_0x1edb14));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x4a4f0c&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x50188b,_0x4fd811]of _0x18b557){const _0x42dac8=this['_baseRoots']['get'](_0x4fd811['rootName']),_0x5b716c=this['_diffRoots']['get'](_0x4fd811['rootName']),_0x87416e=new vt(this['_fixPosition'](_0x4fd811['start'],_0x42dac8),this['_fixPosition'](_0x4fd811['end'],_0x42dac8)),_0x132d3f=this['_fixRange'](_0x87416e,_0x5b716c);_0x42dac8['markers']['set'](_0x50188b,_0x87416e),this['_markers']['set'](_0x50188b,_0x132d3f);}this['_applyOperations'](_0x4190d8,_0x4129e5,_0x4a4f0c);}['_applyOperations'](_0x1c74c0,_0x1c50c5,_0x44250a){for(const _0x486823 of this['source']['getOperations'](_0x1c74c0,_0x1c50c5))this['_handleOperation'](_0x486823,_0x44250a);for(const _0x526757 of this['_diffRoots']['values']())_0x526757['markers']['clear']();for(const [_0x5ca598,_0x2befc5]of this['_markers']){this['_diffRoots']['get'](_0x2befc5['root']['rootName'])['markers']['set'](_0x5ca598,_0x2befc5['clone']());}const _0x155e24=new Map(),_0x5e2fa1=new Map();for(const [_0x4170e3,_0x2a52f5]of this['_diffRoots'])_0x155e24['set'](_0x4170e3,T(_0x2a52f5)),_0x5e2fa1['set'](_0x4170e3,this['_diffRootsAttributes']['get'](_0x4170e3));this['_saveMetaData'](_0x1c50c5,_0x155e24,this['_markers'],_0x5e2fa1);}['_getPreviousFrom'](_0x4e124c){const _0x842510=Array['from'](this['_savedMetaData']['keys']());_0x842510['sort']((_0x562112,_0x263fd0)=>_0x562112-_0x263fd0),_0x842510['reverse']();for(const _0x314620 of _0x842510)if(_0x314620<_0x4e124c)return _0x314620;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x24043d,_0x3f1513){const _0x2466be=Array['from'](_0x3f1513['markers'])['map'](([_0x36936e,_0x5e5bab])=>[_0x36936e,this['_fixRange'](_0x5e5bab,_0x24043d)]);_0x24043d['markers']=new Map(_0x2466be);}['_transformMarkers'](_0x26edaf){for(const _0x29ca3c of this['_markers']['values']()){const _0x54bae0=_0x29ca3c['getTransformedByOperation'](_0x26edaf),_0x4b5529=vt['_createFromRanges'](_0x54bae0);_0x29ca3c['start']=_0x4b5529['start'],_0x29ca3c['end']=_0x4b5529['end'];}}['_handleOperation'](_0x24d2d9,_0x1d3525){if('addRoot'!=_0x24d2d9['type']&&'detachRoot'!=_0x24d2d9['type']){if('insert'==_0x24d2d9['type']){const _0x3af3ec=_0x24d2d9['position']['root']['rootName'];this['_diffRoots']['has'](_0x3af3ec)||(this['_diffRoots']['set'](_0x3af3ec,F(_0x3af3ec,!0x0)),this['_diffRootsAttributes']['set'](_0x3af3ec,{}),_0x1d3525&&this['_idsRoots']['set'](_0x3af3ec,F(_0x3af3ec,!0x0)));}else{if('addRootAttribute'==_0x24d2d9['type']||'removeRootAttribute'==_0x24d2d9['type']||'changeRootAttribute'==_0x24d2d9['type'])return void this['_handleRootAttributeOperation'](_0x24d2d9);'marker'==_0x24d2d9['type']&&this['_handleMarkerOperation'](_0x24d2d9);}if('marker'!==_0x24d2d9['type']){const _0x2db27f=this['_cloneOperation'](_0x24d2d9,this['_diffRoots']);_0x2db27f['_execute'](),this['_transformMarkers'](_0x2db27f);}if(_0x1d3525)switch(_0x24d2d9['type']){case'insert':this['_handleInsertOperation'](_0x24d2d9);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x24d2d9);break;case'merge':this['_handleMergeOperation'](_0x24d2d9);break;case'split':this['_handleSplitOperation'](_0x24d2d9);}}else this['_handleRootOperation'](_0x24d2d9,_0x1d3525);}['_cloneOperation'](_0x5e625c,_0x258c32){const _0x5db6db=_0x5e625c['clone']();return _0x5db6db['_authorId']=_0x5e625c['_authorId'],this['_fixOperation'](_0x5db6db,_0x258c32),_0x5db6db;}['_getBaseVids'](_0x51bf5e){return _0x51bf5e['map'](_0x5e9e33=>{const _0x597afd=this['_getVidAttributeName'](_0x5e9e33);return Number(_0x5e9e33['item']['getAttribute'](_0x597afd));});}['_generateTape'](_0x211d12,_0x491ac9){if(_0x211d12['is']('element','$text'))_0x491ac9['push']({'item':_0x211d12,'type':'text'});else{_0x211d12['is']('element')&&_0x491ac9['push']({'item':_0x211d12,'type':'elementStart'});for(const _0x5cc662 of _0x211d12['getChildren']())this['_generateTape'](_0x5cc662,_0x491ac9);_0x211d12['is']('element')&&_0x491ac9['push']({'item':_0x211d12,'type':'elementEnd'});}return _0x491ac9;}['_getState'](){const _0x4491a2=new Map(this['_touched']),_0x343937=new Map(_0x4491a2),_0x39dac2=new Map(),_0x36cdf7={'insertions':{},'deletions':{}},_0x9495={'insertions':{},'deletions':{}},_0x2cb35d=new Map(),_0x443b47=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x443b47['delete']('$graveyard');for(const _0x1fdfed of _0x443b47){const _0x447a86=this['_diffRoots']['get'](_0x1fdfed)||F(_0x1fdfed,!0x1),_0x553ee5=this['_baseRoots']['get'](_0x1fdfed)||F(_0x1fdfed,!0x1);_0x447a86['isAttached']()||_0x553ee5['isAttached']()?(_0x36cdf7['insertions'][_0x1fdfed]=T(_0x447a86),_0x36cdf7['deletions'][_0x1fdfed]=T(_0x553ee5),this['_copyMarkers'](_0x36cdf7['deletions'][_0x1fdfed],_0x553ee5),this['_copyMarkers'](_0x36cdf7['insertions'][_0x1fdfed],_0x447a86),_0x9495['insertions'][_0x1fdfed]=this['_generateTape'](this['_idsRoots']['get'](_0x1fdfed),[]),_0x9495['deletions'][_0x1fdfed]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1fdfed)||F(_0x1fdfed,!0x1),[])):_0x443b47['delete'](_0x1fdfed);}for(const _0x18f7f0 of _0x443b47){const _0x5a6c8e=_0x9495['insertions'][_0x18f7f0];for(const _0x50579c of _0x5a6c8e){const _0x3d20ad=this['_getVidAttributeName'](_0x50579c),_0x2dd212=_0x50579c['item']['getAttribute'](_0x3d20ad);_0x343937['delete'](_0x2dd212),_0x2dd212>=this['_startingRevisionId']&&_0x39dac2['set'](_0x2dd212,_0x4491a2['get'](_0x2dd212));}}for(const _0x27a657 of _0x443b47){const _0x22be2b=_0x9495['insertions'][_0x27a657],_0x351b37=this['_getBaseVids'](_0x9495['deletions'][_0x27a657]);let _0x3aef56=0x0;for(const _0x1784eb of _0x22be2b){const _0x1e9f82=this['_getVidAttributeName'](_0x1784eb),_0x6150f7=_0x1784eb['item']['getAttribute'](_0x1e9f82);if(!_0x39dac2['has'](_0x6150f7)&&!_0x2cb35d['has'](_0x6150f7)){if(_0x343937['has'](_0x6150f7))_0x3aef56++;else{if(_0x6150f7!=_0x351b37[_0x3aef56]){const _0x565eb2=_0x4491a2['get'](_0x6150f7)||_0x4491a2['get'](_0x351b37[_0x3aef56]);for(;_0x6150f7!=_0x351b37[_0x3aef56];)_0x343937['has'](_0x351b37[_0x3aef56])||(_0x2cb35d['set'](_0x351b37[_0x3aef56],_0x565eb2),_0x4491a2['set'](_0x351b37[_0x3aef56],_0x565eb2)),_0x3aef56++;}_0x3aef56++;}}}}for(const _0xfa241d of _0x443b47){const _0x145918=_0x9495['insertions'][_0xfa241d];for(const _0x22537d of _0x145918){const _0x1f8b5e=this['_getVidAttributeName'](_0x22537d),_0x4cf216=_0x22537d['item']['getAttribute'](_0x1f8b5e);if(_0x2cb35d['has'](_0x4cf216)){const _0x562ba0=_0x2cb35d['get'](_0x4cf216);_0x343937['has'](_0x4cf216)||_0x343937['set'](_0x4cf216,{..._0x562ba0}),_0x39dac2['set'](_0x4cf216,{..._0x562ba0});}}}for(const _0x18d935 of _0x343937['keys']())_0x18d935>=this['_startingRevisionId']&&_0x343937['delete'](_0x18d935);const _0x5ef0b7=new Map();for(const _0x4b2147 of _0x443b47){let _0x4db797=_0x9495['insertions'][_0x4b2147];for(const _0x2ddf05 of _0x4db797)if(_0x2ddf05['item']['is']('element','tableCell')){const _0x5a72da=this['_getVidAttributeName'](_0x2ddf05),_0x2a574c=_0x2ddf05['item']['getAttribute'](_0x5a72da);if(_0x39dac2['has'](_0x2a574c)){const _0x35d171=_0x2ddf05['item']['parent']['parent']['getAttribute']('vid_start'),_0x180871=_0x5ef0b7['get'](_0x35d171)||new Set();_0x180871['add'](_0x39dac2['get'](_0x2a574c)['userId']),_0x5ef0b7['set'](_0x35d171,_0x180871);}}_0x4db797=_0x9495['deletions'][_0x4b2147];for(const _0xa188a5 of _0x4db797)if(_0xa188a5['item']['is']('element','tableCell')){const _0x3348ac=this['_getVidAttributeName'](_0xa188a5),_0x249948=_0xa188a5['item']['getAttribute'](_0x3348ac);if(_0x343937['has'](_0x249948)){const _0x393c58=_0xa188a5['item']['parent']['parent']['getAttribute']('vid_start'),_0x568834=_0x5ef0b7['get'](_0x393c58)||new Set();_0x568834['add'](_0x343937['get'](_0x249948)['userId']),_0x5ef0b7['set'](_0x393c58,_0x568834);}}for(const _0xb92c3f of _0x5ef0b7['keys']())(_0x39dac2['has'](_0xb92c3f)||_0x343937['has'](_0xb92c3f))&&_0x5ef0b7['delete'](_0xb92c3f);}for(const _0x3c66f of _0x443b47){const _0x43c071=_0x9495['insertions'][_0x3c66f];let _0x13fa53=null,_0x56efae=null;for(const _0x2731d5 of _0x43c071){const _0x3fde73=this['_getVidAttributeName'](_0x2731d5),_0x355da7=_0x2731d5['item']['getAttribute'](_0x3fde73),_0x285085=_0x5ef0b7['get'](_0x355da7);_0x285085&&'elementStart'==_0x2731d5['type']&&(_0x13fa53=Array['from'](_0x285085)[0x0],_0x56efae=_0x2731d5['item']['getAttribute']('vid_end')),_0x13fa53&&(_0x343937['set'](_0x355da7,{'userId':_0x13fa53}),_0x39dac2['set'](_0x355da7,{'userId':_0x13fa53})),_0x355da7==_0x56efae&&(_0x13fa53=null,_0x56efae=null);}}const _0x1caf0b={},_0xc7a31f=new Set();for(const _0x19e96b of _0x443b47){const _0x3cdebf=_0x36cdf7['deletions'][_0x19e96b],_0x18069c=_0x36cdf7['insertions'][_0x19e96b];for(const {userId:_0x5cb5b9}of this['_touchedMarkers']['values']())null!==_0x5cb5b9&&_0xc7a31f['add'](_0x5cb5b9);for(const {userId:_0xa8f5f7}of this['_touchedRoots']['values']())null!==_0xa8f5f7&&_0xc7a31f['add'](_0xa8f5f7);this['_markChanges'](_0x18069c,_0x9495['insertions'][_0x19e96b],_0x39dac2,'insertion',_0xc7a31f),this['_markChanges'](_0x3cdebf,_0x9495['deletions'][_0x19e96b],_0x343937,'deletion',_0xc7a31f),_0x1caf0b[_0x19e96b]={'insertions':this['_prepareViewToSave'](_0x18069c),'deletions':this['_prepareViewToSave'](_0x3cdebf),'attachChange':this['_touchedRoots']['get'](_0x19e96b)||null,'attributesBefore':_0x25f479(this['_baseRootsAttributes']['get'](_0x19e96b))||{},'attributesAfter':_0x25f479(this['_diffRootsAttributes']['get'](_0x19e96b))};}return{'diffData':_0x1caf0b,'authorsIds':Array['from'](_0xc7a31f)};}['_processRootBeforeSave'](_0x483604){for(const [,_0x25dd7b]of _0x483604['markers']){const _0x42959c=_0x25dd7b['start']['getAncestors']()['filter'](_0xc378c8=>'tableCell'==_0xc378c8['name']);for(const _0x33d5e6 of _0x42959c)0x1==_0x33d5e6['childCount']&&_0x33d5e6['getChild'](0x0)['is']('element','paragraph')&&_0x33d5e6['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x28f75e){this['_processRootBeforeSave'](_0x28f75e);const _0x142fe7=this['editor']['data']['toView'](_0x28f75e,{}),_0x2c95b1=Array['from'](_0x142fe7['getChildren']())['map'](_0x12c96e=>this['_getViewJson'](_0x12c96e));return JSON['stringify'](_0x2c95b1);}['_getViewJson'](_0x2cda16){if(_0x2cda16['is']('$text'))return _0x2cda16['data'];{const _0x19389a=_0x2cda16;return{'type':Object['keys'](P)['find'](_0x4ca951=>_0x2cda16 instanceof P[_0x4ca951]),'name':_0x19389a['name'],'attributes':Array['from'](_0x19389a['getAttributes']()),'children':Array['from'](_0x19389a['getChildren']())['map'](_0x3270a3=>this['_getViewJson'](_0x3270a3))};}}['_markChanges'](_0x724e40,_0x14b6c1,_0x4aa2c2,_0x1ae79e,_0x383da9){let _0x410bb1=null,_0x152343=null,_0x40fc54=0x0;const _0x541daf=this['editor']['model'];for(let _0x4480ea=0x0;_0x4480ea<_0x14b6c1['length'];_0x4480ea++){const _0x268a49=this['_getVidAttributeName'](_0x14b6c1[_0x4480ea]),_0x339900=_0x14b6c1[_0x4480ea]['item']['getAttribute'](_0x268a49),_0x41a91f=_0x4aa2c2['get'](_0x339900),_0x1325e1=_0x4480ea==_0x14b6c1['length']-0x1;(!_0x410bb1&&_0x41a91f&&(_0x410bb1=_0x41a91f,_0x152343=_0x14b6c1[_0x4480ea]),_0x410bb1&&(!_0x41a91f||_0x41a91f['userId']!=_0x410bb1['userId']))&&(_0x50f9dd(_0x41a91f,B(_0x152343,_0x724e40,_0x541daf),B(_0x14b6c1[_0x4480ea],_0x724e40,_0x541daf)),_0x410bb1=_0x41a91f||null,_0x152343=_0x41a91f?_0x14b6c1[_0x4480ea]:null),_0x410bb1&&_0x1325e1&&_0x50f9dd(_0x41a91f,B(_0x152343,_0x724e40,_0x541daf),J(_0x14b6c1[_0x4480ea],_0x724e40,_0x541daf));}function _0x50f9dd(_0x396e9f,_0xa61f1d,_0x5b7924){const _0x458133=_0x410bb1['userId'],_0x2acdd2='revision:'+_0x1ae79e+':'+_0x458133+':'+_0x40fc54++,_0x58b233=_0x541daf['createRange'](_0xa61f1d,_0x5b7924);_0x724e40['markers']['set'](_0x2acdd2,_0x58b233),null!==_0x458133&&_0x383da9['add'](_0x458133);}}['_getVidAttributeName'](_0x489fdf){switch(_0x489fdf['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x994898,_0x1998d9){_0x994898['baseVersion']=null;for(const _0xe68b9b in _0x994898){const _0x594a11=_0x994898[_0xe68b9b];if(_0x594a11 instanceof gt){const _0x4ccee4=_0x1998d9['get'](_0x594a11['root']['rootName']);_0x994898[_0xe68b9b]=this['_fixPosition'](_0x594a11,_0x4ccee4);}if(_0x594a11 instanceof vt){const _0x5060b6=_0x1998d9['get'](_0x594a11['root']['rootName']);_0x994898[_0xe68b9b]=this['_fixRange'](_0x594a11,_0x5060b6);}'root'===_0xe68b9b&&(_0x994898['root']=_0x1998d9['get'](_0x994898['root']['rootName']));}}['_fixRange'](_0x5c4df2,_0x45afb8){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5c4df2['start'],_0x45afb8),this['_fixPosition'](_0x5c4df2['end'],_0x45afb8));}['_fixPosition'](_0x49cddc,_0x7422e2){return this['editor']['model']['createPositionFromPath'](_0x7422e2,_0x49cddc['path'],_0x49cddc['stickiness']);}['_handleInsertOperation'](_0xe050f0){const _0x2a8d84=this['_idsRoots']['get'](_0xe050f0['position']['root']['rootName']),_0x193f96=this['_fixPosition'](_0xe050f0['position'],_0x2a8d84),_0x276af6=null===_0xe050f0['_authorId']?null:_0xe050f0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4f94b5=_0x193f96['parent'],_0x1d97e1=this['_revisionId'],_0x52df38=[];for(const _0x556a24 of _0xe050f0['nodes'])if(_0x556a24['is']('element'))_0x52df38['push'](this['_makeIdsRoot'](_0x556a24));else{for(let _0x64d491=0x0;_0x64d491<_0x556a24['offsetSize'];_0x64d491++)_0x52df38['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x3df77b=this['_revisionId'];for(let _0x2caff6=_0x1d97e1;_0x2caff6<_0x3df77b;_0x2caff6++)this['_touched']['set'](_0x2caff6,{'userId':_0x276af6});_0x4f94b5['_insertChild'](_0x193f96['offset'],_0x52df38);}['_handleMoveOperation'](_0x31636f){(_0x31636f=this['_cloneOperation'](_0x31636f,this['_idsRoots']))['_execute']();const _0x3b2cbc=null===_0x31636f['_authorId']?null:_0x31636f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xd04248=_0x31636f['getMovedRangeStart'](),_0x3cc009=_0xd04248['parent'],_0x303e0d=_0xd04248['offset'];!function _0x3bf331(_0x43fa0f,_0x57e7ce,_0x4e1036,_0x532e94){for(let _0x3f3487=_0x4e1036;_0x3f3487<_0x532e94;_0x3f3487++){const _0x1bd942=_0x57e7ce['getChild'](_0x3f3487);_0x1bd942['is']('element','$text')?_0x43fa0f['set'](_0x1bd942['getAttribute']('vid'),{'userId':_0x3b2cbc}):(_0x43fa0f['set'](_0x1bd942['getAttribute']('vid_start'),{'userId':_0x3b2cbc}),_0x3bf331(_0x43fa0f,_0x1bd942,0x0,_0x1bd942['childCount']),_0x43fa0f['set'](_0x1bd942['getAttribute']('vid_end'),{'userId':_0x3b2cbc}));}}(this['_touched'],_0x3cc009,_0x303e0d,_0x303e0d+_0x31636f['howMany']);}['_handleMergeOperation'](_0x2f1c37){const _0x2ff034=null===(_0x2f1c37=this['_cloneOperation'](_0x2f1c37,this['_idsRoots']))['_authorId']?null:_0x2f1c37['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1fffc7=_0x2f1c37['targetPosition']['parent'],_0x152b3a=_0x2f1c37['sourcePosition']['parent'],_0x141247=_0x1fffc7['getAttribute']('vid_end'),_0x3e7e73=_0x152b3a['getAttribute']('vid_start');_0x1fffc7['_setAttribute']('vid_end',_0x152b3a['getAttribute']('vid_end')),_0x152b3a['_setAttribute']('vid_end',_0x141247),this['_touched']['set'](_0x3e7e73,{'userId':_0x2ff034}),this['_touched']['set'](_0x141247,{'userId':_0x2ff034}),_0x2f1c37['_execute']();}['_handleSplitOperation'](_0x59a3e7){const _0x4ec1a3=null===(_0x59a3e7=this['_cloneOperation'](_0x59a3e7,this['_idsRoots']))['_authorId']?null:_0x59a3e7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x12c934=_0x59a3e7['graveyardPosition'],_0x2a4c62=_0x59a3e7['splitPosition']['parent'];_0x59a3e7['_execute']();const _0x55c862=_0x2a4c62['getAttribute']('vid_end'),_0x4b10ae=_0x59a3e7['insertionPosition']['nodeAfter'];if(_0x12c934){const _0x3ebe5d=_0x4b10ae['getAttribute']('vid_end'),_0x56d658=_0x2a4c62['getAttribute']('vid_end');_0x2a4c62['_setAttribute']('vid_end',_0x3ebe5d),_0x4b10ae['_setAttribute']('vid_end',_0x56d658),this['_touched']['set'](_0x2a4c62['getAttribute']('vid_end'),{'userId':_0x4ec1a3}),this['_touched']['set'](_0x4b10ae['getAttribute']('vid_start'),{'userId':_0x4ec1a3});}else{const _0x18bcfb=this['_revisionId']++,_0x3ce1cb=this['_revisionId']++;_0x2a4c62['_setAttribute']('vid_end',_0x18bcfb),_0x4b10ae['_setAttribute']('vid_start',_0x3ce1cb),_0x4b10ae['_setAttribute']('vid_end',_0x55c862),this['_touched']['set'](_0x18bcfb,{'userId':_0x4ec1a3}),this['_touched']['set'](_0x3ce1cb,{'userId':_0x4ec1a3});}}['_handleMarkerOperation'](_0x336a4e){if(!_0x336a4e['affectsData'])return;const _0x13ea4c=(_0x336a4e=this['_cloneOperation'](_0x336a4e,this['_diffRoots']))['oldRange']?_0x336a4e['oldRange']['root']:null,_0x20be53=_0x336a4e['newRange']?_0x336a4e['newRange']['root']:null;_0x13ea4c&&this['_markers']['delete'](_0x336a4e['name']),_0x20be53&&this['_markers']['set'](_0x336a4e['name'],_0x336a4e['newRange']['clone']());const _0x41ec6a=null===_0x336a4e['_authorId']?null:_0x336a4e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4e87c9=_0x336a4e['name'];if(!this['_touchedMarkers']['has'](_0x4e87c9))return void this['_touchedMarkers']['set'](_0x4e87c9,{'range':_0x336a4e['oldRange'],'userId':_0x41ec6a});const _0x4081f9=this['_touchedMarkers']['get'](_0x4e87c9),_0x2319fd=_0x4081f9['range'],_0x49bb60=_0x336a4e['newRange'];null==_0x2319fd&&null==_0x49bb60||_0x2319fd&&_0x49bb60&&_0x2319fd['isEqual'](_0x49bb60)?this['_touchedMarkers']['delete'](_0x336a4e['name']):_0x4081f9['userId']=_0x41ec6a;}['_handleRootOperation'](_0x279786,_0x203b27){this['_diffRoots']['has'](_0x279786['rootName'])?this['_diffRoots']['get'](_0x279786['rootName'])['_isAttached']=_0x279786['isAdd']:(this['_diffRoots']['set'](_0x279786['rootName'],F(_0x279786['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x279786['rootName'],{}),_0x203b27&&this['_idsRoots']['set'](_0x279786['rootName'],F(_0x279786['rootName'],!0x0)));const _0x551907=null===_0x279786['_authorId']?null:_0x279786['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4e32e3=this['_touchedRoots']['get'](_0x279786['rootName']);_0x4e32e3&&_0x4e32e3['userId']===_0x551907?this['_touchedRoots']['delete'](_0x279786['rootName']):this['_touchedRoots']['set'](_0x279786['rootName'],{'userId':_0x551907,'isAttached':_0x279786['isAdd']});}['_handleRootAttributeOperation'](_0x5636a3){const _0x4cb4a2=this['_diffRootsAttributes']['get'](_0x5636a3['root']['rootName']);null===_0x5636a3['newValue']?delete _0x4cb4a2[_0x5636a3['key']]:_0x4cb4a2[_0x5636a3['key']]=_0x5636a3['newValue'];}}function T(_0x13076d){const _0x2b0486=F(_0x13076d['rootName'],_0x13076d['isAttached']());for(const _0x53a5f7 of _0x13076d['getChildren']()){const _0x2ffda7=_0x53a5f7['_clone'](!0x0);_0x2b0486['_appendChild'](_0x2ffda7);}return _0x2b0486;}function F(_0x18601b,_0x28b08c=!0x0){const _0x3dfc93=new mt();return _0x3dfc93['rootName']=_0x18601b,_0x3dfc93['_isAttached']=_0x28b08c,_0x3dfc93['isAttached']=()=>_0x3dfc93['_isAttached'],_0x3dfc93;}function B(_0x5a85bb,_0x56f1db,_0x5990bf){const _0x317eac='elementEnd'==_0x5a85bb['type']?_0x5990bf['createPositionAt'](_0x5a85bb['item'],'end'):_0x5990bf['createPositionBefore'](_0x5a85bb['item']);return _0x5990bf['createPositionFromPath'](_0x56f1db,_0x317eac['path'],_0x317eac['stickiness']);}function J(_0x59b32a,_0x3a6276,_0x314c18){const _0x1f3ced='elementStart'==_0x59b32a['type']?_0x314c18['createPositionAt'](_0x59b32a['item'],0x0):_0x314c18['createPositionAfter'](_0x59b32a['item']);return _0x314c18['createPositionFromPath'](_0x3a6276,_0x1f3ced['path'],_0x1f3ced['stickiness']);}class hs extends _0x2bb680{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x2ba282,_0x2417d8){super(_0x2ba282),this['focusTracker']=new _0x6ef35b(),this['keystrokes']=new _0x2730cf(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2417d8),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x141e59({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x5d0cbc=_0x419549=>_0x419549['stopPropagation']();this['keystrokes']['set']('arrowright',_0x5d0cbc),this['keystrokes']['set']('arrowleft',_0x5d0cbc),this['keystrokes']['set']('arrowup',_0x5d0cbc),this['keystrokes']['set']('arrowdown',_0x5d0cbc);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x54bbd9){this['revisionNameInputView']['fieldView']['element']['value']=_0x54bbd9['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x409aeb){const _0x5ca0ca=new nt(this['locale'],_0x5e8146),_0x416c37=_0x5ca0ca['fieldView'];_0x416c37['extendTemplate']({'attributes':{'maxlength':'220'}});let _0xbfa71f=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x409aeb&&(_0xbfa71f+='\x20('+m(this['locale'],'optional')+')'),(_0x5ca0ca['label']=_0xbfa71f,_0x416c37['on']('input',()=>{this['revisionNameInputValue']=_0x416c37['element']['value']['trim']();}),_0x5ca0ca);}}class u extends _0x33f6b4{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x3b0398=this['editor'],_0x392d3d=_0x3b0398['plugins']['get']('RevisionTracker');_0x3b0398['ui']['componentFactory']['add']('revisionHistory',_0x113d5e=>{const _0x47937c=_0x34ab13(_0x113d5e),_0x49ac99=_0x47937c['panelView']['children'],_0x5703d7=new _0x139113(_0x113d5e),_0x5f3050=new _0x3929f2(_0x113d5e),_0x1a2727=new _0x3d2807(_0x113d5e),_0x454b0f=new _0x3929f2(_0x113d5e),_0x560787=new _0x3d2807(_0x113d5e);return _0x47937c['bind']('isEnabled')['to'](_0x392d3d,'isReady',_0x392d3d,'isEnabled',_0x3b0398,'isReadOnly',(_0x1989bf,_0x5a39da,_0x2416b6)=>_0x1989bf&&_0x5a39da&&!_0x2416b6),_0x47937c['buttonView']['set']({'icon':_0x2dd3b5['history'],'label':m(_0x113d5e,'Revision\x20history'),'tooltip':!0x0}),_0x1a2727['set']({'label':m(_0x113d5e,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x1a2727['bind']('isEnabled')['to'](_0x392d3d,'isReady',_0x392d3d,'isEnabled',_0x3b0398,'isReadOnly',(_0x55dbd0,_0x16851b,_0x574170)=>_0x55dbd0&&_0x16851b&&!_0x574170),_0x1a2727['on']('execute',()=>this['_showDialog']()),_0x560787['set']({'label':m(_0x113d5e,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x560787['bind']('isEnabled')['to'](_0x392d3d,'isReady',_0x3b0398,'isReadOnly',(_0x40801e,_0xb8982e)=>_0x40801e&&!_0xb8982e),_0x560787['on']('execute',()=>{_0x3b0398['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x47937c['isOpen']=!0x1,_0x3b0398['editing']['view']['focus']();}),_0x5f3050['children']['add'](_0x1a2727),_0x454b0f['children']['add'](_0x560787),_0x5703d7['role']='menu',_0x5703d7['items']['addMany']([_0x5f3050,_0x454b0f]),_0x49ac99['add'](_0x5703d7),_0x47937c;}),_0x3b0398['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x214a2b=this['editor'],_0x384cc1=_0x214a2b['locale'],_0x4b8b58=new _0x4e62e4(_0x384cc1),_0x2a39e7=new _0x20f98c(_0x384cc1);_0x4b8b58['buttonView']['set']({'icon':_0x2dd3b5['history'],'label':m(_0x384cc1,'Revision\x20history')});const _0x33fedb=new _0x1d1bd8(_0x384cc1,_0x4b8b58),_0x64c95d=new _0x5e8199(_0x384cc1);_0x64c95d['set']({'label':m(_0x384cc1,'Save\x20current\x20revision')}),_0x64c95d['delegate']('execute')['to'](_0x4b8b58),_0x64c95d['on']('execute',()=>{this['_showDialog']();}),_0x33fedb['children']['add'](_0x64c95d),_0x2a39e7['items']['add'](_0x33fedb);const _0x480342=new _0x1d1bd8(_0x384cc1,_0x4b8b58),_0x48b79d=new _0x5e8199(_0x384cc1);return _0x48b79d['set']({'label':m(_0x384cc1,'Open\x20revision\x20history')}),_0x48b79d['delegate']('execute')['to'](_0x4b8b58),_0x48b79d['on']('execute',()=>{_0x214a2b['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x480342['children']['add'](_0x48b79d),_0x2a39e7['items']['add'](_0x480342),_0x4b8b58['panelView']['children']['add'](_0x2a39e7),_0x4b8b58;}['_showDialog'](){const _0x293997=this['editor'],_0x2a5793=_0x293997['locale'],_0x36e7c9=_0x293997['plugins']['get']('Dialog'),_0x56abe5=_0x293997['plugins']['get']('RevisionTracker');function _0xcdb42e(_0x28c645){_0x293997['config']['get']('revisionHistory.requireRevisionName')&&''===_0x28c645['revisionName']?_0x28c645['revisionNameInputView']['errorText']=m(_0x2a5793,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x293997['plugins']['get'](l)['saveRevision']({'name':_0x28c645['revisionName']}),_0x36e7c9['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xcdb42e(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x36e7c9['show']({'id':'revisionSave','title':m(_0x2a5793,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x293997['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x36e7c9['hide']()},{'label':m(_0x293997['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0xeae9d){_0xeae9d['bind']('isEnabled')['to'](_0x56abe5,'isReady',_0x56abe5,'isEnabled',_0x293997,'isReadOnly',(_0x35f7a2,_0x1fa0f5,_0x4ec337)=>_0x35f7a2&&_0x1fa0f5&&!_0x4ec337);},'onExecute':()=>_0xcdb42e(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x443c89=this['editor'],_0x5f395d=_0x443c89['locale'];this['_saveRevisionFormView']=new hs(_0x5f395d,_0x443c89['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x2bb680{['changeId'];['_model'];constructor(_0x2572bb,_0x262672){super(_0x2572bb),this['_model']=_0x262672,this['changeId']=_0x262672['id'];const _0x1ebe89=this['bindTemplate'],_0x588439=m(_0x2572bb,_0x262672['data']['isSuggestion']?'Suggested\x20by':'add'==_0x262672['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x262672['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1ebe89['to']('type',_0x3beb8b=>'ck-revision-change__'+_0x3beb8b)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x588439}]},{'text':'\x20'+_0x262672['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
+ _0x3565b7(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0xcf7be){super(),this['id']=_0xcf7be['id']||_0x315034(),this['author']=_0xcf7be['author'],this['type']=_0xcf7be['type'],this['data']=_0xcf7be['data']||{},this['rootName']=_0xcf7be['rootName'],this['set']('createdAt',_0xcf7be['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class f{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x5f1295,_0x3e8063){this['newRevisionId']=_0x5f1295,this['oldRevisionId']=_0x3e8063,this['changes']=new _0x604cb8();}['_setChanges'](_0x3e6658){for(const _0x5e0d02 of _0x3e6658)this['changes']['add'](_0x5e0d02);}}const Y={'c':_0x2684a7,'a':_0xbf9b23,'e':_0x7df5b5,'r':_0x163a0c,'u':_0x539225};class d extends _0x33f6b4{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x28c3db,_0x530aeb,j];}constructor(_0x16cd92){super(_0x16cd92),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x1c3015,_0x35ca84,_0x42728a)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x13a2cc=>{for(const _0x43c448 of this['editor']['editing']['view']['document']['roots'])_0x42728a?_0x13a2cc['removeClass']('ck-editor__editable__overlay',_0x43c448):_0x13a2cc['addClass']('ck-editor__editable__overlay',_0x43c448);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3590e5=>null!==_0x3590e5),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x467bac,_0x6cee9c,_0x2eeb53)=>_0x467bac&&_0x2eeb53?_0x6cee9c['changes']['getIndex'](_0x2eeb53):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x240f41,_0x1c12ff)=>_0x240f41?_0x1c12ff['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x530aeb);}['init'](){const _0x198623=this['editor'],_0x3b688a=new yt(_0x198623,{'direction':'backward'}),_0x308682=new yt(_0x198623,{'direction':'forward'});(_0x198623['commands']['add']('showPreviousChange',_0x3b688a),_0x198623['commands']['add']('showNextChange',_0x308682),_0x198623['commands']['add']('restoreRevision',new _t(_0x198623)),this['on']('change:numberOfChanges',()=>{_0x3b688a['refresh'](),_0x308682['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x198623['enableReadOnlyMode']('revision-viewer'),_0x198623['plugins']['has']('WidgetToolbarRepository'))&&_0x198623['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0xf7f571){await this['loadRevisionData'](_0xf7f571);const _0x2fb069={};for(const _0x2833b6 in _0xf7f571['diffData']){if(_0xf7f571['diffData'][_0x2833b6]['attachChange']&&!_0xf7f571['diffData'][_0x2833b6]['attachChange']['isAttached'])continue;const _0x4b025c=this['_removeRevisionMarkers'](JSON['parse'](_0xf7f571['diffData'][_0x2833b6]['insertions'])),_0x4fa181=this['editor']['editing']['view']['document'],_0x2071a1=new _0xb1a3bf(_0x4fa181,_0x4b025c['map'](_0x58c93c=>this['_getViewObj'](_0x58c93c)));this['editor']['data']['processor']['useFillerType']('marked'),_0x2fb069[_0x2833b6]=this['editor']['data']['processor']['toData'](_0x2071a1),this['editor']['data']['processor']['useFillerType']('default');}return _0x2fb069;}async['getRevisionRootsAttributes'](_0x4e04f6){await this['loadRevisionData'](_0x4e04f6);const _0x4b6131={};for(const _0x7c3749 in _0x4e04f6['diffData'])_0x4e04f6['diffData'][_0x7c3749]['attachChange']&&!_0x4e04f6['diffData'][_0x7c3749]['attachChange']['isAttached']||(_0x4b6131[_0x7c3749]=_0x4e04f6['diffData'][_0x7c3749]['attributesAfter']||{});return _0x4b6131;}['_removeRevisionMarkers'](_0x3cfb4d){return(_0x3cfb4d=_0x3cfb4d['filter'](_0x3f7c9a=>!_0x3f7c9a['name']||'revision-start'!==_0x3f7c9a['name']&&'revision-end'!==_0x3f7c9a['name']))['forEach'](_0x1992d3=>{'string'!=typeof _0x1992d3&&(_0x1992d3['children']=this['_removeRevisionMarkers'](_0x1992d3['children']),_0x1992d3['attributes']=_0x1992d3['attributes']['filter'](_0x43d44d=>!_0x43d44d[0x0]['startsWith']('data-revision-')));}),_0x3cfb4d;}async['compare'](_0x44f1a1,_0x1253e9,_0x4862ab=!0x1){if(!this['isEnabled'])return;const _0x3100bc=this['diff'],_0x5b5089=this['repository'],_0x108132='string'==typeof _0x44f1a1?_0x5b5089['getRevision'](_0x44f1a1):_0x44f1a1,_0x1d95aa='string'==typeof _0x1253e9?_0x5b5089['getRevision'](_0x1253e9):_0x1253e9,_0x680529=_0x108132['id'],_0x54db55=_0x1d95aa?_0x1d95aa['id']:null;if(!_0x4862ab&&this['diff']&&this['diff']['newRevisionId']===_0x680529&&this['diff']['oldRevisionId']===_0x54db55)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x680529,_0x54db55);const _0x5804ee=this['_getRevisionsRange'](_0x108132,_0x1d95aa,!0x0)['map'](_0x18ad94=>this['loadRevisionData'](_0x18ad94));return _0x5804ee['push'](new Promise(_0x37eeb9=>{setTimeout(_0x37eeb9,0x14);})),Promise['all'](_0x5804ee)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x348458=this['_getDiff'](_0x680529,_0x54db55);for(const _0x4e2be3 of _0x348458['changes'])this['_changeIdToChange']['set'](_0x4e2be3['id'],_0x4e2be3);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x444bbe=>{for(const _0x5a8b13 of this['editor']['model']['document']['getRootNames']())_0x444bbe['detachRoot'](_0x5a8b13);for(const _0x23c68c of Object['keys'](_0x348458['model'])){const _0x587281=_0x444bbe['addRoot'](_0x23c68c);for(const _0x3c94be of Object['keys'](_0x348458['attributes'][_0x23c68c]))_0x444bbe['setAttribute'](_0x3c94be,_0x348458['attributes'][_0x23c68c][_0x3c94be],_0x587281);_0x444bbe['insert'](_0x348458['model'][_0x23c68c],_0x587281,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x348458['changes'])),this['isReady']=!0x0;})['catch'](_0x52c188=>{console['error'](_0x52c188),this['_cleanUp'](),_0x3100bc&&(this['diff']=_0x3100bc),this['isReady']=!0x0;});}['addRevisionData'](_0x1f7be4,_0x4d825b){const _0x3cfca9=this['repository']['createRevision'](_0x1f7be4);return _0x3cfca9['on']('_update',(_0x1e865a,_0x2828ac,_0x504408)=>_0x4d825b(_0x2828ac,_0x504408,_0x3cfca9)),this['repository']['addRevision'](_0x3cfca9),_0x3cfca9;}['loadRevisionData'](_0x4f9d1e){if(!_0x4f9d1e||_0x4f9d1e['diffData'])return Promise['resolve']();{const _0x1570e6=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x1570e6,'revisionId':_0x4f9d1e['id']})['then'](_0x1ad6f4=>{_0x4f9d1e['_update']({'diffData':_0x1ad6f4['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4410ae=>{for(const _0x403858 of this['editor']['model']['document']['getRootNames']())_0x4410ae['detachRoot'](_0x403858);});}['_sortAndFilterDiffChanges'](_0x17b142){const _0x5b35e4=[],_0x21d446=new Map();for(const _0x5a0603 of this['editor']['model']['document']['getRootNames']()){const _0x318f06=this['editor']['editing']['view']['getDomRoot'](_0x5a0603);if(!_0x318f06)continue;const _0x2a3e44=_0x318f06['getClientRects']()['item'](0x0);_0x2a3e44&&(_0x5b35e4['push'](_0x5a0603),_0x21d446['set'](_0x5a0603,_0x2a3e44));}return _0x5b35e4['sort']((_0xbcd039,_0x45410c)=>{const _0x41093d=_0x21d446['get'](_0xbcd039),_0x5f4362=_0x21d446['get'](_0x45410c);return _0x41093d['y']-_0x5f4362['y']||_0x41093d['x']-_0x5f4362['x'];}),(_0x17b142=_0x17b142['filter'](_0xcf56b0=>_0x5b35e4['includes'](_0xcf56b0['rootName'])))['sort']((_0x377d1d,_0x11a0e5)=>_0x5b35e4['indexOf'](_0x377d1d['rootName'])-_0x5b35e4['indexOf'](_0x11a0e5['rootName'])),_0x17b142;}['_makeTape'](_0x59a363){const _0x1edb1c=Array['from'](_0x59a363['markers'])['filter'](([_0x43f14e,_0x3e328a])=>_0x43f14e['startsWith']('revision:')&&!_0x3e328a['isCollapsed']),_0x1f2f54=Array['from'](this['editor']['model']['createRangeIn'](_0x59a363)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x1edb1c['length'])for(const _0x2a6583 of _0x1f2f54){const [_0x29dbd5,_0x20403f]=_0x1edb1c[0x0],[,_0x12d862,_0x45143a]=_0x29dbd5['split'](':');if(_0x20403f['end']['isEqual'](_0x2a6583['nextPosition'])&&_0x1edb1c['shift'](),(_0x2a6583['previousPosition']['isEqual'](_0x20403f['start'])||_0x2a6583['previousPosition']['isAfter'](_0x20403f['start']))&&('insertion'==_0x12d862?_0x2a6583['isAdded']={'userId':_0x45143a}:'deletion'==_0x12d862&&(_0x2a6583['isRemoved']={'userId':_0x45143a})),0x0==_0x1edb1c['length'])break;}return _0x1f2f54;}['_refreshStartEndIndex'](_0x19b2b1){const _0xba13ee=new Map();for(let _0x459159=0x0;_0x459159<_0x19b2b1['length'];_0x459159++)'text'===_0x19b2b1[_0x459159]['type']?(_0x19b2b1[_0x459159]['item']['startIndex']=_0x459159,_0x19b2b1[_0x459159]['item']['endIndex']=_0x459159):('elementStart'===_0x19b2b1[_0x459159]['type']?_0x19b2b1[_0x459159]['item']['startIndex']=_0x459159:'elementEnd'===_0x19b2b1[_0x459159]['type']&&(_0x19b2b1[_0x459159]['item']['endIndex']=_0x459159),_0xba13ee['set'](_0x19b2b1[_0x459159]['id'],_0x459159));for(const _0x22d2b1 of _0xba13ee['values']())'elementStart'===_0x19b2b1[_0x22d2b1]['type']?_0x19b2b1[_0x22d2b1]['item']['endIndex']=_0xba13ee['get'](_0x19b2b1[_0x22d2b1]['pairId']):'elementEnd'===_0x19b2b1[_0x22d2b1]['type']&&(_0x19b2b1[_0x22d2b1]['item']['startIndex']=_0xba13ee['get'](_0x19b2b1[_0x22d2b1]['pairId']));}['_processTape'](_0x173225){for(let _0x4bad41=0x0;_0x4bad41<_0x173225['length'];_0x4bad41++){if('elementStart'===_0x173225[_0x4bad41]['type'])_0x173225[_0x4bad41]['item']['startIndex']=_0x4bad41;else{if('elementEnd'===_0x173225[_0x4bad41]['type']){_0x173225[_0x4bad41]['item']['endIndex']=_0x4bad41;const _0xaead12=_0x173225[_0x4bad41]['item']['startIndex'];_0x173225[_0xaead12]['pairId']=_0x173225[_0x4bad41]['id'],_0x173225[_0x4bad41]['pairId']=_0x173225[_0xaead12]['id'];}else _0x173225[_0x4bad41]['item']['startIndex']=_0x4bad41,_0x173225[_0x4bad41]['item']['endIndex']=_0x4bad41,_0x173225[_0x4bad41]['pairId']=null;}_0x173225[_0x4bad41]['markersStart']||(_0x173225[_0x4bad41]['markersStart']=[],_0x173225[_0x4bad41]['markersEnd']=[]);}}['_markInsertions'](_0x14195b,_0x365362){const _0x315eaf=_0x14195b['filter'](_0x3a3b5e=>!_0x3a3b5e['isAdded']);for(let _0x50b068=0x0;_0x50b068<_0x365362['length'];_0x50b068++)_0x365362[_0x50b068]['isAdded']&&(_0x315eaf[_0x50b068]['isAdded']=_0x365362[_0x50b068]['isAdded']);}['_makeModelFromViewString'](_0x4e31c1){const _0xb6d8bb=JSON['parse'](_0x4e31c1),_0x5215b1=this['editor']['editing']['view']['document'],_0x1708d5=new _0xb1a3bf(_0x5215b1,_0xb6d8bb['map'](_0x57a74e=>this['_getViewObj'](_0x57a74e)));return this['editor']['data']['toModel'](_0x1708d5);}['_getViewObj'](_0x192dc2){const _0x1d3c4e=this['editor']['editing']['view']['document'];if('string'==typeof _0x192dc2)return new _0x14b10c(_0x1d3c4e,_0x192dc2);{const _0x11749f=_0x192dc2['children']['map'](_0x3c5ea5=>this['_getViewObj'](_0x3c5ea5));return new(Y[_0x192dc2['type']]||_0x5d7b17)(_0x1d3c4e,_0x192dc2['name'],_0x192dc2['attributes'],_0x11749f);}}['_getDiff'](_0x31d0e,_0x26e4e7=null){const _0x1df437=this['repository']['getRevision'](_0x31d0e),_0x1b2dd5=_0x26e4e7?this['repository']['getRevision'](_0x26e4e7):null,_0x1c3522=this['_getRevisionsRange'](_0x1df437,_0x1b2dd5),_0x1e1de0=_0x1c3522[_0x1c3522['length']-0x1],_0x1a30bf=new Map(),_0x1328d8={'model':{},'attributes':{},'changes':[]},_0x1caade=new Set(),_0x3e0e34=new Map();for(let _0x54c773=_0x1c3522['length']-0x1;_0x54c773>=0x0;_0x54c773--){const _0x116b2b=_0x1c3522[_0x54c773];for(const _0x273ef1 of Object['keys'](_0x116b2b['diffData']))if(_0x116b2b['diffData'][_0x273ef1]['attachChange']){const _0x4098c0=_0x116b2b['diffData'][_0x273ef1]['attachChange'];_0x4098c0['isAttached']?(_0x1caade['add'](_0x273ef1),_0x3e0e34['has'](_0x273ef1)&&_0x3e0e34['get'](_0x273ef1)['userId']==_0x4098c0['userId']?_0x3e0e34['delete'](_0x273ef1):_0x3e0e34['set'](_0x273ef1,_0x4098c0)):_0x3e0e34['has'](_0x273ef1)?(_0x1caade['delete'](_0x273ef1),_0x3e0e34['delete'](_0x273ef1)):(_0x1caade['add'](_0x273ef1),_0x3e0e34['set'](_0x273ef1,_0x4098c0));}else _0x1caade['add'](_0x273ef1);}for(const _0x5a14fe of _0x1caade){const _0x5176d6=_0x3e0e34['has'](_0x5a14fe)&&!_0x3e0e34['get'](_0x5a14fe)['isAttached'];let _0x36ae6a=_0x5176d6?_0x1c3522['length']-0x1:0x0;const _0x4126d0=_0x5176d6?-0x1:0x1;for(;_0x1c3522[_0x36ae6a];){const _0x3a3788=_0x1c3522[_0x36ae6a];if(_0x3a3788['diffData'][_0x5a14fe]){const _0x584f66=_0x5176d6?_0x3a3788['diffData'][_0x5a14fe]['attributesBefore']:_0x3a3788['diffData'][_0x5a14fe]['attributesAfter'];_0x1328d8['attributes'][_0x5a14fe]=_0x584f66?_0x25f479(_0x584f66):{};break;}_0x36ae6a+=_0x4126d0;}}for(const _0x21684b of _0x1c3522){_0x21684b['model']={};for(const _0x4e7ec3 of _0x21684b['authors'])_0x1a30bf['set'](_0x4e7ec3['id'],_0x4e7ec3);for(const _0x3e2c6a of _0x1caade){const _0xf54697=_0x21684b['diffData'][_0x3e2c6a]?_0x21684b['diffData'][_0x3e2c6a]['insertions']:'[]',_0x1ede54=_0x21684b['diffData'][_0x3e2c6a]?_0x21684b['diffData'][_0x3e2c6a]['deletions']:'[]';_0x21684b['model'][_0x3e2c6a]={'insertions':this['_makeModelFromViewString'](_0xf54697),'deletions':this['_makeModelFromViewString'](_0x1ede54)};}}for(const _0x4c1c8d of _0x1caade){let _0x5bd6c9=null,_0x17b180=0x0;const _0x2e913c=new Map(Array['from'](_0x1df437['model'][_0x4c1c8d]['insertions']['markers'])['filter'](([_0x22e58a])=>!_0x22e58a['startsWith']('revision:')));let _0x35b23a=0x0;for(const _0x5a6670 of _0x1c3522){const _0x4fd26f=this['_makeTape'](_0x5a6670['model'][_0x4c1c8d]['insertions']);_0x5a6670==_0x1df437?(_0x5bd6c9=_0x4fd26f,_0x17b180=_0x5bd6c9['length'],_0x5bd6c9['forEach'](_0x2f2e41=>{_0x2f2e41['id']=_0x35b23a++;}),this['_processTape'](_0x5bd6c9)):this['_markInsertions'](_0x5bd6c9,_0x4fd26f);const _0x3234b8=_0x5bd6c9['filter'](_0x441747=>!_0x441747['isAdded'])['map'](_0x28bbc8=>_0x28bbc8['id']);let _0x497237=0x0;const _0x1ad2fb=this['_makeTape'](_0x5a6670['model'][_0x4c1c8d]['deletions']);_0x1ad2fb['forEach'](_0x1e0055=>{_0x1e0055['isRemoved']?_0x1e0055['id']=_0x17b180++:_0x1e0055['id']=_0x3234b8[_0x497237++];}),this['_processTape'](_0x1ad2fb),this['_setDistance'](_0x5bd6c9,'isAdded'),this['_setDistance'](_0x1ad2fb,'isRemoved'),_0x5a6670==_0x1df437&&this['_markMarkers'](_0x5bd6c9,_0x2e913c),_0x5bd6c9=this['_joinTapes'](_0x5bd6c9,_0x1ad2fb),this['_refreshStartEndIndex'](_0x5bd6c9),this['_setDistance'](_0x5bd6c9,'isRemoved');}_0x5bd6c9=_0x5bd6c9['filter'](_0x45d039=>!(_0x45d039['isAdded']&&_0x45d039['isRemoved']));const _0x35695c=new Map(_0x1e1de0['model'][_0x4c1c8d]['deletions']['markers']),_0x5a202a=new Set(_0x2e913c['keys']());for(const _0x51d482 of _0x35695c['keys']())_0x5a202a['delete'](_0x51d482);this['_markSuggestions'](_0x5bd6c9,_0x5a202a),this['_fixObsoleteTags'](_0x5bd6c9),_0x5bd6c9=this['_removeMissingPairs'](_0x5bd6c9),_0x5bd6c9=this['_markMismatchedRemovedTags'](_0x5bd6c9),_0x5bd6c9=this['_removeUnsupportedChanges'](_0x5bd6c9);const {root:_0x1eaefc,changes:_0x48c50d}=this['_makeModelFromTape'](_0x5bd6c9,_0x1a30bf,_0x4c1c8d);_0x1328d8['model'][_0x4c1c8d]=_0x1eaefc;const _0x33255a=_0x3e0e34['get'](_0x4c1c8d);if(_0x33255a){const _0x333c9=_0x1a30bf['get'](_0x33255a['userId']),_0x394cac=new r({'author':_0x333c9,'type':_0x33255a['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4c1c8d});_0x48c50d['unshift'](_0x394cac),_0x1328d8['attributes'][_0x4c1c8d]['revisionHistoryAttachChange']=_0x394cac['id'];}_0x1328d8['changes']=_0x1328d8['changes']['concat'](_0x48c50d);}return _0x1328d8;}['_markMarkers'](_0x2267e1,_0x148bbb){for(let _0x4582fc=0x0;_0x4582fc<_0x2267e1['length'];_0x4582fc++)for(const [_0x1d2608,_0x12c494]of _0x148bbb)_0x12c494['start']['isEqual'](_0x2267e1[_0x4582fc]['previousPosition'])&&_0x2267e1[_0x4582fc]['markersStart']['push'](_0x1d2608),_0x12c494['end']['isEqual'](_0x2267e1[_0x4582fc]['nextPosition'])&&_0x2267e1[_0x4582fc]['markersEnd']['push'](_0x1d2608);}['_joinTapes'](_0x19a0c6,_0x1d2160){let _0x8faaf2=[],_0x207e03=0x0,_0x6d11ed=0x0;for(;_0x207e03<_0x19a0c6['length']||_0x6d11ed<_0x1d2160['length'];){const _0x571e56=_0x19a0c6[_0x207e03]||{},_0x33222d=_0x1d2160[_0x6d11ed]||{};if(_0x571e56['id']==_0x33222d['id'])_0x207e03++,_0x6d11ed++,_0x8faaf2['push'](_0x571e56);else{if(_0x33222d['isRemoved']&&_0x571e56['isAdded']){const {commonTape:_0x50b9d6,iEnd:_0x20be01,jEnd:_0x2d9b08}=this['_threeWayMerge'](_0x19a0c6,_0x207e03,_0x1d2160,_0x6d11ed);_0x8faaf2=_0x8faaf2['concat'](_0x50b9d6),_0x207e03=_0x20be01,_0x6d11ed=_0x2d9b08;}else _0x33222d['isRemoved']?(_0x6d11ed++,_0x8faaf2['push'](_0x33222d)):(_0x207e03++,_0x8faaf2['push'](_0x571e56));}}return _0x8faaf2;}['_markSuggestions'](_0x133b13,_0x3e2283){const _0x205850=[];for(let _0x53ac80=0x0;_0x53ac80<_0x133b13['length'];_0x53ac80++){for(let _0x39d540=0x0;_0x39d540<_0x133b13[_0x53ac80]['markersStart']['length'];_0x39d540++){const _0x39a1d0=_0x133b13[_0x53ac80]['markersStart'][_0x39d540];if(!_0x3e2283['has'](_0x39a1d0))continue;const {group:_0xf2c049,type:_0x5ec77b,authorId:_0x180c43}=_0x55bcd4(_0x39a1d0);'revision-suggestion'!=_0xf2c049||'insertion'!=_0x5ec77b&&'deletion'!=_0x5ec77b||(_0x205850['unshift']({'type':_0x5ec77b,'name':_0x39a1d0,'userId':_0x180c43}),_0x133b13[_0x53ac80]['markersStart']['splice'](_0x39d540,0x1),_0x39d540--);}_0x1241cd(_0x133b13[_0x53ac80]);for(let _0xb75731=0x0;_0xb75731<_0x133b13[_0x53ac80]['markersEnd']['length'];_0xb75731++){const _0x468364=_0x133b13[_0x53ac80]['markersEnd'][_0xb75731];if(!_0x3e2283['has'](_0x468364))continue;const {group:_0x3b5815,type:_0x183e04}=_0x55bcd4(_0x468364);if('revision-suggestion'!=_0x3b5815||'insertion'!=_0x183e04&&'deletion'!=_0x183e04)continue;_0x133b13[_0x53ac80]['markersEnd']['splice'](_0xb75731,0x1),_0xb75731--;const _0x1c2f5d=_0x205850['findIndex'](_0x3a63df=>_0x3a63df['name']==_0x468364);_0x1c2f5d>-0x1&&_0x205850['splice'](_0x1c2f5d,0x1);}}function _0x55bcd4(_0x8cec82){const _0x1f777b=_0x8cec82['split'](':');return{'group':_0x1f777b[0x0],'type':_0x1f777b[0x1],'subType':_0x1f777b['length']>=0x5?_0x1f777b[0x2]:null,'id':_0x1f777b['length']<0x5?_0x1f777b[0x2]:_0x1f777b[0x3],'authorId':_0x1f777b['length']<0x5?_0x1f777b[0x3]:_0x1f777b[0x4],'markerCount':0x6==_0x1f777b['length']?_0x1f777b[0x5]:null};}function _0x1241cd(_0x2d0894){for(let _0x3649ee=0x0;_0x3649ee<_0x205850['length'];_0x3649ee++){if(_0x2d0894['isAdded']&&'insertion'==_0x205850[_0x3649ee]['type'])return _0x2d0894['isAddSuggestion']=_0x205850[_0x3649ee],void delete _0x2d0894['isAdded'];if(!_0x2d0894['isAdded']&&!_0x2d0894['isRemoved']&&'deletion'==_0x205850[_0x3649ee]['type'])return void(_0x2d0894['isRemoveSuggestion']=_0x205850[_0x3649ee]);}}}['_setDistance'](_0x4a57b7,_0x496d89){let _0x16b168=0x0,_0x2e25e3=!0x1;const _0x17d607=new Map();for(const _0x916616 of _0x4a57b7)_0x916616[_0x496d89]?_0x2e25e3&&(_0x16b168++,_0x2e25e3=!0x1):(_0x16b168++,_0x2e25e3=!0x0),_0x17d607['set'](_0x916616['id'],_0x16b168);for(let _0x58d803=0x0;_0x58d803<_0x4a57b7['length'];_0x58d803++){if('isRemoved'==_0x496d89&&_0x4a57b7[_0x58d803]['isAdded']||'isAdded'==_0x496d89&&_0x4a57b7[_0x58d803]['isRemoved'])continue;if('text'==_0x4a57b7[_0x58d803]['type']){_0x4a57b7[_0x58d803]['distance']=0x0;continue;}const _0x1d6a97=_0x17d607['get'](_0x4a57b7[_0x58d803]['pairId']),_0x20594b=_0x17d607['get'](_0x4a57b7[_0x58d803]['id']);_0x4a57b7[_0x58d803]['distance']=_0x1d6a97-_0x20594b;}}['_getRevisionsRange'](_0x54204e,_0x5a636b,_0x4b8fc7=!0x1){const _0x52fec5=[];let _0x333e67=this['repository']['getIndex'](_0x54204e),_0xc50cc9=this['repository']['getIndex'](_0x5a636b);for(-0x1==_0xc50cc9&&(_0xc50cc9=this['repository']['_revisions']['length'],_0x4b8fc7=!0x1);_0x333e67<_0xc50cc9;)_0x52fec5['push'](this['repository']['getRevision'](_0x333e67)),_0x333e67++;return _0x4b8fc7&&_0x52fec5['push'](this['repository']['getRevision'](_0x333e67)),_0x52fec5;}['_threeWayMerge'](_0x4ac2a9,_0xa9d86b,_0x3df59b,_0x184e0a){const _0x127c3a=this['editor']['model']['schema'];let _0x2aa600=_0xa9d86b;for(;_0x4ac2a9[_0x2aa600]&&_0x4ac2a9[_0x2aa600]['isAdded'];)_0x2aa600++;let _0x19a648=_0x184e0a;for(;_0x3df59b[_0x19a648]&&_0x3df59b[_0x19a648]['isRemoved'];)_0x19a648++;_0x25a8e7(_0x4ac2a9,_0xa9d86b,_0x2aa600),_0x25a8e7(_0x3df59b,_0x184e0a,_0x19a648);const _0x2bbc59=_0x3df59b['slice'](_0x184e0a,_0x19a648)['concat'](_0x4ac2a9['slice'](_0xa9d86b,_0x2aa600));return _0x2bbc59['sort']((_0x4b238b,_0x1f36b5)=>_0x4b238b['side']!=_0x1f36b5['side']?_0x4b238b['side']-_0x1f36b5['side']:_0x4b238b['level']!=_0x1f36b5['level']?_0x4b238b['level']-_0x1f36b5['level']:_0x4b238b['distance']!=_0x1f36b5['distance']?_0x1f36b5['distance']-_0x4b238b['distance']:!!_0x4b238b['isAdded']!=!!_0x1f36b5['isAdded']?-0x1==_0x4b238b['side']||0x0==_0x4b238b['side']?_0x4b238b['isAdded']?-0x1:0x1:_0x4b238b['isAdded']?0x1:-0x1:_0x4b238b['index']-_0x1f36b5['index']),{'commonTape':_0x2bbc59,'iEnd':_0x2aa600,'jEnd':_0x19a648};function _0x25a8e7(_0x277c2a,_0x2ba7c2,_0x152499){let _0x1c26dd=-0x1,_0x28aa20=Number['POSITIVE_INFINITY'],_0x454f8e=!0x0;for(let _0x3f81a7=_0x2ba7c2;_0x3f81a7<_0x152499;_0x3f81a7++)if(_0x127c3a['isInline'](_0x277c2a[_0x3f81a7]['item'])||(_0x454f8e=!0x1),_0x277c2a[_0x3f81a7]['item']['startIndex']<_0x2ba7c2&&(_0x1c26dd=_0x3f81a7),_0x277c2a[_0x3f81a7]['item']['endIndex']>=_0x152499){_0x28aa20=_0x3f81a7;break;}_0x454f8e&&(_0x1c26dd=_0x152499-0x1);for(let _0x14d877=_0x2ba7c2;_0x14d877<_0x152499;_0x14d877++)_0x277c2a[_0x14d877]['side']=_0x14d877<=_0x1c26dd?-0x1:_0x14d877<_0x28aa20?0x0:0x1,_0x277c2a[_0x14d877]['index']=_0x14d877;let _0x3494da=0x0;for(let _0x4439a8=_0x2ba7c2;_0x4439a8<=_0x1c26dd;_0x4439a8++)0x0==_0x277c2a[_0x4439a8]['distance']?_0x277c2a[_0x4439a8]['level']=_0x3494da:(_0x3494da++,_0x277c2a[_0x4439a8]['level']=_0x3494da,_0x3494da++);for(let _0x1d0552=_0x2ba7c2;_0x1d0552<_0x152499;_0x1d0552++)0x0==_0x277c2a[_0x1d0552]['side']&&(_0x277c2a[_0x1d0552]['level']=_0x3494da);_0x3494da=0x0;for(let _0x3a7f7a=_0x152499-0x1;_0x3a7f7a>=_0x28aa20;_0x3a7f7a--)0x0==_0x277c2a[_0x3a7f7a]['distance']?_0x277c2a[_0x3a7f7a]['level']=_0x3494da:(_0x3494da--,_0x277c2a[_0x3a7f7a]['level']=_0x3494da,_0x3494da--);}}['_fixObsoleteTags'](_0x9d51ee){const _0xffed6c=new Map(),_0x326284=this['editor']['model']['schema'];for(let _0x4296dc=0x1;_0x4296dc<_0x9d51ee['length'];_0x4296dc++){let _0x2813c7,_0x1cb3b3,_0x3ef3f4;const _0x33efb4=_0x9d51ee[_0x4296dc],_0xfd59bd=_0x9d51ee[_0x4296dc-0x1];if('text'==_0x33efb4['type'])continue;if(_0x33efb4['type']!=_0xfd59bd['type'])continue;if(!_0x326284['isBlock'](_0xfd59bd['item'])||_0x326284['isLimit'](_0xfd59bd['item']))continue;if(!_0x326284['isBlock'](_0x33efb4['item'])||_0x326284['isLimit'](_0x33efb4['item']))continue;if((_0x9d51ee[_0x4296dc]['isAdded']||_0x9d51ee[_0x4296dc]['isAddSuggestion'])&&_0x9d51ee[_0x4296dc-0x1]['isRemoved'])_0x2813c7=_0x9d51ee[_0x4296dc],_0x1cb3b3=_0x9d51ee[_0x4296dc-0x1],_0x3ef3f4=_0x4296dc-0x1;else{if(!_0x9d51ee[_0x4296dc]['isRemoved']||!_0x9d51ee[_0x4296dc-0x1]['isAdded']&&!_0x9d51ee[_0x4296dc-0x1]['isAddSuggestion'])continue;_0x2813c7=_0x9d51ee[_0x4296dc-0x1],_0x1cb3b3=_0x9d51ee[_0x4296dc],_0x3ef3f4=_0x4296dc;}const _0x789e=_0x2813c7['level']==_0x1cb3b3['level'],_0x36b980=Math['abs'](_0x2813c7['level'])<Math['abs'](_0x1cb3b3['level'])&&0x0==_0x1cb3b3['distance'];(_0x789e||_0x36b980)&&(_0xffed6c['set'](_0x1cb3b3['id'],_0x2813c7['id']),_0x9d51ee['splice'](_0x3ef3f4,0x1),_0x4296dc--,_0x2813c7['isAdded']=!0x1);}for(let _0x1cd531=0x0;_0x1cd531<_0x9d51ee['length'];_0x1cd531++)_0xffed6c['has'](_0x9d51ee[_0x1cd531]['pairId'])&&(_0x9d51ee[_0x1cd531]['pairId']=_0xffed6c['get'](_0x9d51ee[_0x1cd531]['pairId']));}['_removeMissingPairs'](_0x400267){const _0x243f3b=new Set(_0x400267['map'](_0xfdecae=>_0xfdecae['id']));for(let _0x119a7d=0x0;_0x119a7d<_0x400267['length'];_0x119a7d++)_0x243f3b['has'](_0x400267[_0x119a7d]['pairId'])||0x0==_0x400267[_0x119a7d]['distance']||(_0x400267[_0x119a7d]['isIncorrect']=!0x0);return _0x400267['filter'](_0x1c6ef1=>!_0x1c6ef1['isIncorrect']);}['_markMismatchedRemovedTags'](_0x33b5eb){const _0x123e60=new Set();for(let _0x4da77d=0x0;_0x4da77d<_0x33b5eb['length'];_0x4da77d++){if(_0x123e60['has'](_0x33b5eb[_0x4da77d]['id'])&&_0x33b5eb[_0x4da77d]['isRemoved']&&(_0x33b5eb[_0x4da77d]['isIncorrect']=!0x0),_0x33b5eb[_0x4da77d]['isIncorrect'])continue;if(0x0==_0x33b5eb[_0x4da77d]['distance'])continue;if('elementStart'!=_0x33b5eb[_0x4da77d]['type'])continue;if(null==_0x33b5eb[_0x4da77d]['pairId'])continue;let _0x2283b8=_0x4da77d+0x1,_0x4fe060=0x0;for(;_0x33b5eb[_0x2283b8]['id']!=_0x33b5eb[_0x4da77d]['pairId'];)'elementStart'==_0x33b5eb[_0x2283b8]['type']?_0x4fe060++:'elementEnd'==_0x33b5eb[_0x2283b8]['type']&&_0x4fe060--,_0x2283b8++;if(0x0!=_0x4fe060){if(_0x33b5eb[_0x4da77d]['isRemoved'])_0x33b5eb[_0x4da77d]['isIncorrect']=!0x0;else{for(;_0x2283b8!=_0x4da77d;)_0x33b5eb[_0x2283b8]['isRemoved']&&0x0!=_0x33b5eb[_0x2283b8]['distance']&&(_0x33b5eb[_0x2283b8]['isIncorrect']=!0x0,_0x123e60['add'](_0x33b5eb[_0x2283b8]['pairId'])),_0x2283b8--;}}}return _0x33b5eb['filter'](_0x1dc7bc=>!_0x1dc7bc['isIncorrect']);}['_removeUnsupportedChanges'](_0x1e8a47){const _0x262b2f=this['editor']['model']['schema'];for(let _0x5e9965=0x0;_0x5e9965<_0x1e8a47['length'];_0x5e9965++){if(!(_0x1e8a47[_0x5e9965]['isAdded']||_0x1e8a47[_0x5e9965]['isAddSuggestion']||_0x1e8a47[_0x5e9965]['isRemoved']||_0x1e8a47[_0x5e9965]['isRemoveSuggestion']))continue;if(0x0==_0x1e8a47[_0x5e9965]['distance'])continue;const _0x33eaf6=_0x1e8a47[_0x5e9965]['item'];_0x262b2f['isBlock'](_0x33eaf6)||_0x262b2f['isLimit'](_0x33eaf6)||(_0x1e8a47[_0x5e9965]['isAdded']&&delete _0x1e8a47[_0x5e9965]['isAdded'],_0x1e8a47[_0x5e9965]['isAddSuggestion']&&delete _0x1e8a47[_0x5e9965]['isAddSuggestion'],_0x1e8a47[_0x5e9965]['isRemoveSuggestion']&&delete _0x1e8a47[_0x5e9965]['isRemoveSuggestion'],_0x1e8a47[_0x5e9965]['isRemoved']&&(_0x1e8a47[_0x5e9965]['isIncorrect']=!0x0));}return _0x1e8a47['filter'](_0x241cc5=>!_0x241cc5['isIncorrect']);}['_makeModelFromTape'](_0x1269ef,_0x187d7f,_0x955a62){const _0x442770=new mt(),_0x517220=[],_0x4175d7=new Map(),_0x223c93=this['editor']['model'],_0x45afdb=_0x223c93['schema'],_0x42ad50=[_0x442770],_0x4dcd3f={},_0x54109c={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4bf33d=null;const _0x3f28b3=[0x0];for(let _0x5bd5c9=0x0;_0x5bd5c9<_0x1269ef['length'];_0x5bd5c9++)if('elementStart'===_0x1269ef[_0x5bd5c9]['type']){_0x1269ef[_0x5bd5c9]['previousPosition']=_0x223c93['createPositionFromPath'](_0x442770,_0x3f28b3);const _0x44b06d=new ft(_0x1269ef[_0x5bd5c9]['item']['name'],_0x1269ef[_0x5bd5c9]['item']['getAttributes']());_0x42ad50[0x0]['_appendChild'](_0x44b06d),_0x3f28b3['push'](0x0),_0x42ad50['unshift'](_0x44b06d),_0x1269ef[_0x5bd5c9]['nextPosition']=_0x223c93['createPositionFromPath'](_0x442770,_0x3f28b3);}else'elementEnd'===_0x1269ef[_0x5bd5c9]['type']?(_0x42ad50['shift'](),_0x1269ef[_0x5bd5c9]['previousPosition']=_0x223c93['createPositionFromPath'](_0x442770,_0x3f28b3),_0x3f28b3['pop'](),_0x3f28b3[_0x3f28b3['length']-0x1]++,_0x1269ef[_0x5bd5c9]['nextPosition']=_0x223c93['createPositionFromPath'](_0x442770,_0x3f28b3)):(_0x1269ef[_0x5bd5c9]['previousPosition']=_0x223c93['createPositionFromPath'](_0x442770,_0x3f28b3),_0x4bf33d?_0x4bf33d['_data']+=_0x1269ef[_0x5bd5c9]['item']['data']:_0x4bf33d=new wt(_0x1269ef[_0x5bd5c9]['item']['data'],_0x1269ef[_0x5bd5c9]['item']['getAttributes']()),_0x1269ef[_0x5bd5c9+0x1]&&'text'===_0x1269ef[_0x5bd5c9+0x1]['type']&&_0xe68b74(_0x4bf33d,_0x1269ef[_0x5bd5c9+0x1]['item'])||(_0x42ad50[0x0]['_appendChild'](_0x4bf33d),_0x4bf33d=null),_0x3f28b3[_0x3f28b3['length']-0x1]+=_0x1269ef[_0x5bd5c9]['item']['offsetSize'],_0x1269ef[_0x5bd5c9]['nextPosition']=_0x223c93['createPositionFromPath'](_0x442770,_0x3f28b3));for(let _0x3f4607=0x0;_0x3f4607<_0x1269ef['length'];_0x3f4607++){const _0x1c2d27=_0x1269ef[_0x3f4607]['previousPosition'],_0x4e59f5=_0x1269ef[_0x3f4607]['nextPosition'];for(const _0x28a8d9 of _0x1269ef[_0x3f4607]['markersStart'])_0x4175d7['set'](_0x28a8d9,{'start':_0x1c2d27,'end':null});_0x12c34f('isRemoveSuggestion',_0x3f4607,_0x1c2d27,_0x4e59f5),_0x12c34f('isAddSuggestion',_0x3f4607,_0x1c2d27,_0x4e59f5),_0x12c34f('isRemoved',_0x3f4607,_0x1c2d27,_0x4e59f5),_0x12c34f('isAdded',_0x3f4607,_0x1c2d27,_0x4e59f5);for(const _0x4850dd of _0x1269ef[_0x3f4607]['markersEnd']){_0x4175d7['get'](_0x4850dd)['end']=_0x4e59f5;}}for(const [_0x412ad6,_0x62ef4a]of _0x4175d7){const _0xef7cb5=this['editor']['model']['createRange'](_0x62ef4a['start'],_0x62ef4a['end']);_0x442770['markers']['set'](_0x412ad6,_0xef7cb5);}return _0x517220['sort']((_0x16d502,_0x8d07b5)=>{const _0x4de6f0=_0x442770['markers']['get']('revision:'+_0x16d502['id']),_0x3c7ccc=_0x442770['markers']['get']('revision:'+_0x8d07b5['id']);return _0x4de6f0['start']['isBefore'](_0x3c7ccc['start'])?-0x1:_0x4de6f0['start']['isAfter'](_0x3c7ccc['start'])?0x1:_0x4de6f0['end']['isBefore'](_0x3c7ccc['end'])?-0x1:_0x4de6f0['end']['isAfter'](_0x3c7ccc['end'])?0x1:'add'===_0x16d502['type']?-0x1:0x1;}),{'root':_0x442770,'changes':_0x517220};function _0x12c34f(_0x736d0,_0x28182b,_0x4440bd,_0x5076f5){const _0x305d8d=!!_0x1269ef[_0x28182b][_0x736d0],_0x5e8e2a=_0x305d8d?_0x1269ef[_0x28182b][_0x736d0]['userId']:null,_0x559800=_0x28182b===_0x1269ef['length']-0x1,_0x4fbd75=_0x54109c[_0x736d0][0x0],_0xe1c5a9=_0x45afdb['isObject'](_0x1269ef[_0x28182b]['item']);!_0x4dcd3f[_0x736d0]&&_0x305d8d?_0x4dcd3f[_0x736d0]={'start':_0x4440bd,'tapeItem':_0x1269ef[_0x28182b],'userId':_0x5e8e2a,'type':_0x736d0}:_0x4dcd3f[_0x736d0]&&!_0x305d8d?(_0x4dcd3f[_0x736d0]['end']=_0x4440bd,_0x57da3f(_0x4dcd3f[_0x736d0]),_0x4dcd3f[_0x736d0]=null):_0x4dcd3f[_0x736d0]&&_0x305d8d&&_0x4dcd3f[_0x736d0]['userId']!==_0x5e8e2a&&(_0x4dcd3f[_0x736d0]['end']=_0x4440bd,_0x4fbd75&&_0x4fbd75['userId']===_0x4dcd3f[_0x736d0]['userId']||_0x57da3f(_0x4dcd3f[_0x736d0]),_0x4dcd3f[_0x736d0]={'start':_0x4440bd,'tapeItem':_0x1269ef[_0x28182b],'userId':_0x5e8e2a,'type':_0x736d0}),_0x4dcd3f[_0x736d0]&&_0xe1c5a9&&('elementStart'!==_0x1269ef[_0x28182b]['type']||_0x4fbd75&&_0x4fbd75['userId']===_0x5e8e2a||_0x54109c[_0x736d0]['unshift']({'userId':_0x5e8e2a,'object':_0x1269ef[_0x28182b]['item'],'change':_0x4dcd3f[_0x736d0]}),'elementEnd'===_0x1269ef[_0x28182b]['type']&&_0x4fbd75&&_0x4fbd75['object']===_0x1269ef[_0x28182b]['item']&&(_0x54109c[_0x736d0]['shift'](),_0x4dcd3f[_0x736d0]=_0x4fbd75['change'])),_0x4dcd3f[_0x736d0]&&_0x559800&&(_0x4dcd3f[_0x736d0]['end']=_0x5076f5,_0x57da3f(_0x4dcd3f[_0x736d0]),_0x4dcd3f[_0x736d0]=null);}function _0x57da3f({start:_0x3fc6d8,end:_0x5a81d0,tapeItem:_0x3f2728,userId:_0x14ace5,type:_0x28e64b}){const _0x53b8a9=_0x3f2728['item'],_0x5f1e20=_0x223c93['schema']['isBlock'](_0x53b8a9)&&!_0x223c93['schema']['isLimit'](_0x53b8a9),_0x53af87=_0x3fc6d8['nodeAfter']==_0x5a81d0['parent']&&_0x5a81d0['isAtStart'];if(_0x5f1e20&&_0x53af87)return;const _0x334be6=_0x223c93['createRange'](_0x3fc6d8,_0x5a81d0),_0x2b5e15=_0x187d7f['get'](_0x14ace5),_0x4cd5ad=new r({'author':_0x2b5e15,'type':'isAdded'==_0x28e64b||'isAddSuggestion'==_0x28e64b?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x28e64b||'isRemoveSuggestion'==_0x28e64b},'createdAt':new Date(),'rootName':_0x955a62});_0x517220['push'](_0x4cd5ad),_0x442770['markers']['set']('revision:'+_0x4cd5ad['id'],_0x334be6);}function _0xe68b74(_0x2024c0,_0x15463c){const _0x271cc2=_0x2024c0['getAttributes'](),_0x595ecd=_0x15463c['getAttributes']();for(const _0x163fd8 of _0x271cc2){if(_0x163fd8[0x1]!==_0x15463c['getAttribute'](_0x163fd8[0x0]))return!0x1;_0x595ecd['next']();}return _0x595ecd['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x2a83b2=>{const _0x2b99ea=_0x2a83b2['markerName']['split'](':')[0x1],_0x5584d3=this['_getChangeFromId'](_0x2b99ea);if(!_0x5584d3)return null;const _0x39e199='add'==_0x5584d3['type']?'insertion':'deletion',_0x4d7d0b=['ck-suggestion-marker','ck-suggestion-marker-'+_0x39e199];return _0x5584d3['data']['isSuggestion']&&_0x4d7d0b['push']('ck-suggestion-marker-'+_0x39e199+'-new'),this['activeChange']==_0x5584d3&&_0x4d7d0b['push']('ck-suggestion-marker--active'),{'classes':_0x4d7d0b,'attributes':{'data-change-id':_0x2b99ea}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x2ac4d3=>{_0x2ac4d3['on']('element:pre',(_0x1ec233,_0x2cbfe6,_0x217bfb)=>{const _0x518f49=_0x2cbfe6['viewItem']['getChild'](0x0);if(!_0x518f49||!_0x518f49['is']('element','code'))return;if(!_0x217bfb['consumable']['consume'](_0x518f49,{'attributes':['vid_start','vid_end']}))return;const _0x403098=_0x2cbfe6['modelRange']['start']['nodeAfter'];_0x217bfb['writer']['setAttribute']('vid_start',_0x518f49['getAttribute']('vid_start'),_0x403098),_0x217bfb['writer']['setAttribute']('vid_end',_0x518f49['getAttribute']('vid_end'),_0x403098);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x167fc6=>{_0x167fc6['on']('element',(_0x189108,_0x293431,_0x1cbe1c)=>{if(!_0x1cbe1c['consumable']['consume'](_0x293431['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x293431['modelRange']['isCollapsed'])return;const _0x445449=_0x293431['modelRange']['start']['nodeAfter'];_0x445449['hasAttribute']('vid_start')||_0x445449['hasAttribute']('vid')||(_0x1cbe1c['writer']['setAttribute']('vid_start',_0x293431['viewItem']['getAttribute']('vid_start'),_0x445449),_0x1cbe1c['writer']['setAttribute']('vid_end',_0x293431['viewItem']['getAttribute']('vid_end'),_0x445449));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x1ffbe8=>_0x1ffbe8['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x439351,[,_0x583af8])=>{['vid_start','vid_end','vid']['includes'](_0x583af8)&&(_0x439351['return']=!0x0,_0x439351['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4d4cb9=>{_0x4d4cb9['on']('attribute:vid',(_0x5ac2f3,_0x3c7c51,_0x39c86f)=>{if('\x20'!=_0x3c7c51['item']['data']||_0x3c7c51['item']['parent']['maxOffset']>0x1)return;if(!_0x39c86f['consumable']['consume'](_0x3c7c51['item'],_0x5ac2f3['name']))return;const _0x4bc1f9=_0x39c86f['writer'],_0x542ef6=_0x39c86f['mapper']['toViewRange'](_0x3c7c51['range']);_0x4bc1f9['wrap'](_0x542ef6,_0x4bc1f9['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0xed1b4a){const _0x43123f=_0xed1b4a['plugins']['get']('RevisionViewer');return(_0x5b057e,_0x2037a1,_0xc7444c)=>{const _0x496e22=_0x2037a1['markerName']['split'](':')[0x1],_0x2a1a59=_0x43123f['_getChangeFromId'](_0x496e22);if(!_0x2a1a59)return null;const _0x2f069c='add'==_0x2a1a59['type']?'split':'merge';if(!_0xc7444c['consumable']['test'](_0x2037a1['markerRange'],_0x5b057e['name']))return;const _0x4b9a08=_0x2037a1['markerRange']['getWalker'](),_0x1914be=_0x2037a1['markerRange']['start'],_0x4439cf=_0xed1b4a['model']['schema'];let _0x55336c=null,_0x43953c=null,_0x27696a=!0x1,_0x24d531=!0x1;for(const _0x4e320f of _0x4b9a08){const _0xefe644=_0x4e320f['item'];_0x27696a=_0x27696a||_0x4439cf['isContent'](_0xefe644);const _0x130a7b=_0xc7444c['mapper']['toViewElement'](_0xefe644);if(_0x130a7b&&_0x130a7b['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4e320f['type']&&(_0x4439cf['isBlock'](_0xefe644)&&!_0x4439cf['isLimit'](_0xefe644)&&(_0xefe644['nextSibling']||_0x1914be['isAtEnd']?_0x55336c&&_0x55336c['parent']==_0xefe644||(_0x55336c=_0xefe644,_0x11413c(_0x4e320f['previousPosition']),_0x24d531=!0x0):_0x43953c=_0x43953c||_0x4e320f['previousPosition']));}function _0x11413c(_0x39ecdd){const _0x24e6a8=_0xc7444c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x2f069c}),_0x3fb71b=_0xc7444c['mapper']['toViewPosition'](_0x39ecdd);_0x2a1a59['data']['isSuggestion']&&_0xc7444c['writer']['addClass']('ck-suggestion-marker-'+_0x2f069c+'-new',_0x24e6a8),_0x43123f['activeChange']==_0x2a1a59&&_0xc7444c['writer']['addClass']('ck-suggestion-marker--active',_0x24e6a8),_0xc7444c['writer']['insert'](_0x3fb71b,_0x24e6a8),_0xc7444c['mapper']['bindElementToMarker'](_0x24e6a8,_0x2037a1['markerName']);}_0x27696a||_0x24d531||!_0x43953c||_0x11413c(_0x43953c);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x10b999,_0x2dfbcd,_0x3bd2d9)=>{const _0x1b0811=_0x3bd2d9['mapper']['markerNameToElements'](_0x2dfbcd['markerName']);if(_0x1b0811){for(const _0x4bc5d7 of _0x1b0811)(_0x4bc5d7['hasClass']('ck-suggestion-marker-split')||_0x4bc5d7['hasClass']('ck-suggestion-marker-merge'))&&(_0x3bd2d9['mapper']['unbindElementFromMarkerName'](_0x4bc5d7,_0x2dfbcd['markerName']),_0x3bd2d9['writer']['remove'](_0x4bc5d7));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0xfe947f,_0x5e8bb0,_0x3f8790)=>{const _0x3bacbb=_0x5e8bb0['markerName']['split'](':')[0x1],_0x5dfb7e=this['_getChangeFromId'](_0x3bacbb);if(!_0x5dfb7e)return null;const _0x3367af='add'==_0x5dfb7e['type']?'split':'merge';if(_0x3f8790['consumable']['test'](_0x5e8bb0['markerRange'],_0xfe947f['name']))for(const _0x34ccee of _0x5e8bb0['markerRange']['getItems']()){if(!_0x34ccee['is']('element','softBreak'))continue;const _0x52810f=_0x3f8790['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3367af}),_0x31f279=_0x3f8790['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x34ccee));_0x5dfb7e['data']['isSuggestion']&&_0x3f8790['writer']['addClass']('ck-suggestion-marker-'+_0x3367af+'-new',_0x52810f),this['activeChange']==_0x5dfb7e&&_0x3f8790['writer']['addClass']('ck-suggestion-marker--active',_0x52810f),_0x3f8790['writer']['insert'](_0x31f279,_0x52810f),_0x3f8790['mapper']['bindElementToMarker'](_0x52810f,_0x5e8bb0['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x530fa3=>{for(const _0x49636c of this['editor']['model']['document']['getRootNames']()){const _0x2f82e5=this['editor']['model']['document']['getRoot'](_0x49636c),_0x1abfaf=this['editor']['editing']['view']['document']['getRoot'](_0x49636c);if(_0x1abfaf){const _0x3ea3b8=_0x2f82e5['getAttribute']('revisionHistoryAttachChange');if(_0x530fa3['removeAttribute']('data-change-id',_0x1abfaf),_0x530fa3['removeClass']('ck-revision-history-root-add',_0x1abfaf),_0x530fa3['removeClass']('ck-revision-history-root-remove',_0x1abfaf),_0x530fa3['removeClass']('ck-revision-history-root--active',_0x1abfaf),_0x3ea3b8){const _0x4db29a=this['_getChangeFromId'](_0x3ea3b8);if(!_0x4db29a)return null;_0x530fa3['setAttribute']('data-change-id',_0x3ea3b8,_0x1abfaf),_0x530fa3['addClass']('ck-revision-history-root-'+_0x4db29a['type'],_0x1abfaf),this['activeChange']==_0x4db29a&&_0x530fa3['addClass']('ck-revision-history-root--active',_0x1abfaf);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x23dfd8=>'revision-comment:'+_0x23dfd8,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x456d3a=>'revision-suggestion:'+_0x456d3a,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0xd9caaa=>({'name':'suggestion:'+_0xd9caaa,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x1e41bc=>{const _0xf1a129=_0x1e41bc['markerName']['split'](':')[0x1];return'insertion'!=_0xf1a129&&'deletion'!=_0xf1a129?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0xf1a129]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x2a7e9d,_0x1ebe58,_0x4775b7)=>{const _0x3d8449=_0x4775b7['mapper']['markerNameToElements'](_0x1ebe58['markerName']);if(_0x3d8449){for(const _0x26b770 of _0x3d8449)_0x26b770['is']('uiElement')&&(_0x4775b7['mapper']['unbindElementFromMarkerName'](_0x26b770,_0x1ebe58['markerName']),_0x4775b7['writer']['remove'](_0x26b770));}},{'priority':'high'});}['_getChangeFromId'](_0xdefc70){return this['_changeIdToChange']['get'](_0xdefc70);}['_getViewForChange'](_0x200ff7){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x200ff7),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2d5ad8,_0x11387d,_0x468009,_0x2695f7)=>{_0x2695f7&&this['_balloon']['remove'](_0x2695f7),_0x468009&&(this['_balloon']['add']({'view':_0x468009,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0xef4663=this['editor']['editing'],_0x4e2bfe=this['_getChangeFromId'](_0x468009['changeId']);let _0x3917f1;if(_0x4e2bfe['data']['isOnRoot']){const _0x2ef762=_0xef4663['view']['getDomRoot'](_0x4e2bfe['rootName']);_0x3917f1=Array['from'](_0x2ef762['getClientRects']());}else{const _0x2f7476=this['editor']['model']['markers']['get']('revision:'+_0x468009['changeId']);_0x3917f1=Array['from'](_0xef4663['mapper']['markerNameToElements'](_0x2f7476['name']))['map'](_0x22d7e8=>_0xef4663['view']['domConverter']['mapViewToDom'](_0x22d7e8))['map'](_0x4e3bfe=>Array['from'](_0x4e3bfe['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x3917f1[0x0];return _0x3917f1['find'](_0xce23df=>_0xce23df['top']-0x3<=this['_activeViewTarget']['y']&&_0xce23df['bottom']+0x3>=this['_activeViewTarget']['y']&&_0xce23df['left']-0x3<=this['_activeViewTarget']['x']&&_0xce23df['right']+0x3>=this['_activeViewTarget']['x'])||_0x3917f1[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x27a600,_0x2313cc,_0x897f82,_0x1d9143)=>{this['activeView']=_0x897f82?this['_getViewForChange'](_0x897f82):null,this['editor']['model']['change'](()=>{const _0x11f4be=this['editor']['editing'];_0x1d9143&&(_0x1d9143['data']['isOnRoot']?_0x11f4be['view']['change'](_0x4b82ed=>{_0x4b82ed['removeClass']('ck-revision-history-root--active',_0x11f4be['view']['document']['getRoot'](_0x1d9143['rootName']));}):_0x11f4be['reconvertMarker']('revision:'+_0x1d9143['id'])),_0x897f82&&(_0x897f82['data']['isOnRoot']?_0x11f4be['view']['change'](_0x2012dc=>{_0x2012dc['addClass']('ck-revision-history-root--active',_0x11f4be['view']['document']['getRoot'](_0x897f82['rootName']));}):_0x11f4be['reconvertMarker']('revision:'+_0x897f82['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x283f8f,_0x564d48)=>{if(this['activeChange'])return;const _0x5382ac=this['_findChangeIdFromDomTarget'](_0x564d48['target']),_0x5423e0=this['_changeIdToChange']['get'](_0x5382ac);_0x5423e0?(this['_activeViewTarget']={'x':_0x564d48['domEvent']['x'],'y':_0x564d48['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5423e0)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x218b69,_0xc0d345)=>{const _0x352e6c=this['_findChangeIdFromDomTarget'](_0xc0d345['target']),_0x504761=this['_changeIdToChange']['get'](_0x352e6c);_0x504761?(this['_activeViewTarget']={'x':_0xc0d345['domEvent']['x'],'y':_0xc0d345['domEvent']['y']},_0x504761===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x504761):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x9e8a2b){do{const _0x49a234=_0x9e8a2b['getAttribute']('data-change-id');if(_0x49a234)return _0x49a234;_0x9e8a2b=_0x9e8a2b['parent'];}while(_0x9e8a2b);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x2c068e=>{for(const _0x59bd87 of this['editor']['model']['markers'])_0x2c068e['removeMarker'](_0x59bd87);});}}function Z(_0x486b03,_0x3529d7){return(_0x4adb8d,_0x58303b,_0x1aedb0)=>{if(!_0x1aedb0['consumable']['test'](_0x58303b['markerRange'],_0x4adb8d['name']))return;const _0xe2f565=_0x58303b['markerRange']['getWalker'](),_0x4a3da9=_0x58303b['markerRange']['start'],_0x4b61f9=_0x486b03['model']['schema'];let _0x51b643=null,_0x324074=null,_0x28c44a=!0x1,_0x5eef3c=!0x1;for(const _0x36f377 of _0xe2f565){const _0x1a8407=_0x36f377['item'];_0x28c44a=_0x28c44a||_0x4b61f9['isContent'](_0x1a8407);const _0x3cbc2f=_0x1aedb0['mapper']['toViewElement'](_0x1a8407);if(_0x3cbc2f&&_0x3cbc2f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x36f377['type']&&(_0x4b61f9['isBlock'](_0x1a8407)&&!_0x4b61f9['isLimit'](_0x1a8407)&&(_0x1a8407['nextSibling']||_0x4a3da9['isAtEnd']?_0x51b643&&_0x51b643['parent']==_0x1a8407||(_0x51b643=_0x1a8407,_0x4e440c(_0x36f377['previousPosition']),_0x5eef3c=!0x0):_0x324074=_0x324074||_0x36f377['previousPosition']));}function _0x4e440c(_0x269142){const _0x366117=_0x1aedb0['mapper']['toViewPosition'](_0x269142),_0x7a3e13=_0x1aedb0['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x3529d7});_0x1aedb0['writer']['insert'](_0x366117,_0x7a3e13),_0x1aedb0['mapper']['bindElementToMarker'](_0x7a3e13,_0x58303b['markerName']);}_0x28c44a||_0x5eef3c||!_0x324074||_0x4e440c(_0x324074);};}class _t extends _0x70568d{constructor(_0x41242d){super(_0x41242d);const _0x5e28c6=_0x41242d['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x5e28c6,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5e28c6,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x1cea40=this['editor'],_0x55316f=_0x1cea40['plugins']['get'](d),_0x241515=_0x55316f['isReady']?_0x55316f['diff']['newRevisionId']:null;_0x1cea40['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x241515);}['refresh'](){const {isReady:_0x4810ec,isEnabled:_0x753321,repository:_0xf26b2b,diff:_0x3ae953}=this['editor']['plugins']['get'](d),_0x42f47f=_0x3ae953&&_0xf26b2b['getLaterVisibleRevision'](_0x3ae953['newRevisionId']);this['isEnabled']=_0x4810ec&&_0x753321&&Boolean(_0x42f47f);}}class yt extends _0x70568d{['_step'];constructor(_0x33ecee,{direction:_0x26fc90}){super(_0x33ecee);const _0x1c124b=_0x33ecee['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x26fc90?0x1:-0x1,this['listenTo'](_0x1c124b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1c124b,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x1c124b,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x5095a1=this['editor'],_0x1947f3=_0x5095a1['plugins']['get'](d),{isNavigationMode:_0x11bddb,currentChangeNumber:_0x5e937a}=_0x1947f3;let _0x17cf58;if(_0x1947f3['activeChange']=_0x11bddb?_0x1947f3['diff']['changes']['get'](_0x5e937a+this['_step']):_0x1947f3['diff']['changes']['first'],_0x1947f3['activeChange']['data']['isOnRoot'])_0x17cf58=_0x5095a1['editing']['view']['getDomRoot'](_0x1947f3['activeChange']['rootName']);else{const _0x52555c=_0x5095a1['model']['markers']['get']('revision:'+_0x1947f3['activeChange']['id']);_0x17cf58=_0x49e725(_0x5095a1['editing'],_0x52555c);}_0x73e1e0({'target':_0x17cf58,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x42aa68,currentChangeNumber:_0x378dfe,numberOfChanges:_0x4849af,isReady:_0x1795d3,isEnabled:_0x5347ad}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x5347ad&&_0x1795d3&&_0x4849af)&&(!_0x42aa68||(0x1===this['_step']?_0x378dfe<_0x4849af-0x1:_0x378dfe>0x0));}}class bi extends _0x2bb680{constructor(_0x3d5d13){super(_0x3d5d13);const _0x51d009=this['bindTemplate'],_0xe977a9=new _0x3d2807(_0x3d5d13),_0x586cd1=new _0x3d2807(_0x3d5d13);this['set']('isNavigationMode',!0x1),this['set']('isReady',!0x1),this['set']('currentChangeNumber',0x0),this['set']('numberOfChanges',0x0),this['set']('isForwardNavigationEnabled',!0x1),this['set']('isBackwardNavigationEnabled',!0x1),this['bind']('_isStatusLabelVisible')['to'](this,'isReady',this,'numberOfChanges',(_0xb719a7,_0x31728b)=>_0xb719a7&&_0x31728b>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3e6505,_0x3e6e9a,_0x38bd1b,_0x3adb0f)=>{if(!_0x3e6505)return m(_0x3d5d13,'Loading...');if(!_0x38bd1b)return m(_0x3d5d13,'No\x20changes');const _0x481fb5=m(_0x3d5d13,'NUMBER_OF_CHANGES',_0x38bd1b);return _0x3adb0f?m(_0x3d5d13,'X_OF_Y_CHANGES',[_0x3e6e9a+0x1,_0x38bd1b]):_0x481fb5;}),_0xe977a9['set']({'label':m(_0x3d5d13,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x2014.494a.75.75\x200\x200\x200\x201.197-.899l-.067-.089-6.992-8a.75.75\x200\x200\x200-1.05-.078l-.079.078-7.008\x208a.75.75\x200\x200\x200\x201.049\x201.066l.08-.078\x206.442-7.354\x206.428\x207.354z\x22/></svg>\x0a'}),_0x586cd1['set']({'label':m(_0x3d5d13,'Show\x20next\x20change'),'tooltip':!0x0,'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M16.435\x205.506a.75.75\x200\x200\x201\x201.197.899l-.067.089-6.992\x208a.75.75\x200\x200\x201-1.05.078l-.079-.078-7.008-8a.75.75\x200\x200\x201\x201.049-1.066l.08.078\x206.442\x207.354\x206.428-7.354z\x22/></svg>\x0a'}),_0xe977a9['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x586cd1['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xe977a9['on']('execute',()=>this['fire']('execute','backward')),_0x586cd1['on']('execute',()=>this['fire']('execute','forward')),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-ui','ck-revision-history-ui__changes-navigation']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__wrapper']},'children':[{'tag':'span','attributes':{'class':['ck-revision-history-ui__changes-navigation__label',_0x51d009['if']('_isStatusLabelVisible','ck-hidden',_0x220a05=>!_0x220a05)]},'children':[{'text':_0x51d009['to']('isNavigationMode',_0x41139c=>_0x41139c?m(_0x3d5d13,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x3d5d13,'Total')+':\x20')}]},{'text':_0x51d009['to']('_statusText')}]},new _0x9a3880(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xe977a9,_0x586cd1]}]});}}const ie='ck-editor__editable__loading-overlay';class te extends _0x33f6b4{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x30dcc9=this['editor']['editing']['view'];_0x30dcc9['change'](_0x3e3c66=>{for(const _0x4b90fe of _0x30dcc9['document']['roots'])_0x3e3c66['addClass'](ie,_0x4b90fe);});}['hide'](){const _0x4f0a87=this['editor']['editing']['view'];_0x4f0a87['change'](_0x3934a3=>{for(const _0x31beb9 of _0x4f0a87['document']['roots'])_0x3934a3['removeClass'](ie,_0x31beb9);});}}class g extends _0x33f6b4{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,te];}['init'](){const _0x327b08=this['editor'],_0x2234c0=_0x327b08['plugins']['get'](d),_0x5e8700=_0x327b08['plugins']['get'](te);_0x327b08['ui']['componentFactory']['add']('exitToEditing',_0x4a4c47=>{const _0x28d923=new _0x3d2807(_0x4a4c47);return _0x28d923['set']({'label':m(_0x4a4c47,'Back\x20to\x20editing'),'icon':_0x2dd3b5['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x28d923,'execute',()=>{_0x327b08['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x28d923;}),_0x327b08['ui']['componentFactory']['add']('restoreRevision',_0x3cef39=>{const _0x13c933=new _0x3d2807(_0x3cef39);return _0x13c933['set']({'label':m(_0x3cef39,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x13c933['bind']('isEnabled')['to'](_0x327b08['commands']['get']('restoreRevision')),this['listenTo'](_0x13c933,'execute',()=>_0x327b08['execute']('restoreRevision')),_0x13c933;}),_0x327b08['ui']['componentFactory']['add']('changesNavigation',_0x2be27d=>{const _0x357c35=new bi(_0x2be27d),_0x4f69bb=_0x327b08['commands']['get']('showPreviousChange'),_0x576a0c=_0x327b08['commands']['get']('showNextChange');return _0x357c35['bind']('isBackwardNavigationEnabled')['to'](_0x4f69bb,'isEnabled'),_0x357c35['bind']('isForwardNavigationEnabled')['to'](_0x576a0c,'isEnabled'),_0x357c35['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x2234c0),this['listenTo'](_0x357c35,'execute',(_0x5140cc,_0x326c00)=>{_0x327b08['execute']('forward'===_0x326c00?'showNextChange':'showPreviousChange');}),_0x357c35;}),_0x5e8700['show'](),_0x2234c0['on']('change:isReady',(_0x108105,_0x3be27d,_0x4c74c4)=>{_0x4c74c4?_0x5e8700['hide']():_0x5e8700['show']();});}}class pt extends nt{['_resizeObserver']=null;constructor(_0x551eb0,_0x1bdb91){super(_0x551eb0,_0x1bdb91);const _0x5134c8=this['bindTemplate'];this['set']({'label':m(_0x551eb0,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x551eb0,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x5134c8['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0xc0db7e=this['fieldView']['element'];this['_tooltipString']=_0xc0db7e['scrollWidth']>_0xc0db7e['clientWidth']&&_0xc0db7e['value']||'';}}class ti extends _0x2bb680{constructor(_0x4c656e,_0x801642,_0x3576d7){super(_0x4c656e);const _0x24d822=new _0x15b257();_0x24d822['set']({'content':'<svg\x20viewBox=\x220\x200\x2011\x2010\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22\x20xmlns:xlink=\x22http://www.w3.org/1999/xlink\x22><path\x20d=\x22M5.5\x205C8.538\x205\x2011\x207.015\x2011\x209.5c0\x20.17-.011.336-.034.5H.034A3.732\x203.732\x200\x200\x201\x200\x209.5C0\x207.015\x202.462\x205\x205.5\x205zm0-5a2.5\x202.5\x200\x201\x201\x200\x205\x202.5\x202.5\x200\x200\x201\x200-5z\x22\x20/></svg>\x0a','viewBox':'0\x200\x2011\x2010'});const _0x4b18c5=['ck','ck-revision-history-sidebar__revision-author'];_0x3576d7&&_0x4b18c5['push']('ck-revision-history-sidebar__revision-author_creator');const _0x306368=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x4c656e,_0x3576d7?'Revision\x20creator':'Revision\x20author')},'children':[_0x24d822,_0x801642['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x4b18c5},'children':_0x306368});}}function ni(_0x1ade9e,_0x2b4669){const _0x349448=_0x1ade9e['bindTemplate'],_0x4fdde7=_0x1ade9e['locale'],_0x1cb60f=_0x34ab13(_0x4fdde7);_0x1cb60f['panelPosition']='sw';const _0xb93a88=function(_0x17e402,_0x4d3b1c){const _0x2507f8=function(_0x26678a,_0x587d82){const _0x95acdc=_0x26678a['locale'],_0x3d9558={'Compare\x20against\x20selected':m(_0x95acdc,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x95acdc,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x95acdc,'Restore\x20this\x20revision')};return _0x587d82['map'](_0x4b6ef7=>{const _0x1e4e51=_0x3d9558[_0x4b6ef7['name']];return _0x1e4e51&&_0x1e4e51!==_0x4b6ef7['name']&&(_0x4b6ef7['name']=_0x1e4e51),_0x4b6ef7;});}(_0x17e402,_0x4d3b1c),_0x1a65f5=new _0x604cb8();for(const _0x3a56ba of _0x2507f8){const _0x23941b={'type':'button','model':new to({'label':_0x3a56ba['name'],'class':_0x3a56ba['class'],'withText':!0x0,'role':'menuitem','_action':_0x3a56ba['action']})};_0x23941b['model']['bind']('isEnabled')['to'](_0x17e402,'isActionsDropdownOpen',_0xa373c8=>'function'!=typeof _0x3a56ba['isEnabled']||(!_0xa373c8||_0x3a56ba['isEnabled'](_0x17e402))),_0x1a65f5['add'](_0x23941b);}return _0x1a65f5;}(_0x1ade9e,_0x2b4669);return _0x1ade9e['bind']('isActionsDropdownOpen')['to'](_0x1cb60f,'isOpen'),_0x1cb60f['buttonView']['set']({'label':m(_0x4fdde7,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2dd3b5['threeVerticalDots']}),_0x1cb60f['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x349448['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x349448['to'](_0xf922bd=>_0xf922bd['stopPropagation']())}}),_0x1cb60f['on']('execute',_0x25b398=>{_0x1ade9e['isReady']&&'function'==typeof _0x25b398['source']['_action']&&_0x25b398['source']['_action'](_0x1ade9e);}),_0x46520c(_0x1cb60f,_0xb93a88,{'role':'menu'}),_0x1cb60f['listenTo'](_0x1ade9e,'change:isActionsDropdownOpen',(_0x3fd5ed,_0xe850da,_0x102942)=>{if(_0x102942)for(const _0x37bca of _0x1cb60f['listView']['items']){const _0x4fc2c5=_0x37bca['children']['first'],_0x677401=_0x2b4669['find'](_0x3754f3=>_0x3754f3['action']===_0x4fc2c5['_action'])['isVisible'];_0x37bca['isVisible']=void 0x0===_0x677401||_0x677401(_0x1ade9e);}}),_0x1cb60f;}class ai extends/* #__PURE__ -- @preserve */
26
+ _0x58316b(_0x2bb680){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x2566eb,_0x4da2cf,_0x4905b7,_0x583138){super(_0x2566eb);const _0x3f5a42=this['bindTemplate'],_0x3208dd=function(_0x8fec95,_0x30e079){const _0x3197a5=Array['from'](_0x30e079['authors'])['filter'](_0x2ae0db=>_0x2ae0db!=_0x30e079['creator']);return _0x30e079['creator']&&_0x3197a5['unshift'](_0x30e079['creator']),_0x3197a5['map'](_0x48e1bf=>new ti(_0x8fec95,_0x48e1bf,_0x48e1bf==_0x30e079['creator']));}(_0x2566eb,_0x4da2cf);this['id']=_0x4da2cf['id'],this['_revision']=_0x4da2cf,this['_requireRevisionName']=_0x583138,this['bind']('name','createdAt')['to'](_0x4da2cf),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x43b83f=>{return _0x7b02b2=_0x2566eb['uiLanguage'],(_0x2ee174=_0x43b83f)['toLocaleDateString'](_0x7b02b2,{'month':'long','day':'numeric'})+',\x20'+_0x2ee174['toLocaleTimeString'](_0x7b02b2,{'hour':'numeric','minute':'numeric'});var _0x7b02b2,_0x2ee174;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new pt(_0x2566eb,_0x5e8146),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x627fb3=>_0x627fb3||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x11cd66,_0x11a42b)=>_0x11cd66&&_0x11a42b),this['revisionActionsView']=_0x4905b7&&_0x4905b7['length']?ni(this,_0x4905b7):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x3f5a42['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x3f5a42['if']('isEnabled','ck-disabled',_0x29abb7=>!_0x29abb7),_0x3f5a42['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x3f5a42['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x3f5a42['if']('isActionsDropdownOpen','ck-revision-history-sidebar__actions_dropdown_open')]},'children':[this['revisionNameView'],{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision__date']},'children':[{'text':_0x3f5a42['to']('_createdAtFormatted')}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__revision__controls-wrapper']},'children':[{'tag':'ul','attributes':{'class':['ck','ck-revision-history-sidebar__revision-authors']},'children':_0x3208dd}]},this['revisionActionsView']],'on':{'click':_0x3f5a42['to'](_0x282f6f=>{_0x282f6f['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0xded7de=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0xded7de,'change',()=>{this['_requireRevisionName']&&!_0xded7de['value']||this['fire']('setName',{'id':this['id'],'name':_0xded7de['value']}),_0xded7de['value']||(_0xded7de['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function di(_0x372819,_0x2a4b33){const _0x352d57=_0xcce083['fromJSDate'](_0x372819)['setLocale'](_0x2a4b33),_0x481f6c=_0xcce083['local'](),_0x408d0e=_0x481f6c['minus']({'days':0x1})['startOf']('day');let _0x1f67ff,_0xbbe2a3;return _0x352d57['hasSame'](_0x481f6c,'day')?(_0x1f67ff=_0x352d57['startOf']('day')['toJSDate'](),_0xbbe2a3=_0x352d57['toRelativeCalendar']()):_0x352d57['hasSame'](_0x408d0e,'day')?(_0x1f67ff=_0x408d0e['toJSDate'](),_0xbbe2a3=_0x352d57['toRelativeCalendar']()):_0x352d57['hasSame'](_0x481f6c,'week')?(_0x1f67ff=_0x352d57['startOf']('week')['toJSDate'](),_0xbbe2a3=_0x352d57['weekdayLong']||''):_0x352d57['hasSame'](_0x481f6c,'year')?(_0x1f67ff=_0x352d57['startOf']('month')['toJSDate'](),_0xbbe2a3=_0x352d57['monthLong']||''):(_0x1f67ff=_0x352d57['startOf']('year')['toJSDate'](),_0xbbe2a3=String(_0x352d57['year'])),{'startDate':_0x1f67ff,'localizedPeriodName':_0xbbe2a3};}class mi extends _0x2bb680{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x26a4bf,_0x56723f,_0x25ffa8,_0x15c38b){super(_0x26a4bf);const _0x138986=di(_0x56723f,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x56723f,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x25ffa8,this['_requireRevisionName']=_0x15c38b,this['revisionViews']['delegate']('select')['to'](this),this['revisionViews']['delegate']('setName')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period']},'children':[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__label']},'children':[{'text':_0x138986}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x4f8a9b){const _0x36d83f=new ai(this['locale'],_0x4f8a9b,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x36d83f);}['removeRevision'](_0x526827){const _0x166597=this['revisionViews']['find'](_0x5a1221=>_0x5a1221['id']===_0x526827['id']);this['revisionViews']['remove'](_0x166597);}}class rs extends _0x2bb680{constructor(_0x2dfc01){super(_0x2dfc01);const _0x293996=new _0x15b257();_0x293996['content']=_0x2dd3b5['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x293996,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x2dfc01,'Revision\x20history')]}]});}}class ci extends _0x2bb680{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x55bcb8,_0x8c2023,_0x4131d9,_0x143a54){super(_0x55bcb8);const _0x43b102=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x8c2023,this['_revisionActions']=_0x4131d9,this['_requireRevisionName']=_0x143a54,this['on']('select',(_0x25e99a,_0x1ea24b)=>{this['fire']('revisionSelected',_0x1ea24b);}),this['on']('setName',(_0x35628e,_0x1dd731)=>{this['fire']('revisionSetName',_0x1dd731);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new rs(_0x55bcb8),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x43b102['if']('isEnabled','ck-disabled',_0x8866e7=>!_0x8866e7)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x305525 of this['_revisions'])this['_addRevision'](_0x305525);this['_revisions']['on']('add',(_0xd74c31,_0x5f42fd)=>{this['_addRevision'](_0x5f42fd);}),this['_revisions']['on']('remove',(_0x41a305,_0x1ae4da)=>{this['_removeRevision'](_0x1ae4da);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0xdbd374=>_0xdbd374['revisionViews']['map'](_0x442a4d=>_0x442a4d))['flat']();}['selectRevision'](_0x262594){for(const _0x59bf42 of this['revisionViews'])_0x262594&&_0x262594['id']===_0x59bf42['id']?_0x59bf42['select']():_0x59bf42['deselect']();}['highlightRevisions'](_0x48efbe){for(const _0x42b14d of this['revisionViews'])_0x48efbe['some'](({id:_0x58411d})=>_0x58411d===_0x42b14d['id'])?_0x42b14d['highlight']():_0x42b14d['unhighlight']();}['_addRevision'](_0x167b0e){const _0x107a69=di(_0x167b0e['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0xf13afb=this['timePeriodViews']['get'](0x0);_0xf13afb&&_0xf13afb['startDate']['getTime']()===_0x107a69['getTime']()||(_0xf13afb=new mi(this['locale'],_0x107a69,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0xf13afb)),_0xf13afb['addRevision'](_0x167b0e);}['_removeRevision'](_0x28bafc){const _0x48fe66=di(_0x28bafc['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x48fe66)['removeRevision'](_0x28bafc);}['_getTimePeriodViewByStartDate'](_0x31e880){return this['timePeriodViews']['find'](_0x2fb189=>_0x2fb189['startDate']['getTime']()===_0x31e880['getTime']());}}class w extends _0x33f6b4{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
27
27
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
28
- bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x2e9dee){super(_0x2e9dee),this['_revisionViewer']=_0x2e9dee['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x588136=this['_revisionsRepository']['_revisions'],_0x3e23cf=this['_createRevisionActions'](),_0x5f2d3e=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x588136,_0x3e23cf,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x48a9ad,_0x19e64e)=>{_0x19e64e['revisionViews']['on']('add',(_0x2a07da,_0x238cfd)=>{_0x238cfd['bind']('isEnabled','isReady')['to'](this['_revisionViewer']);});}),this['_sidebarView']['render'](),this['listenTo'](this['editor']['data'],'ready',this['_handleEditorDataReady']['bind'](this)),this['listenTo'](this['_revisionViewer'],'change:diff',this['_handleDiffChange']['bind'](this)),_0x5f2d3e['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0xe1051a=this['_revisionsRepository']['getRevision'](0x0);if(_0xe1051a){const _0x27d186=this['_revisionsRepository']['getEarlierVisibleRevision'](_0xe1051a['id']);this['_revisionViewer']['compare'](_0xe1051a,_0x27d186);}}['_handleRevisionSelected'](_0x4b283b,_0x4ba7da){const _0x350357=this['_revisionsRepository']['getRevision'](_0x4ba7da['id']),_0x4af443=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x350357['id']);this['_revisionViewer']['compare'](_0x350357,_0x4af443);}['_handleRevisionSetName'](_0x5f18e6,_0x13af56){this['_revisionsRepository']['getRevision'](_0x13af56['id'])['setName'](_0x13af56['name']);}['_handleDiffChange'](_0x39e6fb,_0x18912d,_0x39d916){const _0xc9a7d4=this['_revisionsRepository']['getRevisionsInDiff'](_0x39d916);_0xc9a7d4['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0xc9a7d4),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0xc9a7d4[0x0]));}['_createRevisionActions'](){const _0x2f93e9=this['editor'],_0x1abb84=g['availableRevisionActions'],_0x57d3df=_0x2f93e9['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x57d3df['length'])return _0x57d3df['map'](_0x43ed14=>{const _0x32de1f='string'==typeof _0x43ed14?Object['assign']({},_0x1abb84[_0x43ed14]):_0x43ed14;return _0x32de1f['action']=_0x32de1f['action']['bind'](this,_0x2f93e9),_0x32de1f['isVisible']&&(_0x32de1f['isVisible']=_0x32de1f['isVisible']['bind'](this,_0x2f93e9)),_0x32de1f;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x419f58},_0x4e05f6)=>{const _0x741ec9=_0x419f58['get'](d),_0x16083c=_0x741ec9['repository'];let _0x120758=_0x741ec9['diff']['newRevisionId'],_0x41db5d=_0x4e05f6['id'];_0x16083c['getIndex'](_0x120758)>_0x16083c['getIndex'](_0x41db5d)&&([_0x120758,_0x41db5d]=[_0x41db5d,_0x120758]),_0x741ec9['compare'](_0x120758,_0x41db5d);},'isVisible':({plugins:_0x360e79},_0x1c2258)=>{const _0x7a44a0=_0x360e79['get'](d);return!(_0x7a44a0['repository']['getRevisionsInDiff'](_0x7a44a0['diff'])['length']>0x2)&&!_0x1c2258['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4b471b,{id:_0x2ab99a})=>{_0x4b471b['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2ab99a);},'isVisible':({plugins:_0x35826b},_0x55a3f5)=>!!_0x35826b['get'](d)['repository']['getLaterVisibleRevision'](_0x55a3f5['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xa3719},{id:_0x593364,revisionNameView:_0x276f10})=>{const _0x332798=_0xa3719['get'](d),_0x326348=_0x332798['repository']['getEarlierVisibleRevision'](_0x593364);_0x332798['compare'](_0x593364,_0x326348),_0x276f10['focus'](),_0x276f10['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x20322d,_0x6ea275){super(_0x20322d),this['_view']=_0x6ea275,this['_toolbarConfig']=ot(_0x20322d['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x23fd2f){const _0x4d2b7c=this['editor'],_0x8c6f2c=this['view'],_0x543012=_0x4d2b7c['editing']['view'],_0x3a824b=_0x8c6f2c['editable'],_0x2318ee=_0x543012['document']['getRoot']();_0x3a824b['name']=_0x2318ee['rootName'],_0x8c6f2c['render']();const _0x281a5e=_0x3a824b['element'];this['setEditableElement'](_0x3a824b['name'],_0x281a5e),_0x8c6f2c['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x543012['attachDomRoot'](_0x281a5e),this['_elementReplacer']['replace'](_0x23fd2f,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x157db7=this['view'],_0x194b9f=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x194b9f['detachDomRoot'](_0x157db7['editable']['name']),_0x157db7['destroy']();}['_initToolbar'](){const _0x457cb8=this['view'];_0x457cb8['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x457cb8['stickyPanel']['limiterElement']=_0x457cb8['element'],_0x457cb8['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x4d7bd9})=>_0x4d7bd9),_0x457cb8['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x457cb8['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x309b9e,_0x38e91d,_0x46e3cf={}){super(_0x309b9e),this['stickyPanel']=new lt(_0x309b9e),this['toolbar']=new nt(_0x309b9e,{'shouldGroupWhenFull':_0x46e3cf['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x309b9e,_0x38e91d);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
29
- it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x48ecde,_0x4e7e98){super(_0x4e7e98),this['sourceElement']=_0x48ecde,this['model']['document']['createRoot']();const _0x146b22=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x146b22);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x43d5a8,_0x4b6833){const _0x447fe3=new this(_0x43d5a8,_0x4b6833);return await _0x447fe3['initPlugins'](),await _0x447fe3['ui']['init'](_0x43d5a8),await _0x447fe3['data']['init'](_0x447fe3['config']['get']('initialData')||''),_0x447fe3['fire']('ready'),_0x447fe3;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x26fb00{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35b1c0){function _0x5d38a1(_0x262b8a){return _0x262b8a['map'](_0x3f9613=>String['fromCharCode'](_0x3f9613))['join']('');}super(_0x35b1c0),this['result']='end',_0x35b1c0[_0x5d38a1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d38a1([0x76,0x69,0x65,0x77])][_0x5d38a1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5d38a1([0x61,0x75,0x74,0x6f]),_0x35b1c0[_0x5d38a1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5d38a1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5d38a1([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5d38a1([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5d38a1([0x6f,0x6b])});}}class k extends _0x26fb00{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x2ee821){if(super(_0x2ee821),!this['editor']['config']['get']('revisionHistory'))throw new _0x194013('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x3e9fee=>this['_showRevisionViewer']({..._0x3e9fee,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x324371=>this['_closeRevisionViewer'](_0x324371)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x2173f4=>this['_restoreRevision'](_0x2173f4)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x3a8a28){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x3a8a28;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x18c532){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x18c532);}['getRevision'](_0x431234){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x431234);}['getRevisions'](_0x3ac139){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3ac139||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x2a023b=this['editor'],_0x1738c7=_0x4802af(_0x2a023b,p),_0x136fb5=_0x2a023b['plugins']['get']('RevisionTracker'),_0x1211cd=_0x2a023b['plugins']['get']('Users')['users'];return _0x1738c7['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1738c7['lazyRoots'],(_0x1738c7['plugins']['push'](Rt,d,w,class extends _0x26fb00{static get['requires'](){return[d,'Users'];}['init'](){const _0x4acbc0=this['editor']['plugins']['get']('Users');for(const _0x23860e of _0x1211cd)_0x23860e['isAnonymous']||_0x4acbc0['getUser'](_0x23860e['id'])||_0x4acbc0['addUser'](_0x23860e);const _0x69aff7=_0x136fb5['repository']['getRevisions']();let _0x4699b2=null;const _0x554dd4=this['editor']['plugins']['get']('RevisionViewer');_0x554dd4['adapter']=_0x136fb5['adapter'],_0x554dd4['bind']('isEnabled')['to'](_0x136fb5),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x2a023b,'isReadOnly',_0x3396ef=>!_0x3396ef);for(const _0x30c101 of _0x69aff7){const _0x44369d=null===_0x30c101['creator'];if(_0x44369d&&_0x30c101['toVersion']===_0x30c101['fromVersion'])continue;const _0x1fafb2=_0x30c101['toJSON']();_0x554dd4['addRevisionData'](_0x1fafb2,(_0x4db94a,_0x519d51,_0x24174c)=>{if(_0x44369d){if(_0x4699b2)_0x4699b2['_update'](_0x4db94a,_0x519d51);else{if(!_0x519d51){const _0xdd66ee=_0x24174c['toJSON']();_0xdd66ee['id']=_0x4e207b(),_0x136fb5['saveRevision'](_0xdd66ee,_0x24174c['toVersion'])['then'](_0x5386fe=>{_0x4699b2=_0x5386fe;});}}}else _0x30c101['_update'](_0x4db94a,_0x519d51);});}}},g),_0x1738c7);}['_enhanceShowRevisionViewerCallback'](){const _0xf20ec2=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x255241=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x2f19c=this['editor']['plugins']['get']('Autosave');await _0x2f19c['save']();}else await _0x255241['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x4a5fbf=this['editor']['plugins']['get']('Dialog');_0x4a5fbf['isOpen']&&_0x4a5fbf['hide']();}const _0x1eaa2e=this['_getRevisionViewerEditorConfig']();return _0xf20ec2(_0x1eaa2e)['then'](_0x475f66=>{return(this['_viewerEditor']=_0x475f66,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x475f66;})['catch'](_0x39472b=>(console['error'](_0x39472b),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1ce7d8=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x1ce7d8(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x2a309d=this['editor']['plugins']['get']('Annotations');_0x2a309d['refreshVisibility'](),_0x2a309d['refreshPositioning']();}})));}['_showRevisionViewer'](_0x549da1){const _0x1043ba=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1c168d=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x248ba6=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x248ba6,_0x549da1)['then'](_0x16d02d=>(_0x1c168d['style']['display']='block',_0x1043ba['style']['display']='none',_0x16d02d));}['_closeRevisionViewer'](_0x23177b){const _0x4faf16=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x4faf16['style']['display']='',_0x23177b['destroy']();}async['_restoreRevision'](_0x1bba43){const _0x39e301=this['editor'],_0x41bd5c=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x2e1a8f=_0x39e301['plugins']['get']('RevisionTracker'),_0x159b7f=_0x41bd5c['repository']['getRevision'](_0x1bba43);let _0x3e2635,_0x94ea53,_0x53fc33;try{_0x3e2635=await _0x41bd5c['getRevisionData'](_0x159b7f),_0x94ea53=await _0x41bd5c['getRevisionRootsAttributes'](_0x159b7f);}catch(_0x75549d){return void console['error'](_0x75549d);}_0x39e301['model']['change'](_0x38ec6b=>{for(const _0x3fbffa of Array['from'](_0x39e301['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x38ec6b['removeMarker'](_0x3fbffa);}),_0x41bd5c['isReady']=!0x1,_0x39e301['model']['enqueueChange'](_0x117b0a=>{_0x117b0a['setSelection'](null),_0x117b0a['removeSelectionAttribute'](_0x39e301['model']['document']['selection']['getAttributeKeys']());const _0x3a4fb2=Object['keys'](_0x3e2635);for(const _0x476549 of _0x39e301['model']['document']['roots'])'$graveyard'!=_0x476549['rootName']&&_0x476549['isAttached']()&&!_0x3a4fb2['includes'](_0x476549['rootName'])&&_0x117b0a['detachRoot'](_0x476549);for(const _0x2807c8 of _0x3a4fb2){let _0x4702d8=_0x39e301['model']['document']['getRoot'](_0x2807c8);_0x4702d8&&_0x4702d8['isAttached']()||(_0x4702d8=_0x117b0a['addRoot'](_0x2807c8));const _0x4ad19b=_0x94ea53[_0x2807c8],_0x2f84be=Object['keys'](_0x4ad19b),_0x569077=_0x3e2635[_0x2807c8];for(const _0xe7d402 of _0x4702d8['getAttributeKeys']())_0x2f84be['includes'](_0xe7d402)||_0x117b0a['removeAttribute'](_0xe7d402,_0x4702d8);for(const _0x427fd of _0x2f84be)_0x117b0a['setAttribute'](_0x427fd,_0x94ea53[_0x2807c8][_0x427fd],_0x4702d8);_0x117b0a['remove'](_0x117b0a['createRangeIn'](_0x4702d8)),_0x117b0a['insert'](_0x39e301['data']['parse'](_0x569077,_0x4702d8),_0x4702d8,0x0);}});const _0x5aaebe=m(_0x39e301['locale'],'Restored');if(_0x159b7f['name'])_0x53fc33=-0x1==_0x159b7f['name']['indexOf'](_0x5aaebe)?_0x5aaebe+':\x20'+_0x159b7f['name']:_0x159b7f['name'];else _0x53fc33=_0x5aaebe+':\x20'+(_0x159b7f['createdAt']['toLocaleDateString'](_0x39e301['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x159b7f['createdAt']['toLocaleTimeString'](_0x39e301['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x2e1a8f['saveRevision']({'name':_0x53fc33}),_0x41bd5c['isReady']=!0x0,_0x39e301['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
28
+ bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x321f2b){super(_0x321f2b),this['_revisionViewer']=_0x321f2b['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xba1f33=this['_revisionsRepository']['_revisions'],_0x11f0af=this['_createRevisionActions'](),_0x3d7a97=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ci(this['editor']['locale'],_0xba1f33,_0x11f0af,this['editor']['config']['get']('revisionHistory.requireRevisionName')),this['_sidebarView']['on']('revisionSelected',this['_handleRevisionSelected']['bind'](this)),this['_sidebarView']['on']('revisionSetName',this['_handleRevisionSetName']['bind'](this)),this['_sidebarView']['bind']('isEnabled')['to'](this['_revisionViewer']),this['_sidebarView']['timePeriodViews']['on']('add',(_0x93f6e2,_0x308356)=>{_0x308356['revisionViews']['on']('add',(_0x371883,_0x55a4d2)=>{_0x55a4d2['bind']('isEnabled','isReady')['to'](this['_revisionViewer']);});}),this['_sidebarView']['render'](),this['listenTo'](this['editor']['data'],'ready',this['_handleEditorDataReady']['bind'](this)),this['listenTo'](this['_revisionViewer'],'change:diff',this['_handleDiffChange']['bind'](this)),_0x3d7a97['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x53173c=this['_revisionsRepository']['getRevision'](0x0);if(_0x53173c){const _0x300a25=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x53173c['id']);this['_revisionViewer']['compare'](_0x53173c,_0x300a25);}}['_handleRevisionSelected'](_0x44ebd9,_0x4f1e23){const _0x10b567=this['_revisionsRepository']['getRevision'](_0x4f1e23['id']),_0x3d9121=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x10b567['id']);this['_revisionViewer']['compare'](_0x10b567,_0x3d9121);}['_handleRevisionSetName'](_0x2e0e82,_0x594db2){this['_revisionsRepository']['getRevision'](_0x594db2['id'])['setName'](_0x594db2['name']);}['_handleDiffChange'](_0x1a62aa,_0x4fe5ae,_0x5a3800){const _0x3ee94b=this['_revisionsRepository']['getRevisionsInDiff'](_0x5a3800);_0x3ee94b['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x3ee94b),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x3ee94b[0x0]));}['_createRevisionActions'](){const _0x49417e=this['editor'],_0x263a46=w['availableRevisionActions'],_0x1452d1=_0x49417e['config']['get']('revisionHistory.revisionActions')||w['defaultRevisionActions'];if(_0x1452d1['length'])return _0x1452d1['map'](_0x5c7c2a=>{const _0x5e160c='string'==typeof _0x5c7c2a?Object['assign']({},_0x263a46[_0x5c7c2a]):_0x5c7c2a;return _0x5e160c['action']=_0x5e160c['action']['bind'](this,_0x49417e),_0x5e160c['isVisible']&&(_0x5e160c['isVisible']=_0x5e160c['isVisible']['bind'](this,_0x49417e)),_0x5e160c;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x697f1a},_0x57d5b2)=>{const _0xd3ed36=_0x697f1a['get'](d),_0x2f5d32=_0xd3ed36['repository'];let _0x502630=_0xd3ed36['diff']['newRevisionId'],_0x1aabc8=_0x57d5b2['id'];_0x2f5d32['getIndex'](_0x502630)>_0x2f5d32['getIndex'](_0x1aabc8)&&([_0x502630,_0x1aabc8]=[_0x1aabc8,_0x502630]),_0xd3ed36['compare'](_0x502630,_0x1aabc8);},'isVisible':({plugins:_0x1d5c6b},_0xb48f27)=>{const _0x1b9b4b=_0x1d5c6b['get'](d);return!(_0x1b9b4b['repository']['getRevisionsInDiff'](_0x1b9b4b['diff'])['length']>0x2)&&!_0xb48f27['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x9a462d,{id:_0x50c3b4})=>{_0x9a462d['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x50c3b4);},'isVisible':({plugins:_0x26513e},_0x74189e)=>!!_0x26513e['get'](d)['repository']['getLaterVisibleRevision'](_0x74189e['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x315f3b},{id:_0xba5f90,revisionNameView:_0x331bdc})=>{const _0xf86524=_0x315f3b['get'](d),_0x768632=_0xf86524['repository']['getEarlierVisibleRevision'](_0xba5f90);_0xf86524['compare'](_0xba5f90,_0x768632),_0x331bdc['focus'](),_0x331bdc['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x1cdbea,_0x307fa4){super(_0x1cdbea),this['_view']=_0x307fa4,this['_toolbarConfig']=ot(_0x1cdbea['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x9c4ca9){const _0x8c8d89=this['editor'],_0x4773ce=this['view'],_0x52c085=_0x8c8d89['editing']['view'],_0x24be34=_0x4773ce['editable'],_0x5a8024=_0x52c085['document']['getRoot']();_0x24be34['name']=_0x5a8024['rootName'],_0x4773ce['render']();const _0xf861c1=_0x24be34['element'];this['setEditableElement'](_0x24be34['name'],_0xf861c1),_0x4773ce['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x52c085['attachDomRoot'](_0xf861c1),this['_elementReplacer']['replace'](_0x9c4ca9,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0xdc9ea8=this['view'],_0x1fadb0=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x1fadb0['detachDomRoot'](_0xdc9ea8['editable']['name']),_0xdc9ea8['destroy']();}['_initToolbar'](){const _0x5518fe=this['view'];_0x5518fe['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x5518fe['stickyPanel']['limiterElement']=_0x5518fe['element'],_0x5518fe['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x142886})=>_0x142886),_0x5518fe['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x5518fe['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x504faf,_0x3b6afd,_0xaa0288={}){super(_0x504faf),this['stickyPanel']=new ut(_0x504faf),this['toolbar']=new lt(_0x504faf,{'shouldGroupWhenFull':_0xaa0288['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x504faf,_0x3b6afd);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
29
+ it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x952ec9,_0x3dfd23){super(_0x3dfd23),this['sourceElement']=_0x952ec9,this['model']['document']['createRoot']();const _0x4f1b2a=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x4f1b2a);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x13c747,_0x52778f){const _0x1bbadd=new this(_0x13c747,_0x52778f);return await _0x1bbadd['initPlugins'](),await _0x1bbadd['ui']['init'](_0x13c747),await _0x1bbadd['data']['init'](_0x1bbadd['config']['get']('initialData')||''),_0x1bbadd['fire']('ready'),_0x1bbadd;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x33f6b4{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x463c1d){function _0x102aaf(_0x121eed){return _0x121eed['map'](_0x691392=>String['fromCharCode'](_0x691392))['join']('');}super(_0x463c1d),this['result']='end',_0x463c1d[_0x102aaf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x102aaf([0x76,0x69,0x65,0x77])][_0x102aaf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x102aaf([0x61,0x75,0x74,0x6f]),_0x463c1d[_0x102aaf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x102aaf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x102aaf([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x102aaf([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x102aaf([0x6f,0x6b])});}}class k extends _0x33f6b4{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x36f7a6){if(super(_0x36f7a6),!this['editor']['config']['get']('revisionHistory'))throw new _0x1e64e5('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x39fa4e=>this['_showRevisionViewer']({..._0x39fa4e,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2210a1=>this['_closeRevisionViewer'](_0x2210a1)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4f06dd=>this['_restoreRevision'](_0x4f06dd)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x24388c){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x24388c;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x5f1741){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x5f1741);}['getRevision'](_0x15dce2){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x15dce2);}['getRevisions'](_0x1921de){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x1921de||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xa7ce4=this['editor'],_0x5fe8e0=_0x38d51a(_0xa7ce4,p),_0x32c495=_0xa7ce4['plugins']['get']('RevisionTracker'),_0x153c9e=_0xa7ce4['plugins']['get']('Users')['users'];return _0x5fe8e0['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x5fe8e0['lazyRoots'],(_0x5fe8e0['plugins']['push'](Rt,d,g,class extends _0x33f6b4{static get['requires'](){return[d,'Users'];}['init'](){const _0xb817e8=this['editor']['plugins']['get']('Users');for(const _0x498d4a of _0x153c9e)_0x498d4a['isAnonymous']||_0xb817e8['getUser'](_0x498d4a['id'])||_0xb817e8['addUser'](_0x498d4a);const _0x331e20=_0x32c495['repository']['getRevisions']();let _0x5a00ff=null;const _0x2eaaf1=this['editor']['plugins']['get']('RevisionViewer');_0x2eaaf1['adapter']=_0x32c495['adapter'],_0x2eaaf1['bind']('isEnabled')['to'](_0x32c495),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xa7ce4,'isReadOnly',_0x51d7d5=>!_0x51d7d5);for(const _0x57b95f of _0x331e20){const _0xeef22f=null===_0x57b95f['creator'];if(_0xeef22f&&_0x57b95f['toVersion']===_0x57b95f['fromVersion'])continue;const _0x404499=_0x57b95f['toJSON']();_0x2eaaf1['addRevisionData'](_0x404499,(_0x4eb776,_0x4bab7d,_0x49601d)=>{if(_0xeef22f){if(_0x5a00ff)_0x5a00ff['_update'](_0x4eb776,_0x4bab7d);else{if(!_0x4bab7d){const _0x57989b=_0x49601d['toJSON']();_0x57989b['id']=_0x315034(),_0x32c495['saveRevision'](_0x57989b,_0x49601d['toVersion'])['then'](_0x285927=>{_0x5a00ff=_0x285927;});}}}else _0x57b95f['_update'](_0x4eb776,_0x4bab7d);});}}},w),_0x5fe8e0);}['_enhanceShowRevisionViewerCallback'](){const _0x1116a7=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x225d00=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x33cc8c=this['editor']['plugins']['get']('Autosave');await _0x33cc8c['save']();}else await _0x225d00['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x38815f=this['editor']['plugins']['get']('Dialog');_0x38815f['isOpen']&&_0x38815f['hide']();}const _0x247c29=this['_getRevisionViewerEditorConfig']();return _0x1116a7(_0x247c29)['then'](_0x2885b9=>{return(this['_viewerEditor']=_0x2885b9,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x2885b9;})['catch'](_0x173419=>(console['error'](_0x173419),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xab6bf2=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0xab6bf2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4110cf=this['editor']['plugins']['get']('Annotations');_0x4110cf['refreshVisibility'](),_0x4110cf['refreshPositioning']();}})));}['_showRevisionViewer'](_0x4bfb10){const _0x19ddcf=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x1b8b80=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x5869e2=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x5869e2,_0x4bfb10)['then'](_0x3f7fe4=>(_0x1b8b80['style']['display']='block',_0x19ddcf['style']['display']='none',_0x3f7fe4));}['_closeRevisionViewer'](_0x15466c){const _0x304020=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x304020['style']['display']='',_0x15466c['destroy']();}async['_restoreRevision'](_0x5798f0){const _0x1fc5c4=this['editor'],_0x5156e8=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x7e32f1=_0x1fc5c4['plugins']['get']('RevisionTracker'),_0x645bf0=_0x5156e8['repository']['getRevision'](_0x5798f0);let _0x76f4ad,_0x4f6a77,_0x5bcc65;try{_0x76f4ad=await _0x5156e8['getRevisionData'](_0x645bf0),_0x4f6a77=await _0x5156e8['getRevisionRootsAttributes'](_0x645bf0);}catch(_0x1ef5e0){return void console['error'](_0x1ef5e0);}_0x1fc5c4['model']['change'](_0x4c506d=>{for(const _0x5c88cc of Array['from'](_0x1fc5c4['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4c506d['removeMarker'](_0x5c88cc);}),_0x5156e8['isReady']=!0x1,_0x1fc5c4['model']['enqueueChange'](_0x259798=>{_0x259798['setSelection'](null),_0x259798['removeSelectionAttribute'](_0x1fc5c4['model']['document']['selection']['getAttributeKeys']());const _0x310a1d=Object['keys'](_0x76f4ad);for(const _0x117e50 of _0x1fc5c4['model']['document']['roots'])'$graveyard'!=_0x117e50['rootName']&&_0x117e50['isAttached']()&&!_0x310a1d['includes'](_0x117e50['rootName'])&&_0x259798['detachRoot'](_0x117e50);for(const _0x200bb9 of _0x310a1d){let _0x9dd691=_0x1fc5c4['model']['document']['getRoot'](_0x200bb9);_0x9dd691&&_0x9dd691['isAttached']()||(_0x9dd691=_0x259798['addRoot'](_0x200bb9));const _0x15b82a=_0x4f6a77[_0x200bb9],_0x558932=Object['keys'](_0x15b82a),_0xf4412c=_0x76f4ad[_0x200bb9];for(const _0x1ed92e of _0x9dd691['getAttributeKeys']())_0x558932['includes'](_0x1ed92e)||_0x259798['removeAttribute'](_0x1ed92e,_0x9dd691);for(const _0x39a175 of _0x558932)_0x259798['setAttribute'](_0x39a175,_0x4f6a77[_0x200bb9][_0x39a175],_0x9dd691);_0x259798['remove'](_0x259798['createRangeIn'](_0x9dd691)),_0x259798['insert'](_0x1fc5c4['data']['parse'](_0xf4412c,_0x9dd691),_0x9dd691,0x0);}});const _0x5afefb=m(_0x1fc5c4['locale'],'Restored');if(_0x645bf0['name'])_0x5bcc65=-0x1==_0x645bf0['name']['indexOf'](_0x5afefb)?_0x5afefb+':\x20'+_0x645bf0['name']:_0x645bf0['name'];else _0x5bcc65=_0x5afefb+':\x20'+(_0x645bf0['createdAt']['toLocaleDateString'](_0x1fc5c4['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x645bf0['createdAt']['toLocaleTimeString'](_0x1fc5c4['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x7e32f1['saveRevision']({'name':_0x5bcc65}),_0x5156e8['isReady']=!0x0,_0x1fc5c4['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,te as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};