@ckeditor/ckeditor5-revision-history 0.0.0-nightly-next-20250225.0 → 0.0.0-nightly-20250226.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 _0x390d75,uid as _0x54786b,Collection as _0x56de22,logWarning as _0x1bfa6f,FocusTracker as _0x1d836e,KeystrokeHandler as _0x453d05,scrollViewportToShowTarget as _0x4f9aa2,ResizeObserver as at,ElementReplacer as ht,CKEditorError as _0x133ad6}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x5b5f9d,set as _0x2a0b8e,unset as _0xdf59fe,isEqual as _0x200c1c}from'es-toolkit/compat';import{Plugin as _0x4191c7,PendingActions as _0x2255d2,Command as _0x44144e,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x47cbd6,getMarkerDomElement as _0x96f4b1,ConfirmMixin as _0x4e19c2,sanitizeEditorConfig as _0x41570e}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x9afee9,Element as ut,Range as ft,ViewUIElement as _0x5f3dba,ViewRawElement as _0x32ef1d,ViewEmptyElement as _0x7935d9,ViewAttributeElement as _0xaae474,ViewContainerElement as _0x3c80e1,Position as vt,ViewText as _0x101a1b,ViewElement as _0x15b19e,DocumentFragment as gt,Text as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x3543e9,IconChevronUp as _0x4a6fc4,IconChevronDown as _0x4335ff,IconUndo as _0x3a12c8,IconUser as _0x2ea797,IconThreeVerticalDots as _0x1b4c9e}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x219dee,submitHandler as _0x223a7a,LabeledFieldView as _0x5c04f4,createLabeledInputText as _0x279764,createDropdown as _0x3f5931,ListView as _0x431ea9,ListItemView as _0x2cbd7e,ButtonView as te,MenuBarMenuView as _0x35c560,MenuBarMenuListView as _0x1e5aad,MenuBarMenuListItemView as _0x3f5f57,MenuBarMenuListItemButtonView as _0x4f6d9f,ContextualBalloon as _0x2fb9a1,ToolbarSeparatorView as _0x3b3126,IconView as _0x2d0324,addListToDropdown as _0x2bab52,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 _0x13edb5}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
- _0x390d75(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2ba143){super(),this['id']=_0x2ba143['id']||_0x54786b(),this['creator']=_0x2ba143['creator']||null,this['authors']=_0x2ba143['authors']||[],this['diffData']=_0x2ba143['diffData']||null,this['toVersion']=_0x2ba143['toVersion']||0x0,this['fromVersion']=_0x2ba143['fromVersion']||0x0,this['set']('name',_0x2ba143['name']||''),this['set']('createdAt',_0x2ba143['createdAt']||new Date()),this['set']('attributes',_0x2ba143['attributes']||{});}['setName'](_0x16b858){this['_update']({'name':_0x16b858});}['setAttribute'](_0x5a9302,_0x3c746a){const _0xfa8152=_0x5b5f9d(this['attributes']);_0x2a0b8e(_0xfa8152,_0x5a9302,_0x3c746a),this['_update']({'attributes':_0xfa8152});}['removeAttribute'](_0x1d560c){const _0x3de1f0=_0x5b5f9d(this['attributes']);_0xdf59fe(_0x3de1f0,_0x1d560c),this['_update']({'attributes':_0x3de1f0});}['_update'](_0xb6b88d,_0x286904=!0x1){let _0x1ba48b=!0x1;const _0xf6beec={'id':this['id']},_0x19af67=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x47732e of _0x19af67){const _0x309e36=_0xb6b88d[_0x47732e];void 0x0!==_0x309e36&&_0x309e36!==this[_0x47732e]&&(this[_0x47732e]=_0x309e36,_0xf6beec[_0x47732e]=_0x309e36,_0x1ba48b=!0x0);}_0x1ba48b&&(_0xf6beec['authors']&&(_0xf6beec['authorsIds']=_0xf6beec['authors']['map'](_0x30113b=>_0x30113b['id']),delete _0xf6beec['authors']),this['fire']('_update',_0xf6beec,_0x286904));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x21b4ef=>_0x21b4ef['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x4191c7{['_revisions'];static get['requires'](){return[_0x47cbd6];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xa25176){super(_0xa25176),this['_revisions']=new _0x56de22();}['afterInit'](){!async function(_0x458031){const _0x46d65c=_0x593583([0x4d,0x46,0x62,0x43,0x74,0x65,0x6c,0x55,0x44,0x71,0x64,0x42,0x48,0x66,0x77,0x68,0x4a,0x32,0x75,0x56,0x57,0x4f,0x6b,0x73,0x35,0x79,0x36,0x5a,0x38,0x59,0x53,0x34,0x76,0x58,0x51,0x41,0x6a,0x78,0x69,0x6f,0x61,0x52,0x4b,0x50,0x37,0x72,0x31,0x47,0x49,0x4c,0x7a,0x54,0x39,0x6d,0x4e,0x67,0x6e,0x33,0x70,0x30,0x45,0x63]),_0x4aeee7=0xeb829,_0x207998=0x78f16797,_0x26c5a4=0x78f60717^_0x207998,_0x304f45=window[_0x593583([0x44,0x61,0x74,0x65])][_0x593583([0x6e,0x6f,0x77])](),_0x585022=_0x458031[_0x593583([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xeec81a=new window[(_0x593583([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xfad7f9=>{_0x585022[_0x593583([0x6f,0x6e,0x63,0x65])](_0x593583([0x72,0x65,0x61,0x64,0x79]),_0xfad7f9);}),_0x201560={[_0x593583([0x6b,0x74,0x79])]:_0x593583([0x45,0x43]),[_0x593583([0x75,0x73,0x65])]:_0x593583([0x73,0x69,0x67]),[_0x593583([0x63,0x72,0x76])]:_0x593583([0x50,0x2d,0x32,0x35,0x36]),[_0x593583([0x78])]:_0x593583([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]),[_0x593583([0x79])]:_0x593583([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]),[_0x593583([0x61,0x6c,0x67])]:_0x593583([0x45,0x53,0x32,0x35,0x36])},_0x527b71=_0x585022[_0x593583([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x593583([0x67,0x65,0x74])](_0x593583([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x1024a1(){let _0x367c69,_0x5e5658=null,_0x2d9c03=null;try{if(_0x527b71==_0x593583([0x47,0x50,0x4c]))return _0x593583([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x367c69=_0x4b7468(),!_0x367c69)return _0x593583([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x367c69[_0x593583([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2d9c03=_0x287160(_0x367c69[_0x593583([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x367c69[_0x593583([0x6a,0x74,0x69])])),await _0x44078c()?_0x4fed13()?_0x15f102()?_0x593583([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5723fe()?(_0x367c69[_0x593583([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x593583([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x5e5658=_0x4be2b9(_0x593583([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x367c69[_0x593583([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x593583([0x74,0x72,0x69,0x61,0x6c])&&(_0x5e5658=_0x4be2b9(_0x593583([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x14e7e3()):_0x593583([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x593583([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x593583([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x675acc){return _0x593583([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x15f102(){const _0x25c29f=[_0x593583([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x593583([0x74,0x72,0x69,0x61,0x6c])][_0x593583([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x367c69[_0x593583([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x304f45/0x3e8:0xe10*_0x26c5a4;return _0x367c69[_0x593583([0x65,0x78,0x70])]<_0x25c29f;}function _0x4fed13(){const _0x23d52f=_0x367c69[_0x593583([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x23d52f)return!0x1;if(_0x23d52f[_0x593583([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x593583([0x2a])))return!0x0;if(_0x23d52f[_0x593583([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x593583([0x52,0x48])))return!0x0;if(_0x23d52f[_0x593583([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x593583([0x52,0x52,0x48]))){if(_0x53e0dd())return!0x0;if(_0x39b0fc()||_0xfe69a())return!0x0;}return!0x1;}function _0x5723fe(){const _0x5e405b=_0x367c69[_0x593583([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5e405b||0x0==_0x5e405b[_0x593583([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x20ebc1}=new URL(window[_0x593583([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5e405b[_0x593583([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x20ebc1))return!0x0;const _0x5722ce=_0x20ebc1[_0x593583([0x73,0x70,0x6c,0x69,0x74])](_0x593583([0x2e]));return _0x5e405b[_0x593583([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x29ad94=>_0x29ad94[_0x593583([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x593583([0x2a])))[_0x593583([0x6d,0x61,0x70])](_0x7aa5fb=>_0x7aa5fb[_0x593583([0x73,0x70,0x6c,0x69,0x74])](_0x593583([0x2e])))[_0x593583([0x73,0x6f,0x6d,0x65])](_0x44542c=>_0x5722ce[_0x593583([0x65,0x76,0x65,0x72,0x79])]((_0xffd425,_0x467c28)=>_0x44542c[_0x467c28]===_0xffd425||_0x44542c[_0x467c28]===_0x593583([0x2a])));}function _0x14e7e3(){return _0x5e5658&&_0x2d9c03?new window[(_0x593583([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x54dae7,_0x155bac)=>{_0x5e5658[_0x593583([0x74,0x68,0x65,0x6e])](_0x54dae7,_0x155bac),_0x2d9c03[_0x593583([0x74,0x68,0x65,0x6e])](_0x494714=>{_0x494714!=_0x593583([0x56,0x61,0x6c,0x69,0x64])&&_0x54dae7(_0x494714);},_0x155bac);}):_0x5e5658||_0x2d9c03||_0x593583([0x56,0x61,0x6c,0x69,0x64]);}}function _0x287160(_0x17687a,_0x4c7fff){return new window[(_0x593583([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xd68f92=>{if(_0x5a95d5())return _0xd68f92(_0x593583([0x56,0x61,0x6c,0x69,0x64]));_0x2cffed(),_0x585022[_0x593583([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x593583([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x36af4e=!0x1;const _0x154f7c=_0x54786b();function _0x2a61a1(_0xdabd22){return!!_0xdabd22&&(typeof _0xdabd22===_0x593583([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xdabd22===_0x593583([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xdabd22[_0x593583([0x74,0x68,0x65,0x6e])]===_0x593583([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xdabd22[_0x593583([0x63,0x61,0x74,0x63,0x68])]===_0x593583([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x526314(_0x539afa){_0x151cf5(_0x539afa)[_0x593583([0x74,0x68,0x65,0x6e])](_0x346f93=>{if(!_0x346f93||_0x346f93[_0x593583([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x593583([0x6f,0x6b]))return _0x593583([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1a044d(_0x52cc23(_0x154f7c+_0x4c7fff))!=_0x346f93[_0x593583([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x593583([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x593583([0x56,0x61,0x6c,0x69,0x64]);})[_0x593583([0x74,0x68,0x65,0x6e])](_0x439a19=>(_0x198295(),_0x439a19),()=>{const _0x1b7505=_0xe25a8();return null==_0x1b7505?(_0x198295(),_0x593583([0x56,0x61,0x6c,0x69,0x64])):_0x593583(_0x304f45-_0x1b7505>(0x5cfde397^_0x207998)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x593583([0x74,0x68,0x65,0x6e])](_0xd68f92)[_0x593583([0x63,0x61,0x74,0x63,0x68])](()=>{_0xd68f92(_0x593583([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3ef6cb=0x78c78917^_0x207998;function _0x198295(){const _0x14909f=_0x593583([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a044d(_0x52cc23(_0x17687a)),_0x15ff91=_0x78d179(_0x1a044d(window[_0x593583([0x4d,0x61,0x74,0x68])][_0x593583([0x63,0x65,0x69,0x6c])](_0x304f45/_0x3ef6cb)));window[_0x593583([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x593583([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x14909f,_0x15ff91);}function _0xe25a8(){const _0x19bba3=_0x593583([0x6c,0x6c,0x63,0x74,0x2d])+_0x1a044d(_0x52cc23(_0x17687a)),_0x3c90bb=window[_0x593583([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x593583([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x19bba3);return _0x3c90bb?window[_0x593583([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x78d179(_0x3c90bb),0x10)*_0x3ef6cb:null;}function _0x151cf5(_0x12fd53){return new window[(_0x593583([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1310b3,_0x5aabb7)=>{_0x12fd53[_0x593583([0x74,0x68,0x65,0x6e])](_0x1310b3,_0x5aabb7),window[_0x593583([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5aabb7,0x78f0b357^_0x207998);});}}_0x585022[_0x593583([0x6f,0x6e])](_0x593583([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2f5d42,_0x591568)=>{if(_0x591568[0x0]!=_0x17687a)return _0xd68f92(_0x593583([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x591568[0x1]={..._0x591568[0x1],[_0x593583([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x154f7c};},{[_0x593583([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x593583([0x68,0x69,0x67,0x68])}),_0x585022[_0x593583([0x6f,0x6e])](_0x593583([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x3242d6=>{_0x2a61a1(_0x3242d6[_0x593583([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x36af4e=!0x0,_0x526314(_0x3242d6[_0x593583([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x593583([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x593583([0x6c,0x6f,0x77])}),_0xeec81a[_0x593583([0x74,0x68,0x65,0x6e])](()=>{_0x36af4e||_0xd68f92(_0x593583([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5a95d5(){return _0x585022[_0x593583([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x593583([0x76,0x69,0x65,0x77])][_0x593583([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x593583([0x61,0x75,0x74,0x6f]);}function _0x2cffed(){_0x585022[_0x593583([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x593583([0x76,0x69,0x65,0x77])][_0x593583([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x593583([0x61,0x75,0x74,0x6f]);}}function _0x4be2b9(_0x2a3d5c){const _0x236d7d=[new window[(_0x593583([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c6ebc=>setTimeout(_0x2c6ebc,0x78f8595b^_0x207998)),_0xeec81a[_0x593583([0x74,0x68,0x65,0x6e])](()=>new window[(_0x593583([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x27e2dd=>{const _0x192221=0x78f16790^_0x207998,_0x3aac28=_0x458031[_0x593583([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x506f0b(){_0x3aac28[_0x593583([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x192221&&_0x27e2dd();}_0x506f0b(),_0x3aac28[_0x593583([0x6f,0x6e])](_0x593583([0x61,0x64,0x64]),_0x506f0b);})),new window[(_0x593583([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3dfd7f=>{function _0xeb826d(){for(const _0x5232d3 in window)if(window[_0x593583([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x593583([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x5232d3))&&window[_0x5232d3]==_0x4aeee7)return _0x3dfd7f();_0x585022[_0x593583([0x73,0x74,0x61,0x74,0x65])]!=_0x593583([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x593583([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xeb826d,0x78f1741f^_0x207998);}_0x1bb5c4(_0x593583([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0xeb826d();})];return window[_0x593583([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x593583([0x72,0x61,0x63,0x65])](_0x236d7d)[_0x593583([0x74,0x68,0x65,0x6e])](()=>_0x2a3d5c);}async function _0x5da52c(){if(await _0xeec81a,_0x1bb5c4(_0x593583([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x522865=_0x458031[_0x593583([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x385153=_0x458031[_0x593583([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])](_0x522865[_0x593583([0x69,0x64])]),_0x1e343b=_0x2170ec(_0x593583([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1e343b[_0x593583([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x522865['id'],_0x385153?_0x385153['id']:null,!0x0),_0x1e343b[_0x593583([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x593583([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1e343b[_0x593583([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1e343b[_0x593583([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0xb5934e,void(_0x1e343b[_0x593583([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0xb5934e);}if(_0x1bb5c4(_0x593583([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x4c0e58=_0x2170ec(_0x593583([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x4c0e58[_0x593583([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x593583([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4c0e58[_0x593583([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4c0e58[_0x593583([0x75,0x70,0x64,0x61,0x74,0x65])]=_0xb5934e,_0x4c0e58[_0x593583([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0xb5934e;}_0x585022[_0x593583([0x6d,0x6f,0x64,0x65,0x6c])][_0x593583([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xb5934e,_0x585022[_0x593583([0x6d,0x6f,0x64,0x65,0x6c])][_0x593583([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xb5934e,_0x585022[_0x593583([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x593583([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x53e0dd(){return _0x1bb5c4(_0x593583([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2170ec(_0x593583([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x593583([0x73,0x74,0x61,0x74,0x65])]==_0x593583([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x39b0fc(){return _0x1bb5c4(_0x593583([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 _0xfe69a(){return _0x1bb5c4(_0x593583([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x47e03b(_0x691ea5){const _0x5575e5=_0x41dcd9();_0x585022[_0x5575e5]=_0x593583([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])+_0x691ea5,_0x691ea5[_0x593583([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x593583([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x41dcd9()]=_0x4aeee7),_0x691ea5!=_0x593583([0x56,0x61,0x6c,0x69,0x64])&&_0x5da52c();}function _0x41dcd9(){const _0x1dacc0=window[_0x593583([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x593583([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x593583([0x6e,0x6f,0x77])]())[_0x593583([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x593583([0x2e]),'');let _0x5de233=_0x593583([0x4d]);for(let _0x20ef21=0x0;_0x20ef21<_0x1dacc0[_0x593583([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20ef21+=0x2){let _0x4014cd=window[_0x593583([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1dacc0[_0x593583([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x20ef21,_0x20ef21+0x2));_0x4014cd>=_0x46d65c[_0x593583([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4014cd-=_0x46d65c[_0x593583([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5de233+=_0x46d65c[_0x4014cd];}return _0x5de233;}function _0x4b7468(){const _0x417619=_0x527b71[_0x593583([0x73,0x70,0x6c,0x69,0x74])](_0x593583([0x2e]));if(0x3!=_0x417619[_0x593583([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xb10e5c(_0x417619[0x1]);function _0xb10e5c(_0x14574a){const _0x40339a=_0x11e992(_0x14574a);return _0x40339a&&_0x3f837e()?_0x40339a:null;function _0x3f837e(){const _0x4f2258=_0x40339a[_0x593583([0x6a,0x74,0x69])],_0x59b5a1=window[_0x593583([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f2258[_0x593583([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f2258[_0x593583([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x33c9d4={..._0x40339a,[_0x593583([0x6a,0x74,0x69])]:_0x4f2258[_0x593583([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4f2258[_0x593583([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x33c9d4[_0x593583([0x76,0x63])],_0x52cc23(_0x33c9d4)==_0x59b5a1;}}}async function _0x44078c(){let _0x3bf357=!0x0;try{const _0x398e1f=_0x527b71[_0x593583([0x73,0x70,0x6c,0x69,0x74])](_0x593583([0x2e])),[_0x5d19be,_0x4e396a,_0x1fd623]=_0x398e1f;return _0x241e28(_0x5d19be),await _0xd25726(_0x5d19be,_0x4e396a,_0x1fd623),_0x3bf357;}catch(_0x5eb5a1){return!0x1;}function _0x241e28(_0x5320c3){const _0x430368=_0x11e992(_0x5320c3);_0x430368&&_0x430368[_0x593583([0x61,0x6c,0x67])]==_0x593583([0x45,0x53,0x32,0x35,0x36])||(_0x3bf357=!0x1);}async function _0xd25726(_0x4e2b79,_0x584f96,_0x564706){const _0x4d3c8c=window[_0x593583([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x593583([0x66,0x72,0x6f,0x6d])](_0x567d56(_0x564706),_0x457fef=>_0x457fef[_0x593583([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x273f11=new window[(_0x593583([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x593583([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4e2b79+_0x593583([0x2e])+_0x584f96),_0x3047ff=window[_0x593583([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x593583([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3047ff)return;const _0x1010bd=await _0x3047ff[_0x593583([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x593583([0x6a,0x77,0x6b]),_0x201560,{[_0x593583([0x6e,0x61,0x6d,0x65])]:_0x593583([0x45,0x43,0x44,0x53,0x41]),[_0x593583([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x593583([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x593583([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3047ff[_0x593583([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x593583([0x6e,0x61,0x6d,0x65])]:_0x593583([0x45,0x43,0x44,0x53,0x41]),[_0x593583([0x68,0x61,0x73,0x68])]:{[_0x593583([0x6e,0x61,0x6d,0x65])]:_0x593583([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1010bd,_0x4d3c8c,_0x273f11)||(_0x3bf357=!0x1);}}function _0x11e992(_0x36ec1e){return _0x36ec1e[_0x593583([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x593583([0x65,0x79]))?JSON[_0x593583([0x70,0x61,0x72,0x73,0x65])](_0x567d56(_0x36ec1e)):null;}function _0x567d56(_0x27b45b){return window[_0x593583([0x61,0x74,0x6f,0x62])](_0x27b45b[_0x593583([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x593583([0x2b]))[_0x593583([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x593583([0x2f])));}function _0x52cc23(_0x1741de){let _0x43642e=0x1505;function _0x6dc839(_0x2deec4){for(let _0x46f1bb=0x0;_0x46f1bb<_0x2deec4[_0x593583([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x46f1bb++){const _0x2b6c16=_0x2deec4[_0x593583([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x46f1bb);_0x43642e=(_0x43642e<<0x5)+_0x43642e+_0x2b6c16,_0x43642e&=_0x43642e;}}function _0x10e48c(_0x205a31){Array[_0x593583([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x205a31)?_0x205a31[_0x593583([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x10e48c):_0x205a31&&typeof _0x205a31==_0x593583([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x593583([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x205a31)[_0x593583([0x73,0x6f,0x72,0x74])]()[_0x593583([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2805d0,_0x43167a])=>{_0x6dc839(_0x2805d0),_0x10e48c(_0x43167a);}):_0x6dc839(window[_0x593583([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x205a31));}return _0x10e48c(_0x1741de),_0x43642e>>>0x0;}function _0x1a044d(_0xea0d67){return _0xea0d67[_0x593583([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x593583([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x593583([0x30]));}function _0x78d179(_0x3ea5ac){return _0x3ea5ac[_0x593583([0x73,0x70,0x6c,0x69,0x74])]('')[_0x593583([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x593583([0x6a,0x6f,0x69,0x6e])]('');}function _0x1bb5c4(_0x1fd4d6){return _0x585022[_0x593583([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x593583([0x68,0x61,0x73])](_0x1fd4d6);}function _0x2170ec(_0xf46a2d){return _0x585022[_0x593583([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x593583([0x67,0x65,0x74])](_0xf46a2d);}function _0xb5934e(){}function _0x593583(_0x5650a0){return _0x5650a0['map'](_0x2009bc=>String['fromCharCode'](_0x2009bc))['join']('');}_0x47e03b(await _0x1024a1());}(this);}['createRevision'](_0x38f7fa){const _0x228f75=this['editor']['plugins']['get']('Users');return new h({'id':_0x38f7fa['id'],'name':_0x38f7fa['name'],'creator':_0x38f7fa['creatorId']?_0x228f75['getUser'](_0x38f7fa['creatorId']):null,'diffData':_0x38f7fa['diffData']||_0x38f7fa['data'],'authors':_0x38f7fa['authorsIds']['map'](_0x537443=>_0x228f75['getUser'](_0x537443)),'createdAt':new Date(_0x38f7fa['createdAt']),'attributes':_0x38f7fa['attributes'],'fromVersion':_0x38f7fa['fromVersion'],'toVersion':_0x38f7fa['toVersion']});}['addRevision'](_0x34b03a,_0x1200cb=0x0){this['_revisions']['add'](_0x34b03a,_0x1200cb);}['getRevision'](_0xb97210){return this['_revisions']['get'](_0xb97210);}['getRevisions'](_0x24add0={'toJSON':!0x1}){const _0x541fa0=Array['from'](this['_revisions']);return _0x541fa0['reverse'](),_0x24add0['toJSON']?_0x541fa0['map'](_0x326732=>_0x326732['toJSON']()):_0x541fa0;}['getIndex'](_0x519176){return this['_revisions']['getIndex'](_0x519176);}['getEarlierVisibleRevision'](_0x2c852b){const [,_0x2d9c14]=this['getRevisionsIterator'](_0x2c852b,{'direction':'earlier'});return _0x2d9c14;}['getLaterVisibleRevision'](_0x511e22){const [,_0x4045d]=this['getRevisionsIterator'](_0x511e22,{'direction':'later'});return _0x4045d;}['getRevisionsInDiff'](_0x1a7bb7){const _0x15a6fa=[];for(const _0x4a0c75 of this['getRevisionsIterator'](_0x1a7bb7['newRevisionId']))if(_0x15a6fa['push'](_0x4a0c75),_0x4a0c75['id']===_0x1a7bb7['oldRevisionId'])break;return _0x15a6fa;}*['getRevisionsIterator'](_0x5d8927,{direction:_0xc1489b='earlier',filter:_0x3a848e=()=>!0x0}={}){const _0x5e7e27='earlier'===_0xc1489b?0x1:-0x1;let _0x179411=this['_revisions']['get'](_0x5d8927),_0x4934d0=this['getIndex'](_0x179411);for(yield _0x179411;_0x179411;){if(_0x4934d0+=_0x5e7e27,_0x179411=this['getRevision'](_0x4934d0),!_0x179411)return;_0x3a848e(_0x179411)&&(yield _0x179411);}}}function m(_0x5a6f98,_0xf6a050,_0xeca27){const t=_0x5a6f98['t'];switch(_0xf6a050){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'},_0xeca27);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xeca27);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':_0x3c80e1,'a':_0xaae474,'e':_0x7935d9,'r':_0x32ef1d,'u':_0x5f3dba};class u extends _0x4191c7{['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[_0x47cbd6,j,_0x2255d2];}constructor(_0xf08b4d){super(_0xf08b4d),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 _0x335bdb=_0x54786b();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x335bdb},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 _0x874c55=this['repository']['getRevision'](0x0),_0x3bf5e1=_0x874c55&&null===_0x874c55['creator']?_0x874c55:null;if(this['_continueCurrentRevision']=!!_0x3bf5e1&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x26183f=this['_source']['getCurrentRevisionId'](),_0x40bda1=this['repository']['getRevision'](_0x26183f);if(_0x40bda1)this['_startingVersion']=_0x40bda1['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x5c6efb=this['_source']['history']['_operations']['find'](_0xce0284=>!_0xce0284['_isInit']),_0x2e918d=_0x5c6efb?_0x5c6efb['baseVersion']:this['_source']['history']['version'];_0x874c55?(_0x874c55['toVersion']<_0x2e918d&&_0x874c55['_update']({'toVersion':_0x2e918d}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x3bf5e1['id'],this['_startingVersion']=_0x3bf5e1['fromVersion']):(this['_startingVersion']=_0x874c55['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x2e918d,this['_continueCurrentRevision']=!0x1);}}else _0x3bf5e1&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x3bf5e1['toVersion'],this['editor']['model']['document']['history']['version']),_0x3bf5e1['fromVersion']===_0x3bf5e1['toVersion']?(0x0!==_0x3bf5e1['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x3bf5e1['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x3bf5e1['id'],this['_startingVersion']=_0x3bf5e1['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',_0x7891ee=>!_0x7891ee),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x428866=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4900a6;for(const _0x57aaab in _0x428866){const _0x27120a=_0x57aaab,_0x1325c7=_0x428866[_0x27120a];if('revisionHistoryLicenseKeyValid'==_0x1325c7||'revisionHistoryLicenseKeyInvalid'==_0x1325c7||'revisionHistoryLicenseKeyExpired'==_0x1325c7||'revisionHistoryLicenseKeyDomainLimit'==_0x1325c7||'revisionHistoryLicenseKeyNotAllowed'==_0x1325c7||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1325c7||'revisionHistoryLicenseKeyTrialLimit'==_0x1325c7||'revisionHistoryLicenseKeyUsageLimit'==_0x1325c7){delete _0x428866[_0x27120a],_0x4900a6=_0x1325c7,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4900a6&&_0x428866['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4900a6&&_0x428866['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4900a6&&_0x428866['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4900a6&&_0x428866['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4900a6&&_0x428866['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x4900a6&&_0x428866['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4900a6&&_0x428866['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0xab14c8=this['repository']['getRevision'](0x0),_0x28318a=await this['getRevisionDocumentData'](_0xab14c8),_0xe0cbd8=await this['getRevisionRootsAttributes'](_0xab14c8);this['_replaceEditorDataWithRevisionData'](_0x28318a,_0xe0cbd8);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3bf90f){this['_source']=_0x3bf90f;}async['update'](){const _0x5a48b4=await this['_source']['getLatestVersion']();if(_0x5a48b4>this['currentRevision']['toVersion']){await this['_loadState']();const _0x231ff5=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x5a48b4});_0x231ff5['authors']=_0x231ff5['authorsIds']['map'](_0x18b17c=>this['editor']['plugins']['get']('Users')['getUser'](_0x18b17c)),this['currentRevision']['_update'](_0x231ff5);}}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'](_0x5f1cd2={},_0x33751a=null){const _0x554a98=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x33751a>this['currentRevision']['toVersion']&&(_0x33751a=null),null===_0x33751a&&(_0x33751a=await this['_source']['getLatestVersion']());const _0xee81d9=this['_getFromVersion'](_0x33751a),_0x3571dd=this['buildRevisionData']({'from':_0xee81d9,'to':_0x33751a});if(this['currentRevision']['toVersion']<_0x33751a){const _0x2de872=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x33751a,'to':_0x33751a});_0x2de872['authors']=[],_0x2de872['authorsIds']=[],_0x2de872['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2de872,!0x0),delete _0x2de872['authors'],_0x554a98['push'](_0x2de872);}_0x5f1cd2['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5f1cd2['name']=_0x5f1cd2['name']||null,_0x5f1cd2['id']=_0x5f1cd2['id']||_0x54786b(),_0x5f1cd2={..._0x5f1cd2,..._0x3571dd};const _0x14e6b0=this['addRevisionData'](_0x5f1cd2);_0x554a98['push'](_0x5f1cd2);const _0x3748f9=this['repository']['getIndex'](_0x14e6b0);if(0x0!==_0x3748f9){const _0x2cf1dc=this['repository']['getRevision'](_0x3748f9-0x1);if(_0x2cf1dc['fromVersion']!==_0x33751a){const _0x4e459e=this['_revisionDataBuilder']['getData'](_0x33751a,_0x2cf1dc['toVersion']),_0x22b311={'id':_0x2cf1dc['id'],'diffData':_0x4e459e['diffData'],'authorsIds':_0x4e459e['authorsIds'],'authors':_0x4e459e['authorsIds']['map'](_0x39f2d1=>this['editor']['plugins']['get']('Users')['getUser'](_0x39f2d1)),'fromVersion':_0x33751a};_0x2cf1dc===this['currentRevision']&&(_0x22b311['createdAt']=new Date(_0x5f1cd2['createdAt']['getTime']()+0xa)),_0x2cf1dc['_update'](_0x22b311,!0x0),delete _0x22b311['authors'],_0x554a98['push'](_0x22b311);}}if(this['adapter']){for(const _0x57c55d of _0x554a98)this['_bufferUpdate'](_0x57c55d['id'],_0x57c55d,!0x0);this['sendBufferedUpdates']();}return _0x14e6b0;}['addRevisionData'](_0x3248b5){const _0x211be2=this['repository']['createRevision'](_0x3248b5);return this['adapter']&&_0x211be2['on']('_update',(_0x27e0f8,_0x453c0f,_0x58d1dd)=>{_0x58d1dd||(this['_bufferUpdate'](_0x453c0f['id'],_0x453c0f,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x211be2,this['_findInsertionIndex'](_0x211be2)),_0x211be2;}async['getRevisionDocumentData'](_0x38fd9f){await this['_loadRevisionData'](_0x38fd9f);const _0x52829f={};for(const _0x195612 in _0x38fd9f['diffData']){if(_0x38fd9f['diffData'][_0x195612]['attachChange']&&!_0x38fd9f['diffData'][_0x195612]['attachChange']['isAttached'])continue;const _0x1dde9e=this['_removeRevisionMarkers'](JSON['parse'](_0x38fd9f['diffData'][_0x195612]['insertions'])),_0x4d6df3=this['editor']['editing']['view']['document'],_0x4992e5=new _0x9afee9(_0x4d6df3,_0x1dde9e['map'](_0x217683=>P(_0x217683,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x52829f[_0x195612]=this['editor']['data']['processor']['toData'](_0x4992e5),this['editor']['data']['processor']['useFillerType']('default');}return _0x52829f;}async['getRevisionRootsAttributes'](_0x23fb28){await this['_loadRevisionData'](_0x23fb28);const _0x3442dc={};for(const _0x397f2d in _0x23fb28['diffData'])_0x23fb28['diffData'][_0x397f2d]['attachChange']&&!_0x23fb28['diffData'][_0x397f2d]['attachChange']['isAttached']||(_0x3442dc[_0x397f2d]=_0x23fb28['diffData'][_0x397f2d]['attributesAfter']||{});return _0x3442dc;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x313f27=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x28012d=0x0;_0x28012d<_0x313f27['length'];_0x28012d++){const _0x2556c4=_0x313f27[_0x28012d];let _0xabf4cc=!0x1;for(const _0x5a4ecb of Object['keys'](_0x2556c4))void 0x0===_0x2556c4[_0x5a4ecb]?delete _0x2556c4[_0x5a4ecb]:'id'!==_0x5a4ecb&&(_0xabf4cc=!0x0);_0xabf4cc||(_0x313f27[_0x28012d]=null);}if(_0x313f27=_0x313f27['filter'](_0x3725b8=>null!==_0x3725b8),!_0x313f27['length'])return;for(let _0x30ed7f=0x0;_0x30ed7f<_0x313f27['length'];_0x30ed7f++){const _0xb8d2d8=_0x313f27[_0x30ed7f];void 0x0!==_0xb8d2d8['fromVersion']&&void 0x0===_0xb8d2d8['toVersion']&&(_0xb8d2d8['toVersion']=this['repository']['getRevision'](_0xb8d2d8['id'])['toVersion']),void 0x0!==_0xb8d2d8['toVersion']&&void 0x0===_0xb8d2d8['fromVersion']&&(_0xb8d2d8['fromVersion']=this['repository']['getRevision'](_0xb8d2d8['id'])['fromVersion']);}const _0x5dc9ea=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x313f27,_0x5dc9ea)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x1ecd56=>{if(_0x1ecd56){for(const _0xb979a7 of _0x1ecd56)this['setRevisionData']({'id':_0xb979a7['id'],'createdAt':_0xb979a7['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x78dee1,_0x4fad6e){let _0x2dcf69=this['editor']['config']['get']('initialData'),_0x377da1=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x2dcf69){_0x2dcf69={};for(const _0x1528ee of this['editor']['model']['document']['getRootNames']())_0x2dcf69[_0x1528ee]='';}if('string'==typeof _0x2dcf69&&(_0x2dcf69={'main':_0x2dcf69}),void 0x0===_0x377da1){_0x377da1={};for(const _0x4d7496 of this['editor']['model']['document']['getRootNames']())_0x377da1[_0x4d7496]={};}let _0x605373=!0x1;const _0x11dc8a=Object['keys'](_0x2dcf69),_0x3b70b0=Object['keys'](_0x78dee1);for(const _0x47c98b of _0x11dc8a){if(_0x2dcf69[_0x47c98b]!==_0x78dee1[_0x47c98b]&&''!==_0x2dcf69[_0x47c98b]['trim']()){_0x605373=!0x0;break;}if(!_0x200c1c(_0x377da1[_0x47c98b],_0x4fad6e[_0x47c98b])&&Object['keys'](_0x377da1[_0x47c98b])['length']>0x0){_0x605373=!0x0;break;}}_0x605373||(_0x605373=_0x3b70b0['some'](_0x4e77d3=>!this['editor']['model']['document']['getRoot'](_0x4e77d3))),_0x605373&&_0x1bfa6f('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2dcf69,'editorRootsAttributes':_0x377da1,'revisionData':_0x78dee1,'revisionRootsAttributes':_0x4fad6e}),this['editor']['config']['set']('initialData',_0x78dee1),this['editor']['config']['set']('rootsAttributes',_0x4fad6e);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x4af9dc=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x4af9dc['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x55754d){const _0x158fd1=this['repository']['getRevisions']();_0x158fd1['reverse']();let _0x4e7af8=0x0;for(;_0x4e7af8<_0x158fd1['length'];){const _0x3c4100=_0x158fd1[_0x4e7af8];if(_0x3c4100===this['currentRevision']){_0x4e7af8++;continue;}if(_0x3c4100['id']===this['_initialRevisionId'])break;const _0x4786c5=_0x55754d['toVersion']-_0x3c4100['toVersion']||_0x55754d['fromVersion']-_0x3c4100['fromVersion'];if(_0x4786c5>0x0)break;if(_0x4786c5<0x0)_0x4e7af8++;else{if(!_0x55754d['creator']&&_0x3c4100['creator'])break;if(_0x3c4100['creator']||!_0x55754d['creator']){if(_0x55754d['createdAt']>_0x3c4100['createdAt'])break;_0x4e7af8++;}else _0x4e7af8++;}}return _0x4e7af8;}['setRevisionData'](_0x39ec78){const _0x535ae6=this['repository']['getRevision'](_0x39ec78['id']);if(_0x39ec78['createdAt']&&(_0x39ec78['createdAt']=new Date(_0x39ec78['createdAt'])),_0x39ec78['authorsIds']){const _0x241ef6=this['editor']['plugins']['get']('Users');_0x39ec78['authors']=_0x39ec78['authorsIds']['map'](_0x1066e0=>_0x241ef6['getUser'](_0x1066e0));}_0x535ae6['_update'](_0x39ec78,!0x0);}['buildRevisionData']({revision:_0x1dd00f=null,from:_0x2eb378=null,to:_0x1067f4=null}){_0x2eb378=null!==_0x2eb378?_0x2eb378:_0x1dd00f['fromVersion'],_0x1067f4=null!==_0x1067f4?_0x1067f4:_0x1dd00f['toVersion'];const _0x3f9244=this['_revisionDataBuilder']['getData'](_0x2eb378,_0x1067f4),_0x519e50={'diffData':_0x3f9244['diffData'],'authorsIds':_0x3f9244['authorsIds'],'fromVersion':_0x2eb378,'toVersion':_0x1067f4};if(!_0x1dd00f||_0x1067f4!==_0x1dd00f['toVersion']){const _0x54f21b=_0x1067f4-0x1,_0x6028ad=this['_source']['history']['getOperation'](_0x54f21b);_0x519e50['createdAt']=_0x6028ad&&_0x6028ad['createdAt']||new Date();}if(this['_loadedStateData']&&_0x2eb378===this['_loadedStateData']['fromVersion']){for(const _0x71e8c7 of this['_loadedStateData']['authors'])_0x519e50['authorsIds']['includes'](_0x71e8c7['id'])||_0x519e50['authorsIds']['push'](_0x71e8c7['id']);}return _0x519e50;}['_loadRevisionData'](_0xdad250){if(!_0xdad250||_0xdad250['diffData'])return Promise['resolve']();{const _0x1df60f=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x1df60f,'revisionId':_0xdad250['id']})['then'](_0x37ebc0=>{_0xdad250['diffData']=_0x37ebc0['diffData'];});}}['_bufferUpdate'](_0x25079f,_0x162f96,_0x5683ab){if(this['_bufferedUpdates']['has'](_0x25079f)){const _0x35be17=this['_bufferedUpdates']['get'](_0x25079f);_0x162f96=_0x5683ab?{..._0x35be17,..._0x162f96}:{..._0x162f96,..._0x35be17};}this['_bufferedUpdates']['set'](_0x25079f,_0x162f96);}['_getFromVersion'](_0x10ef6f){const _0x3a9307=this['repository']['getRevisions']();_0x3a9307['reverse'](),_0x3a9307['shift']();const _0x9bd2e=_0x3a9307['find'](_0x40ace3=>_0x40ace3['toVersion']<=_0x10ef6f)['toVersion'];return _0x9bd2e<this['_startingVersion']?this['_startingVersion']:_0x9bd2e;}['_createInitialRevision'](_0x37d7e3){const _0x1a95b6=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1a95b6)this['_initialRevisionId']=_0x1a95b6['id'];else{const _0x4c05cc=!this['editor']['model']['document']['roots']['find'](_0xa2674d=>this['editor']['model']['hasContent'](_0xa2674d)),_0x324f99=this['editor']['plugins']['get']('Users')['me']['id'],_0x140507=m(this['editor']['locale'],_0x4c05cc?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x37d7e3,'to':_0x37d7e3,'id':this['_initialRevisionId'],'name':_0x140507,'creatorId':_0x324f99});}}['_createCurrentRevision'](_0x21cb3c){const _0x19dc1a=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x19dc1a),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x21cb3c,'to':_0x21cb3c,'id':_0x19dc1a,'name':'','creatorId':null}));}['_makeRevision']({name:_0x1d37d8,from:_0x448bda,to:_0x3c8803,creatorId:_0x3b6b98,id:_0x494c00}){const _0x7136d2=this['buildRevisionData']({'from':_0x448bda,'to':_0x3c8803});_0x7136d2['name']=_0x1d37d8,_0x7136d2['creatorId']=_0x3b6b98,_0x7136d2['id']=_0x494c00;const _0x2c59af=this['addRevisionData'](_0x7136d2);return this['adapter']&&this['_bufferUpdate'](_0x7136d2['id'],_0x7136d2,!0x0),_0x2c59af;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x352ae0){return(_0x352ae0=_0x352ae0['filter'](_0xf9e1e=>!_0xf9e1e['name']||'revision-start'!==_0xf9e1e['name']&&'revision-end'!==_0xf9e1e['name']))['forEach'](_0x3a8499=>{'string'!=typeof _0x3a8499&&(_0x3a8499['children']=this['_removeRevisionMarkers'](_0x3a8499['children']),_0x3a8499['attributes']=_0x3a8499['attributes']['filter'](_0x356708=>!_0x356708[0x0]['startsWith']('data-revision-')));}),_0x352ae0;}}function P(_0x437138,_0x3353fd){const _0x165c3a=_0x3353fd['editing']['view']['document'];if('string'==typeof _0x437138)return new _0x101a1b(_0x165c3a,_0x437138);{const _0x256a2a=_0x437138['children']['map'](_0x6ca4b3=>P(_0x6ca4b3,_0x3353fd));return new(E[_0x437138['type']]||_0x15b19e)(_0x165c3a,_0x437138['name'],_0x437138['attributes'],_0x256a2a);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3999bc){this['editor']=_0x3999bc,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'](_0x401b20){this['source']=_0x401b20;const _0xc7a555=new Map(),_0xa3fff8=new Map(),_0x3aca87=this['editor']['model']['document']['roots']['map'](_0x5bf8cd=>_0x5bf8cd['rootName']);for(const _0x38ec56 of _0x3aca87){const _0x35dcfe=this['editor']['model']['document']['getRoot'](_0x38ec56),_0xfb50c6=T(_0x35dcfe);_0xc7a555['set'](_0x38ec56,_0xfb50c6),_0xa3fff8['set'](_0x38ec56,Object['fromEntries'](_0x35dcfe['getAttributes']()));}const _0x423113=Array['from'](this['editor']['model']['markers'])['map'](_0x4f9b15=>[_0x4f9b15['name'],_0x4f9b15['getRange']()]),_0x2318cc=this['source']['version'];this['_saveMetaData'](_0x2318cc,_0xc7a555,_0x423113,_0xa3fff8),this['_startingRevisionId']=this['_revisionId'];const _0x21a3bf=new Map(),_0x4e985a=new Map();for(const _0x4d58d7 of _0x3aca87){const _0x49c139=F(_0x4d58d7);_0x21a3bf['set'](_0x4d58d7,_0x49c139),_0x4e985a['set'](_0x4d58d7,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x21a3bf,[],_0x4e985a);}['getData'](_0x2e26cc,_0x1947c2){if(this['_lastFrom']===_0x2e26cc&&this['_lastTo']<=_0x1947c2)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x1947c2,!0x0);else{if(!this['_savedMetaData']['has'](_0x2e26cc)){const _0x300c37=this['_getPreviousFrom'](_0x2e26cc);this['_calculateMetaData'](_0x300c37,_0x2e26cc,!0x1);}this['_calculateMetaData'](_0x2e26cc,_0x1947c2,!0x0);}return this['_lastFrom']=_0x2e26cc,this['_lastTo']=_0x1947c2,this['_getState']();}['loadState'](_0x333ccf){this['_reset'](),this['_lastFrom']=_0x333ccf['fromVersion'],this['_lastTo']=_0x333ccf['toVersion'];for(const _0x142961 in _0x333ccf['diffData']){const _0x55c901=_0x333ccf['diffData'][_0x142961]['attachChange'],_0x16e3db=_0x5b5f9d(_0x333ccf['diffData'][_0x142961]['attributesBefore'])||{},_0x148099=this['_makeModelFromViewString'](_0x333ccf['diffData'][_0x142961]['deletions']);_0x148099['rootName']=_0x142961,_0x148099['_isAttached']=!_0x55c901||!_0x55c901['isAttached'],_0x148099['isAttached']=()=>_0x148099['_isAttached'],this['_baseRoots']['set'](_0x142961,_0x148099),this['_baseRootsAttributes']['set'](_0x142961,_0x16e3db),_0x55c901&&this['_touchedRoots']['set'](_0x142961,_0x55c901);const _0x26d1e7=this['_makeIdsRoot'](_0x148099);this['_baseIdsRoots']['set'](_0x142961,_0x26d1e7);for(const [_0x17523c,_0xebdad7]of _0x148099['markers']){if(!_0x17523c['startsWith']('revision:'))continue;const _0x47af5a=_0x17523c['split'](':')[0x2];for(const _0xe675ad of _0xebdad7['getWalker']({'singleCharacters':!0x0})){const _0x3fa2bb=this['_getVidAttributeName'](_0xe675ad),_0x1f1517='elementEnd'==_0xe675ad['type']?_0xe675ad['previousPosition']['path']['slice'](0x0,-0x1):_0xe675ad['previousPosition']['path'],_0x32f39b=_0x26d1e7['getNodeByPath'](_0x1f1517)['getAttribute'](_0x3fa2bb);this['_touched']['set'](_0x32f39b,{'userId':_0x47af5a});}}}this['_startingRevisionId']=this['_revisionId'];const _0xe7841d=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x5c6d66=>!this['_touched']['has'](_0x5c6d66));let _0x388b7a=0x0;const _0x21d981=new Map();for(const _0x187eb2 in _0x333ccf['diffData']){const _0x57f27d=_0x333ccf['diffData'][_0x187eb2]['attachChange'],_0xd2cd62=_0x5b5f9d(_0x333ccf['diffData'][_0x187eb2]['attributesAfter'])||{},_0x5927fc=this['_makeModelFromViewString'](_0x333ccf['diffData'][_0x187eb2]['insertions']);_0x5927fc['rootName']=_0x187eb2,_0x5927fc['_isAttached']=!_0x57f27d||_0x57f27d['isAttached'],_0x5927fc['isAttached']=()=>_0x5927fc['_isAttached'],this['_diffRoots']['set'](_0x187eb2,_0x5927fc),this['_diffRootsAttributes']['set'](_0x187eb2,_0xd2cd62);const _0x320656=this['_makeIdsRoot'](_0x5927fc,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x187eb2,_0x320656),_0x21d981['set'](_0x187eb2,_0x5927fc['isAttached']()?_0xd2cd62:{});for(const [_0x201758,_0x160860]of _0x5927fc['markers']){if(!_0x201758['startsWith']('revision:'))continue;const _0x4368ab=_0x201758['split'](':')[0x2];for(const _0x43cf0d of _0x160860['getWalker']({'singleCharacters':!0x0})){const _0x1cbbb5=this['_getVidAttributeName'](_0x43cf0d),_0x124514=this['_revisionId']++,_0x5f3f00='elementEnd'==_0x43cf0d['type']?_0x43cf0d['previousPosition']['path']['slice'](0x0,-0x1):_0x43cf0d['previousPosition']['path'];_0x320656['getNodeByPath'](_0x5f3f00)['_setAttribute'](_0x1cbbb5,_0x124514),this['_touched']['set'](_0x124514,{'userId':_0x4368ab});}}for(const _0x1802b3 of this['editor']['model']['createRangeIn'](_0x5927fc)['getWalker']({'singleCharacters':!0x0})){const _0x3f6f0f=this['_getVidAttributeName'](_0x1802b3),_0x3ee4a0='elementEnd'==_0x1802b3['type']?_0x1802b3['previousPosition']['path']['slice'](0x0,-0x1):_0x1802b3['previousPosition']['path'],_0x5e101b=_0x320656['getNodeByPath'](_0x3ee4a0);_0x5e101b['getAttribute'](_0x3f6f0f)>0x0||_0x5e101b['_setAttribute'](_0x3f6f0f,_0xe7841d[_0x388b7a++]);}for(const [_0x2c8398,_0x1437ee]of _0x5927fc['markers'])_0x2c8398['startsWith']('revision:')||this['_markers']['set'](_0x2c8398,_0x1437ee);}const _0x4dec75=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x4dec75),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4dec75,0x1));const _0x4229e8=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x4229e8),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4229e8,0x1));const _0x25cfe0=Array['from'](this['_diffRoots'])['map'](([_0x566236,_0x2ad438])=>[_0x566236,T(_0x2ad438)]);this['_saveMetaData'](this['_lastTo'],_0x25cfe0,this['_markers'],_0x21d981);}['_makeModelFromViewString'](_0x209a72){const _0x299938=JSON['parse'](_0x209a72),_0x13a1a1=this['editor']['editing']['view']['document'],_0x127616=new _0x9afee9(_0x13a1a1,_0x299938['map'](_0x8fd705=>P(_0x8fd705,this['editor'])));return this['editor']['data']['toModel'](_0x127616);}['_saveMetaData'](_0x384203,_0x620fd0,_0x32d2f6,_0x2e2448){const _0x285939=new Map(_0x620fd0),_0x58dfd7=new Map(_0x5b5f9d(_0x2e2448)),_0x2cbdd7=new Map();for(const [_0x6e942,_0x2aea37]of _0x32d2f6)_0x2cbdd7['set'](_0x6e942,{'start':_0x2aea37['start']['clone'](),'end':_0x2aea37['end']['clone'](),'rootName':_0x2aea37['root']['rootName']});this['_savedMetaData']['set'](_0x384203,{'roots':_0x285939,'markers':_0x2cbdd7,'rootsAttributes':_0x58dfd7});}['_removeMetaData'](_0x5f55e2){this['_savedMetaData']['delete'](_0x5f55e2);}['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'](_0x455e32,_0x2f3532=null){let _0xb01516=null;_0x455e32['is']('documentFragment')||(_0xb01516=new ut(_0x455e32['name'],{'vid_start':null===_0x2f3532?this['_revisionId']++:_0x2f3532++}));const _0x4a0ed7=[];for(const _0x1aee9c of _0x455e32['getChildren']())if(_0x1aee9c['is']('element')){_0x4a0ed7['push'](this['_makeIdsRoot'](_0x1aee9c,_0x2f3532));const _0x19e3ce=_0x4a0ed7[_0x4a0ed7['length']-0x1];null!==_0x2f3532&&(_0x2f3532=_0x19e3ce['is']('element','$text')?_0x19e3ce['getAttribute']('vid')+0x1:_0x19e3ce['getAttribute']('vid_end')+0x1);}else{for(let _0x14b751=0x0;_0x14b751<_0x1aee9c['offsetSize'];_0x14b751++)_0x4a0ed7['push'](new ut('$text',{'vid':null===_0x2f3532?this['_revisionId']++:_0x2f3532++}));}if(_0x455e32['is']('documentFragment')){const _0x2a9fe6=F(_0x455e32['rootName']);return _0x2a9fe6['_insertChild'](0x0,_0x4a0ed7),_0x2a9fe6;}return _0xb01516['_setAttribute']('vid_end',null===_0x2f3532?this['_revisionId']++:_0x2f3532++),_0xb01516['_insertChild'](0x0,_0x4a0ed7),_0xb01516;}['_calculateMetaData'](_0x17abc1,_0x266b1f,_0x298757){this['_reset']();const {roots:_0x45eee9,markers:_0x26c3fc,rootsAttributes:_0x5c5cf3}=this['_savedMetaData']['get'](_0x17abc1);this['_baseRoots']=new Map(_0x45eee9),this['_baseRootsAttributes']=new Map(_0x5b5f9d(_0x5c5cf3));for(const [_0x263178,_0x162bf1]of this['_baseRoots'])if('$graveyard'!==_0x263178&&(this['_diffRoots']['set'](_0x263178,T(_0x162bf1)),this['_diffRootsAttributes']=new Map(_0x5b5f9d(_0x5c5cf3)),_0x298757)){const _0x1e4e09=this['_revisionId'];this['_idsRoots']['set'](_0x263178,this['_makeIdsRoot'](_0x162bf1)),this['_baseIdsRoots']['set'](_0x263178,this['_makeIdsRoot'](_0x162bf1,_0x1e4e09));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x298757&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x40aeea,_0x5624da]of _0x26c3fc){const _0x31f973=this['_baseRoots']['get'](_0x5624da['rootName']),_0x1680e8=this['_diffRoots']['get'](_0x5624da['rootName']),_0x3f6673=new ft(this['_fixPosition'](_0x5624da['start'],_0x31f973),this['_fixPosition'](_0x5624da['end'],_0x31f973)),_0x51dedd=this['_fixRange'](_0x3f6673,_0x1680e8);_0x31f973['markers']['set'](_0x40aeea,_0x3f6673),this['_markers']['set'](_0x40aeea,_0x51dedd);}this['_applyOperations'](_0x17abc1,_0x266b1f,_0x298757);}['_applyOperations'](_0x12fffe,_0x3d9899,_0x412a08){for(const _0x47dd4a of this['source']['getOperations'](_0x12fffe,_0x3d9899))this['_handleOperation'](_0x47dd4a,_0x412a08);for(const _0x280d2a of this['_diffRoots']['values']())_0x280d2a['markers']['clear']();for(const [_0x4773a8,_0x30fe76]of this['_markers']){this['_diffRoots']['get'](_0x30fe76['root']['rootName'])['markers']['set'](_0x4773a8,_0x30fe76['clone']());}const _0xc65cb0=new Map(),_0x5884cd=new Map();for(const [_0x5e5a66,_0x327f79]of this['_diffRoots'])_0xc65cb0['set'](_0x5e5a66,T(_0x327f79)),_0x5884cd['set'](_0x5e5a66,this['_diffRootsAttributes']['get'](_0x5e5a66));this['_saveMetaData'](_0x3d9899,_0xc65cb0,this['_markers'],_0x5884cd);}['_getPreviousFrom'](_0x4d52db){const _0x235d8c=Array['from'](this['_savedMetaData']['keys']());_0x235d8c['sort']((_0x4e9b0a,_0x56db97)=>_0x4e9b0a-_0x56db97),_0x235d8c['reverse']();for(const _0x2e6ad2 of _0x235d8c)if(_0x2e6ad2<_0x4d52db)return _0x2e6ad2;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x527d82,_0x1b1c47){const _0x41555d=Array['from'](_0x1b1c47['markers'])['map'](([_0x474922,_0x280375])=>[_0x474922,this['_fixRange'](_0x280375,_0x527d82)]);_0x527d82['markers']=new Map(_0x41555d);}['_transformMarkers'](_0x3d896a){for(const _0x223f09 of this['_markers']['values']()){const _0xbe092d=_0x223f09['getTransformedByOperation'](_0x3d896a),_0x14e888=ft['_createFromRanges'](_0xbe092d);_0x223f09['start']=_0x14e888['start'],_0x223f09['end']=_0x14e888['end'];}}['_handleOperation'](_0x4ae053,_0x1e8a37){if('addRoot'!=_0x4ae053['type']&&'detachRoot'!=_0x4ae053['type']){if('insert'==_0x4ae053['type']){const _0x3f78be=_0x4ae053['position']['root']['rootName'];this['_diffRoots']['has'](_0x3f78be)||(this['_diffRoots']['set'](_0x3f78be,F(_0x3f78be,!0x0)),this['_diffRootsAttributes']['set'](_0x3f78be,{}),_0x1e8a37&&this['_idsRoots']['set'](_0x3f78be,F(_0x3f78be,!0x0)));}else{if('addRootAttribute'==_0x4ae053['type']||'removeRootAttribute'==_0x4ae053['type']||'changeRootAttribute'==_0x4ae053['type'])return void this['_handleRootAttributeOperation'](_0x4ae053);'marker'==_0x4ae053['type']&&this['_handleMarkerOperation'](_0x4ae053);}if('marker'!==_0x4ae053['type']){const _0x93bec0=this['_cloneOperation'](_0x4ae053,this['_diffRoots']);_0x93bec0['_execute'](),this['_transformMarkers'](_0x93bec0);}if(_0x1e8a37)switch(_0x4ae053['type']){case'insert':this['_handleInsertOperation'](_0x4ae053);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x4ae053);break;case'merge':this['_handleMergeOperation'](_0x4ae053);break;case'split':this['_handleSplitOperation'](_0x4ae053);}}else this['_handleRootOperation'](_0x4ae053,_0x1e8a37);}['_cloneOperation'](_0x552f1e,_0x573594){const _0x5b6de2=_0x552f1e['clone']();return _0x5b6de2['_authorId']=_0x552f1e['_authorId'],this['_fixOperation'](_0x5b6de2,_0x573594),_0x5b6de2;}['_getBaseVids'](_0x5bc641){return _0x5bc641['map'](_0x259d81=>{const _0x1c124a=this['_getVidAttributeName'](_0x259d81);return Number(_0x259d81['item']['getAttribute'](_0x1c124a));});}['_generateTape'](_0x4727cb,_0xecf2d2){if(_0x4727cb['is']('element','$text'))_0xecf2d2['push']({'item':_0x4727cb,'type':'text'});else{_0x4727cb['is']('element')&&_0xecf2d2['push']({'item':_0x4727cb,'type':'elementStart'});for(const _0x5b480b of _0x4727cb['getChildren']())this['_generateTape'](_0x5b480b,_0xecf2d2);_0x4727cb['is']('element')&&_0xecf2d2['push']({'item':_0x4727cb,'type':'elementEnd'});}return _0xecf2d2;}['_getState'](){const _0x779c13=new Map(this['_touched']),_0x17e535=new Map(_0x779c13),_0x25bba0=new Map(),_0x574623={'insertions':{},'deletions':{}},_0xc87fde={'insertions':{},'deletions':{}},_0x27aa7b=new Map(),_0x53cb76=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x53cb76['delete']('$graveyard');for(const _0x17689f of _0x53cb76){const _0x29140a=this['_diffRoots']['get'](_0x17689f)||F(_0x17689f,!0x1),_0x408d14=this['_baseRoots']['get'](_0x17689f)||F(_0x17689f,!0x1);_0x29140a['isAttached']()||_0x408d14['isAttached']()?(_0x574623['insertions'][_0x17689f]=T(_0x29140a),_0x574623['deletions'][_0x17689f]=T(_0x408d14),this['_copyMarkers'](_0x574623['deletions'][_0x17689f],_0x408d14),this['_copyMarkers'](_0x574623['insertions'][_0x17689f],_0x29140a),_0xc87fde['insertions'][_0x17689f]=this['_generateTape'](this['_idsRoots']['get'](_0x17689f),[]),_0xc87fde['deletions'][_0x17689f]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x17689f)||F(_0x17689f,!0x1),[])):_0x53cb76['delete'](_0x17689f);}for(const _0x288893 of _0x53cb76){const _0x3bfbae=_0xc87fde['insertions'][_0x288893];for(const _0x538024 of _0x3bfbae){const _0x54a83a=this['_getVidAttributeName'](_0x538024),_0x263687=_0x538024['item']['getAttribute'](_0x54a83a);_0x17e535['delete'](_0x263687),_0x263687>=this['_startingRevisionId']&&_0x25bba0['set'](_0x263687,_0x779c13['get'](_0x263687));}}for(const _0x5208fd of _0x53cb76){const _0x5480cb=_0xc87fde['insertions'][_0x5208fd],_0x270690=this['_getBaseVids'](_0xc87fde['deletions'][_0x5208fd]);let _0x106831=0x0;for(const _0x2bdfa1 of _0x5480cb){const _0x2964ad=this['_getVidAttributeName'](_0x2bdfa1),_0x50496a=_0x2bdfa1['item']['getAttribute'](_0x2964ad);if(!_0x25bba0['has'](_0x50496a)&&!_0x27aa7b['has'](_0x50496a)){if(_0x17e535['has'](_0x50496a))_0x106831++;else{if(_0x50496a!=_0x270690[_0x106831]){const _0x39f3af=_0x779c13['get'](_0x50496a)||_0x779c13['get'](_0x270690[_0x106831]);for(;_0x50496a!=_0x270690[_0x106831];)_0x17e535['has'](_0x270690[_0x106831])||(_0x27aa7b['set'](_0x270690[_0x106831],_0x39f3af),_0x779c13['set'](_0x270690[_0x106831],_0x39f3af)),_0x106831++;}_0x106831++;}}}}for(const _0x2b14b8 of _0x53cb76){const _0x2c31de=_0xc87fde['insertions'][_0x2b14b8];for(const _0xaa0b9f of _0x2c31de){const _0x373a9f=this['_getVidAttributeName'](_0xaa0b9f),_0x14c662=_0xaa0b9f['item']['getAttribute'](_0x373a9f);if(_0x27aa7b['has'](_0x14c662)){const _0x1c5f51=_0x27aa7b['get'](_0x14c662);_0x17e535['has'](_0x14c662)||_0x17e535['set'](_0x14c662,{..._0x1c5f51}),_0x25bba0['set'](_0x14c662,{..._0x1c5f51});}}}for(const _0x59acf7 of _0x17e535['keys']())_0x59acf7>=this['_startingRevisionId']&&_0x17e535['delete'](_0x59acf7);const _0x5f3454=new Map();for(const _0x3c73a9 of _0x53cb76){let _0xbec8c2=_0xc87fde['insertions'][_0x3c73a9];for(const _0x1e3eec of _0xbec8c2)if(_0x1e3eec['item']['is']('element','tableCell')){const _0x5a37ae=this['_getVidAttributeName'](_0x1e3eec),_0x435e6d=_0x1e3eec['item']['getAttribute'](_0x5a37ae);if(_0x25bba0['has'](_0x435e6d)){const _0x3cb4bf=_0x1e3eec['item']['parent']['parent']['getAttribute']('vid_start'),_0x5b3897=_0x5f3454['get'](_0x3cb4bf)||new Set();_0x5b3897['add'](_0x25bba0['get'](_0x435e6d)['userId']),_0x5f3454['set'](_0x3cb4bf,_0x5b3897);}}_0xbec8c2=_0xc87fde['deletions'][_0x3c73a9];for(const _0x85d01b of _0xbec8c2)if(_0x85d01b['item']['is']('element','tableCell')){const _0x7c467d=this['_getVidAttributeName'](_0x85d01b),_0x1021c0=_0x85d01b['item']['getAttribute'](_0x7c467d);if(_0x17e535['has'](_0x1021c0)){const _0x4e1d5e=_0x85d01b['item']['parent']['parent']['getAttribute']('vid_start'),_0x5cf802=_0x5f3454['get'](_0x4e1d5e)||new Set();_0x5cf802['add'](_0x17e535['get'](_0x1021c0)['userId']),_0x5f3454['set'](_0x4e1d5e,_0x5cf802);}}for(const _0x34c09d of _0x5f3454['keys']())(_0x25bba0['has'](_0x34c09d)||_0x17e535['has'](_0x34c09d))&&_0x5f3454['delete'](_0x34c09d);}for(const _0x4a9012 of _0x53cb76){const _0xa36cee=_0xc87fde['insertions'][_0x4a9012];let _0x11968f=null,_0x428727=null;for(const _0x4b985 of _0xa36cee){const _0x657037=this['_getVidAttributeName'](_0x4b985),_0x6b297=_0x4b985['item']['getAttribute'](_0x657037),_0x37c229=_0x5f3454['get'](_0x6b297);_0x37c229&&'elementStart'==_0x4b985['type']&&(_0x11968f=Array['from'](_0x37c229)[0x0],_0x428727=_0x4b985['item']['getAttribute']('vid_end')),_0x11968f&&(_0x17e535['set'](_0x6b297,{'userId':_0x11968f}),_0x25bba0['set'](_0x6b297,{'userId':_0x11968f})),_0x6b297==_0x428727&&(_0x11968f=null,_0x428727=null);}}const _0x2a42d1={},_0x12edc4=new Set();for(const _0x2b1896 of _0x53cb76){const _0x14d7de=_0x574623['deletions'][_0x2b1896],_0x1933fe=_0x574623['insertions'][_0x2b1896];for(const {userId:_0x269892}of this['_touchedMarkers']['values']())null!==_0x269892&&_0x12edc4['add'](_0x269892);for(const {userId:_0x41423d}of this['_touchedRoots']['values']())null!==_0x41423d&&_0x12edc4['add'](_0x41423d);this['_markChanges'](_0x1933fe,_0xc87fde['insertions'][_0x2b1896],_0x25bba0,'insertion',_0x12edc4),this['_markChanges'](_0x14d7de,_0xc87fde['deletions'][_0x2b1896],_0x17e535,'deletion',_0x12edc4),_0x2a42d1[_0x2b1896]={'insertions':this['_prepareViewToSave'](_0x1933fe),'deletions':this['_prepareViewToSave'](_0x14d7de),'attachChange':this['_touchedRoots']['get'](_0x2b1896)||null,'attributesBefore':_0x5b5f9d(this['_baseRootsAttributes']['get'](_0x2b1896))||{},'attributesAfter':_0x5b5f9d(this['_diffRootsAttributes']['get'](_0x2b1896))};}return{'diffData':_0x2a42d1,'authorsIds':Array['from'](_0x12edc4)};}['_processRootBeforeSave'](_0x17c78a){for(const [,_0xee034f]of _0x17c78a['markers']){const _0x561ca3=_0xee034f['start']['getAncestors']()['filter'](_0x505c2=>'tableCell'==_0x505c2['name']);for(const _0x11a413 of _0x561ca3)0x1==_0x11a413['childCount']&&_0x11a413['getChild'](0x0)['is']('element','paragraph')&&_0x11a413['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x307f2a){this['_processRootBeforeSave'](_0x307f2a);const _0x5c6fae=this['editor']['data']['toView'](_0x307f2a,{}),_0x5f21e6=Array['from'](_0x5c6fae['getChildren']())['map'](_0x399217=>this['_getViewJson'](_0x399217));return JSON['stringify'](_0x5f21e6);}['_getViewJson'](_0x115254){if(_0x115254['is']('$text'))return _0x115254['data'];{const _0x30ab97=_0x115254;return{'type':Object['keys'](E)['find'](_0x4890e3=>_0x115254 instanceof E[_0x4890e3]),'name':_0x30ab97['name'],'attributes':Array['from'](_0x30ab97['getAttributes']()),'children':Array['from'](_0x30ab97['getChildren']())['map'](_0x5a43d1=>this['_getViewJson'](_0x5a43d1))};}}['_markChanges'](_0x3eb512,_0x2594e1,_0x6f908b,_0x7dfb57,_0x9704b7){let _0x2dc563=null,_0x38da52=null,_0x47719a=0x0;const _0x1110fe=this['editor']['model'];for(let _0x589e46=0x0;_0x589e46<_0x2594e1['length'];_0x589e46++){const _0x492f7d=this['_getVidAttributeName'](_0x2594e1[_0x589e46]),_0x180402=_0x2594e1[_0x589e46]['item']['getAttribute'](_0x492f7d),_0x499d0a=_0x6f908b['get'](_0x180402),_0xbf7018=_0x589e46==_0x2594e1['length']-0x1;(!_0x2dc563&&_0x499d0a&&(_0x2dc563=_0x499d0a,_0x38da52=_0x2594e1[_0x589e46]),_0x2dc563&&(!_0x499d0a||_0x499d0a['userId']!=_0x2dc563['userId']))&&(_0x285e56(_0x499d0a,B(_0x38da52,_0x3eb512,_0x1110fe),B(_0x2594e1[_0x589e46],_0x3eb512,_0x1110fe)),_0x2dc563=_0x499d0a||null,_0x38da52=_0x499d0a?_0x2594e1[_0x589e46]:null),_0x2dc563&&_0xbf7018&&_0x285e56(_0x499d0a,B(_0x38da52,_0x3eb512,_0x1110fe),J(_0x2594e1[_0x589e46],_0x3eb512,_0x1110fe));}function _0x285e56(_0x4eeb88,_0x5bfc18,_0x4be009){const _0x6da9b3=_0x2dc563['userId'],_0xc650c4='revision:'+_0x7dfb57+':'+_0x6da9b3+':'+_0x47719a++,_0x554c13=_0x1110fe['createRange'](_0x5bfc18,_0x4be009);_0x3eb512['markers']['set'](_0xc650c4,_0x554c13),null!==_0x6da9b3&&_0x9704b7['add'](_0x6da9b3);}}['_getVidAttributeName'](_0x58b432){switch(_0x58b432['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x498a5c,_0x2ab405){_0x498a5c['baseVersion']=null;for(const _0x2cbcb9 in _0x498a5c){const _0x38f3ec=_0x498a5c[_0x2cbcb9];if(_0x38f3ec instanceof vt){const _0x5cfe95=_0x2ab405['get'](_0x38f3ec['root']['rootName']);_0x498a5c[_0x2cbcb9]=this['_fixPosition'](_0x38f3ec,_0x5cfe95);}if(_0x38f3ec instanceof ft){const _0x14fe60=_0x2ab405['get'](_0x38f3ec['root']['rootName']);_0x498a5c[_0x2cbcb9]=this['_fixRange'](_0x38f3ec,_0x14fe60);}'root'===_0x2cbcb9&&(_0x498a5c['root']=_0x2ab405['get'](_0x498a5c['root']['rootName']));}}['_fixRange'](_0x3cd1a6,_0x251ae9){return this['editor']['model']['createRange'](this['_fixPosition'](_0x3cd1a6['start'],_0x251ae9),this['_fixPosition'](_0x3cd1a6['end'],_0x251ae9));}['_fixPosition'](_0x4f1e1f,_0x50a651){return this['editor']['model']['createPositionFromPath'](_0x50a651,_0x4f1e1f['path'],_0x4f1e1f['stickiness']);}['_handleInsertOperation'](_0x42a4fb){const _0x1cfd8f=this['_idsRoots']['get'](_0x42a4fb['position']['root']['rootName']),_0x5a5296=this['_fixPosition'](_0x42a4fb['position'],_0x1cfd8f),_0x3c0a58=null===_0x42a4fb['_authorId']?null:_0x42a4fb['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4f884a=_0x5a5296['parent'],_0x1fbc39=this['_revisionId'],_0x4cfa5b=[];for(const _0x490135 of _0x42a4fb['nodes'])if(_0x490135['is']('element'))_0x4cfa5b['push'](this['_makeIdsRoot'](_0x490135));else{for(let _0x2c7b8f=0x0;_0x2c7b8f<_0x490135['offsetSize'];_0x2c7b8f++)_0x4cfa5b['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x4f7e44=this['_revisionId'];for(let _0xeadee1=_0x1fbc39;_0xeadee1<_0x4f7e44;_0xeadee1++)this['_touched']['set'](_0xeadee1,{'userId':_0x3c0a58});_0x4f884a['_insertChild'](_0x5a5296['offset'],_0x4cfa5b);}['_handleMoveOperation'](_0x499cfa){(_0x499cfa=this['_cloneOperation'](_0x499cfa,this['_idsRoots']))['_execute']();const _0x3e6029=null===_0x499cfa['_authorId']?null:_0x499cfa['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3aa083=_0x499cfa['getMovedRangeStart'](),_0x30b04d=_0x3aa083['parent'],_0x354b12=_0x3aa083['offset'];!function _0x3d0f13(_0x4b4441,_0x4fedd0,_0xfb956c,_0x3490aa){for(let _0x375124=_0xfb956c;_0x375124<_0x3490aa;_0x375124++){const _0x5d79c7=_0x4fedd0['getChild'](_0x375124);_0x5d79c7['is']('element','$text')?_0x4b4441['set'](_0x5d79c7['getAttribute']('vid'),{'userId':_0x3e6029}):(_0x4b4441['set'](_0x5d79c7['getAttribute']('vid_start'),{'userId':_0x3e6029}),_0x3d0f13(_0x4b4441,_0x5d79c7,0x0,_0x5d79c7['childCount']),_0x4b4441['set'](_0x5d79c7['getAttribute']('vid_end'),{'userId':_0x3e6029}));}}(this['_touched'],_0x30b04d,_0x354b12,_0x354b12+_0x499cfa['howMany']);}['_handleMergeOperation'](_0x1d4c7b){const _0x50088d=null===(_0x1d4c7b=this['_cloneOperation'](_0x1d4c7b,this['_idsRoots']))['_authorId']?null:_0x1d4c7b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3c0cff=_0x1d4c7b['targetPosition']['parent'],_0x234fb5=_0x1d4c7b['sourcePosition']['parent'],_0x2cd316=_0x3c0cff['getAttribute']('vid_end'),_0x19b6eb=_0x234fb5['getAttribute']('vid_start');_0x3c0cff['_setAttribute']('vid_end',_0x234fb5['getAttribute']('vid_end')),_0x234fb5['_setAttribute']('vid_end',_0x2cd316),this['_touched']['set'](_0x19b6eb,{'userId':_0x50088d}),this['_touched']['set'](_0x2cd316,{'userId':_0x50088d}),_0x1d4c7b['_execute']();}['_handleSplitOperation'](_0x1b5bef){const _0x22a6d6=null===(_0x1b5bef=this['_cloneOperation'](_0x1b5bef,this['_idsRoots']))['_authorId']?null:_0x1b5bef['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43528f=_0x1b5bef['graveyardPosition'],_0x53efe6=_0x1b5bef['splitPosition']['parent'];_0x1b5bef['_execute']();const _0x329aa4=_0x53efe6['getAttribute']('vid_end'),_0x3859be=_0x1b5bef['insertionPosition']['nodeAfter'];if(_0x43528f){const _0x27e62f=_0x3859be['getAttribute']('vid_end'),_0x200d99=_0x53efe6['getAttribute']('vid_end');_0x53efe6['_setAttribute']('vid_end',_0x27e62f),_0x3859be['_setAttribute']('vid_end',_0x200d99),this['_touched']['set'](_0x53efe6['getAttribute']('vid_end'),{'userId':_0x22a6d6}),this['_touched']['set'](_0x3859be['getAttribute']('vid_start'),{'userId':_0x22a6d6});}else{const _0x3485eb=this['_revisionId']++,_0x2c865f=this['_revisionId']++;_0x53efe6['_setAttribute']('vid_end',_0x3485eb),_0x3859be['_setAttribute']('vid_start',_0x2c865f),_0x3859be['_setAttribute']('vid_end',_0x329aa4),this['_touched']['set'](_0x3485eb,{'userId':_0x22a6d6}),this['_touched']['set'](_0x2c865f,{'userId':_0x22a6d6});}}['_handleMarkerOperation'](_0x14789c){if(!_0x14789c['affectsData'])return;const _0x23058e=(_0x14789c=this['_cloneOperation'](_0x14789c,this['_diffRoots']))['oldRange']?_0x14789c['oldRange']['root']:null,_0x5ebca5=_0x14789c['newRange']?_0x14789c['newRange']['root']:null;_0x23058e&&this['_markers']['delete'](_0x14789c['name']),_0x5ebca5&&this['_markers']['set'](_0x14789c['name'],_0x14789c['newRange']['clone']());const _0x2ea880=null===_0x14789c['_authorId']?null:_0x14789c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x540420=_0x14789c['name'];if(!this['_touchedMarkers']['has'](_0x540420))return void this['_touchedMarkers']['set'](_0x540420,{'range':_0x14789c['oldRange'],'userId':_0x2ea880});const _0x2ff99c=this['_touchedMarkers']['get'](_0x540420),_0x1e2cee=_0x2ff99c['range'],_0x4a3788=_0x14789c['newRange'];null==_0x1e2cee&&null==_0x4a3788||_0x1e2cee&&_0x4a3788&&_0x1e2cee['isEqual'](_0x4a3788)?this['_touchedMarkers']['delete'](_0x14789c['name']):_0x2ff99c['userId']=_0x2ea880;}['_handleRootOperation'](_0x27cff5,_0xb3afaa){this['_diffRoots']['has'](_0x27cff5['rootName'])?this['_diffRoots']['get'](_0x27cff5['rootName'])['_isAttached']=_0x27cff5['isAdd']:(this['_diffRoots']['set'](_0x27cff5['rootName'],F(_0x27cff5['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x27cff5['rootName'],{}),_0xb3afaa&&this['_idsRoots']['set'](_0x27cff5['rootName'],F(_0x27cff5['rootName'],!0x0)));const _0x32fca2=null===_0x27cff5['_authorId']?null:_0x27cff5['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x37e95e=this['_touchedRoots']['get'](_0x27cff5['rootName']);_0x37e95e&&_0x37e95e['userId']===_0x32fca2?this['_touchedRoots']['delete'](_0x27cff5['rootName']):this['_touchedRoots']['set'](_0x27cff5['rootName'],{'userId':_0x32fca2,'isAttached':_0x27cff5['isAdd']});}['_handleRootAttributeOperation'](_0x4baf6a){const _0x392dfc=this['_diffRootsAttributes']['get'](_0x4baf6a['root']['rootName']);null===_0x4baf6a['newValue']?delete _0x392dfc[_0x4baf6a['key']]:_0x392dfc[_0x4baf6a['key']]=_0x4baf6a['newValue'];}}function T(_0x9f474d){const _0x41a22e=F(_0x9f474d['rootName'],_0x9f474d['isAttached']());for(const _0x3b82dc of _0x9f474d['getChildren']()){const _0x3b4f05=_0x3b82dc['_clone'](!0x0);_0x41a22e['_appendChild'](_0x3b4f05);}return _0x41a22e;}function F(_0x38fc01,_0x5ed084=!0x0){const _0x2c0f70=new gt();return _0x2c0f70['rootName']=_0x38fc01,_0x2c0f70['_isAttached']=_0x5ed084,_0x2c0f70['isAttached']=()=>_0x2c0f70['_isAttached'],_0x2c0f70;}function B(_0x461183,_0x548554,_0x3cefa7){const _0x1c6d62='elementEnd'==_0x461183['type']?_0x3cefa7['createPositionAt'](_0x461183['item'],'end'):_0x3cefa7['createPositionBefore'](_0x461183['item']);return _0x3cefa7['createPositionFromPath'](_0x548554,_0x1c6d62['path'],_0x1c6d62['stickiness']);}function J(_0x42e0ea,_0x20d47f,_0x3e3c48){const _0x5f3b65='elementStart'==_0x42e0ea['type']?_0x3e3c48['createPositionAt'](_0x42e0ea['item'],0x0):_0x3e3c48['createPositionAfter'](_0x42e0ea['item']);return _0x3e3c48['createPositionFromPath'](_0x20d47f,_0x5f3b65['path'],_0x5f3b65['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x3374f5,_0xf471fd){super(_0x3374f5),this['focusTracker']=new _0x1d836e(),this['keystrokes']=new _0x453d05(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0xf471fd),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x219dee(this);}['render'](){super['render'](),_0x223a7a({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x517328=_0x2c9b4d=>_0x2c9b4d['stopPropagation']();this['keystrokes']['set']('arrowright',_0x517328),this['keystrokes']['set']('arrowleft',_0x517328),this['keystrokes']['set']('arrowup',_0x517328),this['keystrokes']['set']('arrowdown',_0x517328);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x1156dc){this['revisionNameInputView']['fieldView']['element']['value']=_0x1156dc['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x23debb){const _0xd72a84=new _0x5c04f4(this['locale'],_0x279764),_0x9038f3=_0xd72a84['fieldView'];_0x9038f3['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x372bbc=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x23debb&&(_0x372bbc+='\x20('+m(this['locale'],'optional')+')'),(_0xd72a84['label']=_0x372bbc,_0x9038f3['on']('input',()=>{this['revisionNameInputValue']=_0x9038f3['element']['value']['trim']();}),_0xd72a84);}}class f extends _0x4191c7{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x2a8499=this['editor'],_0x3532a0=_0x2a8499['plugins']['get']('RevisionTracker');_0x2a8499['ui']['componentFactory']['add']('revisionHistory',_0x2548cd=>{const _0x15e636=_0x3f5931(_0x2548cd),_0x530eb5=_0x15e636['panelView']['children'],_0x17adea=new _0x431ea9(_0x2548cd),_0x14d41d=new _0x2cbd7e(_0x2548cd),_0x18ee92=new te(_0x2548cd),_0x361457=new _0x2cbd7e(_0x2548cd),_0x164e2a=new te(_0x2548cd);return _0x15e636['bind']('isEnabled')['to'](_0x3532a0,'isReady',_0x3532a0,'isEnabled',_0x2a8499,'isReadOnly',(_0x4e3b11,_0x3bef84,_0x459095)=>_0x4e3b11&&_0x3bef84&&!_0x459095),_0x15e636['buttonView']['set']({'icon':_0x3543e9,'label':m(_0x2548cd,'Revision\x20history'),'tooltip':!0x0}),_0x18ee92['set']({'label':m(_0x2548cd,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x18ee92['bind']('isEnabled')['to'](_0x3532a0,'isReady',_0x3532a0,'isEnabled',_0x2a8499,'isReadOnly',(_0x59faa3,_0x3e8463,_0x24816a)=>_0x59faa3&&_0x3e8463&&!_0x24816a),_0x18ee92['on']('execute',()=>this['_showDialog']()),_0x164e2a['set']({'label':m(_0x2548cd,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x164e2a['bind']('isEnabled')['to'](_0x3532a0,'isReady',_0x2a8499,'isReadOnly',(_0x69f8a0,_0x519348)=>_0x69f8a0&&!_0x519348),_0x164e2a['on']('execute',()=>{_0x2a8499['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x15e636['isOpen']=!0x1,_0x2a8499['editing']['view']['focus']();}),_0x14d41d['children']['add'](_0x18ee92),_0x361457['children']['add'](_0x164e2a),_0x17adea['role']='menu',_0x17adea['items']['addMany']([_0x14d41d,_0x361457]),_0x530eb5['add'](_0x17adea),_0x15e636;}),_0x2a8499['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x1c6ba8=this['editor'],_0x357538=_0x1c6ba8['locale'],_0x3225a7=new _0x35c560(_0x357538),_0x33ddfa=new _0x1e5aad(_0x357538);_0x3225a7['buttonView']['set']({'icon':_0x3543e9,'label':m(_0x357538,'Revision\x20history')});const _0x2b311b=new _0x3f5f57(_0x357538,_0x3225a7),_0x42176c=new _0x4f6d9f(_0x357538);_0x42176c['set']({'label':m(_0x357538,'Save\x20current\x20revision')}),_0x42176c['delegate']('execute')['to'](_0x3225a7),_0x42176c['on']('execute',()=>{this['_showDialog']();}),_0x2b311b['children']['add'](_0x42176c),_0x33ddfa['items']['add'](_0x2b311b);const _0x4f1fdc=new _0x3f5f57(_0x357538,_0x3225a7),_0x1349ed=new _0x4f6d9f(_0x357538);return _0x1349ed['set']({'label':m(_0x357538,'Open\x20revision\x20history')}),_0x1349ed['delegate']('execute')['to'](_0x3225a7),_0x1349ed['on']('execute',()=>{_0x1c6ba8['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x4f1fdc['children']['add'](_0x1349ed),_0x33ddfa['items']['add'](_0x4f1fdc),_0x3225a7['panelView']['children']['add'](_0x33ddfa),_0x3225a7;}['_showDialog'](){const _0x45f1c8=this['editor'],_0x16a2b4=_0x45f1c8['locale'],_0x5edf76=_0x45f1c8['plugins']['get']('Dialog'),_0x57aa19=_0x45f1c8['plugins']['get']('RevisionTracker');function _0x106684(_0x25e72c){_0x45f1c8['config']['get']('revisionHistory.requireRevisionName')&&''===_0x25e72c['revisionName']?_0x25e72c['revisionNameInputView']['errorText']=m(_0x16a2b4,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x45f1c8['plugins']['get'](u)['saveRevision']({'name':_0x25e72c['revisionName']}),_0x5edf76['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x106684(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x5edf76['show']({'id':'revisionSave','title':m(_0x16a2b4,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x45f1c8['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x5edf76['hide']()},{'label':m(_0x45f1c8['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3028e4){_0x3028e4['bind']('isEnabled')['to'](_0x57aa19,'isReady',_0x57aa19,'isEnabled',_0x45f1c8,'isReadOnly',(_0x5f2ff6,_0x2ccaa6,_0xb89ec)=>_0x5f2ff6&&_0x2ccaa6&&!_0xb89ec);},'onExecute':()=>_0x106684(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x289083=this['editor'],_0x34005f=_0x289083['locale'];this['_saveRevisionFormView']=new hs(_0x34005f,_0x289083['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends ts{['changeId'];['_model'];constructor(_0x341a82,_0x2f41ab){super(_0x341a82),this['_model']=_0x2f41ab,this['changeId']=_0x2f41ab['id'];const _0x3a9b55=this['bindTemplate'],_0x158a04=m(_0x341a82,_0x2f41ab['data']['isSuggestion']?'Suggested\x20by':'add'==_0x2f41ab['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x2f41ab['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3a9b55['to']('type',_0x3c88ce=>'ck-revision-change__'+_0x3c88ce)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x158a04}]},{'text':'\x20'+_0x2f41ab['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
- _0x390d75(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x1a41f6){super(),this['id']=_0x1a41f6['id']||_0x54786b(),this['author']=_0x1a41f6['author'],this['type']=_0x1a41f6['type'],this['data']=_0x1a41f6['data']||{},this['rootName']=_0x1a41f6['rootName'],this['set']('createdAt',_0x1a41f6['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(_0x2acbc6,_0x298c88){this['newRevisionId']=_0x2acbc6,this['oldRevisionId']=_0x298c88,this['changes']=new _0x56de22();}['_setChanges'](_0x4321e7){for(const _0x410fce of _0x4321e7)this['changes']['add'](_0x410fce);}}const Y={'c':_0x3c80e1,'a':_0xaae474,'e':_0x7935d9,'r':_0x32ef1d,'u':_0x5f3dba};class d extends _0x4191c7{['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[_0x47cbd6,_0x2fb9a1,j];}constructor(_0x30d8a8){super(_0x30d8a8),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',(_0x1388f2,_0x3ba3cf,_0x4f0673)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x170487=>{for(const _0x5e7627 of this['editor']['editing']['view']['document']['roots'])_0x4f0673?_0x170487['removeClass']('ck-editor__editable__overlay',_0x5e7627):_0x170487['addClass']('ck-editor__editable__overlay',_0x5e7627);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2c541a=>null!==_0x2c541a),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0xd815f4,_0x586616,_0x59e5ca)=>_0xd815f4&&_0x59e5ca?_0x586616['changes']['getIndex'](_0x59e5ca):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x19b9b4,_0x9c877a)=>_0x19b9b4?_0x9c877a['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x2fb9a1);}['init'](){const _0x8f8656=this['editor'],_0x40641d=new _t(_0x8f8656,{'direction':'backward'}),_0x43ee34=new _t(_0x8f8656,{'direction':'forward'});(_0x8f8656['commands']['add']('showPreviousChange',_0x40641d),_0x8f8656['commands']['add']('showNextChange',_0x43ee34),_0x8f8656['commands']['add']('restoreRevision',new wt(_0x8f8656)),this['on']('change:numberOfChanges',()=>{_0x40641d['refresh'](),_0x43ee34['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x8f8656['enableReadOnlyMode']('revision-viewer'),_0x8f8656['plugins']['has']('WidgetToolbarRepository'))&&_0x8f8656['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x4b108c){await this['loadRevisionData'](_0x4b108c);const _0xf437f4={};for(const _0x2f1c3f in _0x4b108c['diffData']){if(_0x4b108c['diffData'][_0x2f1c3f]['attachChange']&&!_0x4b108c['diffData'][_0x2f1c3f]['attachChange']['isAttached'])continue;const _0x4c506a=this['_removeRevisionMarkers'](JSON['parse'](_0x4b108c['diffData'][_0x2f1c3f]['insertions'])),_0x2b349f=this['editor']['editing']['view']['document'],_0x1bff29=new _0x9afee9(_0x2b349f,_0x4c506a['map'](_0x5a1e8a=>this['_getViewObj'](_0x5a1e8a)));this['editor']['data']['processor']['useFillerType']('marked'),_0xf437f4[_0x2f1c3f]=this['editor']['data']['processor']['toData'](_0x1bff29),this['editor']['data']['processor']['useFillerType']('default');}return _0xf437f4;}async['getRevisionRootsAttributes'](_0x370d83){await this['loadRevisionData'](_0x370d83);const _0x1e2942={};for(const _0x36de9c in _0x370d83['diffData'])_0x370d83['diffData'][_0x36de9c]['attachChange']&&!_0x370d83['diffData'][_0x36de9c]['attachChange']['isAttached']||(_0x1e2942[_0x36de9c]=_0x370d83['diffData'][_0x36de9c]['attributesAfter']||{});return _0x1e2942;}['_removeRevisionMarkers'](_0xc84205){return(_0xc84205=_0xc84205['filter'](_0x1d90a5=>!_0x1d90a5['name']||'revision-start'!==_0x1d90a5['name']&&'revision-end'!==_0x1d90a5['name']))['forEach'](_0x28e372=>{'string'!=typeof _0x28e372&&(_0x28e372['children']=this['_removeRevisionMarkers'](_0x28e372['children']),_0x28e372['attributes']=_0x28e372['attributes']['filter'](_0x158b43=>!_0x158b43[0x0]['startsWith']('data-revision-')));}),_0xc84205;}async['compare'](_0x3a803d,_0xbc14fe,_0xa47182=!0x1){if(!this['isEnabled'])return;const _0x1b1bbe=this['diff'],_0x3f0269=this['repository'],_0x533080='string'==typeof _0x3a803d?_0x3f0269['getRevision'](_0x3a803d):_0x3a803d,_0x3a65ed='string'==typeof _0xbc14fe?_0x3f0269['getRevision'](_0xbc14fe):_0xbc14fe,_0x5abb0a=_0x533080['id'],_0x2ccda7=_0x3a65ed?_0x3a65ed['id']:null;if(!_0xa47182&&this['diff']&&this['diff']['newRevisionId']===_0x5abb0a&&this['diff']['oldRevisionId']===_0x2ccda7)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x5abb0a,_0x2ccda7);const _0x16012c=this['_getRevisionsRange'](_0x533080,_0x3a65ed,!0x0)['map'](_0x30fd74=>this['loadRevisionData'](_0x30fd74));return _0x16012c['push'](new Promise(_0x2be536=>{setTimeout(_0x2be536,0x14);})),Promise['all'](_0x16012c)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x373b53=this['_getDiff'](_0x5abb0a,_0x2ccda7);for(const _0x54c3c5 of _0x373b53['changes'])this['_changeIdToChange']['set'](_0x54c3c5['id'],_0x54c3c5);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5c44a8=>{for(const _0x307281 of this['editor']['model']['document']['getRootNames']())_0x5c44a8['detachRoot'](_0x307281);for(const _0x5a537e of Object['keys'](_0x373b53['model'])){const _0x3ebe88=_0x5c44a8['addRoot'](_0x5a537e);for(const _0x19e86b of Object['keys'](_0x373b53['attributes'][_0x5a537e]))_0x5c44a8['setAttribute'](_0x19e86b,_0x373b53['attributes'][_0x5a537e][_0x19e86b],_0x3ebe88);_0x5c44a8['insert'](_0x373b53['model'][_0x5a537e],_0x3ebe88,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x373b53['changes'])),this['isReady']=!0x0;})['catch'](_0x28992a=>{console['error'](_0x28992a),this['_cleanUp'](),_0x1b1bbe&&(this['diff']=_0x1b1bbe),this['isReady']=!0x0;});}['addRevisionData'](_0x4d9157,_0x3aab47){const _0xbdfef6=this['repository']['createRevision'](_0x4d9157);return _0xbdfef6['on']('_update',(_0x4ed141,_0x51abfe,_0x1e847a)=>_0x3aab47(_0x51abfe,_0x1e847a,_0xbdfef6)),this['repository']['addRevision'](_0xbdfef6),_0xbdfef6;}['loadRevisionData'](_0x4f199f){if(!_0x4f199f||_0x4f199f['diffData'])return Promise['resolve']();{const _0x576395=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x576395,'revisionId':_0x4f199f['id']})['then'](_0xfb704b=>{_0x4f199f['_update']({'diffData':_0xfb704b['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},_0x28eeb7=>{for(const _0xa0e1df of this['editor']['model']['document']['getRootNames']())_0x28eeb7['detachRoot'](_0xa0e1df);});}['_sortAndFilterDiffChanges'](_0x3f7db2){const _0xaf3e4=[],_0x1eda81=new Map();for(const _0x1fe5e9 of this['editor']['model']['document']['getRootNames']()){const _0x21c73a=this['editor']['editing']['view']['getDomRoot'](_0x1fe5e9);if(!_0x21c73a)continue;const _0x3828dc=_0x21c73a['getClientRects']()['item'](0x0);_0x3828dc&&(_0xaf3e4['push'](_0x1fe5e9),_0x1eda81['set'](_0x1fe5e9,_0x3828dc));}return _0xaf3e4['sort']((_0x162db3,_0x151f21)=>{const _0x15e586=_0x1eda81['get'](_0x162db3),_0x36a864=_0x1eda81['get'](_0x151f21);return _0x15e586['y']-_0x36a864['y']||_0x15e586['x']-_0x36a864['x'];}),(_0x3f7db2=_0x3f7db2['filter'](_0x255b6f=>_0xaf3e4['includes'](_0x255b6f['rootName'])))['sort']((_0x2d305a,_0x4db620)=>_0xaf3e4['indexOf'](_0x2d305a['rootName'])-_0xaf3e4['indexOf'](_0x4db620['rootName'])),_0x3f7db2;}['_makeTape'](_0x3cf3ec){const _0xa08dc=Array['from'](_0x3cf3ec['markers'])['filter'](([_0x17713b,_0xde44e7])=>_0x17713b['startsWith']('revision:')&&!_0xde44e7['isCollapsed']),_0x4b4ae7=Array['from'](this['editor']['model']['createRangeIn'](_0x3cf3ec)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0xa08dc['length'])for(const _0x4469fe of _0x4b4ae7){const [_0x3b023d,_0x48aab2]=_0xa08dc[0x0],[,_0x4c54f0,_0x54c583]=_0x3b023d['split'](':');if(_0x48aab2['end']['isEqual'](_0x4469fe['nextPosition'])&&_0xa08dc['shift'](),(_0x4469fe['previousPosition']['isEqual'](_0x48aab2['start'])||_0x4469fe['previousPosition']['isAfter'](_0x48aab2['start']))&&('insertion'==_0x4c54f0?_0x4469fe['isAdded']={'userId':_0x54c583}:'deletion'==_0x4c54f0&&(_0x4469fe['isRemoved']={'userId':_0x54c583})),0x0==_0xa08dc['length'])break;}return _0x4b4ae7;}['_refreshStartEndIndex'](_0x4a0b9d){const _0x54ab0f=new Map();for(let _0x43e5e3=0x0;_0x43e5e3<_0x4a0b9d['length'];_0x43e5e3++)'text'===_0x4a0b9d[_0x43e5e3]['type']?(_0x4a0b9d[_0x43e5e3]['item']['startIndex']=_0x43e5e3,_0x4a0b9d[_0x43e5e3]['item']['endIndex']=_0x43e5e3):('elementStart'===_0x4a0b9d[_0x43e5e3]['type']?_0x4a0b9d[_0x43e5e3]['item']['startIndex']=_0x43e5e3:'elementEnd'===_0x4a0b9d[_0x43e5e3]['type']&&(_0x4a0b9d[_0x43e5e3]['item']['endIndex']=_0x43e5e3),_0x54ab0f['set'](_0x4a0b9d[_0x43e5e3]['id'],_0x43e5e3));for(const _0x54ec14 of _0x54ab0f['values']())'elementStart'===_0x4a0b9d[_0x54ec14]['type']?_0x4a0b9d[_0x54ec14]['item']['endIndex']=_0x54ab0f['get'](_0x4a0b9d[_0x54ec14]['pairId']):'elementEnd'===_0x4a0b9d[_0x54ec14]['type']&&(_0x4a0b9d[_0x54ec14]['item']['startIndex']=_0x54ab0f['get'](_0x4a0b9d[_0x54ec14]['pairId']));}['_processTape'](_0x1f0ee6){for(let _0x15dee1=0x0;_0x15dee1<_0x1f0ee6['length'];_0x15dee1++){if('elementStart'===_0x1f0ee6[_0x15dee1]['type'])_0x1f0ee6[_0x15dee1]['item']['startIndex']=_0x15dee1;else{if('elementEnd'===_0x1f0ee6[_0x15dee1]['type']){_0x1f0ee6[_0x15dee1]['item']['endIndex']=_0x15dee1;const _0x5e8188=_0x1f0ee6[_0x15dee1]['item']['startIndex'];_0x1f0ee6[_0x5e8188]['pairId']=_0x1f0ee6[_0x15dee1]['id'],_0x1f0ee6[_0x15dee1]['pairId']=_0x1f0ee6[_0x5e8188]['id'];}else _0x1f0ee6[_0x15dee1]['item']['startIndex']=_0x15dee1,_0x1f0ee6[_0x15dee1]['item']['endIndex']=_0x15dee1,_0x1f0ee6[_0x15dee1]['pairId']=null;}_0x1f0ee6[_0x15dee1]['markersStart']||(_0x1f0ee6[_0x15dee1]['markersStart']=[],_0x1f0ee6[_0x15dee1]['markersEnd']=[]);}}['_markInsertions'](_0x5d44b1,_0x29f6e8){const _0x263657=_0x5d44b1['filter'](_0xb35b93=>!_0xb35b93['isAdded']);for(let _0x5b6658=0x0;_0x5b6658<_0x29f6e8['length'];_0x5b6658++)_0x29f6e8[_0x5b6658]['isAdded']&&(_0x263657[_0x5b6658]['isAdded']=_0x29f6e8[_0x5b6658]['isAdded']);}['_makeModelFromViewString'](_0x4db7d6){const _0x46b170=JSON['parse'](_0x4db7d6),_0x4565ee=this['editor']['editing']['view']['document'],_0x515bdf=new _0x9afee9(_0x4565ee,_0x46b170['map'](_0x1d1dc6=>this['_getViewObj'](_0x1d1dc6)));return this['editor']['data']['toModel'](_0x515bdf);}['_getViewObj'](_0x572958){const _0x5521e3=this['editor']['editing']['view']['document'];if('string'==typeof _0x572958)return new _0x101a1b(_0x5521e3,_0x572958);{const _0x2b01a6=_0x572958['children']['map'](_0x345ee8=>this['_getViewObj'](_0x345ee8));return new(Y[_0x572958['type']]||_0x15b19e)(_0x5521e3,_0x572958['name'],_0x572958['attributes'],_0x2b01a6);}}['_getDiff'](_0x3ba309,_0x1109ee=null){const _0x4fa401=this['repository']['getRevision'](_0x3ba309),_0x3f072e=_0x1109ee?this['repository']['getRevision'](_0x1109ee):null,_0x3d5b71=this['_getRevisionsRange'](_0x4fa401,_0x3f072e),_0x3c8fd1=_0x3d5b71[_0x3d5b71['length']-0x1],_0x1bd8f3=new Map(),_0x5ef57f={'model':{},'attributes':{},'changes':[]},_0x5dd265=new Set(),_0x2e9cbb=new Map();for(let _0x511592=_0x3d5b71['length']-0x1;_0x511592>=0x0;_0x511592--){const _0x33d478=_0x3d5b71[_0x511592];for(const _0x158824 of Object['keys'](_0x33d478['diffData']))if(_0x33d478['diffData'][_0x158824]['attachChange']){const _0x2c58f8=_0x33d478['diffData'][_0x158824]['attachChange'];_0x2c58f8['isAttached']?(_0x5dd265['add'](_0x158824),_0x2e9cbb['has'](_0x158824)&&_0x2e9cbb['get'](_0x158824)['userId']==_0x2c58f8['userId']?_0x2e9cbb['delete'](_0x158824):_0x2e9cbb['set'](_0x158824,_0x2c58f8)):_0x2e9cbb['has'](_0x158824)?(_0x5dd265['delete'](_0x158824),_0x2e9cbb['delete'](_0x158824)):(_0x5dd265['add'](_0x158824),_0x2e9cbb['set'](_0x158824,_0x2c58f8));}else _0x5dd265['add'](_0x158824);}for(const _0x4d8942 of _0x5dd265){const _0x4a224c=_0x2e9cbb['has'](_0x4d8942)&&!_0x2e9cbb['get'](_0x4d8942)['isAttached'];let _0x561b4b=_0x4a224c?_0x3d5b71['length']-0x1:0x0;const _0x462d27=_0x4a224c?-0x1:0x1;for(;_0x3d5b71[_0x561b4b];){const _0x5e27db=_0x3d5b71[_0x561b4b];if(_0x5e27db['diffData'][_0x4d8942]){const _0x7354b3=_0x4a224c?_0x5e27db['diffData'][_0x4d8942]['attributesBefore']:_0x5e27db['diffData'][_0x4d8942]['attributesAfter'];_0x5ef57f['attributes'][_0x4d8942]=_0x7354b3?_0x5b5f9d(_0x7354b3):{};break;}_0x561b4b+=_0x462d27;}}for(const _0x92306c of _0x3d5b71){_0x92306c['model']={};for(const _0x5535d0 of _0x92306c['authors'])_0x1bd8f3['set'](_0x5535d0['id'],_0x5535d0);for(const _0x343b66 of _0x5dd265){const _0x1b4dbb=_0x92306c['diffData'][_0x343b66]?_0x92306c['diffData'][_0x343b66]['insertions']:'[]',_0x56fb75=_0x92306c['diffData'][_0x343b66]?_0x92306c['diffData'][_0x343b66]['deletions']:'[]';_0x92306c['model'][_0x343b66]={'insertions':this['_makeModelFromViewString'](_0x1b4dbb),'deletions':this['_makeModelFromViewString'](_0x56fb75)};}}for(const _0x3b618a of _0x5dd265){let _0x4bedba=null,_0x33e147=0x0;const _0x18157e=new Map(Array['from'](_0x4fa401['model'][_0x3b618a]['insertions']['markers'])['filter'](([_0x4869e2])=>!_0x4869e2['startsWith']('revision:')));let _0x6dd562=0x0;for(const _0x482877 of _0x3d5b71){const _0x2e6c07=this['_makeTape'](_0x482877['model'][_0x3b618a]['insertions']);_0x482877==_0x4fa401?(_0x4bedba=_0x2e6c07,_0x33e147=_0x4bedba['length'],_0x4bedba['forEach'](_0x15b3a5=>{_0x15b3a5['id']=_0x6dd562++;}),this['_processTape'](_0x4bedba)):this['_markInsertions'](_0x4bedba,_0x2e6c07);const _0xe1116f=_0x4bedba['filter'](_0xf0071e=>!_0xf0071e['isAdded'])['map'](_0x3806d3=>_0x3806d3['id']);let _0x1468fa=0x0;const _0x31b226=this['_makeTape'](_0x482877['model'][_0x3b618a]['deletions']);_0x31b226['forEach'](_0x55f6b1=>{_0x55f6b1['isRemoved']?_0x55f6b1['id']=_0x33e147++:_0x55f6b1['id']=_0xe1116f[_0x1468fa++];}),this['_processTape'](_0x31b226),this['_setDistance'](_0x4bedba,'isAdded'),this['_setDistance'](_0x31b226,'isRemoved'),_0x482877==_0x4fa401&&this['_markMarkers'](_0x4bedba,_0x18157e),_0x4bedba=this['_joinTapes'](_0x4bedba,_0x31b226),this['_refreshStartEndIndex'](_0x4bedba),this['_setDistance'](_0x4bedba,'isRemoved');}_0x4bedba=_0x4bedba['filter'](_0x1ad1e1=>!(_0x1ad1e1['isAdded']&&_0x1ad1e1['isRemoved']));const _0x3bce00=new Map(_0x3c8fd1['model'][_0x3b618a]['deletions']['markers']),_0x519da9=new Set(_0x18157e['keys']());for(const _0x7d55ea of _0x3bce00['keys']())_0x519da9['delete'](_0x7d55ea);this['_markSuggestions'](_0x4bedba,_0x519da9),this['_fixObsoleteTags'](_0x4bedba),_0x4bedba=this['_removeMissingPairs'](_0x4bedba),_0x4bedba=this['_markMismatchedRemovedTags'](_0x4bedba),_0x4bedba=this['_removeUnsupportedChanges'](_0x4bedba);const {root:_0x464d11,changes:_0x502d07}=this['_makeModelFromTape'](_0x4bedba,_0x1bd8f3,_0x3b618a);_0x5ef57f['model'][_0x3b618a]=_0x464d11;const _0x5333a5=_0x2e9cbb['get'](_0x3b618a);if(_0x5333a5){const _0x414eca=_0x1bd8f3['get'](_0x5333a5['userId']),_0x3931cc=new r({'author':_0x414eca,'type':_0x5333a5['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3b618a});_0x502d07['unshift'](_0x3931cc),_0x5ef57f['attributes'][_0x3b618a]['revisionHistoryAttachChange']=_0x3931cc['id'];}_0x5ef57f['changes']=_0x5ef57f['changes']['concat'](_0x502d07);}return _0x5ef57f;}['_markMarkers'](_0x5f266c,_0x17efbb){for(let _0x80437f=0x0;_0x80437f<_0x5f266c['length'];_0x80437f++)for(const [_0x42e280,_0x19429f]of _0x17efbb)_0x19429f['start']['isEqual'](_0x5f266c[_0x80437f]['previousPosition'])&&_0x5f266c[_0x80437f]['markersStart']['push'](_0x42e280),_0x19429f['end']['isEqual'](_0x5f266c[_0x80437f]['nextPosition'])&&_0x5f266c[_0x80437f]['markersEnd']['push'](_0x42e280);}['_joinTapes'](_0x573401,_0x3826da){let _0x57b724=[],_0x547a70=0x0,_0x21f2c7=0x0;for(;_0x547a70<_0x573401['length']||_0x21f2c7<_0x3826da['length'];){const _0x17250a=_0x573401[_0x547a70]||{},_0x3c3f65=_0x3826da[_0x21f2c7]||{};if(_0x17250a['id']==_0x3c3f65['id'])_0x547a70++,_0x21f2c7++,_0x57b724['push'](_0x17250a);else{if(_0x3c3f65['isRemoved']&&_0x17250a['isAdded']){const {commonTape:_0x1718cb,iEnd:_0x1ef61a,jEnd:_0x215eac}=this['_threeWayMerge'](_0x573401,_0x547a70,_0x3826da,_0x21f2c7);_0x57b724=_0x57b724['concat'](_0x1718cb),_0x547a70=_0x1ef61a,_0x21f2c7=_0x215eac;}else _0x3c3f65['isRemoved']?(_0x21f2c7++,_0x57b724['push'](_0x3c3f65)):(_0x547a70++,_0x57b724['push'](_0x17250a));}}return _0x57b724;}['_markSuggestions'](_0x4689a2,_0x381c28){const _0x1c8531=[];for(let _0x2fce85=0x0;_0x2fce85<_0x4689a2['length'];_0x2fce85++){for(let _0x263497=0x0;_0x263497<_0x4689a2[_0x2fce85]['markersStart']['length'];_0x263497++){const _0x38fde1=_0x4689a2[_0x2fce85]['markersStart'][_0x263497];if(!_0x381c28['has'](_0x38fde1))continue;const {group:_0x3d718f,type:_0x48778e,authorId:_0x5a200b}=_0xa7b4e7(_0x38fde1);'revision-suggestion'!=_0x3d718f||'insertion'!=_0x48778e&&'deletion'!=_0x48778e||(_0x1c8531['unshift']({'type':_0x48778e,'name':_0x38fde1,'userId':_0x5a200b}),_0x4689a2[_0x2fce85]['markersStart']['splice'](_0x263497,0x1),_0x263497--);}_0x264008(_0x4689a2[_0x2fce85]);for(let _0x35fa20=0x0;_0x35fa20<_0x4689a2[_0x2fce85]['markersEnd']['length'];_0x35fa20++){const _0x5eb5d1=_0x4689a2[_0x2fce85]['markersEnd'][_0x35fa20];if(!_0x381c28['has'](_0x5eb5d1))continue;const {group:_0x2d8d77,type:_0x19d69a}=_0xa7b4e7(_0x5eb5d1);if('revision-suggestion'!=_0x2d8d77||'insertion'!=_0x19d69a&&'deletion'!=_0x19d69a)continue;_0x4689a2[_0x2fce85]['markersEnd']['splice'](_0x35fa20,0x1),_0x35fa20--;const _0x1b01ad=_0x1c8531['findIndex'](_0x50784b=>_0x50784b['name']==_0x5eb5d1);_0x1b01ad>-0x1&&_0x1c8531['splice'](_0x1b01ad,0x1);}}function _0xa7b4e7(_0x9c2847){const _0x563490=_0x9c2847['split'](':');return{'group':_0x563490[0x0],'type':_0x563490[0x1],'subType':_0x563490['length']>=0x5?_0x563490[0x2]:null,'id':_0x563490['length']<0x5?_0x563490[0x2]:_0x563490[0x3],'authorId':_0x563490['length']<0x5?_0x563490[0x3]:_0x563490[0x4],'markerCount':0x6==_0x563490['length']?_0x563490[0x5]:null};}function _0x264008(_0x41102c){for(let _0x1d2996=0x0;_0x1d2996<_0x1c8531['length'];_0x1d2996++){if(_0x41102c['isAdded']&&'insertion'==_0x1c8531[_0x1d2996]['type'])return _0x41102c['isAddSuggestion']=_0x1c8531[_0x1d2996],void delete _0x41102c['isAdded'];if(!_0x41102c['isAdded']&&!_0x41102c['isRemoved']&&'deletion'==_0x1c8531[_0x1d2996]['type'])return void(_0x41102c['isRemoveSuggestion']=_0x1c8531[_0x1d2996]);}}}['_setDistance'](_0x4c3be1,_0x273116){let _0x3938ee=0x0,_0x46e59f=!0x1;const _0x54ff58=new Map();for(const _0x4daea1 of _0x4c3be1)_0x4daea1[_0x273116]?_0x46e59f&&(_0x3938ee++,_0x46e59f=!0x1):(_0x3938ee++,_0x46e59f=!0x0),_0x54ff58['set'](_0x4daea1['id'],_0x3938ee);for(let _0x5b6297=0x0;_0x5b6297<_0x4c3be1['length'];_0x5b6297++){if('isRemoved'==_0x273116&&_0x4c3be1[_0x5b6297]['isAdded']||'isAdded'==_0x273116&&_0x4c3be1[_0x5b6297]['isRemoved'])continue;if('text'==_0x4c3be1[_0x5b6297]['type']){_0x4c3be1[_0x5b6297]['distance']=0x0;continue;}const _0x232046=_0x54ff58['get'](_0x4c3be1[_0x5b6297]['pairId']),_0x521487=_0x54ff58['get'](_0x4c3be1[_0x5b6297]['id']);_0x4c3be1[_0x5b6297]['distance']=_0x232046-_0x521487;}}['_getRevisionsRange'](_0x120e72,_0xd1088d,_0x20635e=!0x1){const _0x36dfc6=[];let _0x1068cb=this['repository']['getIndex'](_0x120e72),_0x33ae1a=this['repository']['getIndex'](_0xd1088d);for(-0x1==_0x33ae1a&&(_0x33ae1a=this['repository']['_revisions']['length'],_0x20635e=!0x1);_0x1068cb<_0x33ae1a;)_0x36dfc6['push'](this['repository']['getRevision'](_0x1068cb)),_0x1068cb++;return _0x20635e&&_0x36dfc6['push'](this['repository']['getRevision'](_0x1068cb)),_0x36dfc6;}['_threeWayMerge'](_0x41aebb,_0xe8e253,_0x63c21b,_0x4015fa){const _0xda795=this['editor']['model']['schema'];let _0x2380c7=_0xe8e253;for(;_0x41aebb[_0x2380c7]&&_0x41aebb[_0x2380c7]['isAdded'];)_0x2380c7++;let _0x56940c=_0x4015fa;for(;_0x63c21b[_0x56940c]&&_0x63c21b[_0x56940c]['isRemoved'];)_0x56940c++;_0xaaed95(_0x41aebb,_0xe8e253,_0x2380c7),_0xaaed95(_0x63c21b,_0x4015fa,_0x56940c);const _0x69686c=_0x63c21b['slice'](_0x4015fa,_0x56940c)['concat'](_0x41aebb['slice'](_0xe8e253,_0x2380c7));return _0x69686c['sort']((_0xc2f3af,_0x5f2fc2)=>_0xc2f3af['side']!=_0x5f2fc2['side']?_0xc2f3af['side']-_0x5f2fc2['side']:_0xc2f3af['level']!=_0x5f2fc2['level']?_0xc2f3af['level']-_0x5f2fc2['level']:_0xc2f3af['distance']!=_0x5f2fc2['distance']?_0x5f2fc2['distance']-_0xc2f3af['distance']:!!_0xc2f3af['isAdded']!=!!_0x5f2fc2['isAdded']?-0x1==_0xc2f3af['side']||0x0==_0xc2f3af['side']?_0xc2f3af['isAdded']?-0x1:0x1:_0xc2f3af['isAdded']?0x1:-0x1:_0xc2f3af['index']-_0x5f2fc2['index']),{'commonTape':_0x69686c,'iEnd':_0x2380c7,'jEnd':_0x56940c};function _0xaaed95(_0x242643,_0x4cec6a,_0x3011b5){let _0x3eba50=-0x1,_0x314879=Number['POSITIVE_INFINITY'],_0x49d348=!0x0;for(let _0xaa65cd=_0x4cec6a;_0xaa65cd<_0x3011b5;_0xaa65cd++)if(_0xda795['isInline'](_0x242643[_0xaa65cd]['item'])||(_0x49d348=!0x1),_0x242643[_0xaa65cd]['item']['startIndex']<_0x4cec6a&&(_0x3eba50=_0xaa65cd),_0x242643[_0xaa65cd]['item']['endIndex']>=_0x3011b5){_0x314879=_0xaa65cd;break;}_0x49d348&&(_0x3eba50=_0x3011b5-0x1);for(let _0x5448cb=_0x4cec6a;_0x5448cb<_0x3011b5;_0x5448cb++)_0x242643[_0x5448cb]['side']=_0x5448cb<=_0x3eba50?-0x1:_0x5448cb<_0x314879?0x0:0x1,_0x242643[_0x5448cb]['index']=_0x5448cb;let _0x1add5a=0x0;for(let _0x4431ef=_0x4cec6a;_0x4431ef<=_0x3eba50;_0x4431ef++)0x0==_0x242643[_0x4431ef]['distance']?_0x242643[_0x4431ef]['level']=_0x1add5a:(_0x1add5a++,_0x242643[_0x4431ef]['level']=_0x1add5a,_0x1add5a++);for(let _0x513693=_0x4cec6a;_0x513693<_0x3011b5;_0x513693++)0x0==_0x242643[_0x513693]['side']&&(_0x242643[_0x513693]['level']=_0x1add5a);_0x1add5a=0x0;for(let _0x73bdf2=_0x3011b5-0x1;_0x73bdf2>=_0x314879;_0x73bdf2--)0x0==_0x242643[_0x73bdf2]['distance']?_0x242643[_0x73bdf2]['level']=_0x1add5a:(_0x1add5a--,_0x242643[_0x73bdf2]['level']=_0x1add5a,_0x1add5a--);}}['_fixObsoleteTags'](_0x2e1be5){const _0x66f1b1=new Map(),_0x1a0642=this['editor']['model']['schema'];for(let _0x151d74=0x1;_0x151d74<_0x2e1be5['length'];_0x151d74++){let _0x5f1ae5,_0x12d140,_0x110fc0;const _0x505d6d=_0x2e1be5[_0x151d74],_0x30743c=_0x2e1be5[_0x151d74-0x1];if('text'==_0x505d6d['type'])continue;if(_0x505d6d['type']!=_0x30743c['type'])continue;if(!_0x1a0642['isBlock'](_0x30743c['item'])||_0x1a0642['isLimit'](_0x30743c['item']))continue;if(!_0x1a0642['isBlock'](_0x505d6d['item'])||_0x1a0642['isLimit'](_0x505d6d['item']))continue;if((_0x2e1be5[_0x151d74]['isAdded']||_0x2e1be5[_0x151d74]['isAddSuggestion'])&&_0x2e1be5[_0x151d74-0x1]['isRemoved'])_0x5f1ae5=_0x2e1be5[_0x151d74],_0x12d140=_0x2e1be5[_0x151d74-0x1],_0x110fc0=_0x151d74-0x1;else{if(!_0x2e1be5[_0x151d74]['isRemoved']||!_0x2e1be5[_0x151d74-0x1]['isAdded']&&!_0x2e1be5[_0x151d74-0x1]['isAddSuggestion'])continue;_0x5f1ae5=_0x2e1be5[_0x151d74-0x1],_0x12d140=_0x2e1be5[_0x151d74],_0x110fc0=_0x151d74;}const _0x3da81d=_0x5f1ae5['level']==_0x12d140['level'],_0x4620db=Math['abs'](_0x5f1ae5['level'])<Math['abs'](_0x12d140['level'])&&0x0==_0x12d140['distance'];(_0x3da81d||_0x4620db)&&(_0x66f1b1['set'](_0x12d140['id'],_0x5f1ae5['id']),_0x2e1be5['splice'](_0x110fc0,0x1),_0x151d74--,_0x5f1ae5['isAdded']=!0x1);}for(let _0x5adf19=0x0;_0x5adf19<_0x2e1be5['length'];_0x5adf19++)_0x66f1b1['has'](_0x2e1be5[_0x5adf19]['pairId'])&&(_0x2e1be5[_0x5adf19]['pairId']=_0x66f1b1['get'](_0x2e1be5[_0x5adf19]['pairId']));}['_removeMissingPairs'](_0x28861b){const _0x53a0ac=new Set(_0x28861b['map'](_0x3a6eb7=>_0x3a6eb7['id']));for(let _0x2a536e=0x0;_0x2a536e<_0x28861b['length'];_0x2a536e++)_0x53a0ac['has'](_0x28861b[_0x2a536e]['pairId'])||0x0==_0x28861b[_0x2a536e]['distance']||(_0x28861b[_0x2a536e]['isIncorrect']=!0x0);return _0x28861b['filter'](_0x3bc853=>!_0x3bc853['isIncorrect']);}['_markMismatchedRemovedTags'](_0x3660a4){const _0x3e38bf=new Set();for(let _0x21342b=0x0;_0x21342b<_0x3660a4['length'];_0x21342b++){if(_0x3e38bf['has'](_0x3660a4[_0x21342b]['id'])&&_0x3660a4[_0x21342b]['isRemoved']&&(_0x3660a4[_0x21342b]['isIncorrect']=!0x0),_0x3660a4[_0x21342b]['isIncorrect'])continue;if(0x0==_0x3660a4[_0x21342b]['distance'])continue;if('elementStart'!=_0x3660a4[_0x21342b]['type'])continue;if(null==_0x3660a4[_0x21342b]['pairId'])continue;let _0x167709=_0x21342b+0x1,_0x2c0b0d=0x0;for(;_0x3660a4[_0x167709]['id']!=_0x3660a4[_0x21342b]['pairId'];)'elementStart'==_0x3660a4[_0x167709]['type']?_0x2c0b0d++:'elementEnd'==_0x3660a4[_0x167709]['type']&&_0x2c0b0d--,_0x167709++;if(0x0!=_0x2c0b0d){if(_0x3660a4[_0x21342b]['isRemoved'])_0x3660a4[_0x21342b]['isIncorrect']=!0x0;else{for(;_0x167709!=_0x21342b;)_0x3660a4[_0x167709]['isRemoved']&&0x0!=_0x3660a4[_0x167709]['distance']&&(_0x3660a4[_0x167709]['isIncorrect']=!0x0,_0x3e38bf['add'](_0x3660a4[_0x167709]['pairId'])),_0x167709--;}}}return _0x3660a4['filter'](_0x45e146=>!_0x45e146['isIncorrect']);}['_removeUnsupportedChanges'](_0x1f11d5){const _0x4cff52=this['editor']['model']['schema'];for(let _0x7af6fe=0x0;_0x7af6fe<_0x1f11d5['length'];_0x7af6fe++){if(!(_0x1f11d5[_0x7af6fe]['isAdded']||_0x1f11d5[_0x7af6fe]['isAddSuggestion']||_0x1f11d5[_0x7af6fe]['isRemoved']||_0x1f11d5[_0x7af6fe]['isRemoveSuggestion']))continue;if(0x0==_0x1f11d5[_0x7af6fe]['distance'])continue;const _0x37f09f=_0x1f11d5[_0x7af6fe]['item'];_0x4cff52['isBlock'](_0x37f09f)||_0x4cff52['isLimit'](_0x37f09f)||(_0x1f11d5[_0x7af6fe]['isAdded']&&delete _0x1f11d5[_0x7af6fe]['isAdded'],_0x1f11d5[_0x7af6fe]['isAddSuggestion']&&delete _0x1f11d5[_0x7af6fe]['isAddSuggestion'],_0x1f11d5[_0x7af6fe]['isRemoveSuggestion']&&delete _0x1f11d5[_0x7af6fe]['isRemoveSuggestion'],_0x1f11d5[_0x7af6fe]['isRemoved']&&(_0x1f11d5[_0x7af6fe]['isIncorrect']=!0x0));}return _0x1f11d5['filter'](_0x19527b=>!_0x19527b['isIncorrect']);}['_makeModelFromTape'](_0x528c47,_0x5d986d,_0x1a7f23){const _0x30d880=new gt(),_0x4f191c=[],_0x462993=new Map(),_0x1da6e3=this['editor']['model'],_0x387613=_0x1da6e3['schema'],_0x1de8fe=[_0x30d880],_0xeed2eb={},_0x356f2e={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x4a1de2=null;const _0x4cc7f1=[0x0];for(let _0x36f889=0x0;_0x36f889<_0x528c47['length'];_0x36f889++)if('elementStart'===_0x528c47[_0x36f889]['type']){_0x528c47[_0x36f889]['previousPosition']=_0x1da6e3['createPositionFromPath'](_0x30d880,_0x4cc7f1);const _0x3f08e8=new ut(_0x528c47[_0x36f889]['item']['name'],_0x528c47[_0x36f889]['item']['getAttributes']());_0x1de8fe[0x0]['_appendChild'](_0x3f08e8),_0x4cc7f1['push'](0x0),_0x1de8fe['unshift'](_0x3f08e8),_0x528c47[_0x36f889]['nextPosition']=_0x1da6e3['createPositionFromPath'](_0x30d880,_0x4cc7f1);}else'elementEnd'===_0x528c47[_0x36f889]['type']?(_0x1de8fe['shift'](),_0x528c47[_0x36f889]['previousPosition']=_0x1da6e3['createPositionFromPath'](_0x30d880,_0x4cc7f1),_0x4cc7f1['pop'](),_0x4cc7f1[_0x4cc7f1['length']-0x1]++,_0x528c47[_0x36f889]['nextPosition']=_0x1da6e3['createPositionFromPath'](_0x30d880,_0x4cc7f1)):(_0x528c47[_0x36f889]['previousPosition']=_0x1da6e3['createPositionFromPath'](_0x30d880,_0x4cc7f1),_0x4a1de2?_0x4a1de2['_data']+=_0x528c47[_0x36f889]['item']['data']:_0x4a1de2=new mt(_0x528c47[_0x36f889]['item']['data'],_0x528c47[_0x36f889]['item']['getAttributes']()),_0x528c47[_0x36f889+0x1]&&'text'===_0x528c47[_0x36f889+0x1]['type']&&_0x4d9612(_0x4a1de2,_0x528c47[_0x36f889+0x1]['item'])||(_0x1de8fe[0x0]['_appendChild'](_0x4a1de2),_0x4a1de2=null),_0x4cc7f1[_0x4cc7f1['length']-0x1]+=_0x528c47[_0x36f889]['item']['offsetSize'],_0x528c47[_0x36f889]['nextPosition']=_0x1da6e3['createPositionFromPath'](_0x30d880,_0x4cc7f1));for(let _0x3c70ab=0x0;_0x3c70ab<_0x528c47['length'];_0x3c70ab++){const _0xf7202b=_0x528c47[_0x3c70ab]['previousPosition'],_0x32b06d=_0x528c47[_0x3c70ab]['nextPosition'];for(const _0x77e4d8 of _0x528c47[_0x3c70ab]['markersStart'])_0x462993['set'](_0x77e4d8,{'start':_0xf7202b,'end':null});_0x3d9a93('isRemoveSuggestion',_0x3c70ab,_0xf7202b,_0x32b06d),_0x3d9a93('isAddSuggestion',_0x3c70ab,_0xf7202b,_0x32b06d),_0x3d9a93('isRemoved',_0x3c70ab,_0xf7202b,_0x32b06d),_0x3d9a93('isAdded',_0x3c70ab,_0xf7202b,_0x32b06d);for(const _0x169c9c of _0x528c47[_0x3c70ab]['markersEnd']){_0x462993['get'](_0x169c9c)['end']=_0x32b06d;}}for(const [_0x2785d1,_0x50de12]of _0x462993){const _0xf99a0e=this['editor']['model']['createRange'](_0x50de12['start'],_0x50de12['end']);_0x30d880['markers']['set'](_0x2785d1,_0xf99a0e);}return _0x4f191c['sort']((_0xa8daef,_0x4a41db)=>{const _0x4a217e=_0x30d880['markers']['get']('revision:'+_0xa8daef['id']),_0x302d0f=_0x30d880['markers']['get']('revision:'+_0x4a41db['id']);return _0x4a217e['start']['isBefore'](_0x302d0f['start'])?-0x1:_0x4a217e['start']['isAfter'](_0x302d0f['start'])?0x1:_0x4a217e['end']['isBefore'](_0x302d0f['end'])?-0x1:_0x4a217e['end']['isAfter'](_0x302d0f['end'])?0x1:'add'===_0xa8daef['type']?-0x1:0x1;}),{'root':_0x30d880,'changes':_0x4f191c};function _0x3d9a93(_0xf27cba,_0x239265,_0x5383fe,_0x11d957){const _0x3b9026=!!_0x528c47[_0x239265][_0xf27cba],_0x2b058c=_0x3b9026?_0x528c47[_0x239265][_0xf27cba]['userId']:null,_0x48ec7a=_0x239265===_0x528c47['length']-0x1,_0x3b772f=_0x356f2e[_0xf27cba][0x0],_0x5a536f=_0x387613['isObject'](_0x528c47[_0x239265]['item']);!_0xeed2eb[_0xf27cba]&&_0x3b9026?_0xeed2eb[_0xf27cba]={'start':_0x5383fe,'tapeItem':_0x528c47[_0x239265],'userId':_0x2b058c,'type':_0xf27cba}:_0xeed2eb[_0xf27cba]&&!_0x3b9026?(_0xeed2eb[_0xf27cba]['end']=_0x5383fe,_0x3650a6(_0xeed2eb[_0xf27cba]),_0xeed2eb[_0xf27cba]=null):_0xeed2eb[_0xf27cba]&&_0x3b9026&&_0xeed2eb[_0xf27cba]['userId']!==_0x2b058c&&(_0xeed2eb[_0xf27cba]['end']=_0x5383fe,_0x3b772f&&_0x3b772f['userId']===_0xeed2eb[_0xf27cba]['userId']||_0x3650a6(_0xeed2eb[_0xf27cba]),_0xeed2eb[_0xf27cba]={'start':_0x5383fe,'tapeItem':_0x528c47[_0x239265],'userId':_0x2b058c,'type':_0xf27cba}),_0xeed2eb[_0xf27cba]&&_0x5a536f&&('elementStart'!==_0x528c47[_0x239265]['type']||_0x3b772f&&_0x3b772f['userId']===_0x2b058c||_0x356f2e[_0xf27cba]['unshift']({'userId':_0x2b058c,'object':_0x528c47[_0x239265]['item'],'change':_0xeed2eb[_0xf27cba]}),'elementEnd'===_0x528c47[_0x239265]['type']&&_0x3b772f&&_0x3b772f['object']===_0x528c47[_0x239265]['item']&&(_0x356f2e[_0xf27cba]['shift'](),_0xeed2eb[_0xf27cba]=_0x3b772f['change'])),_0xeed2eb[_0xf27cba]&&_0x48ec7a&&(_0xeed2eb[_0xf27cba]['end']=_0x11d957,_0x3650a6(_0xeed2eb[_0xf27cba]),_0xeed2eb[_0xf27cba]=null);}function _0x3650a6({start:_0xac721d,end:_0x566c49,tapeItem:_0x415e44,userId:_0x131aef,type:_0x5cb9b3}){const _0x535ed1=_0x415e44['item'],_0x8a899=_0x1da6e3['schema']['isBlock'](_0x535ed1)&&!_0x1da6e3['schema']['isLimit'](_0x535ed1),_0x4cf473=_0xac721d['nodeAfter']==_0x566c49['parent']&&_0x566c49['isAtStart'];if(_0x8a899&&_0x4cf473)return;const _0x4742fa=_0x1da6e3['createRange'](_0xac721d,_0x566c49),_0x3e2db4=_0x5d986d['get'](_0x131aef),_0x1ab249=new r({'author':_0x3e2db4,'type':'isAdded'==_0x5cb9b3||'isAddSuggestion'==_0x5cb9b3?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x5cb9b3||'isRemoveSuggestion'==_0x5cb9b3},'createdAt':new Date(),'rootName':_0x1a7f23});_0x4f191c['push'](_0x1ab249),_0x30d880['markers']['set']('revision:'+_0x1ab249['id'],_0x4742fa);}function _0x4d9612(_0x322d3d,_0x36d1fe){const _0x77e358=_0x322d3d['getAttributes'](),_0x172275=_0x36d1fe['getAttributes']();for(const _0x48299f of _0x77e358){if(_0x48299f[0x1]!==_0x36d1fe['getAttribute'](_0x48299f[0x0]))return!0x1;_0x172275['next']();}return _0x172275['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x52659b=>{const _0xa2b3b4=_0x52659b['markerName']['split'](':')[0x1],_0x3175b8=this['_getChangeFromId'](_0xa2b3b4);if(!_0x3175b8)return null;const _0x4839ae='add'==_0x3175b8['type']?'insertion':'deletion',_0x817652=['ck-suggestion-marker','ck-suggestion-marker-'+_0x4839ae];return _0x3175b8['data']['isSuggestion']&&_0x817652['push']('ck-suggestion-marker-'+_0x4839ae+'-new'),this['activeChange']==_0x3175b8&&_0x817652['push']('ck-suggestion-marker--active'),{'classes':_0x817652,'attributes':{'data-change-id':_0xa2b3b4}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x39a84a=>{_0x39a84a['on']('element:pre',(_0x32df23,_0x44b54,_0x5deec1)=>{const _0x15ba2f=_0x44b54['viewItem']['getChild'](0x0);if(!_0x15ba2f||!_0x15ba2f['is']('element','code'))return;if(!_0x5deec1['consumable']['consume'](_0x15ba2f,{'attributes':['vid_start','vid_end']}))return;const _0x3e868b=_0x44b54['modelRange']['start']['nodeAfter'];_0x5deec1['writer']['setAttribute']('vid_start',_0x15ba2f['getAttribute']('vid_start'),_0x3e868b),_0x5deec1['writer']['setAttribute']('vid_end',_0x15ba2f['getAttribute']('vid_end'),_0x3e868b);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x175739=>{_0x175739['on']('element',(_0x56591e,_0x5745d1,_0x5a504c)=>{if(!_0x5a504c['consumable']['consume'](_0x5745d1['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x5745d1['modelRange']['isCollapsed'])return;const _0x171cce=_0x5745d1['modelRange']['start']['nodeAfter'];_0x171cce['hasAttribute']('vid_start')||_0x171cce['hasAttribute']('vid')||(_0x5a504c['writer']['setAttribute']('vid_start',_0x5745d1['viewItem']['getAttribute']('vid_start'),_0x171cce),_0x5a504c['writer']['setAttribute']('vid_end',_0x5745d1['viewItem']['getAttribute']('vid_end'),_0x171cce));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x38bb7e=>_0x38bb7e['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3743a8,[,_0x224407])=>{['vid_start','vid_end','vid']['includes'](_0x224407)&&(_0x3743a8['return']=!0x0,_0x3743a8['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5814d7=>{_0x5814d7['on']('attribute:vid',(_0x29cb5d,_0x30754f,_0x3393f9)=>{if('\x20'!=_0x30754f['item']['data']||_0x30754f['item']['parent']['maxOffset']>0x1)return;if(!_0x3393f9['consumable']['consume'](_0x30754f['item'],_0x29cb5d['name']))return;const _0x5f57ee=_0x3393f9['writer'],_0x1941f7=_0x3393f9['mapper']['toViewRange'](_0x30754f['range']);_0x5f57ee['wrap'](_0x1941f7,_0x5f57ee['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x1c8d16){const _0x53efe9=_0x1c8d16['plugins']['get']('RevisionViewer');return(_0x2abee7,_0x113063,_0x4c59ef)=>{const _0x18a886=_0x113063['markerName']['split'](':')[0x1],_0x2c8838=_0x53efe9['_getChangeFromId'](_0x18a886);if(!_0x2c8838)return null;const _0x457a18='add'==_0x2c8838['type']?'split':'merge';if(!_0x4c59ef['consumable']['test'](_0x113063['markerRange'],_0x2abee7['name']))return;const _0xd12964=_0x113063['markerRange']['getWalker'](),_0x547c90=_0x113063['markerRange']['start'],_0x5c597e=_0x1c8d16['model']['schema'];let _0x4a725d=null,_0x29ea34=null,_0x8647ce=!0x1,_0x3b3b=!0x1;for(const _0x54518b of _0xd12964){const _0x53ac12=_0x54518b['item'];_0x8647ce=_0x8647ce||_0x5c597e['isContent'](_0x53ac12);const _0x4f214a=_0x4c59ef['mapper']['toViewElement'](_0x53ac12);if(_0x4f214a&&_0x4f214a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x54518b['type']&&(_0x5c597e['isBlock'](_0x53ac12)&&!_0x5c597e['isLimit'](_0x53ac12)&&(_0x53ac12['nextSibling']||_0x547c90['isAtEnd']?_0x4a725d&&_0x4a725d['parent']==_0x53ac12||(_0x4a725d=_0x53ac12,_0x3befd6(_0x54518b['previousPosition']),_0x3b3b=!0x0):_0x29ea34=_0x29ea34||_0x54518b['previousPosition']));}function _0x3befd6(_0x1b1094){const _0x38337d=_0x4c59ef['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x457a18}),_0x383c67=_0x4c59ef['mapper']['toViewPosition'](_0x1b1094);_0x2c8838['data']['isSuggestion']&&_0x4c59ef['writer']['addClass']('ck-suggestion-marker-'+_0x457a18+'-new',_0x38337d),_0x53efe9['activeChange']==_0x2c8838&&_0x4c59ef['writer']['addClass']('ck-suggestion-marker--active',_0x38337d),_0x4c59ef['writer']['insert'](_0x383c67,_0x38337d),_0x4c59ef['mapper']['bindElementToMarker'](_0x38337d,_0x113063['markerName']);}_0x8647ce||_0x3b3b||!_0x29ea34||_0x3befd6(_0x29ea34);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x53eeed,_0x2dcdd2,_0x20989b)=>{const _0x47e8e8=_0x20989b['mapper']['markerNameToElements'](_0x2dcdd2['markerName']);if(_0x47e8e8){for(const _0xee7bea of _0x47e8e8)(_0xee7bea['hasClass']('ck-suggestion-marker-split')||_0xee7bea['hasClass']('ck-suggestion-marker-merge'))&&(_0x20989b['mapper']['unbindElementFromMarkerName'](_0xee7bea,_0x2dcdd2['markerName']),_0x20989b['writer']['remove'](_0xee7bea));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x37c58c,_0xaedeec,_0x4ce456)=>{const _0x12772b=_0xaedeec['markerName']['split'](':')[0x1],_0xeb3c23=this['_getChangeFromId'](_0x12772b);if(!_0xeb3c23)return null;const _0x3d6cd9='add'==_0xeb3c23['type']?'split':'merge';if(_0x4ce456['consumable']['test'](_0xaedeec['markerRange'],_0x37c58c['name']))for(const _0x22adc4 of _0xaedeec['markerRange']['getItems']()){if(!_0x22adc4['is']('element','softBreak'))continue;const _0x514f17=_0x4ce456['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3d6cd9}),_0x2396c1=_0x4ce456['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x22adc4));_0xeb3c23['data']['isSuggestion']&&_0x4ce456['writer']['addClass']('ck-suggestion-marker-'+_0x3d6cd9+'-new',_0x514f17),this['activeChange']==_0xeb3c23&&_0x4ce456['writer']['addClass']('ck-suggestion-marker--active',_0x514f17),_0x4ce456['writer']['insert'](_0x2396c1,_0x514f17),_0x4ce456['mapper']['bindElementToMarker'](_0x514f17,_0xaedeec['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3cf9aa=>{for(const _0x3fe127 of this['editor']['model']['document']['getRootNames']()){const _0x4276fa=this['editor']['model']['document']['getRoot'](_0x3fe127),_0x6cae92=this['editor']['editing']['view']['document']['getRoot'](_0x3fe127);if(_0x6cae92){const _0x36376e=_0x4276fa['getAttribute']('revisionHistoryAttachChange');if(_0x3cf9aa['removeAttribute']('data-change-id',_0x6cae92),_0x3cf9aa['removeClass']('ck-revision-history-root-add',_0x6cae92),_0x3cf9aa['removeClass']('ck-revision-history-root-remove',_0x6cae92),_0x3cf9aa['removeClass']('ck-revision-history-root--active',_0x6cae92),_0x36376e){const _0x4a7120=this['_getChangeFromId'](_0x36376e);if(!_0x4a7120)return null;_0x3cf9aa['setAttribute']('data-change-id',_0x36376e,_0x6cae92),_0x3cf9aa['addClass']('ck-revision-history-root-'+_0x4a7120['type'],_0x6cae92),this['activeChange']==_0x4a7120&&_0x3cf9aa['addClass']('ck-revision-history-root--active',_0x6cae92);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x8814df=>'revision-comment:'+_0x8814df,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x15ab6a=>'revision-suggestion:'+_0x15ab6a,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x8f36e0=>({'name':'suggestion:'+_0x8f36e0,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4b25c6=>{const _0x32e457=_0x4b25c6['markerName']['split'](':')[0x1];return'insertion'!=_0x32e457&&'deletion'!=_0x32e457?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x32e457]};}}),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',(_0x15de1b,_0x160d12,_0x45045a)=>{const _0xdb5ce=_0x45045a['mapper']['markerNameToElements'](_0x160d12['markerName']);if(_0xdb5ce){for(const _0x2d9b76 of _0xdb5ce)_0x2d9b76['is']('uiElement')&&(_0x45045a['mapper']['unbindElementFromMarkerName'](_0x2d9b76,_0x160d12['markerName']),_0x45045a['writer']['remove'](_0x2d9b76));}},{'priority':'high'});}['_getChangeFromId'](_0x80721e){return this['_changeIdToChange']['get'](_0x80721e);}['_getViewForChange'](_0xf8f9cf){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0xf8f9cf),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2e8518,_0x55af10,_0x285580,_0x4e57aa)=>{_0x4e57aa&&this['_balloon']['remove'](_0x4e57aa),_0x285580&&(this['_balloon']['add']({'view':_0x285580,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x559232=this['editor']['editing'],_0x2d53c6=this['_getChangeFromId'](_0x285580['changeId']);let _0x5b70cd;if(_0x2d53c6['data']['isOnRoot']){const _0x4f67ff=_0x559232['view']['getDomRoot'](_0x2d53c6['rootName']);_0x5b70cd=Array['from'](_0x4f67ff['getClientRects']());}else{const _0x556211=this['editor']['model']['markers']['get']('revision:'+_0x285580['changeId']);_0x5b70cd=Array['from'](_0x559232['mapper']['markerNameToElements'](_0x556211['name']))['map'](_0x14500e=>_0x559232['view']['domConverter']['mapViewToDom'](_0x14500e))['map'](_0x92e42=>Array['from'](_0x92e42['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x5b70cd[0x0];return _0x5b70cd['find'](_0x26ae8e=>_0x26ae8e['top']-0x3<=this['_activeViewTarget']['y']&&_0x26ae8e['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x26ae8e['left']-0x3<=this['_activeViewTarget']['x']&&_0x26ae8e['right']+0x3>=this['_activeViewTarget']['x'])||_0x5b70cd[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x32e912,_0x2a60ea,_0x14e0ba,_0xfbdda1)=>{this['activeView']=_0x14e0ba?this['_getViewForChange'](_0x14e0ba):null,this['editor']['model']['change'](()=>{const _0x260c39=this['editor']['editing'];_0xfbdda1&&(_0xfbdda1['data']['isOnRoot']?_0x260c39['view']['change'](_0x51cad4=>{_0x51cad4['removeClass']('ck-revision-history-root--active',_0x260c39['view']['document']['getRoot'](_0xfbdda1['rootName']));}):_0x260c39['reconvertMarker']('revision:'+_0xfbdda1['id'])),_0x14e0ba&&(_0x14e0ba['data']['isOnRoot']?_0x260c39['view']['change'](_0x5ddd68=>{_0x5ddd68['addClass']('ck-revision-history-root--active',_0x260c39['view']['document']['getRoot'](_0x14e0ba['rootName']));}):_0x260c39['reconvertMarker']('revision:'+_0x14e0ba['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x44d483,_0x3d585b)=>{if(this['activeChange'])return;const _0x528ab8=this['_findChangeIdFromDomTarget'](_0x3d585b['target']),_0x298548=this['_changeIdToChange']['get'](_0x528ab8);_0x298548?(this['_activeViewTarget']={'x':_0x3d585b['domEvent']['x'],'y':_0x3d585b['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x298548)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2d987c,_0x390370)=>{const _0x315f01=this['_findChangeIdFromDomTarget'](_0x390370['target']),_0x154e01=this['_changeIdToChange']['get'](_0x315f01);_0x154e01?(this['_activeViewTarget']={'x':_0x390370['domEvent']['x'],'y':_0x390370['domEvent']['y']},_0x154e01===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x154e01):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x5e9557){do{const _0x247a6f=_0x5e9557['getAttribute']('data-change-id');if(_0x247a6f)return _0x247a6f;_0x5e9557=_0x5e9557['parent'];}while(_0x5e9557);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5aa1a0=>{for(const _0x345557 of this['editor']['model']['markers'])_0x5aa1a0['removeMarker'](_0x345557);});}}function Z(_0x26c79f,_0x38eebc){return(_0x566333,_0x43624d,_0x5f1df0)=>{if(!_0x5f1df0['consumable']['test'](_0x43624d['markerRange'],_0x566333['name']))return;const _0xa11b63=_0x43624d['markerRange']['getWalker'](),_0x176bb5=_0x43624d['markerRange']['start'],_0x12852f=_0x26c79f['model']['schema'];let _0xa8f15d=null,_0x330240=null,_0x3e5596=!0x1,_0x5ee55c=!0x1;for(const _0x144a02 of _0xa11b63){const _0x35c4ae=_0x144a02['item'];_0x3e5596=_0x3e5596||_0x12852f['isContent'](_0x35c4ae);const _0x5475aa=_0x5f1df0['mapper']['toViewElement'](_0x35c4ae);if(_0x5475aa&&_0x5475aa['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x144a02['type']&&(_0x12852f['isBlock'](_0x35c4ae)&&!_0x12852f['isLimit'](_0x35c4ae)&&(_0x35c4ae['nextSibling']||_0x176bb5['isAtEnd']?_0xa8f15d&&_0xa8f15d['parent']==_0x35c4ae||(_0xa8f15d=_0x35c4ae,_0xf7592b(_0x144a02['previousPosition']),_0x5ee55c=!0x0):_0x330240=_0x330240||_0x144a02['previousPosition']));}function _0xf7592b(_0x30cc3b){const _0x523206=_0x5f1df0['mapper']['toViewPosition'](_0x30cc3b),_0xf5d683=_0x5f1df0['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x38eebc});_0x5f1df0['writer']['insert'](_0x523206,_0xf5d683),_0x5f1df0['mapper']['bindElementToMarker'](_0xf5d683,_0x43624d['markerName']);}_0x3e5596||_0x5ee55c||!_0x330240||_0xf7592b(_0x330240);};}class wt extends _0x44144e{constructor(_0xd9925c){super(_0xd9925c);const _0x1c8b45=_0xd9925c['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x1c8b45,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x1c8b45,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x48de89=this['editor'],_0x1cb9e1=_0x48de89['plugins']['get'](d),_0x4035e9=_0x1cb9e1['isReady']?_0x1cb9e1['diff']['newRevisionId']:null;_0x48de89['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4035e9);}['refresh'](){const {isReady:_0x41f23c,isEnabled:_0x5e1978,repository:_0x579c82,diff:_0x39276e}=this['editor']['plugins']['get'](d),_0x44d7=_0x39276e&&_0x579c82['getLaterVisibleRevision'](_0x39276e['newRevisionId']);this['isEnabled']=_0x41f23c&&_0x5e1978&&Boolean(_0x44d7);}}class _t extends _0x44144e{['_step'];constructor(_0x5db15f,{direction:_0x502dc4}){super(_0x5db15f);const _0x105bd4=_0x5db15f['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x502dc4?0x1:-0x1,this['listenTo'](_0x105bd4,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x105bd4,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x105bd4,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x38a957=this['editor'],_0x805cca=_0x38a957['plugins']['get'](d),{isNavigationMode:_0x125052,currentChangeNumber:_0x25f1e6}=_0x805cca;let _0x1c4171;if(_0x805cca['activeChange']=_0x125052?_0x805cca['diff']['changes']['get'](_0x25f1e6+this['_step']):_0x805cca['diff']['changes']['first'],_0x805cca['activeChange']['data']['isOnRoot'])_0x1c4171=_0x38a957['editing']['view']['getDomRoot'](_0x805cca['activeChange']['rootName']);else{const _0x166e67=_0x38a957['model']['markers']['get']('revision:'+_0x805cca['activeChange']['id']);_0x1c4171=_0x96f4b1(_0x38a957['editing'],_0x166e67);}_0x4f9aa2({'target':_0x1c4171,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4ca2ec,currentChangeNumber:_0x373972,numberOfChanges:_0x4e3e75,isReady:_0x48b367,isEnabled:_0x52ad54}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x52ad54&&_0x48b367&&_0x4e3e75)&&(!_0x4ca2ec||(0x1===this['_step']?_0x373972<_0x4e3e75-0x1:_0x373972>0x0));}}class oi extends ts{constructor(_0x4379ce){super(_0x4379ce);const _0x18107f=this['bindTemplate'],_0x407232=new te(_0x4379ce),_0x2e44d0=new te(_0x4379ce);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',(_0x40b112,_0x3c0a45)=>_0x40b112&&_0x3c0a45>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x94e332,_0x38fe49,_0xf13aef,_0x254751)=>{if(!_0x94e332)return m(_0x4379ce,'Loading...');if(!_0xf13aef)return m(_0x4379ce,'No\x20changes');const _0x862ef3=m(_0x4379ce,'NUMBER_OF_CHANGES',_0xf13aef);return _0x254751?m(_0x4379ce,'X_OF_Y_CHANGES',[_0x38fe49+0x1,_0xf13aef]):_0x862ef3;}),_0x407232['set']({'label':m(_0x4379ce,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x4a6fc4}),_0x2e44d0['set']({'label':m(_0x4379ce,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4335ff}),_0x407232['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2e44d0['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x407232['on']('execute',()=>this['fire']('execute','backward')),_0x2e44d0['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',_0x18107f['if']('_isStatusLabelVisible','ck-hidden',_0x556357=>!_0x556357)]},'children':[{'text':_0x18107f['to']('isNavigationMode',_0xf6312c=>_0xf6312c?m(_0x4379ce,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x4379ce,'Total')+':\x20')}]},{'text':_0x18107f['to']('_statusText')}]},new _0x3b3126(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x407232,_0x2e44d0]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x4191c7{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x4b3c05=this['editor']['editing']['view'];_0x4b3c05['change'](_0x3a2a82=>{for(const _0x4241ff of _0x4b3c05['document']['roots'])_0x3a2a82['addClass'](le,_0x4241ff);});}['hide'](){const _0xea6c8b=this['editor']['editing']['view'];_0xea6c8b['change'](_0x10a717=>{for(const _0xa63fe2 of _0xea6c8b['document']['roots'])_0x10a717['removeClass'](le,_0xa63fe2);});}}class w extends _0x4191c7{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ge];}['init'](){const _0x18fd1a=this['editor'],_0x54251c=_0x18fd1a['plugins']['get'](d),_0x2b41e4=_0x18fd1a['plugins']['get'](ge);_0x18fd1a['ui']['componentFactory']['add']('exitToEditing',_0x17b72d=>{const _0x1b2112=new te(_0x17b72d);return _0x1b2112['set']({'label':m(_0x17b72d,'Back\x20to\x20editing'),'icon':_0x3a12c8,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1b2112,'execute',()=>{_0x18fd1a['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1b2112;}),_0x18fd1a['ui']['componentFactory']['add']('restoreRevision',_0x31a27e=>{const _0x2a1fea=new te(_0x31a27e);return _0x2a1fea['set']({'label':m(_0x31a27e,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x2a1fea['bind']('isEnabled')['to'](_0x18fd1a['commands']['get']('restoreRevision')),this['listenTo'](_0x2a1fea,'execute',()=>_0x18fd1a['execute']('restoreRevision')),_0x2a1fea;}),_0x18fd1a['ui']['componentFactory']['add']('changesNavigation',_0x1528f8=>{const _0x33ec15=new oi(_0x1528f8),_0x47ff37=_0x18fd1a['commands']['get']('showPreviousChange'),_0x329408=_0x18fd1a['commands']['get']('showNextChange');return _0x33ec15['bind']('isBackwardNavigationEnabled')['to'](_0x47ff37,'isEnabled'),_0x33ec15['bind']('isForwardNavigationEnabled')['to'](_0x329408,'isEnabled'),_0x33ec15['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x54251c),this['listenTo'](_0x33ec15,'execute',(_0x128c39,_0x14ce99)=>{_0x18fd1a['execute']('forward'===_0x14ce99?'showNextChange':'showPreviousChange');}),_0x33ec15;}),_0x2b41e4['show'](),_0x54251c['on']('change:isReady',(_0x375d92,_0x3eaf0b,_0x3a64db)=>{_0x3a64db?_0x2b41e4['hide']():_0x2b41e4['show']();});}}class pt extends _0x5c04f4{['_resizeObserver']=null;constructor(_0x5aac83,_0x5d645c){super(_0x5aac83,_0x5d645c);const _0x43d9c0=this['bindTemplate'];this['set']({'label':m(_0x5aac83,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x5aac83,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x43d9c0['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x405c36=this['fieldView']['element'];this['_tooltipString']=_0x405c36['scrollWidth']>_0x405c36['clientWidth']&&_0x405c36['value']||'';}}class hi extends ts{constructor(_0x38a19e,_0x3762d7,_0x332ad8){super(_0x38a19e);const _0x388ce1=new _0x2d0324();_0x388ce1['set']({'content':_0x2ea797,'viewBox':'0\x200\x2011\x2010'});const _0x51ef4d=['ck','ck-revision-history-sidebar__revision-author'];_0x332ad8&&_0x51ef4d['push']('ck-revision-history-sidebar__revision-author_creator');const _0x7eacbd=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x38a19e,_0x332ad8?'Revision\x20creator':'Revision\x20author')},'children':[_0x388ce1,_0x3762d7['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x51ef4d},'children':_0x7eacbd});}}function vi(_0xfc5b96,_0x466b98){const _0x543954=_0xfc5b96['bindTemplate'],_0x588c75=_0xfc5b96['locale'],_0x475780=_0x3f5931(_0x588c75);_0x475780['panelPosition']='sw';const _0x4f8096=function(_0x54a665,_0x3f3be1){const _0x12438c=function(_0x556525,_0x3a82b4){const _0x36fbd6=_0x556525['locale'],_0x55ab09={'Compare\x20against\x20selected':m(_0x36fbd6,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x36fbd6,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x36fbd6,'Restore\x20this\x20revision')};return _0x3a82b4['map'](_0x38f947=>{const _0x445f23=_0x55ab09[_0x38f947['name']];return _0x445f23&&_0x445f23!==_0x38f947['name']&&(_0x38f947['name']=_0x445f23),_0x38f947;});}(_0x54a665,_0x3f3be1),_0x13c4c0=new _0x56de22();for(const _0x1efead of _0x12438c){const _0x3cc10a={'type':'button','model':new to({'label':_0x1efead['name'],'class':_0x1efead['class'],'withText':!0x0,'role':'menuitem','_action':_0x1efead['action']})};_0x3cc10a['model']['bind']('isEnabled')['to'](_0x54a665,'isActionsDropdownOpen',_0x5245e8=>'function'!=typeof _0x1efead['isEnabled']||(!_0x5245e8||_0x1efead['isEnabled'](_0x54a665))),_0x13c4c0['add'](_0x3cc10a);}return _0x13c4c0;}(_0xfc5b96,_0x466b98);return _0xfc5b96['bind']('isActionsDropdownOpen')['to'](_0x475780,'isOpen'),_0x475780['buttonView']['set']({'label':m(_0x588c75,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1b4c9e}),_0x475780['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x543954['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x543954['to'](_0x1b8865=>_0x1b8865['stopPropagation']())}}),_0x475780['on']('execute',_0x47bd4e=>{_0xfc5b96['isReady']&&'function'==typeof _0x47bd4e['source']['_action']&&_0x47bd4e['source']['_action'](_0xfc5b96);}),_0x2bab52(_0x475780,_0x4f8096,{'role':'menu'}),_0x475780['listenTo'](_0xfc5b96,'change:isActionsDropdownOpen',(_0x2a7563,_0x4988f8,_0x413680)=>{if(_0x413680)for(const _0x279621 of _0x475780['listView']['items']){const _0x7e336c=_0x279621['children']['first'],_0x12de5e=_0x466b98['find'](_0x563eae=>_0x563eae['action']===_0x7e336c['_action'])['isVisible'];_0x279621['isVisible']=void 0x0===_0x12de5e||_0x12de5e(_0xfc5b96);}}),_0x475780;}class si extends/* #__PURE__ -- @preserve */
26
- _0x4e19c2(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x52a563,_0xf95f6d,_0x2a66fb,_0x144ec6){super(_0x52a563);const _0x14910d=this['bindTemplate'],_0x557fb3=function(_0xae3cbf,_0x45bae0){const _0x13ba2e=Array['from'](_0x45bae0['authors'])['filter'](_0x3170e0=>_0x3170e0!=_0x45bae0['creator']);return _0x45bae0['creator']&&_0x13ba2e['unshift'](_0x45bae0['creator']),_0x13ba2e['map'](_0x47bec5=>new hi(_0xae3cbf,_0x47bec5,_0x47bec5==_0x45bae0['creator']));}(_0x52a563,_0xf95f6d);this['id']=_0xf95f6d['id'],this['_revision']=_0xf95f6d,this['_requireRevisionName']=_0x144ec6,this['bind']('name','createdAt')['to'](_0xf95f6d),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x5ce8c3=>{return _0x3e05b9=_0x52a563['uiLanguage'],(_0x2c2285=_0x5ce8c3)['toLocaleDateString'](_0x3e05b9,{'month':'long','day':'numeric'})+',\x20'+_0x2c2285['toLocaleTimeString'](_0x3e05b9,{'hour':'numeric','minute':'numeric'});var _0x3e05b9,_0x2c2285;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new pt(_0x52a563,_0x279764),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x3cfa43=>_0x3cfa43||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x2adecb,_0x349131)=>_0x2adecb&&_0x349131),this['revisionActionsView']=_0x2a66fb&&_0x2a66fb['length']?vi(this,_0x2a66fb):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x14910d['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x14910d['if']('isEnabled','ck-disabled',_0x4de6f0=>!_0x4de6f0),_0x14910d['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x14910d['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x14910d['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':_0x14910d['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':_0x557fb3}]},this['revisionActionsView']],'on':{'click':_0x14910d['to'](_0x35a86c=>{_0x35a86c['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x543301=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x543301,'change',()=>{this['_requireRevisionName']&&!_0x543301['value']||this['fire']('setName',{'id':this['id'],'name':_0x543301['value']}),_0x543301['value']||(_0x543301['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ti(_0x283dc2,_0x1d2038){const _0x571eac=_0x13edb5['fromJSDate'](_0x283dc2)['setLocale'](_0x1d2038),_0x28028f=_0x13edb5['local'](),_0x30d8fd=_0x28028f['minus']({'days':0x1})['startOf']('day');let _0x3e25ea,_0x3b0d38;return _0x571eac['hasSame'](_0x28028f,'day')?(_0x3e25ea=_0x571eac['startOf']('day')['toJSDate'](),_0x3b0d38=_0x571eac['toRelativeCalendar']()):_0x571eac['hasSame'](_0x30d8fd,'day')?(_0x3e25ea=_0x30d8fd['toJSDate'](),_0x3b0d38=_0x571eac['toRelativeCalendar']()):_0x571eac['hasSame'](_0x28028f,'week')?(_0x3e25ea=_0x571eac['startOf']('week')['toJSDate'](),_0x3b0d38=_0x571eac['weekdayLong']||''):_0x571eac['hasSame'](_0x28028f,'year')?(_0x3e25ea=_0x571eac['startOf']('month')['toJSDate'](),_0x3b0d38=_0x571eac['monthLong']||''):(_0x3e25ea=_0x571eac['startOf']('year')['toJSDate'](),_0x3b0d38=String(_0x571eac['year'])),{'startDate':_0x3e25ea,'localizedPeriodName':_0x3b0d38};}class ei extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4dc2db,_0x4d2540,_0x268e73,_0x2dd975){super(_0x4dc2db);const _0x38f080=ti(_0x4d2540,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4d2540,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x268e73,this['_requireRevisionName']=_0x2dd975,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':_0x38f080}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x563fab){const _0x4da9aa=new si(this['locale'],_0x563fab,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x4da9aa);}['removeRevision'](_0x4ca2d6){const _0x1ee9e3=this['revisionViews']['find'](_0x57808f=>_0x57808f['id']===_0x4ca2d6['id']);this['revisionViews']['remove'](_0x1ee9e3);}}class cs extends ts{constructor(_0x35d91a){super(_0x35d91a);const _0x159185=new _0x2d0324();_0x159185['content']=_0x3543e9,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x159185,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x35d91a,'Revision\x20history')]}]});}}class ii extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4cd5a7,_0x2720b5,_0x43603d,_0x341a39){super(_0x4cd5a7);const _0x16756d=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x2720b5,this['_revisionActions']=_0x43603d,this['_requireRevisionName']=_0x341a39,this['on']('select',(_0x3fac65,_0x400e06)=>{this['fire']('revisionSelected',_0x400e06);}),this['on']('setName',(_0x2d3cf2,_0x115a07)=>{this['fire']('revisionSetName',_0x115a07);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new cs(_0x4cd5a7),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x16756d['if']('isEnabled','ck-disabled',_0x587f70=>!_0x587f70)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x12f5bb of this['_revisions'])this['_addRevision'](_0x12f5bb);this['_revisions']['on']('add',(_0x171573,_0x4018d3)=>{this['_addRevision'](_0x4018d3);}),this['_revisions']['on']('remove',(_0x883eaf,_0x34281b)=>{this['_removeRevision'](_0x34281b);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x3309f1=>_0x3309f1['revisionViews']['map'](_0x304061=>_0x304061))['flat']();}['selectRevision'](_0x1890e1){for(const _0x223cee of this['revisionViews'])_0x1890e1&&_0x1890e1['id']===_0x223cee['id']?_0x223cee['select']():_0x223cee['deselect']();}['highlightRevisions'](_0x210f95){for(const _0x229982 of this['revisionViews'])_0x210f95['some'](({id:_0x181270})=>_0x181270===_0x229982['id'])?_0x229982['highlight']():_0x229982['unhighlight']();}['_addRevision'](_0x513c66){const _0x44f89e=ti(_0x513c66['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x568393=this['timePeriodViews']['get'](0x0);_0x568393&&_0x568393['startDate']['getTime']()===_0x44f89e['getTime']()||(_0x568393=new ei(this['locale'],_0x44f89e,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x568393)),_0x568393['addRevision'](_0x513c66);}['_removeRevision'](_0x20eeee){const _0x15c22c=ti(_0x20eeee['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x15c22c)['removeRevision'](_0x20eeee);}['_getTimePeriodViewByStartDate'](_0xa85745){return this['timePeriodViews']['find'](_0x4c6bd4=>_0x4c6bd4['startDate']['getTime']()===_0xa85745['getTime']());}}class g extends _0x4191c7{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x516367,uid as _0x4f9af2,Collection as _0x13b5e8,logWarning as _0x13d2e1,FocusTracker as _0x3d339c,KeystrokeHandler as _0x43e4f7,scrollViewportToShowTarget as _0xfed6b8,ResizeObserver as nt,ElementReplacer as ht,CKEditorError as _0x272203}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x456193,set as _0x3b8113,unset as _0x32e303,isEqual as _0x3c1054}from'lodash-es';import{Plugin as _0x43da28,PendingActions as _0x16d7d1,icons as _0x5b095b,Command as _0x373fcf,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x23463a,getMarkerDomElement as _0x368c0e,ConfirmMixin as _0x5af527,sanitizeEditorConfig as _0x4ef1d0}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x49a981,Element as ft,Range as vt,ViewUIElement as _0x2f209d,ViewRawElement as _0x1a9b91,ViewEmptyElement as _0x1d4908,ViewAttributeElement as _0x16e4b8,ViewContainerElement as _0x5d5f8c,Position as gt,ViewText as _0x1b3fed,ViewElement as _0x373d7e,DocumentFragment as mt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x33abfc,submitHandler as _0x3c49f3,LabeledFieldView as _0x3333b0,createLabeledInputText as _0x380cb7,createDropdown as _0x47471b,ListView as _0x46bf10,ListItemView as _0x3b0d83,ButtonView as te,MenuBarMenuView as _0x35891c,MenuBarMenuListView as _0x27588f,MenuBarMenuListItemView as _0x4dfca5,MenuBarMenuListItemButtonView as _0x390e3b,ContextualBalloon as _0xcf7ba6,ToolbarSeparatorView as _0x1152d7,IconView as _0x34f4ef,addListToDropdown as to,ViewModel as _0x45eb5e,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 _0x26d640}from'luxon';class a extends/* #__PURE__ -- @preserve */
24
+ _0x516367(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x275fbf){super(),this['id']=_0x275fbf['id']||_0x4f9af2(),this['creator']=_0x275fbf['creator']||null,this['authors']=_0x275fbf['authors']||[],this['diffData']=_0x275fbf['diffData']||null,this['toVersion']=_0x275fbf['toVersion']||0x0,this['fromVersion']=_0x275fbf['fromVersion']||0x0,this['set']('name',_0x275fbf['name']||''),this['set']('createdAt',_0x275fbf['createdAt']||new Date()),this['set']('attributes',_0x275fbf['attributes']||{});}['setName'](_0x3a535d){this['_update']({'name':_0x3a535d});}['setAttribute'](_0x5d97a2,_0x47e2ab){const _0x4648f8=_0x456193(this['attributes']);_0x3b8113(_0x4648f8,_0x5d97a2,_0x47e2ab),this['_update']({'attributes':_0x4648f8});}['removeAttribute'](_0x3fa8b4){const _0x25aacc=_0x456193(this['attributes']);_0x32e303(_0x25aacc,_0x3fa8b4),this['_update']({'attributes':_0x25aacc});}['_update'](_0x4822ed,_0x37a1a6=!0x1){let _0x533c5b=!0x1;const _0x5f4f58={'id':this['id']},_0x2912a3=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x17b0c7 of _0x2912a3){const _0x4e1418=_0x4822ed[_0x17b0c7];void 0x0!==_0x4e1418&&_0x4e1418!==this[_0x17b0c7]&&(this[_0x17b0c7]=_0x4e1418,_0x5f4f58[_0x17b0c7]=_0x4e1418,_0x533c5b=!0x0);}_0x533c5b&&(_0x5f4f58['authors']&&(_0x5f4f58['authorsIds']=_0x5f4f58['authors']['map'](_0x5067fd=>_0x5067fd['id']),delete _0x5f4f58['authors']),this['fire']('_update',_0x5f4f58,_0x37a1a6));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x31157b=>_0x31157b['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x43da28{['_revisions'];static get['requires'](){return[_0x23463a];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x37a80b){super(_0x37a80b),this['_revisions']=new _0x13b5e8();}['afterInit'](){!async function(_0x3eea4a){const _0x5c5ef6=_0xa02786([0x52,0x6d,0x4a,0x55,0x70,0x6b,0x63,0x38,0x4d,0x58,0x75,0x36,0x74,0x78,0x45,0x44,0x66,0x71,0x31,0x77,0x7a,0x73,0x76,0x6e,0x54,0x6f,0x65,0x57,0x69,0x4f,0x32,0x42,0x6c,0x43,0x39,0x62,0x46,0x64,0x37,0x59,0x72,0x35,0x48,0x6a,0x4b,0x4c,0x33,0x79,0x56,0x5a,0x67,0x53,0x50,0x41,0x4e,0x61,0x47,0x51,0x34,0x30,0x49,0x68]),_0x5ae981=0xeb829,_0x6a73e0=0x1c9234c2,_0x2eeb27=0x1c95545a^_0x6a73e0,_0x25b04a=window[_0xa02786([0x44,0x61,0x74,0x65])][_0xa02786([0x6e,0x6f,0x77])](),_0x383e9f=_0x3eea4a[_0xa02786([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x45787f=new window[(_0xa02786([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1305ba=>{_0x383e9f[_0xa02786([0x6f,0x6e,0x63,0x65])](_0xa02786([0x72,0x65,0x61,0x64,0x79]),_0x1305ba);}),_0x58931c={[_0xa02786([0x6b,0x74,0x79])]:_0xa02786([0x45,0x43]),[_0xa02786([0x75,0x73,0x65])]:_0xa02786([0x73,0x69,0x67]),[_0xa02786([0x63,0x72,0x76])]:_0xa02786([0x50,0x2d,0x32,0x35,0x36]),[_0xa02786([0x78])]:_0xa02786([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]),[_0xa02786([0x79])]:_0xa02786([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]),[_0xa02786([0x61,0x6c,0x67])]:_0xa02786([0x45,0x53,0x32,0x35,0x36])},_0x10e16b=_0x383e9f[_0xa02786([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xa02786([0x67,0x65,0x74])](_0xa02786([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x48f53e(){let _0x10bc77,_0x19d153=null,_0x491a2c=null;try{if(_0x10e16b==_0xa02786([0x47,0x50,0x4c]))return _0xa02786([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x10bc77=_0x36c935(),!_0x10bc77)return _0xa02786([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x10bc77[_0xa02786([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x491a2c=_0xeffb20(_0x10bc77[_0xa02786([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x10bc77[_0xa02786([0x6a,0x74,0x69])])),await _0x576e38()?_0x434926()?_0x58962()?_0xa02786([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x289046()?(_0x10bc77[_0xa02786([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xa02786([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x19d153=_0x3d8a4f(_0xa02786([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x10bc77[_0xa02786([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xa02786([0x74,0x72,0x69,0x61,0x6c])&&(_0x19d153=_0x3d8a4f(_0xa02786([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x45a63f()):_0xa02786([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xa02786([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xa02786([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x20e864){return _0xa02786([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x58962(){const _0x234751=[_0xa02786([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xa02786([0x74,0x72,0x69,0x61,0x6c])][_0xa02786([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x10bc77[_0xa02786([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x25b04a/0x3e8:0xe10*_0x2eeb27;return _0x10bc77[_0xa02786([0x65,0x78,0x70])]<_0x234751;}function _0x434926(){const _0x156d9f=_0x10bc77[_0xa02786([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x156d9f)return!0x1;if(_0x156d9f[_0xa02786([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa02786([0x2a])))return!0x0;if(_0x156d9f[_0xa02786([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa02786([0x52,0x48])))return!0x0;if(_0x156d9f[_0xa02786([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa02786([0x52,0x52,0x48]))){if(_0x2127b3())return!0x0;if(_0x22959f()||_0x47201c())return!0x0;}return!0x1;}function _0x289046(){const _0x191083=_0x10bc77[_0xa02786([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x191083||0x0==_0x191083[_0xa02786([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x232264}=new URL(window[_0xa02786([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x191083[_0xa02786([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x232264))return!0x0;const _0x33b5a8=_0x232264[_0xa02786([0x73,0x70,0x6c,0x69,0x74])](_0xa02786([0x2e]));return _0x191083[_0xa02786([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x49463d=>_0x49463d[_0xa02786([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xa02786([0x2a])))[_0xa02786([0x6d,0x61,0x70])](_0x3f1b31=>_0x3f1b31[_0xa02786([0x73,0x70,0x6c,0x69,0x74])](_0xa02786([0x2e])))[_0xa02786([0x73,0x6f,0x6d,0x65])](_0x3861b2=>_0x33b5a8[_0xa02786([0x65,0x76,0x65,0x72,0x79])]((_0x3c39fd,_0x35103c)=>_0x3861b2[_0x35103c]===_0x3c39fd||_0x3861b2[_0x35103c]===_0xa02786([0x2a])));}function _0x45a63f(){return _0x19d153&&_0x491a2c?new window[(_0xa02786([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4f5f13,_0x7c555b)=>{_0x19d153[_0xa02786([0x74,0x68,0x65,0x6e])](_0x4f5f13,_0x7c555b),_0x491a2c[_0xa02786([0x74,0x68,0x65,0x6e])](_0x677785=>{_0x677785!=_0xa02786([0x56,0x61,0x6c,0x69,0x64])&&_0x4f5f13(_0x677785);},_0x7c555b);}):_0x19d153||_0x491a2c||_0xa02786([0x56,0x61,0x6c,0x69,0x64]);}}function _0xeffb20(_0x4d2031,_0x44b113){return new window[(_0xa02786([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ed57d=>{if(_0x3a80c6())return _0x3ed57d(_0xa02786([0x56,0x61,0x6c,0x69,0x64]));_0x74391(),_0x383e9f[_0xa02786([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xa02786([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3e86a2=!0x1;const _0x520afd=_0x4f9af2();function _0x14d5dc(_0x12ae25){return!!_0x12ae25&&(typeof _0x12ae25===_0xa02786([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x12ae25===_0xa02786([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x12ae25[_0xa02786([0x74,0x68,0x65,0x6e])]===_0xa02786([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x12ae25[_0xa02786([0x63,0x61,0x74,0x63,0x68])]===_0xa02786([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x222cd4(_0x53df08){_0x1f8fc7(_0x53df08)[_0xa02786([0x74,0x68,0x65,0x6e])](_0x2f983d=>{if(!_0x2f983d||_0x2f983d[_0xa02786([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xa02786([0x6f,0x6b]))return _0xa02786([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x389a35(_0x7734c2(_0x520afd+_0x44b113))!=_0x2f983d[_0xa02786([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xa02786([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xa02786([0x56,0x61,0x6c,0x69,0x64]);})[_0xa02786([0x74,0x68,0x65,0x6e])](_0x460470=>(_0x384948(),_0x460470),()=>{const _0xdb1e7b=_0x9bc607();return null==_0xdb1e7b?(_0x384948(),_0xa02786([0x56,0x61,0x6c,0x69,0x64])):_0xa02786(_0x25b04a-_0xdb1e7b>(0x389eb0c2^_0x6a73e0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xa02786([0x74,0x68,0x65,0x6e])](_0x3ed57d)[_0xa02786([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3ed57d(_0xa02786([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x221521=0x1ca4da42^_0x6a73e0;function _0x384948(){const _0x2e8c7c=_0xa02786([0x6c,0x6c,0x63,0x74,0x2d])+_0x389a35(_0x7734c2(_0x4d2031)),_0xc67552=_0x3f52e9(_0x389a35(window[_0xa02786([0x4d,0x61,0x74,0x68])][_0xa02786([0x63,0x65,0x69,0x6c])](_0x25b04a/_0x221521)));window[_0xa02786([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xa02786([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2e8c7c,_0xc67552);}function _0x9bc607(){const _0x274c94=_0xa02786([0x6c,0x6c,0x63,0x74,0x2d])+_0x389a35(_0x7734c2(_0x4d2031)),_0xc5c2a1=window[_0xa02786([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xa02786([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x274c94);return _0xc5c2a1?window[_0xa02786([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3f52e9(_0xc5c2a1),0x10)*_0x221521:null;}function _0x1f8fc7(_0x55a4a7){return new window[(_0xa02786([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x409719,_0x45b638)=>{_0x55a4a7[_0xa02786([0x74,0x68,0x65,0x6e])](_0x409719,_0x45b638),window[_0xa02786([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x45b638,0x1c93e002^_0x6a73e0);});}}_0x383e9f[_0xa02786([0x6f,0x6e])](_0xa02786([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x456afc,_0x581047)=>{if(_0x581047[0x0]!=_0x4d2031)return _0x3ed57d(_0xa02786([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x581047[0x1]={..._0x581047[0x1],[_0xa02786([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x520afd};},{[_0xa02786([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xa02786([0x68,0x69,0x67,0x68])}),_0x383e9f[_0xa02786([0x6f,0x6e])](_0xa02786([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xcce1ee=>{_0x14d5dc(_0xcce1ee[_0xa02786([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3e86a2=!0x0,_0x222cd4(_0xcce1ee[_0xa02786([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xa02786([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xa02786([0x6c,0x6f,0x77])}),_0x45787f[_0xa02786([0x74,0x68,0x65,0x6e])](()=>{_0x3e86a2||_0x3ed57d(_0xa02786([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3a80c6(){return _0x383e9f[_0xa02786([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa02786([0x76,0x69,0x65,0x77])][_0xa02786([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xa02786([0x61,0x75,0x74,0x6f]);}function _0x74391(){_0x383e9f[_0xa02786([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xa02786([0x76,0x69,0x65,0x77])][_0xa02786([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xa02786([0x61,0x75,0x74,0x6f]);}}function _0x3d8a4f(_0x180a16){const _0x52943f=[new window[(_0xa02786([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24af5e=>setTimeout(_0x24af5e,0x1c9b0a0e^_0x6a73e0)),_0x45787f[_0xa02786([0x74,0x68,0x65,0x6e])](()=>new window[(_0xa02786([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x335806=>{const _0x265b79=0x1c9234c5^_0x6a73e0,_0x2db476=_0x3eea4a[_0xa02786([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x34219e(){_0x2db476[_0xa02786([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x265b79&&_0x335806();}_0x34219e(),_0x2db476[_0xa02786([0x6f,0x6e])](_0xa02786([0x61,0x64,0x64]),_0x34219e);})),new window[(_0xa02786([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xa5c018=>{function _0x598a86(){for(const _0x2df78e in window)if(window[_0xa02786([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0xa02786([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x2df78e))&&window[_0x2df78e]==_0x5ae981)return _0xa5c018();_0x383e9f[_0xa02786([0x73,0x74,0x61,0x74,0x65])]!=_0xa02786([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0xa02786([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x598a86,0x1c92274a^_0x6a73e0);}_0x2a415d(_0xa02786([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x598a86();})];return window[_0xa02786([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xa02786([0x72,0x61,0x63,0x65])](_0x52943f)[_0xa02786([0x74,0x68,0x65,0x6e])](()=>_0x180a16);}async function _0x28938d(){if(await _0x45787f,_0x2a415d(_0xa02786([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x1b5380=_0x3eea4a[_0xa02786([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x4920e0=_0x3eea4a[_0xa02786([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])](_0x1b5380[_0xa02786([0x69,0x64])]),_0x132dbf=_0x389cfd(_0xa02786([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x132dbf[_0xa02786([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x1b5380['id'],_0x4920e0?_0x4920e0['id']:null,!0x0),_0x132dbf[_0xa02786([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0xa02786([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x132dbf[_0xa02786([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x132dbf[_0xa02786([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x13e7dd,void(_0x132dbf[_0xa02786([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x13e7dd);}if(_0x2a415d(_0xa02786([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2abe71=_0x389cfd(_0xa02786([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2abe71[_0xa02786([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0xa02786([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2abe71[_0xa02786([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2abe71[_0xa02786([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x13e7dd,_0x2abe71[_0xa02786([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x13e7dd;}_0x383e9f[_0xa02786([0x6d,0x6f,0x64,0x65,0x6c])][_0xa02786([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x13e7dd,_0x383e9f[_0xa02786([0x6d,0x6f,0x64,0x65,0x6c])][_0xa02786([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x13e7dd,_0x383e9f[_0xa02786([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xa02786([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2127b3(){return _0x2a415d(_0xa02786([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x389cfd(_0xa02786([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xa02786([0x73,0x74,0x61,0x74,0x65])]==_0xa02786([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x22959f(){return _0x2a415d(_0xa02786([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 _0x47201c(){return _0x2a415d(_0xa02786([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xa07b0(_0x12974f){const _0x3fccad=_0xf1dfe0();_0x383e9f[_0x3fccad]=_0xa02786([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])+_0x12974f,_0x12974f[_0xa02786([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0xa02786([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0xf1dfe0()]=_0x5ae981),_0x12974f!=_0xa02786([0x56,0x61,0x6c,0x69,0x64])&&_0x28938d();}function _0xf1dfe0(){const _0x38e711=window[_0xa02786([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xa02786([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xa02786([0x6e,0x6f,0x77])]())[_0xa02786([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xa02786([0x2e]),'');let _0x1b0b99=_0xa02786([0x52]);for(let _0x223c6e=0x0;_0x223c6e<_0x38e711[_0xa02786([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x223c6e+=0x2){let _0x78b4da=window[_0xa02786([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x38e711[_0xa02786([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x223c6e,_0x223c6e+0x2));_0x78b4da>=_0x5c5ef6[_0xa02786([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x78b4da-=_0x5c5ef6[_0xa02786([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1b0b99+=_0x5c5ef6[_0x78b4da];}return _0x1b0b99;}function _0x36c935(){const _0x2b7b1b=_0x10e16b[_0xa02786([0x73,0x70,0x6c,0x69,0x74])](_0xa02786([0x2e]));if(0x3!=_0x2b7b1b[_0xa02786([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xac36b1(_0x2b7b1b[0x1]);function _0xac36b1(_0x3c0494){const _0x36c0bc=_0x36219c(_0x3c0494);return _0x36c0bc&&_0x38fa3e()?_0x36c0bc:null;function _0x38fa3e(){const _0x4e4ba6=_0x36c0bc[_0xa02786([0x6a,0x74,0x69])],_0x13dcd5=window[_0xa02786([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e4ba6[_0xa02786([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4e4ba6[_0xa02786([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x20ba36={..._0x36c0bc,[_0xa02786([0x6a,0x74,0x69])]:_0x4e4ba6[_0xa02786([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4e4ba6[_0xa02786([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x20ba36[_0xa02786([0x76,0x63])],_0x7734c2(_0x20ba36)==_0x13dcd5;}}}async function _0x576e38(){let _0x533ef3=!0x0;try{const _0x29a2b6=_0x10e16b[_0xa02786([0x73,0x70,0x6c,0x69,0x74])](_0xa02786([0x2e])),[_0x53df8b,_0x226974,_0x53b44b]=_0x29a2b6;return _0x37f30e(_0x53df8b),await _0x42cccc(_0x53df8b,_0x226974,_0x53b44b),_0x533ef3;}catch(_0x561a7d){return!0x1;}function _0x37f30e(_0x282c1d){const _0x38a89e=_0x36219c(_0x282c1d);_0x38a89e&&_0x38a89e[_0xa02786([0x61,0x6c,0x67])]==_0xa02786([0x45,0x53,0x32,0x35,0x36])||(_0x533ef3=!0x1);}async function _0x42cccc(_0x7c4482,_0x5dd74b,_0x43b510){const _0x42b28d=window[_0xa02786([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xa02786([0x66,0x72,0x6f,0x6d])](_0x27c690(_0x43b510),_0x4a9a3b=>_0x4a9a3b[_0xa02786([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3a8030=new window[(_0xa02786([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xa02786([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x7c4482+_0xa02786([0x2e])+_0x5dd74b),_0x206d55=window[_0xa02786([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xa02786([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x206d55)return;const _0xd87c1e=await _0x206d55[_0xa02786([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xa02786([0x6a,0x77,0x6b]),_0x58931c,{[_0xa02786([0x6e,0x61,0x6d,0x65])]:_0xa02786([0x45,0x43,0x44,0x53,0x41]),[_0xa02786([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xa02786([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xa02786([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x206d55[_0xa02786([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xa02786([0x6e,0x61,0x6d,0x65])]:_0xa02786([0x45,0x43,0x44,0x53,0x41]),[_0xa02786([0x68,0x61,0x73,0x68])]:{[_0xa02786([0x6e,0x61,0x6d,0x65])]:_0xa02786([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xd87c1e,_0x42b28d,_0x3a8030)||(_0x533ef3=!0x1);}}function _0x36219c(_0x2eb5d4){return _0x2eb5d4[_0xa02786([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xa02786([0x65,0x79]))?JSON[_0xa02786([0x70,0x61,0x72,0x73,0x65])](_0x27c690(_0x2eb5d4)):null;}function _0x27c690(_0x503e08){return window[_0xa02786([0x61,0x74,0x6f,0x62])](_0x503e08[_0xa02786([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xa02786([0x2b]))[_0xa02786([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xa02786([0x2f])));}function _0x7734c2(_0x2f6c1e){let _0x131bb4=0x1505;function _0x5c623a(_0x8b29a0){for(let _0x4e7a57=0x0;_0x4e7a57<_0x8b29a0[_0xa02786([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4e7a57++){const _0x5bbf73=_0x8b29a0[_0xa02786([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4e7a57);_0x131bb4=(_0x131bb4<<0x5)+_0x131bb4+_0x5bbf73,_0x131bb4&=_0x131bb4;}}function _0x4a8401(_0x251294){Array[_0xa02786([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x251294)?_0x251294[_0xa02786([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4a8401):_0x251294&&typeof _0x251294==_0xa02786([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xa02786([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x251294)[_0xa02786([0x73,0x6f,0x72,0x74])]()[_0xa02786([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x346afc,_0x272069])=>{_0x5c623a(_0x346afc),_0x4a8401(_0x272069);}):_0x5c623a(window[_0xa02786([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x251294));}return _0x4a8401(_0x2f6c1e),_0x131bb4>>>0x0;}function _0x389a35(_0x3ad44c){return _0x3ad44c[_0xa02786([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xa02786([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xa02786([0x30]));}function _0x3f52e9(_0x43f53b){return _0x43f53b[_0xa02786([0x73,0x70,0x6c,0x69,0x74])]('')[_0xa02786([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xa02786([0x6a,0x6f,0x69,0x6e])]('');}function _0x2a415d(_0x5c36bb){return _0x383e9f[_0xa02786([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xa02786([0x68,0x61,0x73])](_0x5c36bb);}function _0x389cfd(_0x196b40){return _0x383e9f[_0xa02786([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xa02786([0x67,0x65,0x74])](_0x196b40);}function _0x13e7dd(){}function _0xa02786(_0x2b55a7){return _0x2b55a7['map'](_0x16f413=>String['fromCharCode'](_0x16f413))['join']('');}_0xa07b0(await _0x48f53e());}(this);}['createRevision'](_0x169e61){const _0x17fd73=this['editor']['plugins']['get']('Users');return new a({'id':_0x169e61['id'],'name':_0x169e61['name'],'creator':_0x169e61['creatorId']?_0x17fd73['getUser'](_0x169e61['creatorId']):null,'diffData':_0x169e61['diffData']||_0x169e61['data'],'authors':_0x169e61['authorsIds']['map'](_0x1bd6a7=>_0x17fd73['getUser'](_0x1bd6a7)),'createdAt':new Date(_0x169e61['createdAt']),'attributes':_0x169e61['attributes'],'fromVersion':_0x169e61['fromVersion'],'toVersion':_0x169e61['toVersion']});}['addRevision'](_0x31494b,_0x488ea3=0x0){this['_revisions']['add'](_0x31494b,_0x488ea3);}['getRevision'](_0x1726c9){return this['_revisions']['get'](_0x1726c9);}['getRevisions'](_0x34b3b7={'toJSON':!0x1}){const _0xc42f6a=Array['from'](this['_revisions']);return _0xc42f6a['reverse'](),_0x34b3b7['toJSON']?_0xc42f6a['map'](_0x30e79d=>_0x30e79d['toJSON']()):_0xc42f6a;}['getIndex'](_0xb3c1c2){return this['_revisions']['getIndex'](_0xb3c1c2);}['getEarlierVisibleRevision'](_0x5cf87e){const [,_0x14fcab]=this['getRevisionsIterator'](_0x5cf87e,{'direction':'earlier'});return _0x14fcab;}['getLaterVisibleRevision'](_0xa4b5c3){const [,_0x1eb509]=this['getRevisionsIterator'](_0xa4b5c3,{'direction':'later'});return _0x1eb509;}['getRevisionsInDiff'](_0x230468){const _0x270e3b=[];for(const _0x3e11b1 of this['getRevisionsIterator'](_0x230468['newRevisionId']))if(_0x270e3b['push'](_0x3e11b1),_0x3e11b1['id']===_0x230468['oldRevisionId'])break;return _0x270e3b;}*['getRevisionsIterator'](_0xfa9099,{direction:_0x22abd0='earlier',filter:_0x4289fe=()=>!0x0}={}){const _0x313603='earlier'===_0x22abd0?0x1:-0x1;let _0xf16bca=this['_revisions']['get'](_0xfa9099),_0x2bb590=this['getIndex'](_0xf16bca);for(yield _0xf16bca;_0xf16bca;){if(_0x2bb590+=_0x313603,_0xf16bca=this['getRevision'](_0x2bb590),!_0xf16bca)return;_0x4289fe(_0xf16bca)&&(yield _0xf16bca);}}}function m(_0x191c2b,_0x41a56b,_0x4ccb37){const t=_0x191c2b['t'];switch(_0x41a56b){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'},_0x4ccb37);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x4ccb37);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':_0x5d5f8c,'a':_0x16e4b8,'e':_0x1d4908,'r':_0x1a9b91,'u':_0x2f209d};class l extends _0x43da28{['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[_0x23463a,j,_0x16d7d1];}constructor(_0x52c209){super(_0x52c209),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 _0x2a28b6=_0x4f9af2();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2a28b6},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 _0x49d3ba=this['repository']['getRevision'](0x0),_0x29ffa4=_0x49d3ba&&null===_0x49d3ba['creator']?_0x49d3ba:null;if(this['_continueCurrentRevision']=!!_0x29ffa4&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x1f9530=this['_source']['getCurrentRevisionId'](),_0x3bb957=this['repository']['getRevision'](_0x1f9530);if(_0x3bb957)this['_startingVersion']=_0x3bb957['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x12665d=this['_source']['history']['_operations']['find'](_0x23514a=>!_0x23514a['_isInit']),_0x3a0b10=_0x12665d?_0x12665d['baseVersion']:this['_source']['history']['version'];_0x49d3ba?(_0x49d3ba['toVersion']<_0x3a0b10&&_0x49d3ba['_update']({'toVersion':_0x3a0b10}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x29ffa4['id'],this['_startingVersion']=_0x29ffa4['fromVersion']):(this['_startingVersion']=_0x49d3ba['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3a0b10,this['_continueCurrentRevision']=!0x1);}}else _0x29ffa4&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x29ffa4['toVersion'],this['editor']['model']['document']['history']['version']),_0x29ffa4['fromVersion']===_0x29ffa4['toVersion']?(0x0!==_0x29ffa4['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x29ffa4['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x29ffa4['id'],this['_startingVersion']=_0x29ffa4['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',_0x5f55f0=>!_0x5f55f0),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x58513a=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x299cd2;for(const _0x57be5f in _0x58513a){const _0x25b49e=_0x57be5f,_0x35a988=_0x58513a[_0x25b49e];if('revisionHistoryLicenseKeyValid'==_0x35a988||'revisionHistoryLicenseKeyInvalid'==_0x35a988||'revisionHistoryLicenseKeyExpired'==_0x35a988||'revisionHistoryLicenseKeyDomainLimit'==_0x35a988||'revisionHistoryLicenseKeyNotAllowed'==_0x35a988||'revisionHistoryLicenseKeyEvaluationLimit'==_0x35a988||'revisionHistoryLicenseKeyTrialLimit'==_0x35a988||'revisionHistoryLicenseKeyUsageLimit'==_0x35a988){delete _0x58513a[_0x25b49e],_0x299cd2=_0x35a988,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x299cd2&&_0x58513a['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x299cd2&&_0x58513a['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x299cd2&&_0x58513a['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x299cd2&&_0x58513a['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x299cd2&&_0x58513a['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x299cd2&&_0x58513a['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x299cd2&&_0x58513a['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x25034f=this['repository']['getRevision'](0x0),_0x4ea1e0=await this['getRevisionDocumentData'](_0x25034f),_0x3f86c8=await this['getRevisionRootsAttributes'](_0x25034f);this['_replaceEditorDataWithRevisionData'](_0x4ea1e0,_0x3f86c8);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2d7b2c){this['_source']=_0x2d7b2c;}async['update'](){const _0x3d3071=await this['_source']['getLatestVersion']();if(_0x3d3071>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3803a2=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x3d3071});_0x3803a2['authors']=_0x3803a2['authorsIds']['map'](_0x3cdfdc=>this['editor']['plugins']['get']('Users')['getUser'](_0x3cdfdc)),this['currentRevision']['_update'](_0x3803a2);}}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'](_0x149537={},_0x448714=null){const _0x42b090=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x448714>this['currentRevision']['toVersion']&&(_0x448714=null),null===_0x448714&&(_0x448714=await this['_source']['getLatestVersion']());const _0x24a0f9=this['_getFromVersion'](_0x448714),_0x29c284=this['buildRevisionData']({'from':_0x24a0f9,'to':_0x448714});if(this['currentRevision']['toVersion']<_0x448714){const _0x57e46a=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x448714,'to':_0x448714});_0x57e46a['authors']=[],_0x57e46a['authorsIds']=[],_0x57e46a['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x57e46a,!0x0),delete _0x57e46a['authors'],_0x42b090['push'](_0x57e46a);}_0x149537['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x149537['name']=_0x149537['name']||null,_0x149537['id']=_0x149537['id']||_0x4f9af2(),_0x149537={..._0x149537,..._0x29c284};const _0xd4fa90=this['addRevisionData'](_0x149537);_0x42b090['push'](_0x149537);const _0x4e0d09=this['repository']['getIndex'](_0xd4fa90);if(0x0!==_0x4e0d09){const _0x21e32f=this['repository']['getRevision'](_0x4e0d09-0x1);if(_0x21e32f['fromVersion']!==_0x448714){const _0x3187e9=this['_revisionDataBuilder']['getData'](_0x448714,_0x21e32f['toVersion']),_0x182e6e={'id':_0x21e32f['id'],'diffData':_0x3187e9['diffData'],'authorsIds':_0x3187e9['authorsIds'],'authors':_0x3187e9['authorsIds']['map'](_0x42c807=>this['editor']['plugins']['get']('Users')['getUser'](_0x42c807)),'fromVersion':_0x448714};_0x21e32f===this['currentRevision']&&(_0x182e6e['createdAt']=new Date(_0x149537['createdAt']['getTime']()+0xa)),_0x21e32f['_update'](_0x182e6e,!0x0),delete _0x182e6e['authors'],_0x42b090['push'](_0x182e6e);}}if(this['adapter']){for(const _0xac28d1 of _0x42b090)this['_bufferUpdate'](_0xac28d1['id'],_0xac28d1,!0x0);this['sendBufferedUpdates']();}return _0xd4fa90;}['addRevisionData'](_0x2cec9e){const _0x4f81c1=this['repository']['createRevision'](_0x2cec9e);return this['adapter']&&_0x4f81c1['on']('_update',(_0x9fef52,_0x8f982,_0x1d5111)=>{_0x1d5111||(this['_bufferUpdate'](_0x8f982['id'],_0x8f982,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x4f81c1,this['_findInsertionIndex'](_0x4f81c1)),_0x4f81c1;}async['getRevisionDocumentData'](_0x40df97){await this['_loadRevisionData'](_0x40df97);const _0x29453d={};for(const _0x248194 in _0x40df97['diffData']){if(_0x40df97['diffData'][_0x248194]['attachChange']&&!_0x40df97['diffData'][_0x248194]['attachChange']['isAttached'])continue;const _0x182135=this['_removeRevisionMarkers'](JSON['parse'](_0x40df97['diffData'][_0x248194]['insertions'])),_0x46a0df=this['editor']['editing']['view']['document'],_0x57fffd=new _0x49a981(_0x46a0df,_0x182135['map'](_0x12b752=>C(_0x12b752,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x29453d[_0x248194]=this['editor']['data']['processor']['toData'](_0x57fffd),this['editor']['data']['processor']['useFillerType']('default');}return _0x29453d;}async['getRevisionRootsAttributes'](_0x585e52){await this['_loadRevisionData'](_0x585e52);const _0x522174={};for(const _0x1ae0d6 in _0x585e52['diffData'])_0x585e52['diffData'][_0x1ae0d6]['attachChange']&&!_0x585e52['diffData'][_0x1ae0d6]['attachChange']['isAttached']||(_0x522174[_0x1ae0d6]=_0x585e52['diffData'][_0x1ae0d6]['attributesAfter']||{});return _0x522174;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2d0ec4=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x37b76b=0x0;_0x37b76b<_0x2d0ec4['length'];_0x37b76b++){const _0x6dfb02=_0x2d0ec4[_0x37b76b];let _0x4fff3c=!0x1;for(const _0x469ebe of Object['keys'](_0x6dfb02))void 0x0===_0x6dfb02[_0x469ebe]?delete _0x6dfb02[_0x469ebe]:'id'!==_0x469ebe&&(_0x4fff3c=!0x0);_0x4fff3c||(_0x2d0ec4[_0x37b76b]=null);}if(_0x2d0ec4=_0x2d0ec4['filter'](_0x287636=>null!==_0x287636),!_0x2d0ec4['length'])return;for(let _0x212403=0x0;_0x212403<_0x2d0ec4['length'];_0x212403++){const _0x4a426e=_0x2d0ec4[_0x212403];void 0x0!==_0x4a426e['fromVersion']&&void 0x0===_0x4a426e['toVersion']&&(_0x4a426e['toVersion']=this['repository']['getRevision'](_0x4a426e['id'])['toVersion']),void 0x0!==_0x4a426e['toVersion']&&void 0x0===_0x4a426e['fromVersion']&&(_0x4a426e['fromVersion']=this['repository']['getRevision'](_0x4a426e['id'])['fromVersion']);}const _0xa5f75c=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2d0ec4,_0xa5f75c)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x36c33c=>{if(_0x36c33c){for(const _0x539758 of _0x36c33c)this['setRevisionData']({'id':_0x539758['id'],'createdAt':_0x539758['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x3de184,_0x18cbe5){let _0x2ba85c=this['editor']['config']['get']('initialData'),_0x27d034=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x2ba85c){_0x2ba85c={};for(const _0x505ea4 of this['editor']['model']['document']['getRootNames']())_0x2ba85c[_0x505ea4]='';}if('string'==typeof _0x2ba85c&&(_0x2ba85c={'main':_0x2ba85c}),void 0x0===_0x27d034){_0x27d034={};for(const _0x889076 of this['editor']['model']['document']['getRootNames']())_0x27d034[_0x889076]={};}let _0x5ed8c5=!0x1;const _0x207006=Object['keys'](_0x2ba85c),_0xd2e133=Object['keys'](_0x3de184);for(const _0x50e5fd of _0x207006){if(_0x2ba85c[_0x50e5fd]!==_0x3de184[_0x50e5fd]&&''!==_0x2ba85c[_0x50e5fd]['trim']()){_0x5ed8c5=!0x0;break;}if(!_0x3c1054(_0x27d034[_0x50e5fd],_0x18cbe5[_0x50e5fd])&&Object['keys'](_0x27d034[_0x50e5fd])['length']>0x0){_0x5ed8c5=!0x0;break;}}_0x5ed8c5||(_0x5ed8c5=_0xd2e133['some'](_0x20bcc8=>!this['editor']['model']['document']['getRoot'](_0x20bcc8))),_0x5ed8c5&&_0x13d2e1('editor-initial-data-replaced-with-revision-data',{'editorData':_0x2ba85c,'editorRootsAttributes':_0x27d034,'revisionData':_0x3de184,'revisionRootsAttributes':_0x18cbe5}),this['editor']['config']['set']('initialData',_0x3de184),this['editor']['config']['set']('rootsAttributes',_0x18cbe5);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x534f1a=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x534f1a['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x2f75cf){const _0x419fcb=this['repository']['getRevisions']();_0x419fcb['reverse']();let _0x5b7f17=0x0;for(;_0x5b7f17<_0x419fcb['length'];){const _0x5ea7fd=_0x419fcb[_0x5b7f17];if(_0x5ea7fd===this['currentRevision']){_0x5b7f17++;continue;}if(_0x5ea7fd['id']===this['_initialRevisionId'])break;const _0x3e7570=_0x2f75cf['toVersion']-_0x5ea7fd['toVersion']||_0x2f75cf['fromVersion']-_0x5ea7fd['fromVersion'];if(_0x3e7570>0x0)break;if(_0x3e7570<0x0)_0x5b7f17++;else{if(!_0x2f75cf['creator']&&_0x5ea7fd['creator'])break;if(_0x5ea7fd['creator']||!_0x2f75cf['creator']){if(_0x2f75cf['createdAt']>_0x5ea7fd['createdAt'])break;_0x5b7f17++;}else _0x5b7f17++;}}return _0x5b7f17;}['setRevisionData'](_0x29b603){const _0x45c2ab=this['repository']['getRevision'](_0x29b603['id']);if(_0x29b603['createdAt']&&(_0x29b603['createdAt']=new Date(_0x29b603['createdAt'])),_0x29b603['authorsIds']){const _0x1a8940=this['editor']['plugins']['get']('Users');_0x29b603['authors']=_0x29b603['authorsIds']['map'](_0x218e4f=>_0x1a8940['getUser'](_0x218e4f));}_0x45c2ab['_update'](_0x29b603,!0x0);}['buildRevisionData']({revision:_0x19668d=null,from:_0x5f1e71=null,to:_0x7ef145=null}){_0x5f1e71=null!==_0x5f1e71?_0x5f1e71:_0x19668d['fromVersion'],_0x7ef145=null!==_0x7ef145?_0x7ef145:_0x19668d['toVersion'];const _0x5303a4=this['_revisionDataBuilder']['getData'](_0x5f1e71,_0x7ef145),_0x143773={'diffData':_0x5303a4['diffData'],'authorsIds':_0x5303a4['authorsIds'],'fromVersion':_0x5f1e71,'toVersion':_0x7ef145};if(!_0x19668d||_0x7ef145!==_0x19668d['toVersion']){const _0x5595ce=_0x7ef145-0x1,_0x547ec5=this['_source']['history']['getOperation'](_0x5595ce);_0x143773['createdAt']=_0x547ec5&&_0x547ec5['createdAt']||new Date();}if(this['_loadedStateData']&&_0x5f1e71===this['_loadedStateData']['fromVersion']){for(const _0x13a80a of this['_loadedStateData']['authors'])_0x143773['authorsIds']['includes'](_0x13a80a['id'])||_0x143773['authorsIds']['push'](_0x13a80a['id']);}return _0x143773;}['_loadRevisionData'](_0x4e7176){if(!_0x4e7176||_0x4e7176['diffData'])return Promise['resolve']();{const _0x12ff2f=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x12ff2f,'revisionId':_0x4e7176['id']})['then'](_0x1f095f=>{_0x4e7176['diffData']=_0x1f095f['diffData'];});}}['_bufferUpdate'](_0x55b605,_0xbbbb16,_0x5ca42e){if(this['_bufferedUpdates']['has'](_0x55b605)){const _0x580ae4=this['_bufferedUpdates']['get'](_0x55b605);_0xbbbb16=_0x5ca42e?{..._0x580ae4,..._0xbbbb16}:{..._0xbbbb16,..._0x580ae4};}this['_bufferedUpdates']['set'](_0x55b605,_0xbbbb16);}['_getFromVersion'](_0x439904){const _0x6bd6a7=this['repository']['getRevisions']();_0x6bd6a7['reverse'](),_0x6bd6a7['shift']();const _0x36365e=_0x6bd6a7['find'](_0x5916ea=>_0x5916ea['toVersion']<=_0x439904)['toVersion'];return _0x36365e<this['_startingVersion']?this['_startingVersion']:_0x36365e;}['_createInitialRevision'](_0x481ba2){const _0x541471=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x541471)this['_initialRevisionId']=_0x541471['id'];else{const _0x1ab675=!this['editor']['model']['document']['roots']['find'](_0x231645=>this['editor']['model']['hasContent'](_0x231645)),_0x2ba3f8=this['editor']['plugins']['get']('Users')['me']['id'],_0x3d4fd5=m(this['editor']['locale'],_0x1ab675?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x481ba2,'to':_0x481ba2,'id':this['_initialRevisionId'],'name':_0x3d4fd5,'creatorId':_0x2ba3f8});}}['_createCurrentRevision'](_0x990004){const _0x5d22db=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x5d22db),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x990004,'to':_0x990004,'id':_0x5d22db,'name':'','creatorId':null}));}['_makeRevision']({name:_0x4e3bb2,from:_0x19de54,to:_0x587b83,creatorId:_0x445550,id:_0x4b64ea}){const _0x5b9cec=this['buildRevisionData']({'from':_0x19de54,'to':_0x587b83});_0x5b9cec['name']=_0x4e3bb2,_0x5b9cec['creatorId']=_0x445550,_0x5b9cec['id']=_0x4b64ea;const _0x309601=this['addRevisionData'](_0x5b9cec);return this['adapter']&&this['_bufferUpdate'](_0x5b9cec['id'],_0x5b9cec,!0x0),_0x309601;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0xd5c0f4){return(_0xd5c0f4=_0xd5c0f4['filter'](_0x22c619=>!_0x22c619['name']||'revision-start'!==_0x22c619['name']&&'revision-end'!==_0x22c619['name']))['forEach'](_0x134982=>{'string'!=typeof _0x134982&&(_0x134982['children']=this['_removeRevisionMarkers'](_0x134982['children']),_0x134982['attributes']=_0x134982['attributes']['filter'](_0x2e6c37=>!_0x2e6c37[0x0]['startsWith']('data-revision-')));}),_0xd5c0f4;}}function C(_0x3036fd,_0x49cddb){const _0x2ca4ce=_0x49cddb['editing']['view']['document'];if('string'==typeof _0x3036fd)return new _0x1b3fed(_0x2ca4ce,_0x3036fd);{const _0x265f7d=_0x3036fd['children']['map'](_0x544127=>C(_0x544127,_0x49cddb));return new(P[_0x3036fd['type']]||_0x373d7e)(_0x2ca4ce,_0x3036fd['name'],_0x3036fd['attributes'],_0x265f7d);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x58f4c5){this['editor']=_0x58f4c5,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'](_0x5be302){this['source']=_0x5be302;const _0x49097a=new Map(),_0x24bd9d=new Map(),_0x23b4ef=this['editor']['model']['document']['roots']['map'](_0xfad8b3=>_0xfad8b3['rootName']);for(const _0xb68421 of _0x23b4ef){const _0x1d41b0=this['editor']['model']['document']['getRoot'](_0xb68421),_0x251a85=T(_0x1d41b0);_0x49097a['set'](_0xb68421,_0x251a85),_0x24bd9d['set'](_0xb68421,Object['fromEntries'](_0x1d41b0['getAttributes']()));}const _0x33cc6b=Array['from'](this['editor']['model']['markers'])['map'](_0x570931=>[_0x570931['name'],_0x570931['getRange']()]),_0x151378=this['source']['version'];this['_saveMetaData'](_0x151378,_0x49097a,_0x33cc6b,_0x24bd9d),this['_startingRevisionId']=this['_revisionId'];const _0x5b13c8=new Map(),_0xb9e5bd=new Map();for(const _0x5d104a of _0x23b4ef){const _0x711d61=F(_0x5d104a);_0x5b13c8['set'](_0x5d104a,_0x711d61),_0xb9e5bd['set'](_0x5d104a,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5b13c8,[],_0xb9e5bd);}['getData'](_0x4a6550,_0x2b6395){if(this['_lastFrom']===_0x4a6550&&this['_lastTo']<=_0x2b6395)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2b6395,!0x0);else{if(!this['_savedMetaData']['has'](_0x4a6550)){const _0x406bbe=this['_getPreviousFrom'](_0x4a6550);this['_calculateMetaData'](_0x406bbe,_0x4a6550,!0x1);}this['_calculateMetaData'](_0x4a6550,_0x2b6395,!0x0);}return this['_lastFrom']=_0x4a6550,this['_lastTo']=_0x2b6395,this['_getState']();}['loadState'](_0x1bf6e4){this['_reset'](),this['_lastFrom']=_0x1bf6e4['fromVersion'],this['_lastTo']=_0x1bf6e4['toVersion'];for(const _0xfaa4a in _0x1bf6e4['diffData']){const _0x32c141=_0x1bf6e4['diffData'][_0xfaa4a]['attachChange'],_0x3757dd=_0x456193(_0x1bf6e4['diffData'][_0xfaa4a]['attributesBefore'])||{},_0x1f39b8=this['_makeModelFromViewString'](_0x1bf6e4['diffData'][_0xfaa4a]['deletions']);_0x1f39b8['rootName']=_0xfaa4a,_0x1f39b8['_isAttached']=!_0x32c141||!_0x32c141['isAttached'],_0x1f39b8['isAttached']=()=>_0x1f39b8['_isAttached'],this['_baseRoots']['set'](_0xfaa4a,_0x1f39b8),this['_baseRootsAttributes']['set'](_0xfaa4a,_0x3757dd),_0x32c141&&this['_touchedRoots']['set'](_0xfaa4a,_0x32c141);const _0xed15aa=this['_makeIdsRoot'](_0x1f39b8);this['_baseIdsRoots']['set'](_0xfaa4a,_0xed15aa);for(const [_0x5dbc59,_0x562ef2]of _0x1f39b8['markers']){if(!_0x5dbc59['startsWith']('revision:'))continue;const _0x176d58=_0x5dbc59['split'](':')[0x2];for(const _0x462502 of _0x562ef2['getWalker']({'singleCharacters':!0x0})){const _0x511db8=this['_getVidAttributeName'](_0x462502),_0x1005ef='elementEnd'==_0x462502['type']?_0x462502['previousPosition']['path']['slice'](0x0,-0x1):_0x462502['previousPosition']['path'],_0x3b201f=_0xed15aa['getNodeByPath'](_0x1005ef)['getAttribute'](_0x511db8);this['_touched']['set'](_0x3b201f,{'userId':_0x176d58});}}}this['_startingRevisionId']=this['_revisionId'];const _0x3cad93=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x38659a=>!this['_touched']['has'](_0x38659a));let _0x537792=0x0;const _0x1fed9b=new Map();for(const _0xc126da in _0x1bf6e4['diffData']){const _0x38555f=_0x1bf6e4['diffData'][_0xc126da]['attachChange'],_0xdfaf69=_0x456193(_0x1bf6e4['diffData'][_0xc126da]['attributesAfter'])||{},_0x3d4261=this['_makeModelFromViewString'](_0x1bf6e4['diffData'][_0xc126da]['insertions']);_0x3d4261['rootName']=_0xc126da,_0x3d4261['_isAttached']=!_0x38555f||_0x38555f['isAttached'],_0x3d4261['isAttached']=()=>_0x3d4261['_isAttached'],this['_diffRoots']['set'](_0xc126da,_0x3d4261),this['_diffRootsAttributes']['set'](_0xc126da,_0xdfaf69);const _0x1a92c2=this['_makeIdsRoot'](_0x3d4261,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0xc126da,_0x1a92c2),_0x1fed9b['set'](_0xc126da,_0x3d4261['isAttached']()?_0xdfaf69:{});for(const [_0x155d75,_0x4d2623]of _0x3d4261['markers']){if(!_0x155d75['startsWith']('revision:'))continue;const _0x4e3153=_0x155d75['split'](':')[0x2];for(const _0x345b93 of _0x4d2623['getWalker']({'singleCharacters':!0x0})){const _0x1adc2b=this['_getVidAttributeName'](_0x345b93),_0x10660e=this['_revisionId']++,_0x10d22c='elementEnd'==_0x345b93['type']?_0x345b93['previousPosition']['path']['slice'](0x0,-0x1):_0x345b93['previousPosition']['path'];_0x1a92c2['getNodeByPath'](_0x10d22c)['_setAttribute'](_0x1adc2b,_0x10660e),this['_touched']['set'](_0x10660e,{'userId':_0x4e3153});}}for(const _0x53deeb of this['editor']['model']['createRangeIn'](_0x3d4261)['getWalker']({'singleCharacters':!0x0})){const _0x2860d1=this['_getVidAttributeName'](_0x53deeb),_0x402b98='elementEnd'==_0x53deeb['type']?_0x53deeb['previousPosition']['path']['slice'](0x0,-0x1):_0x53deeb['previousPosition']['path'],_0x39a0de=_0x1a92c2['getNodeByPath'](_0x402b98);_0x39a0de['getAttribute'](_0x2860d1)>0x0||_0x39a0de['_setAttribute'](_0x2860d1,_0x3cad93[_0x537792++]);}for(const [_0x65381d,_0x345f0a]of _0x3d4261['markers'])_0x65381d['startsWith']('revision:')||this['_markers']['set'](_0x65381d,_0x345f0a);}const _0xa3fa4e=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0xa3fa4e),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0xa3fa4e,0x1));const _0x24f6fc=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x24f6fc),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x24f6fc,0x1));const _0x38cc0b=Array['from'](this['_diffRoots'])['map'](([_0x3d1c14,_0x41b1ef])=>[_0x3d1c14,T(_0x41b1ef)]);this['_saveMetaData'](this['_lastTo'],_0x38cc0b,this['_markers'],_0x1fed9b);}['_makeModelFromViewString'](_0x25a953){const _0x1a1391=JSON['parse'](_0x25a953),_0xa999c9=this['editor']['editing']['view']['document'],_0x195de1=new _0x49a981(_0xa999c9,_0x1a1391['map'](_0xf74197=>C(_0xf74197,this['editor'])));return this['editor']['data']['toModel'](_0x195de1);}['_saveMetaData'](_0x3230ae,_0x2b291d,_0x37788d,_0x44e1a){const _0x20195e=new Map(_0x2b291d),_0x4ccde0=new Map(_0x456193(_0x44e1a)),_0x37486b=new Map();for(const [_0x21a21d,_0x4894b3]of _0x37788d)_0x37486b['set'](_0x21a21d,{'start':_0x4894b3['start']['clone'](),'end':_0x4894b3['end']['clone'](),'rootName':_0x4894b3['root']['rootName']});this['_savedMetaData']['set'](_0x3230ae,{'roots':_0x20195e,'markers':_0x37486b,'rootsAttributes':_0x4ccde0});}['_removeMetaData'](_0x5385c7){this['_savedMetaData']['delete'](_0x5385c7);}['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'](_0x50aa86,_0x1b0e7d=null){let _0x284fdd=null;_0x50aa86['is']('documentFragment')||(_0x284fdd=new ft(_0x50aa86['name'],{'vid_start':null===_0x1b0e7d?this['_revisionId']++:_0x1b0e7d++}));const _0x589055=[];for(const _0x14aa79 of _0x50aa86['getChildren']())if(_0x14aa79['is']('element')){_0x589055['push'](this['_makeIdsRoot'](_0x14aa79,_0x1b0e7d));const _0x4a57b5=_0x589055[_0x589055['length']-0x1];null!==_0x1b0e7d&&(_0x1b0e7d=_0x4a57b5['is']('element','$text')?_0x4a57b5['getAttribute']('vid')+0x1:_0x4a57b5['getAttribute']('vid_end')+0x1);}else{for(let _0x34308c=0x0;_0x34308c<_0x14aa79['offsetSize'];_0x34308c++)_0x589055['push'](new ft('$text',{'vid':null===_0x1b0e7d?this['_revisionId']++:_0x1b0e7d++}));}if(_0x50aa86['is']('documentFragment')){const _0x1fbcfb=F(_0x50aa86['rootName']);return _0x1fbcfb['_insertChild'](0x0,_0x589055),_0x1fbcfb;}return _0x284fdd['_setAttribute']('vid_end',null===_0x1b0e7d?this['_revisionId']++:_0x1b0e7d++),_0x284fdd['_insertChild'](0x0,_0x589055),_0x284fdd;}['_calculateMetaData'](_0x54fb2e,_0x112a57,_0x18e542){this['_reset']();const {roots:_0x126ee1,markers:_0xc6d3ea,rootsAttributes:_0x217245}=this['_savedMetaData']['get'](_0x54fb2e);this['_baseRoots']=new Map(_0x126ee1),this['_baseRootsAttributes']=new Map(_0x456193(_0x217245));for(const [_0x5b3e5c,_0x5187c9]of this['_baseRoots'])if('$graveyard'!==_0x5b3e5c&&(this['_diffRoots']['set'](_0x5b3e5c,T(_0x5187c9)),this['_diffRootsAttributes']=new Map(_0x456193(_0x217245)),_0x18e542)){const _0x4e1239=this['_revisionId'];this['_idsRoots']['set'](_0x5b3e5c,this['_makeIdsRoot'](_0x5187c9)),this['_baseIdsRoots']['set'](_0x5b3e5c,this['_makeIdsRoot'](_0x5187c9,_0x4e1239));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x18e542&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x3bfd41,_0x4eaca1]of _0xc6d3ea){const _0x45a77e=this['_baseRoots']['get'](_0x4eaca1['rootName']),_0x270726=this['_diffRoots']['get'](_0x4eaca1['rootName']),_0x152d22=new vt(this['_fixPosition'](_0x4eaca1['start'],_0x45a77e),this['_fixPosition'](_0x4eaca1['end'],_0x45a77e)),_0x54ebf0=this['_fixRange'](_0x152d22,_0x270726);_0x45a77e['markers']['set'](_0x3bfd41,_0x152d22),this['_markers']['set'](_0x3bfd41,_0x54ebf0);}this['_applyOperations'](_0x54fb2e,_0x112a57,_0x18e542);}['_applyOperations'](_0x23407e,_0x3be804,_0x1e22b7){for(const _0x84f096 of this['source']['getOperations'](_0x23407e,_0x3be804))this['_handleOperation'](_0x84f096,_0x1e22b7);for(const _0x5bd66b of this['_diffRoots']['values']())_0x5bd66b['markers']['clear']();for(const [_0x250bc4,_0x29ed87]of this['_markers']){this['_diffRoots']['get'](_0x29ed87['root']['rootName'])['markers']['set'](_0x250bc4,_0x29ed87['clone']());}const _0x9c692f=new Map(),_0x28f800=new Map();for(const [_0x2bee05,_0x4c5acb]of this['_diffRoots'])_0x9c692f['set'](_0x2bee05,T(_0x4c5acb)),_0x28f800['set'](_0x2bee05,this['_diffRootsAttributes']['get'](_0x2bee05));this['_saveMetaData'](_0x3be804,_0x9c692f,this['_markers'],_0x28f800);}['_getPreviousFrom'](_0xaeb598){const _0xf416a4=Array['from'](this['_savedMetaData']['keys']());_0xf416a4['sort']((_0x49ca0e,_0x5ba6f0)=>_0x49ca0e-_0x5ba6f0),_0xf416a4['reverse']();for(const _0x3d161a of _0xf416a4)if(_0x3d161a<_0xaeb598)return _0x3d161a;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x54bf61,_0x42c59b){const _0x47b3fe=Array['from'](_0x42c59b['markers'])['map'](([_0x33e587,_0x38088a])=>[_0x33e587,this['_fixRange'](_0x38088a,_0x54bf61)]);_0x54bf61['markers']=new Map(_0x47b3fe);}['_transformMarkers'](_0x1b6e64){for(const _0x2c9500 of this['_markers']['values']()){const _0x42b3e4=_0x2c9500['getTransformedByOperation'](_0x1b6e64),_0xd1fa90=vt['_createFromRanges'](_0x42b3e4);_0x2c9500['start']=_0xd1fa90['start'],_0x2c9500['end']=_0xd1fa90['end'];}}['_handleOperation'](_0x2b9184,_0xfacf7b){if('addRoot'!=_0x2b9184['type']&&'detachRoot'!=_0x2b9184['type']){if('insert'==_0x2b9184['type']){const _0x57b8ea=_0x2b9184['position']['root']['rootName'];this['_diffRoots']['has'](_0x57b8ea)||(this['_diffRoots']['set'](_0x57b8ea,F(_0x57b8ea,!0x0)),this['_diffRootsAttributes']['set'](_0x57b8ea,{}),_0xfacf7b&&this['_idsRoots']['set'](_0x57b8ea,F(_0x57b8ea,!0x0)));}else{if('addRootAttribute'==_0x2b9184['type']||'removeRootAttribute'==_0x2b9184['type']||'changeRootAttribute'==_0x2b9184['type'])return void this['_handleRootAttributeOperation'](_0x2b9184);'marker'==_0x2b9184['type']&&this['_handleMarkerOperation'](_0x2b9184);}if('marker'!==_0x2b9184['type']){const _0x2f33d1=this['_cloneOperation'](_0x2b9184,this['_diffRoots']);_0x2f33d1['_execute'](),this['_transformMarkers'](_0x2f33d1);}if(_0xfacf7b)switch(_0x2b9184['type']){case'insert':this['_handleInsertOperation'](_0x2b9184);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x2b9184);break;case'merge':this['_handleMergeOperation'](_0x2b9184);break;case'split':this['_handleSplitOperation'](_0x2b9184);}}else this['_handleRootOperation'](_0x2b9184,_0xfacf7b);}['_cloneOperation'](_0x1363c4,_0x515808){const _0x3d845f=_0x1363c4['clone']();return _0x3d845f['_authorId']=_0x1363c4['_authorId'],this['_fixOperation'](_0x3d845f,_0x515808),_0x3d845f;}['_getBaseVids'](_0x542aa0){return _0x542aa0['map'](_0x2daf3e=>{const _0xccbcda=this['_getVidAttributeName'](_0x2daf3e);return Number(_0x2daf3e['item']['getAttribute'](_0xccbcda));});}['_generateTape'](_0x5291e1,_0x477779){if(_0x5291e1['is']('element','$text'))_0x477779['push']({'item':_0x5291e1,'type':'text'});else{_0x5291e1['is']('element')&&_0x477779['push']({'item':_0x5291e1,'type':'elementStart'});for(const _0x1d1505 of _0x5291e1['getChildren']())this['_generateTape'](_0x1d1505,_0x477779);_0x5291e1['is']('element')&&_0x477779['push']({'item':_0x5291e1,'type':'elementEnd'});}return _0x477779;}['_getState'](){const _0x73c819=new Map(this['_touched']),_0xc7943c=new Map(_0x73c819),_0x7f665=new Map(),_0x13ca3c={'insertions':{},'deletions':{}},_0x4aa093={'insertions':{},'deletions':{}},_0x3cce9a=new Map(),_0x44330b=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x44330b['delete']('$graveyard');for(const _0x41ff89 of _0x44330b){const _0x49e4b4=this['_diffRoots']['get'](_0x41ff89)||F(_0x41ff89,!0x1),_0x302da5=this['_baseRoots']['get'](_0x41ff89)||F(_0x41ff89,!0x1);_0x49e4b4['isAttached']()||_0x302da5['isAttached']()?(_0x13ca3c['insertions'][_0x41ff89]=T(_0x49e4b4),_0x13ca3c['deletions'][_0x41ff89]=T(_0x302da5),this['_copyMarkers'](_0x13ca3c['deletions'][_0x41ff89],_0x302da5),this['_copyMarkers'](_0x13ca3c['insertions'][_0x41ff89],_0x49e4b4),_0x4aa093['insertions'][_0x41ff89]=this['_generateTape'](this['_idsRoots']['get'](_0x41ff89),[]),_0x4aa093['deletions'][_0x41ff89]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x41ff89)||F(_0x41ff89,!0x1),[])):_0x44330b['delete'](_0x41ff89);}for(const _0x474b72 of _0x44330b){const _0x2e6363=_0x4aa093['insertions'][_0x474b72];for(const _0x436018 of _0x2e6363){const _0x5ebe39=this['_getVidAttributeName'](_0x436018),_0x2cb50c=_0x436018['item']['getAttribute'](_0x5ebe39);_0xc7943c['delete'](_0x2cb50c),_0x2cb50c>=this['_startingRevisionId']&&_0x7f665['set'](_0x2cb50c,_0x73c819['get'](_0x2cb50c));}}for(const _0x6fddba of _0x44330b){const _0x5e1a0c=_0x4aa093['insertions'][_0x6fddba],_0x3f0303=this['_getBaseVids'](_0x4aa093['deletions'][_0x6fddba]);let _0x89653d=0x0;for(const _0x5572c2 of _0x5e1a0c){const _0x7c5f06=this['_getVidAttributeName'](_0x5572c2),_0x90034e=_0x5572c2['item']['getAttribute'](_0x7c5f06);if(!_0x7f665['has'](_0x90034e)&&!_0x3cce9a['has'](_0x90034e)){if(_0xc7943c['has'](_0x90034e))_0x89653d++;else{if(_0x90034e!=_0x3f0303[_0x89653d]){const _0x45af14=_0x73c819['get'](_0x90034e)||_0x73c819['get'](_0x3f0303[_0x89653d]);for(;_0x90034e!=_0x3f0303[_0x89653d];)_0xc7943c['has'](_0x3f0303[_0x89653d])||(_0x3cce9a['set'](_0x3f0303[_0x89653d],_0x45af14),_0x73c819['set'](_0x3f0303[_0x89653d],_0x45af14)),_0x89653d++;}_0x89653d++;}}}}for(const _0x381d74 of _0x44330b){const _0x37afe4=_0x4aa093['insertions'][_0x381d74];for(const _0xf02565 of _0x37afe4){const _0x49c090=this['_getVidAttributeName'](_0xf02565),_0x33b6fc=_0xf02565['item']['getAttribute'](_0x49c090);if(_0x3cce9a['has'](_0x33b6fc)){const _0x59df8d=_0x3cce9a['get'](_0x33b6fc);_0xc7943c['has'](_0x33b6fc)||_0xc7943c['set'](_0x33b6fc,{..._0x59df8d}),_0x7f665['set'](_0x33b6fc,{..._0x59df8d});}}}for(const _0x1f6d2b of _0xc7943c['keys']())_0x1f6d2b>=this['_startingRevisionId']&&_0xc7943c['delete'](_0x1f6d2b);const _0x58e244=new Map();for(const _0x2beea9 of _0x44330b){let _0xb1e007=_0x4aa093['insertions'][_0x2beea9];for(const _0x55bedd of _0xb1e007)if(_0x55bedd['item']['is']('element','tableCell')){const _0x4aad83=this['_getVidAttributeName'](_0x55bedd),_0x58342b=_0x55bedd['item']['getAttribute'](_0x4aad83);if(_0x7f665['has'](_0x58342b)){const _0x474dde=_0x55bedd['item']['parent']['parent']['getAttribute']('vid_start'),_0x5d49c5=_0x58e244['get'](_0x474dde)||new Set();_0x5d49c5['add'](_0x7f665['get'](_0x58342b)['userId']),_0x58e244['set'](_0x474dde,_0x5d49c5);}}_0xb1e007=_0x4aa093['deletions'][_0x2beea9];for(const _0x3f69ec of _0xb1e007)if(_0x3f69ec['item']['is']('element','tableCell')){const _0x31e6d9=this['_getVidAttributeName'](_0x3f69ec),_0x29b048=_0x3f69ec['item']['getAttribute'](_0x31e6d9);if(_0xc7943c['has'](_0x29b048)){const _0xd8ad01=_0x3f69ec['item']['parent']['parent']['getAttribute']('vid_start'),_0x4e9431=_0x58e244['get'](_0xd8ad01)||new Set();_0x4e9431['add'](_0xc7943c['get'](_0x29b048)['userId']),_0x58e244['set'](_0xd8ad01,_0x4e9431);}}for(const _0x59de81 of _0x58e244['keys']())(_0x7f665['has'](_0x59de81)||_0xc7943c['has'](_0x59de81))&&_0x58e244['delete'](_0x59de81);}for(const _0x1927b2 of _0x44330b){const _0x44f33c=_0x4aa093['insertions'][_0x1927b2];let _0x29d35f=null,_0x6e0ce4=null;for(const _0x1e90a4 of _0x44f33c){const _0x260528=this['_getVidAttributeName'](_0x1e90a4),_0x5ea6a4=_0x1e90a4['item']['getAttribute'](_0x260528),_0x48c3c0=_0x58e244['get'](_0x5ea6a4);_0x48c3c0&&'elementStart'==_0x1e90a4['type']&&(_0x29d35f=Array['from'](_0x48c3c0)[0x0],_0x6e0ce4=_0x1e90a4['item']['getAttribute']('vid_end')),_0x29d35f&&(_0xc7943c['set'](_0x5ea6a4,{'userId':_0x29d35f}),_0x7f665['set'](_0x5ea6a4,{'userId':_0x29d35f})),_0x5ea6a4==_0x6e0ce4&&(_0x29d35f=null,_0x6e0ce4=null);}}const _0x58c39c={},_0x51cc3a=new Set();for(const _0x27a0c8 of _0x44330b){const _0x1cd4b1=_0x13ca3c['deletions'][_0x27a0c8],_0x39f84b=_0x13ca3c['insertions'][_0x27a0c8];for(const {userId:_0x344f90}of this['_touchedMarkers']['values']())null!==_0x344f90&&_0x51cc3a['add'](_0x344f90);for(const {userId:_0x4e61a7}of this['_touchedRoots']['values']())null!==_0x4e61a7&&_0x51cc3a['add'](_0x4e61a7);this['_markChanges'](_0x39f84b,_0x4aa093['insertions'][_0x27a0c8],_0x7f665,'insertion',_0x51cc3a),this['_markChanges'](_0x1cd4b1,_0x4aa093['deletions'][_0x27a0c8],_0xc7943c,'deletion',_0x51cc3a),_0x58c39c[_0x27a0c8]={'insertions':this['_prepareViewToSave'](_0x39f84b),'deletions':this['_prepareViewToSave'](_0x1cd4b1),'attachChange':this['_touchedRoots']['get'](_0x27a0c8)||null,'attributesBefore':_0x456193(this['_baseRootsAttributes']['get'](_0x27a0c8))||{},'attributesAfter':_0x456193(this['_diffRootsAttributes']['get'](_0x27a0c8))};}return{'diffData':_0x58c39c,'authorsIds':Array['from'](_0x51cc3a)};}['_processRootBeforeSave'](_0x1c450f){for(const [,_0x1485b6]of _0x1c450f['markers']){const _0x31820f=_0x1485b6['start']['getAncestors']()['filter'](_0xbe89cd=>'tableCell'==_0xbe89cd['name']);for(const _0x3835a0 of _0x31820f)0x1==_0x3835a0['childCount']&&_0x3835a0['getChild'](0x0)['is']('element','paragraph')&&_0x3835a0['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x585989){this['_processRootBeforeSave'](_0x585989);const _0xad7626=this['editor']['data']['toView'](_0x585989,{}),_0x46079d=Array['from'](_0xad7626['getChildren']())['map'](_0x2d43ba=>this['_getViewJson'](_0x2d43ba));return JSON['stringify'](_0x46079d);}['_getViewJson'](_0x3e4a3e){if(_0x3e4a3e['is']('$text'))return _0x3e4a3e['data'];{const _0x1f188f=_0x3e4a3e;return{'type':Object['keys'](P)['find'](_0x41bb4f=>_0x3e4a3e instanceof P[_0x41bb4f]),'name':_0x1f188f['name'],'attributes':Array['from'](_0x1f188f['getAttributes']()),'children':Array['from'](_0x1f188f['getChildren']())['map'](_0x55518e=>this['_getViewJson'](_0x55518e))};}}['_markChanges'](_0x497969,_0x221879,_0x4a3916,_0x4b5637,_0x4a9371){let _0x53650e=null,_0x58c196=null,_0x44fcab=0x0;const _0x3daa1b=this['editor']['model'];for(let _0x443bc6=0x0;_0x443bc6<_0x221879['length'];_0x443bc6++){const _0x8dee06=this['_getVidAttributeName'](_0x221879[_0x443bc6]),_0x4460b8=_0x221879[_0x443bc6]['item']['getAttribute'](_0x8dee06),_0x103899=_0x4a3916['get'](_0x4460b8),_0x5805b0=_0x443bc6==_0x221879['length']-0x1;(!_0x53650e&&_0x103899&&(_0x53650e=_0x103899,_0x58c196=_0x221879[_0x443bc6]),_0x53650e&&(!_0x103899||_0x103899['userId']!=_0x53650e['userId']))&&(_0x5b8c54(_0x103899,B(_0x58c196,_0x497969,_0x3daa1b),B(_0x221879[_0x443bc6],_0x497969,_0x3daa1b)),_0x53650e=_0x103899||null,_0x58c196=_0x103899?_0x221879[_0x443bc6]:null),_0x53650e&&_0x5805b0&&_0x5b8c54(_0x103899,B(_0x58c196,_0x497969,_0x3daa1b),J(_0x221879[_0x443bc6],_0x497969,_0x3daa1b));}function _0x5b8c54(_0x52f03c,_0x5e5a9c,_0x4bb19c){const _0xc01059=_0x53650e['userId'],_0x3eb94f='revision:'+_0x4b5637+':'+_0xc01059+':'+_0x44fcab++,_0xa8fcc8=_0x3daa1b['createRange'](_0x5e5a9c,_0x4bb19c);_0x497969['markers']['set'](_0x3eb94f,_0xa8fcc8),null!==_0xc01059&&_0x4a9371['add'](_0xc01059);}}['_getVidAttributeName'](_0x43eb5a){switch(_0x43eb5a['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x18fc3f,_0x33844d){_0x18fc3f['baseVersion']=null;for(const _0x2dc630 in _0x18fc3f){const _0xc37aec=_0x18fc3f[_0x2dc630];if(_0xc37aec instanceof gt){const _0x350351=_0x33844d['get'](_0xc37aec['root']['rootName']);_0x18fc3f[_0x2dc630]=this['_fixPosition'](_0xc37aec,_0x350351);}if(_0xc37aec instanceof vt){const _0xd4239=_0x33844d['get'](_0xc37aec['root']['rootName']);_0x18fc3f[_0x2dc630]=this['_fixRange'](_0xc37aec,_0xd4239);}'root'===_0x2dc630&&(_0x18fc3f['root']=_0x33844d['get'](_0x18fc3f['root']['rootName']));}}['_fixRange'](_0x52649d,_0x2fd1fc){return this['editor']['model']['createRange'](this['_fixPosition'](_0x52649d['start'],_0x2fd1fc),this['_fixPosition'](_0x52649d['end'],_0x2fd1fc));}['_fixPosition'](_0xf8a2e,_0x10b9ae){return this['editor']['model']['createPositionFromPath'](_0x10b9ae,_0xf8a2e['path'],_0xf8a2e['stickiness']);}['_handleInsertOperation'](_0x112f91){const _0x4fe63a=this['_idsRoots']['get'](_0x112f91['position']['root']['rootName']),_0x30faa4=this['_fixPosition'](_0x112f91['position'],_0x4fe63a),_0x247038=null===_0x112f91['_authorId']?null:_0x112f91['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4ece8d=_0x30faa4['parent'],_0x5847=this['_revisionId'],_0x354dad=[];for(const _0x48f41d of _0x112f91['nodes'])if(_0x48f41d['is']('element'))_0x354dad['push'](this['_makeIdsRoot'](_0x48f41d));else{for(let _0x61d443=0x0;_0x61d443<_0x48f41d['offsetSize'];_0x61d443++)_0x354dad['push'](new ft('$text',{'vid':this['_revisionId']++}));}const _0x132713=this['_revisionId'];for(let _0x15851f=_0x5847;_0x15851f<_0x132713;_0x15851f++)this['_touched']['set'](_0x15851f,{'userId':_0x247038});_0x4ece8d['_insertChild'](_0x30faa4['offset'],_0x354dad);}['_handleMoveOperation'](_0x54063b){(_0x54063b=this['_cloneOperation'](_0x54063b,this['_idsRoots']))['_execute']();const _0x38354e=null===_0x54063b['_authorId']?null:_0x54063b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x350b42=_0x54063b['getMovedRangeStart'](),_0x43c79e=_0x350b42['parent'],_0x52675c=_0x350b42['offset'];!function _0x44f7c9(_0x2cf5be,_0x4fb07a,_0x52269a,_0x203c72){for(let _0x94987d=_0x52269a;_0x94987d<_0x203c72;_0x94987d++){const _0x44cf7e=_0x4fb07a['getChild'](_0x94987d);_0x44cf7e['is']('element','$text')?_0x2cf5be['set'](_0x44cf7e['getAttribute']('vid'),{'userId':_0x38354e}):(_0x2cf5be['set'](_0x44cf7e['getAttribute']('vid_start'),{'userId':_0x38354e}),_0x44f7c9(_0x2cf5be,_0x44cf7e,0x0,_0x44cf7e['childCount']),_0x2cf5be['set'](_0x44cf7e['getAttribute']('vid_end'),{'userId':_0x38354e}));}}(this['_touched'],_0x43c79e,_0x52675c,_0x52675c+_0x54063b['howMany']);}['_handleMergeOperation'](_0x1ade0d){const _0x5d8691=null===(_0x1ade0d=this['_cloneOperation'](_0x1ade0d,this['_idsRoots']))['_authorId']?null:_0x1ade0d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x28d450=_0x1ade0d['targetPosition']['parent'],_0x289b23=_0x1ade0d['sourcePosition']['parent'],_0x32083b=_0x28d450['getAttribute']('vid_end'),_0x4cad62=_0x289b23['getAttribute']('vid_start');_0x28d450['_setAttribute']('vid_end',_0x289b23['getAttribute']('vid_end')),_0x289b23['_setAttribute']('vid_end',_0x32083b),this['_touched']['set'](_0x4cad62,{'userId':_0x5d8691}),this['_touched']['set'](_0x32083b,{'userId':_0x5d8691}),_0x1ade0d['_execute']();}['_handleSplitOperation'](_0x4abfa1){const _0x291a8b=null===(_0x4abfa1=this['_cloneOperation'](_0x4abfa1,this['_idsRoots']))['_authorId']?null:_0x4abfa1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x107b2c=_0x4abfa1['graveyardPosition'],_0x1c647e=_0x4abfa1['splitPosition']['parent'];_0x4abfa1['_execute']();const _0x1e0952=_0x1c647e['getAttribute']('vid_end'),_0x5e4b84=_0x4abfa1['insertionPosition']['nodeAfter'];if(_0x107b2c){const _0x5ba4d9=_0x5e4b84['getAttribute']('vid_end'),_0x3f6975=_0x1c647e['getAttribute']('vid_end');_0x1c647e['_setAttribute']('vid_end',_0x5ba4d9),_0x5e4b84['_setAttribute']('vid_end',_0x3f6975),this['_touched']['set'](_0x1c647e['getAttribute']('vid_end'),{'userId':_0x291a8b}),this['_touched']['set'](_0x5e4b84['getAttribute']('vid_start'),{'userId':_0x291a8b});}else{const _0x1e3cdc=this['_revisionId']++,_0x97f569=this['_revisionId']++;_0x1c647e['_setAttribute']('vid_end',_0x1e3cdc),_0x5e4b84['_setAttribute']('vid_start',_0x97f569),_0x5e4b84['_setAttribute']('vid_end',_0x1e0952),this['_touched']['set'](_0x1e3cdc,{'userId':_0x291a8b}),this['_touched']['set'](_0x97f569,{'userId':_0x291a8b});}}['_handleMarkerOperation'](_0x5e5fa4){if(!_0x5e5fa4['affectsData'])return;const _0x54db0b=(_0x5e5fa4=this['_cloneOperation'](_0x5e5fa4,this['_diffRoots']))['oldRange']?_0x5e5fa4['oldRange']['root']:null,_0x562f23=_0x5e5fa4['newRange']?_0x5e5fa4['newRange']['root']:null;_0x54db0b&&this['_markers']['delete'](_0x5e5fa4['name']),_0x562f23&&this['_markers']['set'](_0x5e5fa4['name'],_0x5e5fa4['newRange']['clone']());const _0x223845=null===_0x5e5fa4['_authorId']?null:_0x5e5fa4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x31d0a0=_0x5e5fa4['name'];if(!this['_touchedMarkers']['has'](_0x31d0a0))return void this['_touchedMarkers']['set'](_0x31d0a0,{'range':_0x5e5fa4['oldRange'],'userId':_0x223845});const _0x4f5862=this['_touchedMarkers']['get'](_0x31d0a0),_0x1b24a9=_0x4f5862['range'],_0xdf6dcb=_0x5e5fa4['newRange'];null==_0x1b24a9&&null==_0xdf6dcb||_0x1b24a9&&_0xdf6dcb&&_0x1b24a9['isEqual'](_0xdf6dcb)?this['_touchedMarkers']['delete'](_0x5e5fa4['name']):_0x4f5862['userId']=_0x223845;}['_handleRootOperation'](_0x1ea959,_0x19e591){this['_diffRoots']['has'](_0x1ea959['rootName'])?this['_diffRoots']['get'](_0x1ea959['rootName'])['_isAttached']=_0x1ea959['isAdd']:(this['_diffRoots']['set'](_0x1ea959['rootName'],F(_0x1ea959['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1ea959['rootName'],{}),_0x19e591&&this['_idsRoots']['set'](_0x1ea959['rootName'],F(_0x1ea959['rootName'],!0x0)));const _0x93437a=null===_0x1ea959['_authorId']?null:_0x1ea959['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1acd97=this['_touchedRoots']['get'](_0x1ea959['rootName']);_0x1acd97&&_0x1acd97['userId']===_0x93437a?this['_touchedRoots']['delete'](_0x1ea959['rootName']):this['_touchedRoots']['set'](_0x1ea959['rootName'],{'userId':_0x93437a,'isAttached':_0x1ea959['isAdd']});}['_handleRootAttributeOperation'](_0x5231c5){const _0x4e7727=this['_diffRootsAttributes']['get'](_0x5231c5['root']['rootName']);null===_0x5231c5['newValue']?delete _0x4e7727[_0x5231c5['key']]:_0x4e7727[_0x5231c5['key']]=_0x5231c5['newValue'];}}function T(_0x36d3c2){const _0x30122a=F(_0x36d3c2['rootName'],_0x36d3c2['isAttached']());for(const _0x485547 of _0x36d3c2['getChildren']()){const _0x555c9c=_0x485547['_clone'](!0x0);_0x30122a['_appendChild'](_0x555c9c);}return _0x30122a;}function F(_0xe2188d,_0x52771b=!0x0){const _0x19ef3e=new mt();return _0x19ef3e['rootName']=_0xe2188d,_0x19ef3e['_isAttached']=_0x52771b,_0x19ef3e['isAttached']=()=>_0x19ef3e['_isAttached'],_0x19ef3e;}function B(_0x27f21,_0xea8630,_0x86e021){const _0x5ec5b4='elementEnd'==_0x27f21['type']?_0x86e021['createPositionAt'](_0x27f21['item'],'end'):_0x86e021['createPositionBefore'](_0x27f21['item']);return _0x86e021['createPositionFromPath'](_0xea8630,_0x5ec5b4['path'],_0x5ec5b4['stickiness']);}function J(_0x5b4e17,_0x45f373,_0x53dbbc){const _0x56385c='elementStart'==_0x5b4e17['type']?_0x53dbbc['createPositionAt'](_0x5b4e17['item'],0x0):_0x53dbbc['createPositionAfter'](_0x5b4e17['item']);return _0x53dbbc['createPositionFromPath'](_0x45f373,_0x56385c['path'],_0x56385c['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x12e69d,_0x34cae6){super(_0x12e69d),this['focusTracker']=new _0x3d339c(),this['keystrokes']=new _0x43e4f7(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x34cae6),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x33abfc(this);}['render'](){super['render'](),_0x3c49f3({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x1434dd=_0x36d3fd=>_0x36d3fd['stopPropagation']();this['keystrokes']['set']('arrowright',_0x1434dd),this['keystrokes']['set']('arrowleft',_0x1434dd),this['keystrokes']['set']('arrowup',_0x1434dd),this['keystrokes']['set']('arrowdown',_0x1434dd);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x25484e){this['revisionNameInputView']['fieldView']['element']['value']=_0x25484e['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x39350a){const _0x283efd=new _0x3333b0(this['locale'],_0x380cb7),_0x1c801e=_0x283efd['fieldView'];_0x1c801e['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x9fb3c5=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x39350a&&(_0x9fb3c5+='\x20('+m(this['locale'],'optional')+')'),(_0x283efd['label']=_0x9fb3c5,_0x1c801e['on']('input',()=>{this['revisionNameInputValue']=_0x1c801e['element']['value']['trim']();}),_0x283efd);}}class u extends _0x43da28{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}['_saveRevisionFormView'];['init'](){const _0x4bf56f=this['editor'],_0x230fa3=_0x4bf56f['plugins']['get']('RevisionTracker');_0x4bf56f['ui']['componentFactory']['add']('revisionHistory',_0xf9ef1c=>{const _0x95cafb=_0x47471b(_0xf9ef1c),_0x7eb42e=_0x95cafb['panelView']['children'],_0x25d0c2=new _0x46bf10(_0xf9ef1c),_0x766ed0=new _0x3b0d83(_0xf9ef1c),_0x426f04=new te(_0xf9ef1c),_0x2810fe=new _0x3b0d83(_0xf9ef1c),_0x58e10d=new te(_0xf9ef1c);return _0x95cafb['bind']('isEnabled')['to'](_0x230fa3,'isReady',_0x230fa3,'isEnabled',_0x4bf56f,'isReadOnly',(_0x54d112,_0x4b7b8d,_0x7bb95e)=>_0x54d112&&_0x4b7b8d&&!_0x7bb95e),_0x95cafb['buttonView']['set']({'icon':_0x5b095b['history'],'label':m(_0xf9ef1c,'Revision\x20history'),'tooltip':!0x0}),_0x426f04['set']({'label':m(_0xf9ef1c,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x426f04['bind']('isEnabled')['to'](_0x230fa3,'isReady',_0x230fa3,'isEnabled',_0x4bf56f,'isReadOnly',(_0x595d20,_0x1ebdae,_0x5e0153)=>_0x595d20&&_0x1ebdae&&!_0x5e0153),_0x426f04['on']('execute',()=>this['_showDialog']()),_0x58e10d['set']({'label':m(_0xf9ef1c,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x58e10d['bind']('isEnabled')['to'](_0x230fa3,'isReady',_0x4bf56f,'isReadOnly',(_0x46cef3,_0x4092a4)=>_0x46cef3&&!_0x4092a4),_0x58e10d['on']('execute',()=>{_0x4bf56f['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x95cafb['isOpen']=!0x1,_0x4bf56f['editing']['view']['focus']();}),_0x766ed0['children']['add'](_0x426f04),_0x2810fe['children']['add'](_0x58e10d),_0x25d0c2['role']='menu',_0x25d0c2['items']['addMany']([_0x766ed0,_0x2810fe]),_0x7eb42e['add'](_0x25d0c2),_0x95cafb;}),_0x4bf56f['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x2e4bbd=this['editor'],_0x5f52c4=_0x2e4bbd['locale'],_0x45d23f=new _0x35891c(_0x5f52c4),_0x518e48=new _0x27588f(_0x5f52c4);_0x45d23f['buttonView']['set']({'icon':_0x5b095b['history'],'label':m(_0x5f52c4,'Revision\x20history')});const _0x34036f=new _0x4dfca5(_0x5f52c4,_0x45d23f),_0x52c617=new _0x390e3b(_0x5f52c4);_0x52c617['set']({'label':m(_0x5f52c4,'Save\x20current\x20revision')}),_0x52c617['delegate']('execute')['to'](_0x45d23f),_0x52c617['on']('execute',()=>{this['_showDialog']();}),_0x34036f['children']['add'](_0x52c617),_0x518e48['items']['add'](_0x34036f);const _0x203da3=new _0x4dfca5(_0x5f52c4,_0x45d23f),_0x38c460=new _0x390e3b(_0x5f52c4);return _0x38c460['set']({'label':m(_0x5f52c4,'Open\x20revision\x20history')}),_0x38c460['delegate']('execute')['to'](_0x45d23f),_0x38c460['on']('execute',()=>{_0x2e4bbd['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x203da3['children']['add'](_0x38c460),_0x518e48['items']['add'](_0x203da3),_0x45d23f['panelView']['children']['add'](_0x518e48),_0x45d23f;}['_showDialog'](){const _0x2d8bfc=this['editor'],_0x133dda=_0x2d8bfc['locale'],_0x22671b=_0x2d8bfc['plugins']['get']('Dialog'),_0x1922f1=_0x2d8bfc['plugins']['get']('RevisionTracker');function _0x403e90(_0x4cd9b7){_0x2d8bfc['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4cd9b7['revisionName']?_0x4cd9b7['revisionNameInputView']['errorText']=m(_0x133dda,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x2d8bfc['plugins']['get'](l)['saveRevision']({'name':_0x4cd9b7['revisionName']}),_0x22671b['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x403e90(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x22671b['show']({'id':'revisionSave','title':m(_0x133dda,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x2d8bfc['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x22671b['hide']()},{'label':m(_0x2d8bfc['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0xce107f){_0xce107f['bind']('isEnabled')['to'](_0x1922f1,'isReady',_0x1922f1,'isEnabled',_0x2d8bfc,'isReadOnly',(_0x4cacf2,_0x47d356,_0x1cd3a)=>_0x4cacf2&&_0x47d356&&!_0x1cd3a);},'onExecute':()=>_0x403e90(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x54ba88=this['editor'],_0xe0fc8b=_0x54ba88['locale'];this['_saveRevisionFormView']=new hs(_0xe0fc8b,_0x54ba88['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends ts{['changeId'];['_model'];constructor(_0x5a5258,_0x5c2ca1){super(_0x5a5258),this['_model']=_0x5c2ca1,this['changeId']=_0x5c2ca1['id'];const _0x2cecfe=this['bindTemplate'],_0x2b8cc1=m(_0x5a5258,_0x5c2ca1['data']['isSuggestion']?'Suggested\x20by':'add'==_0x5c2ca1['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x5c2ca1['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x2cecfe['to']('type',_0x448a96=>'ck-revision-change__'+_0x448a96)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x2b8cc1}]},{'text':'\x20'+_0x5c2ca1['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
+ _0x516367(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x588e43){super(),this['id']=_0x588e43['id']||_0x4f9af2(),this['author']=_0x588e43['author'],this['type']=_0x588e43['type'],this['data']=_0x588e43['data']||{},this['rootName']=_0x588e43['rootName'],this['set']('createdAt',_0x588e43['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(_0x512c04,_0x2543e6){this['newRevisionId']=_0x512c04,this['oldRevisionId']=_0x2543e6,this['changes']=new _0x13b5e8();}['_setChanges'](_0xac15bc){for(const _0x143c7c of _0xac15bc)this['changes']['add'](_0x143c7c);}}const Y={'c':_0x5d5f8c,'a':_0x16e4b8,'e':_0x1d4908,'r':_0x1a9b91,'u':_0x2f209d};class d extends _0x43da28{['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[_0x23463a,_0xcf7ba6,j];}constructor(_0x192e61){super(_0x192e61),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',(_0x55de80,_0x22bf9,_0x51a32a)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x11bb7f=>{for(const _0x25443c of this['editor']['editing']['view']['document']['roots'])_0x51a32a?_0x11bb7f['removeClass']('ck-editor__editable__overlay',_0x25443c):_0x11bb7f['addClass']('ck-editor__editable__overlay',_0x25443c);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0xb373d2=>null!==_0xb373d2),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x35db2d,_0x448558,_0x1e20e3)=>_0x35db2d&&_0x1e20e3?_0x448558['changes']['getIndex'](_0x1e20e3):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0xf4f6b,_0x321e4e)=>_0xf4f6b?_0x321e4e['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0xcf7ba6);}['init'](){const _0x2782e8=this['editor'],_0x1e7322=new _t(_0x2782e8,{'direction':'backward'}),_0x683301=new _t(_0x2782e8,{'direction':'forward'});(_0x2782e8['commands']['add']('showPreviousChange',_0x1e7322),_0x2782e8['commands']['add']('showNextChange',_0x683301),_0x2782e8['commands']['add']('restoreRevision',new pt(_0x2782e8)),this['on']('change:numberOfChanges',()=>{_0x1e7322['refresh'](),_0x683301['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x2782e8['enableReadOnlyMode']('revision-viewer'),_0x2782e8['plugins']['has']('WidgetToolbarRepository'))&&_0x2782e8['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x5e0b13){await this['loadRevisionData'](_0x5e0b13);const _0x394125={};for(const _0x200a4a in _0x5e0b13['diffData']){if(_0x5e0b13['diffData'][_0x200a4a]['attachChange']&&!_0x5e0b13['diffData'][_0x200a4a]['attachChange']['isAttached'])continue;const _0x9b750c=this['_removeRevisionMarkers'](JSON['parse'](_0x5e0b13['diffData'][_0x200a4a]['insertions'])),_0x5dbfd1=this['editor']['editing']['view']['document'],_0x5a2fd0=new _0x49a981(_0x5dbfd1,_0x9b750c['map'](_0x13e8c0=>this['_getViewObj'](_0x13e8c0)));this['editor']['data']['processor']['useFillerType']('marked'),_0x394125[_0x200a4a]=this['editor']['data']['processor']['toData'](_0x5a2fd0),this['editor']['data']['processor']['useFillerType']('default');}return _0x394125;}async['getRevisionRootsAttributes'](_0x20fba7){await this['loadRevisionData'](_0x20fba7);const _0x361086={};for(const _0x316581 in _0x20fba7['diffData'])_0x20fba7['diffData'][_0x316581]['attachChange']&&!_0x20fba7['diffData'][_0x316581]['attachChange']['isAttached']||(_0x361086[_0x316581]=_0x20fba7['diffData'][_0x316581]['attributesAfter']||{});return _0x361086;}['_removeRevisionMarkers'](_0x492c37){return(_0x492c37=_0x492c37['filter'](_0x15b75f=>!_0x15b75f['name']||'revision-start'!==_0x15b75f['name']&&'revision-end'!==_0x15b75f['name']))['forEach'](_0x1a4f8c=>{'string'!=typeof _0x1a4f8c&&(_0x1a4f8c['children']=this['_removeRevisionMarkers'](_0x1a4f8c['children']),_0x1a4f8c['attributes']=_0x1a4f8c['attributes']['filter'](_0x5b391c=>!_0x5b391c[0x0]['startsWith']('data-revision-')));}),_0x492c37;}async['compare'](_0xbb8ab8,_0x227505,_0xe1b7fc=!0x1){if(!this['isEnabled'])return;const _0x2ce797=this['diff'],_0x3be8de=this['repository'],_0x83745d='string'==typeof _0xbb8ab8?_0x3be8de['getRevision'](_0xbb8ab8):_0xbb8ab8,_0x5261b3='string'==typeof _0x227505?_0x3be8de['getRevision'](_0x227505):_0x227505,_0x463d7d=_0x83745d['id'],_0x496aa2=_0x5261b3?_0x5261b3['id']:null;if(!_0xe1b7fc&&this['diff']&&this['diff']['newRevisionId']===_0x463d7d&&this['diff']['oldRevisionId']===_0x496aa2)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new f(_0x463d7d,_0x496aa2);const _0x2c759a=this['_getRevisionsRange'](_0x83745d,_0x5261b3,!0x0)['map'](_0x333f91=>this['loadRevisionData'](_0x333f91));return _0x2c759a['push'](new Promise(_0x2b73a6=>{setTimeout(_0x2b73a6,0x14);})),Promise['all'](_0x2c759a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x45cc6b=this['_getDiff'](_0x463d7d,_0x496aa2);for(const _0x5291dc of _0x45cc6b['changes'])this['_changeIdToChange']['set'](_0x5291dc['id'],_0x5291dc);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x21f3af=>{for(const _0x2195e4 of this['editor']['model']['document']['getRootNames']())_0x21f3af['detachRoot'](_0x2195e4);for(const _0x512daa of Object['keys'](_0x45cc6b['model'])){const _0x36dd88=_0x21f3af['addRoot'](_0x512daa);for(const _0x47688f of Object['keys'](_0x45cc6b['attributes'][_0x512daa]))_0x21f3af['setAttribute'](_0x47688f,_0x45cc6b['attributes'][_0x512daa][_0x47688f],_0x36dd88);_0x21f3af['insert'](_0x45cc6b['model'][_0x512daa],_0x36dd88,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x45cc6b['changes'])),this['isReady']=!0x0;})['catch'](_0xf1c2d6=>{console['error'](_0xf1c2d6),this['_cleanUp'](),_0x2ce797&&(this['diff']=_0x2ce797),this['isReady']=!0x0;});}['addRevisionData'](_0x109f2a,_0x201659){const _0x3ba89e=this['repository']['createRevision'](_0x109f2a);return _0x3ba89e['on']('_update',(_0x4638c9,_0x34cba3,_0x3f741c)=>_0x201659(_0x34cba3,_0x3f741c,_0x3ba89e)),this['repository']['addRevision'](_0x3ba89e),_0x3ba89e;}['loadRevisionData'](_0xb40fb8){if(!_0xb40fb8||_0xb40fb8['diffData'])return Promise['resolve']();{const _0x35d646=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x35d646,'revisionId':_0xb40fb8['id']})['then'](_0x55306d=>{_0xb40fb8['_update']({'diffData':_0x55306d['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},_0x276cf3=>{for(const _0x20d3e7 of this['editor']['model']['document']['getRootNames']())_0x276cf3['detachRoot'](_0x20d3e7);});}['_sortAndFilterDiffChanges'](_0x55a866){const _0x220dde=[],_0x34c665=new Map();for(const _0x4108c3 of this['editor']['model']['document']['getRootNames']()){const _0x12480d=this['editor']['editing']['view']['getDomRoot'](_0x4108c3);if(!_0x12480d)continue;const _0x234f24=_0x12480d['getClientRects']()['item'](0x0);_0x234f24&&(_0x220dde['push'](_0x4108c3),_0x34c665['set'](_0x4108c3,_0x234f24));}return _0x220dde['sort']((_0x2c6aff,_0x284d10)=>{const _0x17ccfa=_0x34c665['get'](_0x2c6aff),_0x23891f=_0x34c665['get'](_0x284d10);return _0x17ccfa['y']-_0x23891f['y']||_0x17ccfa['x']-_0x23891f['x'];}),(_0x55a866=_0x55a866['filter'](_0x42db2f=>_0x220dde['includes'](_0x42db2f['rootName'])))['sort']((_0x4d9c05,_0x153203)=>_0x220dde['indexOf'](_0x4d9c05['rootName'])-_0x220dde['indexOf'](_0x153203['rootName'])),_0x55a866;}['_makeTape'](_0x2e5f54){const _0x3895ac=Array['from'](_0x2e5f54['markers'])['filter'](([_0x2d7b06,_0x9eae1f])=>_0x2d7b06['startsWith']('revision:')&&!_0x9eae1f['isCollapsed']),_0x45d8bf=Array['from'](this['editor']['model']['createRangeIn'](_0x2e5f54)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3895ac['length'])for(const _0x4dfbbb of _0x45d8bf){const [_0x5dbd00,_0x46b227]=_0x3895ac[0x0],[,_0x1a5af7,_0x32f7fd]=_0x5dbd00['split'](':');if(_0x46b227['end']['isEqual'](_0x4dfbbb['nextPosition'])&&_0x3895ac['shift'](),(_0x4dfbbb['previousPosition']['isEqual'](_0x46b227['start'])||_0x4dfbbb['previousPosition']['isAfter'](_0x46b227['start']))&&('insertion'==_0x1a5af7?_0x4dfbbb['isAdded']={'userId':_0x32f7fd}:'deletion'==_0x1a5af7&&(_0x4dfbbb['isRemoved']={'userId':_0x32f7fd})),0x0==_0x3895ac['length'])break;}return _0x45d8bf;}['_refreshStartEndIndex'](_0x3d160d){const _0xcf61e4=new Map();for(let _0x78f994=0x0;_0x78f994<_0x3d160d['length'];_0x78f994++)'text'===_0x3d160d[_0x78f994]['type']?(_0x3d160d[_0x78f994]['item']['startIndex']=_0x78f994,_0x3d160d[_0x78f994]['item']['endIndex']=_0x78f994):('elementStart'===_0x3d160d[_0x78f994]['type']?_0x3d160d[_0x78f994]['item']['startIndex']=_0x78f994:'elementEnd'===_0x3d160d[_0x78f994]['type']&&(_0x3d160d[_0x78f994]['item']['endIndex']=_0x78f994),_0xcf61e4['set'](_0x3d160d[_0x78f994]['id'],_0x78f994));for(const _0x10d53b of _0xcf61e4['values']())'elementStart'===_0x3d160d[_0x10d53b]['type']?_0x3d160d[_0x10d53b]['item']['endIndex']=_0xcf61e4['get'](_0x3d160d[_0x10d53b]['pairId']):'elementEnd'===_0x3d160d[_0x10d53b]['type']&&(_0x3d160d[_0x10d53b]['item']['startIndex']=_0xcf61e4['get'](_0x3d160d[_0x10d53b]['pairId']));}['_processTape'](_0x330856){for(let _0x385a78=0x0;_0x385a78<_0x330856['length'];_0x385a78++){if('elementStart'===_0x330856[_0x385a78]['type'])_0x330856[_0x385a78]['item']['startIndex']=_0x385a78;else{if('elementEnd'===_0x330856[_0x385a78]['type']){_0x330856[_0x385a78]['item']['endIndex']=_0x385a78;const _0x1c69c9=_0x330856[_0x385a78]['item']['startIndex'];_0x330856[_0x1c69c9]['pairId']=_0x330856[_0x385a78]['id'],_0x330856[_0x385a78]['pairId']=_0x330856[_0x1c69c9]['id'];}else _0x330856[_0x385a78]['item']['startIndex']=_0x385a78,_0x330856[_0x385a78]['item']['endIndex']=_0x385a78,_0x330856[_0x385a78]['pairId']=null;}_0x330856[_0x385a78]['markersStart']||(_0x330856[_0x385a78]['markersStart']=[],_0x330856[_0x385a78]['markersEnd']=[]);}}['_markInsertions'](_0x5c69d4,_0x2b6933){const _0x17c441=_0x5c69d4['filter'](_0x42fe5e=>!_0x42fe5e['isAdded']);for(let _0x478560=0x0;_0x478560<_0x2b6933['length'];_0x478560++)_0x2b6933[_0x478560]['isAdded']&&(_0x17c441[_0x478560]['isAdded']=_0x2b6933[_0x478560]['isAdded']);}['_makeModelFromViewString'](_0x3fd653){const _0x7bf7d2=JSON['parse'](_0x3fd653),_0x6de3af=this['editor']['editing']['view']['document'],_0x4634f1=new _0x49a981(_0x6de3af,_0x7bf7d2['map'](_0x4bf4cd=>this['_getViewObj'](_0x4bf4cd)));return this['editor']['data']['toModel'](_0x4634f1);}['_getViewObj'](_0x4c793d){const _0x588673=this['editor']['editing']['view']['document'];if('string'==typeof _0x4c793d)return new _0x1b3fed(_0x588673,_0x4c793d);{const _0x2f3e9d=_0x4c793d['children']['map'](_0x38e4ca=>this['_getViewObj'](_0x38e4ca));return new(Y[_0x4c793d['type']]||_0x373d7e)(_0x588673,_0x4c793d['name'],_0x4c793d['attributes'],_0x2f3e9d);}}['_getDiff'](_0x53f1a9,_0x2c8acf=null){const _0x4c7417=this['repository']['getRevision'](_0x53f1a9),_0x127fc3=_0x2c8acf?this['repository']['getRevision'](_0x2c8acf):null,_0x16ddeb=this['_getRevisionsRange'](_0x4c7417,_0x127fc3),_0x26fef0=_0x16ddeb[_0x16ddeb['length']-0x1],_0x141a35=new Map(),_0x35110b={'model':{},'attributes':{},'changes':[]},_0x1feb52=new Set(),_0x43120a=new Map();for(let _0x5b8e4c=_0x16ddeb['length']-0x1;_0x5b8e4c>=0x0;_0x5b8e4c--){const _0x1439d3=_0x16ddeb[_0x5b8e4c];for(const _0x51feec of Object['keys'](_0x1439d3['diffData']))if(_0x1439d3['diffData'][_0x51feec]['attachChange']){const _0x179dc0=_0x1439d3['diffData'][_0x51feec]['attachChange'];_0x179dc0['isAttached']?(_0x1feb52['add'](_0x51feec),_0x43120a['has'](_0x51feec)&&_0x43120a['get'](_0x51feec)['userId']==_0x179dc0['userId']?_0x43120a['delete'](_0x51feec):_0x43120a['set'](_0x51feec,_0x179dc0)):_0x43120a['has'](_0x51feec)?(_0x1feb52['delete'](_0x51feec),_0x43120a['delete'](_0x51feec)):(_0x1feb52['add'](_0x51feec),_0x43120a['set'](_0x51feec,_0x179dc0));}else _0x1feb52['add'](_0x51feec);}for(const _0x5bda5e of _0x1feb52){const _0x53e1b4=_0x43120a['has'](_0x5bda5e)&&!_0x43120a['get'](_0x5bda5e)['isAttached'];let _0x46746f=_0x53e1b4?_0x16ddeb['length']-0x1:0x0;const _0x51ed75=_0x53e1b4?-0x1:0x1;for(;_0x16ddeb[_0x46746f];){const _0xa699c1=_0x16ddeb[_0x46746f];if(_0xa699c1['diffData'][_0x5bda5e]){const _0x20039f=_0x53e1b4?_0xa699c1['diffData'][_0x5bda5e]['attributesBefore']:_0xa699c1['diffData'][_0x5bda5e]['attributesAfter'];_0x35110b['attributes'][_0x5bda5e]=_0x20039f?_0x456193(_0x20039f):{};break;}_0x46746f+=_0x51ed75;}}for(const _0x4bb019 of _0x16ddeb){_0x4bb019['model']={};for(const _0x1fa524 of _0x4bb019['authors'])_0x141a35['set'](_0x1fa524['id'],_0x1fa524);for(const _0x5e6133 of _0x1feb52){const _0x24fc54=_0x4bb019['diffData'][_0x5e6133]?_0x4bb019['diffData'][_0x5e6133]['insertions']:'[]',_0x31d08b=_0x4bb019['diffData'][_0x5e6133]?_0x4bb019['diffData'][_0x5e6133]['deletions']:'[]';_0x4bb019['model'][_0x5e6133]={'insertions':this['_makeModelFromViewString'](_0x24fc54),'deletions':this['_makeModelFromViewString'](_0x31d08b)};}}for(const _0x52f284 of _0x1feb52){let _0x51346d=null,_0x5ba2c2=0x0;const _0x5ba59a=new Map(Array['from'](_0x4c7417['model'][_0x52f284]['insertions']['markers'])['filter'](([_0x430b37])=>!_0x430b37['startsWith']('revision:')));let _0x2855be=0x0;for(const _0x448839 of _0x16ddeb){const _0x570e65=this['_makeTape'](_0x448839['model'][_0x52f284]['insertions']);_0x448839==_0x4c7417?(_0x51346d=_0x570e65,_0x5ba2c2=_0x51346d['length'],_0x51346d['forEach'](_0x5c5a8b=>{_0x5c5a8b['id']=_0x2855be++;}),this['_processTape'](_0x51346d)):this['_markInsertions'](_0x51346d,_0x570e65);const _0x1667bd=_0x51346d['filter'](_0x1fc1cc=>!_0x1fc1cc['isAdded'])['map'](_0x4175a3=>_0x4175a3['id']);let _0x49a2e4=0x0;const _0x1ec7de=this['_makeTape'](_0x448839['model'][_0x52f284]['deletions']);_0x1ec7de['forEach'](_0x368cf0=>{_0x368cf0['isRemoved']?_0x368cf0['id']=_0x5ba2c2++:_0x368cf0['id']=_0x1667bd[_0x49a2e4++];}),this['_processTape'](_0x1ec7de),this['_setDistance'](_0x51346d,'isAdded'),this['_setDistance'](_0x1ec7de,'isRemoved'),_0x448839==_0x4c7417&&this['_markMarkers'](_0x51346d,_0x5ba59a),_0x51346d=this['_joinTapes'](_0x51346d,_0x1ec7de),this['_refreshStartEndIndex'](_0x51346d),this['_setDistance'](_0x51346d,'isRemoved');}_0x51346d=_0x51346d['filter'](_0x370e0c=>!(_0x370e0c['isAdded']&&_0x370e0c['isRemoved']));const _0x465f55=new Map(_0x26fef0['model'][_0x52f284]['deletions']['markers']),_0x2c4f26=new Set(_0x5ba59a['keys']());for(const _0x4b2817 of _0x465f55['keys']())_0x2c4f26['delete'](_0x4b2817);this['_markSuggestions'](_0x51346d,_0x2c4f26),this['_fixObsoleteTags'](_0x51346d),_0x51346d=this['_removeMissingPairs'](_0x51346d),_0x51346d=this['_markMismatchedRemovedTags'](_0x51346d),_0x51346d=this['_removeUnsupportedChanges'](_0x51346d);const {root:_0x4c8f53,changes:_0x4328c0}=this['_makeModelFromTape'](_0x51346d,_0x141a35,_0x52f284);_0x35110b['model'][_0x52f284]=_0x4c8f53;const _0x2323ca=_0x43120a['get'](_0x52f284);if(_0x2323ca){const _0x318f36=_0x141a35['get'](_0x2323ca['userId']),_0x23ce94=new r({'author':_0x318f36,'type':_0x2323ca['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x52f284});_0x4328c0['unshift'](_0x23ce94),_0x35110b['attributes'][_0x52f284]['revisionHistoryAttachChange']=_0x23ce94['id'];}_0x35110b['changes']=_0x35110b['changes']['concat'](_0x4328c0);}return _0x35110b;}['_markMarkers'](_0x267205,_0x508b4f){for(let _0x3fc529=0x0;_0x3fc529<_0x267205['length'];_0x3fc529++)for(const [_0xee1b1f,_0x44594a]of _0x508b4f)_0x44594a['start']['isEqual'](_0x267205[_0x3fc529]['previousPosition'])&&_0x267205[_0x3fc529]['markersStart']['push'](_0xee1b1f),_0x44594a['end']['isEqual'](_0x267205[_0x3fc529]['nextPosition'])&&_0x267205[_0x3fc529]['markersEnd']['push'](_0xee1b1f);}['_joinTapes'](_0x2bc1d3,_0x235035){let _0x530b27=[],_0x58a129=0x0,_0x4080b1=0x0;for(;_0x58a129<_0x2bc1d3['length']||_0x4080b1<_0x235035['length'];){const _0x433664=_0x2bc1d3[_0x58a129]||{},_0x288f24=_0x235035[_0x4080b1]||{};if(_0x433664['id']==_0x288f24['id'])_0x58a129++,_0x4080b1++,_0x530b27['push'](_0x433664);else{if(_0x288f24['isRemoved']&&_0x433664['isAdded']){const {commonTape:_0x2e1731,iEnd:_0x167146,jEnd:_0x1b3f01}=this['_threeWayMerge'](_0x2bc1d3,_0x58a129,_0x235035,_0x4080b1);_0x530b27=_0x530b27['concat'](_0x2e1731),_0x58a129=_0x167146,_0x4080b1=_0x1b3f01;}else _0x288f24['isRemoved']?(_0x4080b1++,_0x530b27['push'](_0x288f24)):(_0x58a129++,_0x530b27['push'](_0x433664));}}return _0x530b27;}['_markSuggestions'](_0x115ffe,_0x2269bd){const _0x392692=[];for(let _0x245892=0x0;_0x245892<_0x115ffe['length'];_0x245892++){for(let _0x3d5f7d=0x0;_0x3d5f7d<_0x115ffe[_0x245892]['markersStart']['length'];_0x3d5f7d++){const _0x226087=_0x115ffe[_0x245892]['markersStart'][_0x3d5f7d];if(!_0x2269bd['has'](_0x226087))continue;const {group:_0x315971,type:_0x139e28,authorId:_0x58ae6e}=_0x2709e8(_0x226087);'revision-suggestion'!=_0x315971||'insertion'!=_0x139e28&&'deletion'!=_0x139e28||(_0x392692['unshift']({'type':_0x139e28,'name':_0x226087,'userId':_0x58ae6e}),_0x115ffe[_0x245892]['markersStart']['splice'](_0x3d5f7d,0x1),_0x3d5f7d--);}_0x3c52c1(_0x115ffe[_0x245892]);for(let _0x5855cb=0x0;_0x5855cb<_0x115ffe[_0x245892]['markersEnd']['length'];_0x5855cb++){const _0x12df7d=_0x115ffe[_0x245892]['markersEnd'][_0x5855cb];if(!_0x2269bd['has'](_0x12df7d))continue;const {group:_0x3a081a,type:_0x27d931}=_0x2709e8(_0x12df7d);if('revision-suggestion'!=_0x3a081a||'insertion'!=_0x27d931&&'deletion'!=_0x27d931)continue;_0x115ffe[_0x245892]['markersEnd']['splice'](_0x5855cb,0x1),_0x5855cb--;const _0x40b6fc=_0x392692['findIndex'](_0x4ea438=>_0x4ea438['name']==_0x12df7d);_0x40b6fc>-0x1&&_0x392692['splice'](_0x40b6fc,0x1);}}function _0x2709e8(_0xc5dbde){const _0x56a8cd=_0xc5dbde['split'](':');return{'group':_0x56a8cd[0x0],'type':_0x56a8cd[0x1],'subType':_0x56a8cd['length']>=0x5?_0x56a8cd[0x2]:null,'id':_0x56a8cd['length']<0x5?_0x56a8cd[0x2]:_0x56a8cd[0x3],'authorId':_0x56a8cd['length']<0x5?_0x56a8cd[0x3]:_0x56a8cd[0x4],'markerCount':0x6==_0x56a8cd['length']?_0x56a8cd[0x5]:null};}function _0x3c52c1(_0x5855bb){for(let _0x318f72=0x0;_0x318f72<_0x392692['length'];_0x318f72++){if(_0x5855bb['isAdded']&&'insertion'==_0x392692[_0x318f72]['type'])return _0x5855bb['isAddSuggestion']=_0x392692[_0x318f72],void delete _0x5855bb['isAdded'];if(!_0x5855bb['isAdded']&&!_0x5855bb['isRemoved']&&'deletion'==_0x392692[_0x318f72]['type'])return void(_0x5855bb['isRemoveSuggestion']=_0x392692[_0x318f72]);}}}['_setDistance'](_0x1887f1,_0x5f5d75){let _0x54651b=0x0,_0x2f2025=!0x1;const _0x5e6a4a=new Map();for(const _0x3d7b40 of _0x1887f1)_0x3d7b40[_0x5f5d75]?_0x2f2025&&(_0x54651b++,_0x2f2025=!0x1):(_0x54651b++,_0x2f2025=!0x0),_0x5e6a4a['set'](_0x3d7b40['id'],_0x54651b);for(let _0x33c4d7=0x0;_0x33c4d7<_0x1887f1['length'];_0x33c4d7++){if('isRemoved'==_0x5f5d75&&_0x1887f1[_0x33c4d7]['isAdded']||'isAdded'==_0x5f5d75&&_0x1887f1[_0x33c4d7]['isRemoved'])continue;if('text'==_0x1887f1[_0x33c4d7]['type']){_0x1887f1[_0x33c4d7]['distance']=0x0;continue;}const _0x15b783=_0x5e6a4a['get'](_0x1887f1[_0x33c4d7]['pairId']),_0x2ad801=_0x5e6a4a['get'](_0x1887f1[_0x33c4d7]['id']);_0x1887f1[_0x33c4d7]['distance']=_0x15b783-_0x2ad801;}}['_getRevisionsRange'](_0x276303,_0x4dea4c,_0x494554=!0x1){const _0x2bfcc4=[];let _0x5570f5=this['repository']['getIndex'](_0x276303),_0x1564d3=this['repository']['getIndex'](_0x4dea4c);for(-0x1==_0x1564d3&&(_0x1564d3=this['repository']['_revisions']['length'],_0x494554=!0x1);_0x5570f5<_0x1564d3;)_0x2bfcc4['push'](this['repository']['getRevision'](_0x5570f5)),_0x5570f5++;return _0x494554&&_0x2bfcc4['push'](this['repository']['getRevision'](_0x5570f5)),_0x2bfcc4;}['_threeWayMerge'](_0x3f8d9a,_0x20f61a,_0x553fa4,_0x51cf1a){const _0x43bbae=this['editor']['model']['schema'];let _0xf00956=_0x20f61a;for(;_0x3f8d9a[_0xf00956]&&_0x3f8d9a[_0xf00956]['isAdded'];)_0xf00956++;let _0x2baaa3=_0x51cf1a;for(;_0x553fa4[_0x2baaa3]&&_0x553fa4[_0x2baaa3]['isRemoved'];)_0x2baaa3++;_0x22d59d(_0x3f8d9a,_0x20f61a,_0xf00956),_0x22d59d(_0x553fa4,_0x51cf1a,_0x2baaa3);const _0x2d4cb6=_0x553fa4['slice'](_0x51cf1a,_0x2baaa3)['concat'](_0x3f8d9a['slice'](_0x20f61a,_0xf00956));return _0x2d4cb6['sort']((_0xbd413f,_0x56e4e5)=>_0xbd413f['side']!=_0x56e4e5['side']?_0xbd413f['side']-_0x56e4e5['side']:_0xbd413f['level']!=_0x56e4e5['level']?_0xbd413f['level']-_0x56e4e5['level']:_0xbd413f['distance']!=_0x56e4e5['distance']?_0x56e4e5['distance']-_0xbd413f['distance']:!!_0xbd413f['isAdded']!=!!_0x56e4e5['isAdded']?-0x1==_0xbd413f['side']||0x0==_0xbd413f['side']?_0xbd413f['isAdded']?-0x1:0x1:_0xbd413f['isAdded']?0x1:-0x1:_0xbd413f['index']-_0x56e4e5['index']),{'commonTape':_0x2d4cb6,'iEnd':_0xf00956,'jEnd':_0x2baaa3};function _0x22d59d(_0x37b978,_0x39d310,_0xaac5d0){let _0x10a833=-0x1,_0xff94a5=Number['POSITIVE_INFINITY'],_0x1b3450=!0x0;for(let _0x5c8ecd=_0x39d310;_0x5c8ecd<_0xaac5d0;_0x5c8ecd++)if(_0x43bbae['isInline'](_0x37b978[_0x5c8ecd]['item'])||(_0x1b3450=!0x1),_0x37b978[_0x5c8ecd]['item']['startIndex']<_0x39d310&&(_0x10a833=_0x5c8ecd),_0x37b978[_0x5c8ecd]['item']['endIndex']>=_0xaac5d0){_0xff94a5=_0x5c8ecd;break;}_0x1b3450&&(_0x10a833=_0xaac5d0-0x1);for(let _0xd88ba7=_0x39d310;_0xd88ba7<_0xaac5d0;_0xd88ba7++)_0x37b978[_0xd88ba7]['side']=_0xd88ba7<=_0x10a833?-0x1:_0xd88ba7<_0xff94a5?0x0:0x1,_0x37b978[_0xd88ba7]['index']=_0xd88ba7;let _0x3c91fb=0x0;for(let _0x7972a5=_0x39d310;_0x7972a5<=_0x10a833;_0x7972a5++)0x0==_0x37b978[_0x7972a5]['distance']?_0x37b978[_0x7972a5]['level']=_0x3c91fb:(_0x3c91fb++,_0x37b978[_0x7972a5]['level']=_0x3c91fb,_0x3c91fb++);for(let _0x500adf=_0x39d310;_0x500adf<_0xaac5d0;_0x500adf++)0x0==_0x37b978[_0x500adf]['side']&&(_0x37b978[_0x500adf]['level']=_0x3c91fb);_0x3c91fb=0x0;for(let _0x20a656=_0xaac5d0-0x1;_0x20a656>=_0xff94a5;_0x20a656--)0x0==_0x37b978[_0x20a656]['distance']?_0x37b978[_0x20a656]['level']=_0x3c91fb:(_0x3c91fb--,_0x37b978[_0x20a656]['level']=_0x3c91fb,_0x3c91fb--);}}['_fixObsoleteTags'](_0x269cf2){const _0xa88412=new Map(),_0x48ef49=this['editor']['model']['schema'];for(let _0x5cdbe9=0x1;_0x5cdbe9<_0x269cf2['length'];_0x5cdbe9++){let _0x31b954,_0x8b45c4,_0x3567e7;const _0x33ef6b=_0x269cf2[_0x5cdbe9],_0x2779ca=_0x269cf2[_0x5cdbe9-0x1];if('text'==_0x33ef6b['type'])continue;if(_0x33ef6b['type']!=_0x2779ca['type'])continue;if(!_0x48ef49['isBlock'](_0x2779ca['item'])||_0x48ef49['isLimit'](_0x2779ca['item']))continue;if(!_0x48ef49['isBlock'](_0x33ef6b['item'])||_0x48ef49['isLimit'](_0x33ef6b['item']))continue;if((_0x269cf2[_0x5cdbe9]['isAdded']||_0x269cf2[_0x5cdbe9]['isAddSuggestion'])&&_0x269cf2[_0x5cdbe9-0x1]['isRemoved'])_0x31b954=_0x269cf2[_0x5cdbe9],_0x8b45c4=_0x269cf2[_0x5cdbe9-0x1],_0x3567e7=_0x5cdbe9-0x1;else{if(!_0x269cf2[_0x5cdbe9]['isRemoved']||!_0x269cf2[_0x5cdbe9-0x1]['isAdded']&&!_0x269cf2[_0x5cdbe9-0x1]['isAddSuggestion'])continue;_0x31b954=_0x269cf2[_0x5cdbe9-0x1],_0x8b45c4=_0x269cf2[_0x5cdbe9],_0x3567e7=_0x5cdbe9;}const _0x7e63ac=_0x31b954['level']==_0x8b45c4['level'],_0x52e35f=Math['abs'](_0x31b954['level'])<Math['abs'](_0x8b45c4['level'])&&0x0==_0x8b45c4['distance'];(_0x7e63ac||_0x52e35f)&&(_0xa88412['set'](_0x8b45c4['id'],_0x31b954['id']),_0x269cf2['splice'](_0x3567e7,0x1),_0x5cdbe9--,_0x31b954['isAdded']=!0x1);}for(let _0x2b9c4d=0x0;_0x2b9c4d<_0x269cf2['length'];_0x2b9c4d++)_0xa88412['has'](_0x269cf2[_0x2b9c4d]['pairId'])&&(_0x269cf2[_0x2b9c4d]['pairId']=_0xa88412['get'](_0x269cf2[_0x2b9c4d]['pairId']));}['_removeMissingPairs'](_0xee1163){const _0x1599ff=new Set(_0xee1163['map'](_0x1338bf=>_0x1338bf['id']));for(let _0x228a9b=0x0;_0x228a9b<_0xee1163['length'];_0x228a9b++)_0x1599ff['has'](_0xee1163[_0x228a9b]['pairId'])||0x0==_0xee1163[_0x228a9b]['distance']||(_0xee1163[_0x228a9b]['isIncorrect']=!0x0);return _0xee1163['filter'](_0x516fe9=>!_0x516fe9['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2675d1){const _0x43eb25=new Set();for(let _0x58e564=0x0;_0x58e564<_0x2675d1['length'];_0x58e564++){if(_0x43eb25['has'](_0x2675d1[_0x58e564]['id'])&&_0x2675d1[_0x58e564]['isRemoved']&&(_0x2675d1[_0x58e564]['isIncorrect']=!0x0),_0x2675d1[_0x58e564]['isIncorrect'])continue;if(0x0==_0x2675d1[_0x58e564]['distance'])continue;if('elementStart'!=_0x2675d1[_0x58e564]['type'])continue;if(null==_0x2675d1[_0x58e564]['pairId'])continue;let _0x207625=_0x58e564+0x1,_0x5afc15=0x0;for(;_0x2675d1[_0x207625]['id']!=_0x2675d1[_0x58e564]['pairId'];)'elementStart'==_0x2675d1[_0x207625]['type']?_0x5afc15++:'elementEnd'==_0x2675d1[_0x207625]['type']&&_0x5afc15--,_0x207625++;if(0x0!=_0x5afc15){if(_0x2675d1[_0x58e564]['isRemoved'])_0x2675d1[_0x58e564]['isIncorrect']=!0x0;else{for(;_0x207625!=_0x58e564;)_0x2675d1[_0x207625]['isRemoved']&&0x0!=_0x2675d1[_0x207625]['distance']&&(_0x2675d1[_0x207625]['isIncorrect']=!0x0,_0x43eb25['add'](_0x2675d1[_0x207625]['pairId'])),_0x207625--;}}}return _0x2675d1['filter'](_0x3c5aba=>!_0x3c5aba['isIncorrect']);}['_removeUnsupportedChanges'](_0x2f43f9){const _0x2c46e2=this['editor']['model']['schema'];for(let _0x2dca41=0x0;_0x2dca41<_0x2f43f9['length'];_0x2dca41++){if(!(_0x2f43f9[_0x2dca41]['isAdded']||_0x2f43f9[_0x2dca41]['isAddSuggestion']||_0x2f43f9[_0x2dca41]['isRemoved']||_0x2f43f9[_0x2dca41]['isRemoveSuggestion']))continue;if(0x0==_0x2f43f9[_0x2dca41]['distance'])continue;const _0x4893dc=_0x2f43f9[_0x2dca41]['item'];_0x2c46e2['isBlock'](_0x4893dc)||_0x2c46e2['isLimit'](_0x4893dc)||(_0x2f43f9[_0x2dca41]['isAdded']&&delete _0x2f43f9[_0x2dca41]['isAdded'],_0x2f43f9[_0x2dca41]['isAddSuggestion']&&delete _0x2f43f9[_0x2dca41]['isAddSuggestion'],_0x2f43f9[_0x2dca41]['isRemoveSuggestion']&&delete _0x2f43f9[_0x2dca41]['isRemoveSuggestion'],_0x2f43f9[_0x2dca41]['isRemoved']&&(_0x2f43f9[_0x2dca41]['isIncorrect']=!0x0));}return _0x2f43f9['filter'](_0x42d17e=>!_0x42d17e['isIncorrect']);}['_makeModelFromTape'](_0x35033c,_0x490b43,_0x1aae0a){const _0x63035d=new mt(),_0x103830=[],_0x76f663=new Map(),_0xddd6d9=this['editor']['model'],_0x5f1519=_0xddd6d9['schema'],_0x29b9a1=[_0x63035d],_0x1c69db={},_0x225a6e={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x57804a=null;const _0x4eee1a=[0x0];for(let _0x165c90=0x0;_0x165c90<_0x35033c['length'];_0x165c90++)if('elementStart'===_0x35033c[_0x165c90]['type']){_0x35033c[_0x165c90]['previousPosition']=_0xddd6d9['createPositionFromPath'](_0x63035d,_0x4eee1a);const _0x439672=new ft(_0x35033c[_0x165c90]['item']['name'],_0x35033c[_0x165c90]['item']['getAttributes']());_0x29b9a1[0x0]['_appendChild'](_0x439672),_0x4eee1a['push'](0x0),_0x29b9a1['unshift'](_0x439672),_0x35033c[_0x165c90]['nextPosition']=_0xddd6d9['createPositionFromPath'](_0x63035d,_0x4eee1a);}else'elementEnd'===_0x35033c[_0x165c90]['type']?(_0x29b9a1['shift'](),_0x35033c[_0x165c90]['previousPosition']=_0xddd6d9['createPositionFromPath'](_0x63035d,_0x4eee1a),_0x4eee1a['pop'](),_0x4eee1a[_0x4eee1a['length']-0x1]++,_0x35033c[_0x165c90]['nextPosition']=_0xddd6d9['createPositionFromPath'](_0x63035d,_0x4eee1a)):(_0x35033c[_0x165c90]['previousPosition']=_0xddd6d9['createPositionFromPath'](_0x63035d,_0x4eee1a),_0x57804a?_0x57804a['_data']+=_0x35033c[_0x165c90]['item']['data']:_0x57804a=new wt(_0x35033c[_0x165c90]['item']['data'],_0x35033c[_0x165c90]['item']['getAttributes']()),_0x35033c[_0x165c90+0x1]&&'text'===_0x35033c[_0x165c90+0x1]['type']&&_0x199a72(_0x57804a,_0x35033c[_0x165c90+0x1]['item'])||(_0x29b9a1[0x0]['_appendChild'](_0x57804a),_0x57804a=null),_0x4eee1a[_0x4eee1a['length']-0x1]+=_0x35033c[_0x165c90]['item']['offsetSize'],_0x35033c[_0x165c90]['nextPosition']=_0xddd6d9['createPositionFromPath'](_0x63035d,_0x4eee1a));for(let _0x262486=0x0;_0x262486<_0x35033c['length'];_0x262486++){const _0x1057fd=_0x35033c[_0x262486]['previousPosition'],_0x51b987=_0x35033c[_0x262486]['nextPosition'];for(const _0x238d9e of _0x35033c[_0x262486]['markersStart'])_0x76f663['set'](_0x238d9e,{'start':_0x1057fd,'end':null});_0xe963e9('isRemoveSuggestion',_0x262486,_0x1057fd,_0x51b987),_0xe963e9('isAddSuggestion',_0x262486,_0x1057fd,_0x51b987),_0xe963e9('isRemoved',_0x262486,_0x1057fd,_0x51b987),_0xe963e9('isAdded',_0x262486,_0x1057fd,_0x51b987);for(const _0x53b7ab of _0x35033c[_0x262486]['markersEnd']){_0x76f663['get'](_0x53b7ab)['end']=_0x51b987;}}for(const [_0x88a8c8,_0x3b0189]of _0x76f663){const _0x542d5c=this['editor']['model']['createRange'](_0x3b0189['start'],_0x3b0189['end']);_0x63035d['markers']['set'](_0x88a8c8,_0x542d5c);}return _0x103830['sort']((_0x4278e4,_0x535987)=>{const _0x1baf11=_0x63035d['markers']['get']('revision:'+_0x4278e4['id']),_0x1638c7=_0x63035d['markers']['get']('revision:'+_0x535987['id']);return _0x1baf11['start']['isBefore'](_0x1638c7['start'])?-0x1:_0x1baf11['start']['isAfter'](_0x1638c7['start'])?0x1:_0x1baf11['end']['isBefore'](_0x1638c7['end'])?-0x1:_0x1baf11['end']['isAfter'](_0x1638c7['end'])?0x1:'add'===_0x4278e4['type']?-0x1:0x1;}),{'root':_0x63035d,'changes':_0x103830};function _0xe963e9(_0x1ecf50,_0x24131b,_0x3e31d1,_0x4c5b2d){const _0x308f2c=!!_0x35033c[_0x24131b][_0x1ecf50],_0x5aef51=_0x308f2c?_0x35033c[_0x24131b][_0x1ecf50]['userId']:null,_0x1e85c8=_0x24131b===_0x35033c['length']-0x1,_0x3ef1c0=_0x225a6e[_0x1ecf50][0x0],_0x1c7725=_0x5f1519['isObject'](_0x35033c[_0x24131b]['item']);!_0x1c69db[_0x1ecf50]&&_0x308f2c?_0x1c69db[_0x1ecf50]={'start':_0x3e31d1,'tapeItem':_0x35033c[_0x24131b],'userId':_0x5aef51,'type':_0x1ecf50}:_0x1c69db[_0x1ecf50]&&!_0x308f2c?(_0x1c69db[_0x1ecf50]['end']=_0x3e31d1,_0x44135b(_0x1c69db[_0x1ecf50]),_0x1c69db[_0x1ecf50]=null):_0x1c69db[_0x1ecf50]&&_0x308f2c&&_0x1c69db[_0x1ecf50]['userId']!==_0x5aef51&&(_0x1c69db[_0x1ecf50]['end']=_0x3e31d1,_0x3ef1c0&&_0x3ef1c0['userId']===_0x1c69db[_0x1ecf50]['userId']||_0x44135b(_0x1c69db[_0x1ecf50]),_0x1c69db[_0x1ecf50]={'start':_0x3e31d1,'tapeItem':_0x35033c[_0x24131b],'userId':_0x5aef51,'type':_0x1ecf50}),_0x1c69db[_0x1ecf50]&&_0x1c7725&&('elementStart'!==_0x35033c[_0x24131b]['type']||_0x3ef1c0&&_0x3ef1c0['userId']===_0x5aef51||_0x225a6e[_0x1ecf50]['unshift']({'userId':_0x5aef51,'object':_0x35033c[_0x24131b]['item'],'change':_0x1c69db[_0x1ecf50]}),'elementEnd'===_0x35033c[_0x24131b]['type']&&_0x3ef1c0&&_0x3ef1c0['object']===_0x35033c[_0x24131b]['item']&&(_0x225a6e[_0x1ecf50]['shift'](),_0x1c69db[_0x1ecf50]=_0x3ef1c0['change'])),_0x1c69db[_0x1ecf50]&&_0x1e85c8&&(_0x1c69db[_0x1ecf50]['end']=_0x4c5b2d,_0x44135b(_0x1c69db[_0x1ecf50]),_0x1c69db[_0x1ecf50]=null);}function _0x44135b({start:_0x586098,end:_0x46d966,tapeItem:_0x36242f,userId:_0x494bda,type:_0x32dc80}){const _0x2224a7=_0x36242f['item'],_0x3ac218=_0xddd6d9['schema']['isBlock'](_0x2224a7)&&!_0xddd6d9['schema']['isLimit'](_0x2224a7),_0x3dd7e7=_0x586098['nodeAfter']==_0x46d966['parent']&&_0x46d966['isAtStart'];if(_0x3ac218&&_0x3dd7e7)return;const _0x26daa8=_0xddd6d9['createRange'](_0x586098,_0x46d966),_0x442687=_0x490b43['get'](_0x494bda),_0x2fb288=new r({'author':_0x442687,'type':'isAdded'==_0x32dc80||'isAddSuggestion'==_0x32dc80?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x32dc80||'isRemoveSuggestion'==_0x32dc80},'createdAt':new Date(),'rootName':_0x1aae0a});_0x103830['push'](_0x2fb288),_0x63035d['markers']['set']('revision:'+_0x2fb288['id'],_0x26daa8);}function _0x199a72(_0x4ca058,_0x1b42c8){const _0xc81116=_0x4ca058['getAttributes'](),_0xd0c3c8=_0x1b42c8['getAttributes']();for(const _0x53882e of _0xc81116){if(_0x53882e[0x1]!==_0x1b42c8['getAttribute'](_0x53882e[0x0]))return!0x1;_0xd0c3c8['next']();}return _0xd0c3c8['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x10ea7b=>{const _0x13a678=_0x10ea7b['markerName']['split'](':')[0x1],_0x44be3f=this['_getChangeFromId'](_0x13a678);if(!_0x44be3f)return null;const _0x1cd8f9='add'==_0x44be3f['type']?'insertion':'deletion',_0x51e69e=['ck-suggestion-marker','ck-suggestion-marker-'+_0x1cd8f9];return _0x44be3f['data']['isSuggestion']&&_0x51e69e['push']('ck-suggestion-marker-'+_0x1cd8f9+'-new'),this['activeChange']==_0x44be3f&&_0x51e69e['push']('ck-suggestion-marker--active'),{'classes':_0x51e69e,'attributes':{'data-change-id':_0x13a678}};}}),this['editor']['conversion']['for']('upcast')['add'](_0xdb1c36=>{_0xdb1c36['on']('element:pre',(_0xb77127,_0x53d5fd,_0x421787)=>{const _0x22f564=_0x53d5fd['viewItem']['getChild'](0x0);if(!_0x22f564||!_0x22f564['is']('element','code'))return;if(!_0x421787['consumable']['consume'](_0x22f564,{'attributes':['vid_start','vid_end']}))return;const _0x3a9508=_0x53d5fd['modelRange']['start']['nodeAfter'];_0x421787['writer']['setAttribute']('vid_start',_0x22f564['getAttribute']('vid_start'),_0x3a9508),_0x421787['writer']['setAttribute']('vid_end',_0x22f564['getAttribute']('vid_end'),_0x3a9508);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1c4781=>{_0x1c4781['on']('element',(_0x30ba0c,_0xee2e25,_0x53ea3b)=>{if(!_0x53ea3b['consumable']['consume'](_0xee2e25['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0xee2e25['modelRange']['isCollapsed'])return;const _0x21a792=_0xee2e25['modelRange']['start']['nodeAfter'];_0x21a792['hasAttribute']('vid_start')||_0x21a792['hasAttribute']('vid')||(_0x53ea3b['writer']['setAttribute']('vid_start',_0xee2e25['viewItem']['getAttribute']('vid_start'),_0x21a792),_0x53ea3b['writer']['setAttribute']('vid_end',_0xee2e25['viewItem']['getAttribute']('vid_end'),_0x21a792));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xa49b5c=>_0xa49b5c['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3c4b67,[,_0x90c2d0])=>{['vid_start','vid_end','vid']['includes'](_0x90c2d0)&&(_0x3c4b67['return']=!0x0,_0x3c4b67['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2a4118=>{_0x2a4118['on']('attribute:vid',(_0x31835f,_0x272032,_0x3db1d1)=>{if('\x20'!=_0x272032['item']['data']||_0x272032['item']['parent']['maxOffset']>0x1)return;if(!_0x3db1d1['consumable']['consume'](_0x272032['item'],_0x31835f['name']))return;const _0x1a2dde=_0x3db1d1['writer'],_0x59282f=_0x3db1d1['mapper']['toViewRange'](_0x272032['range']);_0x1a2dde['wrap'](_0x59282f,_0x1a2dde['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x176777){const _0x12d98a=_0x176777['plugins']['get']('RevisionViewer');return(_0x1b50ba,_0x33506c,_0x322dea)=>{const _0x42e2ff=_0x33506c['markerName']['split'](':')[0x1],_0x327f06=_0x12d98a['_getChangeFromId'](_0x42e2ff);if(!_0x327f06)return null;const _0x4da2a8='add'==_0x327f06['type']?'split':'merge';if(!_0x322dea['consumable']['test'](_0x33506c['markerRange'],_0x1b50ba['name']))return;const _0x4ea3a7=_0x33506c['markerRange']['getWalker'](),_0x496a4f=_0x33506c['markerRange']['start'],_0x35d18c=_0x176777['model']['schema'];let _0x1d6032=null,_0x10ab34=null,_0x49ad90=!0x1,_0x58e55b=!0x1;for(const _0x2c2a0b of _0x4ea3a7){const _0x5b40db=_0x2c2a0b['item'];_0x49ad90=_0x49ad90||_0x35d18c['isContent'](_0x5b40db);const _0x15bf81=_0x322dea['mapper']['toViewElement'](_0x5b40db);if(_0x15bf81&&_0x15bf81['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2c2a0b['type']&&(_0x35d18c['isBlock'](_0x5b40db)&&!_0x35d18c['isLimit'](_0x5b40db)&&(_0x5b40db['nextSibling']||_0x496a4f['isAtEnd']?_0x1d6032&&_0x1d6032['parent']==_0x5b40db||(_0x1d6032=_0x5b40db,_0x5d192b(_0x2c2a0b['previousPosition']),_0x58e55b=!0x0):_0x10ab34=_0x10ab34||_0x2c2a0b['previousPosition']));}function _0x5d192b(_0x20b603){const _0x5b0e53=_0x322dea['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4da2a8}),_0x3d9f34=_0x322dea['mapper']['toViewPosition'](_0x20b603);_0x327f06['data']['isSuggestion']&&_0x322dea['writer']['addClass']('ck-suggestion-marker-'+_0x4da2a8+'-new',_0x5b0e53),_0x12d98a['activeChange']==_0x327f06&&_0x322dea['writer']['addClass']('ck-suggestion-marker--active',_0x5b0e53),_0x322dea['writer']['insert'](_0x3d9f34,_0x5b0e53),_0x322dea['mapper']['bindElementToMarker'](_0x5b0e53,_0x33506c['markerName']);}_0x49ad90||_0x58e55b||!_0x10ab34||_0x5d192b(_0x10ab34);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x35d0f8,_0x2fd509,_0x427be2)=>{const _0x1b12b3=_0x427be2['mapper']['markerNameToElements'](_0x2fd509['markerName']);if(_0x1b12b3){for(const _0x47f586 of _0x1b12b3)(_0x47f586['hasClass']('ck-suggestion-marker-split')||_0x47f586['hasClass']('ck-suggestion-marker-merge'))&&(_0x427be2['mapper']['unbindElementFromMarkerName'](_0x47f586,_0x2fd509['markerName']),_0x427be2['writer']['remove'](_0x47f586));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x9468f5,_0x1368d1,_0x1895f9)=>{const _0x192d00=_0x1368d1['markerName']['split'](':')[0x1],_0x42937a=this['_getChangeFromId'](_0x192d00);if(!_0x42937a)return null;const _0x91c9a8='add'==_0x42937a['type']?'split':'merge';if(_0x1895f9['consumable']['test'](_0x1368d1['markerRange'],_0x9468f5['name']))for(const _0x313240 of _0x1368d1['markerRange']['getItems']()){if(!_0x313240['is']('element','softBreak'))continue;const _0x58c547=_0x1895f9['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x91c9a8}),_0x2b577a=_0x1895f9['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x313240));_0x42937a['data']['isSuggestion']&&_0x1895f9['writer']['addClass']('ck-suggestion-marker-'+_0x91c9a8+'-new',_0x58c547),this['activeChange']==_0x42937a&&_0x1895f9['writer']['addClass']('ck-suggestion-marker--active',_0x58c547),_0x1895f9['writer']['insert'](_0x2b577a,_0x58c547),_0x1895f9['mapper']['bindElementToMarker'](_0x58c547,_0x1368d1['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x48cbd6=>{for(const _0x5045f0 of this['editor']['model']['document']['getRootNames']()){const _0x24ffa4=this['editor']['model']['document']['getRoot'](_0x5045f0),_0x27d184=this['editor']['editing']['view']['document']['getRoot'](_0x5045f0);if(_0x27d184){const _0x24f9f4=_0x24ffa4['getAttribute']('revisionHistoryAttachChange');if(_0x48cbd6['removeAttribute']('data-change-id',_0x27d184),_0x48cbd6['removeClass']('ck-revision-history-root-add',_0x27d184),_0x48cbd6['removeClass']('ck-revision-history-root-remove',_0x27d184),_0x48cbd6['removeClass']('ck-revision-history-root--active',_0x27d184),_0x24f9f4){const _0x487984=this['_getChangeFromId'](_0x24f9f4);if(!_0x487984)return null;_0x48cbd6['setAttribute']('data-change-id',_0x24f9f4,_0x27d184),_0x48cbd6['addClass']('ck-revision-history-root-'+_0x487984['type'],_0x27d184),this['activeChange']==_0x487984&&_0x48cbd6['addClass']('ck-revision-history-root--active',_0x27d184);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xa18b5c=>'revision-comment:'+_0xa18b5c,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x401038=>'revision-suggestion:'+_0x401038,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x4252f2=>({'name':'suggestion:'+_0x4252f2,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x19a1ed=>{const _0x1684c1=_0x19a1ed['markerName']['split'](':')[0x1];return'insertion'!=_0x1684c1&&'deletion'!=_0x1684c1?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x1684c1]};}}),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',(_0x1b4380,_0x3a1032,_0x3e5e84)=>{const _0x339b59=_0x3e5e84['mapper']['markerNameToElements'](_0x3a1032['markerName']);if(_0x339b59){for(const _0x236593 of _0x339b59)_0x236593['is']('uiElement')&&(_0x3e5e84['mapper']['unbindElementFromMarkerName'](_0x236593,_0x3a1032['markerName']),_0x3e5e84['writer']['remove'](_0x236593));}},{'priority':'high'});}['_getChangeFromId'](_0x291420){return this['_changeIdToChange']['get'](_0x291420);}['_getViewForChange'](_0x8f85e){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x8f85e),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1a62dc,_0x4dfe85,_0x5078ae,_0x311a48)=>{_0x311a48&&this['_balloon']['remove'](_0x311a48),_0x5078ae&&(this['_balloon']['add']({'view':_0x5078ae,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x3b233b=this['editor']['editing'],_0x165e6d=this['_getChangeFromId'](_0x5078ae['changeId']);let _0x3b6a42;if(_0x165e6d['data']['isOnRoot']){const _0x5f2be9=_0x3b233b['view']['getDomRoot'](_0x165e6d['rootName']);_0x3b6a42=Array['from'](_0x5f2be9['getClientRects']());}else{const _0x4bf0ab=this['editor']['model']['markers']['get']('revision:'+_0x5078ae['changeId']);_0x3b6a42=Array['from'](_0x3b233b['mapper']['markerNameToElements'](_0x4bf0ab['name']))['map'](_0x98ccb6=>_0x3b233b['view']['domConverter']['mapViewToDom'](_0x98ccb6))['map'](_0x157a15=>Array['from'](_0x157a15['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x3b6a42[0x0];return _0x3b6a42['find'](_0x419e52=>_0x419e52['top']-0x3<=this['_activeViewTarget']['y']&&_0x419e52['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x419e52['left']-0x3<=this['_activeViewTarget']['x']&&_0x419e52['right']+0x3>=this['_activeViewTarget']['x'])||_0x3b6a42[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x4142da,_0x1975c5,_0x4bf05e,_0x5ca5da)=>{this['activeView']=_0x4bf05e?this['_getViewForChange'](_0x4bf05e):null,this['editor']['model']['change'](()=>{const _0x243271=this['editor']['editing'];_0x5ca5da&&(_0x5ca5da['data']['isOnRoot']?_0x243271['view']['change'](_0x295d12=>{_0x295d12['removeClass']('ck-revision-history-root--active',_0x243271['view']['document']['getRoot'](_0x5ca5da['rootName']));}):_0x243271['reconvertMarker']('revision:'+_0x5ca5da['id'])),_0x4bf05e&&(_0x4bf05e['data']['isOnRoot']?_0x243271['view']['change'](_0x8ebdbc=>{_0x8ebdbc['addClass']('ck-revision-history-root--active',_0x243271['view']['document']['getRoot'](_0x4bf05e['rootName']));}):_0x243271['reconvertMarker']('revision:'+_0x4bf05e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x56c5d0,_0x5bf2cd)=>{if(this['activeChange'])return;const _0x19b908=this['_findChangeIdFromDomTarget'](_0x5bf2cd['target']),_0x36e9b6=this['_changeIdToChange']['get'](_0x19b908);_0x36e9b6?(this['_activeViewTarget']={'x':_0x5bf2cd['domEvent']['x'],'y':_0x5bf2cd['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x36e9b6)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x175943,_0x4d519b)=>{const _0x1e137e=this['_findChangeIdFromDomTarget'](_0x4d519b['target']),_0x137087=this['_changeIdToChange']['get'](_0x1e137e);_0x137087?(this['_activeViewTarget']={'x':_0x4d519b['domEvent']['x'],'y':_0x4d519b['domEvent']['y']},_0x137087===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x137087):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x2d2898){do{const _0x54804f=_0x2d2898['getAttribute']('data-change-id');if(_0x54804f)return _0x54804f;_0x2d2898=_0x2d2898['parent'];}while(_0x2d2898);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x50fa0a=>{for(const _0x545979 of this['editor']['model']['markers'])_0x50fa0a['removeMarker'](_0x545979);});}}function Z(_0x13e93f,_0x2beecf){return(_0x5da5af,_0xab72c7,_0x44fc60)=>{if(!_0x44fc60['consumable']['test'](_0xab72c7['markerRange'],_0x5da5af['name']))return;const _0x14c6c6=_0xab72c7['markerRange']['getWalker'](),_0x1cadb8=_0xab72c7['markerRange']['start'],_0x4e502d=_0x13e93f['model']['schema'];let _0x5a304c=null,_0x32a19f=null,_0x440827=!0x1,_0x14e7b2=!0x1;for(const _0x141730 of _0x14c6c6){const _0x4d5465=_0x141730['item'];_0x440827=_0x440827||_0x4e502d['isContent'](_0x4d5465);const _0x4ec594=_0x44fc60['mapper']['toViewElement'](_0x4d5465);if(_0x4ec594&&_0x4ec594['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x141730['type']&&(_0x4e502d['isBlock'](_0x4d5465)&&!_0x4e502d['isLimit'](_0x4d5465)&&(_0x4d5465['nextSibling']||_0x1cadb8['isAtEnd']?_0x5a304c&&_0x5a304c['parent']==_0x4d5465||(_0x5a304c=_0x4d5465,_0x1fdb7f(_0x141730['previousPosition']),_0x14e7b2=!0x0):_0x32a19f=_0x32a19f||_0x141730['previousPosition']));}function _0x1fdb7f(_0x50aa3a){const _0x4e01cc=_0x44fc60['mapper']['toViewPosition'](_0x50aa3a),_0x31a5c7=_0x44fc60['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2beecf});_0x44fc60['writer']['insert'](_0x4e01cc,_0x31a5c7),_0x44fc60['mapper']['bindElementToMarker'](_0x31a5c7,_0xab72c7['markerName']);}_0x440827||_0x14e7b2||!_0x32a19f||_0x1fdb7f(_0x32a19f);};}class pt extends _0x373fcf{constructor(_0x4419b8){super(_0x4419b8);const _0x3a7db8=_0x4419b8['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x3a7db8,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x3a7db8,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4d5915=this['editor'],_0x501ea9=_0x4d5915['plugins']['get'](d),_0x1407a1=_0x501ea9['isReady']?_0x501ea9['diff']['newRevisionId']:null;_0x4d5915['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1407a1);}['refresh'](){const {isReady:_0x2b7bfb,isEnabled:_0x1b5ae2,repository:_0x50c3aa,diff:_0x180f3f}=this['editor']['plugins']['get'](d),_0x105827=_0x180f3f&&_0x50c3aa['getLaterVisibleRevision'](_0x180f3f['newRevisionId']);this['isEnabled']=_0x2b7bfb&&_0x1b5ae2&&Boolean(_0x105827);}}class _t extends _0x373fcf{['_step'];constructor(_0x401e48,{direction:_0x3c1995}){super(_0x401e48);const _0x5a400e=_0x401e48['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x3c1995?0x1:-0x1,this['listenTo'](_0x5a400e,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5a400e,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5a400e,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4ff813=this['editor'],_0x1f54f7=_0x4ff813['plugins']['get'](d),{isNavigationMode:_0x410716,currentChangeNumber:_0x30ce27}=_0x1f54f7;let _0x5e543d;if(_0x1f54f7['activeChange']=_0x410716?_0x1f54f7['diff']['changes']['get'](_0x30ce27+this['_step']):_0x1f54f7['diff']['changes']['first'],_0x1f54f7['activeChange']['data']['isOnRoot'])_0x5e543d=_0x4ff813['editing']['view']['getDomRoot'](_0x1f54f7['activeChange']['rootName']);else{const _0x49ede5=_0x4ff813['model']['markers']['get']('revision:'+_0x1f54f7['activeChange']['id']);_0x5e543d=_0x368c0e(_0x4ff813['editing'],_0x49ede5);}_0xfed6b8({'target':_0x5e543d,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x21283c,currentChangeNumber:_0x1d3d99,numberOfChanges:_0xdd1cd2,isReady:_0x51a503,isEnabled:_0x4fe225}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x4fe225&&_0x51a503&&_0xdd1cd2)&&(!_0x21283c||(0x1===this['_step']?_0x1d3d99<_0xdd1cd2-0x1:_0x1d3d99>0x0));}}class ei extends ts{constructor(_0x53ce52){super(_0x53ce52);const _0x564a4d=this['bindTemplate'],_0x42cd71=new te(_0x53ce52),_0x2b2b0e=new te(_0x53ce52);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',(_0x5aeb96,_0x2af107)=>_0x5aeb96&&_0x2af107>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x2787fd,_0x591cdb,_0x4e0d63,_0x55c289)=>{if(!_0x2787fd)return m(_0x53ce52,'Loading...');if(!_0x4e0d63)return m(_0x53ce52,'No\x20changes');const _0x224ab2=m(_0x53ce52,'NUMBER_OF_CHANGES',_0x4e0d63);return _0x55c289?m(_0x53ce52,'X_OF_Y_CHANGES',[_0x591cdb+0x1,_0x4e0d63]):_0x224ab2;}),_0x42cd71['set']({'label':m(_0x53ce52,'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'}),_0x2b2b0e['set']({'label':m(_0x53ce52,'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'}),_0x42cd71['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2b2b0e['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x42cd71['on']('execute',()=>this['fire']('execute','backward')),_0x2b2b0e['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',_0x564a4d['if']('_isStatusLabelVisible','ck-hidden',_0x237f2b=>!_0x237f2b)]},'children':[{'text':_0x564a4d['to']('isNavigationMode',_0x17eda0=>_0x17eda0?m(_0x53ce52,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x53ce52,'Total')+':\x20')}]},{'text':_0x564a4d['to']('_statusText')}]},new _0x1152d7(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x42cd71,_0x2b2b0e]}]});}}const le='ck-editor__editable__loading-overlay';class de extends _0x43da28{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2d720f=this['editor']['editing']['view'];_0x2d720f['change'](_0x400340=>{for(const _0x14fba3 of _0x2d720f['document']['roots'])_0x400340['addClass'](le,_0x14fba3);});}['hide'](){const _0x16a8b8=this['editor']['editing']['view'];_0x16a8b8['change'](_0x14df13=>{for(const _0x4efbfd of _0x16a8b8['document']['roots'])_0x14df13['removeClass'](le,_0x4efbfd);});}}class g extends _0x43da28{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,de];}['init'](){const _0x39703e=this['editor'],_0x30b188=_0x39703e['plugins']['get'](d),_0x4a8186=_0x39703e['plugins']['get'](de);_0x39703e['ui']['componentFactory']['add']('exitToEditing',_0x3b84f2=>{const _0x302ce4=new te(_0x3b84f2);return _0x302ce4['set']({'label':m(_0x3b84f2,'Back\x20to\x20editing'),'icon':_0x5b095b['undo'],'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x302ce4,'execute',()=>{_0x39703e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x302ce4;}),_0x39703e['ui']['componentFactory']['add']('restoreRevision',_0x5aeccb=>{const _0x1993ea=new te(_0x5aeccb);return _0x1993ea['set']({'label':m(_0x5aeccb,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1993ea['bind']('isEnabled')['to'](_0x39703e['commands']['get']('restoreRevision')),this['listenTo'](_0x1993ea,'execute',()=>_0x39703e['execute']('restoreRevision')),_0x1993ea;}),_0x39703e['ui']['componentFactory']['add']('changesNavigation',_0x15d9bb=>{const _0x10cbae=new ei(_0x15d9bb),_0x161398=_0x39703e['commands']['get']('showPreviousChange'),_0x4eee3d=_0x39703e['commands']['get']('showNextChange');return _0x10cbae['bind']('isBackwardNavigationEnabled')['to'](_0x161398,'isEnabled'),_0x10cbae['bind']('isForwardNavigationEnabled')['to'](_0x4eee3d,'isEnabled'),_0x10cbae['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x30b188),this['listenTo'](_0x10cbae,'execute',(_0x32bc3c,_0x19626b)=>{_0x39703e['execute']('forward'===_0x19626b?'showNextChange':'showPreviousChange');}),_0x10cbae;}),_0x4a8186['show'](),_0x30b188['on']('change:isReady',(_0x5aabe7,_0x53bea7,_0x249286)=>{_0x249286?_0x4a8186['hide']():_0x4a8186['show']();});}}class at extends _0x3333b0{['_resizeObserver']=null;constructor(_0x1a4268,_0x3dc926){super(_0x1a4268,_0x3dc926);const _0x2e474e=this['bindTemplate'];this['set']({'label':m(_0x1a4268,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x1a4268,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x2e474e['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 _0x552857=this['fieldView']['element'];this['_tooltipString']=_0x552857['scrollWidth']>_0x552857['clientWidth']&&_0x552857['value']||'';}}class ni extends ts{constructor(_0x1f5f7f,_0x4c8e0f,_0x4dafa4){super(_0x1f5f7f);const _0x1900ef=new _0x34f4ef();_0x1900ef['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 _0x33031d=['ck','ck-revision-history-sidebar__revision-author'];_0x4dafa4&&_0x33031d['push']('ck-revision-history-sidebar__revision-author_creator');const _0x57a756=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x1f5f7f,_0x4dafa4?'Revision\x20creator':'Revision\x20author')},'children':[_0x1900ef,_0x4c8e0f['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x33031d},'children':_0x57a756});}}function ci(_0x1d2934,_0x3c9ae9){const _0xc107b4=_0x1d2934['bindTemplate'],_0x7a74d=_0x1d2934['locale'],_0x41448a=_0x47471b(_0x7a74d);_0x41448a['panelPosition']='sw';const _0x439be1=function(_0xd5cf62,_0x53e12e){const _0x2db475=function(_0xa6832f,_0x497c40){const _0xf76a25=_0xa6832f['locale'],_0x224e3f={'Compare\x20against\x20selected':m(_0xf76a25,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0xf76a25,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0xf76a25,'Restore\x20this\x20revision')};return _0x497c40['map'](_0x2d5794=>{const _0x477b4b=_0x224e3f[_0x2d5794['name']];return _0x477b4b&&_0x477b4b!==_0x2d5794['name']&&(_0x2d5794['name']=_0x477b4b),_0x2d5794;});}(_0xd5cf62,_0x53e12e),_0x4def37=new _0x13b5e8();for(const _0x133184 of _0x2db475){const _0x48330f={'type':'button','model':new _0x45eb5e({'label':_0x133184['name'],'class':_0x133184['class'],'withText':!0x0,'role':'menuitem','_action':_0x133184['action']})};_0x48330f['model']['bind']('isEnabled')['to'](_0xd5cf62,'isActionsDropdownOpen',_0x4a49e5=>'function'!=typeof _0x133184['isEnabled']||(!_0x4a49e5||_0x133184['isEnabled'](_0xd5cf62))),_0x4def37['add'](_0x48330f);}return _0x4def37;}(_0x1d2934,_0x3c9ae9);return _0x1d2934['bind']('isActionsDropdownOpen')['to'](_0x41448a,'isOpen'),_0x41448a['buttonView']['set']({'label':m(_0x7a74d,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x5b095b['threeVerticalDots']}),_0x41448a['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0xc107b4['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0xc107b4['to'](_0x2301f8=>_0x2301f8['stopPropagation']())}}),_0x41448a['on']('execute',_0x372e5c=>{_0x1d2934['isReady']&&'function'==typeof _0x372e5c['source']['_action']&&_0x372e5c['source']['_action'](_0x1d2934);}),to(_0x41448a,_0x439be1,{'role':'menu'}),_0x41448a['listenTo'](_0x1d2934,'change:isActionsDropdownOpen',(_0x3170ff,_0x9b6702,_0x10b2c4)=>{if(_0x10b2c4)for(const _0x271ca1 of _0x41448a['listView']['items']){const _0xb599fa=_0x271ca1['children']['first'],_0x2a7447=_0x3c9ae9['find'](_0x5d631c=>_0x5d631c['action']===_0xb599fa['_action'])['isVisible'];_0x271ca1['isVisible']=void 0x0===_0x2a7447||_0x2a7447(_0x1d2934);}}),_0x41448a;}class di extends/* #__PURE__ -- @preserve */
26
+ _0x5af527(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x5ee0c8,_0x2a1c57,_0x4a4c66,_0xa2c7a8){super(_0x5ee0c8);const _0x16cea2=this['bindTemplate'],_0x340e15=function(_0x5a4333,_0x2a3aff){const _0x5e28eb=Array['from'](_0x2a3aff['authors'])['filter'](_0x2f2a3d=>_0x2f2a3d!=_0x2a3aff['creator']);return _0x2a3aff['creator']&&_0x5e28eb['unshift'](_0x2a3aff['creator']),_0x5e28eb['map'](_0x52cd06=>new ni(_0x5a4333,_0x52cd06,_0x52cd06==_0x2a3aff['creator']));}(_0x5ee0c8,_0x2a1c57);this['id']=_0x2a1c57['id'],this['_revision']=_0x2a1c57,this['_requireRevisionName']=_0xa2c7a8,this['bind']('name','createdAt')['to'](_0x2a1c57),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x53e0be=>{return _0x31e26f=_0x5ee0c8['uiLanguage'],(_0x1a491c=_0x53e0be)['toLocaleDateString'](_0x31e26f,{'month':'long','day':'numeric'})+',\x20'+_0x1a491c['toLocaleTimeString'](_0x31e26f,{'hour':'numeric','minute':'numeric'});var _0x31e26f,_0x1a491c;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new at(_0x5ee0c8,_0x380cb7),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x32b886=>_0x32b886||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x21aece,_0xf5cf77)=>_0x21aece&&_0xf5cf77),this['revisionActionsView']=_0x4a4c66&&_0x4a4c66['length']?ci(this,_0x4a4c66):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x16cea2['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x16cea2['if']('isEnabled','ck-disabled',_0x3cac22=>!_0x3cac22),_0x16cea2['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x16cea2['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x16cea2['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':_0x16cea2['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':_0x340e15}]},this['revisionActionsView']],'on':{'click':_0x16cea2['to'](_0x1d9651=>{_0x1d9651['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x5b4576=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x5b4576,'change',()=>{this['_requireRevisionName']&&!_0x5b4576['value']||this['fire']('setName',{'id':this['id'],'name':_0x5b4576['value']}),_0x5b4576['value']||(_0x5b4576['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(_0x49fc75,_0x46f32e){const _0x5333ab=_0x26d640['fromJSDate'](_0x49fc75)['setLocale'](_0x46f32e),_0x11d2b5=_0x26d640['local'](),_0x2934e9=_0x11d2b5['minus']({'days':0x1})['startOf']('day');let _0x598edd,_0x12dac9;return _0x5333ab['hasSame'](_0x11d2b5,'day')?(_0x598edd=_0x5333ab['startOf']('day')['toJSDate'](),_0x12dac9=_0x5333ab['toRelativeCalendar']()):_0x5333ab['hasSame'](_0x2934e9,'day')?(_0x598edd=_0x2934e9['toJSDate'](),_0x12dac9=_0x5333ab['toRelativeCalendar']()):_0x5333ab['hasSame'](_0x11d2b5,'week')?(_0x598edd=_0x5333ab['startOf']('week')['toJSDate'](),_0x12dac9=_0x5333ab['weekdayLong']||''):_0x5333ab['hasSame'](_0x11d2b5,'year')?(_0x598edd=_0x5333ab['startOf']('month')['toJSDate'](),_0x12dac9=_0x5333ab['monthLong']||''):(_0x598edd=_0x5333ab['startOf']('year')['toJSDate'](),_0x12dac9=String(_0x5333ab['year'])),{'startDate':_0x598edd,'localizedPeriodName':_0x12dac9};}class vi extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3bbdfd,_0x581e3a,_0x2cbb24,_0x36086f){super(_0x3bbdfd);const _0x2b0e0f=mi(_0x581e3a,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x581e3a,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x2cbb24,this['_requireRevisionName']=_0x36086f,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':_0x2b0e0f}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2e29c6){const _0x49268f=new di(this['locale'],_0x2e29c6,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x49268f);}['removeRevision'](_0x4abf80){const _0x4ef681=this['revisionViews']['find'](_0x5937cf=>_0x5937cf['id']===_0x4abf80['id']);this['revisionViews']['remove'](_0x4ef681);}}class as extends ts{constructor(_0x4fd662){super(_0x4fd662);const _0x16fc13=new _0x34f4ef();_0x16fc13['content']=_0x5b095b['history'],this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x16fc13,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x4fd662,'Revision\x20history')]}]});}}class li extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2ea771,_0x56564a,_0x261042,_0x5112d0){super(_0x2ea771);const _0x56989c=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x56564a,this['_revisionActions']=_0x261042,this['_requireRevisionName']=_0x5112d0,this['on']('select',(_0x45c24c,_0x160d2a)=>{this['fire']('revisionSelected',_0x160d2a);}),this['on']('setName',(_0x106704,_0x3405fb)=>{this['fire']('revisionSetName',_0x3405fb);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x2ea771),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x56989c['if']('isEnabled','ck-disabled',_0xf35ca=>!_0xf35ca)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x74a829 of this['_revisions'])this['_addRevision'](_0x74a829);this['_revisions']['on']('add',(_0x19cefb,_0xe16f9f)=>{this['_addRevision'](_0xe16f9f);}),this['_revisions']['on']('remove',(_0xe5f89b,_0x533b00)=>{this['_removeRevision'](_0x533b00);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x274847=>_0x274847['revisionViews']['map'](_0x46571b=>_0x46571b))['flat']();}['selectRevision'](_0x4a7a49){for(const _0x146703 of this['revisionViews'])_0x4a7a49&&_0x4a7a49['id']===_0x146703['id']?_0x146703['select']():_0x146703['deselect']();}['highlightRevisions'](_0x18e05f){for(const _0x177baa of this['revisionViews'])_0x18e05f['some'](({id:_0x366abc})=>_0x366abc===_0x177baa['id'])?_0x177baa['highlight']():_0x177baa['unhighlight']();}['_addRevision'](_0x3594c3){const _0x915845=mi(_0x3594c3['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x2a2f3d=this['timePeriodViews']['get'](0x0);_0x2a2f3d&&_0x2a2f3d['startDate']['getTime']()===_0x915845['getTime']()||(_0x2a2f3d=new vi(this['locale'],_0x915845,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x2a2f3d)),_0x2a2f3d['addRevision'](_0x3594c3);}['_removeRevision'](_0x6ec81d){const _0x1dde9d=mi(_0x6ec81d['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x1dde9d)['removeRevision'](_0x6ec81d);}['_getTimePeriodViewByStartDate'](_0x458de9){return this['timePeriodViews']['find'](_0x5b63f0=>_0x5b63f0['startDate']['getTime']()===_0x458de9['getTime']());}}class w extends _0x43da28{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
27
27
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
28
- yt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x294b2f){super(_0x294b2f),this['_revisionViewer']=_0x294b2f['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x4313d7=this['_revisionsRepository']['_revisions'],_0x559144=this['_createRevisionActions'](),_0x30d0de=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ii(this['editor']['locale'],_0x4313d7,_0x559144,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',(_0x30f3fc,_0x8a549f)=>{_0x8a549f['revisionViews']['on']('add',(_0x4a3261,_0x40ab94)=>{_0x40ab94['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)),_0x30d0de['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x188055=this['_revisionsRepository']['getRevision'](0x0);if(_0x188055){const _0x4f7894=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x188055['id']);this['_revisionViewer']['compare'](_0x188055,_0x4f7894);}}['_handleRevisionSelected'](_0x1252ae,_0x34fdf4){const _0x322471=this['_revisionsRepository']['getRevision'](_0x34fdf4['id']),_0x433bc4=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x322471['id']);this['_revisionViewer']['compare'](_0x322471,_0x433bc4);}['_handleRevisionSetName'](_0x4d93d5,_0x404597){this['_revisionsRepository']['getRevision'](_0x404597['id'])['setName'](_0x404597['name']);}['_handleDiffChange'](_0x5ede94,_0x16c1e1,_0x4b17fe){const _0x1be188=this['_revisionsRepository']['getRevisionsInDiff'](_0x4b17fe);_0x1be188['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x1be188),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x1be188[0x0]));}['_createRevisionActions'](){const _0x48e418=this['editor'],_0x323865=g['availableRevisionActions'],_0x1e5b47=_0x48e418['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x1e5b47['length'])return _0x1e5b47['map'](_0x388a01=>{const _0x3158c9='string'==typeof _0x388a01?Object['assign']({},_0x323865[_0x388a01]):_0x388a01;return _0x3158c9['action']=_0x3158c9['action']['bind'](this,_0x48e418),_0x3158c9['isVisible']&&(_0x3158c9['isVisible']=_0x3158c9['isVisible']['bind'](this,_0x48e418)),_0x3158c9;});}}function yt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x5ea5f4},_0x1aa24d)=>{const _0xd826dd=_0x5ea5f4['get'](d),_0x3916c6=_0xd826dd['repository'];let _0x5d0d7e=_0xd826dd['diff']['newRevisionId'],_0x22e516=_0x1aa24d['id'];_0x3916c6['getIndex'](_0x5d0d7e)>_0x3916c6['getIndex'](_0x22e516)&&([_0x5d0d7e,_0x22e516]=[_0x22e516,_0x5d0d7e]),_0xd826dd['compare'](_0x5d0d7e,_0x22e516);},'isVisible':({plugins:_0x2d05f2},_0x30647d)=>{const _0x1a2975=_0x2d05f2['get'](d);return!(_0x1a2975['repository']['getRevisionsInDiff'](_0x1a2975['diff'])['length']>0x2)&&!_0x30647d['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x13eb55,{id:_0x4b0790})=>{_0x13eb55['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4b0790);},'isVisible':({plugins:_0x35cd8c},_0x13c4b1)=>!!_0x35cd8c['get'](d)['repository']['getLaterVisibleRevision'](_0x13c4b1['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x10c463},{id:_0x34a9bd,revisionNameView:_0x358c17})=>{const _0x4ec7c3=_0x10c463['get'](d),_0x54abdb=_0x4ec7c3['repository']['getEarlierVisibleRevision'](_0x34a9bd);_0x4ec7c3['compare'](_0x34a9bd,_0x54abdb),_0x358c17['focus'](),_0x358c17['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x4f15bb,_0x447bd4){super(_0x4f15bb),this['_view']=_0x447bd4,this['_toolbarConfig']=ot(_0x4f15bb['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x2c095d){const _0x27954f=this['editor'],_0x3fd3f6=this['view'],_0x21ea4c=_0x27954f['editing']['view'],_0x3f33ca=_0x3fd3f6['editable'],_0x37328c=_0x21ea4c['document']['getRoot']();_0x3f33ca['name']=_0x37328c['rootName'],_0x3fd3f6['render']();const _0x5272ce=_0x3f33ca['element'];this['setEditableElement'](_0x3f33ca['name'],_0x5272ce),_0x3fd3f6['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x21ea4c['attachDomRoot'](_0x5272ce),this['_elementReplacer']['replace'](_0x2c095d,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x1b047c=this['view'],_0x521119=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x521119['detachDomRoot'](_0x1b047c['editable']['name']),_0x1b047c['destroy']();}['_initToolbar'](){const _0x232f14=this['view'];_0x232f14['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x232f14['stickyPanel']['limiterElement']=_0x232f14['element'],_0x232f14['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x367346})=>_0x367346),_0x232f14['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x232f14['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x15979f,_0x2c20ed,_0x30be69={}){super(_0x15979f),this['stickyPanel']=new lt(_0x15979f),this['toolbar']=new nt(_0x15979f,{'shouldGroupWhenFull':_0x30be69['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x15979f,_0x2c20ed);}['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(_0x42d5d0,_0x4b5645){super(_0x4b5645),this['sourceElement']=_0x42d5d0,this['model']['document']['createRoot']();const _0x11aa0b=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x11aa0b);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4f6c4e,_0x18afcb){const _0xa95651=new this(_0x4f6c4e,_0x18afcb);return await _0xa95651['initPlugins'](),await _0xa95651['ui']['init'](_0x4f6c4e),await _0xa95651['data']['init'](_0xa95651['config']['get']('initialData')||''),_0xa95651['fire']('ready'),_0xa95651;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class bt extends _0x4191c7{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x324be5){function _0x4090fc(_0x4a5574){return _0x4a5574['map'](_0x4310e9=>String['fromCharCode'](_0x4310e9))['join']('');}super(_0x324be5),this['result']='end',_0x324be5[_0x4090fc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4090fc([0x76,0x69,0x65,0x77])][_0x4090fc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4090fc([0x61,0x75,0x74,0x6f]),_0x324be5[_0x4090fc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4090fc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4090fc([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4090fc([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4090fc([0x6f,0x6b])});}}class k extends _0x4191c7{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x40f489){if(super(_0x40f489),!this['editor']['config']['get']('revisionHistory'))throw new _0x133ad6('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x5cf561=>this['_showRevisionViewer']({..._0x5cf561,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x175c97=>this['_closeRevisionViewer'](_0x175c97)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x2e5f10=>this['_restoreRevision'](_0x2e5f10)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x371196){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x371196;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3c9805){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3c9805);}['getRevision'](_0x45ab62){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x45ab62);}['getRevisions'](_0x5148d4){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5148d4||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x1119a6=this['editor'],_0x92c3b3=_0x41570e(_0x1119a6,p),_0xae7bbf=_0x1119a6['plugins']['get']('RevisionTracker'),_0x5a93f7=_0x1119a6['plugins']['get']('Users')['users'];return _0x92c3b3['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x92c3b3['lazyRoots'],(_0x92c3b3['plugins']['push'](bt,d,w,class extends _0x4191c7{static get['requires'](){return[d,'Users'];}['init'](){const _0x2a9a19=this['editor']['plugins']['get']('Users');for(const _0x319670 of _0x5a93f7)_0x319670['isAnonymous']||_0x2a9a19['getUser'](_0x319670['id'])||_0x2a9a19['addUser'](_0x319670);const _0x7f212=_0xae7bbf['repository']['getRevisions']();let _0xb82483=null;const _0x13c217=this['editor']['plugins']['get']('RevisionViewer');_0x13c217['adapter']=_0xae7bbf['adapter'],_0x13c217['bind']('isEnabled')['to'](_0xae7bbf),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x1119a6,'isReadOnly',_0x3da970=>!_0x3da970);for(const _0xba7ee1 of _0x7f212){const _0x1dbed4=null===_0xba7ee1['creator'];if(_0x1dbed4&&_0xba7ee1['toVersion']===_0xba7ee1['fromVersion'])continue;const _0x38c9d5=_0xba7ee1['toJSON']();_0x13c217['addRevisionData'](_0x38c9d5,(_0x1a0858,_0x268255,_0x2311f3)=>{if(_0x1dbed4){if(_0xb82483)_0xb82483['_update'](_0x1a0858,_0x268255);else{if(!_0x268255){const _0x2db7b0=_0x2311f3['toJSON']();_0x2db7b0['id']=_0x54786b(),_0xae7bbf['saveRevision'](_0x2db7b0,_0x2311f3['toVersion'])['then'](_0x2a0148=>{_0xb82483=_0x2a0148;});}}}else _0xba7ee1['_update'](_0x1a0858,_0x268255);});}}},g),_0x92c3b3);}['_enhanceShowRevisionViewerCallback'](){const _0x241efa=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x5303b8=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x43b677=this['editor']['plugins']['get']('Autosave');await _0x43b677['save']();}else await _0x5303b8['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x37912a=this['editor']['plugins']['get']('Dialog');_0x37912a['isOpen']&&_0x37912a['hide']();}const _0x3cdc93=this['_getRevisionViewerEditorConfig']();return _0x241efa(_0x3cdc93)['then'](_0x44cc94=>{return(this['_viewerEditor']=_0x44cc94,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x44cc94;})['catch'](_0x561982=>(console['error'](_0x561982),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x5d676f=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'](),_0x5d676f(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x23ba85=this['editor']['plugins']['get']('Annotations');_0x23ba85['refreshVisibility'](),_0x23ba85['refreshPositioning']();}})));}['_showRevisionViewer'](_0x4655d8){const _0x36029e=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4d623e=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3d849e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x3d849e,_0x4655d8)['then'](_0x2e4714=>(_0x4d623e['style']['display']='block',_0x36029e['style']['display']='none',_0x2e4714));}['_closeRevisionViewer'](_0x42b7a6){const _0xcd180d=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0xcd180d['style']['display']='',_0x42b7a6['destroy']();}async['_restoreRevision'](_0x272402){const _0x341190=this['editor'],_0x4d19f3=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1612e7=_0x341190['plugins']['get']('RevisionTracker'),_0x2d11e2=_0x4d19f3['repository']['getRevision'](_0x272402);let _0x4739af,_0x156508,_0x26c344;try{_0x4739af=await _0x4d19f3['getRevisionData'](_0x2d11e2),_0x156508=await _0x4d19f3['getRevisionRootsAttributes'](_0x2d11e2);}catch(_0x5b139d){return void console['error'](_0x5b139d);}_0x341190['model']['change'](_0x2b3f1f=>{for(const _0x22250e of Array['from'](_0x341190['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2b3f1f['removeMarker'](_0x22250e);}),_0x4d19f3['isReady']=!0x1,_0x341190['model']['enqueueChange'](_0x360d07=>{_0x360d07['setSelection'](null),_0x360d07['removeSelectionAttribute'](_0x341190['model']['document']['selection']['getAttributeKeys']());const _0x533099=Object['keys'](_0x4739af);for(const _0x4ee580 of _0x341190['model']['document']['roots'])'$graveyard'!=_0x4ee580['rootName']&&_0x4ee580['isAttached']()&&!_0x533099['includes'](_0x4ee580['rootName'])&&_0x360d07['detachRoot'](_0x4ee580);for(const _0x325df8 of _0x533099){let _0x58fe26=_0x341190['model']['document']['getRoot'](_0x325df8);_0x58fe26&&_0x58fe26['isAttached']()||(_0x58fe26=_0x360d07['addRoot'](_0x325df8));const _0x4ad53e=_0x156508[_0x325df8],_0x37ef10=Object['keys'](_0x4ad53e),_0xc141d1=_0x4739af[_0x325df8];for(const _0xb7440c of _0x58fe26['getAttributeKeys']())_0x37ef10['includes'](_0xb7440c)||_0x360d07['removeAttribute'](_0xb7440c,_0x58fe26);for(const _0x529d0f of _0x37ef10)_0x360d07['setAttribute'](_0x529d0f,_0x156508[_0x325df8][_0x529d0f],_0x58fe26);_0x360d07['remove'](_0x360d07['createRangeIn'](_0x58fe26)),_0x360d07['insert'](_0x341190['data']['parse'](_0xc141d1,_0x58fe26),_0x58fe26,0x0);}});const _0x261895=m(_0x341190['locale'],'Restored');if(_0x2d11e2['name'])_0x26c344=-0x1==_0x2d11e2['name']['indexOf'](_0x261895)?_0x261895+':\x20'+_0x2d11e2['name']:_0x2d11e2['name'];else _0x26c344=_0x261895+':\x20'+(_0x2d11e2['createdAt']['toLocaleDateString'](_0x341190['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x2d11e2['createdAt']['toLocaleTimeString'](_0x341190['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1612e7['saveRevision']({'name':_0x26c344}),_0x4d19f3['isReady']=!0x0,_0x341190['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,ge 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(_0x4f2fae){super(_0x4f2fae),this['_revisionViewer']=_0x4f2fae['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x24af96=this['_revisionsRepository']['_revisions'],_0x50f4a3=this['_createRevisionActions'](),_0x50da9d=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new li(this['editor']['locale'],_0x24af96,_0x50f4a3,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',(_0x2ade65,_0xf8eec1)=>{_0xf8eec1['revisionViews']['on']('add',(_0x5da286,_0x3890a5)=>{_0x3890a5['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)),_0x50da9d['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x4a6006=this['_revisionsRepository']['getRevision'](0x0);if(_0x4a6006){const _0x4478c6=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4a6006['id']);this['_revisionViewer']['compare'](_0x4a6006,_0x4478c6);}}['_handleRevisionSelected'](_0x1f33c1,_0x188482){const _0x2ca961=this['_revisionsRepository']['getRevision'](_0x188482['id']),_0x9921f4=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x2ca961['id']);this['_revisionViewer']['compare'](_0x2ca961,_0x9921f4);}['_handleRevisionSetName'](_0x19e021,_0x56bf21){this['_revisionsRepository']['getRevision'](_0x56bf21['id'])['setName'](_0x56bf21['name']);}['_handleDiffChange'](_0x1e92d0,_0x35be4e,_0x50d0e1){const _0x3a16cd=this['_revisionsRepository']['getRevisionsInDiff'](_0x50d0e1);_0x3a16cd['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x3a16cd),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x3a16cd[0x0]));}['_createRevisionActions'](){const _0x5e576f=this['editor'],_0x365870=w['availableRevisionActions'],_0x42a588=_0x5e576f['config']['get']('revisionHistory.revisionActions')||w['defaultRevisionActions'];if(_0x42a588['length'])return _0x42a588['map'](_0x192f10=>{const _0x3fc5af='string'==typeof _0x192f10?Object['assign']({},_0x365870[_0x192f10]):_0x192f10;return _0x3fc5af['action']=_0x3fc5af['action']['bind'](this,_0x5e576f),_0x3fc5af['isVisible']&&(_0x3fc5af['isVisible']=_0x3fc5af['isVisible']['bind'](this,_0x5e576f)),_0x3fc5af;});}}function yt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0xf0158},_0x36625f)=>{const _0x131290=_0xf0158['get'](d),_0x5d44b9=_0x131290['repository'];let _0x5522f3=_0x131290['diff']['newRevisionId'],_0x53b4af=_0x36625f['id'];_0x5d44b9['getIndex'](_0x5522f3)>_0x5d44b9['getIndex'](_0x53b4af)&&([_0x5522f3,_0x53b4af]=[_0x53b4af,_0x5522f3]),_0x131290['compare'](_0x5522f3,_0x53b4af);},'isVisible':({plugins:_0xffdc4e},_0x1169b4)=>{const _0x2b2c80=_0xffdc4e['get'](d);return!(_0x2b2c80['repository']['getRevisionsInDiff'](_0x2b2c80['diff'])['length']>0x2)&&!_0x1169b4['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0xf0f6e1,{id:_0x5e102b})=>{_0xf0f6e1['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x5e102b);},'isVisible':({plugins:_0x4b0548},_0x4a013f)=>!!_0x4b0548['get'](d)['repository']['getLaterVisibleRevision'](_0x4a013f['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xab813},{id:_0x30808e,revisionNameView:_0x46547d})=>{const _0x34ca72=_0xab813['get'](d),_0x3d2d99=_0x34ca72['repository']['getEarlierVisibleRevision'](_0x30808e);_0x34ca72['compare'](_0x30808e,_0x3d2d99),_0x46547d['focus'](),_0x46547d['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x316c1f,_0xeef77){super(_0x316c1f),this['_view']=_0xeef77,this['_toolbarConfig']=ot(_0x316c1f['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x485883){const _0x186ae0=this['editor'],_0x2c5e28=this['view'],_0x1b2517=_0x186ae0['editing']['view'],_0x277d38=_0x2c5e28['editable'],_0x5687c9=_0x1b2517['document']['getRoot']();_0x277d38['name']=_0x5687c9['rootName'],_0x2c5e28['render']();const _0x4b26c3=_0x277d38['element'];this['setEditableElement'](_0x277d38['name'],_0x4b26c3),_0x2c5e28['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1b2517['attachDomRoot'](_0x4b26c3),this['_elementReplacer']['replace'](_0x485883,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x3df3e2=this['view'],_0x139fb9=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x139fb9['detachDomRoot'](_0x3df3e2['editable']['name']),_0x3df3e2['destroy']();}['_initToolbar'](){const _0x7e85ac=this['view'];_0x7e85ac['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x7e85ac['stickyPanel']['limiterElement']=_0x7e85ac['element'],_0x7e85ac['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x1e5acc})=>_0x1e5acc),_0x7e85ac['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x7e85ac['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x237759,_0x2909fe,_0x34f56d={}){super(_0x237759),this['stickyPanel']=new ut(_0x237759),this['toolbar']=new lt(_0x237759,{'shouldGroupWhenFull':_0x34f56d['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x237759,_0x2909fe);}['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(_0x3c7a8c,_0xd839d9){super(_0xd839d9),this['sourceElement']=_0x3c7a8c,this['model']['document']['createRoot']();const _0x381044=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x381044);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x4b8b99,_0x47f6f3){const _0x513ad7=new this(_0x4b8b99,_0x47f6f3);return await _0x513ad7['initPlugins'](),await _0x513ad7['ui']['init'](_0x4b8b99),await _0x513ad7['data']['init'](_0x513ad7['config']['get']('initialData')||''),_0x513ad7['fire']('ready'),_0x513ad7;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class bt extends _0x43da28{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ff4f5){function _0x4414d1(_0x32b104){return _0x32b104['map'](_0x5da95d=>String['fromCharCode'](_0x5da95d))['join']('');}super(_0x4ff4f5),this['result']='end',_0x4ff4f5[_0x4414d1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4414d1([0x76,0x69,0x65,0x77])][_0x4414d1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4414d1([0x61,0x75,0x74,0x6f]),_0x4ff4f5[_0x4414d1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4414d1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4414d1([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4414d1([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4414d1([0x6f,0x6b])});}}class k extends _0x43da28{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,u];}constructor(_0x520b75){if(super(_0x520b75),!this['editor']['config']['get']('revisionHistory'))throw new _0x272203('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4bbaea=>this['_showRevisionViewer']({..._0x4bbaea,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x28a7cf=>this['_closeRevisionViewer'](_0x28a7cf)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x322398=>this['_restoreRevision'](_0x322398)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4fc994){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4fc994;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3cc2d4){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3cc2d4);}['getRevision'](_0x3a11e0){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3a11e0);}['getRevisions'](_0x5ec9c7){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x5ec9c7||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4d6a21=this['editor'],_0x1533f0=_0x4ef1d0(_0x4d6a21,p),_0x5584ff=_0x4d6a21['plugins']['get']('RevisionTracker'),_0xda12f7=_0x4d6a21['plugins']['get']('Users')['users'];return _0x1533f0['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1533f0['lazyRoots'],(_0x1533f0['plugins']['push'](bt,d,g,class extends _0x43da28{static get['requires'](){return[d,'Users'];}['init'](){const _0x4316b2=this['editor']['plugins']['get']('Users');for(const _0x553911 of _0xda12f7)_0x553911['isAnonymous']||_0x4316b2['getUser'](_0x553911['id'])||_0x4316b2['addUser'](_0x553911);const _0x1c24cf=_0x5584ff['repository']['getRevisions']();let _0x89c4bd=null;const _0x3c5790=this['editor']['plugins']['get']('RevisionViewer');_0x3c5790['adapter']=_0x5584ff['adapter'],_0x3c5790['bind']('isEnabled')['to'](_0x5584ff),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4d6a21,'isReadOnly',_0x248863=>!_0x248863);for(const _0x36df52 of _0x1c24cf){const _0x1224f2=null===_0x36df52['creator'];if(_0x1224f2&&_0x36df52['toVersion']===_0x36df52['fromVersion'])continue;const _0x35ae06=_0x36df52['toJSON']();_0x3c5790['addRevisionData'](_0x35ae06,(_0x12be80,_0x513980,_0x446dd7)=>{if(_0x1224f2){if(_0x89c4bd)_0x89c4bd['_update'](_0x12be80,_0x513980);else{if(!_0x513980){const _0x587ef2=_0x446dd7['toJSON']();_0x587ef2['id']=_0x4f9af2(),_0x5584ff['saveRevision'](_0x587ef2,_0x446dd7['toVersion'])['then'](_0x481717=>{_0x89c4bd=_0x481717;});}}}else _0x36df52['_update'](_0x12be80,_0x513980);});}}},w),_0x1533f0);}['_enhanceShowRevisionViewerCallback'](){const _0x41109d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x1e699e=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x4ac7c4=this['editor']['plugins']['get']('Autosave');await _0x4ac7c4['save']();}else await _0x1e699e['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x51fa57=this['editor']['plugins']['get']('Dialog');_0x51fa57['isOpen']&&_0x51fa57['hide']();}const _0x506c48=this['_getRevisionViewerEditorConfig']();return _0x41109d(_0x506c48)['then'](_0x5f972d=>{return(this['_viewerEditor']=_0x5f972d,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x5f972d;})['catch'](_0x2dafd3=>(console['error'](_0x2dafd3),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x35b2a7=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'](),_0x35b2a7(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4c15e5=this['editor']['plugins']['get']('Annotations');_0x4c15e5['refreshVisibility'](),_0x4c15e5['refreshPositioning']();}})));}['_showRevisionViewer'](_0x512b4d){const _0x113f8e=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x4b439d=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x723d8d=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x723d8d,_0x512b4d)['then'](_0x9782a5=>(_0x4b439d['style']['display']='block',_0x113f8e['style']['display']='none',_0x9782a5));}['_closeRevisionViewer'](_0x16c3f6){const _0x1eb293=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x1eb293['style']['display']='',_0x16c3f6['destroy']();}async['_restoreRevision'](_0x5db79e){const _0x518e6c=this['editor'],_0x5bc47a=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x48078e=_0x518e6c['plugins']['get']('RevisionTracker'),_0x1217f2=_0x5bc47a['repository']['getRevision'](_0x5db79e);let _0x2ddf8e,_0x596c26,_0x11498e;try{_0x2ddf8e=await _0x5bc47a['getRevisionData'](_0x1217f2),_0x596c26=await _0x5bc47a['getRevisionRootsAttributes'](_0x1217f2);}catch(_0x425dbd){return void console['error'](_0x425dbd);}_0x518e6c['model']['change'](_0x1301a5=>{for(const _0x2107e3 of Array['from'](_0x518e6c['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x1301a5['removeMarker'](_0x2107e3);}),_0x5bc47a['isReady']=!0x1,_0x518e6c['model']['enqueueChange'](_0x59898d=>{_0x59898d['setSelection'](null),_0x59898d['removeSelectionAttribute'](_0x518e6c['model']['document']['selection']['getAttributeKeys']());const _0x41214=Object['keys'](_0x2ddf8e);for(const _0x153e29 of _0x518e6c['model']['document']['roots'])'$graveyard'!=_0x153e29['rootName']&&_0x153e29['isAttached']()&&!_0x41214['includes'](_0x153e29['rootName'])&&_0x59898d['detachRoot'](_0x153e29);for(const _0x23b09a of _0x41214){let _0x30c825=_0x518e6c['model']['document']['getRoot'](_0x23b09a);_0x30c825&&_0x30c825['isAttached']()||(_0x30c825=_0x59898d['addRoot'](_0x23b09a));const _0x3b442d=_0x596c26[_0x23b09a],_0x7a049a=Object['keys'](_0x3b442d),_0x12569b=_0x2ddf8e[_0x23b09a];for(const _0x2ed5fa of _0x30c825['getAttributeKeys']())_0x7a049a['includes'](_0x2ed5fa)||_0x59898d['removeAttribute'](_0x2ed5fa,_0x30c825);for(const _0x154fad of _0x7a049a)_0x59898d['setAttribute'](_0x154fad,_0x596c26[_0x23b09a][_0x154fad],_0x30c825);_0x59898d['remove'](_0x59898d['createRangeIn'](_0x30c825)),_0x59898d['insert'](_0x518e6c['data']['parse'](_0x12569b,_0x30c825),_0x30c825,0x0);}});const _0x17ebc0=m(_0x518e6c['locale'],'Restored');if(_0x1217f2['name'])_0x11498e=-0x1==_0x1217f2['name']['indexOf'](_0x17ebc0)?_0x17ebc0+':\x20'+_0x1217f2['name']:_0x1217f2['name'];else _0x11498e=_0x17ebc0+':\x20'+(_0x1217f2['createdAt']['toLocaleDateString'](_0x518e6c['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x1217f2['createdAt']['toLocaleTimeString'](_0x518e6c['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x48078e['saveRevision']({'name':_0x11498e}),_0x5bc47a['isReady']=!0x0,_0x518e6c['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{a as Revision,k as RevisionHistory,u as RevisionHistoryUI,l as RevisionTracker,d as RevisionViewer,de as RevisionViewerLoadingOverlay,g as RevisionViewerUI,j as RevisionsRepository,w as RevisionsSidebar};