@ckeditor/ckeditor5-revision-history 45.0.0 → 45.1.0-alpha.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 (181) hide show
  1. package/LICENSE.md +2 -1
  2. package/build/revision-history.js +1 -1
  3. package/dist/index.js +6 -6
  4. package/dist/translations/af.js +1 -1
  5. package/dist/translations/af.umd.js +1 -1
  6. package/dist/translations/ar.js +1 -1
  7. package/dist/translations/ar.umd.js +1 -1
  8. package/dist/translations/ast.js +1 -1
  9. package/dist/translations/ast.umd.js +1 -1
  10. package/dist/translations/az.js +1 -1
  11. package/dist/translations/az.umd.js +1 -1
  12. package/dist/translations/be.js +1 -1
  13. package/dist/translations/be.umd.js +1 -1
  14. package/dist/translations/bg.js +1 -1
  15. package/dist/translations/bg.umd.js +1 -1
  16. package/dist/translations/bn.js +1 -1
  17. package/dist/translations/bn.umd.js +1 -1
  18. package/dist/translations/bs.js +1 -1
  19. package/dist/translations/bs.umd.js +1 -1
  20. package/dist/translations/ca.js +1 -1
  21. package/dist/translations/ca.umd.js +1 -1
  22. package/dist/translations/cs.js +1 -1
  23. package/dist/translations/cs.umd.js +1 -1
  24. package/dist/translations/da.js +1 -1
  25. package/dist/translations/da.umd.js +1 -1
  26. package/dist/translations/de-ch.js +1 -1
  27. package/dist/translations/de-ch.umd.js +1 -1
  28. package/dist/translations/de.js +1 -1
  29. package/dist/translations/de.umd.js +1 -1
  30. package/dist/translations/el.js +1 -1
  31. package/dist/translations/el.umd.js +1 -1
  32. package/dist/translations/en-au.js +1 -1
  33. package/dist/translations/en-au.umd.js +1 -1
  34. package/dist/translations/en-gb.js +1 -1
  35. package/dist/translations/en-gb.umd.js +1 -1
  36. package/dist/translations/en.js +1 -1
  37. package/dist/translations/en.umd.js +1 -1
  38. package/dist/translations/eo.js +1 -1
  39. package/dist/translations/eo.umd.js +1 -1
  40. package/dist/translations/es-co.js +1 -1
  41. package/dist/translations/es-co.umd.js +1 -1
  42. package/dist/translations/es.js +1 -1
  43. package/dist/translations/es.umd.js +1 -1
  44. package/dist/translations/et.js +1 -1
  45. package/dist/translations/et.umd.js +1 -1
  46. package/dist/translations/eu.js +1 -1
  47. package/dist/translations/eu.umd.js +1 -1
  48. package/dist/translations/fa.js +1 -1
  49. package/dist/translations/fa.umd.js +1 -1
  50. package/dist/translations/fi.js +1 -1
  51. package/dist/translations/fi.umd.js +1 -1
  52. package/dist/translations/fr.js +1 -1
  53. package/dist/translations/fr.umd.js +1 -1
  54. package/dist/translations/gl.js +1 -1
  55. package/dist/translations/gl.umd.js +1 -1
  56. package/dist/translations/gu.js +1 -1
  57. package/dist/translations/gu.umd.js +1 -1
  58. package/dist/translations/he.js +1 -1
  59. package/dist/translations/he.umd.js +1 -1
  60. package/dist/translations/hi.js +1 -1
  61. package/dist/translations/hi.umd.js +1 -1
  62. package/dist/translations/hr.js +1 -1
  63. package/dist/translations/hr.umd.js +1 -1
  64. package/dist/translations/hu.js +1 -1
  65. package/dist/translations/hu.umd.js +1 -1
  66. package/dist/translations/hy.js +1 -1
  67. package/dist/translations/hy.umd.js +1 -1
  68. package/dist/translations/id.js +1 -1
  69. package/dist/translations/id.umd.js +1 -1
  70. package/dist/translations/it.js +1 -1
  71. package/dist/translations/it.umd.js +1 -1
  72. package/dist/translations/ja.js +1 -1
  73. package/dist/translations/ja.umd.js +1 -1
  74. package/dist/translations/jv.js +1 -1
  75. package/dist/translations/jv.umd.js +1 -1
  76. package/dist/translations/kk.js +1 -1
  77. package/dist/translations/kk.umd.js +1 -1
  78. package/dist/translations/km.js +1 -1
  79. package/dist/translations/km.umd.js +1 -1
  80. package/dist/translations/kn.js +1 -1
  81. package/dist/translations/kn.umd.js +1 -1
  82. package/dist/translations/ko.js +1 -1
  83. package/dist/translations/ko.umd.js +1 -1
  84. package/dist/translations/ku.js +1 -1
  85. package/dist/translations/ku.umd.js +1 -1
  86. package/dist/translations/lt.js +1 -1
  87. package/dist/translations/lt.umd.js +1 -1
  88. package/dist/translations/lv.js +1 -1
  89. package/dist/translations/lv.umd.js +1 -1
  90. package/dist/translations/ms.js +1 -1
  91. package/dist/translations/ms.umd.js +1 -1
  92. package/dist/translations/nb.js +1 -1
  93. package/dist/translations/nb.umd.js +1 -1
  94. package/dist/translations/ne.js +1 -1
  95. package/dist/translations/ne.umd.js +1 -1
  96. package/dist/translations/nl.js +1 -1
  97. package/dist/translations/nl.umd.js +1 -1
  98. package/dist/translations/no.js +1 -1
  99. package/dist/translations/no.umd.js +1 -1
  100. package/dist/translations/oc.js +1 -1
  101. package/dist/translations/oc.umd.js +1 -1
  102. package/dist/translations/pl.js +1 -1
  103. package/dist/translations/pl.umd.js +1 -1
  104. package/dist/translations/pt-br.js +1 -1
  105. package/dist/translations/pt-br.umd.js +1 -1
  106. package/dist/translations/pt.js +1 -1
  107. package/dist/translations/pt.umd.js +1 -1
  108. package/dist/translations/ro.js +1 -1
  109. package/dist/translations/ro.umd.js +1 -1
  110. package/dist/translations/ru.js +1 -1
  111. package/dist/translations/ru.umd.js +1 -1
  112. package/dist/translations/si.js +1 -1
  113. package/dist/translations/si.umd.js +1 -1
  114. package/dist/translations/sk.js +1 -1
  115. package/dist/translations/sk.umd.js +1 -1
  116. package/dist/translations/sl.js +1 -1
  117. package/dist/translations/sl.umd.js +1 -1
  118. package/dist/translations/sq.js +1 -1
  119. package/dist/translations/sq.umd.js +1 -1
  120. package/dist/translations/sr-latn.js +1 -1
  121. package/dist/translations/sr-latn.umd.js +1 -1
  122. package/dist/translations/sr.js +1 -1
  123. package/dist/translations/sr.umd.js +1 -1
  124. package/dist/translations/sv.js +1 -1
  125. package/dist/translations/sv.umd.js +1 -1
  126. package/dist/translations/th.js +1 -1
  127. package/dist/translations/th.umd.js +1 -1
  128. package/dist/translations/ti.js +1 -1
  129. package/dist/translations/ti.umd.js +1 -1
  130. package/dist/translations/tk.js +1 -1
  131. package/dist/translations/tk.umd.js +1 -1
  132. package/dist/translations/tr.js +1 -1
  133. package/dist/translations/tr.umd.js +1 -1
  134. package/dist/translations/tt.js +1 -1
  135. package/dist/translations/tt.umd.js +1 -1
  136. package/dist/translations/ug.js +1 -1
  137. package/dist/translations/ug.umd.js +1 -1
  138. package/dist/translations/uk.js +1 -1
  139. package/dist/translations/uk.umd.js +1 -1
  140. package/dist/translations/ur.js +1 -1
  141. package/dist/translations/ur.umd.js +1 -1
  142. package/dist/translations/uz.js +1 -1
  143. package/dist/translations/uz.umd.js +1 -1
  144. package/dist/translations/vi.js +1 -1
  145. package/dist/translations/vi.umd.js +1 -1
  146. package/dist/translations/zh-cn.js +1 -1
  147. package/dist/translations/zh-cn.umd.js +1 -1
  148. package/dist/translations/zh.js +1 -1
  149. package/dist/translations/zh.umd.js +1 -1
  150. package/package.json +11 -11
  151. package/src/changeitem.js +2 -2
  152. package/src/editor/revisionviewereditor.js +2 -2
  153. package/src/editor/revisionviewereditorui.js +1 -1
  154. package/src/editor/revisionviewereditoruiview.js +1 -1
  155. package/src/index.js +1 -1
  156. package/src/revision.js +2 -2
  157. package/src/revisiondiff.js +1 -1
  158. package/src/revisionhistory.js +1 -1
  159. package/src/revisionhistoryutils.js +1 -1
  160. package/src/revisionsrepository.js +1 -1
  161. package/src/revisiontracker.js +1 -1
  162. package/src/revisionviewer.js +1 -1
  163. package/src/ui/revision/createrevisionactionsdropdown.js +1 -1
  164. package/src/ui/revision/revisionauthorview.js +1 -1
  165. package/src/ui/revision/revisionnameview.js +1 -1
  166. package/src/ui/revision/revisionview.js +2 -2
  167. package/src/ui/revision/subrevisioncollapserview.js +1 -1
  168. package/src/ui/revision/subrevisionview.js +1 -1
  169. package/src/ui/revision/utils.js +1 -1
  170. package/src/ui/revisionhistory/revisionhistorysaverevisionformview.js +1 -1
  171. package/src/ui/revisionhistory/revisionhistoryui.js +1 -1
  172. package/src/ui/revisionssidebar/revisionssidebar.js +1 -1
  173. package/src/ui/revisionssidebar/revisionssidebarheaderview.js +1 -1
  174. package/src/ui/revisionssidebar/revisionssidebartimeperiodview.js +1 -1
  175. package/src/ui/revisionssidebar/revisionssidebarview.js +1 -1
  176. package/src/ui/revisionssidebar/utils.js +1 -1
  177. package/src/ui/revisionviewer/changedetailsview.js +1 -1
  178. package/src/ui/revisionviewer/changesnavigationview.js +1 -1
  179. package/src/ui/revisionviewer/revisionviewerloadingoverlay.js +1 -1
  180. package/src/ui/revisionviewer/revisionviewerui.js +1 -1
  181. package/src/utils/common-translations.js +1 -1
package/dist/index.js CHANGED
@@ -20,10 +20,10 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x15db80,uid as _0x21f3e7,Collection as _0x24b94b,logWarning as _0x1b5a2c,FocusTracker as _0x4b6d96,KeystrokeHandler as _0x2a5236,scrollViewportToShowTarget as _0x5b4067,ResizeObserver as at,ElementReplacer as ot,CKEditorError as _0x2cfc09}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x5e9d8c,set as _0x38cf28,unset as _0x5de3e6,isEqual as _0x14e9cc}from'es-toolkit/compat';import{Plugin as _0x5e0615,PendingActions as _0x57bb2a,Command as _0x50eebd,ElementApiMixin as _0x50c72a,Editor as _0x1c3e4d}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0xb2974f,getMarkerDomElement as _0x3fde7f,ConfirmMixin as _0x273b3b,sanitizeEditorConfig as _0x1cdf73}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x41115f,ViewAttributeElement as _0x552924,ViewEmptyElement as _0x59685d,ViewRawElement as _0x5f51df,ViewUIElement as _0x2e1688,ViewDocumentFragment as _0xa0a1ea,ViewText as _0x1f7e5c,ViewElement as _0x54edf4,Element as ut,Range as ft,Position as vt,DocumentFragment as gt,Text as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x402578,IconChevronUp as _0x72fb47,IconChevronDown as _0x4d2b48,IconUndo as _0x448e3e,IconUser as _0x5a2ef7,IconThreeVerticalDots as _0x293f9f}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x307380,injectCssTransitionDisabler as ts,submitHandler as _0x3d8486,LabeledFieldView as nt,createLabeledInputText as ti,createDropdown as _0x39369a,ListView as _0x490b59,ListItemView as te,ButtonView as _0x9f075f,MenuBarMenuView as _0x4c2fb1,MenuBarMenuListView as _0x1cc4e0,MenuBarMenuListItemView as _0x59f497,MenuBarMenuListItemButtonView as _0x4c4920,ContextualBalloon as _0x1cb441,ToolbarSeparatorView as _0x478f14,IconView as _0x2202a6,addListToDropdown as _0x169eac,ViewModel as to,EditorUI as st,normalizeToolbarConfig as et,BoxedEditorUIView as rt,StickyPanelView as ht,ToolbarView as dt,InlineEditableUIView as ct}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x5abc77}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
- _0x15db80(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x4e77ab){super(),this['id']=_0x4e77ab['id']||_0x21f3e7(),this['creator']=_0x4e77ab['creator']||null,this['authors']=_0x4e77ab['authors']||[],this['diffData']=_0x4e77ab['diffData']||null,this['toVersion']=_0x4e77ab['toVersion']||0x0,this['fromVersion']=_0x4e77ab['fromVersion']||0x0,this['set']('name',_0x4e77ab['name']||''),this['set']('createdAt',_0x4e77ab['createdAt']||new Date()),this['set']('attributes',_0x4e77ab['attributes']||{});}['setName'](_0x29a212){this['_update']({'name':_0x29a212});}['setAttribute'](_0x3a241a,_0x62016f){const _0x29f14b=_0x5e9d8c(this['attributes']);_0x38cf28(_0x29f14b,_0x3a241a,_0x62016f),this['_update']({'attributes':_0x29f14b});}['removeAttribute'](_0xe2f5f5){const _0x119464=_0x5e9d8c(this['attributes']);_0x5de3e6(_0x119464,_0xe2f5f5),this['_update']({'attributes':_0x119464});}['_update'](_0x52af44,_0x3725dd=!0x1){let _0xeb5c6b=!0x1;const _0x28a96d={'id':this['id']},_0x89af4a=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x30683e of _0x89af4a){const _0x94e89f=_0x52af44[_0x30683e];void 0x0!==_0x94e89f&&_0x94e89f!==this[_0x30683e]&&(this[_0x30683e]=_0x94e89f,_0x28a96d[_0x30683e]=_0x94e89f,_0xeb5c6b=!0x0);}_0xeb5c6b&&(_0x28a96d['authors']&&(_0x28a96d['authorsIds']=_0x28a96d['authors']['map'](_0x493100=>_0x493100['id']),delete _0x28a96d['authors']),this['fire']('_update',_0x28a96d,_0x3725dd));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x7a92ab=>_0x7a92ab['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x5e0615{['_revisions'];static get['requires'](){return[_0xb2974f];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x2e4595){super(_0x2e4595),this['_revisions']=new _0x24b94b();}['afterInit'](){!async function(_0x30aed3){const _0xe498ed=_0x283054([0x65,0x71,0x4a,0x32,0x54,0x70,0x36,0x48,0x44,0x68,0x51,0x4f,0x69,0x61,0x42,0x62,0x75,0x6c,0x50,0x30,0x72,0x52,0x31,0x6a,0x56,0x67,0x34,0x63,0x73,0x66,0x47,0x74,0x6f,0x4b,0x38,0x43,0x58,0x39,0x6e,0x64,0x37,0x4e,0x57,0x76,0x6b,0x59,0x7a,0x45,0x4d,0x46,0x4c,0x5a,0x77,0x53,0x78,0x49,0x35,0x41,0x33,0x79,0x6d,0x55]),_0x44e5c4=0xeb829,_0x4ade43=0x51b0de9c,_0x2b0297=0x51b7bac4^_0x4ade43,_0x5b990a=window[_0x283054([0x44,0x61,0x74,0x65])][_0x283054([0x6e,0x6f,0x77])](),_0x459594=_0x30aed3[_0x283054([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1dd10c=new window[(_0x283054([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16097a=>{_0x459594[_0x283054([0x6f,0x6e,0x63,0x65])](_0x283054([0x72,0x65,0x61,0x64,0x79]),_0x16097a);}),_0x26bf6b={[_0x283054([0x6b,0x74,0x79])]:_0x283054([0x45,0x43]),[_0x283054([0x75,0x73,0x65])]:_0x283054([0x73,0x69,0x67]),[_0x283054([0x63,0x72,0x76])]:_0x283054([0x50,0x2d,0x32,0x35,0x36]),[_0x283054([0x78])]:_0x283054([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]),[_0x283054([0x79])]:_0x283054([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]),[_0x283054([0x61,0x6c,0x67])]:_0x283054([0x45,0x53,0x32,0x35,0x36])},_0x27623c=_0x459594[_0x283054([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x283054([0x67,0x65,0x74])](_0x283054([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x16e705(){let _0xf03e0a,_0x1861a2=null,_0x5160aa=null;try{if(_0x27623c==_0x283054([0x47,0x50,0x4c]))return _0x283054([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xf03e0a=_0x437100(),!_0xf03e0a)return _0x283054([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xf03e0a[_0x283054([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5160aa=_0xfa8497(_0xf03e0a[_0x283054([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xf03e0a[_0x283054([0x6a,0x74,0x69])])),await _0x25ba69()?_0x2e6aee()?_0xfe14b0()?_0x283054([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3a67a2()?(_0xf03e0a[_0x283054([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x283054([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1861a2=_0x2c1b69(_0x283054([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xf03e0a[_0x283054([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x283054([0x74,0x72,0x69,0x61,0x6c])&&(_0x1861a2=_0x2c1b69(_0x283054([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x45549d()):_0x283054([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x283054([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x283054([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x19185f){return _0x283054([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xfe14b0(){const _0x4be76e=[_0x283054([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x283054([0x74,0x72,0x69,0x61,0x6c])][_0x283054([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xf03e0a[_0x283054([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5b990a/0x3e8:0xe10*_0x2b0297;return _0xf03e0a[_0x283054([0x65,0x78,0x70])]<_0x4be76e;}function _0x2e6aee(){const _0x53da69=_0xf03e0a[_0x283054([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x53da69)return!0x1;if(_0x53da69[_0x283054([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x283054([0x2a])))return!0x0;if(_0x53da69[_0x283054([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x283054([0x52,0x48])))return!0x0;if(_0x53da69[_0x283054([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x283054([0x52,0x52,0x48]))){if(_0x3f11d0())return!0x0;if(_0x4d7322()||_0x304dd3())return!0x0;}return!0x1;}function _0x3a67a2(){const _0x9c474e=_0xf03e0a[_0x283054([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x9c474e||0x0==_0x9c474e[_0x283054([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1124ff}=new URL(window[_0x283054([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x9c474e[_0x283054([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1124ff))return!0x0;const _0x310d5a=_0x1124ff[_0x283054([0x73,0x70,0x6c,0x69,0x74])](_0x283054([0x2e]));return _0x9c474e[_0x283054([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3657cc=>_0x3657cc[_0x283054([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x283054([0x2a])))[_0x283054([0x6d,0x61,0x70])](_0x3cf4fd=>_0x3cf4fd[_0x283054([0x73,0x70,0x6c,0x69,0x74])](_0x283054([0x2e])))[_0x283054([0x73,0x6f,0x6d,0x65])](_0x17909f=>_0x310d5a[_0x283054([0x65,0x76,0x65,0x72,0x79])]((_0x1ba404,_0x278b77)=>_0x17909f[_0x278b77]===_0x1ba404||_0x17909f[_0x278b77]===_0x283054([0x2a])));}function _0x45549d(){return _0x1861a2&&_0x5160aa?new window[(_0x283054([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x357c47,_0x12659b)=>{_0x1861a2[_0x283054([0x74,0x68,0x65,0x6e])](_0x357c47,_0x12659b),_0x5160aa[_0x283054([0x74,0x68,0x65,0x6e])](_0xc273e2=>{_0xc273e2!=_0x283054([0x56,0x61,0x6c,0x69,0x64])&&_0x357c47(_0xc273e2);},_0x12659b);}):_0x1861a2||_0x5160aa||_0x283054([0x56,0x61,0x6c,0x69,0x64]);}}function _0xfa8497(_0x115ca4,_0x5070f7){return new window[(_0x283054([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5ad09b=>{if(_0x363e29())return _0x5ad09b(_0x283054([0x56,0x61,0x6c,0x69,0x64]));_0x135919(),_0x459594[_0x283054([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x283054([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x5a39db=!0x1;const _0x29fb1f=_0x21f3e7();function _0x57e4db(_0x1c9399){return!!_0x1c9399&&(typeof _0x1c9399===_0x283054([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1c9399===_0x283054([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1c9399[_0x283054([0x74,0x68,0x65,0x6e])]===_0x283054([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1c9399[_0x283054([0x63,0x61,0x74,0x63,0x68])]===_0x283054([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x11a993(_0x1147c5){_0x3d4086(_0x1147c5)[_0x283054([0x74,0x68,0x65,0x6e])](_0x5c80ab=>{if(!_0x5c80ab||_0x5c80ab[_0x283054([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x283054([0x6f,0x6b]))return _0x283054([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5a17bf(_0x3028cf(_0x29fb1f+_0x5070f7))!=_0x5c80ab[_0x283054([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x283054([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x283054([0x56,0x61,0x6c,0x69,0x64]);})[_0x283054([0x74,0x68,0x65,0x6e])](_0x17554f=>(_0x2929a1(),_0x17554f),()=>{const _0x3ece82=_0x65aab3();return null==_0x3ece82?(_0x2929a1(),_0x283054([0x56,0x61,0x6c,0x69,0x64])):_0x283054(_0x5b990a-_0x3ece82>(0x75bc5a9c^_0x4ade43)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x283054([0x74,0x68,0x65,0x6e])](_0x5ad09b)[_0x283054([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5ad09b(_0x283054([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x18fea6=0x5186301c^_0x4ade43;function _0x2929a1(){const _0xe1978b=_0x283054([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a17bf(_0x3028cf(_0x115ca4)),_0x235ab3=_0x63f5a4(_0x5a17bf(window[_0x283054([0x4d,0x61,0x74,0x68])][_0x283054([0x63,0x65,0x69,0x6c])](_0x5b990a/_0x18fea6)));window[_0x283054([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x283054([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xe1978b,_0x235ab3);}function _0x65aab3(){const _0x3b7644=_0x283054([0x6c,0x6c,0x63,0x74,0x2d])+_0x5a17bf(_0x3028cf(_0x115ca4)),_0x20ede3=window[_0x283054([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x283054([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3b7644);return _0x20ede3?window[_0x283054([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x63f5a4(_0x20ede3),0x10)*_0x18fea6:null;}function _0x3d4086(_0x410503){return new window[(_0x283054([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x129c3a,_0x35d7eb)=>{_0x410503[_0x283054([0x74,0x68,0x65,0x6e])](_0x129c3a,_0x35d7eb),window[_0x283054([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x35d7eb,0x51b10a5c^_0x4ade43);});}}_0x459594[_0x283054([0x6f,0x6e])](_0x283054([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1ba9bb,_0x51aaa5)=>{if(_0x51aaa5[0x0]!=_0x115ca4)return _0x5ad09b(_0x283054([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x51aaa5[0x1]={..._0x51aaa5[0x1],[_0x283054([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x29fb1f};},{[_0x283054([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x283054([0x68,0x69,0x67,0x68])}),_0x459594[_0x283054([0x6f,0x6e])](_0x283054([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x377569=>{_0x57e4db(_0x377569[_0x283054([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x5a39db=!0x0,_0x11a993(_0x377569[_0x283054([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x283054([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x283054([0x6c,0x6f,0x77])}),_0x1dd10c[_0x283054([0x74,0x68,0x65,0x6e])](()=>{_0x5a39db||_0x5ad09b(_0x283054([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x363e29(){return _0x459594[_0x283054([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x283054([0x76,0x69,0x65,0x77])][_0x283054([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x283054([0x61,0x75,0x74,0x6f]);}function _0x135919(){_0x459594[_0x283054([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x283054([0x76,0x69,0x65,0x77])][_0x283054([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x283054([0x61,0x75,0x74,0x6f]);}}function _0x2c1b69(_0xa1fd56){const _0x38ed6e=[new window[(_0x283054([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ffa06=>setTimeout(_0x4ffa06,0x51b9e050^_0x4ade43)),_0x1dd10c[_0x283054([0x74,0x68,0x65,0x6e])](()=>new window[(_0x283054([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x6ba624=>{const _0x29edee=0x51b0de9b^_0x4ade43,_0x1e91cf=_0x30aed3[_0x283054([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x1b1859(){_0x1e91cf[_0x283054([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x29edee&&_0x6ba624();}_0x1b1859(),_0x1e91cf[_0x283054([0x6f,0x6e])](_0x283054([0x61,0x64,0x64]),_0x1b1859);})),new window[(_0x283054([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ef8c7=>{function _0x5ce976(){for(const _0x28e786 in window)if(window[_0x283054([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x283054([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x28e786))&&window[_0x28e786]==_0x44e5c4)return _0x3ef8c7();_0x459594[_0x283054([0x73,0x74,0x61,0x74,0x65])]!=_0x283054([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x283054([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5ce976,0x51b0cd14^_0x4ade43);}_0x4a4af8(_0x283054([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x5ce976();})];return window[_0x283054([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x283054([0x72,0x61,0x63,0x65])](_0x38ed6e)[_0x283054([0x74,0x68,0x65,0x6e])](()=>_0xa1fd56);}async function _0x515bc3(){if(await _0x1dd10c,_0x4a4af8(_0x283054([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0xcbc4ce=_0x30aed3[_0x283054([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x2a7b5c=_0x30aed3[_0x283054([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])](_0xcbc4ce[_0x283054([0x69,0x64])]),_0x573fa6=_0x5e9acf(_0x283054([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x573fa6[_0x283054([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0xcbc4ce['id'],_0x2a7b5c?_0x2a7b5c['id']:null,!0x0),_0x573fa6[_0x283054([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x283054([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x573fa6[_0x283054([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x573fa6[_0x283054([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0xf17581,void(_0x573fa6[_0x283054([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0xf17581);}if(_0x4a4af8(_0x283054([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x491d92=_0x5e9acf(_0x283054([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x491d92[_0x283054([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x283054([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x491d92[_0x283054([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x491d92[_0x283054([0x75,0x70,0x64,0x61,0x74,0x65])]=_0xf17581,_0x491d92[_0x283054([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0xf17581;}_0x459594[_0x283054([0x6d,0x6f,0x64,0x65,0x6c])][_0x283054([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xf17581,_0x459594[_0x283054([0x6d,0x6f,0x64,0x65,0x6c])][_0x283054([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xf17581,_0x459594[_0x283054([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x283054([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3f11d0(){return _0x4a4af8(_0x283054([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5e9acf(_0x283054([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x283054([0x73,0x74,0x61,0x74,0x65])]==_0x283054([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4d7322(){return _0x4a4af8(_0x283054([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 _0x304dd3(){return _0x4a4af8(_0x283054([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x3475f9(_0x25fae9){const _0x245098=_0x511ca5();_0x459594[_0x245098]=_0x283054([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])+_0x25fae9,_0x25fae9[_0x283054([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x283054([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x511ca5()]=_0x44e5c4),_0x25fae9!=_0x283054([0x56,0x61,0x6c,0x69,0x64])&&_0x515bc3();}function _0x511ca5(){const _0x3753b3=window[_0x283054([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x283054([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x283054([0x6e,0x6f,0x77])]())[_0x283054([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x283054([0x2e]),'');let _0x2ff881=_0x283054([0x65]);for(let _0x7fcb86=0x0;_0x7fcb86<_0x3753b3[_0x283054([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x7fcb86+=0x2){let _0x1e2ff1=window[_0x283054([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3753b3[_0x283054([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x7fcb86,_0x7fcb86+0x2));_0x1e2ff1>=_0xe498ed[_0x283054([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1e2ff1-=_0xe498ed[_0x283054([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2ff881+=_0xe498ed[_0x1e2ff1];}return _0x2ff881;}function _0x437100(){const _0x3d1255=_0x27623c[_0x283054([0x73,0x70,0x6c,0x69,0x74])](_0x283054([0x2e]));if(0x3!=_0x3d1255[_0x283054([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x47ec2f(_0x3d1255[0x1]);function _0x47ec2f(_0x1ba1b2){const _0x12129f=_0x9c07b5(_0x1ba1b2);return _0x12129f&&_0x24258c()?_0x12129f:null;function _0x24258c(){const _0x553fc3=_0x12129f[_0x283054([0x6a,0x74,0x69])],_0x215b7b=window[_0x283054([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x553fc3[_0x283054([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x553fc3[_0x283054([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x134f74={..._0x12129f,[_0x283054([0x6a,0x74,0x69])]:_0x553fc3[_0x283054([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x553fc3[_0x283054([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x134f74[_0x283054([0x76,0x63])],_0x3028cf(_0x134f74)==_0x215b7b;}}}async function _0x25ba69(){let _0x548936=!0x0;try{const _0x450d4a=_0x27623c[_0x283054([0x73,0x70,0x6c,0x69,0x74])](_0x283054([0x2e])),[_0x56bda2,_0x58b35f,_0xca9bfd]=_0x450d4a;return _0x5a52f3(_0x56bda2),await _0x272d6e(_0x56bda2,_0x58b35f,_0xca9bfd),_0x548936;}catch(_0xdde532){return!0x1;}function _0x5a52f3(_0x4e5693){const _0x253795=_0x9c07b5(_0x4e5693);_0x253795&&_0x253795[_0x283054([0x61,0x6c,0x67])]==_0x283054([0x45,0x53,0x32,0x35,0x36])||(_0x548936=!0x1);}async function _0x272d6e(_0x344a58,_0x27fc87,_0x2546c7){const _0x508845=window[_0x283054([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x283054([0x66,0x72,0x6f,0x6d])](_0x773b63(_0x2546c7),_0x4cf177=>_0x4cf177[_0x283054([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3f26c9=new window[(_0x283054([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x283054([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x344a58+_0x283054([0x2e])+_0x27fc87),_0x5d2ddf=window[_0x283054([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x283054([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5d2ddf)return;const _0x4ccfcf=await _0x5d2ddf[_0x283054([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x283054([0x6a,0x77,0x6b]),_0x26bf6b,{[_0x283054([0x6e,0x61,0x6d,0x65])]:_0x283054([0x45,0x43,0x44,0x53,0x41]),[_0x283054([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x283054([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x283054([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5d2ddf[_0x283054([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x283054([0x6e,0x61,0x6d,0x65])]:_0x283054([0x45,0x43,0x44,0x53,0x41]),[_0x283054([0x68,0x61,0x73,0x68])]:{[_0x283054([0x6e,0x61,0x6d,0x65])]:_0x283054([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4ccfcf,_0x508845,_0x3f26c9)||(_0x548936=!0x1);}}function _0x9c07b5(_0x4526ce){return _0x4526ce[_0x283054([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x283054([0x65,0x79]))?JSON[_0x283054([0x70,0x61,0x72,0x73,0x65])](_0x773b63(_0x4526ce)):null;}function _0x773b63(_0x195513){return window[_0x283054([0x61,0x74,0x6f,0x62])](_0x195513[_0x283054([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x283054([0x2b]))[_0x283054([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x283054([0x2f])));}function _0x3028cf(_0x221273){let _0xf97d0f=0x1505;function _0x1e945d(_0x3f6be5){for(let _0x4b37b8=0x0;_0x4b37b8<_0x3f6be5[_0x283054([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b37b8++){const _0x4a8f8e=_0x3f6be5[_0x283054([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4b37b8);_0xf97d0f=(_0xf97d0f<<0x5)+_0xf97d0f+_0x4a8f8e,_0xf97d0f&=_0xf97d0f;}}function _0x4a332a(_0x513822){Array[_0x283054([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x513822)?_0x513822[_0x283054([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4a332a):_0x513822&&typeof _0x513822==_0x283054([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x283054([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x513822)[_0x283054([0x73,0x6f,0x72,0x74])]()[_0x283054([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x40db9,_0x2154d9])=>{_0x1e945d(_0x40db9),_0x4a332a(_0x2154d9);}):_0x1e945d(window[_0x283054([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x513822));}return _0x4a332a(_0x221273),_0xf97d0f>>>0x0;}function _0x5a17bf(_0x1330d8){return _0x1330d8[_0x283054([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x283054([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x283054([0x30]));}function _0x63f5a4(_0x33f62c){return _0x33f62c[_0x283054([0x73,0x70,0x6c,0x69,0x74])]('')[_0x283054([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x283054([0x6a,0x6f,0x69,0x6e])]('');}function _0x4a4af8(_0x5056c9){return _0x459594[_0x283054([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x283054([0x68,0x61,0x73])](_0x5056c9);}function _0x5e9acf(_0x2c2e60){return _0x459594[_0x283054([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x283054([0x67,0x65,0x74])](_0x2c2e60);}function _0xf17581(){}function _0x283054(_0x3b7cb6){return _0x3b7cb6['map'](_0x177549=>String['fromCharCode'](_0x177549))['join']('');}_0x3475f9(await _0x16e705());}(this);}['createRevision'](_0xfceb14){const _0x1b490c=this['editor']['plugins']['get']('Users');return new h({'id':_0xfceb14['id'],'name':_0xfceb14['name'],'creator':_0xfceb14['creatorId']?_0x1b490c['getUser'](_0xfceb14['creatorId']):null,'diffData':_0xfceb14['diffData']||_0xfceb14['data'],'authors':_0xfceb14['authorsIds']['map'](_0x3c44bc=>_0x1b490c['getUser'](_0x3c44bc)),'createdAt':new Date(_0xfceb14['createdAt']),'attributes':_0xfceb14['attributes'],'fromVersion':_0xfceb14['fromVersion'],'toVersion':_0xfceb14['toVersion']});}['addRevision'](_0x2e5500,_0x21bdf4=0x0){this['_revisions']['add'](_0x2e5500,_0x21bdf4);}['getRevision'](_0x827ebc){return this['_revisions']['get'](_0x827ebc);}['getRevisions'](_0x2ed346={'toJSON':!0x1}){const _0x5b3587=Array['from'](this['_revisions']);return _0x5b3587['reverse'](),_0x2ed346['toJSON']?_0x5b3587['map'](_0x55b8d1=>_0x55b8d1['toJSON']()):_0x5b3587;}['getIndex'](_0x26c662){return this['_revisions']['getIndex'](_0x26c662);}['getEarlierVisibleRevision'](_0x565147){const [,_0x36742f]=this['getRevisionsIterator'](_0x565147,{'direction':'earlier'});return _0x36742f;}['getLaterVisibleRevision'](_0x51e9c3){const [,_0x20640a]=this['getRevisionsIterator'](_0x51e9c3,{'direction':'later'});return _0x20640a;}['getRevisionsInDiff'](_0xd05e1f){const _0x1a997d=[];for(const _0x4b7247 of this['getRevisionsIterator'](_0xd05e1f['newRevisionId']))if(_0x1a997d['push'](_0x4b7247),_0x4b7247['id']===_0xd05e1f['oldRevisionId'])break;return _0x1a997d;}*['getRevisionsIterator'](_0x41f28b,{direction:_0x34002b='earlier',filter:_0x3fdacf=()=>!0x0}={}){const _0x355622='earlier'===_0x34002b?0x1:-0x1;let _0x5f5866=this['_revisions']['get'](_0x41f28b),_0x1f4faa=this['getIndex'](_0x5f5866);for(yield _0x5f5866;_0x5f5866;){if(_0x1f4faa+=_0x355622,_0x5f5866=this['getRevision'](_0x1f4faa),!_0x5f5866)return;_0x3fdacf(_0x5f5866)&&(yield _0x5f5866);}}}class V extends _0x5e0615{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x41115f,'c'],[_0x552924,'a'],[_0x59685d,'e'],[_0x5f51df,'r'],[_0x2e1688,'u']]);['_typeCharToViewClass']=new Map([['c',_0x41115f],['a',_0x552924],['e',_0x59685d],['r',_0x5f51df],['u',_0x2e1688]]);async['loadRevisionData'](_0x1b609a,_0x411f33){if(_0x1b609a['diffData']||!_0x411f33)return;const _0x58ae71=this['editor']['config']['get']('collaboration.channelId'),_0x1d8c3c=await _0x411f33['getRevision']({'channelId':_0x58ae71,'revisionId':_0x1b609a['id']});_0x1b609a['diffData']=_0x1d8c3c['diffData'];}['getRevisionDocumentData'](_0x46239a){const _0xc14299={};for(const _0x507804 in _0x46239a['diffData']){if(_0x46239a['diffData'][_0x507804]['attachChange']&&!_0x46239a['diffData'][_0x507804]['attachChange']['isAttached'])continue;const _0x535c8b=this['_removeRevisionMarkers'](JSON['parse'](_0x46239a['diffData'][_0x507804]['insertions'])),_0x22c2eb=this['editor']['editing']['view']['document'],_0x5991c8=new _0xa0a1ea(_0x22c2eb,_0x535c8b['map'](_0x5860d1=>this['_getViewFromDiffObj'](_0x5860d1,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0xc14299[_0x507804]=this['editor']['data']['processor']['toData'](_0x5991c8),this['editor']['data']['processor']['useFillerType']('default');}return _0xc14299;}['getRevisionRootsAttributes'](_0x269dc2){const _0x45f7e3={};for(const _0x27ecaf in _0x269dc2['diffData'])_0x269dc2['diffData'][_0x27ecaf]['attachChange']&&!_0x269dc2['diffData'][_0x27ecaf]['attachChange']['isAttached']||(_0x45f7e3[_0x27ecaf]=_0x269dc2['diffData'][_0x27ecaf]['attributesAfter']||{});return _0x45f7e3;}['_getTypeCharForViewElement'](_0x591873){return this['_viewClassToTypeChar']['get'](_0x591873['constructor']);}['_getViewFromDiffObj'](_0x4176e7,_0x466e83){const _0x299b89=this['editor']['editing']['view']['document'];if('string'==typeof _0x4176e7)return new _0x1f7e5c(_0x299b89,_0x4176e7);{let _0xb8bd80,_0x233ec0;_0x233ec0='u'==_0x4176e7['type']||'r'==_0x4176e7['type']?[]:_0x4176e7['children']['map'](_0x3700c8=>this['_getViewFromDiffObj'](_0x3700c8,_0x466e83));const _0x5e7fd5=this['_typeCharToViewClass']['get'](_0x4176e7['type'])||_0x54edf4,_0x13cfb9=this['editor']['data']['htmlProcessor']['domConverter'];if(_0xb8bd80=new _0x5e7fd5(_0x299b89,_0x4176e7['name'],_0x4176e7['attributes'],_0x233ec0),'u'==_0x4176e7['type']&&_0x4176e7['children'][0x0]){const _0x520f57=_0x4176e7['children'][0x0];if(_0xb8bd80['render']=function(_0x347454){const _0x414d56=_0x347454['createElement']('div');return _0x414d56['innerHTML']=_0x520f57,_0x414d56['childNodes'][0x0];},_0x466e83){const _0x5cd8fe=new _0xa0a1ea(_0x299b89);_0x5cd8fe['_appendChild'](_0xb8bd80);const _0x4c3960=Array['from'](_0x13cfb9['viewChildrenToDom'](_0x5cd8fe,{'bind':!0x1})),_0x56e264=_0x13cfb9['domDocument']['createElement']('div');_0x56e264['append'](..._0x4c3960),_0xb8bd80=Array['from'](_0x13cfb9['domChildrenToView'](_0x56e264))[0x0];}}else{if('r'==_0x4176e7['type']&&_0x4176e7['children'][0x0]){const _0xc370e2=_0x4176e7['children'][0x0];if(_0xb8bd80['render']=function(_0x1488f1){_0x1488f1['innerHTML']=_0xc370e2;},_0x466e83){const _0x352788=new _0xa0a1ea(_0x299b89);_0x352788['_appendChild'](_0xb8bd80);const _0xeb1bda=Array['from'](_0x13cfb9['viewChildrenToDom'](_0x352788,{'bind':!0x1})),_0xb3dddf=_0x13cfb9['domDocument']['createElement']('div');_0xb3dddf['append'](..._0xeb1bda);const _0x25d7bc=Array['from'](_0x13cfb9['domChildrenToView'](_0xb3dddf));_0x25d7bc['length']>0x1?_0xb8bd80['_appendChild'](_0x25d7bc):_0xb8bd80=_0x25d7bc[0x0];}}}if(_0x4176e7['customProperties']){for(const [_0x5f22f8,_0x1b2dd7]of _0x4176e7['customProperties'])_0xb8bd80['_setCustomProperty'](_0x5f22f8,_0x1b2dd7);}const _0x27cb28=void 0x0===_0x4176e7['fillerOffset']?null:_0x4176e7['fillerOffset'];return null!==_0x27cb28&&(_0xb8bd80['getFillerOffset']=()=>_0x27cb28),_0xb8bd80;}}['_makeModelFromViewString'](_0x1f65dc){const _0x58d16b=JSON['parse'](_0x1f65dc),_0x38eb70=this['editor']['editing']['view']['document'],_0x2f867d=new _0xa0a1ea(_0x38eb70,_0x58d16b['map'](_0x56343f=>this['_getViewFromDiffObj'](_0x56343f,!0x0)));return this['editor']['data']['toModel'](_0x2f867d);}['_removeRevisionMarkers'](_0x45c485){return(_0x45c485=_0x45c485['filter'](_0x2ec407=>!_0x2ec407['name']||'revision-start'!==_0x2ec407['name']&&'revision-end'!==_0x2ec407['name']))['forEach'](_0x2e76b2=>{'string'!=typeof _0x2e76b2&&(_0x2e76b2['children']=this['_removeRevisionMarkers'](_0x2e76b2['children']),_0x2e76b2['attributes']=_0x2e76b2['attributes']['filter'](_0x28476e=>!_0x28476e[0x0]['startsWith']('data-revision-')));}),_0x45c485;}}function g(_0x53262c,_0x5e0203,_0x5a51cf){const t=_0x53262c['t'];switch(_0x5e0203){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'},_0x5a51cf);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5a51cf);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'';}}class u extends _0x5e0615{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xb2974f,I,V,_0x57bb2a];}constructor(_0x31a0d3){super(_0x31a0d3),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x1d5311=_0x21f3e7();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x1d5311},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['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x5785a4=this['repository']['getRevision'](0x0),_0xa608ae=_0x5785a4&&null===_0x5785a4['creator']?_0x5785a4:null;if(this['_continueCurrentRevision']=!!_0xa608ae&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x255055=this['_source']['getCurrentRevisionId'](),_0x1bcae9=this['repository']['getRevision'](_0x255055);if(_0x1bcae9)this['_startingVersion']=_0x1bcae9['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x82e465=this['_source']['history']['_operations']['find'](_0x4aaedf=>!_0x4aaedf['_isInit']),_0x20bde4=_0x82e465?_0x82e465['baseVersion']:this['_source']['history']['version'];_0x5785a4?(_0x5785a4['toVersion']<_0x20bde4&&_0x5785a4['_update']({'toVersion':_0x20bde4}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0xa608ae['id'],this['_startingVersion']=_0xa608ae['fromVersion']):(this['_startingVersion']=_0x5785a4['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x20bde4,this['_continueCurrentRevision']=!0x1);}}else _0xa608ae&&(this['editor']['model']['document']['history']['version']=Math['max'](_0xa608ae['toVersion'],this['editor']['model']['document']['history']['version']),_0xa608ae['fromVersion']===_0xa608ae['toVersion']?(0x0!==_0xa608ae['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0xa608ae['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0xa608ae['id'],this['_startingVersion']=_0xa608ae['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',_0x4525af=>!_0x4525af),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x21f818=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2ee04c;for(const _0x3e7fb3 in _0x21f818){const _0x1945ea=_0x3e7fb3,_0x2bd5eb=_0x21f818[_0x1945ea];if('revisionHistoryLicenseKeyValid'==_0x2bd5eb||'revisionHistoryLicenseKeyInvalid'==_0x2bd5eb||'revisionHistoryLicenseKeyExpired'==_0x2bd5eb||'revisionHistoryLicenseKeyDomainLimit'==_0x2bd5eb||'revisionHistoryLicenseKeyNotAllowed'==_0x2bd5eb||'revisionHistoryLicenseKeyEvaluationLimit'==_0x2bd5eb||'revisionHistoryLicenseKeyTrialLimit'==_0x2bd5eb||'revisionHistoryLicenseKeyUsageLimit'==_0x2bd5eb){delete _0x21f818[_0x1945ea],_0x2ee04c=_0x2bd5eb,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2ee04c&&_0x21f818['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2ee04c&&_0x21f818['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2ee04c&&_0x21f818['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2ee04c&&_0x21f818['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2ee04c&&_0x21f818['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x2ee04c&&_0x21f818['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2ee04c&&_0x21f818['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4876a2=this['repository']['getRevision'](0x0),_0xf40e42=await this['getRevisionDocumentData'](_0x4876a2),_0x2554a1=await this['getRevisionRootsAttributes'](_0x4876a2);this['_replaceEditorDataWithRevisionData'](_0xf40e42,_0x2554a1);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x14b77e){this['_source']=_0x14b77e;}async['update'](){const _0x154403=await this['_source']['getLatestVersion']();if(_0x154403>this['currentRevision']['toVersion']){await this['_loadState']();const _0x5d2f78=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x154403});_0x5d2f78['authors']=_0x5d2f78['authorsIds']['map'](_0x2f4743=>this['editor']['plugins']['get']('Users')['getUser'](_0x2f4743)),this['currentRevision']['_update'](_0x5d2f78);}}async['saveRevision'](_0x41f42c={},_0x3befef=null){const _0x41feed=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x3befef>this['currentRevision']['toVersion']&&(_0x3befef=null),null===_0x3befef&&(_0x3befef=await this['_source']['getLatestVersion']());const _0x2c619d=this['_getFromVersion'](_0x3befef),_0x5617f6=this['buildRevisionData']({'from':_0x2c619d,'to':_0x3befef});if(this['currentRevision']['toVersion']<_0x3befef){const _0x1b6f39=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x3befef,'to':_0x3befef});_0x1b6f39['authors']=[],_0x1b6f39['authorsIds']=[],_0x1b6f39['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1b6f39,!0x0),delete _0x1b6f39['authors'],_0x41feed['push'](_0x1b6f39);}_0x41f42c['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x41f42c['name']=_0x41f42c['name']||null,_0x41f42c['id']=_0x41f42c['id']||_0x21f3e7(),_0x41f42c={..._0x41f42c,..._0x5617f6};const _0x93eeda=this['addRevisionData'](_0x41f42c);_0x41feed['push'](_0x41f42c);const _0x486b69=this['repository']['getIndex'](_0x93eeda);if(0x0!==_0x486b69){const _0x38df4c=this['repository']['getRevision'](_0x486b69-0x1);if(_0x38df4c['fromVersion']!==_0x3befef){const _0x8a531a=this['_revisionDataBuilder']['getData'](_0x3befef,_0x38df4c['toVersion']),_0x4b02a2={'id':_0x38df4c['id'],'diffData':_0x8a531a['diffData'],'authorsIds':_0x8a531a['authorsIds'],'authors':_0x8a531a['authorsIds']['map'](_0x128b72=>this['editor']['plugins']['get']('Users')['getUser'](_0x128b72)),'fromVersion':_0x3befef};_0x38df4c===this['currentRevision']&&(_0x4b02a2['createdAt']=new Date(_0x41f42c['createdAt']['getTime']()+0xa)),_0x38df4c['_update'](_0x4b02a2,!0x0),delete _0x4b02a2['authors'],_0x41feed['push'](_0x4b02a2);}}if(this['adapter']){for(const _0x560ced of _0x41feed)this['_bufferUpdate'](_0x560ced['id'],_0x560ced,!0x0);this['sendBufferedUpdates']();}return _0x93eeda;}['addRevisionData'](_0x5f0bfc){const _0x6f0295=this['repository']['createRevision'](_0x5f0bfc);return this['adapter']&&_0x6f0295['on']('_update',(_0x3103e1,_0x37dc99,_0x546770)=>{_0x546770||(this['_bufferUpdate'](_0x37dc99['id'],_0x37dc99,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x6f0295,this['_findInsertionIndex'](_0x6f0295)),_0x6f0295;}async['getRevisionDocumentData'](_0x251a05){return await this['_utils']['loadRevisionData'](_0x251a05,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x251a05);}async['getRevisionRootsAttributes'](_0x455946){return await this['_utils']['loadRevisionData'](_0x455946,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x455946);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x45d26e=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3fa2ef=0x0;_0x3fa2ef<_0x45d26e['length'];_0x3fa2ef++){const _0x2fbca1=_0x45d26e[_0x3fa2ef];let _0x4d66c0=!0x1;for(const _0x2f68df of Object['keys'](_0x2fbca1))void 0x0===_0x2fbca1[_0x2f68df]?delete _0x2fbca1[_0x2f68df]:'id'!==_0x2f68df&&(_0x4d66c0=!0x0);_0x4d66c0||(_0x45d26e[_0x3fa2ef]=null);}if(_0x45d26e=_0x45d26e['filter'](_0x282053=>null!==_0x282053),!_0x45d26e['length'])return;for(let _0x4a88af=0x0;_0x4a88af<_0x45d26e['length'];_0x4a88af++){const _0x2cc958=_0x45d26e[_0x4a88af];void 0x0!==_0x2cc958['fromVersion']&&void 0x0===_0x2cc958['toVersion']&&(_0x2cc958['toVersion']=this['repository']['getRevision'](_0x2cc958['id'])['toVersion']),void 0x0!==_0x2cc958['toVersion']&&void 0x0===_0x2cc958['fromVersion']&&(_0x2cc958['fromVersion']=this['repository']['getRevision'](_0x2cc958['id'])['fromVersion']);}const _0x3fc1c0=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x45d26e,_0x3fc1c0)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0xbbe8f9=>{if(_0xbbe8f9){for(const _0x550a82 of _0xbbe8f9)this['setRevisionData']({'id':_0x550a82['id'],'createdAt':_0x550a82['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x441d92=null,from:_0x559d7a=null,to:_0x157381=null}){_0x559d7a=null!==_0x559d7a?_0x559d7a:_0x441d92['fromVersion'],_0x157381=null!==_0x157381?_0x157381:_0x441d92['toVersion'];const _0xc4b6f8=this['_revisionDataBuilder']['getData'](_0x559d7a,_0x157381),_0x1a9ea5={'diffData':_0xc4b6f8['diffData'],'authorsIds':_0xc4b6f8['authorsIds'],'fromVersion':_0x559d7a,'toVersion':_0x157381};if(!_0x441d92||_0x157381!==_0x441d92['toVersion']){const _0x5b2459=_0x157381-0x1,_0x516f0c=this['_source']['history']['getOperation'](_0x5b2459);_0x1a9ea5['createdAt']=_0x516f0c&&_0x516f0c['createdAt']||new Date();}if(this['_loadedStateData']&&_0x559d7a===this['_loadedStateData']['fromVersion']){for(const _0x54c5c9 of this['_loadedStateData']['authors'])_0x1a9ea5['authorsIds']['includes'](_0x54c5c9['id'])||_0x1a9ea5['authorsIds']['push'](_0x54c5c9['id']);}return _0x1a9ea5;}['_bufferUpdate'](_0x355d6b,_0x4525d7,_0x20e3bc){if(this['_bufferedUpdates']['has'](_0x355d6b)){const _0x3b1b13=this['_bufferedUpdates']['get'](_0x355d6b);_0x4525d7=_0x20e3bc?{..._0x3b1b13,..._0x4525d7}:{..._0x4525d7,..._0x3b1b13};}this['_bufferedUpdates']['set'](_0x355d6b,_0x4525d7);}['setRevisionData'](_0x3c0059){const _0x2f0805=this['repository']['getRevision'](_0x3c0059['id']);if(_0x3c0059['createdAt']&&(_0x3c0059['createdAt']=new Date(_0x3c0059['createdAt'])),_0x3c0059['authorsIds']){const _0x608208=this['editor']['plugins']['get']('Users');_0x3c0059['authors']=_0x3c0059['authorsIds']['map'](_0x285895=>_0x608208['getUser'](_0x285895));}_0x2f0805['_update'](_0x3c0059,!0x0);}['_createInitialRevision'](_0x42b468){const _0x3c87c0=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3c87c0)this['_initialRevisionId']=_0x3c87c0['id'];else{const _0x2e07d1=!this['editor']['model']['document']['roots']['find'](_0xe3e0fc=>this['editor']['model']['hasContent'](_0xe3e0fc)),_0x269b9f=this['editor']['plugins']['get']('Users')['me']['id'],_0x18c880=g(this['editor']['locale'],_0x2e07d1?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x42b468,'to':_0x42b468,'id':this['_initialRevisionId'],'name':_0x18c880,'creatorId':_0x269b9f});}}['_createCurrentRevision'](_0x2617f8){const _0x10c194=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x10c194),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x2617f8,'to':_0x2617f8,'id':_0x10c194,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x3f6211,_0x2bcde4){let _0x4e7e08=this['editor']['config']['get']('initialData'),_0x26b98c=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x4e7e08){_0x4e7e08={};for(const _0x3d6d3b of this['editor']['model']['document']['getRootNames']())_0x4e7e08[_0x3d6d3b]='';}if('string'==typeof _0x4e7e08&&(_0x4e7e08={'main':_0x4e7e08}),void 0x0===_0x26b98c){_0x26b98c={};for(const _0xac5506 of this['editor']['model']['document']['getRootNames']())_0x26b98c[_0xac5506]={};}let _0x1779c3=!0x1;const _0x11d17e=Object['keys'](_0x4e7e08),_0x2d3dab=Object['keys'](_0x3f6211);for(const _0x482c23 of _0x11d17e){if(_0x4e7e08[_0x482c23]!==_0x3f6211[_0x482c23]&&''!==_0x4e7e08[_0x482c23]['trim']()){_0x1779c3=!0x0;break;}if(!_0x14e9cc(_0x26b98c[_0x482c23],_0x2bcde4[_0x482c23])&&Object['keys'](_0x26b98c[_0x482c23])['length']>0x0){_0x1779c3=!0x0;break;}}_0x1779c3||(_0x1779c3=_0x2d3dab['some'](_0x16fdf8=>!this['editor']['model']['document']['getRoot'](_0x16fdf8))),_0x1779c3&&_0x1b5a2c('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4e7e08,'editorRootsAttributes':_0x26b98c,'revisionData':_0x3f6211,'revisionRootsAttributes':_0x2bcde4}),this['editor']['config']['set']('initialData',_0x3f6211),this['editor']['config']['set']('rootsAttributes',_0x2bcde4);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x3f8bf7=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x3f8bf7['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x30490a){const _0xb76fb4=this['repository']['getRevisions']();_0xb76fb4['reverse']();let _0x2812d3=0x0;for(;_0x2812d3<_0xb76fb4['length'];){const _0x1aaaa9=_0xb76fb4[_0x2812d3];if(_0x1aaaa9===this['currentRevision']){_0x2812d3++;continue;}if(_0x1aaaa9['id']===this['_initialRevisionId'])break;const _0x1a04c2=_0x30490a['toVersion']-_0x1aaaa9['toVersion']||_0x30490a['fromVersion']-_0x1aaaa9['fromVersion'];if(_0x1a04c2>0x0)break;if(_0x1a04c2<0x0)_0x2812d3++;else{if(!_0x30490a['creator']&&_0x1aaaa9['creator'])break;if(_0x1aaaa9['creator']||!_0x30490a['creator']){if(_0x30490a['createdAt']>_0x1aaaa9['createdAt'])break;_0x2812d3++;}else _0x2812d3++;}}return _0x2812d3;}['_getFromVersion'](_0x5b8474){const _0x5b77d0=this['repository']['getRevisions']();_0x5b77d0['reverse'](),_0x5b77d0['shift']();const _0x277d87=_0x5b77d0['find'](_0x3708c3=>_0x3708c3['toVersion']<=_0x5b8474)['toVersion'];return _0x277d87<this['_startingVersion']?this['_startingVersion']:_0x277d87;}['_makeRevision']({name:_0xbe4f0c,from:_0x2fcc56,to:_0x28029f,creatorId:_0x2d16fc,id:_0x4f653f}){const _0x5b44cc=this['buildRevisionData']({'from':_0x2fcc56,'to':_0x28029f});_0x5b44cc['name']=_0xbe4f0c,_0x5b44cc['creatorId']=_0x2d16fc,_0x5b44cc['id']=_0x4f653f;const _0x248522=this['addRevisionData'](_0x5b44cc);return this['adapter']&&this['_bufferUpdate'](_0x5b44cc['id'],_0x5b44cc,!0x0),_0x248522;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x784564){this['editor']=_0x784564,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'](_0x51a884){this['source']=_0x51a884;const _0xc4aac1=new Map(),_0x286846=new Map(),_0x21c151=this['editor']['model']['document']['roots']['map'](_0x42ee2f=>_0x42ee2f['rootName']);for(const _0x462cb4 of _0x21c151){const _0x57cf03=this['editor']['model']['document']['getRoot'](_0x462cb4),_0x4f19d5=N(_0x57cf03);_0xc4aac1['set'](_0x462cb4,_0x4f19d5),_0x286846['set'](_0x462cb4,Object['fromEntries'](_0x57cf03['getAttributes']()));}const _0x14892f=Array['from'](this['editor']['model']['markers'])['map'](_0x32d922=>[_0x32d922['name'],_0x32d922['getRange']()]),_0x46bde6=this['source']['version'];this['_saveMetaData'](_0x46bde6,_0xc4aac1,_0x14892f,_0x286846),this['_startingRevisionId']=this['_revisionId'];const _0x5e4590=new Map(),_0x5da716=new Map();for(const _0x2c044c of _0x21c151){const _0x3708d4=P(_0x2c044c);_0x5e4590['set'](_0x2c044c,_0x3708d4),_0x5da716['set'](_0x2c044c,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x5e4590,[],_0x5da716);}['getData'](_0x2ab0e5,_0x300d08){if(this['_lastFrom']===_0x2ab0e5&&this['_lastTo']<=_0x300d08)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x300d08,!0x0);else{if(!this['_savedMetaData']['has'](_0x2ab0e5)){const _0x575b73=this['_getPreviousFrom'](_0x2ab0e5);this['_calculateMetaData'](_0x575b73,_0x2ab0e5,!0x1);}this['_calculateMetaData'](_0x2ab0e5,_0x300d08,!0x0);}return this['_lastFrom']=_0x2ab0e5,this['_lastTo']=_0x300d08,this['_getState']();}['loadState'](_0x15b091){const _0x228442=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x15b091['fromVersion'],this['_lastTo']=_0x15b091['toVersion'];for(const _0x302c56 in _0x15b091['diffData']){const _0x48bdea=_0x15b091['diffData'][_0x302c56]['attachChange'],_0x55e2fb=_0x5e9d8c(_0x15b091['diffData'][_0x302c56]['attributesBefore'])||{},_0x18cdc9=_0x228442['_makeModelFromViewString'](_0x15b091['diffData'][_0x302c56]['deletions']);_0x18cdc9['rootName']=_0x302c56,_0x18cdc9['_isAttached']=!_0x48bdea||!_0x48bdea['isAttached'],_0x18cdc9['isAttached']=()=>_0x18cdc9['_isAttached'],this['_baseRoots']['set'](_0x302c56,_0x18cdc9),this['_baseRootsAttributes']['set'](_0x302c56,_0x55e2fb),_0x48bdea&&this['_touchedRoots']['set'](_0x302c56,_0x48bdea);const _0x54d562=this['_makeIdsRoot'](_0x18cdc9);this['_baseIdsRoots']['set'](_0x302c56,_0x54d562);for(const [_0xceaaa2,_0x2f456d]of _0x18cdc9['markers']){if(!_0xceaaa2['startsWith']('revision:'))continue;const _0x308ee0=_0xceaaa2['split'](':')[0x2];for(const _0x1352d6 of _0x2f456d['getWalker']({'singleCharacters':!0x0})){const _0xb8a9=this['_getVidAttributeName'](_0x1352d6),_0x904dc='elementEnd'==_0x1352d6['type']?_0x1352d6['previousPosition']['path']['slice'](0x0,-0x1):_0x1352d6['previousPosition']['path'],_0xbdde41=_0x54d562['getNodeByPath'](_0x904dc)['getAttribute'](_0xb8a9);this['_touched']['set'](_0xbdde41,{'userId':_0x308ee0});}}}this['_startingRevisionId']=this['_revisionId'];const _0x5830fc=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x2702c6=>!this['_touched']['has'](_0x2702c6));let _0x3b2fff=0x0;const _0x397145=new Map();for(const _0x457113 in _0x15b091['diffData']){const _0x73293c=_0x15b091['diffData'][_0x457113]['attachChange'],_0x51cae9=_0x5e9d8c(_0x15b091['diffData'][_0x457113]['attributesAfter'])||{},_0x4a503f=_0x228442['_makeModelFromViewString'](_0x15b091['diffData'][_0x457113]['insertions']);_0x4a503f['rootName']=_0x457113,_0x4a503f['_isAttached']=!_0x73293c||_0x73293c['isAttached'],_0x4a503f['isAttached']=()=>_0x4a503f['_isAttached'],this['_diffRoots']['set'](_0x457113,_0x4a503f),this['_diffRootsAttributes']['set'](_0x457113,_0x51cae9);const _0x251989=this['_makeIdsRoot'](_0x4a503f,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x457113,_0x251989),_0x397145['set'](_0x457113,_0x4a503f['isAttached']()?_0x51cae9:{});for(const [_0x275a88,_0x3a77fa]of _0x4a503f['markers']){if(!_0x275a88['startsWith']('revision:'))continue;const _0x8a2884=_0x275a88['split'](':')[0x2];for(const _0x91b0b7 of _0x3a77fa['getWalker']({'singleCharacters':!0x0})){const _0x522e25=this['_getVidAttributeName'](_0x91b0b7),_0x5038f9=this['_revisionId']++,_0x25b698='elementEnd'==_0x91b0b7['type']?_0x91b0b7['previousPosition']['path']['slice'](0x0,-0x1):_0x91b0b7['previousPosition']['path'];_0x251989['getNodeByPath'](_0x25b698)['_setAttribute'](_0x522e25,_0x5038f9),this['_touched']['set'](_0x5038f9,{'userId':_0x8a2884});}}for(const _0x2801ae of this['editor']['model']['createRangeIn'](_0x4a503f)['getWalker']({'singleCharacters':!0x0})){const _0x48d89c=this['_getVidAttributeName'](_0x2801ae),_0xa79c='elementEnd'==_0x2801ae['type']?_0x2801ae['previousPosition']['path']['slice'](0x0,-0x1):_0x2801ae['previousPosition']['path'],_0x329400=_0x251989['getNodeByPath'](_0xa79c);_0x329400['getAttribute'](_0x48d89c)>0x0||_0x329400['_setAttribute'](_0x48d89c,_0x5830fc[_0x3b2fff++]);}for(const [_0x2bd5c7,_0x586271]of _0x4a503f['markers'])_0x2bd5c7['startsWith']('revision:')||this['_markers']['set'](_0x2bd5c7,_0x586271);}const _0x49b10c=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x49b10c),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x49b10c,0x1));const _0x5af180=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x5af180),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5af180,0x1));const _0x356c9b=Array['from'](this['_diffRoots'])['map'](([_0x381b4f,_0x5f02a5])=>[_0x381b4f,N(_0x5f02a5)]);this['_saveMetaData'](this['_lastTo'],_0x356c9b,this['_markers'],_0x397145);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x2e22fd,_0x464312,_0x4c0ee3,_0x4a547b){const _0x380736=new Map(_0x464312),_0x36b1a2=new Map(_0x5e9d8c(_0x4a547b)),_0x7d1176=new Map();for(const [_0x3c363b,_0x3c2463]of _0x4c0ee3)_0x7d1176['set'](_0x3c363b,{'start':_0x3c2463['start']['clone'](),'end':_0x3c2463['end']['clone'](),'rootName':_0x3c2463['root']['rootName']});this['_savedMetaData']['set'](_0x2e22fd,{'roots':_0x380736,'markers':_0x7d1176,'rootsAttributes':_0x36b1a2});}['_removeMetaData'](_0x44870a){this['_savedMetaData']['delete'](_0x44870a);}['_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'](_0x9c592d,_0x1f2139=null){let _0x21bf17=null;_0x9c592d['is']('documentFragment')||(_0x21bf17=new ut(_0x9c592d['name'],{'vid_start':null===_0x1f2139?this['_revisionId']++:_0x1f2139++}));const _0x38db51=[];for(const _0x53d3b3 of _0x9c592d['getChildren']())if(_0x53d3b3['is']('element')){_0x38db51['push'](this['_makeIdsRoot'](_0x53d3b3,_0x1f2139));const _0x5943fc=_0x38db51[_0x38db51['length']-0x1];null!==_0x1f2139&&(_0x1f2139=_0x5943fc['is']('element','$text')?_0x5943fc['getAttribute']('vid')+0x1:_0x5943fc['getAttribute']('vid_end')+0x1);}else{for(let _0x24cc59=0x0;_0x24cc59<_0x53d3b3['offsetSize'];_0x24cc59++)_0x38db51['push'](new ut('$text',{'vid':null===_0x1f2139?this['_revisionId']++:_0x1f2139++}));}if(_0x9c592d['is']('documentFragment')){const _0x48eab6=P(_0x9c592d['rootName']);return _0x48eab6['_insertChild'](0x0,_0x38db51),_0x48eab6;}return _0x21bf17['_setAttribute']('vid_end',null===_0x1f2139?this['_revisionId']++:_0x1f2139++),_0x21bf17['_insertChild'](0x0,_0x38db51),_0x21bf17;}['_calculateMetaData'](_0x3c3135,_0x53782a,_0x47474b){this['_reset']();const {roots:_0x3e2868,markers:_0x537e86,rootsAttributes:_0x2ef2ae}=this['_savedMetaData']['get'](_0x3c3135);this['_baseRoots']=new Map(_0x3e2868),this['_baseRootsAttributes']=new Map(_0x5e9d8c(_0x2ef2ae));for(const [_0x413d39,_0x324522]of this['_baseRoots'])if('$graveyard'!==_0x413d39&&(this['_diffRoots']['set'](_0x413d39,N(_0x324522)),this['_diffRootsAttributes']=new Map(_0x5e9d8c(_0x2ef2ae)),_0x47474b)){const _0x48ed5e=this['_revisionId'];this['_idsRoots']['set'](_0x413d39,this['_makeIdsRoot'](_0x324522)),this['_baseIdsRoots']['set'](_0x413d39,this['_makeIdsRoot'](_0x324522,_0x48ed5e));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x47474b&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0xcfbbe,_0x121c46]of _0x537e86){const _0x251e76=this['_baseRoots']['get'](_0x121c46['rootName']),_0x3ffcc8=this['_diffRoots']['get'](_0x121c46['rootName']),_0x52dd79=new ft(this['_fixPosition'](_0x121c46['start'],_0x251e76),this['_fixPosition'](_0x121c46['end'],_0x251e76)),_0x56af84=this['_fixRange'](_0x52dd79,_0x3ffcc8);_0x251e76['markers']['set'](_0xcfbbe,_0x52dd79),this['_markers']['set'](_0xcfbbe,_0x56af84);}this['_applyOperations'](_0x3c3135,_0x53782a,_0x47474b);}['_applyOperations'](_0x2b0b82,_0x5573c6,_0x159ed){for(const _0x4c7a6a of this['source']['getOperations'](_0x2b0b82,_0x5573c6))this['_handleOperation'](_0x4c7a6a,_0x159ed);for(const _0x2dac3d of this['_diffRoots']['values']())_0x2dac3d['markers']['clear']();for(const [_0x457500,_0x34cc88]of this['_markers']){this['_diffRoots']['get'](_0x34cc88['root']['rootName'])['markers']['set'](_0x457500,_0x34cc88['clone']());}const _0x4b1f07=new Map(),_0x173247=new Map();for(const [_0x585f14,_0x49c995]of this['_diffRoots'])_0x4b1f07['set'](_0x585f14,N(_0x49c995)),_0x173247['set'](_0x585f14,this['_diffRootsAttributes']['get'](_0x585f14));this['_saveMetaData'](_0x5573c6,_0x4b1f07,this['_markers'],_0x173247);}['_getPreviousFrom'](_0x1737de){const _0x405955=Array['from'](this['_savedMetaData']['keys']());_0x405955['sort']((_0x2ea366,_0xd131d9)=>_0x2ea366-_0xd131d9),_0x405955['reverse']();for(const _0x363c83 of _0x405955)if(_0x363c83<_0x1737de)return _0x363c83;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x1cc884,_0x1d9de0){const _0x39e08b=Array['from'](_0x1d9de0['markers'])['map'](([_0x3f7664,_0xbfebe4])=>[_0x3f7664,this['_fixRange'](_0xbfebe4,_0x1cc884)]);_0x1cc884['markers']=new Map(_0x39e08b);}['_transformMarkers'](_0x15c821){for(const _0x450ad6 of this['_markers']['values']()){const _0xdeeac6=_0x450ad6['getTransformedByOperation'](_0x15c821),_0x150cbe=ft['_createFromRanges'](_0xdeeac6);_0x450ad6['start']=_0x150cbe['start'],_0x450ad6['end']=_0x150cbe['end'];}}['_handleOperation'](_0x326a8c,_0x33e3f8){if('addRoot'!=_0x326a8c['type']&&'detachRoot'!=_0x326a8c['type']){if('insert'==_0x326a8c['type']){const _0x3fb006=_0x326a8c['position']['root']['rootName'];this['_diffRoots']['has'](_0x3fb006)||(this['_diffRoots']['set'](_0x3fb006,P(_0x3fb006,!0x0)),this['_diffRootsAttributes']['set'](_0x3fb006,{}),_0x33e3f8&&this['_idsRoots']['set'](_0x3fb006,P(_0x3fb006,!0x0)));}else{if('addRootAttribute'==_0x326a8c['type']||'removeRootAttribute'==_0x326a8c['type']||'changeRootAttribute'==_0x326a8c['type'])return void this['_handleRootAttributeOperation'](_0x326a8c);'marker'==_0x326a8c['type']&&this['_handleMarkerOperation'](_0x326a8c);}if('marker'!==_0x326a8c['type']){const _0x2a13d2=this['_cloneOperation'](_0x326a8c,this['_diffRoots']);_0x2a13d2['_execute'](),this['_transformMarkers'](_0x2a13d2);}if(_0x33e3f8)switch(_0x326a8c['type']){case'insert':this['_handleInsertOperation'](_0x326a8c);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x326a8c);break;case'merge':this['_handleMergeOperation'](_0x326a8c);break;case'split':this['_handleSplitOperation'](_0x326a8c);}}else this['_handleRootOperation'](_0x326a8c,_0x33e3f8);}['_cloneOperation'](_0x59b780,_0x35f5f5){const _0x28f47b=_0x59b780['clone']();return _0x28f47b['_authorId']=_0x59b780['_authorId'],this['_fixOperation'](_0x28f47b,_0x35f5f5),_0x28f47b;}['_getBaseVids'](_0x4f0874){return _0x4f0874['map'](_0x25c017=>{const _0x1bec13=this['_getVidAttributeName'](_0x25c017);return Number(_0x25c017['item']['getAttribute'](_0x1bec13));});}['_generateTape'](_0x276b3e,_0x258041){if(_0x276b3e['is']('element','$text'))_0x258041['push']({'item':_0x276b3e,'type':'text'});else{_0x276b3e['is']('element')&&_0x258041['push']({'item':_0x276b3e,'type':'elementStart'});for(const _0x484d11 of _0x276b3e['getChildren']())this['_generateTape'](_0x484d11,_0x258041);_0x276b3e['is']('element')&&_0x258041['push']({'item':_0x276b3e,'type':'elementEnd'});}return _0x258041;}['_getState'](){const _0x4d826c=new Map(this['_touched']),_0x85333a=new Map(_0x4d826c),_0x4eabfb=new Map(),_0x3370bd={'insertions':{},'deletions':{}},_0xd7cd4={'insertions':{},'deletions':{}},_0x1f826f=new Map(),_0x5ce40f=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x5ce40f['delete']('$graveyard');for(const _0x1d3483 of _0x5ce40f){const _0x30f067=this['_diffRoots']['get'](_0x1d3483)||P(_0x1d3483,!0x1),_0x474921=this['_baseRoots']['get'](_0x1d3483)||P(_0x1d3483,!0x1);_0x30f067['isAttached']()||_0x474921['isAttached']()?(_0x3370bd['insertions'][_0x1d3483]=N(_0x30f067),_0x3370bd['deletions'][_0x1d3483]=N(_0x474921),this['_copyMarkers'](_0x3370bd['deletions'][_0x1d3483],_0x474921),this['_copyMarkers'](_0x3370bd['insertions'][_0x1d3483],_0x30f067),_0xd7cd4['insertions'][_0x1d3483]=this['_generateTape'](this['_idsRoots']['get'](_0x1d3483),[]),_0xd7cd4['deletions'][_0x1d3483]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1d3483)||P(_0x1d3483,!0x1),[])):_0x5ce40f['delete'](_0x1d3483);}for(const _0x30502d of _0x5ce40f){const _0x2b9847=_0xd7cd4['insertions'][_0x30502d];for(const _0x56e68e of _0x2b9847){const _0x586e2f=this['_getVidAttributeName'](_0x56e68e),_0x25ad83=_0x56e68e['item']['getAttribute'](_0x586e2f);_0x85333a['delete'](_0x25ad83),_0x25ad83>=this['_startingRevisionId']&&_0x4eabfb['set'](_0x25ad83,_0x4d826c['get'](_0x25ad83));}}for(const _0x4e6878 of _0x5ce40f){const _0x3ead0f=_0xd7cd4['insertions'][_0x4e6878],_0x17b04f=this['_getBaseVids'](_0xd7cd4['deletions'][_0x4e6878]);let _0x582ce7=0x0;for(const _0xdb5f69 of _0x3ead0f){const _0x537462=this['_getVidAttributeName'](_0xdb5f69),_0x40714d=_0xdb5f69['item']['getAttribute'](_0x537462);if(!_0x4eabfb['has'](_0x40714d)&&!_0x1f826f['has'](_0x40714d)){if(_0x85333a['has'](_0x40714d))_0x582ce7++;else{if(_0x40714d!=_0x17b04f[_0x582ce7]){const _0x2fc444=_0x4d826c['get'](_0x40714d)||_0x4d826c['get'](_0x17b04f[_0x582ce7]);for(;_0x40714d!=_0x17b04f[_0x582ce7];)_0x85333a['has'](_0x17b04f[_0x582ce7])||(_0x1f826f['set'](_0x17b04f[_0x582ce7],_0x2fc444),_0x4d826c['set'](_0x17b04f[_0x582ce7],_0x2fc444)),_0x582ce7++;}_0x582ce7++;}}}}for(const _0x5eebc8 of _0x5ce40f){const _0x31ae0b=_0xd7cd4['insertions'][_0x5eebc8];for(const _0x8ff483 of _0x31ae0b){const _0x12945f=this['_getVidAttributeName'](_0x8ff483),_0x36f8a6=_0x8ff483['item']['getAttribute'](_0x12945f);if(_0x1f826f['has'](_0x36f8a6)){const _0x418242=_0x1f826f['get'](_0x36f8a6);_0x85333a['has'](_0x36f8a6)||_0x85333a['set'](_0x36f8a6,{..._0x418242}),_0x4eabfb['set'](_0x36f8a6,{..._0x418242});}}}for(const _0xcd8db4 of _0x85333a['keys']())_0xcd8db4>=this['_startingRevisionId']&&_0x85333a['delete'](_0xcd8db4);const _0xcb18d=new Map();for(const _0x21fccb of _0x5ce40f){let _0x5b5f15=_0xd7cd4['insertions'][_0x21fccb];for(const _0x5b7fd7 of _0x5b5f15)if(_0x5b7fd7['item']['is']('element','tableCell')){const _0x48c794=this['_getVidAttributeName'](_0x5b7fd7),_0x28202f=_0x5b7fd7['item']['getAttribute'](_0x48c794);if(_0x4eabfb['has'](_0x28202f)){const _0x15cdc2=_0x5b7fd7['item']['parent']['parent']['getAttribute']('vid_start'),_0x1e221a=_0xcb18d['get'](_0x15cdc2)||new Set();_0x1e221a['add'](_0x4eabfb['get'](_0x28202f)['userId']),_0xcb18d['set'](_0x15cdc2,_0x1e221a);}}_0x5b5f15=_0xd7cd4['deletions'][_0x21fccb];for(const _0x437488 of _0x5b5f15)if(_0x437488['item']['is']('element','tableCell')){const _0x311a50=this['_getVidAttributeName'](_0x437488),_0x375ab9=_0x437488['item']['getAttribute'](_0x311a50);if(_0x85333a['has'](_0x375ab9)){const _0x31e598=_0x437488['item']['parent']['parent']['getAttribute']('vid_start'),_0x182ca8=_0xcb18d['get'](_0x31e598)||new Set();_0x182ca8['add'](_0x85333a['get'](_0x375ab9)['userId']),_0xcb18d['set'](_0x31e598,_0x182ca8);}}for(const _0x6c04b2 of _0xcb18d['keys']())(_0x4eabfb['has'](_0x6c04b2)||_0x85333a['has'](_0x6c04b2))&&_0xcb18d['delete'](_0x6c04b2);}for(const _0x2cb0e3 of _0x5ce40f){const _0x4d2508=_0xd7cd4['insertions'][_0x2cb0e3];let _0x40b35f=null,_0x537d25=null;for(const _0x332246 of _0x4d2508){const _0x4a16ba=this['_getVidAttributeName'](_0x332246),_0x2f328f=_0x332246['item']['getAttribute'](_0x4a16ba),_0x306f67=_0xcb18d['get'](_0x2f328f);_0x306f67&&'elementStart'==_0x332246['type']&&(_0x40b35f=Array['from'](_0x306f67)[0x0],_0x537d25=_0x332246['item']['getAttribute']('vid_end')),_0x40b35f&&(_0x85333a['set'](_0x2f328f,{'userId':_0x40b35f}),_0x4eabfb['set'](_0x2f328f,{'userId':_0x40b35f})),_0x2f328f==_0x537d25&&(_0x40b35f=null,_0x537d25=null);}}const _0x340e5e={},_0x4b2786=new Set();for(const _0x29f7fb of _0x5ce40f){const _0x2258e9=_0x3370bd['deletions'][_0x29f7fb],_0x447839=_0x3370bd['insertions'][_0x29f7fb];for(const {userId:_0x28c041}of this['_touchedMarkers']['values']())null!==_0x28c041&&_0x4b2786['add'](_0x28c041);for(const {userId:_0x25525c}of this['_touchedRoots']['values']())null!==_0x25525c&&_0x4b2786['add'](_0x25525c);this['_markChanges'](_0x447839,_0xd7cd4['insertions'][_0x29f7fb],_0x4eabfb,'insertion',_0x4b2786),this['_markChanges'](_0x2258e9,_0xd7cd4['deletions'][_0x29f7fb],_0x85333a,'deletion',_0x4b2786),_0x340e5e[_0x29f7fb]={'insertions':this['_prepareViewToSave'](_0x447839),'deletions':this['_prepareViewToSave'](_0x2258e9),'attachChange':this['_touchedRoots']['get'](_0x29f7fb)||null,'attributesBefore':_0x5e9d8c(this['_baseRootsAttributes']['get'](_0x29f7fb))||{},'attributesAfter':_0x5e9d8c(this['_diffRootsAttributes']['get'](_0x29f7fb))};}return{'diffData':_0x340e5e,'authorsIds':Array['from'](_0x4b2786)};}['_processRootBeforeSave'](_0x452de0){for(const [,_0x56d8ec]of _0x452de0['markers']){const _0x3cd6dd=_0x56d8ec['start']['getAncestors']()['filter'](_0x1b78c2=>'tableCell'==_0x1b78c2['name']);for(const _0x399b1e of _0x3cd6dd)0x1==_0x399b1e['childCount']&&_0x399b1e['getChild'](0x0)['is']('element','paragraph')&&_0x399b1e['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x28418b){this['_processRootBeforeSave'](_0x28418b);const _0x1c0576=this['editor']['data']['toView'](_0x28418b,{}),_0x4e51f3=Array['from'](_0x1c0576['getChildren']())['map'](_0x2a5ae4=>this['_getViewJson'](_0x2a5ae4));return JSON['stringify'](_0x4e51f3);}['_getViewJson'](_0x1fabc2){if(_0x1fabc2['is']('$text'))return _0x1fabc2['data'];{const _0x5f064c=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x511f13=_0x1fabc2,_0x196c3e=this['editor']['data']['htmlProcessor']['domConverter'],_0x33adfd={'type':_0x5f064c['_getTypeCharForViewElement'](_0x511f13),'name':_0x511f13['name'],'attributes':Array['from'](_0x511f13['getAttributes']()),'children':Array['from'](_0x511f13['getChildren']())['map'](_0x18f1a5=>this['_getViewJson'](_0x18f1a5))};if(_0x1fabc2['is']('uiElement')&&'$comment'!=_0x1fabc2['name']){const _0x414a73=_0x1fabc2['render'](_0x196c3e['domDocument'],_0x196c3e);_0x33adfd['children']['push'](_0x414a73['outerHTML']);}else{if(_0x1fabc2['is']('rawElement')){const _0x18fd32=_0x196c3e['domDocument']['createElement'](_0x511f13['name']);_0x1fabc2['render'](_0x18fd32,_0x196c3e),_0x33adfd['children']['push'](_0x18fd32['innerHTML']);}}const _0x1a564e=Array['from'](_0x511f13['getCustomProperties']());_0x1a564e['length']>0x0&&(_0x33adfd['customProperties']=_0x1a564e);const _0x1b43aa=_0x511f13['getFillerOffset']();return null!==_0x1b43aa&&(_0x33adfd['fillerOffset']=_0x1b43aa),_0x33adfd;}}['_markChanges'](_0xd20c8a,_0x2f33c7,_0x12be1f,_0x3e3b79,_0x5bd289){let _0x2e7a88=null,_0x48db78=null,_0x39ea2c=0x0;const _0x49f020=this['editor']['model'];for(let _0x1f850b=0x0;_0x1f850b<_0x2f33c7['length'];_0x1f850b++){const _0x4b9464=this['_getVidAttributeName'](_0x2f33c7[_0x1f850b]),_0x58a49c=_0x2f33c7[_0x1f850b]['item']['getAttribute'](_0x4b9464),_0x16691d=_0x12be1f['get'](_0x58a49c),_0x5e5d52=_0x1f850b==_0x2f33c7['length']-0x1;(!_0x2e7a88&&_0x16691d&&(_0x2e7a88=_0x16691d,_0x48db78=_0x2f33c7[_0x1f850b]),_0x2e7a88&&(!_0x16691d||_0x16691d['userId']!=_0x2e7a88['userId']))&&(_0x557405(_0x16691d,F(_0x48db78,_0xd20c8a,_0x49f020),F(_0x2f33c7[_0x1f850b],_0xd20c8a,_0x49f020)),_0x2e7a88=_0x16691d||null,_0x48db78=_0x16691d?_0x2f33c7[_0x1f850b]:null),_0x2e7a88&&_0x5e5d52&&_0x557405(_0x16691d,F(_0x48db78,_0xd20c8a,_0x49f020),B(_0x2f33c7[_0x1f850b],_0xd20c8a,_0x49f020));}function _0x557405(_0xa690a4,_0x530eb0,_0x3c8d45){const _0x20a20f=_0x2e7a88['userId'],_0x4c22b2='revision:'+_0x3e3b79+':'+_0x20a20f+':'+_0x39ea2c++,_0x45b8bc=_0x49f020['createRange'](_0x530eb0,_0x3c8d45);_0xd20c8a['markers']['set'](_0x4c22b2,_0x45b8bc),null!==_0x20a20f&&_0x5bd289['add'](_0x20a20f);}}['_getVidAttributeName'](_0x3acc18){switch(_0x3acc18['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x349e7f,_0x5a8ec6){_0x349e7f['baseVersion']=null;for(const _0x2f3567 in _0x349e7f){const _0x4f78e0=_0x349e7f[_0x2f3567];if(_0x4f78e0 instanceof vt){const _0x134357=_0x5a8ec6['get'](_0x4f78e0['root']['rootName']);_0x349e7f[_0x2f3567]=this['_fixPosition'](_0x4f78e0,_0x134357);}if(_0x4f78e0 instanceof ft){const _0x6b7ac7=_0x5a8ec6['get'](_0x4f78e0['root']['rootName']);_0x349e7f[_0x2f3567]=this['_fixRange'](_0x4f78e0,_0x6b7ac7);}'root'===_0x2f3567&&(_0x349e7f['root']=_0x5a8ec6['get'](_0x349e7f['root']['rootName']));}}['_fixRange'](_0x2c7298,_0x3f2fe8){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2c7298['start'],_0x3f2fe8),this['_fixPosition'](_0x2c7298['end'],_0x3f2fe8));}['_fixPosition'](_0x2445e9,_0x305242){return this['editor']['model']['createPositionFromPath'](_0x305242,_0x2445e9['path'],_0x2445e9['stickiness']);}['_handleInsertOperation'](_0x3787e3){const _0x5bfc9e=this['_idsRoots']['get'](_0x3787e3['position']['root']['rootName']),_0x4f7ccf=this['_fixPosition'](_0x3787e3['position'],_0x5bfc9e),_0x45ff0c=null===_0x3787e3['_authorId']?null:_0x3787e3['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3e9976=_0x4f7ccf['parent'],_0x312df5=this['_revisionId'],_0x3cc99e=[];for(const _0xaeefb8 of _0x3787e3['nodes'])if(_0xaeefb8['is']('element'))_0x3cc99e['push'](this['_makeIdsRoot'](_0xaeefb8));else{for(let _0x4010db=0x0;_0x4010db<_0xaeefb8['offsetSize'];_0x4010db++)_0x3cc99e['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x18afa6=this['_revisionId'];for(let _0x185724=_0x312df5;_0x185724<_0x18afa6;_0x185724++)this['_touched']['set'](_0x185724,{'userId':_0x45ff0c});_0x3e9976['_insertChild'](_0x4f7ccf['offset'],_0x3cc99e);}['_handleMoveOperation'](_0x1bbe92){(_0x1bbe92=this['_cloneOperation'](_0x1bbe92,this['_idsRoots']))['_execute']();const _0x257326=null===_0x1bbe92['_authorId']?null:_0x1bbe92['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2d2bce=_0x1bbe92['getMovedRangeStart'](),_0x43b633=_0x2d2bce['parent'],_0x4d8927=_0x2d2bce['offset'];!function _0x57faed(_0x515204,_0x348fa1,_0x5f0761,_0x419f06){for(let _0x367adb=_0x5f0761;_0x367adb<_0x419f06;_0x367adb++){const _0x41a78c=_0x348fa1['getChild'](_0x367adb);_0x41a78c['is']('element','$text')?_0x515204['set'](_0x41a78c['getAttribute']('vid'),{'userId':_0x257326}):(_0x515204['set'](_0x41a78c['getAttribute']('vid_start'),{'userId':_0x257326}),_0x57faed(_0x515204,_0x41a78c,0x0,_0x41a78c['childCount']),_0x515204['set'](_0x41a78c['getAttribute']('vid_end'),{'userId':_0x257326}));}}(this['_touched'],_0x43b633,_0x4d8927,_0x4d8927+_0x1bbe92['howMany']);}['_handleMergeOperation'](_0xa7ae5c){const _0x4a8269=null===(_0xa7ae5c=this['_cloneOperation'](_0xa7ae5c,this['_idsRoots']))['_authorId']?null:_0xa7ae5c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x338f93=_0xa7ae5c['targetPosition']['parent'],_0x37fab1=_0xa7ae5c['sourcePosition']['parent'],_0x4dd310=_0x338f93['getAttribute']('vid_end'),_0x50a340=_0x37fab1['getAttribute']('vid_start');_0x338f93['_setAttribute']('vid_end',_0x37fab1['getAttribute']('vid_end')),_0x37fab1['_setAttribute']('vid_end',_0x4dd310),this['_touched']['set'](_0x50a340,{'userId':_0x4a8269}),this['_touched']['set'](_0x4dd310,{'userId':_0x4a8269}),_0xa7ae5c['_execute']();}['_handleSplitOperation'](_0x3080c0){const _0x1553c8=null===(_0x3080c0=this['_cloneOperation'](_0x3080c0,this['_idsRoots']))['_authorId']?null:_0x3080c0['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x526eb2=_0x3080c0['graveyardPosition'],_0x3f7063=_0x3080c0['splitPosition']['parent'];_0x3080c0['_execute']();const _0x984ec=_0x3f7063['getAttribute']('vid_end'),_0x2f8ce5=_0x3080c0['insertionPosition']['nodeAfter'];if(_0x526eb2){const _0x400afa=_0x2f8ce5['getAttribute']('vid_end'),_0xd19c56=_0x3f7063['getAttribute']('vid_end');_0x3f7063['_setAttribute']('vid_end',_0x400afa),_0x2f8ce5['_setAttribute']('vid_end',_0xd19c56),this['_touched']['set'](_0x3f7063['getAttribute']('vid_end'),{'userId':_0x1553c8}),this['_touched']['set'](_0x2f8ce5['getAttribute']('vid_start'),{'userId':_0x1553c8});}else{const _0x1e4677=this['_revisionId']++,_0x3f3102=this['_revisionId']++;_0x3f7063['_setAttribute']('vid_end',_0x1e4677),_0x2f8ce5['_setAttribute']('vid_start',_0x3f3102),_0x2f8ce5['_setAttribute']('vid_end',_0x984ec),this['_touched']['set'](_0x1e4677,{'userId':_0x1553c8}),this['_touched']['set'](_0x3f3102,{'userId':_0x1553c8});}}['_handleMarkerOperation'](_0x5b1c42){if(!_0x5b1c42['affectsData'])return;const _0x5e45b0=(_0x5b1c42=this['_cloneOperation'](_0x5b1c42,this['_diffRoots']))['oldRange']?_0x5b1c42['oldRange']['root']:null,_0x537226=_0x5b1c42['newRange']?_0x5b1c42['newRange']['root']:null;_0x5e45b0&&this['_markers']['delete'](_0x5b1c42['name']),_0x537226&&this['_markers']['set'](_0x5b1c42['name'],_0x5b1c42['newRange']['clone']());const _0x28efde=null===_0x5b1c42['_authorId']?null:_0x5b1c42['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x43f879=_0x5b1c42['name'];if(!this['_touchedMarkers']['has'](_0x43f879))return void this['_touchedMarkers']['set'](_0x43f879,{'range':_0x5b1c42['oldRange'],'userId':_0x28efde});const _0x4d64a1=this['_touchedMarkers']['get'](_0x43f879),_0x628ed5=_0x4d64a1['range'],_0x2b55bd=_0x5b1c42['newRange'];null==_0x628ed5&&null==_0x2b55bd||_0x628ed5&&_0x2b55bd&&_0x628ed5['isEqual'](_0x2b55bd)?this['_touchedMarkers']['delete'](_0x5b1c42['name']):_0x4d64a1['userId']=_0x28efde;}['_handleRootOperation'](_0x13e67f,_0xbd98a){this['_diffRoots']['has'](_0x13e67f['rootName'])?this['_diffRoots']['get'](_0x13e67f['rootName'])['_isAttached']=_0x13e67f['isAdd']:(this['_diffRoots']['set'](_0x13e67f['rootName'],P(_0x13e67f['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x13e67f['rootName'],{}),_0xbd98a&&this['_idsRoots']['set'](_0x13e67f['rootName'],P(_0x13e67f['rootName'],!0x0)));const _0xebc18a=null===_0x13e67f['_authorId']?null:_0x13e67f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x37278d=this['_touchedRoots']['get'](_0x13e67f['rootName']);_0x37278d&&_0x37278d['userId']===_0xebc18a?this['_touchedRoots']['delete'](_0x13e67f['rootName']):this['_touchedRoots']['set'](_0x13e67f['rootName'],{'userId':_0xebc18a,'isAttached':_0x13e67f['isAdd']});}['_handleRootAttributeOperation'](_0x18f19c){const _0x5ad2e9=this['_diffRootsAttributes']['get'](_0x18f19c['root']['rootName']);null===_0x18f19c['newValue']?delete _0x5ad2e9[_0x18f19c['key']]:_0x5ad2e9[_0x18f19c['key']]=_0x18f19c['newValue'];}}function N(_0x44537b){const _0x35abe9=P(_0x44537b['rootName'],_0x44537b['isAttached']());for(const _0x5e71b9 of _0x44537b['getChildren']()){const _0x42c1b9=_0x5e71b9['_clone'](!0x0);_0x35abe9['_appendChild'](_0x42c1b9);}return _0x35abe9;}function P(_0x14e5d7,_0x551057=!0x0){const _0xe5df1=new gt();return _0xe5df1['rootName']=_0x14e5d7,_0xe5df1['_isAttached']=_0x551057,_0xe5df1['isAttached']=()=>_0xe5df1['_isAttached'],_0xe5df1;}function F(_0x5df126,_0xa4d3d5,_0x4d3e0a){const _0x3b7a9e='elementEnd'==_0x5df126['type']?_0x4d3e0a['createPositionAt'](_0x5df126['item'],'end'):_0x4d3e0a['createPositionBefore'](_0x5df126['item']);return _0x4d3e0a['createPositionFromPath'](_0xa4d3d5,_0x3b7a9e['path'],_0x3b7a9e['stickiness']);}function B(_0x508e29,_0x4e453a,_0x24eeb1){const _0x43e1c8='elementStart'==_0x508e29['type']?_0x24eeb1['createPositionAt'](_0x508e29['item'],0x0):_0x24eeb1['createPositionAfter'](_0x508e29['item']);return _0x24eeb1['createPositionFromPath'](_0x4e453a,_0x43e1c8['path'],_0x43e1c8['stickiness']);}class os extends _0x307380{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x371112,_0x53b80c){super(_0x371112),this['focusTracker']=new _0x4b6d96(),this['keystrokes']=new _0x2a5236(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x53b80c),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x3d8486({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x8ef00c=_0x215b19=>_0x215b19['stopPropagation']();this['keystrokes']['set']('arrowright',_0x8ef00c),this['keystrokes']['set']('arrowleft',_0x8ef00c),this['keystrokes']['set']('arrowup',_0x8ef00c),this['keystrokes']['set']('arrowdown',_0x8ef00c);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x4e6833){this['revisionNameInputView']['fieldView']['element']['value']=_0x4e6833['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x31bdc6){const _0x1fef4c=new nt(this['locale'],ti),_0x2a42aa=_0x1fef4c['fieldView'];_0x2a42aa['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x3a8857=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x31bdc6&&(_0x3a8857+='\x20('+g(this['locale'],'optional')+')'),(_0x1fef4c['label']=_0x3a8857,_0x2a42aa['on']('input',()=>{this['revisionNameInputValue']=_0x2a42aa['element']['value']['trim']();}),_0x1fef4c);}}class f extends _0x5e0615{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x5e6281=this['editor'],_0x28faf0=_0x5e6281['plugins']['get']('RevisionTracker');_0x5e6281['ui']['componentFactory']['add']('revisionHistory',_0x125876=>{const _0x14e3e2=_0x39369a(_0x125876),_0x5da28a=_0x14e3e2['panelView']['children'],_0x4bf91c=new _0x490b59(_0x125876),_0x4fff74=new te(_0x125876),_0x36c768=new _0x9f075f(_0x125876),_0x505bc2=new te(_0x125876),_0x343d74=new _0x9f075f(_0x125876);return _0x14e3e2['bind']('isEnabled')['to'](_0x28faf0,'isReady',_0x28faf0,'isEnabled',_0x5e6281,'isReadOnly',(_0x3c9476,_0x453853,_0x206c06)=>_0x3c9476&&_0x453853&&!_0x206c06),_0x14e3e2['buttonView']['set']({'icon':_0x402578,'label':g(_0x125876,'Revision\x20history'),'tooltip':!0x0}),_0x36c768['set']({'label':g(_0x125876,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x36c768['bind']('isEnabled')['to'](_0x28faf0,'isReady',_0x28faf0,'isEnabled',_0x5e6281,'isReadOnly',(_0x775b92,_0x52168d,_0x87936a)=>_0x775b92&&_0x52168d&&!_0x87936a),_0x36c768['on']('execute',()=>this['_showDialog']()),_0x343d74['set']({'label':g(_0x125876,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x343d74['bind']('isEnabled')['to'](_0x28faf0,'isReady',_0x5e6281,'isReadOnly',(_0x50beea,_0x88712c)=>_0x50beea&&!_0x88712c),_0x343d74['on']('execute',()=>{_0x5e6281['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x14e3e2['isOpen']=!0x1,_0x5e6281['editing']['view']['focus']();}),_0x4fff74['children']['add'](_0x36c768),_0x505bc2['children']['add'](_0x343d74),_0x4bf91c['role']='menu',_0x4bf91c['items']['addMany']([_0x4fff74,_0x505bc2]),_0x5da28a['add'](_0x4bf91c),_0x14e3e2;}),_0x5e6281['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x266282=this['editor'],_0x2ddcc4=_0x266282['locale'],_0x19bbf3=new _0x4c2fb1(_0x2ddcc4),_0x59dbd1=new _0x1cc4e0(_0x2ddcc4);_0x19bbf3['buttonView']['set']({'icon':_0x402578,'label':g(_0x2ddcc4,'Revision\x20history')});const _0x30912b=new _0x59f497(_0x2ddcc4,_0x19bbf3),_0x358d94=new _0x4c4920(_0x2ddcc4);_0x358d94['set']({'label':g(_0x2ddcc4,'Save\x20current\x20revision')}),_0x358d94['delegate']('execute')['to'](_0x19bbf3),_0x358d94['on']('execute',()=>{this['_showDialog']();}),_0x30912b['children']['add'](_0x358d94),_0x59dbd1['items']['add'](_0x30912b);const _0x2415c=new _0x59f497(_0x2ddcc4,_0x19bbf3),_0x4bdfea=new _0x4c4920(_0x2ddcc4);return _0x4bdfea['set']({'label':g(_0x2ddcc4,'Open\x20revision\x20history')}),_0x4bdfea['delegate']('execute')['to'](_0x19bbf3),_0x4bdfea['on']('execute',()=>{_0x266282['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x2415c['children']['add'](_0x4bdfea),_0x59dbd1['items']['add'](_0x2415c),_0x19bbf3['panelView']['children']['add'](_0x59dbd1),_0x19bbf3;}['_showDialog'](){const _0x96f94d=this['editor'],_0x4a06c5=_0x96f94d['locale'],_0x43c69e=_0x96f94d['plugins']['get']('Dialog'),_0x26d89b=_0x96f94d['plugins']['get']('RevisionTracker');function _0x4fd24a(_0x3ddf1c){_0x96f94d['config']['get']('revisionHistory.requireRevisionName')&&''===_0x3ddf1c['revisionName']?_0x3ddf1c['revisionNameInputView']['errorText']=g(_0x4a06c5,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x96f94d['plugins']['get'](u)['saveRevision']({'name':_0x3ddf1c['revisionName']}),_0x43c69e['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x4fd24a(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x43c69e['show']({'id':'revisionSave','title':g(_0x4a06c5,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x96f94d['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x43c69e['hide']()},{'label':g(_0x96f94d['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x2f6af6){_0x2f6af6['bind']('isEnabled')['to'](_0x26d89b,'isReady',_0x26d89b,'isEnabled',_0x96f94d,'isReadOnly',(_0x350a06,_0x99318a,_0x506152)=>_0x350a06&&_0x99318a&&!_0x506152);},'onExecute':()=>_0x4fd24a(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x3cc9ff=this['editor'],_0x1fa5f3=_0x3cc9ff['locale'];this['_saveRevisionFormView']=new os(_0x1fa5f3,_0x3cc9ff['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends _0x307380{['changeId'];['_model'];constructor(_0xa25996,_0x7d0859){super(_0xa25996),this['_model']=_0x7d0859,this['changeId']=_0x7d0859['id'];const _0x29ed43=this['bindTemplate'],_0x28c829=g(_0xa25996,_0x7d0859['data']['isSuggestion']?'Suggested\x20by':'add'==_0x7d0859['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x7d0859['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x29ed43['to']('type',_0x1be7b8=>'ck-revision-change__'+_0x1be7b8)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x28c829}]},{'text':'\x20'+_0x7d0859['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
- _0x15db80(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x48e8e6){super(),this['id']=_0x48e8e6['id']||_0x21f3e7(),this['author']=_0x48e8e6['author'],this['type']=_0x48e8e6['type'],this['data']=_0x48e8e6['data']||{},this['rootName']=_0x48e8e6['rootName'],this['set']('createdAt',_0x48e8e6['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(_0x348cfd,_0x37ee52){this['newRevisionId']=_0x348cfd,this['oldRevisionId']=_0x37ee52,this['changes']=new _0x24b94b();}['_setChanges'](_0x4f0a86){for(const _0x1d4c79 of _0x4f0a86)this['changes']['add'](_0x1d4c79);}}class m extends _0x5e0615{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0xb2974f,_0x1cb441,I,V];}constructor(_0x37ee44){super(_0x37ee44),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),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',(_0x101e2e,_0x1c8bb9,_0x3eff96)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x226744=>{for(const _0x3866cf of this['editor']['editing']['view']['document']['roots'])_0x3eff96?_0x226744['removeClass']('ck-editor__editable__overlay',_0x3866cf):_0x226744['addClass']('ck-editor__editable__overlay',_0x3866cf);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x3f9bd7=>null!==_0x3f9bd7),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3b5835,_0x5923e7,_0x25155b)=>_0x3b5835&&_0x25155b?_0x5923e7['changes']['getIndex'](_0x25155b):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x450070,_0x8484c7)=>_0x450070?_0x8484c7['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x1cb441);}['init'](){const _0x52cbb0=this['editor'],_0x15d5b3=new pt(_0x52cbb0,{'direction':'backward'}),_0x3639d8=new pt(_0x52cbb0,{'direction':'forward'});(_0x52cbb0['commands']['add']('showPreviousChange',_0x15d5b3),_0x52cbb0['commands']['add']('showNextChange',_0x3639d8),_0x52cbb0['commands']['add']('restoreRevision',new wt(_0x52cbb0)),this['on']('change:numberOfChanges',()=>{_0x15d5b3['refresh'](),_0x3639d8['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x52cbb0['enableReadOnlyMode']('revision-viewer'),_0x52cbb0['plugins']['has']('WidgetToolbarRepository'))&&_0x52cbb0['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x23d122){return await this['_utils']['loadRevisionData'](_0x23d122,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x23d122);}async['getRevisionRootsAttributes'](_0x34ff09){return await this['_utils']['loadRevisionData'](_0x34ff09,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x34ff09);}async['compare'](_0x333a85,_0x58aa1d,_0x37ee85=!0x1){if(!this['isEnabled'])return;const _0x1f069a=this['diff'],_0x4e7a4d=this['repository'],_0x167fbc='string'==typeof _0x333a85?_0x4e7a4d['getRevision'](_0x333a85):_0x333a85,_0x28ae79='string'==typeof _0x58aa1d?_0x4e7a4d['getRevision'](_0x58aa1d):_0x58aa1d,_0x49c86c=_0x167fbc['id'],_0x7fab85=_0x28ae79?_0x28ae79['id']:null;if(!_0x37ee85&&this['diff']&&this['diff']['newRevisionId']===_0x49c86c&&this['diff']['oldRevisionId']===_0x7fab85)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x49c86c,_0x7fab85);const _0x1fa870=this['_getRevisionsRange'](_0x167fbc,_0x28ae79,!0x0)['map'](_0x29bab0=>this['_utils']['loadRevisionData'](_0x29bab0,this['adapter']));return _0x1fa870['push'](new Promise(_0x11a92c=>{setTimeout(_0x11a92c,0x14);})),Promise['all'](_0x1fa870)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x34f400=this['_getDiff'](_0x49c86c,_0x7fab85);for(const _0x26c6ca of _0x34f400['changes'])this['_changeIdToChange']['set'](_0x26c6ca['id'],_0x26c6ca);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x64c3f9=>{for(const _0x44bb6d of this['editor']['model']['document']['getRootNames']())_0x64c3f9['detachRoot'](_0x44bb6d);for(const _0x47977c of Object['keys'](_0x34f400['model'])){const _0x37615e=_0x64c3f9['addRoot'](_0x47977c);for(const _0x52f1b5 of Object['keys'](_0x34f400['attributes'][_0x47977c]))_0x64c3f9['setAttribute'](_0x52f1b5,_0x34f400['attributes'][_0x47977c][_0x52f1b5],_0x37615e);_0x64c3f9['insert'](_0x34f400['model'][_0x47977c],_0x37615e,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x34f400['changes'])),this['isReady']=!0x0;})['catch'](_0x226466=>{console['error'](_0x226466),this['_cleanUp'](),_0x1f069a&&(this['diff']=_0x1f069a),this['isReady']=!0x0;});}['addRevisionData'](_0x565dac,_0x134487){const _0x54d7f7=this['repository']['createRevision'](_0x565dac);return _0x54d7f7['on']('_update',(_0x307180,_0x46858c,_0x19eda7)=>_0x134487(_0x46858c,_0x19eda7,_0x54d7f7)),this['repository']['addRevision'](_0x54d7f7),_0x54d7f7;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2f9542=>{for(const _0x5c39f1 of this['editor']['model']['document']['getRootNames']())_0x2f9542['detachRoot'](_0x5c39f1);});}['_sortAndFilterDiffChanges'](_0x189196){const _0x15ba5a=[],_0x253bb9=new Map();for(const _0x73b20d of this['editor']['model']['document']['getRootNames']()){const _0x2c41f6=this['editor']['editing']['view']['getDomRoot'](_0x73b20d);if(!_0x2c41f6)continue;const _0x4ac3c2=_0x2c41f6['getClientRects']()['item'](0x0);_0x4ac3c2&&(_0x15ba5a['push'](_0x73b20d),_0x253bb9['set'](_0x73b20d,_0x4ac3c2));}return _0x15ba5a['sort']((_0x1f9571,_0x177651)=>{const _0x2cc6d4=_0x253bb9['get'](_0x1f9571),_0x310a97=_0x253bb9['get'](_0x177651);return _0x2cc6d4['y']-_0x310a97['y']||_0x2cc6d4['x']-_0x310a97['x'];}),(_0x189196=_0x189196['filter'](_0x4001a8=>_0x15ba5a['includes'](_0x4001a8['rootName'])))['sort']((_0x2517ff,_0x512819)=>_0x15ba5a['indexOf'](_0x2517ff['rootName'])-_0x15ba5a['indexOf'](_0x512819['rootName'])),_0x189196;}['_makeTape'](_0x2db283){const _0x3222a0=Array['from'](_0x2db283['markers'])['filter'](([_0x22b6ec,_0x44a906])=>_0x22b6ec['startsWith']('revision:')&&!_0x44a906['isCollapsed']),_0x2420fb=Array['from'](this['editor']['model']['createRangeIn'](_0x2db283)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x3222a0['length'])for(const _0x111975 of _0x2420fb){const [_0xd8709b,_0x5e4195]=_0x3222a0[0x0],[,_0x141f15,_0x12b9c6]=_0xd8709b['split'](':');if(_0x5e4195['end']['isEqual'](_0x111975['nextPosition'])&&_0x3222a0['shift'](),(_0x111975['previousPosition']['isEqual'](_0x5e4195['start'])||_0x111975['previousPosition']['isAfter'](_0x5e4195['start']))&&('insertion'==_0x141f15?_0x111975['isAdded']={'userId':_0x12b9c6}:'deletion'==_0x141f15&&(_0x111975['isRemoved']={'userId':_0x12b9c6})),0x0==_0x3222a0['length'])break;}return _0x2420fb;}['_refreshStartEndIndex'](_0x806e40){const _0x11b28=new Map();for(let _0x25e4a9=0x0;_0x25e4a9<_0x806e40['length'];_0x25e4a9++)'text'===_0x806e40[_0x25e4a9]['type']?(_0x806e40[_0x25e4a9]['item']['startIndex']=_0x25e4a9,_0x806e40[_0x25e4a9]['item']['endIndex']=_0x25e4a9):('elementStart'===_0x806e40[_0x25e4a9]['type']?_0x806e40[_0x25e4a9]['item']['startIndex']=_0x25e4a9:'elementEnd'===_0x806e40[_0x25e4a9]['type']&&(_0x806e40[_0x25e4a9]['item']['endIndex']=_0x25e4a9),_0x11b28['set'](_0x806e40[_0x25e4a9]['id'],_0x25e4a9));for(const _0x204789 of _0x11b28['values']())'elementStart'===_0x806e40[_0x204789]['type']?_0x806e40[_0x204789]['item']['endIndex']=_0x11b28['get'](_0x806e40[_0x204789]['pairId']):'elementEnd'===_0x806e40[_0x204789]['type']&&(_0x806e40[_0x204789]['item']['startIndex']=_0x11b28['get'](_0x806e40[_0x204789]['pairId']));}['_processTape'](_0x238acd){for(let _0x464112=0x0;_0x464112<_0x238acd['length'];_0x464112++){if('elementStart'===_0x238acd[_0x464112]['type'])_0x238acd[_0x464112]['item']['startIndex']=_0x464112;else{if('elementEnd'===_0x238acd[_0x464112]['type']){_0x238acd[_0x464112]['item']['endIndex']=_0x464112;const _0x48522d=_0x238acd[_0x464112]['item']['startIndex'];_0x238acd[_0x48522d]['pairId']=_0x238acd[_0x464112]['id'],_0x238acd[_0x464112]['pairId']=_0x238acd[_0x48522d]['id'];}else _0x238acd[_0x464112]['item']['startIndex']=_0x464112,_0x238acd[_0x464112]['item']['endIndex']=_0x464112,_0x238acd[_0x464112]['pairId']=null;}_0x238acd[_0x464112]['markersStart']||(_0x238acd[_0x464112]['markersStart']=[],_0x238acd[_0x464112]['markersEnd']=[]);}}['_markInsertions'](_0x40db38,_0x2a8454){const _0x357971=_0x40db38['filter'](_0x4719e2=>!_0x4719e2['isAdded']);for(let _0x52f8da=0x0;_0x52f8da<_0x2a8454['length'];_0x52f8da++)_0x2a8454[_0x52f8da]['isAdded']&&(_0x357971[_0x52f8da]['isAdded']=_0x2a8454[_0x52f8da]['isAdded']);}['_getDiff'](_0x4a8c96,_0x1c4667=null){const _0xfe58ad=this['repository']['getRevision'](_0x4a8c96),_0x582489=_0x1c4667?this['repository']['getRevision'](_0x1c4667):null,_0x2e6583=this['_getRevisionsRange'](_0xfe58ad,_0x582489),_0x4789ef=_0x2e6583[_0x2e6583['length']-0x1],_0xb397db=new Map(),_0x26d8b4={'model':{},'attributes':{},'changes':[]},_0x58edf1=new Set(),_0x438afd=new Map();for(let _0x4d4cdf=_0x2e6583['length']-0x1;_0x4d4cdf>=0x0;_0x4d4cdf--){const _0x23e609=_0x2e6583[_0x4d4cdf];for(const _0x157c44 of Object['keys'](_0x23e609['diffData']))if(_0x23e609['diffData'][_0x157c44]['attachChange']){const _0x8bb2e6=_0x23e609['diffData'][_0x157c44]['attachChange'];_0x8bb2e6['isAttached']?(_0x58edf1['add'](_0x157c44),_0x438afd['has'](_0x157c44)&&_0x438afd['get'](_0x157c44)['userId']==_0x8bb2e6['userId']?_0x438afd['delete'](_0x157c44):_0x438afd['set'](_0x157c44,_0x8bb2e6)):_0x438afd['has'](_0x157c44)?(_0x58edf1['delete'](_0x157c44),_0x438afd['delete'](_0x157c44)):(_0x58edf1['add'](_0x157c44),_0x438afd['set'](_0x157c44,_0x8bb2e6));}else _0x58edf1['add'](_0x157c44);}for(const _0x5df3f1 of _0x58edf1){const _0x28b05c=_0x438afd['has'](_0x5df3f1)&&!_0x438afd['get'](_0x5df3f1)['isAttached'];let _0x251f95=_0x28b05c?_0x2e6583['length']-0x1:0x0;const _0x340ea1=_0x28b05c?-0x1:0x1;for(;_0x2e6583[_0x251f95];){const _0x38c427=_0x2e6583[_0x251f95];if(_0x38c427['diffData'][_0x5df3f1]){const _0x19a006=_0x28b05c?_0x38c427['diffData'][_0x5df3f1]['attributesBefore']:_0x38c427['diffData'][_0x5df3f1]['attributesAfter'];_0x26d8b4['attributes'][_0x5df3f1]=_0x19a006?_0x5e9d8c(_0x19a006):{};break;}_0x251f95+=_0x340ea1;}}for(const _0x3ddae0 of _0x2e6583){_0x3ddae0['model']={};for(const _0xe1a545 of _0x3ddae0['authors'])_0xb397db['set'](_0xe1a545['id'],_0xe1a545);for(const _0xcb55b9 of _0x58edf1){const _0x290f4f=_0x3ddae0['diffData'][_0xcb55b9]?_0x3ddae0['diffData'][_0xcb55b9]['insertions']:'[]',_0x3713b9=_0x3ddae0['diffData'][_0xcb55b9]?_0x3ddae0['diffData'][_0xcb55b9]['deletions']:'[]';_0x3ddae0['model'][_0xcb55b9]={'insertions':this['_utils']['_makeModelFromViewString'](_0x290f4f),'deletions':this['_utils']['_makeModelFromViewString'](_0x3713b9)};}}for(const _0x219385 of _0x58edf1){let _0x220f2d=null,_0x17964e=0x0;const _0x945e17=new Map(Array['from'](_0xfe58ad['model'][_0x219385]['insertions']['markers'])['filter'](([_0x1dcba5])=>!_0x1dcba5['startsWith']('revision:')));let _0x3d729c=0x0;for(const _0x46d19f of _0x2e6583){const _0x1ed88d=this['_makeTape'](_0x46d19f['model'][_0x219385]['insertions']);_0x46d19f==_0xfe58ad?(_0x220f2d=_0x1ed88d,_0x17964e=_0x220f2d['length'],_0x220f2d['forEach'](_0x4b936b=>{_0x4b936b['id']=_0x3d729c++;}),this['_processTape'](_0x220f2d)):this['_markInsertions'](_0x220f2d,_0x1ed88d);const _0x265041=_0x220f2d['filter'](_0x3a6bde=>!_0x3a6bde['isAdded'])['map'](_0x3983f1=>_0x3983f1['id']);let _0x4ce277=0x0;const _0x5d0b37=this['_makeTape'](_0x46d19f['model'][_0x219385]['deletions']);_0x5d0b37['forEach'](_0x106725=>{_0x106725['isRemoved']?_0x106725['id']=_0x17964e++:_0x106725['id']=_0x265041[_0x4ce277++];}),this['_processTape'](_0x5d0b37),this['_setDistance'](_0x220f2d,'isAdded'),this['_setDistance'](_0x5d0b37,'isRemoved'),_0x46d19f==_0xfe58ad&&this['_markMarkers'](_0x220f2d,_0x945e17),_0x220f2d=this['_joinTapes'](_0x220f2d,_0x5d0b37),this['_refreshStartEndIndex'](_0x220f2d),this['_setDistance'](_0x220f2d,'isRemoved');}_0x220f2d=_0x220f2d['filter'](_0x59341d=>!(_0x59341d['isAdded']&&_0x59341d['isRemoved']));const _0x160ad8=new Map(_0x4789ef['model'][_0x219385]['deletions']['markers']),_0x40e36b=new Set(_0x945e17['keys']());for(const _0x5b233c of _0x160ad8['keys']())_0x40e36b['delete'](_0x5b233c);this['_markSuggestions'](_0x220f2d,_0x40e36b),this['_fixObsoleteTags'](_0x220f2d),_0x220f2d=this['_removeMissingPairs'](_0x220f2d),_0x220f2d=this['_markMismatchedRemovedTags'](_0x220f2d),_0x220f2d=this['_removeUnsupportedChanges'](_0x220f2d);const {root:_0x5dda94,changes:_0x44e69e}=this['_makeModelFromTape'](_0x220f2d,_0xb397db,_0x219385);_0x26d8b4['model'][_0x219385]=_0x5dda94;const _0x3dc832=_0x438afd['get'](_0x219385);if(_0x3dc832){const _0x5d75ed=_0xb397db['get'](_0x3dc832['userId']),_0x5a5720=new r({'author':_0x5d75ed,'type':_0x3dc832['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x219385});_0x44e69e['unshift'](_0x5a5720),_0x26d8b4['attributes'][_0x219385]['revisionHistoryAttachChange']=_0x5a5720['id'];}_0x26d8b4['changes']=_0x26d8b4['changes']['concat'](_0x44e69e);}return _0x26d8b4;}['_markMarkers'](_0x33bba7,_0x460766){for(let _0x480576=0x0;_0x480576<_0x33bba7['length'];_0x480576++)for(const [_0x2f2b09,_0xd8292f]of _0x460766)!_0xd8292f['isCollapsed']&&_0xd8292f['start']['isEqual'](_0x33bba7[_0x480576]['previousPosition'])&&_0x33bba7[_0x480576]['markersStart']['push'](_0x2f2b09),_0xd8292f['end']['isEqual'](_0x33bba7[_0x480576]['nextPosition'])&&_0x33bba7[_0x480576]['markersEnd']['push'](_0x2f2b09);}['_joinTapes'](_0x3a75ec,_0x2a10be){let _0x2e50ce=[],_0x75cff2=0x0,_0x2fcf35=0x0;for(;_0x75cff2<_0x3a75ec['length']||_0x2fcf35<_0x2a10be['length'];){const _0x12c3c2=_0x3a75ec[_0x75cff2]||{},_0x1aa7b6=_0x2a10be[_0x2fcf35]||{};if(_0x12c3c2['id']==_0x1aa7b6['id'])_0x75cff2++,_0x2fcf35++,_0x2e50ce['push'](_0x12c3c2);else{if(_0x1aa7b6['isRemoved']&&_0x12c3c2['isAdded']){const {commonTape:_0x29b1e7,iEnd:_0x65f57,jEnd:_0x5e9139}=this['_threeWayMerge'](_0x3a75ec,_0x75cff2,_0x2a10be,_0x2fcf35);_0x2e50ce=_0x2e50ce['concat'](_0x29b1e7),_0x75cff2=_0x65f57,_0x2fcf35=_0x5e9139;}else _0x1aa7b6['isRemoved']?(_0x2fcf35++,_0x2e50ce['push'](_0x1aa7b6)):(_0x75cff2++,_0x2e50ce['push'](_0x12c3c2));}}return _0x2e50ce;}['_markSuggestions'](_0x24d01c,_0x37e0f1){const _0x3e3dff=[];for(let _0x31f5d1=0x0;_0x31f5d1<_0x24d01c['length'];_0x31f5d1++){for(let _0x11a18b=0x0;_0x11a18b<_0x24d01c[_0x31f5d1]['markersStart']['length'];_0x11a18b++){const _0x2ad3a9=_0x24d01c[_0x31f5d1]['markersStart'][_0x11a18b];if(!_0x37e0f1['has'](_0x2ad3a9))continue;const {group:_0x36aea6,type:_0x49fa72,authorId:_0x431f50}=_0x46a35(_0x2ad3a9);'revision-suggestion'!=_0x36aea6||'insertion'!=_0x49fa72&&'deletion'!=_0x49fa72||(_0x3e3dff['unshift']({'type':_0x49fa72,'name':_0x2ad3a9,'userId':_0x431f50}),_0x24d01c[_0x31f5d1]['markersStart']['splice'](_0x11a18b,0x1),_0x11a18b--);}_0x180c77(_0x24d01c[_0x31f5d1]);for(let _0x4e388b=0x0;_0x4e388b<_0x24d01c[_0x31f5d1]['markersEnd']['length'];_0x4e388b++){const _0x307576=_0x24d01c[_0x31f5d1]['markersEnd'][_0x4e388b];if(!_0x37e0f1['has'](_0x307576))continue;const {group:_0x41f0fa,type:_0x6ffbf}=_0x46a35(_0x307576);if('revision-suggestion'!=_0x41f0fa||'insertion'!=_0x6ffbf&&'deletion'!=_0x6ffbf)continue;_0x24d01c[_0x31f5d1]['markersEnd']['splice'](_0x4e388b,0x1),_0x4e388b--;const _0x1b8126=_0x3e3dff['findIndex'](_0x4893a1=>_0x4893a1['name']==_0x307576);_0x1b8126>-0x1&&_0x3e3dff['splice'](_0x1b8126,0x1);}}function _0x46a35(_0x1be73a){const _0x5ebd64=_0x1be73a['split'](':');return{'group':_0x5ebd64[0x0],'type':_0x5ebd64[0x1],'subType':_0x5ebd64['length']>=0x5?_0x5ebd64[0x2]:null,'id':_0x5ebd64['length']<0x5?_0x5ebd64[0x2]:_0x5ebd64[0x3],'authorId':_0x5ebd64['length']<0x5?_0x5ebd64[0x3]:_0x5ebd64[0x4],'markerCount':0x6==_0x5ebd64['length']?_0x5ebd64[0x5]:null};}function _0x180c77(_0x480a89){for(let _0x283f6d=0x0;_0x283f6d<_0x3e3dff['length'];_0x283f6d++){if(_0x480a89['isAdded']&&'insertion'==_0x3e3dff[_0x283f6d]['type'])return _0x480a89['isAddSuggestion']=_0x3e3dff[_0x283f6d],void delete _0x480a89['isAdded'];if(!_0x480a89['isAdded']&&!_0x480a89['isRemoved']&&'deletion'==_0x3e3dff[_0x283f6d]['type'])return void(_0x480a89['isRemoveSuggestion']=_0x3e3dff[_0x283f6d]);}}}['_setDistance'](_0x19aa9b,_0x21af38){let _0x4b61aa=0x0,_0x2be913=!0x1;const _0x18edcd=new Map();for(const _0x22539c of _0x19aa9b)_0x22539c[_0x21af38]?_0x2be913&&(_0x4b61aa++,_0x2be913=!0x1):(_0x4b61aa++,_0x2be913=!0x0),_0x18edcd['set'](_0x22539c['id'],_0x4b61aa);for(let _0x3add7d=0x0;_0x3add7d<_0x19aa9b['length'];_0x3add7d++){if('isRemoved'==_0x21af38&&_0x19aa9b[_0x3add7d]['isAdded']||'isAdded'==_0x21af38&&_0x19aa9b[_0x3add7d]['isRemoved'])continue;if('text'==_0x19aa9b[_0x3add7d]['type']){_0x19aa9b[_0x3add7d]['distance']=0x0;continue;}const _0x32cff6=_0x18edcd['get'](_0x19aa9b[_0x3add7d]['pairId']),_0x5a09db=_0x18edcd['get'](_0x19aa9b[_0x3add7d]['id']);_0x19aa9b[_0x3add7d]['distance']=_0x32cff6-_0x5a09db;}}['_getRevisionsRange'](_0x5c7219,_0x48137e,_0x276c2d=!0x1){const _0x5858a1=[];let _0x5935a0=this['repository']['getIndex'](_0x5c7219),_0x482cf7=this['repository']['getIndex'](_0x48137e);for(-0x1==_0x482cf7&&(_0x482cf7=this['repository']['_revisions']['length'],_0x276c2d=!0x1);_0x5935a0<_0x482cf7;)_0x5858a1['push'](this['repository']['getRevision'](_0x5935a0)),_0x5935a0++;return _0x276c2d&&_0x5858a1['push'](this['repository']['getRevision'](_0x5935a0)),_0x5858a1;}['_threeWayMerge'](_0x37719b,_0x4b119e,_0x1ccab2,_0x98421){const _0x49489d=this['editor']['model']['schema'];let _0x3a145c=_0x4b119e;for(;_0x37719b[_0x3a145c]&&_0x37719b[_0x3a145c]['isAdded'];)_0x3a145c++;let _0x1ad174=_0x98421;for(;_0x1ccab2[_0x1ad174]&&_0x1ccab2[_0x1ad174]['isRemoved'];)_0x1ad174++;_0x3abd7d(_0x37719b,_0x4b119e,_0x3a145c),_0x3abd7d(_0x1ccab2,_0x98421,_0x1ad174);const _0x23eb5b=_0x1ccab2['slice'](_0x98421,_0x1ad174)['concat'](_0x37719b['slice'](_0x4b119e,_0x3a145c));return _0x23eb5b['sort']((_0x4a2fff,_0x57ddd9)=>_0x4a2fff['side']!=_0x57ddd9['side']?_0x4a2fff['side']-_0x57ddd9['side']:_0x4a2fff['level']!=_0x57ddd9['level']?_0x4a2fff['level']-_0x57ddd9['level']:_0x4a2fff['distance']!=_0x57ddd9['distance']?_0x57ddd9['distance']-_0x4a2fff['distance']:!!_0x4a2fff['isAdded']!=!!_0x57ddd9['isAdded']?-0x1==_0x4a2fff['side']||0x0==_0x4a2fff['side']?_0x4a2fff['isAdded']?-0x1:0x1:_0x4a2fff['isAdded']?0x1:-0x1:_0x4a2fff['index']-_0x57ddd9['index']),{'commonTape':_0x23eb5b,'iEnd':_0x3a145c,'jEnd':_0x1ad174};function _0x3abd7d(_0x38a3d8,_0x5f86ee,_0x78c00d){let _0x5aa841=-0x1,_0x1c5d42=Number['POSITIVE_INFINITY'],_0x5ef406=!0x0;for(let _0xf54319=_0x5f86ee;_0xf54319<_0x78c00d;_0xf54319++)if(_0x49489d['isInline'](_0x38a3d8[_0xf54319]['item'])||(_0x5ef406=!0x1),_0x38a3d8[_0xf54319]['item']['startIndex']<_0x5f86ee&&(_0x5aa841=_0xf54319),_0x38a3d8[_0xf54319]['item']['endIndex']>=_0x78c00d){_0x1c5d42=_0xf54319;break;}_0x5ef406&&(_0x5aa841=_0x78c00d-0x1);for(let _0x1e2aab=_0x5f86ee;_0x1e2aab<_0x78c00d;_0x1e2aab++)_0x38a3d8[_0x1e2aab]['side']=_0x1e2aab<=_0x5aa841?-0x1:_0x1e2aab<_0x1c5d42?0x0:0x1,_0x38a3d8[_0x1e2aab]['index']=_0x1e2aab;let _0x17ad44=0x0;for(let _0x35315a=_0x5f86ee;_0x35315a<=_0x5aa841;_0x35315a++)0x0==_0x38a3d8[_0x35315a]['distance']?_0x38a3d8[_0x35315a]['level']=_0x17ad44:(_0x17ad44++,_0x38a3d8[_0x35315a]['level']=_0x17ad44,_0x17ad44++);for(let _0x2592bc=_0x5f86ee;_0x2592bc<_0x78c00d;_0x2592bc++)0x0==_0x38a3d8[_0x2592bc]['side']&&(_0x38a3d8[_0x2592bc]['level']=_0x17ad44);_0x17ad44=0x0;for(let _0x470378=_0x78c00d-0x1;_0x470378>=_0x1c5d42;_0x470378--)0x0==_0x38a3d8[_0x470378]['distance']?_0x38a3d8[_0x470378]['level']=_0x17ad44:(_0x17ad44--,_0x38a3d8[_0x470378]['level']=_0x17ad44,_0x17ad44--);}}['_fixObsoleteTags'](_0x23f17d){const _0x1ea428=new Map(),_0x57da45=this['editor']['model']['schema'];for(let _0x58dd34=0x1;_0x58dd34<_0x23f17d['length'];_0x58dd34++){let _0x29de09,_0x387674,_0x29ecc0;const _0x15a816=_0x23f17d[_0x58dd34],_0x334619=_0x23f17d[_0x58dd34-0x1];if('text'==_0x15a816['type'])continue;if(_0x15a816['type']!=_0x334619['type'])continue;if(!_0x57da45['isBlock'](_0x334619['item'])||_0x57da45['isLimit'](_0x334619['item']))continue;if(!_0x57da45['isBlock'](_0x15a816['item'])||_0x57da45['isLimit'](_0x15a816['item']))continue;if((_0x23f17d[_0x58dd34]['isAdded']||_0x23f17d[_0x58dd34]['isAddSuggestion'])&&_0x23f17d[_0x58dd34-0x1]['isRemoved'])_0x29de09=_0x23f17d[_0x58dd34],_0x387674=_0x23f17d[_0x58dd34-0x1],_0x29ecc0=_0x58dd34-0x1;else{if(!_0x23f17d[_0x58dd34]['isRemoved']||!_0x23f17d[_0x58dd34-0x1]['isAdded']&&!_0x23f17d[_0x58dd34-0x1]['isAddSuggestion'])continue;_0x29de09=_0x23f17d[_0x58dd34-0x1],_0x387674=_0x23f17d[_0x58dd34],_0x29ecc0=_0x58dd34;}const _0x41773d=_0x29de09['level']==_0x387674['level'],_0x484f99=Math['abs'](_0x29de09['level'])<Math['abs'](_0x387674['level'])&&0x0==_0x387674['distance'];(_0x41773d||_0x484f99)&&(_0x1ea428['set'](_0x387674['id'],_0x29de09['id']),_0x23f17d['splice'](_0x29ecc0,0x1),_0x58dd34--,_0x29de09['isAdded']=!0x1);}for(let _0x4a21aa=0x0;_0x4a21aa<_0x23f17d['length'];_0x4a21aa++)_0x1ea428['has'](_0x23f17d[_0x4a21aa]['pairId'])&&(_0x23f17d[_0x4a21aa]['pairId']=_0x1ea428['get'](_0x23f17d[_0x4a21aa]['pairId']));}['_removeMissingPairs'](_0x5724b7){const _0x4821ad=new Set(_0x5724b7['map'](_0x5adbaf=>_0x5adbaf['id']));for(let _0x456c61=0x0;_0x456c61<_0x5724b7['length'];_0x456c61++)_0x4821ad['has'](_0x5724b7[_0x456c61]['pairId'])||0x0==_0x5724b7[_0x456c61]['distance']||(_0x5724b7[_0x456c61]['isIncorrect']=!0x0);return _0x5724b7['filter'](_0x27322f=>!_0x27322f['isIncorrect']);}['_markMismatchedRemovedTags'](_0x4a4e1e){const _0x54a8a3=new Set();for(let _0x37ab4f=0x0;_0x37ab4f<_0x4a4e1e['length'];_0x37ab4f++){if(_0x54a8a3['has'](_0x4a4e1e[_0x37ab4f]['id'])&&_0x4a4e1e[_0x37ab4f]['isRemoved']&&(_0x4a4e1e[_0x37ab4f]['isIncorrect']=!0x0),_0x4a4e1e[_0x37ab4f]['isIncorrect'])continue;if(0x0==_0x4a4e1e[_0x37ab4f]['distance'])continue;if('elementStart'!=_0x4a4e1e[_0x37ab4f]['type'])continue;if(null==_0x4a4e1e[_0x37ab4f]['pairId'])continue;let _0x472ecf=_0x37ab4f+0x1,_0x25e125=0x0;for(;_0x4a4e1e[_0x472ecf]['id']!=_0x4a4e1e[_0x37ab4f]['pairId'];)'elementStart'==_0x4a4e1e[_0x472ecf]['type']?_0x25e125++:'elementEnd'==_0x4a4e1e[_0x472ecf]['type']&&_0x25e125--,_0x472ecf++;if(0x0!=_0x25e125){if(_0x4a4e1e[_0x37ab4f]['isRemoved'])_0x4a4e1e[_0x37ab4f]['isIncorrect']=!0x0;else{for(;_0x472ecf!=_0x37ab4f;)_0x4a4e1e[_0x472ecf]['isRemoved']&&0x0!=_0x4a4e1e[_0x472ecf]['distance']&&(_0x4a4e1e[_0x472ecf]['isIncorrect']=!0x0,_0x54a8a3['add'](_0x4a4e1e[_0x472ecf]['pairId'])),_0x472ecf--;}}}return _0x4a4e1e['filter'](_0x4ea4bf=>!_0x4ea4bf['isIncorrect']);}['_removeUnsupportedChanges'](_0x48e93c){const _0x3d3dce=this['editor']['model']['schema'];for(let _0x501a5b=0x0;_0x501a5b<_0x48e93c['length'];_0x501a5b++){if(!(_0x48e93c[_0x501a5b]['isAdded']||_0x48e93c[_0x501a5b]['isAddSuggestion']||_0x48e93c[_0x501a5b]['isRemoved']||_0x48e93c[_0x501a5b]['isRemoveSuggestion']))continue;if(0x0==_0x48e93c[_0x501a5b]['distance'])continue;const _0x3d2c2e=_0x48e93c[_0x501a5b]['item'];_0x3d3dce['isBlock'](_0x3d2c2e)||_0x3d3dce['isLimit'](_0x3d2c2e)||(_0x48e93c[_0x501a5b]['isAdded']&&delete _0x48e93c[_0x501a5b]['isAdded'],_0x48e93c[_0x501a5b]['isAddSuggestion']&&delete _0x48e93c[_0x501a5b]['isAddSuggestion'],_0x48e93c[_0x501a5b]['isRemoveSuggestion']&&delete _0x48e93c[_0x501a5b]['isRemoveSuggestion'],_0x48e93c[_0x501a5b]['isRemoved']&&(_0x48e93c[_0x501a5b]['isIncorrect']=!0x0));}return _0x48e93c['filter'](_0x58866a=>!_0x58866a['isIncorrect']);}['_makeModelFromTape'](_0x5701f2,_0x3e5561,_0x96ae44){const _0x33b796=new gt(),_0x31cfde=[],_0x17a9d3=new Map(),_0x18c63e=this['editor']['model'],_0x148f78=_0x18c63e['schema'],_0x4e39b3=[_0x33b796],_0x3f9874={},_0x5db83e={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x3c0727=null;const _0xf91321=[0x0];for(let _0x54bb1f=0x0;_0x54bb1f<_0x5701f2['length'];_0x54bb1f++)if('elementStart'===_0x5701f2[_0x54bb1f]['type']){_0x5701f2[_0x54bb1f]['previousPosition']=_0x18c63e['createPositionFromPath'](_0x33b796,_0xf91321);const _0x80379a=new ut(_0x5701f2[_0x54bb1f]['item']['name'],_0x5701f2[_0x54bb1f]['item']['getAttributes']());_0x4e39b3[0x0]['_appendChild'](_0x80379a),_0xf91321['push'](0x0),_0x4e39b3['unshift'](_0x80379a),_0x5701f2[_0x54bb1f]['nextPosition']=_0x18c63e['createPositionFromPath'](_0x33b796,_0xf91321);}else'elementEnd'===_0x5701f2[_0x54bb1f]['type']?(_0x4e39b3['shift'](),_0x5701f2[_0x54bb1f]['previousPosition']=_0x18c63e['createPositionFromPath'](_0x33b796,_0xf91321),_0xf91321['pop'](),_0xf91321[_0xf91321['length']-0x1]++,_0x5701f2[_0x54bb1f]['nextPosition']=_0x18c63e['createPositionFromPath'](_0x33b796,_0xf91321)):(_0x5701f2[_0x54bb1f]['previousPosition']=_0x18c63e['createPositionFromPath'](_0x33b796,_0xf91321),_0x3c0727?_0x3c0727['_data']+=_0x5701f2[_0x54bb1f]['item']['data']:_0x3c0727=new mt(_0x5701f2[_0x54bb1f]['item']['data'],_0x5701f2[_0x54bb1f]['item']['getAttributes']()),_0x5701f2[_0x54bb1f+0x1]&&'text'===_0x5701f2[_0x54bb1f+0x1]['type']&&_0x2dd92e(_0x3c0727,_0x5701f2[_0x54bb1f+0x1]['item'])||(_0x4e39b3[0x0]['_appendChild'](_0x3c0727),_0x3c0727=null),_0xf91321[_0xf91321['length']-0x1]+=_0x5701f2[_0x54bb1f]['item']['offsetSize'],_0x5701f2[_0x54bb1f]['nextPosition']=_0x18c63e['createPositionFromPath'](_0x33b796,_0xf91321));for(let _0x57a74c=0x0;_0x57a74c<_0x5701f2['length'];_0x57a74c++){const _0x24d79e=_0x5701f2[_0x57a74c]['previousPosition'],_0x32c6e8=_0x5701f2[_0x57a74c]['nextPosition'];for(const _0x107565 of _0x5701f2[_0x57a74c]['markersStart'])_0x17a9d3['set'](_0x107565,{'start':_0x24d79e,'end':null});_0x3fcb4f('isRemoveSuggestion',_0x57a74c,_0x24d79e,_0x32c6e8),_0x3fcb4f('isAddSuggestion',_0x57a74c,_0x24d79e,_0x32c6e8),_0x3fcb4f('isRemoved',_0x57a74c,_0x24d79e,_0x32c6e8),_0x3fcb4f('isAdded',_0x57a74c,_0x24d79e,_0x32c6e8);for(const _0x3bb52e of _0x5701f2[_0x57a74c]['markersEnd']){const _0x327387=_0x17a9d3['get'](_0x3bb52e);_0x327387?_0x327387['end']=_0x32c6e8:_0x17a9d3['set'](_0x3bb52e,{'start':_0x32c6e8,'end':_0x32c6e8});}}for(const [_0x3daf9d,_0x86cab]of _0x17a9d3){const _0x56e772=this['editor']['model']['createRange'](_0x86cab['start'],_0x86cab['end']);_0x33b796['markers']['set'](_0x3daf9d,_0x56e772);}return _0x31cfde['sort']((_0xcb5d0c,_0x56b15b)=>{const _0x1dc5ff=_0x33b796['markers']['get']('revision:'+_0xcb5d0c['id']),_0x54fc50=_0x33b796['markers']['get']('revision:'+_0x56b15b['id']);return _0x1dc5ff['start']['isBefore'](_0x54fc50['start'])?-0x1:_0x1dc5ff['start']['isAfter'](_0x54fc50['start'])?0x1:_0x1dc5ff['end']['isBefore'](_0x54fc50['end'])?-0x1:_0x1dc5ff['end']['isAfter'](_0x54fc50['end'])?0x1:'add'===_0xcb5d0c['type']?-0x1:0x1;}),{'root':_0x33b796,'changes':_0x31cfde};function _0x3fcb4f(_0x2aedb0,_0x349c6e,_0x39f9ad,_0x2c1b84){const _0x200516=!!_0x5701f2[_0x349c6e][_0x2aedb0],_0xf3b6a1=_0x200516?_0x5701f2[_0x349c6e][_0x2aedb0]['userId']:null,_0x5dc553=_0x349c6e===_0x5701f2['length']-0x1,_0x310ff0=_0x5db83e[_0x2aedb0][0x0],_0x377ca2=_0x148f78['isObject'](_0x5701f2[_0x349c6e]['item']);!_0x3f9874[_0x2aedb0]&&_0x200516?_0x3f9874[_0x2aedb0]={'start':_0x39f9ad,'tapeItem':_0x5701f2[_0x349c6e],'userId':_0xf3b6a1,'type':_0x2aedb0}:_0x3f9874[_0x2aedb0]&&!_0x200516?(_0x3f9874[_0x2aedb0]['end']=_0x39f9ad,_0x145d56(_0x3f9874[_0x2aedb0]),_0x3f9874[_0x2aedb0]=null):_0x3f9874[_0x2aedb0]&&_0x200516&&_0x3f9874[_0x2aedb0]['userId']!==_0xf3b6a1&&(_0x3f9874[_0x2aedb0]['end']=_0x39f9ad,_0x310ff0&&_0x310ff0['userId']===_0x3f9874[_0x2aedb0]['userId']||_0x145d56(_0x3f9874[_0x2aedb0]),_0x3f9874[_0x2aedb0]={'start':_0x39f9ad,'tapeItem':_0x5701f2[_0x349c6e],'userId':_0xf3b6a1,'type':_0x2aedb0}),_0x3f9874[_0x2aedb0]&&_0x377ca2&&('elementStart'!==_0x5701f2[_0x349c6e]['type']||_0x310ff0&&_0x310ff0['userId']===_0xf3b6a1||_0x5db83e[_0x2aedb0]['unshift']({'userId':_0xf3b6a1,'object':_0x5701f2[_0x349c6e]['item'],'change':_0x3f9874[_0x2aedb0]}),'elementEnd'===_0x5701f2[_0x349c6e]['type']&&_0x310ff0&&_0x310ff0['object']===_0x5701f2[_0x349c6e]['item']&&(_0x5db83e[_0x2aedb0]['shift'](),_0x3f9874[_0x2aedb0]=_0x310ff0['change'])),_0x3f9874[_0x2aedb0]&&_0x5dc553&&(_0x3f9874[_0x2aedb0]['end']=_0x2c1b84,_0x145d56(_0x3f9874[_0x2aedb0]),_0x3f9874[_0x2aedb0]=null);}function _0x145d56({start:_0x47cc2c,end:_0x100e1a,tapeItem:_0x28d2d6,userId:_0x1973c2,type:_0x237489}){const _0x4e7df8=_0x28d2d6['item'],_0x4a03c6=_0x18c63e['schema']['isBlock'](_0x4e7df8)&&!_0x18c63e['schema']['isLimit'](_0x4e7df8),_0x5e3995=_0x47cc2c['nodeAfter']==_0x100e1a['parent']&&_0x100e1a['isAtStart'];if(_0x4a03c6&&_0x5e3995)return;const _0x5108d9=_0x18c63e['createRange'](_0x47cc2c,_0x100e1a),_0x2859f8=_0x3e5561['get'](_0x1973c2),_0x53062f=new r({'author':_0x2859f8,'type':'isAdded'==_0x237489||'isAddSuggestion'==_0x237489?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x237489||'isRemoveSuggestion'==_0x237489},'createdAt':new Date(),'rootName':_0x96ae44});_0x31cfde['push'](_0x53062f),_0x33b796['markers']['set']('revision:'+_0x53062f['id'],_0x5108d9);}function _0x2dd92e(_0x57aa9c,_0x27e07c){const _0x39d82b=_0x57aa9c['getAttributes'](),_0x17c2ef=_0x27e07c['getAttributes']();for(const _0x1d161c of _0x39d82b){if(_0x1d161c[0x1]!==_0x27e07c['getAttribute'](_0x1d161c[0x0]))return!0x1;_0x17c2ef['next']();}return _0x17c2ef['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1851a7=>{const _0x13ba9d=_0x1851a7['markerName']['split'](':')[0x1],_0x47ddf4=this['_getChangeFromId'](_0x13ba9d);if(!_0x47ddf4)return null;const _0x551a2b='add'==_0x47ddf4['type']?'insertion':'deletion',_0x49d340=['ck-suggestion-marker','ck-suggestion-marker-'+_0x551a2b];return _0x47ddf4['data']['isSuggestion']&&_0x49d340['push']('ck-suggestion-marker-'+_0x551a2b+'-new'),this['activeChange']==_0x47ddf4&&_0x49d340['push']('ck-suggestion-marker--active'),{'classes':_0x49d340,'attributes':{'data-change-id':_0x13ba9d}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x2091e8=>{_0x2091e8['on']('element:pre',(_0x1123e0,_0x3c916a,_0x18470e)=>{const _0x4226fa=_0x3c916a['viewItem']['getChild'](0x0);if(!_0x4226fa||!_0x4226fa['is']('element','code'))return;if(!_0x18470e['consumable']['consume'](_0x4226fa,{'attributes':['vid_start','vid_end']}))return;const _0x3c3977=_0x3c916a['modelRange']['start']['nodeAfter'];_0x18470e['writer']['setAttribute']('vid_start',_0x4226fa['getAttribute']('vid_start'),_0x3c3977),_0x18470e['writer']['setAttribute']('vid_end',_0x4226fa['getAttribute']('vid_end'),_0x3c3977);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x40b66e=>{_0x40b66e['on']('element',(_0x38fd2c,_0x3ade2f,_0x3cf73a)=>{if(!_0x3cf73a['consumable']['consume'](_0x3ade2f['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3ade2f['modelRange']['isCollapsed'])return;const _0x54521b=_0x3ade2f['modelRange']['start']['nodeAfter'];_0x54521b['hasAttribute']('vid_start')||_0x54521b['hasAttribute']('vid')||(_0x3cf73a['writer']['setAttribute']('vid_start',_0x3ade2f['viewItem']['getAttribute']('vid_start'),_0x54521b),_0x3cf73a['writer']['setAttribute']('vid_end',_0x3ade2f['viewItem']['getAttribute']('vid_end'),_0x54521b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x32ab46=>_0x32ab46['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x36c5fd,[,_0x223b27])=>{['vid_start','vid_end','vid']['includes'](_0x223b27)&&(_0x36c5fd['return']=!0x0,_0x36c5fd['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x298b62=>{_0x298b62['on']('attribute:vid',(_0x171fc8,_0x12add4,_0x56bec0)=>{if('\x20'!=_0x12add4['item']['data']||_0x12add4['item']['parent']['maxOffset']>0x1)return;if(!_0x56bec0['consumable']['consume'](_0x12add4['item'],_0x171fc8['name']))return;const _0x4e4d9f=_0x56bec0['writer'],_0x15421a=_0x56bec0['mapper']['toViewRange'](_0x12add4['range']);_0x4e4d9f['wrap'](_0x15421a,_0x4e4d9f['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x47b959){const _0x4cae56=_0x47b959['plugins']['get']('RevisionViewer');return(_0x41afe7,_0x41f052,_0x20798b)=>{const _0x4fabee=_0x41f052['markerName']['split'](':')[0x1],_0x46ac4b=_0x4cae56['_getChangeFromId'](_0x4fabee);if(!_0x46ac4b)return null;const _0x4da0eb='add'==_0x46ac4b['type']?'split':'merge';if(!_0x20798b['consumable']['test'](_0x41f052['markerRange'],_0x41afe7['name']))return;const _0x32819f=_0x41f052['markerRange']['getWalker'](),_0x1ad398=_0x41f052['markerRange']['start'],_0x2b9fb9=_0x47b959['model']['schema'];let _0x1c7baa=null,_0x369e36=null,_0xa28c42=!0x1,_0x23bc93=!0x1;for(const _0x396799 of _0x32819f){const _0x18d630=_0x396799['item'];_0xa28c42=_0xa28c42||_0x2b9fb9['isContent'](_0x18d630);const _0x234bb5=_0x20798b['mapper']['toViewElement'](_0x18d630);if(_0x234bb5&&_0x234bb5['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x396799['type']&&(_0x2b9fb9['isBlock'](_0x18d630)&&!_0x2b9fb9['isLimit'](_0x18d630)&&(_0x18d630['nextSibling']||_0x1ad398['isAtEnd']?_0x1c7baa&&_0x1c7baa['parent']==_0x18d630||(_0x1c7baa=_0x18d630,_0x32a485(_0x396799['previousPosition']),_0x23bc93=!0x0):_0x369e36=_0x369e36||_0x396799['previousPosition']));}function _0x32a485(_0x176179){const _0x1193fb=_0x20798b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4da0eb}),_0xd5e34b=_0x20798b['mapper']['toViewPosition'](_0x176179);_0x46ac4b['data']['isSuggestion']&&_0x20798b['writer']['addClass']('ck-suggestion-marker-'+_0x4da0eb+'-new',_0x1193fb),_0x4cae56['activeChange']==_0x46ac4b&&_0x20798b['writer']['addClass']('ck-suggestion-marker--active',_0x1193fb),_0x20798b['writer']['insert'](_0xd5e34b,_0x1193fb),_0x20798b['mapper']['bindElementToMarker'](_0x1193fb,_0x41f052['markerName']);}_0xa28c42||_0x23bc93||!_0x369e36||_0x32a485(_0x369e36);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1f7fd4,_0x2c5a53,_0x4abf78)=>{const _0x87ae42=_0x4abf78['mapper']['markerNameToElements'](_0x2c5a53['markerName']);if(_0x87ae42){for(const _0x2f330b of _0x87ae42)(_0x2f330b['hasClass']('ck-suggestion-marker-split')||_0x2f330b['hasClass']('ck-suggestion-marker-merge'))&&(_0x4abf78['mapper']['unbindElementFromMarkerName'](_0x2f330b,_0x2c5a53['markerName']),_0x4abf78['writer']['remove'](_0x2f330b));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x192485,_0x2f6960,_0x555c73)=>{const _0x512f1e=_0x2f6960['markerName']['split'](':')[0x1],_0x2df189=this['_getChangeFromId'](_0x512f1e);if(!_0x2df189)return null;const _0x42f2e1='add'==_0x2df189['type']?'split':'merge';if(_0x555c73['consumable']['test'](_0x2f6960['markerRange'],_0x192485['name']))for(const _0x1a38e9 of _0x2f6960['markerRange']['getItems']()){if(!_0x1a38e9['is']('element','softBreak'))continue;const _0x2c811d=_0x555c73['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x42f2e1}),_0x128990=_0x555c73['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x1a38e9));_0x2df189['data']['isSuggestion']&&_0x555c73['writer']['addClass']('ck-suggestion-marker-'+_0x42f2e1+'-new',_0x2c811d),this['activeChange']==_0x2df189&&_0x555c73['writer']['addClass']('ck-suggestion-marker--active',_0x2c811d),_0x555c73['writer']['insert'](_0x128990,_0x2c811d),_0x555c73['mapper']['bindElementToMarker'](_0x2c811d,_0x2f6960['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x31b97a=>{for(const _0x4bfb01 of this['editor']['model']['document']['getRootNames']()){const _0x10ae67=this['editor']['model']['document']['getRoot'](_0x4bfb01),_0x359743=this['editor']['editing']['view']['document']['getRoot'](_0x4bfb01);if(_0x359743){const _0x200c8d=_0x10ae67['getAttribute']('revisionHistoryAttachChange');if(_0x31b97a['removeAttribute']('data-change-id',_0x359743),_0x31b97a['removeClass']('ck-revision-history-root-add',_0x359743),_0x31b97a['removeClass']('ck-revision-history-root-remove',_0x359743),_0x31b97a['removeClass']('ck-revision-history-root--active',_0x359743),_0x200c8d){const _0x1d461f=this['_getChangeFromId'](_0x200c8d);if(!_0x1d461f)return null;_0x31b97a['setAttribute']('data-change-id',_0x200c8d,_0x359743),_0x31b97a['addClass']('ck-revision-history-root-'+_0x1d461f['type'],_0x359743),this['activeChange']==_0x1d461f&&_0x31b97a['addClass']('ck-revision-history-root--active',_0x359743);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x49dc0b=>'revision-comment:'+_0x49dc0b,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0xac6e61=>'revision-suggestion:'+_0xac6e61,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5d4d39=>({'name':'suggestion:'+_0x5d4d39,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x9bb15b=>{const _0x5524ac=_0x9bb15b['markerName']['split'](':')[0x1];return'insertion'!=_0x5524ac&&'deletion'!=_0x5524ac?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x5524ac]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1904e0,_0x9f9658,_0x4699c7)=>{const _0x552fc0=_0x4699c7['mapper']['markerNameToElements'](_0x9f9658['markerName']);if(_0x552fc0){for(const _0x2f7a2f of _0x552fc0)_0x2f7a2f['is']('uiElement')&&(_0x4699c7['mapper']['unbindElementFromMarkerName'](_0x2f7a2f,_0x9f9658['markerName']),_0x4699c7['writer']['remove'](_0x2f7a2f));}},{'priority':'high'});}['_getChangeFromId'](_0x2159d6){return this['_changeIdToChange']['get'](_0x2159d6);}['_getViewForChange'](_0x32cd4a){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x32cd4a),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1674a8,_0x2290f9,_0x5deb95,_0x3ab3fa)=>{_0x3ab3fa&&this['_balloon']['remove'](_0x3ab3fa),_0x5deb95&&(this['_balloon']['add']({'view':_0x5deb95,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x235a3e=this['editor']['editing'],_0x322cc4=this['_getChangeFromId'](_0x5deb95['changeId']);let _0x1e865c;if(_0x322cc4['data']['isOnRoot']){const _0x3e0546=_0x235a3e['view']['getDomRoot'](_0x322cc4['rootName']);_0x1e865c=Array['from'](_0x3e0546['getClientRects']());}else{const _0x1593a5=this['editor']['model']['markers']['get']('revision:'+_0x5deb95['changeId']);_0x1e865c=Array['from'](_0x235a3e['mapper']['markerNameToElements'](_0x1593a5['name']))['map'](_0x3b60d9=>_0x235a3e['view']['domConverter']['mapViewToDom'](_0x3b60d9))['map'](_0x2140a2=>Array['from'](_0x2140a2['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1e865c[0x0];return _0x1e865c['find'](_0x352f0d=>_0x352f0d['top']-0x3<=this['_activeViewTarget']['y']&&_0x352f0d['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x352f0d['left']-0x3<=this['_activeViewTarget']['x']&&_0x352f0d['right']+0x3>=this['_activeViewTarget']['x'])||_0x1e865c[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x279e10,_0xf2d940,_0x47d373,_0x1e6bfa)=>{this['activeView']=_0x47d373?this['_getViewForChange'](_0x47d373):null,this['editor']['model']['change'](()=>{const _0x2ba2c3=this['editor']['editing'];_0x1e6bfa&&(_0x1e6bfa['data']['isOnRoot']?_0x2ba2c3['view']['change'](_0x4b4445=>{_0x4b4445['removeClass']('ck-revision-history-root--active',_0x2ba2c3['view']['document']['getRoot'](_0x1e6bfa['rootName']));}):_0x2ba2c3['reconvertMarker']('revision:'+_0x1e6bfa['id'])),_0x47d373&&(_0x47d373['data']['isOnRoot']?_0x2ba2c3['view']['change'](_0x53aa9f=>{_0x53aa9f['addClass']('ck-revision-history-root--active',_0x2ba2c3['view']['document']['getRoot'](_0x47d373['rootName']));}):_0x2ba2c3['reconvertMarker']('revision:'+_0x47d373['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x20f0f3,_0x229612)=>{if(this['activeChange'])return;const _0xfcb571=this['_findChangeIdFromDomTarget'](_0x229612['target']),_0x515110=this['_changeIdToChange']['get'](_0xfcb571);_0x515110?(this['_activeViewTarget']={'x':_0x229612['domEvent']['x'],'y':_0x229612['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x515110)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0xd0600c,_0x720d3c)=>{const _0x168996=this['_findChangeIdFromDomTarget'](_0x720d3c['target']),_0x2445eb=this['_changeIdToChange']['get'](_0x168996);_0x2445eb?(this['_activeViewTarget']={'x':_0x720d3c['domEvent']['x'],'y':_0x720d3c['domEvent']['y']},_0x2445eb===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x2445eb):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x138997){do{const _0x7cbc7=_0x138997['getAttribute']('data-change-id');if(_0x7cbc7)return _0x7cbc7;_0x138997=_0x138997['parent'];}while(_0x138997);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x152a60=>{for(const _0x277823 of this['editor']['model']['markers'])_0x152a60['removeMarker'](_0x277823);});}}function X(_0x41ad8c,_0x5892a0){return(_0x588cd3,_0x2e8ca9,_0x5abaa8)=>{if(!_0x5abaa8['consumable']['test'](_0x2e8ca9['markerRange'],_0x588cd3['name']))return;const _0x378555=_0x2e8ca9['markerRange']['getWalker'](),_0x4331d7=_0x2e8ca9['markerRange']['start'],_0xfe6b90=_0x41ad8c['model']['schema'];let _0xa792e0=null,_0x26a9b8=null,_0x5979e1=!0x1,_0x16d5c9=!0x1;for(const _0x449590 of _0x378555){const _0x5649ad=_0x449590['item'];_0x5979e1=_0x5979e1||_0xfe6b90['isContent'](_0x5649ad);const _0x102800=_0x5abaa8['mapper']['toViewElement'](_0x5649ad);if(_0x102800&&_0x102800['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x449590['type']&&(_0xfe6b90['isBlock'](_0x5649ad)&&!_0xfe6b90['isLimit'](_0x5649ad)&&(_0x5649ad['nextSibling']||_0x4331d7['isAtEnd']?_0xa792e0&&_0xa792e0['parent']==_0x5649ad||(_0xa792e0=_0x5649ad,_0x359a9d(_0x449590['previousPosition']),_0x16d5c9=!0x0):_0x26a9b8=_0x26a9b8||_0x449590['previousPosition']));}function _0x359a9d(_0xbeb174){const _0x580402=_0x5abaa8['mapper']['toViewPosition'](_0xbeb174),_0x404994=_0x5abaa8['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x5892a0});_0x5abaa8['writer']['insert'](_0x580402,_0x404994),_0x5abaa8['mapper']['bindElementToMarker'](_0x404994,_0x2e8ca9['markerName']);}_0x5979e1||_0x16d5c9||!_0x26a9b8||_0x359a9d(_0x26a9b8);};}class wt extends _0x50eebd{constructor(_0x20c174){super(_0x20c174);const _0x2d9197=_0x20c174['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x2d9197,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x2d9197,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x13cc6c=this['editor'],_0x4f5f77=_0x13cc6c['plugins']['get'](m),_0x29eb64=_0x4f5f77['isReady']?_0x4f5f77['diff']['newRevisionId']:null;_0x13cc6c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x29eb64);}['refresh'](){const {isReady:_0x45e827,isEnabled:_0x1ac351,repository:_0x2785c8,diff:_0x11bd68}=this['editor']['plugins']['get'](m),_0xa90a6b=_0x11bd68&&_0x2785c8['getLaterVisibleRevision'](_0x11bd68['newRevisionId']);this['isEnabled']=_0x45e827&&_0x1ac351&&Boolean(_0xa90a6b);}}class pt extends _0x50eebd{['_step'];constructor(_0x3bf044,{direction:_0x22fe4c}){super(_0x3bf044);const _0xfa892b=_0x3bf044['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x22fe4c?0x1:-0x1,this['listenTo'](_0xfa892b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xfa892b,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0xfa892b,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4b3814=this['editor'],_0x12dd3b=_0x4b3814['plugins']['get'](m),{isNavigationMode:_0x57ed5c,currentChangeNumber:_0xfb58a0}=_0x12dd3b;let _0x322ee3;if(_0x12dd3b['activeChange']=_0x57ed5c?_0x12dd3b['diff']['changes']['get'](_0xfb58a0+this['_step']):_0x12dd3b['diff']['changes']['first'],_0x12dd3b['activeChange']['data']['isOnRoot'])_0x322ee3=_0x4b3814['editing']['view']['getDomRoot'](_0x12dd3b['activeChange']['rootName']);else{const _0x241bbd=_0x4b3814['model']['markers']['get']('revision:'+_0x12dd3b['activeChange']['id']);_0x322ee3=_0x3fde7f(_0x4b3814['editing'],_0x241bbd);}_0x5b4067({'target':_0x322ee3,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x524e24,currentChangeNumber:_0x3fc3cf,numberOfChanges:_0x1b1448,isReady:_0x34a522,isEnabled:_0x218308}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x218308&&_0x34a522&&_0x1b1448)&&(!_0x524e24||(0x1===this['_step']?_0x3fc3cf<_0x1b1448-0x1:_0x3fc3cf>0x0));}}class li extends _0x307380{constructor(_0x525aba){super(_0x525aba);const _0x31858c=this['bindTemplate'],_0x444908=new _0x9f075f(_0x525aba),_0x21fc25=new _0x9f075f(_0x525aba);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',(_0x173ef0,_0x43d649)=>_0x173ef0&&_0x43d649>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x201ae1,_0x6b58a7,_0x12ff8c,_0x40f827)=>{if(!_0x201ae1)return g(_0x525aba,'Loading...');if(!_0x12ff8c)return g(_0x525aba,'No\x20changes');const _0x5e410c=g(_0x525aba,'NUMBER_OF_CHANGES',_0x12ff8c);return _0x40f827?g(_0x525aba,'X_OF_Y_CHANGES',[_0x6b58a7+0x1,_0x12ff8c]):_0x5e410c;}),_0x444908['set']({'label':g(_0x525aba,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x72fb47}),_0x21fc25['set']({'label':g(_0x525aba,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x4d2b48}),_0x444908['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x21fc25['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x444908['on']('execute',()=>this['fire']('execute','backward')),_0x21fc25['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',_0x31858c['if']('_isStatusLabelVisible','ck-hidden',_0x25f504=>!_0x25f504)]},'children':[{'text':_0x31858c['to']('isNavigationMode',_0x21f1f4=>_0x21f1f4?g(_0x525aba,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x525aba,'Total')+':\x20')}]},{'text':_0x31858c['to']('_statusText')}]},new _0x478f14(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x444908,_0x21fc25]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x5e0615{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x1281ff=this['editor']['editing']['view'];_0x1281ff['change'](_0x525da1=>{for(const _0x9a86a6 of _0x1281ff['document']['roots'])_0x525da1['addClass'](ce,_0x9a86a6);});}['hide'](){const _0x2e29ba=this['editor']['editing']['view'];_0x2e29ba['change'](_0x1e300a=>{for(const _0x25496f of _0x2e29ba['document']['roots'])_0x1e300a['removeClass'](ce,_0x25496f);});}}class R extends _0x5e0615{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,le];}['init'](){const _0x4d3091=this['editor'],_0x421b62=_0x4d3091['plugins']['get'](m),_0x39d09d=_0x4d3091['plugins']['get'](le);_0x4d3091['ui']['componentFactory']['add']('exitToEditing',_0x7f1d53=>{const _0x35e2df=new _0x9f075f(_0x7f1d53);return _0x35e2df['set']({'label':g(_0x7f1d53,'Back\x20to\x20editing'),'icon':_0x448e3e,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x35e2df,'execute',()=>{_0x4d3091['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x35e2df;}),_0x4d3091['ui']['componentFactory']['add']('restoreRevision',_0x3949c0=>{const _0x1824cc=new _0x9f075f(_0x3949c0);return _0x1824cc['set']({'label':g(_0x3949c0,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x1824cc['bind']('isEnabled')['to'](_0x4d3091['commands']['get']('restoreRevision')),this['listenTo'](_0x1824cc,'execute',()=>_0x4d3091['execute']('restoreRevision')),_0x1824cc;}),_0x4d3091['ui']['componentFactory']['add']('changesNavigation',_0x45b9f1=>{const _0x11d454=new li(_0x45b9f1),_0x17eab3=_0x4d3091['commands']['get']('showPreviousChange'),_0x366731=_0x4d3091['commands']['get']('showNextChange');return _0x11d454['bind']('isBackwardNavigationEnabled')['to'](_0x17eab3,'isEnabled'),_0x11d454['bind']('isForwardNavigationEnabled')['to'](_0x366731,'isEnabled'),_0x11d454['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x421b62),this['listenTo'](_0x11d454,'execute',(_0x528f31,_0x4b6e65)=>{_0x4d3091['execute']('forward'===_0x4b6e65?'showNextChange':'showPreviousChange');}),_0x11d454;}),_0x39d09d['show'](),_0x421b62['on']('change:isReady',(_0x5f583f,_0x37b274,_0x3ae9a1)=>{_0x3ae9a1?_0x39d09d['hide']():_0x39d09d['show']();});}}class lt extends nt{['_resizeObserver']=null;constructor(_0x18b6d6,_0x3c6876){super(_0x18b6d6,_0x3c6876);const _0x3465c0=this['bindTemplate'];this['set']({'label':g(_0x18b6d6,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x18b6d6,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x3465c0['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 _0x30d2ac=this['fieldView']['element'];this['_tooltipString']=_0x30d2ac['scrollWidth']>_0x30d2ac['clientWidth']&&_0x30d2ac['value']||'';}}class oi extends _0x307380{constructor(_0x5244fa,_0x444e3a,_0x3aada7){super(_0x5244fa);const _0x4d1525=new _0x2202a6();_0x4d1525['set']({'content':_0x5a2ef7,'viewBox':'0\x200\x2011\x2010'});const _0x22ec35=['ck','ck-revision-history-sidebar__revision-author'];_0x3aada7&&_0x22ec35['push']('ck-revision-history-sidebar__revision-author_creator');const _0x2cb410=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x5244fa,_0x3aada7?'Revision\x20creator':'Revision\x20author')},'children':[_0x4d1525,_0x444e3a['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x22ec35},'children':_0x2cb410});}}function ni(_0x374e0c,_0x253f0b){const _0xd5dc5b=_0x374e0c['bindTemplate'],_0x1fce50=_0x374e0c['locale'],_0x3f9068=_0x39369a(_0x1fce50);_0x3f9068['panelPosition']='sw';const _0x253298=function(_0x567945,_0x3306f5){const _0x1ee083=function(_0x1f5315,_0x420d28){const _0x7dc21b=_0x1f5315['locale'],_0x47a11e={'Compare\x20against\x20selected':g(_0x7dc21b,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x7dc21b,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x7dc21b,'Restore\x20this\x20revision')};return _0x420d28['map'](_0x7c773a=>{const _0x5e31a2=_0x47a11e[_0x7c773a['name']];return _0x5e31a2&&_0x5e31a2!==_0x7c773a['name']&&(_0x7c773a['name']=_0x5e31a2),_0x7c773a;});}(_0x567945,_0x3306f5),_0x16a694=new _0x24b94b();for(const _0x4418af of _0x1ee083){const _0x272061={'type':'button','model':new to({'label':_0x4418af['name'],'class':_0x4418af['class'],'withText':!0x0,'role':'menuitem','_action':_0x4418af['action']})};_0x272061['model']['bind']('isEnabled')['to'](_0x567945,'isActionsDropdownOpen',_0x3f5dd5=>'function'!=typeof _0x4418af['isEnabled']||(!_0x3f5dd5||_0x4418af['isEnabled'](_0x567945))),_0x16a694['add'](_0x272061);}return _0x16a694;}(_0x374e0c,_0x253f0b);return _0x374e0c['bind']('isActionsDropdownOpen')['to'](_0x3f9068,'isOpen'),_0x3f9068['buttonView']['set']({'label':g(_0x1fce50,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x293f9f}),_0x3f9068['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0xd5dc5b['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0xd5dc5b['to'](_0x16238f=>_0x16238f['stopPropagation']())}}),_0x3f9068['on']('execute',_0xa65a5d=>{_0x374e0c['isReady']&&'function'==typeof _0xa65a5d['source']['_action']&&_0xa65a5d['source']['_action'](_0x374e0c);}),_0x169eac(_0x3f9068,_0x253298,{'role':'menu'}),_0x3f9068['listenTo'](_0x374e0c,'change:isActionsDropdownOpen',(_0x2a10a1,_0x5bb869,_0x7e4047)=>{if(_0x7e4047)for(const _0x3f56a9 of _0x3f9068['listView']['items']){const _0x3c8f25=_0x3f56a9['children']['first'],_0x4c0de6=_0x253f0b['find'](_0x84bdde=>_0x84bdde['action']===_0x3c8f25['_action'])['isVisible'];_0x3f56a9['isVisible']=void 0x0===_0x4c0de6||_0x4c0de6(_0x374e0c);}}),_0x3f9068;}class ai extends/* #__PURE__ -- @preserve */
26
- _0x273b3b(_0x307380){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x37b797,_0x5a3881,_0xeaecae,_0x4c0596){super(_0x37b797);const _0xcf8b1=this['bindTemplate'],_0x422ea8=function(_0x2cb63e,_0x426c50){const _0x44ce17=Array['from'](_0x426c50['authors'])['filter'](_0x40f61a=>_0x40f61a!=_0x426c50['creator']);return _0x426c50['creator']&&_0x44ce17['unshift'](_0x426c50['creator']),_0x44ce17['map'](_0x13fd12=>new oi(_0x2cb63e,_0x13fd12,_0x13fd12==_0x426c50['creator']));}(_0x37b797,_0x5a3881);this['id']=_0x5a3881['id'],this['_revision']=_0x5a3881,this['_requireRevisionName']=_0x4c0596,this['bind']('name','createdAt')['to'](_0x5a3881),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x368a34=>{return _0x31895c=_0x37b797['uiLanguage'],(_0x3f8091=_0x368a34)['toLocaleDateString'](_0x31895c,{'month':'long','day':'numeric'})+',\x20'+_0x3f8091['toLocaleTimeString'](_0x31895c,{'hour':'numeric','minute':'numeric'});var _0x31895c,_0x3f8091;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new lt(_0x37b797,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x2b5153=>_0x2b5153||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x14c3cb,_0x21db8d)=>_0x14c3cb&&_0x21db8d),this['revisionActionsView']=_0xeaecae&&_0xeaecae['length']?ni(this,_0xeaecae):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xcf8b1['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xcf8b1['if']('isEnabled','ck-disabled',_0x215195=>!_0x215195),_0xcf8b1['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xcf8b1['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xcf8b1['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':_0xcf8b1['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':_0x422ea8}]},this['revisionActionsView']],'on':{'click':_0xcf8b1['to'](_0x484266=>{_0x484266['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x3fd465=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x3fd465,'change',()=>{this['_requireRevisionName']&&!_0x3fd465['value']||this['fire']('setName',{'id':this['id'],'name':_0x3fd465['value']}),_0x3fd465['value']||(_0x3fd465['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(_0x2aac76,_0x23855b){const _0x44e5a2=_0x5abc77['fromJSDate'](_0x2aac76)['setLocale'](_0x23855b),_0x54deb2=_0x5abc77['local'](),_0x197e7a=_0x54deb2['minus']({'days':0x1})['startOf']('day');let _0x1eea57,_0x300275;return _0x44e5a2['hasSame'](_0x54deb2,'day')?(_0x1eea57=_0x44e5a2['startOf']('day')['toJSDate'](),_0x300275=_0x44e5a2['toRelativeCalendar']()):_0x44e5a2['hasSame'](_0x197e7a,'day')?(_0x1eea57=_0x197e7a['toJSDate'](),_0x300275=_0x44e5a2['toRelativeCalendar']()):_0x44e5a2['hasSame'](_0x54deb2,'week')?(_0x1eea57=_0x44e5a2['startOf']('week')['toJSDate'](),_0x300275=_0x44e5a2['weekdayLong']||''):_0x44e5a2['hasSame'](_0x54deb2,'year')?(_0x1eea57=_0x44e5a2['startOf']('month')['toJSDate'](),_0x300275=_0x44e5a2['monthLong']||''):(_0x1eea57=_0x44e5a2['startOf']('year')['toJSDate'](),_0x300275=String(_0x44e5a2['year'])),{'startDate':_0x1eea57,'localizedPeriodName':_0x300275};}class _i extends _0x307380{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x521a3e,_0x4391ec,_0x2439c7,_0x28cba0){super(_0x521a3e);const _0x1f9872=mi(_0x4391ec,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4391ec,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x2439c7,this['_requireRevisionName']=_0x28cba0,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':_0x1f9872}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2764d6){const _0x35137e=new ai(this['locale'],_0x2764d6,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x35137e);}['removeRevision'](_0x7110e8){const _0x2eb5c6=this['revisionViews']['find'](_0x588e32=>_0x588e32['id']===_0x7110e8['id']);this['revisionViews']['remove'](_0x2eb5c6);}}class as extends _0x307380{constructor(_0x58fd86){super(_0x58fd86);const _0x23fd6a=new _0x2202a6();_0x23fd6a['content']=_0x402578,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x23fd6a,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x58fd86,'Revision\x20history')]}]});}}class vi extends _0x307380{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x3a251e,_0x58b124,_0x33bc6e,_0x29dcea){super(_0x3a251e);const _0x3fe452=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x58b124,this['_revisionActions']=_0x33bc6e,this['_requireRevisionName']=_0x29dcea,this['on']('select',(_0x603eb3,_0x5ba324)=>{this['fire']('revisionSelected',_0x5ba324);}),this['on']('setName',(_0x5b9b68,_0x1a697d)=>{this['fire']('revisionSetName',_0x1a697d);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x3a251e),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x3fe452['if']('isEnabled','ck-disabled',_0x2ffdd4=>!_0x2ffdd4)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x110d91 of this['_revisions'])this['_addRevision'](_0x110d91);this['_revisions']['on']('add',(_0x3cb321,_0x2326fc)=>{this['_addRevision'](_0x2326fc);}),this['_revisions']['on']('remove',(_0x1b864f,_0x460753)=>{this['_removeRevision'](_0x460753);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x3eea55=>_0x3eea55['revisionViews']['map'](_0x4b4b51=>_0x4b4b51))['flat']();}['selectRevision'](_0x157b4d){for(const _0x3f1dac of this['revisionViews'])_0x157b4d&&_0x157b4d['id']===_0x3f1dac['id']?_0x3f1dac['select']():_0x3f1dac['deselect']();}['highlightRevisions'](_0x1f291d){for(const _0x4c2cb4 of this['revisionViews'])_0x1f291d['some'](({id:_0x56ff96})=>_0x56ff96===_0x4c2cb4['id'])?_0x4c2cb4['highlight']():_0x4c2cb4['unhighlight']();}['_addRevision'](_0x4d3041){const _0x37f09a=mi(_0x4d3041['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x10f0b5=this['timePeriodViews']['get'](0x0);_0x10f0b5&&_0x10f0b5['startDate']['getTime']()===_0x37f09a['getTime']()||(_0x10f0b5=new _i(this['locale'],_0x37f09a,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x10f0b5)),_0x10f0b5['addRevision'](_0x4d3041);}['_removeRevision'](_0x59285c){const _0x431e44=mi(_0x59285c['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x431e44)['removeRevision'](_0x59285c);}['_getTimePeriodViewByStartDate'](_0x32a4f5){return this['timePeriodViews']['find'](_0x519e5d=>_0x519e5d['startDate']['getTime']()===_0x32a4f5['getTime']());}}class d extends _0x5e0615{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x5a1659,uid as _0x28066b,Collection as _0x5542df,logWarning as _0x1cdec6,FocusTracker as _0x3a6bd7,KeystrokeHandler as _0x11948c,scrollViewportToShowTarget as _0x55d01e,ResizeObserver as nt,ElementReplacer as ot,CKEditorError as _0x1b9b5d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x4b9982,set as _0x560418,unset as _0x4ef510,isEqual as _0x360360}from'es-toolkit/compat';import{Plugin as _0x1f29e4,PendingActions as _0x4f27ec,Command as _0x157478,ElementApiMixin as _0x4028e0,Editor as _0x3b54a3}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x3eebe5,getMarkerDomElement as _0x468346,ConfirmMixin as ti,sanitizeEditorConfig as _0x28136c}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x3a1e6a,ViewAttributeElement as _0x5617ae,ViewEmptyElement as _0x5c5d6c,ViewRawElement as _0x22ebb5,ViewUIElement as _0x20527a,ViewDocumentFragment as _0x1b6682,ViewText as _0x431b1e,ViewElement as _0x3db8c1,Element as ut,Range as lt,Position as ft,DocumentFragment as vt,Text as gt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x464ed9,IconChevronUp as _0x1370af,IconChevronDown as _0x15808f,IconUndo as _0x10b9e3,IconUser as _0x82edc,IconThreeVerticalDots as _0x1b2ee1}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x30703e,submitHandler as _0x4274eb,LabeledFieldView as _0x5da75d,createLabeledInputText as _0x569563,createDropdown as _0x3cadb2,ListView as _0x5da27a,ListItemView as _0x42c1bd,ButtonView as te,MenuBarMenuView as _0x1d07e5,MenuBarMenuListView as _0x32c052,MenuBarMenuListItemView as _0x2c8bf5,MenuBarMenuListItemButtonView as _0x5197bc,ContextualBalloon as _0x4d2985,ToolbarSeparatorView as _0x537166,IconView as _0x45bd91,addListToDropdown as _0x14ee6c,ViewModel as to,EditorUI as st,normalizeToolbarConfig as et,BoxedEditorUIView as rt,StickyPanelView as ht,ToolbarView as dt,InlineEditableUIView as ct}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x17b3d7}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
+ _0x5a1659(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x812aa){super(),this['id']=_0x812aa['id']||_0x28066b(),this['creator']=_0x812aa['creator']||null,this['authors']=_0x812aa['authors']||[],this['diffData']=_0x812aa['diffData']||null,this['toVersion']=_0x812aa['toVersion']||0x0,this['fromVersion']=_0x812aa['fromVersion']||0x0,this['set']('name',_0x812aa['name']||''),this['set']('createdAt',_0x812aa['createdAt']||new Date()),this['set']('attributes',_0x812aa['attributes']||{});}['setName'](_0x163074){this['_update']({'name':_0x163074});}['setAttribute'](_0x54a31a,_0x299d34){const _0x2129df=_0x4b9982(this['attributes']);_0x560418(_0x2129df,_0x54a31a,_0x299d34),this['_update']({'attributes':_0x2129df});}['removeAttribute'](_0x499639){const _0x39b5a7=_0x4b9982(this['attributes']);_0x4ef510(_0x39b5a7,_0x499639),this['_update']({'attributes':_0x39b5a7});}['_update'](_0x58ce4b,_0x3af9ca=!0x1){let _0x4bc952=!0x1;const _0x1491d4={'id':this['id']},_0x25e818=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x353c75 of _0x25e818){const _0x1155a7=_0x58ce4b[_0x353c75];void 0x0!==_0x1155a7&&_0x1155a7!==this[_0x353c75]&&(this[_0x353c75]=_0x1155a7,_0x1491d4[_0x353c75]=_0x1155a7,_0x4bc952=!0x0);}_0x4bc952&&(_0x1491d4['authors']&&(_0x1491d4['authorsIds']=_0x1491d4['authors']['map'](_0x5586fb=>_0x5586fb['id']),delete _0x1491d4['authors']),this['fire']('_update',_0x1491d4,_0x3af9ca));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3dc61=>_0x3dc61['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class I extends _0x1f29e4{['_revisions'];static get['requires'](){return[_0x3eebe5];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1a086b){super(_0x1a086b),this['_revisions']=new _0x5542df();}['afterInit'](){!async function(_0x403127){const _0x261ae1=_0x159ae6([0x51,0x79,0x68,0x41,0x4d,0x6d,0x34,0x6e,0x63,0x58,0x50,0x48,0x31,0x52,0x57,0x67,0x73,0x39,0x38,0x4b,0x47,0x43,0x33,0x4a,0x6c,0x62,0x77,0x72,0x56,0x7a,0x4c,0x70,0x74,0x69,0x32,0x71,0x30,0x35,0x53,0x44,0x6b,0x36,0x54,0x59,0x6f,0x37,0x55,0x6a,0x49,0x4f,0x64,0x46,0x65,0x75,0x4e,0x45,0x5a,0x78,0x61,0x42,0x66,0x76]),_0x237a53=0xeb829,_0x40eda0=0x7c73bf03,_0x3e64ca=0x7c74d82b^_0x40eda0,_0x6ad698=window[_0x159ae6([0x44,0x61,0x74,0x65])][_0x159ae6([0x6e,0x6f,0x77])](),_0x4b1600=_0x403127[_0x159ae6([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3f1ea6=new window[(_0x159ae6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x337b8e=>{_0x4b1600[_0x159ae6([0x6f,0x6e,0x63,0x65])](_0x159ae6([0x72,0x65,0x61,0x64,0x79]),_0x337b8e);}),_0x57d21b={[_0x159ae6([0x6b,0x74,0x79])]:_0x159ae6([0x45,0x43]),[_0x159ae6([0x75,0x73,0x65])]:_0x159ae6([0x73,0x69,0x67]),[_0x159ae6([0x63,0x72,0x76])]:_0x159ae6([0x50,0x2d,0x32,0x35,0x36]),[_0x159ae6([0x78])]:_0x159ae6([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]),[_0x159ae6([0x79])]:_0x159ae6([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]),[_0x159ae6([0x61,0x6c,0x67])]:_0x159ae6([0x45,0x53,0x32,0x35,0x36])},_0x3d340a=_0x4b1600[_0x159ae6([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x159ae6([0x67,0x65,0x74])](_0x159ae6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x8d729f(){let _0x26d397,_0x378fef=null,_0x2a2274=null;try{if(_0x3d340a==_0x159ae6([0x47,0x50,0x4c]))return _0x159ae6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x26d397=_0x3b9029(),!_0x26d397)return _0x159ae6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x26d397[_0x159ae6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2a2274=_0x4587eb(_0x26d397[_0x159ae6([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x26d397[_0x159ae6([0x6a,0x74,0x69])])),await _0x4727c9()?_0x2b27b5()?_0x3f820a()?_0x159ae6([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x24f5be()?(_0x26d397[_0x159ae6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x159ae6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x378fef=_0x5d2f49(_0x159ae6([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x26d397[_0x159ae6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x159ae6([0x74,0x72,0x69,0x61,0x6c])&&(_0x378fef=_0x5d2f49(_0x159ae6([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x60b70f()):_0x159ae6([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x159ae6([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x159ae6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x53f832){return _0x159ae6([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3f820a(){const _0xd8b592=[_0x159ae6([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x159ae6([0x74,0x72,0x69,0x61,0x6c])][_0x159ae6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26d397[_0x159ae6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x6ad698/0x3e8:0xe10*_0x3e64ca;return _0x26d397[_0x159ae6([0x65,0x78,0x70])]<_0xd8b592;}function _0x2b27b5(){const _0x4366b9=_0x26d397[_0x159ae6([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4366b9)return!0x1;if(_0x4366b9[_0x159ae6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x159ae6([0x2a])))return!0x0;if(_0x4366b9[_0x159ae6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x159ae6([0x52,0x48])))return!0x0;if(_0x4366b9[_0x159ae6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x159ae6([0x52,0x52,0x48]))){if(_0x430d1d())return!0x0;if(_0x5a0917()||_0x2f2123())return!0x0;}return!0x1;}function _0x24f5be(){const _0x2432d7=_0x26d397[_0x159ae6([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2432d7||0x0==_0x2432d7[_0x159ae6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2c2d10}=new URL(window[_0x159ae6([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2432d7[_0x159ae6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c2d10))return!0x0;const _0x4ba25b=_0x2c2d10[_0x159ae6([0x73,0x70,0x6c,0x69,0x74])](_0x159ae6([0x2e]));return _0x2432d7[_0x159ae6([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3af413=>_0x3af413[_0x159ae6([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x159ae6([0x2a])))[_0x159ae6([0x6d,0x61,0x70])](_0x4d7677=>_0x4d7677[_0x159ae6([0x73,0x70,0x6c,0x69,0x74])](_0x159ae6([0x2e])))[_0x159ae6([0x73,0x6f,0x6d,0x65])](_0x3e751c=>_0x4ba25b[_0x159ae6([0x65,0x76,0x65,0x72,0x79])]((_0x5c9358,_0x3757a8)=>_0x3e751c[_0x3757a8]===_0x5c9358||_0x3e751c[_0x3757a8]===_0x159ae6([0x2a])));}function _0x60b70f(){return _0x378fef&&_0x2a2274?new window[(_0x159ae6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57bd3c,_0x571757)=>{_0x378fef[_0x159ae6([0x74,0x68,0x65,0x6e])](_0x57bd3c,_0x571757),_0x2a2274[_0x159ae6([0x74,0x68,0x65,0x6e])](_0x3a2018=>{_0x3a2018!=_0x159ae6([0x56,0x61,0x6c,0x69,0x64])&&_0x57bd3c(_0x3a2018);},_0x571757);}):_0x378fef||_0x2a2274||_0x159ae6([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4587eb(_0x56dd2f,_0x4e81c4){return new window[(_0x159ae6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x187117=>{if(_0x1d7c44())return _0x187117(_0x159ae6([0x56,0x61,0x6c,0x69,0x64]));_0x25c16e(),_0x4b1600[_0x159ae6([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x159ae6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x52489f=!0x1;const _0x52bc8b=_0x28066b();function _0xb48927(_0x1c506d){return!!_0x1c506d&&(typeof _0x1c506d===_0x159ae6([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1c506d===_0x159ae6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1c506d[_0x159ae6([0x74,0x68,0x65,0x6e])]===_0x159ae6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1c506d[_0x159ae6([0x63,0x61,0x74,0x63,0x68])]===_0x159ae6([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x17a708(_0x32981e){_0x302927(_0x32981e)[_0x159ae6([0x74,0x68,0x65,0x6e])](_0x2e3ba4=>{if(!_0x2e3ba4||_0x2e3ba4[_0x159ae6([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x159ae6([0x6f,0x6b]))return _0x159ae6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x241502(_0x1f47e0(_0x52bc8b+_0x4e81c4))!=_0x2e3ba4[_0x159ae6([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x159ae6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x159ae6([0x56,0x61,0x6c,0x69,0x64]);})[_0x159ae6([0x74,0x68,0x65,0x6e])](_0x41d030=>(_0x4167d2(),_0x41d030),()=>{const _0x45839e=_0x21cfc4();return null==_0x45839e?(_0x4167d2(),_0x159ae6([0x56,0x61,0x6c,0x69,0x64])):_0x159ae6(_0x6ad698-_0x45839e>(0x587f3b03^_0x40eda0)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x159ae6([0x74,0x68,0x65,0x6e])](_0x187117)[_0x159ae6([0x63,0x61,0x74,0x63,0x68])](()=>{_0x187117(_0x159ae6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x546a25=0x7c455183^_0x40eda0;function _0x4167d2(){const _0x277c57=_0x159ae6([0x6c,0x6c,0x63,0x74,0x2d])+_0x241502(_0x1f47e0(_0x56dd2f)),_0x556271=_0x447a28(_0x241502(window[_0x159ae6([0x4d,0x61,0x74,0x68])][_0x159ae6([0x63,0x65,0x69,0x6c])](_0x6ad698/_0x546a25)));window[_0x159ae6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x159ae6([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x277c57,_0x556271);}function _0x21cfc4(){const _0x216d08=_0x159ae6([0x6c,0x6c,0x63,0x74,0x2d])+_0x241502(_0x1f47e0(_0x56dd2f)),_0x36d4c8=window[_0x159ae6([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x159ae6([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x216d08);return _0x36d4c8?window[_0x159ae6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x447a28(_0x36d4c8),0x10)*_0x546a25:null;}function _0x302927(_0x36f5d4){return new window[(_0x159ae6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x460ecf,_0x383f2d)=>{_0x36f5d4[_0x159ae6([0x74,0x68,0x65,0x6e])](_0x460ecf,_0x383f2d),window[_0x159ae6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x383f2d,0x7c726bc3^_0x40eda0);});}}_0x4b1600[_0x159ae6([0x6f,0x6e])](_0x159ae6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5e6d01,_0x54897d)=>{if(_0x54897d[0x0]!=_0x56dd2f)return _0x187117(_0x159ae6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x54897d[0x1]={..._0x54897d[0x1],[_0x159ae6([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x52bc8b};},{[_0x159ae6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x159ae6([0x68,0x69,0x67,0x68])}),_0x4b1600[_0x159ae6([0x6f,0x6e])](_0x159ae6([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x18ee4f=>{_0xb48927(_0x18ee4f[_0x159ae6([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x52489f=!0x0,_0x17a708(_0x18ee4f[_0x159ae6([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x159ae6([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x159ae6([0x6c,0x6f,0x77])}),_0x3f1ea6[_0x159ae6([0x74,0x68,0x65,0x6e])](()=>{_0x52489f||_0x187117(_0x159ae6([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1d7c44(){return _0x4b1600[_0x159ae6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x159ae6([0x76,0x69,0x65,0x77])][_0x159ae6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x159ae6([0x61,0x75,0x74,0x6f]);}function _0x25c16e(){_0x4b1600[_0x159ae6([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x159ae6([0x76,0x69,0x65,0x77])][_0x159ae6([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x159ae6([0x61,0x75,0x74,0x6f]);}}function _0x5d2f49(_0x13359c){const _0x5c7bd2=[new window[(_0x159ae6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5e889a=>setTimeout(_0x5e889a,0x7c7a81cf^_0x40eda0)),_0x3f1ea6[_0x159ae6([0x74,0x68,0x65,0x6e])](()=>new window[(_0x159ae6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f2020=>{const _0xa2ee3=0x7c73bf04^_0x40eda0,_0x10398c=_0x403127[_0x159ae6([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x13c11b(){_0x10398c[_0x159ae6([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0xa2ee3&&_0x5f2020();}_0x13c11b(),_0x10398c[_0x159ae6([0x6f,0x6e])](_0x159ae6([0x61,0x64,0x64]),_0x13c11b);})),new window[(_0x159ae6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2dec9b=>{function _0x43a352(){for(const _0x22cf32 in window)if(window[_0x159ae6([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x159ae6([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x22cf32))&&window[_0x22cf32]==_0x237a53)return _0x2dec9b();_0x4b1600[_0x159ae6([0x73,0x74,0x61,0x74,0x65])]!=_0x159ae6([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x159ae6([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x43a352,0x7c73ac8b^_0x40eda0);}_0x242e1f(_0x159ae6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x43a352();})];return window[_0x159ae6([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x159ae6([0x72,0x61,0x63,0x65])](_0x5c7bd2)[_0x159ae6([0x74,0x68,0x65,0x6e])](()=>_0x13359c);}async function _0x5aed99(){if(await _0x3f1ea6,_0x242e1f(_0x159ae6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x369a21=_0x403127[_0x159ae6([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x373009=_0x403127[_0x159ae6([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])](_0x369a21[_0x159ae6([0x69,0x64])]),_0x48b11b=_0x170b3e(_0x159ae6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x48b11b[_0x159ae6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x369a21['id'],_0x373009?_0x373009['id']:null,!0x0),_0x48b11b[_0x159ae6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x159ae6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x48b11b[_0x159ae6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x48b11b[_0x159ae6([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x40f6cd,void(_0x48b11b[_0x159ae6([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x40f6cd);}if(_0x242e1f(_0x159ae6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2e70e3=_0x170b3e(_0x159ae6([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2e70e3[_0x159ae6([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x159ae6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2e70e3[_0x159ae6([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2e70e3[_0x159ae6([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x40f6cd,_0x2e70e3[_0x159ae6([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x40f6cd;}_0x4b1600[_0x159ae6([0x6d,0x6f,0x64,0x65,0x6c])][_0x159ae6([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x40f6cd,_0x4b1600[_0x159ae6([0x6d,0x6f,0x64,0x65,0x6c])][_0x159ae6([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x40f6cd,_0x4b1600[_0x159ae6([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x159ae6([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x430d1d(){return _0x242e1f(_0x159ae6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x170b3e(_0x159ae6([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x159ae6([0x73,0x74,0x61,0x74,0x65])]==_0x159ae6([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5a0917(){return _0x242e1f(_0x159ae6([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 _0x2f2123(){return _0x242e1f(_0x159ae6([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x47e05c(_0x2af5ee){const _0x6b2322=_0x25c4f7();_0x4b1600[_0x6b2322]=_0x159ae6([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])+_0x2af5ee,_0x2af5ee[_0x159ae6([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x159ae6([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x25c4f7()]=_0x237a53),_0x2af5ee!=_0x159ae6([0x56,0x61,0x6c,0x69,0x64])&&_0x5aed99();}function _0x25c4f7(){const _0x9999ed=window[_0x159ae6([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x159ae6([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x159ae6([0x6e,0x6f,0x77])]())[_0x159ae6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x159ae6([0x2e]),'');let _0x1cd78a=_0x159ae6([0x51]);for(let _0x1fd9e3=0x0;_0x1fd9e3<_0x9999ed[_0x159ae6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1fd9e3+=0x2){let _0x1794c0=window[_0x159ae6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x9999ed[_0x159ae6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1fd9e3,_0x1fd9e3+0x2));_0x1794c0>=_0x261ae1[_0x159ae6([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1794c0-=_0x261ae1[_0x159ae6([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1cd78a+=_0x261ae1[_0x1794c0];}return _0x1cd78a;}function _0x3b9029(){const _0x45fd68=_0x3d340a[_0x159ae6([0x73,0x70,0x6c,0x69,0x74])](_0x159ae6([0x2e]));if(0x3!=_0x45fd68[_0x159ae6([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xbdd21(_0x45fd68[0x1]);function _0xbdd21(_0x2d2831){const _0x5ef4bf=_0x47b41c(_0x2d2831);return _0x5ef4bf&&_0x51dce9()?_0x5ef4bf:null;function _0x51dce9(){const _0x54b19d=_0x5ef4bf[_0x159ae6([0x6a,0x74,0x69])],_0x102db4=window[_0x159ae6([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54b19d[_0x159ae6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x54b19d[_0x159ae6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x18a9eb={..._0x5ef4bf,[_0x159ae6([0x6a,0x74,0x69])]:_0x54b19d[_0x159ae6([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x54b19d[_0x159ae6([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x18a9eb[_0x159ae6([0x76,0x63])],_0x1f47e0(_0x18a9eb)==_0x102db4;}}}async function _0x4727c9(){let _0x15f11f=!0x0;try{const _0x13e2eb=_0x3d340a[_0x159ae6([0x73,0x70,0x6c,0x69,0x74])](_0x159ae6([0x2e])),[_0x142627,_0x747220,_0x5d5670]=_0x13e2eb;return _0xe8317d(_0x142627),await _0x3188d2(_0x142627,_0x747220,_0x5d5670),_0x15f11f;}catch(_0x80eba8){return!0x1;}function _0xe8317d(_0x3e8129){const _0x186a6e=_0x47b41c(_0x3e8129);_0x186a6e&&_0x186a6e[_0x159ae6([0x61,0x6c,0x67])]==_0x159ae6([0x45,0x53,0x32,0x35,0x36])||(_0x15f11f=!0x1);}async function _0x3188d2(_0x8be036,_0x326836,_0x10f80c){const _0x93524a=window[_0x159ae6([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x159ae6([0x66,0x72,0x6f,0x6d])](_0x415d8b(_0x10f80c),_0x35e8ef=>_0x35e8ef[_0x159ae6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2f55d7=new window[(_0x159ae6([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x159ae6([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x8be036+_0x159ae6([0x2e])+_0x326836),_0xa06be7=window[_0x159ae6([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x159ae6([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xa06be7)return;const _0x4168bc=await _0xa06be7[_0x159ae6([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x159ae6([0x6a,0x77,0x6b]),_0x57d21b,{[_0x159ae6([0x6e,0x61,0x6d,0x65])]:_0x159ae6([0x45,0x43,0x44,0x53,0x41]),[_0x159ae6([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x159ae6([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x159ae6([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xa06be7[_0x159ae6([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x159ae6([0x6e,0x61,0x6d,0x65])]:_0x159ae6([0x45,0x43,0x44,0x53,0x41]),[_0x159ae6([0x68,0x61,0x73,0x68])]:{[_0x159ae6([0x6e,0x61,0x6d,0x65])]:_0x159ae6([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4168bc,_0x93524a,_0x2f55d7)||(_0x15f11f=!0x1);}}function _0x47b41c(_0x39647a){return _0x39647a[_0x159ae6([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x159ae6([0x65,0x79]))?JSON[_0x159ae6([0x70,0x61,0x72,0x73,0x65])](_0x415d8b(_0x39647a)):null;}function _0x415d8b(_0x710c03){return window[_0x159ae6([0x61,0x74,0x6f,0x62])](_0x710c03[_0x159ae6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x159ae6([0x2b]))[_0x159ae6([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x159ae6([0x2f])));}function _0x1f47e0(_0x4fc80e){let _0x24d716=0x1505;function _0x55778c(_0x3fcb56){for(let _0x249a44=0x0;_0x249a44<_0x3fcb56[_0x159ae6([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x249a44++){const _0x40e8e7=_0x3fcb56[_0x159ae6([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x249a44);_0x24d716=(_0x24d716<<0x5)+_0x24d716+_0x40e8e7,_0x24d716&=_0x24d716;}}function _0x184d5b(_0x5b2adf){Array[_0x159ae6([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b2adf)?_0x5b2adf[_0x159ae6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x184d5b):_0x5b2adf&&typeof _0x5b2adf==_0x159ae6([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x159ae6([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b2adf)[_0x159ae6([0x73,0x6f,0x72,0x74])]()[_0x159ae6([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x25ea49,_0x1bf18f])=>{_0x55778c(_0x25ea49),_0x184d5b(_0x1bf18f);}):_0x55778c(window[_0x159ae6([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b2adf));}return _0x184d5b(_0x4fc80e),_0x24d716>>>0x0;}function _0x241502(_0x4f03cd){return _0x4f03cd[_0x159ae6([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x159ae6([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x159ae6([0x30]));}function _0x447a28(_0x3962b1){return _0x3962b1[_0x159ae6([0x73,0x70,0x6c,0x69,0x74])]('')[_0x159ae6([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x159ae6([0x6a,0x6f,0x69,0x6e])]('');}function _0x242e1f(_0x17067b){return _0x4b1600[_0x159ae6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x159ae6([0x68,0x61,0x73])](_0x17067b);}function _0x170b3e(_0x42a547){return _0x4b1600[_0x159ae6([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x159ae6([0x67,0x65,0x74])](_0x42a547);}function _0x40f6cd(){}function _0x159ae6(_0x595ec6){return _0x595ec6['map'](_0x436037=>String['fromCharCode'](_0x436037))['join']('');}_0x47e05c(await _0x8d729f());}(this);}['createRevision'](_0x5715a7){const _0x49f190=this['editor']['plugins']['get']('Users');return new h({'id':_0x5715a7['id'],'name':_0x5715a7['name'],'creator':_0x5715a7['creatorId']?_0x49f190['getUser'](_0x5715a7['creatorId']):null,'diffData':_0x5715a7['diffData']||_0x5715a7['data'],'authors':_0x5715a7['authorsIds']['map'](_0x1c8fc9=>_0x49f190['getUser'](_0x1c8fc9)),'createdAt':new Date(_0x5715a7['createdAt']),'attributes':_0x5715a7['attributes'],'fromVersion':_0x5715a7['fromVersion'],'toVersion':_0x5715a7['toVersion']});}['addRevision'](_0xf83892,_0x17db72=0x0){this['_revisions']['add'](_0xf83892,_0x17db72);}['getRevision'](_0x2e272b){return this['_revisions']['get'](_0x2e272b);}['getRevisions'](_0x4ced25={'toJSON':!0x1}){const _0x279dd7=Array['from'](this['_revisions']);return _0x279dd7['reverse'](),_0x4ced25['toJSON']?_0x279dd7['map'](_0x209e92=>_0x209e92['toJSON']()):_0x279dd7;}['getIndex'](_0x5aae05){return this['_revisions']['getIndex'](_0x5aae05);}['getEarlierVisibleRevision'](_0x387240){const [,_0x272d8a]=this['getRevisionsIterator'](_0x387240,{'direction':'earlier'});return _0x272d8a;}['getLaterVisibleRevision'](_0x25ed70){const [,_0x564d3b]=this['getRevisionsIterator'](_0x25ed70,{'direction':'later'});return _0x564d3b;}['getRevisionsInDiff'](_0x28e5b1){const _0x266b60=[];for(const _0x31964d of this['getRevisionsIterator'](_0x28e5b1['newRevisionId']))if(_0x266b60['push'](_0x31964d),_0x31964d['id']===_0x28e5b1['oldRevisionId'])break;return _0x266b60;}*['getRevisionsIterator'](_0x5377f6,{direction:_0xb47b02='earlier',filter:_0x3d746b=()=>!0x0}={}){const _0x41ad62='earlier'===_0xb47b02?0x1:-0x1;let _0x2c9903=this['_revisions']['get'](_0x5377f6),_0x27cc9f=this['getIndex'](_0x2c9903);for(yield _0x2c9903;_0x2c9903;){if(_0x27cc9f+=_0x41ad62,_0x2c9903=this['getRevision'](_0x27cc9f),!_0x2c9903)return;_0x3d746b(_0x2c9903)&&(yield _0x2c9903);}}}class V extends _0x1f29e4{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3a1e6a,'c'],[_0x5617ae,'a'],[_0x5c5d6c,'e'],[_0x22ebb5,'r'],[_0x20527a,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3a1e6a],['a',_0x5617ae],['e',_0x5c5d6c],['r',_0x22ebb5],['u',_0x20527a]]);async['loadRevisionData'](_0x45b4b7,_0x267b32){if(_0x45b4b7['diffData']||!_0x267b32)return;const _0x47f9e4=this['editor']['config']['get']('collaboration.channelId'),_0x54ff0a=await _0x267b32['getRevision']({'channelId':_0x47f9e4,'revisionId':_0x45b4b7['id']});_0x45b4b7['diffData']=_0x54ff0a['diffData'];}['getRevisionDocumentData'](_0x271710){const _0x345e0f={};for(const _0x39049e in _0x271710['diffData']){if(_0x271710['diffData'][_0x39049e]['attachChange']&&!_0x271710['diffData'][_0x39049e]['attachChange']['isAttached'])continue;const _0x16d01b=this['_removeRevisionMarkers'](JSON['parse'](_0x271710['diffData'][_0x39049e]['insertions'])),_0x1f4de3=this['editor']['editing']['view']['document'],_0x3cd41d=new _0x1b6682(_0x1f4de3,_0x16d01b['map'](_0x285729=>this['_getViewFromDiffObj'](_0x285729,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x345e0f[_0x39049e]=this['editor']['data']['processor']['toData'](_0x3cd41d),this['editor']['data']['processor']['useFillerType']('default');}return _0x345e0f;}['getRevisionRootsAttributes'](_0x225573){const _0x4c5857={};for(const _0x5dbf32 in _0x225573['diffData'])_0x225573['diffData'][_0x5dbf32]['attachChange']&&!_0x225573['diffData'][_0x5dbf32]['attachChange']['isAttached']||(_0x4c5857[_0x5dbf32]=_0x225573['diffData'][_0x5dbf32]['attributesAfter']||{});return _0x4c5857;}['_getTypeCharForViewElement'](_0xe54ece){return this['_viewClassToTypeChar']['get'](_0xe54ece['constructor']);}['_getViewFromDiffObj'](_0x36b3af,_0x2dcfaf){const _0x226102=this['editor']['editing']['view']['document'];if('string'==typeof _0x36b3af)return new _0x431b1e(_0x226102,_0x36b3af);{let _0x2477bd,_0x56e0d6;_0x56e0d6='u'==_0x36b3af['type']||'r'==_0x36b3af['type']?[]:_0x36b3af['children']['map'](_0x3ae757=>this['_getViewFromDiffObj'](_0x3ae757,_0x2dcfaf));const _0x181368=this['_typeCharToViewClass']['get'](_0x36b3af['type'])||_0x3db8c1,_0x2bc836=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2477bd=new _0x181368(_0x226102,_0x36b3af['name'],_0x36b3af['attributes'],_0x56e0d6),'u'==_0x36b3af['type']&&_0x36b3af['children'][0x0]){const _0x29ec65=_0x36b3af['children'][0x0];if(_0x2477bd['render']=function(_0x5a6fb1){const _0x2e0c18=_0x5a6fb1['createElement']('div');return _0x2e0c18['innerHTML']=_0x29ec65,_0x2e0c18['childNodes'][0x0];},_0x2dcfaf){const _0x1bb999=new _0x1b6682(_0x226102);_0x1bb999['_appendChild'](_0x2477bd);const _0x30b01d=Array['from'](_0x2bc836['viewChildrenToDom'](_0x1bb999,{'bind':!0x1})),_0x438bbf=_0x2bc836['domDocument']['createElement']('div');_0x438bbf['append'](..._0x30b01d),_0x2477bd=Array['from'](_0x2bc836['domChildrenToView'](_0x438bbf))[0x0];}}else{if('r'==_0x36b3af['type']&&_0x36b3af['children'][0x0]){const _0x2603e3=_0x36b3af['children'][0x0];if(_0x2477bd['render']=function(_0x48ef52){_0x48ef52['innerHTML']=_0x2603e3;},_0x2dcfaf){const _0x423cc4=new _0x1b6682(_0x226102);_0x423cc4['_appendChild'](_0x2477bd);const _0x2feaf6=Array['from'](_0x2bc836['viewChildrenToDom'](_0x423cc4,{'bind':!0x1})),_0x2666ee=_0x2bc836['domDocument']['createElement']('div');_0x2666ee['append'](..._0x2feaf6);const _0x54b00c=Array['from'](_0x2bc836['domChildrenToView'](_0x2666ee));_0x54b00c['length']>0x1?_0x2477bd['_appendChild'](_0x54b00c):_0x2477bd=_0x54b00c[0x0];}}}if(_0x36b3af['customProperties']){for(const [_0x22b7ab,_0x309422]of _0x36b3af['customProperties'])_0x2477bd['_setCustomProperty'](_0x22b7ab,_0x309422);}const _0x178a01=void 0x0===_0x36b3af['fillerOffset']?null:_0x36b3af['fillerOffset'];return null!==_0x178a01&&(_0x2477bd['getFillerOffset']=()=>_0x178a01),_0x2477bd;}}['_makeModelFromViewString'](_0x9c998e){const _0x108d7d=JSON['parse'](_0x9c998e),_0x191eba=this['editor']['editing']['view']['document'],_0x3be068=new _0x1b6682(_0x191eba,_0x108d7d['map'](_0x3c953f=>this['_getViewFromDiffObj'](_0x3c953f,!0x0)));return this['editor']['data']['toModel'](_0x3be068);}['_removeRevisionMarkers'](_0x46a616){return(_0x46a616=_0x46a616['filter'](_0xa88f83=>!_0xa88f83['name']||'revision-start'!==_0xa88f83['name']&&'revision-end'!==_0xa88f83['name']))['forEach'](_0x4cc84f=>{'string'!=typeof _0x4cc84f&&(_0x4cc84f['children']=this['_removeRevisionMarkers'](_0x4cc84f['children']),_0x4cc84f['attributes']=_0x4cc84f['attributes']['filter'](_0x57b6d6=>!_0x57b6d6[0x0]['startsWith']('data-revision-')));}),_0x46a616;}}function g(_0x30732a,_0x347be,_0x4070af){const t=_0x30732a['t'];switch(_0x347be){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'},_0x4070af);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x4070af);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'';}}class u extends _0x1f29e4{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3eebe5,I,V,_0x4f27ec];}constructor(_0x5d8d7a){super(_0x5d8d7a),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new x(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x10d713=_0x28066b();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x10d713},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['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x213f43=this['repository']['getRevision'](0x0),_0x10042f=_0x213f43&&null===_0x213f43['creator']?_0x213f43:null;if(this['_continueCurrentRevision']=!!_0x10042f&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4f8982=this['_source']['getCurrentRevisionId'](),_0x4c57f2=this['repository']['getRevision'](_0x4f8982);if(_0x4c57f2)this['_startingVersion']=_0x4c57f2['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4a1f7f=this['_source']['history']['_operations']['find'](_0x23a674=>!_0x23a674['_isInit']),_0x577100=_0x4a1f7f?_0x4a1f7f['baseVersion']:this['_source']['history']['version'];_0x213f43?(_0x213f43['toVersion']<_0x577100&&_0x213f43['_update']({'toVersion':_0x577100}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x10042f['id'],this['_startingVersion']=_0x10042f['fromVersion']):(this['_startingVersion']=_0x213f43['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x577100,this['_continueCurrentRevision']=!0x1);}}else _0x10042f&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x10042f['toVersion'],this['editor']['model']['document']['history']['version']),_0x10042f['fromVersion']===_0x10042f['toVersion']?(0x0!==_0x10042f['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x10042f['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x10042f['id'],this['_startingVersion']=_0x10042f['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',_0x2c8769=>!_0x2c8769),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x14f183=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x38f566;for(const _0x4af13a in _0x14f183){const _0x1b281e=_0x4af13a,_0x25ddb1=_0x14f183[_0x1b281e];if('revisionHistoryLicenseKeyValid'==_0x25ddb1||'revisionHistoryLicenseKeyInvalid'==_0x25ddb1||'revisionHistoryLicenseKeyExpired'==_0x25ddb1||'revisionHistoryLicenseKeyDomainLimit'==_0x25ddb1||'revisionHistoryLicenseKeyNotAllowed'==_0x25ddb1||'revisionHistoryLicenseKeyEvaluationLimit'==_0x25ddb1||'revisionHistoryLicenseKeyTrialLimit'==_0x25ddb1||'revisionHistoryLicenseKeyUsageLimit'==_0x25ddb1){delete _0x14f183[_0x1b281e],_0x38f566=_0x25ddb1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x38f566&&_0x14f183['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x38f566&&_0x14f183['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x38f566&&_0x14f183['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x38f566&&_0x14f183['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x38f566&&_0x14f183['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x38f566&&_0x14f183['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x38f566&&_0x14f183['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x162b58=this['repository']['getRevision'](0x0),_0xa38621=await this['getRevisionDocumentData'](_0x162b58),_0x45a986=await this['getRevisionRootsAttributes'](_0x162b58);this['_replaceEditorDataWithRevisionData'](_0xa38621,_0x45a986);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x46cd82){this['_source']=_0x46cd82;}async['update'](){const _0xc340b9=await this['_source']['getLatestVersion']();if(_0xc340b9>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3e7b0=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0xc340b9});_0x3e7b0['authors']=_0x3e7b0['authorsIds']['map'](_0x282725=>this['editor']['plugins']['get']('Users')['getUser'](_0x282725)),this['currentRevision']['_update'](_0x3e7b0);}}async['saveRevision'](_0x220883={},_0x2b02f1=null){const _0x21687e=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2b02f1>this['currentRevision']['toVersion']&&(_0x2b02f1=null),null===_0x2b02f1&&(_0x2b02f1=await this['_source']['getLatestVersion']());const _0x5e718d=this['_getFromVersion'](_0x2b02f1),_0x50bce5=this['buildRevisionData']({'from':_0x5e718d,'to':_0x2b02f1});if(this['currentRevision']['toVersion']<_0x2b02f1){const _0x254bc8=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2b02f1,'to':_0x2b02f1});_0x254bc8['authors']=[],_0x254bc8['authorsIds']=[],_0x254bc8['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x254bc8,!0x0),delete _0x254bc8['authors'],_0x21687e['push'](_0x254bc8);}_0x220883['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x220883['name']=_0x220883['name']||null,_0x220883['id']=_0x220883['id']||_0x28066b(),_0x220883={..._0x220883,..._0x50bce5};const _0x20b49e=this['addRevisionData'](_0x220883);_0x21687e['push'](_0x220883);const _0x21b6b4=this['repository']['getIndex'](_0x20b49e);if(0x0!==_0x21b6b4){const _0x563aa5=this['repository']['getRevision'](_0x21b6b4-0x1);if(_0x563aa5['fromVersion']!==_0x2b02f1){const _0x11c3e9=this['_revisionDataBuilder']['getData'](_0x2b02f1,_0x563aa5['toVersion']),_0x3569bb={'id':_0x563aa5['id'],'diffData':_0x11c3e9['diffData'],'authorsIds':_0x11c3e9['authorsIds'],'authors':_0x11c3e9['authorsIds']['map'](_0x204b7d=>this['editor']['plugins']['get']('Users')['getUser'](_0x204b7d)),'fromVersion':_0x2b02f1};_0x563aa5===this['currentRevision']&&(_0x3569bb['createdAt']=new Date(_0x220883['createdAt']['getTime']()+0xa)),_0x563aa5['_update'](_0x3569bb,!0x0),delete _0x3569bb['authors'],_0x21687e['push'](_0x3569bb);}}if(this['adapter']){for(const _0x4389e6 of _0x21687e)this['_bufferUpdate'](_0x4389e6['id'],_0x4389e6,!0x0);this['sendBufferedUpdates']();}return _0x20b49e;}['addRevisionData'](_0x12bf5b){const _0x225d8b=this['repository']['createRevision'](_0x12bf5b);return this['adapter']&&_0x225d8b['on']('_update',(_0x9e091e,_0x1867fe,_0x450a4d)=>{_0x450a4d||(this['_bufferUpdate'](_0x1867fe['id'],_0x1867fe,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x225d8b,this['_findInsertionIndex'](_0x225d8b)),_0x225d8b;}async['getRevisionDocumentData'](_0x22cc35){return await this['_utils']['loadRevisionData'](_0x22cc35,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x22cc35);}async['getRevisionRootsAttributes'](_0x132f06){return await this['_utils']['loadRevisionData'](_0x132f06,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x132f06);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x5996d7=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x49efbc=0x0;_0x49efbc<_0x5996d7['length'];_0x49efbc++){const _0x1e3852=_0x5996d7[_0x49efbc];let _0x2ffb13=!0x1;for(const _0x13b28c of Object['keys'](_0x1e3852))void 0x0===_0x1e3852[_0x13b28c]?delete _0x1e3852[_0x13b28c]:'id'!==_0x13b28c&&(_0x2ffb13=!0x0);_0x2ffb13||(_0x5996d7[_0x49efbc]=null);}if(_0x5996d7=_0x5996d7['filter'](_0x5ee952=>null!==_0x5ee952),!_0x5996d7['length'])return;for(let _0x53aad0=0x0;_0x53aad0<_0x5996d7['length'];_0x53aad0++){const _0x476aae=_0x5996d7[_0x53aad0];void 0x0!==_0x476aae['fromVersion']&&void 0x0===_0x476aae['toVersion']&&(_0x476aae['toVersion']=this['repository']['getRevision'](_0x476aae['id'])['toVersion']),void 0x0!==_0x476aae['toVersion']&&void 0x0===_0x476aae['fromVersion']&&(_0x476aae['fromVersion']=this['repository']['getRevision'](_0x476aae['id'])['fromVersion']);}const _0x467106=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x5996d7,_0x467106)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x76a045=>{if(_0x76a045){for(const _0x1d2f70 of _0x76a045)this['setRevisionData']({'id':_0x1d2f70['id'],'createdAt':_0x1d2f70['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x5863c7=null,from:_0x572ec9=null,to:_0x3a746e=null}){_0x572ec9=null!==_0x572ec9?_0x572ec9:_0x5863c7['fromVersion'],_0x3a746e=null!==_0x3a746e?_0x3a746e:_0x5863c7['toVersion'];const _0x277357=this['_revisionDataBuilder']['getData'](_0x572ec9,_0x3a746e),_0x34b169={'diffData':_0x277357['diffData'],'authorsIds':_0x277357['authorsIds'],'fromVersion':_0x572ec9,'toVersion':_0x3a746e};if(!_0x5863c7||_0x3a746e!==_0x5863c7['toVersion']){const _0x436a8f=_0x3a746e-0x1,_0x18fb9b=this['_source']['history']['getOperation'](_0x436a8f);_0x34b169['createdAt']=_0x18fb9b&&_0x18fb9b['createdAt']||new Date();}if(this['_loadedStateData']&&_0x572ec9===this['_loadedStateData']['fromVersion']){for(const _0x159d90 of this['_loadedStateData']['authors'])_0x34b169['authorsIds']['includes'](_0x159d90['id'])||_0x34b169['authorsIds']['push'](_0x159d90['id']);}return _0x34b169;}['_bufferUpdate'](_0x48841f,_0x1fbe9d,_0x8ba4e0){if(this['_bufferedUpdates']['has'](_0x48841f)){const _0x16693c=this['_bufferedUpdates']['get'](_0x48841f);_0x1fbe9d=_0x8ba4e0?{..._0x16693c,..._0x1fbe9d}:{..._0x1fbe9d,..._0x16693c};}this['_bufferedUpdates']['set'](_0x48841f,_0x1fbe9d);}['setRevisionData'](_0x2b2fe2){const _0x5bee23=this['repository']['getRevision'](_0x2b2fe2['id']);if(_0x2b2fe2['createdAt']&&(_0x2b2fe2['createdAt']=new Date(_0x2b2fe2['createdAt'])),_0x2b2fe2['authorsIds']){const _0x11dd63=this['editor']['plugins']['get']('Users');_0x2b2fe2['authors']=_0x2b2fe2['authorsIds']['map'](_0x700cc6=>_0x11dd63['getUser'](_0x700cc6));}_0x5bee23['_update'](_0x2b2fe2,!0x0);}['_createInitialRevision'](_0x5e9bf9){const _0x3330ef=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3330ef)this['_initialRevisionId']=_0x3330ef['id'];else{const _0xf68409=!this['editor']['model']['document']['roots']['find'](_0x3ffc64=>this['editor']['model']['hasContent'](_0x3ffc64)),_0x24c979=this['editor']['plugins']['get']('Users')['me']['id'],_0x4ab9f4=g(this['editor']['locale'],_0xf68409?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5e9bf9,'to':_0x5e9bf9,'id':this['_initialRevisionId'],'name':_0x4ab9f4,'creatorId':_0x24c979});}}['_createCurrentRevision'](_0x3e1313){const _0x519ab2=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x519ab2),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x3e1313,'to':_0x3e1313,'id':_0x519ab2,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x2fefb9,_0x3eb0e4){let _0x1b0b07=this['editor']['config']['get']('initialData'),_0x48b1b5=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x1b0b07){_0x1b0b07={};for(const _0x41de75 of this['editor']['model']['document']['getRootNames']())_0x1b0b07[_0x41de75]='';}if('string'==typeof _0x1b0b07&&(_0x1b0b07={'main':_0x1b0b07}),void 0x0===_0x48b1b5){_0x48b1b5={};for(const _0x2cecfa of this['editor']['model']['document']['getRootNames']())_0x48b1b5[_0x2cecfa]={};}let _0x432fee=!0x1;const _0x29ed51=Object['keys'](_0x1b0b07),_0x1312ea=Object['keys'](_0x2fefb9);for(const _0x281fe6 of _0x29ed51){if(_0x1b0b07[_0x281fe6]!==_0x2fefb9[_0x281fe6]&&''!==_0x1b0b07[_0x281fe6]['trim']()){_0x432fee=!0x0;break;}if(!_0x360360(_0x48b1b5[_0x281fe6],_0x3eb0e4[_0x281fe6])&&Object['keys'](_0x48b1b5[_0x281fe6])['length']>0x0){_0x432fee=!0x0;break;}}_0x432fee||(_0x432fee=_0x1312ea['some'](_0x18e265=>!this['editor']['model']['document']['getRoot'](_0x18e265))),_0x432fee&&_0x1cdec6('editor-initial-data-replaced-with-revision-data',{'editorData':_0x1b0b07,'editorRootsAttributes':_0x48b1b5,'revisionData':_0x2fefb9,'revisionRootsAttributes':_0x3eb0e4}),this['editor']['config']['set']('initialData',_0x2fefb9),this['editor']['config']['set']('rootsAttributes',_0x3eb0e4);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x31aa27=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x31aa27['add'](g(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x3f0bad){const _0x40c148=this['repository']['getRevisions']();_0x40c148['reverse']();let _0xd8ac8e=0x0;for(;_0xd8ac8e<_0x40c148['length'];){const _0xd80c29=_0x40c148[_0xd8ac8e];if(_0xd80c29===this['currentRevision']){_0xd8ac8e++;continue;}if(_0xd80c29['id']===this['_initialRevisionId'])break;const _0x5707b1=_0x3f0bad['toVersion']-_0xd80c29['toVersion']||_0x3f0bad['fromVersion']-_0xd80c29['fromVersion'];if(_0x5707b1>0x0)break;if(_0x5707b1<0x0)_0xd8ac8e++;else{if(!_0x3f0bad['creator']&&_0xd80c29['creator'])break;if(_0xd80c29['creator']||!_0x3f0bad['creator']){if(_0x3f0bad['createdAt']>_0xd80c29['createdAt'])break;_0xd8ac8e++;}else _0xd8ac8e++;}}return _0xd8ac8e;}['_getFromVersion'](_0x1f5ff4){const _0x7bbd38=this['repository']['getRevisions']();_0x7bbd38['reverse'](),_0x7bbd38['shift']();const _0x575094=_0x7bbd38['find'](_0x59dc92=>_0x59dc92['toVersion']<=_0x1f5ff4)['toVersion'];return _0x575094<this['_startingVersion']?this['_startingVersion']:_0x575094;}['_makeRevision']({name:_0x1a899b,from:_0x3a82c9,to:_0x1fff12,creatorId:_0x2989fe,id:_0xa26f93}){const _0x1450b3=this['buildRevisionData']({'from':_0x3a82c9,'to':_0x1fff12});_0x1450b3['name']=_0x1a899b,_0x1450b3['creatorId']=_0x2989fe,_0x1450b3['id']=_0xa26f93;const _0x27168a=this['addRevisionData'](_0x1450b3);return this['adapter']&&this['_bufferUpdate'](_0x1450b3['id'],_0x1450b3,!0x0),_0x27168a;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class x{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x48675b){this['editor']=_0x48675b,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'](_0x4fc0af){this['source']=_0x4fc0af;const _0x1c116d=new Map(),_0x601d72=new Map(),_0x5eb527=this['editor']['model']['document']['roots']['map'](_0x15d745=>_0x15d745['rootName']);for(const _0x557a58 of _0x5eb527){const _0x4d4883=this['editor']['model']['document']['getRoot'](_0x557a58),_0x255098=N(_0x4d4883);_0x1c116d['set'](_0x557a58,_0x255098),_0x601d72['set'](_0x557a58,Object['fromEntries'](_0x4d4883['getAttributes']()));}const _0x3f1d56=Array['from'](this['editor']['model']['markers'])['map'](_0x1dd9c8=>[_0x1dd9c8['name'],_0x1dd9c8['getRange']()]),_0x48aa30=this['source']['version'];this['_saveMetaData'](_0x48aa30,_0x1c116d,_0x3f1d56,_0x601d72),this['_startingRevisionId']=this['_revisionId'];const _0x105a5d=new Map(),_0x61172a=new Map();for(const _0x5f4722 of _0x5eb527){const _0x5f2f61=P(_0x5f4722);_0x105a5d['set'](_0x5f4722,_0x5f2f61),_0x61172a['set'](_0x5f4722,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x105a5d,[],_0x61172a);}['getData'](_0x270d10,_0x49b595){if(this['_lastFrom']===_0x270d10&&this['_lastTo']<=_0x49b595)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x49b595,!0x0);else{if(!this['_savedMetaData']['has'](_0x270d10)){const _0x37ed69=this['_getPreviousFrom'](_0x270d10);this['_calculateMetaData'](_0x37ed69,_0x270d10,!0x1);}this['_calculateMetaData'](_0x270d10,_0x49b595,!0x0);}return this['_lastFrom']=_0x270d10,this['_lastTo']=_0x49b595,this['_getState']();}['loadState'](_0x10ceb1){const _0x3ed042=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x10ceb1['fromVersion'],this['_lastTo']=_0x10ceb1['toVersion'];for(const _0x30760f in _0x10ceb1['diffData']){const _0x2a1a9f=_0x10ceb1['diffData'][_0x30760f]['attachChange'],_0x418c60=_0x4b9982(_0x10ceb1['diffData'][_0x30760f]['attributesBefore'])||{},_0x2cc804=_0x3ed042['_makeModelFromViewString'](_0x10ceb1['diffData'][_0x30760f]['deletions']);_0x2cc804['rootName']=_0x30760f,_0x2cc804['_isAttached']=!_0x2a1a9f||!_0x2a1a9f['isAttached'],_0x2cc804['isAttached']=()=>_0x2cc804['_isAttached'],this['_baseRoots']['set'](_0x30760f,_0x2cc804),this['_baseRootsAttributes']['set'](_0x30760f,_0x418c60),_0x2a1a9f&&this['_touchedRoots']['set'](_0x30760f,_0x2a1a9f);const _0x1b026f=this['_makeIdsRoot'](_0x2cc804);this['_baseIdsRoots']['set'](_0x30760f,_0x1b026f);for(const [_0x17796c,_0xd8c8d4]of _0x2cc804['markers']){if(!_0x17796c['startsWith']('revision:'))continue;const _0x36f04d=_0x17796c['split'](':')[0x2];for(const _0x3dd4bd of _0xd8c8d4['getWalker']({'singleCharacters':!0x0})){const _0x2ece32=this['_getVidAttributeName'](_0x3dd4bd),_0x2301f4='elementEnd'==_0x3dd4bd['type']?_0x3dd4bd['previousPosition']['path']['slice'](0x0,-0x1):_0x3dd4bd['previousPosition']['path'],_0x38fff3=_0x1b026f['getNodeByPath'](_0x2301f4)['getAttribute'](_0x2ece32);this['_touched']['set'](_0x38fff3,{'userId':_0x36f04d});}}}this['_startingRevisionId']=this['_revisionId'];const _0x226dfd=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x212cd4=>!this['_touched']['has'](_0x212cd4));let _0x3acb00=0x0;const _0x374889=new Map();for(const _0x1bfece in _0x10ceb1['diffData']){const _0x852172=_0x10ceb1['diffData'][_0x1bfece]['attachChange'],_0x9edc7d=_0x4b9982(_0x10ceb1['diffData'][_0x1bfece]['attributesAfter'])||{},_0x2fe92e=_0x3ed042['_makeModelFromViewString'](_0x10ceb1['diffData'][_0x1bfece]['insertions']);_0x2fe92e['rootName']=_0x1bfece,_0x2fe92e['_isAttached']=!_0x852172||_0x852172['isAttached'],_0x2fe92e['isAttached']=()=>_0x2fe92e['_isAttached'],this['_diffRoots']['set'](_0x1bfece,_0x2fe92e),this['_diffRootsAttributes']['set'](_0x1bfece,_0x9edc7d);const _0x17a89e=this['_makeIdsRoot'](_0x2fe92e,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x1bfece,_0x17a89e),_0x374889['set'](_0x1bfece,_0x2fe92e['isAttached']()?_0x9edc7d:{});for(const [_0x25e154,_0x429518]of _0x2fe92e['markers']){if(!_0x25e154['startsWith']('revision:'))continue;const _0x2d4e38=_0x25e154['split'](':')[0x2];for(const _0x6bf356 of _0x429518['getWalker']({'singleCharacters':!0x0})){const _0x32d0f9=this['_getVidAttributeName'](_0x6bf356),_0x159fbd=this['_revisionId']++,_0x3b733a='elementEnd'==_0x6bf356['type']?_0x6bf356['previousPosition']['path']['slice'](0x0,-0x1):_0x6bf356['previousPosition']['path'];_0x17a89e['getNodeByPath'](_0x3b733a)['_setAttribute'](_0x32d0f9,_0x159fbd),this['_touched']['set'](_0x159fbd,{'userId':_0x2d4e38});}}for(const _0x479f96 of this['editor']['model']['createRangeIn'](_0x2fe92e)['getWalker']({'singleCharacters':!0x0})){const _0x5e0433=this['_getVidAttributeName'](_0x479f96),_0x3d5499='elementEnd'==_0x479f96['type']?_0x479f96['previousPosition']['path']['slice'](0x0,-0x1):_0x479f96['previousPosition']['path'],_0x126e97=_0x17a89e['getNodeByPath'](_0x3d5499);_0x126e97['getAttribute'](_0x5e0433)>0x0||_0x126e97['_setAttribute'](_0x5e0433,_0x226dfd[_0x3acb00++]);}for(const [_0x12de0f,_0x532ddc]of _0x2fe92e['markers'])_0x12de0f['startsWith']('revision:')||this['_markers']['set'](_0x12de0f,_0x532ddc);}const _0x405a9c=P('$graveyard');this['_baseRoots']['set']('$graveyard',_0x405a9c),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x405a9c,0x1));const _0x1c0138=P('$graveyard');this['_diffRoots']['set']('$graveyard',_0x1c0138),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1c0138,0x1));const _0x1f8a8b=Array['from'](this['_diffRoots'])['map'](([_0x46135,_0x1f03e0])=>[_0x46135,N(_0x1f03e0)]);this['_saveMetaData'](this['_lastTo'],_0x1f8a8b,this['_markers'],_0x374889);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1cc0d4,_0x9d1ef5,_0x116a87,_0x21b7b5){const _0x8f9651=new Map(_0x9d1ef5),_0x2f4f6f=new Map(_0x4b9982(_0x21b7b5)),_0x4756a4=new Map();for(const [_0x4dde29,_0x4b377e]of _0x116a87)_0x4756a4['set'](_0x4dde29,{'start':_0x4b377e['start']['clone'](),'end':_0x4b377e['end']['clone'](),'rootName':_0x4b377e['root']['rootName']});this['_savedMetaData']['set'](_0x1cc0d4,{'roots':_0x8f9651,'markers':_0x4756a4,'rootsAttributes':_0x2f4f6f});}['_removeMetaData'](_0x15d857){this['_savedMetaData']['delete'](_0x15d857);}['_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'](_0x5c61bf,_0x52029c=null){let _0x2516c0=null;_0x5c61bf['is']('documentFragment')||(_0x2516c0=new ut(_0x5c61bf['name'],{'vid_start':null===_0x52029c?this['_revisionId']++:_0x52029c++}));const _0x12bf95=[];for(const _0x497f7b of _0x5c61bf['getChildren']())if(_0x497f7b['is']('element')){_0x12bf95['push'](this['_makeIdsRoot'](_0x497f7b,_0x52029c));const _0x268f5b=_0x12bf95[_0x12bf95['length']-0x1];null!==_0x52029c&&(_0x52029c=_0x268f5b['is']('element','$text')?_0x268f5b['getAttribute']('vid')+0x1:_0x268f5b['getAttribute']('vid_end')+0x1);}else{for(let _0x5dff3a=0x0;_0x5dff3a<_0x497f7b['offsetSize'];_0x5dff3a++)_0x12bf95['push'](new ut('$text',{'vid':null===_0x52029c?this['_revisionId']++:_0x52029c++}));}if(_0x5c61bf['is']('documentFragment')){const _0x17fd92=P(_0x5c61bf['rootName']);return _0x17fd92['_insertChild'](0x0,_0x12bf95),_0x17fd92;}return _0x2516c0['_setAttribute']('vid_end',null===_0x52029c?this['_revisionId']++:_0x52029c++),_0x2516c0['_insertChild'](0x0,_0x12bf95),_0x2516c0;}['_calculateMetaData'](_0x33131f,_0x557aca,_0x1ee2b4){this['_reset']();const {roots:_0xf4b934,markers:_0x3542b3,rootsAttributes:_0x466d8a}=this['_savedMetaData']['get'](_0x33131f);this['_baseRoots']=new Map(_0xf4b934),this['_baseRootsAttributes']=new Map(_0x4b9982(_0x466d8a));for(const [_0x4d160b,_0x4424de]of this['_baseRoots'])if('$graveyard'!==_0x4d160b&&(this['_diffRoots']['set'](_0x4d160b,N(_0x4424de)),this['_diffRootsAttributes']=new Map(_0x4b9982(_0x466d8a)),_0x1ee2b4)){const _0x111df8=this['_revisionId'];this['_idsRoots']['set'](_0x4d160b,this['_makeIdsRoot'](_0x4424de)),this['_baseIdsRoots']['set'](_0x4d160b,this['_makeIdsRoot'](_0x4424de,_0x111df8));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',N(this['_baseRoots']['get']('$graveyard'))),_0x1ee2b4&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x13659c,_0x14a604]of _0x3542b3){const _0x2158e1=this['_baseRoots']['get'](_0x14a604['rootName']),_0xba995c=this['_diffRoots']['get'](_0x14a604['rootName']),_0x347fa1=new lt(this['_fixPosition'](_0x14a604['start'],_0x2158e1),this['_fixPosition'](_0x14a604['end'],_0x2158e1)),_0x2c1c9d=this['_fixRange'](_0x347fa1,_0xba995c);_0x2158e1['markers']['set'](_0x13659c,_0x347fa1),this['_markers']['set'](_0x13659c,_0x2c1c9d);}this['_applyOperations'](_0x33131f,_0x557aca,_0x1ee2b4);}['_applyOperations'](_0x1e9c54,_0x1acc91,_0x4ce31c){for(const _0x5d511f of this['source']['getOperations'](_0x1e9c54,_0x1acc91))this['_handleOperation'](_0x5d511f,_0x4ce31c);for(const _0x552096 of this['_diffRoots']['values']())_0x552096['markers']['clear']();for(const [_0x3b1752,_0x2c3f8c]of this['_markers']){this['_diffRoots']['get'](_0x2c3f8c['root']['rootName'])['markers']['set'](_0x3b1752,_0x2c3f8c['clone']());}const _0x447b8e=new Map(),_0x2d22e5=new Map();for(const [_0x51a721,_0x276fb8]of this['_diffRoots'])_0x447b8e['set'](_0x51a721,N(_0x276fb8)),_0x2d22e5['set'](_0x51a721,this['_diffRootsAttributes']['get'](_0x51a721));this['_saveMetaData'](_0x1acc91,_0x447b8e,this['_markers'],_0x2d22e5);}['_getPreviousFrom'](_0x5916c3){const _0xa92e29=Array['from'](this['_savedMetaData']['keys']());_0xa92e29['sort']((_0x533697,_0x112746)=>_0x533697-_0x112746),_0xa92e29['reverse']();for(const _0x3b8142 of _0xa92e29)if(_0x3b8142<_0x5916c3)return _0x3b8142;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x4f9af8,_0x5890bb){const _0x3ebb3b=Array['from'](_0x5890bb['markers'])['map'](([_0x39e606,_0x32b5a4])=>[_0x39e606,this['_fixRange'](_0x32b5a4,_0x4f9af8)]);_0x4f9af8['markers']=new Map(_0x3ebb3b);}['_transformMarkers'](_0x1fe74a){for(const _0x395f26 of this['_markers']['values']()){const _0x23f1d4=_0x395f26['getTransformedByOperation'](_0x1fe74a),_0x46c6ed=lt['_createFromRanges'](_0x23f1d4);_0x395f26['start']=_0x46c6ed['start'],_0x395f26['end']=_0x46c6ed['end'];}}['_handleOperation'](_0x72fe58,_0x5336e9){if('addRoot'!=_0x72fe58['type']&&'detachRoot'!=_0x72fe58['type']){if('insert'==_0x72fe58['type']){const _0x355f7c=_0x72fe58['position']['root']['rootName'];this['_diffRoots']['has'](_0x355f7c)||(this['_diffRoots']['set'](_0x355f7c,P(_0x355f7c,!0x0)),this['_diffRootsAttributes']['set'](_0x355f7c,{}),_0x5336e9&&this['_idsRoots']['set'](_0x355f7c,P(_0x355f7c,!0x0)));}else{if('addRootAttribute'==_0x72fe58['type']||'removeRootAttribute'==_0x72fe58['type']||'changeRootAttribute'==_0x72fe58['type'])return void this['_handleRootAttributeOperation'](_0x72fe58);'marker'==_0x72fe58['type']&&this['_handleMarkerOperation'](_0x72fe58);}if('marker'!==_0x72fe58['type']){const _0x42d37c=this['_cloneOperation'](_0x72fe58,this['_diffRoots']);_0x42d37c['_execute'](),this['_transformMarkers'](_0x42d37c);}if(_0x5336e9)switch(_0x72fe58['type']){case'insert':this['_handleInsertOperation'](_0x72fe58);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x72fe58);break;case'merge':this['_handleMergeOperation'](_0x72fe58);break;case'split':this['_handleSplitOperation'](_0x72fe58);}}else this['_handleRootOperation'](_0x72fe58,_0x5336e9);}['_cloneOperation'](_0x5984e0,_0x1f43e5){const _0x5eb09c=_0x5984e0['clone']();return _0x5eb09c['_authorId']=_0x5984e0['_authorId'],this['_fixOperation'](_0x5eb09c,_0x1f43e5),_0x5eb09c;}['_getBaseVids'](_0x2d9546){return _0x2d9546['map'](_0x5a39d7=>{const _0x1219dc=this['_getVidAttributeName'](_0x5a39d7);return Number(_0x5a39d7['item']['getAttribute'](_0x1219dc));});}['_generateTape'](_0x405088,_0xa82275){if(_0x405088['is']('element','$text'))_0xa82275['push']({'item':_0x405088,'type':'text'});else{_0x405088['is']('element')&&_0xa82275['push']({'item':_0x405088,'type':'elementStart'});for(const _0x253de9 of _0x405088['getChildren']())this['_generateTape'](_0x253de9,_0xa82275);_0x405088['is']('element')&&_0xa82275['push']({'item':_0x405088,'type':'elementEnd'});}return _0xa82275;}['_getState'](){const _0x541c41=new Map(this['_touched']),_0x4a4775=new Map(_0x541c41),_0x836c44=new Map(),_0x288274={'insertions':{},'deletions':{}},_0x893277={'insertions':{},'deletions':{}},_0x567027=new Map(),_0x270f1c=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x270f1c['delete']('$graveyard');for(const _0xd98808 of _0x270f1c){const _0x486d5b=this['_diffRoots']['get'](_0xd98808)||P(_0xd98808,!0x1),_0x1144be=this['_baseRoots']['get'](_0xd98808)||P(_0xd98808,!0x1);_0x486d5b['isAttached']()||_0x1144be['isAttached']()?(_0x288274['insertions'][_0xd98808]=N(_0x486d5b),_0x288274['deletions'][_0xd98808]=N(_0x1144be),this['_copyMarkers'](_0x288274['deletions'][_0xd98808],_0x1144be),this['_copyMarkers'](_0x288274['insertions'][_0xd98808],_0x486d5b),_0x893277['insertions'][_0xd98808]=this['_generateTape'](this['_idsRoots']['get'](_0xd98808),[]),_0x893277['deletions'][_0xd98808]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xd98808)||P(_0xd98808,!0x1),[])):_0x270f1c['delete'](_0xd98808);}for(const _0x381c29 of _0x270f1c){const _0x2bba56=_0x893277['insertions'][_0x381c29];for(const _0x2b5f95 of _0x2bba56){const _0x5f4937=this['_getVidAttributeName'](_0x2b5f95),_0x37b0dd=_0x2b5f95['item']['getAttribute'](_0x5f4937);_0x4a4775['delete'](_0x37b0dd),_0x37b0dd>=this['_startingRevisionId']&&_0x836c44['set'](_0x37b0dd,_0x541c41['get'](_0x37b0dd));}}for(const _0x263f2c of _0x270f1c){const _0x361d01=_0x893277['insertions'][_0x263f2c],_0x624cd6=this['_getBaseVids'](_0x893277['deletions'][_0x263f2c]);let _0x42d793=0x0;for(const _0x2de14f of _0x361d01){const _0x4bd427=this['_getVidAttributeName'](_0x2de14f),_0x1d49c9=_0x2de14f['item']['getAttribute'](_0x4bd427);if(!_0x836c44['has'](_0x1d49c9)&&!_0x567027['has'](_0x1d49c9)){if(_0x4a4775['has'](_0x1d49c9))_0x42d793++;else{if(_0x1d49c9!=_0x624cd6[_0x42d793]){const _0x2e1787=_0x541c41['get'](_0x1d49c9)||_0x541c41['get'](_0x624cd6[_0x42d793]);for(;_0x1d49c9!=_0x624cd6[_0x42d793];)_0x4a4775['has'](_0x624cd6[_0x42d793])||(_0x567027['set'](_0x624cd6[_0x42d793],_0x2e1787),_0x541c41['set'](_0x624cd6[_0x42d793],_0x2e1787)),_0x42d793++;}_0x42d793++;}}}}for(const _0x7e5597 of _0x270f1c){const _0x347805=_0x893277['insertions'][_0x7e5597];for(const _0x37b0a2 of _0x347805){const _0x4b278b=this['_getVidAttributeName'](_0x37b0a2),_0x96f09b=_0x37b0a2['item']['getAttribute'](_0x4b278b);if(_0x567027['has'](_0x96f09b)){const _0x925cba=_0x567027['get'](_0x96f09b);_0x4a4775['has'](_0x96f09b)||_0x4a4775['set'](_0x96f09b,{..._0x925cba}),_0x836c44['set'](_0x96f09b,{..._0x925cba});}}}for(const _0x5af716 of _0x4a4775['keys']())_0x5af716>=this['_startingRevisionId']&&_0x4a4775['delete'](_0x5af716);const _0x483176=new Map();for(const _0x2bdcb7 of _0x270f1c){let _0x43939a=_0x893277['insertions'][_0x2bdcb7];for(const _0x31aa1e of _0x43939a)if(_0x31aa1e['item']['is']('element','tableCell')){const _0xe3dcf7=this['_getVidAttributeName'](_0x31aa1e),_0x46da0c=_0x31aa1e['item']['getAttribute'](_0xe3dcf7);if(_0x836c44['has'](_0x46da0c)){const _0x53dc3d=_0x31aa1e['item']['parent']['parent']['getAttribute']('vid_start'),_0x2a5769=_0x483176['get'](_0x53dc3d)||new Set();_0x2a5769['add'](_0x836c44['get'](_0x46da0c)['userId']),_0x483176['set'](_0x53dc3d,_0x2a5769);}}_0x43939a=_0x893277['deletions'][_0x2bdcb7];for(const _0x3b4590 of _0x43939a)if(_0x3b4590['item']['is']('element','tableCell')){const _0x576d20=this['_getVidAttributeName'](_0x3b4590),_0x33a34f=_0x3b4590['item']['getAttribute'](_0x576d20);if(_0x4a4775['has'](_0x33a34f)){const _0x340f62=_0x3b4590['item']['parent']['parent']['getAttribute']('vid_start'),_0x397702=_0x483176['get'](_0x340f62)||new Set();_0x397702['add'](_0x4a4775['get'](_0x33a34f)['userId']),_0x483176['set'](_0x340f62,_0x397702);}}for(const _0x49d775 of _0x483176['keys']())(_0x836c44['has'](_0x49d775)||_0x4a4775['has'](_0x49d775))&&_0x483176['delete'](_0x49d775);}for(const _0x5eb6b9 of _0x270f1c){const _0x2708b4=_0x893277['insertions'][_0x5eb6b9];let _0x4ffc9=null,_0x1979c4=null;for(const _0x281f3b of _0x2708b4){const _0x5df425=this['_getVidAttributeName'](_0x281f3b),_0xa81e7=_0x281f3b['item']['getAttribute'](_0x5df425),_0x4c581e=_0x483176['get'](_0xa81e7);_0x4c581e&&'elementStart'==_0x281f3b['type']&&(_0x4ffc9=Array['from'](_0x4c581e)[0x0],_0x1979c4=_0x281f3b['item']['getAttribute']('vid_end')),_0x4ffc9&&(_0x4a4775['set'](_0xa81e7,{'userId':_0x4ffc9}),_0x836c44['set'](_0xa81e7,{'userId':_0x4ffc9})),_0xa81e7==_0x1979c4&&(_0x4ffc9=null,_0x1979c4=null);}}const _0x3148a0={},_0x24a220=new Set();for(const _0x5a48b2 of _0x270f1c){const _0x30ddc9=_0x288274['deletions'][_0x5a48b2],_0x4a834f=_0x288274['insertions'][_0x5a48b2];for(const {userId:_0x2367c8}of this['_touchedMarkers']['values']())null!==_0x2367c8&&_0x24a220['add'](_0x2367c8);for(const {userId:_0x28c147}of this['_touchedRoots']['values']())null!==_0x28c147&&_0x24a220['add'](_0x28c147);this['_markChanges'](_0x4a834f,_0x893277['insertions'][_0x5a48b2],_0x836c44,'insertion',_0x24a220),this['_markChanges'](_0x30ddc9,_0x893277['deletions'][_0x5a48b2],_0x4a4775,'deletion',_0x24a220),_0x3148a0[_0x5a48b2]={'insertions':this['_prepareViewToSave'](_0x4a834f),'deletions':this['_prepareViewToSave'](_0x30ddc9),'attachChange':this['_touchedRoots']['get'](_0x5a48b2)||null,'attributesBefore':_0x4b9982(this['_baseRootsAttributes']['get'](_0x5a48b2))||{},'attributesAfter':_0x4b9982(this['_diffRootsAttributes']['get'](_0x5a48b2))};}return{'diffData':_0x3148a0,'authorsIds':Array['from'](_0x24a220)};}['_processRootBeforeSave'](_0x321b45){for(const [,_0x153218]of _0x321b45['markers']){const _0x4596bd=_0x153218['start']['getAncestors']()['filter'](_0x40c023=>'tableCell'==_0x40c023['name']);for(const _0x31461d of _0x4596bd)0x1==_0x31461d['childCount']&&_0x31461d['getChild'](0x0)['is']('element','paragraph')&&_0x31461d['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x1e2e99){this['_processRootBeforeSave'](_0x1e2e99);const _0x4afd9d=this['editor']['data']['toView'](_0x1e2e99,{}),_0x1f73df=Array['from'](_0x4afd9d['getChildren']())['map'](_0x1001fa=>this['_getViewJson'](_0x1001fa));return JSON['stringify'](_0x1f73df);}['_getViewJson'](_0x2b767f){if(_0x2b767f['is']('$text'))return _0x2b767f['data'];{const _0x28b75f=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x6480de=_0x2b767f,_0x401ad1=this['editor']['data']['htmlProcessor']['domConverter'],_0x59bfcd={'type':_0x28b75f['_getTypeCharForViewElement'](_0x6480de),'name':_0x6480de['name'],'attributes':Array['from'](_0x6480de['getAttributes']()),'children':Array['from'](_0x6480de['getChildren']())['map'](_0x59a1c3=>this['_getViewJson'](_0x59a1c3))};if(_0x2b767f['is']('uiElement')&&'$comment'!=_0x2b767f['name']){const _0xff6525=_0x2b767f['render'](_0x401ad1['domDocument'],_0x401ad1);_0x59bfcd['children']['push'](_0xff6525['outerHTML']);}else{if(_0x2b767f['is']('rawElement')){const _0x29524f=_0x401ad1['domDocument']['createElement'](_0x6480de['name']);_0x2b767f['render'](_0x29524f,_0x401ad1),_0x59bfcd['children']['push'](_0x29524f['innerHTML']);}}const _0x15cbd0=Array['from'](_0x6480de['getCustomProperties']());_0x15cbd0['length']>0x0&&(_0x59bfcd['customProperties']=_0x15cbd0);const _0x25eb3c=_0x6480de['getFillerOffset']();return null!==_0x25eb3c&&(_0x59bfcd['fillerOffset']=_0x25eb3c),_0x59bfcd;}}['_markChanges'](_0x54eab2,_0x1eeff2,_0x23e2ab,_0x4bbe52,_0x370ddd){let _0xa4e330=null,_0x257f26=null,_0x342a1f=0x0;const _0x5aa9a9=this['editor']['model'];for(let _0x2eb448=0x0;_0x2eb448<_0x1eeff2['length'];_0x2eb448++){const _0x5ba262=this['_getVidAttributeName'](_0x1eeff2[_0x2eb448]),_0x210a74=_0x1eeff2[_0x2eb448]['item']['getAttribute'](_0x5ba262),_0x372ab4=_0x23e2ab['get'](_0x210a74),_0x3a0d10=_0x2eb448==_0x1eeff2['length']-0x1;(!_0xa4e330&&_0x372ab4&&(_0xa4e330=_0x372ab4,_0x257f26=_0x1eeff2[_0x2eb448]),_0xa4e330&&(!_0x372ab4||_0x372ab4['userId']!=_0xa4e330['userId']))&&(_0x598351(_0x372ab4,F(_0x257f26,_0x54eab2,_0x5aa9a9),F(_0x1eeff2[_0x2eb448],_0x54eab2,_0x5aa9a9)),_0xa4e330=_0x372ab4||null,_0x257f26=_0x372ab4?_0x1eeff2[_0x2eb448]:null),_0xa4e330&&_0x3a0d10&&_0x598351(_0x372ab4,F(_0x257f26,_0x54eab2,_0x5aa9a9),B(_0x1eeff2[_0x2eb448],_0x54eab2,_0x5aa9a9));}function _0x598351(_0xc7ddc9,_0x2c118a,_0x44f24f){const _0x26b632=_0xa4e330['userId'],_0x39863b='revision:'+_0x4bbe52+':'+_0x26b632+':'+_0x342a1f++,_0x57bae3=_0x5aa9a9['createRange'](_0x2c118a,_0x44f24f);_0x54eab2['markers']['set'](_0x39863b,_0x57bae3),null!==_0x26b632&&_0x370ddd['add'](_0x26b632);}}['_getVidAttributeName'](_0x1d2c20){switch(_0x1d2c20['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x13e630,_0x3dcccf){_0x13e630['baseVersion']=null;for(const _0x1ce231 in _0x13e630){const _0x1dbf64=_0x13e630[_0x1ce231];if(_0x1dbf64 instanceof ft){const _0x2c7787=_0x3dcccf['get'](_0x1dbf64['root']['rootName']);_0x13e630[_0x1ce231]=this['_fixPosition'](_0x1dbf64,_0x2c7787);}if(_0x1dbf64 instanceof lt){const _0x436c6e=_0x3dcccf['get'](_0x1dbf64['root']['rootName']);_0x13e630[_0x1ce231]=this['_fixRange'](_0x1dbf64,_0x436c6e);}'root'===_0x1ce231&&(_0x13e630['root']=_0x3dcccf['get'](_0x13e630['root']['rootName']));}}['_fixRange'](_0x59bf17,_0x23db2a){return this['editor']['model']['createRange'](this['_fixPosition'](_0x59bf17['start'],_0x23db2a),this['_fixPosition'](_0x59bf17['end'],_0x23db2a));}['_fixPosition'](_0x2c05e9,_0x1f6ff8){return this['editor']['model']['createPositionFromPath'](_0x1f6ff8,_0x2c05e9['path'],_0x2c05e9['stickiness']);}['_handleInsertOperation'](_0x1938d7){const _0x2ebf28=this['_idsRoots']['get'](_0x1938d7['position']['root']['rootName']),_0x12d391=this['_fixPosition'](_0x1938d7['position'],_0x2ebf28),_0x4d0265=null===_0x1938d7['_authorId']?null:_0x1938d7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x25c6bf=_0x12d391['parent'],_0x574727=this['_revisionId'],_0x2826ce=[];for(const _0x5de9ae of _0x1938d7['nodes'])if(_0x5de9ae['is']('element'))_0x2826ce['push'](this['_makeIdsRoot'](_0x5de9ae));else{for(let _0x10d818=0x0;_0x10d818<_0x5de9ae['offsetSize'];_0x10d818++)_0x2826ce['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x10a347=this['_revisionId'];for(let _0x204050=_0x574727;_0x204050<_0x10a347;_0x204050++)this['_touched']['set'](_0x204050,{'userId':_0x4d0265});_0x25c6bf['_insertChild'](_0x12d391['offset'],_0x2826ce);}['_handleMoveOperation'](_0x479742){(_0x479742=this['_cloneOperation'](_0x479742,this['_idsRoots']))['_execute']();const _0x4f5914=null===_0x479742['_authorId']?null:_0x479742['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3607a4=_0x479742['getMovedRangeStart'](),_0x12ff3f=_0x3607a4['parent'],_0x143c8e=_0x3607a4['offset'];!function _0x448f62(_0x36a51c,_0x336179,_0xb26d21,_0x20ad7a){for(let _0x25e826=_0xb26d21;_0x25e826<_0x20ad7a;_0x25e826++){const _0x57e2b0=_0x336179['getChild'](_0x25e826);_0x57e2b0['is']('element','$text')?_0x36a51c['set'](_0x57e2b0['getAttribute']('vid'),{'userId':_0x4f5914}):(_0x36a51c['set'](_0x57e2b0['getAttribute']('vid_start'),{'userId':_0x4f5914}),_0x448f62(_0x36a51c,_0x57e2b0,0x0,_0x57e2b0['childCount']),_0x36a51c['set'](_0x57e2b0['getAttribute']('vid_end'),{'userId':_0x4f5914}));}}(this['_touched'],_0x12ff3f,_0x143c8e,_0x143c8e+_0x479742['howMany']);}['_handleMergeOperation'](_0x2350c4){const _0x3b3f35=null===(_0x2350c4=this['_cloneOperation'](_0x2350c4,this['_idsRoots']))['_authorId']?null:_0x2350c4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5aafb7=_0x2350c4['targetPosition']['parent'],_0x52497c=_0x2350c4['sourcePosition']['parent'],_0x274711=_0x5aafb7['getAttribute']('vid_end'),_0x5cd300=_0x52497c['getAttribute']('vid_start');_0x5aafb7['_setAttribute']('vid_end',_0x52497c['getAttribute']('vid_end')),_0x52497c['_setAttribute']('vid_end',_0x274711),this['_touched']['set'](_0x5cd300,{'userId':_0x3b3f35}),this['_touched']['set'](_0x274711,{'userId':_0x3b3f35}),_0x2350c4['_execute']();}['_handleSplitOperation'](_0x10b6f6){const _0x594b79=null===(_0x10b6f6=this['_cloneOperation'](_0x10b6f6,this['_idsRoots']))['_authorId']?null:_0x10b6f6['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xf189e4=_0x10b6f6['graveyardPosition'],_0x170fb3=_0x10b6f6['splitPosition']['parent'];_0x10b6f6['_execute']();const _0x27d62d=_0x170fb3['getAttribute']('vid_end'),_0x2474f4=_0x10b6f6['insertionPosition']['nodeAfter'];if(_0xf189e4){const _0x300252=_0x2474f4['getAttribute']('vid_end'),_0x4f3aa3=_0x170fb3['getAttribute']('vid_end');_0x170fb3['_setAttribute']('vid_end',_0x300252),_0x2474f4['_setAttribute']('vid_end',_0x4f3aa3),this['_touched']['set'](_0x170fb3['getAttribute']('vid_end'),{'userId':_0x594b79}),this['_touched']['set'](_0x2474f4['getAttribute']('vid_start'),{'userId':_0x594b79});}else{const _0x415c16=this['_revisionId']++,_0x3be960=this['_revisionId']++;_0x170fb3['_setAttribute']('vid_end',_0x415c16),_0x2474f4['_setAttribute']('vid_start',_0x3be960),_0x2474f4['_setAttribute']('vid_end',_0x27d62d),this['_touched']['set'](_0x415c16,{'userId':_0x594b79}),this['_touched']['set'](_0x3be960,{'userId':_0x594b79});}}['_handleMarkerOperation'](_0x159273){if(!_0x159273['affectsData'])return;const _0x28e833=(_0x159273=this['_cloneOperation'](_0x159273,this['_diffRoots']))['oldRange']?_0x159273['oldRange']['root']:null,_0x1b3c57=_0x159273['newRange']?_0x159273['newRange']['root']:null;_0x28e833&&this['_markers']['delete'](_0x159273['name']),_0x1b3c57&&this['_markers']['set'](_0x159273['name'],_0x159273['newRange']['clone']());const _0x56605e=null===_0x159273['_authorId']?null:_0x159273['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x6aa68=_0x159273['name'];if(!this['_touchedMarkers']['has'](_0x6aa68))return void this['_touchedMarkers']['set'](_0x6aa68,{'range':_0x159273['oldRange'],'userId':_0x56605e});const _0x1790b1=this['_touchedMarkers']['get'](_0x6aa68),_0x280fe1=_0x1790b1['range'],_0x100bd4=_0x159273['newRange'];null==_0x280fe1&&null==_0x100bd4||_0x280fe1&&_0x100bd4&&_0x280fe1['isEqual'](_0x100bd4)?this['_touchedMarkers']['delete'](_0x159273['name']):_0x1790b1['userId']=_0x56605e;}['_handleRootOperation'](_0x1e608d,_0x2139ea){this['_diffRoots']['has'](_0x1e608d['rootName'])?this['_diffRoots']['get'](_0x1e608d['rootName'])['_isAttached']=_0x1e608d['isAdd']:(this['_diffRoots']['set'](_0x1e608d['rootName'],P(_0x1e608d['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x1e608d['rootName'],{}),_0x2139ea&&this['_idsRoots']['set'](_0x1e608d['rootName'],P(_0x1e608d['rootName'],!0x0)));const _0x1760f0=null===_0x1e608d['_authorId']?null:_0x1e608d['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1ce795=this['_touchedRoots']['get'](_0x1e608d['rootName']);_0x1ce795&&_0x1ce795['userId']===_0x1760f0?this['_touchedRoots']['delete'](_0x1e608d['rootName']):this['_touchedRoots']['set'](_0x1e608d['rootName'],{'userId':_0x1760f0,'isAttached':_0x1e608d['isAdd']});}['_handleRootAttributeOperation'](_0xc8fc0e){const _0x258f13=this['_diffRootsAttributes']['get'](_0xc8fc0e['root']['rootName']);null===_0xc8fc0e['newValue']?delete _0x258f13[_0xc8fc0e['key']]:_0x258f13[_0xc8fc0e['key']]=_0xc8fc0e['newValue'];}}function N(_0x5629cd){const _0x357a91=P(_0x5629cd['rootName'],_0x5629cd['isAttached']());for(const _0x229f37 of _0x5629cd['getChildren']()){const _0x4fa1ea=_0x229f37['_clone'](!0x0);_0x357a91['_appendChild'](_0x4fa1ea);}return _0x357a91;}function P(_0x15edd8,_0x1fe964=!0x0){const _0x3757e6=new vt();return _0x3757e6['rootName']=_0x15edd8,_0x3757e6['_isAttached']=_0x1fe964,_0x3757e6['isAttached']=()=>_0x3757e6['_isAttached'],_0x3757e6;}function F(_0x5e9e12,_0x4a917c,_0xc2f32a){const _0x277e3a='elementEnd'==_0x5e9e12['type']?_0xc2f32a['createPositionAt'](_0x5e9e12['item'],'end'):_0xc2f32a['createPositionBefore'](_0x5e9e12['item']);return _0xc2f32a['createPositionFromPath'](_0x4a917c,_0x277e3a['path'],_0x277e3a['stickiness']);}function B(_0x73f3a7,_0x21d7f0,_0x997f1e){const _0x49d1e3='elementStart'==_0x73f3a7['type']?_0x997f1e['createPositionAt'](_0x73f3a7['item'],0x0):_0x997f1e['createPositionAfter'](_0x73f3a7['item']);return _0x997f1e['createPositionFromPath'](_0x21d7f0,_0x49d1e3['path'],_0x49d1e3['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5884e6,_0x3890e1){super(_0x5884e6),this['focusTracker']=new _0x3a6bd7(),this['keystrokes']=new _0x11948c(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x3890e1),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x30703e(this);}['render'](){super['render'](),_0x4274eb({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x4b9125=_0x50e657=>_0x50e657['stopPropagation']();this['keystrokes']['set']('arrowright',_0x4b9125),this['keystrokes']['set']('arrowleft',_0x4b9125),this['keystrokes']['set']('arrowup',_0x4b9125),this['keystrokes']['set']('arrowdown',_0x4b9125);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x39529b){this['revisionNameInputView']['fieldView']['element']['value']=_0x39529b['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x5b14ae){const _0x41152c=new _0x5da75d(this['locale'],_0x569563),_0x5a565c=_0x41152c['fieldView'];_0x5a565c['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x1bcdd1=g(this['locale'],'Name\x20of\x20the\x20revision');return!_0x5b14ae&&(_0x1bcdd1+='\x20('+g(this['locale'],'optional')+')'),(_0x41152c['label']=_0x1bcdd1,_0x5a565c['on']('input',()=>{this['revisionNameInputValue']=_0x5a565c['element']['value']['trim']();}),_0x41152c);}}class f extends _0x1f29e4{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x40d7b4=this['editor'],_0x1797b9=_0x40d7b4['plugins']['get']('RevisionTracker');_0x40d7b4['ui']['componentFactory']['add']('revisionHistory',_0x458c23=>{const _0x4b283a=_0x3cadb2(_0x458c23),_0x56b18c=_0x4b283a['panelView']['children'],_0x2aa218=new _0x5da27a(_0x458c23),_0x4dbaef=new _0x42c1bd(_0x458c23),_0x38439a=new te(_0x458c23),_0x4dbc06=new _0x42c1bd(_0x458c23),_0x333742=new te(_0x458c23);return _0x4b283a['bind']('isEnabled')['to'](_0x1797b9,'isReady',_0x1797b9,'isEnabled',_0x40d7b4,'isReadOnly',(_0x367404,_0x57be31,_0x7f6e4c)=>_0x367404&&_0x57be31&&!_0x7f6e4c),_0x4b283a['buttonView']['set']({'icon':_0x464ed9,'label':g(_0x458c23,'Revision\x20history'),'tooltip':!0x0}),_0x38439a['set']({'label':g(_0x458c23,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x38439a['bind']('isEnabled')['to'](_0x1797b9,'isReady',_0x1797b9,'isEnabled',_0x40d7b4,'isReadOnly',(_0x179ae6,_0x3e9049,_0x2e7cc2)=>_0x179ae6&&_0x3e9049&&!_0x2e7cc2),_0x38439a['on']('execute',()=>this['_showDialog']()),_0x333742['set']({'label':g(_0x458c23,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x333742['bind']('isEnabled')['to'](_0x1797b9,'isReady',_0x40d7b4,'isReadOnly',(_0xe778d1,_0x275e84)=>_0xe778d1&&!_0x275e84),_0x333742['on']('execute',()=>{_0x40d7b4['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x4b283a['isOpen']=!0x1,_0x40d7b4['editing']['view']['focus']();}),_0x4dbaef['children']['add'](_0x38439a),_0x4dbc06['children']['add'](_0x333742),_0x2aa218['role']='menu',_0x2aa218['items']['addMany']([_0x4dbaef,_0x4dbc06]),_0x56b18c['add'](_0x2aa218),_0x4b283a;}),_0x40d7b4['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x5d958=this['editor'],_0x308091=_0x5d958['locale'],_0x36806a=new _0x1d07e5(_0x308091),_0x52c799=new _0x32c052(_0x308091);_0x36806a['buttonView']['set']({'icon':_0x464ed9,'label':g(_0x308091,'Revision\x20history')});const _0x34d9eb=new _0x2c8bf5(_0x308091,_0x36806a),_0x242221=new _0x5197bc(_0x308091);_0x242221['set']({'label':g(_0x308091,'Save\x20current\x20revision')}),_0x242221['delegate']('execute')['to'](_0x36806a),_0x242221['on']('execute',()=>{this['_showDialog']();}),_0x34d9eb['children']['add'](_0x242221),_0x52c799['items']['add'](_0x34d9eb);const _0x14e8d6=new _0x2c8bf5(_0x308091,_0x36806a),_0x1357f2=new _0x5197bc(_0x308091);return _0x1357f2['set']({'label':g(_0x308091,'Open\x20revision\x20history')}),_0x1357f2['delegate']('execute')['to'](_0x36806a),_0x1357f2['on']('execute',()=>{_0x5d958['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x14e8d6['children']['add'](_0x1357f2),_0x52c799['items']['add'](_0x14e8d6),_0x36806a['panelView']['children']['add'](_0x52c799),_0x36806a;}['_showDialog'](){const _0x3982aa=this['editor'],_0x5095f7=_0x3982aa['locale'],_0x30f5b4=_0x3982aa['plugins']['get']('Dialog'),_0x13dedb=_0x3982aa['plugins']['get']('RevisionTracker');function _0x6eb3c1(_0x2b5114){_0x3982aa['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2b5114['revisionName']?_0x2b5114['revisionNameInputView']['errorText']=g(_0x5095f7,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x3982aa['plugins']['get'](u)['saveRevision']({'name':_0x2b5114['revisionName']}),_0x30f5b4['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x6eb3c1(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x30f5b4['show']({'id':'revisionSave','title':g(_0x5095f7,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':g(_0x3982aa['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x30f5b4['hide']()},{'label':g(_0x3982aa['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4630ee){_0x4630ee['bind']('isEnabled')['to'](_0x13dedb,'isReady',_0x13dedb,'isEnabled',_0x3982aa,'isReadOnly',(_0x7e590f,_0x730c2e,_0x47bc75)=>_0x7e590f&&_0x730c2e&&!_0x47bc75);},'onExecute':()=>_0x6eb3c1(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x13c6d9=this['editor'],_0xd0638a=_0x13c6d9['locale'];this['_saveRevisionFormView']=new hs(_0xd0638a,_0x13c6d9['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class Q extends ts{['changeId'];['_model'];constructor(_0x5e5114,_0x298eca){super(_0x5e5114),this['_model']=_0x298eca,this['changeId']=_0x298eca['id'];const _0x55e28f=this['bindTemplate'],_0x1d7649=g(_0x5e5114,_0x298eca['data']['isSuggestion']?'Suggested\x20by':'add'==_0x298eca['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x298eca['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x55e28f['to']('type',_0x5d9d2f=>'ck-revision-change__'+_0x5d9d2f)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x1d7649}]},{'text':'\x20'+_0x298eca['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
+ _0x5a1659(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x21d0bf){super(),this['id']=_0x21d0bf['id']||_0x28066b(),this['author']=_0x21d0bf['author'],this['type']=_0x21d0bf['type'],this['data']=_0x21d0bf['data']||{},this['rootName']=_0x21d0bf['rootName'],this['set']('createdAt',_0x21d0bf['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(_0x2e7016,_0xcd8f79){this['newRevisionId']=_0x2e7016,this['oldRevisionId']=_0xcd8f79,this['changes']=new _0x5542df();}['_setChanges'](_0x565c25){for(const _0x3f3d10 of _0x565c25)this['changes']['add'](_0x3f3d10);}}class m extends _0x1f29e4{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x3eebe5,_0x4d2985,I,V];}constructor(_0x274d0b){super(_0x274d0b),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),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',(_0x3d7b6a,_0x400f20,_0x272e90)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x34bb01=>{for(const _0x1b6fde of this['editor']['editing']['view']['document']['roots'])_0x272e90?_0x34bb01['removeClass']('ck-editor__editable__overlay',_0x1b6fde):_0x34bb01['addClass']('ck-editor__editable__overlay',_0x1b6fde);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x107f8d=>null!==_0x107f8d),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3b1f82,_0x170136,_0x127727)=>_0x3b1f82&&_0x127727?_0x170136['changes']['getIndex'](_0x127727):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3a498e,_0x42043e)=>_0x3a498e?_0x42043e['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x4d2985);}['init'](){const _0x1a9153=this['editor'],_0x2742aa=new wt(_0x1a9153,{'direction':'backward'}),_0x24081d=new wt(_0x1a9153,{'direction':'forward'});(_0x1a9153['commands']['add']('showPreviousChange',_0x2742aa),_0x1a9153['commands']['add']('showNextChange',_0x24081d),_0x1a9153['commands']['add']('restoreRevision',new mt(_0x1a9153)),this['on']('change:numberOfChanges',()=>{_0x2742aa['refresh'](),_0x24081d['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1a9153['enableReadOnlyMode']('revision-viewer'),_0x1a9153['plugins']['has']('WidgetToolbarRepository'))&&_0x1a9153['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x18fd71){return await this['_utils']['loadRevisionData'](_0x18fd71,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x18fd71);}async['getRevisionRootsAttributes'](_0x4e8991){return await this['_utils']['loadRevisionData'](_0x4e8991,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x4e8991);}async['compare'](_0x279766,_0x256ccf,_0x3e4494=!0x1){if(!this['isEnabled'])return;const _0x3e406e=this['diff'],_0x1b309c=this['repository'],_0x1e0df4='string'==typeof _0x279766?_0x1b309c['getRevision'](_0x279766):_0x279766,_0xcc649a='string'==typeof _0x256ccf?_0x1b309c['getRevision'](_0x256ccf):_0x256ccf,_0x9e6510=_0x1e0df4['id'],_0x46e20d=_0xcc649a?_0xcc649a['id']:null;if(!_0x3e4494&&this['diff']&&this['diff']['newRevisionId']===_0x9e6510&&this['diff']['oldRevisionId']===_0x46e20d)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x9e6510,_0x46e20d);const _0x2b6e6e=this['_getRevisionsRange'](_0x1e0df4,_0xcc649a,!0x0)['map'](_0x43854d=>this['_utils']['loadRevisionData'](_0x43854d,this['adapter']));return _0x2b6e6e['push'](new Promise(_0x17fcaf=>{setTimeout(_0x17fcaf,0x14);})),Promise['all'](_0x2b6e6e)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1a7045=this['_getDiff'](_0x9e6510,_0x46e20d);for(const _0x3e04a3 of _0x1a7045['changes'])this['_changeIdToChange']['set'](_0x3e04a3['id'],_0x3e04a3);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xc20bf0=>{for(const _0x510a6e of this['editor']['model']['document']['getRootNames']())_0xc20bf0['detachRoot'](_0x510a6e);for(const _0x4d29d6 of Object['keys'](_0x1a7045['model'])){const _0x398d12=_0xc20bf0['addRoot'](_0x4d29d6);for(const _0x212f85 of Object['keys'](_0x1a7045['attributes'][_0x4d29d6]))_0xc20bf0['setAttribute'](_0x212f85,_0x1a7045['attributes'][_0x4d29d6][_0x212f85],_0x398d12);_0xc20bf0['insert'](_0x1a7045['model'][_0x4d29d6],_0x398d12,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1a7045['changes'])),this['isReady']=!0x0;})['catch'](_0x52dd03=>{console['error'](_0x52dd03),this['_cleanUp'](),_0x3e406e&&(this['diff']=_0x3e406e),this['isReady']=!0x0;});}['addRevisionData'](_0x4e41d9,_0x57f50d){const _0x21ab2a=this['repository']['createRevision'](_0x4e41d9);return _0x21ab2a['on']('_update',(_0x590ef3,_0xc12d13,_0x4308e3)=>_0x57f50d(_0xc12d13,_0x4308e3,_0x21ab2a)),this['repository']['addRevision'](_0x21ab2a),_0x21ab2a;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x15c5b9=>{for(const _0x143089 of this['editor']['model']['document']['getRootNames']())_0x15c5b9['detachRoot'](_0x143089);});}['_sortAndFilterDiffChanges'](_0x25b708){const _0x2600a3=[],_0x5995ee=new Map();for(const _0x3d45a7 of this['editor']['model']['document']['getRootNames']()){const _0x54ea9b=this['editor']['editing']['view']['getDomRoot'](_0x3d45a7);if(!_0x54ea9b)continue;const _0x423666=_0x54ea9b['getClientRects']()['item'](0x0);_0x423666&&(_0x2600a3['push'](_0x3d45a7),_0x5995ee['set'](_0x3d45a7,_0x423666));}return _0x2600a3['sort']((_0x5150ce,_0x145375)=>{const _0x1c5c69=_0x5995ee['get'](_0x5150ce),_0x3e5fe4=_0x5995ee['get'](_0x145375);return _0x1c5c69['y']-_0x3e5fe4['y']||_0x1c5c69['x']-_0x3e5fe4['x'];}),(_0x25b708=_0x25b708['filter'](_0x106138=>_0x2600a3['includes'](_0x106138['rootName'])))['sort']((_0x58ed20,_0x3e133b)=>_0x2600a3['indexOf'](_0x58ed20['rootName'])-_0x2600a3['indexOf'](_0x3e133b['rootName'])),_0x25b708;}['_makeTape'](_0x229a19){const _0x58bc4c=Array['from'](_0x229a19['markers'])['filter'](([_0x437e39,_0x46e3b7])=>_0x437e39['startsWith']('revision:')&&!_0x46e3b7['isCollapsed']),_0x2f9a27=Array['from'](this['editor']['model']['createRangeIn'](_0x229a19)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x58bc4c['length'])for(const _0x517ba9 of _0x2f9a27){const [_0x9d3042,_0xad8a4]=_0x58bc4c[0x0],[,_0x3d196e,_0x112ce1]=_0x9d3042['split'](':');if(_0xad8a4['end']['isEqual'](_0x517ba9['nextPosition'])&&_0x58bc4c['shift'](),(_0x517ba9['previousPosition']['isEqual'](_0xad8a4['start'])||_0x517ba9['previousPosition']['isAfter'](_0xad8a4['start']))&&('insertion'==_0x3d196e?_0x517ba9['isAdded']={'userId':_0x112ce1}:'deletion'==_0x3d196e&&(_0x517ba9['isRemoved']={'userId':_0x112ce1})),0x0==_0x58bc4c['length'])break;}return _0x2f9a27;}['_refreshStartEndIndex'](_0x3dd44d){const _0x5b217b=new Map();for(let _0x2ca751=0x0;_0x2ca751<_0x3dd44d['length'];_0x2ca751++)'text'===_0x3dd44d[_0x2ca751]['type']?(_0x3dd44d[_0x2ca751]['item']['startIndex']=_0x2ca751,_0x3dd44d[_0x2ca751]['item']['endIndex']=_0x2ca751):('elementStart'===_0x3dd44d[_0x2ca751]['type']?_0x3dd44d[_0x2ca751]['item']['startIndex']=_0x2ca751:'elementEnd'===_0x3dd44d[_0x2ca751]['type']&&(_0x3dd44d[_0x2ca751]['item']['endIndex']=_0x2ca751),_0x5b217b['set'](_0x3dd44d[_0x2ca751]['id'],_0x2ca751));for(const _0x24c8a1 of _0x5b217b['values']())'elementStart'===_0x3dd44d[_0x24c8a1]['type']?_0x3dd44d[_0x24c8a1]['item']['endIndex']=_0x5b217b['get'](_0x3dd44d[_0x24c8a1]['pairId']):'elementEnd'===_0x3dd44d[_0x24c8a1]['type']&&(_0x3dd44d[_0x24c8a1]['item']['startIndex']=_0x5b217b['get'](_0x3dd44d[_0x24c8a1]['pairId']));}['_processTape'](_0x12ee2a){for(let _0x24d2ea=0x0;_0x24d2ea<_0x12ee2a['length'];_0x24d2ea++){if('elementStart'===_0x12ee2a[_0x24d2ea]['type'])_0x12ee2a[_0x24d2ea]['item']['startIndex']=_0x24d2ea;else{if('elementEnd'===_0x12ee2a[_0x24d2ea]['type']){_0x12ee2a[_0x24d2ea]['item']['endIndex']=_0x24d2ea;const _0x10d40c=_0x12ee2a[_0x24d2ea]['item']['startIndex'];_0x12ee2a[_0x10d40c]['pairId']=_0x12ee2a[_0x24d2ea]['id'],_0x12ee2a[_0x24d2ea]['pairId']=_0x12ee2a[_0x10d40c]['id'];}else _0x12ee2a[_0x24d2ea]['item']['startIndex']=_0x24d2ea,_0x12ee2a[_0x24d2ea]['item']['endIndex']=_0x24d2ea,_0x12ee2a[_0x24d2ea]['pairId']=null;}_0x12ee2a[_0x24d2ea]['markersStart']||(_0x12ee2a[_0x24d2ea]['markersStart']=[],_0x12ee2a[_0x24d2ea]['markersEnd']=[]);}}['_markInsertions'](_0x3a3aef,_0x5628bf){const _0x2938b9=_0x3a3aef['filter'](_0x51a41e=>!_0x51a41e['isAdded']);for(let _0x39fa86=0x0;_0x39fa86<_0x5628bf['length'];_0x39fa86++)_0x5628bf[_0x39fa86]['isAdded']&&(_0x2938b9[_0x39fa86]['isAdded']=_0x5628bf[_0x39fa86]['isAdded']);}['_getDiff'](_0x2b1b08,_0x457843=null){const _0x2c3ce5=this['repository']['getRevision'](_0x2b1b08),_0x369d33=_0x457843?this['repository']['getRevision'](_0x457843):null,_0x1225fd=this['_getRevisionsRange'](_0x2c3ce5,_0x369d33),_0x2c1235=_0x1225fd[_0x1225fd['length']-0x1],_0x5e3b77=new Map(),_0x2aa7f3={'model':{},'attributes':{},'changes':[]},_0x31e3af=new Set(),_0x52d95f=new Map();for(let _0x19fa45=_0x1225fd['length']-0x1;_0x19fa45>=0x0;_0x19fa45--){const _0x572e31=_0x1225fd[_0x19fa45];for(const _0x39ba64 of Object['keys'](_0x572e31['diffData']))if(_0x572e31['diffData'][_0x39ba64]['attachChange']){const _0x479c74=_0x572e31['diffData'][_0x39ba64]['attachChange'];_0x479c74['isAttached']?(_0x31e3af['add'](_0x39ba64),_0x52d95f['has'](_0x39ba64)&&_0x52d95f['get'](_0x39ba64)['userId']==_0x479c74['userId']?_0x52d95f['delete'](_0x39ba64):_0x52d95f['set'](_0x39ba64,_0x479c74)):_0x52d95f['has'](_0x39ba64)?(_0x31e3af['delete'](_0x39ba64),_0x52d95f['delete'](_0x39ba64)):(_0x31e3af['add'](_0x39ba64),_0x52d95f['set'](_0x39ba64,_0x479c74));}else _0x31e3af['add'](_0x39ba64);}for(const _0x1874b8 of _0x31e3af){const _0xecb111=_0x52d95f['has'](_0x1874b8)&&!_0x52d95f['get'](_0x1874b8)['isAttached'];let _0xb9d93c=_0xecb111?_0x1225fd['length']-0x1:0x0;const _0x88861a=_0xecb111?-0x1:0x1;for(;_0x1225fd[_0xb9d93c];){const _0x6a6e98=_0x1225fd[_0xb9d93c];if(_0x6a6e98['diffData'][_0x1874b8]){const _0x52906f=_0xecb111?_0x6a6e98['diffData'][_0x1874b8]['attributesBefore']:_0x6a6e98['diffData'][_0x1874b8]['attributesAfter'];_0x2aa7f3['attributes'][_0x1874b8]=_0x52906f?_0x4b9982(_0x52906f):{};break;}_0xb9d93c+=_0x88861a;}}for(const _0x5a9216 of _0x1225fd){_0x5a9216['model']={};for(const _0x32d0ab of _0x5a9216['authors'])_0x5e3b77['set'](_0x32d0ab['id'],_0x32d0ab);for(const _0x4a37d6 of _0x31e3af){const _0x1551a9=_0x5a9216['diffData'][_0x4a37d6]?_0x5a9216['diffData'][_0x4a37d6]['insertions']:'[]',_0x5e9cb7=_0x5a9216['diffData'][_0x4a37d6]?_0x5a9216['diffData'][_0x4a37d6]['deletions']:'[]';_0x5a9216['model'][_0x4a37d6]={'insertions':this['_utils']['_makeModelFromViewString'](_0x1551a9),'deletions':this['_utils']['_makeModelFromViewString'](_0x5e9cb7)};}}for(const _0x3e8ab4 of _0x31e3af){let _0x253feb=null,_0x5207f4=0x0;const _0x408147=new Map(Array['from'](_0x2c3ce5['model'][_0x3e8ab4]['insertions']['markers'])['filter'](([_0x2e0e8d])=>!_0x2e0e8d['startsWith']('revision:')));let _0x3c7f8d=0x0;for(const _0x8f58b5 of _0x1225fd){const _0x20484a=this['_makeTape'](_0x8f58b5['model'][_0x3e8ab4]['insertions']);_0x8f58b5==_0x2c3ce5?(_0x253feb=_0x20484a,_0x5207f4=_0x253feb['length'],_0x253feb['forEach'](_0x2d3d1e=>{_0x2d3d1e['id']=_0x3c7f8d++;}),this['_processTape'](_0x253feb)):this['_markInsertions'](_0x253feb,_0x20484a);const _0x55ac54=_0x253feb['filter'](_0x11dec2=>!_0x11dec2['isAdded'])['map'](_0xafd148=>_0xafd148['id']);let _0x1037d2=0x0;const _0x5a4461=this['_makeTape'](_0x8f58b5['model'][_0x3e8ab4]['deletions']);_0x5a4461['forEach'](_0x529440=>{_0x529440['isRemoved']?_0x529440['id']=_0x5207f4++:_0x529440['id']=_0x55ac54[_0x1037d2++];}),this['_processTape'](_0x5a4461),this['_setDistance'](_0x253feb,'isAdded'),this['_setDistance'](_0x5a4461,'isRemoved'),_0x8f58b5==_0x2c3ce5&&this['_markMarkers'](_0x253feb,_0x408147),_0x253feb=this['_joinTapes'](_0x253feb,_0x5a4461),this['_refreshStartEndIndex'](_0x253feb),this['_setDistance'](_0x253feb,'isRemoved');}_0x253feb=_0x253feb['filter'](_0x1b9fd2=>!(_0x1b9fd2['isAdded']&&_0x1b9fd2['isRemoved']));const _0x45a62d=new Map(_0x2c1235['model'][_0x3e8ab4]['deletions']['markers']),_0x2758d8=new Set(_0x408147['keys']());for(const _0x526146 of _0x45a62d['keys']())_0x2758d8['delete'](_0x526146);this['_markSuggestions'](_0x253feb,_0x2758d8),this['_fixObsoleteTags'](_0x253feb),_0x253feb=this['_removeMissingPairs'](_0x253feb),_0x253feb=this['_markMismatchedRemovedTags'](_0x253feb),_0x253feb=this['_removeUnsupportedChanges'](_0x253feb);const {root:_0x7e457c,changes:_0x557d8f}=this['_makeModelFromTape'](_0x253feb,_0x5e3b77,_0x3e8ab4);_0x2aa7f3['model'][_0x3e8ab4]=_0x7e457c;const _0x1c4131=_0x52d95f['get'](_0x3e8ab4);if(_0x1c4131){const _0x275df8=_0x5e3b77['get'](_0x1c4131['userId']),_0x1fc666=new r({'author':_0x275df8,'type':_0x1c4131['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x3e8ab4});_0x557d8f['unshift'](_0x1fc666),_0x2aa7f3['attributes'][_0x3e8ab4]['revisionHistoryAttachChange']=_0x1fc666['id'];}_0x2aa7f3['changes']=_0x2aa7f3['changes']['concat'](_0x557d8f);}return _0x2aa7f3;}['_markMarkers'](_0xd17620,_0x2cf0f1){for(let _0x2628b9=0x0;_0x2628b9<_0xd17620['length'];_0x2628b9++)for(const [_0x10ccb3,_0x206682]of _0x2cf0f1)!_0x206682['isCollapsed']&&_0x206682['start']['isEqual'](_0xd17620[_0x2628b9]['previousPosition'])&&_0xd17620[_0x2628b9]['markersStart']['push'](_0x10ccb3),_0x206682['end']['isEqual'](_0xd17620[_0x2628b9]['nextPosition'])&&_0xd17620[_0x2628b9]['markersEnd']['push'](_0x10ccb3);}['_joinTapes'](_0x3b754c,_0x1889e9){let _0xcddc46=[],_0xb7686a=0x0,_0x1d4a6d=0x0;for(;_0xb7686a<_0x3b754c['length']||_0x1d4a6d<_0x1889e9['length'];){const _0x5e6640=_0x3b754c[_0xb7686a]||{},_0x563302=_0x1889e9[_0x1d4a6d]||{};if(_0x5e6640['id']==_0x563302['id'])_0xb7686a++,_0x1d4a6d++,_0xcddc46['push'](_0x5e6640);else{if(_0x563302['isRemoved']&&_0x5e6640['isAdded']){const {commonTape:_0x3514c3,iEnd:_0x165859,jEnd:_0x15e781}=this['_threeWayMerge'](_0x3b754c,_0xb7686a,_0x1889e9,_0x1d4a6d);_0xcddc46=_0xcddc46['concat'](_0x3514c3),_0xb7686a=_0x165859,_0x1d4a6d=_0x15e781;}else _0x563302['isRemoved']?(_0x1d4a6d++,_0xcddc46['push'](_0x563302)):(_0xb7686a++,_0xcddc46['push'](_0x5e6640));}}return _0xcddc46;}['_markSuggestions'](_0x19e532,_0x4ccea2){const _0x1ad9ef=[];for(let _0x3e7c78=0x0;_0x3e7c78<_0x19e532['length'];_0x3e7c78++){for(let _0x30afac=0x0;_0x30afac<_0x19e532[_0x3e7c78]['markersStart']['length'];_0x30afac++){const _0x2b8af8=_0x19e532[_0x3e7c78]['markersStart'][_0x30afac];if(!_0x4ccea2['has'](_0x2b8af8))continue;const {group:_0x426e8d,type:_0x426d66,authorId:_0x1ae4d5}=_0x5bf30d(_0x2b8af8);'revision-suggestion'!=_0x426e8d||'insertion'!=_0x426d66&&'deletion'!=_0x426d66||(_0x1ad9ef['unshift']({'type':_0x426d66,'name':_0x2b8af8,'userId':_0x1ae4d5}),_0x19e532[_0x3e7c78]['markersStart']['splice'](_0x30afac,0x1),_0x30afac--);}_0x50aa37(_0x19e532[_0x3e7c78]);for(let _0xbdff26=0x0;_0xbdff26<_0x19e532[_0x3e7c78]['markersEnd']['length'];_0xbdff26++){const _0x254349=_0x19e532[_0x3e7c78]['markersEnd'][_0xbdff26];if(!_0x4ccea2['has'](_0x254349))continue;const {group:_0x3726a2,type:_0x52331b}=_0x5bf30d(_0x254349);if('revision-suggestion'!=_0x3726a2||'insertion'!=_0x52331b&&'deletion'!=_0x52331b)continue;_0x19e532[_0x3e7c78]['markersEnd']['splice'](_0xbdff26,0x1),_0xbdff26--;const _0x317410=_0x1ad9ef['findIndex'](_0x2f4ff4=>_0x2f4ff4['name']==_0x254349);_0x317410>-0x1&&_0x1ad9ef['splice'](_0x317410,0x1);}}function _0x5bf30d(_0x1eab52){const _0x2efe09=_0x1eab52['split'](':');return{'group':_0x2efe09[0x0],'type':_0x2efe09[0x1],'subType':_0x2efe09['length']>=0x5?_0x2efe09[0x2]:null,'id':_0x2efe09['length']<0x5?_0x2efe09[0x2]:_0x2efe09[0x3],'authorId':_0x2efe09['length']<0x5?_0x2efe09[0x3]:_0x2efe09[0x4],'markerCount':0x6==_0x2efe09['length']?_0x2efe09[0x5]:null};}function _0x50aa37(_0x2293c6){for(let _0x491602=0x0;_0x491602<_0x1ad9ef['length'];_0x491602++){if(_0x2293c6['isAdded']&&'insertion'==_0x1ad9ef[_0x491602]['type'])return _0x2293c6['isAddSuggestion']=_0x1ad9ef[_0x491602],void delete _0x2293c6['isAdded'];if(!_0x2293c6['isAdded']&&!_0x2293c6['isRemoved']&&'deletion'==_0x1ad9ef[_0x491602]['type'])return void(_0x2293c6['isRemoveSuggestion']=_0x1ad9ef[_0x491602]);}}}['_setDistance'](_0x592ee8,_0x5441ce){let _0x135ebc=0x0,_0x3b3d78=!0x1;const _0x3ee1e6=new Map();for(const _0x1c8856 of _0x592ee8)_0x1c8856[_0x5441ce]?_0x3b3d78&&(_0x135ebc++,_0x3b3d78=!0x1):(_0x135ebc++,_0x3b3d78=!0x0),_0x3ee1e6['set'](_0x1c8856['id'],_0x135ebc);for(let _0x516aaa=0x0;_0x516aaa<_0x592ee8['length'];_0x516aaa++){if('isRemoved'==_0x5441ce&&_0x592ee8[_0x516aaa]['isAdded']||'isAdded'==_0x5441ce&&_0x592ee8[_0x516aaa]['isRemoved'])continue;if('text'==_0x592ee8[_0x516aaa]['type']){_0x592ee8[_0x516aaa]['distance']=0x0;continue;}const _0x3e4a11=_0x3ee1e6['get'](_0x592ee8[_0x516aaa]['pairId']),_0x2c1d05=_0x3ee1e6['get'](_0x592ee8[_0x516aaa]['id']);_0x592ee8[_0x516aaa]['distance']=_0x3e4a11-_0x2c1d05;}}['_getRevisionsRange'](_0x404f77,_0x38e269,_0x162b18=!0x1){const _0x1ffc3f=[];let _0x1767ac=this['repository']['getIndex'](_0x404f77),_0x56d231=this['repository']['getIndex'](_0x38e269);for(-0x1==_0x56d231&&(_0x56d231=this['repository']['_revisions']['length'],_0x162b18=!0x1);_0x1767ac<_0x56d231;)_0x1ffc3f['push'](this['repository']['getRevision'](_0x1767ac)),_0x1767ac++;return _0x162b18&&_0x1ffc3f['push'](this['repository']['getRevision'](_0x1767ac)),_0x1ffc3f;}['_threeWayMerge'](_0x442659,_0x3d0c3e,_0x2c2d04,_0x41b0bb){const _0x29bd01=this['editor']['model']['schema'];let _0x176687=_0x3d0c3e;for(;_0x442659[_0x176687]&&_0x442659[_0x176687]['isAdded'];)_0x176687++;let _0x1cfacd=_0x41b0bb;for(;_0x2c2d04[_0x1cfacd]&&_0x2c2d04[_0x1cfacd]['isRemoved'];)_0x1cfacd++;_0x54453a(_0x442659,_0x3d0c3e,_0x176687),_0x54453a(_0x2c2d04,_0x41b0bb,_0x1cfacd);const _0x1e1781=_0x2c2d04['slice'](_0x41b0bb,_0x1cfacd)['concat'](_0x442659['slice'](_0x3d0c3e,_0x176687));return _0x1e1781['sort']((_0x4e31ae,_0x2faf73)=>_0x4e31ae['side']!=_0x2faf73['side']?_0x4e31ae['side']-_0x2faf73['side']:_0x4e31ae['level']!=_0x2faf73['level']?_0x4e31ae['level']-_0x2faf73['level']:_0x4e31ae['distance']!=_0x2faf73['distance']?_0x2faf73['distance']-_0x4e31ae['distance']:!!_0x4e31ae['isAdded']!=!!_0x2faf73['isAdded']?-0x1==_0x4e31ae['side']||0x0==_0x4e31ae['side']?_0x4e31ae['isAdded']?-0x1:0x1:_0x4e31ae['isAdded']?0x1:-0x1:_0x4e31ae['index']-_0x2faf73['index']),{'commonTape':_0x1e1781,'iEnd':_0x176687,'jEnd':_0x1cfacd};function _0x54453a(_0x4f7d23,_0x53ac14,_0x2e635a){let _0x57ba85=-0x1,_0x1fbe70=Number['POSITIVE_INFINITY'],_0x5d5a40=!0x0;for(let _0x613dd3=_0x53ac14;_0x613dd3<_0x2e635a;_0x613dd3++)if(_0x29bd01['isInline'](_0x4f7d23[_0x613dd3]['item'])||(_0x5d5a40=!0x1),_0x4f7d23[_0x613dd3]['item']['startIndex']<_0x53ac14&&(_0x57ba85=_0x613dd3),_0x4f7d23[_0x613dd3]['item']['endIndex']>=_0x2e635a){_0x1fbe70=_0x613dd3;break;}_0x5d5a40&&(_0x57ba85=_0x2e635a-0x1);for(let _0x2c7131=_0x53ac14;_0x2c7131<_0x2e635a;_0x2c7131++)_0x4f7d23[_0x2c7131]['side']=_0x2c7131<=_0x57ba85?-0x1:_0x2c7131<_0x1fbe70?0x0:0x1,_0x4f7d23[_0x2c7131]['index']=_0x2c7131;let _0xc71308=0x0;for(let _0x14c55d=_0x53ac14;_0x14c55d<=_0x57ba85;_0x14c55d++)0x0==_0x4f7d23[_0x14c55d]['distance']?_0x4f7d23[_0x14c55d]['level']=_0xc71308:(_0xc71308++,_0x4f7d23[_0x14c55d]['level']=_0xc71308,_0xc71308++);for(let _0x2a9782=_0x53ac14;_0x2a9782<_0x2e635a;_0x2a9782++)0x0==_0x4f7d23[_0x2a9782]['side']&&(_0x4f7d23[_0x2a9782]['level']=_0xc71308);_0xc71308=0x0;for(let _0x1d666f=_0x2e635a-0x1;_0x1d666f>=_0x1fbe70;_0x1d666f--)0x0==_0x4f7d23[_0x1d666f]['distance']?_0x4f7d23[_0x1d666f]['level']=_0xc71308:(_0xc71308--,_0x4f7d23[_0x1d666f]['level']=_0xc71308,_0xc71308--);}}['_fixObsoleteTags'](_0x38d1fe){const _0x45fbd8=new Map(),_0x480a25=this['editor']['model']['schema'];for(let _0x553870=0x1;_0x553870<_0x38d1fe['length'];_0x553870++){let _0x204865,_0x2b315c,_0x17701b;const _0x12be9f=_0x38d1fe[_0x553870],_0xdc64c0=_0x38d1fe[_0x553870-0x1];if('text'==_0x12be9f['type'])continue;if(_0x12be9f['type']!=_0xdc64c0['type'])continue;if(!_0x480a25['isBlock'](_0xdc64c0['item'])||_0x480a25['isLimit'](_0xdc64c0['item']))continue;if(!_0x480a25['isBlock'](_0x12be9f['item'])||_0x480a25['isLimit'](_0x12be9f['item']))continue;if((_0x38d1fe[_0x553870]['isAdded']||_0x38d1fe[_0x553870]['isAddSuggestion'])&&_0x38d1fe[_0x553870-0x1]['isRemoved'])_0x204865=_0x38d1fe[_0x553870],_0x2b315c=_0x38d1fe[_0x553870-0x1],_0x17701b=_0x553870-0x1;else{if(!_0x38d1fe[_0x553870]['isRemoved']||!_0x38d1fe[_0x553870-0x1]['isAdded']&&!_0x38d1fe[_0x553870-0x1]['isAddSuggestion'])continue;_0x204865=_0x38d1fe[_0x553870-0x1],_0x2b315c=_0x38d1fe[_0x553870],_0x17701b=_0x553870;}const _0x588113=_0x204865['level']==_0x2b315c['level'],_0x46d8da=Math['abs'](_0x204865['level'])<Math['abs'](_0x2b315c['level'])&&0x0==_0x2b315c['distance'];(_0x588113||_0x46d8da)&&(_0x45fbd8['set'](_0x2b315c['id'],_0x204865['id']),_0x38d1fe['splice'](_0x17701b,0x1),_0x553870--,_0x204865['isAdded']=!0x1);}for(let _0x4c5b77=0x0;_0x4c5b77<_0x38d1fe['length'];_0x4c5b77++)_0x45fbd8['has'](_0x38d1fe[_0x4c5b77]['pairId'])&&(_0x38d1fe[_0x4c5b77]['pairId']=_0x45fbd8['get'](_0x38d1fe[_0x4c5b77]['pairId']));}['_removeMissingPairs'](_0xae444f){const _0x8c8724=new Set(_0xae444f['map'](_0x48f12e=>_0x48f12e['id']));for(let _0x2051cd=0x0;_0x2051cd<_0xae444f['length'];_0x2051cd++)_0x8c8724['has'](_0xae444f[_0x2051cd]['pairId'])||0x0==_0xae444f[_0x2051cd]['distance']||(_0xae444f[_0x2051cd]['isIncorrect']=!0x0);return _0xae444f['filter'](_0x547eb1=>!_0x547eb1['isIncorrect']);}['_markMismatchedRemovedTags'](_0x2d3de5){const _0x2f3da9=new Set();for(let _0x4919a9=0x0;_0x4919a9<_0x2d3de5['length'];_0x4919a9++){if(_0x2f3da9['has'](_0x2d3de5[_0x4919a9]['id'])&&_0x2d3de5[_0x4919a9]['isRemoved']&&(_0x2d3de5[_0x4919a9]['isIncorrect']=!0x0),_0x2d3de5[_0x4919a9]['isIncorrect'])continue;if(0x0==_0x2d3de5[_0x4919a9]['distance'])continue;if('elementStart'!=_0x2d3de5[_0x4919a9]['type'])continue;if(null==_0x2d3de5[_0x4919a9]['pairId'])continue;let _0x33f852=_0x4919a9+0x1,_0x25940c=0x0;for(;_0x2d3de5[_0x33f852]['id']!=_0x2d3de5[_0x4919a9]['pairId'];)'elementStart'==_0x2d3de5[_0x33f852]['type']?_0x25940c++:'elementEnd'==_0x2d3de5[_0x33f852]['type']&&_0x25940c--,_0x33f852++;if(0x0!=_0x25940c){if(_0x2d3de5[_0x4919a9]['isRemoved'])_0x2d3de5[_0x4919a9]['isIncorrect']=!0x0;else{for(;_0x33f852!=_0x4919a9;)_0x2d3de5[_0x33f852]['isRemoved']&&0x0!=_0x2d3de5[_0x33f852]['distance']&&(_0x2d3de5[_0x33f852]['isIncorrect']=!0x0,_0x2f3da9['add'](_0x2d3de5[_0x33f852]['pairId'])),_0x33f852--;}}}return _0x2d3de5['filter'](_0x1a307c=>!_0x1a307c['isIncorrect']);}['_removeUnsupportedChanges'](_0x1bcc6f){const _0x518d12=this['editor']['model']['schema'];for(let _0x430538=0x0;_0x430538<_0x1bcc6f['length'];_0x430538++){if(!(_0x1bcc6f[_0x430538]['isAdded']||_0x1bcc6f[_0x430538]['isAddSuggestion']||_0x1bcc6f[_0x430538]['isRemoved']||_0x1bcc6f[_0x430538]['isRemoveSuggestion']))continue;if(0x0==_0x1bcc6f[_0x430538]['distance'])continue;const _0x337593=_0x1bcc6f[_0x430538]['item'];_0x518d12['isBlock'](_0x337593)||_0x518d12['isLimit'](_0x337593)||(_0x1bcc6f[_0x430538]['isAdded']&&delete _0x1bcc6f[_0x430538]['isAdded'],_0x1bcc6f[_0x430538]['isAddSuggestion']&&delete _0x1bcc6f[_0x430538]['isAddSuggestion'],_0x1bcc6f[_0x430538]['isRemoveSuggestion']&&delete _0x1bcc6f[_0x430538]['isRemoveSuggestion'],_0x1bcc6f[_0x430538]['isRemoved']&&(_0x1bcc6f[_0x430538]['isIncorrect']=!0x0));}return _0x1bcc6f['filter'](_0x207dff=>!_0x207dff['isIncorrect']);}['_makeModelFromTape'](_0x44c55d,_0x558760,_0x1c1cb8){const _0x30da5e=new vt(),_0x313347=[],_0x48b088=new Map(),_0xd5b628=this['editor']['model'],_0x2afa2c=_0xd5b628['schema'],_0x19b882=[_0x30da5e],_0x3658ef={},_0x5b127c={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x55d553=null;const _0x4297b9=[0x0];for(let _0x4a4e97=0x0;_0x4a4e97<_0x44c55d['length'];_0x4a4e97++)if('elementStart'===_0x44c55d[_0x4a4e97]['type']){_0x44c55d[_0x4a4e97]['previousPosition']=_0xd5b628['createPositionFromPath'](_0x30da5e,_0x4297b9);const _0x58e64e=new ut(_0x44c55d[_0x4a4e97]['item']['name'],_0x44c55d[_0x4a4e97]['item']['getAttributes']());_0x19b882[0x0]['_appendChild'](_0x58e64e),_0x4297b9['push'](0x0),_0x19b882['unshift'](_0x58e64e),_0x44c55d[_0x4a4e97]['nextPosition']=_0xd5b628['createPositionFromPath'](_0x30da5e,_0x4297b9);}else'elementEnd'===_0x44c55d[_0x4a4e97]['type']?(_0x19b882['shift'](),_0x44c55d[_0x4a4e97]['previousPosition']=_0xd5b628['createPositionFromPath'](_0x30da5e,_0x4297b9),_0x4297b9['pop'](),_0x4297b9[_0x4297b9['length']-0x1]++,_0x44c55d[_0x4a4e97]['nextPosition']=_0xd5b628['createPositionFromPath'](_0x30da5e,_0x4297b9)):(_0x44c55d[_0x4a4e97]['previousPosition']=_0xd5b628['createPositionFromPath'](_0x30da5e,_0x4297b9),_0x55d553?_0x55d553['_data']+=_0x44c55d[_0x4a4e97]['item']['data']:_0x55d553=new gt(_0x44c55d[_0x4a4e97]['item']['data'],_0x44c55d[_0x4a4e97]['item']['getAttributes']()),_0x44c55d[_0x4a4e97+0x1]&&'text'===_0x44c55d[_0x4a4e97+0x1]['type']&&_0x1948c5(_0x55d553,_0x44c55d[_0x4a4e97+0x1]['item'])||(_0x19b882[0x0]['_appendChild'](_0x55d553),_0x55d553=null),_0x4297b9[_0x4297b9['length']-0x1]+=_0x44c55d[_0x4a4e97]['item']['offsetSize'],_0x44c55d[_0x4a4e97]['nextPosition']=_0xd5b628['createPositionFromPath'](_0x30da5e,_0x4297b9));for(let _0xed94b7=0x0;_0xed94b7<_0x44c55d['length'];_0xed94b7++){const _0x4d65fb=_0x44c55d[_0xed94b7]['previousPosition'],_0x10d1b9=_0x44c55d[_0xed94b7]['nextPosition'];for(const _0x5ab839 of _0x44c55d[_0xed94b7]['markersStart'])_0x48b088['set'](_0x5ab839,{'start':_0x4d65fb,'end':null});_0x165716('isRemoveSuggestion',_0xed94b7,_0x4d65fb,_0x10d1b9),_0x165716('isAddSuggestion',_0xed94b7,_0x4d65fb,_0x10d1b9),_0x165716('isRemoved',_0xed94b7,_0x4d65fb,_0x10d1b9),_0x165716('isAdded',_0xed94b7,_0x4d65fb,_0x10d1b9);for(const _0x169a27 of _0x44c55d[_0xed94b7]['markersEnd']){const _0xc9a6ae=_0x48b088['get'](_0x169a27);_0xc9a6ae?_0xc9a6ae['end']=_0x10d1b9:_0x48b088['set'](_0x169a27,{'start':_0x10d1b9,'end':_0x10d1b9});}}for(const [_0x3de586,_0x3e2af9]of _0x48b088){const _0x17eee0=this['editor']['model']['createRange'](_0x3e2af9['start'],_0x3e2af9['end']);_0x30da5e['markers']['set'](_0x3de586,_0x17eee0);}return _0x313347['sort']((_0xe4d783,_0x415a8f)=>{const _0x204dae=_0x30da5e['markers']['get']('revision:'+_0xe4d783['id']),_0x4529a1=_0x30da5e['markers']['get']('revision:'+_0x415a8f['id']);return _0x204dae['start']['isBefore'](_0x4529a1['start'])?-0x1:_0x204dae['start']['isAfter'](_0x4529a1['start'])?0x1:_0x204dae['end']['isBefore'](_0x4529a1['end'])?-0x1:_0x204dae['end']['isAfter'](_0x4529a1['end'])?0x1:'add'===_0xe4d783['type']?-0x1:0x1;}),{'root':_0x30da5e,'changes':_0x313347};function _0x165716(_0x47bb6a,_0x6077f0,_0x55ad22,_0x55e09f){const _0x515918=!!_0x44c55d[_0x6077f0][_0x47bb6a],_0x3d927b=_0x515918?_0x44c55d[_0x6077f0][_0x47bb6a]['userId']:null,_0x5865c1=_0x6077f0===_0x44c55d['length']-0x1,_0x5a5f09=_0x5b127c[_0x47bb6a][0x0],_0xa6cc43=_0x2afa2c['isObject'](_0x44c55d[_0x6077f0]['item']);!_0x3658ef[_0x47bb6a]&&_0x515918?_0x3658ef[_0x47bb6a]={'start':_0x55ad22,'tapeItem':_0x44c55d[_0x6077f0],'userId':_0x3d927b,'type':_0x47bb6a}:_0x3658ef[_0x47bb6a]&&!_0x515918?(_0x3658ef[_0x47bb6a]['end']=_0x55ad22,_0x5ab94d(_0x3658ef[_0x47bb6a]),_0x3658ef[_0x47bb6a]=null):_0x3658ef[_0x47bb6a]&&_0x515918&&_0x3658ef[_0x47bb6a]['userId']!==_0x3d927b&&(_0x3658ef[_0x47bb6a]['end']=_0x55ad22,_0x5a5f09&&_0x5a5f09['userId']===_0x3658ef[_0x47bb6a]['userId']||_0x5ab94d(_0x3658ef[_0x47bb6a]),_0x3658ef[_0x47bb6a]={'start':_0x55ad22,'tapeItem':_0x44c55d[_0x6077f0],'userId':_0x3d927b,'type':_0x47bb6a}),_0x3658ef[_0x47bb6a]&&_0xa6cc43&&('elementStart'!==_0x44c55d[_0x6077f0]['type']||_0x5a5f09&&_0x5a5f09['userId']===_0x3d927b||_0x5b127c[_0x47bb6a]['unshift']({'userId':_0x3d927b,'object':_0x44c55d[_0x6077f0]['item'],'change':_0x3658ef[_0x47bb6a]}),'elementEnd'===_0x44c55d[_0x6077f0]['type']&&_0x5a5f09&&_0x5a5f09['object']===_0x44c55d[_0x6077f0]['item']&&(_0x5b127c[_0x47bb6a]['shift'](),_0x3658ef[_0x47bb6a]=_0x5a5f09['change'])),_0x3658ef[_0x47bb6a]&&_0x5865c1&&(_0x3658ef[_0x47bb6a]['end']=_0x55e09f,_0x5ab94d(_0x3658ef[_0x47bb6a]),_0x3658ef[_0x47bb6a]=null);}function _0x5ab94d({start:_0x57e9c8,end:_0x50d4c,tapeItem:_0x459ca7,userId:_0x1bb2e8,type:_0x2b9255}){const _0x1663be=_0x459ca7['item'],_0xf73ec4=_0xd5b628['schema']['isBlock'](_0x1663be)&&!_0xd5b628['schema']['isLimit'](_0x1663be),_0xd5da5a=_0x57e9c8['nodeAfter']==_0x50d4c['parent']&&_0x50d4c['isAtStart'];if(_0xf73ec4&&_0xd5da5a)return;const _0x355b73=_0xd5b628['createRange'](_0x57e9c8,_0x50d4c),_0x50ad0a=_0x558760['get'](_0x1bb2e8),_0x5e36d7=new r({'author':_0x50ad0a,'type':'isAdded'==_0x2b9255||'isAddSuggestion'==_0x2b9255?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2b9255||'isRemoveSuggestion'==_0x2b9255},'createdAt':new Date(),'rootName':_0x1c1cb8});_0x313347['push'](_0x5e36d7),_0x30da5e['markers']['set']('revision:'+_0x5e36d7['id'],_0x355b73);}function _0x1948c5(_0x1d4a29,_0xaf9b9a){const _0x40d305=_0x1d4a29['getAttributes'](),_0x59b182=_0xaf9b9a['getAttributes']();for(const _0x5e588d of _0x40d305){if(_0x5e588d[0x1]!==_0xaf9b9a['getAttribute'](_0x5e588d[0x0]))return!0x1;_0x59b182['next']();}return _0x59b182['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x37531e=>{const _0x262487=_0x37531e['markerName']['split'](':')[0x1],_0x4a2a66=this['_getChangeFromId'](_0x262487);if(!_0x4a2a66)return null;const _0x3f1759='add'==_0x4a2a66['type']?'insertion':'deletion',_0x1e50c0=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3f1759];return _0x4a2a66['data']['isSuggestion']&&_0x1e50c0['push']('ck-suggestion-marker-'+_0x3f1759+'-new'),this['activeChange']==_0x4a2a66&&_0x1e50c0['push']('ck-suggestion-marker--active'),{'classes':_0x1e50c0,'attributes':{'data-change-id':_0x262487}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x47f8c8=>{_0x47f8c8['on']('element:pre',(_0x4a872b,_0x26acb8,_0x1e2c80)=>{const _0x58d958=_0x26acb8['viewItem']['getChild'](0x0);if(!_0x58d958||!_0x58d958['is']('element','code'))return;if(!_0x1e2c80['consumable']['consume'](_0x58d958,{'attributes':['vid_start','vid_end']}))return;const _0x342850=_0x26acb8['modelRange']['start']['nodeAfter'];_0x1e2c80['writer']['setAttribute']('vid_start',_0x58d958['getAttribute']('vid_start'),_0x342850),_0x1e2c80['writer']['setAttribute']('vid_end',_0x58d958['getAttribute']('vid_end'),_0x342850);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0xa5220e=>{_0xa5220e['on']('element',(_0x357929,_0x1592dd,_0x26ebd6)=>{if(!_0x26ebd6['consumable']['consume'](_0x1592dd['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x1592dd['modelRange']['isCollapsed'])return;const _0x5b3925=_0x1592dd['modelRange']['start']['nodeAfter'];_0x5b3925['hasAttribute']('vid_start')||_0x5b3925['hasAttribute']('vid')||(_0x26ebd6['writer']['setAttribute']('vid_start',_0x1592dd['viewItem']['getAttribute']('vid_start'),_0x5b3925),_0x26ebd6['writer']['setAttribute']('vid_end',_0x1592dd['viewItem']['getAttribute']('vid_end'),_0x5b3925));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x3108d5=>_0x3108d5['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x11f5fd,[,_0x3e1445])=>{['vid_start','vid_end','vid']['includes'](_0x3e1445)&&(_0x11f5fd['return']=!0x0,_0x11f5fd['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x7820ee=>{_0x7820ee['on']('attribute:vid',(_0x10560a,_0x11b9a4,_0x496805)=>{if('\x20'!=_0x11b9a4['item']['data']||_0x11b9a4['item']['parent']['maxOffset']>0x1)return;if(!_0x496805['consumable']['consume'](_0x11b9a4['item'],_0x10560a['name']))return;const _0x3d758c=_0x496805['writer'],_0x785735=_0x496805['mapper']['toViewRange'](_0x11b9a4['range']);_0x3d758c['wrap'](_0x785735,_0x3d758c['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x8698c7){const _0x48ee74=_0x8698c7['plugins']['get']('RevisionViewer');return(_0x4623b0,_0x69a630,_0x124d9b)=>{const _0x4b4efa=_0x69a630['markerName']['split'](':')[0x1],_0x1689a6=_0x48ee74['_getChangeFromId'](_0x4b4efa);if(!_0x1689a6)return null;const _0x3c9325='add'==_0x1689a6['type']?'split':'merge';if(!_0x124d9b['consumable']['test'](_0x69a630['markerRange'],_0x4623b0['name']))return;const _0xdf08f7=_0x69a630['markerRange']['getWalker'](),_0x49c898=_0x69a630['markerRange']['start'],_0x932154=_0x8698c7['model']['schema'];let _0x4cfbdd=null,_0x25ab41=null,_0x2c9f3c=!0x1,_0x20e508=!0x1;for(const _0x3a9e3e of _0xdf08f7){const _0x1b5e73=_0x3a9e3e['item'];_0x2c9f3c=_0x2c9f3c||_0x932154['isContent'](_0x1b5e73);const _0x2b9fcc=_0x124d9b['mapper']['toViewElement'](_0x1b5e73);if(_0x2b9fcc&&_0x2b9fcc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x3a9e3e['type']&&(_0x932154['isBlock'](_0x1b5e73)&&!_0x932154['isLimit'](_0x1b5e73)&&(_0x1b5e73['nextSibling']||_0x49c898['isAtEnd']?_0x4cfbdd&&_0x4cfbdd['parent']==_0x1b5e73||(_0x4cfbdd=_0x1b5e73,_0x25f20e(_0x3a9e3e['previousPosition']),_0x20e508=!0x0):_0x25ab41=_0x25ab41||_0x3a9e3e['previousPosition']));}function _0x25f20e(_0x548580){const _0x253979=_0x124d9b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x3c9325}),_0x374fb5=_0x124d9b['mapper']['toViewPosition'](_0x548580);_0x1689a6['data']['isSuggestion']&&_0x124d9b['writer']['addClass']('ck-suggestion-marker-'+_0x3c9325+'-new',_0x253979),_0x48ee74['activeChange']==_0x1689a6&&_0x124d9b['writer']['addClass']('ck-suggestion-marker--active',_0x253979),_0x124d9b['writer']['insert'](_0x374fb5,_0x253979),_0x124d9b['mapper']['bindElementToMarker'](_0x253979,_0x69a630['markerName']);}_0x2c9f3c||_0x20e508||!_0x25ab41||_0x25f20e(_0x25ab41);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x36a4c8,_0x5b08b1,_0x267ebd)=>{const _0x9d594f=_0x267ebd['mapper']['markerNameToElements'](_0x5b08b1['markerName']);if(_0x9d594f){for(const _0x22d6f2 of _0x9d594f)(_0x22d6f2['hasClass']('ck-suggestion-marker-split')||_0x22d6f2['hasClass']('ck-suggestion-marker-merge'))&&(_0x267ebd['mapper']['unbindElementFromMarkerName'](_0x22d6f2,_0x5b08b1['markerName']),_0x267ebd['writer']['remove'](_0x22d6f2));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x569fcf,_0x2dfd32,_0x40352c)=>{const _0x19396d=_0x2dfd32['markerName']['split'](':')[0x1],_0x4f235f=this['_getChangeFromId'](_0x19396d);if(!_0x4f235f)return null;const _0x4f23bc='add'==_0x4f235f['type']?'split':'merge';if(_0x40352c['consumable']['test'](_0x2dfd32['markerRange'],_0x569fcf['name']))for(const _0x54de11 of _0x2dfd32['markerRange']['getItems']()){if(!_0x54de11['is']('element','softBreak'))continue;const _0x315d49=_0x40352c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4f23bc}),_0x3a9b11=_0x40352c['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x54de11));_0x4f235f['data']['isSuggestion']&&_0x40352c['writer']['addClass']('ck-suggestion-marker-'+_0x4f23bc+'-new',_0x315d49),this['activeChange']==_0x4f235f&&_0x40352c['writer']['addClass']('ck-suggestion-marker--active',_0x315d49),_0x40352c['writer']['insert'](_0x3a9b11,_0x315d49),_0x40352c['mapper']['bindElementToMarker'](_0x315d49,_0x2dfd32['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x30e79c=>{for(const _0x1e240d of this['editor']['model']['document']['getRootNames']()){const _0x1c404a=this['editor']['model']['document']['getRoot'](_0x1e240d),_0x49bb16=this['editor']['editing']['view']['document']['getRoot'](_0x1e240d);if(_0x49bb16){const _0x3b76f4=_0x1c404a['getAttribute']('revisionHistoryAttachChange');if(_0x30e79c['removeAttribute']('data-change-id',_0x49bb16),_0x30e79c['removeClass']('ck-revision-history-root-add',_0x49bb16),_0x30e79c['removeClass']('ck-revision-history-root-remove',_0x49bb16),_0x30e79c['removeClass']('ck-revision-history-root--active',_0x49bb16),_0x3b76f4){const _0x2037bd=this['_getChangeFromId'](_0x3b76f4);if(!_0x2037bd)return null;_0x30e79c['setAttribute']('data-change-id',_0x3b76f4,_0x49bb16),_0x30e79c['addClass']('ck-revision-history-root-'+_0x2037bd['type'],_0x49bb16),this['activeChange']==_0x2037bd&&_0x30e79c['addClass']('ck-revision-history-root--active',_0x49bb16);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x30cf60=>'revision-comment:'+_0x30cf60,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2a0228=>'revision-suggestion:'+_0x2a0228,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x1544ad=>({'name':'suggestion:'+_0x1544ad,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x45879b=>{const _0x59ee00=_0x45879b['markerName']['split'](':')[0x1];return'insertion'!=_0x59ee00&&'deletion'!=_0x59ee00?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x59ee00]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',X(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',X(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x252b10,_0x3e796b,_0x593ccf)=>{const _0x126764=_0x593ccf['mapper']['markerNameToElements'](_0x3e796b['markerName']);if(_0x126764){for(const _0x3ec0ca of _0x126764)_0x3ec0ca['is']('uiElement')&&(_0x593ccf['mapper']['unbindElementFromMarkerName'](_0x3ec0ca,_0x3e796b['markerName']),_0x593ccf['writer']['remove'](_0x3ec0ca));}},{'priority':'high'});}['_getChangeFromId'](_0x54ad4b){return this['_changeIdToChange']['get'](_0x54ad4b);}['_getViewForChange'](_0x2de094){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new Q(this['editor']['locale'],_0x2de094),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5a6be7,_0x41b6a1,_0x3f3743,_0x59664b)=>{_0x59664b&&this['_balloon']['remove'](_0x59664b),_0x3f3743&&(this['_balloon']['add']({'view':_0x3f3743,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0xbb1d04=this['editor']['editing'],_0x4a77bc=this['_getChangeFromId'](_0x3f3743['changeId']);let _0x47f2ec;if(_0x4a77bc['data']['isOnRoot']){const _0x171304=_0xbb1d04['view']['getDomRoot'](_0x4a77bc['rootName']);_0x47f2ec=Array['from'](_0x171304['getClientRects']());}else{const _0x21a2b0=this['editor']['model']['markers']['get']('revision:'+_0x3f3743['changeId']);_0x47f2ec=Array['from'](_0xbb1d04['mapper']['markerNameToElements'](_0x21a2b0['name']))['map'](_0x4433bd=>_0xbb1d04['view']['domConverter']['mapViewToDom'](_0x4433bd))['map'](_0x1805ef=>Array['from'](_0x1805ef['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x47f2ec[0x0];return _0x47f2ec['find'](_0x1e8e0=>_0x1e8e0['top']-0x3<=this['_activeViewTarget']['y']&&_0x1e8e0['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1e8e0['left']-0x3<=this['_activeViewTarget']['x']&&_0x1e8e0['right']+0x3>=this['_activeViewTarget']['x'])||_0x47f2ec[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2cbddb,_0x2f13e6,_0x56cb2d,_0x257ec6)=>{this['activeView']=_0x56cb2d?this['_getViewForChange'](_0x56cb2d):null,this['editor']['model']['change'](()=>{const _0x21827b=this['editor']['editing'];_0x257ec6&&(_0x257ec6['data']['isOnRoot']?_0x21827b['view']['change'](_0x340282=>{_0x340282['removeClass']('ck-revision-history-root--active',_0x21827b['view']['document']['getRoot'](_0x257ec6['rootName']));}):_0x21827b['reconvertMarker']('revision:'+_0x257ec6['id'])),_0x56cb2d&&(_0x56cb2d['data']['isOnRoot']?_0x21827b['view']['change'](_0x1b06d9=>{_0x1b06d9['addClass']('ck-revision-history-root--active',_0x21827b['view']['document']['getRoot'](_0x56cb2d['rootName']));}):_0x21827b['reconvertMarker']('revision:'+_0x56cb2d['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x570ded,_0xde75de)=>{if(this['activeChange'])return;const _0x418a9b=this['_findChangeIdFromDomTarget'](_0xde75de['target']),_0x3f0708=this['_changeIdToChange']['get'](_0x418a9b);_0x3f0708?(this['_activeViewTarget']={'x':_0xde75de['domEvent']['x'],'y':_0xde75de['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x3f0708)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2afd5c,_0x1874ab)=>{const _0x217e72=this['_findChangeIdFromDomTarget'](_0x1874ab['target']),_0x1d856e=this['_changeIdToChange']['get'](_0x217e72);_0x1d856e?(this['_activeViewTarget']={'x':_0x1874ab['domEvent']['x'],'y':_0x1874ab['domEvent']['y']},_0x1d856e===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x1d856e):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x2faf7a){do{const _0xc27a2f=_0x2faf7a['getAttribute']('data-change-id');if(_0xc27a2f)return _0xc27a2f;_0x2faf7a=_0x2faf7a['parent'];}while(_0x2faf7a);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x403648=>{for(const _0x437f2e of this['editor']['model']['markers'])_0x403648['removeMarker'](_0x437f2e);});}}function X(_0x442310,_0x418ed0){return(_0x2006b7,_0x375413,_0x4fa820)=>{if(!_0x4fa820['consumable']['test'](_0x375413['markerRange'],_0x2006b7['name']))return;const _0x1c66b6=_0x375413['markerRange']['getWalker'](),_0x507f53=_0x375413['markerRange']['start'],_0x2bbe0b=_0x442310['model']['schema'];let _0x57f412=null,_0x4f4b24=null,_0x2c7cdc=!0x1,_0x36e8ea=!0x1;for(const _0x211e65 of _0x1c66b6){const _0x4002b2=_0x211e65['item'];_0x2c7cdc=_0x2c7cdc||_0x2bbe0b['isContent'](_0x4002b2);const _0x5e825e=_0x4fa820['mapper']['toViewElement'](_0x4002b2);if(_0x5e825e&&_0x5e825e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x211e65['type']&&(_0x2bbe0b['isBlock'](_0x4002b2)&&!_0x2bbe0b['isLimit'](_0x4002b2)&&(_0x4002b2['nextSibling']||_0x507f53['isAtEnd']?_0x57f412&&_0x57f412['parent']==_0x4002b2||(_0x57f412=_0x4002b2,_0x25dfe0(_0x211e65['previousPosition']),_0x36e8ea=!0x0):_0x4f4b24=_0x4f4b24||_0x211e65['previousPosition']));}function _0x25dfe0(_0x2e9c2a){const _0x13000e=_0x4fa820['mapper']['toViewPosition'](_0x2e9c2a),_0x1f7083=_0x4fa820['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x418ed0});_0x4fa820['writer']['insert'](_0x13000e,_0x1f7083),_0x4fa820['mapper']['bindElementToMarker'](_0x1f7083,_0x375413['markerName']);}_0x2c7cdc||_0x36e8ea||!_0x4f4b24||_0x25dfe0(_0x4f4b24);};}class mt extends _0x157478{constructor(_0xd1a82d){super(_0xd1a82d);const _0x5c05f3=_0xd1a82d['plugins']['get'](m);this['affectsData']=!0x1,this['listenTo'](_0x5c05f3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5c05f3,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x433f50=this['editor'],_0x534152=_0x433f50['plugins']['get'](m),_0x2e27e0=_0x534152['isReady']?_0x534152['diff']['newRevisionId']:null;_0x433f50['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2e27e0);}['refresh'](){const {isReady:_0xddb3a3,isEnabled:_0x1379a5,repository:_0xe47509,diff:_0x3f9336}=this['editor']['plugins']['get'](m),_0x8874b3=_0x3f9336&&_0xe47509['getLaterVisibleRevision'](_0x3f9336['newRevisionId']);this['isEnabled']=_0xddb3a3&&_0x1379a5&&Boolean(_0x8874b3);}}class wt extends _0x157478{['_step'];constructor(_0x23bf78,{direction:_0x86510}){super(_0x23bf78);const _0xfdc701=_0x23bf78['plugins']['get'](m);this['affectsData']=!0x1,this['_step']='forward'===_0x86510?0x1:-0x1,this['listenTo'](_0xfdc701,'change:isReady',()=>this['refresh']()),this['listenTo'](_0xfdc701,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0xfdc701,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x5407cf=this['editor'],_0x21d40e=_0x5407cf['plugins']['get'](m),{isNavigationMode:_0x43a801,currentChangeNumber:_0xfbbfbf}=_0x21d40e;let _0x5146a1;if(_0x21d40e['activeChange']=_0x43a801?_0x21d40e['diff']['changes']['get'](_0xfbbfbf+this['_step']):_0x21d40e['diff']['changes']['first'],_0x21d40e['activeChange']['data']['isOnRoot'])_0x5146a1=_0x5407cf['editing']['view']['getDomRoot'](_0x21d40e['activeChange']['rootName']);else{const _0x193276=_0x5407cf['model']['markers']['get']('revision:'+_0x21d40e['activeChange']['id']);_0x5146a1=_0x468346(_0x5407cf['editing'],_0x193276);}_0x55d01e({'target':_0x5146a1,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4c7dc5,currentChangeNumber:_0x26abb8,numberOfChanges:_0x12fc19,isReady:_0x1d98d1,isEnabled:_0x20c0a1}=this['editor']['plugins']['get'](m);this['isEnabled']=!!(_0x20c0a1&&_0x1d98d1&&_0x12fc19)&&(!_0x4c7dc5||(0x1===this['_step']?_0x26abb8<_0x12fc19-0x1:_0x26abb8>0x0));}}class _i extends ts{constructor(_0x53c1ab){super(_0x53c1ab);const _0x2ab50e=this['bindTemplate'],_0xaadc55=new te(_0x53c1ab),_0x278466=new te(_0x53c1ab);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',(_0x1b0a72,_0x430196)=>_0x1b0a72&&_0x430196>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3b7614,_0x4013b0,_0x49e040,_0x121de6)=>{if(!_0x3b7614)return g(_0x53c1ab,'Loading...');if(!_0x49e040)return g(_0x53c1ab,'No\x20changes');const _0x64a889=g(_0x53c1ab,'NUMBER_OF_CHANGES',_0x49e040);return _0x121de6?g(_0x53c1ab,'X_OF_Y_CHANGES',[_0x4013b0+0x1,_0x49e040]):_0x64a889;}),_0xaadc55['set']({'label':g(_0x53c1ab,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x1370af}),_0x278466['set']({'label':g(_0x53c1ab,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x15808f}),_0xaadc55['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x278466['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0xaadc55['on']('execute',()=>this['fire']('execute','backward')),_0x278466['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',_0x2ab50e['if']('_isStatusLabelVisible','ck-hidden',_0x3bdbfa=>!_0x3bdbfa)]},'children':[{'text':_0x2ab50e['to']('isNavigationMode',_0x1a969e=>_0x1a969e?g(_0x53c1ab,'EDIT_X_OF_Y_REVISIONS')+':\x20':g(_0x53c1ab,'Total')+':\x20')}]},{'text':_0x2ab50e['to']('_statusText')}]},new _0x537166(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0xaadc55,_0x278466]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x1f29e4{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x5e5a13=this['editor']['editing']['view'];_0x5e5a13['change'](_0x2078f9=>{for(const _0x3175e of _0x5e5a13['document']['roots'])_0x2078f9['addClass'](le,_0x3175e);});}['hide'](){const _0x4a2649=this['editor']['editing']['view'];_0x4a2649['change'](_0x575e2e=>{for(const _0xa26d0f of _0x4a2649['document']['roots'])_0x575e2e['removeClass'](le,_0xa26d0f);});}}class R extends _0x1f29e4{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m,ge];}['init'](){const _0x220492=this['editor'],_0xe1a9b4=_0x220492['plugins']['get'](m),_0x56d775=_0x220492['plugins']['get'](ge);_0x220492['ui']['componentFactory']['add']('exitToEditing',_0x52b3f4=>{const _0x1b9af5=new te(_0x52b3f4);return _0x1b9af5['set']({'label':g(_0x52b3f4,'Back\x20to\x20editing'),'icon':_0x10b9e3,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1b9af5,'execute',()=>{_0x220492['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1b9af5;}),_0x220492['ui']['componentFactory']['add']('restoreRevision',_0x2f81df=>{const _0x5c2a5d=new te(_0x2f81df);return _0x5c2a5d['set']({'label':g(_0x2f81df,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x5c2a5d['bind']('isEnabled')['to'](_0x220492['commands']['get']('restoreRevision')),this['listenTo'](_0x5c2a5d,'execute',()=>_0x220492['execute']('restoreRevision')),_0x5c2a5d;}),_0x220492['ui']['componentFactory']['add']('changesNavigation',_0x474840=>{const _0x198407=new _i(_0x474840),_0x9fbb94=_0x220492['commands']['get']('showPreviousChange'),_0x27fbe2=_0x220492['commands']['get']('showNextChange');return _0x198407['bind']('isBackwardNavigationEnabled')['to'](_0x9fbb94,'isEnabled'),_0x198407['bind']('isForwardNavigationEnabled')['to'](_0x27fbe2,'isEnabled'),_0x198407['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xe1a9b4),this['listenTo'](_0x198407,'execute',(_0x3ef6e0,_0x1fc8ee)=>{_0x220492['execute']('forward'===_0x1fc8ee?'showNextChange':'showPreviousChange');}),_0x198407;}),_0x56d775['show'](),_0xe1a9b4['on']('change:isReady',(_0xc85c42,_0x33170c,_0x345777)=>{_0x345777?_0x56d775['hide']():_0x56d775['show']();});}}class at extends _0x5da75d{['_resizeObserver']=null;constructor(_0x358648,_0x2fd8da){super(_0x358648,_0x2fd8da);const _0xd7f1a2=this['bindTemplate'];this['set']({'label':g(_0x358648,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=g(_0x358648,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0xd7f1a2['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 _0x31c64e=this['fieldView']['element'];this['_tooltipString']=_0x31c64e['scrollWidth']>_0x31c64e['clientWidth']&&_0x31c64e['value']||'';}}class si extends ts{constructor(_0x2aae78,_0x3db2df,_0x4f57fd){super(_0x2aae78);const _0x257bf7=new _0x45bd91();_0x257bf7['set']({'content':_0x82edc,'viewBox':'0\x200\x2011\x2010'});const _0x264b8d=['ck','ck-revision-history-sidebar__revision-author'];_0x4f57fd&&_0x264b8d['push']('ck-revision-history-sidebar__revision-author_creator');const _0x5bd3bd=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':g(_0x2aae78,_0x4f57fd?'Revision\x20creator':'Revision\x20author')},'children':[_0x257bf7,_0x3db2df['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x264b8d},'children':_0x5bd3bd});}}function oi(_0x1f2959,_0x1aefd5){const _0x5d9f7c=_0x1f2959['bindTemplate'],_0x4d850f=_0x1f2959['locale'],_0x30fb03=_0x3cadb2(_0x4d850f);_0x30fb03['panelPosition']='sw';const _0x25698e=function(_0x57c405,_0x17119f){const _0x38badc=function(_0x5ee457,_0x39de6d){const _0x12b2fd=_0x5ee457['locale'],_0x54b815={'Compare\x20against\x20selected':g(_0x12b2fd,'Compare\x20against\x20selected'),'Name\x20this\x20revision':g(_0x12b2fd,'Name\x20this\x20revision'),'Restore\x20this\x20revision':g(_0x12b2fd,'Restore\x20this\x20revision')};return _0x39de6d['map'](_0x17f031=>{const _0x8fa1a6=_0x54b815[_0x17f031['name']];return _0x8fa1a6&&_0x8fa1a6!==_0x17f031['name']&&(_0x17f031['name']=_0x8fa1a6),_0x17f031;});}(_0x57c405,_0x17119f),_0x1a8333=new _0x5542df();for(const _0x564438 of _0x38badc){const _0x3e1b5c={'type':'button','model':new to({'label':_0x564438['name'],'class':_0x564438['class'],'withText':!0x0,'role':'menuitem','_action':_0x564438['action']})};_0x3e1b5c['model']['bind']('isEnabled')['to'](_0x57c405,'isActionsDropdownOpen',_0x4c8ec1=>'function'!=typeof _0x564438['isEnabled']||(!_0x4c8ec1||_0x564438['isEnabled'](_0x57c405))),_0x1a8333['add'](_0x3e1b5c);}return _0x1a8333;}(_0x1f2959,_0x1aefd5);return _0x1f2959['bind']('isActionsDropdownOpen')['to'](_0x30fb03,'isOpen'),_0x30fb03['buttonView']['set']({'label':g(_0x4d850f,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1b2ee1}),_0x30fb03['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x5d9f7c['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x5d9f7c['to'](_0x5079aa=>_0x5079aa['stopPropagation']())}}),_0x30fb03['on']('execute',_0x235935=>{_0x1f2959['isReady']&&'function'==typeof _0x235935['source']['_action']&&_0x235935['source']['_action'](_0x1f2959);}),_0x14ee6c(_0x30fb03,_0x25698e,{'role':'menu'}),_0x30fb03['listenTo'](_0x1f2959,'change:isActionsDropdownOpen',(_0xbe4ffe,_0x2a6177,_0x24be61)=>{if(_0x24be61)for(const _0xdc8e56 of _0x30fb03['listView']['items']){const _0x24dee3=_0xdc8e56['children']['first'],_0x5d6b79=_0x1aefd5['find'](_0x34828e=>_0x34828e['action']===_0x24dee3['_action'])['isVisible'];_0xdc8e56['isVisible']=void 0x0===_0x5d6b79||_0x5d6b79(_0x1f2959);}}),_0x30fb03;}class hi extends/* #__PURE__ -- @preserve */
26
+ ti(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x2db55f,_0x2c6ddd,_0x56140f,_0x1f7c10){super(_0x2db55f);const _0xd17d27=this['bindTemplate'],_0x1a1416=function(_0x81a34,_0x1bd43e){const _0x45f71d=Array['from'](_0x1bd43e['authors'])['filter'](_0x19a1fa=>_0x19a1fa!=_0x1bd43e['creator']);return _0x1bd43e['creator']&&_0x45f71d['unshift'](_0x1bd43e['creator']),_0x45f71d['map'](_0x49c93a=>new si(_0x81a34,_0x49c93a,_0x49c93a==_0x1bd43e['creator']));}(_0x2db55f,_0x2c6ddd);this['id']=_0x2c6ddd['id'],this['_revision']=_0x2c6ddd,this['_requireRevisionName']=_0x1f7c10,this['bind']('name','createdAt')['to'](_0x2c6ddd),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x154f1e=>{return _0x37c93b=_0x2db55f['uiLanguage'],(_0x520e70=_0x154f1e)['toLocaleDateString'](_0x37c93b,{'month':'long','day':'numeric'})+',\x20'+_0x520e70['toLocaleTimeString'](_0x37c93b,{'hour':'numeric','minute':'numeric'});var _0x37c93b,_0x520e70;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new at(_0x2db55f,_0x569563),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x31f24d=>_0x31f24d||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x38c367,_0xe8b6a0)=>_0x38c367&&_0xe8b6a0),this['revisionActionsView']=_0x56140f&&_0x56140f['length']?oi(this,_0x56140f):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xd17d27['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xd17d27['if']('isEnabled','ck-disabled',_0x44b509=>!_0x44b509),_0xd17d27['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xd17d27['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xd17d27['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':_0xd17d27['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':_0x1a1416}]},this['revisionActionsView']],'on':{'click':_0xd17d27['to'](_0x491086=>{_0x491086['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0xa95712=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0xa95712,'change',()=>{this['_requireRevisionName']&&!_0xa95712['value']||this['fire']('setName',{'id':this['id'],'name':_0xa95712['value']}),_0xa95712['value']||(_0xa95712['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ai(_0x2dcc9b,_0x32cd20){const _0x398199=_0x17b3d7['fromJSDate'](_0x2dcc9b)['setLocale'](_0x32cd20),_0x21f5a4=_0x17b3d7['local'](),_0x16545e=_0x21f5a4['minus']({'days':0x1})['startOf']('day');let _0x497e33,_0x153a87;return _0x398199['hasSame'](_0x21f5a4,'day')?(_0x497e33=_0x398199['startOf']('day')['toJSDate'](),_0x153a87=_0x398199['toRelativeCalendar']()):_0x398199['hasSame'](_0x16545e,'day')?(_0x497e33=_0x16545e['toJSDate'](),_0x153a87=_0x398199['toRelativeCalendar']()):_0x398199['hasSame'](_0x21f5a4,'week')?(_0x497e33=_0x398199['startOf']('week')['toJSDate'](),_0x153a87=_0x398199['weekdayLong']||''):_0x398199['hasSame'](_0x21f5a4,'year')?(_0x497e33=_0x398199['startOf']('month')['toJSDate'](),_0x153a87=_0x398199['monthLong']||''):(_0x497e33=_0x398199['startOf']('year')['toJSDate'](),_0x153a87=String(_0x398199['year'])),{'startDate':_0x497e33,'localizedPeriodName':_0x153a87};}class di extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1f3280,_0x196df6,_0x46e304,_0x4acffa){super(_0x1f3280);const _0x57d0c6=ai(_0x196df6,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x196df6,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x46e304,this['_requireRevisionName']=_0x4acffa,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':_0x57d0c6}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x5212cd){const _0x33b9c0=new hi(this['locale'],_0x5212cd,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x33b9c0);}['removeRevision'](_0x1a4b27){const _0x2e541d=this['revisionViews']['find'](_0x47c155=>_0x47c155['id']===_0x1a4b27['id']);this['revisionViews']['remove'](_0x2e541d);}}class as extends ts{constructor(_0x2e3421){super(_0x2e3421);const _0x5007d2=new _0x45bd91();_0x5007d2['content']=_0x464ed9,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x5007d2,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[g(_0x2e3421,'Revision\x20history')]}]});}}class ni extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x4c1744,_0x8011e2,_0x4f4a2a,_0x1d2709){super(_0x4c1744);const _0x30d764=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x8011e2,this['_revisionActions']=_0x4f4a2a,this['_requireRevisionName']=_0x1d2709,this['on']('select',(_0x468c60,_0x5af0e6)=>{this['fire']('revisionSelected',_0x5af0e6);}),this['on']('setName',(_0x56458d,_0x35312e)=>{this['fire']('revisionSetName',_0x35312e);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x4c1744),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x30d764['if']('isEnabled','ck-disabled',_0x3f2834=>!_0x3f2834)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x4e1909 of this['_revisions'])this['_addRevision'](_0x4e1909);this['_revisions']['on']('add',(_0x353e88,_0x1ac18e)=>{this['_addRevision'](_0x1ac18e);}),this['_revisions']['on']('remove',(_0x4f7ce0,_0x47e5d9)=>{this['_removeRevision'](_0x47e5d9);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x20238a=>_0x20238a['revisionViews']['map'](_0x31bd72=>_0x31bd72))['flat']();}['selectRevision'](_0x50cf56){for(const _0x4852c8 of this['revisionViews'])_0x50cf56&&_0x50cf56['id']===_0x4852c8['id']?_0x4852c8['select']():_0x4852c8['deselect']();}['highlightRevisions'](_0x22865a){for(const _0x6056ac of this['revisionViews'])_0x22865a['some'](({id:_0x2ff8ea})=>_0x2ff8ea===_0x6056ac['id'])?_0x6056ac['highlight']():_0x6056ac['unhighlight']();}['_addRevision'](_0x562c1e){const _0x359abf=ai(_0x562c1e['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x68dd18=this['timePeriodViews']['get'](0x0);_0x68dd18&&_0x68dd18['startDate']['getTime']()===_0x359abf['getTime']()||(_0x68dd18=new di(this['locale'],_0x359abf,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x68dd18)),_0x68dd18['addRevision'](_0x562c1e);}['_removeRevision'](_0x52d285){const _0xf43981=ai(_0x52d285['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xf43981)['removeRevision'](_0x52d285);}['_getTimePeriodViewByStartDate'](_0xffbdec){return this['timePeriodViews']['find'](_0x32cad0=>_0x32cad0['startDate']['getTime']()===_0xffbdec['getTime']());}}class d extends _0x1f29e4{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
27
27
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
28
- _t();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(_0x447b44){super(_0x447b44),this['_revisionViewer']=_0x447b44['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x148cd2=this['_revisionsRepository']['_revisions'],_0x280796=this['_createRevisionActions'](),_0x1a24ce=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new vi(this['editor']['locale'],_0x148cd2,_0x280796,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',(_0x41f639,_0x69adf9)=>{_0x69adf9['revisionViews']['on']('add',(_0x1bf91c,_0x519eed)=>{_0x519eed['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)),_0x1a24ce['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x229e81=this['_revisionsRepository']['getRevision'](0x0);if(_0x229e81){const _0x136fd5=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x229e81['id']);this['_revisionViewer']['compare'](_0x229e81,_0x136fd5);}}['_handleRevisionSelected'](_0x9b43e6,_0x1b55ed){const _0x5f5879=this['_revisionsRepository']['getRevision'](_0x1b55ed['id']),_0x33b964=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5f5879['id']);this['_revisionViewer']['compare'](_0x5f5879,_0x33b964);}['_handleRevisionSetName'](_0x53d6bf,_0xbbcca2){this['_revisionsRepository']['getRevision'](_0xbbcca2['id'])['setName'](_0xbbcca2['name']);}['_handleDiffChange'](_0x2b0c4e,_0x362689,_0x298eeb){const _0x10c385=this['_revisionsRepository']['getRevisionsInDiff'](_0x298eeb);_0x10c385['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x10c385),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x10c385[0x0]));}['_createRevisionActions'](){const _0x3cd9cc=this['editor'],_0x5d5954=d['availableRevisionActions'],_0x1118ba=_0x3cd9cc['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x1118ba['length'])return _0x1118ba['map'](_0xa0ad8a=>{const _0x5540c6='string'==typeof _0xa0ad8a?Object['assign']({},_0x5d5954[_0xa0ad8a]):_0xa0ad8a;return _0x5540c6['action']=_0x5540c6['action']['bind'](this,_0x3cd9cc),_0x5540c6['isVisible']&&(_0x5540c6['isVisible']=_0x5540c6['isVisible']['bind'](this,_0x3cd9cc)),_0x5540c6;});}}function _t(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x390094},_0x2e9360)=>{const _0x5348b8=_0x390094['get'](m),_0x55d575=_0x5348b8['repository'];let _0x16d2a3=_0x5348b8['diff']['newRevisionId'],_0x42686b=_0x2e9360['id'];_0x55d575['getIndex'](_0x16d2a3)>_0x55d575['getIndex'](_0x42686b)&&([_0x16d2a3,_0x42686b]=[_0x42686b,_0x16d2a3]),_0x5348b8['compare'](_0x16d2a3,_0x42686b);},'isVisible':({plugins:_0x3d0f78},_0x39860a)=>{const _0xeae0b5=_0x3d0f78['get'](m);return!(_0xeae0b5['repository']['getRevisionsInDiff'](_0xeae0b5['diff'])['length']>0x2)&&!_0x39860a['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x246b3a,{id:_0x3ae2bc})=>{_0x246b3a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3ae2bc);},'isVisible':({plugins:_0x14a117},_0x58b150)=>!!_0x14a117['get'](m)['repository']['getLaterVisibleRevision'](_0x58b150['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x702b60},{id:_0x143bf4,revisionNameView:_0x50ca66})=>{const _0x4de0ec=_0x702b60['get'](m),_0xd32ad3=_0x4de0ec['repository']['getEarlierVisibleRevision'](_0x143bf4);_0x4de0ec['compare'](_0x143bf4,_0xd32ad3),_0x50ca66['focus'](),_0x50ca66['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x5d8120,_0xe8e350){super(_0x5d8120),this['_view']=_0xe8e350,this['_toolbarConfig']=et(_0x5d8120['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x16aad8){const _0x566f56=this['editor'],_0x3645fa=this['view'],_0x2f5569=_0x566f56['editing']['view'],_0x345054=_0x3645fa['editable'],_0x21eb4f=_0x2f5569['document']['getRoot']();_0x345054['name']=_0x21eb4f['rootName'],_0x3645fa['render']();const _0x56220b=_0x345054['element'];this['setEditableElement'](_0x345054['name'],_0x56220b),_0x3645fa['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2f5569['attachDomRoot'](_0x56220b),this['_elementReplacer']['replace'](_0x16aad8,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x43a074=this['view'],_0x493c87=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x493c87['detachDomRoot'](_0x43a074['editable']['name']),_0x43a074['destroy']();}['_initToolbar'](){const _0x23741b=this['view'];_0x23741b['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x23741b['stickyPanel']['limiterElement']=_0x23741b['element'],_0x23741b['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x1041f7})=>_0x1041f7),_0x23741b['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x23741b['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x2b8728,_0x584ef7,_0x2b9272={}){super(_0x2b8728),this['stickyPanel']=new ht(_0x2b8728),this['toolbar']=new dt(_0x2b8728,{'shouldGroupWhenFull':_0x2b9272['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x2b8728,_0x584ef7);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class w extends/* #__PURE__ -- @preserve */
29
- _0x50c72a(_0x1c3e4d){['_ui'];get['ui'](){return this['_ui'];}constructor(_0xc34948,_0x4da1bf){super(_0x4da1bf),this['sourceElement']=_0xc34948,this['model']['document']['createRoot']();const _0x3e2f30=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x3e2f30);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0xebdc66,_0x342800){const _0x327dee=new this(_0xebdc66,_0x342800);return await _0x327dee['initPlugins'](),await _0x327dee['ui']['init'](_0xebdc66),await _0x327dee['data']['init'](_0x327dee['config']['get']('initialData')||''),_0x327dee['fire']('ready'),_0x327dee;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class yt extends _0x5e0615{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b6f55){function _0x234c08(_0x3537f2){return _0x3537f2['map'](_0x29e6c9=>String['fromCharCode'](_0x29e6c9))['join']('');}super(_0x2b6f55),this['result']='end',_0x2b6f55[_0x234c08([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x234c08([0x76,0x69,0x65,0x77])][_0x234c08([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x234c08([0x61,0x75,0x74,0x6f]),_0x2b6f55[_0x234c08([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x234c08([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x234c08([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x234c08([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x234c08([0x6f,0x6b])});}}class k extends _0x5e0615{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x12a5e2){if(super(_0x12a5e2),!this['editor']['config']['get']('revisionHistory'))throw new _0x2cfc09('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x14ab42=>this['_showRevisionViewer']({..._0x14ab42,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x73c2de=>this['_closeRevisionViewer'](_0x73c2de)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x295797=>this['_restoreRevision'](_0x295797)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2fd241){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2fd241;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3f6bda){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3f6bda);}['getRevision'](_0x424971){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x424971);}['getRevisions'](_0x3c623e){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3c623e||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x59b3cd=this['editor'],_0x53a771=_0x1cdf73(_0x59b3cd,p),_0x31a427=_0x59b3cd['plugins']['get']('RevisionTracker'),_0x43b671=_0x59b3cd['plugins']['get']('Users')['users'];return _0x53a771['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x53a771['lazyRoots'],(_0x53a771['plugins']['push'](yt,m,R,class extends _0x5e0615{static get['requires'](){return[m,'Users'];}['init'](){const _0x5a6153=this['editor']['plugins']['get']('Users');for(const _0x46496f of _0x43b671)_0x46496f['isAnonymous']||_0x5a6153['getUser'](_0x46496f['id'])||_0x5a6153['addUser'](_0x46496f);const _0x406c44=_0x31a427['repository']['getRevisions']();let _0xe9b0b2=null;const _0x5da40e=this['editor']['plugins']['get']('RevisionViewer');_0x5da40e['adapter']=_0x31a427['adapter'],_0x5da40e['bind']('isEnabled')['to'](_0x31a427),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x59b3cd,'isReadOnly',_0x22c88a=>!_0x22c88a);for(const _0x3ab904 of _0x406c44){const _0x166e15=null===_0x3ab904['creator'];if(_0x166e15&&_0x3ab904['toVersion']===_0x3ab904['fromVersion'])continue;const _0x28bace=_0x3ab904['toJSON']();_0x5da40e['addRevisionData'](_0x28bace,(_0x22b45b,_0x49efeb,_0x1159ba)=>{if(_0x166e15){if(_0xe9b0b2)_0xe9b0b2['_update'](_0x22b45b,_0x49efeb);else{if(!_0x49efeb){const _0x1dc02a=_0x1159ba['toJSON']();_0x1dc02a['id']=_0x21f3e7(),_0x31a427['saveRevision'](_0x1dc02a,_0x1159ba['toVersion'])['then'](_0x1d2201=>{_0xe9b0b2=_0x1d2201;});}}}else _0x3ab904['_update'](_0x22b45b,_0x49efeb);});}}},d),_0x53a771);}['_enhanceShowRevisionViewerCallback'](){const _0x35731f=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x2e0aac=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x148574=this['editor']['plugins']['get']('Autosave');await _0x148574['save']();}else await _0x2e0aac['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x480c55=this['editor']['plugins']['get']('Dialog');_0x480c55['isOpen']&&_0x480c55['hide']();}const _0x3928ed=this['_getRevisionViewerEditorConfig']();return _0x35731f(_0x3928ed)['then'](_0x33a800=>{return(this['_viewerEditor']=_0x33a800,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x33a800);})['catch'](_0x3caf12=>(console['error'](_0x3caf12),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x1c74bc=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x1c74bc(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x4be1b0=this['editor']['plugins']['get']('Annotations');_0x4be1b0['refreshVisibility'](),_0x4be1b0['refreshPositioning']();}})));}['_showRevisionViewer'](_0xc9c654){const _0x7e80bc=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x313af3=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1a395f=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x1a395f,_0xc9c654)['then'](_0x28f005=>(_0x313af3['style']['display']='block',_0x7e80bc['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x28f005));}['_closeRevisionViewer'](_0x13fd69){const _0x445b05=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x445b05['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x13fd69['destroy']();}async['_restoreRevision'](_0x18e585){const _0x3e41ba=this['editor'],_0x8f5d7b=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x1de706=_0x3e41ba['plugins']['get']('RevisionTracker'),_0xd1f36e=_0x3e41ba['plugins']['get']('RevisionHistoryUtils'),_0x4d8ed4=_0x8f5d7b['repository']['getRevision'](_0x18e585);let _0x3822a6,_0x11f7e7,_0x48a515;try{await _0xd1f36e['loadRevisionData'](_0x4d8ed4,this['adapter']),_0x3822a6=_0xd1f36e['getRevisionDocumentData'](_0x4d8ed4),_0x11f7e7=_0xd1f36e['getRevisionRootsAttributes'](_0x4d8ed4);}catch(_0x3e66f){return void console['error'](_0x3e66f);}_0x3e41ba['model']['change'](_0x4979b0=>{for(const _0x2abd6c of Array['from'](_0x3e41ba['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x4979b0['removeMarker'](_0x2abd6c);}),_0x8f5d7b['isReady']=!0x1,_0x3e41ba['model']['enqueueChange'](_0x1498d6=>{_0x1498d6['setSelection'](null),_0x1498d6['removeSelectionAttribute'](_0x3e41ba['model']['document']['selection']['getAttributeKeys']());const _0x1b7c0f=Object['keys'](_0x3822a6);for(const _0x49a1bb of _0x3e41ba['model']['document']['roots'])'$graveyard'!=_0x49a1bb['rootName']&&_0x49a1bb['isAttached']()&&!_0x1b7c0f['includes'](_0x49a1bb['rootName'])&&_0x1498d6['detachRoot'](_0x49a1bb);for(const _0x530202 of _0x1b7c0f){let _0x4c0652=_0x3e41ba['model']['document']['getRoot'](_0x530202);_0x4c0652&&_0x4c0652['isAttached']()||(_0x4c0652=_0x1498d6['addRoot'](_0x530202));const _0x5686c6=_0x11f7e7[_0x530202],_0x3efd45=Object['keys'](_0x5686c6),_0x4a618e=_0x3822a6[_0x530202];for(const _0x49ba4f of _0x4c0652['getAttributeKeys']())_0x3efd45['includes'](_0x49ba4f)||_0x1498d6['removeAttribute'](_0x49ba4f,_0x4c0652);for(const _0x34df73 of _0x3efd45)_0x1498d6['setAttribute'](_0x34df73,_0x11f7e7[_0x530202][_0x34df73],_0x4c0652);_0x1498d6['remove'](_0x1498d6['createRangeIn'](_0x4c0652)),_0x1498d6['insert'](_0x3e41ba['data']['parse'](_0x4a618e,_0x4c0652),_0x4c0652,0x0);}});const _0x4892e1=g(_0x3e41ba['locale'],'Restored');if(_0x4d8ed4['name'])_0x48a515=-0x1==_0x4d8ed4['name']['indexOf'](_0x4892e1)?_0x4892e1+':\x20'+_0x4d8ed4['name']:_0x4d8ed4['name'];else _0x48a515=_0x4892e1+':\x20'+(_0x4d8ed4['createdAt']['toLocaleDateString'](_0x3e41ba['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x4d8ed4['createdAt']['toLocaleTimeString'](_0x3e41ba['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x1de706['saveRevision']({'name':_0x48a515}),_0x8f5d7b['isReady']=!0x0,_0x3e41ba['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,le as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};
28
+ pt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[m];}constructor(_0x48ea13){super(_0x48ea13),this['_revisionViewer']=_0x48ea13['plugins']['get'](m),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0xb0421e=this['_revisionsRepository']['_revisions'],_0x2db7cb=this['_createRevisionActions'](),_0x1ebb25=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ni(this['editor']['locale'],_0xb0421e,_0x2db7cb,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',(_0x5b57dc,_0x427a99)=>{_0x427a99['revisionViews']['on']('add',(_0x453b78,_0x5131fe)=>{_0x5131fe['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)),_0x1ebb25['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x18b45b=this['_revisionsRepository']['getRevision'](0x0);if(_0x18b45b){const _0x5e9212=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x18b45b['id']);this['_revisionViewer']['compare'](_0x18b45b,_0x5e9212);}}['_handleRevisionSelected'](_0xa64eb1,_0x1f1b62){const _0x44535e=this['_revisionsRepository']['getRevision'](_0x1f1b62['id']),_0x34b8c0=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x44535e['id']);this['_revisionViewer']['compare'](_0x44535e,_0x34b8c0);}['_handleRevisionSetName'](_0x20f88f,_0x62f9ba){this['_revisionsRepository']['getRevision'](_0x62f9ba['id'])['setName'](_0x62f9ba['name']);}['_handleDiffChange'](_0x16e6fe,_0x4c39e2,_0x299598){const _0x5a405d=this['_revisionsRepository']['getRevisionsInDiff'](_0x299598);_0x5a405d['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x5a405d),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x5a405d[0x0]));}['_createRevisionActions'](){const _0x155612=this['editor'],_0x17cd7b=d['availableRevisionActions'],_0x5307ce=_0x155612['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x5307ce['length'])return _0x5307ce['map'](_0x817d39=>{const _0x1a90a1='string'==typeof _0x817d39?Object['assign']({},_0x17cd7b[_0x817d39]):_0x817d39;return _0x1a90a1['action']=_0x1a90a1['action']['bind'](this,_0x155612),_0x1a90a1['isVisible']&&(_0x1a90a1['isVisible']=_0x1a90a1['isVisible']['bind'](this,_0x155612)),_0x1a90a1;});}}function pt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x3549c3},_0x18b757)=>{const _0xed050c=_0x3549c3['get'](m),_0x3fdf1c=_0xed050c['repository'];let _0x46d7d4=_0xed050c['diff']['newRevisionId'],_0xf51d78=_0x18b757['id'];_0x3fdf1c['getIndex'](_0x46d7d4)>_0x3fdf1c['getIndex'](_0xf51d78)&&([_0x46d7d4,_0xf51d78]=[_0xf51d78,_0x46d7d4]),_0xed050c['compare'](_0x46d7d4,_0xf51d78);},'isVisible':({plugins:_0x8bfb90},_0x3e74cf)=>{const _0x17b513=_0x8bfb90['get'](m);return!(_0x17b513['repository']['getRevisionsInDiff'](_0x17b513['diff'])['length']>0x2)&&!_0x3e74cf['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0xb4f1ee,{id:_0x2eb620})=>{_0xb4f1ee['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2eb620);},'isVisible':({plugins:_0x3e0fe5},_0x3a4ec4)=>!!_0x3e0fe5['get'](m)['repository']['getLaterVisibleRevision'](_0x3a4ec4['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0xe62976},{id:_0x2b8cd5,revisionNameView:_0x11ddd5})=>{const _0x1c288e=_0xe62976['get'](m),_0x51ba1c=_0x1c288e['repository']['getEarlierVisibleRevision'](_0x2b8cd5);_0x1c288e['compare'](_0x2b8cd5,_0x51ba1c),_0x11ddd5['focus'](),_0x11ddd5['fieldView']['select']();}}};}class tt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x39f8ee,_0x125b9e){super(_0x39f8ee),this['_view']=_0x125b9e,this['_toolbarConfig']=et(_0x39f8ee['config']['get']('toolbar')),this['_elementReplacer']=new ot();}get['element'](){return this['view']['element'];}['init'](_0x5af6ea){const _0x19eaea=this['editor'],_0x5422bb=this['view'],_0x25f36c=_0x19eaea['editing']['view'],_0x1908c8=_0x5422bb['editable'],_0x35c740=_0x25f36c['document']['getRoot']();_0x1908c8['name']=_0x35c740['rootName'],_0x5422bb['render']();const _0x353047=_0x1908c8['element'];this['setEditableElement'](_0x1908c8['name'],_0x353047),_0x5422bb['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x25f36c['attachDomRoot'](_0x353047),this['_elementReplacer']['replace'](_0x5af6ea,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x51e635=this['view'],_0xef3c4c=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0xef3c4c['detachDomRoot'](_0x51e635['editable']['name']),_0x51e635['destroy']();}['_initToolbar'](){const _0x13e693=this['view'];_0x13e693['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x13e693['stickyPanel']['limiterElement']=_0x13e693['element'],_0x13e693['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x254420})=>_0x254420),_0x13e693['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x13e693['toolbar']);}}class it extends rt{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x50b8d2,_0x590b88,_0x144e7a={}){super(_0x50b8d2),this['stickyPanel']=new ht(_0x50b8d2),this['toolbar']=new dt(_0x50b8d2,{'shouldGroupWhenFull':_0x144e7a['shouldToolbarGroupWhenFull']}),this['_editable']=new ct(_0x50b8d2,_0x590b88);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class w extends/* #__PURE__ -- @preserve */
29
+ _0x4028e0(_0x3b54a3){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x2c7288,_0x2f60d8){super(_0x2f60d8),this['sourceElement']=_0x2c7288,this['model']['document']['createRoot']();const _0x3e02b6=new it(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new tt(this,_0x3e02b6);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x16b3f5,_0x499996){const _0x537331=new this(_0x16b3f5,_0x499996);return await _0x537331['initPlugins'](),await _0x537331['ui']['init'](_0x16b3f5),await _0x537331['data']['init'](_0x537331['config']['get']('initialData')||''),_0x537331['fire']('ready'),_0x537331;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class _t extends _0x1f29e4{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2df2f4){function _0x2d7694(_0x3f539f){return _0x3f539f['map'](_0x567d0f=>String['fromCharCode'](_0x567d0f))['join']('');}super(_0x2df2f4),this['result']='end',_0x2df2f4[_0x2d7694([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2d7694([0x76,0x69,0x65,0x77])][_0x2d7694([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2d7694([0x61,0x75,0x74,0x6f]),_0x2df2f4[_0x2d7694([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2d7694([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2d7694([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2d7694([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2d7694([0x6f,0x6b])});}}class k extends _0x1f29e4{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x16100f){if(super(_0x16100f),!this['editor']['config']['get']('revisionHistory'))throw new _0x1b9b5d('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x136c5c=>this['_showRevisionViewer']({..._0x136c5c,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x195dab=>this['_closeRevisionViewer'](_0x195dab)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x56f058=>this['_restoreRevision'](_0x56f058)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4234d4){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4234d4;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x5dce74){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x5dce74);}['getRevision'](_0x1ff9f5){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1ff9f5);}['getRevisions'](_0x4ef20b){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x4ef20b||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x193acf=this['editor'],_0x4b141c=_0x28136c(_0x193acf,p),_0x1fc378=_0x193acf['plugins']['get']('RevisionTracker'),_0x182905=_0x193acf['plugins']['get']('Users')['users'];return _0x4b141c['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x4b141c['lazyRoots'],(_0x4b141c['plugins']['push'](_t,m,R,class extends _0x1f29e4{static get['requires'](){return[m,'Users'];}['init'](){const _0x279128=this['editor']['plugins']['get']('Users');for(const _0x387746 of _0x182905)_0x387746['isAnonymous']||_0x279128['getUser'](_0x387746['id'])||_0x279128['addUser'](_0x387746);const _0x184a61=_0x1fc378['repository']['getRevisions']();let _0x122827=null;const _0x589f58=this['editor']['plugins']['get']('RevisionViewer');_0x589f58['adapter']=_0x1fc378['adapter'],_0x589f58['bind']('isEnabled')['to'](_0x1fc378),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x193acf,'isReadOnly',_0x3eb71b=>!_0x3eb71b);for(const _0x322d2f of _0x184a61){const _0x22580d=null===_0x322d2f['creator'];if(_0x22580d&&_0x322d2f['toVersion']===_0x322d2f['fromVersion'])continue;const _0x1c9e12=_0x322d2f['toJSON']();_0x589f58['addRevisionData'](_0x1c9e12,(_0x11f2ef,_0x31569c,_0xc1de38)=>{if(_0x22580d){if(_0x122827)_0x122827['_update'](_0x11f2ef,_0x31569c);else{if(!_0x31569c){const _0x114379=_0xc1de38['toJSON']();_0x114379['id']=_0x28066b(),_0x1fc378['saveRevision'](_0x114379,_0xc1de38['toVersion'])['then'](_0x3b87ec=>{_0x122827=_0x3b87ec;});}}}else _0x322d2f['_update'](_0x11f2ef,_0x31569c);});}}},d),_0x4b141c);}['_enhanceShowRevisionViewerCallback'](){const _0x78b6df=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x195081=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0xdda0bf=this['editor']['plugins']['get']('Autosave');await _0xdda0bf['save']();}else await _0x195081['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x22f777=this['editor']['plugins']['get']('Dialog');_0x22f777['isOpen']&&_0x22f777['hide']();}const _0x4e034e=this['_getRevisionViewerEditorConfig']();return _0x78b6df(_0x4e034e)['then'](_0x44f828=>{return(this['_viewerEditor']=_0x44f828,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x44f828);})['catch'](_0x18d0c6=>(console['error'](_0x18d0c6),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0xa91a25=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0xa91a25(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x485143=this['editor']['plugins']['get']('Annotations');_0x485143['refreshVisibility'](),_0x485143['refreshPositioning']();}})));}['_showRevisionViewer'](_0x6ab139){const _0xcdf418=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xc53759=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3d6979=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return w['create'](_0x3d6979,_0x6ab139)['then'](_0x56d746=>(_0xc53759['style']['display']='block',_0xcdf418['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x56d746));}['_closeRevisionViewer'](_0x504ba8){const _0x476084=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x476084['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x504ba8['destroy']();}async['_restoreRevision'](_0x22d6b2){const _0x1c45fa=this['editor'],_0x3a97a4=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x317bdf=_0x1c45fa['plugins']['get']('RevisionTracker'),_0x246dc7=_0x1c45fa['plugins']['get']('RevisionHistoryUtils'),_0x3e5eb1=_0x3a97a4['repository']['getRevision'](_0x22d6b2);let _0x76b1f9,_0x376680,_0x11e113;try{await _0x246dc7['loadRevisionData'](_0x3e5eb1,this['adapter']),_0x76b1f9=_0x246dc7['getRevisionDocumentData'](_0x3e5eb1),_0x376680=_0x246dc7['getRevisionRootsAttributes'](_0x3e5eb1);}catch(_0x315633){return void console['error'](_0x315633);}_0x1c45fa['model']['change'](_0x98f120=>{for(const _0xb30fa9 of Array['from'](_0x1c45fa['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x98f120['removeMarker'](_0xb30fa9);}),_0x3a97a4['isReady']=!0x1,_0x1c45fa['model']['enqueueChange'](_0x51fd71=>{_0x51fd71['setSelection'](null),_0x51fd71['removeSelectionAttribute'](_0x1c45fa['model']['document']['selection']['getAttributeKeys']());const _0x3b9d94=Object['keys'](_0x76b1f9);for(const _0x52eed7 of _0x1c45fa['model']['document']['roots'])'$graveyard'!=_0x52eed7['rootName']&&_0x52eed7['isAttached']()&&!_0x3b9d94['includes'](_0x52eed7['rootName'])&&_0x51fd71['detachRoot'](_0x52eed7);for(const _0x4dc9c1 of _0x3b9d94){let _0x4e8b5f=_0x1c45fa['model']['document']['getRoot'](_0x4dc9c1);_0x4e8b5f&&_0x4e8b5f['isAttached']()||(_0x4e8b5f=_0x51fd71['addRoot'](_0x4dc9c1));const _0x452777=_0x376680[_0x4dc9c1],_0x5cbf31=Object['keys'](_0x452777),_0x439daa=_0x76b1f9[_0x4dc9c1];for(const _0x5ceefb of _0x4e8b5f['getAttributeKeys']())_0x5cbf31['includes'](_0x5ceefb)||_0x51fd71['removeAttribute'](_0x5ceefb,_0x4e8b5f);for(const _0x158519 of _0x5cbf31)_0x51fd71['setAttribute'](_0x158519,_0x376680[_0x4dc9c1][_0x158519],_0x4e8b5f);_0x51fd71['remove'](_0x51fd71['createRangeIn'](_0x4e8b5f)),_0x51fd71['insert'](_0x1c45fa['data']['parse'](_0x439daa,_0x4e8b5f),_0x4e8b5f,0x0);}});const _0x57e879=g(_0x1c45fa['locale'],'Restored');if(_0x3e5eb1['name'])_0x11e113=-0x1==_0x3e5eb1['name']['indexOf'](_0x57e879)?_0x57e879+':\x20'+_0x3e5eb1['name']:_0x3e5eb1['name'];else _0x11e113=_0x57e879+':\x20'+(_0x3e5eb1['createdAt']['toLocaleDateString'](_0x1c45fa['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x3e5eb1['createdAt']['toLocaleTimeString'](_0x1c45fa['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x317bdf['saveRevision']({'name':_0x11e113}),_0x3a97a4['isReady']=!0x0,_0x1c45fa['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,V as RevisionHistoryUtils,u as RevisionTracker,m as RevisionViewer,w as RevisionViewerEditor,ge as RevisionViewerLoadingOverlay,R as RevisionViewerUI,I as RevisionsRepository,d as RevisionsSidebar};