@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250628.0 → 0.0.0-nightly-20250629.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.
package/dist/index.js CHANGED
@@ -20,11 +20,11 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x102d2d,uid as _0x110b69,Collection as _0x2932fe,logWarning as _0x1b8e48,FocusTracker as _0x5b8764,KeystrokeHandler as _0x4b1995,scrollViewportToShowTarget as _0x48b0bc,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x445621}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x36350a,set as _0x185dbc,unset as _0x1162a1,isEqual as _0x17d403}from'es-toolkit/compat';import{Plugin as _0x1b0770,PendingActions as _0x29ef8f,Command as _0x362a1c,ElementApiMixin as _0x4f81ca,Editor as _0x6899c6}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x1bf0af,getMarkerDomElement as _0x36b713,ConfirmMixin as _0x129c20,sanitizeEditorConfig as _0x2fc667}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x33051c,ViewAttributeElement as _0x470aa2,ViewEmptyElement as _0x5db5a7,ViewRawElement as _0x332200,ViewUIElement as _0xd046ad,ViewDocumentFragment as _0x514863,ViewText as _0x5685d4,ViewElement as _0xcc132e,ModelElement as _0x49cb5a,ModelRange as _0x273655,ModelPosition as _0x448e9f,ModelDocumentFragment as _0xa9a204,ModelText as _0x230507}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x3798b7,IconChevronUp as _0x2a2b9a,IconChevronDown as _0x2059f4,IconUndo as _0x15f8d8,IconUser as _0x9a293d,IconThreeVerticalDots as _0xdfdef5}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x40f13f,View as _0x1f9cbc,submitHandler as _0x73e3d7,LabeledFieldView as ti,createLabeledInputText as _0x589633,createDropdown as _0x4b88dd,ListView as _0x6834e9,ListItemView as _0x5bce97,ButtonView as _0x59d9b3,MenuBarMenuView as _0x5e1b9c,MenuBarMenuListView as _0x30723a,MenuBarMenuListItemView as _0x4736a6,MenuBarMenuListItemButtonView as _0xede9e2,ContextualBalloon as _0x554bda,ToolbarSeparatorView as _0x55537b,IconView as _0x54d177,addListToDropdown as _0x298d82,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0xe4dc5f,StickyPanelView as _0x22a7d6,ToolbarView as _0xdfb049,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x1d7304}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x102d2d(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x2a7e77){super(),this['id']=_0x2a7e77['id']||_0x110b69(),this['creator']=_0x2a7e77['creator']||null,this['authors']=_0x2a7e77['authors']||[],this['diffData']=_0x2a7e77['diffData']||null,this['toVersion']=_0x2a7e77['toVersion']||0x0,this['fromVersion']=_0x2a7e77['fromVersion']||0x0,this['set']('name',_0x2a7e77['name']||''),this['set']('createdAt',_0x2a7e77['createdAt']||new Date()),this['set']('attributes',_0x2a7e77['attributes']||{});}['setName'](_0x36de9f){this['_update']({'name':_0x36de9f});}['setAttribute'](_0xe899c2,_0x117107){const _0x39dbf5=_0x36350a(this['attributes']);_0x185dbc(_0x39dbf5,_0xe899c2,_0x117107),this['_update']({'attributes':_0x39dbf5});}['removeAttribute'](_0x4b6189){const _0x6d1d70=_0x36350a(this['attributes']);_0x1162a1(_0x6d1d70,_0x4b6189),this['_update']({'attributes':_0x6d1d70});}['_update'](_0x5cab11,_0x38d75a=!0x1){let _0x52918a=!0x1;const _0x5d6bcb={'id':this['id']},_0x510ace=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x2e929 of _0x510ace){const _0x28d91a=_0x5cab11[_0x2e929];void 0x0!==_0x28d91a&&_0x28d91a!==this[_0x2e929]&&(this[_0x2e929]=_0x28d91a,_0x5d6bcb[_0x2e929]=_0x28d91a,_0x52918a=!0x0);}_0x52918a&&(_0x5d6bcb['authors']&&(_0x5d6bcb['authorsIds']=_0x5d6bcb['authors']['map'](_0x89db59=>_0x89db59['id']),delete _0x5d6bcb['authors']),this['fire']('_update',_0x5d6bcb,_0x38d75a));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x12c769=>_0x12c769['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x1b0770{['_revisions'];static get['requires'](){return[_0x1bf0af];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x2a7ec0){super(_0x2a7ec0),this['_revisions']=new _0x2932fe();}['afterInit'](){!async function(_0x4e4ba8){const _0x31f28b=_0x1146f8([0x78,0x72,0x69,0x6f,0x4f,0x67,0x41,0x38,0x50,0x4c,0x6b,0x6c,0x75,0x4e,0x30,0x43,0x6a,0x5a,0x6e,0x79,0x55,0x49,0x54,0x51,0x6d,0x65,0x64,0x76,0x46,0x62,0x56,0x57,0x58,0x45,0x42,0x44,0x35,0x31,0x61,0x37,0x48,0x7a,0x53,0x33,0x39,0x70,0x4d,0x34,0x68,0x66,0x4a,0x77,0x32,0x4b,0x74,0x47,0x63,0x59,0x52,0x36,0x71,0x73]),_0x385834=0xeb829,_0x456684=0x4d3d60d4,_0x257e69=0x4d3a0cdc^_0x456684,_0x8e651f=window[_0x1146f8([0x44,0x61,0x74,0x65])][_0x1146f8([0x6e,0x6f,0x77])](),_0x2b39a3=_0x4e4ba8[_0x1146f8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x13c863=new window[(_0x1146f8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3279e6=>{_0x2b39a3[_0x1146f8([0x6f,0x6e,0x63,0x65])](_0x1146f8([0x72,0x65,0x61,0x64,0x79]),_0x3279e6);}),_0x388af0={[_0x1146f8([0x6b,0x74,0x79])]:_0x1146f8([0x45,0x43]),[_0x1146f8([0x75,0x73,0x65])]:_0x1146f8([0x73,0x69,0x67]),[_0x1146f8([0x63,0x72,0x76])]:_0x1146f8([0x50,0x2d,0x32,0x35,0x36]),[_0x1146f8([0x78])]:_0x1146f8([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]),[_0x1146f8([0x79])]:_0x1146f8([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]),[_0x1146f8([0x61,0x6c,0x67])]:_0x1146f8([0x45,0x53,0x32,0x35,0x36])},_0x3ac57d=_0x2b39a3[_0x1146f8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1146f8([0x67,0x65,0x74])](_0x1146f8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2d3a54(){let _0x5f1cb1,_0x545a77=null,_0x3ab9a7=null;try{if(_0x3ac57d==_0x1146f8([0x47,0x50,0x4c]))return _0x1146f8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5f1cb1=_0x48c2b6(),!_0x5f1cb1)return _0x1146f8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5f1cb1[_0x1146f8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3ab9a7=_0x18e827(_0x5f1cb1[_0x1146f8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5f1cb1[_0x1146f8([0x6a,0x74,0x69])])),await _0xec1eab()?_0x1a1fe0()?_0x2d6c47()?_0x1146f8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x56e201()?(_0x5f1cb1[_0x1146f8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1146f8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x545a77=_0x108adf(_0x1146f8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5f1cb1[_0x1146f8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1146f8([0x74,0x72,0x69,0x61,0x6c])&&(_0x545a77=_0x108adf(_0x1146f8([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x139cc7()):_0x1146f8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1146f8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1146f8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1146f8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2d6c47(){const _0x1fa506=[_0x1146f8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1146f8([0x74,0x72,0x69,0x61,0x6c])][_0x1146f8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5f1cb1[_0x1146f8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x8e651f/0x3e8:0xe10*_0x257e69;return _0x5f1cb1[_0x1146f8([0x65,0x78,0x70])]<_0x1fa506;}function _0x1a1fe0(){const _0x3fb2bf=_0x5f1cb1[_0x1146f8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x3fb2bf)return!0x1;if(_0x3fb2bf[_0x1146f8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1146f8([0x2a])))return!0x0;if(_0x3fb2bf[_0x1146f8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1146f8([0x52,0x48])))return!0x0;if(_0x3fb2bf[_0x1146f8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1146f8([0x52,0x52,0x48]))){if(_0x5c006c())return!0x0;if(_0x3a479f()||_0x429b92())return!0x0;}return!0x1;}function _0x56e201(){const _0x39c52b=_0x5f1cb1[_0x1146f8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x39c52b||0x0==_0x39c52b[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x32aa46}=new URL(window[_0x1146f8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x39c52b[_0x1146f8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32aa46))return!0x0;const _0x2a8747=_0x32aa46[_0x1146f8([0x73,0x70,0x6c,0x69,0x74])](_0x1146f8([0x2e]));return _0x39c52b[_0x1146f8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4d302f=>_0x4d302f[_0x1146f8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1146f8([0x2a])))[_0x1146f8([0x6d,0x61,0x70])](_0x3efa80=>_0x3efa80[_0x1146f8([0x73,0x70,0x6c,0x69,0x74])](_0x1146f8([0x2e])))[_0x1146f8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xe64616=>_0xe64616[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2a8747[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1146f8([0x6d,0x61,0x70])](_0x12971c=>Array(_0x2a8747[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x12971c[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1146f8([0x66,0x69,0x6c,0x6c])](_0x12971c[0x0]===_0x1146f8([0x2a])?_0x1146f8([0x2a]):'')[_0x1146f8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x12971c))[_0x1146f8([0x73,0x6f,0x6d,0x65])](_0x20d121=>_0x2a8747[_0x1146f8([0x65,0x76,0x65,0x72,0x79])]((_0x160247,_0x255d34)=>_0x20d121[_0x255d34]===_0x160247||_0x20d121[_0x255d34]===_0x1146f8([0x2a])));}function _0x139cc7(){return _0x545a77&&_0x3ab9a7?new window[(_0x1146f8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x180ded,_0x4e35da)=>{_0x545a77[_0x1146f8([0x74,0x68,0x65,0x6e])](_0x180ded,_0x4e35da),_0x3ab9a7[_0x1146f8([0x74,0x68,0x65,0x6e])](_0xaf3684=>{_0xaf3684!=_0x1146f8([0x56,0x61,0x6c,0x69,0x64])&&_0x180ded(_0xaf3684);},_0x4e35da);}):_0x545a77||_0x3ab9a7||_0x1146f8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x18e827(_0x10dee9,_0x54e18a){return new window[(_0x1146f8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x306d19=>{if(_0x5b8cc3())return _0x306d19(_0x1146f8([0x56,0x61,0x6c,0x69,0x64]));_0x5698ae(),_0x2b39a3[_0x1146f8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1146f8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xaac7cb=!0x1;const _0x2a3ecd=_0x110b69();function _0x215ad7(_0x331a2d){return!!_0x331a2d&&(typeof _0x331a2d===_0x1146f8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x331a2d===_0x1146f8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x331a2d[_0x1146f8([0x74,0x68,0x65,0x6e])]===_0x1146f8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x331a2d[_0x1146f8([0x63,0x61,0x74,0x63,0x68])]===_0x1146f8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4a9677(_0x46042b){_0x1af57e(_0x46042b)[_0x1146f8([0x74,0x68,0x65,0x6e])](_0x3c5361=>{if(!_0x3c5361||_0x3c5361[_0x1146f8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1146f8([0x6f,0x6b]))return _0x1146f8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x8cd834(_0x530977(_0x2a3ecd+_0x54e18a))!=_0x3c5361[_0x1146f8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1146f8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1146f8([0x56,0x61,0x6c,0x69,0x64]);})[_0x1146f8([0x74,0x68,0x65,0x6e])](_0x5b9469=>(_0x3e277f(),_0x5b9469),()=>{const _0x3aa35a=_0x1e441e();return null==_0x3aa35a?(_0x3e277f(),_0x1146f8([0x56,0x61,0x6c,0x69,0x64])):_0x1146f8(_0x8e651f-_0x3aa35a>(0x6931e4d4^_0x456684)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1146f8([0x74,0x68,0x65,0x6e])](_0x306d19)[_0x1146f8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x306d19(_0x1146f8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5735e0=0x4d0b8e54^_0x456684;function _0x3e277f(){const _0x2120ce=_0x1146f8([0x6c,0x6c,0x63,0x74,0x2d])+_0x8cd834(_0x530977(_0x10dee9)),_0xf6ffd3=_0x463ebb(_0x8cd834(window[_0x1146f8([0x4d,0x61,0x74,0x68])][_0x1146f8([0x63,0x65,0x69,0x6c])](_0x8e651f/_0x5735e0)));window[_0x1146f8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1146f8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2120ce,_0xf6ffd3);}function _0x1e441e(){const _0x2f48ab=_0x1146f8([0x6c,0x6c,0x63,0x74,0x2d])+_0x8cd834(_0x530977(_0x10dee9)),_0x14a493=window[_0x1146f8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1146f8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2f48ab);return _0x14a493?window[_0x1146f8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x463ebb(_0x14a493),0x10)*_0x5735e0:null;}function _0x1af57e(_0x1cc620){return new window[(_0x1146f8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1dfb5d,_0x3de6ed)=>{_0x1cc620[_0x1146f8([0x74,0x68,0x65,0x6e])](_0x1dfb5d,_0x3de6ed),window[_0x1146f8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3de6ed,0x4d3cb414^_0x456684);});}}_0x2b39a3[_0x1146f8([0x6f,0x6e])](_0x1146f8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x10f0b3,_0x212c9f)=>{if(_0x212c9f[0x0]!=_0x10dee9)return _0x306d19(_0x1146f8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x212c9f[0x1]={..._0x212c9f[0x1],[_0x1146f8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2a3ecd};},{[_0x1146f8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1146f8([0x68,0x69,0x67,0x68])}),_0x2b39a3[_0x1146f8([0x6f,0x6e])](_0x1146f8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x933cc0=>{_0x215ad7(_0x933cc0[_0x1146f8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xaac7cb=!0x0,_0x4a9677(_0x933cc0[_0x1146f8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1146f8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1146f8([0x6c,0x6f,0x77])}),_0x13c863[_0x1146f8([0x74,0x68,0x65,0x6e])](()=>{_0xaac7cb||_0x306d19(_0x1146f8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5b8cc3(){return _0x2b39a3[_0x1146f8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1146f8([0x76,0x69,0x65,0x77])][_0x1146f8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1146f8([0x61,0x75,0x74,0x6f]);}function _0x5698ae(){_0x2b39a3[_0x1146f8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1146f8([0x76,0x69,0x65,0x77])][_0x1146f8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1146f8([0x61,0x75,0x74,0x6f]);}}function _0x108adf(_0x430ce9){const _0x2632e2=[new window[(_0x1146f8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3cba83=>setTimeout(_0x3cba83,0x4d345e18^_0x456684)),_0x13c863[_0x1146f8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1146f8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x493463=>{const _0x1e38ad=0x4d3d60d3^_0x456684,_0x229342=_0x4e4ba8[_0x1146f8([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x306a54(){_0x229342[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x1e38ad&&_0x493463();}_0x306a54(),_0x229342[_0x1146f8([0x6f,0x6e])](_0x1146f8([0x61,0x64,0x64]),_0x306a54);})),new window[(_0x1146f8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x564c67=>{function _0x2318ff(){for(const _0x1f32af in window)if(window[_0x1146f8([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x1146f8([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x1f32af))&&window[_0x1f32af]==_0x385834)return _0x564c67();_0x2b39a3[_0x1146f8([0x73,0x74,0x61,0x74,0x65])]!=_0x1146f8([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x1146f8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2318ff,0x4d3d735c^_0x456684);}_0x277672(_0x1146f8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x2318ff();})];return window[_0x1146f8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1146f8([0x72,0x61,0x63,0x65])](_0x2632e2)[_0x1146f8([0x74,0x68,0x65,0x6e])](()=>_0x430ce9);}async function _0x85ade4(){if(await _0x13c863,_0x277672(_0x1146f8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x5be4b4=_0x4e4ba8[_0x1146f8([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x25f60d=_0x4e4ba8[_0x1146f8([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])](_0x5be4b4[_0x1146f8([0x69,0x64])]),_0x20e788=_0x4928c5(_0x1146f8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x20e788[_0x1146f8([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x5be4b4['id'],_0x25f60d?_0x25f60d['id']:null,!0x0),_0x20e788[_0x1146f8([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1146f8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x20e788[_0x1146f8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x20e788[_0x1146f8([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x34326b,void(_0x20e788[_0x1146f8([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x34326b);}if(_0x277672(_0x1146f8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x2e4aa9=_0x4928c5(_0x1146f8([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x2e4aa9[_0x1146f8([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x1146f8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x2e4aa9[_0x1146f8([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x2e4aa9[_0x1146f8([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x34326b,_0x2e4aa9[_0x1146f8([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x34326b;}_0x2b39a3[_0x1146f8([0x6d,0x6f,0x64,0x65,0x6c])][_0x1146f8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x34326b,_0x2b39a3[_0x1146f8([0x6d,0x6f,0x64,0x65,0x6c])][_0x1146f8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x34326b,_0x2b39a3[_0x1146f8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1146f8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5c006c(){return _0x277672(_0x1146f8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4928c5(_0x1146f8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x1146f8([0x73,0x74,0x61,0x74,0x65])]==_0x1146f8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3a479f(){return _0x277672(_0x1146f8([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 _0x429b92(){return _0x277672(_0x1146f8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xaba4b0(_0x272993){const _0x51fa6d=_0x210cdb();_0x2b39a3[_0x51fa6d]=_0x1146f8([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])+_0x272993,_0x272993[_0x1146f8([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x1146f8([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x210cdb()]=_0x385834),_0x272993!=_0x1146f8([0x56,0x61,0x6c,0x69,0x64])&&_0x85ade4();}function _0x210cdb(){const _0xebdd30=window[_0x1146f8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1146f8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1146f8([0x6e,0x6f,0x77])]())[_0x1146f8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1146f8([0x2e]),'');let _0x2b7c1b=_0x1146f8([0x78]);for(let _0x5cda67=0x0;_0x5cda67<_0xebdd30[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5cda67+=0x2){let _0x21314c=window[_0x1146f8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xebdd30[_0x1146f8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5cda67,_0x5cda67+0x2));_0x21314c>=_0x31f28b[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x21314c-=_0x31f28b[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2b7c1b+=_0x31f28b[_0x21314c];}return _0x2b7c1b;}function _0x48c2b6(){const _0x9b1571=_0x3ac57d[_0x1146f8([0x73,0x70,0x6c,0x69,0x74])](_0x1146f8([0x2e]));if(0x3!=_0x9b1571[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xa1e704(_0x9b1571[0x1]);function _0xa1e704(_0x5e889d){const _0x31859e=_0x10bb9e(_0x5e889d);return _0x31859e&&_0x48a47f()?_0x31859e:null;function _0x48a47f(){const _0x287d86=_0x31859e[_0x1146f8([0x6a,0x74,0x69])],_0x138a07=window[_0x1146f8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x287d86[_0x1146f8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x287d86[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x406612={..._0x31859e,[_0x1146f8([0x6a,0x74,0x69])]:_0x287d86[_0x1146f8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x287d86[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x406612[_0x1146f8([0x76,0x63])],_0x530977(_0x406612)==_0x138a07;}}}async function _0xec1eab(){let _0x3f247d=!0x0;try{const _0x47eff7=_0x3ac57d[_0x1146f8([0x73,0x70,0x6c,0x69,0x74])](_0x1146f8([0x2e])),[_0xcf2fe3,_0x125834,_0x15bc81]=_0x47eff7;return _0x267134(_0xcf2fe3),await _0x5c4945(_0xcf2fe3,_0x125834,_0x15bc81),_0x3f247d;}catch{return!0x1;}function _0x267134(_0x5569a4){const _0x27ea28=_0x10bb9e(_0x5569a4);_0x27ea28&&_0x27ea28[_0x1146f8([0x61,0x6c,0x67])]==_0x1146f8([0x45,0x53,0x32,0x35,0x36])||(_0x3f247d=!0x1);}async function _0x5c4945(_0x6df1e2,_0x180104,_0x569bf2){const _0x21aaf=window[_0x1146f8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1146f8([0x66,0x72,0x6f,0x6d])](_0x3d62ed(_0x569bf2),_0x39848e=>_0x39848e[_0x1146f8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x585c5c=new window[(_0x1146f8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1146f8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x6df1e2+_0x1146f8([0x2e])+_0x180104),_0x57e11b=window[_0x1146f8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1146f8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x57e11b)return;const _0x20a13f=await _0x57e11b[_0x1146f8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1146f8([0x6a,0x77,0x6b]),_0x388af0,{[_0x1146f8([0x6e,0x61,0x6d,0x65])]:_0x1146f8([0x45,0x43,0x44,0x53,0x41]),[_0x1146f8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1146f8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1146f8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x57e11b[_0x1146f8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1146f8([0x6e,0x61,0x6d,0x65])]:_0x1146f8([0x45,0x43,0x44,0x53,0x41]),[_0x1146f8([0x68,0x61,0x73,0x68])]:{[_0x1146f8([0x6e,0x61,0x6d,0x65])]:_0x1146f8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x20a13f,_0x21aaf,_0x585c5c)||(_0x3f247d=!0x1);}}function _0x10bb9e(_0x1d0a83){return _0x1d0a83[_0x1146f8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1146f8([0x65,0x79]))?JSON[_0x1146f8([0x70,0x61,0x72,0x73,0x65])](_0x3d62ed(_0x1d0a83)):null;}function _0x3d62ed(_0x5b0019){return window[_0x1146f8([0x61,0x74,0x6f,0x62])](_0x5b0019[_0x1146f8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1146f8([0x2b]))[_0x1146f8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1146f8([0x2f])));}function _0x530977(_0x249643){let _0x505241=0x1505;function _0x50b6ab(_0x3be26a){for(let _0x463234=0x0;_0x463234<_0x3be26a[_0x1146f8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x463234++){const _0x22ad31=_0x3be26a[_0x1146f8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x463234);_0x505241=(_0x505241<<0x5)+_0x505241+_0x22ad31,_0x505241&=_0x505241;}}function _0x10adcf(_0x1517fc){Array[_0x1146f8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1517fc)?_0x1517fc[_0x1146f8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x10adcf):_0x1517fc&&typeof _0x1517fc==_0x1146f8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1146f8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1517fc)[_0x1146f8([0x73,0x6f,0x72,0x74])]()[_0x1146f8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x344b7b,_0x492b76])=>{_0x50b6ab(_0x344b7b),_0x10adcf(_0x492b76);}):_0x50b6ab(window[_0x1146f8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1517fc));}return _0x10adcf(_0x249643),_0x505241>>>0x0;}function _0x8cd834(_0x1211e6){return _0x1211e6[_0x1146f8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1146f8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1146f8([0x30]));}function _0x463ebb(_0x51e9e1){return _0x51e9e1[_0x1146f8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1146f8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1146f8([0x6a,0x6f,0x69,0x6e])]('');}function _0x277672(_0x4640d4){return _0x2b39a3[_0x1146f8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1146f8([0x68,0x61,0x73])](_0x4640d4);}function _0x4928c5(_0x2463c6){return _0x2b39a3[_0x1146f8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x1146f8([0x67,0x65,0x74])](_0x2463c6);}function _0x34326b(){}function _0x1146f8(_0x41ba23){return _0x41ba23['map'](_0x4106ce=>String['fromCharCode'](_0x4106ce))['join']('');}_0xaba4b0(await _0x2d3a54());}(this);}['createRevision'](_0x1b9ebf){const _0x8b974a=this['editor']['plugins']['get']('Users');return new I({'id':_0x1b9ebf['id'],'name':_0x1b9ebf['name'],'creator':_0x1b9ebf['creatorId']?_0x8b974a['getUser'](_0x1b9ebf['creatorId']):null,'diffData':_0x1b9ebf['diffData']||_0x1b9ebf['data'],'authors':_0x1b9ebf['authorsIds']['map'](_0xdbb6cf=>_0x8b974a['getUser'](_0xdbb6cf)),'createdAt':new Date(_0x1b9ebf['createdAt']),'attributes':_0x1b9ebf['attributes'],'fromVersion':_0x1b9ebf['fromVersion'],'toVersion':_0x1b9ebf['toVersion']});}['addRevision'](_0x5d101f,_0x2b0b08=0x0){this['_revisions']['add'](_0x5d101f,_0x2b0b08);}['getRevision'](_0x13acc0){return this['_revisions']['get'](_0x13acc0);}['getRevisions'](_0x5723c4={'toJSON':!0x1}){const _0x48bd50=Array['from'](this['_revisions']);return _0x48bd50['reverse'](),_0x5723c4['toJSON']?_0x48bd50['map'](_0x2ab9fc=>_0x2ab9fc['toJSON']()):_0x48bd50;}['getIndex'](_0x184c5a){return this['_revisions']['getIndex'](_0x184c5a);}['getEarlierVisibleRevision'](_0x40e36b){const [,_0x2e39df]=this['getRevisionsIterator'](_0x40e36b,{'direction':'earlier'});return _0x2e39df;}['getLaterVisibleRevision'](_0x270ba2){const [,_0x475bc4]=this['getRevisionsIterator'](_0x270ba2,{'direction':'later'});return _0x475bc4;}['getRevisionsInDiff'](_0x5ddb17){const _0x32c798=[];for(const _0x33712e of this['getRevisionsIterator'](_0x5ddb17['newRevisionId']))if(_0x32c798['push'](_0x33712e),_0x33712e['id']===_0x5ddb17['oldRevisionId'])break;return _0x32c798;}*['getRevisionsIterator'](_0x5ed556,{direction:_0x58e2ca='earlier',filter:_0x1b9c8b=()=>!0x0}={}){const _0x52da9d='earlier'===_0x58e2ca?0x1:-0x1;let _0x2c2638=this['_revisions']['get'](_0x5ed556),_0x1b68bc=this['getIndex'](_0x2c2638);for(yield _0x2c2638;_0x2c2638;){if(_0x1b68bc+=_0x52da9d,_0x2c2638=this['getRevision'](_0x1b68bc),!_0x2c2638)return;_0x1b9c8b(_0x2c2638)&&(yield _0x2c2638);}}}class $ extends _0x1b0770{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x33051c,'c'],[_0x470aa2,'a'],[_0x5db5a7,'e'],[_0x332200,'r'],[_0xd046ad,'u']]);['_typeCharToViewClass']=new Map([['c',_0x33051c],['a',_0x470aa2],['e',_0x5db5a7],['r',_0x332200],['u',_0xd046ad]]);async['loadRevisionData'](_0xaddd14,_0x2b82b6){if(_0xaddd14['diffData']||!_0x2b82b6)return;const _0x390574=this['editor']['config']['get']('collaboration.channelId'),_0x58721d=await _0x2b82b6['getRevision']({'channelId':_0x390574,'revisionId':_0xaddd14['id']});_0xaddd14['diffData']=_0x58721d['diffData'];}['getRevisionDocumentData'](_0x3fcff7){const _0xe7fe4={};for(const _0x5874a6 in _0x3fcff7['diffData']){if(_0x3fcff7['diffData'][_0x5874a6]['attachChange']&&!_0x3fcff7['diffData'][_0x5874a6]['attachChange']['isAttached'])continue;const _0x3bd43c=this['_removeRevisionMarkers'](JSON['parse'](_0x3fcff7['diffData'][_0x5874a6]['insertions'])),_0x302e0b=this['editor']['editing']['view']['document'],_0x4510be=new _0x514863(_0x302e0b,_0x3bd43c['map'](_0x170ead=>this['_getViewFromDiffObj'](_0x170ead,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0xe7fe4[_0x5874a6]=this['editor']['data']['processor']['toData'](_0x4510be),this['editor']['data']['processor']['useFillerType']('default');}return _0xe7fe4;}['getRevisionRootsAttributes'](_0x522767){const _0x58375d={};for(const _0x1521ed in _0x522767['diffData'])_0x522767['diffData'][_0x1521ed]['attachChange']&&!_0x522767['diffData'][_0x1521ed]['attachChange']['isAttached']||(_0x58375d[_0x1521ed]=_0x522767['diffData'][_0x1521ed]['attributesAfter']||{});return _0x58375d;}['_getTypeCharForViewElement'](_0x599502){return this['_viewClassToTypeChar']['get'](_0x599502['constructor']);}['_getViewFromDiffObj'](_0x41a5d1,_0x4415a1){const _0x19e937=this['editor']['editing']['view']['document'];if('string'==typeof _0x41a5d1)return new _0x5685d4(_0x19e937,_0x41a5d1);{let _0x21bf0f,_0x47f1be;_0x47f1be='u'==_0x41a5d1['type']||'r'==_0x41a5d1['type']?[]:_0x41a5d1['children']['map'](_0x1b76a8=>this['_getViewFromDiffObj'](_0x1b76a8,_0x4415a1));const _0x5e363c=this['_typeCharToViewClass']['get'](_0x41a5d1['type'])||_0xcc132e,_0x2edfd4=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x21bf0f=new _0x5e363c(_0x19e937,_0x41a5d1['name'],_0x41a5d1['attributes'],_0x47f1be),'u'==_0x41a5d1['type']&&_0x41a5d1['children'][0x0]){const _0x552faa=_0x41a5d1['children'][0x0];if(_0x21bf0f['render']=function(_0x4f8803){const _0x3802f0=_0x4f8803['createElement']('div');return _0x3802f0['innerHTML']=_0x552faa,_0x3802f0['childNodes'][0x0];},_0x4415a1){const _0x176f53=new _0x514863(_0x19e937);_0x176f53['_appendChild'](_0x21bf0f);const _0x113d01=Array['from'](_0x2edfd4['viewChildrenToDom'](_0x176f53,{'bind':!0x1})),_0x1eaab4=_0x2edfd4['domDocument']['createElement']('div');_0x1eaab4['append'](..._0x113d01),_0x21bf0f=Array['from'](_0x2edfd4['domChildrenToView'](_0x1eaab4))[0x0];}}else{if('r'==_0x41a5d1['type']&&_0x41a5d1['children'][0x0]){const _0x28557e=_0x41a5d1['children'][0x0];if(_0x21bf0f['render']=function(_0x4a3442){_0x4a3442['innerHTML']=_0x28557e;},_0x4415a1){const _0x48937e=new _0x514863(_0x19e937);_0x48937e['_appendChild'](_0x21bf0f);const _0x334fde=Array['from'](_0x2edfd4['viewChildrenToDom'](_0x48937e,{'bind':!0x1})),_0x2b4766=_0x2edfd4['domDocument']['createElement']('div');_0x2b4766['append'](..._0x334fde);const _0x3e873e=Array['from'](_0x2edfd4['domChildrenToView'](_0x2b4766));_0x3e873e['length']>0x1?_0x21bf0f['_appendChild'](_0x3e873e):_0x21bf0f=_0x3e873e[0x0];}}}if(_0x41a5d1['customProperties']){for(const [_0x11df44,_0x1d8fb1]of _0x41a5d1['customProperties'])_0x21bf0f['_setCustomProperty'](_0x11df44,_0x1d8fb1);}const _0x56f7c6=void 0x0===_0x41a5d1['fillerOffset']?null:_0x41a5d1['fillerOffset'];return null!==_0x56f7c6&&(_0x21bf0f['getFillerOffset']=()=>_0x56f7c6),_0x21bf0f;}}['_makeModelFromViewString'](_0x561724){const _0x38f9bb=JSON['parse'](_0x561724),_0x330375=this['editor']['editing']['view']['document'],_0x360dea=new _0x514863(_0x330375,_0x38f9bb['map'](_0x199beb=>this['_getViewFromDiffObj'](_0x199beb,!0x0)));return this['editor']['data']['toModel'](_0x360dea);}['_removeRevisionMarkers'](_0x48012a){return(_0x48012a=_0x48012a['filter'](_0x54688a=>!_0x54688a['name']||'revision-start'!==_0x54688a['name']&&'revision-end'!==_0x54688a['name']))['forEach'](_0x3c6eef=>{'string'!=typeof _0x3c6eef&&(_0x3c6eef['children']=this['_removeRevisionMarkers'](_0x3c6eef['children']),_0x3c6eef['attributes']=_0x3c6eef['attributes']['filter'](_0x29c51f=>!_0x29c51f[0x0]['startsWith']('data-revision-')));}),_0x48012a;}}function R(_0xf6bce1,_0x47bdac,_0x2f9c73){const t=_0xf6bce1['t'];switch(_0x47bdac){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'},_0x2f9c73);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x2f9c73);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 h extends _0x1b0770{['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[_0x1bf0af,S,$,_0x29ef8f];}constructor(_0x47798e){super(_0x47798e),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x12c80b=_0x110b69();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x12c80b},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 _0x148d44=this['repository']['getRevision'](0x0),_0x2c4c03=_0x148d44&&null===_0x148d44['creator']?_0x148d44:null;if(this['_continueCurrentRevision']=!!_0x2c4c03&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x22c8bc=this['_source']['getCurrentRevisionId'](),_0x105e2a=this['repository']['getRevision'](_0x22c8bc);if(_0x105e2a)this['_startingVersion']=_0x105e2a['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1c0f38=this['_source']['history']['_operations']['find'](_0x549d55=>!_0x549d55['_isInit']),_0x38423c=_0x1c0f38?_0x1c0f38['baseVersion']:this['_source']['history']['version'];_0x148d44?(_0x148d44['toVersion']<_0x38423c&&_0x148d44['_update']({'toVersion':_0x38423c}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2c4c03['id'],this['_startingVersion']=_0x2c4c03['fromVersion']):(this['_startingVersion']=_0x148d44['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x38423c,this['_continueCurrentRevision']=!0x1);}}else _0x2c4c03&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2c4c03['toVersion'],this['editor']['model']['document']['history']['version']),_0x2c4c03['fromVersion']===_0x2c4c03['toVersion']?(0x0!==_0x2c4c03['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2c4c03['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2c4c03['id'],this['_startingVersion']=_0x2c4c03['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',_0x35cbf0=>!_0x35cbf0),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3bc813=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x7c5c83;for(const _0x30a48d in _0x3bc813){const _0x8ea8fc=_0x30a48d,_0x291a8c=_0x3bc813[_0x8ea8fc];if('revisionHistoryLicenseKeyValid'==_0x291a8c||'revisionHistoryLicenseKeyInvalid'==_0x291a8c||'revisionHistoryLicenseKeyExpired'==_0x291a8c||'revisionHistoryLicenseKeyDomainLimit'==_0x291a8c||'revisionHistoryLicenseKeyNotAllowed'==_0x291a8c||'revisionHistoryLicenseKeyEvaluationLimit'==_0x291a8c||'revisionHistoryLicenseKeyTrialLimit'==_0x291a8c||'revisionHistoryLicenseKeyUsageLimit'==_0x291a8c){delete _0x3bc813[_0x8ea8fc],_0x7c5c83=_0x291a8c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x7c5c83&&_0x3bc813['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x7c5c83&&_0x3bc813['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x7c5c83&&_0x3bc813['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x7c5c83&&_0x3bc813['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x7c5c83&&_0x3bc813['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x7c5c83&&_0x3bc813['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x7c5c83&&_0x3bc813['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x32c111=this['repository']['getRevision'](0x0),_0x4f91e5=await this['getRevisionDocumentData'](_0x32c111),_0x429b9f=await this['getRevisionRootsAttributes'](_0x32c111);this['_replaceEditorDataWithRevisionData'](_0x4f91e5,_0x429b9f);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x1a3b50){this['_source']=_0x1a3b50;}async['update'](){const _0x743799=await this['_source']['getLatestVersion']();if(_0x743799>this['currentRevision']['toVersion']){await this['_loadState']();const _0x29f0c5=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x743799});_0x29f0c5['authors']=_0x29f0c5['authorsIds']['map'](_0x42024b=>this['editor']['plugins']['get']('Users')['getUser'](_0x42024b)),this['currentRevision']['_update'](_0x29f0c5);}}async['saveRevision'](_0x4d6fdb={},_0x37776d=null){const _0x575428=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x37776d>this['currentRevision']['toVersion']&&(_0x37776d=null),null===_0x37776d&&(_0x37776d=await this['_source']['getLatestVersion']());const _0x428f45=this['_getFromVersion'](_0x37776d),_0x8b77c9=this['buildRevisionData']({'from':_0x428f45,'to':_0x37776d});if(this['currentRevision']['toVersion']<_0x37776d){const _0x2c6df3=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x37776d,'to':_0x37776d});_0x2c6df3['authors']=[],_0x2c6df3['authorsIds']=[],_0x2c6df3['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2c6df3,!0x0),delete _0x2c6df3['authors'],_0x575428['push'](_0x2c6df3);}_0x4d6fdb['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x4d6fdb['name']=_0x4d6fdb['name']||null,_0x4d6fdb['id']=_0x4d6fdb['id']||_0x110b69(),_0x4d6fdb={..._0x4d6fdb,..._0x8b77c9};const _0x25885b=this['addRevisionData'](_0x4d6fdb);_0x575428['push'](_0x4d6fdb);const _0x5b2845=this['repository']['getIndex'](_0x25885b);if(0x0!==_0x5b2845){const _0x459f66=this['repository']['getRevision'](_0x5b2845-0x1);if(_0x459f66['fromVersion']!==_0x37776d){const _0x43405e=this['_revisionDataBuilder']['getData'](_0x37776d,_0x459f66['toVersion']),_0x1b403d={'id':_0x459f66['id'],'diffData':_0x43405e['diffData'],'authorsIds':_0x43405e['authorsIds'],'authors':_0x43405e['authorsIds']['map'](_0x53a7c2=>this['editor']['plugins']['get']('Users')['getUser'](_0x53a7c2)),'fromVersion':_0x37776d};_0x459f66===this['currentRevision']&&(_0x1b403d['createdAt']=new Date(_0x4d6fdb['createdAt']['getTime']()+0xa)),_0x459f66['_update'](_0x1b403d,!0x0),delete _0x1b403d['authors'],_0x575428['push'](_0x1b403d);}}if(this['adapter']){for(const _0x5d59ee of _0x575428)this['_bufferUpdate'](_0x5d59ee['id'],_0x5d59ee,!0x0);this['sendBufferedUpdates']();}return _0x25885b;}['addRevisionData'](_0x4c1ff0){const _0x595098=this['repository']['createRevision'](_0x4c1ff0);return this['adapter']&&_0x595098['on']('_update',(_0x13508d,_0x147e22,_0x36132e)=>{_0x36132e||(this['_bufferUpdate'](_0x147e22['id'],_0x147e22,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x595098,this['_findInsertionIndex'](_0x595098)),_0x595098;}async['getRevisionDocumentData'](_0x4f6668){return await this['_utils']['loadRevisionData'](_0x4f6668,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4f6668);}async['getRevisionRootsAttributes'](_0x1ebf86){return await this['_utils']['loadRevisionData'](_0x1ebf86,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1ebf86);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x2ad2d7=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1f9f5c=0x0;_0x1f9f5c<_0x2ad2d7['length'];_0x1f9f5c++){const _0x31ec83=_0x2ad2d7[_0x1f9f5c];let _0x3ff18b=!0x1;for(const _0x11c065 of Object['keys'](_0x31ec83))void 0x0===_0x31ec83[_0x11c065]?delete _0x31ec83[_0x11c065]:'id'!==_0x11c065&&(_0x3ff18b=!0x0);_0x3ff18b||(_0x2ad2d7[_0x1f9f5c]=null);}if(_0x2ad2d7=_0x2ad2d7['filter'](_0x59ce24=>null!==_0x59ce24),!_0x2ad2d7['length'])return;for(let _0x2b53a7=0x0;_0x2b53a7<_0x2ad2d7['length'];_0x2b53a7++){const _0x319911=_0x2ad2d7[_0x2b53a7];void 0x0!==_0x319911['fromVersion']&&void 0x0===_0x319911['toVersion']&&(_0x319911['toVersion']=this['repository']['getRevision'](_0x319911['id'])['toVersion']),void 0x0!==_0x319911['toVersion']&&void 0x0===_0x319911['fromVersion']&&(_0x319911['fromVersion']=this['repository']['getRevision'](_0x319911['id'])['fromVersion']);}const _0x8720bc=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x2ad2d7,_0x8720bc)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x566335=>{if(_0x566335){for(const _0x40e7cf of _0x566335)this['setRevisionData']({'id':_0x40e7cf['id'],'createdAt':_0x40e7cf['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0xc61e5d=null,from:_0x56262b=null,to:_0xff3242=null}){_0x56262b=null!==_0x56262b?_0x56262b:_0xc61e5d['fromVersion'],_0xff3242=null!==_0xff3242?_0xff3242:_0xc61e5d['toVersion'];const _0x323f81=this['_revisionDataBuilder']['getData'](_0x56262b,_0xff3242),_0x4bca8f={'diffData':_0x323f81['diffData'],'authorsIds':_0x323f81['authorsIds'],'fromVersion':_0x56262b,'toVersion':_0xff3242};if(!_0xc61e5d||_0xff3242!==_0xc61e5d['toVersion']){const _0x8b640a=_0xff3242-0x1,_0x58b260=this['_source']['history']['getOperation'](_0x8b640a);_0x4bca8f['createdAt']=_0x58b260&&_0x58b260['createdAt']||new Date();}if(this['_loadedStateData']&&_0x56262b===this['_loadedStateData']['fromVersion']){for(const _0x4c42af of this['_loadedStateData']['authors'])_0x4bca8f['authorsIds']['includes'](_0x4c42af['id'])||_0x4bca8f['authorsIds']['push'](_0x4c42af['id']);}return _0x4bca8f;}['_bufferUpdate'](_0x1b4faa,_0x2d8758,_0x32fcae){if(this['_bufferedUpdates']['has'](_0x1b4faa)){const _0x2115f0=this['_bufferedUpdates']['get'](_0x1b4faa);_0x2d8758=_0x32fcae?{..._0x2115f0,..._0x2d8758}:{..._0x2d8758,..._0x2115f0};}this['_bufferedUpdates']['set'](_0x1b4faa,_0x2d8758);}['setRevisionData'](_0x5abd8d){const _0x2fd007=this['repository']['getRevision'](_0x5abd8d['id']);if(_0x5abd8d['createdAt']&&(_0x5abd8d['createdAt']=new Date(_0x5abd8d['createdAt'])),_0x5abd8d['authorsIds']){const _0x4678f5=this['editor']['plugins']['get']('Users');_0x5abd8d['authors']=_0x5abd8d['authorsIds']['map'](_0x2e6e21=>_0x4678f5['getUser'](_0x2e6e21));}_0x2fd007['_update'](_0x5abd8d,!0x0);}['_createInitialRevision'](_0x4e0b87){const _0x2503bd=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x2503bd)this['_initialRevisionId']=_0x2503bd['id'];else{const _0xcbf01f=!this['editor']['model']['document']['roots']['find'](_0x3ba871=>this['editor']['model']['hasContent'](_0x3ba871)),_0x17ae35=this['editor']['plugins']['get']('Users')['me']['id'],_0x173f58=R(this['editor']['locale'],_0xcbf01f?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4e0b87,'to':_0x4e0b87,'id':this['_initialRevisionId'],'name':_0x173f58,'creatorId':_0x17ae35});}}['_createCurrentRevision'](_0x4518c1){const _0x2efadf=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x2efadf),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4518c1,'to':_0x4518c1,'id':_0x2efadf,'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'](_0x1d2b2d,_0x5ef0ea){let _0x192aa7=this['editor']['config']['get']('initialData'),_0x5c8445=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x192aa7){_0x192aa7={};for(const _0x1ce836 of this['editor']['model']['document']['getRootNames']())_0x192aa7[_0x1ce836]='';}if('string'==typeof _0x192aa7&&(_0x192aa7={'main':_0x192aa7}),void 0x0===_0x5c8445){_0x5c8445={};for(const _0x271945 of this['editor']['model']['document']['getRootNames']())_0x5c8445[_0x271945]={};}let _0x2f158e=!0x1;const _0x51dd28=Object['keys'](_0x192aa7),_0x4ecbe2=Object['keys'](_0x1d2b2d);for(const _0x5131cf of _0x51dd28){if(_0x192aa7[_0x5131cf]!==_0x1d2b2d[_0x5131cf]&&''!==_0x192aa7[_0x5131cf]['trim']()){_0x2f158e=!0x0;break;}if(!_0x17d403(_0x5c8445[_0x5131cf],_0x5ef0ea[_0x5131cf])&&Object['keys'](_0x5c8445[_0x5131cf])['length']>0x0){_0x2f158e=!0x0;break;}}_0x2f158e||(_0x2f158e=_0x4ecbe2['some'](_0x1882ac=>!this['editor']['model']['document']['getRoot'](_0x1882ac))),_0x2f158e&&_0x1b8e48('editor-initial-data-replaced-with-revision-data',{'editorData':_0x192aa7,'editorRootsAttributes':_0x5c8445,'revisionData':_0x1d2b2d,'revisionRootsAttributes':_0x5ef0ea}),this['editor']['config']['set']('initialData',_0x1d2b2d),this['editor']['config']['set']('rootsAttributes',_0x5ef0ea);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x420838=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x420838['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x40a23f){const _0x59e967=this['repository']['getRevisions']();_0x59e967['reverse']();let _0x2929d8=0x0;for(;_0x2929d8<_0x59e967['length'];){const _0xeed9bc=_0x59e967[_0x2929d8];if(_0xeed9bc===this['currentRevision']){_0x2929d8++;continue;}if(_0xeed9bc['id']===this['_initialRevisionId'])break;const _0x277da1=_0x40a23f['toVersion']-_0xeed9bc['toVersion']||_0x40a23f['fromVersion']-_0xeed9bc['fromVersion'];if(_0x277da1>0x0)break;if(_0x277da1<0x0)_0x2929d8++;else{if(!_0x40a23f['creator']&&_0xeed9bc['creator'])break;if(_0xeed9bc['creator']||!_0x40a23f['creator']){if(_0x40a23f['createdAt']>_0xeed9bc['createdAt'])break;_0x2929d8++;}else _0x2929d8++;}}return _0x2929d8;}['_getFromVersion'](_0x16b576){const _0xc319a5=this['repository']['getRevisions']();_0xc319a5['reverse'](),_0xc319a5['shift']();const _0x212d09=_0xc319a5['find'](_0x2cfc44=>_0x2cfc44['toVersion']<=_0x16b576)['toVersion'];return _0x212d09<this['_startingVersion']?this['_startingVersion']:_0x212d09;}['_makeRevision']({name:_0x1660d2,from:_0x4080e5,to:_0x1cd0f7,creatorId:_0x27db10,id:_0x527e3c}){const _0x4f7648=this['buildRevisionData']({'from':_0x4080e5,'to':_0x1cd0f7});_0x4f7648['name']=_0x1660d2,_0x4f7648['creatorId']=_0x27db10,_0x4f7648['id']=_0x527e3c;const _0x57b92a=this['addRevisionData'](_0x4f7648);return this['adapter']&&this['_bufferUpdate'](_0x4f7648['id'],_0x4f7648,!0x0),_0x57b92a;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x2ded29){this['editor']=_0x2ded29,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'](_0x374798){this['source']=_0x374798;const _0x2813dd=new Map(),_0x5d6dd8=new Map(),_0x3c4890=this['editor']['model']['document']['roots']['map'](_0x53effa=>_0x53effa['rootName']);for(const _0x540b4f of _0x3c4890){const _0x378e9f=this['editor']['model']['document']['getRoot'](_0x540b4f),_0x1fffeb=x(_0x378e9f);_0x2813dd['set'](_0x540b4f,_0x1fffeb),_0x5d6dd8['set'](_0x540b4f,Object['fromEntries'](_0x378e9f['getAttributes']()));}const _0x530251=Array['from'](this['editor']['model']['markers'])['map'](_0x3d93a3=>[_0x3d93a3['name'],_0x3d93a3['getRange']()]),_0x497a2e=this['source']['version'];this['_saveMetaData'](_0x497a2e,_0x2813dd,_0x530251,_0x5d6dd8),this['_startingRevisionId']=this['_revisionId'];const _0x2594af=new Map(),_0x4df68e=new Map();for(const _0x547231 of _0x3c4890){const _0x1fc75d=N(_0x547231);_0x2594af['set'](_0x547231,_0x1fc75d),_0x4df68e['set'](_0x547231,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2594af,[],_0x4df68e);}['getData'](_0x45b0cc,_0x2ac706){if(this['_lastFrom']===_0x45b0cc&&this['_lastTo']<=_0x2ac706)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2ac706,!0x0);else{if(!this['_savedMetaData']['has'](_0x45b0cc)){const _0x17be4f=this['_getPreviousFrom'](_0x45b0cc);this['_calculateMetaData'](_0x17be4f,_0x45b0cc,!0x1);}this['_calculateMetaData'](_0x45b0cc,_0x2ac706,!0x0);}return this['_lastFrom']=_0x45b0cc,this['_lastTo']=_0x2ac706,this['_getState']();}['loadState'](_0x287fe0){const _0x34cf94=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x287fe0['fromVersion'],this['_lastTo']=_0x287fe0['toVersion'];for(const _0x9fafdf in _0x287fe0['diffData']){const _0xa05fb=_0x287fe0['diffData'][_0x9fafdf]['attachChange'],_0x2691bd=_0x36350a(_0x287fe0['diffData'][_0x9fafdf]['attributesBefore'])||{},_0x229a6d=_0x34cf94['_makeModelFromViewString'](_0x287fe0['diffData'][_0x9fafdf]['deletions']);_0x229a6d['rootName']=_0x9fafdf,_0x229a6d['_isAttached']=!_0xa05fb||!_0xa05fb['isAttached'],_0x229a6d['isAttached']=()=>_0x229a6d['_isAttached'],this['_baseRoots']['set'](_0x9fafdf,_0x229a6d),this['_baseRootsAttributes']['set'](_0x9fafdf,_0x2691bd),_0xa05fb&&this['_touchedRoots']['set'](_0x9fafdf,_0xa05fb);const _0x5b4089=this['_makeIdsRoot'](_0x229a6d);this['_baseIdsRoots']['set'](_0x9fafdf,_0x5b4089);for(const [_0x428efb,_0x3eaf07]of _0x229a6d['markers']){if(!_0x428efb['startsWith']('revision:'))continue;const _0x3a1f6d=_0x428efb['split'](':')[0x2];for(const _0xb2f1fd of _0x3eaf07['getWalker']({'singleCharacters':!0x0})){const _0x58c243=this['_getVidAttributeName'](_0xb2f1fd),_0x6c3682='elementEnd'==_0xb2f1fd['type']?_0xb2f1fd['previousPosition']['path']['slice'](0x0,-0x1):_0xb2f1fd['previousPosition']['path'],_0xdcdf15=_0x5b4089['getNodeByPath'](_0x6c3682)['getAttribute'](_0x58c243);this['_touched']['set'](_0xdcdf15,{'userId':_0x3a1f6d});}}}this['_startingRevisionId']=this['_revisionId'];const _0x5b58ef=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x791de5=>!this['_touched']['has'](_0x791de5));let _0x475532=0x0;const _0x4bebc9=new Map();for(const _0x49492f in _0x287fe0['diffData']){const _0x26aba1=_0x287fe0['diffData'][_0x49492f]['attachChange'],_0x2633a5=_0x36350a(_0x287fe0['diffData'][_0x49492f]['attributesAfter'])||{},_0x3298fb=_0x34cf94['_makeModelFromViewString'](_0x287fe0['diffData'][_0x49492f]['insertions']);_0x3298fb['rootName']=_0x49492f,_0x3298fb['_isAttached']=!_0x26aba1||_0x26aba1['isAttached'],_0x3298fb['isAttached']=()=>_0x3298fb['_isAttached'],this['_diffRoots']['set'](_0x49492f,_0x3298fb),this['_diffRootsAttributes']['set'](_0x49492f,_0x2633a5);const _0x497635=this['_makeIdsRoot'](_0x3298fb,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x49492f,_0x497635),_0x4bebc9['set'](_0x49492f,_0x3298fb['isAttached']()?_0x2633a5:{});for(const [_0x5d6448,_0xdd9f45]of _0x3298fb['markers']){if(!_0x5d6448['startsWith']('revision:'))continue;const _0x5ee3da=_0x5d6448['split'](':')[0x2];for(const _0x5793b7 of _0xdd9f45['getWalker']({'singleCharacters':!0x0})){const _0x3328df=this['_getVidAttributeName'](_0x5793b7),_0x44cac1=this['_revisionId']++,_0x17eae5='elementEnd'==_0x5793b7['type']?_0x5793b7['previousPosition']['path']['slice'](0x0,-0x1):_0x5793b7['previousPosition']['path'];_0x497635['getNodeByPath'](_0x17eae5)['_setAttribute'](_0x3328df,_0x44cac1),this['_touched']['set'](_0x44cac1,{'userId':_0x5ee3da});}}for(const _0x4e31c0 of this['editor']['model']['createRangeIn'](_0x3298fb)['getWalker']({'singleCharacters':!0x0})){const _0x11b23f=this['_getVidAttributeName'](_0x4e31c0),_0x53c868='elementEnd'==_0x4e31c0['type']?_0x4e31c0['previousPosition']['path']['slice'](0x0,-0x1):_0x4e31c0['previousPosition']['path'],_0x461cd7=_0x497635['getNodeByPath'](_0x53c868);_0x461cd7['getAttribute'](_0x11b23f)>0x0||_0x461cd7['_setAttribute'](_0x11b23f,_0x5b58ef[_0x475532++]);}for(const [_0x2d758b,_0x14d350]of _0x3298fb['markers'])_0x2d758b['startsWith']('revision:')||this['_markers']['set'](_0x2d758b,_0x14d350);}const _0x2ed02d=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x2ed02d),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2ed02d,0x1));const _0x198bc1=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x198bc1),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x198bc1,0x1));const _0x48bd77=Array['from'](this['_diffRoots'])['map'](([_0x1f1eb6,_0x1c10be])=>[_0x1f1eb6,x(_0x1c10be)]);this['_saveMetaData'](this['_lastTo'],_0x48bd77,this['_markers'],_0x4bebc9);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x3cf82b,_0x1fd407,_0x4cecdc,_0x564f64){const _0x370d37=new Map(_0x1fd407),_0x5da007=new Map(_0x36350a(_0x564f64)),_0xd99442=new Map();for(const [_0x3cadca,_0x50b69c]of _0x4cecdc)_0xd99442['set'](_0x3cadca,{'start':_0x50b69c['start']['clone'](),'end':_0x50b69c['end']['clone'](),'rootName':_0x50b69c['root']['rootName']});this['_savedMetaData']['set'](_0x3cf82b,{'roots':_0x370d37,'markers':_0xd99442,'rootsAttributes':_0x5da007});}['_removeMetaData'](_0x9dcccd){this['_savedMetaData']['delete'](_0x9dcccd);}['_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'](_0xdf06e9,_0x166446=null){let _0x366452=null;_0xdf06e9['is']('documentFragment')||(_0x366452=new _0x49cb5a(_0xdf06e9['name'],{'vid_start':null===_0x166446?this['_revisionId']++:_0x166446++}));const _0x677574=[];for(const _0x3152c1 of _0xdf06e9['getChildren']())if(_0x3152c1['is']('element')){_0x677574['push'](this['_makeIdsRoot'](_0x3152c1,_0x166446));const _0x32cc6a=_0x677574[_0x677574['length']-0x1];null!==_0x166446&&(_0x166446=_0x32cc6a['is']('element','$text')?_0x32cc6a['getAttribute']('vid')+0x1:_0x32cc6a['getAttribute']('vid_end')+0x1);}else{for(let _0x115e49=0x0;_0x115e49<_0x3152c1['offsetSize'];_0x115e49++)_0x677574['push'](new _0x49cb5a('$text',{'vid':null===_0x166446?this['_revisionId']++:_0x166446++}));}if(_0xdf06e9['is']('documentFragment')){const _0x1d59b3=N(_0xdf06e9['rootName']);return _0x1d59b3['_insertChild'](0x0,_0x677574),_0x1d59b3;}return _0x366452['_setAttribute']('vid_end',null===_0x166446?this['_revisionId']++:_0x166446++),_0x366452['_insertChild'](0x0,_0x677574),_0x366452;}['_calculateMetaData'](_0x56017,_0x5989e9,_0x4ca167){this['_reset']();const {roots:_0x24e449,markers:_0x433d05,rootsAttributes:_0x1a385a}=this['_savedMetaData']['get'](_0x56017);this['_baseRoots']=new Map(_0x24e449),this['_baseRootsAttributes']=new Map(_0x36350a(_0x1a385a));for(const [_0x5b178f,_0x25b63b]of this['_baseRoots'])if('$graveyard'!==_0x5b178f&&(this['_diffRoots']['set'](_0x5b178f,x(_0x25b63b)),this['_diffRootsAttributes']=new Map(_0x36350a(_0x1a385a)),_0x4ca167)){const _0x537955=this['_revisionId'];this['_idsRoots']['set'](_0x5b178f,this['_makeIdsRoot'](_0x25b63b)),this['_baseIdsRoots']['set'](_0x5b178f,this['_makeIdsRoot'](_0x25b63b,_0x537955));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x4ca167&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x431d29,_0x3bf93d]of _0x433d05){const _0x5b1d56=this['_baseRoots']['get'](_0x3bf93d['rootName']),_0x5536cb=this['_diffRoots']['get'](_0x3bf93d['rootName']),_0x214e9e=new _0x273655(this['_fixPosition'](_0x3bf93d['start'],_0x5b1d56),this['_fixPosition'](_0x3bf93d['end'],_0x5b1d56)),_0x589c6c=this['_fixRange'](_0x214e9e,_0x5536cb);_0x5b1d56['markers']['set'](_0x431d29,_0x214e9e),this['_markers']['set'](_0x431d29,_0x589c6c);}this['_applyOperations'](_0x56017,_0x5989e9,_0x4ca167);}['_applyOperations'](_0x43fc6d,_0x218c6b,_0x400f19){for(const _0x25e042 of this['source']['getOperations'](_0x43fc6d,_0x218c6b))this['_handleOperation'](_0x25e042,_0x400f19);for(const _0x474d6e of this['_diffRoots']['values']())_0x474d6e['markers']['clear']();for(const [_0x370828,_0x3ec4b7]of this['_markers']){this['_diffRoots']['get'](_0x3ec4b7['root']['rootName'])['markers']['set'](_0x370828,_0x3ec4b7['clone']());}const _0x19fc48=new Map(),_0x131192=new Map();for(const [_0x2e2711,_0x287ac1]of this['_diffRoots'])_0x19fc48['set'](_0x2e2711,x(_0x287ac1)),_0x131192['set'](_0x2e2711,this['_diffRootsAttributes']['get'](_0x2e2711));this['_saveMetaData'](_0x218c6b,_0x19fc48,this['_markers'],_0x131192);}['_getPreviousFrom'](_0x487e27){const _0x3e840f=Array['from'](this['_savedMetaData']['keys']());_0x3e840f['sort']((_0xf84465,_0x587398)=>_0xf84465-_0x587398),_0x3e840f['reverse']();for(const _0x1a2a75 of _0x3e840f)if(_0x1a2a75<_0x487e27)return _0x1a2a75;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x105a7e,_0x2bd0fc){const _0xa3db4c=Array['from'](_0x2bd0fc['markers'])['map'](([_0x442558,_0x4f9c43])=>[_0x442558,this['_fixRange'](_0x4f9c43,_0x105a7e)]);_0x105a7e['markers']=new Map(_0xa3db4c);}['_transformMarkers'](_0x117f4b){for(const _0x17fb9b of this['_markers']['values']()){const _0x2016f8=_0x17fb9b['getTransformedByOperation'](_0x117f4b),_0x20273d=_0x273655['_createFromRanges'](_0x2016f8);_0x17fb9b['start']=_0x20273d['start'],_0x17fb9b['end']=_0x20273d['end'];}}['_handleOperation'](_0x357a06,_0xb3c21f){if('addRoot'!=_0x357a06['type']&&'detachRoot'!=_0x357a06['type']){if('insert'==_0x357a06['type']){const _0x4ff522=_0x357a06['position']['root']['rootName'];this['_diffRoots']['has'](_0x4ff522)||(this['_diffRoots']['set'](_0x4ff522,N(_0x4ff522,!0x0)),this['_diffRootsAttributes']['set'](_0x4ff522,{}),_0xb3c21f&&this['_idsRoots']['set'](_0x4ff522,N(_0x4ff522,!0x0)));}else{if('addRootAttribute'==_0x357a06['type']||'removeRootAttribute'==_0x357a06['type']||'changeRootAttribute'==_0x357a06['type'])return void this['_handleRootAttributeOperation'](_0x357a06);'marker'==_0x357a06['type']&&this['_handleMarkerOperation'](_0x357a06);}if('marker'!==_0x357a06['type']){const _0x136d72=this['_cloneOperation'](_0x357a06,this['_diffRoots']);_0x136d72['_execute'](),this['_transformMarkers'](_0x136d72);}if(_0xb3c21f)switch(_0x357a06['type']){case'insert':this['_handleInsertOperation'](_0x357a06);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x357a06);break;case'merge':this['_handleMergeOperation'](_0x357a06);break;case'split':this['_handleSplitOperation'](_0x357a06);}}else this['_handleRootOperation'](_0x357a06,_0xb3c21f);}['_cloneOperation'](_0x3b590a,_0xc6d496){const _0x2409ab=_0x3b590a['clone']();return _0x2409ab['_authorId']=_0x3b590a['_authorId'],this['_fixOperation'](_0x2409ab,_0xc6d496),_0x2409ab;}['_getBaseVids'](_0x4ed7fc){return _0x4ed7fc['map'](_0x2c8fbf=>{const _0x476583=this['_getVidAttributeName'](_0x2c8fbf);return Number(_0x2c8fbf['item']['getAttribute'](_0x476583));});}['_generateTape'](_0x1c8d83,_0xaec402){if(_0x1c8d83['is']('element','$text'))_0xaec402['push']({'item':_0x1c8d83,'type':'text'});else{_0x1c8d83['is']('element')&&_0xaec402['push']({'item':_0x1c8d83,'type':'elementStart'});for(const _0x4a162c of _0x1c8d83['getChildren']())this['_generateTape'](_0x4a162c,_0xaec402);_0x1c8d83['is']('element')&&_0xaec402['push']({'item':_0x1c8d83,'type':'elementEnd'});}return _0xaec402;}['_getState'](){const _0x4456e5=new Map(this['_touched']),_0x141652=new Map(_0x4456e5),_0x59c905=new Map(),_0x2edc77={'insertions':{},'deletions':{}},_0x9edb4={'insertions':{},'deletions':{}},_0x2e5cad=new Map(),_0x1ad275=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x1ad275['delete']('$graveyard');for(const _0xafbbd2 of _0x1ad275){const _0x2311ea=this['_diffRoots']['get'](_0xafbbd2)||N(_0xafbbd2,!0x1),_0x3b9758=this['_baseRoots']['get'](_0xafbbd2)||N(_0xafbbd2,!0x1);_0x2311ea['isAttached']()||_0x3b9758['isAttached']()?(_0x2edc77['insertions'][_0xafbbd2]=x(_0x2311ea),_0x2edc77['deletions'][_0xafbbd2]=x(_0x3b9758),this['_copyMarkers'](_0x2edc77['deletions'][_0xafbbd2],_0x3b9758),this['_copyMarkers'](_0x2edc77['insertions'][_0xafbbd2],_0x2311ea),_0x9edb4['insertions'][_0xafbbd2]=this['_generateTape'](this['_idsRoots']['get'](_0xafbbd2),[]),_0x9edb4['deletions'][_0xafbbd2]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xafbbd2)||N(_0xafbbd2,!0x1),[])):_0x1ad275['delete'](_0xafbbd2);}for(const _0xc2ad69 of _0x1ad275){const _0x3804da=_0x9edb4['insertions'][_0xc2ad69];for(const _0x268e36 of _0x3804da){const _0x5e5b16=this['_getVidAttributeName'](_0x268e36),_0x15fb57=_0x268e36['item']['getAttribute'](_0x5e5b16);_0x141652['delete'](_0x15fb57),_0x15fb57>=this['_startingRevisionId']&&_0x59c905['set'](_0x15fb57,_0x4456e5['get'](_0x15fb57));}}for(const _0x5ae6c8 of _0x1ad275){const _0x44abe9=_0x9edb4['insertions'][_0x5ae6c8],_0x144203=this['_getBaseVids'](_0x9edb4['deletions'][_0x5ae6c8]);let _0x95b57d=0x0;for(const _0x8fcf2d of _0x44abe9){const _0x3ea252=this['_getVidAttributeName'](_0x8fcf2d),_0x426e54=_0x8fcf2d['item']['getAttribute'](_0x3ea252);if(!_0x59c905['has'](_0x426e54)&&!_0x2e5cad['has'](_0x426e54)){if(_0x141652['has'](_0x426e54))_0x95b57d++;else{if(_0x426e54!=_0x144203[_0x95b57d]){const _0x4afacd=_0x4456e5['get'](_0x426e54)||_0x4456e5['get'](_0x144203[_0x95b57d]);for(;_0x426e54!=_0x144203[_0x95b57d];)_0x141652['has'](_0x144203[_0x95b57d])||(_0x2e5cad['set'](_0x144203[_0x95b57d],_0x4afacd),_0x4456e5['set'](_0x144203[_0x95b57d],_0x4afacd)),_0x95b57d++;}_0x95b57d++;}}}}for(const _0x2faae1 of _0x1ad275){const _0x19537c=_0x9edb4['insertions'][_0x2faae1];for(const _0x352b37 of _0x19537c){const _0x56fd2b=this['_getVidAttributeName'](_0x352b37),_0x56c2da=_0x352b37['item']['getAttribute'](_0x56fd2b);if(_0x2e5cad['has'](_0x56c2da)){const _0x333123=_0x2e5cad['get'](_0x56c2da);_0x141652['has'](_0x56c2da)||_0x141652['set'](_0x56c2da,{..._0x333123}),_0x59c905['set'](_0x56c2da,{..._0x333123});}}}for(const _0x5633e9 of _0x141652['keys']())_0x5633e9>=this['_startingRevisionId']&&_0x141652['delete'](_0x5633e9);const _0x1ef116=new Map();for(const _0x186b5b of _0x1ad275){let _0x39cf39=_0x9edb4['insertions'][_0x186b5b];for(const _0x1c8db9 of _0x39cf39)if(_0x1c8db9['item']['is']('element','tableCell')){const _0x30c731=this['_getVidAttributeName'](_0x1c8db9),_0xc2194b=_0x1c8db9['item']['getAttribute'](_0x30c731);if(_0x59c905['has'](_0xc2194b)){const _0x2701b7=_0x1c8db9['item']['parent']['parent']['getAttribute']('vid_start'),_0x37a156=_0x1ef116['get'](_0x2701b7)||new Set();_0x37a156['add'](_0x59c905['get'](_0xc2194b)['userId']),_0x1ef116['set'](_0x2701b7,_0x37a156);}}_0x39cf39=_0x9edb4['deletions'][_0x186b5b];for(const _0x2e0d18 of _0x39cf39)if(_0x2e0d18['item']['is']('element','tableCell')){const _0x55be7c=this['_getVidAttributeName'](_0x2e0d18),_0x5451e4=_0x2e0d18['item']['getAttribute'](_0x55be7c);if(_0x141652['has'](_0x5451e4)){const _0xcfa8fc=_0x2e0d18['item']['parent']['parent']['getAttribute']('vid_start'),_0x4d0c24=_0x1ef116['get'](_0xcfa8fc)||new Set();_0x4d0c24['add'](_0x141652['get'](_0x5451e4)['userId']),_0x1ef116['set'](_0xcfa8fc,_0x4d0c24);}}for(const _0x3f22eb of _0x1ef116['keys']())(_0x59c905['has'](_0x3f22eb)||_0x141652['has'](_0x3f22eb))&&_0x1ef116['delete'](_0x3f22eb);}for(const _0xdfff05 of _0x1ad275){const _0x3798c8=_0x9edb4['insertions'][_0xdfff05];let _0x4bff68=null,_0xfdbe34=null;for(const _0x527614 of _0x3798c8){const _0x3d6ba6=this['_getVidAttributeName'](_0x527614),_0x47fca0=_0x527614['item']['getAttribute'](_0x3d6ba6),_0x16c762=_0x1ef116['get'](_0x47fca0);_0x16c762&&'elementStart'==_0x527614['type']&&(_0x4bff68=Array['from'](_0x16c762)[0x0],_0xfdbe34=_0x527614['item']['getAttribute']('vid_end')),_0x4bff68&&(_0x141652['set'](_0x47fca0,{'userId':_0x4bff68}),_0x59c905['set'](_0x47fca0,{'userId':_0x4bff68})),_0x47fca0==_0xfdbe34&&(_0x4bff68=null,_0xfdbe34=null);}}const _0x4fe439={},_0x46b766=new Set();for(const _0x14495a of _0x1ad275){const _0x49c332=_0x2edc77['deletions'][_0x14495a],_0x1af019=_0x2edc77['insertions'][_0x14495a];for(const {userId:_0x118864}of this['_touchedMarkers']['values']())null!==_0x118864&&_0x46b766['add'](_0x118864);for(const {userId:_0xf7f9f3}of this['_touchedRoots']['values']())null!==_0xf7f9f3&&_0x46b766['add'](_0xf7f9f3);this['_markChanges'](_0x1af019,_0x9edb4['insertions'][_0x14495a],_0x59c905,'insertion',_0x46b766),this['_markChanges'](_0x49c332,_0x9edb4['deletions'][_0x14495a],_0x141652,'deletion',_0x46b766),_0x4fe439[_0x14495a]={'insertions':this['_prepareViewToSave'](_0x1af019),'deletions':this['_prepareViewToSave'](_0x49c332),'attachChange':this['_touchedRoots']['get'](_0x14495a)||null,'attributesBefore':_0x36350a(this['_baseRootsAttributes']['get'](_0x14495a))||{},'attributesAfter':_0x36350a(this['_diffRootsAttributes']['get'](_0x14495a))};}return{'diffData':_0x4fe439,'authorsIds':Array['from'](_0x46b766)};}['_processRootBeforeSave'](_0x3d57e5){for(const [,_0x272da8]of _0x3d57e5['markers']){const _0x29c856=_0x272da8['start']['getAncestors']()['filter'](_0x2d74e9=>'tableCell'==_0x2d74e9['name']);for(const _0x5f1ad4 of _0x29c856)0x1==_0x5f1ad4['childCount']&&_0x5f1ad4['getChild'](0x0)['is']('element','paragraph')&&_0x5f1ad4['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x50be44){this['_processRootBeforeSave'](_0x50be44);const _0x1797f4=this['editor']['data']['toView'](_0x50be44,{}),_0x1e0626=Array['from'](_0x1797f4['getChildren']())['map'](_0x523186=>this['_getViewJson'](_0x523186));return JSON['stringify'](_0x1e0626);}['_getViewJson'](_0x901c46){if(_0x901c46['is']('$text'))return _0x901c46['data'];{const _0x4e5af5=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x3ae92b=_0x901c46,_0x114516=this['editor']['data']['htmlProcessor']['domConverter'],_0xd995be={'type':_0x4e5af5['_getTypeCharForViewElement'](_0x3ae92b),'name':_0x3ae92b['name'],'attributes':Array['from'](_0x3ae92b['getAttributes']()),'children':Array['from'](_0x3ae92b['getChildren']())['map'](_0x26faa6=>this['_getViewJson'](_0x26faa6))};if(_0x901c46['is']('uiElement')&&'$comment'!=_0x901c46['name']){const _0x50174c=_0x901c46['render'](_0x114516['domDocument'],_0x114516);_0xd995be['children']['push'](_0x50174c['outerHTML']);}else{if(_0x901c46['is']('rawElement')){const _0x53e94f=_0x114516['domDocument']['createElement'](_0x3ae92b['name']);_0x901c46['render'](_0x53e94f,_0x114516),_0xd995be['children']['push'](_0x53e94f['innerHTML']);}}const _0xbc7ea0=Array['from'](_0x3ae92b['getCustomProperties']());_0xbc7ea0['length']>0x0&&(_0xd995be['customProperties']=_0xbc7ea0);const _0xfd3978=_0x3ae92b['getFillerOffset']();return null!==_0xfd3978&&(_0xd995be['fillerOffset']=_0xfd3978),_0xd995be;}}['_markChanges'](_0x1a83a0,_0x2c153b,_0x4eaec8,_0x5ed0a6,_0x3ea812){let _0x462bc9=null,_0xef6e3a=null,_0x5c5cc7=0x0;const _0x584ca2=this['editor']['model'];for(let _0x39e07c=0x0;_0x39e07c<_0x2c153b['length'];_0x39e07c++){const _0x50e524=this['_getVidAttributeName'](_0x2c153b[_0x39e07c]),_0x1c1f28=_0x2c153b[_0x39e07c]['item']['getAttribute'](_0x50e524),_0x37ccc0=_0x4eaec8['get'](_0x1c1f28),_0x334c2b=_0x39e07c==_0x2c153b['length']-0x1;(!_0x462bc9&&_0x37ccc0&&(_0x462bc9=_0x37ccc0,_0xef6e3a=_0x2c153b[_0x39e07c]),_0x462bc9&&(!_0x37ccc0||_0x37ccc0['userId']!=_0x462bc9['userId']))&&(_0x57b149(_0x37ccc0,P(_0xef6e3a,_0x1a83a0,_0x584ca2),P(_0x2c153b[_0x39e07c],_0x1a83a0,_0x584ca2)),_0x462bc9=_0x37ccc0||null,_0xef6e3a=_0x37ccc0?_0x2c153b[_0x39e07c]:null),_0x462bc9&&_0x334c2b&&_0x57b149(_0x37ccc0,P(_0xef6e3a,_0x1a83a0,_0x584ca2),V(_0x2c153b[_0x39e07c],_0x1a83a0,_0x584ca2));}function _0x57b149(_0x7191ff,_0x2fea41,_0x4d37bc){const _0x568e01=_0x462bc9['userId'],_0x4be603='revision:'+_0x5ed0a6+':'+_0x568e01+':'+_0x5c5cc7++,_0x3c2289=_0x584ca2['createRange'](_0x2fea41,_0x4d37bc);_0x1a83a0['markers']['set'](_0x4be603,_0x3c2289),null!==_0x568e01&&_0x3ea812['add'](_0x568e01);}}['_getVidAttributeName'](_0x3f2482){switch(_0x3f2482['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x370489,_0x124020){_0x370489['baseVersion']=null;for(const _0x5d3a83 in _0x370489){const _0x2071ca=_0x370489[_0x5d3a83];if(_0x2071ca instanceof _0x448e9f){const _0x93cf73=_0x124020['get'](_0x2071ca['root']['rootName']);_0x370489[_0x5d3a83]=this['_fixPosition'](_0x2071ca,_0x93cf73);}if(_0x2071ca instanceof _0x273655){const _0x240e74=_0x124020['get'](_0x2071ca['root']['rootName']);_0x370489[_0x5d3a83]=this['_fixRange'](_0x2071ca,_0x240e74);}'root'===_0x5d3a83&&(_0x370489['root']=_0x124020['get'](_0x370489['root']['rootName']));}}['_fixRange'](_0xdbb363,_0x5a3644){return this['editor']['model']['createRange'](this['_fixPosition'](_0xdbb363['start'],_0x5a3644),this['_fixPosition'](_0xdbb363['end'],_0x5a3644));}['_fixPosition'](_0x162644,_0x2d793){return this['editor']['model']['createPositionFromPath'](_0x2d793,_0x162644['path'],_0x162644['stickiness']);}['_handleInsertOperation'](_0x1b8a7e){const _0x16d7f4=this['_idsRoots']['get'](_0x1b8a7e['position']['root']['rootName']),_0x43d8b9=this['_fixPosition'](_0x1b8a7e['position'],_0x16d7f4),_0x3e9957=null===_0x1b8a7e['_authorId']?null:_0x1b8a7e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1fba21=_0x43d8b9['parent'],_0x1376ae=this['_revisionId'],_0x515ff8=[];for(const _0x16a25c of _0x1b8a7e['nodes'])if(_0x16a25c['is']('element'))_0x515ff8['push'](this['_makeIdsRoot'](_0x16a25c));else{for(let _0x320369=0x0;_0x320369<_0x16a25c['offsetSize'];_0x320369++)_0x515ff8['push'](new _0x49cb5a('$text',{'vid':this['_revisionId']++}));}const _0x40730b=this['_revisionId'];for(let _0x422ee6=_0x1376ae;_0x422ee6<_0x40730b;_0x422ee6++)this['_touched']['set'](_0x422ee6,{'userId':_0x3e9957});_0x1fba21['_insertChild'](_0x43d8b9['offset'],_0x515ff8);}['_handleMoveOperation'](_0x3f3b03){(_0x3f3b03=this['_cloneOperation'](_0x3f3b03,this['_idsRoots']))['_execute']();const _0xebfb32=null===_0x3f3b03['_authorId']?null:_0x3f3b03['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5a97a7=_0x3f3b03['getMovedRangeStart'](),_0x536020=_0x5a97a7['parent'],_0x32e928=_0x5a97a7['offset'];!function _0x123937(_0x27b8db,_0x4af044,_0x2cfd01,_0x5258db){for(let _0x49033f=_0x2cfd01;_0x49033f<_0x5258db;_0x49033f++){const _0x5ae378=_0x4af044['getChild'](_0x49033f);_0x5ae378['is']('element','$text')?_0x27b8db['set'](_0x5ae378['getAttribute']('vid'),{'userId':_0xebfb32}):(_0x27b8db['set'](_0x5ae378['getAttribute']('vid_start'),{'userId':_0xebfb32}),_0x123937(_0x27b8db,_0x5ae378,0x0,_0x5ae378['childCount']),_0x27b8db['set'](_0x5ae378['getAttribute']('vid_end'),{'userId':_0xebfb32}));}}(this['_touched'],_0x536020,_0x32e928,_0x32e928+_0x3f3b03['howMany']);}['_handleMergeOperation'](_0x21443f){const _0x4ecec2=null===(_0x21443f=this['_cloneOperation'](_0x21443f,this['_idsRoots']))['_authorId']?null:_0x21443f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x30695e=_0x21443f['targetPosition']['parent'],_0x42360e=_0x21443f['sourcePosition']['parent'],_0x211b6f=_0x30695e['getAttribute']('vid_end'),_0x51b6dc=_0x42360e['getAttribute']('vid_start');_0x30695e['_setAttribute']('vid_end',_0x42360e['getAttribute']('vid_end')),_0x42360e['_setAttribute']('vid_end',_0x211b6f),this['_touched']['set'](_0x51b6dc,{'userId':_0x4ecec2}),this['_touched']['set'](_0x211b6f,{'userId':_0x4ecec2}),_0x21443f['_execute']();}['_handleSplitOperation'](_0x58e6ae){const _0x481efd=null===(_0x58e6ae=this['_cloneOperation'](_0x58e6ae,this['_idsRoots']))['_authorId']?null:_0x58e6ae['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x322963=_0x58e6ae['graveyardPosition'],_0x2e3109=_0x58e6ae['splitPosition']['parent'];_0x58e6ae['_execute']();const _0x2f291c=_0x2e3109['getAttribute']('vid_end'),_0x43b8b0=_0x58e6ae['insertionPosition']['nodeAfter'];if(_0x322963){const _0x103903=_0x43b8b0['getAttribute']('vid_end'),_0x1e5ec4=_0x2e3109['getAttribute']('vid_end');_0x2e3109['_setAttribute']('vid_end',_0x103903),_0x43b8b0['_setAttribute']('vid_end',_0x1e5ec4),this['_touched']['set'](_0x2e3109['getAttribute']('vid_end'),{'userId':_0x481efd}),this['_touched']['set'](_0x43b8b0['getAttribute']('vid_start'),{'userId':_0x481efd});}else{const _0x3430dc=this['_revisionId']++,_0x323178=this['_revisionId']++;_0x2e3109['_setAttribute']('vid_end',_0x3430dc),_0x43b8b0['_setAttribute']('vid_start',_0x323178),_0x43b8b0['_setAttribute']('vid_end',_0x2f291c),this['_touched']['set'](_0x3430dc,{'userId':_0x481efd}),this['_touched']['set'](_0x323178,{'userId':_0x481efd});}}['_handleMarkerOperation'](_0x588312){if(!_0x588312['affectsData'])return;const _0x4fa48f=(_0x588312=this['_cloneOperation'](_0x588312,this['_diffRoots']))['oldRange']?_0x588312['oldRange']['root']:null,_0x50b286=_0x588312['newRange']?_0x588312['newRange']['root']:null;_0x4fa48f&&this['_markers']['delete'](_0x588312['name']),_0x50b286&&this['_markers']['set'](_0x588312['name'],_0x588312['newRange']['clone']());const _0x4bb62e=null===_0x588312['_authorId']?null:_0x588312['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1eeabe=_0x588312['name'];if(!this['_touchedMarkers']['has'](_0x1eeabe))return void this['_touchedMarkers']['set'](_0x1eeabe,{'range':_0x588312['oldRange'],'userId':_0x4bb62e});const _0x3b3e36=this['_touchedMarkers']['get'](_0x1eeabe),_0x2ab05=_0x3b3e36['range'],_0x21b8ad=_0x588312['newRange'];null==_0x2ab05&&null==_0x21b8ad||_0x2ab05&&_0x21b8ad&&_0x2ab05['isEqual'](_0x21b8ad)?this['_touchedMarkers']['delete'](_0x588312['name']):_0x3b3e36['userId']=_0x4bb62e;}['_handleRootOperation'](_0x303633,_0x389e7e){this['_diffRoots']['has'](_0x303633['rootName'])?this['_diffRoots']['get'](_0x303633['rootName'])['_isAttached']=_0x303633['isAdd']:(this['_diffRoots']['set'](_0x303633['rootName'],N(_0x303633['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x303633['rootName'],{}),_0x389e7e&&this['_idsRoots']['set'](_0x303633['rootName'],N(_0x303633['rootName'],!0x0)));const _0x2a7532=null===_0x303633['_authorId']?null:_0x303633['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x41acf7=this['_touchedRoots']['get'](_0x303633['rootName']);_0x41acf7&&_0x41acf7['userId']===_0x2a7532?this['_touchedRoots']['delete'](_0x303633['rootName']):this['_touchedRoots']['set'](_0x303633['rootName'],{'userId':_0x2a7532,'isAttached':_0x303633['isAdd']});}['_handleRootAttributeOperation'](_0x52197){const _0x182a35=this['_diffRootsAttributes']['get'](_0x52197['root']['rootName']);null===_0x52197['newValue']?delete _0x182a35[_0x52197['key']]:_0x182a35[_0x52197['key']]=_0x52197['newValue'];}}function x(_0x5c975c){const _0x3a5c66=N(_0x5c975c['rootName'],_0x5c975c['isAttached']());for(const _0x24e161 of _0x5c975c['getChildren']()){const _0x58ee7b=_0x24e161['_clone'](!0x0);_0x3a5c66['_appendChild'](_0x58ee7b);}return _0x3a5c66;}function N(_0x2448ab,_0x5e7a6e=!0x0){const _0x422d6a=new _0xa9a204();return _0x422d6a['rootName']=_0x2448ab,_0x422d6a['_isAttached']=_0x5e7a6e,_0x422d6a['isAttached']=()=>_0x422d6a['_isAttached'],_0x422d6a;}function P(_0x54e5ab,_0x3ad759,_0x227c24){const _0x183151='elementEnd'==_0x54e5ab['type']?_0x227c24['createPositionAt'](_0x54e5ab['item'],'end'):_0x227c24['createPositionBefore'](_0x54e5ab['item']);return _0x227c24['createPositionFromPath'](_0x3ad759,_0x183151['path'],_0x183151['stickiness']);}function V(_0xdc6cf2,_0x150afa,_0x46f0b0){const _0x1ca287='elementStart'==_0xdc6cf2['type']?_0x46f0b0['createPositionAt'](_0xdc6cf2['item'],0x0):_0x46f0b0['createPositionAfter'](_0xdc6cf2['item']);return _0x46f0b0['createPositionFromPath'](_0x150afa,_0x1ca287['path'],_0x1ca287['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
- _0x40f13f(_0x1f9cbc){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x5de002,_0x2c1002){super(_0x5de002),this['focusTracker']=new _0x5b8764(),this['keystrokes']=new _0x4b1995(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x2c1002),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x73e3d7({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x1762f0=_0x24da23=>_0x24da23['stopPropagation']();this['keystrokes']['set']('arrowright',_0x1762f0),this['keystrokes']['set']('arrowleft',_0x1762f0),this['keystrokes']['set']('arrowup',_0x1762f0),this['keystrokes']['set']('arrowdown',_0x1762f0);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x70e951){this['revisionNameInputView']['fieldView']['element']['value']=_0x70e951['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0xb628b5){const _0x289b35=new ti(this['locale'],_0x589633),_0x4fff38=_0x289b35['fieldView'];_0x4fff38['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x16a333=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0xb628b5&&(_0x16a333+='\x20('+R(this['locale'],'optional')+')'),(_0x289b35['label']=_0x16a333,_0x4fff38['on']('input',()=>{this['revisionNameInputValue']=_0x4fff38['element']['value']['trim']();}),_0x289b35);}}class v extends _0x1b0770{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x126595=this['editor'],_0x3dec68=_0x126595['plugins']['get']('RevisionTracker');_0x126595['ui']['componentFactory']['add']('revisionHistory',_0x2a6624=>{const _0x58535a=_0x4b88dd(_0x2a6624),_0x2b0957=_0x58535a['panelView']['children'],_0x538a95=new _0x6834e9(_0x2a6624),_0x57c1c1=new _0x5bce97(_0x2a6624),_0x515521=new _0x59d9b3(_0x2a6624),_0x49d75b=new _0x5bce97(_0x2a6624),_0x35b96b=new _0x59d9b3(_0x2a6624);return _0x58535a['bind']('isEnabled')['to'](_0x3dec68,'isReady',_0x3dec68,'isEnabled',_0x126595,'isReadOnly',(_0x40c470,_0x3e2538,_0x17749d)=>_0x40c470&&_0x3e2538&&!_0x17749d),_0x58535a['buttonView']['set']({'icon':_0x3798b7,'label':R(_0x2a6624,'Revision\x20history'),'tooltip':!0x0}),_0x515521['set']({'label':R(_0x2a6624,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x515521['bind']('isEnabled')['to'](_0x3dec68,'isReady',_0x3dec68,'isEnabled',_0x126595,'isReadOnly',(_0x25d5a1,_0x45f47b,_0x3094d2)=>_0x25d5a1&&_0x45f47b&&!_0x3094d2),_0x515521['on']('execute',()=>this['_showDialog']()),_0x35b96b['set']({'label':R(_0x2a6624,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x35b96b['bind']('isEnabled')['to'](_0x3dec68,'isReady',_0x126595,'isReadOnly',(_0x5cec91,_0x24c319)=>_0x5cec91&&!_0x24c319),_0x35b96b['on']('execute',()=>{_0x126595['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x58535a['isOpen']=!0x1,_0x126595['editing']['view']['focus']();}),_0x57c1c1['children']['add'](_0x515521),_0x49d75b['children']['add'](_0x35b96b),_0x538a95['role']='menu',_0x538a95['items']['addMany']([_0x57c1c1,_0x49d75b]),_0x2b0957['add'](_0x538a95),_0x58535a;}),_0x126595['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x36a8d2=this['editor'],_0x4c8264=_0x36a8d2['locale'],_0x4cbd17=new _0x5e1b9c(_0x4c8264),_0xc2df7e=new _0x30723a(_0x4c8264);_0x4cbd17['buttonView']['set']({'icon':_0x3798b7,'label':R(_0x4c8264,'Revision\x20history')});const _0x555cbc=new _0x4736a6(_0x4c8264,_0x4cbd17),_0x21ab2d=new _0xede9e2(_0x4c8264);_0x21ab2d['set']({'label':R(_0x4c8264,'Save\x20current\x20revision')}),_0x21ab2d['delegate']('execute')['to'](_0x4cbd17),_0x21ab2d['on']('execute',()=>{this['_showDialog']();}),_0x555cbc['children']['add'](_0x21ab2d),_0xc2df7e['items']['add'](_0x555cbc);const _0x47e847=new _0x4736a6(_0x4c8264,_0x4cbd17),_0x499cd6=new _0xede9e2(_0x4c8264);return _0x499cd6['set']({'label':R(_0x4c8264,'Open\x20revision\x20history')}),_0x499cd6['delegate']('execute')['to'](_0x4cbd17),_0x499cd6['on']('execute',()=>{_0x36a8d2['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x47e847['children']['add'](_0x499cd6),_0xc2df7e['items']['add'](_0x47e847),_0x4cbd17['panelView']['children']['add'](_0xc2df7e),_0x4cbd17;}['_showDialog'](){const _0x107222=this['editor'],_0x415ed5=_0x107222['locale'],_0x144557=_0x107222['plugins']['get']('Dialog'),_0x430bb1=_0x107222['plugins']['get']('RevisionTracker');function _0x596283(_0x4e20cf){_0x107222['config']['get']('revisionHistory.requireRevisionName')&&''===_0x4e20cf['revisionName']?_0x4e20cf['revisionNameInputView']['errorText']=R(_0x415ed5,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x107222['plugins']['get'](h)['saveRevision']({'name':_0x4e20cf['revisionName']}),_0x144557['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x596283(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x144557['show']({'id':'revisionSave','title':R(_0x415ed5,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x107222['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x144557['hide']()},{'label':R(_0x107222['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0xca87c2){_0xca87c2['bind']('isEnabled')['to'](_0x430bb1,'isReady',_0x430bb1,'isEnabled',_0x107222,'isReadOnly',(_0x3db48a,_0x1afc60,_0x338084)=>_0x3db48a&&_0x1afc60&&!_0x338084);},'onExecute':()=>_0x596283(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x13237c=this['editor'],_0x150eb9=_0x13237c['locale'];this['_saveRevisionFormView']=new he(_0x150eb9,_0x13237c['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x1f9cbc{['changeId'];['_model'];constructor(_0x33e8b5,_0x1fafe7){super(_0x33e8b5),this['_model']=_0x1fafe7,this['changeId']=_0x1fafe7['id'];const _0x15cb00=this['bindTemplate'],_0x188a10=R(_0x33e8b5,_0x1fafe7['data']['isSuggestion']?'Suggested\x20by':'add'==_0x1fafe7['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x1fafe7['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x15cb00['to']('type',_0x41fdfd=>'ck-revision-change__'+_0x41fdfd)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x188a10}]},{'text':'\x20'+_0x1fafe7['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x102d2d(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x4fb279){super(),this['id']=_0x4fb279['id']||_0x110b69(),this['author']=_0x4fb279['author'],this['type']=_0x4fb279['type'],this['data']=_0x4fb279['data']||{},this['rootName']=_0x4fb279['rootName'],this['set']('createdAt',_0x4fb279['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x5b5eab,_0x4f0ed1){this['newRevisionId']=_0x5b5eab,this['oldRevisionId']=_0x4f0ed1,this['changes']=new _0x2932fe();}['_setChanges'](_0x32c6aa){for(const _0x2110aa of _0x32c6aa)this['changes']['add'](_0x2110aa);}}class l extends _0x1b0770{['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[_0x1bf0af,_0x554bda,S,$];}constructor(_0x229b5e){super(_0x229b5e),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',(_0x4717e3,_0x5d852d,_0x48bcae)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x5e6067=>{for(const _0x4d601e of this['editor']['editing']['view']['document']['roots'])_0x48bcae?_0x5e6067['removeClass']('ck-editor__editable__overlay',_0x4d601e):_0x5e6067['addClass']('ck-editor__editable__overlay',_0x4d601e);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1bad3f=>null!==_0x1bad3f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4fd07d,_0x1b9c53,_0x425402)=>_0x4fd07d&&_0x425402?_0x1b9c53['changes']['getIndex'](_0x425402):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x5d17b1,_0x4df0d1)=>_0x5d17b1?_0x4df0d1['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x554bda);}['init'](){const _0xcc4039=this['editor'],_0x232ba4=new ot(_0xcc4039,{'direction':'backward'}),_0x536bc5=new ot(_0xcc4039,{'direction':'forward'});(_0xcc4039['commands']['add']('showPreviousChange',_0x232ba4),_0xcc4039['commands']['add']('showNextChange',_0x536bc5),_0xcc4039['commands']['add']('restoreRevision',new nt(_0xcc4039)),this['on']('change:numberOfChanges',()=>{_0x232ba4['refresh'](),_0x536bc5['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0xcc4039['enableReadOnlyMode']('revision-viewer'),_0xcc4039['plugins']['has']('WidgetToolbarRepository'))&&_0xcc4039['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x253b17){return await this['_utils']['loadRevisionData'](_0x253b17,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x253b17);}async['getRevisionRootsAttributes'](_0x26e14f){return await this['_utils']['loadRevisionData'](_0x26e14f,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x26e14f);}async['compare'](_0x385629,_0x42cc52,_0x480c0e=!0x1){if(!this['isEnabled'])return;const _0x3e8e47=this['diff'],_0xb9251f=this['repository'],_0x5022d4='string'==typeof _0x385629?_0xb9251f['getRevision'](_0x385629):_0x385629,_0x4e8a10='string'==typeof _0x42cc52?_0xb9251f['getRevision'](_0x42cc52):_0x42cc52,_0x42678e=_0x5022d4['id'],_0x1dfdbf=_0x4e8a10?_0x4e8a10['id']:null;if(!_0x480c0e&&this['diff']&&this['diff']['newRevisionId']===_0x42678e&&this['diff']['oldRevisionId']===_0x1dfdbf)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x42678e,_0x1dfdbf);const _0x2774da=this['_getRevisionsRange'](_0x5022d4,_0x4e8a10,!0x0)['map'](_0x19b8af=>this['_utils']['loadRevisionData'](_0x19b8af,this['adapter']));return _0x2774da['push'](new Promise(_0x537674=>{setTimeout(_0x537674,0x14);})),Promise['all'](_0x2774da)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x18159a=this['_getDiff'](_0x42678e,_0x1dfdbf);for(const _0x1c66a1 of _0x18159a['changes'])this['_changeIdToChange']['set'](_0x1c66a1['id'],_0x1c66a1);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x376daf=>{for(const _0x21ab94 of this['editor']['model']['document']['getRootNames']())_0x376daf['detachRoot'](_0x21ab94);for(const _0x3db071 of Object['keys'](_0x18159a['model'])){const _0x427e27=_0x376daf['addRoot'](_0x3db071);for(const _0x1100d4 of Object['keys'](_0x18159a['attributes'][_0x3db071]))_0x376daf['setAttribute'](_0x1100d4,_0x18159a['attributes'][_0x3db071][_0x1100d4],_0x427e27);_0x376daf['insert'](_0x18159a['model'][_0x3db071],_0x427e27,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x18159a['changes'])),this['isReady']=!0x0;})['catch'](_0x75ca96=>{console['error'](_0x75ca96),this['_cleanUp'](),_0x3e8e47&&(this['diff']=_0x3e8e47),this['isReady']=!0x0;});}['addRevisionData'](_0x58bb24,_0x1d748e){const _0x570fd3=this['repository']['createRevision'](_0x58bb24);return _0x570fd3['on']('_update',(_0x31bcba,_0x35b558,_0x4fb178)=>_0x1d748e(_0x35b558,_0x4fb178,_0x570fd3)),this['repository']['addRevision'](_0x570fd3),_0x570fd3;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x41ad01=>{for(const _0x565b6e of this['editor']['model']['document']['getRootNames']())_0x41ad01['detachRoot'](_0x565b6e);});}['_sortAndFilterDiffChanges'](_0x1c6241){const _0x7ebf30=[],_0x3e1887=new Map();for(const _0x286b38 of this['editor']['model']['document']['getRootNames']()){const _0x3db7f2=this['editor']['editing']['view']['getDomRoot'](_0x286b38);if(!_0x3db7f2)continue;const _0x23897e=_0x3db7f2['getClientRects']()['item'](0x0);_0x23897e&&(_0x7ebf30['push'](_0x286b38),_0x3e1887['set'](_0x286b38,_0x23897e));}return _0x7ebf30['sort']((_0x2edfbb,_0x56d03b)=>{const _0x5b8e5e=_0x3e1887['get'](_0x2edfbb),_0x1d7ff8=_0x3e1887['get'](_0x56d03b);return _0x5b8e5e['y']-_0x1d7ff8['y']||_0x5b8e5e['x']-_0x1d7ff8['x'];}),(_0x1c6241=_0x1c6241['filter'](_0xdcc01c=>_0x7ebf30['includes'](_0xdcc01c['rootName'])))['sort']((_0x249aae,_0x1b4954)=>_0x7ebf30['indexOf'](_0x249aae['rootName'])-_0x7ebf30['indexOf'](_0x1b4954['rootName'])),_0x1c6241;}['_makeTape'](_0x3be843){const _0x2e1761=Array['from'](_0x3be843['markers'])['filter'](([_0x4cdd6b,_0x35903e])=>_0x4cdd6b['startsWith']('revision:')&&!_0x35903e['isCollapsed']),_0x4ba642=Array['from'](this['editor']['model']['createRangeIn'](_0x3be843)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2e1761['length'])for(const _0x56dd1c of _0x4ba642){const [_0x14b6f3,_0x8675c0]=_0x2e1761[0x0],[,_0x298dcd,_0x4bbb09]=_0x14b6f3['split'](':');if(_0x8675c0['end']['isEqual'](_0x56dd1c['nextPosition'])&&_0x2e1761['shift'](),(_0x56dd1c['previousPosition']['isEqual'](_0x8675c0['start'])||_0x56dd1c['previousPosition']['isAfter'](_0x8675c0['start']))&&('insertion'==_0x298dcd?_0x56dd1c['isAdded']={'userId':_0x4bbb09}:'deletion'==_0x298dcd&&(_0x56dd1c['isRemoved']={'userId':_0x4bbb09})),0x0==_0x2e1761['length'])break;}return _0x4ba642;}['_refreshStartEndIndex'](_0x3fdae9){const _0x143ea4=new Map();for(let _0x105875=0x0;_0x105875<_0x3fdae9['length'];_0x105875++)'text'===_0x3fdae9[_0x105875]['type']?(_0x3fdae9[_0x105875]['item']['startIndex']=_0x105875,_0x3fdae9[_0x105875]['item']['endIndex']=_0x105875):('elementStart'===_0x3fdae9[_0x105875]['type']?_0x3fdae9[_0x105875]['item']['startIndex']=_0x105875:'elementEnd'===_0x3fdae9[_0x105875]['type']&&(_0x3fdae9[_0x105875]['item']['endIndex']=_0x105875),_0x143ea4['set'](_0x3fdae9[_0x105875]['id'],_0x105875));for(const _0x5d01af of _0x143ea4['values']())'elementStart'===_0x3fdae9[_0x5d01af]['type']?_0x3fdae9[_0x5d01af]['item']['endIndex']=_0x143ea4['get'](_0x3fdae9[_0x5d01af]['pairId']):'elementEnd'===_0x3fdae9[_0x5d01af]['type']&&(_0x3fdae9[_0x5d01af]['item']['startIndex']=_0x143ea4['get'](_0x3fdae9[_0x5d01af]['pairId']));}['_processTape'](_0x1a8f0a){for(let _0x3ca455=0x0;_0x3ca455<_0x1a8f0a['length'];_0x3ca455++){if('elementStart'===_0x1a8f0a[_0x3ca455]['type'])_0x1a8f0a[_0x3ca455]['item']['startIndex']=_0x3ca455;else{if('elementEnd'===_0x1a8f0a[_0x3ca455]['type']){_0x1a8f0a[_0x3ca455]['item']['endIndex']=_0x3ca455;const _0x46adc4=_0x1a8f0a[_0x3ca455]['item']['startIndex'];_0x1a8f0a[_0x46adc4]['pairId']=_0x1a8f0a[_0x3ca455]['id'],_0x1a8f0a[_0x3ca455]['pairId']=_0x1a8f0a[_0x46adc4]['id'];}else _0x1a8f0a[_0x3ca455]['item']['startIndex']=_0x3ca455,_0x1a8f0a[_0x3ca455]['item']['endIndex']=_0x3ca455,_0x1a8f0a[_0x3ca455]['pairId']=null;}_0x1a8f0a[_0x3ca455]['markersStart']||(_0x1a8f0a[_0x3ca455]['markersStart']=[],_0x1a8f0a[_0x3ca455]['markersEnd']=[]);}}['_markInsertions'](_0x585ced,_0x111a47){const _0x18ea18=_0x585ced['filter'](_0x45287b=>!_0x45287b['isAdded']);for(let _0x38852e=0x0;_0x38852e<_0x111a47['length'];_0x38852e++)_0x111a47[_0x38852e]['isAdded']&&(_0x18ea18[_0x38852e]['isAdded']=_0x111a47[_0x38852e]['isAdded']);}['_getDiff'](_0x3288e8,_0x47c9f=null){const _0x19a1b1=this['repository']['getRevision'](_0x3288e8),_0x174b22=_0x47c9f?this['repository']['getRevision'](_0x47c9f):null,_0x2df778=this['_getRevisionsRange'](_0x19a1b1,_0x174b22),_0x1108be=_0x2df778[_0x2df778['length']-0x1],_0x3da8b6=new Map(),_0xf74b86={'model':{},'attributes':{},'changes':[]},_0x4b18f8=new Set(),_0x4874f3=new Map();for(let _0xd5b451=_0x2df778['length']-0x1;_0xd5b451>=0x0;_0xd5b451--){const _0x5d3e3f=_0x2df778[_0xd5b451];for(const _0x251b57 of Object['keys'](_0x5d3e3f['diffData']))if(_0x5d3e3f['diffData'][_0x251b57]['attachChange']){const _0x3bcd41=_0x5d3e3f['diffData'][_0x251b57]['attachChange'];_0x3bcd41['isAttached']?(_0x4b18f8['add'](_0x251b57),_0x4874f3['has'](_0x251b57)&&_0x4874f3['get'](_0x251b57)['userId']==_0x3bcd41['userId']?_0x4874f3['delete'](_0x251b57):_0x4874f3['set'](_0x251b57,_0x3bcd41)):_0x4874f3['has'](_0x251b57)?(_0x4b18f8['delete'](_0x251b57),_0x4874f3['delete'](_0x251b57)):(_0x4b18f8['add'](_0x251b57),_0x4874f3['set'](_0x251b57,_0x3bcd41));}else _0x4b18f8['add'](_0x251b57);}for(const _0x3eeb61 of _0x4b18f8){const _0x3f2947=_0x4874f3['has'](_0x3eeb61)&&!_0x4874f3['get'](_0x3eeb61)['isAttached'];let _0x1f0a7e=_0x3f2947?_0x2df778['length']-0x1:0x0;const _0x50f757=_0x3f2947?-0x1:0x1;for(;_0x2df778[_0x1f0a7e];){const _0x464963=_0x2df778[_0x1f0a7e];if(_0x464963['diffData'][_0x3eeb61]){const _0x48dd1b=_0x3f2947?_0x464963['diffData'][_0x3eeb61]['attributesBefore']:_0x464963['diffData'][_0x3eeb61]['attributesAfter'];_0xf74b86['attributes'][_0x3eeb61]=_0x48dd1b?_0x36350a(_0x48dd1b):{};break;}_0x1f0a7e+=_0x50f757;}}for(const _0xa781aa of _0x2df778){_0xa781aa['model']={};for(const _0x52d8f9 of _0xa781aa['authors'])_0x3da8b6['set'](_0x52d8f9['id'],_0x52d8f9);for(const _0x392fc8 of _0x4b18f8){const _0x4ff9c9=_0xa781aa['diffData'][_0x392fc8]?_0xa781aa['diffData'][_0x392fc8]['insertions']:'[]',_0x1ba3f4=_0xa781aa['diffData'][_0x392fc8]?_0xa781aa['diffData'][_0x392fc8]['deletions']:'[]';_0xa781aa['model'][_0x392fc8]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4ff9c9),'deletions':this['_utils']['_makeModelFromViewString'](_0x1ba3f4)};}}for(const _0x5239ec of _0x4b18f8){let _0x16beb0=null,_0x5bc196=0x0;const _0x2c451b=new Map(Array['from'](_0x19a1b1['model'][_0x5239ec]['insertions']['markers'])['filter'](([_0x129d9b])=>!_0x129d9b['startsWith']('revision:')));let _0x15855d=0x0;for(const _0x3bdf87 of _0x2df778){const _0x3c92bb=this['_makeTape'](_0x3bdf87['model'][_0x5239ec]['insertions']);_0x3bdf87==_0x19a1b1?(_0x16beb0=_0x3c92bb,_0x5bc196=_0x16beb0['length'],_0x16beb0['forEach'](_0x33bfaf=>{_0x33bfaf['id']=_0x15855d++;}),this['_processTape'](_0x16beb0)):this['_markInsertions'](_0x16beb0,_0x3c92bb);const _0x3d2cdd=_0x16beb0['filter'](_0x1dff63=>!_0x1dff63['isAdded'])['map'](_0x1d206e=>_0x1d206e['id']);let _0x59a24f=0x0;const _0x1f13f6=this['_makeTape'](_0x3bdf87['model'][_0x5239ec]['deletions']);_0x1f13f6['forEach'](_0x110ea2=>{_0x110ea2['isRemoved']?_0x110ea2['id']=_0x5bc196++:_0x110ea2['id']=_0x3d2cdd[_0x59a24f++];}),this['_processTape'](_0x1f13f6),this['_setDistance'](_0x16beb0,'isAdded'),this['_setDistance'](_0x1f13f6,'isRemoved'),_0x3bdf87==_0x19a1b1&&this['_markMarkers'](_0x16beb0,_0x2c451b),_0x16beb0=this['_joinTapes'](_0x16beb0,_0x1f13f6),this['_refreshStartEndIndex'](_0x16beb0),this['_setDistance'](_0x16beb0,'isRemoved');}_0x16beb0=_0x16beb0['filter'](_0x3adc67=>!(_0x3adc67['isAdded']&&_0x3adc67['isRemoved']));const _0x56064e=new Map(_0x1108be['model'][_0x5239ec]['deletions']['markers']),_0x4d7f1f=new Set(_0x2c451b['keys']());for(const _0x5f2656 of _0x56064e['keys']())_0x4d7f1f['delete'](_0x5f2656);this['_markSuggestions'](_0x16beb0,_0x4d7f1f),this['_fixObsoleteTags'](_0x16beb0),_0x16beb0=this['_removeMissingPairs'](_0x16beb0),_0x16beb0=this['_markMismatchedRemovedTags'](_0x16beb0),_0x16beb0=this['_removeUnsupportedChanges'](_0x16beb0);const {root:_0xe12fd,changes:_0x18240b}=this['_makeModelFromTape'](_0x16beb0,_0x3da8b6,_0x5239ec);_0xf74b86['model'][_0x5239ec]=_0xe12fd;const _0x3592bd=_0x4874f3['get'](_0x5239ec);if(_0x3592bd){const _0x41e02a=_0x3da8b6['get'](_0x3592bd['userId']),_0x5b666a=new G({'author':_0x41e02a,'type':_0x3592bd['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5239ec});_0x18240b['unshift'](_0x5b666a),_0xf74b86['attributes'][_0x5239ec]['revisionHistoryAttachChange']=_0x5b666a['id'];}_0xf74b86['changes']=_0xf74b86['changes']['concat'](_0x18240b);}return _0xf74b86;}['_markMarkers'](_0xcd7e69,_0x316372){for(let _0x52782f=0x0;_0x52782f<_0xcd7e69['length'];_0x52782f++)for(const [_0x7d2098,_0x492021]of _0x316372)!_0x492021['isCollapsed']&&_0x492021['start']['isEqual'](_0xcd7e69[_0x52782f]['previousPosition'])&&_0xcd7e69[_0x52782f]['markersStart']['push'](_0x7d2098),_0x492021['end']['isEqual'](_0xcd7e69[_0x52782f]['nextPosition'])&&_0xcd7e69[_0x52782f]['markersEnd']['push'](_0x7d2098);}['_joinTapes'](_0x2fb85a,_0x13dcf2){let _0x7255e2=[],_0x18d6e7=0x0,_0x411ce5=0x0;for(;_0x18d6e7<_0x2fb85a['length']||_0x411ce5<_0x13dcf2['length'];){const _0x5751d4=_0x2fb85a[_0x18d6e7]||{},_0x44584a=_0x13dcf2[_0x411ce5]||{};if(_0x5751d4['id']==_0x44584a['id'])_0x18d6e7++,_0x411ce5++,_0x7255e2['push'](_0x5751d4);else{if(_0x44584a['isRemoved']&&_0x5751d4['isAdded']){const {commonTape:_0x1716c1,iEnd:_0x29ae42,jEnd:_0x2dad8c}=this['_threeWayMerge'](_0x2fb85a,_0x18d6e7,_0x13dcf2,_0x411ce5);_0x7255e2=_0x7255e2['concat'](_0x1716c1),_0x18d6e7=_0x29ae42,_0x411ce5=_0x2dad8c;}else _0x44584a['isRemoved']?(_0x411ce5++,_0x7255e2['push'](_0x44584a)):(_0x18d6e7++,_0x7255e2['push'](_0x5751d4));}}return _0x7255e2;}['_markSuggestions'](_0x19da24,_0x2dc4b0){const _0x3fcebc=[];for(let _0x59051a=0x0;_0x59051a<_0x19da24['length'];_0x59051a++){for(let _0x2d72b2=0x0;_0x2d72b2<_0x19da24[_0x59051a]['markersStart']['length'];_0x2d72b2++){const _0x33d1bf=_0x19da24[_0x59051a]['markersStart'][_0x2d72b2];if(!_0x2dc4b0['has'](_0x33d1bf))continue;const {group:_0x266dd0,type:_0x43af8c,authorId:_0x3c9094}=_0x58110b(_0x33d1bf);'revision-suggestion'!=_0x266dd0||'insertion'!=_0x43af8c&&'deletion'!=_0x43af8c||(_0x3fcebc['unshift']({'type':_0x43af8c,'name':_0x33d1bf,'userId':_0x3c9094}),_0x19da24[_0x59051a]['markersStart']['splice'](_0x2d72b2,0x1),_0x2d72b2--);}_0x7fcd80(_0x19da24[_0x59051a]);for(let _0x4db82d=0x0;_0x4db82d<_0x19da24[_0x59051a]['markersEnd']['length'];_0x4db82d++){const _0x41dc13=_0x19da24[_0x59051a]['markersEnd'][_0x4db82d];if(!_0x2dc4b0['has'](_0x41dc13))continue;const {group:_0x8ec14d,type:_0x3cfdec}=_0x58110b(_0x41dc13);if('revision-suggestion'!=_0x8ec14d||'insertion'!=_0x3cfdec&&'deletion'!=_0x3cfdec)continue;_0x19da24[_0x59051a]['markersEnd']['splice'](_0x4db82d,0x1),_0x4db82d--;const _0x54c62f=_0x3fcebc['findIndex'](_0x1f0153=>_0x1f0153['name']==_0x41dc13);_0x54c62f>-0x1&&_0x3fcebc['splice'](_0x54c62f,0x1);}}function _0x58110b(_0x444ad8){const _0x2b82d3=_0x444ad8['split'](':');return{'group':_0x2b82d3[0x0],'type':_0x2b82d3[0x1],'subType':_0x2b82d3['length']>=0x5?_0x2b82d3[0x2]:null,'id':_0x2b82d3['length']<0x5?_0x2b82d3[0x2]:_0x2b82d3[0x3],'authorId':_0x2b82d3['length']<0x5?_0x2b82d3[0x3]:_0x2b82d3[0x4],'markerCount':0x6==_0x2b82d3['length']?_0x2b82d3[0x5]:null};}function _0x7fcd80(_0x5ebf65){for(let _0x4c9170=0x0;_0x4c9170<_0x3fcebc['length'];_0x4c9170++){if(_0x5ebf65['isAdded']&&'insertion'==_0x3fcebc[_0x4c9170]['type']&&_0x5ebf65['isAdded']['userId']==_0x3fcebc[_0x4c9170]['userId'])return _0x5ebf65['isAddSuggestion']=_0x3fcebc[_0x4c9170],void delete _0x5ebf65['isAdded'];if(!_0x5ebf65['isAdded']&&!_0x5ebf65['isRemoved']&&'deletion'==_0x3fcebc[_0x4c9170]['type'])return void(_0x5ebf65['isRemoveSuggestion']=_0x3fcebc[_0x4c9170]);}}}['_setDistance'](_0x3b0a48,_0x58250b){let _0x412104=0x0,_0x55b5ec=!0x1;const _0x247f9c=new Map();for(const _0x5c281d of _0x3b0a48)_0x5c281d[_0x58250b]?_0x55b5ec&&(_0x412104++,_0x55b5ec=!0x1):(_0x412104++,_0x55b5ec=!0x0),_0x247f9c['set'](_0x5c281d['id'],_0x412104);for(let _0x45ad6f=0x0;_0x45ad6f<_0x3b0a48['length'];_0x45ad6f++){if('isRemoved'==_0x58250b&&_0x3b0a48[_0x45ad6f]['isAdded']||'isAdded'==_0x58250b&&_0x3b0a48[_0x45ad6f]['isRemoved'])continue;if('text'==_0x3b0a48[_0x45ad6f]['type']){_0x3b0a48[_0x45ad6f]['distance']=0x0;continue;}const _0x495e49=_0x247f9c['get'](_0x3b0a48[_0x45ad6f]['pairId']),_0x4564e0=_0x247f9c['get'](_0x3b0a48[_0x45ad6f]['id']);_0x3b0a48[_0x45ad6f]['distance']=_0x495e49-_0x4564e0;}}['_getRevisionsRange'](_0x37f0de,_0x2b1fed,_0x53fab5=!0x1){const _0x2ba167=[];let _0x1896d7=this['repository']['getIndex'](_0x37f0de),_0x2c57c9=this['repository']['getIndex'](_0x2b1fed);for(-0x1==_0x2c57c9&&(_0x2c57c9=this['repository']['_revisions']['length'],_0x53fab5=!0x1);_0x1896d7<_0x2c57c9;)_0x2ba167['push'](this['repository']['getRevision'](_0x1896d7)),_0x1896d7++;return _0x53fab5&&_0x2ba167['push'](this['repository']['getRevision'](_0x1896d7)),_0x2ba167;}['_threeWayMerge'](_0x1b03b,_0x338599,_0x4a5ed8,_0xeb73f1){const _0x1f9b08=this['editor']['model']['schema'];let _0x1e7de7=_0x338599;for(;_0x1b03b[_0x1e7de7]&&_0x1b03b[_0x1e7de7]['isAdded'];)_0x1e7de7++;let _0x5c903a=_0xeb73f1;for(;_0x4a5ed8[_0x5c903a]&&_0x4a5ed8[_0x5c903a]['isRemoved'];)_0x5c903a++;_0x4b2cbf(_0x1b03b,_0x338599,_0x1e7de7),_0x4b2cbf(_0x4a5ed8,_0xeb73f1,_0x5c903a);const _0x17308d=_0x4a5ed8['slice'](_0xeb73f1,_0x5c903a)['concat'](_0x1b03b['slice'](_0x338599,_0x1e7de7));return _0x17308d['sort']((_0x245313,_0x5b4861)=>_0x245313['side']!=_0x5b4861['side']?_0x245313['side']-_0x5b4861['side']:_0x245313['level']!=_0x5b4861['level']?_0x245313['level']-_0x5b4861['level']:_0x245313['distance']!=_0x5b4861['distance']?_0x5b4861['distance']-_0x245313['distance']:!!_0x245313['isAdded']!=!!_0x5b4861['isAdded']?-0x1==_0x245313['side']||0x0==_0x245313['side']?_0x245313['isAdded']?-0x1:0x1:_0x245313['isAdded']?0x1:-0x1:_0x245313['index']-_0x5b4861['index']),{'commonTape':_0x17308d,'iEnd':_0x1e7de7,'jEnd':_0x5c903a};function _0x4b2cbf(_0x7056da,_0x1d6054,_0x544027){let _0x5cdf94=-0x1,_0x9f7bdd=Number['POSITIVE_INFINITY'],_0x570dd3=!0x0;for(let _0x2b71f4=_0x1d6054;_0x2b71f4<_0x544027;_0x2b71f4++)if(_0x1f9b08['isInline'](_0x7056da[_0x2b71f4]['item'])||(_0x570dd3=!0x1),_0x7056da[_0x2b71f4]['item']['startIndex']<_0x1d6054&&(_0x5cdf94=_0x2b71f4),_0x7056da[_0x2b71f4]['item']['endIndex']>=_0x544027){_0x9f7bdd=_0x2b71f4;break;}_0x570dd3&&(_0x5cdf94=_0x544027-0x1);for(let _0x2924ae=_0x1d6054;_0x2924ae<_0x544027;_0x2924ae++)_0x7056da[_0x2924ae]['side']=_0x2924ae<=_0x5cdf94?-0x1:_0x2924ae<_0x9f7bdd?0x0:0x1,_0x7056da[_0x2924ae]['index']=_0x2924ae;let _0x3c3437=0x0;for(let _0x49fa21=_0x1d6054;_0x49fa21<=_0x5cdf94;_0x49fa21++)0x0==_0x7056da[_0x49fa21]['distance']?_0x7056da[_0x49fa21]['level']=_0x3c3437:(_0x3c3437++,_0x7056da[_0x49fa21]['level']=_0x3c3437,_0x3c3437++);for(let _0x193778=_0x1d6054;_0x193778<_0x544027;_0x193778++)0x0==_0x7056da[_0x193778]['side']&&(_0x7056da[_0x193778]['level']=_0x3c3437);_0x3c3437=0x0;for(let _0x2907d3=_0x544027-0x1;_0x2907d3>=_0x9f7bdd;_0x2907d3--)0x0==_0x7056da[_0x2907d3]['distance']?_0x7056da[_0x2907d3]['level']=_0x3c3437:(_0x3c3437--,_0x7056da[_0x2907d3]['level']=_0x3c3437,_0x3c3437--);}}['_fixObsoleteTags'](_0xff0bd9){const _0x180330=new Map(),_0x349959=this['editor']['model']['schema'];for(let _0x51c2d6=0x1;_0x51c2d6<_0xff0bd9['length'];_0x51c2d6++){let _0x297836,_0x506a7b,_0x4598d5;const _0x1883b1=_0xff0bd9[_0x51c2d6],_0x114929=_0xff0bd9[_0x51c2d6-0x1];if('text'==_0x1883b1['type'])continue;if(_0x1883b1['type']!=_0x114929['type'])continue;if(!_0x349959['isBlock'](_0x114929['item'])||_0x349959['isLimit'](_0x114929['item']))continue;if(!_0x349959['isBlock'](_0x1883b1['item'])||_0x349959['isLimit'](_0x1883b1['item']))continue;if((_0xff0bd9[_0x51c2d6]['isAdded']||_0xff0bd9[_0x51c2d6]['isAddSuggestion'])&&_0xff0bd9[_0x51c2d6-0x1]['isRemoved'])_0x297836=_0xff0bd9[_0x51c2d6],_0x506a7b=_0xff0bd9[_0x51c2d6-0x1],_0x4598d5=_0x51c2d6-0x1;else{if(!_0xff0bd9[_0x51c2d6]['isRemoved']||!_0xff0bd9[_0x51c2d6-0x1]['isAdded']&&!_0xff0bd9[_0x51c2d6-0x1]['isAddSuggestion'])continue;_0x297836=_0xff0bd9[_0x51c2d6-0x1],_0x506a7b=_0xff0bd9[_0x51c2d6],_0x4598d5=_0x51c2d6;}const _0x247265=_0x297836['level']==_0x506a7b['level'],_0x5ab393=Math['abs'](_0x297836['level'])<Math['abs'](_0x506a7b['level'])&&0x0==_0x506a7b['distance'];(_0x247265||_0x5ab393)&&(_0x180330['set'](_0x506a7b['id'],_0x297836['id']),_0xff0bd9['splice'](_0x4598d5,0x1),_0x51c2d6--,_0x297836['isAdded']=!0x1);}for(let _0x31f310=0x0;_0x31f310<_0xff0bd9['length'];_0x31f310++)_0x180330['has'](_0xff0bd9[_0x31f310]['pairId'])&&(_0xff0bd9[_0x31f310]['pairId']=_0x180330['get'](_0xff0bd9[_0x31f310]['pairId']));}['_removeMissingPairs'](_0xcf977a){const _0x1e5e55=new Set(_0xcf977a['map'](_0x4e15f4=>_0x4e15f4['id']));for(let _0x3bba3f=0x0;_0x3bba3f<_0xcf977a['length'];_0x3bba3f++)_0x1e5e55['has'](_0xcf977a[_0x3bba3f]['pairId'])||0x0==_0xcf977a[_0x3bba3f]['distance']||(_0xcf977a[_0x3bba3f]['isIncorrect']=!0x0);return _0xcf977a['filter'](_0x465626=>!_0x465626['isIncorrect']);}['_markMismatchedRemovedTags'](_0x4b9080){const _0x5808d8=new Set();for(let _0x3a6310=0x0;_0x3a6310<_0x4b9080['length'];_0x3a6310++){if(_0x5808d8['has'](_0x4b9080[_0x3a6310]['id'])&&_0x4b9080[_0x3a6310]['isRemoved']&&(_0x4b9080[_0x3a6310]['isIncorrect']=!0x0),_0x4b9080[_0x3a6310]['isIncorrect'])continue;if(0x0==_0x4b9080[_0x3a6310]['distance'])continue;if('elementStart'!=_0x4b9080[_0x3a6310]['type'])continue;if(null==_0x4b9080[_0x3a6310]['pairId'])continue;let _0x119756=_0x3a6310+0x1,_0x4cb668=0x0;for(;_0x4b9080[_0x119756]['id']!=_0x4b9080[_0x3a6310]['pairId'];)'elementStart'==_0x4b9080[_0x119756]['type']?_0x4cb668++:'elementEnd'==_0x4b9080[_0x119756]['type']&&_0x4cb668--,_0x119756++;if(0x0!=_0x4cb668){if(_0x4b9080[_0x3a6310]['isRemoved'])_0x4b9080[_0x3a6310]['isIncorrect']=!0x0;else{for(;_0x119756!=_0x3a6310;)_0x4b9080[_0x119756]['isRemoved']&&0x0!=_0x4b9080[_0x119756]['distance']&&(_0x4b9080[_0x119756]['isIncorrect']=!0x0,_0x5808d8['add'](_0x4b9080[_0x119756]['pairId'])),_0x119756--;}}}return _0x4b9080['filter'](_0x232575=>!_0x232575['isIncorrect']);}['_removeUnsupportedChanges'](_0x5c5d46){const _0x1b69d8=this['editor']['model']['schema'];for(let _0x148aaf=0x0;_0x148aaf<_0x5c5d46['length'];_0x148aaf++){if(!(_0x5c5d46[_0x148aaf]['isAdded']||_0x5c5d46[_0x148aaf]['isAddSuggestion']||_0x5c5d46[_0x148aaf]['isRemoved']||_0x5c5d46[_0x148aaf]['isRemoveSuggestion']))continue;if(0x0==_0x5c5d46[_0x148aaf]['distance'])continue;const _0x452dd6=_0x5c5d46[_0x148aaf]['item'];_0x1b69d8['isBlock'](_0x452dd6)||_0x1b69d8['isLimit'](_0x452dd6)||(_0x5c5d46[_0x148aaf]['isAdded']&&delete _0x5c5d46[_0x148aaf]['isAdded'],_0x5c5d46[_0x148aaf]['isAddSuggestion']&&delete _0x5c5d46[_0x148aaf]['isAddSuggestion'],_0x5c5d46[_0x148aaf]['isRemoveSuggestion']&&delete _0x5c5d46[_0x148aaf]['isRemoveSuggestion'],_0x5c5d46[_0x148aaf]['isRemoved']&&(_0x5c5d46[_0x148aaf]['isIncorrect']=!0x0));}return _0x5c5d46['filter'](_0x4a4f76=>!_0x4a4f76['isIncorrect']);}['_makeModelFromTape'](_0x563720,_0x2e38cf,_0x4e17fb){const _0xbe606e=new _0xa9a204(),_0x5e6cb9=[],_0xf5708a=new Map(),_0x250e7b=this['editor']['model'],_0x474821=_0x250e7b['schema'],_0xde75cb=[_0xbe606e],_0x41ed89={},_0x1509bc={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x2032d8=null;const _0x151ed7=[0x0];for(let _0x43db45=0x0;_0x43db45<_0x563720['length'];_0x43db45++)if('elementStart'===_0x563720[_0x43db45]['type']){_0x563720[_0x43db45]['previousPosition']=_0x250e7b['createPositionFromPath'](_0xbe606e,_0x151ed7);const _0x5b67d9=new _0x49cb5a(_0x563720[_0x43db45]['item']['name'],_0x563720[_0x43db45]['item']['getAttributes']());_0xde75cb[0x0]['_appendChild'](_0x5b67d9),_0x151ed7['push'](0x0),_0xde75cb['unshift'](_0x5b67d9),_0x563720[_0x43db45]['nextPosition']=_0x250e7b['createPositionFromPath'](_0xbe606e,_0x151ed7);}else'elementEnd'===_0x563720[_0x43db45]['type']?(_0xde75cb['shift'](),_0x563720[_0x43db45]['previousPosition']=_0x250e7b['createPositionFromPath'](_0xbe606e,_0x151ed7),_0x151ed7['pop'](),_0x151ed7[_0x151ed7['length']-0x1]++,_0x563720[_0x43db45]['nextPosition']=_0x250e7b['createPositionFromPath'](_0xbe606e,_0x151ed7)):(_0x563720[_0x43db45]['previousPosition']=_0x250e7b['createPositionFromPath'](_0xbe606e,_0x151ed7),_0x2032d8?_0x2032d8['_data']+=_0x563720[_0x43db45]['item']['data']:_0x2032d8=new _0x230507(_0x563720[_0x43db45]['item']['data'],_0x563720[_0x43db45]['item']['getAttributes']()),_0x563720[_0x43db45+0x1]&&'text'===_0x563720[_0x43db45+0x1]['type']&&_0x40a60b(_0x2032d8,_0x563720[_0x43db45+0x1]['item'])||(_0xde75cb[0x0]['_appendChild'](_0x2032d8),_0x2032d8=null),_0x151ed7[_0x151ed7['length']-0x1]+=_0x563720[_0x43db45]['item']['offsetSize'],_0x563720[_0x43db45]['nextPosition']=_0x250e7b['createPositionFromPath'](_0xbe606e,_0x151ed7));for(let _0x2039c2=0x0;_0x2039c2<_0x563720['length'];_0x2039c2++){const _0x249b58=_0x563720[_0x2039c2]['previousPosition'],_0x4489ae=_0x563720[_0x2039c2]['nextPosition'];for(const _0x2cfb41 of _0x563720[_0x2039c2]['markersStart'])_0xf5708a['set'](_0x2cfb41,{'start':_0x249b58,'end':null});_0x325cf2('isRemoveSuggestion',_0x2039c2,_0x249b58,_0x4489ae),_0x325cf2('isAddSuggestion',_0x2039c2,_0x249b58,_0x4489ae),_0x325cf2('isRemoved',_0x2039c2,_0x249b58,_0x4489ae),_0x325cf2('isAdded',_0x2039c2,_0x249b58,_0x4489ae);for(const _0x3de4cf of _0x563720[_0x2039c2]['markersEnd']){const _0x5b588e=_0xf5708a['get'](_0x3de4cf);_0x5b588e?_0x5b588e['end']=_0x4489ae:_0xf5708a['set'](_0x3de4cf,{'start':_0x4489ae,'end':_0x4489ae});}}for(const [_0xa6e9ec,_0x4f2c6f]of _0xf5708a){const _0x341915=this['editor']['model']['createRange'](_0x4f2c6f['start'],_0x4f2c6f['end']);_0xbe606e['markers']['set'](_0xa6e9ec,_0x341915);}return _0x5e6cb9['sort']((_0x4fc57a,_0xc538ed)=>{const _0x44915a=_0xbe606e['markers']['get']('revision:'+_0x4fc57a['id']),_0x43f451=_0xbe606e['markers']['get']('revision:'+_0xc538ed['id']);return _0x44915a['start']['isBefore'](_0x43f451['start'])?-0x1:_0x44915a['start']['isAfter'](_0x43f451['start'])?0x1:_0x44915a['end']['isBefore'](_0x43f451['end'])?-0x1:_0x44915a['end']['isAfter'](_0x43f451['end'])?0x1:'add'===_0x4fc57a['type']?-0x1:0x1;}),{'root':_0xbe606e,'changes':_0x5e6cb9};function _0x325cf2(_0x159b8c,_0x231518,_0x23d112,_0x1da5f4){const _0x49ed9a=!!_0x563720[_0x231518][_0x159b8c],_0x36a531=_0x49ed9a?_0x563720[_0x231518][_0x159b8c]['userId']:null,_0x1bd7e8=_0x231518===_0x563720['length']-0x1,_0x491689=_0x1509bc[_0x159b8c][0x0],_0x3b5650=_0x474821['isObject'](_0x563720[_0x231518]['item']);!_0x41ed89[_0x159b8c]&&_0x49ed9a?_0x41ed89[_0x159b8c]={'start':_0x23d112,'tapeItem':_0x563720[_0x231518],'userId':_0x36a531,'type':_0x159b8c}:_0x41ed89[_0x159b8c]&&!_0x49ed9a?(_0x41ed89[_0x159b8c]['end']=_0x23d112,_0x3b4559(_0x41ed89[_0x159b8c]),_0x41ed89[_0x159b8c]=null):_0x41ed89[_0x159b8c]&&_0x49ed9a&&_0x41ed89[_0x159b8c]['userId']!==_0x36a531&&(_0x41ed89[_0x159b8c]['end']=_0x23d112,_0x491689&&_0x491689['userId']===_0x41ed89[_0x159b8c]['userId']||_0x3b4559(_0x41ed89[_0x159b8c]),_0x41ed89[_0x159b8c]={'start':_0x23d112,'tapeItem':_0x563720[_0x231518],'userId':_0x36a531,'type':_0x159b8c}),_0x41ed89[_0x159b8c]&&_0x3b5650&&('elementStart'!==_0x563720[_0x231518]['type']||_0x491689&&_0x491689['userId']===_0x36a531||_0x1509bc[_0x159b8c]['unshift']({'userId':_0x36a531,'object':_0x563720[_0x231518]['item'],'change':_0x41ed89[_0x159b8c]}),'elementEnd'===_0x563720[_0x231518]['type']&&_0x491689&&_0x491689['object']===_0x563720[_0x231518]['item']&&(_0x1509bc[_0x159b8c]['shift'](),_0x41ed89[_0x159b8c]=_0x491689['change'])),_0x41ed89[_0x159b8c]&&_0x1bd7e8&&(_0x41ed89[_0x159b8c]['end']=_0x1da5f4,_0x3b4559(_0x41ed89[_0x159b8c]),_0x41ed89[_0x159b8c]=null);}function _0x3b4559({start:_0x323822,end:_0x3d6e98,tapeItem:_0x41216f,userId:_0x4ebc41,type:_0x33429d}){const _0x365be4=_0x41216f['item'],_0x53db59=_0x250e7b['schema']['isBlock'](_0x365be4)&&!_0x250e7b['schema']['isLimit'](_0x365be4),_0x489e3b=_0x323822['nodeAfter']==_0x3d6e98['parent']&&_0x3d6e98['isAtStart'];if(_0x53db59&&_0x489e3b)return;const _0x57490e=_0x250e7b['createRange'](_0x323822,_0x3d6e98),_0x3d8109=_0x2e38cf['get'](_0x4ebc41),_0x1ae55b=new G({'author':_0x3d8109,'type':'isAdded'==_0x33429d||'isAddSuggestion'==_0x33429d?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x33429d||'isRemoveSuggestion'==_0x33429d},'createdAt':new Date(),'rootName':_0x4e17fb});_0x5e6cb9['push'](_0x1ae55b),_0xbe606e['markers']['set']('revision:'+_0x1ae55b['id'],_0x57490e);}function _0x40a60b(_0x201610,_0x10d56d){const _0x8ba71d=_0x201610['getAttributes'](),_0x40e72f=_0x10d56d['getAttributes']();for(const _0x5b53bf of _0x8ba71d){if(_0x5b53bf[0x1]!==_0x10d56d['getAttribute'](_0x5b53bf[0x0]))return!0x1;_0x40e72f['next']();}return _0x40e72f['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x358fdf=>{const _0x1b241a=_0x358fdf['markerName']['split'](':')[0x1],_0x1ba90f=this['_getChangeFromId'](_0x1b241a);if(!_0x1ba90f)return null;const _0x562139='add'==_0x1ba90f['type']?'insertion':'deletion',_0xe71dac=['ck-suggestion-marker','ck-suggestion-marker-'+_0x562139];return _0x1ba90f['data']['isSuggestion']&&_0xe71dac['push']('ck-suggestion-marker-'+_0x562139+'-new'),this['activeChange']==_0x1ba90f&&_0xe71dac['push']('ck-suggestion-marker--active'),{'classes':_0xe71dac,'attributes':{'data-change-id':_0x1b241a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x40cbd6=>{_0x40cbd6['on']('element:pre',(_0x21aa77,_0x43abca,_0x5145bd)=>{const _0xe3335c=_0x43abca['viewItem']['getChild'](0x0);if(!_0xe3335c||!_0xe3335c['is']('element','code'))return;if(!_0x5145bd['consumable']['consume'](_0xe3335c,{'attributes':['vid_start','vid_end']}))return;const _0x4a9a55=_0x43abca['modelRange']['start']['nodeAfter'];_0x5145bd['writer']['setAttribute']('vid_start',_0xe3335c['getAttribute']('vid_start'),_0x4a9a55),_0x5145bd['writer']['setAttribute']('vid_end',_0xe3335c['getAttribute']('vid_end'),_0x4a9a55);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1337cb=>{_0x1337cb['on']('element',(_0x234370,_0xb86cc,_0x5d012c)=>{if(!_0x5d012c['consumable']['consume'](_0xb86cc['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0xb86cc['modelRange']['isCollapsed'])return;const _0x4e79d4=_0xb86cc['modelRange']['start']['nodeAfter'];_0x4e79d4['hasAttribute']('vid_start')||_0x4e79d4['hasAttribute']('vid')||(_0x5d012c['writer']['setAttribute']('vid_start',_0xb86cc['viewItem']['getAttribute']('vid_start'),_0x4e79d4),_0x5d012c['writer']['setAttribute']('vid_end',_0xb86cc['viewItem']['getAttribute']('vid_end'),_0x4e79d4));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x58c2a5=>_0x58c2a5['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x3202a7,[,_0x1307f7])=>{['vid_start','vid_end','vid']['includes'](_0x1307f7)&&(_0x3202a7['return']=!0x0,_0x3202a7['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4de615=>{_0x4de615['on']('attribute:vid',(_0x17daff,_0x17becc,_0x179465)=>{if('\x20'!=_0x17becc['item']['data']||_0x17becc['item']['parent']['maxOffset']>0x1)return;if(!_0x179465['consumable']['consume'](_0x17becc['item'],_0x17daff['name']))return;const _0x451508=_0x179465['writer'],_0x1237b8=_0x179465['mapper']['toViewRange'](_0x17becc['range']);_0x451508['wrap'](_0x1237b8,_0x451508['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x365d4c){const _0x15017d=_0x365d4c['plugins']['get']('RevisionViewer');return(_0x19508b,_0x16f3fa,_0x35c96a)=>{const _0x4bcc57=_0x16f3fa['markerName']['split'](':')[0x1],_0x443316=_0x15017d['_getChangeFromId'](_0x4bcc57);if(!_0x443316)return null;const _0x59a3b3='add'==_0x443316['type']?'split':'merge';if(!_0x35c96a['consumable']['test'](_0x16f3fa['markerRange'],_0x19508b['name']))return;const _0x4ed36e=_0x16f3fa['markerRange']['getWalker'](),_0x18de32=_0x16f3fa['markerRange']['start'],_0x5f580c=_0x365d4c['model']['schema'];let _0x41a15a=null,_0x7ccdc4=null,_0x24f5c3=!0x1,_0x4ef7d7=!0x1;for(const _0x2abac1 of _0x4ed36e){const _0x580b86=_0x2abac1['item'];_0x24f5c3=_0x24f5c3||_0x5f580c['isContent'](_0x580b86);const _0x2b3fcc=_0x35c96a['mapper']['toViewElement'](_0x580b86);if(_0x2b3fcc&&_0x2b3fcc['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x2abac1['type']&&(_0x5f580c['isBlock'](_0x580b86)&&!_0x5f580c['isLimit'](_0x580b86)&&(_0x580b86['nextSibling']||_0x18de32['isAtEnd']?_0x41a15a&&_0x41a15a['parent']==_0x580b86||(_0x41a15a=_0x580b86,_0x45d529(_0x2abac1['previousPosition']),_0x4ef7d7=!0x0):_0x7ccdc4=_0x7ccdc4||_0x2abac1['previousPosition']));}function _0x45d529(_0x59328a){const _0x3f612f=_0x35c96a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x59a3b3}),_0xbe3ffb=_0x35c96a['mapper']['toViewPosition'](_0x59328a);_0x443316['data']['isSuggestion']&&_0x35c96a['writer']['addClass']('ck-suggestion-marker-'+_0x59a3b3+'-new',_0x3f612f),_0x15017d['activeChange']==_0x443316&&_0x35c96a['writer']['addClass']('ck-suggestion-marker--active',_0x3f612f),_0x35c96a['writer']['insert'](_0xbe3ffb,_0x3f612f),_0x35c96a['mapper']['bindElementToMarker'](_0x3f612f,_0x16f3fa['markerName']);}_0x24f5c3||_0x4ef7d7||!_0x7ccdc4||_0x45d529(_0x7ccdc4);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x25c8b6,_0x4e9e12,_0x2fb584)=>{const _0x3a2894=_0x2fb584['mapper']['markerNameToElements'](_0x4e9e12['markerName']);if(_0x3a2894){for(const _0x43f869 of _0x3a2894)(_0x43f869['hasClass']('ck-suggestion-marker-split')||_0x43f869['hasClass']('ck-suggestion-marker-merge'))&&(_0x2fb584['mapper']['unbindElementFromMarkerName'](_0x43f869,_0x4e9e12['markerName']),_0x2fb584['writer']['remove'](_0x43f869));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x6af76,_0x4ee991,_0x329458)=>{const _0x315cc4=_0x4ee991['markerName']['split'](':')[0x1],_0x176b5f=this['_getChangeFromId'](_0x315cc4);if(!_0x176b5f)return null;const _0x5d0a4a='add'==_0x176b5f['type']?'split':'merge';if(_0x329458['consumable']['test'](_0x4ee991['markerRange'],_0x6af76['name']))for(const _0x5e9dfa of _0x4ee991['markerRange']['getItems']()){if(!_0x5e9dfa['is']('element','softBreak'))continue;const _0x56fed9=_0x329458['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x5d0a4a}),_0xf22402=_0x329458['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5e9dfa));_0x176b5f['data']['isSuggestion']&&_0x329458['writer']['addClass']('ck-suggestion-marker-'+_0x5d0a4a+'-new',_0x56fed9),this['activeChange']==_0x176b5f&&_0x329458['writer']['addClass']('ck-suggestion-marker--active',_0x56fed9),_0x329458['writer']['insert'](_0xf22402,_0x56fed9),_0x329458['mapper']['bindElementToMarker'](_0x56fed9,_0x4ee991['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x40fb0b=>{for(const _0x417bff of this['editor']['model']['document']['getRootNames']()){const _0x5d69d5=this['editor']['model']['document']['getRoot'](_0x417bff),_0x369d8a=this['editor']['editing']['view']['document']['getRoot'](_0x417bff);if(_0x369d8a){const _0xd00ea4=_0x5d69d5['getAttribute']('revisionHistoryAttachChange');if(_0x40fb0b['removeAttribute']('data-change-id',_0x369d8a),_0x40fb0b['removeClass']('ck-revision-history-root-add',_0x369d8a),_0x40fb0b['removeClass']('ck-revision-history-root-remove',_0x369d8a),_0x40fb0b['removeClass']('ck-revision-history-root--active',_0x369d8a),_0xd00ea4){const _0x190b87=this['_getChangeFromId'](_0xd00ea4);if(!_0x190b87)return null;_0x40fb0b['setAttribute']('data-change-id',_0xd00ea4,_0x369d8a),_0x40fb0b['addClass']('ck-revision-history-root-'+_0x190b87['type'],_0x369d8a),this['activeChange']==_0x190b87&&_0x40fb0b['addClass']('ck-revision-history-root--active',_0x369d8a);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x555117=>'revision-comment:'+_0x555117,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x286eb3=>'revision-suggestion:'+_0x286eb3,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x3a3a05=>({'name':'suggestion:'+_0x3a3a05,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x4c29bd=>{const _0x305eb4=_0x4c29bd['markerName']['split'](':')[0x1];return'insertion'!=_0x305eb4&&'deletion'!=_0x305eb4?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x305eb4]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x38cbd6,_0x1d0c3f,_0x243648)=>{const _0x3c90e1=_0x243648['mapper']['markerNameToElements'](_0x1d0c3f['markerName']);if(_0x3c90e1){for(const _0x157d3a of _0x3c90e1)_0x157d3a['is']('uiElement')&&(_0x243648['mapper']['unbindElementFromMarkerName'](_0x157d3a,_0x1d0c3f['markerName']),_0x243648['writer']['remove'](_0x157d3a));}},{'priority':'high'});}['_getChangeFromId'](_0x12e191){return this['_changeIdToChange']['get'](_0x12e191);}['_getViewForChange'](_0xbbc9ac){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0xbbc9ac),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2d239a,_0x430b14,_0x4019ad,_0x20a4b5)=>{_0x20a4b5&&this['_balloon']['remove'](_0x20a4b5),_0x4019ad&&(this['_balloon']['add']({'view':_0x4019ad,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x35f92f=this['editor']['editing'],_0x4e4b5c=this['_getChangeFromId'](_0x4019ad['changeId']);let _0x1d418f;if(_0x4e4b5c['data']['isOnRoot']){const _0x5dadfd=_0x35f92f['view']['getDomRoot'](_0x4e4b5c['rootName']);_0x1d418f=Array['from'](_0x5dadfd['getClientRects']());}else{const _0x4ada47=this['editor']['model']['markers']['get']('revision:'+_0x4019ad['changeId']);_0x1d418f=Array['from'](_0x35f92f['mapper']['markerNameToElements'](_0x4ada47['name']))['map'](_0x3dcf97=>_0x35f92f['view']['domConverter']['mapViewToDom'](_0x3dcf97))['map'](_0x262cd5=>Array['from'](_0x262cd5['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1d418f[0x0];return _0x1d418f['find'](_0x2ea2ac=>_0x2ea2ac['top']-0x3<=this['_activeViewTarget']['y']&&_0x2ea2ac['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x2ea2ac['left']-0x3<=this['_activeViewTarget']['x']&&_0x2ea2ac['right']+0x3>=this['_activeViewTarget']['x'])||_0x1d418f[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x5412f9,_0x453a31,_0x43b3e5,_0x59a8e5)=>{this['activeView']=_0x43b3e5?this['_getViewForChange'](_0x43b3e5):null,this['editor']['model']['change'](()=>{const _0x2b24e7=this['editor']['editing'];_0x59a8e5&&(_0x59a8e5['data']['isOnRoot']?_0x2b24e7['view']['change'](_0x7cd2b3=>{_0x7cd2b3['removeClass']('ck-revision-history-root--active',_0x2b24e7['view']['document']['getRoot'](_0x59a8e5['rootName']));}):_0x2b24e7['reconvertMarker']('revision:'+_0x59a8e5['id'])),_0x43b3e5&&(_0x43b3e5['data']['isOnRoot']?_0x2b24e7['view']['change'](_0x10bfc1=>{_0x10bfc1['addClass']('ck-revision-history-root--active',_0x2b24e7['view']['document']['getRoot'](_0x43b3e5['rootName']));}):_0x2b24e7['reconvertMarker']('revision:'+_0x43b3e5['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x4b76f8,_0x25503a)=>{if(this['activeChange'])return;const _0x11c0fd=this['_findChangeIdFromDomTarget'](_0x25503a['target']),_0x4d8c7b=this['_changeIdToChange']['get'](_0x11c0fd);_0x4d8c7b?(this['_activeViewTarget']={'x':_0x25503a['domEvent']['x'],'y':_0x25503a['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x4d8c7b)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x4f49f2,_0x500f2e)=>{const _0x575de5=this['_findChangeIdFromDomTarget'](_0x500f2e['target']),_0x478cdc=this['_changeIdToChange']['get'](_0x575de5);_0x478cdc?(this['_activeViewTarget']={'x':_0x500f2e['domEvent']['x'],'y':_0x500f2e['domEvent']['y']},_0x478cdc===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x478cdc):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x2dd4e0){do{const _0x2b04ad=_0x2dd4e0['getAttribute']('data-change-id');if(_0x2b04ad)return _0x2b04ad;_0x2dd4e0=_0x2dd4e0['parent'];}while(_0x2dd4e0);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x1eafc9=>{for(const _0x157a71 of this['editor']['model']['markers'])_0x1eafc9['removeMarker'](_0x157a71);});}}function Q(_0x2ef57f,_0x24c7f8){return(_0x42ed2a,_0x321c1f,_0xf5c0b7)=>{if(!_0xf5c0b7['consumable']['test'](_0x321c1f['markerRange'],_0x42ed2a['name']))return;const _0x58d6e0=_0x321c1f['markerRange']['getWalker'](),_0x40c96e=_0x321c1f['markerRange']['start'],_0x1b6369=_0x2ef57f['model']['schema'];let _0x28f9cb=null,_0x18edb0=null,_0x13096e=!0x1,_0x21a077=!0x1;for(const _0x264f4a of _0x58d6e0){const _0x5a85fa=_0x264f4a['item'];_0x13096e=_0x13096e||_0x1b6369['isContent'](_0x5a85fa);const _0x54c08c=_0xf5c0b7['mapper']['toViewElement'](_0x5a85fa);if(_0x54c08c&&_0x54c08c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x264f4a['type']&&(_0x1b6369['isBlock'](_0x5a85fa)&&!_0x1b6369['isLimit'](_0x5a85fa)&&(_0x5a85fa['nextSibling']||_0x40c96e['isAtEnd']?_0x28f9cb&&_0x28f9cb['parent']==_0x5a85fa||(_0x28f9cb=_0x5a85fa,_0x5e3ea1(_0x264f4a['previousPosition']),_0x21a077=!0x0):_0x18edb0=_0x18edb0||_0x264f4a['previousPosition']));}function _0x5e3ea1(_0x580d30){const _0x22fbb0=_0xf5c0b7['mapper']['toViewPosition'](_0x580d30),_0x16b962=_0xf5c0b7['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x24c7f8});_0xf5c0b7['writer']['insert'](_0x22fbb0,_0x16b962),_0xf5c0b7['mapper']['bindElementToMarker'](_0x16b962,_0x321c1f['markerName']);}_0x13096e||_0x21a077||!_0x18edb0||_0x5e3ea1(_0x18edb0);};}class nt extends _0x362a1c{constructor(_0x384246){super(_0x384246);const _0x520f2d=_0x384246['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x520f2d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x520f2d,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x7ed6dd=this['editor'],_0x63c777=_0x7ed6dd['plugins']['get'](l),_0x3a371c=_0x63c777['isReady']?_0x63c777['diff']['newRevisionId']:null;_0x7ed6dd['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3a371c);}['refresh'](){const {isReady:_0x754b3f,isEnabled:_0x7caf6f,repository:_0x77f72d,diff:_0x14b51c}=this['editor']['plugins']['get'](l),_0x267ed9=_0x14b51c&&_0x77f72d['getLaterVisibleRevision'](_0x14b51c['newRevisionId']);this['isEnabled']=_0x754b3f&&_0x7caf6f&&Boolean(_0x267ed9);}}class ot extends _0x362a1c{['_step'];constructor(_0x2f6ffb,{direction:_0x41cdde}){super(_0x2f6ffb);const _0x35c583=_0x2f6ffb['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x41cdde?0x1:-0x1,this['listenTo'](_0x35c583,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x35c583,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x35c583,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x478443=this['editor'],_0x176572=_0x478443['plugins']['get'](l),{isNavigationMode:_0x4dd0de,currentChangeNumber:_0x57c8fb}=_0x176572;let _0x174415;if(_0x176572['activeChange']=_0x4dd0de?_0x176572['diff']['changes']['get'](_0x57c8fb+this['_step']):_0x176572['diff']['changes']['first'],_0x176572['activeChange']['data']['isOnRoot'])_0x174415=_0x478443['editing']['view']['getDomRoot'](_0x176572['activeChange']['rootName']);else{const _0x18c7ab=_0x478443['model']['markers']['get']('revision:'+_0x176572['activeChange']['id']);_0x174415=_0x36b713(_0x478443['editing'],_0x18c7ab);}_0x48b0bc({'target':_0x174415,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x1fe598,currentChangeNumber:_0x2425fc,numberOfChanges:_0x85bd39,isReady:_0x51cd10,isEnabled:_0x35c3d1}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x35c3d1&&_0x51cd10&&_0x85bd39)&&(!_0x1fe598||(0x1===this['_step']?_0x2425fc<_0x85bd39-0x1:_0x2425fc>0x0));}}class pi extends _0x1f9cbc{constructor(_0x1f50ee){super(_0x1f50ee);const _0x264f81=this['bindTemplate'],_0x4ae05f=new _0x59d9b3(_0x1f50ee),_0x153338=new _0x59d9b3(_0x1f50ee);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',(_0x59532a,_0x32e43a)=>_0x59532a&&_0x32e43a>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x3d5edd,_0x304ad6,_0x288029,_0x3d248f)=>{if(!_0x3d5edd)return R(_0x1f50ee,'Loading...');if(!_0x288029)return R(_0x1f50ee,'No\x20changes');const _0x515614=R(_0x1f50ee,'NUMBER_OF_CHANGES',_0x288029);return _0x3d248f?R(_0x1f50ee,'X_OF_Y_CHANGES',[_0x304ad6+0x1,_0x288029]):_0x515614;}),_0x4ae05f['set']({'label':R(_0x1f50ee,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2a2b9a}),_0x153338['set']({'label':R(_0x1f50ee,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x2059f4}),_0x4ae05f['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x153338['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x4ae05f['on']('execute',()=>this['fire']('execute','backward')),_0x153338['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',_0x264f81['if']('_isStatusLabelVisible','ck-hidden',_0x2a4005=>!_0x2a4005)]},'children':[{'text':_0x264f81['to']('isNavigationMode',_0x4d622a=>_0x4d622a?R(_0x1f50ee,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x1f50ee,'Total')+':\x20')}]},{'text':_0x264f81['to']('_statusText')}]},new _0x55537b(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x4ae05f,_0x153338]}]});}}const ge='ck-editor__editable__loading-overlay';class fi extends _0x1b0770{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x534340=this['editor']['editing']['view'];_0x534340['change'](_0x41e3b5=>{for(const _0x14a637 of _0x534340['document']['roots'])_0x41e3b5['addClass'](ge,_0x14a637);});}['hide'](){const _0x190963=this['editor']['editing']['view'];_0x190963['change'](_0x37fc30=>{for(const _0x573307 of _0x190963['document']['roots'])_0x37fc30['removeClass'](ge,_0x573307);});}}class u extends _0x1b0770{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,fi];}['init'](){const _0x4d2ccd=this['editor'],_0x848a96=_0x4d2ccd['plugins']['get'](l),_0x3f0bf2=_0x4d2ccd['plugins']['get'](fi);_0x4d2ccd['ui']['componentFactory']['add']('exitToEditing',_0x1f4025=>{const _0x4f9070=new _0x59d9b3(_0x1f4025);return _0x4f9070['set']({'label':R(_0x1f4025,'Back\x20to\x20editing'),'icon':_0x15f8d8,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x4f9070,'execute',()=>{_0x4d2ccd['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x4f9070;}),_0x4d2ccd['ui']['componentFactory']['add']('restoreRevision',_0x1194d5=>{const _0x585af6=new _0x59d9b3(_0x1194d5);return _0x585af6['set']({'label':R(_0x1194d5,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x585af6['bind']('isEnabled')['to'](_0x4d2ccd['commands']['get']('restoreRevision')),this['listenTo'](_0x585af6,'execute',()=>_0x4d2ccd['execute']('restoreRevision')),_0x585af6;}),_0x4d2ccd['ui']['componentFactory']['add']('changesNavigation',_0x2c21ee=>{const _0x236acb=new pi(_0x2c21ee),_0x2bff48=_0x4d2ccd['commands']['get']('showPreviousChange'),_0x2e4828=_0x4d2ccd['commands']['get']('showNextChange');return _0x236acb['bind']('isBackwardNavigationEnabled')['to'](_0x2bff48,'isEnabled'),_0x236acb['bind']('isForwardNavigationEnabled')['to'](_0x2e4828,'isEnabled'),_0x236acb['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x848a96),this['listenTo'](_0x236acb,'execute',(_0x250af7,_0x1979cd)=>{_0x4d2ccd['execute']('forward'===_0x1979cd?'showNextChange':'showPreviousChange');}),_0x236acb;}),_0x3f0bf2['show'](),_0x848a96['on']('change:isReady',(_0x21983d,_0x2f9bcb,_0x267904)=>{_0x267904?_0x3f0bf2['hide']():_0x3f0bf2['show']();});}}class ki extends ti{['_resizeObserver']=null;constructor(_0x2babec,_0x4ae21b){super(_0x2babec,_0x4ae21b);const _0x376a44=this['bindTemplate'];this['set']({'label':R(_0x2babec,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x2babec,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x376a44['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new et(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x487ae0=this['fieldView']['element'];this['_tooltipString']=_0x487ae0['scrollWidth']>_0x487ae0['clientWidth']&&_0x487ae0['value']||'';}}class yi extends _0x1f9cbc{constructor(_0x18abe0,_0x32b88e,_0x3b54c4){super(_0x18abe0);const _0x298d7f=new _0x54d177();_0x298d7f['set']({'content':_0x9a293d,'viewBox':'0\x200\x2011\x2010'});const _0x3bd553=['ck','ck-revision-history-sidebar__revision-author'];_0x3b54c4&&_0x3bd553['push']('ck-revision-history-sidebar__revision-author_creator');const _0x3d1a8a=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0x18abe0,_0x3b54c4?'Revision\x20creator':'Revision\x20author')},'children':[_0x298d7f,_0x32b88e['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x3bd553},'children':_0x3d1a8a});}}function ji(_0x75d2dd,_0x375809){const _0x4021a0=_0x75d2dd['bindTemplate'],_0x3dc0a8=_0x75d2dd['locale'],_0x13db4e=_0x4b88dd(_0x3dc0a8);_0x13db4e['panelPosition']='sw';const _0x307ac7=function(_0x8662a8,_0x4f16d9){const _0x131ac5=function(_0x4516c8,_0x14515b){const _0x488f00=_0x4516c8['locale'],_0x2b98a5={'Compare\x20against\x20selected':R(_0x488f00,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x488f00,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x488f00,'Restore\x20this\x20revision')};return _0x14515b['map'](_0x53a061=>{const _0x503edd=_0x2b98a5[_0x53a061['name']];return _0x503edd&&_0x503edd!==_0x53a061['name']&&(_0x53a061['name']=_0x503edd),_0x53a061;});}(_0x8662a8,_0x4f16d9),_0x2c8345=new _0x2932fe();for(const _0x15ec5c of _0x131ac5){const _0x2fb062={'type':'button','model':new to({'label':_0x15ec5c['name'],'class':_0x15ec5c['class'],'withText':!0x0,'role':'menuitem','_action':_0x15ec5c['action']})};_0x2fb062['model']['bind']('isEnabled')['to'](_0x8662a8,'isActionsDropdownOpen',_0x575417=>'function'!=typeof _0x15ec5c['isEnabled']||(!_0x575417||_0x15ec5c['isEnabled'](_0x8662a8))),_0x2c8345['add'](_0x2fb062);}return _0x2c8345;}(_0x75d2dd,_0x375809);return _0x75d2dd['bind']('isActionsDropdownOpen')['to'](_0x13db4e,'isOpen'),_0x13db4e['buttonView']['set']({'label':R(_0x3dc0a8,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0xdfdef5}),_0x13db4e['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x4021a0['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x4021a0['to'](_0x11e15a=>_0x11e15a['stopPropagation']())}}),_0x13db4e['on']('execute',_0x426075=>{_0x75d2dd['isReady']&&'function'==typeof _0x426075['source']['_action']&&_0x426075['source']['_action'](_0x75d2dd);}),_0x298d82(_0x13db4e,_0x307ac7,{'role':'menu'}),_0x13db4e['listenTo'](_0x75d2dd,'change:isActionsDropdownOpen',(_0x501b96,_0x85bea7,_0x15741b)=>{if(_0x15741b)for(const _0x55d1f0 of _0x13db4e['listView']['items']){const _0x32d0a5=_0x55d1f0['children']['first'],_0x4126cd=_0x375809['find'](_0x369b34=>_0x369b34['action']===_0x32d0a5['_action'])['isVisible'];_0x55d1f0['isVisible']=void 0x0===_0x4126cd||_0x4126cd(_0x75d2dd);}}),_0x13db4e;}class ci extends/* #__PURE__ -- @preserve */
27
- _0x129c20(_0x1f9cbc){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x2c6411,_0x3efc1a,_0x43f5a7,_0x478257){super(_0x2c6411);const _0x231e05=this['bindTemplate'],_0x39d407=function(_0x20ff9e,_0x21322b){const _0x4c1716=Array['from'](_0x21322b['authors'])['filter'](_0x1b10ae=>_0x1b10ae!=_0x21322b['creator']);return _0x21322b['creator']&&_0x4c1716['unshift'](_0x21322b['creator']),_0x4c1716['map'](_0x2984ae=>new yi(_0x20ff9e,_0x2984ae,_0x2984ae==_0x21322b['creator']));}(_0x2c6411,_0x3efc1a);this['id']=_0x3efc1a['id'],this['_revision']=_0x3efc1a,this['_requireRevisionName']=_0x478257,this['bind']('name','createdAt')['to'](_0x3efc1a),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x58f115=>{return _0x46a960=_0x2c6411['uiLanguage'],(_0x1b6edd=_0x58f115)['toLocaleDateString'](_0x46a960,{'month':'long','day':'numeric'})+',\x20'+_0x1b6edd['toLocaleTimeString'](_0x46a960,{'hour':'numeric','minute':'numeric'});var _0x46a960,_0x1b6edd;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new ki(_0x2c6411,_0x589633),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4d15f5=>_0x4d15f5||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x505038,_0x1c3ab1)=>_0x505038&&_0x1c3ab1),this['revisionActionsView']=_0x43f5a7&&_0x43f5a7['length']?ji(this,_0x43f5a7):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x231e05['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x231e05['if']('isEnabled','ck-disabled',_0xd825cf=>!_0xd825cf),_0x231e05['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x231e05['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x231e05['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':_0x231e05['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':_0x39d407}]},this['revisionActionsView']],'on':{'click':_0x231e05['to'](_0x2521ac=>{_0x2521ac['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x3e1759=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x3e1759,'change',()=>{this['_requireRevisionName']&&!_0x3e1759['value']||this['fire']('setName',{'id':this['id'],'name':_0x3e1759['value']}),_0x3e1759['value']||(_0x3e1759['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function di(_0x4509f9,_0xc61cab){const _0x5031b6=_0x1d7304['fromJSDate'](_0x4509f9)['setLocale'](_0xc61cab),_0xdb0ef2=_0x1d7304['local'](),_0x17758d=_0xdb0ef2['minus']({'days':0x1})['startOf']('day');let _0x451211,_0x4be9bf;return _0x5031b6['hasSame'](_0xdb0ef2,'day')?(_0x451211=_0x5031b6['startOf']('day')['toJSDate'](),_0x4be9bf=_0x5031b6['toRelativeCalendar']()):_0x5031b6['hasSame'](_0x17758d,'day')?(_0x451211=_0x17758d['toJSDate'](),_0x4be9bf=_0x5031b6['toRelativeCalendar']()):_0x5031b6['hasSame'](_0xdb0ef2,'week')?(_0x451211=_0x5031b6['startOf']('week')['toJSDate'](),_0x4be9bf=_0x5031b6['weekdayLong']||''):_0x5031b6['hasSame'](_0xdb0ef2,'year')?(_0x451211=_0x5031b6['startOf']('month')['toJSDate'](),_0x4be9bf=_0x5031b6['monthLong']||''):(_0x451211=_0x5031b6['startOf']('year')['toJSDate'](),_0x4be9bf=String(_0x5031b6['year'])),{'startDate':_0x451211,'localizedPeriodName':_0x4be9bf};}class vi extends _0x1f9cbc{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x50c820,_0x55042d,_0x3ada8b,_0x1208f0){super(_0x50c820);const _0x514195=di(_0x55042d,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x55042d,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x3ada8b,this['_requireRevisionName']=_0x1208f0,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':_0x514195}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0xfe8fb5){const _0x72da3c=new ci(this['locale'],_0xfe8fb5,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x72da3c);}['removeRevision'](_0x47ea59){const _0x202a37=this['revisionViews']['find'](_0x196968=>_0x196968['id']===_0x47ea59['id']);this['revisionViews']['remove'](_0x202a37);}}class mi extends _0x1f9cbc{constructor(_0x27883c){super(_0x27883c);const _0x36280c=new _0x54d177();_0x36280c['content']=_0x3798b7,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x36280c,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x27883c,'Revision\x20history')]}]});}}class ai extends _0x1f9cbc{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1eba16,_0x3fc420,_0x602802,_0x2c6ba6){super(_0x1eba16);const _0x3dd4b2=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x3fc420,this['_revisionActions']=_0x602802,this['_requireRevisionName']=_0x2c6ba6,this['on']('select',(_0x53d4c2,_0x2f0f20)=>{this['fire']('revisionSelected',_0x2f0f20);}),this['on']('setName',(_0x2a7211,_0x283cc9)=>{this['fire']('revisionSetName',_0x283cc9);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new mi(_0x1eba16),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x3dd4b2['if']('isEnabled','ck-disabled',_0x5c5fc4=>!_0x5c5fc4)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x3e0c18 of this['_revisions'])this['_addRevision'](_0x3e0c18);this['_revisions']['on']('add',(_0x27c87d,_0x5ecad9)=>{this['_addRevision'](_0x5ecad9);}),this['_revisions']['on']('remove',(_0x3562ab,_0x35d05d)=>{this['_removeRevision'](_0x35d05d);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x11d5ec=>_0x11d5ec['revisionViews']['map'](_0x32d94c=>_0x32d94c))['flat']();}['selectRevision'](_0x277ddd){for(const _0x20b793 of this['revisionViews'])_0x277ddd&&_0x277ddd['id']===_0x20b793['id']?_0x20b793['select']():_0x20b793['deselect']();}['highlightRevisions'](_0x262454){for(const _0x32a9f1 of this['revisionViews'])_0x262454['some'](({id:_0x2fd1c3})=>_0x2fd1c3===_0x32a9f1['id'])?_0x32a9f1['highlight']():_0x32a9f1['unhighlight']();}['_addRevision'](_0x39a895){const _0x2bf417=di(_0x39a895['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0xfd1def=this['timePeriodViews']['get'](0x0);_0xfd1def&&_0xfd1def['startDate']['getTime']()===_0x2bf417['getTime']()||(_0xfd1def=new vi(this['locale'],_0x2bf417,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0xfd1def)),_0xfd1def['addRevision'](_0x39a895);}['_removeRevision'](_0x4471ac){const _0x176d9c=di(_0x4471ac['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x176d9c)['removeRevision'](_0x4471ac);}['_getTimePeriodViewByStartDate'](_0x9d1406){return this['timePeriodViews']['find'](_0x2ed78f=>_0x2ed78f['startDate']['getTime']()===_0x9d1406['getTime']());}}class f extends _0x1b0770{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x49a1ef,uid as _0x39fc3d,Collection as _0x5b144d,logWarning as _0x2d80ce,FocusTracker as _0x3f07d1,KeystrokeHandler as _0x5a424f,scrollViewportToShowTarget as _0x2f138e,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x268673}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x55ec3d,set as _0x1098be,unset as _0x7ceb1b,isEqual as _0x495bd2}from'es-toolkit/compat';import{Plugin as _0x3bfb25,PendingActions as _0xebcac,Command as _0x1f906e,ElementApiMixin as _0x5c3470,Editor as _0x252f0a}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x22873d,getMarkerDomElement as _0xc7e12a,ConfirmMixin as _0x5055ee,sanitizeEditorConfig as _0x57058d}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x3dd7f5,ViewAttributeElement as _0x5765e9,ViewEmptyElement as _0x2eafb4,ViewRawElement as _0x2f5be1,ViewUIElement as _0x1937c3,ViewDocumentFragment as _0x1ec242,ViewText as _0xb24468,ViewElement as _0xee069b,ModelElement as _0x21c6c4,ModelRange as _0x2f0b7a,ModelPosition as _0x4d92fe,ModelDocumentFragment as _0x4972a8,ModelText as _0x2cfa96}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x2b1ca7,IconChevronUp as _0x3c361e,IconChevronDown as _0x154cbb,IconUndo as _0x71fdb7,IconUser as _0x158c52,IconThreeVerticalDots as _0x1f2b60}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x22170b,View as _0x5c6cf3,submitHandler as _0x4519c6,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x5e5960,ListView as _0x3f0f9f,ListItemView as _0x5eae5c,ButtonView as _0x34a99f,MenuBarMenuView as _0x42a242,MenuBarMenuListView as _0x258d32,MenuBarMenuListItemView as _0x1f49d9,MenuBarMenuListItemButtonView as _0x272316,ContextualBalloon as _0x218446,ToolbarSeparatorView as _0x3f134a,IconView as _0x53578d,addListToDropdown as _0x44bbc5,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x4f5a7d,StickyPanelView as _0x1112ca,ToolbarView as _0xf5c709,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x5b77d2}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x49a1ef(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x44af2a){super(),this['id']=_0x44af2a['id']||_0x39fc3d(),this['creator']=_0x44af2a['creator']||null,this['authors']=_0x44af2a['authors']||[],this['diffData']=_0x44af2a['diffData']||null,this['toVersion']=_0x44af2a['toVersion']||0x0,this['fromVersion']=_0x44af2a['fromVersion']||0x0,this['set']('name',_0x44af2a['name']||''),this['set']('createdAt',_0x44af2a['createdAt']||new Date()),this['set']('attributes',_0x44af2a['attributes']||{});}['setName'](_0x184481){this['_update']({'name':_0x184481});}['setAttribute'](_0x575ef3,_0x97ceea){const _0x25bc5b=_0x55ec3d(this['attributes']);_0x1098be(_0x25bc5b,_0x575ef3,_0x97ceea),this['_update']({'attributes':_0x25bc5b});}['removeAttribute'](_0x157d25){const _0x259bcc=_0x55ec3d(this['attributes']);_0x7ceb1b(_0x259bcc,_0x157d25),this['_update']({'attributes':_0x259bcc});}['_update'](_0x36e815,_0x33cae6=!0x1){let _0x399c85=!0x1;const _0x4349aa={'id':this['id']},_0x4fb752=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x1fbff7 of _0x4fb752){const _0x33d163=_0x36e815[_0x1fbff7];void 0x0!==_0x33d163&&_0x33d163!==this[_0x1fbff7]&&(this[_0x1fbff7]=_0x33d163,_0x4349aa[_0x1fbff7]=_0x33d163,_0x399c85=!0x0);}_0x399c85&&(_0x4349aa['authors']&&(_0x4349aa['authorsIds']=_0x4349aa['authors']['map'](_0x1eff3e=>_0x1eff3e['id']),delete _0x4349aa['authors']),this['fire']('_update',_0x4349aa,_0x33cae6));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x14e5d2=>_0x14e5d2['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x3bfb25{['_revisions'];static get['requires'](){return[_0x22873d];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x8254e1){super(_0x8254e1),this['_revisions']=new _0x5b144d();}['afterInit'](){!async function(_0x420098){const _0x190d15=_0x250594([0x39,0x4b,0x55,0x35,0x6b,0x56,0x79,0x61,0x6e,0x70,0x51,0x75,0x53,0x47,0x34,0x45,0x59,0x41,0x38,0x6f,0x48,0x46,0x68,0x65,0x33,0x37,0x64,0x76,0x73,0x6a,0x67,0x69,0x32,0x4a,0x44,0x49,0x30,0x62,0x54,0x36,0x71,0x58,0x4e,0x52,0x63,0x7a,0x74,0x31,0x72,0x66,0x6c,0x4d,0x42,0x6d,0x57,0x43,0x78,0x4f,0x50,0x4c,0x77,0x5a]),_0x24c10b=0xeb829,_0x3c222d=0x3e5be113,_0x15a33f=0x3e5c8d33^_0x3c222d,_0x2e0a90=window[_0x250594([0x44,0x61,0x74,0x65])][_0x250594([0x6e,0x6f,0x77])](),_0x3007f0=_0x420098[_0x250594([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x33a1c9=new window[(_0x250594([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a5384=>{_0x3007f0[_0x250594([0x6f,0x6e,0x63,0x65])](_0x250594([0x72,0x65,0x61,0x64,0x79]),_0x5a5384);}),_0x37d228={[_0x250594([0x6b,0x74,0x79])]:_0x250594([0x45,0x43]),[_0x250594([0x75,0x73,0x65])]:_0x250594([0x73,0x69,0x67]),[_0x250594([0x63,0x72,0x76])]:_0x250594([0x50,0x2d,0x32,0x35,0x36]),[_0x250594([0x78])]:_0x250594([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]),[_0x250594([0x79])]:_0x250594([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]),[_0x250594([0x61,0x6c,0x67])]:_0x250594([0x45,0x53,0x32,0x35,0x36])},_0x32c218=_0x3007f0[_0x250594([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x250594([0x67,0x65,0x74])](_0x250594([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x201f91(){let _0x40cea1,_0x29f9e5=null,_0x16af1c=null;try{if(_0x32c218==_0x250594([0x47,0x50,0x4c]))return _0x250594([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x40cea1=_0x16451f(),!_0x40cea1)return _0x250594([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x40cea1[_0x250594([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x16af1c=_0x4d9a54(_0x40cea1[_0x250594([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x40cea1[_0x250594([0x6a,0x74,0x69])])),await _0x62de65()?_0x410988()?_0x2fcf3d()?_0x250594([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2dc12b()?(_0x40cea1[_0x250594([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x250594([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x29f9e5=_0x10add7(_0x250594([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x40cea1[_0x250594([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x250594([0x74,0x72,0x69,0x61,0x6c])&&(_0x29f9e5=_0x10add7(_0x250594([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x53fc2d()):_0x250594([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x250594([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x250594([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x250594([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2fcf3d(){const _0x4d07c=[_0x250594([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x250594([0x74,0x72,0x69,0x61,0x6c])][_0x250594([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x40cea1[_0x250594([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2e0a90/0x3e8:0xe10*_0x15a33f;return _0x40cea1[_0x250594([0x65,0x78,0x70])]<_0x4d07c;}function _0x410988(){const _0x46dcc3=_0x40cea1[_0x250594([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x46dcc3)return!0x1;if(_0x46dcc3[_0x250594([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x250594([0x2a])))return!0x0;if(_0x46dcc3[_0x250594([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x250594([0x52,0x48])))return!0x0;if(_0x46dcc3[_0x250594([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x250594([0x52,0x52,0x48]))){if(_0x102e03())return!0x0;if(_0x9e6200()||_0x4320f9())return!0x0;}return!0x1;}function _0x2dc12b(){const _0x5efb49=_0x40cea1[_0x250594([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5efb49||0x0==_0x5efb49[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5cc72e}=new URL(window[_0x250594([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5efb49[_0x250594([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5cc72e))return!0x0;const _0x2e1089=_0x5cc72e[_0x250594([0x73,0x70,0x6c,0x69,0x74])](_0x250594([0x2e]));return _0x5efb49[_0x250594([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x54d3fa=>_0x54d3fa[_0x250594([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x250594([0x2a])))[_0x250594([0x6d,0x61,0x70])](_0x2d6232=>_0x2d6232[_0x250594([0x73,0x70,0x6c,0x69,0x74])](_0x250594([0x2e])))[_0x250594([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32bb5f=>_0x32bb5f[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2e1089[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x250594([0x6d,0x61,0x70])](_0x4c8c88=>Array(_0x2e1089[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4c8c88[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x250594([0x66,0x69,0x6c,0x6c])](_0x4c8c88[0x0]===_0x250594([0x2a])?_0x250594([0x2a]):'')[_0x250594([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4c8c88))[_0x250594([0x73,0x6f,0x6d,0x65])](_0x19a10f=>_0x2e1089[_0x250594([0x65,0x76,0x65,0x72,0x79])]((_0x501c92,_0x1a69b9)=>_0x19a10f[_0x1a69b9]===_0x501c92||_0x19a10f[_0x1a69b9]===_0x250594([0x2a])));}function _0x53fc2d(){return _0x29f9e5&&_0x16af1c?new window[(_0x250594([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x52f1dc,_0x531c07)=>{_0x29f9e5[_0x250594([0x74,0x68,0x65,0x6e])](_0x52f1dc,_0x531c07),_0x16af1c[_0x250594([0x74,0x68,0x65,0x6e])](_0x2d40d3=>{_0x2d40d3!=_0x250594([0x56,0x61,0x6c,0x69,0x64])&&_0x52f1dc(_0x2d40d3);},_0x531c07);}):_0x29f9e5||_0x16af1c||_0x250594([0x56,0x61,0x6c,0x69,0x64]);}}function _0x4d9a54(_0x2964f7,_0x1af817){return new window[(_0x250594([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2cb865=>{if(_0x2e545d())return _0x2cb865(_0x250594([0x56,0x61,0x6c,0x69,0x64]));_0x25a557(),_0x3007f0[_0x250594([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x250594([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x56d9db=!0x1;const _0x18a22a=_0x39fc3d();function _0xd434a9(_0x23849d){return!!_0x23849d&&(typeof _0x23849d===_0x250594([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x23849d===_0x250594([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x23849d[_0x250594([0x74,0x68,0x65,0x6e])]===_0x250594([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x23849d[_0x250594([0x63,0x61,0x74,0x63,0x68])]===_0x250594([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3e718a(_0x1b52e7){_0x2fadde(_0x1b52e7)[_0x250594([0x74,0x68,0x65,0x6e])](_0x32a82f=>{if(!_0x32a82f||_0x32a82f[_0x250594([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x250594([0x6f,0x6b]))return _0x250594([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x252afb(_0x5e8514(_0x18a22a+_0x1af817))!=_0x32a82f[_0x250594([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x250594([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x250594([0x56,0x61,0x6c,0x69,0x64]);})[_0x250594([0x74,0x68,0x65,0x6e])](_0xfda0c=>(_0x401761(),_0xfda0c),()=>{const _0x26f020=_0x2691de();return null==_0x26f020?(_0x401761(),_0x250594([0x56,0x61,0x6c,0x69,0x64])):_0x250594(_0x2e0a90-_0x26f020>(0x1a576513^_0x3c222d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x250594([0x74,0x68,0x65,0x6e])](_0x2cb865)[_0x250594([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2cb865(_0x250594([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x20459e=0x3e6d0f93^_0x3c222d;function _0x401761(){const _0x5deb72=_0x250594([0x6c,0x6c,0x63,0x74,0x2d])+_0x252afb(_0x5e8514(_0x2964f7)),_0x3165e7=_0xb9594e(_0x252afb(window[_0x250594([0x4d,0x61,0x74,0x68])][_0x250594([0x63,0x65,0x69,0x6c])](_0x2e0a90/_0x20459e)));window[_0x250594([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x250594([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5deb72,_0x3165e7);}function _0x2691de(){const _0x41b22f=_0x250594([0x6c,0x6c,0x63,0x74,0x2d])+_0x252afb(_0x5e8514(_0x2964f7)),_0x597be7=window[_0x250594([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x250594([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x41b22f);return _0x597be7?window[_0x250594([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb9594e(_0x597be7),0x10)*_0x20459e:null;}function _0x2fadde(_0xaf07e7){return new window[(_0x250594([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2a7bca,_0x7efb9f)=>{_0xaf07e7[_0x250594([0x74,0x68,0x65,0x6e])](_0x2a7bca,_0x7efb9f),window[_0x250594([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x7efb9f,0x3e5a35d3^_0x3c222d);});}}_0x3007f0[_0x250594([0x6f,0x6e])](_0x250594([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2c8c60,_0x173e52)=>{if(_0x173e52[0x0]!=_0x2964f7)return _0x2cb865(_0x250594([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x173e52[0x1]={..._0x173e52[0x1],[_0x250594([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x18a22a};},{[_0x250594([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x250594([0x68,0x69,0x67,0x68])}),_0x3007f0[_0x250594([0x6f,0x6e])](_0x250594([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2185b8=>{_0xd434a9(_0x2185b8[_0x250594([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x56d9db=!0x0,_0x3e718a(_0x2185b8[_0x250594([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x250594([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x250594([0x6c,0x6f,0x77])}),_0x33a1c9[_0x250594([0x74,0x68,0x65,0x6e])](()=>{_0x56d9db||_0x2cb865(_0x250594([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2e545d(){return _0x3007f0[_0x250594([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x250594([0x76,0x69,0x65,0x77])][_0x250594([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x250594([0x61,0x75,0x74,0x6f]);}function _0x25a557(){_0x3007f0[_0x250594([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x250594([0x76,0x69,0x65,0x77])][_0x250594([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x250594([0x61,0x75,0x74,0x6f]);}}function _0x10add7(_0x27d3e3){const _0x5dc0af=[new window[(_0x250594([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25a045=>setTimeout(_0x25a045,0x3e52dfdf^_0x3c222d)),_0x33a1c9[_0x250594([0x74,0x68,0x65,0x6e])](()=>new window[(_0x250594([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x19e7bc=>{const _0x1445fa=0x3e5be114^_0x3c222d,_0x43cde2=_0x420098[_0x250594([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x47b9c0(){_0x43cde2[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x1445fa&&_0x19e7bc();}_0x47b9c0(),_0x43cde2[_0x250594([0x6f,0x6e])](_0x250594([0x61,0x64,0x64]),_0x47b9c0);})),new window[(_0x250594([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2dc431=>{function _0x99e691(){for(const _0x57d266 in window)if(window[_0x250594([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x250594([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x57d266))&&window[_0x57d266]==_0x24c10b)return _0x2dc431();_0x3007f0[_0x250594([0x73,0x74,0x61,0x74,0x65])]!=_0x250594([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x250594([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x99e691,0x3e5bf29b^_0x3c222d);}_0x1cf472(_0x250594([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x99e691();})];return window[_0x250594([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x250594([0x72,0x61,0x63,0x65])](_0x5dc0af)[_0x250594([0x74,0x68,0x65,0x6e])](()=>_0x27d3e3);}async function _0xd0aff9(){if(await _0x33a1c9,_0x1cf472(_0x250594([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x12b437=_0x420098[_0x250594([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x57a0ac=_0x420098[_0x250594([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])](_0x12b437[_0x250594([0x69,0x64])]),_0x4591a9=_0x525401(_0x250594([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x4591a9[_0x250594([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x12b437['id'],_0x57a0ac?_0x57a0ac['id']:null,!0x0),_0x4591a9[_0x250594([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x250594([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x4591a9[_0x250594([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x4591a9[_0x250594([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x44401a,void(_0x4591a9[_0x250594([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x44401a);}if(_0x1cf472(_0x250594([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x10baf1=_0x525401(_0x250594([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x10baf1[_0x250594([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x250594([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x10baf1[_0x250594([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x10baf1[_0x250594([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x44401a,_0x10baf1[_0x250594([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x44401a;}_0x3007f0[_0x250594([0x6d,0x6f,0x64,0x65,0x6c])][_0x250594([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x44401a,_0x3007f0[_0x250594([0x6d,0x6f,0x64,0x65,0x6c])][_0x250594([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x44401a,_0x3007f0[_0x250594([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x250594([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x102e03(){return _0x1cf472(_0x250594([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x525401(_0x250594([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x250594([0x73,0x74,0x61,0x74,0x65])]==_0x250594([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x9e6200(){return _0x1cf472(_0x250594([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 _0x4320f9(){return _0x1cf472(_0x250594([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5ddc36(_0xb6f535){const _0x1c14fc=_0x3b9841();_0x3007f0[_0x1c14fc]=_0x250594([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])+_0xb6f535,_0xb6f535[_0x250594([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x250594([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x3b9841()]=_0x24c10b),_0xb6f535!=_0x250594([0x56,0x61,0x6c,0x69,0x64])&&_0xd0aff9();}function _0x3b9841(){const _0x57731e=window[_0x250594([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x250594([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x250594([0x6e,0x6f,0x77])]())[_0x250594([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x250594([0x2e]),'');let _0x5e55c4=_0x250594([0x4b]);for(let _0x54308b=0x0;_0x54308b<_0x57731e[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x54308b+=0x2){let _0x2f610a=window[_0x250594([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57731e[_0x250594([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x54308b,_0x54308b+0x2));_0x2f610a>=_0x190d15[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2f610a-=_0x190d15[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5e55c4+=_0x190d15[_0x2f610a];}return _0x5e55c4;}function _0x16451f(){const _0x44301b=_0x32c218[_0x250594([0x73,0x70,0x6c,0x69,0x74])](_0x250594([0x2e]));if(0x3!=_0x44301b[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x23fe76(_0x44301b[0x1]);function _0x23fe76(_0x1efcf7){const _0x5e24ce=_0x5cc9f5(_0x1efcf7);return _0x5e24ce&&_0x50d2af()?_0x5e24ce:null;function _0x50d2af(){const _0x426f1c=_0x5e24ce[_0x250594([0x6a,0x74,0x69])],_0x53ee68=window[_0x250594([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x426f1c[_0x250594([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x426f1c[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x353697={..._0x5e24ce,[_0x250594([0x6a,0x74,0x69])]:_0x426f1c[_0x250594([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x426f1c[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x353697[_0x250594([0x76,0x63])],_0x5e8514(_0x353697)==_0x53ee68;}}}async function _0x62de65(){let _0x27be0c=!0x0;try{const _0x22f41a=_0x32c218[_0x250594([0x73,0x70,0x6c,0x69,0x74])](_0x250594([0x2e])),[_0x2cdae9,_0x34554a,_0x25a1dc]=_0x22f41a;return _0x37955e(_0x2cdae9),await _0x158249(_0x2cdae9,_0x34554a,_0x25a1dc),_0x27be0c;}catch{return!0x1;}function _0x37955e(_0x365b22){const _0x35e28b=_0x5cc9f5(_0x365b22);_0x35e28b&&_0x35e28b[_0x250594([0x61,0x6c,0x67])]==_0x250594([0x45,0x53,0x32,0x35,0x36])||(_0x27be0c=!0x1);}async function _0x158249(_0x1d83f2,_0x3717c6,_0x42d5cc){const _0x1e7f6f=window[_0x250594([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x250594([0x66,0x72,0x6f,0x6d])](_0x41e517(_0x42d5cc),_0x4552fa=>_0x4552fa[_0x250594([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4e3d40=new window[(_0x250594([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x250594([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1d83f2+_0x250594([0x2e])+_0x3717c6),_0x55ccc9=window[_0x250594([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x250594([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x55ccc9)return;const _0x48bb51=await _0x55ccc9[_0x250594([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x250594([0x6a,0x77,0x6b]),_0x37d228,{[_0x250594([0x6e,0x61,0x6d,0x65])]:_0x250594([0x45,0x43,0x44,0x53,0x41]),[_0x250594([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x250594([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x250594([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x55ccc9[_0x250594([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x250594([0x6e,0x61,0x6d,0x65])]:_0x250594([0x45,0x43,0x44,0x53,0x41]),[_0x250594([0x68,0x61,0x73,0x68])]:{[_0x250594([0x6e,0x61,0x6d,0x65])]:_0x250594([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48bb51,_0x1e7f6f,_0x4e3d40)||(_0x27be0c=!0x1);}}function _0x5cc9f5(_0x11dce1){return _0x11dce1[_0x250594([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x250594([0x65,0x79]))?JSON[_0x250594([0x70,0x61,0x72,0x73,0x65])](_0x41e517(_0x11dce1)):null;}function _0x41e517(_0x1aa1a7){return window[_0x250594([0x61,0x74,0x6f,0x62])](_0x1aa1a7[_0x250594([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x250594([0x2b]))[_0x250594([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x250594([0x2f])));}function _0x5e8514(_0x597894){let _0x1356a6=0x1505;function _0x403754(_0x2cef16){for(let _0x5de010=0x0;_0x5de010<_0x2cef16[_0x250594([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5de010++){const _0x4b4ff1=_0x2cef16[_0x250594([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5de010);_0x1356a6=(_0x1356a6<<0x5)+_0x1356a6+_0x4b4ff1,_0x1356a6&=_0x1356a6;}}function _0x2c6c99(_0x2dd394){Array[_0x250594([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2dd394)?_0x2dd394[_0x250594([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2c6c99):_0x2dd394&&typeof _0x2dd394==_0x250594([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x250594([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2dd394)[_0x250594([0x73,0x6f,0x72,0x74])]()[_0x250594([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x57a6f1,_0x462179])=>{_0x403754(_0x57a6f1),_0x2c6c99(_0x462179);}):_0x403754(window[_0x250594([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2dd394));}return _0x2c6c99(_0x597894),_0x1356a6>>>0x0;}function _0x252afb(_0x2361ec){return _0x2361ec[_0x250594([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x250594([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x250594([0x30]));}function _0xb9594e(_0x4ccd11){return _0x4ccd11[_0x250594([0x73,0x70,0x6c,0x69,0x74])]('')[_0x250594([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x250594([0x6a,0x6f,0x69,0x6e])]('');}function _0x1cf472(_0x221693){return _0x3007f0[_0x250594([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x250594([0x68,0x61,0x73])](_0x221693);}function _0x525401(_0x5bac61){return _0x3007f0[_0x250594([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x250594([0x67,0x65,0x74])](_0x5bac61);}function _0x44401a(){}function _0x250594(_0x53e3cd){return _0x53e3cd['map'](_0x5cbbf0=>String['fromCharCode'](_0x5cbbf0))['join']('');}_0x5ddc36(await _0x201f91());}(this);}['createRevision'](_0x502a06){const _0x425ff4=this['editor']['plugins']['get']('Users');return new I({'id':_0x502a06['id'],'name':_0x502a06['name'],'creator':_0x502a06['creatorId']?_0x425ff4['getUser'](_0x502a06['creatorId']):null,'diffData':_0x502a06['diffData']||_0x502a06['data'],'authors':_0x502a06['authorsIds']['map'](_0x1f20b0=>_0x425ff4['getUser'](_0x1f20b0)),'createdAt':new Date(_0x502a06['createdAt']),'attributes':_0x502a06['attributes'],'fromVersion':_0x502a06['fromVersion'],'toVersion':_0x502a06['toVersion']});}['addRevision'](_0x421956,_0x3b7c96=0x0){this['_revisions']['add'](_0x421956,_0x3b7c96);}['getRevision'](_0x8216a0){return this['_revisions']['get'](_0x8216a0);}['getRevisions'](_0x2e2d21={'toJSON':!0x1}){const _0x2c72b2=Array['from'](this['_revisions']);return _0x2c72b2['reverse'](),_0x2e2d21['toJSON']?_0x2c72b2['map'](_0x366427=>_0x366427['toJSON']()):_0x2c72b2;}['getIndex'](_0xbddb38){return this['_revisions']['getIndex'](_0xbddb38);}['getEarlierVisibleRevision'](_0x2a68ba){const [,_0x595610]=this['getRevisionsIterator'](_0x2a68ba,{'direction':'earlier'});return _0x595610;}['getLaterVisibleRevision'](_0x2ce91a){const [,_0x3f2fdd]=this['getRevisionsIterator'](_0x2ce91a,{'direction':'later'});return _0x3f2fdd;}['getRevisionsInDiff'](_0x5bee23){const _0x414b59=[];for(const _0x34232c of this['getRevisionsIterator'](_0x5bee23['newRevisionId']))if(_0x414b59['push'](_0x34232c),_0x34232c['id']===_0x5bee23['oldRevisionId'])break;return _0x414b59;}*['getRevisionsIterator'](_0x2b747c,{direction:_0x3e00f2='earlier',filter:_0x3b5381=()=>!0x0}={}){const _0x376645='earlier'===_0x3e00f2?0x1:-0x1;let _0x28914b=this['_revisions']['get'](_0x2b747c),_0x146088=this['getIndex'](_0x28914b);for(yield _0x28914b;_0x28914b;){if(_0x146088+=_0x376645,_0x28914b=this['getRevision'](_0x146088),!_0x28914b)return;_0x3b5381(_0x28914b)&&(yield _0x28914b);}}}class $ extends _0x3bfb25{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x3dd7f5,'c'],[_0x5765e9,'a'],[_0x2eafb4,'e'],[_0x2f5be1,'r'],[_0x1937c3,'u']]);['_typeCharToViewClass']=new Map([['c',_0x3dd7f5],['a',_0x5765e9],['e',_0x2eafb4],['r',_0x2f5be1],['u',_0x1937c3]]);async['loadRevisionData'](_0x6a5c93,_0x27407d){if(_0x6a5c93['diffData']||!_0x27407d)return;const _0x30b5be=this['editor']['config']['get']('collaboration.channelId'),_0x357c78=await _0x27407d['getRevision']({'channelId':_0x30b5be,'revisionId':_0x6a5c93['id']});_0x6a5c93['diffData']=_0x357c78['diffData'];}['getRevisionDocumentData'](_0x5ad787){const _0x12238d={};for(const _0x59f020 in _0x5ad787['diffData']){if(_0x5ad787['diffData'][_0x59f020]['attachChange']&&!_0x5ad787['diffData'][_0x59f020]['attachChange']['isAttached'])continue;const _0x4f4bc2=this['_removeRevisionMarkers'](JSON['parse'](_0x5ad787['diffData'][_0x59f020]['insertions'])),_0x4a5ec2=this['editor']['editing']['view']['document'],_0x257e8e=new _0x1ec242(_0x4a5ec2,_0x4f4bc2['map'](_0x5e6b32=>this['_getViewFromDiffObj'](_0x5e6b32,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x12238d[_0x59f020]=this['editor']['data']['processor']['toData'](_0x257e8e),this['editor']['data']['processor']['useFillerType']('default');}return _0x12238d;}['getRevisionRootsAttributes'](_0x4baead){const _0x15fcf5={};for(const _0x1aa7a6 in _0x4baead['diffData'])_0x4baead['diffData'][_0x1aa7a6]['attachChange']&&!_0x4baead['diffData'][_0x1aa7a6]['attachChange']['isAttached']||(_0x15fcf5[_0x1aa7a6]=_0x4baead['diffData'][_0x1aa7a6]['attributesAfter']||{});return _0x15fcf5;}['_getTypeCharForViewElement'](_0xc9ba24){return this['_viewClassToTypeChar']['get'](_0xc9ba24['constructor']);}['_getViewFromDiffObj'](_0x303b5f,_0xe813c0){const _0x454727=this['editor']['editing']['view']['document'];if('string'==typeof _0x303b5f)return new _0xb24468(_0x454727,_0x303b5f);{let _0x2754b8,_0x3a3880;_0x3a3880='u'==_0x303b5f['type']||'r'==_0x303b5f['type']?[]:_0x303b5f['children']['map'](_0x2570b6=>this['_getViewFromDiffObj'](_0x2570b6,_0xe813c0));const _0x2b4fe7=this['_typeCharToViewClass']['get'](_0x303b5f['type'])||_0xee069b,_0x4c3d10=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x2754b8=new _0x2b4fe7(_0x454727,_0x303b5f['name'],_0x303b5f['attributes'],_0x3a3880),'u'==_0x303b5f['type']&&_0x303b5f['children'][0x0]){const _0x1d8d28=_0x303b5f['children'][0x0];if(_0x2754b8['render']=function(_0x44711d){const _0x2f66b0=_0x44711d['createElement']('div');return _0x2f66b0['innerHTML']=_0x1d8d28,_0x2f66b0['childNodes'][0x0];},_0xe813c0){const _0x194bcd=new _0x1ec242(_0x454727);_0x194bcd['_appendChild'](_0x2754b8);const _0x39a4df=Array['from'](_0x4c3d10['viewChildrenToDom'](_0x194bcd,{'bind':!0x1})),_0x4ea1e8=_0x4c3d10['domDocument']['createElement']('div');_0x4ea1e8['append'](..._0x39a4df),_0x2754b8=Array['from'](_0x4c3d10['domChildrenToView'](_0x4ea1e8))[0x0];}}else{if('r'==_0x303b5f['type']&&_0x303b5f['children'][0x0]){const _0xfd0d70=_0x303b5f['children'][0x0];if(_0x2754b8['render']=function(_0x3d1dad){_0x3d1dad['innerHTML']=_0xfd0d70;},_0xe813c0){const _0x38f215=new _0x1ec242(_0x454727);_0x38f215['_appendChild'](_0x2754b8);const _0x442bd5=Array['from'](_0x4c3d10['viewChildrenToDom'](_0x38f215,{'bind':!0x1})),_0x11d297=_0x4c3d10['domDocument']['createElement']('div');_0x11d297['append'](..._0x442bd5);const _0x21e0e6=Array['from'](_0x4c3d10['domChildrenToView'](_0x11d297));_0x21e0e6['length']>0x1?_0x2754b8['_appendChild'](_0x21e0e6):_0x2754b8=_0x21e0e6[0x0];}}}if(_0x303b5f['customProperties']){for(const [_0x2ce26a,_0x1012d0]of _0x303b5f['customProperties'])_0x2754b8['_setCustomProperty'](_0x2ce26a,_0x1012d0);}const _0x46fb75=void 0x0===_0x303b5f['fillerOffset']?null:_0x303b5f['fillerOffset'];return null!==_0x46fb75&&(_0x2754b8['getFillerOffset']=()=>_0x46fb75),_0x2754b8;}}['_makeModelFromViewString'](_0x348fa4){const _0x407a5a=JSON['parse'](_0x348fa4),_0x3fc3a9=this['editor']['editing']['view']['document'],_0x5a87e9=new _0x1ec242(_0x3fc3a9,_0x407a5a['map'](_0x48a6cd=>this['_getViewFromDiffObj'](_0x48a6cd,!0x0)));return this['editor']['data']['toModel'](_0x5a87e9);}['_removeRevisionMarkers'](_0x1da657){return(_0x1da657=_0x1da657['filter'](_0x2a5f71=>!_0x2a5f71['name']||'revision-start'!==_0x2a5f71['name']&&'revision-end'!==_0x2a5f71['name']))['forEach'](_0x2f79e4=>{'string'!=typeof _0x2f79e4&&(_0x2f79e4['children']=this['_removeRevisionMarkers'](_0x2f79e4['children']),_0x2f79e4['attributes']=_0x2f79e4['attributes']['filter'](_0x42b729=>!_0x42b729[0x0]['startsWith']('data-revision-')));}),_0x1da657;}}function R(_0x1f4976,_0x4c59cb,_0x46a74f){const t=_0x1f4976['t'];switch(_0x4c59cb){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'},_0x46a74f);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x46a74f);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 h extends _0x3bfb25{['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[_0x22873d,S,$,_0xebcac];}constructor(_0x59cac0){super(_0x59cac0),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new E(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x2bf02e=_0x39fc3d();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x2bf02e},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 _0x4e2741=this['repository']['getRevision'](0x0),_0x5cbcee=_0x4e2741&&null===_0x4e2741['creator']?_0x4e2741:null;if(this['_continueCurrentRevision']=!!_0x5cbcee&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x307b26=this['_source']['getCurrentRevisionId'](),_0x30ca12=this['repository']['getRevision'](_0x307b26);if(_0x30ca12)this['_startingVersion']=_0x30ca12['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x132286=this['_source']['history']['_operations']['find'](_0x5c248b=>!_0x5c248b['_isInit']),_0x1011bd=_0x132286?_0x132286['baseVersion']:this['_source']['history']['version'];_0x4e2741?(_0x4e2741['toVersion']<_0x1011bd&&_0x4e2741['_update']({'toVersion':_0x1011bd}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5cbcee['id'],this['_startingVersion']=_0x5cbcee['fromVersion']):(this['_startingVersion']=_0x4e2741['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x1011bd,this['_continueCurrentRevision']=!0x1);}}else _0x5cbcee&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5cbcee['toVersion'],this['editor']['model']['document']['history']['version']),_0x5cbcee['fromVersion']===_0x5cbcee['toVersion']?(0x0!==_0x5cbcee['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5cbcee['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5cbcee['id'],this['_startingVersion']=_0x5cbcee['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',_0x2575bd=>!_0x2575bd),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x324cb5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x47f67e;for(const _0x1dbc42 in _0x324cb5){const _0xe84cd1=_0x1dbc42,_0x4f214c=_0x324cb5[_0xe84cd1];if('revisionHistoryLicenseKeyValid'==_0x4f214c||'revisionHistoryLicenseKeyInvalid'==_0x4f214c||'revisionHistoryLicenseKeyExpired'==_0x4f214c||'revisionHistoryLicenseKeyDomainLimit'==_0x4f214c||'revisionHistoryLicenseKeyNotAllowed'==_0x4f214c||'revisionHistoryLicenseKeyEvaluationLimit'==_0x4f214c||'revisionHistoryLicenseKeyTrialLimit'==_0x4f214c||'revisionHistoryLicenseKeyUsageLimit'==_0x4f214c){delete _0x324cb5[_0xe84cd1],_0x47f67e=_0x4f214c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x47f67e&&_0x324cb5['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x47f67e&&_0x324cb5['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x47f67e&&_0x324cb5['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x47f67e&&_0x324cb5['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x47f67e&&_0x324cb5['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x47f67e&&_0x324cb5['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x47f67e&&_0x324cb5['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x8c3737=this['repository']['getRevision'](0x0),_0x2c522c=await this['getRevisionDocumentData'](_0x8c3737),_0xd50e31=await this['getRevisionRootsAttributes'](_0x8c3737);this['_replaceEditorDataWithRevisionData'](_0x2c522c,_0xd50e31);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x317888){this['_source']=_0x317888;}async['update'](){const _0x59efe6=await this['_source']['getLatestVersion']();if(_0x59efe6>this['currentRevision']['toVersion']){await this['_loadState']();const _0x253ed0=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x59efe6});_0x253ed0['authors']=_0x253ed0['authorsIds']['map'](_0x1ad2c9=>this['editor']['plugins']['get']('Users')['getUser'](_0x1ad2c9)),this['currentRevision']['_update'](_0x253ed0);}}async['saveRevision'](_0x10c30f={},_0x2ef7b9=null){const _0x207fb7=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x2ef7b9>this['currentRevision']['toVersion']&&(_0x2ef7b9=null),null===_0x2ef7b9&&(_0x2ef7b9=await this['_source']['getLatestVersion']());const _0xbdb144=this['_getFromVersion'](_0x2ef7b9),_0x3aa330=this['buildRevisionData']({'from':_0xbdb144,'to':_0x2ef7b9});if(this['currentRevision']['toVersion']<_0x2ef7b9){const _0x29fb73=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x2ef7b9,'to':_0x2ef7b9});_0x29fb73['authors']=[],_0x29fb73['authorsIds']=[],_0x29fb73['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x29fb73,!0x0),delete _0x29fb73['authors'],_0x207fb7['push'](_0x29fb73);}_0x10c30f['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x10c30f['name']=_0x10c30f['name']||null,_0x10c30f['id']=_0x10c30f['id']||_0x39fc3d(),_0x10c30f={..._0x10c30f,..._0x3aa330};const _0x3c6514=this['addRevisionData'](_0x10c30f);_0x207fb7['push'](_0x10c30f);const _0x46d301=this['repository']['getIndex'](_0x3c6514);if(0x0!==_0x46d301){const _0x2479e1=this['repository']['getRevision'](_0x46d301-0x1);if(_0x2479e1['fromVersion']!==_0x2ef7b9){const _0x1eb77a=this['_revisionDataBuilder']['getData'](_0x2ef7b9,_0x2479e1['toVersion']),_0x500457={'id':_0x2479e1['id'],'diffData':_0x1eb77a['diffData'],'authorsIds':_0x1eb77a['authorsIds'],'authors':_0x1eb77a['authorsIds']['map'](_0x3a4b48=>this['editor']['plugins']['get']('Users')['getUser'](_0x3a4b48)),'fromVersion':_0x2ef7b9};_0x2479e1===this['currentRevision']&&(_0x500457['createdAt']=new Date(_0x10c30f['createdAt']['getTime']()+0xa)),_0x2479e1['_update'](_0x500457,!0x0),delete _0x500457['authors'],_0x207fb7['push'](_0x500457);}}if(this['adapter']){for(const _0x56ab81 of _0x207fb7)this['_bufferUpdate'](_0x56ab81['id'],_0x56ab81,!0x0);this['sendBufferedUpdates']();}return _0x3c6514;}['addRevisionData'](_0x3faa0e){const _0x17d32e=this['repository']['createRevision'](_0x3faa0e);return this['adapter']&&_0x17d32e['on']('_update',(_0x5833e3,_0x588787,_0x407207)=>{_0x407207||(this['_bufferUpdate'](_0x588787['id'],_0x588787,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x17d32e,this['_findInsertionIndex'](_0x17d32e)),_0x17d32e;}async['getRevisionDocumentData'](_0x1c21c6){return await this['_utils']['loadRevisionData'](_0x1c21c6,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1c21c6);}async['getRevisionRootsAttributes'](_0x110cca){return await this['_utils']['loadRevisionData'](_0x110cca,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x110cca);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x339674=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x1f6d9f=0x0;_0x1f6d9f<_0x339674['length'];_0x1f6d9f++){const _0xb5bda6=_0x339674[_0x1f6d9f];let _0x4470b5=!0x1;for(const _0x126486 of Object['keys'](_0xb5bda6))void 0x0===_0xb5bda6[_0x126486]?delete _0xb5bda6[_0x126486]:'id'!==_0x126486&&(_0x4470b5=!0x0);_0x4470b5||(_0x339674[_0x1f6d9f]=null);}if(_0x339674=_0x339674['filter'](_0x2625e0=>null!==_0x2625e0),!_0x339674['length'])return;for(let _0x791b66=0x0;_0x791b66<_0x339674['length'];_0x791b66++){const _0x18eaea=_0x339674[_0x791b66];void 0x0!==_0x18eaea['fromVersion']&&void 0x0===_0x18eaea['toVersion']&&(_0x18eaea['toVersion']=this['repository']['getRevision'](_0x18eaea['id'])['toVersion']),void 0x0!==_0x18eaea['toVersion']&&void 0x0===_0x18eaea['fromVersion']&&(_0x18eaea['fromVersion']=this['repository']['getRevision'](_0x18eaea['id'])['fromVersion']);}const _0x3692e0=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x339674,_0x3692e0)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x345931=>{if(_0x345931){for(const _0x38c5b3 of _0x345931)this['setRevisionData']({'id':_0x38c5b3['id'],'createdAt':_0x38c5b3['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x545b5d=null,from:_0xf0279b=null,to:_0x5e7ecf=null}){_0xf0279b=null!==_0xf0279b?_0xf0279b:_0x545b5d['fromVersion'],_0x5e7ecf=null!==_0x5e7ecf?_0x5e7ecf:_0x545b5d['toVersion'];const _0x2a1f56=this['_revisionDataBuilder']['getData'](_0xf0279b,_0x5e7ecf),_0x5266b9={'diffData':_0x2a1f56['diffData'],'authorsIds':_0x2a1f56['authorsIds'],'fromVersion':_0xf0279b,'toVersion':_0x5e7ecf};if(!_0x545b5d||_0x5e7ecf!==_0x545b5d['toVersion']){const _0x43139c=_0x5e7ecf-0x1,_0x592195=this['_source']['history']['getOperation'](_0x43139c);_0x5266b9['createdAt']=_0x592195&&_0x592195['createdAt']||new Date();}if(this['_loadedStateData']&&_0xf0279b===this['_loadedStateData']['fromVersion']){for(const _0x24cc4d of this['_loadedStateData']['authors'])_0x5266b9['authorsIds']['includes'](_0x24cc4d['id'])||_0x5266b9['authorsIds']['push'](_0x24cc4d['id']);}return _0x5266b9;}['_bufferUpdate'](_0x4855c8,_0x52725c,_0x30443d){if(this['_bufferedUpdates']['has'](_0x4855c8)){const _0x1fa6b4=this['_bufferedUpdates']['get'](_0x4855c8);_0x52725c=_0x30443d?{..._0x1fa6b4,..._0x52725c}:{..._0x52725c,..._0x1fa6b4};}this['_bufferedUpdates']['set'](_0x4855c8,_0x52725c);}['setRevisionData'](_0x508087){const _0x348621=this['repository']['getRevision'](_0x508087['id']);if(_0x508087['createdAt']&&(_0x508087['createdAt']=new Date(_0x508087['createdAt'])),_0x508087['authorsIds']){const _0x2dfb46=this['editor']['plugins']['get']('Users');_0x508087['authors']=_0x508087['authorsIds']['map'](_0x1d8c2d=>_0x2dfb46['getUser'](_0x1d8c2d));}_0x348621['_update'](_0x508087,!0x0);}['_createInitialRevision'](_0x4a0050){const _0x3d46e4=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x3d46e4)this['_initialRevisionId']=_0x3d46e4['id'];else{const _0x4da0a8=!this['editor']['model']['document']['roots']['find'](_0x19a564=>this['editor']['model']['hasContent'](_0x19a564)),_0x3e62db=this['editor']['plugins']['get']('Users')['me']['id'],_0x2dc0d2=R(this['editor']['locale'],_0x4da0a8?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4a0050,'to':_0x4a0050,'id':this['_initialRevisionId'],'name':_0x2dc0d2,'creatorId':_0x3e62db});}}['_createCurrentRevision'](_0x4eae1c){const _0x15ea6c=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x15ea6c),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x4eae1c,'to':_0x4eae1c,'id':_0x15ea6c,'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'](_0x44619a,_0x345547){let _0x61cc7f=this['editor']['config']['get']('initialData'),_0x2d082b=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x61cc7f){_0x61cc7f={};for(const _0x1269dc of this['editor']['model']['document']['getRootNames']())_0x61cc7f[_0x1269dc]='';}if('string'==typeof _0x61cc7f&&(_0x61cc7f={'main':_0x61cc7f}),void 0x0===_0x2d082b){_0x2d082b={};for(const _0xb82d3d of this['editor']['model']['document']['getRootNames']())_0x2d082b[_0xb82d3d]={};}let _0xcfa12d=!0x1;const _0x283b9d=Object['keys'](_0x61cc7f),_0x102ce9=Object['keys'](_0x44619a);for(const _0x1775a8 of _0x283b9d){if(_0x61cc7f[_0x1775a8]!==_0x44619a[_0x1775a8]&&''!==_0x61cc7f[_0x1775a8]['trim']()){_0xcfa12d=!0x0;break;}if(!_0x495bd2(_0x2d082b[_0x1775a8],_0x345547[_0x1775a8])&&Object['keys'](_0x2d082b[_0x1775a8])['length']>0x0){_0xcfa12d=!0x0;break;}}_0xcfa12d||(_0xcfa12d=_0x102ce9['some'](_0x3f4d1e=>!this['editor']['model']['document']['getRoot'](_0x3f4d1e))),_0xcfa12d&&_0x2d80ce('editor-initial-data-replaced-with-revision-data',{'editorData':_0x61cc7f,'editorRootsAttributes':_0x2d082b,'revisionData':_0x44619a,'revisionRootsAttributes':_0x345547}),this['editor']['config']['set']('initialData',_0x44619a),this['editor']['config']['set']('rootsAttributes',_0x345547);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x113659=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x113659['add'](R(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x42fdbd){const _0x5c78d2=this['repository']['getRevisions']();_0x5c78d2['reverse']();let _0x797eb3=0x0;for(;_0x797eb3<_0x5c78d2['length'];){const _0x56ef96=_0x5c78d2[_0x797eb3];if(_0x56ef96===this['currentRevision']){_0x797eb3++;continue;}if(_0x56ef96['id']===this['_initialRevisionId'])break;const _0x4334a5=_0x42fdbd['toVersion']-_0x56ef96['toVersion']||_0x42fdbd['fromVersion']-_0x56ef96['fromVersion'];if(_0x4334a5>0x0)break;if(_0x4334a5<0x0)_0x797eb3++;else{if(!_0x42fdbd['creator']&&_0x56ef96['creator'])break;if(_0x56ef96['creator']||!_0x42fdbd['creator']){if(_0x42fdbd['createdAt']>_0x56ef96['createdAt'])break;_0x797eb3++;}else _0x797eb3++;}}return _0x797eb3;}['_getFromVersion'](_0x4c8104){const _0x49c836=this['repository']['getRevisions']();_0x49c836['reverse'](),_0x49c836['shift']();const _0x24706d=_0x49c836['find'](_0x22e7af=>_0x22e7af['toVersion']<=_0x4c8104)['toVersion'];return _0x24706d<this['_startingVersion']?this['_startingVersion']:_0x24706d;}['_makeRevision']({name:_0x1a3eab,from:_0xba24e8,to:_0x51fde5,creatorId:_0x565e3b,id:_0x521987}){const _0x5ea251=this['buildRevisionData']({'from':_0xba24e8,'to':_0x51fde5});_0x5ea251['name']=_0x1a3eab,_0x5ea251['creatorId']=_0x565e3b,_0x5ea251['id']=_0x521987;const _0x4a009e=this['addRevisionData'](_0x5ea251);return this['adapter']&&this['_bufferUpdate'](_0x5ea251['id'],_0x5ea251,!0x0),_0x4a009e;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class E{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x17444f){this['editor']=_0x17444f,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'](_0x293b8a){this['source']=_0x293b8a;const _0x5998f5=new Map(),_0x14bd26=new Map(),_0x4e7063=this['editor']['model']['document']['roots']['map'](_0x1f44c9=>_0x1f44c9['rootName']);for(const _0x179047 of _0x4e7063){const _0x922081=this['editor']['model']['document']['getRoot'](_0x179047),_0x259071=x(_0x922081);_0x5998f5['set'](_0x179047,_0x259071),_0x14bd26['set'](_0x179047,Object['fromEntries'](_0x922081['getAttributes']()));}const _0x5b1ca4=Array['from'](this['editor']['model']['markers'])['map'](_0x3f27f0=>[_0x3f27f0['name'],_0x3f27f0['getRange']()]),_0xcb0139=this['source']['version'];this['_saveMetaData'](_0xcb0139,_0x5998f5,_0x5b1ca4,_0x14bd26),this['_startingRevisionId']=this['_revisionId'];const _0x45ea87=new Map(),_0x1164b9=new Map();for(const _0x2ccb74 of _0x4e7063){const _0x2e16ac=N(_0x2ccb74);_0x45ea87['set'](_0x2ccb74,_0x2e16ac),_0x1164b9['set'](_0x2ccb74,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x45ea87,[],_0x1164b9);}['getData'](_0x49285d,_0x530a00){if(this['_lastFrom']===_0x49285d&&this['_lastTo']<=_0x530a00)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x530a00,!0x0);else{if(!this['_savedMetaData']['has'](_0x49285d)){const _0xe146bd=this['_getPreviousFrom'](_0x49285d);this['_calculateMetaData'](_0xe146bd,_0x49285d,!0x1);}this['_calculateMetaData'](_0x49285d,_0x530a00,!0x0);}return this['_lastFrom']=_0x49285d,this['_lastTo']=_0x530a00,this['_getState']();}['loadState'](_0x240181){const _0x4be41e=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x240181['fromVersion'],this['_lastTo']=_0x240181['toVersion'];for(const _0x1587f0 in _0x240181['diffData']){const _0x2b53a8=_0x240181['diffData'][_0x1587f0]['attachChange'],_0x35c7b9=_0x55ec3d(_0x240181['diffData'][_0x1587f0]['attributesBefore'])||{},_0x26e7d9=_0x4be41e['_makeModelFromViewString'](_0x240181['diffData'][_0x1587f0]['deletions']);_0x26e7d9['rootName']=_0x1587f0,_0x26e7d9['_isAttached']=!_0x2b53a8||!_0x2b53a8['isAttached'],_0x26e7d9['isAttached']=()=>_0x26e7d9['_isAttached'],this['_baseRoots']['set'](_0x1587f0,_0x26e7d9),this['_baseRootsAttributes']['set'](_0x1587f0,_0x35c7b9),_0x2b53a8&&this['_touchedRoots']['set'](_0x1587f0,_0x2b53a8);const _0x37b8d7=this['_makeIdsRoot'](_0x26e7d9);this['_baseIdsRoots']['set'](_0x1587f0,_0x37b8d7);for(const [_0x562d82,_0x414ec5]of _0x26e7d9['markers']){if(!_0x562d82['startsWith']('revision:'))continue;const _0x584cbc=_0x562d82['split'](':')[0x2];for(const _0x4d2a74 of _0x414ec5['getWalker']({'singleCharacters':!0x0})){const _0x43f27f=this['_getVidAttributeName'](_0x4d2a74),_0x19cc64='elementEnd'==_0x4d2a74['type']?_0x4d2a74['previousPosition']['path']['slice'](0x0,-0x1):_0x4d2a74['previousPosition']['path'],_0xa361db=_0x37b8d7['getNodeByPath'](_0x19cc64)['getAttribute'](_0x43f27f);this['_touched']['set'](_0xa361db,{'userId':_0x584cbc});}}}this['_startingRevisionId']=this['_revisionId'];const _0x169988=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x4adf98=>!this['_touched']['has'](_0x4adf98));let _0x1fb850=0x0;const _0x2ae0f2=new Map();for(const _0xc47f0d in _0x240181['diffData']){const _0x24e144=_0x240181['diffData'][_0xc47f0d]['attachChange'],_0x535d62=_0x55ec3d(_0x240181['diffData'][_0xc47f0d]['attributesAfter'])||{},_0x52ee84=_0x4be41e['_makeModelFromViewString'](_0x240181['diffData'][_0xc47f0d]['insertions']);_0x52ee84['rootName']=_0xc47f0d,_0x52ee84['_isAttached']=!_0x24e144||_0x24e144['isAttached'],_0x52ee84['isAttached']=()=>_0x52ee84['_isAttached'],this['_diffRoots']['set'](_0xc47f0d,_0x52ee84),this['_diffRootsAttributes']['set'](_0xc47f0d,_0x535d62);const _0x1ef2dd=this['_makeIdsRoot'](_0x52ee84,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0xc47f0d,_0x1ef2dd),_0x2ae0f2['set'](_0xc47f0d,_0x52ee84['isAttached']()?_0x535d62:{});for(const [_0x23ccac,_0xe10426]of _0x52ee84['markers']){if(!_0x23ccac['startsWith']('revision:'))continue;const _0xcae9b2=_0x23ccac['split'](':')[0x2];for(const _0x549049 of _0xe10426['getWalker']({'singleCharacters':!0x0})){const _0x32c444=this['_getVidAttributeName'](_0x549049),_0xaf3e98=this['_revisionId']++,_0x1c05ba='elementEnd'==_0x549049['type']?_0x549049['previousPosition']['path']['slice'](0x0,-0x1):_0x549049['previousPosition']['path'];_0x1ef2dd['getNodeByPath'](_0x1c05ba)['_setAttribute'](_0x32c444,_0xaf3e98),this['_touched']['set'](_0xaf3e98,{'userId':_0xcae9b2});}}for(const _0x3eb91d of this['editor']['model']['createRangeIn'](_0x52ee84)['getWalker']({'singleCharacters':!0x0})){const _0x8cdf84=this['_getVidAttributeName'](_0x3eb91d),_0x26bf43='elementEnd'==_0x3eb91d['type']?_0x3eb91d['previousPosition']['path']['slice'](0x0,-0x1):_0x3eb91d['previousPosition']['path'],_0x588d9e=_0x1ef2dd['getNodeByPath'](_0x26bf43);_0x588d9e['getAttribute'](_0x8cdf84)>0x0||_0x588d9e['_setAttribute'](_0x8cdf84,_0x169988[_0x1fb850++]);}for(const [_0x3bf4de,_0x40ff0b]of _0x52ee84['markers'])_0x3bf4de['startsWith']('revision:')||this['_markers']['set'](_0x3bf4de,_0x40ff0b);}const _0x365514=N('$graveyard');this['_baseRoots']['set']('$graveyard',_0x365514),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x365514,0x1));const _0x2012af=N('$graveyard');this['_diffRoots']['set']('$graveyard',_0x2012af),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2012af,0x1));const _0x16fad3=Array['from'](this['_diffRoots'])['map'](([_0x491e5c,_0x53f5ba])=>[_0x491e5c,x(_0x53f5ba)]);this['_saveMetaData'](this['_lastTo'],_0x16fad3,this['_markers'],_0x2ae0f2);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0xd2bdcb,_0x506600,_0x1843a2,_0x4e9f50){const _0x31433d=new Map(_0x506600),_0x4f0ffc=new Map(_0x55ec3d(_0x4e9f50)),_0x4ec6a6=new Map();for(const [_0x3cc0e5,_0x3e9bdf]of _0x1843a2)_0x4ec6a6['set'](_0x3cc0e5,{'start':_0x3e9bdf['start']['clone'](),'end':_0x3e9bdf['end']['clone'](),'rootName':_0x3e9bdf['root']['rootName']});this['_savedMetaData']['set'](_0xd2bdcb,{'roots':_0x31433d,'markers':_0x4ec6a6,'rootsAttributes':_0x4f0ffc});}['_removeMetaData'](_0x4965eb){this['_savedMetaData']['delete'](_0x4965eb);}['_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'](_0x417c6b,_0x3a103f=null){let _0x5c20df=null;_0x417c6b['is']('documentFragment')||(_0x5c20df=new _0x21c6c4(_0x417c6b['name'],{'vid_start':null===_0x3a103f?this['_revisionId']++:_0x3a103f++}));const _0x334f02=[];for(const _0x3bcaa9 of _0x417c6b['getChildren']())if(_0x3bcaa9['is']('element')){_0x334f02['push'](this['_makeIdsRoot'](_0x3bcaa9,_0x3a103f));const _0x5640d8=_0x334f02[_0x334f02['length']-0x1];null!==_0x3a103f&&(_0x3a103f=_0x5640d8['is']('element','$text')?_0x5640d8['getAttribute']('vid')+0x1:_0x5640d8['getAttribute']('vid_end')+0x1);}else{for(let _0x59b512=0x0;_0x59b512<_0x3bcaa9['offsetSize'];_0x59b512++)_0x334f02['push'](new _0x21c6c4('$text',{'vid':null===_0x3a103f?this['_revisionId']++:_0x3a103f++}));}if(_0x417c6b['is']('documentFragment')){const _0x52ceb2=N(_0x417c6b['rootName']);return _0x52ceb2['_insertChild'](0x0,_0x334f02),_0x52ceb2;}return _0x5c20df['_setAttribute']('vid_end',null===_0x3a103f?this['_revisionId']++:_0x3a103f++),_0x5c20df['_insertChild'](0x0,_0x334f02),_0x5c20df;}['_calculateMetaData'](_0xa108cf,_0x11387c,_0x472289){this['_reset']();const {roots:_0x332699,markers:_0x5cdc8a,rootsAttributes:_0x4221eb}=this['_savedMetaData']['get'](_0xa108cf);this['_baseRoots']=new Map(_0x332699),this['_baseRootsAttributes']=new Map(_0x55ec3d(_0x4221eb));for(const [_0x2205fb,_0x5f2319]of this['_baseRoots'])if('$graveyard'!==_0x2205fb&&(this['_diffRoots']['set'](_0x2205fb,x(_0x5f2319)),this['_diffRootsAttributes']=new Map(_0x55ec3d(_0x4221eb)),_0x472289)){const _0x382ff4=this['_revisionId'];this['_idsRoots']['set'](_0x2205fb,this['_makeIdsRoot'](_0x5f2319)),this['_baseIdsRoots']['set'](_0x2205fb,this['_makeIdsRoot'](_0x5f2319,_0x382ff4));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x472289&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x41ebf9,_0x4fac86]of _0x5cdc8a){const _0x5ca2bb=this['_baseRoots']['get'](_0x4fac86['rootName']),_0x178c92=this['_diffRoots']['get'](_0x4fac86['rootName']),_0x265014=new _0x2f0b7a(this['_fixPosition'](_0x4fac86['start'],_0x5ca2bb),this['_fixPosition'](_0x4fac86['end'],_0x5ca2bb)),_0x5b9993=this['_fixRange'](_0x265014,_0x178c92);_0x5ca2bb['markers']['set'](_0x41ebf9,_0x265014),this['_markers']['set'](_0x41ebf9,_0x5b9993);}this['_applyOperations'](_0xa108cf,_0x11387c,_0x472289);}['_applyOperations'](_0x256bf0,_0x48c1e1,_0x2d808e){for(const _0x3f5cd3 of this['source']['getOperations'](_0x256bf0,_0x48c1e1))this['_handleOperation'](_0x3f5cd3,_0x2d808e);for(const _0x2b5180 of this['_diffRoots']['values']())_0x2b5180['markers']['clear']();for(const [_0x1c6289,_0x1574a6]of this['_markers']){this['_diffRoots']['get'](_0x1574a6['root']['rootName'])['markers']['set'](_0x1c6289,_0x1574a6['clone']());}const _0x360c1c=new Map(),_0x1dd6bf=new Map();for(const [_0xbca788,_0x969a3b]of this['_diffRoots'])_0x360c1c['set'](_0xbca788,x(_0x969a3b)),_0x1dd6bf['set'](_0xbca788,this['_diffRootsAttributes']['get'](_0xbca788));this['_saveMetaData'](_0x48c1e1,_0x360c1c,this['_markers'],_0x1dd6bf);}['_getPreviousFrom'](_0x32abd7){const _0x399028=Array['from'](this['_savedMetaData']['keys']());_0x399028['sort']((_0x31fd5c,_0x41855d)=>_0x31fd5c-_0x41855d),_0x399028['reverse']();for(const _0x15fdf5 of _0x399028)if(_0x15fdf5<_0x32abd7)return _0x15fdf5;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x35b21e,_0x555e61){const _0x58a24b=Array['from'](_0x555e61['markers'])['map'](([_0x4b2ff2,_0x303967])=>[_0x4b2ff2,this['_fixRange'](_0x303967,_0x35b21e)]);_0x35b21e['markers']=new Map(_0x58a24b);}['_transformMarkers'](_0x3ca5be){for(const _0x47b72b of this['_markers']['values']()){const _0x434dc8=_0x47b72b['getTransformedByOperation'](_0x3ca5be),_0x2ca674=_0x2f0b7a['_createFromRanges'](_0x434dc8);_0x47b72b['start']=_0x2ca674['start'],_0x47b72b['end']=_0x2ca674['end'];}}['_handleOperation'](_0x5f0b33,_0x4b4541){if('addRoot'!=_0x5f0b33['type']&&'detachRoot'!=_0x5f0b33['type']){if('insert'==_0x5f0b33['type']){const _0x4de095=_0x5f0b33['position']['root']['rootName'];this['_diffRoots']['has'](_0x4de095)||(this['_diffRoots']['set'](_0x4de095,N(_0x4de095,!0x0)),this['_diffRootsAttributes']['set'](_0x4de095,{}),_0x4b4541&&this['_idsRoots']['set'](_0x4de095,N(_0x4de095,!0x0)));}else{if('addRootAttribute'==_0x5f0b33['type']||'removeRootAttribute'==_0x5f0b33['type']||'changeRootAttribute'==_0x5f0b33['type'])return void this['_handleRootAttributeOperation'](_0x5f0b33);'marker'==_0x5f0b33['type']&&this['_handleMarkerOperation'](_0x5f0b33);}if('marker'!==_0x5f0b33['type']){const _0x57142b=this['_cloneOperation'](_0x5f0b33,this['_diffRoots']);_0x57142b['_execute'](),this['_transformMarkers'](_0x57142b);}if(_0x4b4541)switch(_0x5f0b33['type']){case'insert':this['_handleInsertOperation'](_0x5f0b33);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x5f0b33);break;case'merge':this['_handleMergeOperation'](_0x5f0b33);break;case'split':this['_handleSplitOperation'](_0x5f0b33);}}else this['_handleRootOperation'](_0x5f0b33,_0x4b4541);}['_cloneOperation'](_0xf1309f,_0x40e941){const _0x18bec3=_0xf1309f['clone']();return _0x18bec3['_authorId']=_0xf1309f['_authorId'],this['_fixOperation'](_0x18bec3,_0x40e941),_0x18bec3;}['_getBaseVids'](_0x37609d){return _0x37609d['map'](_0x1728d1=>{const _0x5d7578=this['_getVidAttributeName'](_0x1728d1);return Number(_0x1728d1['item']['getAttribute'](_0x5d7578));});}['_generateTape'](_0x5d9afb,_0x38321e){if(_0x5d9afb['is']('element','$text'))_0x38321e['push']({'item':_0x5d9afb,'type':'text'});else{_0x5d9afb['is']('element')&&_0x38321e['push']({'item':_0x5d9afb,'type':'elementStart'});for(const _0x5a5a9c of _0x5d9afb['getChildren']())this['_generateTape'](_0x5a5a9c,_0x38321e);_0x5d9afb['is']('element')&&_0x38321e['push']({'item':_0x5d9afb,'type':'elementEnd'});}return _0x38321e;}['_getState'](){const _0x289897=new Map(this['_touched']),_0x2dab52=new Map(_0x289897),_0x224555=new Map(),_0x2ae571={'insertions':{},'deletions':{}},_0x3a910d={'insertions':{},'deletions':{}},_0x2d13da=new Map(),_0x549f70=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x549f70['delete']('$graveyard');for(const _0x1c1d8e of _0x549f70){const _0xcbf162=this['_diffRoots']['get'](_0x1c1d8e)||N(_0x1c1d8e,!0x1),_0x1810eb=this['_baseRoots']['get'](_0x1c1d8e)||N(_0x1c1d8e,!0x1);_0xcbf162['isAttached']()||_0x1810eb['isAttached']()?(_0x2ae571['insertions'][_0x1c1d8e]=x(_0xcbf162),_0x2ae571['deletions'][_0x1c1d8e]=x(_0x1810eb),this['_copyMarkers'](_0x2ae571['deletions'][_0x1c1d8e],_0x1810eb),this['_copyMarkers'](_0x2ae571['insertions'][_0x1c1d8e],_0xcbf162),_0x3a910d['insertions'][_0x1c1d8e]=this['_generateTape'](this['_idsRoots']['get'](_0x1c1d8e),[]),_0x3a910d['deletions'][_0x1c1d8e]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x1c1d8e)||N(_0x1c1d8e,!0x1),[])):_0x549f70['delete'](_0x1c1d8e);}for(const _0x49fe03 of _0x549f70){const _0x540cd6=_0x3a910d['insertions'][_0x49fe03];for(const _0xa73648 of _0x540cd6){const _0x4be8ed=this['_getVidAttributeName'](_0xa73648),_0x4ff70a=_0xa73648['item']['getAttribute'](_0x4be8ed);_0x2dab52['delete'](_0x4ff70a),_0x4ff70a>=this['_startingRevisionId']&&_0x224555['set'](_0x4ff70a,_0x289897['get'](_0x4ff70a));}}for(const _0x33defa of _0x549f70){const _0x9abfbe=_0x3a910d['insertions'][_0x33defa],_0x502014=this['_getBaseVids'](_0x3a910d['deletions'][_0x33defa]);let _0x3ada57=0x0;for(const _0x385a68 of _0x9abfbe){const _0x2c653d=this['_getVidAttributeName'](_0x385a68),_0x331cdc=_0x385a68['item']['getAttribute'](_0x2c653d);if(!_0x224555['has'](_0x331cdc)&&!_0x2d13da['has'](_0x331cdc)){if(_0x2dab52['has'](_0x331cdc))_0x3ada57++;else{if(_0x331cdc!=_0x502014[_0x3ada57]){const _0x179b62=_0x289897['get'](_0x331cdc)||_0x289897['get'](_0x502014[_0x3ada57]);for(;_0x331cdc!=_0x502014[_0x3ada57];)_0x2dab52['has'](_0x502014[_0x3ada57])||(_0x2d13da['set'](_0x502014[_0x3ada57],_0x179b62),_0x289897['set'](_0x502014[_0x3ada57],_0x179b62)),_0x3ada57++;}_0x3ada57++;}}}}for(const _0x5cf83b of _0x549f70){const _0x1bf2ee=_0x3a910d['insertions'][_0x5cf83b];for(const _0x1f2bac of _0x1bf2ee){const _0x425cd2=this['_getVidAttributeName'](_0x1f2bac),_0x157919=_0x1f2bac['item']['getAttribute'](_0x425cd2);if(_0x2d13da['has'](_0x157919)){const _0x19d601=_0x2d13da['get'](_0x157919);_0x2dab52['has'](_0x157919)||_0x2dab52['set'](_0x157919,{..._0x19d601}),_0x224555['set'](_0x157919,{..._0x19d601});}}}for(const _0x10005c of _0x2dab52['keys']())_0x10005c>=this['_startingRevisionId']&&_0x2dab52['delete'](_0x10005c);const _0x55a4a7=new Map();for(const _0x42eda1 of _0x549f70){let _0x2b3c65=_0x3a910d['insertions'][_0x42eda1];for(const _0x4f350f of _0x2b3c65)if(_0x4f350f['item']['is']('element','tableCell')){const _0x3f7170=this['_getVidAttributeName'](_0x4f350f),_0x1a7a5d=_0x4f350f['item']['getAttribute'](_0x3f7170);if(_0x224555['has'](_0x1a7a5d)){const _0x23eacb=_0x4f350f['item']['parent']['parent']['getAttribute']('vid_start'),_0x13ac90=_0x55a4a7['get'](_0x23eacb)||new Set();_0x13ac90['add'](_0x224555['get'](_0x1a7a5d)['userId']),_0x55a4a7['set'](_0x23eacb,_0x13ac90);}}_0x2b3c65=_0x3a910d['deletions'][_0x42eda1];for(const _0x3815b1 of _0x2b3c65)if(_0x3815b1['item']['is']('element','tableCell')){const _0x29bc0f=this['_getVidAttributeName'](_0x3815b1),_0x41a126=_0x3815b1['item']['getAttribute'](_0x29bc0f);if(_0x2dab52['has'](_0x41a126)){const _0x2eca22=_0x3815b1['item']['parent']['parent']['getAttribute']('vid_start'),_0x37cb1d=_0x55a4a7['get'](_0x2eca22)||new Set();_0x37cb1d['add'](_0x2dab52['get'](_0x41a126)['userId']),_0x55a4a7['set'](_0x2eca22,_0x37cb1d);}}for(const _0x58cab7 of _0x55a4a7['keys']())(_0x224555['has'](_0x58cab7)||_0x2dab52['has'](_0x58cab7))&&_0x55a4a7['delete'](_0x58cab7);}for(const _0x294c1e of _0x549f70){const _0x2bb7c2=_0x3a910d['insertions'][_0x294c1e];let _0xf15d39=null,_0x177c66=null;for(const _0x55d83b of _0x2bb7c2){const _0x4efa52=this['_getVidAttributeName'](_0x55d83b),_0x8f9a4f=_0x55d83b['item']['getAttribute'](_0x4efa52),_0x5014a0=_0x55a4a7['get'](_0x8f9a4f);_0x5014a0&&'elementStart'==_0x55d83b['type']&&(_0xf15d39=Array['from'](_0x5014a0)[0x0],_0x177c66=_0x55d83b['item']['getAttribute']('vid_end')),_0xf15d39&&(_0x2dab52['set'](_0x8f9a4f,{'userId':_0xf15d39}),_0x224555['set'](_0x8f9a4f,{'userId':_0xf15d39})),_0x8f9a4f==_0x177c66&&(_0xf15d39=null,_0x177c66=null);}}const _0x1f7329={},_0x23804f=new Set();for(const _0x229c17 of _0x549f70){const _0xefc7b2=_0x2ae571['deletions'][_0x229c17],_0x227d94=_0x2ae571['insertions'][_0x229c17];for(const {userId:_0xdfc5be}of this['_touchedMarkers']['values']())null!==_0xdfc5be&&_0x23804f['add'](_0xdfc5be);for(const {userId:_0x6e6abb}of this['_touchedRoots']['values']())null!==_0x6e6abb&&_0x23804f['add'](_0x6e6abb);this['_markChanges'](_0x227d94,_0x3a910d['insertions'][_0x229c17],_0x224555,'insertion',_0x23804f),this['_markChanges'](_0xefc7b2,_0x3a910d['deletions'][_0x229c17],_0x2dab52,'deletion',_0x23804f),_0x1f7329[_0x229c17]={'insertions':this['_prepareViewToSave'](_0x227d94),'deletions':this['_prepareViewToSave'](_0xefc7b2),'attachChange':this['_touchedRoots']['get'](_0x229c17)||null,'attributesBefore':_0x55ec3d(this['_baseRootsAttributes']['get'](_0x229c17))||{},'attributesAfter':_0x55ec3d(this['_diffRootsAttributes']['get'](_0x229c17))};}return{'diffData':_0x1f7329,'authorsIds':Array['from'](_0x23804f)};}['_processRootBeforeSave'](_0x484aa0){for(const [,_0x46cfe7]of _0x484aa0['markers']){const _0x1d895a=_0x46cfe7['start']['getAncestors']()['filter'](_0x2177dc=>'tableCell'==_0x2177dc['name']);for(const _0xd2d5fa of _0x1d895a)0x1==_0xd2d5fa['childCount']&&_0xd2d5fa['getChild'](0x0)['is']('element','paragraph')&&_0xd2d5fa['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x3dc12c){this['_processRootBeforeSave'](_0x3dc12c);const _0x24864a=this['editor']['data']['toView'](_0x3dc12c,{}),_0x5c0634=Array['from'](_0x24864a['getChildren']())['map'](_0x5d2101=>this['_getViewJson'](_0x5d2101));return JSON['stringify'](_0x5c0634);}['_getViewJson'](_0x11b5ac){if(_0x11b5ac['is']('$text'))return _0x11b5ac['data'];{const _0x274512=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x5df209=_0x11b5ac,_0x3bb9e2=this['editor']['data']['htmlProcessor']['domConverter'],_0x5cc49d={'type':_0x274512['_getTypeCharForViewElement'](_0x5df209),'name':_0x5df209['name'],'attributes':Array['from'](_0x5df209['getAttributes']()),'children':Array['from'](_0x5df209['getChildren']())['map'](_0x15df93=>this['_getViewJson'](_0x15df93))};if(_0x11b5ac['is']('uiElement')&&'$comment'!=_0x11b5ac['name']){const _0x2e084f=_0x11b5ac['render'](_0x3bb9e2['domDocument'],_0x3bb9e2);_0x5cc49d['children']['push'](_0x2e084f['outerHTML']);}else{if(_0x11b5ac['is']('rawElement')){const _0x2ef315=_0x3bb9e2['domDocument']['createElement'](_0x5df209['name']);_0x11b5ac['render'](_0x2ef315,_0x3bb9e2),_0x5cc49d['children']['push'](_0x2ef315['innerHTML']);}}const _0x388e71=Array['from'](_0x5df209['getCustomProperties']());_0x388e71['length']>0x0&&(_0x5cc49d['customProperties']=_0x388e71);const _0x35b52a=_0x5df209['getFillerOffset']();return null!==_0x35b52a&&(_0x5cc49d['fillerOffset']=_0x35b52a),_0x5cc49d;}}['_markChanges'](_0x2359ec,_0x2c26fb,_0x5dd1c9,_0x5d5911,_0x41c78f){let _0x15edba=null,_0x315aa5=null,_0x216eed=0x0;const _0x5d4936=this['editor']['model'];for(let _0x57ad96=0x0;_0x57ad96<_0x2c26fb['length'];_0x57ad96++){const _0x4a708a=this['_getVidAttributeName'](_0x2c26fb[_0x57ad96]),_0x34f405=_0x2c26fb[_0x57ad96]['item']['getAttribute'](_0x4a708a),_0x5eef2d=_0x5dd1c9['get'](_0x34f405),_0x305b01=_0x57ad96==_0x2c26fb['length']-0x1;(!_0x15edba&&_0x5eef2d&&(_0x15edba=_0x5eef2d,_0x315aa5=_0x2c26fb[_0x57ad96]),_0x15edba&&(!_0x5eef2d||_0x5eef2d['userId']!=_0x15edba['userId']))&&(_0x3a80c1(_0x5eef2d,P(_0x315aa5,_0x2359ec,_0x5d4936),P(_0x2c26fb[_0x57ad96],_0x2359ec,_0x5d4936)),_0x15edba=_0x5eef2d||null,_0x315aa5=_0x5eef2d?_0x2c26fb[_0x57ad96]:null),_0x15edba&&_0x305b01&&_0x3a80c1(_0x5eef2d,P(_0x315aa5,_0x2359ec,_0x5d4936),V(_0x2c26fb[_0x57ad96],_0x2359ec,_0x5d4936));}function _0x3a80c1(_0x571996,_0x2705c6,_0x447d7c){const _0x485c70=_0x15edba['userId'],_0x406db4='revision:'+_0x5d5911+':'+_0x485c70+':'+_0x216eed++,_0x2e6a5b=_0x5d4936['createRange'](_0x2705c6,_0x447d7c);_0x2359ec['markers']['set'](_0x406db4,_0x2e6a5b),null!==_0x485c70&&_0x41c78f['add'](_0x485c70);}}['_getVidAttributeName'](_0x184236){switch(_0x184236['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x4b6acd,_0x276acc){_0x4b6acd['baseVersion']=null;for(const _0x579e6a in _0x4b6acd){const _0x2842fa=_0x4b6acd[_0x579e6a];if(_0x2842fa instanceof _0x4d92fe){const _0xfbf3a7=_0x276acc['get'](_0x2842fa['root']['rootName']);_0x4b6acd[_0x579e6a]=this['_fixPosition'](_0x2842fa,_0xfbf3a7);}if(_0x2842fa instanceof _0x2f0b7a){const _0x4185d8=_0x276acc['get'](_0x2842fa['root']['rootName']);_0x4b6acd[_0x579e6a]=this['_fixRange'](_0x2842fa,_0x4185d8);}'root'===_0x579e6a&&(_0x4b6acd['root']=_0x276acc['get'](_0x4b6acd['root']['rootName']));}}['_fixRange'](_0x108900,_0x608c90){return this['editor']['model']['createRange'](this['_fixPosition'](_0x108900['start'],_0x608c90),this['_fixPosition'](_0x108900['end'],_0x608c90));}['_fixPosition'](_0x1bdeab,_0x2105af){return this['editor']['model']['createPositionFromPath'](_0x2105af,_0x1bdeab['path'],_0x1bdeab['stickiness']);}['_handleInsertOperation'](_0x364bc7){const _0x57bcc9=this['_idsRoots']['get'](_0x364bc7['position']['root']['rootName']),_0x4a45ed=this['_fixPosition'](_0x364bc7['position'],_0x57bcc9),_0x5caca8=null===_0x364bc7['_authorId']?null:_0x364bc7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x354808=_0x4a45ed['parent'],_0x1b2eea=this['_revisionId'],_0x1bda1c=[];for(const _0x6f7c63 of _0x364bc7['nodes'])if(_0x6f7c63['is']('element'))_0x1bda1c['push'](this['_makeIdsRoot'](_0x6f7c63));else{for(let _0x170225=0x0;_0x170225<_0x6f7c63['offsetSize'];_0x170225++)_0x1bda1c['push'](new _0x21c6c4('$text',{'vid':this['_revisionId']++}));}const _0x115ca3=this['_revisionId'];for(let _0x332d5f=_0x1b2eea;_0x332d5f<_0x115ca3;_0x332d5f++)this['_touched']['set'](_0x332d5f,{'userId':_0x5caca8});_0x354808['_insertChild'](_0x4a45ed['offset'],_0x1bda1c);}['_handleMoveOperation'](_0x5c29ec){(_0x5c29ec=this['_cloneOperation'](_0x5c29ec,this['_idsRoots']))['_execute']();const _0x1f1d68=null===_0x5c29ec['_authorId']?null:_0x5c29ec['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xb30e6a=_0x5c29ec['getMovedRangeStart'](),_0x1797b3=_0xb30e6a['parent'],_0x585a87=_0xb30e6a['offset'];!function _0x2d43bc(_0x4e53d0,_0x239288,_0x376b90,_0x49afce){for(let _0xb661ad=_0x376b90;_0xb661ad<_0x49afce;_0xb661ad++){const _0x1961fb=_0x239288['getChild'](_0xb661ad);_0x1961fb['is']('element','$text')?_0x4e53d0['set'](_0x1961fb['getAttribute']('vid'),{'userId':_0x1f1d68}):(_0x4e53d0['set'](_0x1961fb['getAttribute']('vid_start'),{'userId':_0x1f1d68}),_0x2d43bc(_0x4e53d0,_0x1961fb,0x0,_0x1961fb['childCount']),_0x4e53d0['set'](_0x1961fb['getAttribute']('vid_end'),{'userId':_0x1f1d68}));}}(this['_touched'],_0x1797b3,_0x585a87,_0x585a87+_0x5c29ec['howMany']);}['_handleMergeOperation'](_0x5d094b){const _0xf4d762=null===(_0x5d094b=this['_cloneOperation'](_0x5d094b,this['_idsRoots']))['_authorId']?null:_0x5d094b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4d7eb9=_0x5d094b['targetPosition']['parent'],_0x1703b7=_0x5d094b['sourcePosition']['parent'],_0x2ec5c0=_0x4d7eb9['getAttribute']('vid_end'),_0x26b98d=_0x1703b7['getAttribute']('vid_start');_0x4d7eb9['_setAttribute']('vid_end',_0x1703b7['getAttribute']('vid_end')),_0x1703b7['_setAttribute']('vid_end',_0x2ec5c0),this['_touched']['set'](_0x26b98d,{'userId':_0xf4d762}),this['_touched']['set'](_0x2ec5c0,{'userId':_0xf4d762}),_0x5d094b['_execute']();}['_handleSplitOperation'](_0x826a8){const _0x28bf9b=null===(_0x826a8=this['_cloneOperation'](_0x826a8,this['_idsRoots']))['_authorId']?null:_0x826a8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x214f07=_0x826a8['graveyardPosition'],_0x21b1eb=_0x826a8['splitPosition']['parent'];_0x826a8['_execute']();const _0x4087c9=_0x21b1eb['getAttribute']('vid_end'),_0x33534e=_0x826a8['insertionPosition']['nodeAfter'];if(_0x214f07){const _0x386444=_0x33534e['getAttribute']('vid_end'),_0x3804a7=_0x21b1eb['getAttribute']('vid_end');_0x21b1eb['_setAttribute']('vid_end',_0x386444),_0x33534e['_setAttribute']('vid_end',_0x3804a7),this['_touched']['set'](_0x21b1eb['getAttribute']('vid_end'),{'userId':_0x28bf9b}),this['_touched']['set'](_0x33534e['getAttribute']('vid_start'),{'userId':_0x28bf9b});}else{const _0x2d5ee4=this['_revisionId']++,_0x343cff=this['_revisionId']++;_0x21b1eb['_setAttribute']('vid_end',_0x2d5ee4),_0x33534e['_setAttribute']('vid_start',_0x343cff),_0x33534e['_setAttribute']('vid_end',_0x4087c9),this['_touched']['set'](_0x2d5ee4,{'userId':_0x28bf9b}),this['_touched']['set'](_0x343cff,{'userId':_0x28bf9b});}}['_handleMarkerOperation'](_0x239524){if(!_0x239524['affectsData'])return;const _0x594c25=(_0x239524=this['_cloneOperation'](_0x239524,this['_diffRoots']))['oldRange']?_0x239524['oldRange']['root']:null,_0x5ef012=_0x239524['newRange']?_0x239524['newRange']['root']:null;_0x594c25&&this['_markers']['delete'](_0x239524['name']),_0x5ef012&&this['_markers']['set'](_0x239524['name'],_0x239524['newRange']['clone']());const _0x22db99=null===_0x239524['_authorId']?null:_0x239524['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5a7ebe=_0x239524['name'];if(!this['_touchedMarkers']['has'](_0x5a7ebe))return void this['_touchedMarkers']['set'](_0x5a7ebe,{'range':_0x239524['oldRange'],'userId':_0x22db99});const _0x54c8b7=this['_touchedMarkers']['get'](_0x5a7ebe),_0x581879=_0x54c8b7['range'],_0x3a26f8=_0x239524['newRange'];null==_0x581879&&null==_0x3a26f8||_0x581879&&_0x3a26f8&&_0x581879['isEqual'](_0x3a26f8)?this['_touchedMarkers']['delete'](_0x239524['name']):_0x54c8b7['userId']=_0x22db99;}['_handleRootOperation'](_0x31dbef,_0x538f67){this['_diffRoots']['has'](_0x31dbef['rootName'])?this['_diffRoots']['get'](_0x31dbef['rootName'])['_isAttached']=_0x31dbef['isAdd']:(this['_diffRoots']['set'](_0x31dbef['rootName'],N(_0x31dbef['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x31dbef['rootName'],{}),_0x538f67&&this['_idsRoots']['set'](_0x31dbef['rootName'],N(_0x31dbef['rootName'],!0x0)));const _0x5e7dde=null===_0x31dbef['_authorId']?null:_0x31dbef['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5bbca8=this['_touchedRoots']['get'](_0x31dbef['rootName']);_0x5bbca8&&_0x5bbca8['userId']===_0x5e7dde?this['_touchedRoots']['delete'](_0x31dbef['rootName']):this['_touchedRoots']['set'](_0x31dbef['rootName'],{'userId':_0x5e7dde,'isAttached':_0x31dbef['isAdd']});}['_handleRootAttributeOperation'](_0x32e06e){const _0x3a0dc5=this['_diffRootsAttributes']['get'](_0x32e06e['root']['rootName']);null===_0x32e06e['newValue']?delete _0x3a0dc5[_0x32e06e['key']]:_0x3a0dc5[_0x32e06e['key']]=_0x32e06e['newValue'];}}function x(_0x3a5e00){const _0x23b9ab=N(_0x3a5e00['rootName'],_0x3a5e00['isAttached']());for(const _0x398141 of _0x3a5e00['getChildren']()){const _0x7cb3fb=_0x398141['_clone'](!0x0);_0x23b9ab['_appendChild'](_0x7cb3fb);}return _0x23b9ab;}function N(_0x1c3130,_0x5f4d56=!0x0){const _0x36987d=new _0x4972a8();return _0x36987d['rootName']=_0x1c3130,_0x36987d['_isAttached']=_0x5f4d56,_0x36987d['isAttached']=()=>_0x36987d['_isAttached'],_0x36987d;}function P(_0x1d58ed,_0x13a089,_0x38a7b1){const _0x35ec90='elementEnd'==_0x1d58ed['type']?_0x38a7b1['createPositionAt'](_0x1d58ed['item'],'end'):_0x38a7b1['createPositionBefore'](_0x1d58ed['item']);return _0x38a7b1['createPositionFromPath'](_0x13a089,_0x35ec90['path'],_0x35ec90['stickiness']);}function V(_0xe29f45,_0x13ace1,_0xb95462){const _0x1e8da0='elementStart'==_0xe29f45['type']?_0xb95462['createPositionAt'](_0xe29f45['item'],0x0):_0xb95462['createPositionAfter'](_0xe29f45['item']);return _0xb95462['createPositionFromPath'](_0x13ace1,_0x1e8da0['path'],_0x1e8da0['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
+ _0x22170b(_0x5c6cf3){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1d7acb,_0x37e97b){super(_0x1d7acb),this['focusTracker']=new _0x3f07d1(),this['keystrokes']=new _0x5a424f(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x37e97b),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x4519c6({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x24f07e=_0x4080b6=>_0x4080b6['stopPropagation']();this['keystrokes']['set']('arrowright',_0x24f07e),this['keystrokes']['set']('arrowleft',_0x24f07e),this['keystrokes']['set']('arrowup',_0x24f07e),this['keystrokes']['set']('arrowdown',_0x24f07e);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x592c67){this['revisionNameInputView']['fieldView']['element']['value']=_0x592c67['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x5da3f0){const _0xa204ce=new et(this['locale'],ti),_0x56903e=_0xa204ce['fieldView'];_0x56903e['extendTemplate']({'attributes':{'maxlength':'220'}});let _0xa30e80=R(this['locale'],'Name\x20of\x20the\x20revision');return!_0x5da3f0&&(_0xa30e80+='\x20('+R(this['locale'],'optional')+')'),(_0xa204ce['label']=_0xa30e80,_0x56903e['on']('input',()=>{this['revisionNameInputValue']=_0x56903e['element']['value']['trim']();}),_0xa204ce);}}class v extends _0x3bfb25{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x30207f=this['editor'],_0x297d9c=_0x30207f['plugins']['get']('RevisionTracker');_0x30207f['ui']['componentFactory']['add']('revisionHistory',_0x1beaf7=>{const _0x25efd7=_0x5e5960(_0x1beaf7),_0x19e1e9=_0x25efd7['panelView']['children'],_0x4c8828=new _0x3f0f9f(_0x1beaf7),_0x599603=new _0x5eae5c(_0x1beaf7),_0x2f50ba=new _0x34a99f(_0x1beaf7),_0x557f8c=new _0x5eae5c(_0x1beaf7),_0x4a6534=new _0x34a99f(_0x1beaf7);return _0x25efd7['bind']('isEnabled')['to'](_0x297d9c,'isReady',_0x297d9c,'isEnabled',_0x30207f,'isReadOnly',(_0x3a1248,_0x46eafd,_0x504a2c)=>_0x3a1248&&_0x46eafd&&!_0x504a2c),_0x25efd7['buttonView']['set']({'icon':_0x2b1ca7,'label':R(_0x1beaf7,'Revision\x20history'),'tooltip':!0x0}),_0x2f50ba['set']({'label':R(_0x1beaf7,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x2f50ba['bind']('isEnabled')['to'](_0x297d9c,'isReady',_0x297d9c,'isEnabled',_0x30207f,'isReadOnly',(_0x2386de,_0x54e641,_0x5861d1)=>_0x2386de&&_0x54e641&&!_0x5861d1),_0x2f50ba['on']('execute',()=>this['_showDialog']()),_0x4a6534['set']({'label':R(_0x1beaf7,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x4a6534['bind']('isEnabled')['to'](_0x297d9c,'isReady',_0x30207f,'isReadOnly',(_0x31e78c,_0x7a2e19)=>_0x31e78c&&!_0x7a2e19),_0x4a6534['on']('execute',()=>{_0x30207f['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x25efd7['isOpen']=!0x1,_0x30207f['editing']['view']['focus']();}),_0x599603['children']['add'](_0x2f50ba),_0x557f8c['children']['add'](_0x4a6534),_0x4c8828['role']='menu',_0x4c8828['items']['addMany']([_0x599603,_0x557f8c]),_0x19e1e9['add'](_0x4c8828),_0x25efd7;}),_0x30207f['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x46306d=this['editor'],_0xe79797=_0x46306d['locale'],_0x5dfdf2=new _0x42a242(_0xe79797),_0x26747d=new _0x258d32(_0xe79797);_0x5dfdf2['buttonView']['set']({'icon':_0x2b1ca7,'label':R(_0xe79797,'Revision\x20history')});const _0x4980ef=new _0x1f49d9(_0xe79797,_0x5dfdf2),_0x5f03ec=new _0x272316(_0xe79797);_0x5f03ec['set']({'label':R(_0xe79797,'Save\x20current\x20revision')}),_0x5f03ec['delegate']('execute')['to'](_0x5dfdf2),_0x5f03ec['on']('execute',()=>{this['_showDialog']();}),_0x4980ef['children']['add'](_0x5f03ec),_0x26747d['items']['add'](_0x4980ef);const _0x189cb7=new _0x1f49d9(_0xe79797,_0x5dfdf2),_0x247ccc=new _0x272316(_0xe79797);return _0x247ccc['set']({'label':R(_0xe79797,'Open\x20revision\x20history')}),_0x247ccc['delegate']('execute')['to'](_0x5dfdf2),_0x247ccc['on']('execute',()=>{_0x46306d['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x189cb7['children']['add'](_0x247ccc),_0x26747d['items']['add'](_0x189cb7),_0x5dfdf2['panelView']['children']['add'](_0x26747d),_0x5dfdf2;}['_showDialog'](){const _0x42c02b=this['editor'],_0x2730ea=_0x42c02b['locale'],_0x2f8b34=_0x42c02b['plugins']['get']('Dialog'),_0x138e71=_0x42c02b['plugins']['get']('RevisionTracker');function _0xa99777(_0x24cd38){_0x42c02b['config']['get']('revisionHistory.requireRevisionName')&&''===_0x24cd38['revisionName']?_0x24cd38['revisionNameInputView']['errorText']=R(_0x2730ea,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x42c02b['plugins']['get'](h)['saveRevision']({'name':_0x24cd38['revisionName']}),_0x2f8b34['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0xa99777(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x2f8b34['show']({'id':'revisionSave','title':R(_0x2730ea,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':R(_0x42c02b['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x2f8b34['hide']()},{'label':R(_0x42c02b['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x3ca101){_0x3ca101['bind']('isEnabled')['to'](_0x138e71,'isReady',_0x138e71,'isEnabled',_0x42c02b,'isReadOnly',(_0xeb7aef,_0x302a9c,_0x46b44a)=>_0xeb7aef&&_0x302a9c&&!_0x46b44a);},'onExecute':()=>_0xa99777(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x507ec6=this['editor'],_0x47edfd=_0x507ec6['locale'];this['_saveRevisionFormView']=new me(_0x47edfd,_0x507ec6['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x5c6cf3{['changeId'];['_model'];constructor(_0x4632e8,_0x49b601){super(_0x4632e8),this['_model']=_0x49b601,this['changeId']=_0x49b601['id'];const _0x1e5b7e=this['bindTemplate'],_0x2009d7=R(_0x4632e8,_0x49b601['data']['isSuggestion']?'Suggested\x20by':'add'==_0x49b601['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x49b601['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x1e5b7e['to']('type',_0x2f2db4=>'ck-revision-change__'+_0x2f2db4)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x2009d7}]},{'text':'\x20'+_0x49b601['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x49a1ef(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0xfa9d4){super(),this['id']=_0xfa9d4['id']||_0x39fc3d(),this['author']=_0xfa9d4['author'],this['type']=_0xfa9d4['type'],this['data']=_0xfa9d4['data']||{},this['rootName']=_0xfa9d4['rootName'],this['set']('createdAt',_0xfa9d4['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class J{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x32c0a3,_0xe20096){this['newRevisionId']=_0x32c0a3,this['oldRevisionId']=_0xe20096,this['changes']=new _0x5b144d();}['_setChanges'](_0x3ed33b){for(const _0xc10468 of _0x3ed33b)this['changes']['add'](_0xc10468);}}class l extends _0x3bfb25{['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[_0x22873d,_0x218446,S,$];}constructor(_0x9d30d1){super(_0x9d30d1),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',(_0x30bfc4,_0x4fe857,_0x2c094d)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x3fe186=>{for(const _0x545fbc of this['editor']['editing']['view']['document']['roots'])_0x2c094d?_0x3fe186['removeClass']('ck-editor__editable__overlay',_0x545fbc):_0x3fe186['addClass']('ck-editor__editable__overlay',_0x545fbc);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x1c1aa5=>null!==_0x1c1aa5),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x4bf664,_0x222920,_0x53678e)=>_0x4bf664&&_0x53678e?_0x222920['changes']['getIndex'](_0x53678e):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x3cf7d2,_0x5d842c)=>_0x3cf7d2?_0x5d842c['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x218446);}['init'](){const _0x48cd98=this['editor'],_0x4ebd05=new rt(_0x48cd98,{'direction':'backward'}),_0x5d04fa=new rt(_0x48cd98,{'direction':'forward'});(_0x48cd98['commands']['add']('showPreviousChange',_0x4ebd05),_0x48cd98['commands']['add']('showNextChange',_0x5d04fa),_0x48cd98['commands']['add']('restoreRevision',new nt(_0x48cd98)),this['on']('change:numberOfChanges',()=>{_0x4ebd05['refresh'](),_0x5d04fa['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x48cd98['enableReadOnlyMode']('revision-viewer'),_0x48cd98['plugins']['has']('WidgetToolbarRepository'))&&_0x48cd98['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x39556d){return await this['_utils']['loadRevisionData'](_0x39556d,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x39556d);}async['getRevisionRootsAttributes'](_0x125e07){return await this['_utils']['loadRevisionData'](_0x125e07,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x125e07);}async['compare'](_0x510a93,_0x1ab968,_0x443e6c=!0x1){if(!this['isEnabled'])return;const _0xd5f0d=this['diff'],_0x44e3c9=this['repository'],_0x23a65b='string'==typeof _0x510a93?_0x44e3c9['getRevision'](_0x510a93):_0x510a93,_0x213c9f='string'==typeof _0x1ab968?_0x44e3c9['getRevision'](_0x1ab968):_0x1ab968,_0x539e77=_0x23a65b['id'],_0x5a01c7=_0x213c9f?_0x213c9f['id']:null;if(!_0x443e6c&&this['diff']&&this['diff']['newRevisionId']===_0x539e77&&this['diff']['oldRevisionId']===_0x5a01c7)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x539e77,_0x5a01c7);const _0x486272=this['_getRevisionsRange'](_0x23a65b,_0x213c9f,!0x0)['map'](_0x593fd4=>this['_utils']['loadRevisionData'](_0x593fd4,this['adapter']));return _0x486272['push'](new Promise(_0x85e7e9=>{setTimeout(_0x85e7e9,0x14);})),Promise['all'](_0x486272)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x1493e0=this['_getDiff'](_0x539e77,_0x5a01c7);for(const _0x3f2c86 of _0x1493e0['changes'])this['_changeIdToChange']['set'](_0x3f2c86['id'],_0x3f2c86);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2e143a=>{for(const _0x29d2e3 of this['editor']['model']['document']['getRootNames']())_0x2e143a['detachRoot'](_0x29d2e3);for(const _0x4c3023 of Object['keys'](_0x1493e0['model'])){const _0x21c6a5=_0x2e143a['addRoot'](_0x4c3023);for(const _0x3fb1a7 of Object['keys'](_0x1493e0['attributes'][_0x4c3023]))_0x2e143a['setAttribute'](_0x3fb1a7,_0x1493e0['attributes'][_0x4c3023][_0x3fb1a7],_0x21c6a5);_0x2e143a['insert'](_0x1493e0['model'][_0x4c3023],_0x21c6a5,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x1493e0['changes'])),this['isReady']=!0x0;})['catch'](_0x149ff3=>{console['error'](_0x149ff3),this['_cleanUp'](),_0xd5f0d&&(this['diff']=_0xd5f0d),this['isReady']=!0x0;});}['addRevisionData'](_0x37a92a,_0x599cd7){const _0x1d3ef2=this['repository']['createRevision'](_0x37a92a);return _0x1d3ef2['on']('_update',(_0x389c7f,_0xbd5dee,_0x2fb1b2)=>_0x599cd7(_0xbd5dee,_0x2fb1b2,_0x1d3ef2)),this['repository']['addRevision'](_0x1d3ef2),_0x1d3ef2;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x2b5a3f=>{for(const _0x8d8f40 of this['editor']['model']['document']['getRootNames']())_0x2b5a3f['detachRoot'](_0x8d8f40);});}['_sortAndFilterDiffChanges'](_0x1bf21c){const _0x24ea75=[],_0x2b6eff=new Map();for(const _0x3dddff of this['editor']['model']['document']['getRootNames']()){const _0x1991a7=this['editor']['editing']['view']['getDomRoot'](_0x3dddff);if(!_0x1991a7)continue;const _0x38bab6=_0x1991a7['getClientRects']()['item'](0x0);_0x38bab6&&(_0x24ea75['push'](_0x3dddff),_0x2b6eff['set'](_0x3dddff,_0x38bab6));}return _0x24ea75['sort']((_0x5251b2,_0x3827d7)=>{const _0x5b08c0=_0x2b6eff['get'](_0x5251b2),_0x2490e5=_0x2b6eff['get'](_0x3827d7);return _0x5b08c0['y']-_0x2490e5['y']||_0x5b08c0['x']-_0x2490e5['x'];}),(_0x1bf21c=_0x1bf21c['filter'](_0x2f6cd2=>_0x24ea75['includes'](_0x2f6cd2['rootName'])))['sort']((_0x55bf15,_0x5ca739)=>_0x24ea75['indexOf'](_0x55bf15['rootName'])-_0x24ea75['indexOf'](_0x5ca739['rootName'])),_0x1bf21c;}['_makeTape'](_0x2638cf){const _0x27d318=Array['from'](_0x2638cf['markers'])['filter'](([_0xb919a2,_0x46a2c9])=>_0xb919a2['startsWith']('revision:')&&!_0x46a2c9['isCollapsed']),_0x494c3e=Array['from'](this['editor']['model']['createRangeIn'](_0x2638cf)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x27d318['length'])for(const _0x30f480 of _0x494c3e){const [_0x3e7725,_0x1bfaf8]=_0x27d318[0x0],[,_0x3b3d91,_0x128580]=_0x3e7725['split'](':');if(_0x1bfaf8['end']['isEqual'](_0x30f480['nextPosition'])&&_0x27d318['shift'](),(_0x30f480['previousPosition']['isEqual'](_0x1bfaf8['start'])||_0x30f480['previousPosition']['isAfter'](_0x1bfaf8['start']))&&('insertion'==_0x3b3d91?_0x30f480['isAdded']={'userId':_0x128580}:'deletion'==_0x3b3d91&&(_0x30f480['isRemoved']={'userId':_0x128580})),0x0==_0x27d318['length'])break;}return _0x494c3e;}['_refreshStartEndIndex'](_0x10a916){const _0x4ff5af=new Map();for(let _0x6a437f=0x0;_0x6a437f<_0x10a916['length'];_0x6a437f++)'text'===_0x10a916[_0x6a437f]['type']?(_0x10a916[_0x6a437f]['item']['startIndex']=_0x6a437f,_0x10a916[_0x6a437f]['item']['endIndex']=_0x6a437f):('elementStart'===_0x10a916[_0x6a437f]['type']?_0x10a916[_0x6a437f]['item']['startIndex']=_0x6a437f:'elementEnd'===_0x10a916[_0x6a437f]['type']&&(_0x10a916[_0x6a437f]['item']['endIndex']=_0x6a437f),_0x4ff5af['set'](_0x10a916[_0x6a437f]['id'],_0x6a437f));for(const _0x34c019 of _0x4ff5af['values']())'elementStart'===_0x10a916[_0x34c019]['type']?_0x10a916[_0x34c019]['item']['endIndex']=_0x4ff5af['get'](_0x10a916[_0x34c019]['pairId']):'elementEnd'===_0x10a916[_0x34c019]['type']&&(_0x10a916[_0x34c019]['item']['startIndex']=_0x4ff5af['get'](_0x10a916[_0x34c019]['pairId']));}['_processTape'](_0x350432){for(let _0x2c6682=0x0;_0x2c6682<_0x350432['length'];_0x2c6682++){if('elementStart'===_0x350432[_0x2c6682]['type'])_0x350432[_0x2c6682]['item']['startIndex']=_0x2c6682;else{if('elementEnd'===_0x350432[_0x2c6682]['type']){_0x350432[_0x2c6682]['item']['endIndex']=_0x2c6682;const _0x3dcd74=_0x350432[_0x2c6682]['item']['startIndex'];_0x350432[_0x3dcd74]['pairId']=_0x350432[_0x2c6682]['id'],_0x350432[_0x2c6682]['pairId']=_0x350432[_0x3dcd74]['id'];}else _0x350432[_0x2c6682]['item']['startIndex']=_0x2c6682,_0x350432[_0x2c6682]['item']['endIndex']=_0x2c6682,_0x350432[_0x2c6682]['pairId']=null;}_0x350432[_0x2c6682]['markersStart']||(_0x350432[_0x2c6682]['markersStart']=[],_0x350432[_0x2c6682]['markersEnd']=[]);}}['_markInsertions'](_0x2301b3,_0x5d0e6a){const _0x5da5aa=_0x2301b3['filter'](_0x29c708=>!_0x29c708['isAdded']);for(let _0x20222c=0x0;_0x20222c<_0x5d0e6a['length'];_0x20222c++)_0x5d0e6a[_0x20222c]['isAdded']&&(_0x5da5aa[_0x20222c]['isAdded']=_0x5d0e6a[_0x20222c]['isAdded']);}['_getDiff'](_0x5e7793,_0x4261e7=null){const _0x3f33c0=this['repository']['getRevision'](_0x5e7793),_0x4d6362=_0x4261e7?this['repository']['getRevision'](_0x4261e7):null,_0x24f07c=this['_getRevisionsRange'](_0x3f33c0,_0x4d6362),_0x5c978b=_0x24f07c[_0x24f07c['length']-0x1],_0x4c9b70=new Map(),_0x4f3660={'model':{},'attributes':{},'changes':[]},_0x1cfc8f=new Set(),_0xdc0647=new Map();for(let _0x2bb01b=_0x24f07c['length']-0x1;_0x2bb01b>=0x0;_0x2bb01b--){const _0xf8b197=_0x24f07c[_0x2bb01b];for(const _0x2127ac of Object['keys'](_0xf8b197['diffData']))if(_0xf8b197['diffData'][_0x2127ac]['attachChange']){const _0x2ed705=_0xf8b197['diffData'][_0x2127ac]['attachChange'];_0x2ed705['isAttached']?(_0x1cfc8f['add'](_0x2127ac),_0xdc0647['has'](_0x2127ac)&&_0xdc0647['get'](_0x2127ac)['userId']==_0x2ed705['userId']?_0xdc0647['delete'](_0x2127ac):_0xdc0647['set'](_0x2127ac,_0x2ed705)):_0xdc0647['has'](_0x2127ac)?(_0x1cfc8f['delete'](_0x2127ac),_0xdc0647['delete'](_0x2127ac)):(_0x1cfc8f['add'](_0x2127ac),_0xdc0647['set'](_0x2127ac,_0x2ed705));}else _0x1cfc8f['add'](_0x2127ac);}for(const _0x387c2b of _0x1cfc8f){const _0x2dbc6e=_0xdc0647['has'](_0x387c2b)&&!_0xdc0647['get'](_0x387c2b)['isAttached'];let _0x3f51c7=_0x2dbc6e?_0x24f07c['length']-0x1:0x0;const _0x5836b0=_0x2dbc6e?-0x1:0x1;for(;_0x24f07c[_0x3f51c7];){const _0xf4e2bd=_0x24f07c[_0x3f51c7];if(_0xf4e2bd['diffData'][_0x387c2b]){const _0x120dac=_0x2dbc6e?_0xf4e2bd['diffData'][_0x387c2b]['attributesBefore']:_0xf4e2bd['diffData'][_0x387c2b]['attributesAfter'];_0x4f3660['attributes'][_0x387c2b]=_0x120dac?_0x55ec3d(_0x120dac):{};break;}_0x3f51c7+=_0x5836b0;}}for(const _0x38e12a of _0x24f07c){_0x38e12a['model']={};for(const _0x3a0a68 of _0x38e12a['authors'])_0x4c9b70['set'](_0x3a0a68['id'],_0x3a0a68);for(const _0x5a844d of _0x1cfc8f){const _0x460cf2=_0x38e12a['diffData'][_0x5a844d]?_0x38e12a['diffData'][_0x5a844d]['insertions']:'[]',_0x4cf2f7=_0x38e12a['diffData'][_0x5a844d]?_0x38e12a['diffData'][_0x5a844d]['deletions']:'[]';_0x38e12a['model'][_0x5a844d]={'insertions':this['_utils']['_makeModelFromViewString'](_0x460cf2),'deletions':this['_utils']['_makeModelFromViewString'](_0x4cf2f7)};}}for(const _0x58c1a5 of _0x1cfc8f){let _0x451658=null,_0x505fdd=0x0;const _0x5ea8c4=new Map(Array['from'](_0x3f33c0['model'][_0x58c1a5]['insertions']['markers'])['filter'](([_0x38e2b6])=>!_0x38e2b6['startsWith']('revision:')));let _0x3d4e1d=0x0;for(const _0x1cd734 of _0x24f07c){const _0x33fb38=this['_makeTape'](_0x1cd734['model'][_0x58c1a5]['insertions']);_0x1cd734==_0x3f33c0?(_0x451658=_0x33fb38,_0x505fdd=_0x451658['length'],_0x451658['forEach'](_0x548d20=>{_0x548d20['id']=_0x3d4e1d++;}),this['_processTape'](_0x451658)):this['_markInsertions'](_0x451658,_0x33fb38);const _0x3ddc33=_0x451658['filter'](_0x26f521=>!_0x26f521['isAdded'])['map'](_0x77dda4=>_0x77dda4['id']);let _0x354451=0x0;const _0x13d6a4=this['_makeTape'](_0x1cd734['model'][_0x58c1a5]['deletions']);_0x13d6a4['forEach'](_0x40af53=>{_0x40af53['isRemoved']?_0x40af53['id']=_0x505fdd++:_0x40af53['id']=_0x3ddc33[_0x354451++];}),this['_processTape'](_0x13d6a4),this['_setDistance'](_0x451658,'isAdded'),this['_setDistance'](_0x13d6a4,'isRemoved'),_0x1cd734==_0x3f33c0&&this['_markMarkers'](_0x451658,_0x5ea8c4),_0x451658=this['_joinTapes'](_0x451658,_0x13d6a4),this['_refreshStartEndIndex'](_0x451658),this['_setDistance'](_0x451658,'isRemoved');}_0x451658=_0x451658['filter'](_0x4a9a3f=>!(_0x4a9a3f['isAdded']&&_0x4a9a3f['isRemoved']));const _0x1db461=new Map(_0x5c978b['model'][_0x58c1a5]['deletions']['markers']),_0x457b66=new Set(_0x5ea8c4['keys']());for(const _0x396c96 of _0x1db461['keys']())_0x457b66['delete'](_0x396c96);this['_markSuggestions'](_0x451658,_0x457b66),this['_fixObsoleteTags'](_0x451658),_0x451658=this['_removeMissingPairs'](_0x451658),_0x451658=this['_markMismatchedRemovedTags'](_0x451658),_0x451658=this['_removeUnsupportedChanges'](_0x451658);const {root:_0x56bae2,changes:_0x2aac06}=this['_makeModelFromTape'](_0x451658,_0x4c9b70,_0x58c1a5);_0x4f3660['model'][_0x58c1a5]=_0x56bae2;const _0x260b28=_0xdc0647['get'](_0x58c1a5);if(_0x260b28){const _0x283c40=_0x4c9b70['get'](_0x260b28['userId']),_0x1bcbfe=new G({'author':_0x283c40,'type':_0x260b28['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x58c1a5});_0x2aac06['unshift'](_0x1bcbfe),_0x4f3660['attributes'][_0x58c1a5]['revisionHistoryAttachChange']=_0x1bcbfe['id'];}_0x4f3660['changes']=_0x4f3660['changes']['concat'](_0x2aac06);}return _0x4f3660;}['_markMarkers'](_0x1dd3c7,_0x45554f){for(let _0x225fd4=0x0;_0x225fd4<_0x1dd3c7['length'];_0x225fd4++)for(const [_0x23bcbe,_0xb15cba]of _0x45554f)!_0xb15cba['isCollapsed']&&_0xb15cba['start']['isEqual'](_0x1dd3c7[_0x225fd4]['previousPosition'])&&_0x1dd3c7[_0x225fd4]['markersStart']['push'](_0x23bcbe),_0xb15cba['end']['isEqual'](_0x1dd3c7[_0x225fd4]['nextPosition'])&&_0x1dd3c7[_0x225fd4]['markersEnd']['push'](_0x23bcbe);}['_joinTapes'](_0x3e6a13,_0x5e5208){let _0xe8bdd9=[],_0x3b5d9d=0x0,_0x2aa58f=0x0;for(;_0x3b5d9d<_0x3e6a13['length']||_0x2aa58f<_0x5e5208['length'];){const _0x5ab0f4=_0x3e6a13[_0x3b5d9d]||{},_0xbf0411=_0x5e5208[_0x2aa58f]||{};if(_0x5ab0f4['id']==_0xbf0411['id'])_0x3b5d9d++,_0x2aa58f++,_0xe8bdd9['push'](_0x5ab0f4);else{if(_0xbf0411['isRemoved']&&_0x5ab0f4['isAdded']){const {commonTape:_0x48207d,iEnd:_0x38a760,jEnd:_0x130df1}=this['_threeWayMerge'](_0x3e6a13,_0x3b5d9d,_0x5e5208,_0x2aa58f);_0xe8bdd9=_0xe8bdd9['concat'](_0x48207d),_0x3b5d9d=_0x38a760,_0x2aa58f=_0x130df1;}else _0xbf0411['isRemoved']?(_0x2aa58f++,_0xe8bdd9['push'](_0xbf0411)):(_0x3b5d9d++,_0xe8bdd9['push'](_0x5ab0f4));}}return _0xe8bdd9;}['_markSuggestions'](_0x1fa831,_0x4f42fb){const _0x13b8b1=[];for(let _0x1e4aab=0x0;_0x1e4aab<_0x1fa831['length'];_0x1e4aab++){for(let _0x1cd1ff=0x0;_0x1cd1ff<_0x1fa831[_0x1e4aab]['markersStart']['length'];_0x1cd1ff++){const _0x2dc6a3=_0x1fa831[_0x1e4aab]['markersStart'][_0x1cd1ff];if(!_0x4f42fb['has'](_0x2dc6a3))continue;const {group:_0x544346,type:_0x4509c4,authorId:_0x567a92}=_0x3c592b(_0x2dc6a3);'revision-suggestion'!=_0x544346||'insertion'!=_0x4509c4&&'deletion'!=_0x4509c4||(_0x13b8b1['unshift']({'type':_0x4509c4,'name':_0x2dc6a3,'userId':_0x567a92}),_0x1fa831[_0x1e4aab]['markersStart']['splice'](_0x1cd1ff,0x1),_0x1cd1ff--);}_0x5c2524(_0x1fa831[_0x1e4aab]);for(let _0x235e7c=0x0;_0x235e7c<_0x1fa831[_0x1e4aab]['markersEnd']['length'];_0x235e7c++){const _0x20181b=_0x1fa831[_0x1e4aab]['markersEnd'][_0x235e7c];if(!_0x4f42fb['has'](_0x20181b))continue;const {group:_0x443b9a,type:_0x279131}=_0x3c592b(_0x20181b);if('revision-suggestion'!=_0x443b9a||'insertion'!=_0x279131&&'deletion'!=_0x279131)continue;_0x1fa831[_0x1e4aab]['markersEnd']['splice'](_0x235e7c,0x1),_0x235e7c--;const _0x2de34b=_0x13b8b1['findIndex'](_0x3632ae=>_0x3632ae['name']==_0x20181b);_0x2de34b>-0x1&&_0x13b8b1['splice'](_0x2de34b,0x1);}}function _0x3c592b(_0x40b005){const _0xb9686=_0x40b005['split'](':');return{'group':_0xb9686[0x0],'type':_0xb9686[0x1],'subType':_0xb9686['length']>=0x5?_0xb9686[0x2]:null,'id':_0xb9686['length']<0x5?_0xb9686[0x2]:_0xb9686[0x3],'authorId':_0xb9686['length']<0x5?_0xb9686[0x3]:_0xb9686[0x4],'markerCount':0x6==_0xb9686['length']?_0xb9686[0x5]:null};}function _0x5c2524(_0x3ea2cf){for(let _0x47412e=0x0;_0x47412e<_0x13b8b1['length'];_0x47412e++){if(_0x3ea2cf['isAdded']&&'insertion'==_0x13b8b1[_0x47412e]['type']&&_0x3ea2cf['isAdded']['userId']==_0x13b8b1[_0x47412e]['userId'])return _0x3ea2cf['isAddSuggestion']=_0x13b8b1[_0x47412e],void delete _0x3ea2cf['isAdded'];if(!_0x3ea2cf['isAdded']&&!_0x3ea2cf['isRemoved']&&'deletion'==_0x13b8b1[_0x47412e]['type'])return void(_0x3ea2cf['isRemoveSuggestion']=_0x13b8b1[_0x47412e]);}}}['_setDistance'](_0x1e549c,_0x13c9d7){let _0x40ceb0=0x0,_0x3a796b=!0x1;const _0x5698cd=new Map();for(const _0x3d38a3 of _0x1e549c)_0x3d38a3[_0x13c9d7]?_0x3a796b&&(_0x40ceb0++,_0x3a796b=!0x1):(_0x40ceb0++,_0x3a796b=!0x0),_0x5698cd['set'](_0x3d38a3['id'],_0x40ceb0);for(let _0x469c5b=0x0;_0x469c5b<_0x1e549c['length'];_0x469c5b++){if('isRemoved'==_0x13c9d7&&_0x1e549c[_0x469c5b]['isAdded']||'isAdded'==_0x13c9d7&&_0x1e549c[_0x469c5b]['isRemoved'])continue;if('text'==_0x1e549c[_0x469c5b]['type']){_0x1e549c[_0x469c5b]['distance']=0x0;continue;}const _0x50654c=_0x5698cd['get'](_0x1e549c[_0x469c5b]['pairId']),_0x4b83b1=_0x5698cd['get'](_0x1e549c[_0x469c5b]['id']);_0x1e549c[_0x469c5b]['distance']=_0x50654c-_0x4b83b1;}}['_getRevisionsRange'](_0x3ef411,_0x4b6c0b,_0x34b845=!0x1){const _0x174f75=[];let _0x4bf629=this['repository']['getIndex'](_0x3ef411),_0xf6e440=this['repository']['getIndex'](_0x4b6c0b);for(-0x1==_0xf6e440&&(_0xf6e440=this['repository']['_revisions']['length'],_0x34b845=!0x1);_0x4bf629<_0xf6e440;)_0x174f75['push'](this['repository']['getRevision'](_0x4bf629)),_0x4bf629++;return _0x34b845&&_0x174f75['push'](this['repository']['getRevision'](_0x4bf629)),_0x174f75;}['_threeWayMerge'](_0x55569a,_0x59bdff,_0x2fb549,_0x21556f){const _0x3cfcf0=this['editor']['model']['schema'];let _0x5288b3=_0x59bdff;for(;_0x55569a[_0x5288b3]&&_0x55569a[_0x5288b3]['isAdded'];)_0x5288b3++;let _0x33242a=_0x21556f;for(;_0x2fb549[_0x33242a]&&_0x2fb549[_0x33242a]['isRemoved'];)_0x33242a++;_0x232375(_0x55569a,_0x59bdff,_0x5288b3),_0x232375(_0x2fb549,_0x21556f,_0x33242a);const _0x418d62=_0x2fb549['slice'](_0x21556f,_0x33242a)['concat'](_0x55569a['slice'](_0x59bdff,_0x5288b3));return _0x418d62['sort']((_0x15e737,_0x47b0cf)=>_0x15e737['side']!=_0x47b0cf['side']?_0x15e737['side']-_0x47b0cf['side']:_0x15e737['level']!=_0x47b0cf['level']?_0x15e737['level']-_0x47b0cf['level']:_0x15e737['distance']!=_0x47b0cf['distance']?_0x47b0cf['distance']-_0x15e737['distance']:!!_0x15e737['isAdded']!=!!_0x47b0cf['isAdded']?-0x1==_0x15e737['side']||0x0==_0x15e737['side']?_0x15e737['isAdded']?-0x1:0x1:_0x15e737['isAdded']?0x1:-0x1:_0x15e737['index']-_0x47b0cf['index']),{'commonTape':_0x418d62,'iEnd':_0x5288b3,'jEnd':_0x33242a};function _0x232375(_0x54b30d,_0x12f5ac,_0x24e169){let _0x5c9ebf=-0x1,_0xe9d4a1=Number['POSITIVE_INFINITY'],_0x546d7b=!0x0;for(let _0x464ab9=_0x12f5ac;_0x464ab9<_0x24e169;_0x464ab9++)if(_0x3cfcf0['isInline'](_0x54b30d[_0x464ab9]['item'])||(_0x546d7b=!0x1),_0x54b30d[_0x464ab9]['item']['startIndex']<_0x12f5ac&&(_0x5c9ebf=_0x464ab9),_0x54b30d[_0x464ab9]['item']['endIndex']>=_0x24e169){_0xe9d4a1=_0x464ab9;break;}_0x546d7b&&(_0x5c9ebf=_0x24e169-0x1);for(let _0x5d0f22=_0x12f5ac;_0x5d0f22<_0x24e169;_0x5d0f22++)_0x54b30d[_0x5d0f22]['side']=_0x5d0f22<=_0x5c9ebf?-0x1:_0x5d0f22<_0xe9d4a1?0x0:0x1,_0x54b30d[_0x5d0f22]['index']=_0x5d0f22;let _0x3c8dd6=0x0;for(let _0x2cf5c9=_0x12f5ac;_0x2cf5c9<=_0x5c9ebf;_0x2cf5c9++)0x0==_0x54b30d[_0x2cf5c9]['distance']?_0x54b30d[_0x2cf5c9]['level']=_0x3c8dd6:(_0x3c8dd6++,_0x54b30d[_0x2cf5c9]['level']=_0x3c8dd6,_0x3c8dd6++);for(let _0x161388=_0x12f5ac;_0x161388<_0x24e169;_0x161388++)0x0==_0x54b30d[_0x161388]['side']&&(_0x54b30d[_0x161388]['level']=_0x3c8dd6);_0x3c8dd6=0x0;for(let _0x53ac23=_0x24e169-0x1;_0x53ac23>=_0xe9d4a1;_0x53ac23--)0x0==_0x54b30d[_0x53ac23]['distance']?_0x54b30d[_0x53ac23]['level']=_0x3c8dd6:(_0x3c8dd6--,_0x54b30d[_0x53ac23]['level']=_0x3c8dd6,_0x3c8dd6--);}}['_fixObsoleteTags'](_0x1c0f7d){const _0x48ef97=new Map(),_0x5ad646=this['editor']['model']['schema'];for(let _0x40b60a=0x1;_0x40b60a<_0x1c0f7d['length'];_0x40b60a++){let _0x41d7ea,_0x45b879,_0x463b4f;const _0x30c61b=_0x1c0f7d[_0x40b60a],_0x12a4c8=_0x1c0f7d[_0x40b60a-0x1];if('text'==_0x30c61b['type'])continue;if(_0x30c61b['type']!=_0x12a4c8['type'])continue;if(!_0x5ad646['isBlock'](_0x12a4c8['item'])||_0x5ad646['isLimit'](_0x12a4c8['item']))continue;if(!_0x5ad646['isBlock'](_0x30c61b['item'])||_0x5ad646['isLimit'](_0x30c61b['item']))continue;if((_0x1c0f7d[_0x40b60a]['isAdded']||_0x1c0f7d[_0x40b60a]['isAddSuggestion'])&&_0x1c0f7d[_0x40b60a-0x1]['isRemoved'])_0x41d7ea=_0x1c0f7d[_0x40b60a],_0x45b879=_0x1c0f7d[_0x40b60a-0x1],_0x463b4f=_0x40b60a-0x1;else{if(!_0x1c0f7d[_0x40b60a]['isRemoved']||!_0x1c0f7d[_0x40b60a-0x1]['isAdded']&&!_0x1c0f7d[_0x40b60a-0x1]['isAddSuggestion'])continue;_0x41d7ea=_0x1c0f7d[_0x40b60a-0x1],_0x45b879=_0x1c0f7d[_0x40b60a],_0x463b4f=_0x40b60a;}const _0x37135d=_0x41d7ea['level']==_0x45b879['level'],_0x53b5b9=Math['abs'](_0x41d7ea['level'])<Math['abs'](_0x45b879['level'])&&0x0==_0x45b879['distance'];(_0x37135d||_0x53b5b9)&&(_0x48ef97['set'](_0x45b879['id'],_0x41d7ea['id']),_0x1c0f7d['splice'](_0x463b4f,0x1),_0x40b60a--,_0x41d7ea['isAdded']=!0x1);}for(let _0x28ef86=0x0;_0x28ef86<_0x1c0f7d['length'];_0x28ef86++)_0x48ef97['has'](_0x1c0f7d[_0x28ef86]['pairId'])&&(_0x1c0f7d[_0x28ef86]['pairId']=_0x48ef97['get'](_0x1c0f7d[_0x28ef86]['pairId']));}['_removeMissingPairs'](_0x2793d5){const _0x12c47d=new Set(_0x2793d5['map'](_0x3b2912=>_0x3b2912['id']));for(let _0x157261=0x0;_0x157261<_0x2793d5['length'];_0x157261++)_0x12c47d['has'](_0x2793d5[_0x157261]['pairId'])||0x0==_0x2793d5[_0x157261]['distance']||(_0x2793d5[_0x157261]['isIncorrect']=!0x0);return _0x2793d5['filter'](_0x1dcbea=>!_0x1dcbea['isIncorrect']);}['_markMismatchedRemovedTags'](_0xb26100){const _0x20bce5=new Set();for(let _0x1196ad=0x0;_0x1196ad<_0xb26100['length'];_0x1196ad++){if(_0x20bce5['has'](_0xb26100[_0x1196ad]['id'])&&_0xb26100[_0x1196ad]['isRemoved']&&(_0xb26100[_0x1196ad]['isIncorrect']=!0x0),_0xb26100[_0x1196ad]['isIncorrect'])continue;if(0x0==_0xb26100[_0x1196ad]['distance'])continue;if('elementStart'!=_0xb26100[_0x1196ad]['type'])continue;if(null==_0xb26100[_0x1196ad]['pairId'])continue;let _0x5559be=_0x1196ad+0x1,_0x25a46d=0x0;for(;_0xb26100[_0x5559be]['id']!=_0xb26100[_0x1196ad]['pairId'];)'elementStart'==_0xb26100[_0x5559be]['type']?_0x25a46d++:'elementEnd'==_0xb26100[_0x5559be]['type']&&_0x25a46d--,_0x5559be++;if(0x0!=_0x25a46d){if(_0xb26100[_0x1196ad]['isRemoved'])_0xb26100[_0x1196ad]['isIncorrect']=!0x0;else{for(;_0x5559be!=_0x1196ad;)_0xb26100[_0x5559be]['isRemoved']&&0x0!=_0xb26100[_0x5559be]['distance']&&(_0xb26100[_0x5559be]['isIncorrect']=!0x0,_0x20bce5['add'](_0xb26100[_0x5559be]['pairId'])),_0x5559be--;}}}return _0xb26100['filter'](_0x1520e4=>!_0x1520e4['isIncorrect']);}['_removeUnsupportedChanges'](_0x42ced0){const _0x3ff068=this['editor']['model']['schema'];for(let _0x5cd2f9=0x0;_0x5cd2f9<_0x42ced0['length'];_0x5cd2f9++){if(!(_0x42ced0[_0x5cd2f9]['isAdded']||_0x42ced0[_0x5cd2f9]['isAddSuggestion']||_0x42ced0[_0x5cd2f9]['isRemoved']||_0x42ced0[_0x5cd2f9]['isRemoveSuggestion']))continue;if(0x0==_0x42ced0[_0x5cd2f9]['distance'])continue;const _0x3520d6=_0x42ced0[_0x5cd2f9]['item'];_0x3ff068['isBlock'](_0x3520d6)||_0x3ff068['isLimit'](_0x3520d6)||(_0x42ced0[_0x5cd2f9]['isAdded']&&delete _0x42ced0[_0x5cd2f9]['isAdded'],_0x42ced0[_0x5cd2f9]['isAddSuggestion']&&delete _0x42ced0[_0x5cd2f9]['isAddSuggestion'],_0x42ced0[_0x5cd2f9]['isRemoveSuggestion']&&delete _0x42ced0[_0x5cd2f9]['isRemoveSuggestion'],_0x42ced0[_0x5cd2f9]['isRemoved']&&(_0x42ced0[_0x5cd2f9]['isIncorrect']=!0x0));}return _0x42ced0['filter'](_0x17e20f=>!_0x17e20f['isIncorrect']);}['_makeModelFromTape'](_0x30a8ba,_0x1b2186,_0x43ba0b){const _0x3b76f5=new _0x4972a8(),_0x13e968=[],_0x1b8818=new Map(),_0x1e9132=this['editor']['model'],_0x20b03e=_0x1e9132['schema'],_0x55828f=[_0x3b76f5],_0x3a7764={},_0x49dcdb={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x2d7ac4=null;const _0x43afd2=[0x0];for(let _0x4af7b5=0x0;_0x4af7b5<_0x30a8ba['length'];_0x4af7b5++)if('elementStart'===_0x30a8ba[_0x4af7b5]['type']){_0x30a8ba[_0x4af7b5]['previousPosition']=_0x1e9132['createPositionFromPath'](_0x3b76f5,_0x43afd2);const _0x5aa839=new _0x21c6c4(_0x30a8ba[_0x4af7b5]['item']['name'],_0x30a8ba[_0x4af7b5]['item']['getAttributes']());_0x55828f[0x0]['_appendChild'](_0x5aa839),_0x43afd2['push'](0x0),_0x55828f['unshift'](_0x5aa839),_0x30a8ba[_0x4af7b5]['nextPosition']=_0x1e9132['createPositionFromPath'](_0x3b76f5,_0x43afd2);}else'elementEnd'===_0x30a8ba[_0x4af7b5]['type']?(_0x55828f['shift'](),_0x30a8ba[_0x4af7b5]['previousPosition']=_0x1e9132['createPositionFromPath'](_0x3b76f5,_0x43afd2),_0x43afd2['pop'](),_0x43afd2[_0x43afd2['length']-0x1]++,_0x30a8ba[_0x4af7b5]['nextPosition']=_0x1e9132['createPositionFromPath'](_0x3b76f5,_0x43afd2)):(_0x30a8ba[_0x4af7b5]['previousPosition']=_0x1e9132['createPositionFromPath'](_0x3b76f5,_0x43afd2),_0x2d7ac4?_0x2d7ac4['_data']+=_0x30a8ba[_0x4af7b5]['item']['data']:_0x2d7ac4=new _0x2cfa96(_0x30a8ba[_0x4af7b5]['item']['data'],_0x30a8ba[_0x4af7b5]['item']['getAttributes']()),_0x30a8ba[_0x4af7b5+0x1]&&'text'===_0x30a8ba[_0x4af7b5+0x1]['type']&&_0x379ac7(_0x2d7ac4,_0x30a8ba[_0x4af7b5+0x1]['item'])||(_0x55828f[0x0]['_appendChild'](_0x2d7ac4),_0x2d7ac4=null),_0x43afd2[_0x43afd2['length']-0x1]+=_0x30a8ba[_0x4af7b5]['item']['offsetSize'],_0x30a8ba[_0x4af7b5]['nextPosition']=_0x1e9132['createPositionFromPath'](_0x3b76f5,_0x43afd2));for(let _0x4a9dda=0x0;_0x4a9dda<_0x30a8ba['length'];_0x4a9dda++){const _0x119f20=_0x30a8ba[_0x4a9dda]['previousPosition'],_0xa7e361=_0x30a8ba[_0x4a9dda]['nextPosition'];for(const _0x433960 of _0x30a8ba[_0x4a9dda]['markersStart'])_0x1b8818['set'](_0x433960,{'start':_0x119f20,'end':null});_0x1cfc66('isRemoveSuggestion',_0x4a9dda,_0x119f20,_0xa7e361),_0x1cfc66('isAddSuggestion',_0x4a9dda,_0x119f20,_0xa7e361),_0x1cfc66('isRemoved',_0x4a9dda,_0x119f20,_0xa7e361),_0x1cfc66('isAdded',_0x4a9dda,_0x119f20,_0xa7e361);for(const _0x5bfbde of _0x30a8ba[_0x4a9dda]['markersEnd']){const _0x4bd3d4=_0x1b8818['get'](_0x5bfbde);_0x4bd3d4?_0x4bd3d4['end']=_0xa7e361:_0x1b8818['set'](_0x5bfbde,{'start':_0xa7e361,'end':_0xa7e361});}}for(const [_0x45f5fa,_0x4147ea]of _0x1b8818){const _0x1cdb7e=this['editor']['model']['createRange'](_0x4147ea['start'],_0x4147ea['end']);_0x3b76f5['markers']['set'](_0x45f5fa,_0x1cdb7e);}return _0x13e968['sort']((_0x30a902,_0x4ead0c)=>{const _0xa1139d=_0x3b76f5['markers']['get']('revision:'+_0x30a902['id']),_0x386212=_0x3b76f5['markers']['get']('revision:'+_0x4ead0c['id']);return _0xa1139d['start']['isBefore'](_0x386212['start'])?-0x1:_0xa1139d['start']['isAfter'](_0x386212['start'])?0x1:_0xa1139d['end']['isBefore'](_0x386212['end'])?-0x1:_0xa1139d['end']['isAfter'](_0x386212['end'])?0x1:'add'===_0x30a902['type']?-0x1:0x1;}),{'root':_0x3b76f5,'changes':_0x13e968};function _0x1cfc66(_0x4cd331,_0x12ba5f,_0x1002e7,_0x46ea84){const _0x2231e8=!!_0x30a8ba[_0x12ba5f][_0x4cd331],_0x4fdd3c=_0x2231e8?_0x30a8ba[_0x12ba5f][_0x4cd331]['userId']:null,_0x4c5465=_0x12ba5f===_0x30a8ba['length']-0x1,_0x1e6a66=_0x49dcdb[_0x4cd331][0x0],_0x21e505=_0x20b03e['isObject'](_0x30a8ba[_0x12ba5f]['item']);!_0x3a7764[_0x4cd331]&&_0x2231e8?_0x3a7764[_0x4cd331]={'start':_0x1002e7,'tapeItem':_0x30a8ba[_0x12ba5f],'userId':_0x4fdd3c,'type':_0x4cd331}:_0x3a7764[_0x4cd331]&&!_0x2231e8?(_0x3a7764[_0x4cd331]['end']=_0x1002e7,_0x5142c2(_0x3a7764[_0x4cd331]),_0x3a7764[_0x4cd331]=null):_0x3a7764[_0x4cd331]&&_0x2231e8&&_0x3a7764[_0x4cd331]['userId']!==_0x4fdd3c&&(_0x3a7764[_0x4cd331]['end']=_0x1002e7,_0x1e6a66&&_0x1e6a66['userId']===_0x3a7764[_0x4cd331]['userId']||_0x5142c2(_0x3a7764[_0x4cd331]),_0x3a7764[_0x4cd331]={'start':_0x1002e7,'tapeItem':_0x30a8ba[_0x12ba5f],'userId':_0x4fdd3c,'type':_0x4cd331}),_0x3a7764[_0x4cd331]&&_0x21e505&&('elementStart'!==_0x30a8ba[_0x12ba5f]['type']||_0x1e6a66&&_0x1e6a66['userId']===_0x4fdd3c||_0x49dcdb[_0x4cd331]['unshift']({'userId':_0x4fdd3c,'object':_0x30a8ba[_0x12ba5f]['item'],'change':_0x3a7764[_0x4cd331]}),'elementEnd'===_0x30a8ba[_0x12ba5f]['type']&&_0x1e6a66&&_0x1e6a66['object']===_0x30a8ba[_0x12ba5f]['item']&&(_0x49dcdb[_0x4cd331]['shift'](),_0x3a7764[_0x4cd331]=_0x1e6a66['change'])),_0x3a7764[_0x4cd331]&&_0x4c5465&&(_0x3a7764[_0x4cd331]['end']=_0x46ea84,_0x5142c2(_0x3a7764[_0x4cd331]),_0x3a7764[_0x4cd331]=null);}function _0x5142c2({start:_0xf1186e,end:_0x414783,tapeItem:_0x21d37a,userId:_0x4422b4,type:_0x4c6199}){const _0x53a323=_0x21d37a['item'],_0x2b5d4a=_0x1e9132['schema']['isBlock'](_0x53a323)&&!_0x1e9132['schema']['isLimit'](_0x53a323),_0x11ee17=_0xf1186e['nodeAfter']==_0x414783['parent']&&_0x414783['isAtStart'];if(_0x2b5d4a&&_0x11ee17)return;const _0x5cc332=_0x1e9132['createRange'](_0xf1186e,_0x414783),_0x477d2c=_0x1b2186['get'](_0x4422b4),_0x362361=new G({'author':_0x477d2c,'type':'isAdded'==_0x4c6199||'isAddSuggestion'==_0x4c6199?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4c6199||'isRemoveSuggestion'==_0x4c6199},'createdAt':new Date(),'rootName':_0x43ba0b});_0x13e968['push'](_0x362361),_0x3b76f5['markers']['set']('revision:'+_0x362361['id'],_0x5cc332);}function _0x379ac7(_0x37a4ff,_0x1c2015){const _0x181d06=_0x37a4ff['getAttributes'](),_0x19fd61=_0x1c2015['getAttributes']();for(const _0x152f8e of _0x181d06){if(_0x152f8e[0x1]!==_0x1c2015['getAttribute'](_0x152f8e[0x0]))return!0x1;_0x19fd61['next']();}return _0x19fd61['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x596dd3=>{const _0x3dd77a=_0x596dd3['markerName']['split'](':')[0x1],_0x48f868=this['_getChangeFromId'](_0x3dd77a);if(!_0x48f868)return null;const _0x3afc0f='add'==_0x48f868['type']?'insertion':'deletion',_0x43fab8=['ck-suggestion-marker','ck-suggestion-marker-'+_0x3afc0f];return _0x48f868['data']['isSuggestion']&&_0x43fab8['push']('ck-suggestion-marker-'+_0x3afc0f+'-new'),this['activeChange']==_0x48f868&&_0x43fab8['push']('ck-suggestion-marker--active'),{'classes':_0x43fab8,'attributes':{'data-change-id':_0x3dd77a}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x107d29=>{_0x107d29['on']('element:pre',(_0x133e9a,_0x4b19bf,_0x4f640f)=>{const _0x47f0c9=_0x4b19bf['viewItem']['getChild'](0x0);if(!_0x47f0c9||!_0x47f0c9['is']('element','code'))return;if(!_0x4f640f['consumable']['consume'](_0x47f0c9,{'attributes':['vid_start','vid_end']}))return;const _0x515d08=_0x4b19bf['modelRange']['start']['nodeAfter'];_0x4f640f['writer']['setAttribute']('vid_start',_0x47f0c9['getAttribute']('vid_start'),_0x515d08),_0x4f640f['writer']['setAttribute']('vid_end',_0x47f0c9['getAttribute']('vid_end'),_0x515d08);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x1391ae=>{_0x1391ae['on']('element',(_0x3c5631,_0x3a87f1,_0x3b1d44)=>{if(!_0x3b1d44['consumable']['consume'](_0x3a87f1['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x3a87f1['modelRange']['isCollapsed'])return;const _0x3b6fb8=_0x3a87f1['modelRange']['start']['nodeAfter'];_0x3b6fb8['hasAttribute']('vid_start')||_0x3b6fb8['hasAttribute']('vid')||(_0x3b1d44['writer']['setAttribute']('vid_start',_0x3a87f1['viewItem']['getAttribute']('vid_start'),_0x3b6fb8),_0x3b1d44['writer']['setAttribute']('vid_end',_0x3a87f1['viewItem']['getAttribute']('vid_end'),_0x3b6fb8));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x4c7be1=>_0x4c7be1['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x57cd5f,[,_0x33eb98])=>{['vid_start','vid_end','vid']['includes'](_0x33eb98)&&(_0x57cd5f['return']=!0x0,_0x57cd5f['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1a90ba=>{_0x1a90ba['on']('attribute:vid',(_0x3465fc,_0x3bd684,_0x24f0ec)=>{if('\x20'!=_0x3bd684['item']['data']||_0x3bd684['item']['parent']['maxOffset']>0x1)return;if(!_0x24f0ec['consumable']['consume'](_0x3bd684['item'],_0x3465fc['name']))return;const _0x57e921=_0x24f0ec['writer'],_0x2b6598=_0x24f0ec['mapper']['toViewRange'](_0x3bd684['range']);_0x57e921['wrap'](_0x2b6598,_0x57e921['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x5bddef){const _0xf7ce51=_0x5bddef['plugins']['get']('RevisionViewer');return(_0x554161,_0x190e88,_0xc4a899)=>{const _0x1e7ef1=_0x190e88['markerName']['split'](':')[0x1],_0x9e5421=_0xf7ce51['_getChangeFromId'](_0x1e7ef1);if(!_0x9e5421)return null;const _0x438979='add'==_0x9e5421['type']?'split':'merge';if(!_0xc4a899['consumable']['test'](_0x190e88['markerRange'],_0x554161['name']))return;const _0x2ecae6=_0x190e88['markerRange']['getWalker'](),_0x59312e=_0x190e88['markerRange']['start'],_0x298eee=_0x5bddef['model']['schema'];let _0x178d14=null,_0x57e4ec=null,_0x44ff51=!0x1,_0x1623bc=!0x1;for(const _0x167af8 of _0x2ecae6){const _0x3c7f49=_0x167af8['item'];_0x44ff51=_0x44ff51||_0x298eee['isContent'](_0x3c7f49);const _0x27cff4=_0xc4a899['mapper']['toViewElement'](_0x3c7f49);if(_0x27cff4&&_0x27cff4['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x167af8['type']&&(_0x298eee['isBlock'](_0x3c7f49)&&!_0x298eee['isLimit'](_0x3c7f49)&&(_0x3c7f49['nextSibling']||_0x59312e['isAtEnd']?_0x178d14&&_0x178d14['parent']==_0x3c7f49||(_0x178d14=_0x3c7f49,_0x2b31d6(_0x167af8['previousPosition']),_0x1623bc=!0x0):_0x57e4ec=_0x57e4ec||_0x167af8['previousPosition']));}function _0x2b31d6(_0xd3c276){const _0x11c81e=_0xc4a899['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x438979}),_0x29f5b5=_0xc4a899['mapper']['toViewPosition'](_0xd3c276);_0x9e5421['data']['isSuggestion']&&_0xc4a899['writer']['addClass']('ck-suggestion-marker-'+_0x438979+'-new',_0x11c81e),_0xf7ce51['activeChange']==_0x9e5421&&_0xc4a899['writer']['addClass']('ck-suggestion-marker--active',_0x11c81e),_0xc4a899['writer']['insert'](_0x29f5b5,_0x11c81e),_0xc4a899['mapper']['bindElementToMarker'](_0x11c81e,_0x190e88['markerName']);}_0x44ff51||_0x1623bc||!_0x57e4ec||_0x2b31d6(_0x57e4ec);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x1cd244,_0x39beb1,_0x3f4027)=>{const _0x3dc356=_0x3f4027['mapper']['markerNameToElements'](_0x39beb1['markerName']);if(_0x3dc356){for(const _0x4270cf of _0x3dc356)(_0x4270cf['hasClass']('ck-suggestion-marker-split')||_0x4270cf['hasClass']('ck-suggestion-marker-merge'))&&(_0x3f4027['mapper']['unbindElementFromMarkerName'](_0x4270cf,_0x39beb1['markerName']),_0x3f4027['writer']['remove'](_0x4270cf));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x5ccae4,_0x45af3b,_0x365178)=>{const _0x552300=_0x45af3b['markerName']['split'](':')[0x1],_0x251420=this['_getChangeFromId'](_0x552300);if(!_0x251420)return null;const _0x47b2aa='add'==_0x251420['type']?'split':'merge';if(_0x365178['consumable']['test'](_0x45af3b['markerRange'],_0x5ccae4['name']))for(const _0x589cc0 of _0x45af3b['markerRange']['getItems']()){if(!_0x589cc0['is']('element','softBreak'))continue;const _0x103745=_0x365178['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x47b2aa}),_0x9e35b2=_0x365178['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x589cc0));_0x251420['data']['isSuggestion']&&_0x365178['writer']['addClass']('ck-suggestion-marker-'+_0x47b2aa+'-new',_0x103745),this['activeChange']==_0x251420&&_0x365178['writer']['addClass']('ck-suggestion-marker--active',_0x103745),_0x365178['writer']['insert'](_0x9e35b2,_0x103745),_0x365178['mapper']['bindElementToMarker'](_0x103745,_0x45af3b['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x16ca66=>{for(const _0x40ea11 of this['editor']['model']['document']['getRootNames']()){const _0x243270=this['editor']['model']['document']['getRoot'](_0x40ea11),_0x4d5b1c=this['editor']['editing']['view']['document']['getRoot'](_0x40ea11);if(_0x4d5b1c){const _0x3cba0b=_0x243270['getAttribute']('revisionHistoryAttachChange');if(_0x16ca66['removeAttribute']('data-change-id',_0x4d5b1c),_0x16ca66['removeClass']('ck-revision-history-root-add',_0x4d5b1c),_0x16ca66['removeClass']('ck-revision-history-root-remove',_0x4d5b1c),_0x16ca66['removeClass']('ck-revision-history-root--active',_0x4d5b1c),_0x3cba0b){const _0x5996b6=this['_getChangeFromId'](_0x3cba0b);if(!_0x5996b6)return null;_0x16ca66['setAttribute']('data-change-id',_0x3cba0b,_0x4d5b1c),_0x16ca66['addClass']('ck-revision-history-root-'+_0x5996b6['type'],_0x4d5b1c),this['activeChange']==_0x5996b6&&_0x16ca66['addClass']('ck-revision-history-root--active',_0x4d5b1c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x243261=>'revision-comment:'+_0x243261,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x440712=>'revision-suggestion:'+_0x440712,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x1dd24f=>({'name':'suggestion:'+_0x1dd24f,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x19725b=>{const _0x42c429=_0x19725b['markerName']['split'](':')[0x1];return'insertion'!=_0x42c429&&'deletion'!=_0x42c429?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x42c429]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Q(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Q(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x4378df,_0x37ee89,_0x4b1a0f)=>{const _0x4addb5=_0x4b1a0f['mapper']['markerNameToElements'](_0x37ee89['markerName']);if(_0x4addb5){for(const _0x19c33c of _0x4addb5)_0x19c33c['is']('uiElement')&&(_0x4b1a0f['mapper']['unbindElementFromMarkerName'](_0x19c33c,_0x37ee89['markerName']),_0x4b1a0f['writer']['remove'](_0x19c33c));}},{'priority':'high'});}['_getChangeFromId'](_0x307d64){return this['_changeIdToChange']['get'](_0x307d64);}['_getViewForChange'](_0x2876b0){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x2876b0),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2755b5,_0xa01921,_0x7abbe8,_0x3728e3)=>{_0x3728e3&&this['_balloon']['remove'](_0x3728e3),_0x7abbe8&&(this['_balloon']['add']({'view':_0x7abbe8,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x3f28f3=this['editor']['editing'],_0x1718ad=this['_getChangeFromId'](_0x7abbe8['changeId']);let _0x2c6b9f;if(_0x1718ad['data']['isOnRoot']){const _0xf9dda3=_0x3f28f3['view']['getDomRoot'](_0x1718ad['rootName']);_0x2c6b9f=Array['from'](_0xf9dda3['getClientRects']());}else{const _0x4aaf09=this['editor']['model']['markers']['get']('revision:'+_0x7abbe8['changeId']);_0x2c6b9f=Array['from'](_0x3f28f3['mapper']['markerNameToElements'](_0x4aaf09['name']))['map'](_0x36d3b4=>_0x3f28f3['view']['domConverter']['mapViewToDom'](_0x36d3b4))['map'](_0x4a322d=>Array['from'](_0x4a322d['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x2c6b9f[0x0];return _0x2c6b9f['find'](_0x90f09c=>_0x90f09c['top']-0x3<=this['_activeViewTarget']['y']&&_0x90f09c['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x90f09c['left']-0x3<=this['_activeViewTarget']['x']&&_0x90f09c['right']+0x3>=this['_activeViewTarget']['x'])||_0x2c6b9f[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x58b0f8,_0x2c70cc,_0x2b922c,_0x491045)=>{this['activeView']=_0x2b922c?this['_getViewForChange'](_0x2b922c):null,this['editor']['model']['change'](()=>{const _0x125932=this['editor']['editing'];_0x491045&&(_0x491045['data']['isOnRoot']?_0x125932['view']['change'](_0xd60e31=>{_0xd60e31['removeClass']('ck-revision-history-root--active',_0x125932['view']['document']['getRoot'](_0x491045['rootName']));}):_0x125932['reconvertMarker']('revision:'+_0x491045['id'])),_0x2b922c&&(_0x2b922c['data']['isOnRoot']?_0x125932['view']['change'](_0x3009a1=>{_0x3009a1['addClass']('ck-revision-history-root--active',_0x125932['view']['document']['getRoot'](_0x2b922c['rootName']));}):_0x125932['reconvertMarker']('revision:'+_0x2b922c['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x29ae5d,_0x5261f8)=>{if(this['activeChange'])return;const _0x36af14=this['_findChangeIdFromDomTarget'](_0x5261f8['target']),_0x397622=this['_changeIdToChange']['get'](_0x36af14);_0x397622?(this['_activeViewTarget']={'x':_0x5261f8['domEvent']['x'],'y':_0x5261f8['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x397622)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x40a66c,_0x2b3570)=>{const _0x319bf5=this['_findChangeIdFromDomTarget'](_0x2b3570['target']),_0x148955=this['_changeIdToChange']['get'](_0x319bf5);_0x148955?(this['_activeViewTarget']={'x':_0x2b3570['domEvent']['x'],'y':_0x2b3570['domEvent']['y']},_0x148955===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x148955):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x27f3ad){do{const _0x39f48a=_0x27f3ad['getAttribute']('data-change-id');if(_0x39f48a)return _0x39f48a;_0x27f3ad=_0x27f3ad['parent'];}while(_0x27f3ad);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x36ba97=>{for(const _0x5e66df of this['editor']['model']['markers'])_0x36ba97['removeMarker'](_0x5e66df);});}}function Q(_0x22e5e1,_0x4b18f6){return(_0xa610b0,_0x227382,_0x3cddf0)=>{if(!_0x3cddf0['consumable']['test'](_0x227382['markerRange'],_0xa610b0['name']))return;const _0x50c9f2=_0x227382['markerRange']['getWalker'](),_0x1badd5=_0x227382['markerRange']['start'],_0x555d7f=_0x22e5e1['model']['schema'];let _0x58f04a=null,_0x46df8a=null,_0x570c2d=!0x1,_0x230be2=!0x1;for(const _0x49594a of _0x50c9f2){const _0x49698a=_0x49594a['item'];_0x570c2d=_0x570c2d||_0x555d7f['isContent'](_0x49698a);const _0x233cf2=_0x3cddf0['mapper']['toViewElement'](_0x49698a);if(_0x233cf2&&_0x233cf2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x49594a['type']&&(_0x555d7f['isBlock'](_0x49698a)&&!_0x555d7f['isLimit'](_0x49698a)&&(_0x49698a['nextSibling']||_0x1badd5['isAtEnd']?_0x58f04a&&_0x58f04a['parent']==_0x49698a||(_0x58f04a=_0x49698a,_0x3ac455(_0x49594a['previousPosition']),_0x230be2=!0x0):_0x46df8a=_0x46df8a||_0x49594a['previousPosition']));}function _0x3ac455(_0x54cae4){const _0x3753b6=_0x3cddf0['mapper']['toViewPosition'](_0x54cae4),_0x5823ed=_0x3cddf0['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x4b18f6});_0x3cddf0['writer']['insert'](_0x3753b6,_0x5823ed),_0x3cddf0['mapper']['bindElementToMarker'](_0x5823ed,_0x227382['markerName']);}_0x570c2d||_0x230be2||!_0x46df8a||_0x3ac455(_0x46df8a);};}class nt extends _0x1f906e{constructor(_0x265ffd){super(_0x265ffd);const _0x4efe27=_0x265ffd['plugins']['get'](l);this['affectsData']=!0x1,this['listenTo'](_0x4efe27,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4efe27,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x730243=this['editor'],_0x225909=_0x730243['plugins']['get'](l),_0x3c0a1c=_0x225909['isReady']?_0x225909['diff']['newRevisionId']:null;_0x730243['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3c0a1c);}['refresh'](){const {isReady:_0x20f3e1,isEnabled:_0x4084f5,repository:_0xe741ec,diff:_0x443c22}=this['editor']['plugins']['get'](l),_0x1906f8=_0x443c22&&_0xe741ec['getLaterVisibleRevision'](_0x443c22['newRevisionId']);this['isEnabled']=_0x20f3e1&&_0x4084f5&&Boolean(_0x1906f8);}}class rt extends _0x1f906e{['_step'];constructor(_0x322f29,{direction:_0x59fe14}){super(_0x322f29);const _0x5db134=_0x322f29['plugins']['get'](l);this['affectsData']=!0x1,this['_step']='forward'===_0x59fe14?0x1:-0x1,this['listenTo'](_0x5db134,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5db134,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x5db134,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x1f3f93=this['editor'],_0x531605=_0x1f3f93['plugins']['get'](l),{isNavigationMode:_0x8201f2,currentChangeNumber:_0x2058ba}=_0x531605;let _0x52b5e;if(_0x531605['activeChange']=_0x8201f2?_0x531605['diff']['changes']['get'](_0x2058ba+this['_step']):_0x531605['diff']['changes']['first'],_0x531605['activeChange']['data']['isOnRoot'])_0x52b5e=_0x1f3f93['editing']['view']['getDomRoot'](_0x531605['activeChange']['rootName']);else{const _0x1f59e0=_0x1f3f93['model']['markers']['get']('revision:'+_0x531605['activeChange']['id']);_0x52b5e=_0xc7e12a(_0x1f3f93['editing'],_0x1f59e0);}_0x2f138e({'target':_0x52b5e,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x4a4d46,currentChangeNumber:_0x47e45f,numberOfChanges:_0x1d2fbe,isReady:_0x588efc,isEnabled:_0x56313c}=this['editor']['plugins']['get'](l);this['isEnabled']=!!(_0x56313c&&_0x588efc&&_0x1d2fbe)&&(!_0x4a4d46||(0x1===this['_step']?_0x47e45f<_0x1d2fbe-0x1:_0x47e45f>0x0));}}class Ri extends _0x5c6cf3{constructor(_0x93dceb){super(_0x93dceb);const _0x274693=this['bindTemplate'],_0x5f3c51=new _0x34a99f(_0x93dceb),_0x4ded93=new _0x34a99f(_0x93dceb);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',(_0xd45895,_0x4e5dc9)=>_0xd45895&&_0x4e5dc9>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x1b2542,_0x11ebf1,_0xa172bc,_0x42065b)=>{if(!_0x1b2542)return R(_0x93dceb,'Loading...');if(!_0xa172bc)return R(_0x93dceb,'No\x20changes');const _0x87ffc8=R(_0x93dceb,'NUMBER_OF_CHANGES',_0xa172bc);return _0x42065b?R(_0x93dceb,'X_OF_Y_CHANGES',[_0x11ebf1+0x1,_0xa172bc]):_0x87ffc8;}),_0x5f3c51['set']({'label':R(_0x93dceb,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x3c361e}),_0x4ded93['set']({'label':R(_0x93dceb,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x154cbb}),_0x5f3c51['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4ded93['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x5f3c51['on']('execute',()=>this['fire']('execute','backward')),_0x4ded93['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',_0x274693['if']('_isStatusLabelVisible','ck-hidden',_0x22c519=>!_0x22c519)]},'children':[{'text':_0x274693['to']('isNavigationMode',_0x1430a6=>_0x1430a6?R(_0x93dceb,'EDIT_X_OF_Y_REVISIONS')+':\x20':R(_0x93dceb,'Total')+':\x20')}]},{'text':_0x274693['to']('_statusText')}]},new _0x3f134a(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x5f3c51,_0x4ded93]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x3bfb25{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x2bd1c7=this['editor']['editing']['view'];_0x2bd1c7['change'](_0x371097=>{for(const _0x5441c0 of _0x2bd1c7['document']['roots'])_0x371097['addClass'](ge,_0x5441c0);});}['hide'](){const _0x13cf21=this['editor']['editing']['view'];_0x13cf21['change'](_0x2a24ca=>{for(const _0x5485dd of _0x13cf21['document']['roots'])_0x2a24ca['removeClass'](ge,_0x5485dd);});}}class u extends _0x3bfb25{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l,ji];}['init'](){const _0xeeccfd=this['editor'],_0x1607c0=_0xeeccfd['plugins']['get'](l),_0x22c8d6=_0xeeccfd['plugins']['get'](ji);_0xeeccfd['ui']['componentFactory']['add']('exitToEditing',_0x4f818d=>{const _0x5925ed=new _0x34a99f(_0x4f818d);return _0x5925ed['set']({'label':R(_0x4f818d,'Back\x20to\x20editing'),'icon':_0x71fdb7,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5925ed,'execute',()=>{_0xeeccfd['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5925ed;}),_0xeeccfd['ui']['componentFactory']['add']('restoreRevision',_0x143db8=>{const _0x3190ba=new _0x34a99f(_0x143db8);return _0x3190ba['set']({'label':R(_0x143db8,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x3190ba['bind']('isEnabled')['to'](_0xeeccfd['commands']['get']('restoreRevision')),this['listenTo'](_0x3190ba,'execute',()=>_0xeeccfd['execute']('restoreRevision')),_0x3190ba;}),_0xeeccfd['ui']['componentFactory']['add']('changesNavigation',_0x906390=>{const _0xdbda4d=new Ri(_0x906390),_0x456f33=_0xeeccfd['commands']['get']('showPreviousChange'),_0x54d182=_0xeeccfd['commands']['get']('showNextChange');return _0xdbda4d['bind']('isBackwardNavigationEnabled')['to'](_0x456f33,'isEnabled'),_0xdbda4d['bind']('isForwardNavigationEnabled')['to'](_0x54d182,'isEnabled'),_0xdbda4d['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x1607c0),this['listenTo'](_0xdbda4d,'execute',(_0x56020b,_0x3123c1)=>{_0xeeccfd['execute']('forward'===_0x3123c1?'showNextChange':'showPreviousChange');}),_0xdbda4d;}),_0x22c8d6['show'](),_0x1607c0['on']('change:isReady',(_0x94aeb6,_0x4021cf,_0x5f5d07)=>{_0x5f5d07?_0x22c8d6['hide']():_0x22c8d6['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x54db2e,_0x197637){super(_0x54db2e,_0x197637);const _0x285034=this['bindTemplate'];this['set']({'label':R(_0x54db2e,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=R(_0x54db2e,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x285034['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new ot(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x41118a=this['fieldView']['element'];this['_tooltipString']=_0x41118a['scrollWidth']>_0x41118a['clientWidth']&&_0x41118a['value']||'';}}class ni extends _0x5c6cf3{constructor(_0xf680f,_0x5d3789,_0x41fba1){super(_0xf680f);const _0xc7c9ea=new _0x53578d();_0xc7c9ea['set']({'content':_0x158c52,'viewBox':'0\x200\x2011\x2010'});const _0x3f7981=['ck','ck-revision-history-sidebar__revision-author'];_0x41fba1&&_0x3f7981['push']('ck-revision-history-sidebar__revision-author_creator');const _0x101ec5=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':R(_0xf680f,_0x41fba1?'Revision\x20creator':'Revision\x20author')},'children':[_0xc7c9ea,_0x5d3789['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x3f7981},'children':_0x101ec5});}}function ci(_0x2235b6,_0x386087){const _0x1c7e74=_0x2235b6['bindTemplate'],_0x580029=_0x2235b6['locale'],_0x587635=_0x5e5960(_0x580029);_0x587635['panelPosition']='sw';const _0x18a691=function(_0x514360,_0x24564b){const _0x47879e=function(_0x370449,_0x2b16be){const _0x783c2a=_0x370449['locale'],_0x556b13={'Compare\x20against\x20selected':R(_0x783c2a,'Compare\x20against\x20selected'),'Name\x20this\x20revision':R(_0x783c2a,'Name\x20this\x20revision'),'Restore\x20this\x20revision':R(_0x783c2a,'Restore\x20this\x20revision')};return _0x2b16be['map'](_0x47ceeb=>{const _0x851d87=_0x556b13[_0x47ceeb['name']];return _0x851d87&&_0x851d87!==_0x47ceeb['name']&&(_0x47ceeb['name']=_0x851d87),_0x47ceeb;});}(_0x514360,_0x24564b),_0x1672fe=new _0x5b144d();for(const _0x273b48 of _0x47879e){const _0x61f808={'type':'button','model':new to({'label':_0x273b48['name'],'class':_0x273b48['class'],'withText':!0x0,'role':'menuitem','_action':_0x273b48['action']})};_0x61f808['model']['bind']('isEnabled')['to'](_0x514360,'isActionsDropdownOpen',_0x613f49=>'function'!=typeof _0x273b48['isEnabled']||(!_0x613f49||_0x273b48['isEnabled'](_0x514360))),_0x1672fe['add'](_0x61f808);}return _0x1672fe;}(_0x2235b6,_0x386087);return _0x2235b6['bind']('isActionsDropdownOpen')['to'](_0x587635,'isOpen'),_0x587635['buttonView']['set']({'label':R(_0x580029,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x1f2b60}),_0x587635['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1c7e74['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1c7e74['to'](_0x5a8c1e=>_0x5a8c1e['stopPropagation']())}}),_0x587635['on']('execute',_0x5385f4=>{_0x2235b6['isReady']&&'function'==typeof _0x5385f4['source']['_action']&&_0x5385f4['source']['_action'](_0x2235b6);}),_0x44bbc5(_0x587635,_0x18a691,{'role':'menu'}),_0x587635['listenTo'](_0x2235b6,'change:isActionsDropdownOpen',(_0x13d2b5,_0x378e42,_0x53f5fb)=>{if(_0x53f5fb)for(const _0x5bdf7a of _0x587635['listView']['items']){const _0x1dd6d5=_0x5bdf7a['children']['first'],_0xf2a2c=_0x386087['find'](_0x373d2b=>_0x373d2b['action']===_0x1dd6d5['_action'])['isVisible'];_0x5bdf7a['isVisible']=void 0x0===_0xf2a2c||_0xf2a2c(_0x2235b6);}}),_0x587635;}class _i extends/* #__PURE__ -- @preserve */
27
+ _0x5055ee(_0x5c6cf3){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x534787,_0x3b2bfa,_0x1f5a97,_0x5df14e){super(_0x534787);const _0x5d9016=this['bindTemplate'],_0x1d1ffa=function(_0x384460,_0x55b0f9){const _0x518ee5=Array['from'](_0x55b0f9['authors'])['filter'](_0x4d7d8b=>_0x4d7d8b!=_0x55b0f9['creator']);return _0x55b0f9['creator']&&_0x518ee5['unshift'](_0x55b0f9['creator']),_0x518ee5['map'](_0x5300a7=>new ni(_0x384460,_0x5300a7,_0x5300a7==_0x55b0f9['creator']));}(_0x534787,_0x3b2bfa);this['id']=_0x3b2bfa['id'],this['_revision']=_0x3b2bfa,this['_requireRevisionName']=_0x5df14e,this['bind']('name','createdAt')['to'](_0x3b2bfa),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x2bdcfb=>{return _0x219564=_0x534787['uiLanguage'],(_0x352a10=_0x2bdcfb)['toLocaleDateString'](_0x219564,{'month':'long','day':'numeric'})+',\x20'+_0x352a10['toLocaleTimeString'](_0x219564,{'hour':'numeric','minute':'numeric'});var _0x219564,_0x352a10;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x534787,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x330f6b=>_0x330f6b||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x34da35,_0x21ac7a)=>_0x34da35&&_0x21ac7a),this['revisionActionsView']=_0x1f5a97&&_0x1f5a97['length']?ci(this,_0x1f5a97):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x5d9016['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x5d9016['if']('isEnabled','ck-disabled',_0x538ee4=>!_0x538ee4),_0x5d9016['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x5d9016['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x5d9016['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':_0x5d9016['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':_0x1d1ffa}]},this['revisionActionsView']],'on':{'click':_0x5d9016['to'](_0x1c763a=>{_0x1c763a['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x2db396=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x2db396,'change',()=>{this['_requireRevisionName']&&!_0x2db396['value']||this['fire']('setName',{'id':this['id'],'name':_0x2db396['value']}),_0x2db396['value']||(_0x2db396['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function li(_0xf9d0d0,_0x5b4e39){const _0x13cc8e=_0x5b77d2['fromJSDate'](_0xf9d0d0)['setLocale'](_0x5b4e39),_0x4ba1f7=_0x5b77d2['local'](),_0x1545a0=_0x4ba1f7['minus']({'days':0x1})['startOf']('day');let _0x512b8c,_0xbdc212;return _0x13cc8e['hasSame'](_0x4ba1f7,'day')?(_0x512b8c=_0x13cc8e['startOf']('day')['toJSDate'](),_0xbdc212=_0x13cc8e['toRelativeCalendar']()):_0x13cc8e['hasSame'](_0x1545a0,'day')?(_0x512b8c=_0x1545a0['toJSDate'](),_0xbdc212=_0x13cc8e['toRelativeCalendar']()):_0x13cc8e['hasSame'](_0x4ba1f7,'week')?(_0x512b8c=_0x13cc8e['startOf']('week')['toJSDate'](),_0xbdc212=_0x13cc8e['weekdayLong']||''):_0x13cc8e['hasSame'](_0x4ba1f7,'year')?(_0x512b8c=_0x13cc8e['startOf']('month')['toJSDate'](),_0xbdc212=_0x13cc8e['monthLong']||''):(_0x512b8c=_0x13cc8e['startOf']('year')['toJSDate'](),_0xbdc212=String(_0x13cc8e['year'])),{'startDate':_0x512b8c,'localizedPeriodName':_0xbdc212};}class bi extends _0x5c6cf3{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2ee16a,_0x40fa9c,_0x36c133,_0x4b141d){super(_0x2ee16a);const _0x38e302=li(_0x40fa9c,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x40fa9c,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x36c133,this['_requireRevisionName']=_0x4b141d,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':_0x38e302}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x18de57){const _0x21eacf=new _i(this['locale'],_0x18de57,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x21eacf);}['removeRevision'](_0x421410){const _0xe71527=this['revisionViews']['find'](_0x3ae94d=>_0x3ae94d['id']===_0x421410['id']);this['revisionViews']['remove'](_0xe71527);}}class fi extends _0x5c6cf3{constructor(_0x4dd4f9){super(_0x4dd4f9);const _0x9512b8=new _0x53578d();_0x9512b8['content']=_0x2b1ca7,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x9512b8,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[R(_0x4dd4f9,'Revision\x20history')]}]});}}class di extends _0x5c6cf3{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1ed6eb,_0x1835a6,_0x241356,_0x3a8a82){super(_0x1ed6eb);const _0x21776e=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x1835a6,this['_revisionActions']=_0x241356,this['_requireRevisionName']=_0x3a8a82,this['on']('select',(_0x55ba4f,_0x598f99)=>{this['fire']('revisionSelected',_0x598f99);}),this['on']('setName',(_0xddd4f3,_0x12b90d)=>{this['fire']('revisionSetName',_0x12b90d);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x1ed6eb),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x21776e['if']('isEnabled','ck-disabled',_0x85151e=>!_0x85151e)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0xe87e32 of this['_revisions'])this['_addRevision'](_0xe87e32);this['_revisions']['on']('add',(_0x526534,_0x4890fc)=>{this['_addRevision'](_0x4890fc);}),this['_revisions']['on']('remove',(_0x5e4e94,_0x5f3e54)=>{this['_removeRevision'](_0x5f3e54);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x118e20=>_0x118e20['revisionViews']['map'](_0x292f6a=>_0x292f6a))['flat']();}['selectRevision'](_0x756636){for(const _0x51ff93 of this['revisionViews'])_0x756636&&_0x756636['id']===_0x51ff93['id']?_0x51ff93['select']():_0x51ff93['deselect']();}['highlightRevisions'](_0x27552f){for(const _0x398796 of this['revisionViews'])_0x27552f['some'](({id:_0x20d349})=>_0x20d349===_0x398796['id'])?_0x398796['highlight']():_0x398796['unhighlight']();}['_addRevision'](_0x45f50a){const _0x54496d=li(_0x45f50a['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0xd07a98=this['timePeriodViews']['get'](0x0);_0xd07a98&&_0xd07a98['startDate']['getTime']()===_0x54496d['getTime']()||(_0xd07a98=new bi(this['locale'],_0x54496d,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0xd07a98)),_0xd07a98['addRevision'](_0x45f50a);}['_removeRevision'](_0x38151c){const _0xed5333=li(_0x38151c['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xed5333)['removeRevision'](_0x38151c);}['_getTimePeriodViewByStartDate'](_0x4eac0c){return this['timePeriodViews']['find'](_0x2b6b21=>_0x2b6b21['startDate']['getTime']()===_0x4eac0c['getTime']());}}class f extends _0x3bfb25{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
28
28
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
29
- rt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(_0xd1e7f1){super(_0xd1e7f1),this['_revisionViewer']=_0xd1e7f1['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1191d0=this['_revisionsRepository']['_revisions'],_0xcd5777=this['_createRevisionActions'](),_0x2db32c=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ai(this['editor']['locale'],_0x1191d0,_0xcd5777,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',(_0x3bb8bc,_0x140481)=>{_0x140481['revisionViews']['on']('add',(_0x468d92,_0x29a4cf)=>{_0x29a4cf['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)),_0x2db32c['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x373935=this['_revisionsRepository']['getRevision'](0x0);if(_0x373935){const _0x4207ae=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x373935['id']);this['_revisionViewer']['compare'](_0x373935,_0x4207ae);}}['_handleRevisionSelected'](_0x2568ef,_0x4af589){const _0x59559d=this['_revisionsRepository']['getRevision'](_0x4af589['id']),_0x445103=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x59559d['id']);this['_revisionViewer']['compare'](_0x59559d,_0x445103);}['_handleRevisionSetName'](_0x114eca,_0x16a0a3){this['_revisionsRepository']['getRevision'](_0x16a0a3['id'])['setName'](_0x16a0a3['name']);}['_handleDiffChange'](_0x5b647d,_0x55205d,_0x533292){const _0x29eafd=this['_revisionsRepository']['getRevisionsInDiff'](_0x533292);_0x29eafd['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x29eafd),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x29eafd[0x0]));}['_createRevisionActions'](){const _0x33ee96=this['editor'],_0x3e30a3=f['availableRevisionActions'],_0x22cb88=_0x33ee96['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0x22cb88['length'])return _0x22cb88['map'](_0xcb3ff2=>{const _0x162ad9='string'==typeof _0xcb3ff2?Object['assign']({},_0x3e30a3[_0xcb3ff2]):_0xcb3ff2;return _0x162ad9['action']=_0x162ad9['action']['bind'](this,_0x33ee96),_0x162ad9['isVisible']&&(_0x162ad9['isVisible']=_0x162ad9['isVisible']['bind'](this,_0x33ee96)),_0x162ad9;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1da162},_0x2e2cc8)=>{const _0x4cb7e3=_0x1da162['get'](l),_0x1ceb5f=_0x4cb7e3['repository'];let _0x5d8c4c=_0x4cb7e3['diff']['newRevisionId'],_0x29aea5=_0x2e2cc8['id'];_0x1ceb5f['getIndex'](_0x5d8c4c)>_0x1ceb5f['getIndex'](_0x29aea5)&&([_0x5d8c4c,_0x29aea5]=[_0x29aea5,_0x5d8c4c]),_0x4cb7e3['compare'](_0x5d8c4c,_0x29aea5);},'isVisible':({plugins:_0x5b23ad},_0x4d9ca0)=>{const _0x3e155d=_0x5b23ad['get'](l);return!(_0x3e155d['repository']['getRevisionsInDiff'](_0x3e155d['diff'])['length']>0x2)&&!_0x4d9ca0['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0xa7fc30,{id:_0x26a9b})=>{_0xa7fc30['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x26a9b);},'isVisible':({plugins:_0x1b930f},_0x74e357)=>!!_0x1b930f['get'](l)['repository']['getLaterVisibleRevision'](_0x74e357['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x42eedc},{id:_0x3d5a59,revisionNameView:_0x17e534})=>{const _0x22a19d=_0x42eedc['get'](l),_0x202fb0=_0x22a19d['repository']['getEarlierVisibleRevision'](_0x3d5a59);_0x22a19d['compare'](_0x3d5a59,_0x202fb0),_0x17e534['focus'](),_0x17e534['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x359602,_0xaf70e1){super(_0x359602),this['_view']=_0xaf70e1,this['_toolbarConfig']=st(_0x359602['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0xc75877){const _0xe23379=this['editor'],_0x33de56=this['view'],_0xff4bcf=_0xe23379['editing']['view'],_0x303f09=_0x33de56['editable'],_0x5ce07d=_0xff4bcf['document']['getRoot']();_0x303f09['name']=_0x5ce07d['rootName'],_0x33de56['render']();const _0x588281=_0x303f09['element'];this['setEditableElement'](_0x303f09['name'],_0x588281),_0x33de56['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xff4bcf['attachDomRoot'](_0x588281),this['_elementReplacer']['replace'](_0xc75877,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x18c1b6=this['view'],_0x4b4646=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4b4646['detachDomRoot'](_0x18c1b6['editable']['name']),_0x18c1b6['destroy']();}['_initToolbar'](){const _0x4e0fdf=this['view'];_0x4e0fdf['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x4e0fdf['stickyPanel']['limiterElement']=_0x4e0fdf['element'],_0x4e0fdf['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x2381f1})=>_0x2381f1),_0x4e0fdf['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x4e0fdf['toolbar']);}}class ii extends _0xe4dc5f{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x431a0e,_0x3106f5,_0x3ef071={}){super(_0x431a0e),this['stickyPanel']=new _0x22a7d6(_0x431a0e),this['toolbar']=new _0xdfb049(_0x431a0e,{'shouldGroupWhenFull':_0x3ef071['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x431a0e,_0x3106f5);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class m extends/* #__PURE__ -- @preserve */
30
- _0x4f81ca(_0x6899c6){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x393ed3,_0x46b0bb){super(_0x46b0bb),this['sourceElement']=_0x393ed3,this['model']['document']['createRoot']();const _0x2ab381=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x2ab381);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x1fc060,_0x1c416d){const _0x3fae86=new this(_0x1fc060,_0x1c416d);return await _0x3fae86['initPlugins'](),await _0x3fae86['ui']['init'](_0x1fc060),await _0x3fae86['data']['init'](_0x3fae86['config']['get']('initialData')||''),_0x3fae86['fire']('ready'),_0x3fae86;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class at extends _0x1b0770{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x575111){function _0x54fcc8(_0x34ea87){return _0x34ea87['map'](_0x31217d=>String['fromCharCode'](_0x31217d))['join']('');}super(_0x575111),this['result']='end',_0x575111[_0x54fcc8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x54fcc8([0x76,0x69,0x65,0x77])][_0x54fcc8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x54fcc8([0x61,0x75,0x74,0x6f]),_0x575111[_0x54fcc8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x54fcc8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x54fcc8([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x54fcc8([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x54fcc8([0x6f,0x6b])});}}class ht extends _0x1b0770{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x414811){if(super(_0x414811),!this['editor']['config']['get']('revisionHistory'))throw new _0x445621('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xfbed53=>this['_showRevisionViewer']({..._0xfbed53,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2ee3b6=>this['_closeRevisionViewer'](_0x2ee3b6)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x8baf4b=>this['_restoreRevision'](_0x8baf4b)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x223e16){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x223e16;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x35c915){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x35c915);}['getRevision'](_0x258143){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x258143);}['getRevisions'](_0x452dc6){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x452dc6||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x379a00=this['editor'],_0x571a4b=_0x2fc667(_0x379a00,d),_0x5d7184=_0x379a00['plugins']['get']('RevisionTracker'),_0x35b2f6=_0x379a00['plugins']['get']('Users')['users'];return _0x571a4b['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x571a4b['lazyRoots'],(_0x571a4b['plugins']['push'](at,l,u,class extends _0x1b0770{static get['requires'](){return[l,'Users'];}['init'](){const _0x3e88d8=this['editor']['plugins']['get']('Users');for(const _0x1aeb21 of _0x35b2f6)_0x1aeb21['isAnonymous']||_0x3e88d8['getUser'](_0x1aeb21['id'])||_0x3e88d8['addUser'](_0x1aeb21);const _0x35a6cb=_0x5d7184['repository']['getRevisions']();let _0x4e313d=null;const _0x364c54=this['editor']['plugins']['get']('RevisionViewer');_0x364c54['adapter']=_0x5d7184['adapter'],_0x364c54['bind']('isEnabled')['to'](_0x5d7184),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x379a00,'isReadOnly',_0x3cc9d7=>!_0x3cc9d7);for(const _0x5f79f8 of _0x35a6cb){const _0x84b42b=null===_0x5f79f8['creator'];if(_0x84b42b&&_0x5f79f8['toVersion']===_0x5f79f8['fromVersion'])continue;const _0x2acda8=_0x5f79f8['toJSON']();_0x364c54['addRevisionData'](_0x2acda8,(_0x4329de,_0xe17cdf,_0x511e99)=>{if(_0x84b42b){if(_0x4e313d)_0x4e313d['_update'](_0x4329de,_0xe17cdf);else{if(!_0xe17cdf){const _0x2a5f5f=_0x511e99['toJSON']();_0x2a5f5f['id']=_0x110b69(),_0x5d7184['saveRevision'](_0x2a5f5f,_0x511e99['toVersion'])['then'](_0x2f83ab=>{_0x4e313d=_0x2f83ab;});}}}else _0x5f79f8['_update'](_0x4329de,_0xe17cdf);});}}},f),_0x571a4b);}['_enhanceShowRevisionViewerCallback'](){const _0x2e324d=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x294e91=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x12f66d=this['editor']['plugins']['get']('Autosave');await _0x12f66d['save']();}else await _0x294e91['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x244fd7=this['editor']['plugins']['get']('Dialog');_0x244fd7['isOpen']&&_0x244fd7['hide']();}const _0x544d16=this['_getRevisionViewerEditorConfig']();return _0x2e324d(_0x544d16)['then'](_0x2799c3=>{return(this['_viewerEditor']=_0x2799c3,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'),_0x2799c3);})['catch'](_0x42d96b=>(console['error'](_0x42d96b),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x18e4d3=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'](),_0x18e4d3(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x5264df=this['editor']['plugins']['get']('Annotations');_0x5264df['refreshVisibility'](),_0x5264df['refreshPositioning']();}})));}['_showRevisionViewer'](_0x2f82aa){const _0x5f21d7=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x37cbe4=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1ba222=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x1ba222,_0x2f82aa)['then'](_0x4c0e51=>(_0x37cbe4['style']['display']='block',_0x5f21d7['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x4c0e51));}['_closeRevisionViewer'](_0x1bfda0){const _0x53a45e=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x53a45e['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x1bfda0['destroy']();}async['_restoreRevision'](_0x5e4652){const _0x2e86e7=this['editor'],_0x336b69=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x35d5e9=_0x2e86e7['plugins']['get']('RevisionTracker'),_0xd36653=_0x2e86e7['plugins']['get']('RevisionHistoryUtils'),_0x14ce53=_0x336b69['repository']['getRevision'](_0x5e4652);let _0x21df70,_0x1413c0,_0x244120;try{await _0xd36653['loadRevisionData'](_0x14ce53,this['adapter']),_0x21df70=_0xd36653['getRevisionDocumentData'](_0x14ce53),_0x1413c0=_0xd36653['getRevisionRootsAttributes'](_0x14ce53);}catch(_0x548c0c){return void console['error'](_0x548c0c);}_0x2e86e7['model']['change'](_0x35dc7c=>{for(const _0x22712a of Array['from'](_0x2e86e7['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x35dc7c['removeMarker'](_0x22712a);}),_0x336b69['isReady']=!0x1,_0x2e86e7['model']['enqueueChange'](_0x48cea0=>{_0x48cea0['setSelection'](null),_0x48cea0['removeSelectionAttribute'](_0x2e86e7['model']['document']['selection']['getAttributeKeys']());const _0x11db89=Object['keys'](_0x21df70);for(const _0x40d53d of _0x2e86e7['model']['document']['roots'])'$graveyard'!=_0x40d53d['rootName']&&_0x40d53d['isAttached']()&&!_0x11db89['includes'](_0x40d53d['rootName'])&&_0x48cea0['detachRoot'](_0x40d53d);for(const _0x2096ed of _0x11db89){let _0x564a7b=_0x2e86e7['model']['document']['getRoot'](_0x2096ed);_0x564a7b&&_0x564a7b['isAttached']()||(_0x564a7b=_0x48cea0['addRoot'](_0x2096ed));const _0x132209=_0x1413c0[_0x2096ed],_0x5f0952=Object['keys'](_0x132209),_0x593036=_0x21df70[_0x2096ed];for(const _0x16e995 of _0x564a7b['getAttributeKeys']())_0x5f0952['includes'](_0x16e995)||_0x48cea0['removeAttribute'](_0x16e995,_0x564a7b);for(const _0x26b7f0 of _0x5f0952)_0x48cea0['setAttribute'](_0x26b7f0,_0x1413c0[_0x2096ed][_0x26b7f0],_0x564a7b);_0x48cea0['remove'](_0x48cea0['createRangeIn'](_0x564a7b)),_0x48cea0['insert'](_0x2e86e7['data']['parse'](_0x593036,_0x564a7b),_0x564a7b,0x0);}});const _0x5cacbf=R(_0x2e86e7['locale'],'Restored');if(_0x14ce53['name'])_0x244120=-0x1==_0x14ce53['name']['indexOf'](_0x5cacbf)?_0x5cacbf+':\x20'+_0x14ce53['name']:_0x14ce53['name'];else _0x244120=_0x5cacbf+':\x20'+(_0x14ce53['createdAt']['toLocaleDateString'](_0x2e86e7['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x14ce53['createdAt']['toLocaleTimeString'](_0x2e86e7['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x35d5e9['saveRevision']({'name':_0x244120}),_0x336b69['isReady']=!0x0,_0x2e86e7['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,fi as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,ot as ShowChangeCommand};
29
+ at();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[l];}constructor(_0x199d55){super(_0x199d55),this['_revisionViewer']=_0x199d55['plugins']['get'](l),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1a2914=this['_revisionsRepository']['_revisions'],_0x260426=this['_createRevisionActions'](),_0x54f11a=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x1a2914,_0x260426,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',(_0x2bc43b,_0x561e7d)=>{_0x561e7d['revisionViews']['on']('add',(_0x3aea91,_0x251a28)=>{_0x251a28['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)),_0x54f11a['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x341ad6=this['_revisionsRepository']['getRevision'](0x0);if(_0x341ad6){const _0x55373b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x341ad6['id']);this['_revisionViewer']['compare'](_0x341ad6,_0x55373b);}}['_handleRevisionSelected'](_0x40e055,_0x18f723){const _0x1da8a1=this['_revisionsRepository']['getRevision'](_0x18f723['id']),_0x585c53=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x1da8a1['id']);this['_revisionViewer']['compare'](_0x1da8a1,_0x585c53);}['_handleRevisionSetName'](_0x155d88,_0xd6dd34){this['_revisionsRepository']['getRevision'](_0xd6dd34['id'])['setName'](_0xd6dd34['name']);}['_handleDiffChange'](_0x3b626c,_0x61d87e,_0x31d05f){const _0x538587=this['_revisionsRepository']['getRevisionsInDiff'](_0x31d05f);_0x538587['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x538587),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x538587[0x0]));}['_createRevisionActions'](){const _0x4831f6=this['editor'],_0x191329=f['availableRevisionActions'],_0x538f6a=_0x4831f6['config']['get']('revisionHistory.revisionActions')||f['defaultRevisionActions'];if(_0x538f6a['length'])return _0x538f6a['map'](_0x4c67b0=>{const _0x178535='string'==typeof _0x4c67b0?Object['assign']({},_0x191329[_0x4c67b0]):_0x4c67b0;return _0x178535['action']=_0x178535['action']['bind'](this,_0x4831f6),_0x178535['isVisible']&&(_0x178535['isVisible']=_0x178535['isVisible']['bind'](this,_0x4831f6)),_0x178535;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x53388d},_0x52f7a8)=>{const _0x1a0953=_0x53388d['get'](l),_0x9be95f=_0x1a0953['repository'];let _0x4a2a48=_0x1a0953['diff']['newRevisionId'],_0x10ee01=_0x52f7a8['id'];_0x9be95f['getIndex'](_0x4a2a48)>_0x9be95f['getIndex'](_0x10ee01)&&([_0x4a2a48,_0x10ee01]=[_0x10ee01,_0x4a2a48]),_0x1a0953['compare'](_0x4a2a48,_0x10ee01);},'isVisible':({plugins:_0x5e0beb},_0x1d859d)=>{const _0x313e30=_0x5e0beb['get'](l);return!(_0x313e30['repository']['getRevisionsInDiff'](_0x313e30['diff'])['length']>0x2)&&!_0x1d859d['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x2d9391,{id:_0x1d7ea3})=>{_0x2d9391['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1d7ea3);},'isVisible':({plugins:_0x2b9ed1},_0x4733a8)=>!!_0x2b9ed1['get'](l)['repository']['getLaterVisibleRevision'](_0x4733a8['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x3e2734},{id:_0x1b1ce7,revisionNameView:_0x6feca1})=>{const _0xbab9be=_0x3e2734['get'](l),_0x2bbb0c=_0xbab9be['repository']['getEarlierVisibleRevision'](_0x1b1ce7);_0xbab9be['compare'](_0x1b1ce7,_0x2bbb0c),_0x6feca1['focus'](),_0x6feca1['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0xb127e2,_0x4b23c6){super(_0xb127e2),this['_view']=_0x4b23c6,this['_toolbarConfig']=st(_0xb127e2['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x35a5bf){const _0x4a46d3=this['editor'],_0x136b90=this['view'],_0x22029d=_0x4a46d3['editing']['view'],_0x4dc11c=_0x136b90['editable'],_0x2a71f2=_0x22029d['document']['getRoot']();_0x4dc11c['name']=_0x2a71f2['rootName'],_0x136b90['render']();const _0x488e06=_0x4dc11c['element'];this['setEditableElement'](_0x4dc11c['name'],_0x488e06),_0x136b90['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x22029d['attachDomRoot'](_0x488e06),this['_elementReplacer']['replace'](_0x35a5bf,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x5945af=this['view'],_0x213201=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x213201['detachDomRoot'](_0x5945af['editable']['name']),_0x5945af['destroy']();}['_initToolbar'](){const _0x19e742=this['view'];_0x19e742['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x19e742['stickyPanel']['limiterElement']=_0x19e742['element'],_0x19e742['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x379a7b})=>_0x379a7b),_0x19e742['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x19e742['toolbar']);}}class ii extends _0x4f5a7d{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x1fd6f7,_0x527005,_0x52bbca={}){super(_0x1fd6f7),this['stickyPanel']=new _0x1112ca(_0x1fd6f7),this['toolbar']=new _0xf5c709(_0x1fd6f7,{'shouldGroupWhenFull':_0x52bbca['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x1fd6f7,_0x527005);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class m extends/* #__PURE__ -- @preserve */
30
+ _0x5c3470(_0x252f0a){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x42a465,_0x1cf8fd){super(_0x1cf8fd),this['sourceElement']=_0x42a465,this['model']['document']['createRoot']();const _0x12d106=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x12d106);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x230898,_0xbe4fbc){const _0x16ec73=new this(_0x230898,_0xbe4fbc);return await _0x16ec73['initPlugins'](),await _0x16ec73['ui']['init'](_0x230898),await _0x16ec73['data']['init'](_0x16ec73['config']['get']('initialData')||''),_0x16ec73['fire']('ready'),_0x16ec73;}}const d=['RevisionHistoryUI','RestrictedEditingMode'];class ht extends _0x3bfb25{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34e170){function _0x359016(_0x32b772){return _0x32b772['map'](_0xac06c6=>String['fromCharCode'](_0xac06c6))['join']('');}super(_0x34e170),this['result']='end',_0x34e170[_0x359016([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x359016([0x76,0x69,0x65,0x77])][_0x359016([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x359016([0x61,0x75,0x74,0x6f]),_0x34e170[_0x359016([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x359016([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x359016([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x359016([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x359016([0x6f,0x6b])});}}class ct extends _0x3bfb25{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,v];}constructor(_0x25d4a1){if(super(_0x25d4a1),!this['editor']['config']['get']('revisionHistory'))throw new _0x268673('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x246604=>this['_showRevisionViewer']({..._0x246604,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x102d95=>this['_closeRevisionViewer'](_0x102d95)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x40694c=>this['_restoreRevision'](_0x40694c)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x47c9f6){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x47c9f6;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x441ee9){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x441ee9);}['getRevision'](_0x28baa8){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x28baa8);}['getRevisions'](_0x544319){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x544319||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4806fe=this['editor'],_0x51d644=_0x57058d(_0x4806fe,d),_0x1ac302=_0x4806fe['plugins']['get']('RevisionTracker'),_0x1c256c=_0x4806fe['plugins']['get']('Users')['users'];return _0x51d644['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x51d644['lazyRoots'],(_0x51d644['plugins']['push'](ht,l,u,class extends _0x3bfb25{static get['requires'](){return[l,'Users'];}['init'](){const _0x3380bf=this['editor']['plugins']['get']('Users');for(const _0x29a884 of _0x1c256c)_0x29a884['isAnonymous']||_0x3380bf['getUser'](_0x29a884['id'])||_0x3380bf['addUser'](_0x29a884);const _0x2d97ee=_0x1ac302['repository']['getRevisions']();let _0x4b4f88=null;const _0x4acbf3=this['editor']['plugins']['get']('RevisionViewer');_0x4acbf3['adapter']=_0x1ac302['adapter'],_0x4acbf3['bind']('isEnabled')['to'](_0x1ac302),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4806fe,'isReadOnly',_0x4d3343=>!_0x4d3343);for(const _0xab4f4d of _0x2d97ee){const _0x48af6a=null===_0xab4f4d['creator'];if(_0x48af6a&&_0xab4f4d['toVersion']===_0xab4f4d['fromVersion'])continue;const _0x5da7f8=_0xab4f4d['toJSON']();_0x4acbf3['addRevisionData'](_0x5da7f8,(_0x200fd0,_0x3f4d6c,_0x556efe)=>{if(_0x48af6a){if(_0x4b4f88)_0x4b4f88['_update'](_0x200fd0,_0x3f4d6c);else{if(!_0x3f4d6c){const _0x2783fa=_0x556efe['toJSON']();_0x2783fa['id']=_0x39fc3d(),_0x1ac302['saveRevision'](_0x2783fa,_0x556efe['toVersion'])['then'](_0x18a11f=>{_0x4b4f88=_0x18a11f;});}}}else _0xab4f4d['_update'](_0x200fd0,_0x3f4d6c);});}}},f),_0x51d644);}['_enhanceShowRevisionViewerCallback'](){const _0x2f36cd=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x578ca2=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x22f6ab=this['editor']['plugins']['get']('Autosave');await _0x22f6ab['save']();}else await _0x578ca2['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x1d7ca6=this['editor']['plugins']['get']('Dialog');_0x1d7ca6['isOpen']&&_0x1d7ca6['hide']();}const _0x43a931=this['_getRevisionViewerEditorConfig']();return _0x2f36cd(_0x43a931)['then'](_0x350b64=>{return(this['_viewerEditor']=_0x350b64,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'),_0x350b64);})['catch'](_0x1a1327=>(console['error'](_0x1a1327),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x71f6ca=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'](),_0x71f6ca(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x362c51=this['editor']['plugins']['get']('Annotations');_0x362c51['refreshVisibility'](),_0x362c51['refreshPositioning']();}})));}['_showRevisionViewer'](_0x135f18){const _0x41cf07=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x21f135=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x1eb0a3=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return m['create'](_0x1eb0a3,_0x135f18)['then'](_0x542405=>(_0x21f135['style']['display']='block',_0x41cf07['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x542405));}['_closeRevisionViewer'](_0x4636c8){const _0x229232=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x229232['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x4636c8['destroy']();}async['_restoreRevision'](_0x476398){const _0x3ccf94=this['editor'],_0x412063=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x16bb91=_0x3ccf94['plugins']['get']('RevisionTracker'),_0x534eba=_0x3ccf94['plugins']['get']('RevisionHistoryUtils'),_0x5d3f28=_0x412063['repository']['getRevision'](_0x476398);let _0x243696,_0xed458e,_0x300c94;try{await _0x534eba['loadRevisionData'](_0x5d3f28,this['adapter']),_0x243696=_0x534eba['getRevisionDocumentData'](_0x5d3f28),_0xed458e=_0x534eba['getRevisionRootsAttributes'](_0x5d3f28);}catch(_0x5eec32){return void console['error'](_0x5eec32);}_0x3ccf94['model']['change'](_0x474e3d=>{for(const _0x46773d of Array['from'](_0x3ccf94['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x474e3d['removeMarker'](_0x46773d);}),_0x412063['isReady']=!0x1,_0x3ccf94['model']['enqueueChange'](_0x3b07f7=>{_0x3b07f7['setSelection'](null),_0x3b07f7['removeSelectionAttribute'](_0x3ccf94['model']['document']['selection']['getAttributeKeys']());const _0x1c4949=Object['keys'](_0x243696);for(const _0x48182c of _0x3ccf94['model']['document']['roots'])'$graveyard'!=_0x48182c['rootName']&&_0x48182c['isAttached']()&&!_0x1c4949['includes'](_0x48182c['rootName'])&&_0x3b07f7['detachRoot'](_0x48182c);for(const _0x46617a of _0x1c4949){let _0x4cf5f4=_0x3ccf94['model']['document']['getRoot'](_0x46617a);_0x4cf5f4&&_0x4cf5f4['isAttached']()||(_0x4cf5f4=_0x3b07f7['addRoot'](_0x46617a));const _0x1a26de=_0xed458e[_0x46617a],_0x1b3bd5=Object['keys'](_0x1a26de),_0xb990c=_0x243696[_0x46617a];for(const _0x3ba8cb of _0x4cf5f4['getAttributeKeys']())_0x1b3bd5['includes'](_0x3ba8cb)||_0x3b07f7['removeAttribute'](_0x3ba8cb,_0x4cf5f4);for(const _0x18197d of _0x1b3bd5)_0x3b07f7['setAttribute'](_0x18197d,_0xed458e[_0x46617a][_0x18197d],_0x4cf5f4);_0x3b07f7['remove'](_0x3b07f7['createRangeIn'](_0x4cf5f4)),_0x3b07f7['insert'](_0x3ccf94['data']['parse'](_0xb990c,_0x4cf5f4),_0x4cf5f4,0x0);}});const _0x95bd19=R(_0x3ccf94['locale'],'Restored');if(_0x5d3f28['name'])_0x300c94=-0x1==_0x5d3f28['name']['indexOf'](_0x95bd19)?_0x95bd19+':\x20'+_0x5d3f28['name']:_0x5d3f28['name'];else _0x300c94=_0x95bd19+':\x20'+(_0x5d3f28['createdAt']['toLocaleDateString'](_0x3ccf94['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x5d3f28['createdAt']['toLocaleTimeString'](_0x3ccf94['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x16bb91['saveRevision']({'name':_0x300c94}),_0x412063['isReady']=!0x0,_0x3ccf94['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,v as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,l as RevisionViewer,m as RevisionViewerEditor,ji as RevisionViewerLoadingOverlay,u as RevisionViewerUI,S as RevisionsRepository,f as RevisionsSidebar,rt as ShowChangeCommand};