@ckeditor/ckeditor5-revision-history 0.0.0-nightly-next-20250217.0 → 0.0.0-nightly-20250218.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 _0x2865e1,uid as _0x5396c0,Collection as _0x155967,logWarning as _0x40e21c,FocusTracker as _0x2aa214,KeystrokeHandler as _0x67c2bd,scrollViewportToShowTarget as _0x3e9bd5,ResizeObserver as pt,ElementReplacer as ht,CKEditorError as _0x500c82}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0xac2d02,set as _0x29f05d,unset as _0x826286,isEqual as _0x32cd69}from'es-toolkit/compat';import{Plugin as _0x14d729,PendingActions as _0x4a1854,Command as _0x5d82cf,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x3a705b,getMarkerDomElement as _0x4184eb,ConfirmMixin as _0x57b214,sanitizeEditorConfig as _0x39a0d0}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x1bc3ac,Element as ut,Range as ft,ViewUIElement as _0x39b677,ViewRawElement as _0x42b38a,ViewEmptyElement as _0x53dc4e,ViewAttributeElement as _0x5b45c4,ViewContainerElement as _0x4e0f89,Position as vt,ViewText as _0x3abc98,ViewElement as _0x2cf47f,DocumentFragment as gt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x409341,IconChevronUp as _0x58959a,IconChevronDown as _0x5caeeb,IconUndo as te,IconUser as _0x1d673e,IconThreeVerticalDots as _0x9148f5}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0xd5e275,injectCssTransitionDisabler as ts,submitHandler as _0x5a74b8,LabeledFieldView as at,createLabeledInputText as ti,createDropdown as _0x49d6ff,ListView as _0x4dbcfb,ListItemView as _0x51450a,ButtonView as _0x18c990,MenuBarMenuView as _0x5440ea,MenuBarMenuListView as _0x4bb9fe,MenuBarMenuListItemView as _0x594fbc,MenuBarMenuListItemButtonView as _0x38b68d,ContextualBalloon as _0x11057b,ToolbarSeparatorView as _0x1cc786,IconView as _0x43ad7e,addListToDropdown as _0x878981,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 _0x314ab0}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
- _0x2865e1(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2ca7ee){super(),this['id']=_0x2ca7ee['id']||_0x5396c0(),this['creator']=_0x2ca7ee['creator']||null,this['authors']=_0x2ca7ee['authors']||[],this['diffData']=_0x2ca7ee['diffData']||null,this['toVersion']=_0x2ca7ee['toVersion']||0x0,this['fromVersion']=_0x2ca7ee['fromVersion']||0x0,this['set']('name',_0x2ca7ee['name']||''),this['set']('createdAt',_0x2ca7ee['createdAt']||new Date()),this['set']('attributes',_0x2ca7ee['attributes']||{});}['setName'](_0x359a06){this['_update']({'name':_0x359a06});}['setAttribute'](_0x3a323d,_0x52554a){const _0x46c060=_0xac2d02(this['attributes']);_0x29f05d(_0x46c060,_0x3a323d,_0x52554a),this['_update']({'attributes':_0x46c060});}['removeAttribute'](_0x11e0d7){const _0x1cd126=_0xac2d02(this['attributes']);_0x826286(_0x1cd126,_0x11e0d7),this['_update']({'attributes':_0x1cd126});}['_update'](_0x868055,_0x3189c6=!0x1){let _0x12a256=!0x1;const _0x34a7df={'id':this['id']},_0x1fef52=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x24b994 of _0x1fef52){const _0x250b91=_0x868055[_0x24b994];void 0x0!==_0x250b91&&_0x250b91!==this[_0x24b994]&&(this[_0x24b994]=_0x250b91,_0x34a7df[_0x24b994]=_0x250b91,_0x12a256=!0x0);}_0x12a256&&(_0x34a7df['authors']&&(_0x34a7df['authorsIds']=_0x34a7df['authors']['map'](_0x35f0d3=>_0x35f0d3['id']),delete _0x34a7df['authors']),this['fire']('_update',_0x34a7df,_0x3189c6));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4d6590=>_0x4d6590['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x14d729{['_revisions'];static get['requires'](){return[_0x3a705b];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x2f30ac){super(_0x2f30ac),this['_revisions']=new _0x155967();}['afterInit'](){!async function(_0x5a07dc){const _0x393779=_0x37e8a0([0x76,0x6b,0x50,0x39,0x5a,0x72,0x59,0x54,0x65,0x45,0x70,0x35,0x61,0x38,0x74,0x51,0x47,0x6d,0x57,0x52,0x4a,0x32,0x63,0x79,0x4d,0x36,0x62,0x48,0x66,0x6a,0x71,0x4c,0x73,0x6c,0x42,0x64,0x41,0x6f,0x46,0x33,0x44,0x43,0x69,0x34,0x6e,0x4e,0x37,0x58,0x68,0x31,0x7a,0x4f,0x77,0x78,0x75,0x4b,0x30,0x49,0x53,0x67,0x56,0x55]),_0x20d673=0xeb829,_0x40d643=0xcf5bb93,_0x2c5e36=0xcf2e453^_0x40d643,_0x3ae68f=window[_0x37e8a0([0x44,0x61,0x74,0x65])][_0x37e8a0([0x6e,0x6f,0x77])](),_0x1ec405=_0x5a07dc[_0x37e8a0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1dc1f4=new window[(_0x37e8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4309f9=>{_0x1ec405[_0x37e8a0([0x6f,0x6e,0x63,0x65])](_0x37e8a0([0x72,0x65,0x61,0x64,0x79]),_0x4309f9);}),_0x33fd89={[_0x37e8a0([0x6b,0x74,0x79])]:_0x37e8a0([0x45,0x43]),[_0x37e8a0([0x75,0x73,0x65])]:_0x37e8a0([0x73,0x69,0x67]),[_0x37e8a0([0x63,0x72,0x76])]:_0x37e8a0([0x50,0x2d,0x32,0x35,0x36]),[_0x37e8a0([0x78])]:_0x37e8a0([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]),[_0x37e8a0([0x79])]:_0x37e8a0([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]),[_0x37e8a0([0x61,0x6c,0x67])]:_0x37e8a0([0x45,0x53,0x32,0x35,0x36])},_0x1deb2a=_0x1ec405[_0x37e8a0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x37e8a0([0x67,0x65,0x74])](_0x37e8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2edcfd(){let _0x2235ed,_0x2a147d=null,_0x33663d=null;try{if(_0x1deb2a==_0x37e8a0([0x47,0x50,0x4c]))return _0x37e8a0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2235ed=_0x3a9cfe(),!_0x2235ed)return _0x37e8a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2235ed[_0x37e8a0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x33663d=_0x1ebbfb(_0x2235ed[_0x37e8a0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2235ed[_0x37e8a0([0x6a,0x74,0x69])])),await _0x116524()?_0x49f3f5()?_0x366355()?_0x37e8a0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x137b47()?(_0x2235ed[_0x37e8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37e8a0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2a147d=_0xc95908(_0x37e8a0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2235ed[_0x37e8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x37e8a0([0x74,0x72,0x69,0x61,0x6c])&&(_0x2a147d=_0xc95908(_0x37e8a0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x149554()):_0x37e8a0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x37e8a0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x37e8a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x43f3c6){return _0x37e8a0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x366355(){const _0x134638=[_0x37e8a0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x37e8a0([0x74,0x72,0x69,0x61,0x6c])][_0x37e8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2235ed[_0x37e8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3ae68f/0x3e8:0xe10*_0x2c5e36;return _0x2235ed[_0x37e8a0([0x65,0x78,0x70])]<_0x134638;}function _0x49f3f5(){const _0x36ec8a=_0x2235ed[_0x37e8a0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x36ec8a)return!0x1;if(_0x36ec8a[_0x37e8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37e8a0([0x2a])))return!0x0;if(_0x36ec8a[_0x37e8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37e8a0([0x52,0x48])))return!0x0;if(_0x36ec8a[_0x37e8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37e8a0([0x52,0x52,0x48]))){if(_0x229ec4())return!0x0;if(_0x3b99d6()||_0x3a1e8f())return!0x0;}return!0x1;}function _0x137b47(){const _0x293595=_0x2235ed[_0x37e8a0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x293595||0x0==_0x293595[_0x37e8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3f0f49}=new URL(window[_0x37e8a0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x293595[_0x37e8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f0f49))return!0x0;const _0x3a2ea0=_0x3f0f49[_0x37e8a0([0x73,0x70,0x6c,0x69,0x74])](_0x37e8a0([0x2e]));return _0x293595[_0x37e8a0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xff2330=>_0xff2330[_0x37e8a0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37e8a0([0x2a])))[_0x37e8a0([0x6d,0x61,0x70])](_0x46c319=>_0x46c319[_0x37e8a0([0x73,0x70,0x6c,0x69,0x74])](_0x37e8a0([0x2e])))[_0x37e8a0([0x73,0x6f,0x6d,0x65])](_0x53582c=>_0x3a2ea0[_0x37e8a0([0x65,0x76,0x65,0x72,0x79])]((_0x2b8b6e,_0xb137d6)=>_0x53582c[_0xb137d6]===_0x2b8b6e||_0x53582c[_0xb137d6]===_0x37e8a0([0x2a])));}function _0x149554(){return _0x2a147d&&_0x33663d?new window[(_0x37e8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x6de173,_0x3fd75e)=>{_0x2a147d[_0x37e8a0([0x74,0x68,0x65,0x6e])](_0x6de173,_0x3fd75e),_0x33663d[_0x37e8a0([0x74,0x68,0x65,0x6e])](_0x2696a2=>{_0x2696a2!=_0x37e8a0([0x56,0x61,0x6c,0x69,0x64])&&_0x6de173(_0x2696a2);},_0x3fd75e);}):_0x2a147d||_0x33663d||_0x37e8a0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1ebbfb(_0x4f16a4,_0x209c31){return new window[(_0x37e8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x39969b=>{if(_0x222b13())return _0x39969b(_0x37e8a0([0x56,0x61,0x6c,0x69,0x64]));_0x229883(),_0x1ec405[_0x37e8a0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x37e8a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x516356=!0x1;const _0x3606d9=_0x5396c0();function _0x456ef1(_0x25064c){return!!_0x25064c&&(typeof _0x25064c===_0x37e8a0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x25064c===_0x37e8a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x25064c[_0x37e8a0([0x74,0x68,0x65,0x6e])]===_0x37e8a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x25064c[_0x37e8a0([0x63,0x61,0x74,0x63,0x68])]===_0x37e8a0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x420106(_0x19f13b){_0x22e594(_0x19f13b)[_0x37e8a0([0x74,0x68,0x65,0x6e])](_0x869d7a=>{if(!_0x869d7a||_0x869d7a[_0x37e8a0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x37e8a0([0x6f,0x6b]))return _0x37e8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x268929(_0x4090cc(_0x3606d9+_0x209c31))!=_0x869d7a[_0x37e8a0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x37e8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x37e8a0([0x56,0x61,0x6c,0x69,0x64]);})[_0x37e8a0([0x74,0x68,0x65,0x6e])](_0x26848c=>(_0x460614(),_0x26848c),()=>{const _0x33b09d=_0x209037();return null==_0x33b09d?(_0x460614(),_0x37e8a0([0x56,0x61,0x6c,0x69,0x64])):_0x37e8a0(_0x3ae68f-_0x33b09d>(0x28f93f93^_0x40d643)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x37e8a0([0x74,0x68,0x65,0x6e])](_0x39969b)[_0x37e8a0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x39969b(_0x37e8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x54f02a=0xcc35513^_0x40d643;function _0x460614(){const _0x4af09a=_0x37e8a0([0x6c,0x6c,0x63,0x74,0x2d])+_0x268929(_0x4090cc(_0x4f16a4)),_0xd4848f=_0x4b1d68(_0x268929(window[_0x37e8a0([0x4d,0x61,0x74,0x68])][_0x37e8a0([0x63,0x65,0x69,0x6c])](_0x3ae68f/_0x54f02a)));window[_0x37e8a0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37e8a0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4af09a,_0xd4848f);}function _0x209037(){const _0x230f59=_0x37e8a0([0x6c,0x6c,0x63,0x74,0x2d])+_0x268929(_0x4090cc(_0x4f16a4)),_0xf5fb9b=window[_0x37e8a0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x37e8a0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x230f59);return _0xf5fb9b?window[_0x37e8a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4b1d68(_0xf5fb9b),0x10)*_0x54f02a:null;}function _0x22e594(_0x22e203){return new window[(_0x37e8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xdbb329,_0xc70003)=>{_0x22e203[_0x37e8a0([0x74,0x68,0x65,0x6e])](_0xdbb329,_0xc70003),window[_0x37e8a0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xc70003,0xcf46f53^_0x40d643);});}}_0x1ec405[_0x37e8a0([0x6f,0x6e])](_0x37e8a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1b0dac,_0x14651f)=>{if(_0x14651f[0x0]!=_0x4f16a4)return _0x39969b(_0x37e8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x14651f[0x1]={..._0x14651f[0x1],[_0x37e8a0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3606d9};},{[_0x37e8a0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37e8a0([0x68,0x69,0x67,0x68])}),_0x1ec405[_0x37e8a0([0x6f,0x6e])](_0x37e8a0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5d09e8=>{_0x456ef1(_0x5d09e8[_0x37e8a0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x516356=!0x0,_0x420106(_0x5d09e8[_0x37e8a0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x37e8a0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x37e8a0([0x6c,0x6f,0x77])}),_0x1dc1f4[_0x37e8a0([0x74,0x68,0x65,0x6e])](()=>{_0x516356||_0x39969b(_0x37e8a0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x222b13(){return _0x1ec405[_0x37e8a0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37e8a0([0x76,0x69,0x65,0x77])][_0x37e8a0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x37e8a0([0x61,0x75,0x74,0x6f]);}function _0x229883(){_0x1ec405[_0x37e8a0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x37e8a0([0x76,0x69,0x65,0x77])][_0x37e8a0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x37e8a0([0x61,0x75,0x74,0x6f]);}}function _0xc95908(_0x3c54c2){const _0x1b93b0=[new window[(_0x37e8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x30945a=>setTimeout(_0x30945a,0xcfc855f^_0x40d643)),_0x1dc1f4[_0x37e8a0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x37e8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x149119=>{const _0x17a739=0xcf5bb94^_0x40d643,_0x182c0b=_0x5a07dc[_0x37e8a0([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x22b1cd(){_0x182c0b[_0x37e8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x17a739&&_0x149119();}_0x22b1cd(),_0x182c0b[_0x37e8a0([0x6f,0x6e])](_0x37e8a0([0x61,0x64,0x64]),_0x22b1cd);})),new window[(_0x37e8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x8b8e7b=>{function _0x2a09c3(){for(const _0x393b22 in window)if(window[_0x37e8a0([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x37e8a0([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x393b22))&&window[_0x393b22]==_0x20d673)return _0x8b8e7b();_0x1ec405[_0x37e8a0([0x73,0x74,0x61,0x74,0x65])]!=_0x37e8a0([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x37e8a0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2a09c3,0xcf5a81b^_0x40d643);}_0x3b51f4(_0x37e8a0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x2a09c3();})];return window[_0x37e8a0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x37e8a0([0x72,0x61,0x63,0x65])](_0x1b93b0)[_0x37e8a0([0x74,0x68,0x65,0x6e])](()=>_0x3c54c2);}async function _0x152ef6(){if(await _0x1dc1f4,_0x3b51f4(_0x37e8a0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x3b4d85=_0x5a07dc[_0x37e8a0([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x400c44=_0x5a07dc[_0x37e8a0([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])](_0x3b4d85[_0x37e8a0([0x69,0x64])]),_0x3e8821=_0x1bc335(_0x37e8a0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3e8821[_0x37e8a0([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x3b4d85['id'],_0x400c44?_0x400c44['id']:null,!0x0),_0x3e8821[_0x37e8a0([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x37e8a0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3e8821[_0x37e8a0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3e8821[_0x37e8a0([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x14a2d4,void(_0x3e8821[_0x37e8a0([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x14a2d4);}if(_0x3b51f4(_0x37e8a0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x369e93=_0x1bc335(_0x37e8a0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x369e93[_0x37e8a0([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x37e8a0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x369e93[_0x37e8a0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x369e93[_0x37e8a0([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x14a2d4,_0x369e93[_0x37e8a0([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x14a2d4;}_0x1ec405[_0x37e8a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x37e8a0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x14a2d4,_0x1ec405[_0x37e8a0([0x6d,0x6f,0x64,0x65,0x6c])][_0x37e8a0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x14a2d4,_0x1ec405[_0x37e8a0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x37e8a0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x229ec4(){return _0x3b51f4(_0x37e8a0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1bc335(_0x37e8a0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x37e8a0([0x73,0x74,0x61,0x74,0x65])]==_0x37e8a0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3b99d6(){return _0x3b51f4(_0x37e8a0([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 _0x3a1e8f(){return _0x3b51f4(_0x37e8a0([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x21e034(_0xc99de4){const _0x45bfcb=_0x42f275();_0x1ec405[_0x45bfcb]=_0x37e8a0([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])+_0xc99de4,_0xc99de4[_0x37e8a0([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x37e8a0([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x42f275()]=_0x20d673),_0xc99de4!=_0x37e8a0([0x56,0x61,0x6c,0x69,0x64])&&_0x152ef6();}function _0x42f275(){const _0x36fb8e=window[_0x37e8a0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x37e8a0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x37e8a0([0x6e,0x6f,0x77])]())[_0x37e8a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x37e8a0([0x2e]),'');let _0x35d0d2=_0x37e8a0([0x76]);for(let _0x955978=0x0;_0x955978<_0x36fb8e[_0x37e8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x955978+=0x2){let _0x118d8c=window[_0x37e8a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36fb8e[_0x37e8a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x955978,_0x955978+0x2));_0x118d8c>=_0x393779[_0x37e8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x118d8c-=_0x393779[_0x37e8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x35d0d2+=_0x393779[_0x118d8c];}return _0x35d0d2;}function _0x3a9cfe(){const _0x4084f7=_0x1deb2a[_0x37e8a0([0x73,0x70,0x6c,0x69,0x74])](_0x37e8a0([0x2e]));if(0x3!=_0x4084f7[_0x37e8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2171a8(_0x4084f7[0x1]);function _0x2171a8(_0x2a3f7c){const _0xd12b5=_0x34a3db(_0x2a3f7c);return _0xd12b5&&_0x54e834()?_0xd12b5:null;function _0x54e834(){const _0x420f7d=_0xd12b5[_0x37e8a0([0x6a,0x74,0x69])],_0x1095ab=window[_0x37e8a0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x420f7d[_0x37e8a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x420f7d[_0x37e8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x548ded={..._0xd12b5,[_0x37e8a0([0x6a,0x74,0x69])]:_0x420f7d[_0x37e8a0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x420f7d[_0x37e8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x548ded[_0x37e8a0([0x76,0x63])],_0x4090cc(_0x548ded)==_0x1095ab;}}}async function _0x116524(){let _0xc90832=!0x0;try{const _0x528c94=_0x1deb2a[_0x37e8a0([0x73,0x70,0x6c,0x69,0x74])](_0x37e8a0([0x2e])),[_0x1be868,_0x2edf71,_0x2659bb]=_0x528c94;return _0x418ce1(_0x1be868),await _0x3a30b5(_0x1be868,_0x2edf71,_0x2659bb),_0xc90832;}catch(_0x18e38b){return!0x1;}function _0x418ce1(_0x35c12f){const _0x30c277=_0x34a3db(_0x35c12f);_0x30c277&&_0x30c277[_0x37e8a0([0x61,0x6c,0x67])]==_0x37e8a0([0x45,0x53,0x32,0x35,0x36])||(_0xc90832=!0x1);}async function _0x3a30b5(_0x53afdb,_0x4842ff,_0x598c82){const _0x309d47=window[_0x37e8a0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x37e8a0([0x66,0x72,0x6f,0x6d])](_0x28d203(_0x598c82),_0x234181=>_0x234181[_0x37e8a0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x351580=new window[(_0x37e8a0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x37e8a0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x53afdb+_0x37e8a0([0x2e])+_0x4842ff),_0xc3c2d8=window[_0x37e8a0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x37e8a0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xc3c2d8)return;const _0x319101=await _0xc3c2d8[_0x37e8a0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x37e8a0([0x6a,0x77,0x6b]),_0x33fd89,{[_0x37e8a0([0x6e,0x61,0x6d,0x65])]:_0x37e8a0([0x45,0x43,0x44,0x53,0x41]),[_0x37e8a0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x37e8a0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x37e8a0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xc3c2d8[_0x37e8a0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x37e8a0([0x6e,0x61,0x6d,0x65])]:_0x37e8a0([0x45,0x43,0x44,0x53,0x41]),[_0x37e8a0([0x68,0x61,0x73,0x68])]:{[_0x37e8a0([0x6e,0x61,0x6d,0x65])]:_0x37e8a0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x319101,_0x309d47,_0x351580)||(_0xc90832=!0x1);}}function _0x34a3db(_0x284d7a){return _0x284d7a[_0x37e8a0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x37e8a0([0x65,0x79]))?JSON[_0x37e8a0([0x70,0x61,0x72,0x73,0x65])](_0x28d203(_0x284d7a)):null;}function _0x28d203(_0x544ff6){return window[_0x37e8a0([0x61,0x74,0x6f,0x62])](_0x544ff6[_0x37e8a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x37e8a0([0x2b]))[_0x37e8a0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x37e8a0([0x2f])));}function _0x4090cc(_0x371271){let _0x3de934=0x1505;function _0xfcee47(_0x2ab513){for(let _0x1a8ad9=0x0;_0x1a8ad9<_0x2ab513[_0x37e8a0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a8ad9++){const _0x133bad=_0x2ab513[_0x37e8a0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1a8ad9);_0x3de934=(_0x3de934<<0x5)+_0x3de934+_0x133bad,_0x3de934&=_0x3de934;}}function _0x471fa8(_0x17baf6){Array[_0x37e8a0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x17baf6)?_0x17baf6[_0x37e8a0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x471fa8):_0x17baf6&&typeof _0x17baf6==_0x37e8a0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x37e8a0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x17baf6)[_0x37e8a0([0x73,0x6f,0x72,0x74])]()[_0x37e8a0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5d8f86,_0x3ca92a])=>{_0xfcee47(_0x5d8f86),_0x471fa8(_0x3ca92a);}):_0xfcee47(window[_0x37e8a0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x17baf6));}return _0x471fa8(_0x371271),_0x3de934>>>0x0;}function _0x268929(_0x4175d9){return _0x4175d9[_0x37e8a0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x37e8a0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x37e8a0([0x30]));}function _0x4b1d68(_0x43cd0a){return _0x43cd0a[_0x37e8a0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x37e8a0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x37e8a0([0x6a,0x6f,0x69,0x6e])]('');}function _0x3b51f4(_0x1cdd1c){return _0x1ec405[_0x37e8a0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x37e8a0([0x68,0x61,0x73])](_0x1cdd1c);}function _0x1bc335(_0x3ec5ac){return _0x1ec405[_0x37e8a0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x37e8a0([0x67,0x65,0x74])](_0x3ec5ac);}function _0x14a2d4(){}function _0x37e8a0(_0x166185){return _0x166185['map'](_0x102ec6=>String['fromCharCode'](_0x102ec6))['join']('');}_0x21e034(await _0x2edcfd());}(this);}['createRevision'](_0x44642b){const _0x558bb3=this['editor']['plugins']['get']('Users');return new h({'id':_0x44642b['id'],'name':_0x44642b['name'],'creator':_0x44642b['creatorId']?_0x558bb3['getUser'](_0x44642b['creatorId']):null,'diffData':_0x44642b['diffData']||_0x44642b['data'],'authors':_0x44642b['authorsIds']['map'](_0x127090=>_0x558bb3['getUser'](_0x127090)),'createdAt':new Date(_0x44642b['createdAt']),'attributes':_0x44642b['attributes'],'fromVersion':_0x44642b['fromVersion'],'toVersion':_0x44642b['toVersion']});}['addRevision'](_0x2a3ed0,_0x32a397=0x0){this['_revisions']['add'](_0x2a3ed0,_0x32a397);}['getRevision'](_0x2f4e95){return this['_revisions']['get'](_0x2f4e95);}['getRevisions'](_0xa3aba={'toJSON':!0x1}){const _0x277a9a=Array['from'](this['_revisions']);return _0x277a9a['reverse'](),_0xa3aba['toJSON']?_0x277a9a['map'](_0x4afc47=>_0x4afc47['toJSON']()):_0x277a9a;}['getIndex'](_0x3773b6){return this['_revisions']['getIndex'](_0x3773b6);}['getEarlierVisibleRevision'](_0x15cc4f){const [,_0x4bdb85]=this['getRevisionsIterator'](_0x15cc4f,{'direction':'earlier'});return _0x4bdb85;}['getLaterVisibleRevision'](_0x3cf6b3){const [,_0x33eee0]=this['getRevisionsIterator'](_0x3cf6b3,{'direction':'later'});return _0x33eee0;}['getRevisionsInDiff'](_0x3580ea){const _0x20a801=[];for(const _0x4af290 of this['getRevisionsIterator'](_0x3580ea['newRevisionId']))if(_0x20a801['push'](_0x4af290),_0x4af290['id']===_0x3580ea['oldRevisionId'])break;return _0x20a801;}*['getRevisionsIterator'](_0x586e10,{direction:_0x3983de='earlier',filter:_0x51abd1=()=>!0x0}={}){const _0x28698a='earlier'===_0x3983de?0x1:-0x1;let _0x53126d=this['_revisions']['get'](_0x586e10),_0x4339d4=this['getIndex'](_0x53126d);for(yield _0x53126d;_0x53126d;){if(_0x4339d4+=_0x28698a,_0x53126d=this['getRevision'](_0x4339d4),!_0x53126d)return;_0x51abd1(_0x53126d)&&(yield _0x53126d);}}}function m(_0x38a5ae,_0x121130,_0x48ba99){const t=_0x38a5ae['t'];switch(_0x121130){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'},_0x48ba99);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x48ba99);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':_0x4e0f89,'a':_0x5b45c4,'e':_0x53dc4e,'r':_0x42b38a,'u':_0x39b677};class u extends _0x14d729{['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[_0x3a705b,j,_0x4a1854];}constructor(_0x4ab3c9){super(_0x4ab3c9),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 _0x902168=_0x5396c0();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x902168},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 _0x1c6d98=this['repository']['getRevision'](0x0),_0x4c37d4=_0x1c6d98&&null===_0x1c6d98['creator']?_0x1c6d98:null;if(this['_continueCurrentRevision']=!!_0x4c37d4&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x472799=this['_source']['getCurrentRevisionId'](),_0x31e6ed=this['repository']['getRevision'](_0x472799);if(_0x31e6ed)this['_startingVersion']=_0x31e6ed['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0xdd4f82=this['_source']['history']['_operations']['find'](_0x5135e2=>!_0x5135e2['_isInit']),_0x4c45dd=_0xdd4f82?_0xdd4f82['baseVersion']:this['_source']['history']['version'];_0x1c6d98?(_0x1c6d98['toVersion']<_0x4c45dd&&_0x1c6d98['_update']({'toVersion':_0x4c45dd}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x4c37d4['id'],this['_startingVersion']=_0x4c37d4['fromVersion']):(this['_startingVersion']=_0x1c6d98['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4c45dd,this['_continueCurrentRevision']=!0x1);}}else _0x4c37d4&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x4c37d4['toVersion'],this['editor']['model']['document']['history']['version']),_0x4c37d4['fromVersion']===_0x4c37d4['toVersion']?(0x0!==_0x4c37d4['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x4c37d4['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x4c37d4['id'],this['_startingVersion']=_0x4c37d4['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',_0x2c4526=>!_0x2c4526),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x461f33=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x75e8ac;for(const _0x5e9102 in _0x461f33){const _0x117613=_0x5e9102,_0xe380e1=_0x461f33[_0x117613];if('revisionHistoryLicenseKeyValid'==_0xe380e1||'revisionHistoryLicenseKeyInvalid'==_0xe380e1||'revisionHistoryLicenseKeyExpired'==_0xe380e1||'revisionHistoryLicenseKeyDomainLimit'==_0xe380e1||'revisionHistoryLicenseKeyNotAllowed'==_0xe380e1||'revisionHistoryLicenseKeyEvaluationLimit'==_0xe380e1||'revisionHistoryLicenseKeyTrialLimit'==_0xe380e1||'revisionHistoryLicenseKeyUsageLimit'==_0xe380e1){delete _0x461f33[_0x117613],_0x75e8ac=_0xe380e1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x75e8ac&&_0x461f33['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x75e8ac&&_0x461f33['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x75e8ac&&_0x461f33['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x75e8ac&&_0x461f33['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x75e8ac&&_0x461f33['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x75e8ac&&_0x461f33['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x75e8ac&&_0x461f33['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x45a242=this['repository']['getRevision'](0x0),_0x3e172a=await this['getRevisionDocumentData'](_0x45a242),_0x56bcfc=await this['getRevisionRootsAttributes'](_0x45a242);this['_replaceEditorDataWithRevisionData'](_0x3e172a,_0x56bcfc);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x25f4e1){this['_source']=_0x25f4e1;}async['update'](){const _0x4228ec=await this['_source']['getLatestVersion']();if(_0x4228ec>this['currentRevision']['toVersion']){await this['_loadState']();const _0x58fd22=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4228ec});_0x58fd22['authors']=_0x58fd22['authorsIds']['map'](_0x4cabaf=>this['editor']['plugins']['get']('Users')['getUser'](_0x4cabaf)),this['currentRevision']['_update'](_0x58fd22);}}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'](_0x1a36b9={},_0x10fc06=null){const _0x429687=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x10fc06>this['currentRevision']['toVersion']&&(_0x10fc06=null),null===_0x10fc06&&(_0x10fc06=await this['_source']['getLatestVersion']());const _0x2291cb=this['_getFromVersion'](_0x10fc06),_0x7ef22b=this['buildRevisionData']({'from':_0x2291cb,'to':_0x10fc06});if(this['currentRevision']['toVersion']<_0x10fc06){const _0x4856f6=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x10fc06,'to':_0x10fc06});_0x4856f6['authors']=[],_0x4856f6['authorsIds']=[],_0x4856f6['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4856f6,!0x0),delete _0x4856f6['authors'],_0x429687['push'](_0x4856f6);}_0x1a36b9['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x1a36b9['name']=_0x1a36b9['name']||null,_0x1a36b9['id']=_0x1a36b9['id']||_0x5396c0(),_0x1a36b9={..._0x1a36b9,..._0x7ef22b};const _0x47b200=this['addRevisionData'](_0x1a36b9);_0x429687['push'](_0x1a36b9);const _0x5eb0c8=this['repository']['getIndex'](_0x47b200);if(0x0!==_0x5eb0c8){const _0x3d1433=this['repository']['getRevision'](_0x5eb0c8-0x1);if(_0x3d1433['fromVersion']!==_0x10fc06){const _0xcdbe47=this['_revisionDataBuilder']['getData'](_0x10fc06,_0x3d1433['toVersion']),_0x50e75d={'id':_0x3d1433['id'],'diffData':_0xcdbe47['diffData'],'authorsIds':_0xcdbe47['authorsIds'],'authors':_0xcdbe47['authorsIds']['map'](_0x20735c=>this['editor']['plugins']['get']('Users')['getUser'](_0x20735c)),'fromVersion':_0x10fc06};_0x3d1433===this['currentRevision']&&(_0x50e75d['createdAt']=new Date(_0x1a36b9['createdAt']['getTime']()+0xa)),_0x3d1433['_update'](_0x50e75d,!0x0),delete _0x50e75d['authors'],_0x429687['push'](_0x50e75d);}}if(this['adapter']){for(const _0x45806c of _0x429687)this['_bufferUpdate'](_0x45806c['id'],_0x45806c,!0x0);this['sendBufferedUpdates']();}return _0x47b200;}['addRevisionData'](_0x4b1ee4){const _0x5a7332=this['repository']['createRevision'](_0x4b1ee4);return this['adapter']&&_0x5a7332['on']('_update',(_0x4307fb,_0x4d0b5a,_0x2ab21b)=>{_0x2ab21b||(this['_bufferUpdate'](_0x4d0b5a['id'],_0x4d0b5a,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5a7332,this['_findInsertionIndex'](_0x5a7332)),_0x5a7332;}async['getRevisionDocumentData'](_0xb4e7e8){await this['_loadRevisionData'](_0xb4e7e8);const _0x2406ef={};for(const _0x467c1f in _0xb4e7e8['diffData']){if(_0xb4e7e8['diffData'][_0x467c1f]['attachChange']&&!_0xb4e7e8['diffData'][_0x467c1f]['attachChange']['isAttached'])continue;const _0xc3c292=this['_removeRevisionMarkers'](JSON['parse'](_0xb4e7e8['diffData'][_0x467c1f]['insertions'])),_0x35229a=this['editor']['editing']['view']['document'],_0x2f0c0e=new _0x1bc3ac(_0x35229a,_0xc3c292['map'](_0x130f27=>P(_0x130f27,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x2406ef[_0x467c1f]=this['editor']['data']['processor']['toData'](_0x2f0c0e),this['editor']['data']['processor']['useFillerType']('default');}return _0x2406ef;}async['getRevisionRootsAttributes'](_0x530cc5){await this['_loadRevisionData'](_0x530cc5);const _0x3ddb67={};for(const _0x32cdbd in _0x530cc5['diffData'])_0x530cc5['diffData'][_0x32cdbd]['attachChange']&&!_0x530cc5['diffData'][_0x32cdbd]['attachChange']['isAttached']||(_0x3ddb67[_0x32cdbd]=_0x530cc5['diffData'][_0x32cdbd]['attributesAfter']||{});return _0x3ddb67;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x97b5ac=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1a81ec=0x0;_0x1a81ec<_0x97b5ac['length'];_0x1a81ec++){const _0xc846fd=_0x97b5ac[_0x1a81ec];let _0x1fba92=!0x1;for(const _0x4d1611 of Object['keys'](_0xc846fd))void 0x0===_0xc846fd[_0x4d1611]?delete _0xc846fd[_0x4d1611]:'id'!==_0x4d1611&&(_0x1fba92=!0x0);_0x1fba92||(_0x97b5ac[_0x1a81ec]=null);}if(_0x97b5ac=_0x97b5ac['filter'](_0x118c2b=>null!==_0x118c2b),!_0x97b5ac['length'])return;for(let _0x2d1865=0x0;_0x2d1865<_0x97b5ac['length'];_0x2d1865++){const _0x35002d=_0x97b5ac[_0x2d1865];void 0x0!==_0x35002d['fromVersion']&&void 0x0===_0x35002d['toVersion']&&(_0x35002d['toVersion']=this['repository']['getRevision'](_0x35002d['id'])['toVersion']),void 0x0!==_0x35002d['toVersion']&&void 0x0===_0x35002d['fromVersion']&&(_0x35002d['fromVersion']=this['repository']['getRevision'](_0x35002d['id'])['fromVersion']);}const _0x25782b=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x97b5ac,_0x25782b)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x41385a=>{if(_0x41385a){for(const _0x20f6be of _0x41385a)this['setRevisionData']({'id':_0x20f6be['id'],'createdAt':_0x20f6be['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x1f792a,_0x9db85a){let _0x274b40=this['editor']['config']['get']('initialData'),_0xce701c=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x274b40){_0x274b40={};for(const _0x9da5e6 of this['editor']['model']['document']['getRootNames']())_0x274b40[_0x9da5e6]='';}if('string'==typeof _0x274b40&&(_0x274b40={'main':_0x274b40}),void 0x0===_0xce701c){_0xce701c={};for(const _0x557cd3 of this['editor']['model']['document']['getRootNames']())_0xce701c[_0x557cd3]={};}let _0x137cce=!0x1;const _0x1dad16=Object['keys'](_0x274b40),_0x1d338f=Object['keys'](_0x1f792a);for(const _0x3c522f of _0x1dad16){if(_0x274b40[_0x3c522f]!==_0x1f792a[_0x3c522f]&&''!==_0x274b40[_0x3c522f]['trim']()){_0x137cce=!0x0;break;}if(!_0x32cd69(_0xce701c[_0x3c522f],_0x9db85a[_0x3c522f])&&Object['keys'](_0xce701c[_0x3c522f])['length']>0x0){_0x137cce=!0x0;break;}}_0x137cce||(_0x137cce=_0x1d338f['some'](_0x360434=>!this['editor']['model']['document']['getRoot'](_0x360434))),_0x137cce&&_0x40e21c('editor-initial-data-replaced-with-revision-data',{'editorData':_0x274b40,'editorRootsAttributes':_0xce701c,'revisionData':_0x1f792a,'revisionRootsAttributes':_0x9db85a}),this['editor']['config']['set']('initialData',_0x1f792a),this['editor']['config']['set']('rootsAttributes',_0x9db85a);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x492fdf=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x492fdf['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1a9eaa){const _0x2609a0=this['repository']['getRevisions']();_0x2609a0['reverse']();let _0x54d5a1=0x0;for(;_0x54d5a1<_0x2609a0['length'];){const _0x1978f5=_0x2609a0[_0x54d5a1];if(_0x1978f5===this['currentRevision']){_0x54d5a1++;continue;}if(_0x1978f5['id']===this['_initialRevisionId'])break;const _0x1cdb05=_0x1a9eaa['toVersion']-_0x1978f5['toVersion']||_0x1a9eaa['fromVersion']-_0x1978f5['fromVersion'];if(_0x1cdb05>0x0)break;if(_0x1cdb05<0x0)_0x54d5a1++;else{if(!_0x1a9eaa['creator']&&_0x1978f5['creator'])break;if(_0x1978f5['creator']||!_0x1a9eaa['creator']){if(_0x1a9eaa['createdAt']>_0x1978f5['createdAt'])break;_0x54d5a1++;}else _0x54d5a1++;}}return _0x54d5a1;}['setRevisionData'](_0x948769){const _0x33c9ea=this['repository']['getRevision'](_0x948769['id']);if(_0x948769['createdAt']&&(_0x948769['createdAt']=new Date(_0x948769['createdAt'])),_0x948769['authorsIds']){const _0x547185=this['editor']['plugins']['get']('Users');_0x948769['authors']=_0x948769['authorsIds']['map'](_0x205662=>_0x547185['getUser'](_0x205662));}_0x33c9ea['_update'](_0x948769,!0x0);}['buildRevisionData']({revision:_0x122bfe=null,from:_0x146e75=null,to:_0x39cc8d=null}){_0x146e75=null!==_0x146e75?_0x146e75:_0x122bfe['fromVersion'],_0x39cc8d=null!==_0x39cc8d?_0x39cc8d:_0x122bfe['toVersion'];const _0x312066=this['_revisionDataBuilder']['getData'](_0x146e75,_0x39cc8d),_0x4a122f={'diffData':_0x312066['diffData'],'authorsIds':_0x312066['authorsIds'],'fromVersion':_0x146e75,'toVersion':_0x39cc8d};if(!_0x122bfe||_0x39cc8d!==_0x122bfe['toVersion']){const _0x21f336=_0x39cc8d-0x1,_0x8892cb=this['_source']['history']['getOperation'](_0x21f336);_0x4a122f['createdAt']=_0x8892cb&&_0x8892cb['createdAt']||new Date();}if(this['_loadedStateData']&&_0x146e75===this['_loadedStateData']['fromVersion']){for(const _0x6b386a of this['_loadedStateData']['authors'])_0x4a122f['authorsIds']['includes'](_0x6b386a['id'])||_0x4a122f['authorsIds']['push'](_0x6b386a['id']);}return _0x4a122f;}['_loadRevisionData'](_0x7c503e){if(!_0x7c503e||_0x7c503e['diffData'])return Promise['resolve']();{const _0x336fab=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x336fab,'revisionId':_0x7c503e['id']})['then'](_0x3b7d91=>{_0x7c503e['diffData']=_0x3b7d91['diffData'];});}}['_bufferUpdate'](_0x3953e5,_0x5d50f2,_0x1f4502){if(this['_bufferedUpdates']['has'](_0x3953e5)){const _0x4e6c34=this['_bufferedUpdates']['get'](_0x3953e5);_0x5d50f2=_0x1f4502?{..._0x4e6c34,..._0x5d50f2}:{..._0x5d50f2,..._0x4e6c34};}this['_bufferedUpdates']['set'](_0x3953e5,_0x5d50f2);}['_getFromVersion'](_0x419314){const _0x1d62db=this['repository']['getRevisions']();_0x1d62db['reverse'](),_0x1d62db['shift']();const _0x1f5288=_0x1d62db['find'](_0x2c76a3=>_0x2c76a3['toVersion']<=_0x419314)['toVersion'];return _0x1f5288<this['_startingVersion']?this['_startingVersion']:_0x1f5288;}['_createInitialRevision'](_0x1806d7){const _0x1d39c1=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1d39c1)this['_initialRevisionId']=_0x1d39c1['id'];else{const _0x44dbf6=!this['editor']['model']['document']['roots']['find'](_0x4fccd9=>this['editor']['model']['hasContent'](_0x4fccd9)),_0x10926c=this['editor']['plugins']['get']('Users')['me']['id'],_0x197762=m(this['editor']['locale'],_0x44dbf6?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x1806d7,'to':_0x1806d7,'id':this['_initialRevisionId'],'name':_0x197762,'creatorId':_0x10926c});}}['_createCurrentRevision'](_0x463e53){const _0x338a4c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x338a4c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x463e53,'to':_0x463e53,'id':_0x338a4c,'name':'','creatorId':null}));}['_makeRevision']({name:_0x2a4529,from:_0x53f345,to:_0x173838,creatorId:_0x13a742,id:_0x4b18c3}){const _0x12128e=this['buildRevisionData']({'from':_0x53f345,'to':_0x173838});_0x12128e['name']=_0x2a4529,_0x12128e['creatorId']=_0x13a742,_0x12128e['id']=_0x4b18c3;const _0x757f89=this['addRevisionData'](_0x12128e);return this['adapter']&&this['_bufferUpdate'](_0x12128e['id'],_0x12128e,!0x0),_0x757f89;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x4e5235){return(_0x4e5235=_0x4e5235['filter'](_0x2d5f37=>!_0x2d5f37['name']||'revision-start'!==_0x2d5f37['name']&&'revision-end'!==_0x2d5f37['name']))['forEach'](_0x1315db=>{'string'!=typeof _0x1315db&&(_0x1315db['children']=this['_removeRevisionMarkers'](_0x1315db['children']),_0x1315db['attributes']=_0x1315db['attributes']['filter'](_0x2a58e6=>!_0x2a58e6[0x0]['startsWith']('data-revision-')));}),_0x4e5235;}}function P(_0x51b19b,_0x2bb613){const _0x5d52d2=_0x2bb613['editing']['view']['document'];if('string'==typeof _0x51b19b)return new _0x3abc98(_0x5d52d2,_0x51b19b);{const _0x3fb4e7=_0x51b19b['children']['map'](_0x112a8b=>P(_0x112a8b,_0x2bb613));return new(E[_0x51b19b['type']]||_0x2cf47f)(_0x5d52d2,_0x51b19b['name'],_0x51b19b['attributes'],_0x3fb4e7);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x2ecbf8){this['editor']=_0x2ecbf8,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'](_0x4f5d7b){this['source']=_0x4f5d7b;const _0xd8f32a=new Map(),_0x17574d=new Map(),_0x487f97=this['editor']['model']['document']['roots']['map'](_0x439438=>_0x439438['rootName']);for(const _0x16899f of _0x487f97){const _0x1fd956=this['editor']['model']['document']['getRoot'](_0x16899f),_0x443997=T(_0x1fd956);_0xd8f32a['set'](_0x16899f,_0x443997),_0x17574d['set'](_0x16899f,Object['fromEntries'](_0x1fd956['getAttributes']()));}const _0x44d69c=Array['from'](this['editor']['model']['markers'])['map'](_0x3cdfc1=>[_0x3cdfc1['name'],_0x3cdfc1['getRange']()]),_0x2b7df7=this['source']['version'];this['_saveMetaData'](_0x2b7df7,_0xd8f32a,_0x44d69c,_0x17574d),this['_startingRevisionId']=this['_revisionId'];const _0x2719fc=new Map(),_0x5bb0ed=new Map();for(const _0x2b7540 of _0x487f97){const _0x3c7493=F(_0x2b7540);_0x2719fc['set'](_0x2b7540,_0x3c7493),_0x5bb0ed['set'](_0x2b7540,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2719fc,[],_0x5bb0ed);}['getData'](_0x486386,_0x5ba90c){if(this['_lastFrom']===_0x486386&&this['_lastTo']<=_0x5ba90c)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5ba90c,!0x0);else{if(!this['_savedMetaData']['has'](_0x486386)){const _0x2000e9=this['_getPreviousFrom'](_0x486386);this['_calculateMetaData'](_0x2000e9,_0x486386,!0x1);}this['_calculateMetaData'](_0x486386,_0x5ba90c,!0x0);}return this['_lastFrom']=_0x486386,this['_lastTo']=_0x5ba90c,this['_getState']();}['loadState'](_0x1cace8){this['_reset'](),this['_lastFrom']=_0x1cace8['fromVersion'],this['_lastTo']=_0x1cace8['toVersion'];for(const _0x433813 in _0x1cace8['diffData']){const _0x5ba5ea=_0x1cace8['diffData'][_0x433813]['attachChange'],_0x27556b=_0xac2d02(_0x1cace8['diffData'][_0x433813]['attributesBefore'])||{},_0x4db747=this['_makeModelFromViewString'](_0x1cace8['diffData'][_0x433813]['deletions']);_0x4db747['rootName']=_0x433813,_0x4db747['_isAttached']=!_0x5ba5ea||!_0x5ba5ea['isAttached'],_0x4db747['isAttached']=()=>_0x4db747['_isAttached'],this['_baseRoots']['set'](_0x433813,_0x4db747),this['_baseRootsAttributes']['set'](_0x433813,_0x27556b),_0x5ba5ea&&this['_touchedRoots']['set'](_0x433813,_0x5ba5ea);const _0x25d2b8=this['_makeIdsRoot'](_0x4db747);this['_baseIdsRoots']['set'](_0x433813,_0x25d2b8);for(const [_0x36c044,_0x372a98]of _0x4db747['markers']){if(!_0x36c044['startsWith']('revision:'))continue;const _0x35b8dc=_0x36c044['split'](':')[0x2];for(const _0x95502b of _0x372a98['getWalker']({'singleCharacters':!0x0})){const _0x10f958=this['_getVidAttributeName'](_0x95502b),_0x40465e='elementEnd'==_0x95502b['type']?_0x95502b['previousPosition']['path']['slice'](0x0,-0x1):_0x95502b['previousPosition']['path'],_0x575396=_0x25d2b8['getNodeByPath'](_0x40465e)['getAttribute'](_0x10f958);this['_touched']['set'](_0x575396,{'userId':_0x35b8dc});}}}this['_startingRevisionId']=this['_revisionId'];const _0x3d7b33=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x670b5c=>!this['_touched']['has'](_0x670b5c));let _0x3fb5b0=0x0;const _0x4dd314=new Map();for(const _0x48ea44 in _0x1cace8['diffData']){const _0x591f9a=_0x1cace8['diffData'][_0x48ea44]['attachChange'],_0x2d4880=_0xac2d02(_0x1cace8['diffData'][_0x48ea44]['attributesAfter'])||{},_0x57fa1b=this['_makeModelFromViewString'](_0x1cace8['diffData'][_0x48ea44]['insertions']);_0x57fa1b['rootName']=_0x48ea44,_0x57fa1b['_isAttached']=!_0x591f9a||_0x591f9a['isAttached'],_0x57fa1b['isAttached']=()=>_0x57fa1b['_isAttached'],this['_diffRoots']['set'](_0x48ea44,_0x57fa1b),this['_diffRootsAttributes']['set'](_0x48ea44,_0x2d4880);const _0x5a0f54=this['_makeIdsRoot'](_0x57fa1b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x48ea44,_0x5a0f54),_0x4dd314['set'](_0x48ea44,_0x57fa1b['isAttached']()?_0x2d4880:{});for(const [_0x3ed2eb,_0x21f4a9]of _0x57fa1b['markers']){if(!_0x3ed2eb['startsWith']('revision:'))continue;const _0x442075=_0x3ed2eb['split'](':')[0x2];for(const _0x4f3f4c of _0x21f4a9['getWalker']({'singleCharacters':!0x0})){const _0x399f8f=this['_getVidAttributeName'](_0x4f3f4c),_0x5523bb=this['_revisionId']++,_0x476f70='elementEnd'==_0x4f3f4c['type']?_0x4f3f4c['previousPosition']['path']['slice'](0x0,-0x1):_0x4f3f4c['previousPosition']['path'];_0x5a0f54['getNodeByPath'](_0x476f70)['_setAttribute'](_0x399f8f,_0x5523bb),this['_touched']['set'](_0x5523bb,{'userId':_0x442075});}}for(const _0x19ef39 of this['editor']['model']['createRangeIn'](_0x57fa1b)['getWalker']({'singleCharacters':!0x0})){const _0x56de54=this['_getVidAttributeName'](_0x19ef39),_0xbf2ecb='elementEnd'==_0x19ef39['type']?_0x19ef39['previousPosition']['path']['slice'](0x0,-0x1):_0x19ef39['previousPosition']['path'],_0x377002=_0x5a0f54['getNodeByPath'](_0xbf2ecb);_0x377002['getAttribute'](_0x56de54)>0x0||_0x377002['_setAttribute'](_0x56de54,_0x3d7b33[_0x3fb5b0++]);}for(const [_0x4defe1,_0x41b7d6]of _0x57fa1b['markers'])_0x4defe1['startsWith']('revision:')||this['_markers']['set'](_0x4defe1,_0x41b7d6);}const _0x49ff04=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x49ff04),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x49ff04,0x1));const _0x8f329d=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x8f329d),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x8f329d,0x1));const _0x34dabc=Array['from'](this['_diffRoots'])['map'](([_0x91bb96,_0x199504])=>[_0x91bb96,T(_0x199504)]);this['_saveMetaData'](this['_lastTo'],_0x34dabc,this['_markers'],_0x4dd314);}['_makeModelFromViewString'](_0x1ba32e){const _0x23760a=JSON['parse'](_0x1ba32e),_0x2ad4f1=this['editor']['editing']['view']['document'],_0x4a0ad4=new _0x1bc3ac(_0x2ad4f1,_0x23760a['map'](_0xe3ef3d=>P(_0xe3ef3d,this['editor'])));return this['editor']['data']['toModel'](_0x4a0ad4);}['_saveMetaData'](_0x5ad271,_0x5a5a28,_0x51239f,_0x124a35){const _0x1b9e60=new Map(_0x5a5a28),_0x3560c0=new Map(_0xac2d02(_0x124a35)),_0x33b423=new Map();for(const [_0x229231,_0x1f0fc2]of _0x51239f)_0x33b423['set'](_0x229231,{'start':_0x1f0fc2['start']['clone'](),'end':_0x1f0fc2['end']['clone'](),'rootName':_0x1f0fc2['root']['rootName']});this['_savedMetaData']['set'](_0x5ad271,{'roots':_0x1b9e60,'markers':_0x33b423,'rootsAttributes':_0x3560c0});}['_removeMetaData'](_0x32a08e){this['_savedMetaData']['delete'](_0x32a08e);}['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'](_0x313b0f,_0x277270=null){let _0x25dbce=null;_0x313b0f['is']('documentFragment')||(_0x25dbce=new ut(_0x313b0f['name'],{'vid_start':null===_0x277270?this['_revisionId']++:_0x277270++}));const _0x34447e=[];for(const _0x470172 of _0x313b0f['getChildren']())if(_0x470172['is']('element')){_0x34447e['push'](this['_makeIdsRoot'](_0x470172,_0x277270));const _0x3ab50f=_0x34447e[_0x34447e['length']-0x1];null!==_0x277270&&(_0x277270=_0x3ab50f['is']('element','$text')?_0x3ab50f['getAttribute']('vid')+0x1:_0x3ab50f['getAttribute']('vid_end')+0x1);}else{for(let _0x309559=0x0;_0x309559<_0x470172['offsetSize'];_0x309559++)_0x34447e['push'](new ut('$text',{'vid':null===_0x277270?this['_revisionId']++:_0x277270++}));}if(_0x313b0f['is']('documentFragment')){const _0x439907=F(_0x313b0f['rootName']);return _0x439907['_insertChild'](0x0,_0x34447e),_0x439907;}return _0x25dbce['_setAttribute']('vid_end',null===_0x277270?this['_revisionId']++:_0x277270++),_0x25dbce['_insertChild'](0x0,_0x34447e),_0x25dbce;}['_calculateMetaData'](_0x101f6e,_0x1beda6,_0x34aa99){this['_reset']();const {roots:_0x371da4,markers:_0x4d01f7,rootsAttributes:_0x26d647}=this['_savedMetaData']['get'](_0x101f6e);this['_baseRoots']=new Map(_0x371da4),this['_baseRootsAttributes']=new Map(_0xac2d02(_0x26d647));for(const [_0x35d9b6,_0x1c060d]of this['_baseRoots'])if('$graveyard'!==_0x35d9b6&&(this['_diffRoots']['set'](_0x35d9b6,T(_0x1c060d)),this['_diffRootsAttributes']=new Map(_0xac2d02(_0x26d647)),_0x34aa99)){const _0x29bc50=this['_revisionId'];this['_idsRoots']['set'](_0x35d9b6,this['_makeIdsRoot'](_0x1c060d)),this['_baseIdsRoots']['set'](_0x35d9b6,this['_makeIdsRoot'](_0x1c060d,_0x29bc50));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x34aa99&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3f5a95,_0x34c57e]of _0x4d01f7){const _0x1152ac=this['_baseRoots']['get'](_0x34c57e['rootName']),_0x2e2eda=this['_diffRoots']['get'](_0x34c57e['rootName']),_0x5e77d4=new ft(this['_fixPosition'](_0x34c57e['start'],_0x1152ac),this['_fixPosition'](_0x34c57e['end'],_0x1152ac)),_0x4542a7=this['_fixRange'](_0x5e77d4,_0x2e2eda);_0x1152ac['markers']['set'](_0x3f5a95,_0x5e77d4),this['_markers']['set'](_0x3f5a95,_0x4542a7);}this['_applyOperations'](_0x101f6e,_0x1beda6,_0x34aa99);}['_applyOperations'](_0x588ca3,_0x2e3c49,_0x201555){for(const _0x5493ea of this['source']['getOperations'](_0x588ca3,_0x2e3c49))this['_handleOperation'](_0x5493ea,_0x201555);for(const _0x130366 of this['_diffRoots']['values']())_0x130366['markers']['clear']();for(const [_0x4d92dd,_0x25c80f]of this['_markers']){this['_diffRoots']['get'](_0x25c80f['root']['rootName'])['markers']['set'](_0x4d92dd,_0x25c80f['clone']());}const _0x323a37=new Map(),_0x7c13fb=new Map();for(const [_0xba7b3e,_0x17bc0b]of this['_diffRoots'])_0x323a37['set'](_0xba7b3e,T(_0x17bc0b)),_0x7c13fb['set'](_0xba7b3e,this['_diffRootsAttributes']['get'](_0xba7b3e));this['_saveMetaData'](_0x2e3c49,_0x323a37,this['_markers'],_0x7c13fb);}['_getPreviousFrom'](_0x342081){const _0x431764=Array['from'](this['_savedMetaData']['keys']());_0x431764['sort']((_0x60d549,_0x2423c4)=>_0x60d549-_0x2423c4),_0x431764['reverse']();for(const _0x2cee76 of _0x431764)if(_0x2cee76<_0x342081)return _0x2cee76;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2b9d19,_0x2a0678){const _0x4a01d0=Array['from'](_0x2a0678['markers'])['map'](([_0x429860,_0x1773e8])=>[_0x429860,this['_fixRange'](_0x1773e8,_0x2b9d19)]);_0x2b9d19['markers']=new Map(_0x4a01d0);}['_transformMarkers'](_0x1a608a){for(const _0x4f054f of this['_markers']['values']()){const _0x55bec8=_0x4f054f['getTransformedByOperation'](_0x1a608a),_0x51e884=ft['_createFromRanges'](_0x55bec8);_0x4f054f['start']=_0x51e884['start'],_0x4f054f['end']=_0x51e884['end'];}}['_handleOperation'](_0x3f129a,_0x37c6d2){if('addRoot'!=_0x3f129a['type']&&'detachRoot'!=_0x3f129a['type']){if('insert'==_0x3f129a['type']){const _0x1ff069=_0x3f129a['position']['root']['rootName'];this['_diffRoots']['has'](_0x1ff069)||(this['_diffRoots']['set'](_0x1ff069,F(_0x1ff069,!0x0)),this['_diffRootsAttributes']['set'](_0x1ff069,{}),_0x37c6d2&&this['_idsRoots']['set'](_0x1ff069,F(_0x1ff069,!0x0)));}else{if('addRootAttribute'==_0x3f129a['type']||'removeRootAttribute'==_0x3f129a['type']||'changeRootAttribute'==_0x3f129a['type'])return void this['_handleRootAttributeOperation'](_0x3f129a);'marker'==_0x3f129a['type']&&this['_handleMarkerOperation'](_0x3f129a);}if('marker'!==_0x3f129a['type']){const _0x21dd37=this['_cloneOperation'](_0x3f129a,this['_diffRoots']);_0x21dd37['_execute'](),this['_transformMarkers'](_0x21dd37);}if(_0x37c6d2)switch(_0x3f129a['type']){case'insert':this['_handleInsertOperation'](_0x3f129a);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x3f129a);break;case'merge':this['_handleMergeOperation'](_0x3f129a);break;case'split':this['_handleSplitOperation'](_0x3f129a);}}else this['_handleRootOperation'](_0x3f129a,_0x37c6d2);}['_cloneOperation'](_0x38fed9,_0x55c478){const _0x11b3ac=_0x38fed9['clone']();return _0x11b3ac['_authorId']=_0x38fed9['_authorId'],this['_fixOperation'](_0x11b3ac,_0x55c478),_0x11b3ac;}['_getBaseVids'](_0x5cf67c){return _0x5cf67c['map'](_0x33189e=>{const _0x2cdb3f=this['_getVidAttributeName'](_0x33189e);return Number(_0x33189e['item']['getAttribute'](_0x2cdb3f));});}['_generateTape'](_0x1dc38d,_0xbc895b){if(_0x1dc38d['is']('element','$text'))_0xbc895b['push']({'item':_0x1dc38d,'type':'text'});else{_0x1dc38d['is']('element')&&_0xbc895b['push']({'item':_0x1dc38d,'type':'elementStart'});for(const _0x3b7f74 of _0x1dc38d['getChildren']())this['_generateTape'](_0x3b7f74,_0xbc895b);_0x1dc38d['is']('element')&&_0xbc895b['push']({'item':_0x1dc38d,'type':'elementEnd'});}return _0xbc895b;}['_getState'](){const _0x507a86=new Map(this['_touched']),_0xc1f9a4=new Map(_0x507a86),_0x1faa6c=new Map(),_0x1e6305={'insertions':{},'deletions':{}},_0x44e3a1={'insertions':{},'deletions':{}},_0x360ed4=new Map(),_0x17fce3=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x17fce3['delete']('$graveyard');for(const _0x1e5292 of _0x17fce3){const _0x3db29=this['_diffRoots']['get'](_0x1e5292)||F(_0x1e5292,!0x1),_0x480022=this['_baseRoots']['get'](_0x1e5292)||F(_0x1e5292,!0x1);_0x3db29['isAttached']()||_0x480022['isAttached']()?(_0x1e6305['insertions'][_0x1e5292]=T(_0x3db29),_0x1e6305['deletions'][_0x1e5292]=T(_0x480022),this['_copyMarkers'](_0x1e6305['deletions'][_0x1e5292],_0x480022),this['_copyMarkers'](_0x1e6305['insertions'][_0x1e5292],_0x3db29),_0x44e3a1['insertions'][_0x1e5292]=this['_generateTape'](this['_idsRoots']['get'](_0x1e5292),[]),_0x44e3a1['deletions'][_0x1e5292]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1e5292)||F(_0x1e5292,!0x1),[])):_0x17fce3['delete'](_0x1e5292);}for(const _0x2a038f of _0x17fce3){const _0x39921b=_0x44e3a1['insertions'][_0x2a038f];for(const _0xb494f7 of _0x39921b){const _0x3e93d7=this['_getVidAttributeName'](_0xb494f7),_0x3b5436=_0xb494f7['item']['getAttribute'](_0x3e93d7);_0xc1f9a4['delete'](_0x3b5436),_0x3b5436>=this['_startingRevisionId']&&_0x1faa6c['set'](_0x3b5436,_0x507a86['get'](_0x3b5436));}}for(const _0x54771d of _0x17fce3){const _0x46d77b=_0x44e3a1['insertions'][_0x54771d],_0x466c72=this['_getBaseVids'](_0x44e3a1['deletions'][_0x54771d]);let _0x58f0b5=0x0;for(const _0x5b7b05 of _0x46d77b){const _0x4795c6=this['_getVidAttributeName'](_0x5b7b05),_0x552480=_0x5b7b05['item']['getAttribute'](_0x4795c6);if(!_0x1faa6c['has'](_0x552480)&&!_0x360ed4['has'](_0x552480)){if(_0xc1f9a4['has'](_0x552480))_0x58f0b5++;else{if(_0x552480!=_0x466c72[_0x58f0b5]){const _0x48ee49=_0x507a86['get'](_0x552480)||_0x507a86['get'](_0x466c72[_0x58f0b5]);for(;_0x552480!=_0x466c72[_0x58f0b5];)_0xc1f9a4['has'](_0x466c72[_0x58f0b5])||(_0x360ed4['set'](_0x466c72[_0x58f0b5],_0x48ee49),_0x507a86['set'](_0x466c72[_0x58f0b5],_0x48ee49)),_0x58f0b5++;}_0x58f0b5++;}}}}for(const _0x4ea2d7 of _0x17fce3){const _0xb75f7c=_0x44e3a1['insertions'][_0x4ea2d7];for(const _0x9d7039 of _0xb75f7c){const _0x4c1f0e=this['_getVidAttributeName'](_0x9d7039),_0x4ea273=_0x9d7039['item']['getAttribute'](_0x4c1f0e);if(_0x360ed4['has'](_0x4ea273)){const _0x2bde93=_0x360ed4['get'](_0x4ea273);_0xc1f9a4['has'](_0x4ea273)||_0xc1f9a4['set'](_0x4ea273,{..._0x2bde93}),_0x1faa6c['set'](_0x4ea273,{..._0x2bde93});}}}for(const _0x4f83ad of _0xc1f9a4['keys']())_0x4f83ad>=this['_startingRevisionId']&&_0xc1f9a4['delete'](_0x4f83ad);const _0x1a93df=new Map();for(const _0x4ab975 of _0x17fce3){let _0x5ebf44=_0x44e3a1['insertions'][_0x4ab975];for(const _0x92860a of _0x5ebf44)if(_0x92860a['item']['is']('element','tableCell')){const _0x429a4d=this['_getVidAttributeName'](_0x92860a),_0x334e15=_0x92860a['item']['getAttribute'](_0x429a4d);if(_0x1faa6c['has'](_0x334e15)){const _0x5c4563=_0x92860a['item']['parent']['parent']['getAttribute']('vid_start'),_0x9f301a=_0x1a93df['get'](_0x5c4563)||new Set();_0x9f301a['add'](_0x1faa6c['get'](_0x334e15)['userId']),_0x1a93df['set'](_0x5c4563,_0x9f301a);}}_0x5ebf44=_0x44e3a1['deletions'][_0x4ab975];for(const _0x34c387 of _0x5ebf44)if(_0x34c387['item']['is']('element','tableCell')){const _0x5c8a6e=this['_getVidAttributeName'](_0x34c387),_0x1aadd6=_0x34c387['item']['getAttribute'](_0x5c8a6e);if(_0xc1f9a4['has'](_0x1aadd6)){const _0x4bc386=_0x34c387['item']['parent']['parent']['getAttribute']('vid_start'),_0x1422b7=_0x1a93df['get'](_0x4bc386)||new Set();_0x1422b7['add'](_0xc1f9a4['get'](_0x1aadd6)['userId']),_0x1a93df['set'](_0x4bc386,_0x1422b7);}}for(const _0x4dff3f of _0x1a93df['keys']())(_0x1faa6c['has'](_0x4dff3f)||_0xc1f9a4['has'](_0x4dff3f))&&_0x1a93df['delete'](_0x4dff3f);}for(const _0x132c84 of _0x17fce3){const _0x2ff11c=_0x44e3a1['insertions'][_0x132c84];let _0x2fe37e=null,_0x1a2e67=null;for(const _0x514ac9 of _0x2ff11c){const _0x505e3c=this['_getVidAttributeName'](_0x514ac9),_0x3510a6=_0x514ac9['item']['getAttribute'](_0x505e3c),_0x1278df=_0x1a93df['get'](_0x3510a6);_0x1278df&&'elementStart'==_0x514ac9['type']&&(_0x2fe37e=Array['from'](_0x1278df)[0x0],_0x1a2e67=_0x514ac9['item']['getAttribute']('vid_end')),_0x2fe37e&&(_0xc1f9a4['set'](_0x3510a6,{'userId':_0x2fe37e}),_0x1faa6c['set'](_0x3510a6,{'userId':_0x2fe37e})),_0x3510a6==_0x1a2e67&&(_0x2fe37e=null,_0x1a2e67=null);}}const _0x24bbdd={},_0x3599ae=new Set();for(const _0x3af968 of _0x17fce3){const _0x4a21ba=_0x1e6305['deletions'][_0x3af968],_0x32a17a=_0x1e6305['insertions'][_0x3af968];for(const {userId:_0x3002cd}of this['_touchedMarkers']['values']())null!==_0x3002cd&&_0x3599ae['add'](_0x3002cd);for(const {userId:_0xc3a75f}of this['_touchedRoots']['values']())null!==_0xc3a75f&&_0x3599ae['add'](_0xc3a75f);this['_markChanges'](_0x32a17a,_0x44e3a1['insertions'][_0x3af968],_0x1faa6c,'insertion',_0x3599ae),this['_markChanges'](_0x4a21ba,_0x44e3a1['deletions'][_0x3af968],_0xc1f9a4,'deletion',_0x3599ae),_0x24bbdd[_0x3af968]={'insertions':this['_prepareViewToSave'](_0x32a17a),'deletions':this['_prepareViewToSave'](_0x4a21ba),'attachChange':this['_touchedRoots']['get'](_0x3af968)||null,'attributesBefore':_0xac2d02(this['_baseRootsAttributes']['get'](_0x3af968))||{},'attributesAfter':_0xac2d02(this['_diffRootsAttributes']['get'](_0x3af968))};}return{'diffData':_0x24bbdd,'authorsIds':Array['from'](_0x3599ae)};}['_processRootBeforeSave'](_0x151a05){for(const [,_0x13e96c]of _0x151a05['markers']){const _0x3ca748=_0x13e96c['start']['getAncestors']()['filter'](_0xd6c55e=>'tableCell'==_0xd6c55e['name']);for(const _0x302217 of _0x3ca748)0x1==_0x302217['childCount']&&_0x302217['getChild'](0x0)['is']('element','paragraph')&&_0x302217['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x170a40){this['_processRootBeforeSave'](_0x170a40);const _0x49994c=this['editor']['data']['toView'](_0x170a40,{}),_0x5530f3=Array['from'](_0x49994c['getChildren']())['map'](_0x4d2e1c=>this['_getViewJson'](_0x4d2e1c));return JSON['stringify'](_0x5530f3);}['_getViewJson'](_0x5edfcb){if(_0x5edfcb['is']('$text'))return _0x5edfcb['data'];{const _0x31bac3=_0x5edfcb;return{'type':Object['keys'](E)['find'](_0x1aab4d=>_0x5edfcb instanceof E[_0x1aab4d]),'name':_0x31bac3['name'],'attributes':Array['from'](_0x31bac3['getAttributes']()),'children':Array['from'](_0x31bac3['getChildren']())['map'](_0x1e8671=>this['_getViewJson'](_0x1e8671))};}}['_markChanges'](_0x51941a,_0x289ca9,_0x4a9ac6,_0x3a1b0b,_0x2322c3){let _0x29dfca=null,_0x3889ab=null,_0x1346e9=0x0;const _0x21e8d7=this['editor']['model'];for(let _0x1b678c=0x0;_0x1b678c<_0x289ca9['length'];_0x1b678c++){const _0x13542e=this['_getVidAttributeName'](_0x289ca9[_0x1b678c]),_0x53058e=_0x289ca9[_0x1b678c]['item']['getAttribute'](_0x13542e),_0x18c212=_0x4a9ac6['get'](_0x53058e),_0x24fdd4=_0x1b678c==_0x289ca9['length']-0x1;(!_0x29dfca&&_0x18c212&&(_0x29dfca=_0x18c212,_0x3889ab=_0x289ca9[_0x1b678c]),_0x29dfca&&(!_0x18c212||_0x18c212['userId']!=_0x29dfca['userId']))&&(_0x370c6c(_0x18c212,B(_0x3889ab,_0x51941a,_0x21e8d7),B(_0x289ca9[_0x1b678c],_0x51941a,_0x21e8d7)),_0x29dfca=_0x18c212||null,_0x3889ab=_0x18c212?_0x289ca9[_0x1b678c]:null),_0x29dfca&&_0x24fdd4&&_0x370c6c(_0x18c212,B(_0x3889ab,_0x51941a,_0x21e8d7),J(_0x289ca9[_0x1b678c],_0x51941a,_0x21e8d7));}function _0x370c6c(_0x3ca68a,_0x78bb15,_0x39cb28){const _0x434feb=_0x29dfca['userId'],_0x3ca888='revision:'+_0x3a1b0b+':'+_0x434feb+':'+_0x1346e9++,_0x2c8ead=_0x21e8d7['createRange'](_0x78bb15,_0x39cb28);_0x51941a['markers']['set'](_0x3ca888,_0x2c8ead),null!==_0x434feb&&_0x2322c3['add'](_0x434feb);}}['_getVidAttributeName'](_0x1bcce5){switch(_0x1bcce5['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x5a9ae4,_0x5c7a9b){_0x5a9ae4['baseVersion']=null;for(const _0x235821 in _0x5a9ae4){const _0x4bb08c=_0x5a9ae4[_0x235821];if(_0x4bb08c instanceof vt){const _0x22fab2=_0x5c7a9b['get'](_0x4bb08c['root']['rootName']);_0x5a9ae4[_0x235821]=this['_fixPosition'](_0x4bb08c,_0x22fab2);}if(_0x4bb08c instanceof ft){const _0x6a0c36=_0x5c7a9b['get'](_0x4bb08c['root']['rootName']);_0x5a9ae4[_0x235821]=this['_fixRange'](_0x4bb08c,_0x6a0c36);}'root'===_0x235821&&(_0x5a9ae4['root']=_0x5c7a9b['get'](_0x5a9ae4['root']['rootName']));}}['_fixRange'](_0x5db4ef,_0x4f2555){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5db4ef['start'],_0x4f2555),this['_fixPosition'](_0x5db4ef['end'],_0x4f2555));}['_fixPosition'](_0x1d7a76,_0x3ef821){return this['editor']['model']['createPositionFromPath'](_0x3ef821,_0x1d7a76['path'],_0x1d7a76['stickiness']);}['_handleInsertOperation'](_0x231a54){const _0x378c25=this['_idsRoots']['get'](_0x231a54['position']['root']['rootName']),_0x37006c=this['_fixPosition'](_0x231a54['position'],_0x378c25),_0x3de8d2=null===_0x231a54['_authorId']?null:_0x231a54['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4b932d=_0x37006c['parent'],_0x65ef84=this['_revisionId'],_0x3f3967=[];for(const _0x2b781a of _0x231a54['nodes'])if(_0x2b781a['is']('element'))_0x3f3967['push'](this['_makeIdsRoot'](_0x2b781a));else{for(let _0xe84850=0x0;_0xe84850<_0x2b781a['offsetSize'];_0xe84850++)_0x3f3967['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x3f0366=this['_revisionId'];for(let _0x24c6c3=_0x65ef84;_0x24c6c3<_0x3f0366;_0x24c6c3++)this['_touched']['set'](_0x24c6c3,{'userId':_0x3de8d2});_0x4b932d['_insertChild'](_0x37006c['offset'],_0x3f3967);}['_handleMoveOperation'](_0x163529){(_0x163529=this['_cloneOperation'](_0x163529,this['_idsRoots']))['_execute']();const _0x541e13=null===_0x163529['_authorId']?null:_0x163529['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2f6fb7=_0x163529['getMovedRangeStart'](),_0x2b2757=_0x2f6fb7['parent'],_0x95303d=_0x2f6fb7['offset'];!function _0x3d9a2a(_0x39081d,_0x352661,_0x54fa83,_0x11ca27){for(let _0x1bbb13=_0x54fa83;_0x1bbb13<_0x11ca27;_0x1bbb13++){const _0x231b67=_0x352661['getChild'](_0x1bbb13);_0x231b67['is']('element','$text')?_0x39081d['set'](_0x231b67['getAttribute']('vid'),{'userId':_0x541e13}):(_0x39081d['set'](_0x231b67['getAttribute']('vid_start'),{'userId':_0x541e13}),_0x3d9a2a(_0x39081d,_0x231b67,0x0,_0x231b67['childCount']),_0x39081d['set'](_0x231b67['getAttribute']('vid_end'),{'userId':_0x541e13}));}}(this['_touched'],_0x2b2757,_0x95303d,_0x95303d+_0x163529['howMany']);}['_handleMergeOperation'](_0x130298){const _0x18c5a6=null===(_0x130298=this['_cloneOperation'](_0x130298,this['_idsRoots']))['_authorId']?null:_0x130298['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d9e8b=_0x130298['targetPosition']['parent'],_0x13af89=_0x130298['sourcePosition']['parent'],_0x47f007=_0x4d9e8b['getAttribute']('vid_end'),_0x2dcca4=_0x13af89['getAttribute']('vid_start');_0x4d9e8b['_setAttribute']('vid_end',_0x13af89['getAttribute']('vid_end')),_0x13af89['_setAttribute']('vid_end',_0x47f007),this['_touched']['set'](_0x2dcca4,{'userId':_0x18c5a6}),this['_touched']['set'](_0x47f007,{'userId':_0x18c5a6}),_0x130298['_execute']();}['_handleSplitOperation'](_0x4efbcd){const _0x19794b=null===(_0x4efbcd=this['_cloneOperation'](_0x4efbcd,this['_idsRoots']))['_authorId']?null:_0x4efbcd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3fbb1d=_0x4efbcd['graveyardPosition'],_0x50068d=_0x4efbcd['splitPosition']['parent'];_0x4efbcd['_execute']();const _0x4380e7=_0x50068d['getAttribute']('vid_end'),_0x409610=_0x4efbcd['insertionPosition']['nodeAfter'];if(_0x3fbb1d){const _0x13119b=_0x409610['getAttribute']('vid_end'),_0x69dd82=_0x50068d['getAttribute']('vid_end');_0x50068d['_setAttribute']('vid_end',_0x13119b),_0x409610['_setAttribute']('vid_end',_0x69dd82),this['_touched']['set'](_0x50068d['getAttribute']('vid_end'),{'userId':_0x19794b}),this['_touched']['set'](_0x409610['getAttribute']('vid_start'),{'userId':_0x19794b});}else{const _0x28b851=this['_revisionId']++,_0x520ef4=this['_revisionId']++;_0x50068d['_setAttribute']('vid_end',_0x28b851),_0x409610['_setAttribute']('vid_start',_0x520ef4),_0x409610['_setAttribute']('vid_end',_0x4380e7),this['_touched']['set'](_0x28b851,{'userId':_0x19794b}),this['_touched']['set'](_0x520ef4,{'userId':_0x19794b});}}['_handleMarkerOperation'](_0x589867){if(!_0x589867['affectsData'])return;const _0x4032de=(_0x589867=this['_cloneOperation'](_0x589867,this['_diffRoots']))['oldRange']?_0x589867['oldRange']['root']:null,_0x5e718b=_0x589867['newRange']?_0x589867['newRange']['root']:null;_0x4032de&&this['_markers']['delete'](_0x589867['name']),_0x5e718b&&this['_markers']['set'](_0x589867['name'],_0x589867['newRange']['clone']());const _0x10deb8=null===_0x589867['_authorId']?null:_0x589867['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xfda735=_0x589867['name'];if(!this['_touchedMarkers']['has'](_0xfda735))return void this['_touchedMarkers']['set'](_0xfda735,{'range':_0x589867['oldRange'],'userId':_0x10deb8});const _0x47bbc5=this['_touchedMarkers']['get'](_0xfda735),_0x5e76b6=_0x47bbc5['range'],_0x577704=_0x589867['newRange'];null==_0x5e76b6&&null==_0x577704||_0x5e76b6&&_0x577704&&_0x5e76b6['isEqual'](_0x577704)?this['_touchedMarkers']['delete'](_0x589867['name']):_0x47bbc5['userId']=_0x10deb8;}['_handleRootOperation'](_0xb7c838,_0x120168){this['_diffRoots']['has'](_0xb7c838['rootName'])?this['_diffRoots']['get'](_0xb7c838['rootName'])['_isAttached']=_0xb7c838['isAdd']:(this['_diffRoots']['set'](_0xb7c838['rootName'],F(_0xb7c838['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0xb7c838['rootName'],{}),_0x120168&&this['_idsRoots']['set'](_0xb7c838['rootName'],F(_0xb7c838['rootName'],!0x0)));const _0x5ec2ee=null===_0xb7c838['_authorId']?null:_0xb7c838['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x620b54=this['_touchedRoots']['get'](_0xb7c838['rootName']);_0x620b54&&_0x620b54['userId']===_0x5ec2ee?this['_touchedRoots']['delete'](_0xb7c838['rootName']):this['_touchedRoots']['set'](_0xb7c838['rootName'],{'userId':_0x5ec2ee,'isAttached':_0xb7c838['isAdd']});}['_handleRootAttributeOperation'](_0x34ef00){const _0x12f701=this['_diffRootsAttributes']['get'](_0x34ef00['root']['rootName']);null===_0x34ef00['newValue']?delete _0x12f701[_0x34ef00['key']]:_0x12f701[_0x34ef00['key']]=_0x34ef00['newValue'];}}function T(_0x5160c9){const _0x278afa=F(_0x5160c9['rootName'],_0x5160c9['isAttached']());for(const _0x40ed61 of _0x5160c9['getChildren']()){const _0x45432b=_0x40ed61['_clone'](!0x0);_0x278afa['_appendChild'](_0x45432b);}return _0x278afa;}function F(_0x4b66ac,_0x29d358=!0x0){const _0x17a47f=new gt();return _0x17a47f['rootName']=_0x4b66ac,_0x17a47f['_isAttached']=_0x29d358,_0x17a47f['isAttached']=()=>_0x17a47f['_isAttached'],_0x17a47f;}function B(_0x1fa46f,_0x5875ee,_0x439110){const _0x471a2a='elementEnd'==_0x1fa46f['type']?_0x439110['createPositionAt'](_0x1fa46f['item'],'end'):_0x439110['createPositionBefore'](_0x1fa46f['item']);return _0x439110['createPositionFromPath'](_0x5875ee,_0x471a2a['path'],_0x471a2a['stickiness']);}function J(_0x268528,_0x20c473,_0x570ba7){const _0x36efdd='elementStart'==_0x268528['type']?_0x570ba7['createPositionAt'](_0x268528['item'],0x0):_0x570ba7['createPositionAfter'](_0x268528['item']);return _0x570ba7['createPositionFromPath'](_0x20c473,_0x36efdd['path'],_0x36efdd['stickiness']);}class os extends _0xd5e275{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x2128b4,_0x26a77f){super(_0x2128b4),this['focusTracker']=new _0x2aa214(),this['keystrokes']=new _0x67c2bd(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x26a77f),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'](),_0x5a74b8({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x2b8b3d=_0x42e1cc=>_0x42e1cc['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2b8b3d),this['keystrokes']['set']('arrowleft',_0x2b8b3d),this['keystrokes']['set']('arrowup',_0x2b8b3d),this['keystrokes']['set']('arrowdown',_0x2b8b3d);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x50356a){this['revisionNameInputView']['fieldView']['element']['value']=_0x50356a['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x1920bf){const _0x18d1b6=new at(this['locale'],ti),_0x266da5=_0x18d1b6['fieldView'];_0x266da5['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x242a2a=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x1920bf&&(_0x242a2a+='\x20('+m(this['locale'],'optional')+')'),(_0x18d1b6['label']=_0x242a2a,_0x266da5['on']('input',()=>{this['revisionNameInputValue']=_0x266da5['element']['value']['trim']();}),_0x18d1b6);}}class f extends _0x14d729{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x3f5e17=this['editor'],_0x5c3a48=_0x3f5e17['plugins']['get']('RevisionTracker');_0x3f5e17['ui']['componentFactory']['add']('revisionHistory',_0x1bbc2b=>{const _0x50df34=_0x49d6ff(_0x1bbc2b),_0x1bab05=_0x50df34['panelView']['children'],_0x5a19a8=new _0x4dbcfb(_0x1bbc2b),_0x15e010=new _0x51450a(_0x1bbc2b),_0xdd0f91=new _0x18c990(_0x1bbc2b),_0x3482c0=new _0x51450a(_0x1bbc2b),_0x3167c4=new _0x18c990(_0x1bbc2b);return _0x50df34['bind']('isEnabled')['to'](_0x5c3a48,'isReady',_0x5c3a48,'isEnabled',_0x3f5e17,'isReadOnly',(_0x52a86c,_0x6f59c3,_0x4b0483)=>_0x52a86c&&_0x6f59c3&&!_0x4b0483),_0x50df34['buttonView']['set']({'icon':_0x409341,'label':m(_0x1bbc2b,'Revision\x20history'),'tooltip':!0x0}),_0xdd0f91['set']({'label':m(_0x1bbc2b,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0xdd0f91['bind']('isEnabled')['to'](_0x5c3a48,'isReady',_0x5c3a48,'isEnabled',_0x3f5e17,'isReadOnly',(_0xa874f4,_0x5efb4b,_0x865473)=>_0xa874f4&&_0x5efb4b&&!_0x865473),_0xdd0f91['on']('execute',()=>this['_showDialog']()),_0x3167c4['set']({'label':m(_0x1bbc2b,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x3167c4['bind']('isEnabled')['to'](_0x5c3a48,'isReady',_0x3f5e17,'isReadOnly',(_0x14971c,_0x56aac7)=>_0x14971c&&!_0x56aac7),_0x3167c4['on']('execute',()=>{_0x3f5e17['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x50df34['isOpen']=!0x1,_0x3f5e17['editing']['view']['focus']();}),_0x15e010['children']['add'](_0xdd0f91),_0x3482c0['children']['add'](_0x3167c4),_0x5a19a8['role']='menu',_0x5a19a8['items']['addMany']([_0x15e010,_0x3482c0]),_0x1bab05['add'](_0x5a19a8),_0x50df34;}),_0x3f5e17['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x3f634b=this['editor'],_0xadbfe7=_0x3f634b['locale'],_0xf1974e=new _0x5440ea(_0xadbfe7),_0x18559c=new _0x4bb9fe(_0xadbfe7);_0xf1974e['buttonView']['set']({'icon':_0x409341,'label':m(_0xadbfe7,'Revision\x20history')});const _0x1f5a1c=new _0x594fbc(_0xadbfe7,_0xf1974e),_0x2c0dc2=new _0x38b68d(_0xadbfe7);_0x2c0dc2['set']({'label':m(_0xadbfe7,'Save\x20current\x20revision')}),_0x2c0dc2['delegate']('execute')['to'](_0xf1974e),_0x2c0dc2['on']('execute',()=>{this['_showDialog']();}),_0x1f5a1c['children']['add'](_0x2c0dc2),_0x18559c['items']['add'](_0x1f5a1c);const _0x4ba1f0=new _0x594fbc(_0xadbfe7,_0xf1974e),_0x167bc0=new _0x38b68d(_0xadbfe7);return _0x167bc0['set']({'label':m(_0xadbfe7,'Open\x20revision\x20history')}),_0x167bc0['delegate']('execute')['to'](_0xf1974e),_0x167bc0['on']('execute',()=>{_0x3f634b['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x4ba1f0['children']['add'](_0x167bc0),_0x18559c['items']['add'](_0x4ba1f0),_0xf1974e['panelView']['children']['add'](_0x18559c),_0xf1974e;}['_showDialog'](){const _0x1467c0=this['editor'],_0x398671=_0x1467c0['locale'],_0x54df46=_0x1467c0['plugins']['get']('Dialog'),_0x2c24d3=_0x1467c0['plugins']['get']('RevisionTracker');function _0x4bac1c(_0x1a941f){_0x1467c0['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1a941f['revisionName']?_0x1a941f['revisionNameInputView']['errorText']=m(_0x398671,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x1467c0['plugins']['get'](u)['saveRevision']({'name':_0x1a941f['revisionName']}),_0x54df46['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x4bac1c(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x54df46['show']({'id':'revisionSave','title':m(_0x398671,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x1467c0['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x54df46['hide']()},{'label':m(_0x1467c0['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x39a83a){_0x39a83a['bind']('isEnabled')['to'](_0x2c24d3,'isReady',_0x2c24d3,'isEnabled',_0x1467c0,'isReadOnly',(_0x12b0e9,_0x22f2ce,_0x3a43f2)=>_0x12b0e9&&_0x22f2ce&&!_0x3a43f2);},'onExecute':()=>_0x4bac1c(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x20806a=this['editor'],_0x396d96=_0x20806a['locale'];this['_saveRevisionFormView']=new os(_0x396d96,_0x20806a['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0xd5e275{['changeId'];['_model'];constructor(_0x5ccb9e,_0x5961d0){super(_0x5ccb9e),this['_model']=_0x5961d0,this['changeId']=_0x5961d0['id'];const _0x5a898c=this['bindTemplate'],_0x4d8f3e=m(_0x5ccb9e,_0x5961d0['data']['isSuggestion']?'Suggested\x20by':'add'==_0x5961d0['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x5961d0['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x5a898c['to']('type',_0x21c92b=>'ck-revision-change__'+_0x21c92b)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x4d8f3e}]},{'text':'\x20'+_0x5961d0['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
- _0x2865e1(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x1cd8c8){super(),this['id']=_0x1cd8c8['id']||_0x5396c0(),this['author']=_0x1cd8c8['author'],this['type']=_0x1cd8c8['type'],this['data']=_0x1cd8c8['data']||{},this['rootName']=_0x1cd8c8['rootName'],this['set']('createdAt',_0x1cd8c8['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(_0x1b2b23,_0x511022){this['newRevisionId']=_0x1b2b23,this['oldRevisionId']=_0x511022,this['changes']=new _0x155967();}['_setChanges'](_0x3f1b72){for(const _0x1d009b of _0x3f1b72)this['changes']['add'](_0x1d009b);}}const Y={'c':_0x4e0f89,'a':_0x5b45c4,'e':_0x53dc4e,'r':_0x42b38a,'u':_0x39b677};class d extends _0x14d729{['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[_0x3a705b,_0x11057b,j];}constructor(_0x355057){super(_0x355057),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',(_0x335fc0,_0x35ee99,_0x24628c)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0xf6bdc5=>{for(const _0x21b570 of this['editor']['editing']['view']['document']['roots'])_0x24628c?_0xf6bdc5['removeClass']('ck-editor__editable__overlay',_0x21b570):_0xf6bdc5['addClass']('ck-editor__editable__overlay',_0x21b570);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x4a4f0c=>null!==_0x4a4f0c),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x195166,_0x4072d9,_0x2fd26f)=>_0x195166&&_0x2fd26f?_0x4072d9['changes']['getIndex'](_0x2fd26f):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2a9fdc,_0x3a3b90)=>_0x2a9fdc?_0x3a3b90['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x11057b);}['init'](){const _0x4e87ed=this['editor'],_0x5b5872=new yt(_0x4e87ed,{'direction':'backward'}),_0x42984a=new yt(_0x4e87ed,{'direction':'forward'});(_0x4e87ed['commands']['add']('showPreviousChange',_0x5b5872),_0x4e87ed['commands']['add']('showNextChange',_0x42984a),_0x4e87ed['commands']['add']('restoreRevision',new _t(_0x4e87ed)),this['on']('change:numberOfChanges',()=>{_0x5b5872['refresh'](),_0x42984a['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x4e87ed['enableReadOnlyMode']('revision-viewer'),_0x4e87ed['plugins']['has']('WidgetToolbarRepository'))&&_0x4e87ed['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x43b9e7){await this['loadRevisionData'](_0x43b9e7);const _0x448781={};for(const _0x52579f in _0x43b9e7['diffData']){if(_0x43b9e7['diffData'][_0x52579f]['attachChange']&&!_0x43b9e7['diffData'][_0x52579f]['attachChange']['isAttached'])continue;const _0x5e4e6c=this['_removeRevisionMarkers'](JSON['parse'](_0x43b9e7['diffData'][_0x52579f]['insertions'])),_0x5bc9ac=this['editor']['editing']['view']['document'],_0xd2094c=new _0x1bc3ac(_0x5bc9ac,_0x5e4e6c['map'](_0x5a37d4=>this['_getViewObj'](_0x5a37d4)));this['editor']['data']['processor']['useFillerType']('marked'),_0x448781[_0x52579f]=this['editor']['data']['processor']['toData'](_0xd2094c),this['editor']['data']['processor']['useFillerType']('default');}return _0x448781;}async['getRevisionRootsAttributes'](_0x45817d){await this['loadRevisionData'](_0x45817d);const _0x40e8a1={};for(const _0x15abd1 in _0x45817d['diffData'])_0x45817d['diffData'][_0x15abd1]['attachChange']&&!_0x45817d['diffData'][_0x15abd1]['attachChange']['isAttached']||(_0x40e8a1[_0x15abd1]=_0x45817d['diffData'][_0x15abd1]['attributesAfter']||{});return _0x40e8a1;}['_removeRevisionMarkers'](_0x3b3cd4){return(_0x3b3cd4=_0x3b3cd4['filter'](_0x148688=>!_0x148688['name']||'revision-start'!==_0x148688['name']&&'revision-end'!==_0x148688['name']))['forEach'](_0xe94ee8=>{'string'!=typeof _0xe94ee8&&(_0xe94ee8['children']=this['_removeRevisionMarkers'](_0xe94ee8['children']),_0xe94ee8['attributes']=_0xe94ee8['attributes']['filter'](_0x1386e0=>!_0x1386e0[0x0]['startsWith']('data-revision-')));}),_0x3b3cd4;}async['compare'](_0x12a550,_0x3f1542,_0x1ef749=!0x1){if(!this['isEnabled'])return;const _0x3aa5ae=this['diff'],_0x3273aa=this['repository'],_0x4242d1='string'==typeof _0x12a550?_0x3273aa['getRevision'](_0x12a550):_0x12a550,_0x551140='string'==typeof _0x3f1542?_0x3273aa['getRevision'](_0x3f1542):_0x3f1542,_0x1e6c5f=_0x4242d1['id'],_0x1ca374=_0x551140?_0x551140['id']:null;if(!_0x1ef749&&this['diff']&&this['diff']['newRevisionId']===_0x1e6c5f&&this['diff']['oldRevisionId']===_0x1ca374)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x1e6c5f,_0x1ca374);const _0x56b426=this['_getRevisionsRange'](_0x4242d1,_0x551140,!0x0)['map'](_0xd9dc72=>this['loadRevisionData'](_0xd9dc72));return _0x56b426['push'](new Promise(_0x20a384=>{setTimeout(_0x20a384,0x14);})),Promise['all'](_0x56b426)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2a40db=this['_getDiff'](_0x1e6c5f,_0x1ca374);for(const _0x434f4b of _0x2a40db['changes'])this['_changeIdToChange']['set'](_0x434f4b['id'],_0x434f4b);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3ee1a4=>{for(const _0x18ecf5 of this['editor']['model']['document']['getRootNames']())_0x3ee1a4['detachRoot'](_0x18ecf5);for(const _0x12a05f of Object['keys'](_0x2a40db['model'])){const _0x5f4874=_0x3ee1a4['addRoot'](_0x12a05f);for(const _0x36fdc5 of Object['keys'](_0x2a40db['attributes'][_0x12a05f]))_0x3ee1a4['setAttribute'](_0x36fdc5,_0x2a40db['attributes'][_0x12a05f][_0x36fdc5],_0x5f4874);_0x3ee1a4['insert'](_0x2a40db['model'][_0x12a05f],_0x5f4874,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2a40db['changes'])),this['isReady']=!0x0;})['catch'](_0x2794b6=>{console['error'](_0x2794b6),this['_cleanUp'](),_0x3aa5ae&&(this['diff']=_0x3aa5ae),this['isReady']=!0x0;});}['addRevisionData'](_0x564f4f,_0x2b1e2c){const _0x166c40=this['repository']['createRevision'](_0x564f4f);return _0x166c40['on']('_update',(_0x1d494d,_0x37a00c,_0x4b94f3)=>_0x2b1e2c(_0x37a00c,_0x4b94f3,_0x166c40)),this['repository']['addRevision'](_0x166c40),_0x166c40;}['loadRevisionData'](_0x4d7763){if(!_0x4d7763||_0x4d7763['diffData'])return Promise['resolve']();{const _0x51d9f2=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x51d9f2,'revisionId':_0x4d7763['id']})['then'](_0x3fba57=>{_0x4d7763['_update']({'diffData':_0x3fba57['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},_0x16200b=>{for(const _0xe2eb70 of this['editor']['model']['document']['getRootNames']())_0x16200b['detachRoot'](_0xe2eb70);});}['_sortAndFilterDiffChanges'](_0x555e32){const _0xaa79ed=[],_0x1f5b1a=new Map();for(const _0x18d0fc of this['editor']['model']['document']['getRootNames']()){const _0x426293=this['editor']['editing']['view']['getDomRoot'](_0x18d0fc);if(!_0x426293)continue;const _0x506249=_0x426293['getClientRects']()['item'](0x0);_0x506249&&(_0xaa79ed['push'](_0x18d0fc),_0x1f5b1a['set'](_0x18d0fc,_0x506249));}return _0xaa79ed['sort']((_0x551855,_0x3cd267)=>{const _0x4864fe=_0x1f5b1a['get'](_0x551855),_0x4d46c9=_0x1f5b1a['get'](_0x3cd267);return _0x4864fe['y']-_0x4d46c9['y']||_0x4864fe['x']-_0x4d46c9['x'];}),(_0x555e32=_0x555e32['filter'](_0x199644=>_0xaa79ed['includes'](_0x199644['rootName'])))['sort']((_0x731364,_0x3a9a2f)=>_0xaa79ed['indexOf'](_0x731364['rootName'])-_0xaa79ed['indexOf'](_0x3a9a2f['rootName'])),_0x555e32;}['_makeTape'](_0x6161d0){const _0x58c88a=Array['from'](_0x6161d0['markers'])['filter'](([_0x34b989,_0x25b66e])=>_0x34b989['startsWith']('revision:')&&!_0x25b66e['isCollapsed']),_0x540af2=Array['from'](this['editor']['model']['createRangeIn'](_0x6161d0)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x58c88a['length'])for(const _0x13529d of _0x540af2){const [_0x5ed58d,_0x56b588]=_0x58c88a[0x0],[,_0x498b3f,_0x4772dc]=_0x5ed58d['split'](':');if(_0x56b588['end']['isEqual'](_0x13529d['nextPosition'])&&_0x58c88a['shift'](),(_0x13529d['previousPosition']['isEqual'](_0x56b588['start'])||_0x13529d['previousPosition']['isAfter'](_0x56b588['start']))&&('insertion'==_0x498b3f?_0x13529d['isAdded']={'userId':_0x4772dc}:'deletion'==_0x498b3f&&(_0x13529d['isRemoved']={'userId':_0x4772dc})),0x0==_0x58c88a['length'])break;}return _0x540af2;}['_refreshStartEndIndex'](_0x124295){const _0xb905f1=new Map();for(let _0xfed464=0x0;_0xfed464<_0x124295['length'];_0xfed464++)'text'===_0x124295[_0xfed464]['type']?(_0x124295[_0xfed464]['item']['startIndex']=_0xfed464,_0x124295[_0xfed464]['item']['endIndex']=_0xfed464):('elementStart'===_0x124295[_0xfed464]['type']?_0x124295[_0xfed464]['item']['startIndex']=_0xfed464:'elementEnd'===_0x124295[_0xfed464]['type']&&(_0x124295[_0xfed464]['item']['endIndex']=_0xfed464),_0xb905f1['set'](_0x124295[_0xfed464]['id'],_0xfed464));for(const _0x97f401 of _0xb905f1['values']())'elementStart'===_0x124295[_0x97f401]['type']?_0x124295[_0x97f401]['item']['endIndex']=_0xb905f1['get'](_0x124295[_0x97f401]['pairId']):'elementEnd'===_0x124295[_0x97f401]['type']&&(_0x124295[_0x97f401]['item']['startIndex']=_0xb905f1['get'](_0x124295[_0x97f401]['pairId']));}['_processTape'](_0x265c70){for(let _0x240172=0x0;_0x240172<_0x265c70['length'];_0x240172++){if('elementStart'===_0x265c70[_0x240172]['type'])_0x265c70[_0x240172]['item']['startIndex']=_0x240172;else{if('elementEnd'===_0x265c70[_0x240172]['type']){_0x265c70[_0x240172]['item']['endIndex']=_0x240172;const _0x58c24d=_0x265c70[_0x240172]['item']['startIndex'];_0x265c70[_0x58c24d]['pairId']=_0x265c70[_0x240172]['id'],_0x265c70[_0x240172]['pairId']=_0x265c70[_0x58c24d]['id'];}else _0x265c70[_0x240172]['item']['startIndex']=_0x240172,_0x265c70[_0x240172]['item']['endIndex']=_0x240172,_0x265c70[_0x240172]['pairId']=null;}_0x265c70[_0x240172]['markersStart']||(_0x265c70[_0x240172]['markersStart']=[],_0x265c70[_0x240172]['markersEnd']=[]);}}['_markInsertions'](_0x1d0ba0,_0x218a0e){const _0x591bf5=_0x1d0ba0['filter'](_0x335c01=>!_0x335c01['isAdded']);for(let _0x29a2c1=0x0;_0x29a2c1<_0x218a0e['length'];_0x29a2c1++)_0x218a0e[_0x29a2c1]['isAdded']&&(_0x591bf5[_0x29a2c1]['isAdded']=_0x218a0e[_0x29a2c1]['isAdded']);}['_makeModelFromViewString'](_0x386456){const _0x206160=JSON['parse'](_0x386456),_0x17f477=this['editor']['editing']['view']['document'],_0x44b35b=new _0x1bc3ac(_0x17f477,_0x206160['map'](_0xb460c5=>this['_getViewObj'](_0xb460c5)));return this['editor']['data']['toModel'](_0x44b35b);}['_getViewObj'](_0x588a0e){const _0x1b4fbd=this['editor']['editing']['view']['document'];if('string'==typeof _0x588a0e)return new _0x3abc98(_0x1b4fbd,_0x588a0e);{const _0x2f3b9c=_0x588a0e['children']['map'](_0x331f11=>this['_getViewObj'](_0x331f11));return new(Y[_0x588a0e['type']]||_0x2cf47f)(_0x1b4fbd,_0x588a0e['name'],_0x588a0e['attributes'],_0x2f3b9c);}}['_getDiff'](_0x3bc5ce,_0x413754=null){const _0x535555=this['repository']['getRevision'](_0x3bc5ce),_0x21c026=_0x413754?this['repository']['getRevision'](_0x413754):null,_0x1605e8=this['_getRevisionsRange'](_0x535555,_0x21c026),_0x4e5afb=_0x1605e8[_0x1605e8['length']-0x1],_0x18be02=new Map(),_0x581c79={'model':{},'attributes':{},'changes':[]},_0x2f4466=new Set(),_0x4670eb=new Map();for(let _0x215b8e=_0x1605e8['length']-0x1;_0x215b8e>=0x0;_0x215b8e--){const _0x402563=_0x1605e8[_0x215b8e];for(const _0x5a816f of Object['keys'](_0x402563['diffData']))if(_0x402563['diffData'][_0x5a816f]['attachChange']){const _0x53b1e3=_0x402563['diffData'][_0x5a816f]['attachChange'];_0x53b1e3['isAttached']?(_0x2f4466['add'](_0x5a816f),_0x4670eb['has'](_0x5a816f)&&_0x4670eb['get'](_0x5a816f)['userId']==_0x53b1e3['userId']?_0x4670eb['delete'](_0x5a816f):_0x4670eb['set'](_0x5a816f,_0x53b1e3)):_0x4670eb['has'](_0x5a816f)?(_0x2f4466['delete'](_0x5a816f),_0x4670eb['delete'](_0x5a816f)):(_0x2f4466['add'](_0x5a816f),_0x4670eb['set'](_0x5a816f,_0x53b1e3));}else _0x2f4466['add'](_0x5a816f);}for(const _0x3c8d42 of _0x2f4466){const _0x522b74=_0x4670eb['has'](_0x3c8d42)&&!_0x4670eb['get'](_0x3c8d42)['isAttached'];let _0x4daabe=_0x522b74?_0x1605e8['length']-0x1:0x0;const _0x15daed=_0x522b74?-0x1:0x1;for(;_0x1605e8[_0x4daabe];){const _0x33650e=_0x1605e8[_0x4daabe];if(_0x33650e['diffData'][_0x3c8d42]){const _0x34f9c6=_0x522b74?_0x33650e['diffData'][_0x3c8d42]['attributesBefore']:_0x33650e['diffData'][_0x3c8d42]['attributesAfter'];_0x581c79['attributes'][_0x3c8d42]=_0x34f9c6?_0xac2d02(_0x34f9c6):{};break;}_0x4daabe+=_0x15daed;}}for(const _0x259344 of _0x1605e8){_0x259344['model']={};for(const _0x507989 of _0x259344['authors'])_0x18be02['set'](_0x507989['id'],_0x507989);for(const _0x306bb6 of _0x2f4466){const _0x564de4=_0x259344['diffData'][_0x306bb6]?_0x259344['diffData'][_0x306bb6]['insertions']:'[]',_0x11eeea=_0x259344['diffData'][_0x306bb6]?_0x259344['diffData'][_0x306bb6]['deletions']:'[]';_0x259344['model'][_0x306bb6]={'insertions':this['_makeModelFromViewString'](_0x564de4),'deletions':this['_makeModelFromViewString'](_0x11eeea)};}}for(const _0x17f5e5 of _0x2f4466){let _0x1b990a=null,_0x4fd535=0x0;const _0x17efc8=new Map(Array['from'](_0x535555['model'][_0x17f5e5]['insertions']['markers'])['filter'](([_0x6bbf45])=>!_0x6bbf45['startsWith']('revision:')));let _0x725539=0x0;for(const _0x52141e of _0x1605e8){const _0x4aafd0=this['_makeTape'](_0x52141e['model'][_0x17f5e5]['insertions']);_0x52141e==_0x535555?(_0x1b990a=_0x4aafd0,_0x4fd535=_0x1b990a['length'],_0x1b990a['forEach'](_0x543f34=>{_0x543f34['id']=_0x725539++;}),this['_processTape'](_0x1b990a)):this['_markInsertions'](_0x1b990a,_0x4aafd0);const _0x3365ab=_0x1b990a['filter'](_0x54f578=>!_0x54f578['isAdded'])['map'](_0x5a98ad=>_0x5a98ad['id']);let _0x3907e3=0x0;const _0x38abcd=this['_makeTape'](_0x52141e['model'][_0x17f5e5]['deletions']);_0x38abcd['forEach'](_0x58e010=>{_0x58e010['isRemoved']?_0x58e010['id']=_0x4fd535++:_0x58e010['id']=_0x3365ab[_0x3907e3++];}),this['_processTape'](_0x38abcd),this['_setDistance'](_0x1b990a,'isAdded'),this['_setDistance'](_0x38abcd,'isRemoved'),_0x52141e==_0x535555&&this['_markMarkers'](_0x1b990a,_0x17efc8),_0x1b990a=this['_joinTapes'](_0x1b990a,_0x38abcd),this['_refreshStartEndIndex'](_0x1b990a),this['_setDistance'](_0x1b990a,'isRemoved');}_0x1b990a=_0x1b990a['filter'](_0x4e254c=>!(_0x4e254c['isAdded']&&_0x4e254c['isRemoved']));const _0x3ce2db=new Map(_0x4e5afb['model'][_0x17f5e5]['deletions']['markers']),_0x2968fc=new Set(_0x17efc8['keys']());for(const _0x2a64a0 of _0x3ce2db['keys']())_0x2968fc['delete'](_0x2a64a0);this['_markSuggestions'](_0x1b990a,_0x2968fc),this['_fixObsoleteTags'](_0x1b990a),_0x1b990a=this['_removeMissingPairs'](_0x1b990a),_0x1b990a=this['_markMismatchedRemovedTags'](_0x1b990a),_0x1b990a=this['_removeUnsupportedChanges'](_0x1b990a);const {root:_0x39f977,changes:_0x16fb7d}=this['_makeModelFromTape'](_0x1b990a,_0x18be02,_0x17f5e5);_0x581c79['model'][_0x17f5e5]=_0x39f977;const _0x499f67=_0x4670eb['get'](_0x17f5e5);if(_0x499f67){const _0x1bd681=_0x18be02['get'](_0x499f67['userId']),_0x45031e=new r({'author':_0x1bd681,'type':_0x499f67['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x17f5e5});_0x16fb7d['unshift'](_0x45031e),_0x581c79['attributes'][_0x17f5e5]['revisionHistoryAttachChange']=_0x45031e['id'];}_0x581c79['changes']=_0x581c79['changes']['concat'](_0x16fb7d);}return _0x581c79;}['_markMarkers'](_0x5cc322,_0x5b1250){for(let _0x48d1ea=0x0;_0x48d1ea<_0x5cc322['length'];_0x48d1ea++)for(const [_0x16db00,_0x711fa1]of _0x5b1250)_0x711fa1['start']['isEqual'](_0x5cc322[_0x48d1ea]['previousPosition'])&&_0x5cc322[_0x48d1ea]['markersStart']['push'](_0x16db00),_0x711fa1['end']['isEqual'](_0x5cc322[_0x48d1ea]['nextPosition'])&&_0x5cc322[_0x48d1ea]['markersEnd']['push'](_0x16db00);}['_joinTapes'](_0x1d2e54,_0x2e1191){let _0x556c4b=[],_0x58d7f4=0x0,_0x503b15=0x0;for(;_0x58d7f4<_0x1d2e54['length']||_0x503b15<_0x2e1191['length'];){const _0xbd0924=_0x1d2e54[_0x58d7f4]||{},_0xf472c7=_0x2e1191[_0x503b15]||{};if(_0xbd0924['id']==_0xf472c7['id'])_0x58d7f4++,_0x503b15++,_0x556c4b['push'](_0xbd0924);else{if(_0xf472c7['isRemoved']&&_0xbd0924['isAdded']){const {commonTape:_0x17679d,iEnd:_0x47eb0e,jEnd:_0x54aee1}=this['_threeWayMerge'](_0x1d2e54,_0x58d7f4,_0x2e1191,_0x503b15);_0x556c4b=_0x556c4b['concat'](_0x17679d),_0x58d7f4=_0x47eb0e,_0x503b15=_0x54aee1;}else _0xf472c7['isRemoved']?(_0x503b15++,_0x556c4b['push'](_0xf472c7)):(_0x58d7f4++,_0x556c4b['push'](_0xbd0924));}}return _0x556c4b;}['_markSuggestions'](_0x492a59,_0x4326f5){const _0x558584=[];for(let _0x1f12b0=0x0;_0x1f12b0<_0x492a59['length'];_0x1f12b0++){for(let _0x1f327a=0x0;_0x1f327a<_0x492a59[_0x1f12b0]['markersStart']['length'];_0x1f327a++){const _0x485902=_0x492a59[_0x1f12b0]['markersStart'][_0x1f327a];if(!_0x4326f5['has'](_0x485902))continue;const {group:_0x5b1b1c,type:_0x395aee,authorId:_0x43bdc6}=_0x5aebad(_0x485902);'revision-suggestion'!=_0x5b1b1c||'insertion'!=_0x395aee&&'deletion'!=_0x395aee||(_0x558584['unshift']({'type':_0x395aee,'name':_0x485902,'userId':_0x43bdc6}),_0x492a59[_0x1f12b0]['markersStart']['splice'](_0x1f327a,0x1),_0x1f327a--);}_0x2b189e(_0x492a59[_0x1f12b0]);for(let _0x484417=0x0;_0x484417<_0x492a59[_0x1f12b0]['markersEnd']['length'];_0x484417++){const _0x5bd1f3=_0x492a59[_0x1f12b0]['markersEnd'][_0x484417];if(!_0x4326f5['has'](_0x5bd1f3))continue;const {group:_0x172238,type:_0x16626c}=_0x5aebad(_0x5bd1f3);if('revision-suggestion'!=_0x172238||'insertion'!=_0x16626c&&'deletion'!=_0x16626c)continue;_0x492a59[_0x1f12b0]['markersEnd']['splice'](_0x484417,0x1),_0x484417--;const _0x50040b=_0x558584['findIndex'](_0x46b2f0=>_0x46b2f0['name']==_0x5bd1f3);_0x50040b>-0x1&&_0x558584['splice'](_0x50040b,0x1);}}function _0x5aebad(_0x265562){const _0x7646f4=_0x265562['split'](':');return{'group':_0x7646f4[0x0],'type':_0x7646f4[0x1],'subType':_0x7646f4['length']>=0x5?_0x7646f4[0x2]:null,'id':_0x7646f4['length']<0x5?_0x7646f4[0x2]:_0x7646f4[0x3],'authorId':_0x7646f4['length']<0x5?_0x7646f4[0x3]:_0x7646f4[0x4],'markerCount':0x6==_0x7646f4['length']?_0x7646f4[0x5]:null};}function _0x2b189e(_0x2ff986){for(let _0x4bf7af=0x0;_0x4bf7af<_0x558584['length'];_0x4bf7af++){if(_0x2ff986['isAdded']&&'insertion'==_0x558584[_0x4bf7af]['type'])return _0x2ff986['isAddSuggestion']=_0x558584[_0x4bf7af],void delete _0x2ff986['isAdded'];if(!_0x2ff986['isAdded']&&!_0x2ff986['isRemoved']&&'deletion'==_0x558584[_0x4bf7af]['type'])return void(_0x2ff986['isRemoveSuggestion']=_0x558584[_0x4bf7af]);}}}['_setDistance'](_0x3d81e0,_0x123595){let _0x1729fe=0x0,_0x552ab0=!0x1;const _0x3c810d=new Map();for(const _0x1f2d41 of _0x3d81e0)_0x1f2d41[_0x123595]?_0x552ab0&&(_0x1729fe++,_0x552ab0=!0x1):(_0x1729fe++,_0x552ab0=!0x0),_0x3c810d['set'](_0x1f2d41['id'],_0x1729fe);for(let _0x45f6ce=0x0;_0x45f6ce<_0x3d81e0['length'];_0x45f6ce++){if('isRemoved'==_0x123595&&_0x3d81e0[_0x45f6ce]['isAdded']||'isAdded'==_0x123595&&_0x3d81e0[_0x45f6ce]['isRemoved'])continue;if('text'==_0x3d81e0[_0x45f6ce]['type']){_0x3d81e0[_0x45f6ce]['distance']=0x0;continue;}const _0x4c6482=_0x3c810d['get'](_0x3d81e0[_0x45f6ce]['pairId']),_0x18853f=_0x3c810d['get'](_0x3d81e0[_0x45f6ce]['id']);_0x3d81e0[_0x45f6ce]['distance']=_0x4c6482-_0x18853f;}}['_getRevisionsRange'](_0x14bcfd,_0x4679c5,_0x464477=!0x1){const _0x3d371d=[];let _0x5c8a72=this['repository']['getIndex'](_0x14bcfd),_0x265a07=this['repository']['getIndex'](_0x4679c5);for(-0x1==_0x265a07&&(_0x265a07=this['repository']['_revisions']['length'],_0x464477=!0x1);_0x5c8a72<_0x265a07;)_0x3d371d['push'](this['repository']['getRevision'](_0x5c8a72)),_0x5c8a72++;return _0x464477&&_0x3d371d['push'](this['repository']['getRevision'](_0x5c8a72)),_0x3d371d;}['_threeWayMerge'](_0x4f8606,_0x38b479,_0x223020,_0x2123ab){const _0x2cf5de=this['editor']['model']['schema'];let _0x429261=_0x38b479;for(;_0x4f8606[_0x429261]&&_0x4f8606[_0x429261]['isAdded'];)_0x429261++;let _0x1dd5b7=_0x2123ab;for(;_0x223020[_0x1dd5b7]&&_0x223020[_0x1dd5b7]['isRemoved'];)_0x1dd5b7++;_0x58418d(_0x4f8606,_0x38b479,_0x429261),_0x58418d(_0x223020,_0x2123ab,_0x1dd5b7);const _0x55bc58=_0x223020['slice'](_0x2123ab,_0x1dd5b7)['concat'](_0x4f8606['slice'](_0x38b479,_0x429261));return _0x55bc58['sort']((_0x5989bc,_0x3cffa9)=>_0x5989bc['side']!=_0x3cffa9['side']?_0x5989bc['side']-_0x3cffa9['side']:_0x5989bc['level']!=_0x3cffa9['level']?_0x5989bc['level']-_0x3cffa9['level']:_0x5989bc['distance']!=_0x3cffa9['distance']?_0x3cffa9['distance']-_0x5989bc['distance']:!!_0x5989bc['isAdded']!=!!_0x3cffa9['isAdded']?-0x1==_0x5989bc['side']||0x0==_0x5989bc['side']?_0x5989bc['isAdded']?-0x1:0x1:_0x5989bc['isAdded']?0x1:-0x1:_0x5989bc['index']-_0x3cffa9['index']),{'commonTape':_0x55bc58,'iEnd':_0x429261,'jEnd':_0x1dd5b7};function _0x58418d(_0x478907,_0x3e673b,_0x1f1457){let _0x529e43=-0x1,_0x159e25=Number['POSITIVE_INFINITY'],_0xb75e9d=!0x0;for(let _0x36dafd=_0x3e673b;_0x36dafd<_0x1f1457;_0x36dafd++)if(_0x2cf5de['isInline'](_0x478907[_0x36dafd]['item'])||(_0xb75e9d=!0x1),_0x478907[_0x36dafd]['item']['startIndex']<_0x3e673b&&(_0x529e43=_0x36dafd),_0x478907[_0x36dafd]['item']['endIndex']>=_0x1f1457){_0x159e25=_0x36dafd;break;}_0xb75e9d&&(_0x529e43=_0x1f1457-0x1);for(let _0x8080e1=_0x3e673b;_0x8080e1<_0x1f1457;_0x8080e1++)_0x478907[_0x8080e1]['side']=_0x8080e1<=_0x529e43?-0x1:_0x8080e1<_0x159e25?0x0:0x1,_0x478907[_0x8080e1]['index']=_0x8080e1;let _0x5e598e=0x0;for(let _0x50c339=_0x3e673b;_0x50c339<=_0x529e43;_0x50c339++)0x0==_0x478907[_0x50c339]['distance']?_0x478907[_0x50c339]['level']=_0x5e598e:(_0x5e598e++,_0x478907[_0x50c339]['level']=_0x5e598e,_0x5e598e++);for(let _0x479d0a=_0x3e673b;_0x479d0a<_0x1f1457;_0x479d0a++)0x0==_0x478907[_0x479d0a]['side']&&(_0x478907[_0x479d0a]['level']=_0x5e598e);_0x5e598e=0x0;for(let _0x30a141=_0x1f1457-0x1;_0x30a141>=_0x159e25;_0x30a141--)0x0==_0x478907[_0x30a141]['distance']?_0x478907[_0x30a141]['level']=_0x5e598e:(_0x5e598e--,_0x478907[_0x30a141]['level']=_0x5e598e,_0x5e598e--);}}['_fixObsoleteTags'](_0x3f144b){const _0x5beb1d=new Map(),_0x2761b7=this['editor']['model']['schema'];for(let _0x1f3733=0x1;_0x1f3733<_0x3f144b['length'];_0x1f3733++){let _0x5d8f0c,_0x37fab1,_0x1906b8;const _0x3e2c25=_0x3f144b[_0x1f3733],_0x3341ab=_0x3f144b[_0x1f3733-0x1];if('text'==_0x3e2c25['type'])continue;if(_0x3e2c25['type']!=_0x3341ab['type'])continue;if(!_0x2761b7['isBlock'](_0x3341ab['item'])||_0x2761b7['isLimit'](_0x3341ab['item']))continue;if(!_0x2761b7['isBlock'](_0x3e2c25['item'])||_0x2761b7['isLimit'](_0x3e2c25['item']))continue;if((_0x3f144b[_0x1f3733]['isAdded']||_0x3f144b[_0x1f3733]['isAddSuggestion'])&&_0x3f144b[_0x1f3733-0x1]['isRemoved'])_0x5d8f0c=_0x3f144b[_0x1f3733],_0x37fab1=_0x3f144b[_0x1f3733-0x1],_0x1906b8=_0x1f3733-0x1;else{if(!_0x3f144b[_0x1f3733]['isRemoved']||!_0x3f144b[_0x1f3733-0x1]['isAdded']&&!_0x3f144b[_0x1f3733-0x1]['isAddSuggestion'])continue;_0x5d8f0c=_0x3f144b[_0x1f3733-0x1],_0x37fab1=_0x3f144b[_0x1f3733],_0x1906b8=_0x1f3733;}const _0x41b51d=_0x5d8f0c['level']==_0x37fab1['level'],_0x5504b3=Math['abs'](_0x5d8f0c['level'])<Math['abs'](_0x37fab1['level'])&&0x0==_0x37fab1['distance'];(_0x41b51d||_0x5504b3)&&(_0x5beb1d['set'](_0x37fab1['id'],_0x5d8f0c['id']),_0x3f144b['splice'](_0x1906b8,0x1),_0x1f3733--,_0x5d8f0c['isAdded']=!0x1);}for(let _0x28c514=0x0;_0x28c514<_0x3f144b['length'];_0x28c514++)_0x5beb1d['has'](_0x3f144b[_0x28c514]['pairId'])&&(_0x3f144b[_0x28c514]['pairId']=_0x5beb1d['get'](_0x3f144b[_0x28c514]['pairId']));}['_removeMissingPairs'](_0x5e6c57){const _0x3c3808=new Set(_0x5e6c57['map'](_0x5aeb5f=>_0x5aeb5f['id']));for(let _0x286d36=0x0;_0x286d36<_0x5e6c57['length'];_0x286d36++)_0x3c3808['has'](_0x5e6c57[_0x286d36]['pairId'])||0x0==_0x5e6c57[_0x286d36]['distance']||(_0x5e6c57[_0x286d36]['isIncorrect']=!0x0);return _0x5e6c57['filter'](_0x291804=>!_0x291804['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1f1687){const _0x2e2b8a=new Set();for(let _0x354b56=0x0;_0x354b56<_0x1f1687['length'];_0x354b56++){if(_0x2e2b8a['has'](_0x1f1687[_0x354b56]['id'])&&_0x1f1687[_0x354b56]['isRemoved']&&(_0x1f1687[_0x354b56]['isIncorrect']=!0x0),_0x1f1687[_0x354b56]['isIncorrect'])continue;if(0x0==_0x1f1687[_0x354b56]['distance'])continue;if('elementStart'!=_0x1f1687[_0x354b56]['type'])continue;if(null==_0x1f1687[_0x354b56]['pairId'])continue;let _0x12dedb=_0x354b56+0x1,_0x37131d=0x0;for(;_0x1f1687[_0x12dedb]['id']!=_0x1f1687[_0x354b56]['pairId'];)'elementStart'==_0x1f1687[_0x12dedb]['type']?_0x37131d++:'elementEnd'==_0x1f1687[_0x12dedb]['type']&&_0x37131d--,_0x12dedb++;if(0x0!=_0x37131d){if(_0x1f1687[_0x354b56]['isRemoved'])_0x1f1687[_0x354b56]['isIncorrect']=!0x0;else{for(;_0x12dedb!=_0x354b56;)_0x1f1687[_0x12dedb]['isRemoved']&&0x0!=_0x1f1687[_0x12dedb]['distance']&&(_0x1f1687[_0x12dedb]['isIncorrect']=!0x0,_0x2e2b8a['add'](_0x1f1687[_0x12dedb]['pairId'])),_0x12dedb--;}}}return _0x1f1687['filter'](_0x477776=>!_0x477776['isIncorrect']);}['_removeUnsupportedChanges'](_0x3349b3){const _0x5e7880=this['editor']['model']['schema'];for(let _0x286386=0x0;_0x286386<_0x3349b3['length'];_0x286386++){if(!(_0x3349b3[_0x286386]['isAdded']||_0x3349b3[_0x286386]['isAddSuggestion']||_0x3349b3[_0x286386]['isRemoved']||_0x3349b3[_0x286386]['isRemoveSuggestion']))continue;if(0x0==_0x3349b3[_0x286386]['distance'])continue;const _0x4607c0=_0x3349b3[_0x286386]['item'];_0x5e7880['isBlock'](_0x4607c0)||_0x5e7880['isLimit'](_0x4607c0)||(_0x3349b3[_0x286386]['isAdded']&&delete _0x3349b3[_0x286386]['isAdded'],_0x3349b3[_0x286386]['isAddSuggestion']&&delete _0x3349b3[_0x286386]['isAddSuggestion'],_0x3349b3[_0x286386]['isRemoveSuggestion']&&delete _0x3349b3[_0x286386]['isRemoveSuggestion'],_0x3349b3[_0x286386]['isRemoved']&&(_0x3349b3[_0x286386]['isIncorrect']=!0x0));}return _0x3349b3['filter'](_0x23a93f=>!_0x23a93f['isIncorrect']);}['_makeModelFromTape'](_0x3d4b15,_0xd07225,_0x1a3e5e){const _0x5b81d2=new gt(),_0x20525b=[],_0x52d649=new Map(),_0x5c36ed=this['editor']['model'],_0x41dbb2=_0x5c36ed['schema'],_0x9c7e08=[_0x5b81d2],_0x118179={},_0x529f53={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0xbbaa41=null;const _0x26c893=[0x0];for(let _0x60834f=0x0;_0x60834f<_0x3d4b15['length'];_0x60834f++)if('elementStart'===_0x3d4b15[_0x60834f]['type']){_0x3d4b15[_0x60834f]['previousPosition']=_0x5c36ed['createPositionFromPath'](_0x5b81d2,_0x26c893);const _0x1c4008=new ut(_0x3d4b15[_0x60834f]['item']['name'],_0x3d4b15[_0x60834f]['item']['getAttributes']());_0x9c7e08[0x0]['_appendChild'](_0x1c4008),_0x26c893['push'](0x0),_0x9c7e08['unshift'](_0x1c4008),_0x3d4b15[_0x60834f]['nextPosition']=_0x5c36ed['createPositionFromPath'](_0x5b81d2,_0x26c893);}else'elementEnd'===_0x3d4b15[_0x60834f]['type']?(_0x9c7e08['shift'](),_0x3d4b15[_0x60834f]['previousPosition']=_0x5c36ed['createPositionFromPath'](_0x5b81d2,_0x26c893),_0x26c893['pop'](),_0x26c893[_0x26c893['length']-0x1]++,_0x3d4b15[_0x60834f]['nextPosition']=_0x5c36ed['createPositionFromPath'](_0x5b81d2,_0x26c893)):(_0x3d4b15[_0x60834f]['previousPosition']=_0x5c36ed['createPositionFromPath'](_0x5b81d2,_0x26c893),_0xbbaa41?_0xbbaa41['_data']+=_0x3d4b15[_0x60834f]['item']['data']:_0xbbaa41=new wt(_0x3d4b15[_0x60834f]['item']['data'],_0x3d4b15[_0x60834f]['item']['getAttributes']()),_0x3d4b15[_0x60834f+0x1]&&'text'===_0x3d4b15[_0x60834f+0x1]['type']&&_0x468524(_0xbbaa41,_0x3d4b15[_0x60834f+0x1]['item'])||(_0x9c7e08[0x0]['_appendChild'](_0xbbaa41),_0xbbaa41=null),_0x26c893[_0x26c893['length']-0x1]+=_0x3d4b15[_0x60834f]['item']['offsetSize'],_0x3d4b15[_0x60834f]['nextPosition']=_0x5c36ed['createPositionFromPath'](_0x5b81d2,_0x26c893));for(let _0x4cb994=0x0;_0x4cb994<_0x3d4b15['length'];_0x4cb994++){const _0x450180=_0x3d4b15[_0x4cb994]['previousPosition'],_0x45f1a0=_0x3d4b15[_0x4cb994]['nextPosition'];for(const _0x4050d8 of _0x3d4b15[_0x4cb994]['markersStart'])_0x52d649['set'](_0x4050d8,{'start':_0x450180,'end':null});_0x16c654('isRemoveSuggestion',_0x4cb994,_0x450180,_0x45f1a0),_0x16c654('isAddSuggestion',_0x4cb994,_0x450180,_0x45f1a0),_0x16c654('isRemoved',_0x4cb994,_0x450180,_0x45f1a0),_0x16c654('isAdded',_0x4cb994,_0x450180,_0x45f1a0);for(const _0x16013c of _0x3d4b15[_0x4cb994]['markersEnd']){_0x52d649['get'](_0x16013c)['end']=_0x45f1a0;}}for(const [_0x5d0c90,_0x35168c]of _0x52d649){const _0x5c4f83=this['editor']['model']['createRange'](_0x35168c['start'],_0x35168c['end']);_0x5b81d2['markers']['set'](_0x5d0c90,_0x5c4f83);}return _0x20525b['sort']((_0x5e073e,_0x873c43)=>{const _0xdb0163=_0x5b81d2['markers']['get']('revision:'+_0x5e073e['id']),_0x1b254f=_0x5b81d2['markers']['get']('revision:'+_0x873c43['id']);return _0xdb0163['start']['isBefore'](_0x1b254f['start'])?-0x1:_0xdb0163['start']['isAfter'](_0x1b254f['start'])?0x1:_0xdb0163['end']['isBefore'](_0x1b254f['end'])?-0x1:_0xdb0163['end']['isAfter'](_0x1b254f['end'])?0x1:'add'===_0x5e073e['type']?-0x1:0x1;}),{'root':_0x5b81d2,'changes':_0x20525b};function _0x16c654(_0xa4384b,_0x45b2b9,_0x170477,_0x570b2c){const _0x949863=!!_0x3d4b15[_0x45b2b9][_0xa4384b],_0x12db29=_0x949863?_0x3d4b15[_0x45b2b9][_0xa4384b]['userId']:null,_0x2a68cd=_0x45b2b9===_0x3d4b15['length']-0x1,_0x1bfd77=_0x529f53[_0xa4384b][0x0],_0x24be65=_0x41dbb2['isObject'](_0x3d4b15[_0x45b2b9]['item']);!_0x118179[_0xa4384b]&&_0x949863?_0x118179[_0xa4384b]={'start':_0x170477,'tapeItem':_0x3d4b15[_0x45b2b9],'userId':_0x12db29,'type':_0xa4384b}:_0x118179[_0xa4384b]&&!_0x949863?(_0x118179[_0xa4384b]['end']=_0x170477,_0x42dbb4(_0x118179[_0xa4384b]),_0x118179[_0xa4384b]=null):_0x118179[_0xa4384b]&&_0x949863&&_0x118179[_0xa4384b]['userId']!==_0x12db29&&(_0x118179[_0xa4384b]['end']=_0x170477,_0x1bfd77&&_0x1bfd77['userId']===_0x118179[_0xa4384b]['userId']||_0x42dbb4(_0x118179[_0xa4384b]),_0x118179[_0xa4384b]={'start':_0x170477,'tapeItem':_0x3d4b15[_0x45b2b9],'userId':_0x12db29,'type':_0xa4384b}),_0x118179[_0xa4384b]&&_0x24be65&&('elementStart'!==_0x3d4b15[_0x45b2b9]['type']||_0x1bfd77&&_0x1bfd77['userId']===_0x12db29||_0x529f53[_0xa4384b]['unshift']({'userId':_0x12db29,'object':_0x3d4b15[_0x45b2b9]['item'],'change':_0x118179[_0xa4384b]}),'elementEnd'===_0x3d4b15[_0x45b2b9]['type']&&_0x1bfd77&&_0x1bfd77['object']===_0x3d4b15[_0x45b2b9]['item']&&(_0x529f53[_0xa4384b]['shift'](),_0x118179[_0xa4384b]=_0x1bfd77['change'])),_0x118179[_0xa4384b]&&_0x2a68cd&&(_0x118179[_0xa4384b]['end']=_0x570b2c,_0x42dbb4(_0x118179[_0xa4384b]),_0x118179[_0xa4384b]=null);}function _0x42dbb4({start:_0x24906a,end:_0x242e20,tapeItem:_0x475ceb,userId:_0x2430ef,type:_0x5693f2}){const _0x107076=_0x475ceb['item'],_0x566e5d=_0x5c36ed['schema']['isBlock'](_0x107076)&&!_0x5c36ed['schema']['isLimit'](_0x107076),_0x4f1c04=_0x24906a['nodeAfter']==_0x242e20['parent']&&_0x242e20['isAtStart'];if(_0x566e5d&&_0x4f1c04)return;const _0x5453d8=_0x5c36ed['createRange'](_0x24906a,_0x242e20),_0x56f5e6=_0xd07225['get'](_0x2430ef),_0x7e7199=new r({'author':_0x56f5e6,'type':'isAdded'==_0x5693f2||'isAddSuggestion'==_0x5693f2?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5693f2||'isRemoveSuggestion'==_0x5693f2},'createdAt':new Date(),'rootName':_0x1a3e5e});_0x20525b['push'](_0x7e7199),_0x5b81d2['markers']['set']('revision:'+_0x7e7199['id'],_0x5453d8);}function _0x468524(_0x4ef6d9,_0x4616b8){const _0x4dad7d=_0x4ef6d9['getAttributes'](),_0x471fe7=_0x4616b8['getAttributes']();for(const _0x28c8f3 of _0x4dad7d){if(_0x28c8f3[0x1]!==_0x4616b8['getAttribute'](_0x28c8f3[0x0]))return!0x1;_0x471fe7['next']();}return _0x471fe7['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x125d18=>{const _0x49dc97=_0x125d18['markerName']['split'](':')[0x1],_0x58073f=this['_getChangeFromId'](_0x49dc97);if(!_0x58073f)return null;const _0x3096b4='add'==_0x58073f['type']?'insertion':'deletion',_0x40c5e7=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3096b4];return _0x58073f['data']['isSuggestion']&&_0x40c5e7['push']('ck-suggestion-marker-'+_0x3096b4+'-new'),this['activeChange']==_0x58073f&&_0x40c5e7['push']('ck-suggestion-marker--active'),{'classes':_0x40c5e7,'attributes':{'data-change-id':_0x49dc97}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x3bd9e8=>{_0x3bd9e8['on']('element:pre',(_0x2eea8b,_0x5091ca,_0xb9833c)=>{const _0x34c357=_0x5091ca['viewItem']['getChild'](0x0);if(!_0x34c357||!_0x34c357['is']('element','code'))return;if(!_0xb9833c['consumable']['consume'](_0x34c357,{'attributes':['vid_start','vid_end']}))return;const _0x8f9419=_0x5091ca['modelRange']['start']['nodeAfter'];_0xb9833c['writer']['setAttribute']('vid_start',_0x34c357['getAttribute']('vid_start'),_0x8f9419),_0xb9833c['writer']['setAttribute']('vid_end',_0x34c357['getAttribute']('vid_end'),_0x8f9419);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x2512da=>{_0x2512da['on']('element',(_0x417833,_0x1a66e8,_0x4d857b)=>{if(!_0x4d857b['consumable']['consume'](_0x1a66e8['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1a66e8['modelRange']['isCollapsed'])return;const _0x2a9d9f=_0x1a66e8['modelRange']['start']['nodeAfter'];_0x2a9d9f['hasAttribute']('vid_start')||_0x2a9d9f['hasAttribute']('vid')||(_0x4d857b['writer']['setAttribute']('vid_start',_0x1a66e8['viewItem']['getAttribute']('vid_start'),_0x2a9d9f),_0x4d857b['writer']['setAttribute']('vid_end',_0x1a66e8['viewItem']['getAttribute']('vid_end'),_0x2a9d9f));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x503ce2=>_0x503ce2['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x2ca854,[,_0xd24e61])=>{['vid_start','vid_end','vid']['includes'](_0xd24e61)&&(_0x2ca854['return']=!0x0,_0x2ca854['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2c8bf4=>{_0x2c8bf4['on']('attribute:vid',(_0x155e55,_0x467448,_0x4eb848)=>{if('\x20'!=_0x467448['item']['data']||_0x467448['item']['parent']['maxOffset']>0x1)return;if(!_0x4eb848['consumable']['consume'](_0x467448['item'],_0x155e55['name']))return;const _0x433413=_0x4eb848['writer'],_0x3591a4=_0x4eb848['mapper']['toViewRange'](_0x467448['range']);_0x433413['wrap'](_0x3591a4,_0x433413['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x11f4a9){const _0x2eb842=_0x11f4a9['plugins']['get']('RevisionViewer');return(_0x2cc1bc,_0x3efae5,_0x23f96f)=>{const _0xd127f9=_0x3efae5['markerName']['split'](':')[0x1],_0x5b4f96=_0x2eb842['_getChangeFromId'](_0xd127f9);if(!_0x5b4f96)return null;const _0x3572de='add'==_0x5b4f96['type']?'split':'merge';if(!_0x23f96f['consumable']['test'](_0x3efae5['markerRange'],_0x2cc1bc['name']))return;const _0x1d66b8=_0x3efae5['markerRange']['getWalker'](),_0x2aacaf=_0x3efae5['markerRange']['start'],_0xa60c6b=_0x11f4a9['model']['schema'];let _0x35487b=null,_0x1b677b=null,_0x371223=!0x1,_0x3fdb5c=!0x1;for(const _0x4519e6 of _0x1d66b8){const _0x22e8e8=_0x4519e6['item'];_0x371223=_0x371223||_0xa60c6b['isContent'](_0x22e8e8);const _0x1498d0=_0x23f96f['mapper']['toViewElement'](_0x22e8e8);if(_0x1498d0&&_0x1498d0['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4519e6['type']&&(_0xa60c6b['isBlock'](_0x22e8e8)&&!_0xa60c6b['isLimit'](_0x22e8e8)&&(_0x22e8e8['nextSibling']||_0x2aacaf['isAtEnd']?_0x35487b&&_0x35487b['parent']==_0x22e8e8||(_0x35487b=_0x22e8e8,_0x2a19d5(_0x4519e6['previousPosition']),_0x3fdb5c=!0x0):_0x1b677b=_0x1b677b||_0x4519e6['previousPosition']));}function _0x2a19d5(_0x3e5b4c){const _0xdc3cce=_0x23f96f['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3572de}),_0x476e77=_0x23f96f['mapper']['toViewPosition'](_0x3e5b4c);_0x5b4f96['data']['isSuggestion']&&_0x23f96f['writer']['addClass']('ck-suggestion-marker-'+_0x3572de+'-new',_0xdc3cce),_0x2eb842['activeChange']==_0x5b4f96&&_0x23f96f['writer']['addClass']('ck-suggestion-marker--active',_0xdc3cce),_0x23f96f['writer']['insert'](_0x476e77,_0xdc3cce),_0x23f96f['mapper']['bindElementToMarker'](_0xdc3cce,_0x3efae5['markerName']);}_0x371223||_0x3fdb5c||!_0x1b677b||_0x2a19d5(_0x1b677b);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x502908,_0x2c1b0f,_0x38a1c4)=>{const _0x340289=_0x38a1c4['mapper']['markerNameToElements'](_0x2c1b0f['markerName']);if(_0x340289){for(const _0x38c7d7 of _0x340289)(_0x38c7d7['hasClass']('ck-suggestion-marker-split')||_0x38c7d7['hasClass']('ck-suggestion-marker-merge'))&&(_0x38a1c4['mapper']['unbindElementFromMarkerName'](_0x38c7d7,_0x2c1b0f['markerName']),_0x38a1c4['writer']['remove'](_0x38c7d7));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x496fc4,_0x136654,_0x202d9a)=>{const _0x541338=_0x136654['markerName']['split'](':')[0x1],_0x13eeb0=this['_getChangeFromId'](_0x541338);if(!_0x13eeb0)return null;const _0x4e2c29='add'==_0x13eeb0['type']?'split':'merge';if(_0x202d9a['consumable']['test'](_0x136654['markerRange'],_0x496fc4['name']))for(const _0x57b6e4 of _0x136654['markerRange']['getItems']()){if(!_0x57b6e4['is']('element','softBreak'))continue;const _0x3ba2e6=_0x202d9a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4e2c29}),_0x186804=_0x202d9a['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x57b6e4));_0x13eeb0['data']['isSuggestion']&&_0x202d9a['writer']['addClass']('ck-suggestion-marker-'+_0x4e2c29+'-new',_0x3ba2e6),this['activeChange']==_0x13eeb0&&_0x202d9a['writer']['addClass']('ck-suggestion-marker--active',_0x3ba2e6),_0x202d9a['writer']['insert'](_0x186804,_0x3ba2e6),_0x202d9a['mapper']['bindElementToMarker'](_0x3ba2e6,_0x136654['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x1029cb=>{for(const _0x3cf51d of this['editor']['model']['document']['getRootNames']()){const _0x1adfbf=this['editor']['model']['document']['getRoot'](_0x3cf51d),_0x37a231=this['editor']['editing']['view']['document']['getRoot'](_0x3cf51d);if(_0x37a231){const _0x556cfb=_0x1adfbf['getAttribute']('revisionHistoryAttachChange');if(_0x1029cb['removeAttribute']('data-change-id',_0x37a231),_0x1029cb['removeClass']('ck-revision-history-root-add',_0x37a231),_0x1029cb['removeClass']('ck-revision-history-root-remove',_0x37a231),_0x1029cb['removeClass']('ck-revision-history-root--active',_0x37a231),_0x556cfb){const _0x471dd5=this['_getChangeFromId'](_0x556cfb);if(!_0x471dd5)return null;_0x1029cb['setAttribute']('data-change-id',_0x556cfb,_0x37a231),_0x1029cb['addClass']('ck-revision-history-root-'+_0x471dd5['type'],_0x37a231),this['activeChange']==_0x471dd5&&_0x1029cb['addClass']('ck-revision-history-root--active',_0x37a231);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4fd709=>'revision-comment:'+_0x4fd709,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x5aa8bf=>'revision-suggestion:'+_0x5aa8bf,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2035bd=>({'name':'suggestion:'+_0x2035bd,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x37edef=>{const _0x2e2325=_0x37edef['markerName']['split'](':')[0x1];return'insertion'!=_0x2e2325&&'deletion'!=_0x2e2325?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x2e2325]};}}),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',(_0x3c9860,_0xd6fb7b,_0x3857f7)=>{const _0x41cec4=_0x3857f7['mapper']['markerNameToElements'](_0xd6fb7b['markerName']);if(_0x41cec4){for(const _0x2a39ba of _0x41cec4)_0x2a39ba['is']('uiElement')&&(_0x3857f7['mapper']['unbindElementFromMarkerName'](_0x2a39ba,_0xd6fb7b['markerName']),_0x3857f7['writer']['remove'](_0x2a39ba));}},{'priority':'high'});}['_getChangeFromId'](_0x53dd2f){return this['_changeIdToChange']['get'](_0x53dd2f);}['_getViewForChange'](_0x5a5112){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x5a5112),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x28923b,_0x33f0cc,_0x1e392f,_0x427e9e)=>{_0x427e9e&&this['_balloon']['remove'](_0x427e9e),_0x1e392f&&(this['_balloon']['add']({'view':_0x1e392f,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x5ebcc3=this['editor']['editing'],_0x457f1f=this['_getChangeFromId'](_0x1e392f['changeId']);let _0x11ce12;if(_0x457f1f['data']['isOnRoot']){const _0x2a0e19=_0x5ebcc3['view']['getDomRoot'](_0x457f1f['rootName']);_0x11ce12=Array['from'](_0x2a0e19['getClientRects']());}else{const _0x2eddd1=this['editor']['model']['markers']['get']('revision:'+_0x1e392f['changeId']);_0x11ce12=Array['from'](_0x5ebcc3['mapper']['markerNameToElements'](_0x2eddd1['name']))['map'](_0x30afad=>_0x5ebcc3['view']['domConverter']['mapViewToDom'](_0x30afad))['map'](_0x3c4582=>Array['from'](_0x3c4582['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x11ce12[0x0];return _0x11ce12['find'](_0x4b82b1=>_0x4b82b1['top']-0x3<=this['_activeViewTarget']['y']&&_0x4b82b1['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x4b82b1['left']-0x3<=this['_activeViewTarget']['x']&&_0x4b82b1['right']+0x3>=this['_activeViewTarget']['x'])||_0x11ce12[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x6cbdfc,_0x3ffc1c,_0x1ab8ba,_0x328e01)=>{this['activeView']=_0x1ab8ba?this['_getViewForChange'](_0x1ab8ba):null,this['editor']['model']['change'](()=>{const _0x3b9792=this['editor']['editing'];_0x328e01&&(_0x328e01['data']['isOnRoot']?_0x3b9792['view']['change'](_0x2b95d0=>{_0x2b95d0['removeClass']('ck-revision-history-root--active',_0x3b9792['view']['document']['getRoot'](_0x328e01['rootName']));}):_0x3b9792['reconvertMarker']('revision:'+_0x328e01['id'])),_0x1ab8ba&&(_0x1ab8ba['data']['isOnRoot']?_0x3b9792['view']['change'](_0x19e0a6=>{_0x19e0a6['addClass']('ck-revision-history-root--active',_0x3b9792['view']['document']['getRoot'](_0x1ab8ba['rootName']));}):_0x3b9792['reconvertMarker']('revision:'+_0x1ab8ba['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x4e44a5,_0x3ff47e)=>{if(this['activeChange'])return;const _0x49703d=this['_findChangeIdFromDomTarget'](_0x3ff47e['target']),_0x362a4a=this['_changeIdToChange']['get'](_0x49703d);_0x362a4a?(this['_activeViewTarget']={'x':_0x3ff47e['domEvent']['x'],'y':_0x3ff47e['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x362a4a)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4a8ec4,_0x51212b)=>{const _0x116674=this['_findChangeIdFromDomTarget'](_0x51212b['target']),_0x3c7c77=this['_changeIdToChange']['get'](_0x116674);_0x3c7c77?(this['_activeViewTarget']={'x':_0x51212b['domEvent']['x'],'y':_0x51212b['domEvent']['y']},_0x3c7c77===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x3c7c77):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x252e91){do{const _0x29859b=_0x252e91['getAttribute']('data-change-id');if(_0x29859b)return _0x29859b;_0x252e91=_0x252e91['parent'];}while(_0x252e91);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x236712=>{for(const _0xd85d21 of this['editor']['model']['markers'])_0x236712['removeMarker'](_0xd85d21);});}}function Z(_0x118d86,_0x13f59d){return(_0x1386c9,_0x475434,_0x26e20d)=>{if(!_0x26e20d['consumable']['test'](_0x475434['markerRange'],_0x1386c9['name']))return;const _0x2c8254=_0x475434['markerRange']['getWalker'](),_0x553dd7=_0x475434['markerRange']['start'],_0x2a2243=_0x118d86['model']['schema'];let _0x10c0e0=null,_0x21e00f=null,_0x24166d=!0x1,_0x15c716=!0x1;for(const _0x55fe0a of _0x2c8254){const _0xd0db2c=_0x55fe0a['item'];_0x24166d=_0x24166d||_0x2a2243['isContent'](_0xd0db2c);const _0x3100d1=_0x26e20d['mapper']['toViewElement'](_0xd0db2c);if(_0x3100d1&&_0x3100d1['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x55fe0a['type']&&(_0x2a2243['isBlock'](_0xd0db2c)&&!_0x2a2243['isLimit'](_0xd0db2c)&&(_0xd0db2c['nextSibling']||_0x553dd7['isAtEnd']?_0x10c0e0&&_0x10c0e0['parent']==_0xd0db2c||(_0x10c0e0=_0xd0db2c,_0x4489e1(_0x55fe0a['previousPosition']),_0x15c716=!0x0):_0x21e00f=_0x21e00f||_0x55fe0a['previousPosition']));}function _0x4489e1(_0x80f3b){const _0x421039=_0x26e20d['mapper']['toViewPosition'](_0x80f3b),_0xda2583=_0x26e20d['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x13f59d});_0x26e20d['writer']['insert'](_0x421039,_0xda2583),_0x26e20d['mapper']['bindElementToMarker'](_0xda2583,_0x475434['markerName']);}_0x24166d||_0x15c716||!_0x21e00f||_0x4489e1(_0x21e00f);};}class _t extends _0x5d82cf{constructor(_0x401d34){super(_0x401d34);const _0x305433=_0x401d34['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x305433,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x305433,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x5efa44=this['editor'],_0x3392ba=_0x5efa44['plugins']['get'](d),_0x259f1d=_0x3392ba['isReady']?_0x3392ba['diff']['newRevisionId']:null;_0x5efa44['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x259f1d);}['refresh'](){const {isReady:_0x36afa7,isEnabled:_0x101e2a,repository:_0x4b3f0b,diff:_0x6e00bf}=this['editor']['plugins']['get'](d),_0x25aca3=_0x6e00bf&&_0x4b3f0b['getLaterVisibleRevision'](_0x6e00bf['newRevisionId']);this['isEnabled']=_0x36afa7&&_0x101e2a&&Boolean(_0x25aca3);}}class yt extends _0x5d82cf{['_step'];constructor(_0x2b3dec,{direction:_0x15d239}){super(_0x2b3dec);const _0x4e3c49=_0x2b3dec['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x15d239?0x1:-0x1,this['listenTo'](_0x4e3c49,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4e3c49,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4e3c49,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2b9bde=this['editor'],_0x1db75f=_0x2b9bde['plugins']['get'](d),{isNavigationMode:_0xcc148c,currentChangeNumber:_0x5d47b2}=_0x1db75f;let _0x28e7f9;if(_0x1db75f['activeChange']=_0xcc148c?_0x1db75f['diff']['changes']['get'](_0x5d47b2+this['_step']):_0x1db75f['diff']['changes']['first'],_0x1db75f['activeChange']['data']['isOnRoot'])_0x28e7f9=_0x2b9bde['editing']['view']['getDomRoot'](_0x1db75f['activeChange']['rootName']);else{const _0x358333=_0x2b9bde['model']['markers']['get']('revision:'+_0x1db75f['activeChange']['id']);_0x28e7f9=_0x4184eb(_0x2b9bde['editing'],_0x358333);}_0x3e9bd5({'target':_0x28e7f9,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x6ed828,currentChangeNumber:_0x44eb9c,numberOfChanges:_0x114540,isReady:_0x4d3fcd,isEnabled:_0x5f1639}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x5f1639&&_0x4d3fcd&&_0x114540)&&(!_0x6ed828||(0x1===this['_step']?_0x44eb9c<_0x114540-0x1:_0x44eb9c>0x0));}}class _i extends _0xd5e275{constructor(_0x2cdb40){super(_0x2cdb40);const _0x7d6988=this['bindTemplate'],_0x2553ac=new _0x18c990(_0x2cdb40),_0x5b8e13=new _0x18c990(_0x2cdb40);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',(_0x3783de,_0x245162)=>_0x3783de&&_0x245162>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x573594,_0x48f232,_0x359290,_0x33d518)=>{if(!_0x573594)return m(_0x2cdb40,'Loading...');if(!_0x359290)return m(_0x2cdb40,'No\x20changes');const _0x5a3bd2=m(_0x2cdb40,'NUMBER_OF_CHANGES',_0x359290);return _0x33d518?m(_0x2cdb40,'X_OF_Y_CHANGES',[_0x48f232+0x1,_0x359290]):_0x5a3bd2;}),_0x2553ac['set']({'label':m(_0x2cdb40,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x58959a}),_0x5b8e13['set']({'label':m(_0x2cdb40,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x5caeeb}),_0x2553ac['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5b8e13['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2553ac['on']('execute',()=>this['fire']('execute','backward')),_0x5b8e13['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',_0x7d6988['if']('_isStatusLabelVisible','ck-hidden',_0xab2280=>!_0xab2280)]},'children':[{'text':_0x7d6988['to']('isNavigationMode',_0x2f479f=>_0x2f479f?m(_0x2cdb40,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x2cdb40,'Total')+':\x20')}]},{'text':_0x7d6988['to']('_statusText')}]},new _0x1cc786(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2553ac,_0x5b8e13]}]});}}const ee='ck-editor__editable__loading-overlay';class ie extends _0x14d729{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x11ad3a=this['editor']['editing']['view'];_0x11ad3a['change'](_0x94065d=>{for(const _0x382303 of _0x11ad3a['document']['roots'])_0x94065d['addClass'](ee,_0x382303);});}['hide'](){const _0x165eeb=this['editor']['editing']['view'];_0x165eeb['change'](_0x176a25=>{for(const _0x103503 of _0x165eeb['document']['roots'])_0x176a25['removeClass'](ee,_0x103503);});}}class w extends _0x14d729{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ie];}['init'](){const _0x356171=this['editor'],_0x1b1e3c=_0x356171['plugins']['get'](d),_0x4d363e=_0x356171['plugins']['get'](ie);_0x356171['ui']['componentFactory']['add']('exitToEditing',_0x30426c=>{const _0x4d9970=new _0x18c990(_0x30426c);return _0x4d9970['set']({'label':m(_0x30426c,'Back\x20to\x20editing'),'icon':te,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x4d9970,'execute',()=>{_0x356171['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x4d9970;}),_0x356171['ui']['componentFactory']['add']('restoreRevision',_0x2b9497=>{const _0x4045f1=new _0x18c990(_0x2b9497);return _0x4045f1['set']({'label':m(_0x2b9497,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4045f1['bind']('isEnabled')['to'](_0x356171['commands']['get']('restoreRevision')),this['listenTo'](_0x4045f1,'execute',()=>_0x356171['execute']('restoreRevision')),_0x4045f1;}),_0x356171['ui']['componentFactory']['add']('changesNavigation',_0x4cd60c=>{const _0x2f4817=new _i(_0x4cd60c),_0x4a95fd=_0x356171['commands']['get']('showPreviousChange'),_0x1f8144=_0x356171['commands']['get']('showNextChange');return _0x2f4817['bind']('isBackwardNavigationEnabled')['to'](_0x4a95fd,'isEnabled'),_0x2f4817['bind']('isForwardNavigationEnabled')['to'](_0x1f8144,'isEnabled'),_0x2f4817['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1b1e3c),this['listenTo'](_0x2f4817,'execute',(_0x23684,_0x2f79cd)=>{_0x356171['execute']('forward'===_0x2f79cd?'showNextChange':'showPreviousChange');}),_0x2f4817;}),_0x4d363e['show'](),_0x1b1e3c['on']('change:isReady',(_0x1bc043,_0x3649d4,_0x3c020c)=>{_0x3c020c?_0x4d363e['hide']():_0x4d363e['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x1fe5b1,_0x1e5e62){super(_0x1fe5b1,_0x1e5e62);const _0x1ad8c1=this['bindTemplate'];this['set']({'label':m(_0x1fe5b1,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x1fe5b1,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x1ad8c1['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 _0x100bc7=this['fieldView']['element'];this['_tooltipString']=_0x100bc7['scrollWidth']>_0x100bc7['clientWidth']&&_0x100bc7['value']||'';}}class oi extends _0xd5e275{constructor(_0x1ec721,_0x5b8eb3,_0x379d2c){super(_0x1ec721);const _0x4f0e0a=new _0x43ad7e();_0x4f0e0a['set']({'content':_0x1d673e,'viewBox':'0\x200\x2011\x2010'});const _0x24692a=['ck','ck-revision-history-sidebar__revision-author'];_0x379d2c&&_0x24692a['push']('ck-revision-history-sidebar__revision-author_creator');const _0x380ac5=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x1ec721,_0x379d2c?'Revision\x20creator':'Revision\x20author')},'children':[_0x4f0e0a,_0x5b8eb3['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x24692a},'children':_0x380ac5});}}function ni(_0x58a468,_0x34ebc5){const _0xa2da70=_0x58a468['bindTemplate'],_0x15d91c=_0x58a468['locale'],_0x5844fe=_0x49d6ff(_0x15d91c);_0x5844fe['panelPosition']='sw';const _0x1c7189=function(_0x585085,_0x4701f1){const _0x53d9fe=function(_0xa61bb6,_0x3af8b9){const _0x5820dd=_0xa61bb6['locale'],_0x591c36={'Compare\x20against\x20selected':m(_0x5820dd,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x5820dd,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x5820dd,'Restore\x20this\x20revision')};return _0x3af8b9['map'](_0x515ed3=>{const _0x45239f=_0x591c36[_0x515ed3['name']];return _0x45239f&&_0x45239f!==_0x515ed3['name']&&(_0x515ed3['name']=_0x45239f),_0x515ed3;});}(_0x585085,_0x4701f1),_0x3ee823=new _0x155967();for(const _0x32c580 of _0x53d9fe){const _0x4293e6={'type':'button','model':new to({'label':_0x32c580['name'],'class':_0x32c580['class'],'withText':!0x0,'role':'menuitem','_action':_0x32c580['action']})};_0x4293e6['model']['bind']('isEnabled')['to'](_0x585085,'isActionsDropdownOpen',_0x1935aa=>'function'!=typeof _0x32c580['isEnabled']||(!_0x1935aa||_0x32c580['isEnabled'](_0x585085))),_0x3ee823['add'](_0x4293e6);}return _0x3ee823;}(_0x58a468,_0x34ebc5);return _0x58a468['bind']('isActionsDropdownOpen')['to'](_0x5844fe,'isOpen'),_0x5844fe['buttonView']['set']({'label':m(_0x15d91c,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x9148f5}),_0x5844fe['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0xa2da70['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0xa2da70['to'](_0x3353bc=>_0x3353bc['stopPropagation']())}}),_0x5844fe['on']('execute',_0x3f3ab1=>{_0x58a468['isReady']&&'function'==typeof _0x3f3ab1['source']['_action']&&_0x3f3ab1['source']['_action'](_0x58a468);}),_0x878981(_0x5844fe,_0x1c7189,{'role':'menu'}),_0x5844fe['listenTo'](_0x58a468,'change:isActionsDropdownOpen',(_0xffa2e6,_0x5d61e2,_0x5f1850)=>{if(_0x5f1850)for(const _0x4997ff of _0x5844fe['listView']['items']){const _0x1730d6=_0x4997ff['children']['first'],_0x345ab1=_0x34ebc5['find'](_0x5cf3ab=>_0x5cf3ab['action']===_0x1730d6['_action'])['isVisible'];_0x4997ff['isVisible']=void 0x0===_0x345ab1||_0x345ab1(_0x58a468);}}),_0x5844fe;}class ai extends/* #__PURE__ -- @preserve */
26
- _0x57b214(_0xd5e275){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x1c9a6d,_0x2fbe29,_0x4618bd,_0x5e2e07){super(_0x1c9a6d);const _0xf1deda=this['bindTemplate'],_0x398f80=function(_0x345e4c,_0xdb5560){const _0x4c65cc=Array['from'](_0xdb5560['authors'])['filter'](_0x4d1084=>_0x4d1084!=_0xdb5560['creator']);return _0xdb5560['creator']&&_0x4c65cc['unshift'](_0xdb5560['creator']),_0x4c65cc['map'](_0x32dfea=>new oi(_0x345e4c,_0x32dfea,_0x32dfea==_0xdb5560['creator']));}(_0x1c9a6d,_0x2fbe29);this['id']=_0x2fbe29['id'],this['_revision']=_0x2fbe29,this['_requireRevisionName']=_0x5e2e07,this['bind']('name','createdAt')['to'](_0x2fbe29),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x4fdd5a=>{return _0x1f0f98=_0x1c9a6d['uiLanguage'],(_0xc22f67=_0x4fdd5a)['toLocaleDateString'](_0x1f0f98,{'month':'long','day':'numeric'})+',\x20'+_0xc22f67['toLocaleTimeString'](_0x1f0f98,{'hour':'numeric','minute':'numeric'});var _0x1f0f98,_0xc22f67;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new mt(_0x1c9a6d,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x21d3c9=>_0x21d3c9||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x4264fe,_0x27ddf)=>_0x4264fe&&_0x27ddf),this['revisionActionsView']=_0x4618bd&&_0x4618bd['length']?ni(this,_0x4618bd):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xf1deda['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xf1deda['if']('isEnabled','ck-disabled',_0x2ad9b7=>!_0x2ad9b7),_0xf1deda['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xf1deda['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xf1deda['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':_0xf1deda['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':_0x398f80}]},this['revisionActionsView']],'on':{'click':_0xf1deda['to'](_0x59d0a3=>{_0x59d0a3['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x43f539=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x43f539,'change',()=>{this['_requireRevisionName']&&!_0x43f539['value']||this['fire']('setName',{'id':this['id'],'name':_0x43f539['value']}),_0x43f539['value']||(_0x43f539['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function mi(_0x511ba5,_0x219b69){const _0x1aacf9=_0x314ab0['fromJSDate'](_0x511ba5)['setLocale'](_0x219b69),_0x2e71d6=_0x314ab0['local'](),_0x1bca9b=_0x2e71d6['minus']({'days':0x1})['startOf']('day');let _0x121c9f,_0x406552;return _0x1aacf9['hasSame'](_0x2e71d6,'day')?(_0x121c9f=_0x1aacf9['startOf']('day')['toJSDate'](),_0x406552=_0x1aacf9['toRelativeCalendar']()):_0x1aacf9['hasSame'](_0x1bca9b,'day')?(_0x121c9f=_0x1bca9b['toJSDate'](),_0x406552=_0x1aacf9['toRelativeCalendar']()):_0x1aacf9['hasSame'](_0x2e71d6,'week')?(_0x121c9f=_0x1aacf9['startOf']('week')['toJSDate'](),_0x406552=_0x1aacf9['weekdayLong']||''):_0x1aacf9['hasSame'](_0x2e71d6,'year')?(_0x121c9f=_0x1aacf9['startOf']('month')['toJSDate'](),_0x406552=_0x1aacf9['monthLong']||''):(_0x121c9f=_0x1aacf9['startOf']('year')['toJSDate'](),_0x406552=String(_0x1aacf9['year'])),{'startDate':_0x121c9f,'localizedPeriodName':_0x406552};}class pi extends _0xd5e275{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x268314,_0xc5ae9b,_0xeefd5d,_0x2b315){super(_0x268314);const _0x4b9110=mi(_0xc5ae9b,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0xc5ae9b,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xeefd5d,this['_requireRevisionName']=_0x2b315,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':_0x4b9110}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x1e7f99){const _0x3f3516=new ai(this['locale'],_0x1e7f99,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x3f3516);}['removeRevision'](_0x14fccf){const _0x2158ef=this['revisionViews']['find'](_0x5be3cf=>_0x5be3cf['id']===_0x14fccf['id']);this['revisionViews']['remove'](_0x2158ef);}}class as extends _0xd5e275{constructor(_0x470ba1){super(_0x470ba1);const _0x27924a=new _0x43ad7e();_0x27924a['content']=_0x409341,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x27924a,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x470ba1,'Revision\x20history')]}]});}}class vi extends _0xd5e275{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2c4b16,_0x2ecbf5,_0x636ce9,_0x2e6896){super(_0x2c4b16);const _0x6c5197=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x2ecbf5,this['_revisionActions']=_0x636ce9,this['_requireRevisionName']=_0x2e6896,this['on']('select',(_0x554008,_0x4904eb)=>{this['fire']('revisionSelected',_0x4904eb);}),this['on']('setName',(_0x368af0,_0x43418b)=>{this['fire']('revisionSetName',_0x43418b);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x2c4b16),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x6c5197['if']('isEnabled','ck-disabled',_0x525e94=>!_0x525e94)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x2317f8 of this['_revisions'])this['_addRevision'](_0x2317f8);this['_revisions']['on']('add',(_0x28b51c,_0x5dcd51)=>{this['_addRevision'](_0x5dcd51);}),this['_revisions']['on']('remove',(_0xc15ecc,_0x408dea)=>{this['_removeRevision'](_0x408dea);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x23d838=>_0x23d838['revisionViews']['map'](_0x5027a8=>_0x5027a8))['flat']();}['selectRevision'](_0xfbfe39){for(const _0x49dc75 of this['revisionViews'])_0xfbfe39&&_0xfbfe39['id']===_0x49dc75['id']?_0x49dc75['select']():_0x49dc75['deselect']();}['highlightRevisions'](_0x56eadd){for(const _0x92bcc1 of this['revisionViews'])_0x56eadd['some'](({id:_0x41750a})=>_0x41750a===_0x92bcc1['id'])?_0x92bcc1['highlight']():_0x92bcc1['unhighlight']();}['_addRevision'](_0x4bf8ef){const _0x50bb0e=mi(_0x4bf8ef['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x576dab=this['timePeriodViews']['get'](0x0);_0x576dab&&_0x576dab['startDate']['getTime']()===_0x50bb0e['getTime']()||(_0x576dab=new pi(this['locale'],_0x50bb0e,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x576dab)),_0x576dab['addRevision'](_0x4bf8ef);}['_removeRevision'](_0x37f715){const _0x4b4171=mi(_0x37f715['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4b4171)['removeRevision'](_0x37f715);}['_getTimePeriodViewByStartDate'](_0x4cf580){return this['timePeriodViews']['find'](_0x56126e=>_0x56126e['startDate']['getTime']()===_0x4cf580['getTime']());}}class g extends _0x14d729{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x2efc47,uid as _0x370f5b,Collection as _0x1aa1e7,logWarning as _0x32af2b,FocusTracker as _0x4cb843,KeystrokeHandler as _0x162a7a,scrollViewportToShowTarget as _0x215337,ResizeObserver as nt,ElementReplacer as ht,CKEditorError as _0x163bce}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x3bebdd,set as _0x3e4587,unset as _0x4ae894,isEqual as _0x48fe1a}from'lodash-es';import{Plugin as _0x3494fb,PendingActions as _0x23a927,icons as _0x351c88,Command as _0x408465,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x550701,getMarkerDomElement as _0x514c98,ConfirmMixin as ti,sanitizeEditorConfig as _0x333288}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x2c3601,Element as ft,Range as vt,ViewUIElement as _0x10755e,ViewRawElement as _0x156c3d,ViewEmptyElement as _0x55b6d9,ViewAttributeElement as _0x21393e,ViewContainerElement as _0x4085a3,Position as gt,ViewText as _0x6c429f,ViewElement as _0xcb3cb1,DocumentFragment as mt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x52e3fd,submitHandler as _0x4d8186,LabeledFieldView as _0x3701ba,createLabeledInputText as _0x21eb44,createDropdown as _0x31f333,ListView as _0x3be14a,ListItemView as _0x37fdfc,ButtonView as te,MenuBarMenuView as _0x3f9623,MenuBarMenuListView as _0x2db903,MenuBarMenuListItemView as _0x265cfc,MenuBarMenuListItemButtonView as _0x2a0176,ContextualBalloon as _0x5233a0,ToolbarSeparatorView as _0x353fcd,IconView as _0x4a8f8b,addListToDropdown as to,ViewModel as _0x4da109,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 _0x318ce4}from'luxon';class a extends/* #__PURE__ -- @preserve */
24
+ _0x2efc47(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x369620){super(),this['id']=_0x369620['id']||_0x370f5b(),this['creator']=_0x369620['creator']||null,this['authors']=_0x369620['authors']||[],this['diffData']=_0x369620['diffData']||null,this['toVersion']=_0x369620['toVersion']||0x0,this['fromVersion']=_0x369620['fromVersion']||0x0,this['set']('name',_0x369620['name']||''),this['set']('createdAt',_0x369620['createdAt']||new Date()),this['set']('attributes',_0x369620['attributes']||{});}['setName'](_0x648317){this['_update']({'name':_0x648317});}['setAttribute'](_0x15daf6,_0x3c94fd){const _0x439bb9=_0x3bebdd(this['attributes']);_0x3e4587(_0x439bb9,_0x15daf6,_0x3c94fd),this['_update']({'attributes':_0x439bb9});}['removeAttribute'](_0xdec1c2){const _0x22434a=_0x3bebdd(this['attributes']);_0x4ae894(_0x22434a,_0xdec1c2),this['_update']({'attributes':_0x22434a});}['_update'](_0x2abf9f,_0x59fce8=!0x1){let _0x3d9067=!0x1;const _0x408f64={'id':this['id']},_0x5472a1=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x37ac1e of _0x5472a1){const _0x5c7246=_0x2abf9f[_0x37ac1e];void 0x0!==_0x5c7246&&_0x5c7246!==this[_0x37ac1e]&&(this[_0x37ac1e]=_0x5c7246,_0x408f64[_0x37ac1e]=_0x5c7246,_0x3d9067=!0x0);}_0x3d9067&&(_0x408f64['authors']&&(_0x408f64['authorsIds']=_0x408f64['authors']['map'](_0x29d2f4=>_0x29d2f4['id']),delete _0x408f64['authors']),this['fire']('_update',_0x408f64,_0x59fce8));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x7161a=>_0x7161a['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x3494fb{['_revisions'];static get['requires'](){return[_0x550701];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1b53f6){super(_0x1b53f6),this['_revisions']=new _0x1aa1e7();}['afterInit'](){!async function(_0x3063fc){const _0x48cd43=_0x3980b9([0x68,0x4f,0x31,0x74,0x52,0x44,0x50,0x45,0x6e,0x4d,0x4c,0x34,0x33,0x37,0x65,0x54,0x32,0x72,0x48,0x67,0x71,0x51,0x6d,0x30,0x56,0x47,0x46,0x69,0x59,0x62,0x55,0x73,0x7a,0x58,0x6a,0x70,0x79,0x41,0x64,0x76,0x4e,0x6b,0x61,0x43,0x75,0x6c,0x63,0x4a,0x78,0x66,0x38,0x57,0x42,0x36,0x35,0x6f,0x5a,0x39,0x53,0x77,0x4b,0x49]),_0x598057=0xeb829,_0x388aba=0x57f18261,_0x46a0e3=0x57f6ddb9^_0x388aba,_0x536f04=window[_0x3980b9([0x44,0x61,0x74,0x65])][_0x3980b9([0x6e,0x6f,0x77])](),_0x23e6ae=_0x3063fc[_0x3980b9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3f08ca=new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b6136=>{_0x23e6ae[_0x3980b9([0x6f,0x6e,0x63,0x65])](_0x3980b9([0x72,0x65,0x61,0x64,0x79]),_0x3b6136);}),_0x3264e3={[_0x3980b9([0x6b,0x74,0x79])]:_0x3980b9([0x45,0x43]),[_0x3980b9([0x75,0x73,0x65])]:_0x3980b9([0x73,0x69,0x67]),[_0x3980b9([0x63,0x72,0x76])]:_0x3980b9([0x50,0x2d,0x32,0x35,0x36]),[_0x3980b9([0x78])]:_0x3980b9([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]),[_0x3980b9([0x79])]:_0x3980b9([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]),[_0x3980b9([0x61,0x6c,0x67])]:_0x3980b9([0x45,0x53,0x32,0x35,0x36])},_0x46b737=_0x23e6ae[_0x3980b9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3980b9([0x67,0x65,0x74])](_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x214c04(){let _0x403f46,_0x2618aa=null,_0x3a15d8=null;try{if(_0x46b737==_0x3980b9([0x47,0x50,0x4c]))return _0x3980b9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x403f46=_0x3e8a93(),!_0x403f46)return _0x3980b9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x403f46[_0x3980b9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3a15d8=_0x4a92b1(_0x403f46[_0x3980b9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x403f46[_0x3980b9([0x6a,0x74,0x69])])),await _0x4cae0a()?_0xd08131()?_0x5af405()?_0x3980b9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x57aeb2()?(_0x403f46[_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3980b9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2618aa=_0x31b0b2(_0x3980b9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x403f46[_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3980b9([0x74,0x72,0x69,0x61,0x6c])&&(_0x2618aa=_0x31b0b2(_0x3980b9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xadae21()):_0x3980b9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3980b9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3980b9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x3556c3){return _0x3980b9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x5af405(){const _0x27c85d=[_0x3980b9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3980b9([0x74,0x72,0x69,0x61,0x6c])][_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x403f46[_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x536f04/0x3e8:0xe10*_0x46a0e3;return _0x403f46[_0x3980b9([0x65,0x78,0x70])]<_0x27c85d;}function _0xd08131(){const _0x4680fc=_0x403f46[_0x3980b9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4680fc)return!0x1;if(_0x4680fc[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3980b9([0x2a])))return!0x0;if(_0x4680fc[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3980b9([0x52,0x48])))return!0x0;if(_0x4680fc[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3980b9([0x52,0x52,0x48]))){if(_0x3b67a4())return!0x0;if(_0x1a9ec1()||_0x471e35())return!0x0;}return!0x1;}function _0x57aeb2(){const _0x53b9d7=_0x403f46[_0x3980b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x53b9d7||0x0==_0x53b9d7[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x155572}=new URL(window[_0x3980b9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x53b9d7[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x155572))return!0x0;const _0xfbf6d9=_0x155572[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])](_0x3980b9([0x2e]));return _0x53b9d7[_0x3980b9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4255cf=>_0x4255cf[_0x3980b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3980b9([0x2a])))[_0x3980b9([0x6d,0x61,0x70])](_0x53debe=>_0x53debe[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])](_0x3980b9([0x2e])))[_0x3980b9([0x73,0x6f,0x6d,0x65])](_0x4f1898=>_0xfbf6d9[_0x3980b9([0x65,0x76,0x65,0x72,0x79])]((_0x1f2ea7,_0x49b4c5)=>_0x4f1898[_0x49b4c5]===_0x1f2ea7||_0x4f1898[_0x49b4c5]===_0x3980b9([0x2a])));}function _0xadae21(){return _0x2618aa&&_0x3a15d8?new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x35dfa4,_0x2afa75)=>{_0x2618aa[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x35dfa4,_0x2afa75),_0x3a15d8[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x4ac284=>{_0x4ac284!=_0x3980b9([0x56,0x61,0x6c,0x69,0x64])&&_0x35dfa4(_0x4ac284);},_0x2afa75);}):_0x2618aa||_0x3a15d8||_0x3980b9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4a92b1(_0x436ae5,_0x1b3c3c){return new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x58ee96=>{if(_0xdb4505())return _0x58ee96(_0x3980b9([0x56,0x61,0x6c,0x69,0x64]));_0xa58931(),_0x23e6ae[_0x3980b9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3980b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x34ad26=!0x1;const _0x564c54=_0x370f5b();function _0x5b177a(_0x343ec1){return!!_0x343ec1&&(typeof _0x343ec1===_0x3980b9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x343ec1===_0x3980b9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x343ec1[_0x3980b9([0x74,0x68,0x65,0x6e])]===_0x3980b9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x343ec1[_0x3980b9([0x63,0x61,0x74,0x63,0x68])]===_0x3980b9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x42d93b(_0x5a07e0){_0x2c92cc(_0x5a07e0)[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x267a07=>{if(!_0x267a07||_0x267a07[_0x3980b9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3980b9([0x6f,0x6b]))return _0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4a9c6b(_0x4bbab6(_0x564c54+_0x1b3c3c))!=_0x267a07[_0x3980b9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3980b9([0x56,0x61,0x6c,0x69,0x64]);})[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x23c519=>(_0x3475ff(),_0x23c519),()=>{const _0x5c4e87=_0x42a7c9();return null==_0x5c4e87?(_0x3475ff(),_0x3980b9([0x56,0x61,0x6c,0x69,0x64])):_0x3980b9(_0x536f04-_0x5c4e87>(0x73fd0661^_0x388aba)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x58ee96)[_0x3980b9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x58ee96(_0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x269386=0x57c76ce1^_0x388aba;function _0x3475ff(){const _0x145250=_0x3980b9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a9c6b(_0x4bbab6(_0x436ae5)),_0x1d0e5e=_0x5339c0(_0x4a9c6b(window[_0x3980b9([0x4d,0x61,0x74,0x68])][_0x3980b9([0x63,0x65,0x69,0x6c])](_0x536f04/_0x269386)));window[_0x3980b9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3980b9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x145250,_0x1d0e5e);}function _0x42a7c9(){const _0x5d44f7=_0x3980b9([0x6c,0x6c,0x63,0x74,0x2d])+_0x4a9c6b(_0x4bbab6(_0x436ae5)),_0x359a80=window[_0x3980b9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3980b9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5d44f7);return _0x359a80?window[_0x3980b9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5339c0(_0x359a80),0x10)*_0x269386:null;}function _0x2c92cc(_0x1fa175){return new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x160f45,_0x47c1ed)=>{_0x1fa175[_0x3980b9([0x74,0x68,0x65,0x6e])](_0x160f45,_0x47c1ed),window[_0x3980b9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x47c1ed,0x57f056a1^_0x388aba);});}}_0x23e6ae[_0x3980b9([0x6f,0x6e])](_0x3980b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xddeda9,_0x519d7c)=>{if(_0x519d7c[0x0]!=_0x436ae5)return _0x58ee96(_0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x519d7c[0x1]={..._0x519d7c[0x1],[_0x3980b9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x564c54};},{[_0x3980b9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3980b9([0x68,0x69,0x67,0x68])}),_0x23e6ae[_0x3980b9([0x6f,0x6e])](_0x3980b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2df8ce=>{_0x5b177a(_0x2df8ce[_0x3980b9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x34ad26=!0x0,_0x42d93b(_0x2df8ce[_0x3980b9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3980b9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3980b9([0x6c,0x6f,0x77])}),_0x3f08ca[_0x3980b9([0x74,0x68,0x65,0x6e])](()=>{_0x34ad26||_0x58ee96(_0x3980b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xdb4505(){return _0x23e6ae[_0x3980b9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3980b9([0x76,0x69,0x65,0x77])][_0x3980b9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3980b9([0x61,0x75,0x74,0x6f]);}function _0xa58931(){_0x23e6ae[_0x3980b9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3980b9([0x76,0x69,0x65,0x77])][_0x3980b9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3980b9([0x61,0x75,0x74,0x6f]);}}function _0x31b0b2(_0x4bcc71){const _0x493a7a=[new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d23ef=>setTimeout(_0x5d23ef,0x57f8bcad^_0x388aba)),_0x3f08ca[_0x3980b9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26016e=>{const _0x4ba165=0x57f18266^_0x388aba,_0x59717d=_0x3063fc[_0x3980b9([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x584aa9(){_0x59717d[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x4ba165&&_0x26016e();}_0x584aa9(),_0x59717d[_0x3980b9([0x6f,0x6e])](_0x3980b9([0x61,0x64,0x64]),_0x584aa9);})),new window[(_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5316b7=>{function _0x2800f6(){for(const _0x5eb9bb in window)if(window[_0x3980b9([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x3980b9([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x5eb9bb))&&window[_0x5eb9bb]==_0x598057)return _0x5316b7();_0x23e6ae[_0x3980b9([0x73,0x74,0x61,0x74,0x65])]!=_0x3980b9([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x3980b9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2800f6,0x57f191e9^_0x388aba);}_0x521e16(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x2800f6();})];return window[_0x3980b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3980b9([0x72,0x61,0x63,0x65])](_0x493a7a)[_0x3980b9([0x74,0x68,0x65,0x6e])](()=>_0x4bcc71);}async function _0x1e4d36(){if(await _0x3f08ca,_0x521e16(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x4764c7=_0x3063fc[_0x3980b9([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x5e5255=_0x3063fc[_0x3980b9([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])](_0x4764c7[_0x3980b9([0x69,0x64])]),_0x3abab1=_0x439b61(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3abab1[_0x3980b9([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x4764c7['id'],_0x5e5255?_0x5e5255['id']:null,!0x0),_0x3abab1[_0x3980b9([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3980b9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3abab1[_0x3980b9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3abab1[_0x3980b9([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x212bb3,void(_0x3abab1[_0x3980b9([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x212bb3);}if(_0x521e16(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2da6a8=_0x439b61(_0x3980b9([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2da6a8[_0x3980b9([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x3980b9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2da6a8[_0x3980b9([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2da6a8[_0x3980b9([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x212bb3,_0x2da6a8[_0x3980b9([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x212bb3;}_0x23e6ae[_0x3980b9([0x6d,0x6f,0x64,0x65,0x6c])][_0x3980b9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x212bb3,_0x23e6ae[_0x3980b9([0x6d,0x6f,0x64,0x65,0x6c])][_0x3980b9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x212bb3,_0x23e6ae[_0x3980b9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3980b9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3b67a4(){return _0x521e16(_0x3980b9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x439b61(_0x3980b9([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3980b9([0x73,0x74,0x61,0x74,0x65])]==_0x3980b9([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1a9ec1(){return _0x521e16(_0x3980b9([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 _0x471e35(){return _0x521e16(_0x3980b9([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x43513e(_0x52faab){const _0x2cafe1=_0x30978c();_0x23e6ae[_0x2cafe1]=_0x3980b9([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])+_0x52faab,_0x52faab[_0x3980b9([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x3980b9([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x30978c()]=_0x598057),_0x52faab!=_0x3980b9([0x56,0x61,0x6c,0x69,0x64])&&_0x1e4d36();}function _0x30978c(){const _0x119ba5=window[_0x3980b9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3980b9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3980b9([0x6e,0x6f,0x77])]())[_0x3980b9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3980b9([0x2e]),'');let _0x5d53b1=_0x3980b9([0x68]);for(let _0x17443d=0x0;_0x17443d<_0x119ba5[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x17443d+=0x2){let _0x472eea=window[_0x3980b9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x119ba5[_0x3980b9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x17443d,_0x17443d+0x2));_0x472eea>=_0x48cd43[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x472eea-=_0x48cd43[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5d53b1+=_0x48cd43[_0x472eea];}return _0x5d53b1;}function _0x3e8a93(){const _0x59ddd6=_0x46b737[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])](_0x3980b9([0x2e]));if(0x3!=_0x59ddd6[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xf2ae77(_0x59ddd6[0x1]);function _0xf2ae77(_0x10e4c8){const _0x2e2a4e=_0x261e14(_0x10e4c8);return _0x2e2a4e&&_0x44dc60()?_0x2e2a4e:null;function _0x44dc60(){const _0x4dba89=_0x2e2a4e[_0x3980b9([0x6a,0x74,0x69])],_0x55d63d=window[_0x3980b9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4dba89[_0x3980b9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4dba89[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x370ca4={..._0x2e2a4e,[_0x3980b9([0x6a,0x74,0x69])]:_0x4dba89[_0x3980b9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4dba89[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x370ca4[_0x3980b9([0x76,0x63])],_0x4bbab6(_0x370ca4)==_0x55d63d;}}}async function _0x4cae0a(){let _0x1036e2=!0x0;try{const _0x1aba46=_0x46b737[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])](_0x3980b9([0x2e])),[_0x3d887e,_0xc14eb2,_0x5ca9aa]=_0x1aba46;return _0x582deb(_0x3d887e),await _0x6622ee(_0x3d887e,_0xc14eb2,_0x5ca9aa),_0x1036e2;}catch(_0x5a6eff){return!0x1;}function _0x582deb(_0x200d99){const _0x5b27fe=_0x261e14(_0x200d99);_0x5b27fe&&_0x5b27fe[_0x3980b9([0x61,0x6c,0x67])]==_0x3980b9([0x45,0x53,0x32,0x35,0x36])||(_0x1036e2=!0x1);}async function _0x6622ee(_0x26c4f1,_0x8e86a6,_0x98863b){const _0x4a4878=window[_0x3980b9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3980b9([0x66,0x72,0x6f,0x6d])](_0x113f77(_0x98863b),_0x5e39f4=>_0x5e39f4[_0x3980b9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x511093=new window[(_0x3980b9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3980b9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x26c4f1+_0x3980b9([0x2e])+_0x8e86a6),_0xc6be2a=window[_0x3980b9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3980b9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xc6be2a)return;const _0x1a8144=await _0xc6be2a[_0x3980b9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3980b9([0x6a,0x77,0x6b]),_0x3264e3,{[_0x3980b9([0x6e,0x61,0x6d,0x65])]:_0x3980b9([0x45,0x43,0x44,0x53,0x41]),[_0x3980b9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3980b9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3980b9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xc6be2a[_0x3980b9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3980b9([0x6e,0x61,0x6d,0x65])]:_0x3980b9([0x45,0x43,0x44,0x53,0x41]),[_0x3980b9([0x68,0x61,0x73,0x68])]:{[_0x3980b9([0x6e,0x61,0x6d,0x65])]:_0x3980b9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1a8144,_0x4a4878,_0x511093)||(_0x1036e2=!0x1);}}function _0x261e14(_0x9e1989){return _0x9e1989[_0x3980b9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3980b9([0x65,0x79]))?JSON[_0x3980b9([0x70,0x61,0x72,0x73,0x65])](_0x113f77(_0x9e1989)):null;}function _0x113f77(_0x41c7a5){return window[_0x3980b9([0x61,0x74,0x6f,0x62])](_0x41c7a5[_0x3980b9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3980b9([0x2b]))[_0x3980b9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3980b9([0x2f])));}function _0x4bbab6(_0x895ef5){let _0x51f5f1=0x1505;function _0x5d1005(_0x58b990){for(let _0x5f43cd=0x0;_0x5f43cd<_0x58b990[_0x3980b9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5f43cd++){const _0x324828=_0x58b990[_0x3980b9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5f43cd);_0x51f5f1=(_0x51f5f1<<0x5)+_0x51f5f1+_0x324828,_0x51f5f1&=_0x51f5f1;}}function _0x5db4bf(_0x4cc6de){Array[_0x3980b9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4cc6de)?_0x4cc6de[_0x3980b9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x5db4bf):_0x4cc6de&&typeof _0x4cc6de==_0x3980b9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3980b9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4cc6de)[_0x3980b9([0x73,0x6f,0x72,0x74])]()[_0x3980b9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x108417,_0x4703dd])=>{_0x5d1005(_0x108417),_0x5db4bf(_0x4703dd);}):_0x5d1005(window[_0x3980b9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4cc6de));}return _0x5db4bf(_0x895ef5),_0x51f5f1>>>0x0;}function _0x4a9c6b(_0x2c52a7){return _0x2c52a7[_0x3980b9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3980b9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3980b9([0x30]));}function _0x5339c0(_0x564f33){return _0x564f33[_0x3980b9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3980b9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3980b9([0x6a,0x6f,0x69,0x6e])]('');}function _0x521e16(_0x278038){return _0x23e6ae[_0x3980b9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3980b9([0x68,0x61,0x73])](_0x278038);}function _0x439b61(_0x28515d){return _0x23e6ae[_0x3980b9([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3980b9([0x67,0x65,0x74])](_0x28515d);}function _0x212bb3(){}function _0x3980b9(_0x68c18a){return _0x68c18a['map'](_0x4d206b=>String['fromCharCode'](_0x4d206b))['join']('');}_0x43513e(await _0x214c04());}(this);}['createRevision'](_0x83bd03){const _0x5824de=this['editor']['plugins']['get']('Users');return new a({'id':_0x83bd03['id'],'name':_0x83bd03['name'],'creator':_0x83bd03['creatorId']?_0x5824de['getUser'](_0x83bd03['creatorId']):null,'diffData':_0x83bd03['diffData']||_0x83bd03['data'],'authors':_0x83bd03['authorsIds']['map'](_0x3967c2=>_0x5824de['getUser'](_0x3967c2)),'createdAt':new Date(_0x83bd03['createdAt']),'attributes':_0x83bd03['attributes'],'fromVersion':_0x83bd03['fromVersion'],'toVersion':_0x83bd03['toVersion']});}['addRevision'](_0x32de8a,_0x4d0cca=0x0){this['_revisions']['add'](_0x32de8a,_0x4d0cca);}['getRevision'](_0x4be57c){return this['_revisions']['get'](_0x4be57c);}['getRevisions'](_0x12bc1a={'toJSON':!0x1}){const _0xe71550=Array['from'](this['_revisions']);return _0xe71550['reverse'](),_0x12bc1a['toJSON']?_0xe71550['map'](_0x4a4667=>_0x4a4667['toJSON']()):_0xe71550;}['getIndex'](_0x18bcca){return this['_revisions']['getIndex'](_0x18bcca);}['getEarlierVisibleRevision'](_0x577a7a){const [,_0x49f17a]=this['getRevisionsIterator'](_0x577a7a,{'direction':'earlier'});return _0x49f17a;}['getLaterVisibleRevision'](_0x5b21c5){const [,_0x2498e6]=this['getRevisionsIterator'](_0x5b21c5,{'direction':'later'});return _0x2498e6;}['getRevisionsInDiff'](_0x853383){const _0x10239f=[];for(const _0x1225da of this['getRevisionsIterator'](_0x853383['newRevisionId']))if(_0x10239f['push'](_0x1225da),_0x1225da['id']===_0x853383['oldRevisionId'])break;return _0x10239f;}*['getRevisionsIterator'](_0xba6224,{direction:_0x12cff6='earlier',filter:_0x5b501e=()=>!0x0}={}){const _0x3ac49c='earlier'===_0x12cff6?0x1:-0x1;let _0x487e33=this['_revisions']['get'](_0xba6224),_0x5926ff=this['getIndex'](_0x487e33);for(yield _0x487e33;_0x487e33;){if(_0x5926ff+=_0x3ac49c,_0x487e33=this['getRevision'](_0x5926ff),!_0x487e33)return;_0x5b501e(_0x487e33)&&(yield _0x487e33);}}}function m(_0x4e4be4,_0x112b55,_0x362c06){const t=_0x4e4be4['t'];switch(_0x112b55){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'},_0x362c06);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x362c06);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':_0x4085a3,'a':_0x21393e,'e':_0x55b6d9,'r':_0x156c3d,'u':_0x10755e};class l extends _0x3494fb{['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[_0x550701,j,_0x23a927];}constructor(_0x53090c){super(_0x53090c),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 _0x4dbcdd=_0x370f5b();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x4dbcdd},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 _0x9866a5=this['repository']['getRevision'](0x0),_0x2cc18a=_0x9866a5&&null===_0x9866a5['creator']?_0x9866a5:null;if(this['_continueCurrentRevision']=!!_0x2cc18a&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4f71cc=this['_source']['getCurrentRevisionId'](),_0x2120d3=this['repository']['getRevision'](_0x4f71cc);if(_0x2120d3)this['_startingVersion']=_0x2120d3['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x52e18b=this['_source']['history']['_operations']['find'](_0x5e9fa5=>!_0x5e9fa5['_isInit']),_0x297dba=_0x52e18b?_0x52e18b['baseVersion']:this['_source']['history']['version'];_0x9866a5?(_0x9866a5['toVersion']<_0x297dba&&_0x9866a5['_update']({'toVersion':_0x297dba}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2cc18a['id'],this['_startingVersion']=_0x2cc18a['fromVersion']):(this['_startingVersion']=_0x9866a5['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x297dba,this['_continueCurrentRevision']=!0x1);}}else _0x2cc18a&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2cc18a['toVersion'],this['editor']['model']['document']['history']['version']),_0x2cc18a['fromVersion']===_0x2cc18a['toVersion']?(0x0!==_0x2cc18a['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2cc18a['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2cc18a['id'],this['_startingVersion']=_0x2cc18a['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',_0x368b10=>!_0x368b10),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xba7a28=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x481f48;for(const _0x1f673f in _0xba7a28){const _0x2690cf=_0x1f673f,_0x1b80e1=_0xba7a28[_0x2690cf];if('revisionHistoryLicenseKeyValid'==_0x1b80e1||'revisionHistoryLicenseKeyInvalid'==_0x1b80e1||'revisionHistoryLicenseKeyExpired'==_0x1b80e1||'revisionHistoryLicenseKeyDomainLimit'==_0x1b80e1||'revisionHistoryLicenseKeyNotAllowed'==_0x1b80e1||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1b80e1||'revisionHistoryLicenseKeyTrialLimit'==_0x1b80e1||'revisionHistoryLicenseKeyUsageLimit'==_0x1b80e1){delete _0xba7a28[_0x2690cf],_0x481f48=_0x1b80e1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x481f48&&_0xba7a28['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x481f48&&_0xba7a28['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x481f48&&_0xba7a28['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x481f48&&_0xba7a28['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x481f48&&_0xba7a28['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x481f48&&_0xba7a28['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x481f48&&_0xba7a28['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x1ade3b=this['repository']['getRevision'](0x0),_0x3a8b8b=await this['getRevisionDocumentData'](_0x1ade3b),_0x46fc6c=await this['getRevisionRootsAttributes'](_0x1ade3b);this['_replaceEditorDataWithRevisionData'](_0x3a8b8b,_0x46fc6c);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x5f4187){this['_source']=_0x5f4187;}async['update'](){const _0x446927=await this['_source']['getLatestVersion']();if(_0x446927>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5b23f2=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x446927});_0x5b23f2['authors']=_0x5b23f2['authorsIds']['map'](_0x57fcb8=>this['editor']['plugins']['get']('Users')['getUser'](_0x57fcb8)),this['currentRevision']['_update'](_0x5b23f2);}}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'](_0x50b402={},_0x9432c8=null){const _0x5f516a=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x9432c8>this['currentRevision']['toVersion']&&(_0x9432c8=null),null===_0x9432c8&&(_0x9432c8=await this['_source']['getLatestVersion']());const _0x34039b=this['_getFromVersion'](_0x9432c8),_0x3caf66=this['buildRevisionData']({'from':_0x34039b,'to':_0x9432c8});if(this['currentRevision']['toVersion']<_0x9432c8){const _0x44655d=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x9432c8,'to':_0x9432c8});_0x44655d['authors']=[],_0x44655d['authorsIds']=[],_0x44655d['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x44655d,!0x0),delete _0x44655d['authors'],_0x5f516a['push'](_0x44655d);}_0x50b402['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x50b402['name']=_0x50b402['name']||null,_0x50b402['id']=_0x50b402['id']||_0x370f5b(),_0x50b402={..._0x50b402,..._0x3caf66};const _0x53a704=this['addRevisionData'](_0x50b402);_0x5f516a['push'](_0x50b402);const _0x53e999=this['repository']['getIndex'](_0x53a704);if(0x0!==_0x53e999){const _0x2606e2=this['repository']['getRevision'](_0x53e999-0x1);if(_0x2606e2['fromVersion']!==_0x9432c8){const _0x38d58b=this['_revisionDataBuilder']['getData'](_0x9432c8,_0x2606e2['toVersion']),_0x4ac270={'id':_0x2606e2['id'],'diffData':_0x38d58b['diffData'],'authorsIds':_0x38d58b['authorsIds'],'authors':_0x38d58b['authorsIds']['map'](_0x1dc887=>this['editor']['plugins']['get']('Users')['getUser'](_0x1dc887)),'fromVersion':_0x9432c8};_0x2606e2===this['currentRevision']&&(_0x4ac270['createdAt']=new Date(_0x50b402['createdAt']['getTime']()+0xa)),_0x2606e2['_update'](_0x4ac270,!0x0),delete _0x4ac270['authors'],_0x5f516a['push'](_0x4ac270);}}if(this['adapter']){for(const _0x54567f of _0x5f516a)this['_bufferUpdate'](_0x54567f['id'],_0x54567f,!0x0);this['sendBufferedUpdates']();}return _0x53a704;}['addRevisionData'](_0x7f8219){const _0x5f0ebc=this['repository']['createRevision'](_0x7f8219);return this['adapter']&&_0x5f0ebc['on']('_update',(_0x3f8b7d,_0x242650,_0x1fe4f8)=>{_0x1fe4f8||(this['_bufferUpdate'](_0x242650['id'],_0x242650,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x5f0ebc,this['_findInsertionIndex'](_0x5f0ebc)),_0x5f0ebc;}async['getRevisionDocumentData'](_0x117241){await this['_loadRevisionData'](_0x117241);const _0x4a92cf={};for(const _0x587f74 in _0x117241['diffData']){if(_0x117241['diffData'][_0x587f74]['attachChange']&&!_0x117241['diffData'][_0x587f74]['attachChange']['isAttached'])continue;const _0x2bf7a7=this['_removeRevisionMarkers'](JSON['parse'](_0x117241['diffData'][_0x587f74]['insertions'])),_0x4adb08=this['editor']['editing']['view']['document'],_0xfb801=new _0x2c3601(_0x4adb08,_0x2bf7a7['map'](_0x133974=>C(_0x133974,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x4a92cf[_0x587f74]=this['editor']['data']['processor']['toData'](_0xfb801),this['editor']['data']['processor']['useFillerType']('default');}return _0x4a92cf;}async['getRevisionRootsAttributes'](_0x426089){await this['_loadRevisionData'](_0x426089);const _0x26ae0a={};for(const _0x2655e8 in _0x426089['diffData'])_0x426089['diffData'][_0x2655e8]['attachChange']&&!_0x426089['diffData'][_0x2655e8]['attachChange']['isAttached']||(_0x26ae0a[_0x2655e8]=_0x426089['diffData'][_0x2655e8]['attributesAfter']||{});return _0x26ae0a;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x329c7d=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1fc925=0x0;_0x1fc925<_0x329c7d['length'];_0x1fc925++){const _0x141dec=_0x329c7d[_0x1fc925];let _0x502345=!0x1;for(const _0xb1210 of Object['keys'](_0x141dec))void 0x0===_0x141dec[_0xb1210]?delete _0x141dec[_0xb1210]:'id'!==_0xb1210&&(_0x502345=!0x0);_0x502345||(_0x329c7d[_0x1fc925]=null);}if(_0x329c7d=_0x329c7d['filter'](_0x1ddbc3=>null!==_0x1ddbc3),!_0x329c7d['length'])return;for(let _0x3cfcee=0x0;_0x3cfcee<_0x329c7d['length'];_0x3cfcee++){const _0x37ae40=_0x329c7d[_0x3cfcee];void 0x0!==_0x37ae40['fromVersion']&&void 0x0===_0x37ae40['toVersion']&&(_0x37ae40['toVersion']=this['repository']['getRevision'](_0x37ae40['id'])['toVersion']),void 0x0!==_0x37ae40['toVersion']&&void 0x0===_0x37ae40['fromVersion']&&(_0x37ae40['fromVersion']=this['repository']['getRevision'](_0x37ae40['id'])['fromVersion']);}const _0x18aa7b=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x329c7d,_0x18aa7b)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x7ad3bf=>{if(_0x7ad3bf){for(const _0x375fbc of _0x7ad3bf)this['setRevisionData']({'id':_0x375fbc['id'],'createdAt':_0x375fbc['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x177162,_0x44b66f){let _0x812614=this['editor']['config']['get']('initialData'),_0x5d7818=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x812614){_0x812614={};for(const _0xf774c4 of this['editor']['model']['document']['getRootNames']())_0x812614[_0xf774c4]='';}if('string'==typeof _0x812614&&(_0x812614={'main':_0x812614}),void 0x0===_0x5d7818){_0x5d7818={};for(const _0x2535b5 of this['editor']['model']['document']['getRootNames']())_0x5d7818[_0x2535b5]={};}let _0x1146aa=!0x1;const _0x49b229=Object['keys'](_0x812614),_0x5294d2=Object['keys'](_0x177162);for(const _0x2df076 of _0x49b229){if(_0x812614[_0x2df076]!==_0x177162[_0x2df076]&&''!==_0x812614[_0x2df076]['trim']()){_0x1146aa=!0x0;break;}if(!_0x48fe1a(_0x5d7818[_0x2df076],_0x44b66f[_0x2df076])&&Object['keys'](_0x5d7818[_0x2df076])['length']>0x0){_0x1146aa=!0x0;break;}}_0x1146aa||(_0x1146aa=_0x5294d2['some'](_0x28f278=>!this['editor']['model']['document']['getRoot'](_0x28f278))),_0x1146aa&&_0x32af2b('editor-initial-data-replaced-with-revision-data',{'editorData':_0x812614,'editorRootsAttributes':_0x5d7818,'revisionData':_0x177162,'revisionRootsAttributes':_0x44b66f}),this['editor']['config']['set']('initialData',_0x177162),this['editor']['config']['set']('rootsAttributes',_0x44b66f);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x540ec6=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x540ec6['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1adfed){const _0x4f0c27=this['repository']['getRevisions']();_0x4f0c27['reverse']();let _0x46a613=0x0;for(;_0x46a613<_0x4f0c27['length'];){const _0x41b421=_0x4f0c27[_0x46a613];if(_0x41b421===this['currentRevision']){_0x46a613++;continue;}if(_0x41b421['id']===this['_initialRevisionId'])break;const _0x221010=_0x1adfed['toVersion']-_0x41b421['toVersion']||_0x1adfed['fromVersion']-_0x41b421['fromVersion'];if(_0x221010>0x0)break;if(_0x221010<0x0)_0x46a613++;else{if(!_0x1adfed['creator']&&_0x41b421['creator'])break;if(_0x41b421['creator']||!_0x1adfed['creator']){if(_0x1adfed['createdAt']>_0x41b421['createdAt'])break;_0x46a613++;}else _0x46a613++;}}return _0x46a613;}['setRevisionData'](_0x3a90fd){const _0x5cdcd9=this['repository']['getRevision'](_0x3a90fd['id']);if(_0x3a90fd['createdAt']&&(_0x3a90fd['createdAt']=new Date(_0x3a90fd['createdAt'])),_0x3a90fd['authorsIds']){const _0x53d34e=this['editor']['plugins']['get']('Users');_0x3a90fd['authors']=_0x3a90fd['authorsIds']['map'](_0x452655=>_0x53d34e['getUser'](_0x452655));}_0x5cdcd9['_update'](_0x3a90fd,!0x0);}['buildRevisionData']({revision:_0x4ac3a0=null,from:_0x13eeff=null,to:_0x418b73=null}){_0x13eeff=null!==_0x13eeff?_0x13eeff:_0x4ac3a0['fromVersion'],_0x418b73=null!==_0x418b73?_0x418b73:_0x4ac3a0['toVersion'];const _0x6c054c=this['_revisionDataBuilder']['getData'](_0x13eeff,_0x418b73),_0x2d2478={'diffData':_0x6c054c['diffData'],'authorsIds':_0x6c054c['authorsIds'],'fromVersion':_0x13eeff,'toVersion':_0x418b73};if(!_0x4ac3a0||_0x418b73!==_0x4ac3a0['toVersion']){const _0x599824=_0x418b73-0x1,_0x5ee5ef=this['_source']['history']['getOperation'](_0x599824);_0x2d2478['createdAt']=_0x5ee5ef&&_0x5ee5ef['createdAt']||new Date();}if(this['_loadedStateData']&&_0x13eeff===this['_loadedStateData']['fromVersion']){for(const _0x4db7cb of this['_loadedStateData']['authors'])_0x2d2478['authorsIds']['includes'](_0x4db7cb['id'])||_0x2d2478['authorsIds']['push'](_0x4db7cb['id']);}return _0x2d2478;}['_loadRevisionData'](_0x59bd45){if(!_0x59bd45||_0x59bd45['diffData'])return Promise['resolve']();{const _0xfbbbe2=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0xfbbbe2,'revisionId':_0x59bd45['id']})['then'](_0x411a4a=>{_0x59bd45['diffData']=_0x411a4a['diffData'];});}}['_bufferUpdate'](_0x5d7951,_0x519c00,_0x53b308){if(this['_bufferedUpdates']['has'](_0x5d7951)){const _0x37247c=this['_bufferedUpdates']['get'](_0x5d7951);_0x519c00=_0x53b308?{..._0x37247c,..._0x519c00}:{..._0x519c00,..._0x37247c};}this['_bufferedUpdates']['set'](_0x5d7951,_0x519c00);}['_getFromVersion'](_0x5d4182){const _0x2359c5=this['repository']['getRevisions']();_0x2359c5['reverse'](),_0x2359c5['shift']();const _0x4c2c11=_0x2359c5['find'](_0x2e08c6=>_0x2e08c6['toVersion']<=_0x5d4182)['toVersion'];return _0x4c2c11<this['_startingVersion']?this['_startingVersion']:_0x4c2c11;}['_createInitialRevision'](_0x236954){const _0x3b1b38=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3b1b38)this['_initialRevisionId']=_0x3b1b38['id'];else{const _0x4d2284=!this['editor']['model']['document']['roots']['find'](_0x1c1fa6=>this['editor']['model']['hasContent'](_0x1c1fa6)),_0x59c352=this['editor']['plugins']['get']('Users')['me']['id'],_0x48c72b=m(this['editor']['locale'],_0x4d2284?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x236954,'to':_0x236954,'id':this['_initialRevisionId'],'name':_0x48c72b,'creatorId':_0x59c352});}}['_createCurrentRevision'](_0x492147){const _0x23994f=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x23994f),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x492147,'to':_0x492147,'id':_0x23994f,'name':'','creatorId':null}));}['_makeRevision']({name:_0x4e5762,from:_0x3b1f4c,to:_0x1ed88c,creatorId:_0x7a15dd,id:_0x5c5486}){const _0x2c5e34=this['buildRevisionData']({'from':_0x3b1f4c,'to':_0x1ed88c});_0x2c5e34['name']=_0x4e5762,_0x2c5e34['creatorId']=_0x7a15dd,_0x2c5e34['id']=_0x5c5486;const _0x58b5d1=this['addRevisionData'](_0x2c5e34);return this['adapter']&&this['_bufferUpdate'](_0x2c5e34['id'],_0x2c5e34,!0x0),_0x58b5d1;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x4fdf6f){return(_0x4fdf6f=_0x4fdf6f['filter'](_0x432e95=>!_0x432e95['name']||'revision-start'!==_0x432e95['name']&&'revision-end'!==_0x432e95['name']))['forEach'](_0x44cedc=>{'string'!=typeof _0x44cedc&&(_0x44cedc['children']=this['_removeRevisionMarkers'](_0x44cedc['children']),_0x44cedc['attributes']=_0x44cedc['attributes']['filter'](_0x282b7f=>!_0x282b7f[0x0]['startsWith']('data-revision-')));}),_0x4fdf6f;}}function C(_0x54054f,_0x5884ba){const _0x420ebc=_0x5884ba['editing']['view']['document'];if('string'==typeof _0x54054f)return new _0x6c429f(_0x420ebc,_0x54054f);{const _0x4bf450=_0x54054f['children']['map'](_0x3d34ce=>C(_0x3d34ce,_0x5884ba));return new(P[_0x54054f['type']]||_0xcb3cb1)(_0x420ebc,_0x54054f['name'],_0x54054f['attributes'],_0x4bf450);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x25b39b){this['editor']=_0x25b39b,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'](_0x28218c){this['source']=_0x28218c;const _0x29cff6=new Map(),_0x57b0c7=new Map(),_0x189533=this['editor']['model']['document']['roots']['map'](_0x3dbae7=>_0x3dbae7['rootName']);for(const _0x93f4cf of _0x189533){const _0x42cece=this['editor']['model']['document']['getRoot'](_0x93f4cf),_0x2fc371=T(_0x42cece);_0x29cff6['set'](_0x93f4cf,_0x2fc371),_0x57b0c7['set'](_0x93f4cf,Object['fromEntries'](_0x42cece['getAttributes']()));}const _0x3b4952=Array['from'](this['editor']['model']['markers'])['map'](_0x32379c=>[_0x32379c['name'],_0x32379c['getRange']()]),_0x127fa3=this['source']['version'];this['_saveMetaData'](_0x127fa3,_0x29cff6,_0x3b4952,_0x57b0c7),this['_startingRevisionId']=this['_revisionId'];const _0x87f2ab=new Map(),_0x3cfc5b=new Map();for(const _0x528da7 of _0x189533){const _0x4537af=F(_0x528da7);_0x87f2ab['set'](_0x528da7,_0x4537af),_0x3cfc5b['set'](_0x528da7,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x87f2ab,[],_0x3cfc5b);}['getData'](_0x1f0fce,_0x44471b){if(this['_lastFrom']===_0x1f0fce&&this['_lastTo']<=_0x44471b)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x44471b,!0x0);else{if(!this['_savedMetaData']['has'](_0x1f0fce)){const _0x54731d=this['_getPreviousFrom'](_0x1f0fce);this['_calculateMetaData'](_0x54731d,_0x1f0fce,!0x1);}this['_calculateMetaData'](_0x1f0fce,_0x44471b,!0x0);}return this['_lastFrom']=_0x1f0fce,this['_lastTo']=_0x44471b,this['_getState']();}['loadState'](_0xce776a){this['_reset'](),this['_lastFrom']=_0xce776a['fromVersion'],this['_lastTo']=_0xce776a['toVersion'];for(const _0x3fddb4 in _0xce776a['diffData']){const _0x194e84=_0xce776a['diffData'][_0x3fddb4]['attachChange'],_0xd296ce=_0x3bebdd(_0xce776a['diffData'][_0x3fddb4]['attributesBefore'])||{},_0x11b787=this['_makeModelFromViewString'](_0xce776a['diffData'][_0x3fddb4]['deletions']);_0x11b787['rootName']=_0x3fddb4,_0x11b787['_isAttached']=!_0x194e84||!_0x194e84['isAttached'],_0x11b787['isAttached']=()=>_0x11b787['_isAttached'],this['_baseRoots']['set'](_0x3fddb4,_0x11b787),this['_baseRootsAttributes']['set'](_0x3fddb4,_0xd296ce),_0x194e84&&this['_touchedRoots']['set'](_0x3fddb4,_0x194e84);const _0x2af621=this['_makeIdsRoot'](_0x11b787);this['_baseIdsRoots']['set'](_0x3fddb4,_0x2af621);for(const [_0x43822e,_0x3e6dd5]of _0x11b787['markers']){if(!_0x43822e['startsWith']('revision:'))continue;const _0x4acf0c=_0x43822e['split'](':')[0x2];for(const _0x48fec9 of _0x3e6dd5['getWalker']({'singleCharacters':!0x0})){const _0x106558=this['_getVidAttributeName'](_0x48fec9),_0x11fc4b='elementEnd'==_0x48fec9['type']?_0x48fec9['previousPosition']['path']['slice'](0x0,-0x1):_0x48fec9['previousPosition']['path'],_0x4a0328=_0x2af621['getNodeByPath'](_0x11fc4b)['getAttribute'](_0x106558);this['_touched']['set'](_0x4a0328,{'userId':_0x4acf0c});}}}this['_startingRevisionId']=this['_revisionId'];const _0x1b7c5d=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x116042=>!this['_touched']['has'](_0x116042));let _0x2ac3b7=0x0;const _0x201920=new Map();for(const _0x56db3b in _0xce776a['diffData']){const _0x568ac5=_0xce776a['diffData'][_0x56db3b]['attachChange'],_0x1bff2a=_0x3bebdd(_0xce776a['diffData'][_0x56db3b]['attributesAfter'])||{},_0x59af5c=this['_makeModelFromViewString'](_0xce776a['diffData'][_0x56db3b]['insertions']);_0x59af5c['rootName']=_0x56db3b,_0x59af5c['_isAttached']=!_0x568ac5||_0x568ac5['isAttached'],_0x59af5c['isAttached']=()=>_0x59af5c['_isAttached'],this['_diffRoots']['set'](_0x56db3b,_0x59af5c),this['_diffRootsAttributes']['set'](_0x56db3b,_0x1bff2a);const _0x2a104e=this['_makeIdsRoot'](_0x59af5c,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x56db3b,_0x2a104e),_0x201920['set'](_0x56db3b,_0x59af5c['isAttached']()?_0x1bff2a:{});for(const [_0x16aa5d,_0x7ddd1]of _0x59af5c['markers']){if(!_0x16aa5d['startsWith']('revision:'))continue;const _0x452c61=_0x16aa5d['split'](':')[0x2];for(const _0x22ede5 of _0x7ddd1['getWalker']({'singleCharacters':!0x0})){const _0x1c05da=this['_getVidAttributeName'](_0x22ede5),_0x5c02d7=this['_revisionId']++,_0x128c50='elementEnd'==_0x22ede5['type']?_0x22ede5['previousPosition']['path']['slice'](0x0,-0x1):_0x22ede5['previousPosition']['path'];_0x2a104e['getNodeByPath'](_0x128c50)['_setAttribute'](_0x1c05da,_0x5c02d7),this['_touched']['set'](_0x5c02d7,{'userId':_0x452c61});}}for(const _0x400c37 of this['editor']['model']['createRangeIn'](_0x59af5c)['getWalker']({'singleCharacters':!0x0})){const _0x4e325e=this['_getVidAttributeName'](_0x400c37),_0x6b85cc='elementEnd'==_0x400c37['type']?_0x400c37['previousPosition']['path']['slice'](0x0,-0x1):_0x400c37['previousPosition']['path'],_0x2b46ff=_0x2a104e['getNodeByPath'](_0x6b85cc);_0x2b46ff['getAttribute'](_0x4e325e)>0x0||_0x2b46ff['_setAttribute'](_0x4e325e,_0x1b7c5d[_0x2ac3b7++]);}for(const [_0x4069f3,_0x5912fa]of _0x59af5c['markers'])_0x4069f3['startsWith']('revision:')||this['_markers']['set'](_0x4069f3,_0x5912fa);}const _0x1e86a9=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x1e86a9),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1e86a9,0x1));const _0x37bfe=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x37bfe),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x37bfe,0x1));const _0x4b600f=Array['from'](this['_diffRoots'])['map'](([_0xbaa5b6,_0x11125e])=>[_0xbaa5b6,T(_0x11125e)]);this['_saveMetaData'](this['_lastTo'],_0x4b600f,this['_markers'],_0x201920);}['_makeModelFromViewString'](_0x5b395c){const _0x4bfd2a=JSON['parse'](_0x5b395c),_0x531064=this['editor']['editing']['view']['document'],_0x30934e=new _0x2c3601(_0x531064,_0x4bfd2a['map'](_0x49863a=>C(_0x49863a,this['editor'])));return this['editor']['data']['toModel'](_0x30934e);}['_saveMetaData'](_0x52c960,_0x216666,_0x580947,_0x243a9e){const _0x370919=new Map(_0x216666),_0x2c46fc=new Map(_0x3bebdd(_0x243a9e)),_0x38c07a=new Map();for(const [_0x141367,_0x3e2fb9]of _0x580947)_0x38c07a['set'](_0x141367,{'start':_0x3e2fb9['start']['clone'](),'end':_0x3e2fb9['end']['clone'](),'rootName':_0x3e2fb9['root']['rootName']});this['_savedMetaData']['set'](_0x52c960,{'roots':_0x370919,'markers':_0x38c07a,'rootsAttributes':_0x2c46fc});}['_removeMetaData'](_0x44be12){this['_savedMetaData']['delete'](_0x44be12);}['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'](_0x356041,_0x18eeb5=null){let _0x159478=null;_0x356041['is']('documentFragment')||(_0x159478=new ft(_0x356041['name'],{'vid_start':null===_0x18eeb5?this['_revisionId']++:_0x18eeb5++}));const _0x30c047=[];for(const _0x6f5488 of _0x356041['getChildren']())if(_0x6f5488['is']('element')){_0x30c047['push'](this['_makeIdsRoot'](_0x6f5488,_0x18eeb5));const _0x42c8fa=_0x30c047[_0x30c047['length']-0x1];null!==_0x18eeb5&&(_0x18eeb5=_0x42c8fa['is']('element','$text')?_0x42c8fa['getAttribute']('vid')+0x1:_0x42c8fa['getAttribute']('vid_end')+0x1);}else{for(let _0x427496=0x0;_0x427496<_0x6f5488['offsetSize'];_0x427496++)_0x30c047['push'](new ft('$text',{'vid':null===_0x18eeb5?this['_revisionId']++:_0x18eeb5++}));}if(_0x356041['is']('documentFragment')){const _0x1bc934=F(_0x356041['rootName']);return _0x1bc934['_insertChild'](0x0,_0x30c047),_0x1bc934;}return _0x159478['_setAttribute']('vid_end',null===_0x18eeb5?this['_revisionId']++:_0x18eeb5++),_0x159478['_insertChild'](0x0,_0x30c047),_0x159478;}['_calculateMetaData'](_0x1d0212,_0x970cad,_0x5eb5c2){this['_reset']();const {roots:_0x32aac5,markers:_0x438838,rootsAttributes:_0xdf8724}=this['_savedMetaData']['get'](_0x1d0212);this['_baseRoots']=new Map(_0x32aac5),this['_baseRootsAttributes']=new Map(_0x3bebdd(_0xdf8724));for(const [_0x140481,_0xa28bfb]of this['_baseRoots'])if('$graveyard'!==_0x140481&&(this['_diffRoots']['set'](_0x140481,T(_0xa28bfb)),this['_diffRootsAttributes']=new Map(_0x3bebdd(_0xdf8724)),_0x5eb5c2)){const _0x3ce62f=this['_revisionId'];this['_idsRoots']['set'](_0x140481,this['_makeIdsRoot'](_0xa28bfb)),this['_baseIdsRoots']['set'](_0x140481,this['_makeIdsRoot'](_0xa28bfb,_0x3ce62f));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x5eb5c2&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x1366e3,_0x5a747b]of _0x438838){const _0xa2d3ec=this['_baseRoots']['get'](_0x5a747b['rootName']),_0x590270=this['_diffRoots']['get'](_0x5a747b['rootName']),_0x40cec1=new vt(this['_fixPosition'](_0x5a747b['start'],_0xa2d3ec),this['_fixPosition'](_0x5a747b['end'],_0xa2d3ec)),_0x189a09=this['_fixRange'](_0x40cec1,_0x590270);_0xa2d3ec['markers']['set'](_0x1366e3,_0x40cec1),this['_markers']['set'](_0x1366e3,_0x189a09);}this['_applyOperations'](_0x1d0212,_0x970cad,_0x5eb5c2);}['_applyOperations'](_0x332958,_0x50aebc,_0x284243){for(const _0x4e4e6d of this['source']['getOperations'](_0x332958,_0x50aebc))this['_handleOperation'](_0x4e4e6d,_0x284243);for(const _0xc7e678 of this['_diffRoots']['values']())_0xc7e678['markers']['clear']();for(const [_0x12a301,_0x237ef7]of this['_markers']){this['_diffRoots']['get'](_0x237ef7['root']['rootName'])['markers']['set'](_0x12a301,_0x237ef7['clone']());}const _0x33c549=new Map(),_0x226d1c=new Map();for(const [_0x4e5d89,_0x112c09]of this['_diffRoots'])_0x33c549['set'](_0x4e5d89,T(_0x112c09)),_0x226d1c['set'](_0x4e5d89,this['_diffRootsAttributes']['get'](_0x4e5d89));this['_saveMetaData'](_0x50aebc,_0x33c549,this['_markers'],_0x226d1c);}['_getPreviousFrom'](_0x430edd){const _0xebf95c=Array['from'](this['_savedMetaData']['keys']());_0xebf95c['sort']((_0x165bb6,_0x4dc2dd)=>_0x165bb6-_0x4dc2dd),_0xebf95c['reverse']();for(const _0x52b80a of _0xebf95c)if(_0x52b80a<_0x430edd)return _0x52b80a;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x3a539f,_0x583250){const _0x4f66e5=Array['from'](_0x583250['markers'])['map'](([_0x45cae6,_0x1b23bb])=>[_0x45cae6,this['_fixRange'](_0x1b23bb,_0x3a539f)]);_0x3a539f['markers']=new Map(_0x4f66e5);}['_transformMarkers'](_0x3c3b4b){for(const _0x59779f of this['_markers']['values']()){const _0x30f20c=_0x59779f['getTransformedByOperation'](_0x3c3b4b),_0x993ac3=vt['_createFromRanges'](_0x30f20c);_0x59779f['start']=_0x993ac3['start'],_0x59779f['end']=_0x993ac3['end'];}}['_handleOperation'](_0x5c9d93,_0x1518a7){if('addRoot'!=_0x5c9d93['type']&&'detachRoot'!=_0x5c9d93['type']){if('insert'==_0x5c9d93['type']){const _0x1eb385=_0x5c9d93['position']['root']['rootName'];this['_diffRoots']['has'](_0x1eb385)||(this['_diffRoots']['set'](_0x1eb385,F(_0x1eb385,!0x0)),this['_diffRootsAttributes']['set'](_0x1eb385,{}),_0x1518a7&&this['_idsRoots']['set'](_0x1eb385,F(_0x1eb385,!0x0)));}else{if('addRootAttribute'==_0x5c9d93['type']||'removeRootAttribute'==_0x5c9d93['type']||'changeRootAttribute'==_0x5c9d93['type'])return void this['_handleRootAttributeOperation'](_0x5c9d93);'marker'==_0x5c9d93['type']&&this['_handleMarkerOperation'](_0x5c9d93);}if('marker'!==_0x5c9d93['type']){const _0xad848c=this['_cloneOperation'](_0x5c9d93,this['_diffRoots']);_0xad848c['_execute'](),this['_transformMarkers'](_0xad848c);}if(_0x1518a7)switch(_0x5c9d93['type']){case'insert':this['_handleInsertOperation'](_0x5c9d93);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5c9d93);break;case'merge':this['_handleMergeOperation'](_0x5c9d93);break;case'split':this['_handleSplitOperation'](_0x5c9d93);}}else this['_handleRootOperation'](_0x5c9d93,_0x1518a7);}['_cloneOperation'](_0x45c739,_0xb040f){const _0x4feee0=_0x45c739['clone']();return _0x4feee0['_authorId']=_0x45c739['_authorId'],this['_fixOperation'](_0x4feee0,_0xb040f),_0x4feee0;}['_getBaseVids'](_0x3d5a60){return _0x3d5a60['map'](_0x335b12=>{const _0x120f91=this['_getVidAttributeName'](_0x335b12);return Number(_0x335b12['item']['getAttribute'](_0x120f91));});}['_generateTape'](_0x218407,_0x2879a2){if(_0x218407['is']('element','$text'))_0x2879a2['push']({'item':_0x218407,'type':'text'});else{_0x218407['is']('element')&&_0x2879a2['push']({'item':_0x218407,'type':'elementStart'});for(const _0x421f00 of _0x218407['getChildren']())this['_generateTape'](_0x421f00,_0x2879a2);_0x218407['is']('element')&&_0x2879a2['push']({'item':_0x218407,'type':'elementEnd'});}return _0x2879a2;}['_getState'](){const _0x4d84d0=new Map(this['_touched']),_0x3f2577=new Map(_0x4d84d0),_0xfc6577=new Map(),_0x39956a={'insertions':{},'deletions':{}},_0x2654c7={'insertions':{},'deletions':{}},_0x44b3c1=new Map(),_0x4dc26e=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x4dc26e['delete']('$graveyard');for(const _0x199a58 of _0x4dc26e){const _0x4818f8=this['_diffRoots']['get'](_0x199a58)||F(_0x199a58,!0x1),_0x219b42=this['_baseRoots']['get'](_0x199a58)||F(_0x199a58,!0x1);_0x4818f8['isAttached']()||_0x219b42['isAttached']()?(_0x39956a['insertions'][_0x199a58]=T(_0x4818f8),_0x39956a['deletions'][_0x199a58]=T(_0x219b42),this['_copyMarkers'](_0x39956a['deletions'][_0x199a58],_0x219b42),this['_copyMarkers'](_0x39956a['insertions'][_0x199a58],_0x4818f8),_0x2654c7['insertions'][_0x199a58]=this['_generateTape'](this['_idsRoots']['get'](_0x199a58),[]),_0x2654c7['deletions'][_0x199a58]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x199a58)||F(_0x199a58,!0x1),[])):_0x4dc26e['delete'](_0x199a58);}for(const _0x5d1666 of _0x4dc26e){const _0x4780f1=_0x2654c7['insertions'][_0x5d1666];for(const _0x312c2c of _0x4780f1){const _0x359162=this['_getVidAttributeName'](_0x312c2c),_0x470f2a=_0x312c2c['item']['getAttribute'](_0x359162);_0x3f2577['delete'](_0x470f2a),_0x470f2a>=this['_startingRevisionId']&&_0xfc6577['set'](_0x470f2a,_0x4d84d0['get'](_0x470f2a));}}for(const _0x28b1ec of _0x4dc26e){const _0x1b6e57=_0x2654c7['insertions'][_0x28b1ec],_0x383f7b=this['_getBaseVids'](_0x2654c7['deletions'][_0x28b1ec]);let _0x5b7a70=0x0;for(const _0x5e813d of _0x1b6e57){const _0x5d6494=this['_getVidAttributeName'](_0x5e813d),_0x37250b=_0x5e813d['item']['getAttribute'](_0x5d6494);if(!_0xfc6577['has'](_0x37250b)&&!_0x44b3c1['has'](_0x37250b)){if(_0x3f2577['has'](_0x37250b))_0x5b7a70++;else{if(_0x37250b!=_0x383f7b[_0x5b7a70]){const _0x58831f=_0x4d84d0['get'](_0x37250b)||_0x4d84d0['get'](_0x383f7b[_0x5b7a70]);for(;_0x37250b!=_0x383f7b[_0x5b7a70];)_0x3f2577['has'](_0x383f7b[_0x5b7a70])||(_0x44b3c1['set'](_0x383f7b[_0x5b7a70],_0x58831f),_0x4d84d0['set'](_0x383f7b[_0x5b7a70],_0x58831f)),_0x5b7a70++;}_0x5b7a70++;}}}}for(const _0x3bab62 of _0x4dc26e){const _0x579e01=_0x2654c7['insertions'][_0x3bab62];for(const _0x5eef7d of _0x579e01){const _0x507719=this['_getVidAttributeName'](_0x5eef7d),_0x2973b4=_0x5eef7d['item']['getAttribute'](_0x507719);if(_0x44b3c1['has'](_0x2973b4)){const _0xa2179a=_0x44b3c1['get'](_0x2973b4);_0x3f2577['has'](_0x2973b4)||_0x3f2577['set'](_0x2973b4,{..._0xa2179a}),_0xfc6577['set'](_0x2973b4,{..._0xa2179a});}}}for(const _0x4d2353 of _0x3f2577['keys']())_0x4d2353>=this['_startingRevisionId']&&_0x3f2577['delete'](_0x4d2353);const _0x24e12e=new Map();for(const _0x3f6ad8 of _0x4dc26e){let _0x25284e=_0x2654c7['insertions'][_0x3f6ad8];for(const _0xcc0588 of _0x25284e)if(_0xcc0588['item']['is']('element','tableCell')){const _0x377ee7=this['_getVidAttributeName'](_0xcc0588),_0x4740a9=_0xcc0588['item']['getAttribute'](_0x377ee7);if(_0xfc6577['has'](_0x4740a9)){const _0x273068=_0xcc0588['item']['parent']['parent']['getAttribute']('vid_start'),_0x5cf431=_0x24e12e['get'](_0x273068)||new Set();_0x5cf431['add'](_0xfc6577['get'](_0x4740a9)['userId']),_0x24e12e['set'](_0x273068,_0x5cf431);}}_0x25284e=_0x2654c7['deletions'][_0x3f6ad8];for(const _0x496817 of _0x25284e)if(_0x496817['item']['is']('element','tableCell')){const _0x3684b2=this['_getVidAttributeName'](_0x496817),_0xad0f30=_0x496817['item']['getAttribute'](_0x3684b2);if(_0x3f2577['has'](_0xad0f30)){const _0x3564cf=_0x496817['item']['parent']['parent']['getAttribute']('vid_start'),_0x9eb29a=_0x24e12e['get'](_0x3564cf)||new Set();_0x9eb29a['add'](_0x3f2577['get'](_0xad0f30)['userId']),_0x24e12e['set'](_0x3564cf,_0x9eb29a);}}for(const _0xc0abae of _0x24e12e['keys']())(_0xfc6577['has'](_0xc0abae)||_0x3f2577['has'](_0xc0abae))&&_0x24e12e['delete'](_0xc0abae);}for(const _0x535bed of _0x4dc26e){const _0x2e5879=_0x2654c7['insertions'][_0x535bed];let _0x27afc3=null,_0xc9d95f=null;for(const _0x153a7f of _0x2e5879){const _0x105caf=this['_getVidAttributeName'](_0x153a7f),_0x1cf3e7=_0x153a7f['item']['getAttribute'](_0x105caf),_0x218939=_0x24e12e['get'](_0x1cf3e7);_0x218939&&'elementStart'==_0x153a7f['type']&&(_0x27afc3=Array['from'](_0x218939)[0x0],_0xc9d95f=_0x153a7f['item']['getAttribute']('vid_end')),_0x27afc3&&(_0x3f2577['set'](_0x1cf3e7,{'userId':_0x27afc3}),_0xfc6577['set'](_0x1cf3e7,{'userId':_0x27afc3})),_0x1cf3e7==_0xc9d95f&&(_0x27afc3=null,_0xc9d95f=null);}}const _0x283f2b={},_0x3bb6fb=new Set();for(const _0xf820fd of _0x4dc26e){const _0x57e7e0=_0x39956a['deletions'][_0xf820fd],_0x323b56=_0x39956a['insertions'][_0xf820fd];for(const {userId:_0x7b633a}of this['_touchedMarkers']['values']())null!==_0x7b633a&&_0x3bb6fb['add'](_0x7b633a);for(const {userId:_0x302de8}of this['_touchedRoots']['values']())null!==_0x302de8&&_0x3bb6fb['add'](_0x302de8);this['_markChanges'](_0x323b56,_0x2654c7['insertions'][_0xf820fd],_0xfc6577,'insertion',_0x3bb6fb),this['_markChanges'](_0x57e7e0,_0x2654c7['deletions'][_0xf820fd],_0x3f2577,'deletion',_0x3bb6fb),_0x283f2b[_0xf820fd]={'insertions':this['_prepareViewToSave'](_0x323b56),'deletions':this['_prepareViewToSave'](_0x57e7e0),'attachChange':this['_touchedRoots']['get'](_0xf820fd)||null,'attributesBefore':_0x3bebdd(this['_baseRootsAttributes']['get'](_0xf820fd))||{},'attributesAfter':_0x3bebdd(this['_diffRootsAttributes']['get'](_0xf820fd))};}return{'diffData':_0x283f2b,'authorsIds':Array['from'](_0x3bb6fb)};}['_processRootBeforeSave'](_0x2a3999){for(const [,_0x35876f]of _0x2a3999['markers']){const _0xf20ad7=_0x35876f['start']['getAncestors']()['filter'](_0x5d25a4=>'tableCell'==_0x5d25a4['name']);for(const _0x1a4cfa of _0xf20ad7)0x1==_0x1a4cfa['childCount']&&_0x1a4cfa['getChild'](0x0)['is']('element','paragraph')&&_0x1a4cfa['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x5c3dec){this['_processRootBeforeSave'](_0x5c3dec);const _0x428bc0=this['editor']['data']['toView'](_0x5c3dec,{}),_0x589a6f=Array['from'](_0x428bc0['getChildren']())['map'](_0x3029d8=>this['_getViewJson'](_0x3029d8));return JSON['stringify'](_0x589a6f);}['_getViewJson'](_0x460552){if(_0x460552['is']('$text'))return _0x460552['data'];{const _0x4eaffb=_0x460552;return{'type':Object['keys'](P)['find'](_0xaaadf0=>_0x460552 instanceof P[_0xaaadf0]),'name':_0x4eaffb['name'],'attributes':Array['from'](_0x4eaffb['getAttributes']()),'children':Array['from'](_0x4eaffb['getChildren']())['map'](_0x49e61a=>this['_getViewJson'](_0x49e61a))};}}['_markChanges'](_0x1b24e3,_0x23b785,_0x109552,_0x109a03,_0x1ba646){let _0x5167df=null,_0x125eb4=null,_0x44bdc3=0x0;const _0x38e552=this['editor']['model'];for(let _0x2587c7=0x0;_0x2587c7<_0x23b785['length'];_0x2587c7++){const _0x1b21db=this['_getVidAttributeName'](_0x23b785[_0x2587c7]),_0x2a8712=_0x23b785[_0x2587c7]['item']['getAttribute'](_0x1b21db),_0x5834ab=_0x109552['get'](_0x2a8712),_0x206f2a=_0x2587c7==_0x23b785['length']-0x1;(!_0x5167df&&_0x5834ab&&(_0x5167df=_0x5834ab,_0x125eb4=_0x23b785[_0x2587c7]),_0x5167df&&(!_0x5834ab||_0x5834ab['userId']!=_0x5167df['userId']))&&(_0x5ee37f(_0x5834ab,B(_0x125eb4,_0x1b24e3,_0x38e552),B(_0x23b785[_0x2587c7],_0x1b24e3,_0x38e552)),_0x5167df=_0x5834ab||null,_0x125eb4=_0x5834ab?_0x23b785[_0x2587c7]:null),_0x5167df&&_0x206f2a&&_0x5ee37f(_0x5834ab,B(_0x125eb4,_0x1b24e3,_0x38e552),J(_0x23b785[_0x2587c7],_0x1b24e3,_0x38e552));}function _0x5ee37f(_0x40b2b7,_0x56b12b,_0x2da52a){const _0x178416=_0x5167df['userId'],_0x55647b='revision:'+_0x109a03+':'+_0x178416+':'+_0x44bdc3++,_0x18fd93=_0x38e552['createRange'](_0x56b12b,_0x2da52a);_0x1b24e3['markers']['set'](_0x55647b,_0x18fd93),null!==_0x178416&&_0x1ba646['add'](_0x178416);}}['_getVidAttributeName'](_0x22aa34){switch(_0x22aa34['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x3bf09a,_0x225767){_0x3bf09a['baseVersion']=null;for(const _0x306166 in _0x3bf09a){const _0x368dc3=_0x3bf09a[_0x306166];if(_0x368dc3 instanceof gt){const _0x1c5c44=_0x225767['get'](_0x368dc3['root']['rootName']);_0x3bf09a[_0x306166]=this['_fixPosition'](_0x368dc3,_0x1c5c44);}if(_0x368dc3 instanceof vt){const _0x296699=_0x225767['get'](_0x368dc3['root']['rootName']);_0x3bf09a[_0x306166]=this['_fixRange'](_0x368dc3,_0x296699);}'root'===_0x306166&&(_0x3bf09a['root']=_0x225767['get'](_0x3bf09a['root']['rootName']));}}['_fixRange'](_0x2ecd17,_0x171662){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2ecd17['start'],_0x171662),this['_fixPosition'](_0x2ecd17['end'],_0x171662));}['_fixPosition'](_0x1036b7,_0x1116ec){return this['editor']['model']['createPositionFromPath'](_0x1116ec,_0x1036b7['path'],_0x1036b7['stickiness']);}['_handleInsertOperation'](_0x4bc474){const _0x423d3f=this['_idsRoots']['get'](_0x4bc474['position']['root']['rootName']),_0x4e500b=this['_fixPosition'](_0x4bc474['position'],_0x423d3f),_0xf4a369=null===_0x4bc474['_authorId']?null:_0x4bc474['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3c3319=_0x4e500b['parent'],_0x381672=this['_revisionId'],_0x2844ac=[];for(const _0x371192 of _0x4bc474['nodes'])if(_0x371192['is']('element'))_0x2844ac['push'](this['_makeIdsRoot'](_0x371192));else{for(let _0x5e37b6=0x0;_0x5e37b6<_0x371192['offsetSize'];_0x5e37b6++)_0x2844ac['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x506ed3=this['_revisionId'];for(let _0x17484e=_0x381672;_0x17484e<_0x506ed3;_0x17484e++)this['_touched']['set'](_0x17484e,{'userId':_0xf4a369});_0x3c3319['_insertChild'](_0x4e500b['offset'],_0x2844ac);}['_handleMoveOperation'](_0x128e24){(_0x128e24=this['_cloneOperation'](_0x128e24,this['_idsRoots']))['_execute']();const _0x2c4455=null===_0x128e24['_authorId']?null:_0x128e24['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4df2ee=_0x128e24['getMovedRangeStart'](),_0x37b372=_0x4df2ee['parent'],_0x53e602=_0x4df2ee['offset'];!function _0x110f18(_0x2a683e,_0x3a9fe4,_0x520330,_0x9f5251){for(let _0x5f1990=_0x520330;_0x5f1990<_0x9f5251;_0x5f1990++){const _0x50f9d9=_0x3a9fe4['getChild'](_0x5f1990);_0x50f9d9['is']('element','$text')?_0x2a683e['set'](_0x50f9d9['getAttribute']('vid'),{'userId':_0x2c4455}):(_0x2a683e['set'](_0x50f9d9['getAttribute']('vid_start'),{'userId':_0x2c4455}),_0x110f18(_0x2a683e,_0x50f9d9,0x0,_0x50f9d9['childCount']),_0x2a683e['set'](_0x50f9d9['getAttribute']('vid_end'),{'userId':_0x2c4455}));}}(this['_touched'],_0x37b372,_0x53e602,_0x53e602+_0x128e24['howMany']);}['_handleMergeOperation'](_0x7edc27){const _0x7b54df=null===(_0x7edc27=this['_cloneOperation'](_0x7edc27,this['_idsRoots']))['_authorId']?null:_0x7edc27['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d69b8=_0x7edc27['targetPosition']['parent'],_0x4962d3=_0x7edc27['sourcePosition']['parent'],_0x305606=_0x4d69b8['getAttribute']('vid_end'),_0x3ec6b9=_0x4962d3['getAttribute']('vid_start');_0x4d69b8['_setAttribute']('vid_end',_0x4962d3['getAttribute']('vid_end')),_0x4962d3['_setAttribute']('vid_end',_0x305606),this['_touched']['set'](_0x3ec6b9,{'userId':_0x7b54df}),this['_touched']['set'](_0x305606,{'userId':_0x7b54df}),_0x7edc27['_execute']();}['_handleSplitOperation'](_0x3ac52c){const _0x441437=null===(_0x3ac52c=this['_cloneOperation'](_0x3ac52c,this['_idsRoots']))['_authorId']?null:_0x3ac52c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x582cc8=_0x3ac52c['graveyardPosition'],_0xf33631=_0x3ac52c['splitPosition']['parent'];_0x3ac52c['_execute']();const _0x3fea01=_0xf33631['getAttribute']('vid_end'),_0x15f9bf=_0x3ac52c['insertionPosition']['nodeAfter'];if(_0x582cc8){const _0xc80fcf=_0x15f9bf['getAttribute']('vid_end'),_0x43b12e=_0xf33631['getAttribute']('vid_end');_0xf33631['_setAttribute']('vid_end',_0xc80fcf),_0x15f9bf['_setAttribute']('vid_end',_0x43b12e),this['_touched']['set'](_0xf33631['getAttribute']('vid_end'),{'userId':_0x441437}),this['_touched']['set'](_0x15f9bf['getAttribute']('vid_start'),{'userId':_0x441437});}else{const _0xb29f85=this['_revisionId']++,_0x39eaf5=this['_revisionId']++;_0xf33631['_setAttribute']('vid_end',_0xb29f85),_0x15f9bf['_setAttribute']('vid_start',_0x39eaf5),_0x15f9bf['_setAttribute']('vid_end',_0x3fea01),this['_touched']['set'](_0xb29f85,{'userId':_0x441437}),this['_touched']['set'](_0x39eaf5,{'userId':_0x441437});}}['_handleMarkerOperation'](_0x340450){if(!_0x340450['affectsData'])return;const _0x51baf1=(_0x340450=this['_cloneOperation'](_0x340450,this['_diffRoots']))['oldRange']?_0x340450['oldRange']['root']:null,_0x2ef30c=_0x340450['newRange']?_0x340450['newRange']['root']:null;_0x51baf1&&this['_markers']['delete'](_0x340450['name']),_0x2ef30c&&this['_markers']['set'](_0x340450['name'],_0x340450['newRange']['clone']());const _0x288c64=null===_0x340450['_authorId']?null:_0x340450['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4f9833=_0x340450['name'];if(!this['_touchedMarkers']['has'](_0x4f9833))return void this['_touchedMarkers']['set'](_0x4f9833,{'range':_0x340450['oldRange'],'userId':_0x288c64});const _0x1098ea=this['_touchedMarkers']['get'](_0x4f9833),_0x561af3=_0x1098ea['range'],_0x56f219=_0x340450['newRange'];null==_0x561af3&&null==_0x56f219||_0x561af3&&_0x56f219&&_0x561af3['isEqual'](_0x56f219)?this['_touchedMarkers']['delete'](_0x340450['name']):_0x1098ea['userId']=_0x288c64;}['_handleRootOperation'](_0x47e4fd,_0x1e0826){this['_diffRoots']['has'](_0x47e4fd['rootName'])?this['_diffRoots']['get'](_0x47e4fd['rootName'])['_isAttached']=_0x47e4fd['isAdd']:(this['_diffRoots']['set'](_0x47e4fd['rootName'],F(_0x47e4fd['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x47e4fd['rootName'],{}),_0x1e0826&&this['_idsRoots']['set'](_0x47e4fd['rootName'],F(_0x47e4fd['rootName'],!0x0)));const _0x189a1c=null===_0x47e4fd['_authorId']?null:_0x47e4fd['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1f7770=this['_touchedRoots']['get'](_0x47e4fd['rootName']);_0x1f7770&&_0x1f7770['userId']===_0x189a1c?this['_touchedRoots']['delete'](_0x47e4fd['rootName']):this['_touchedRoots']['set'](_0x47e4fd['rootName'],{'userId':_0x189a1c,'isAttached':_0x47e4fd['isAdd']});}['_handleRootAttributeOperation'](_0x5dc038){const _0x4b26bd=this['_diffRootsAttributes']['get'](_0x5dc038['root']['rootName']);null===_0x5dc038['newValue']?delete _0x4b26bd[_0x5dc038['key']]:_0x4b26bd[_0x5dc038['key']]=_0x5dc038['newValue'];}}function T(_0x22c168){const _0x510b4a=F(_0x22c168['rootName'],_0x22c168['isAttached']());for(const _0x373324 of _0x22c168['getChildren']()){const _0x3690bb=_0x373324['_clone'](!0x0);_0x510b4a['_appendChild'](_0x3690bb);}return _0x510b4a;}function F(_0x577403,_0x366661=!0x0){const _0x32a47e=new mt();return _0x32a47e['rootName']=_0x577403,_0x32a47e['_isAttached']=_0x366661,_0x32a47e['isAttached']=()=>_0x32a47e['_isAttached'],_0x32a47e;}function B(_0x19f81c,_0x14c7e2,_0x2dd307){const _0x2760bb='elementEnd'==_0x19f81c['type']?_0x2dd307['createPositionAt'](_0x19f81c['item'],'end'):_0x2dd307['createPositionBefore'](_0x19f81c['item']);return _0x2dd307['createPositionFromPath'](_0x14c7e2,_0x2760bb['path'],_0x2760bb['stickiness']);}function J(_0x270060,_0x4fad32,_0xb21ed2){const _0x1ca072='elementStart'==_0x270060['type']?_0xb21ed2['createPositionAt'](_0x270060['item'],0x0):_0xb21ed2['createPositionAfter'](_0x270060['item']);return _0xb21ed2['createPositionFromPath'](_0x4fad32,_0x1ca072['path'],_0x1ca072['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x3f9d02,_0xfc011a){super(_0x3f9d02),this['focusTracker']=new _0x4cb843(),this['keystrokes']=new _0x162a7a(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0xfc011a),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x52e3fd(this);}['render'](){super['render'](),_0x4d8186({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x2285c0=_0x4d454e=>_0x4d454e['stopPropagation']();this['keystrokes']['set']('arrowright',_0x2285c0),this['keystrokes']['set']('arrowleft',_0x2285c0),this['keystrokes']['set']('arrowup',_0x2285c0),this['keystrokes']['set']('arrowdown',_0x2285c0);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x491c1e){this['revisionNameInputView']['fieldView']['element']['value']=_0x491c1e['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x39e034){const _0x16e028=new _0x3701ba(this['locale'],_0x21eb44),_0x2d4cfa=_0x16e028['fieldView'];_0x2d4cfa['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x9c4053=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x39e034&&(_0x9c4053+='\x20('+m(this['locale'],'optional')+')'),(_0x16e028['label']=_0x9c4053,_0x2d4cfa['on']('input',()=>{this['revisionNameInputValue']=_0x2d4cfa['element']['value']['trim']();}),_0x16e028);}}class u extends _0x3494fb{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x258ad1=this['editor'],_0x27cff7=_0x258ad1['plugins']['get']('RevisionTracker');_0x258ad1['ui']['componentFactory']['add']('revisionHistory',_0x1f859b=>{const _0x677f12=_0x31f333(_0x1f859b),_0x5ea333=_0x677f12['panelView']['children'],_0x1e5dc1=new _0x3be14a(_0x1f859b),_0x2bd70a=new _0x37fdfc(_0x1f859b),_0x3cb2c3=new te(_0x1f859b),_0x5513bb=new _0x37fdfc(_0x1f859b),_0x1b99d3=new te(_0x1f859b);return _0x677f12['bind']('isEnabled')['to'](_0x27cff7,'isReady',_0x27cff7,'isEnabled',_0x258ad1,'isReadOnly',(_0x693398,_0x1a09c4,_0xe391f6)=>_0x693398&&_0x1a09c4&&!_0xe391f6),_0x677f12['buttonView']['set']({'icon':_0x351c88['history'],'label':m(_0x1f859b,'Revision\x20history'),'tooltip':!0x0}),_0x3cb2c3['set']({'label':m(_0x1f859b,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x3cb2c3['bind']('isEnabled')['to'](_0x27cff7,'isReady',_0x27cff7,'isEnabled',_0x258ad1,'isReadOnly',(_0x22e44f,_0x141b7f,_0x1d0d8f)=>_0x22e44f&&_0x141b7f&&!_0x1d0d8f),_0x3cb2c3['on']('execute',()=>this['_showDialog']()),_0x1b99d3['set']({'label':m(_0x1f859b,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x1b99d3['bind']('isEnabled')['to'](_0x27cff7,'isReady',_0x258ad1,'isReadOnly',(_0x2a7a9c,_0x4b7981)=>_0x2a7a9c&&!_0x4b7981),_0x1b99d3['on']('execute',()=>{_0x258ad1['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x677f12['isOpen']=!0x1,_0x258ad1['editing']['view']['focus']();}),_0x2bd70a['children']['add'](_0x3cb2c3),_0x5513bb['children']['add'](_0x1b99d3),_0x1e5dc1['role']='menu',_0x1e5dc1['items']['addMany']([_0x2bd70a,_0x5513bb]),_0x5ea333['add'](_0x1e5dc1),_0x677f12;}),_0x258ad1['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x14b351=this['editor'],_0x813ca0=_0x14b351['locale'],_0x4d274a=new _0x3f9623(_0x813ca0),_0x50d956=new _0x2db903(_0x813ca0);_0x4d274a['buttonView']['set']({'icon':_0x351c88['history'],'label':m(_0x813ca0,'Revision\x20history')});const _0x453c6c=new _0x265cfc(_0x813ca0,_0x4d274a),_0x5adb55=new _0x2a0176(_0x813ca0);_0x5adb55['set']({'label':m(_0x813ca0,'Save\x20current\x20revision')}),_0x5adb55['delegate']('execute')['to'](_0x4d274a),_0x5adb55['on']('execute',()=>{this['_showDialog']();}),_0x453c6c['children']['add'](_0x5adb55),_0x50d956['items']['add'](_0x453c6c);const _0x477ca0=new _0x265cfc(_0x813ca0,_0x4d274a),_0x37f6c7=new _0x2a0176(_0x813ca0);return _0x37f6c7['set']({'label':m(_0x813ca0,'Open\x20revision\x20history')}),_0x37f6c7['delegate']('execute')['to'](_0x4d274a),_0x37f6c7['on']('execute',()=>{_0x14b351['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x477ca0['children']['add'](_0x37f6c7),_0x50d956['items']['add'](_0x477ca0),_0x4d274a['panelView']['children']['add'](_0x50d956),_0x4d274a;}['_showDialog'](){const _0xd00021=this['editor'],_0x8fe911=_0xd00021['locale'],_0x448862=_0xd00021['plugins']['get']('Dialog'),_0x457418=_0xd00021['plugins']['get']('RevisionTracker');function _0x2e8571(_0x13e4a4){_0xd00021['config']['get']('revisionHistory.requireRevisionName')&&''===_0x13e4a4['revisionName']?_0x13e4a4['revisionNameInputView']['errorText']=m(_0x8fe911,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0xd00021['plugins']['get'](l)['saveRevision']({'name':_0x13e4a4['revisionName']}),_0x448862['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x2e8571(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x448862['show']({'id':'revisionSave','title':m(_0x8fe911,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0xd00021['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x448862['hide']()},{'label':m(_0xd00021['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5d1d58){_0x5d1d58['bind']('isEnabled')['to'](_0x457418,'isReady',_0x457418,'isEnabled',_0xd00021,'isReadOnly',(_0x465c84,_0x549066,_0x4bc958)=>_0x465c84&&_0x549066&&!_0x4bc958);},'onExecute':()=>_0x2e8571(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x316bc3=this['editor'],_0x425e24=_0x316bc3['locale'];this['_saveRevisionFormView']=new hs(_0x425e24,_0x316bc3['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends ts{['changeId'];['_model'];constructor(_0x2c5722,_0x490116){super(_0x2c5722),this['_model']=_0x490116,this['changeId']=_0x490116['id'];const _0x175f4d=this['bindTemplate'],_0x3b96dc=m(_0x2c5722,_0x490116['data']['isSuggestion']?'Suggested\x20by':'add'==_0x490116['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x490116['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x175f4d['to']('type',_0x38cba8=>'ck-revision-change__'+_0x38cba8)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x3b96dc}]},{'text':'\x20'+_0x490116['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
+ _0x2efc47(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2f425c){super(),this['id']=_0x2f425c['id']||_0x370f5b(),this['author']=_0x2f425c['author'],this['type']=_0x2f425c['type'],this['data']=_0x2f425c['data']||{},this['rootName']=_0x2f425c['rootName'],this['set']('createdAt',_0x2f425c['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(_0x4e23b4,_0x1e536d){this['newRevisionId']=_0x4e23b4,this['oldRevisionId']=_0x1e536d,this['changes']=new _0x1aa1e7();}['_setChanges'](_0x4bfd02){for(const _0x1c89bd of _0x4bfd02)this['changes']['add'](_0x1c89bd);}}const Y={'c':_0x4085a3,'a':_0x21393e,'e':_0x55b6d9,'r':_0x156c3d,'u':_0x10755e};class d extends _0x3494fb{['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[_0x550701,_0x5233a0,j];}constructor(_0x1a203f){super(_0x1a203f),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',(_0x5047cc,_0x49701d,_0x4a570b)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3645d9=>{for(const _0x1e5f59 of this['editor']['editing']['view']['document']['roots'])_0x4a570b?_0x3645d9['removeClass']('ck-editor__editable__overlay',_0x1e5f59):_0x3645d9['addClass']('ck-editor__editable__overlay',_0x1e5f59);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x444238=>null!==_0x444238),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3eee4e,_0x36f672,_0x135666)=>_0x3eee4e&&_0x135666?_0x36f672['changes']['getIndex'](_0x135666):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0xa29ba1,_0x1f7003)=>_0xa29ba1?_0x1f7003['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x5233a0);}['init'](){const _0x31ebdb=this['editor'],_0x54df68=new _t(_0x31ebdb,{'direction':'backward'}),_0x2a6eb1=new _t(_0x31ebdb,{'direction':'forward'});(_0x31ebdb['commands']['add']('showPreviousChange',_0x54df68),_0x31ebdb['commands']['add']('showNextChange',_0x2a6eb1),_0x31ebdb['commands']['add']('restoreRevision',new pt(_0x31ebdb)),this['on']('change:numberOfChanges',()=>{_0x54df68['refresh'](),_0x2a6eb1['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x31ebdb['enableReadOnlyMode']('revision-viewer'),_0x31ebdb['plugins']['has']('WidgetToolbarRepository'))&&_0x31ebdb['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x5a86ac){await this['loadRevisionData'](_0x5a86ac);const _0x53fbe7={};for(const _0x19f708 in _0x5a86ac['diffData']){if(_0x5a86ac['diffData'][_0x19f708]['attachChange']&&!_0x5a86ac['diffData'][_0x19f708]['attachChange']['isAttached'])continue;const _0x5914e7=this['_removeRevisionMarkers'](JSON['parse'](_0x5a86ac['diffData'][_0x19f708]['insertions'])),_0x1167e2=this['editor']['editing']['view']['document'],_0x41107d=new _0x2c3601(_0x1167e2,_0x5914e7['map'](_0x25cc40=>this['_getViewObj'](_0x25cc40)));this['editor']['data']['processor']['useFillerType']('marked'),_0x53fbe7[_0x19f708]=this['editor']['data']['processor']['toData'](_0x41107d),this['editor']['data']['processor']['useFillerType']('default');}return _0x53fbe7;}async['getRevisionRootsAttributes'](_0x30acdb){await this['loadRevisionData'](_0x30acdb);const _0x8ce5b={};for(const _0x25cdc1 in _0x30acdb['diffData'])_0x30acdb['diffData'][_0x25cdc1]['attachChange']&&!_0x30acdb['diffData'][_0x25cdc1]['attachChange']['isAttached']||(_0x8ce5b[_0x25cdc1]=_0x30acdb['diffData'][_0x25cdc1]['attributesAfter']||{});return _0x8ce5b;}['_removeRevisionMarkers'](_0x132032){return(_0x132032=_0x132032['filter'](_0x415dc2=>!_0x415dc2['name']||'revision-start'!==_0x415dc2['name']&&'revision-end'!==_0x415dc2['name']))['forEach'](_0x14a792=>{'string'!=typeof _0x14a792&&(_0x14a792['children']=this['_removeRevisionMarkers'](_0x14a792['children']),_0x14a792['attributes']=_0x14a792['attributes']['filter'](_0x551b22=>!_0x551b22[0x0]['startsWith']('data-revision-')));}),_0x132032;}async['compare'](_0x27ae1a,_0x5c5841,_0x179381=!0x1){if(!this['isEnabled'])return;const _0x50d751=this['diff'],_0x136ff2=this['repository'],_0x189839='string'==typeof _0x27ae1a?_0x136ff2['getRevision'](_0x27ae1a):_0x27ae1a,_0xaaa5ef='string'==typeof _0x5c5841?_0x136ff2['getRevision'](_0x5c5841):_0x5c5841,_0x21e243=_0x189839['id'],_0x411e03=_0xaaa5ef?_0xaaa5ef['id']:null;if(!_0x179381&&this['diff']&&this['diff']['newRevisionId']===_0x21e243&&this['diff']['oldRevisionId']===_0x411e03)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x21e243,_0x411e03);const _0x1a2f4a=this['_getRevisionsRange'](_0x189839,_0xaaa5ef,!0x0)['map'](_0x48a88a=>this['loadRevisionData'](_0x48a88a));return _0x1a2f4a['push'](new Promise(_0x3d67ea=>{setTimeout(_0x3d67ea,0x14);})),Promise['all'](_0x1a2f4a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x425ac0=this['_getDiff'](_0x21e243,_0x411e03);for(const _0x3dd477 of _0x425ac0['changes'])this['_changeIdToChange']['set'](_0x3dd477['id'],_0x3dd477);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5918d8=>{for(const _0x537a7d of this['editor']['model']['document']['getRootNames']())_0x5918d8['detachRoot'](_0x537a7d);for(const _0xebfa21 of Object['keys'](_0x425ac0['model'])){const _0x2db9eb=_0x5918d8['addRoot'](_0xebfa21);for(const _0x3a394e of Object['keys'](_0x425ac0['attributes'][_0xebfa21]))_0x5918d8['setAttribute'](_0x3a394e,_0x425ac0['attributes'][_0xebfa21][_0x3a394e],_0x2db9eb);_0x5918d8['insert'](_0x425ac0['model'][_0xebfa21],_0x2db9eb,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x425ac0['changes'])),this['isReady']=!0x0;})['catch'](_0x3cfeab=>{console['error'](_0x3cfeab),this['_cleanUp'](),_0x50d751&&(this['diff']=_0x50d751),this['isReady']=!0x0;});}['addRevisionData'](_0x15ee21,_0x10baf1){const _0x464afa=this['repository']['createRevision'](_0x15ee21);return _0x464afa['on']('_update',(_0x3580b4,_0x2a0711,_0x55c62e)=>_0x10baf1(_0x2a0711,_0x55c62e,_0x464afa)),this['repository']['addRevision'](_0x464afa),_0x464afa;}['loadRevisionData'](_0x4fd0b2){if(!_0x4fd0b2||_0x4fd0b2['diffData'])return Promise['resolve']();{const _0x9e5ed8=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x9e5ed8,'revisionId':_0x4fd0b2['id']})['then'](_0x2236f2=>{_0x4fd0b2['_update']({'diffData':_0x2236f2['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},_0xc61acc=>{for(const _0x4f0e1c of this['editor']['model']['document']['getRootNames']())_0xc61acc['detachRoot'](_0x4f0e1c);});}['_sortAndFilterDiffChanges'](_0x2e05b3){const _0x593a9c=[],_0x41d1b0=new Map();for(const _0x14c8c4 of this['editor']['model']['document']['getRootNames']()){const _0x3a71fa=this['editor']['editing']['view']['getDomRoot'](_0x14c8c4);if(!_0x3a71fa)continue;const _0x976689=_0x3a71fa['getClientRects']()['item'](0x0);_0x976689&&(_0x593a9c['push'](_0x14c8c4),_0x41d1b0['set'](_0x14c8c4,_0x976689));}return _0x593a9c['sort']((_0x363152,_0x535ec0)=>{const _0x43fd3a=_0x41d1b0['get'](_0x363152),_0x3b79f1=_0x41d1b0['get'](_0x535ec0);return _0x43fd3a['y']-_0x3b79f1['y']||_0x43fd3a['x']-_0x3b79f1['x'];}),(_0x2e05b3=_0x2e05b3['filter'](_0x13e546=>_0x593a9c['includes'](_0x13e546['rootName'])))['sort']((_0x178e74,_0x347326)=>_0x593a9c['indexOf'](_0x178e74['rootName'])-_0x593a9c['indexOf'](_0x347326['rootName'])),_0x2e05b3;}['_makeTape'](_0x9cc7a7){const _0x3a72bc=Array['from'](_0x9cc7a7['markers'])['filter'](([_0x418599,_0x1f4fa3])=>_0x418599['startsWith']('revision:')&&!_0x1f4fa3['isCollapsed']),_0x30f825=Array['from'](this['editor']['model']['createRangeIn'](_0x9cc7a7)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3a72bc['length'])for(const _0x4ec48b of _0x30f825){const [_0x18923c,_0x34eade]=_0x3a72bc[0x0],[,_0x447ca1,_0x3b289a]=_0x18923c['split'](':');if(_0x34eade['end']['isEqual'](_0x4ec48b['nextPosition'])&&_0x3a72bc['shift'](),(_0x4ec48b['previousPosition']['isEqual'](_0x34eade['start'])||_0x4ec48b['previousPosition']['isAfter'](_0x34eade['start']))&&('insertion'==_0x447ca1?_0x4ec48b['isAdded']={'userId':_0x3b289a}:'deletion'==_0x447ca1&&(_0x4ec48b['isRemoved']={'userId':_0x3b289a})),0x0==_0x3a72bc['length'])break;}return _0x30f825;}['_refreshStartEndIndex'](_0xc8e47a){const _0xea4f36=new Map();for(let _0x4774ee=0x0;_0x4774ee<_0xc8e47a['length'];_0x4774ee++)'text'===_0xc8e47a[_0x4774ee]['type']?(_0xc8e47a[_0x4774ee]['item']['startIndex']=_0x4774ee,_0xc8e47a[_0x4774ee]['item']['endIndex']=_0x4774ee):('elementStart'===_0xc8e47a[_0x4774ee]['type']?_0xc8e47a[_0x4774ee]['item']['startIndex']=_0x4774ee:'elementEnd'===_0xc8e47a[_0x4774ee]['type']&&(_0xc8e47a[_0x4774ee]['item']['endIndex']=_0x4774ee),_0xea4f36['set'](_0xc8e47a[_0x4774ee]['id'],_0x4774ee));for(const _0x1f3a05 of _0xea4f36['values']())'elementStart'===_0xc8e47a[_0x1f3a05]['type']?_0xc8e47a[_0x1f3a05]['item']['endIndex']=_0xea4f36['get'](_0xc8e47a[_0x1f3a05]['pairId']):'elementEnd'===_0xc8e47a[_0x1f3a05]['type']&&(_0xc8e47a[_0x1f3a05]['item']['startIndex']=_0xea4f36['get'](_0xc8e47a[_0x1f3a05]['pairId']));}['_processTape'](_0xf5d08f){for(let _0x54494a=0x0;_0x54494a<_0xf5d08f['length'];_0x54494a++){if('elementStart'===_0xf5d08f[_0x54494a]['type'])_0xf5d08f[_0x54494a]['item']['startIndex']=_0x54494a;else{if('elementEnd'===_0xf5d08f[_0x54494a]['type']){_0xf5d08f[_0x54494a]['item']['endIndex']=_0x54494a;const _0x309315=_0xf5d08f[_0x54494a]['item']['startIndex'];_0xf5d08f[_0x309315]['pairId']=_0xf5d08f[_0x54494a]['id'],_0xf5d08f[_0x54494a]['pairId']=_0xf5d08f[_0x309315]['id'];}else _0xf5d08f[_0x54494a]['item']['startIndex']=_0x54494a,_0xf5d08f[_0x54494a]['item']['endIndex']=_0x54494a,_0xf5d08f[_0x54494a]['pairId']=null;}_0xf5d08f[_0x54494a]['markersStart']||(_0xf5d08f[_0x54494a]['markersStart']=[],_0xf5d08f[_0x54494a]['markersEnd']=[]);}}['_markInsertions'](_0x5368fe,_0x8512f4){const _0x310c0f=_0x5368fe['filter'](_0x1e74fe=>!_0x1e74fe['isAdded']);for(let _0x4a24be=0x0;_0x4a24be<_0x8512f4['length'];_0x4a24be++)_0x8512f4[_0x4a24be]['isAdded']&&(_0x310c0f[_0x4a24be]['isAdded']=_0x8512f4[_0x4a24be]['isAdded']);}['_makeModelFromViewString'](_0x54cbd6){const _0x29b663=JSON['parse'](_0x54cbd6),_0x292ab6=this['editor']['editing']['view']['document'],_0x1384e0=new _0x2c3601(_0x292ab6,_0x29b663['map'](_0x36ac08=>this['_getViewObj'](_0x36ac08)));return this['editor']['data']['toModel'](_0x1384e0);}['_getViewObj'](_0x558777){const _0x51a5d4=this['editor']['editing']['view']['document'];if('string'==typeof _0x558777)return new _0x6c429f(_0x51a5d4,_0x558777);{const _0x2d4b2c=_0x558777['children']['map'](_0x4154b1=>this['_getViewObj'](_0x4154b1));return new(Y[_0x558777['type']]||_0xcb3cb1)(_0x51a5d4,_0x558777['name'],_0x558777['attributes'],_0x2d4b2c);}}['_getDiff'](_0x31a1e5,_0x42ef30=null){const _0x3810f6=this['repository']['getRevision'](_0x31a1e5),_0x366e16=_0x42ef30?this['repository']['getRevision'](_0x42ef30):null,_0x3f5c50=this['_getRevisionsRange'](_0x3810f6,_0x366e16),_0x61daf3=_0x3f5c50[_0x3f5c50['length']-0x1],_0x27f37b=new Map(),_0x465bcd={'model':{},'attributes':{},'changes':[]},_0x3c8af0=new Set(),_0x1113ff=new Map();for(let _0x2a7038=_0x3f5c50['length']-0x1;_0x2a7038>=0x0;_0x2a7038--){const _0x25afff=_0x3f5c50[_0x2a7038];for(const _0x689163 of Object['keys'](_0x25afff['diffData']))if(_0x25afff['diffData'][_0x689163]['attachChange']){const _0x391819=_0x25afff['diffData'][_0x689163]['attachChange'];_0x391819['isAttached']?(_0x3c8af0['add'](_0x689163),_0x1113ff['has'](_0x689163)&&_0x1113ff['get'](_0x689163)['userId']==_0x391819['userId']?_0x1113ff['delete'](_0x689163):_0x1113ff['set'](_0x689163,_0x391819)):_0x1113ff['has'](_0x689163)?(_0x3c8af0['delete'](_0x689163),_0x1113ff['delete'](_0x689163)):(_0x3c8af0['add'](_0x689163),_0x1113ff['set'](_0x689163,_0x391819));}else _0x3c8af0['add'](_0x689163);}for(const _0x565269 of _0x3c8af0){const _0x4a93c3=_0x1113ff['has'](_0x565269)&&!_0x1113ff['get'](_0x565269)['isAttached'];let _0xa26085=_0x4a93c3?_0x3f5c50['length']-0x1:0x0;const _0x289367=_0x4a93c3?-0x1:0x1;for(;_0x3f5c50[_0xa26085];){const _0x252a1f=_0x3f5c50[_0xa26085];if(_0x252a1f['diffData'][_0x565269]){const _0xdcf325=_0x4a93c3?_0x252a1f['diffData'][_0x565269]['attributesBefore']:_0x252a1f['diffData'][_0x565269]['attributesAfter'];_0x465bcd['attributes'][_0x565269]=_0xdcf325?_0x3bebdd(_0xdcf325):{};break;}_0xa26085+=_0x289367;}}for(const _0x3cb21d of _0x3f5c50){_0x3cb21d['model']={};for(const _0x4b0355 of _0x3cb21d['authors'])_0x27f37b['set'](_0x4b0355['id'],_0x4b0355);for(const _0x4fef3e of _0x3c8af0){const _0x4e0add=_0x3cb21d['diffData'][_0x4fef3e]?_0x3cb21d['diffData'][_0x4fef3e]['insertions']:'[]',_0x5c6e8d=_0x3cb21d['diffData'][_0x4fef3e]?_0x3cb21d['diffData'][_0x4fef3e]['deletions']:'[]';_0x3cb21d['model'][_0x4fef3e]={'insertions':this['_makeModelFromViewString'](_0x4e0add),'deletions':this['_makeModelFromViewString'](_0x5c6e8d)};}}for(const _0x4f519a of _0x3c8af0){let _0x3e504d=null,_0x2921e1=0x0;const _0x40a048=new Map(Array['from'](_0x3810f6['model'][_0x4f519a]['insertions']['markers'])['filter'](([_0x6cc6b4])=>!_0x6cc6b4['startsWith']('revision:')));let _0x314f7d=0x0;for(const _0x1a6081 of _0x3f5c50){const _0xfcd058=this['_makeTape'](_0x1a6081['model'][_0x4f519a]['insertions']);_0x1a6081==_0x3810f6?(_0x3e504d=_0xfcd058,_0x2921e1=_0x3e504d['length'],_0x3e504d['forEach'](_0x1701d6=>{_0x1701d6['id']=_0x314f7d++;}),this['_processTape'](_0x3e504d)):this['_markInsertions'](_0x3e504d,_0xfcd058);const _0x145198=_0x3e504d['filter'](_0x5bbb76=>!_0x5bbb76['isAdded'])['map'](_0x5806e5=>_0x5806e5['id']);let _0x1bb140=0x0;const _0x4806fc=this['_makeTape'](_0x1a6081['model'][_0x4f519a]['deletions']);_0x4806fc['forEach'](_0x5b2ffa=>{_0x5b2ffa['isRemoved']?_0x5b2ffa['id']=_0x2921e1++:_0x5b2ffa['id']=_0x145198[_0x1bb140++];}),this['_processTape'](_0x4806fc),this['_setDistance'](_0x3e504d,'isAdded'),this['_setDistance'](_0x4806fc,'isRemoved'),_0x1a6081==_0x3810f6&&this['_markMarkers'](_0x3e504d,_0x40a048),_0x3e504d=this['_joinTapes'](_0x3e504d,_0x4806fc),this['_refreshStartEndIndex'](_0x3e504d),this['_setDistance'](_0x3e504d,'isRemoved');}_0x3e504d=_0x3e504d['filter'](_0x11bab3=>!(_0x11bab3['isAdded']&&_0x11bab3['isRemoved']));const _0x307643=new Map(_0x61daf3['model'][_0x4f519a]['deletions']['markers']),_0x5ee759=new Set(_0x40a048['keys']());for(const _0x1e3c16 of _0x307643['keys']())_0x5ee759['delete'](_0x1e3c16);this['_markSuggestions'](_0x3e504d,_0x5ee759),this['_fixObsoleteTags'](_0x3e504d),_0x3e504d=this['_removeMissingPairs'](_0x3e504d),_0x3e504d=this['_markMismatchedRemovedTags'](_0x3e504d),_0x3e504d=this['_removeUnsupportedChanges'](_0x3e504d);const {root:_0x1e5d5d,changes:_0x4f8f77}=this['_makeModelFromTape'](_0x3e504d,_0x27f37b,_0x4f519a);_0x465bcd['model'][_0x4f519a]=_0x1e5d5d;const _0x4c2820=_0x1113ff['get'](_0x4f519a);if(_0x4c2820){const _0x34ae95=_0x27f37b['get'](_0x4c2820['userId']),_0x50610e=new r({'author':_0x34ae95,'type':_0x4c2820['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x4f519a});_0x4f8f77['unshift'](_0x50610e),_0x465bcd['attributes'][_0x4f519a]['revisionHistoryAttachChange']=_0x50610e['id'];}_0x465bcd['changes']=_0x465bcd['changes']['concat'](_0x4f8f77);}return _0x465bcd;}['_markMarkers'](_0x2d9e34,_0x312bb0){for(let _0x3beb84=0x0;_0x3beb84<_0x2d9e34['length'];_0x3beb84++)for(const [_0x350585,_0x1f569a]of _0x312bb0)_0x1f569a['start']['isEqual'](_0x2d9e34[_0x3beb84]['previousPosition'])&&_0x2d9e34[_0x3beb84]['markersStart']['push'](_0x350585),_0x1f569a['end']['isEqual'](_0x2d9e34[_0x3beb84]['nextPosition'])&&_0x2d9e34[_0x3beb84]['markersEnd']['push'](_0x350585);}['_joinTapes'](_0x3cfee6,_0x27a1fc){let _0x13af63=[],_0x572b93=0x0,_0x7f9fd7=0x0;for(;_0x572b93<_0x3cfee6['length']||_0x7f9fd7<_0x27a1fc['length'];){const _0x5d5838=_0x3cfee6[_0x572b93]||{},_0x1c80fc=_0x27a1fc[_0x7f9fd7]||{};if(_0x5d5838['id']==_0x1c80fc['id'])_0x572b93++,_0x7f9fd7++,_0x13af63['push'](_0x5d5838);else{if(_0x1c80fc['isRemoved']&&_0x5d5838['isAdded']){const {commonTape:_0x44d2f9,iEnd:_0x6a1f73,jEnd:_0x17461b}=this['_threeWayMerge'](_0x3cfee6,_0x572b93,_0x27a1fc,_0x7f9fd7);_0x13af63=_0x13af63['concat'](_0x44d2f9),_0x572b93=_0x6a1f73,_0x7f9fd7=_0x17461b;}else _0x1c80fc['isRemoved']?(_0x7f9fd7++,_0x13af63['push'](_0x1c80fc)):(_0x572b93++,_0x13af63['push'](_0x5d5838));}}return _0x13af63;}['_markSuggestions'](_0x390de8,_0x55c842){const _0x32a826=[];for(let _0x24f814=0x0;_0x24f814<_0x390de8['length'];_0x24f814++){for(let _0x4b246a=0x0;_0x4b246a<_0x390de8[_0x24f814]['markersStart']['length'];_0x4b246a++){const _0x12ee72=_0x390de8[_0x24f814]['markersStart'][_0x4b246a];if(!_0x55c842['has'](_0x12ee72))continue;const {group:_0x360555,type:_0x378660,authorId:_0x101f5}=_0xb59266(_0x12ee72);'revision-suggestion'!=_0x360555||'insertion'!=_0x378660&&'deletion'!=_0x378660||(_0x32a826['unshift']({'type':_0x378660,'name':_0x12ee72,'userId':_0x101f5}),_0x390de8[_0x24f814]['markersStart']['splice'](_0x4b246a,0x1),_0x4b246a--);}_0x54bf1f(_0x390de8[_0x24f814]);for(let _0x2429d2=0x0;_0x2429d2<_0x390de8[_0x24f814]['markersEnd']['length'];_0x2429d2++){const _0x2311cf=_0x390de8[_0x24f814]['markersEnd'][_0x2429d2];if(!_0x55c842['has'](_0x2311cf))continue;const {group:_0x430d60,type:_0x47ef50}=_0xb59266(_0x2311cf);if('revision-suggestion'!=_0x430d60||'insertion'!=_0x47ef50&&'deletion'!=_0x47ef50)continue;_0x390de8[_0x24f814]['markersEnd']['splice'](_0x2429d2,0x1),_0x2429d2--;const _0x4bc041=_0x32a826['findIndex'](_0x453aaf=>_0x453aaf['name']==_0x2311cf);_0x4bc041>-0x1&&_0x32a826['splice'](_0x4bc041,0x1);}}function _0xb59266(_0x1bd27c){const _0xb92966=_0x1bd27c['split'](':');return{'group':_0xb92966[0x0],'type':_0xb92966[0x1],'subType':_0xb92966['length']>=0x5?_0xb92966[0x2]:null,'id':_0xb92966['length']<0x5?_0xb92966[0x2]:_0xb92966[0x3],'authorId':_0xb92966['length']<0x5?_0xb92966[0x3]:_0xb92966[0x4],'markerCount':0x6==_0xb92966['length']?_0xb92966[0x5]:null};}function _0x54bf1f(_0x5e03d2){for(let _0x41f550=0x0;_0x41f550<_0x32a826['length'];_0x41f550++){if(_0x5e03d2['isAdded']&&'insertion'==_0x32a826[_0x41f550]['type'])return _0x5e03d2['isAddSuggestion']=_0x32a826[_0x41f550],void delete _0x5e03d2['isAdded'];if(!_0x5e03d2['isAdded']&&!_0x5e03d2['isRemoved']&&'deletion'==_0x32a826[_0x41f550]['type'])return void(_0x5e03d2['isRemoveSuggestion']=_0x32a826[_0x41f550]);}}}['_setDistance'](_0x38b4a0,_0x6fcb1f){let _0x49bdbb=0x0,_0x232741=!0x1;const _0x5a1835=new Map();for(const _0x50ed16 of _0x38b4a0)_0x50ed16[_0x6fcb1f]?_0x232741&&(_0x49bdbb++,_0x232741=!0x1):(_0x49bdbb++,_0x232741=!0x0),_0x5a1835['set'](_0x50ed16['id'],_0x49bdbb);for(let _0x381469=0x0;_0x381469<_0x38b4a0['length'];_0x381469++){if('isRemoved'==_0x6fcb1f&&_0x38b4a0[_0x381469]['isAdded']||'isAdded'==_0x6fcb1f&&_0x38b4a0[_0x381469]['isRemoved'])continue;if('text'==_0x38b4a0[_0x381469]['type']){_0x38b4a0[_0x381469]['distance']=0x0;continue;}const _0x79dfee=_0x5a1835['get'](_0x38b4a0[_0x381469]['pairId']),_0x487aaa=_0x5a1835['get'](_0x38b4a0[_0x381469]['id']);_0x38b4a0[_0x381469]['distance']=_0x79dfee-_0x487aaa;}}['_getRevisionsRange'](_0x1ffa03,_0x382736,_0xe25f14=!0x1){const _0x44bf19=[];let _0x4ef20d=this['repository']['getIndex'](_0x1ffa03),_0x5dc3df=this['repository']['getIndex'](_0x382736);for(-0x1==_0x5dc3df&&(_0x5dc3df=this['repository']['_revisions']['length'],_0xe25f14=!0x1);_0x4ef20d<_0x5dc3df;)_0x44bf19['push'](this['repository']['getRevision'](_0x4ef20d)),_0x4ef20d++;return _0xe25f14&&_0x44bf19['push'](this['repository']['getRevision'](_0x4ef20d)),_0x44bf19;}['_threeWayMerge'](_0x1d320b,_0x363714,_0x3fad90,_0x151c50){const _0x54dd08=this['editor']['model']['schema'];let _0x52c3d3=_0x363714;for(;_0x1d320b[_0x52c3d3]&&_0x1d320b[_0x52c3d3]['isAdded'];)_0x52c3d3++;let _0x104108=_0x151c50;for(;_0x3fad90[_0x104108]&&_0x3fad90[_0x104108]['isRemoved'];)_0x104108++;_0x5b6b95(_0x1d320b,_0x363714,_0x52c3d3),_0x5b6b95(_0x3fad90,_0x151c50,_0x104108);const _0x3992c5=_0x3fad90['slice'](_0x151c50,_0x104108)['concat'](_0x1d320b['slice'](_0x363714,_0x52c3d3));return _0x3992c5['sort']((_0x5797b4,_0x250fbb)=>_0x5797b4['side']!=_0x250fbb['side']?_0x5797b4['side']-_0x250fbb['side']:_0x5797b4['level']!=_0x250fbb['level']?_0x5797b4['level']-_0x250fbb['level']:_0x5797b4['distance']!=_0x250fbb['distance']?_0x250fbb['distance']-_0x5797b4['distance']:!!_0x5797b4['isAdded']!=!!_0x250fbb['isAdded']?-0x1==_0x5797b4['side']||0x0==_0x5797b4['side']?_0x5797b4['isAdded']?-0x1:0x1:_0x5797b4['isAdded']?0x1:-0x1:_0x5797b4['index']-_0x250fbb['index']),{'commonTape':_0x3992c5,'iEnd':_0x52c3d3,'jEnd':_0x104108};function _0x5b6b95(_0x1de9fe,_0x521f7e,_0x1643d8){let _0x1f86ed=-0x1,_0x1fe2d3=Number['POSITIVE_INFINITY'],_0x5eb51f=!0x0;for(let _0x1ffc59=_0x521f7e;_0x1ffc59<_0x1643d8;_0x1ffc59++)if(_0x54dd08['isInline'](_0x1de9fe[_0x1ffc59]['item'])||(_0x5eb51f=!0x1),_0x1de9fe[_0x1ffc59]['item']['startIndex']<_0x521f7e&&(_0x1f86ed=_0x1ffc59),_0x1de9fe[_0x1ffc59]['item']['endIndex']>=_0x1643d8){_0x1fe2d3=_0x1ffc59;break;}_0x5eb51f&&(_0x1f86ed=_0x1643d8-0x1);for(let _0x2d6614=_0x521f7e;_0x2d6614<_0x1643d8;_0x2d6614++)_0x1de9fe[_0x2d6614]['side']=_0x2d6614<=_0x1f86ed?-0x1:_0x2d6614<_0x1fe2d3?0x0:0x1,_0x1de9fe[_0x2d6614]['index']=_0x2d6614;let _0x3da64a=0x0;for(let _0x42f1be=_0x521f7e;_0x42f1be<=_0x1f86ed;_0x42f1be++)0x0==_0x1de9fe[_0x42f1be]['distance']?_0x1de9fe[_0x42f1be]['level']=_0x3da64a:(_0x3da64a++,_0x1de9fe[_0x42f1be]['level']=_0x3da64a,_0x3da64a++);for(let _0x1f2671=_0x521f7e;_0x1f2671<_0x1643d8;_0x1f2671++)0x0==_0x1de9fe[_0x1f2671]['side']&&(_0x1de9fe[_0x1f2671]['level']=_0x3da64a);_0x3da64a=0x0;for(let _0x265f1a=_0x1643d8-0x1;_0x265f1a>=_0x1fe2d3;_0x265f1a--)0x0==_0x1de9fe[_0x265f1a]['distance']?_0x1de9fe[_0x265f1a]['level']=_0x3da64a:(_0x3da64a--,_0x1de9fe[_0x265f1a]['level']=_0x3da64a,_0x3da64a--);}}['_fixObsoleteTags'](_0x1e4846){const _0x505063=new Map(),_0x4e0a06=this['editor']['model']['schema'];for(let _0x1e69c7=0x1;_0x1e69c7<_0x1e4846['length'];_0x1e69c7++){let _0xa9e218,_0x1b61c0,_0x1ef22b;const _0x3165ff=_0x1e4846[_0x1e69c7],_0x130983=_0x1e4846[_0x1e69c7-0x1];if('text'==_0x3165ff['type'])continue;if(_0x3165ff['type']!=_0x130983['type'])continue;if(!_0x4e0a06['isBlock'](_0x130983['item'])||_0x4e0a06['isLimit'](_0x130983['item']))continue;if(!_0x4e0a06['isBlock'](_0x3165ff['item'])||_0x4e0a06['isLimit'](_0x3165ff['item']))continue;if((_0x1e4846[_0x1e69c7]['isAdded']||_0x1e4846[_0x1e69c7]['isAddSuggestion'])&&_0x1e4846[_0x1e69c7-0x1]['isRemoved'])_0xa9e218=_0x1e4846[_0x1e69c7],_0x1b61c0=_0x1e4846[_0x1e69c7-0x1],_0x1ef22b=_0x1e69c7-0x1;else{if(!_0x1e4846[_0x1e69c7]['isRemoved']||!_0x1e4846[_0x1e69c7-0x1]['isAdded']&&!_0x1e4846[_0x1e69c7-0x1]['isAddSuggestion'])continue;_0xa9e218=_0x1e4846[_0x1e69c7-0x1],_0x1b61c0=_0x1e4846[_0x1e69c7],_0x1ef22b=_0x1e69c7;}const _0x191a4c=_0xa9e218['level']==_0x1b61c0['level'],_0x5e3c17=Math['abs'](_0xa9e218['level'])<Math['abs'](_0x1b61c0['level'])&&0x0==_0x1b61c0['distance'];(_0x191a4c||_0x5e3c17)&&(_0x505063['set'](_0x1b61c0['id'],_0xa9e218['id']),_0x1e4846['splice'](_0x1ef22b,0x1),_0x1e69c7--,_0xa9e218['isAdded']=!0x1);}for(let _0x40e8a2=0x0;_0x40e8a2<_0x1e4846['length'];_0x40e8a2++)_0x505063['has'](_0x1e4846[_0x40e8a2]['pairId'])&&(_0x1e4846[_0x40e8a2]['pairId']=_0x505063['get'](_0x1e4846[_0x40e8a2]['pairId']));}['_removeMissingPairs'](_0x2d0649){const _0x24ddd6=new Set(_0x2d0649['map'](_0x332356=>_0x332356['id']));for(let _0x29b92e=0x0;_0x29b92e<_0x2d0649['length'];_0x29b92e++)_0x24ddd6['has'](_0x2d0649[_0x29b92e]['pairId'])||0x0==_0x2d0649[_0x29b92e]['distance']||(_0x2d0649[_0x29b92e]['isIncorrect']=!0x0);return _0x2d0649['filter'](_0x55bbce=>!_0x55bbce['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3fa4f3){const _0x5ad6b3=new Set();for(let _0x17e6b=0x0;_0x17e6b<_0x3fa4f3['length'];_0x17e6b++){if(_0x5ad6b3['has'](_0x3fa4f3[_0x17e6b]['id'])&&_0x3fa4f3[_0x17e6b]['isRemoved']&&(_0x3fa4f3[_0x17e6b]['isIncorrect']=!0x0),_0x3fa4f3[_0x17e6b]['isIncorrect'])continue;if(0x0==_0x3fa4f3[_0x17e6b]['distance'])continue;if('elementStart'!=_0x3fa4f3[_0x17e6b]['type'])continue;if(null==_0x3fa4f3[_0x17e6b]['pairId'])continue;let _0x99c01=_0x17e6b+0x1,_0x5529db=0x0;for(;_0x3fa4f3[_0x99c01]['id']!=_0x3fa4f3[_0x17e6b]['pairId'];)'elementStart'==_0x3fa4f3[_0x99c01]['type']?_0x5529db++:'elementEnd'==_0x3fa4f3[_0x99c01]['type']&&_0x5529db--,_0x99c01++;if(0x0!=_0x5529db){if(_0x3fa4f3[_0x17e6b]['isRemoved'])_0x3fa4f3[_0x17e6b]['isIncorrect']=!0x0;else{for(;_0x99c01!=_0x17e6b;)_0x3fa4f3[_0x99c01]['isRemoved']&&0x0!=_0x3fa4f3[_0x99c01]['distance']&&(_0x3fa4f3[_0x99c01]['isIncorrect']=!0x0,_0x5ad6b3['add'](_0x3fa4f3[_0x99c01]['pairId'])),_0x99c01--;}}}return _0x3fa4f3['filter'](_0x105573=>!_0x105573['isIncorrect']);}['_removeUnsupportedChanges'](_0x55ef98){const _0x582783=this['editor']['model']['schema'];for(let _0x683497=0x0;_0x683497<_0x55ef98['length'];_0x683497++){if(!(_0x55ef98[_0x683497]['isAdded']||_0x55ef98[_0x683497]['isAddSuggestion']||_0x55ef98[_0x683497]['isRemoved']||_0x55ef98[_0x683497]['isRemoveSuggestion']))continue;if(0x0==_0x55ef98[_0x683497]['distance'])continue;const _0x134185=_0x55ef98[_0x683497]['item'];_0x582783['isBlock'](_0x134185)||_0x582783['isLimit'](_0x134185)||(_0x55ef98[_0x683497]['isAdded']&&delete _0x55ef98[_0x683497]['isAdded'],_0x55ef98[_0x683497]['isAddSuggestion']&&delete _0x55ef98[_0x683497]['isAddSuggestion'],_0x55ef98[_0x683497]['isRemoveSuggestion']&&delete _0x55ef98[_0x683497]['isRemoveSuggestion'],_0x55ef98[_0x683497]['isRemoved']&&(_0x55ef98[_0x683497]['isIncorrect']=!0x0));}return _0x55ef98['filter'](_0x16e29e=>!_0x16e29e['isIncorrect']);}['_makeModelFromTape'](_0x498dc6,_0x1e5d87,_0x144165){const _0x4b485b=new mt(),_0x35f485=[],_0x3f8d34=new Map(),_0x143362=this['editor']['model'],_0x3b21e3=_0x143362['schema'],_0x40993b=[_0x4b485b],_0x274311={},_0x3d621e={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x295d53=null;const _0x19c55e=[0x0];for(let _0x2198c2=0x0;_0x2198c2<_0x498dc6['length'];_0x2198c2++)if('elementStart'===_0x498dc6[_0x2198c2]['type']){_0x498dc6[_0x2198c2]['previousPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e);const _0x20eb74=new ft(_0x498dc6[_0x2198c2]['item']['name'],_0x498dc6[_0x2198c2]['item']['getAttributes']());_0x40993b[0x0]['_appendChild'](_0x20eb74),_0x19c55e['push'](0x0),_0x40993b['unshift'](_0x20eb74),_0x498dc6[_0x2198c2]['nextPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e);}else'elementEnd'===_0x498dc6[_0x2198c2]['type']?(_0x40993b['shift'](),_0x498dc6[_0x2198c2]['previousPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e),_0x19c55e['pop'](),_0x19c55e[_0x19c55e['length']-0x1]++,_0x498dc6[_0x2198c2]['nextPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e)):(_0x498dc6[_0x2198c2]['previousPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e),_0x295d53?_0x295d53['_data']+=_0x498dc6[_0x2198c2]['item']['data']:_0x295d53=new wt(_0x498dc6[_0x2198c2]['item']['data'],_0x498dc6[_0x2198c2]['item']['getAttributes']()),_0x498dc6[_0x2198c2+0x1]&&'text'===_0x498dc6[_0x2198c2+0x1]['type']&&_0xf5fac7(_0x295d53,_0x498dc6[_0x2198c2+0x1]['item'])||(_0x40993b[0x0]['_appendChild'](_0x295d53),_0x295d53=null),_0x19c55e[_0x19c55e['length']-0x1]+=_0x498dc6[_0x2198c2]['item']['offsetSize'],_0x498dc6[_0x2198c2]['nextPosition']=_0x143362['createPositionFromPath'](_0x4b485b,_0x19c55e));for(let _0x2f0f30=0x0;_0x2f0f30<_0x498dc6['length'];_0x2f0f30++){const _0x53ac50=_0x498dc6[_0x2f0f30]['previousPosition'],_0x410b30=_0x498dc6[_0x2f0f30]['nextPosition'];for(const _0x49696b of _0x498dc6[_0x2f0f30]['markersStart'])_0x3f8d34['set'](_0x49696b,{'start':_0x53ac50,'end':null});_0x3bca03('isRemoveSuggestion',_0x2f0f30,_0x53ac50,_0x410b30),_0x3bca03('isAddSuggestion',_0x2f0f30,_0x53ac50,_0x410b30),_0x3bca03('isRemoved',_0x2f0f30,_0x53ac50,_0x410b30),_0x3bca03('isAdded',_0x2f0f30,_0x53ac50,_0x410b30);for(const _0x590587 of _0x498dc6[_0x2f0f30]['markersEnd']){_0x3f8d34['get'](_0x590587)['end']=_0x410b30;}}for(const [_0x2eb425,_0x4b2173]of _0x3f8d34){const _0x531c0e=this['editor']['model']['createRange'](_0x4b2173['start'],_0x4b2173['end']);_0x4b485b['markers']['set'](_0x2eb425,_0x531c0e);}return _0x35f485['sort']((_0x3b9f9b,_0x5541f7)=>{const _0x1b4a88=_0x4b485b['markers']['get']('revision:'+_0x3b9f9b['id']),_0x3614fc=_0x4b485b['markers']['get']('revision:'+_0x5541f7['id']);return _0x1b4a88['start']['isBefore'](_0x3614fc['start'])?-0x1:_0x1b4a88['start']['isAfter'](_0x3614fc['start'])?0x1:_0x1b4a88['end']['isBefore'](_0x3614fc['end'])?-0x1:_0x1b4a88['end']['isAfter'](_0x3614fc['end'])?0x1:'add'===_0x3b9f9b['type']?-0x1:0x1;}),{'root':_0x4b485b,'changes':_0x35f485};function _0x3bca03(_0x5e5290,_0x408389,_0x345dd8,_0x36fe3e){const _0x21494e=!!_0x498dc6[_0x408389][_0x5e5290],_0x518c54=_0x21494e?_0x498dc6[_0x408389][_0x5e5290]['userId']:null,_0x48e9d8=_0x408389===_0x498dc6['length']-0x1,_0x134388=_0x3d621e[_0x5e5290][0x0],_0x9c6935=_0x3b21e3['isObject'](_0x498dc6[_0x408389]['item']);!_0x274311[_0x5e5290]&&_0x21494e?_0x274311[_0x5e5290]={'start':_0x345dd8,'tapeItem':_0x498dc6[_0x408389],'userId':_0x518c54,'type':_0x5e5290}:_0x274311[_0x5e5290]&&!_0x21494e?(_0x274311[_0x5e5290]['end']=_0x345dd8,_0x2f043f(_0x274311[_0x5e5290]),_0x274311[_0x5e5290]=null):_0x274311[_0x5e5290]&&_0x21494e&&_0x274311[_0x5e5290]['userId']!==_0x518c54&&(_0x274311[_0x5e5290]['end']=_0x345dd8,_0x134388&&_0x134388['userId']===_0x274311[_0x5e5290]['userId']||_0x2f043f(_0x274311[_0x5e5290]),_0x274311[_0x5e5290]={'start':_0x345dd8,'tapeItem':_0x498dc6[_0x408389],'userId':_0x518c54,'type':_0x5e5290}),_0x274311[_0x5e5290]&&_0x9c6935&&('elementStart'!==_0x498dc6[_0x408389]['type']||_0x134388&&_0x134388['userId']===_0x518c54||_0x3d621e[_0x5e5290]['unshift']({'userId':_0x518c54,'object':_0x498dc6[_0x408389]['item'],'change':_0x274311[_0x5e5290]}),'elementEnd'===_0x498dc6[_0x408389]['type']&&_0x134388&&_0x134388['object']===_0x498dc6[_0x408389]['item']&&(_0x3d621e[_0x5e5290]['shift'](),_0x274311[_0x5e5290]=_0x134388['change'])),_0x274311[_0x5e5290]&&_0x48e9d8&&(_0x274311[_0x5e5290]['end']=_0x36fe3e,_0x2f043f(_0x274311[_0x5e5290]),_0x274311[_0x5e5290]=null);}function _0x2f043f({start:_0x4e3538,end:_0x6e90fa,tapeItem:_0x38d632,userId:_0x33b75c,type:_0x319214}){const _0xfdcdd=_0x38d632['item'],_0x35d3c8=_0x143362['schema']['isBlock'](_0xfdcdd)&&!_0x143362['schema']['isLimit'](_0xfdcdd),_0x492717=_0x4e3538['nodeAfter']==_0x6e90fa['parent']&&_0x6e90fa['isAtStart'];if(_0x35d3c8&&_0x492717)return;const _0x5ed4bd=_0x143362['createRange'](_0x4e3538,_0x6e90fa),_0x45095c=_0x1e5d87['get'](_0x33b75c),_0x3fccae=new r({'author':_0x45095c,'type':'isAdded'==_0x319214||'isAddSuggestion'==_0x319214?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x319214||'isRemoveSuggestion'==_0x319214},'createdAt':new Date(),'rootName':_0x144165});_0x35f485['push'](_0x3fccae),_0x4b485b['markers']['set']('revision:'+_0x3fccae['id'],_0x5ed4bd);}function _0xf5fac7(_0x48a092,_0x3c73e1){const _0x4d8c95=_0x48a092['getAttributes'](),_0x59d3d6=_0x3c73e1['getAttributes']();for(const _0x26c6be of _0x4d8c95){if(_0x26c6be[0x1]!==_0x3c73e1['getAttribute'](_0x26c6be[0x0]))return!0x1;_0x59d3d6['next']();}return _0x59d3d6['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x28a61e=>{const _0x5bb842=_0x28a61e['markerName']['split'](':')[0x1],_0x1cf94f=this['_getChangeFromId'](_0x5bb842);if(!_0x1cf94f)return null;const _0x419011='add'==_0x1cf94f['type']?'insertion':'deletion',_0x41dfd2=['ck-suggestion-marker','ck-suggestion-marker-'+_0x419011];return _0x1cf94f['data']['isSuggestion']&&_0x41dfd2['push']('ck-suggestion-marker-'+_0x419011+'-new'),this['activeChange']==_0x1cf94f&&_0x41dfd2['push']('ck-suggestion-marker--active'),{'classes':_0x41dfd2,'attributes':{'data-change-id':_0x5bb842}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5dc5b7=>{_0x5dc5b7['on']('element:pre',(_0x646c59,_0x4ccf76,_0x5d2b80)=>{const _0xe50331=_0x4ccf76['viewItem']['getChild'](0x0);if(!_0xe50331||!_0xe50331['is']('element','code'))return;if(!_0x5d2b80['consumable']['consume'](_0xe50331,{'attributes':['vid_start','vid_end']}))return;const _0x8080e0=_0x4ccf76['modelRange']['start']['nodeAfter'];_0x5d2b80['writer']['setAttribute']('vid_start',_0xe50331['getAttribute']('vid_start'),_0x8080e0),_0x5d2b80['writer']['setAttribute']('vid_end',_0xe50331['getAttribute']('vid_end'),_0x8080e0);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x389e92=>{_0x389e92['on']('element',(_0x6ceb77,_0x4837c4,_0x526746)=>{if(!_0x526746['consumable']['consume'](_0x4837c4['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4837c4['modelRange']['isCollapsed'])return;const _0x1f602d=_0x4837c4['modelRange']['start']['nodeAfter'];_0x1f602d['hasAttribute']('vid_start')||_0x1f602d['hasAttribute']('vid')||(_0x526746['writer']['setAttribute']('vid_start',_0x4837c4['viewItem']['getAttribute']('vid_start'),_0x1f602d),_0x526746['writer']['setAttribute']('vid_end',_0x4837c4['viewItem']['getAttribute']('vid_end'),_0x1f602d));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x861b07=>_0x861b07['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x4e5866,[,_0x4a9858])=>{['vid_start','vid_end','vid']['includes'](_0x4a9858)&&(_0x4e5866['return']=!0x0,_0x4e5866['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x388a22=>{_0x388a22['on']('attribute:vid',(_0x34b433,_0x315a46,_0x2bde2c)=>{if('\x20'!=_0x315a46['item']['data']||_0x315a46['item']['parent']['maxOffset']>0x1)return;if(!_0x2bde2c['consumable']['consume'](_0x315a46['item'],_0x34b433['name']))return;const _0x519be9=_0x2bde2c['writer'],_0x2aadb7=_0x2bde2c['mapper']['toViewRange'](_0x315a46['range']);_0x519be9['wrap'](_0x2aadb7,_0x519be9['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x2def15){const _0x5bdcb1=_0x2def15['plugins']['get']('RevisionViewer');return(_0x103032,_0x2449e2,_0x4f8a0d)=>{const _0x175f6d=_0x2449e2['markerName']['split'](':')[0x1],_0x15e386=_0x5bdcb1['_getChangeFromId'](_0x175f6d);if(!_0x15e386)return null;const _0x55c09d='add'==_0x15e386['type']?'split':'merge';if(!_0x4f8a0d['consumable']['test'](_0x2449e2['markerRange'],_0x103032['name']))return;const _0x515611=_0x2449e2['markerRange']['getWalker'](),_0x11adf4=_0x2449e2['markerRange']['start'],_0x1381fe=_0x2def15['model']['schema'];let _0x4070ca=null,_0x4123c5=null,_0x268c1d=!0x1,_0x3d4e64=!0x1;for(const _0x301863 of _0x515611){const _0x3515cc=_0x301863['item'];_0x268c1d=_0x268c1d||_0x1381fe['isContent'](_0x3515cc);const _0x1b0313=_0x4f8a0d['mapper']['toViewElement'](_0x3515cc);if(_0x1b0313&&_0x1b0313['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x301863['type']&&(_0x1381fe['isBlock'](_0x3515cc)&&!_0x1381fe['isLimit'](_0x3515cc)&&(_0x3515cc['nextSibling']||_0x11adf4['isAtEnd']?_0x4070ca&&_0x4070ca['parent']==_0x3515cc||(_0x4070ca=_0x3515cc,_0x1534d6(_0x301863['previousPosition']),_0x3d4e64=!0x0):_0x4123c5=_0x4123c5||_0x301863['previousPosition']));}function _0x1534d6(_0x415a67){const _0x55d088=_0x4f8a0d['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x55c09d}),_0xd3fe26=_0x4f8a0d['mapper']['toViewPosition'](_0x415a67);_0x15e386['data']['isSuggestion']&&_0x4f8a0d['writer']['addClass']('ck-suggestion-marker-'+_0x55c09d+'-new',_0x55d088),_0x5bdcb1['activeChange']==_0x15e386&&_0x4f8a0d['writer']['addClass']('ck-suggestion-marker--active',_0x55d088),_0x4f8a0d['writer']['insert'](_0xd3fe26,_0x55d088),_0x4f8a0d['mapper']['bindElementToMarker'](_0x55d088,_0x2449e2['markerName']);}_0x268c1d||_0x3d4e64||!_0x4123c5||_0x1534d6(_0x4123c5);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x5c5388,_0x142221,_0x30ecee)=>{const _0xe5e22b=_0x30ecee['mapper']['markerNameToElements'](_0x142221['markerName']);if(_0xe5e22b){for(const _0x3424ba of _0xe5e22b)(_0x3424ba['hasClass']('ck-suggestion-marker-split')||_0x3424ba['hasClass']('ck-suggestion-marker-merge'))&&(_0x30ecee['mapper']['unbindElementFromMarkerName'](_0x3424ba,_0x142221['markerName']),_0x30ecee['writer']['remove'](_0x3424ba));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x3e67d7,_0x58931d,_0x285737)=>{const _0x488cc9=_0x58931d['markerName']['split'](':')[0x1],_0x56e66c=this['_getChangeFromId'](_0x488cc9);if(!_0x56e66c)return null;const _0xfb0ad6='add'==_0x56e66c['type']?'split':'merge';if(_0x285737['consumable']['test'](_0x58931d['markerRange'],_0x3e67d7['name']))for(const _0xe7e5c3 of _0x58931d['markerRange']['getItems']()){if(!_0xe7e5c3['is']('element','softBreak'))continue;const _0x3109f2=_0x285737['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xfb0ad6}),_0x3143c8=_0x285737['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xe7e5c3));_0x56e66c['data']['isSuggestion']&&_0x285737['writer']['addClass']('ck-suggestion-marker-'+_0xfb0ad6+'-new',_0x3109f2),this['activeChange']==_0x56e66c&&_0x285737['writer']['addClass']('ck-suggestion-marker--active',_0x3109f2),_0x285737['writer']['insert'](_0x3143c8,_0x3109f2),_0x285737['mapper']['bindElementToMarker'](_0x3109f2,_0x58931d['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3eaa58=>{for(const _0xf4865d of this['editor']['model']['document']['getRootNames']()){const _0x2c2cab=this['editor']['model']['document']['getRoot'](_0xf4865d),_0x58619d=this['editor']['editing']['view']['document']['getRoot'](_0xf4865d);if(_0x58619d){const _0x52e0c2=_0x2c2cab['getAttribute']('revisionHistoryAttachChange');if(_0x3eaa58['removeAttribute']('data-change-id',_0x58619d),_0x3eaa58['removeClass']('ck-revision-history-root-add',_0x58619d),_0x3eaa58['removeClass']('ck-revision-history-root-remove',_0x58619d),_0x3eaa58['removeClass']('ck-revision-history-root--active',_0x58619d),_0x52e0c2){const _0xfe185=this['_getChangeFromId'](_0x52e0c2);if(!_0xfe185)return null;_0x3eaa58['setAttribute']('data-change-id',_0x52e0c2,_0x58619d),_0x3eaa58['addClass']('ck-revision-history-root-'+_0xfe185['type'],_0x58619d),this['activeChange']==_0xfe185&&_0x3eaa58['addClass']('ck-revision-history-root--active',_0x58619d);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x4f5ca8=>'revision-comment:'+_0x4f5ca8,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x26678b=>'revision-suggestion:'+_0x26678b,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x774384=>({'name':'suggestion:'+_0x774384,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x5b8b95=>{const _0x1f25f6=_0x5b8b95['markerName']['split'](':')[0x1];return'insertion'!=_0x1f25f6&&'deletion'!=_0x1f25f6?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x1f25f6]};}}),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',(_0x1f63ce,_0x3398ae,_0x3a5029)=>{const _0x38bc59=_0x3a5029['mapper']['markerNameToElements'](_0x3398ae['markerName']);if(_0x38bc59){for(const _0x1f91d7 of _0x38bc59)_0x1f91d7['is']('uiElement')&&(_0x3a5029['mapper']['unbindElementFromMarkerName'](_0x1f91d7,_0x3398ae['markerName']),_0x3a5029['writer']['remove'](_0x1f91d7));}},{'priority':'high'});}['_getChangeFromId'](_0x1eeff6){return this['_changeIdToChange']['get'](_0x1eeff6);}['_getViewForChange'](_0x4e8402){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x4e8402),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x37f2db,_0x15fd21,_0x2f7bc1,_0x1530f7)=>{_0x1530f7&&this['_balloon']['remove'](_0x1530f7),_0x2f7bc1&&(this['_balloon']['add']({'view':_0x2f7bc1,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x3acb9c=this['editor']['editing'],_0x4a7dd3=this['_getChangeFromId'](_0x2f7bc1['changeId']);let _0xac23a0;if(_0x4a7dd3['data']['isOnRoot']){const _0x2e7c37=_0x3acb9c['view']['getDomRoot'](_0x4a7dd3['rootName']);_0xac23a0=Array['from'](_0x2e7c37['getClientRects']());}else{const _0x5cbe7b=this['editor']['model']['markers']['get']('revision:'+_0x2f7bc1['changeId']);_0xac23a0=Array['from'](_0x3acb9c['mapper']['markerNameToElements'](_0x5cbe7b['name']))['map'](_0x3944a5=>_0x3acb9c['view']['domConverter']['mapViewToDom'](_0x3944a5))['map'](_0x3130b7=>Array['from'](_0x3130b7['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0xac23a0[0x0];return _0xac23a0['find'](_0x571682=>_0x571682['top']-0x3<=this['_activeViewTarget']['y']&&_0x571682['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x571682['left']-0x3<=this['_activeViewTarget']['x']&&_0x571682['right']+0x3>=this['_activeViewTarget']['x'])||_0xac23a0[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x44af0b,_0x53aa6e,_0x3007e7,_0x17a36b)=>{this['activeView']=_0x3007e7?this['_getViewForChange'](_0x3007e7):null,this['editor']['model']['change'](()=>{const _0x861e47=this['editor']['editing'];_0x17a36b&&(_0x17a36b['data']['isOnRoot']?_0x861e47['view']['change'](_0x5b8e82=>{_0x5b8e82['removeClass']('ck-revision-history-root--active',_0x861e47['view']['document']['getRoot'](_0x17a36b['rootName']));}):_0x861e47['reconvertMarker']('revision:'+_0x17a36b['id'])),_0x3007e7&&(_0x3007e7['data']['isOnRoot']?_0x861e47['view']['change'](_0x48d69f=>{_0x48d69f['addClass']('ck-revision-history-root--active',_0x861e47['view']['document']['getRoot'](_0x3007e7['rootName']));}):_0x861e47['reconvertMarker']('revision:'+_0x3007e7['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x1a44f2,_0x535b1c)=>{if(this['activeChange'])return;const _0x39aded=this['_findChangeIdFromDomTarget'](_0x535b1c['target']),_0x317df9=this['_changeIdToChange']['get'](_0x39aded);_0x317df9?(this['_activeViewTarget']={'x':_0x535b1c['domEvent']['x'],'y':_0x535b1c['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x317df9)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x413f77,_0x5bca59)=>{const _0xfe2c93=this['_findChangeIdFromDomTarget'](_0x5bca59['target']),_0x44c4b3=this['_changeIdToChange']['get'](_0xfe2c93);_0x44c4b3?(this['_activeViewTarget']={'x':_0x5bca59['domEvent']['x'],'y':_0x5bca59['domEvent']['y']},_0x44c4b3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x44c4b3):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5b85a0){do{const _0x5c4718=_0x5b85a0['getAttribute']('data-change-id');if(_0x5c4718)return _0x5c4718;_0x5b85a0=_0x5b85a0['parent'];}while(_0x5b85a0);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x240d31=>{for(const _0x608be6 of this['editor']['model']['markers'])_0x240d31['removeMarker'](_0x608be6);});}}function Z(_0x1e180a,_0x125f63){return(_0x1ca891,_0x41d7cb,_0x152aa4)=>{if(!_0x152aa4['consumable']['test'](_0x41d7cb['markerRange'],_0x1ca891['name']))return;const _0x311162=_0x41d7cb['markerRange']['getWalker'](),_0x3dd5df=_0x41d7cb['markerRange']['start'],_0x2767ba=_0x1e180a['model']['schema'];let _0x5abe55=null,_0x2bc86a=null,_0xd8d1eb=!0x1,_0x553066=!0x1;for(const _0x267dc0 of _0x311162){const _0x4b7c1a=_0x267dc0['item'];_0xd8d1eb=_0xd8d1eb||_0x2767ba['isContent'](_0x4b7c1a);const _0xf36aa3=_0x152aa4['mapper']['toViewElement'](_0x4b7c1a);if(_0xf36aa3&&_0xf36aa3['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x267dc0['type']&&(_0x2767ba['isBlock'](_0x4b7c1a)&&!_0x2767ba['isLimit'](_0x4b7c1a)&&(_0x4b7c1a['nextSibling']||_0x3dd5df['isAtEnd']?_0x5abe55&&_0x5abe55['parent']==_0x4b7c1a||(_0x5abe55=_0x4b7c1a,_0x5a7716(_0x267dc0['previousPosition']),_0x553066=!0x0):_0x2bc86a=_0x2bc86a||_0x267dc0['previousPosition']));}function _0x5a7716(_0x5f2ea5){const _0x4d5f1e=_0x152aa4['mapper']['toViewPosition'](_0x5f2ea5),_0x437324=_0x152aa4['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x125f63});_0x152aa4['writer']['insert'](_0x4d5f1e,_0x437324),_0x152aa4['mapper']['bindElementToMarker'](_0x437324,_0x41d7cb['markerName']);}_0xd8d1eb||_0x553066||!_0x2bc86a||_0x5a7716(_0x2bc86a);};}class pt extends _0x408465{constructor(_0x386772){super(_0x386772);const _0x1b40a5=_0x386772['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x1b40a5,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1b40a5,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x32095f=this['editor'],_0x52bed2=_0x32095f['plugins']['get'](d),_0x5bd4bb=_0x52bed2['isReady']?_0x52bed2['diff']['newRevisionId']:null;_0x32095f['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5bd4bb);}['refresh'](){const {isReady:_0x26292c,isEnabled:_0x5bcba1,repository:_0x3281cf,diff:_0x8e83ea}=this['editor']['plugins']['get'](d),_0x4ae6bb=_0x8e83ea&&_0x3281cf['getLaterVisibleRevision'](_0x8e83ea['newRevisionId']);this['isEnabled']=_0x26292c&&_0x5bcba1&&Boolean(_0x4ae6bb);}}class _t extends _0x408465{['_step'];constructor(_0x3abf16,{direction:_0x3844c6}){super(_0x3abf16);const _0x23ddaf=_0x3abf16['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x3844c6?0x1:-0x1,this['listenTo'](_0x23ddaf,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x23ddaf,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x23ddaf,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x171d4b=this['editor'],_0x554c45=_0x171d4b['plugins']['get'](d),{isNavigationMode:_0x1a11a6,currentChangeNumber:_0x5b31f7}=_0x554c45;let _0x44d4c7;if(_0x554c45['activeChange']=_0x1a11a6?_0x554c45['diff']['changes']['get'](_0x5b31f7+this['_step']):_0x554c45['diff']['changes']['first'],_0x554c45['activeChange']['data']['isOnRoot'])_0x44d4c7=_0x171d4b['editing']['view']['getDomRoot'](_0x554c45['activeChange']['rootName']);else{const _0x3c51df=_0x171d4b['model']['markers']['get']('revision:'+_0x554c45['activeChange']['id']);_0x44d4c7=_0x514c98(_0x171d4b['editing'],_0x3c51df);}_0x215337({'target':_0x44d4c7,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x3cc68f,currentChangeNumber:_0x36a4a8,numberOfChanges:_0x86d5d9,isReady:_0x289d20,isEnabled:_0x184c88}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x184c88&&_0x289d20&&_0x86d5d9)&&(!_0x3cc68f||(0x1===this['_step']?_0x36a4a8<_0x86d5d9-0x1:_0x36a4a8>0x0));}}class li extends ts{constructor(_0x2d2949){super(_0x2d2949);const _0x2d9444=this['bindTemplate'],_0x566669=new te(_0x2d2949),_0x37c9a6=new te(_0x2d2949);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',(_0x1ad513,_0x1b1dcc)=>_0x1ad513&&_0x1b1dcc>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x38c77c,_0x49dfb9,_0x144cfe,_0x2420b2)=>{if(!_0x38c77c)return m(_0x2d2949,'Loading...');if(!_0x144cfe)return m(_0x2d2949,'No\x20changes');const _0x5cd0eb=m(_0x2d2949,'NUMBER_OF_CHANGES',_0x144cfe);return _0x2420b2?m(_0x2d2949,'X_OF_Y_CHANGES',[_0x49dfb9+0x1,_0x144cfe]):_0x5cd0eb;}),_0x566669['set']({'label':m(_0x2d2949,'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'}),_0x37c9a6['set']({'label':m(_0x2d2949,'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'}),_0x566669['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x37c9a6['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x566669['on']('execute',()=>this['fire']('execute','backward')),_0x37c9a6['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',_0x2d9444['if']('_isStatusLabelVisible','ck-hidden',_0x3a4317=>!_0x3a4317)]},'children':[{'text':_0x2d9444['to']('isNavigationMode',_0x2dc9ac=>_0x2dc9ac?m(_0x2d2949,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x2d2949,'Total')+':\x20')}]},{'text':_0x2d9444['to']('_statusText')}]},new _0x353fcd(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x566669,_0x37c9a6]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x3494fb{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4782ab=this['editor']['editing']['view'];_0x4782ab['change'](_0x4104c0=>{for(const _0x485507 of _0x4782ab['document']['roots'])_0x4104c0['addClass'](le,_0x485507);});}['hide'](){const _0x593417=this['editor']['editing']['view'];_0x593417['change'](_0x214a97=>{for(const _0x122952 of _0x593417['document']['roots'])_0x214a97['removeClass'](le,_0x122952);});}}class g extends _0x3494fb{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ge];}['init'](){const _0x23bf57=this['editor'],_0x3c836b=_0x23bf57['plugins']['get'](d),_0x41df0b=_0x23bf57['plugins']['get'](ge);_0x23bf57['ui']['componentFactory']['add']('exitToEditing',_0x4ab4dd=>{const _0x213ca8=new te(_0x4ab4dd);return _0x213ca8['set']({'label':m(_0x4ab4dd,'Back\x20to\x20editing'),'icon':_0x351c88['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x213ca8,'execute',()=>{_0x23bf57['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x213ca8;}),_0x23bf57['ui']['componentFactory']['add']('restoreRevision',_0x45ea9d=>{const _0x322afd=new te(_0x45ea9d);return _0x322afd['set']({'label':m(_0x45ea9d,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x322afd['bind']('isEnabled')['to'](_0x23bf57['commands']['get']('restoreRevision')),this['listenTo'](_0x322afd,'execute',()=>_0x23bf57['execute']('restoreRevision')),_0x322afd;}),_0x23bf57['ui']['componentFactory']['add']('changesNavigation',_0x2330fd=>{const _0x39d5a7=new li(_0x2330fd),_0x5acde3=_0x23bf57['commands']['get']('showPreviousChange'),_0x4f86d4=_0x23bf57['commands']['get']('showNextChange');return _0x39d5a7['bind']('isBackwardNavigationEnabled')['to'](_0x5acde3,'isEnabled'),_0x39d5a7['bind']('isForwardNavigationEnabled')['to'](_0x4f86d4,'isEnabled'),_0x39d5a7['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x3c836b),this['listenTo'](_0x39d5a7,'execute',(_0x1693ed,_0x3e72f6)=>{_0x23bf57['execute']('forward'===_0x3e72f6?'showNextChange':'showPreviousChange');}),_0x39d5a7;}),_0x41df0b['show'](),_0x3c836b['on']('change:isReady',(_0x132ba9,_0x243651,_0x4f7688)=>{_0x4f7688?_0x41df0b['hide']():_0x41df0b['show']();});}}class at extends _0x3701ba{['_resizeObserver']=null;constructor(_0x30db7d,_0x4cfec3){super(_0x30db7d,_0x4cfec3);const _0x48e481=this['bindTemplate'];this['set']({'label':m(_0x30db7d,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x30db7d,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x48e481['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new nt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x5a500b=this['fieldView']['element'];this['_tooltipString']=_0x5a500b['scrollWidth']>_0x5a500b['clientWidth']&&_0x5a500b['value']||'';}}class ri extends ts{constructor(_0x5ae68e,_0x90f54b,_0x5d1990){super(_0x5ae68e);const _0x13a8ba=new _0x4a8f8b();_0x13a8ba['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 _0x593965=['ck','ck-revision-history-sidebar__revision-author'];_0x5d1990&&_0x593965['push']('ck-revision-history-sidebar__revision-author_creator');const _0x1ad3ab=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x5ae68e,_0x5d1990?'Revision\x20creator':'Revision\x20author')},'children':[_0x13a8ba,_0x90f54b['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x593965},'children':_0x1ad3ab});}}function oi(_0x18a746,_0x510735){const _0x3f8d93=_0x18a746['bindTemplate'],_0x5e8742=_0x18a746['locale'],_0x1e9058=_0x31f333(_0x5e8742);_0x1e9058['panelPosition']='sw';const _0x2048ec=function(_0x29f4ce,_0x41def6){const _0x89f015=function(_0x1719cb,_0x2d6a74){const _0x882370=_0x1719cb['locale'],_0x54aea5={'Compare\x20against\x20selected':m(_0x882370,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x882370,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x882370,'Restore\x20this\x20revision')};return _0x2d6a74['map'](_0x5a32b7=>{const _0x225588=_0x54aea5[_0x5a32b7['name']];return _0x225588&&_0x225588!==_0x5a32b7['name']&&(_0x5a32b7['name']=_0x225588),_0x5a32b7;});}(_0x29f4ce,_0x41def6),_0x5e2d8a=new _0x1aa1e7();for(const _0x5ac871 of _0x89f015){const _0x3215f3={'type':'button','model':new _0x4da109({'label':_0x5ac871['name'],'class':_0x5ac871['class'],'withText':!0x0,'role':'menuitem','_action':_0x5ac871['action']})};_0x3215f3['model']['bind']('isEnabled')['to'](_0x29f4ce,'isActionsDropdownOpen',_0x5cfc53=>'function'!=typeof _0x5ac871['isEnabled']||(!_0x5cfc53||_0x5ac871['isEnabled'](_0x29f4ce))),_0x5e2d8a['add'](_0x3215f3);}return _0x5e2d8a;}(_0x18a746,_0x510735);return _0x18a746['bind']('isActionsDropdownOpen')['to'](_0x1e9058,'isOpen'),_0x1e9058['buttonView']['set']({'label':m(_0x5e8742,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x351c88['threeVerticalDots']}),_0x1e9058['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x3f8d93['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x3f8d93['to'](_0x4423cf=>_0x4423cf['stopPropagation']())}}),_0x1e9058['on']('execute',_0x1f3eaa=>{_0x18a746['isReady']&&'function'==typeof _0x1f3eaa['source']['_action']&&_0x1f3eaa['source']['_action'](_0x18a746);}),to(_0x1e9058,_0x2048ec,{'role':'menu'}),_0x1e9058['listenTo'](_0x18a746,'change:isActionsDropdownOpen',(_0x40478f,_0x25c96b,_0x120a70)=>{if(_0x120a70)for(const _0x480565 of _0x1e9058['listView']['items']){const _0x27a76f=_0x480565['children']['first'],_0x4ea49e=_0x510735['find'](_0x3670f7=>_0x3670f7['action']===_0x27a76f['_action'])['isVisible'];_0x480565['isVisible']=void 0x0===_0x4ea49e||_0x4ea49e(_0x18a746);}}),_0x1e9058;}class hi extends/* #__PURE__ -- @preserve */
26
+ ti(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x21e2d3,_0x38d748,_0x19e76a,_0x1f4002){super(_0x21e2d3);const _0x5c417c=this['bindTemplate'],_0x3c15fe=function(_0x1374e5,_0x3eb3d8){const _0x3a3a7c=Array['from'](_0x3eb3d8['authors'])['filter'](_0x326625=>_0x326625!=_0x3eb3d8['creator']);return _0x3eb3d8['creator']&&_0x3a3a7c['unshift'](_0x3eb3d8['creator']),_0x3a3a7c['map'](_0x3e4c53=>new ri(_0x1374e5,_0x3e4c53,_0x3e4c53==_0x3eb3d8['creator']));}(_0x21e2d3,_0x38d748);this['id']=_0x38d748['id'],this['_revision']=_0x38d748,this['_requireRevisionName']=_0x1f4002,this['bind']('name','createdAt')['to'](_0x38d748),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2fd8e8=>{return _0x2ccdb7=_0x21e2d3['uiLanguage'],(_0x254844=_0x2fd8e8)['toLocaleDateString'](_0x2ccdb7,{'month':'long','day':'numeric'})+',\x20'+_0x254844['toLocaleTimeString'](_0x2ccdb7,{'hour':'numeric','minute':'numeric'});var _0x2ccdb7,_0x254844;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new at(_0x21e2d3,_0x21eb44),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0xc392eb=>_0xc392eb||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x595616,_0xd1d99c)=>_0x595616&&_0xd1d99c),this['revisionActionsView']=_0x19e76a&&_0x19e76a['length']?oi(this,_0x19e76a):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x5c417c['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x5c417c['if']('isEnabled','ck-disabled',_0x3945c7=>!_0x3945c7),_0x5c417c['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x5c417c['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x5c417c['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':_0x5c417c['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':_0x3c15fe}]},this['revisionActionsView']],'on':{'click':_0x5c417c['to'](_0x2e43a3=>{_0x2e43a3['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x5dcb13=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x5dcb13,'change',()=>{this['_requireRevisionName']&&!_0x5dcb13['value']||this['fire']('setName',{'id':this['id'],'name':_0x5dcb13['value']}),_0x5dcb13['value']||(_0x5dcb13['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ci(_0x48311e,_0x321e14){const _0x55b8ae=_0x318ce4['fromJSDate'](_0x48311e)['setLocale'](_0x321e14),_0x3b4209=_0x318ce4['local'](),_0x4e5c51=_0x3b4209['minus']({'days':0x1})['startOf']('day');let _0x5a8708,_0x1ded99;return _0x55b8ae['hasSame'](_0x3b4209,'day')?(_0x5a8708=_0x55b8ae['startOf']('day')['toJSDate'](),_0x1ded99=_0x55b8ae['toRelativeCalendar']()):_0x55b8ae['hasSame'](_0x4e5c51,'day')?(_0x5a8708=_0x4e5c51['toJSDate'](),_0x1ded99=_0x55b8ae['toRelativeCalendar']()):_0x55b8ae['hasSame'](_0x3b4209,'week')?(_0x5a8708=_0x55b8ae['startOf']('week')['toJSDate'](),_0x1ded99=_0x55b8ae['weekdayLong']||''):_0x55b8ae['hasSame'](_0x3b4209,'year')?(_0x5a8708=_0x55b8ae['startOf']('month')['toJSDate'](),_0x1ded99=_0x55b8ae['monthLong']||''):(_0x5a8708=_0x55b8ae['startOf']('year')['toJSDate'](),_0x1ded99=String(_0x55b8ae['year'])),{'startDate':_0x5a8708,'localizedPeriodName':_0x1ded99};}class ai extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1cfde4,_0x71605a,_0x508181,_0x40f641){super(_0x1cfde4);const _0x4e0c45=ci(_0x71605a,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x71605a,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x508181,this['_requireRevisionName']=_0x40f641,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':_0x4e0c45}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x24a92a){const _0x76f46a=new hi(this['locale'],_0x24a92a,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x76f46a);}['removeRevision'](_0xf6b777){const _0x539f3f=this['revisionViews']['find'](_0x5f2858=>_0x5f2858['id']===_0xf6b777['id']);this['revisionViews']['remove'](_0x539f3f);}}class as extends ts{constructor(_0x57426e){super(_0x57426e);const _0x35b0b7=new _0x4a8f8b();_0x35b0b7['content']=_0x351c88['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x35b0b7,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x57426e,'Revision\x20history')]}]});}}class ni extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x395eca,_0x9a79c9,_0x21382d,_0x157020){super(_0x395eca);const _0x457130=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x9a79c9,this['_revisionActions']=_0x21382d,this['_requireRevisionName']=_0x157020,this['on']('select',(_0x3c8f99,_0x5629ef)=>{this['fire']('revisionSelected',_0x5629ef);}),this['on']('setName',(_0x27cfcd,_0x41d790)=>{this['fire']('revisionSetName',_0x41d790);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x395eca),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x457130['if']('isEnabled','ck-disabled',_0x24eaa2=>!_0x24eaa2)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3094d6 of this['_revisions'])this['_addRevision'](_0x3094d6);this['_revisions']['on']('add',(_0x55bf43,_0x5cdc0f)=>{this['_addRevision'](_0x5cdc0f);}),this['_revisions']['on']('remove',(_0x7c7dcb,_0xc8cc1d)=>{this['_removeRevision'](_0xc8cc1d);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x4fe6bd=>_0x4fe6bd['revisionViews']['map'](_0x4e1d5b=>_0x4e1d5b))['flat']();}['selectRevision'](_0x569493){for(const _0x1a716 of this['revisionViews'])_0x569493&&_0x569493['id']===_0x1a716['id']?_0x1a716['select']():_0x1a716['deselect']();}['highlightRevisions'](_0x44f99){for(const _0x11db6d of this['revisionViews'])_0x44f99['some'](({id:_0x1c19a3})=>_0x1c19a3===_0x11db6d['id'])?_0x11db6d['highlight']():_0x11db6d['unhighlight']();}['_addRevision'](_0x52b02e){const _0x4c179c=ci(_0x52b02e['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0xdc1908=this['timePeriodViews']['get'](0x0);_0xdc1908&&_0xdc1908['startDate']['getTime']()===_0x4c179c['getTime']()||(_0xdc1908=new ai(this['locale'],_0x4c179c,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0xdc1908)),_0xdc1908['addRevision'](_0x52b02e);}['_removeRevision'](_0x2b88bf){const _0x4b4fe9=ci(_0x2b88bf['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4b4fe9)['removeRevision'](_0x2b88bf);}['_getTimePeriodViewByStartDate'](_0x4cb12d){return this['timePeriodViews']['find'](_0x30a4e5=>_0x30a4e5['startDate']['getTime']()===_0x4cb12d['getTime']());}}class w extends _0x3494fb{['_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(_0x52d3c1){super(_0x52d3c1),this['_revisionViewer']=_0x52d3c1['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xde2744=this['_revisionsRepository']['_revisions'],_0x1bb634=this['_createRevisionActions'](),_0x24d83d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new vi(this['editor']['locale'],_0xde2744,_0x1bb634,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',(_0xe915ab,_0x4ea04a)=>{_0x4ea04a['revisionViews']['on']('add',(_0x462f14,_0x524f3b)=>{_0x524f3b['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)),_0x24d83d['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x18eee8=this['_revisionsRepository']['getRevision'](0x0);if(_0x18eee8){const _0x2c23f2=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x18eee8['id']);this['_revisionViewer']['compare'](_0x18eee8,_0x2c23f2);}}['_handleRevisionSelected'](_0x31c9a0,_0xffd964){const _0x82f7ad=this['_revisionsRepository']['getRevision'](_0xffd964['id']),_0x4a510f=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x82f7ad['id']);this['_revisionViewer']['compare'](_0x82f7ad,_0x4a510f);}['_handleRevisionSetName'](_0x46287b,_0x29264a){this['_revisionsRepository']['getRevision'](_0x29264a['id'])['setName'](_0x29264a['name']);}['_handleDiffChange'](_0xa84e51,_0x44a92a,_0x40c492){const _0x29dd7c=this['_revisionsRepository']['getRevisionsInDiff'](_0x40c492);_0x29dd7c['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x29dd7c),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x29dd7c[0x0]));}['_createRevisionActions'](){const _0x13b7c7=this['editor'],_0x3f06f6=g['availableRevisionActions'],_0xa8e373=_0x13b7c7['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0xa8e373['length'])return _0xa8e373['map'](_0x5ae805=>{const _0x2c9e46='string'==typeof _0x5ae805?Object['assign']({},_0x3f06f6[_0x5ae805]):_0x5ae805;return _0x2c9e46['action']=_0x2c9e46['action']['bind'](this,_0x13b7c7),_0x2c9e46['isVisible']&&(_0x2c9e46['isVisible']=_0x2c9e46['isVisible']['bind'](this,_0x13b7c7)),_0x2c9e46;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x41de2f},_0x73a3d8)=>{const _0x17bae5=_0x41de2f['get'](d),_0x3fbabf=_0x17bae5['repository'];let _0x18b75a=_0x17bae5['diff']['newRevisionId'],_0x59e4fa=_0x73a3d8['id'];_0x3fbabf['getIndex'](_0x18b75a)>_0x3fbabf['getIndex'](_0x59e4fa)&&([_0x18b75a,_0x59e4fa]=[_0x59e4fa,_0x18b75a]),_0x17bae5['compare'](_0x18b75a,_0x59e4fa);},'isVisible':({plugins:_0xd3e810},_0x3d6212)=>{const _0x3278cb=_0xd3e810['get'](d);return!(_0x3278cb['repository']['getRevisionsInDiff'](_0x3278cb['diff'])['length']>0x2)&&!_0x3d6212['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x2f3333,{id:_0x5eb669})=>{_0x2f3333['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5eb669);},'isVisible':({plugins:_0x3bc4bb},_0xc83fca)=>!!_0x3bc4bb['get'](d)['repository']['getLaterVisibleRevision'](_0xc83fca['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4e72ee},{id:_0x3bea20,revisionNameView:_0x5dc911})=>{const _0x11dcfa=_0x4e72ee['get'](d),_0x2140f4=_0x11dcfa['repository']['getEarlierVisibleRevision'](_0x3bea20);_0x11dcfa['compare'](_0x3bea20,_0x2140f4),_0x5dc911['focus'](),_0x5dc911['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x2be0ae,_0x5e7e16){super(_0x2be0ae),this['_view']=_0x5e7e16,this['_toolbarConfig']=ot(_0x2be0ae['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x9c495b){const _0x3521f4=this['editor'],_0x52324f=this['view'],_0x703588=_0x3521f4['editing']['view'],_0x5d3faf=_0x52324f['editable'],_0x20cd3c=_0x703588['document']['getRoot']();_0x5d3faf['name']=_0x20cd3c['rootName'],_0x52324f['render']();const _0x517c1e=_0x5d3faf['element'];this['setEditableElement'](_0x5d3faf['name'],_0x517c1e),_0x52324f['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x703588['attachDomRoot'](_0x517c1e),this['_elementReplacer']['replace'](_0x9c495b,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x2322a4=this['view'],_0x53dfd7=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x53dfd7['detachDomRoot'](_0x2322a4['editable']['name']),_0x2322a4['destroy']();}['_initToolbar'](){const _0x37e55b=this['view'];_0x37e55b['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x37e55b['stickyPanel']['limiterElement']=_0x37e55b['element'],_0x37e55b['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x35d5de})=>_0x35d5de),_0x37e55b['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x37e55b['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x555cfd,_0x1568bf,_0x62c866={}){super(_0x555cfd),this['stickyPanel']=new lt(_0x555cfd),this['toolbar']=new nt(_0x555cfd,{'shouldGroupWhenFull':_0x62c866['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x555cfd,_0x1568bf);}['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(_0x3f43af,_0x1caa56){super(_0x1caa56),this['sourceElement']=_0x3f43af,this['model']['document']['createRoot']();const _0x59b808=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x59b808);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4daf6d,_0x3a41e3){const _0x184a6=new this(_0x4daf6d,_0x3a41e3);return await _0x184a6['initPlugins'](),await _0x184a6['ui']['init'](_0x4daf6d),await _0x184a6['data']['init'](_0x184a6['config']['get']('initialData')||''),_0x184a6['fire']('ready'),_0x184a6;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x14d729{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x12813c){function _0x40314b(_0x259d45){return _0x259d45['map'](_0x5b7319=>String['fromCharCode'](_0x5b7319))['join']('');}super(_0x12813c),this['result']='end',_0x12813c[_0x40314b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x40314b([0x76,0x69,0x65,0x77])][_0x40314b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x40314b([0x61,0x75,0x74,0x6f]),_0x12813c[_0x40314b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x40314b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x40314b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x40314b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x40314b([0x6f,0x6b])});}}class k extends _0x14d729{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x56de27){if(super(_0x56de27),!this['editor']['config']['get']('revisionHistory'))throw new _0x500c82('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xc4f574=>this['_showRevisionViewer']({..._0xc4f574,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x1f9964=>this['_closeRevisionViewer'](_0x1f9964)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x5b7c33=>this['_restoreRevision'](_0x5b7c33)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x37fcab){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x37fcab;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x1b9912){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1b9912);}['getRevision'](_0x6bb1af){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x6bb1af);}['getRevisions'](_0x5d3ff6){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5d3ff6||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x33b20e=this['editor'],_0xd6c72b=_0x39a0d0(_0x33b20e,p),_0x523729=_0x33b20e['plugins']['get']('RevisionTracker'),_0x3c97da=_0x33b20e['plugins']['get']('Users')['users'];return _0xd6c72b['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0xd6c72b['lazyRoots'],(_0xd6c72b['plugins']['push'](Rt,d,w,class extends _0x14d729{static get['requires'](){return[d,'Users'];}['init'](){const _0xa70fc5=this['editor']['plugins']['get']('Users');for(const _0x24f6ca of _0x3c97da)_0x24f6ca['isAnonymous']||_0xa70fc5['getUser'](_0x24f6ca['id'])||_0xa70fc5['addUser'](_0x24f6ca);const _0x522f90=_0x523729['repository']['getRevisions']();let _0x184273=null;const _0x1c67cb=this['editor']['plugins']['get']('RevisionViewer');_0x1c67cb['adapter']=_0x523729['adapter'],_0x1c67cb['bind']('isEnabled')['to'](_0x523729),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x33b20e,'isReadOnly',_0x2099c2=>!_0x2099c2);for(const _0x1e6c9d of _0x522f90){const _0x4af55d=null===_0x1e6c9d['creator'];if(_0x4af55d&&_0x1e6c9d['toVersion']===_0x1e6c9d['fromVersion'])continue;const _0x45dbef=_0x1e6c9d['toJSON']();_0x1c67cb['addRevisionData'](_0x45dbef,(_0x2b16a9,_0x4893d7,_0x18296b)=>{if(_0x4af55d){if(_0x184273)_0x184273['_update'](_0x2b16a9,_0x4893d7);else{if(!_0x4893d7){const _0x4ab621=_0x18296b['toJSON']();_0x4ab621['id']=_0x5396c0(),_0x523729['saveRevision'](_0x4ab621,_0x18296b['toVersion'])['then'](_0x5f43b2=>{_0x184273=_0x5f43b2;});}}}else _0x1e6c9d['_update'](_0x2b16a9,_0x4893d7);});}}},g),_0xd6c72b);}['_enhanceShowRevisionViewerCallback'](){const _0x34a92e=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3dc35c=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0xc02080=this['editor']['plugins']['get']('Autosave');await _0xc02080['save']();}else await _0x3dc35c['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1be3b9=this['editor']['plugins']['get']('Dialog');_0x1be3b9['isOpen']&&_0x1be3b9['hide']();}const _0x2d8f90=this['_getRevisionViewerEditorConfig']();return _0x34a92e(_0x2d8f90)['then'](_0x564e7f=>{return(this['_viewerEditor']=_0x564e7f,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x564e7f;})['catch'](_0x5df1a5=>(console['error'](_0x5df1a5),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1bc788=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'](),_0x1bc788(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x10fb1c=this['editor']['plugins']['get']('Annotations');_0x10fb1c['refreshVisibility'](),_0x10fb1c['refreshPositioning']();}})));}['_showRevisionViewer'](_0x421a7c){const _0x4b456a=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x42eba8=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x237bbd=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x237bbd,_0x421a7c)['then'](_0x50b97f=>(_0x42eba8['style']['display']='block',_0x4b456a['style']['display']='none',_0x50b97f));}['_closeRevisionViewer'](_0x703322){const _0x58ff7f=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x58ff7f['style']['display']='',_0x703322['destroy']();}async['_restoreRevision'](_0xb5ecf7){const _0xaf713e=this['editor'],_0x1149ca=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x26f198=_0xaf713e['plugins']['get']('RevisionTracker'),_0x49deac=_0x1149ca['repository']['getRevision'](_0xb5ecf7);let _0x5a3702,_0x444df6,_0x24e1c1;try{_0x5a3702=await _0x1149ca['getRevisionData'](_0x49deac),_0x444df6=await _0x1149ca['getRevisionRootsAttributes'](_0x49deac);}catch(_0x1524e7){return void console['error'](_0x1524e7);}_0xaf713e['model']['change'](_0x5068cb=>{for(const _0x17f0a7 of Array['from'](_0xaf713e['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5068cb['removeMarker'](_0x17f0a7);}),_0x1149ca['isReady']=!0x1,_0xaf713e['model']['enqueueChange'](_0x1e0267=>{_0x1e0267['setSelection'](null),_0x1e0267['removeSelectionAttribute'](_0xaf713e['model']['document']['selection']['getAttributeKeys']());const _0x345193=Object['keys'](_0x5a3702);for(const _0x86c702 of _0xaf713e['model']['document']['roots'])'$graveyard'!=_0x86c702['rootName']&&_0x86c702['isAttached']()&&!_0x345193['includes'](_0x86c702['rootName'])&&_0x1e0267['detachRoot'](_0x86c702);for(const _0x381393 of _0x345193){let _0x4303c7=_0xaf713e['model']['document']['getRoot'](_0x381393);_0x4303c7&&_0x4303c7['isAttached']()||(_0x4303c7=_0x1e0267['addRoot'](_0x381393));const _0x573fe5=_0x444df6[_0x381393],_0x23b0e5=Object['keys'](_0x573fe5),_0x1eb0b6=_0x5a3702[_0x381393];for(const _0x210a46 of _0x4303c7['getAttributeKeys']())_0x23b0e5['includes'](_0x210a46)||_0x1e0267['removeAttribute'](_0x210a46,_0x4303c7);for(const _0x2ea0ad of _0x23b0e5)_0x1e0267['setAttribute'](_0x2ea0ad,_0x444df6[_0x381393][_0x2ea0ad],_0x4303c7);_0x1e0267['remove'](_0x1e0267['createRangeIn'](_0x4303c7)),_0x1e0267['insert'](_0xaf713e['data']['parse'](_0x1eb0b6,_0x4303c7),_0x4303c7,0x0);}});const _0x2a1114=m(_0xaf713e['locale'],'Restored');if(_0x49deac['name'])_0x24e1c1=-0x1==_0x49deac['name']['indexOf'](_0x2a1114)?_0x2a1114+':\x20'+_0x49deac['name']:_0x49deac['name'];else _0x24e1c1=_0x2a1114+':\x20'+(_0x49deac['createdAt']['toLocaleDateString'](_0xaf713e['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x49deac['createdAt']['toLocaleTimeString'](_0xaf713e['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x26f198['saveRevision']({'name':_0x24e1c1}),_0x1149ca['isReady']=!0x0,_0xaf713e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,ie as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
28
+ yt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x1f8476){super(_0x1f8476),this['_revisionViewer']=_0x1f8476['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x409d0e=this['_revisionsRepository']['_revisions'],_0x317443=this['_createRevisionActions'](),_0x345edd=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ni(this['editor']['locale'],_0x409d0e,_0x317443,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',(_0xe136d4,_0x3817b7)=>{_0x3817b7['revisionViews']['on']('add',(_0x12eaa1,_0x3a2f38)=>{_0x3a2f38['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)),_0x345edd['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x5bff7b=this['_revisionsRepository']['getRevision'](0x0);if(_0x5bff7b){const _0x5934dc=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5bff7b['id']);this['_revisionViewer']['compare'](_0x5bff7b,_0x5934dc);}}['_handleRevisionSelected'](_0x44fefb,_0x3e1612){const _0x3df599=this['_revisionsRepository']['getRevision'](_0x3e1612['id']),_0x577171=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3df599['id']);this['_revisionViewer']['compare'](_0x3df599,_0x577171);}['_handleRevisionSetName'](_0x48dccc,_0x297556){this['_revisionsRepository']['getRevision'](_0x297556['id'])['setName'](_0x297556['name']);}['_handleDiffChange'](_0xd32749,_0x2c91de,_0x1f3807){const _0x174f30=this['_revisionsRepository']['getRevisionsInDiff'](_0x1f3807);_0x174f30['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x174f30),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x174f30[0x0]));}['_createRevisionActions'](){const _0x3eb30d=this['editor'],_0x3fcb9d=w['availableRevisionActions'],_0x31ee77=_0x3eb30d['config']['get']('revisionHistory.revisionActions')||w['defaultRevisionActions'];if(_0x31ee77['length'])return _0x31ee77['map'](_0x467ec8=>{const _0x3ae9a4='string'==typeof _0x467ec8?Object['assign']({},_0x3fcb9d[_0x467ec8]):_0x467ec8;return _0x3ae9a4['action']=_0x3ae9a4['action']['bind'](this,_0x3eb30d),_0x3ae9a4['isVisible']&&(_0x3ae9a4['isVisible']=_0x3ae9a4['isVisible']['bind'](this,_0x3eb30d)),_0x3ae9a4;});}}function yt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x565c40},_0x309892)=>{const _0x15daae=_0x565c40['get'](d),_0x418769=_0x15daae['repository'];let _0x5b316c=_0x15daae['diff']['newRevisionId'],_0x3175ed=_0x309892['id'];_0x418769['getIndex'](_0x5b316c)>_0x418769['getIndex'](_0x3175ed)&&([_0x5b316c,_0x3175ed]=[_0x3175ed,_0x5b316c]),_0x15daae['compare'](_0x5b316c,_0x3175ed);},'isVisible':({plugins:_0x3ac73f},_0x50ac55)=>{const _0x34383e=_0x3ac73f['get'](d);return!(_0x34383e['repository']['getRevisionsInDiff'](_0x34383e['diff'])['length']>0x2)&&!_0x50ac55['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x443935,{id:_0x2860a1})=>{_0x443935['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2860a1);},'isVisible':({plugins:_0x330e04},_0x14de10)=>!!_0x330e04['get'](d)['repository']['getLaterVisibleRevision'](_0x14de10['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x43b7ff},{id:_0x52e787,revisionNameView:_0x4a7079})=>{const _0x2daad2=_0x43b7ff['get'](d),_0x1da06c=_0x2daad2['repository']['getEarlierVisibleRevision'](_0x52e787);_0x2daad2['compare'](_0x52e787,_0x1da06c),_0x4a7079['focus'](),_0x4a7079['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x542dde,_0x95b6e9){super(_0x542dde),this['_view']=_0x95b6e9,this['_toolbarConfig']=ot(_0x542dde['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0xae9dc5){const _0x2197db=this['editor'],_0x1e03db=this['view'],_0x40e59d=_0x2197db['editing']['view'],_0x14f1e1=_0x1e03db['editable'],_0x126c79=_0x40e59d['document']['getRoot']();_0x14f1e1['name']=_0x126c79['rootName'],_0x1e03db['render']();const _0x15d31d=_0x14f1e1['element'];this['setEditableElement'](_0x14f1e1['name'],_0x15d31d),_0x1e03db['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x40e59d['attachDomRoot'](_0x15d31d),this['_elementReplacer']['replace'](_0xae9dc5,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x4e6272=this['view'],_0x430a2f=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x430a2f['detachDomRoot'](_0x4e6272['editable']['name']),_0x4e6272['destroy']();}['_initToolbar'](){const _0x2272f6=this['view'];_0x2272f6['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x2272f6['stickyPanel']['limiterElement']=_0x2272f6['element'],_0x2272f6['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x36ce84})=>_0x36ce84),_0x2272f6['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x2272f6['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x1b2826,_0x1432eb,_0x3d3f55={}){super(_0x1b2826),this['stickyPanel']=new ut(_0x1b2826),this['toolbar']=new lt(_0x1b2826,{'shouldGroupWhenFull':_0x3d3f55['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x1b2826,_0x1432eb);}['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(_0x355609,_0x361b8e){super(_0x361b8e),this['sourceElement']=_0x355609,this['model']['document']['createRoot']();const _0x4faab4=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x4faab4);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x49e179,_0x2b8571){const _0x1c18da=new this(_0x49e179,_0x2b8571);return await _0x1c18da['initPlugins'](),await _0x1c18da['ui']['init'](_0x49e179),await _0x1c18da['data']['init'](_0x1c18da['config']['get']('initialData')||''),_0x1c18da['fire']('ready'),_0x1c18da;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class bt extends _0x3494fb{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f24db){function _0x4315ae(_0x464bde){return _0x464bde['map'](_0x597d90=>String['fromCharCode'](_0x597d90))['join']('');}super(_0x1f24db),this['result']='end',_0x1f24db[_0x4315ae([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4315ae([0x76,0x69,0x65,0x77])][_0x4315ae([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4315ae([0x61,0x75,0x74,0x6f]),_0x1f24db[_0x4315ae([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4315ae([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4315ae([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4315ae([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4315ae([0x6f,0x6b])});}}class k extends _0x3494fb{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x5d4dc2){if(super(_0x5d4dc2),!this['editor']['config']['get']('revisionHistory'))throw new _0x163bce('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x533150=>this['_showRevisionViewer']({..._0x533150,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x4f8fb2=>this['_closeRevisionViewer'](_0x4f8fb2)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0xc15a81=>this['_restoreRevision'](_0xc15a81)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2b3538){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2b3538;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x56b30){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x56b30);}['getRevision'](_0x51d5da){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x51d5da);}['getRevisions'](_0x421761){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x421761||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x423113=this['editor'],_0x125885=_0x333288(_0x423113,p),_0x34758f=_0x423113['plugins']['get']('RevisionTracker'),_0x54a9f7=_0x423113['plugins']['get']('Users')['users'];return _0x125885['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x125885['lazyRoots'],(_0x125885['plugins']['push'](bt,d,g,class extends _0x3494fb{static get['requires'](){return[d,'Users'];}['init'](){const _0xf798be=this['editor']['plugins']['get']('Users');for(const _0x5e00d5 of _0x54a9f7)_0x5e00d5['isAnonymous']||_0xf798be['getUser'](_0x5e00d5['id'])||_0xf798be['addUser'](_0x5e00d5);const _0x40b108=_0x34758f['repository']['getRevisions']();let _0x4768fc=null;const _0x1f2025=this['editor']['plugins']['get']('RevisionViewer');_0x1f2025['adapter']=_0x34758f['adapter'],_0x1f2025['bind']('isEnabled')['to'](_0x34758f),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x423113,'isReadOnly',_0x37624e=>!_0x37624e);for(const _0x5edb30 of _0x40b108){const _0x15c909=null===_0x5edb30['creator'];if(_0x15c909&&_0x5edb30['toVersion']===_0x5edb30['fromVersion'])continue;const _0x515f56=_0x5edb30['toJSON']();_0x1f2025['addRevisionData'](_0x515f56,(_0xcc3cd7,_0x294351,_0x2fa45b)=>{if(_0x15c909){if(_0x4768fc)_0x4768fc['_update'](_0xcc3cd7,_0x294351);else{if(!_0x294351){const _0x155069=_0x2fa45b['toJSON']();_0x155069['id']=_0x370f5b(),_0x34758f['saveRevision'](_0x155069,_0x2fa45b['toVersion'])['then'](_0x30150e=>{_0x4768fc=_0x30150e;});}}}else _0x5edb30['_update'](_0xcc3cd7,_0x294351);});}}},w),_0x125885);}['_enhanceShowRevisionViewerCallback'](){const _0x58d49a=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2b3b47=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x5a877c=this['editor']['plugins']['get']('Autosave');await _0x5a877c['save']();}else await _0x2b3b47['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x220cce=this['editor']['plugins']['get']('Dialog');_0x220cce['isOpen']&&_0x220cce['hide']();}const _0x3820a6=this['_getRevisionViewerEditorConfig']();return _0x58d49a(_0x3820a6)['then'](_0x14ea37=>{return(this['_viewerEditor']=_0x14ea37,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x14ea37;})['catch'](_0x3af452=>(console['error'](_0x3af452),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3d524d=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'](),_0x3d524d(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0xd7c3f5=this['editor']['plugins']['get']('Annotations');_0xd7c3f5['refreshVisibility'](),_0xd7c3f5['refreshPositioning']();}})));}['_showRevisionViewer'](_0x54ef8f){const _0x1dfc68=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x218872=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3aedaa=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x3aedaa,_0x54ef8f)['then'](_0x2a80a9=>(_0x218872['style']['display']='block',_0x1dfc68['style']['display']='none',_0x2a80a9));}['_closeRevisionViewer'](_0x2f78b4){const _0x42e917=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x42e917['style']['display']='',_0x2f78b4['destroy']();}async['_restoreRevision'](_0x523de9){const _0x484906=this['editor'],_0x163345=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x25478d=_0x484906['plugins']['get']('RevisionTracker'),_0x64731d=_0x163345['repository']['getRevision'](_0x523de9);let _0x5b85eb,_0x186d4b,_0x45df5b;try{_0x5b85eb=await _0x163345['getRevisionData'](_0x64731d),_0x186d4b=await _0x163345['getRevisionRootsAttributes'](_0x64731d);}catch(_0x124e2d){return void console['error'](_0x124e2d);}_0x484906['model']['change'](_0x63fe3a=>{for(const _0x36b7a1 of Array['from'](_0x484906['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x63fe3a['removeMarker'](_0x36b7a1);}),_0x163345['isReady']=!0x1,_0x484906['model']['enqueueChange'](_0x1c93a2=>{_0x1c93a2['setSelection'](null),_0x1c93a2['removeSelectionAttribute'](_0x484906['model']['document']['selection']['getAttributeKeys']());const _0x3d3f48=Object['keys'](_0x5b85eb);for(const _0x44fef0 of _0x484906['model']['document']['roots'])'$graveyard'!=_0x44fef0['rootName']&&_0x44fef0['isAttached']()&&!_0x3d3f48['includes'](_0x44fef0['rootName'])&&_0x1c93a2['detachRoot'](_0x44fef0);for(const _0x12a7a0 of _0x3d3f48){let _0x31be49=_0x484906['model']['document']['getRoot'](_0x12a7a0);_0x31be49&&_0x31be49['isAttached']()||(_0x31be49=_0x1c93a2['addRoot'](_0x12a7a0));const _0xac4bd2=_0x186d4b[_0x12a7a0],_0x2a233f=Object['keys'](_0xac4bd2),_0x1dcb29=_0x5b85eb[_0x12a7a0];for(const _0x3e7549 of _0x31be49['getAttributeKeys']())_0x2a233f['includes'](_0x3e7549)||_0x1c93a2['removeAttribute'](_0x3e7549,_0x31be49);for(const _0x4d672b of _0x2a233f)_0x1c93a2['setAttribute'](_0x4d672b,_0x186d4b[_0x12a7a0][_0x4d672b],_0x31be49);_0x1c93a2['remove'](_0x1c93a2['createRangeIn'](_0x31be49)),_0x1c93a2['insert'](_0x484906['data']['parse'](_0x1dcb29,_0x31be49),_0x31be49,0x0);}});const _0x284cbc=m(_0x484906['locale'],'Restored');if(_0x64731d['name'])_0x45df5b=-0x1==_0x64731d['name']['indexOf'](_0x284cbc)?_0x284cbc+':\x20'+_0x64731d['name']:_0x64731d['name'];else _0x45df5b=_0x284cbc+':\x20'+(_0x64731d['createdAt']['toLocaleDateString'](_0x484906['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x64731d['createdAt']['toLocaleTimeString'](_0x484906['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x25478d['saveRevision']({'name':_0x45df5b}),_0x163345['isReady']=!0x0,_0x484906['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,ge as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};