@ckeditor/ckeditor5-revision-history 47.3.0-alpha.7 → 47.3.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 _0x56e76d,uid as _0x9068c,Collection as _0x17dfa9,logWarning as _0x117f74,FocusTracker as _0x231da2,KeystrokeHandler as _0x3f1f83,scrollViewportToShowTarget as _0x3813c7,ResizeObserver as et,ElementReplacer as it,CKEditorError as _0x155f4d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x42245c,set as _0x415fb3,unset as _0x1c5616,isEqual as _0x11b9c0}from'es-toolkit/compat';import{Plugin as _0x237363,PendingActions as _0x5ece84,Command as _0x15d826,ElementApiMixin as _0x37662a,Editor as _0x455307}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x2e9ed3,getMarkerDomElement as _0x189758,ConfirmMixin as _0x588598,sanitizeEditorConfig as _0x2f465f}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0x1d472d,ViewAttributeElement as _0x18f5d8,ViewEmptyElement as _0x440e68,ViewRawElement as _0x503403,ViewUIElement as _0xe4ed6a,ViewDocumentFragment as _0x173d28,ViewText as _0x20857e,ViewElement as _0x247927,ModelElement as _0x5600a1,ModelRange as _0x5d4c4b,ModelPosition as _0x4f0201,ModelDocumentFragment as _0x15cae0,ModelText as _0x260b60}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x509fac,IconChevronUp as _0x2d2d82,IconChevronDown as _0xc8bb2a,IconUndo as _0x2c316f,IconUser as _0x37f372,IconThreeVerticalDots as _0x59d1ed}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x5e02d5,View as _0x3cfa23,submitHandler as _0x34d885,LabeledFieldView as ti,createLabeledInputText as _0x5802d2,createDropdown as _0x408b44,ListView as _0x2b1a30,ListItemView as _0x5a71fd,ButtonView as _0x58da02,MenuBarMenuView as _0x4d1d93,MenuBarMenuListView as _0x51a300,MenuBarMenuListItemView as _0x39d5f5,MenuBarMenuListItemButtonView as _0xda620,ContextualBalloon as _0x28c0b9,ToolbarSeparatorView as _0x27d032,IconView as _0x44d27e,addListToDropdown as _0x4d8904,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x2c763f,StickyPanelView as _0x543ebe,ToolbarView as _0x8f2e9b,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x320207}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
- _0x56e76d(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x4b7fd0){super(),this['id']=_0x4b7fd0['id']||_0x9068c(),this['creator']=_0x4b7fd0['creator']||null,this['authors']=_0x4b7fd0['authors']||[],this['diffData']=_0x4b7fd0['diffData']||null,this['toVersion']=_0x4b7fd0['toVersion']||0x0,this['fromVersion']=_0x4b7fd0['fromVersion']||0x0,this['set']('name',_0x4b7fd0['name']||''),this['set']('createdAt',_0x4b7fd0['createdAt']||new Date()),this['set']('attributes',_0x4b7fd0['attributes']||{});}['setName'](_0xb688ba){this['_update']({'name':_0xb688ba});}['setAttribute'](_0x510b6f,_0x4a70d8){const _0x313566=_0x42245c(this['attributes']);_0x415fb3(_0x313566,_0x510b6f,_0x4a70d8),this['_update']({'attributes':_0x313566});}['removeAttribute'](_0x5f174e){const _0x46392c=_0x42245c(this['attributes']);_0x1c5616(_0x46392c,_0x5f174e),this['_update']({'attributes':_0x46392c});}['_update'](_0x14c572,_0x6d61c8=!0x1){let _0x1bb7ca=!0x1;const _0xd3fbf4={'id':this['id']},_0x5cf9da=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x217717 of _0x5cf9da){const _0x1876c8=_0x14c572[_0x217717];void 0x0!==_0x1876c8&&_0x1876c8!==this[_0x217717]&&(this[_0x217717]=_0x1876c8,_0xd3fbf4[_0x217717]=_0x1876c8,_0x1bb7ca=!0x0);}_0x1bb7ca&&(_0xd3fbf4['authors']&&(_0xd3fbf4['authorsIds']=_0xd3fbf4['authors']['map'](_0x290299=>_0x290299['id']),delete _0xd3fbf4['authors']),this['fire']('_update',_0xd3fbf4,_0x6d61c8));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x33981d=>_0x33981d['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x237363{['_revisions'];static get['requires'](){return[_0x2e9ed3];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x589b79){super(_0x589b79),this['_revisions']=new _0x17dfa9();}['afterInit'](){!async function(_0x50cf74){const _0x35692d=_0x2e3825([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x4c7b0a=0xeb829,_0xa9a30a=0x359e09b0,_0x2daed9=0x35997368^_0xa9a30a,_0x11f516=window[_0x2e3825([0x44,0x61,0x74,0x65])][_0x2e3825([0x6e,0x6f,0x77])](),_0x2c405b=_0x50cf74[_0x2e3825([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xcb375f=new window[(_0x2e3825([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x23c067=>{_0x2c405b[_0x2e3825([0x6f,0x6e,0x63,0x65])](_0x2e3825([0x72,0x65,0x61,0x64,0x79]),_0x23c067);}),_0xceb8a6={[_0x2e3825([0x6b,0x74,0x79])]:_0x2e3825([0x45,0x43]),[_0x2e3825([0x75,0x73,0x65])]:_0x2e3825([0x73,0x69,0x67]),[_0x2e3825([0x63,0x72,0x76])]:_0x2e3825([0x50,0x2d,0x32,0x35,0x36]),[_0x2e3825([0x78])]:_0x2e3825([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]),[_0x2e3825([0x79])]:_0x2e3825([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]),[_0x2e3825([0x61,0x6c,0x67])]:_0x2e3825([0x45,0x53,0x32,0x35,0x36])},_0x22d939=_0x2c405b[_0x2e3825([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2e3825([0x67,0x65,0x74])](_0x2e3825([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x48512e(){let _0xc21744,_0x179766=null,_0x14275d=null;try{if(_0x22d939==_0x2e3825([0x47,0x50,0x4c]))return _0x2e3825([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xc21744=_0x1c6f65(),!_0xc21744)return _0x2e3825([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xc21744[_0x2e3825([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x14275d=_0x265df9(_0xc21744[_0x2e3825([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xc21744[_0x2e3825([0x6a,0x74,0x69])])),await _0x3af018()?_0x179791()?_0x433f2b()?_0x2e3825([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x52d5c2()?(_0xc21744[_0x2e3825([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2e3825([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x179766=_0x4961cf(_0x2e3825([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xc21744[_0x2e3825([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2e3825([0x74,0x72,0x69,0x61,0x6c])&&(_0x179766=_0x4961cf(_0x2e3825([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2008d9()):_0x2e3825([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2e3825([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2e3825([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2e3825([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x433f2b(){const _0x5c5d9d=[_0x2e3825([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2e3825([0x74,0x72,0x69,0x61,0x6c])][_0x2e3825([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc21744[_0x2e3825([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x11f516/0x3e8:0xe10*_0x2daed9;return _0xc21744[_0x2e3825([0x65,0x78,0x70])]<_0x5c5d9d;}function _0x179791(){const _0x7b8df4=_0xc21744[_0x2e3825([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x7b8df4)return!0x1;if(_0x7b8df4[_0x2e3825([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e3825([0x2a])))return!0x0;if(_0x7b8df4[_0x2e3825([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e3825([0x52,0x48])))return!0x0;if(_0x7b8df4[_0x2e3825([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e3825([0x52,0x52,0x48]))){if(_0x1e5548())return!0x0;if(_0x49a5c4()||_0x517c51())return!0x0;}return!0x1;}function _0x52d5c2(){const _0xe1fa80=_0xc21744[_0x2e3825([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xe1fa80||0x0==_0xe1fa80[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x21916c}=new URL(window[_0x2e3825([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xe1fa80[_0x2e3825([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x21916c))return!0x0;const _0x3e7ab8=_0x21916c[_0x2e3825([0x73,0x70,0x6c,0x69,0x74])](_0x2e3825([0x2e]));return _0xe1fa80[_0x2e3825([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x458619=>_0x458619[_0x2e3825([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e3825([0x2a])))[_0x2e3825([0x6d,0x61,0x70])](_0x1b37d3=>_0x1b37d3[_0x2e3825([0x73,0x70,0x6c,0x69,0x74])](_0x2e3825([0x2e])))[_0x2e3825([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x269486=>_0x269486[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3e7ab8[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2e3825([0x6d,0x61,0x70])](_0x6e602b=>Array(_0x3e7ab8[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x6e602b[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2e3825([0x66,0x69,0x6c,0x6c])](_0x6e602b[0x0]===_0x2e3825([0x2a])?_0x2e3825([0x2a]):'')[_0x2e3825([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x6e602b))[_0x2e3825([0x73,0x6f,0x6d,0x65])](_0x51171f=>_0x3e7ab8[_0x2e3825([0x65,0x76,0x65,0x72,0x79])]((_0x55f93f,_0x4d5cd7)=>_0x51171f[_0x4d5cd7]===_0x55f93f||_0x51171f[_0x4d5cd7]===_0x2e3825([0x2a])));}function _0x2008d9(){return _0x179766&&_0x14275d?new window[(_0x2e3825([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x563df2,_0x429fbe)=>{_0x179766[_0x2e3825([0x74,0x68,0x65,0x6e])](_0x563df2,_0x429fbe),_0x14275d[_0x2e3825([0x74,0x68,0x65,0x6e])](_0x18d0f3=>{_0x18d0f3!=_0x2e3825([0x56,0x61,0x6c,0x69,0x64])&&_0x563df2(_0x18d0f3);},_0x429fbe);}):_0x179766||_0x14275d||_0x2e3825([0x56,0x61,0x6c,0x69,0x64]);}}function _0x265df9(_0xcee401,_0x33dc3e){return new window[(_0x2e3825([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x354669=>{if(_0x11f875())return _0x354669(_0x2e3825([0x56,0x61,0x6c,0x69,0x64]));_0x509a2d(),_0x2c405b[_0x2e3825([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2e3825([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3a84ac=!0x1;const _0x15c975=_0x9068c();function _0x325531(_0xcc68b){return!!_0xcc68b&&(typeof _0xcc68b===_0x2e3825([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xcc68b===_0x2e3825([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xcc68b[_0x2e3825([0x74,0x68,0x65,0x6e])]===_0x2e3825([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xcc68b[_0x2e3825([0x63,0x61,0x74,0x63,0x68])]===_0x2e3825([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1333a1(_0x465624){_0x1fefd1(_0x465624)[_0x2e3825([0x74,0x68,0x65,0x6e])](_0x35384e=>{if(!_0x35384e||_0x35384e[_0x2e3825([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2e3825([0x6f,0x6b]))return _0x2e3825([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x594d7c(_0x537e7e(_0x15c975+_0x33dc3e))!=_0x35384e[_0x2e3825([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2e3825([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2e3825([0x56,0x61,0x6c,0x69,0x64]);})[_0x2e3825([0x74,0x68,0x65,0x6e])](_0x2c9b56=>(_0x3c157b(),_0x2c9b56),()=>{const _0x375b02=_0x3de6a1();return null==_0x375b02?(_0x3c157b(),_0x2e3825([0x56,0x61,0x6c,0x69,0x64])):_0x2e3825(_0x11f516-_0x375b02>(0x11928db0^_0xa9a30a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2e3825([0x74,0x68,0x65,0x6e])](_0x354669)[_0x2e3825([0x63,0x61,0x74,0x63,0x68])](()=>{_0x354669(_0x2e3825([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5b4953=0x35a8e730^_0xa9a30a;function _0x3c157b(){const _0x2167a1=_0x2e3825([0x6c,0x6c,0x63,0x74,0x2d])+_0x594d7c(_0x537e7e(_0xcee401)),_0x20906e=_0x2d1b79(_0x594d7c(window[_0x2e3825([0x4d,0x61,0x74,0x68])][_0x2e3825([0x63,0x65,0x69,0x6c])](_0x11f516/_0x5b4953)));window[_0x2e3825([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2e3825([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2167a1,_0x20906e);}function _0x3de6a1(){const _0x1c27c5=_0x2e3825([0x6c,0x6c,0x63,0x74,0x2d])+_0x594d7c(_0x537e7e(_0xcee401)),_0x28b449=window[_0x2e3825([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2e3825([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1c27c5);return _0x28b449?window[_0x2e3825([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d1b79(_0x28b449),0x10)*_0x5b4953:null;}function _0x1fefd1(_0xc8024e){return new window[(_0x2e3825([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3f93b3,_0x37246f)=>{_0xc8024e[_0x2e3825([0x74,0x68,0x65,0x6e])](_0x3f93b3,_0x37246f),window[_0x2e3825([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x37246f,0x359fdd70^_0xa9a30a);});}}_0x2c405b[_0x2e3825([0x6f,0x6e])](_0x2e3825([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xfc2a8c,_0x499ced)=>{if(_0x499ced[0x0]!=_0xcee401)return _0x354669(_0x2e3825([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x499ced[0x1]={..._0x499ced[0x1],[_0x2e3825([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x15c975};},{[_0x2e3825([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2e3825([0x68,0x69,0x67,0x68])}),_0x2c405b[_0x2e3825([0x6f,0x6e])](_0x2e3825([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x17b8f1=>{_0x325531(_0x17b8f1[_0x2e3825([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3a84ac=!0x0,_0x1333a1(_0x17b8f1[_0x2e3825([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2e3825([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2e3825([0x6c,0x6f,0x77])}),_0xcb375f[_0x2e3825([0x74,0x68,0x65,0x6e])](()=>{_0x3a84ac||_0x354669(_0x2e3825([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x11f875(){return _0x2c405b[_0x2e3825([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2e3825([0x76,0x69,0x65,0x77])][_0x2e3825([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2e3825([0x61,0x75,0x74,0x6f]);}function _0x509a2d(){_0x2c405b[_0x2e3825([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2e3825([0x76,0x69,0x65,0x77])][_0x2e3825([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2e3825([0x61,0x75,0x74,0x6f]);}}function _0x4961cf(_0x452954){const _0xa5e48a=[new window[(_0x2e3825([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe683f5=>setTimeout(_0xe683f5,0x3597377c^_0xa9a30a)),_0xcb375f[_0x2e3825([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2e3825([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x6dab7a=>{const _0x397a6f=0x359e09b7^_0xa9a30a,_0x72f22a=_0x50cf74[_0x2e3825([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x435803(){_0x72f22a[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x397a6f&&_0x6dab7a();}_0x435803(),_0x72f22a[_0x2e3825([0x6f,0x6e])](_0x2e3825([0x61,0x64,0x64]),_0x435803);})),new window[(_0x2e3825([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35ed8c=>{function _0x438b89(){for(const _0x536577 in window)if(window[_0x2e3825([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x2e3825([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x536577))&&window[_0x536577]==_0x4c7b0a)return _0x35ed8c();_0x2c405b[_0x2e3825([0x73,0x74,0x61,0x74,0x65])]!=_0x2e3825([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x2e3825([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x438b89,0x359e1a38^_0xa9a30a);}_0xa0bed4(_0x2e3825([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x438b89();})];return window[_0x2e3825([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2e3825([0x72,0x61,0x63,0x65])](_0xa5e48a)[_0x2e3825([0x74,0x68,0x65,0x6e])](()=>_0x452954);}async function _0x575309(){if(await _0xcb375f,_0xa0bed4(_0x2e3825([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x302b5e=_0x50cf74[_0x2e3825([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x1d8e77=_0x50cf74[_0x2e3825([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])](_0x302b5e[_0x2e3825([0x69,0x64])]),_0x10f5c7=_0x261b5c(_0x2e3825([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x10f5c7[_0x2e3825([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x302b5e['id'],_0x1d8e77?_0x1d8e77['id']:null,!0x0),_0x10f5c7[_0x2e3825([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x2e3825([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x10f5c7[_0x2e3825([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x10f5c7[_0x2e3825([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x1f8584,void(_0x10f5c7[_0x2e3825([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x1f8584);}if(_0xa0bed4(_0x2e3825([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x33f983=_0x261b5c(_0x2e3825([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x33f983[_0x2e3825([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x2e3825([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x33f983[_0x2e3825([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x33f983[_0x2e3825([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x1f8584,_0x33f983[_0x2e3825([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x1f8584;}_0x2c405b[_0x2e3825([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e3825([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1f8584,_0x2c405b[_0x2e3825([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e3825([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1f8584,_0x2c405b[_0x2e3825([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2e3825([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1e5548(){return _0xa0bed4(_0x2e3825([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x261b5c(_0x2e3825([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2e3825([0x73,0x74,0x61,0x74,0x65])]==_0x2e3825([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x49a5c4(){return _0xa0bed4(_0x2e3825([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 _0x517c51(){return _0xa0bed4(_0x2e3825([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x38ab67(_0x2e764f){const _0x3572c8=_0x47a0f1();_0x2c405b[_0x3572c8]=_0x2e3825([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])+_0x2e764f,_0x2e764f[_0x2e3825([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x2e3825([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x47a0f1()]=_0x4c7b0a),_0x2e764f!=_0x2e3825([0x56,0x61,0x6c,0x69,0x64])&&_0x575309();}function _0x47a0f1(){const _0x4e73fb=window[_0x2e3825([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2e3825([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2e3825([0x6e,0x6f,0x77])]())[_0x2e3825([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2e3825([0x2e]),'');let _0x3bfabe=_0x2e3825([0x76]);for(let _0x1ae22e=0x0;_0x1ae22e<_0x4e73fb[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ae22e+=0x2){let _0x106434=window[_0x2e3825([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e73fb[_0x2e3825([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ae22e,_0x1ae22e+0x2));_0x106434>=_0x35692d[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x106434-=_0x35692d[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3bfabe+=_0x35692d[_0x106434];}return _0x3bfabe;}function _0x1c6f65(){const _0x341cd4=_0x22d939[_0x2e3825([0x73,0x70,0x6c,0x69,0x74])](_0x2e3825([0x2e]));if(0x3!=_0x341cd4[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x17f320(_0x341cd4[0x1]);function _0x17f320(_0x6361c){const _0x43c620=_0x5c3e10(_0x6361c);return _0x43c620&&_0x1504a7()?_0x43c620:null;function _0x1504a7(){const _0x19a553=_0x43c620[_0x2e3825([0x6a,0x74,0x69])],_0x3310c8=window[_0x2e3825([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x19a553[_0x2e3825([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x19a553[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5dfa01={..._0x43c620,[_0x2e3825([0x6a,0x74,0x69])]:_0x19a553[_0x2e3825([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x19a553[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5dfa01[_0x2e3825([0x76,0x63])],_0x537e7e(_0x5dfa01)==_0x3310c8;}}}async function _0x3af018(){let _0x16ae16=!0x0;try{const _0x21f5a6=_0x22d939[_0x2e3825([0x73,0x70,0x6c,0x69,0x74])](_0x2e3825([0x2e])),[_0x2352c7,_0x5264b8,_0x275c73]=_0x21f5a6;return _0xa3df9b(_0x2352c7),await _0x54f76f(_0x2352c7,_0x5264b8,_0x275c73),_0x16ae16;}catch{return!0x1;}function _0xa3df9b(_0x4768fa){const _0x57953b=_0x5c3e10(_0x4768fa);_0x57953b&&_0x57953b[_0x2e3825([0x61,0x6c,0x67])]==_0x2e3825([0x45,0x53,0x32,0x35,0x36])||(_0x16ae16=!0x1);}async function _0x54f76f(_0xeebe0,_0x46ea62,_0x505f3b){const _0x292438=window[_0x2e3825([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2e3825([0x66,0x72,0x6f,0x6d])](_0x35ffc7(_0x505f3b),_0x535cec=>_0x535cec[_0x2e3825([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x147149=new window[(_0x2e3825([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2e3825([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0xeebe0+_0x2e3825([0x2e])+_0x46ea62),_0x551f8e=window[_0x2e3825([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2e3825([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x551f8e)return;const _0x2bb2fa=await _0x551f8e[_0x2e3825([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2e3825([0x6a,0x77,0x6b]),_0xceb8a6,{[_0x2e3825([0x6e,0x61,0x6d,0x65])]:_0x2e3825([0x45,0x43,0x44,0x53,0x41]),[_0x2e3825([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2e3825([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2e3825([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x551f8e[_0x2e3825([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2e3825([0x6e,0x61,0x6d,0x65])]:_0x2e3825([0x45,0x43,0x44,0x53,0x41]),[_0x2e3825([0x68,0x61,0x73,0x68])]:{[_0x2e3825([0x6e,0x61,0x6d,0x65])]:_0x2e3825([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2bb2fa,_0x292438,_0x147149)||(_0x16ae16=!0x1);}}function _0x5c3e10(_0x26e541){return _0x26e541[_0x2e3825([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2e3825([0x65,0x79]))?JSON[_0x2e3825([0x70,0x61,0x72,0x73,0x65])](_0x35ffc7(_0x26e541)):null;}function _0x35ffc7(_0x3b8327){return window[_0x2e3825([0x61,0x74,0x6f,0x62])](_0x3b8327[_0x2e3825([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2e3825([0x2b]))[_0x2e3825([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2e3825([0x2f])));}function _0x537e7e(_0x57634b){let _0x580452=0x1505;function _0x534e3e(_0x541909){for(let _0x3d2b21=0x0;_0x3d2b21<_0x541909[_0x2e3825([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d2b21++){const _0x29a53d=_0x541909[_0x2e3825([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3d2b21);_0x580452=(_0x580452<<0x5)+_0x580452+_0x29a53d,_0x580452&=_0x580452;}}function _0x19ff84(_0x1498f7){Array[_0x2e3825([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1498f7)?_0x1498f7[_0x2e3825([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x19ff84):_0x1498f7&&typeof _0x1498f7==_0x2e3825([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2e3825([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1498f7)[_0x2e3825([0x73,0x6f,0x72,0x74])]()[_0x2e3825([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1ecd68,_0x166947])=>{_0x534e3e(_0x1ecd68),_0x19ff84(_0x166947);}):_0x534e3e(window[_0x2e3825([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1498f7));}return _0x19ff84(_0x57634b),_0x580452>>>0x0;}function _0x594d7c(_0x3647f4){return _0x3647f4[_0x2e3825([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2e3825([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2e3825([0x30]));}function _0x2d1b79(_0x2c3239){return _0x2c3239[_0x2e3825([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2e3825([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2e3825([0x6a,0x6f,0x69,0x6e])]('');}function _0xa0bed4(_0x21101b){return _0x2c405b[_0x2e3825([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2e3825([0x68,0x61,0x73])](_0x21101b);}function _0x261b5c(_0x3437e5){return _0x2c405b[_0x2e3825([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2e3825([0x67,0x65,0x74])](_0x3437e5);}function _0x1f8584(){}function _0x2e3825(_0xc59d0d){return _0xc59d0d['map'](_0x457a4a=>String['fromCharCode'](_0x457a4a))['join']('');}_0x38ab67(await _0x48512e());}(this);}['createRevision'](_0x2e89a2){const _0x39148e=this['editor']['plugins']['get']('Users');return new I({'id':_0x2e89a2['id'],'name':_0x2e89a2['name'],'creator':_0x2e89a2['creatorId']?_0x39148e['getUser'](_0x2e89a2['creatorId']):null,'diffData':_0x2e89a2['diffData']||_0x2e89a2['data'],'authors':_0x2e89a2['authorsIds']['map'](_0x3a1075=>_0x39148e['getUser'](_0x3a1075)),'createdAt':new Date(_0x2e89a2['createdAt']),'attributes':_0x2e89a2['attributes'],'fromVersion':_0x2e89a2['fromVersion'],'toVersion':_0x2e89a2['toVersion']});}['addRevision'](_0x361559,_0x1c12e4=0x0){this['_revisions']['add'](_0x361559,_0x1c12e4);}['getRevision'](_0x279d82){return this['_revisions']['get'](_0x279d82);}['getRevisions'](_0x58f159={'toJSON':!0x1}){const _0x397502=Array['from'](this['_revisions']);return _0x397502['reverse'](),_0x58f159['toJSON']?_0x397502['map'](_0x41df11=>_0x41df11['toJSON']()):_0x397502;}['getIndex'](_0x52a302){return this['_revisions']['getIndex'](_0x52a302);}['getEarlierVisibleRevision'](_0x5a94ae){const [,_0x540700]=this['getRevisionsIterator'](_0x5a94ae,{'direction':'earlier'});return _0x540700;}['getLaterVisibleRevision'](_0xc3b0a5){const [,_0x2fe356]=this['getRevisionsIterator'](_0xc3b0a5,{'direction':'later'});return _0x2fe356;}['getRevisionsInDiff'](_0x186e61){const _0x1e5bc2=[];for(const _0x19d6bb of this['getRevisionsIterator'](_0x186e61['newRevisionId']))if(_0x1e5bc2['push'](_0x19d6bb),_0x19d6bb['id']===_0x186e61['oldRevisionId'])break;return _0x1e5bc2;}*['getRevisionsIterator'](_0x14bc74,{direction:_0x12e61c='earlier',filter:_0x30c2f3=()=>!0x0}={}){const _0x2ca36c='earlier'===_0x12e61c?0x1:-0x1;let _0x5df986=this['_revisions']['get'](_0x14bc74),_0x4e3cb6=this['getIndex'](_0x5df986);for(yield _0x5df986;_0x5df986;){if(_0x4e3cb6+=_0x2ca36c,_0x5df986=this['getRevision'](_0x4e3cb6),!_0x5df986)return;_0x30c2f3(_0x5df986)&&(yield _0x5df986);}}}class $ extends _0x237363{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x1d472d,'c'],[_0x18f5d8,'a'],[_0x440e68,'e'],[_0x503403,'r'],[_0xe4ed6a,'u']]);['_typeCharToViewClass']=new Map([['c',_0x1d472d],['a',_0x18f5d8],['e',_0x440e68],['r',_0x503403],['u',_0xe4ed6a]]);async['loadRevisionData'](_0x4e7e70,_0x41ea31){if(_0x4e7e70['diffData']||!_0x41ea31)return;const _0x276cc1=this['editor']['config']['get']('collaboration.channelId'),_0x1ba478=await _0x41ea31['getRevision']({'channelId':_0x276cc1,'revisionId':_0x4e7e70['id']});_0x4e7e70['diffData']=_0x1ba478['diffData'];}['getRevisionDocumentData'](_0x3a37b5){const _0x4c64af={};for(const _0x5474ca in _0x3a37b5['diffData']){if(_0x3a37b5['diffData'][_0x5474ca]['attachChange']&&!_0x3a37b5['diffData'][_0x5474ca]['attachChange']['isAttached'])continue;const _0x314dd8=this['_removeRevisionMarkers'](JSON['parse'](_0x3a37b5['diffData'][_0x5474ca]['insertions'])),_0x3fd098=this['editor']['editing']['view']['document'],_0x253af1=new _0x173d28(_0x3fd098,_0x314dd8['map'](_0x3df8fe=>this['_getViewFromDiffObj'](_0x3df8fe,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x4c64af[_0x5474ca]=this['editor']['data']['processor']['toData'](_0x253af1),this['editor']['data']['processor']['useFillerType']('default');}return _0x4c64af;}['getRevisionRootsAttributes'](_0x4a6d78){const _0x1b8f7b={};for(const _0x1f71d4 in _0x4a6d78['diffData'])_0x4a6d78['diffData'][_0x1f71d4]['attachChange']&&!_0x4a6d78['diffData'][_0x1f71d4]['attachChange']['isAttached']||(_0x1b8f7b[_0x1f71d4]=_0x4a6d78['diffData'][_0x1f71d4]['attributesAfter']||{});return _0x1b8f7b;}['_getTypeCharForViewElement'](_0x3006f4){return this['_viewClassToTypeChar']['get'](_0x3006f4['constructor']);}['_getViewFromDiffObj'](_0x5f5046,_0x5f28ba){const _0x276923=this['editor']['editing']['view']['document'];if('string'==typeof _0x5f5046)return new _0x20857e(_0x276923,_0x5f5046);{let _0x568fcc,_0xec1b42;_0xec1b42='u'==_0x5f5046['type']||'r'==_0x5f5046['type']?[]:_0x5f5046['children']['map'](_0x2be84b=>this['_getViewFromDiffObj'](_0x2be84b,_0x5f28ba));const _0x4617f5=this['_typeCharToViewClass']['get'](_0x5f5046['type'])||_0x247927,_0x89573f=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x568fcc=new _0x4617f5(_0x276923,_0x5f5046['name'],_0x5f5046['attributes'],_0xec1b42),'u'==_0x5f5046['type']&&_0x5f5046['children'][0x0]){const _0x5c164c=_0x5f5046['children'][0x0];if(_0x568fcc['render']=function(_0x7bca7b){const _0x172621=_0x7bca7b['createElement']('div');return _0x172621['innerHTML']=_0x5c164c,_0x172621['childNodes'][0x0];},_0x5f28ba){const _0x10811a=new _0x173d28(_0x276923);_0x10811a['_appendChild'](_0x568fcc);const _0x3626e8=Array['from'](_0x89573f['viewChildrenToDom'](_0x10811a,{'bind':!0x1})),_0x25131c=_0x89573f['domDocument']['createElement']('div');_0x25131c['append'](..._0x3626e8),_0x568fcc=Array['from'](_0x89573f['domChildrenToView'](_0x25131c))[0x0];}}else{if('r'==_0x5f5046['type']&&_0x5f5046['children'][0x0]){const _0x4ac9d3=_0x5f5046['children'][0x0];if(_0x568fcc['render']=function(_0x55b512){_0x55b512['innerHTML']=_0x4ac9d3;},_0x5f28ba){const _0x4b0f4d=new _0x173d28(_0x276923);_0x4b0f4d['_appendChild'](_0x568fcc);const _0x52bb5e=Array['from'](_0x89573f['viewChildrenToDom'](_0x4b0f4d,{'bind':!0x1})),_0x2b4c32=_0x89573f['domDocument']['createElement']('div');_0x2b4c32['append'](..._0x52bb5e);const _0x20857d=Array['from'](_0x89573f['domChildrenToView'](_0x2b4c32));_0x20857d['length']>0x1?_0x568fcc['_appendChild'](_0x20857d):_0x568fcc=_0x20857d[0x0];}}}if(_0x5f5046['customProperties']){for(const [_0x46e265,_0x518704]of _0x5f5046['customProperties'])_0x568fcc['_setCustomProperty'](_0x46e265,_0x518704);}const _0x5bf8f6=void 0x0===_0x5f5046['fillerOffset']?null:_0x5f5046['fillerOffset'];return null!==_0x5bf8f6&&(_0x568fcc['getFillerOffset']=()=>_0x5bf8f6),_0x568fcc;}}['_makeModelFromViewString'](_0x1418d4){const _0x275b62=JSON['parse'](_0x1418d4),_0x306009=this['editor']['editing']['view']['document'],_0x247f84=new _0x173d28(_0x306009,_0x275b62['map'](_0x34f4c2=>this['_getViewFromDiffObj'](_0x34f4c2,!0x0)));return this['editor']['data']['toModel'](_0x247f84);}['_removeRevisionMarkers'](_0x4b8418){return(_0x4b8418=_0x4b8418['filter'](_0x5af23a=>!_0x5af23a['name']||'revision-start'!==_0x5af23a['name']&&'revision-end'!==_0x5af23a['name']))['forEach'](_0xec91fe=>{'string'!=typeof _0xec91fe&&(_0xec91fe['children']=this['_removeRevisionMarkers'](_0xec91fe['children']),_0xec91fe['attributes']=_0xec91fe['attributes']['filter'](_0x3605df=>!_0x3605df[0x0]['startsWith']('data-revision-')));}),_0x4b8418;}}function m(_0x11365a,_0x419936,_0x195075){const t=_0x11365a['t'];switch(_0x419936){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'},_0x195075);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x195075);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 _0x237363{['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[_0x2e9ed3,S,$,_0x5ece84];}constructor(_0x1a3f83){super(_0x1a3f83),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 _0x536cdc=_0x9068c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x536cdc},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 _0x57d494=this['repository']['getRevision'](0x0),_0x512d91=_0x57d494&&null===_0x57d494['creator']?_0x57d494:null;if(this['_continueCurrentRevision']=!!_0x512d91&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x468d04=this['_source']['getCurrentRevisionId'](),_0x4c2616=this['repository']['getRevision'](_0x468d04);if(_0x4c2616)this['_startingVersion']=_0x4c2616['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1b2c30=this['_source']['history']['_operations']['find'](_0x42eaa0=>!_0x42eaa0['_isInit']),_0x4978c3=_0x1b2c30?_0x1b2c30['baseVersion']:this['_source']['history']['version'];_0x57d494?(_0x57d494['toVersion']<_0x4978c3&&_0x57d494['_update']({'toVersion':_0x4978c3}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x512d91['id'],this['_startingVersion']=_0x512d91['fromVersion']):(this['_startingVersion']=_0x57d494['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x4978c3,this['_continueCurrentRevision']=!0x1);}}else _0x512d91&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x512d91['toVersion'],this['editor']['model']['document']['history']['version']),_0x512d91['fromVersion']===_0x512d91['toVersion']?(0x0!==_0x512d91['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x512d91['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x512d91['id'],this['_startingVersion']=_0x512d91['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',_0x45a26f=>!_0x45a26f),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x53b2e3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2aa10c;for(const _0x3b924c in _0x53b2e3){const _0x2f3c29=_0x3b924c,_0x3dbc63=_0x53b2e3[_0x2f3c29];if('revisionHistoryLicenseKeyValid'==_0x3dbc63||'revisionHistoryLicenseKeyInvalid'==_0x3dbc63||'revisionHistoryLicenseKeyExpired'==_0x3dbc63||'revisionHistoryLicenseKeyDomainLimit'==_0x3dbc63||'revisionHistoryLicenseKeyNotAllowed'==_0x3dbc63||'revisionHistoryLicenseKeyEvaluationLimit'==_0x3dbc63||'revisionHistoryLicenseKeyTrialLimit'==_0x3dbc63||'revisionHistoryLicenseKeyUsageLimit'==_0x3dbc63){delete _0x53b2e3[_0x2f3c29],_0x2aa10c=_0x3dbc63,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2aa10c&&_0x53b2e3['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2aa10c&&_0x53b2e3['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2aa10c&&_0x53b2e3['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2aa10c&&_0x53b2e3['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2aa10c&&_0x53b2e3['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x2aa10c&&_0x53b2e3['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2aa10c&&_0x53b2e3['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x472cd5=this['repository']['getRevision'](0x0),_0x25071f=await this['getRevisionDocumentData'](_0x472cd5),_0xa366a5=await this['getRevisionRootsAttributes'](_0x472cd5);this['_replaceEditorDataWithRevisionData'](_0x25071f,_0xa366a5);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2e9166){this['_source']=_0x2e9166;}async['update'](){const _0x564cba=await this['_source']['getLatestVersion']();if(_0x564cba>this['currentRevision']['toVersion']){await this['_loadState']();const _0x233eb3=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x564cba});_0x233eb3['authors']=_0x233eb3['authorsIds']['map'](_0x2c1f6c=>this['editor']['plugins']['get']('Users')['getUser'](_0x2c1f6c)),this['currentRevision']['_update'](_0x233eb3);}}async['saveRevision'](_0x4afc0d={},_0xb213a=null){const _0x29387b=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xb213a>this['currentRevision']['toVersion']&&(_0xb213a=null),null===_0xb213a&&(_0xb213a=await this['_source']['getLatestVersion']());const _0x147d09=this['_getFromVersion'](_0xb213a),_0x4b008f=this['buildRevisionData']({'from':_0x147d09,'to':_0xb213a});if(this['currentRevision']['toVersion']<_0xb213a){const _0x3a62e2=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xb213a,'to':_0xb213a});_0x3a62e2['authors']=[],_0x3a62e2['authorsIds']=[],_0x3a62e2['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3a62e2,!0x0),delete _0x3a62e2['authors'],_0x29387b['push'](_0x3a62e2);}_0x4afc0d['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x4afc0d['name']=_0x4afc0d['name']||null,_0x4afc0d['id']=_0x4afc0d['id']||_0x9068c(),_0x4afc0d={..._0x4afc0d,..._0x4b008f};const _0x449a0c=this['addRevisionData'](_0x4afc0d);_0x29387b['push'](_0x4afc0d);const _0x5a1af1=this['repository']['getIndex'](_0x449a0c);if(0x0!==_0x5a1af1){const _0x54890d=this['repository']['getRevision'](_0x5a1af1-0x1);if(_0x54890d['fromVersion']!==_0xb213a){const _0x2f0374=this['_revisionDataBuilder']['getData'](_0xb213a,_0x54890d['toVersion']),_0x2dc778={'id':_0x54890d['id'],'diffData':_0x2f0374['diffData'],'authorsIds':_0x2f0374['authorsIds'],'authors':_0x2f0374['authorsIds']['map'](_0x47e0c7=>this['editor']['plugins']['get']('Users')['getUser'](_0x47e0c7)),'fromVersion':_0xb213a};_0x54890d===this['currentRevision']&&(_0x2dc778['createdAt']=new Date(_0x4afc0d['createdAt']['getTime']()+0xa)),_0x54890d['_update'](_0x2dc778,!0x0),delete _0x2dc778['authors'],_0x29387b['push'](_0x2dc778);}}if(this['adapter']){for(const _0x12014b of _0x29387b)this['_bufferUpdate'](_0x12014b['id'],_0x12014b,!0x0);this['sendBufferedUpdates']();}return _0x449a0c;}['addRevisionData'](_0x443572){const _0x3e94a1=this['repository']['createRevision'](_0x443572);return this['adapter']&&_0x3e94a1['on']('_update',(_0x1afe61,_0x6914e5,_0x166626)=>{_0x166626||(this['_bufferUpdate'](_0x6914e5['id'],_0x6914e5,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x3e94a1,this['_findInsertionIndex'](_0x3e94a1)),_0x3e94a1;}async['getRevisionDocumentData'](_0x4a4b29){return await this['_utils']['loadRevisionData'](_0x4a4b29,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4a4b29);}async['getRevisionRootsAttributes'](_0x5b64c5){return await this['_utils']['loadRevisionData'](_0x5b64c5,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5b64c5);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x25e884=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x4a1b5e=0x0;_0x4a1b5e<_0x25e884['length'];_0x4a1b5e++){const _0x58c5b0=_0x25e884[_0x4a1b5e];let _0x2994e3=!0x1;for(const _0x42d823 of Object['keys'](_0x58c5b0))void 0x0===_0x58c5b0[_0x42d823]?delete _0x58c5b0[_0x42d823]:'id'!==_0x42d823&&(_0x2994e3=!0x0);_0x2994e3||(_0x25e884[_0x4a1b5e]=null);}if(_0x25e884=_0x25e884['filter'](_0x5cf41a=>null!==_0x5cf41a),!_0x25e884['length'])return;for(let _0x55d29f=0x0;_0x55d29f<_0x25e884['length'];_0x55d29f++){const _0x1f60a0=_0x25e884[_0x55d29f];void 0x0!==_0x1f60a0['fromVersion']&&void 0x0===_0x1f60a0['toVersion']&&(_0x1f60a0['toVersion']=this['repository']['getRevision'](_0x1f60a0['id'])['toVersion']),void 0x0!==_0x1f60a0['toVersion']&&void 0x0===_0x1f60a0['fromVersion']&&(_0x1f60a0['fromVersion']=this['repository']['getRevision'](_0x1f60a0['id'])['fromVersion']);}const _0x149147=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x25e884,_0x149147)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x140663=>{if(_0x140663){for(const _0x29cbb5 of _0x140663)this['setRevisionData']({'id':_0x29cbb5['id'],'createdAt':_0x29cbb5['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x18f3f5=null,from:_0x1c4826=null,to:_0x12835b=null}){_0x1c4826=null!==_0x1c4826?_0x1c4826:_0x18f3f5['fromVersion'],_0x12835b=null!==_0x12835b?_0x12835b:_0x18f3f5['toVersion'];const _0x465392=this['_revisionDataBuilder']['getData'](_0x1c4826,_0x12835b),_0xdd6000={'diffData':_0x465392['diffData'],'authorsIds':_0x465392['authorsIds'],'fromVersion':_0x1c4826,'toVersion':_0x12835b};if(!_0x18f3f5||_0x12835b!==_0x18f3f5['toVersion']){const _0x1dd96a=_0x12835b-0x1,_0x296b8f=this['_source']['history']['getOperation'](_0x1dd96a);_0xdd6000['createdAt']=_0x296b8f&&_0x296b8f['createdAt']||new Date();}if(this['_loadedStateData']&&_0x1c4826===this['_loadedStateData']['fromVersion']){for(const _0x4844bd of this['_loadedStateData']['authors'])_0xdd6000['authorsIds']['includes'](_0x4844bd['id'])||_0xdd6000['authorsIds']['push'](_0x4844bd['id']);}return _0xdd6000;}['_bufferUpdate'](_0x5d23e3,_0xd4b5da,_0x47d1e7){if(this['_bufferedUpdates']['has'](_0x5d23e3)){const _0x2315ce=this['_bufferedUpdates']['get'](_0x5d23e3);_0xd4b5da=_0x47d1e7?{..._0x2315ce,..._0xd4b5da}:{..._0xd4b5da,..._0x2315ce};}this['_bufferedUpdates']['set'](_0x5d23e3,_0xd4b5da);}['setRevisionData'](_0x365637){const _0x59eb7b=this['repository']['getRevision'](_0x365637['id']);if(_0x365637['createdAt']&&(_0x365637['createdAt']=new Date(_0x365637['createdAt'])),_0x365637['authorsIds']){const _0x363169=this['editor']['plugins']['get']('Users');_0x365637['authors']=_0x365637['authorsIds']['map'](_0x30eaac=>_0x363169['getUser'](_0x30eaac));}_0x59eb7b['_update'](_0x365637,!0x0);}['_createInitialRevision'](_0x4f2006){const _0x38f6f5=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x38f6f5)this['_initialRevisionId']=_0x38f6f5['id'];else{const _0x286063=!this['editor']['model']['document']['roots']['find'](_0x5daedd=>this['editor']['model']['hasContent'](_0x5daedd)),_0x54e483=this['editor']['plugins']['get']('Users')['me']['id'],_0x237818=m(this['editor']['locale'],_0x286063?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x4f2006,'to':_0x4f2006,'id':this['_initialRevisionId'],'name':_0x237818,'creatorId':_0x54e483});}}['_createCurrentRevision'](_0x178454){const _0xd85846=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0xd85846),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x178454,'to':_0x178454,'id':_0xd85846,'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'](_0x1b913a,_0x3a3a1c){let _0x55c7a1=this['editor']['config']['get']('initialData'),_0x5d8574=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x55c7a1){_0x55c7a1={};for(const _0x4b5f1e of this['editor']['model']['document']['getRootNames']())_0x55c7a1[_0x4b5f1e]='';}if('string'==typeof _0x55c7a1&&(_0x55c7a1={'main':_0x55c7a1}),void 0x0===_0x5d8574){_0x5d8574={};for(const _0x5079ad of this['editor']['model']['document']['getRootNames']())_0x5d8574[_0x5079ad]={};}let _0x5765e8=!0x1;const _0x114177=Object['keys'](_0x55c7a1),_0x22a361=Object['keys'](_0x1b913a);for(const _0xca27f7 of _0x114177){if(_0x55c7a1[_0xca27f7]!==_0x1b913a[_0xca27f7]&&''!==_0x55c7a1[_0xca27f7]['trim']()){_0x5765e8=!0x0;break;}if(!_0x11b9c0(_0x5d8574[_0xca27f7],_0x3a3a1c[_0xca27f7])&&Object['keys'](_0x5d8574[_0xca27f7])['length']>0x0){_0x5765e8=!0x0;break;}}_0x5765e8||(_0x5765e8=_0x22a361['some'](_0x32d66c=>!this['editor']['model']['document']['getRoot'](_0x32d66c))),_0x5765e8&&_0x117f74('editor-initial-data-replaced-with-revision-data',{'editorData':_0x55c7a1,'editorRootsAttributes':_0x5d8574,'revisionData':_0x1b913a,'revisionRootsAttributes':_0x3a3a1c}),this['editor']['config']['set']('initialData',_0x1b913a),this['editor']['config']['set']('rootsAttributes',_0x3a3a1c);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1e3491=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1e3491['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x5bf0d7){const _0x2ea209=this['repository']['getRevisions']();_0x2ea209['reverse']();let _0x239c06=0x0;for(;_0x239c06<_0x2ea209['length'];){const _0x4c7b0b=_0x2ea209[_0x239c06];if(_0x4c7b0b===this['currentRevision']){_0x239c06++;continue;}if(_0x4c7b0b['id']===this['_initialRevisionId'])break;const _0xb8ec78=_0x5bf0d7['toVersion']-_0x4c7b0b['toVersion']||_0x5bf0d7['fromVersion']-_0x4c7b0b['fromVersion'];if(_0xb8ec78>0x0)break;if(_0xb8ec78<0x0)_0x239c06++;else{if(!_0x5bf0d7['creator']&&_0x4c7b0b['creator'])break;if(_0x4c7b0b['creator']||!_0x5bf0d7['creator']){if(_0x5bf0d7['createdAt']>_0x4c7b0b['createdAt'])break;_0x239c06++;}else _0x239c06++;}}return _0x239c06;}['_getFromVersion'](_0x13c2b3){const _0x480643=this['repository']['getRevisions']();_0x480643['reverse'](),_0x480643['shift']();const _0x41b06a=_0x480643['find'](_0xdf214f=>_0xdf214f['toVersion']<=_0x13c2b3)['toVersion'];return _0x41b06a<this['_startingVersion']?this['_startingVersion']:_0x41b06a;}['_makeRevision']({name:_0x385b03,from:_0x2afa13,to:_0x42b28e,creatorId:_0x1a64ca,id:_0x3d0600}){const _0x273bca=this['buildRevisionData']({'from':_0x2afa13,'to':_0x42b28e});_0x273bca['name']=_0x385b03,_0x273bca['creatorId']=_0x1a64ca,_0x273bca['id']=_0x3d0600;const _0x3259bd=this['addRevisionData'](_0x273bca);return this['adapter']&&this['_bufferUpdate'](_0x273bca['id'],_0x273bca,!0x0),_0x3259bd;}['_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(_0x3ccbef){this['editor']=_0x3ccbef,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'](_0x58fb02){this['source']=_0x58fb02;const _0x22fb18=new Map(),_0x336fcc=new Map(),_0x3a1690=this['editor']['model']['document']['roots']['map'](_0x59e63e=>_0x59e63e['rootName']);for(const _0x273072 of _0x3a1690){const _0x2be858=this['editor']['model']['document']['getRoot'](_0x273072),_0x8e959f=x(_0x2be858);_0x22fb18['set'](_0x273072,_0x8e959f),_0x336fcc['set'](_0x273072,Object['fromEntries'](_0x2be858['getAttributes']()));}const _0x20b3b6=Array['from'](this['editor']['model']['markers'])['map'](_0x485e10=>[_0x485e10['name'],_0x485e10['getRange']()]),_0x3f3004=this['source']['version'];this['_saveMetaData'](_0x3f3004,_0x22fb18,_0x20b3b6,_0x336fcc),this['_startingRevisionId']=this['_revisionId'];const _0x1f627a=new Map(),_0x65eae=new Map();for(const _0x532cf2 of _0x3a1690){const _0x2eb5cb=N(_0x532cf2);_0x1f627a['set'](_0x532cf2,_0x2eb5cb),_0x65eae['set'](_0x532cf2,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x1f627a,[],_0x65eae);}['getData'](_0xd78820,_0x2d91a5){if(this['_lastFrom']===_0xd78820&&this['_lastTo']<=_0x2d91a5)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x2d91a5,!0x0);else{if(!this['_savedMetaData']['has'](_0xd78820)){const _0x2e91a5=this['_getPreviousFrom'](_0xd78820);this['_calculateMetaData'](_0x2e91a5,_0xd78820,!0x1);}this['_calculateMetaData'](_0xd78820,_0x2d91a5,!0x0);}return this['_lastFrom']=_0xd78820,this['_lastTo']=_0x2d91a5,this['_getState']();}['loadState'](_0x554dcc){if(!this['_savedMetaData']['has'](_0x554dcc['fromVersion'])){const _0x38e03d=this['_getPreviousFrom'](_0x554dcc['fromVersion']);this['_calculateMetaData'](_0x38e03d,_0x554dcc['fromVersion'],!0x1);}this['_calculateMetaData'](_0x554dcc['fromVersion'],_0x554dcc['toVersion'],!0x1);const _0x582789=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x554dcc['fromVersion'],this['_lastTo']=_0x554dcc['toVersion'];for(const _0x619f2e in _0x554dcc['diffData']){const _0x43567a=_0x554dcc['diffData'][_0x619f2e]['attachChange'],_0x2ebf50=_0x42245c(_0x554dcc['diffData'][_0x619f2e]['attributesBefore'])||{},_0x6a0b8b=_0x582789['_makeModelFromViewString'](_0x554dcc['diffData'][_0x619f2e]['deletions']);_0x6a0b8b['rootName']=_0x619f2e,_0x6a0b8b['_isAttached']=!_0x43567a||!_0x43567a['isAttached'],_0x6a0b8b['isAttached']=()=>_0x6a0b8b['_isAttached'],this['_baseRoots']['set'](_0x619f2e,_0x6a0b8b),this['_baseRootsAttributes']['set'](_0x619f2e,_0x2ebf50),_0x43567a&&this['_touchedRoots']['set'](_0x619f2e,_0x43567a);const _0x578cda=this['_makeIdsRoot'](_0x6a0b8b);this['_baseIdsRoots']['set'](_0x619f2e,_0x578cda);for(const [_0x22d990,_0x20c49a]of _0x6a0b8b['markers']){if(!_0x22d990['startsWith']('revision:'))continue;const _0x56a32a=_0x22d990['split'](':')[0x2];for(const _0x75eba2 of _0x20c49a['getWalker']({'singleCharacters':!0x0})){const _0x496de3=this['_getVidAttributeName'](_0x75eba2),_0x4ffd9c='elementEnd'==_0x75eba2['type']?_0x75eba2['previousPosition']['path']['slice'](0x0,-0x1):_0x75eba2['previousPosition']['path'],_0x5bcb63=_0x578cda['getNodeByPath'](_0x4ffd9c)['getAttribute'](_0x496de3);this['_touched']['set'](_0x5bcb63,{'userId':_0x56a32a});}_0x6a0b8b['markers']['delete'](_0x22d990);}}this['_startingRevisionId']=this['_revisionId'];const _0x5071cc=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x3fe1a5=>!this['_touched']['has'](_0x3fe1a5));let _0x2ecc9e=0x0;const _0x29e8e4=new Map();for(const _0x5bd839 in _0x554dcc['diffData']){const _0x1ce77a=_0x554dcc['diffData'][_0x5bd839]['attachChange'],_0x277025=_0x42245c(_0x554dcc['diffData'][_0x5bd839]['attributesAfter'])||{},_0x2ea66b=_0x582789['_makeModelFromViewString'](_0x554dcc['diffData'][_0x5bd839]['insertions']);_0x2ea66b['rootName']=_0x5bd839,_0x2ea66b['_isAttached']=!_0x1ce77a||_0x1ce77a['isAttached'],_0x2ea66b['isAttached']=()=>_0x2ea66b['_isAttached'],this['_diffRoots']['set'](_0x5bd839,_0x2ea66b),this['_diffRootsAttributes']['set'](_0x5bd839,_0x277025);const _0x1c556a=this['_makeIdsRoot'](_0x2ea66b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5bd839,_0x1c556a),_0x29e8e4['set'](_0x5bd839,_0x2ea66b['isAttached']()?_0x277025:{});for(const [_0x56f912,_0x529eb3]of _0x2ea66b['markers']){if(!_0x56f912['startsWith']('revision:'))continue;const _0x44e675=_0x56f912['split'](':')[0x2];for(const _0x30da31 of _0x529eb3['getWalker']({'singleCharacters':!0x0})){const _0x2fabc2=this['_getVidAttributeName'](_0x30da31),_0x4cbfd2=this['_revisionId']++,_0x57654a='elementEnd'==_0x30da31['type']?_0x30da31['previousPosition']['path']['slice'](0x0,-0x1):_0x30da31['previousPosition']['path'];_0x1c556a['getNodeByPath'](_0x57654a)['_setAttribute'](_0x2fabc2,_0x4cbfd2),this['_touched']['set'](_0x4cbfd2,{'userId':_0x44e675});}_0x2ea66b['markers']['delete'](_0x56f912);}for(const _0x57501b of this['editor']['model']['createRangeIn'](_0x2ea66b)['getWalker']({'singleCharacters':!0x0})){const _0x2fc4ee=this['_getVidAttributeName'](_0x57501b),_0x4d0434='elementEnd'==_0x57501b['type']?_0x57501b['previousPosition']['path']['slice'](0x0,-0x1):_0x57501b['previousPosition']['path'],_0x16d917=_0x1c556a['getNodeByPath'](_0x4d0434);_0x16d917['getAttribute'](_0x2fc4ee)>0x0||_0x16d917['_setAttribute'](_0x2fc4ee,_0x5071cc[_0x2ecc9e++]);}for(const [_0xade7f2,_0x59e926]of _0x2ea66b['markers'])_0xade7f2['startsWith']('revision:')||this['_markers']['set'](_0xade7f2,_0x59e926);}const {roots:_0x1a630d}=this['_savedMetaData']['get'](_0x554dcc['fromVersion']),{roots:_0x15afd7}=this['_savedMetaData']['get'](_0x554dcc['toVersion']),_0x2c6f33=x(_0x1a630d['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x2c6f33),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2c6f33,Number['NEGATIVE_INFINITY']));const _0x1d6d58=x(_0x15afd7['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x1d6d58),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1d6d58));const _0x3ab804=Array['from'](this['_diffRoots'])['map'](([_0xefee72,_0xa50949])=>[_0xefee72,x(_0xa50949)]);this['_saveMetaData'](this['_lastTo'],_0x3ab804,this['_markers'],_0x29e8e4);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1b22ca,_0xe31349,_0x51dee0,_0x18df0a){const _0x25cb5b=new Map(_0xe31349),_0x45700a=new Map(_0x42245c(_0x18df0a)),_0x3f9b8b=new Map();for(const [_0x1250aa,_0xac4da]of _0x51dee0)_0x3f9b8b['set'](_0x1250aa,{'start':_0xac4da['start']['clone'](),'end':_0xac4da['end']['clone'](),'rootName':_0xac4da['root']['rootName']});this['_savedMetaData']['set'](_0x1b22ca,{'roots':_0x25cb5b,'markers':_0x3f9b8b,'rootsAttributes':_0x45700a});}['_removeMetaData'](_0x22ddfd){this['_savedMetaData']['delete'](_0x22ddfd);}['_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'](_0x190279,_0x1004c5=null){let _0x481b59=null;_0x190279['is']('documentFragment')||(_0x481b59=new _0x5600a1(_0x190279['name'],{'vid_start':null===_0x1004c5?this['_revisionId']++:_0x1004c5++}));const _0x40c247=[];for(const _0x37a506 of _0x190279['getChildren']())if(_0x37a506['is']('element')){_0x40c247['push'](this['_makeIdsRoot'](_0x37a506,_0x1004c5));const _0x35a759=_0x40c247[_0x40c247['length']-0x1];null!==_0x1004c5&&(_0x1004c5=_0x35a759['is']('element','$text')?_0x35a759['getAttribute']('vid')+0x1:_0x35a759['getAttribute']('vid_end')+0x1);}else{for(let _0x40d281=0x0;_0x40d281<_0x37a506['offsetSize'];_0x40d281++)_0x40c247['push'](new _0x5600a1('$text',{'vid':null===_0x1004c5?this['_revisionId']++:_0x1004c5++}));}if(_0x190279['is']('documentFragment')){const _0x14f6aa=N(_0x190279['rootName']);return _0x14f6aa['_insertChild'](0x0,_0x40c247),_0x14f6aa;}return _0x481b59['_setAttribute']('vid_end',null===_0x1004c5?this['_revisionId']++:_0x1004c5++),_0x481b59['_insertChild'](0x0,_0x40c247),_0x481b59;}['_calculateMetaData'](_0x2bb68e,_0x15c460,_0x424630){this['_reset']();const {roots:_0x33c8dd,markers:_0x241027,rootsAttributes:_0xaccbdd}=this['_savedMetaData']['get'](_0x2bb68e);this['_baseRoots']=new Map(_0x33c8dd),this['_baseRootsAttributes']=new Map(_0x42245c(_0xaccbdd));for(const [_0x32e164,_0x3c2ef9]of this['_baseRoots'])if('$graveyard'!==_0x32e164&&(this['_diffRoots']['set'](_0x32e164,x(_0x3c2ef9)),this['_diffRootsAttributes']=new Map(_0x42245c(_0xaccbdd)),_0x424630)){const _0xe8a201=this['_revisionId'];this['_idsRoots']['set'](_0x32e164,this['_makeIdsRoot'](_0x3c2ef9)),this['_baseIdsRoots']['set'](_0x32e164,this['_makeIdsRoot'](_0x3c2ef9,_0xe8a201));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x424630&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x53ac3b,_0x4004da]of _0x241027){const _0x2abeb9=this['_baseRoots']['get'](_0x4004da['rootName']),_0x1568fa=this['_diffRoots']['get'](_0x4004da['rootName']),_0x29ff39=new _0x5d4c4b(this['_fixPosition'](_0x4004da['start'],_0x2abeb9),this['_fixPosition'](_0x4004da['end'],_0x2abeb9)),_0x42e0ce=this['_fixRange'](_0x29ff39,_0x1568fa);_0x2abeb9['markers']['set'](_0x53ac3b,_0x29ff39),this['_markers']['set'](_0x53ac3b,_0x42e0ce);}this['_applyOperations'](_0x2bb68e,_0x15c460,_0x424630);}['_applyOperations'](_0x45b5a8,_0xcdb0f6,_0x325638){for(const _0x37d13f of this['source']['getOperations'](_0x45b5a8,_0xcdb0f6))this['_handleOperation'](_0x37d13f,_0x325638);for(const _0xc0aed2 of this['_diffRoots']['values']())_0xc0aed2['markers']['clear']();for(const [_0x400f74,_0x2d10e5]of this['_markers']){this['_diffRoots']['get'](_0x2d10e5['root']['rootName'])['markers']['set'](_0x400f74,_0x2d10e5['clone']());}const _0x293f9b=new Map(),_0x52c940=new Map();for(const [_0x36d0d7,_0x2ca590]of this['_diffRoots'])_0x293f9b['set'](_0x36d0d7,x(_0x2ca590)),_0x52c940['set'](_0x36d0d7,this['_diffRootsAttributes']['get'](_0x36d0d7));this['_saveMetaData'](_0xcdb0f6,_0x293f9b,this['_markers'],_0x52c940);}['_getPreviousFrom'](_0x221df2){const _0x3bc8a7=Array['from'](this['_savedMetaData']['keys']());_0x3bc8a7['sort']((_0x252429,_0x36924b)=>_0x252429-_0x36924b),_0x3bc8a7['reverse']();for(const _0x5aeecb of _0x3bc8a7)if(_0x5aeecb<_0x221df2)return _0x5aeecb;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2cc720,_0x15d0fc){const _0x2ee1d7=Array['from'](_0x15d0fc['markers'])['map'](([_0x34fe5e,_0x22f07a])=>[_0x34fe5e,this['_fixRange'](_0x22f07a,_0x2cc720)]);_0x2cc720['markers']=new Map(_0x2ee1d7);}['_transformMarkers'](_0x4f7e52){for(const _0x4a28f1 of this['_markers']['values']()){const _0x4cab98=_0x4a28f1['getTransformedByOperation'](_0x4f7e52),_0x11d7c4=_0x5d4c4b['_createFromRanges'](_0x4cab98);_0x4a28f1['start']=_0x11d7c4['start'],_0x4a28f1['end']=_0x11d7c4['end'];}}['_handleOperation'](_0x209a14,_0x58b16c){if('addRoot'!=_0x209a14['type']&&'detachRoot'!=_0x209a14['type']){if('insert'==_0x209a14['type']){const _0x1c17b3=_0x209a14['position']['root']['rootName'];this['_diffRoots']['has'](_0x1c17b3)||(this['_diffRoots']['set'](_0x1c17b3,N(_0x1c17b3,!0x0)),this['_diffRootsAttributes']['set'](_0x1c17b3,{}),_0x58b16c&&this['_idsRoots']['set'](_0x1c17b3,N(_0x1c17b3,!0x0)));}else{if('addRootAttribute'==_0x209a14['type']||'removeRootAttribute'==_0x209a14['type']||'changeRootAttribute'==_0x209a14['type'])return void this['_handleRootAttributeOperation'](_0x209a14);'marker'==_0x209a14['type']&&this['_handleMarkerOperation'](_0x209a14);}if('marker'!==_0x209a14['type']){const _0x534ccf=this['_cloneOperation'](_0x209a14,this['_diffRoots']);_0x534ccf['_execute'](),this['_transformMarkers'](_0x534ccf);}if(_0x58b16c)switch(_0x209a14['type']){case'insert':this['_handleInsertOperation'](_0x209a14);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x209a14);break;case'merge':this['_handleMergeOperation'](_0x209a14);break;case'split':this['_handleSplitOperation'](_0x209a14);}}else this['_handleRootOperation'](_0x209a14,_0x58b16c);}['_cloneOperation'](_0x43fa54,_0x321482){const _0x47d1f3=_0x43fa54['clone']();return _0x47d1f3['_authorId']=_0x43fa54['_authorId'],this['_fixOperation'](_0x47d1f3,_0x321482),_0x47d1f3;}['_getBaseVids'](_0x1bd50b){return _0x1bd50b['map'](_0x598573=>{const _0x96e420=this['_getVidAttributeName'](_0x598573);return Number(_0x598573['item']['getAttribute'](_0x96e420));});}['_generateTape'](_0x482d14,_0x1094f9){if(_0x482d14['is']('element','$text'))_0x1094f9['push']({'item':_0x482d14,'type':'text'});else{_0x482d14['is']('element')&&_0x1094f9['push']({'item':_0x482d14,'type':'elementStart'});for(const _0x40aa3b of _0x482d14['getChildren']())this['_generateTape'](_0x40aa3b,_0x1094f9);_0x482d14['is']('element')&&_0x1094f9['push']({'item':_0x482d14,'type':'elementEnd'});}return _0x1094f9;}['_getState'](){const _0x38d98e=new Map(this['_touched']),_0x2a18ea=new Map(_0x38d98e),_0x4c9845=new Map(),_0x472c9e={'insertions':{},'deletions':{}},_0x317ee8={'insertions':{},'deletions':{}},_0xa502f6=new Map(),_0x2f797d=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x2f797d['delete']('$graveyard');for(const _0x42196d of _0x2f797d){const _0x3eca5a=this['_diffRoots']['get'](_0x42196d)||N(_0x42196d,!0x1),_0x4b1bc7=this['_baseRoots']['get'](_0x42196d)||N(_0x42196d,!0x1);_0x3eca5a['isAttached']()||_0x4b1bc7['isAttached']()?(_0x472c9e['insertions'][_0x42196d]=x(_0x3eca5a),_0x472c9e['deletions'][_0x42196d]=x(_0x4b1bc7),this['_copyMarkers'](_0x472c9e['deletions'][_0x42196d],_0x4b1bc7),this['_copyMarkers'](_0x472c9e['insertions'][_0x42196d],_0x3eca5a),_0x317ee8['insertions'][_0x42196d]=this['_generateTape'](this['_idsRoots']['get'](_0x42196d),[]),_0x317ee8['deletions'][_0x42196d]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x42196d)||N(_0x42196d,!0x1),[])):_0x2f797d['delete'](_0x42196d);}for(const _0x75ac99 of _0x2f797d){const _0x37875c=_0x317ee8['insertions'][_0x75ac99];for(const _0x383aac of _0x37875c){const _0x4c1998=this['_getVidAttributeName'](_0x383aac),_0x2ddcde=_0x383aac['item']['getAttribute'](_0x4c1998);_0x2a18ea['delete'](_0x2ddcde),_0x2ddcde>=this['_startingRevisionId']&&_0x4c9845['set'](_0x2ddcde,_0x38d98e['get'](_0x2ddcde));}}for(const _0x59979e of _0x2f797d){const _0x157a06=_0x317ee8['insertions'][_0x59979e],_0x23ee86=this['_getBaseVids'](_0x317ee8['deletions'][_0x59979e]);let _0x370b4e=0x0;for(const _0x237040 of _0x157a06){const _0x4ba771=this['_getVidAttributeName'](_0x237040),_0x68fb03=_0x237040['item']['getAttribute'](_0x4ba771);if(!_0x4c9845['has'](_0x68fb03)&&!_0xa502f6['has'](_0x68fb03)){if(_0x2a18ea['has'](_0x68fb03))_0x370b4e++;else{if(_0x68fb03!=_0x23ee86[_0x370b4e]){const _0x36237e=_0x38d98e['get'](_0x68fb03)||_0x38d98e['get'](_0x23ee86[_0x370b4e]);for(;_0x68fb03!=_0x23ee86[_0x370b4e];)_0x2a18ea['has'](_0x23ee86[_0x370b4e])||(_0xa502f6['set'](_0x23ee86[_0x370b4e],_0x36237e),_0x38d98e['set'](_0x23ee86[_0x370b4e],_0x36237e)),_0x370b4e++;}_0x370b4e++;}}}}for(const _0x47519e of _0x2f797d){const _0x19e0f6=_0x317ee8['insertions'][_0x47519e];for(const _0x45845d of _0x19e0f6){const _0x571109=this['_getVidAttributeName'](_0x45845d),_0x593758=_0x45845d['item']['getAttribute'](_0x571109);if(_0xa502f6['has'](_0x593758)){const _0x4f8d6e=_0xa502f6['get'](_0x593758);_0x2a18ea['has'](_0x593758)||_0x2a18ea['set'](_0x593758,{..._0x4f8d6e}),_0x4c9845['set'](_0x593758,{..._0x4f8d6e});}}}for(const _0x4b9ab2 of _0x2a18ea['keys']())_0x4b9ab2>=this['_startingRevisionId']&&_0x2a18ea['delete'](_0x4b9ab2);const _0x23469e=new Map();for(const _0x49b25a of _0x2f797d){let _0x38f14e=_0x317ee8['insertions'][_0x49b25a];for(const _0x14d88a of _0x38f14e)if(_0x14d88a['item']['is']('element','tableCell')){const _0x54121d=this['_getVidAttributeName'](_0x14d88a),_0x23e773=_0x14d88a['item']['getAttribute'](_0x54121d);if(_0x4c9845['has'](_0x23e773)){const _0x440fb8=_0x14d88a['item']['parent']['parent']['getAttribute']('vid_start'),_0xf7b694=_0x23469e['get'](_0x440fb8)||new Set();_0xf7b694['add'](_0x4c9845['get'](_0x23e773)['userId']),_0x23469e['set'](_0x440fb8,_0xf7b694);}}_0x38f14e=_0x317ee8['deletions'][_0x49b25a];for(const _0x3b57f7 of _0x38f14e)if(_0x3b57f7['item']['is']('element','tableCell')){const _0x15acfc=this['_getVidAttributeName'](_0x3b57f7),_0x2e1af4=_0x3b57f7['item']['getAttribute'](_0x15acfc);if(_0x2a18ea['has'](_0x2e1af4)){const _0x42f464=_0x3b57f7['item']['parent']['parent']['getAttribute']('vid_start'),_0x413d5e=_0x23469e['get'](_0x42f464)||new Set();_0x413d5e['add'](_0x2a18ea['get'](_0x2e1af4)['userId']),_0x23469e['set'](_0x42f464,_0x413d5e);}}for(const _0x3e35f6 of _0x23469e['keys']())(_0x4c9845['has'](_0x3e35f6)||_0x2a18ea['has'](_0x3e35f6))&&_0x23469e['delete'](_0x3e35f6);}for(const _0x50f418 of _0x2f797d){const _0x8e6b19=_0x317ee8['insertions'][_0x50f418];let _0x5ec796=null,_0x56ff31=null;for(const _0x4c147d of _0x8e6b19){const _0x55f2b2=this['_getVidAttributeName'](_0x4c147d),_0x47be84=_0x4c147d['item']['getAttribute'](_0x55f2b2),_0x5f49bd=_0x23469e['get'](_0x47be84);_0x5f49bd&&'elementStart'==_0x4c147d['type']&&(_0x5ec796=Array['from'](_0x5f49bd)[0x0],_0x56ff31=_0x4c147d['item']['getAttribute']('vid_end')),_0x5ec796&&(_0x2a18ea['set'](_0x47be84,{'userId':_0x5ec796}),_0x4c9845['set'](_0x47be84,{'userId':_0x5ec796})),_0x47be84==_0x56ff31&&(_0x5ec796=null,_0x56ff31=null);}}const _0x304569={},_0x3182ac=new Set();for(const _0xbc7b72 of _0x2f797d){const _0x25cfd0=_0x472c9e['deletions'][_0xbc7b72],_0x2d4fd2=_0x472c9e['insertions'][_0xbc7b72];for(const {userId:_0x238d40}of this['_touchedMarkers']['values']())null!==_0x238d40&&_0x3182ac['add'](_0x238d40);for(const {userId:_0x5b9a77}of this['_touchedRoots']['values']())null!==_0x5b9a77&&_0x3182ac['add'](_0x5b9a77);this['_markChanges'](_0x2d4fd2,_0x317ee8['insertions'][_0xbc7b72],_0x4c9845,'insertion',_0x3182ac),this['_markChanges'](_0x25cfd0,_0x317ee8['deletions'][_0xbc7b72],_0x2a18ea,'deletion',_0x3182ac),_0x304569[_0xbc7b72]={'insertions':this['_prepareViewToSave'](_0x2d4fd2),'deletions':this['_prepareViewToSave'](_0x25cfd0),'attachChange':this['_touchedRoots']['get'](_0xbc7b72)||null,'attributesBefore':_0x42245c(this['_baseRootsAttributes']['get'](_0xbc7b72))||{},'attributesAfter':_0x42245c(this['_diffRootsAttributes']['get'](_0xbc7b72))};}return{'diffData':_0x304569,'authorsIds':Array['from'](_0x3182ac)};}['_processRootBeforeSave'](_0x5b4a2a){for(const [,_0x290b68]of _0x5b4a2a['markers']){const _0x2976b2=_0x290b68['start']['getAncestors']()['filter'](_0x26baa6=>'tableCell'==_0x26baa6['name']);for(const _0x1bb2eb of _0x2976b2)0x1==_0x1bb2eb['childCount']&&_0x1bb2eb['getChild'](0x0)['is']('element','paragraph')&&_0x1bb2eb['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x3e7897){this['_processRootBeforeSave'](_0x3e7897);const _0x5e9b07=this['editor']['data']['toView'](_0x3e7897,{}),_0x28680=Array['from'](_0x5e9b07['getChildren']())['map'](_0x16e23c=>this['_getViewJson'](_0x16e23c));return JSON['stringify'](_0x28680);}['_getViewJson'](_0x9736f6){if(_0x9736f6['is']('$text'))return _0x9736f6['data'];{const _0x1f1732=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x17bc97=_0x9736f6,_0x18ceeb=this['editor']['data']['htmlProcessor']['domConverter'],_0x575677={'type':_0x1f1732['_getTypeCharForViewElement'](_0x17bc97),'name':_0x17bc97['name'],'attributes':Array['from'](_0x17bc97['getAttributes']()),'children':Array['from'](_0x17bc97['getChildren']())['map'](_0x3cac96=>this['_getViewJson'](_0x3cac96))};if(_0x9736f6['is']('uiElement')&&'$comment'!=_0x9736f6['name']){const _0x7039f0=_0x9736f6['render'](_0x18ceeb['domDocument'],_0x18ceeb);_0x575677['children']['push'](_0x7039f0['outerHTML']);}else{if(_0x9736f6['is']('rawElement')){const _0x3b59db=_0x18ceeb['domDocument']['createElement'](_0x17bc97['name']);_0x9736f6['render'](_0x3b59db,_0x18ceeb),_0x575677['children']['push'](_0x3b59db['innerHTML']);}}const _0x1b5017=Array['from'](_0x17bc97['getCustomProperties']());_0x1b5017['length']>0x0&&(_0x575677['customProperties']=_0x1b5017);const _0x4f8b57=_0x17bc97['getFillerOffset']();return null!==_0x4f8b57&&(_0x575677['fillerOffset']=_0x4f8b57),_0x575677;}}['_markChanges'](_0x4bb29f,_0x5c7889,_0x21fadb,_0x43b0bc,_0x412d2a){let _0x2759fa=null,_0x530157=null,_0xa7bced=0x0;const _0xed6b36=this['editor']['model'];for(let _0x47d766=0x0;_0x47d766<_0x5c7889['length'];_0x47d766++){const _0x1937a3=this['_getVidAttributeName'](_0x5c7889[_0x47d766]),_0x362481=_0x5c7889[_0x47d766]['item']['getAttribute'](_0x1937a3),_0x10d65f=_0x21fadb['get'](_0x362481),_0xd5bd34=_0x47d766==_0x5c7889['length']-0x1;(!_0x2759fa&&_0x10d65f&&(_0x2759fa=_0x10d65f,_0x530157=_0x5c7889[_0x47d766]),_0x2759fa&&(!_0x10d65f||_0x10d65f['userId']!=_0x2759fa['userId']))&&(_0x35c840(_0x10d65f,P(_0x530157,_0x4bb29f,_0xed6b36),P(_0x5c7889[_0x47d766],_0x4bb29f,_0xed6b36)),_0x2759fa=_0x10d65f||null,_0x530157=_0x10d65f?_0x5c7889[_0x47d766]:null),_0x2759fa&&_0xd5bd34&&_0x35c840(_0x10d65f,P(_0x530157,_0x4bb29f,_0xed6b36),V(_0x5c7889[_0x47d766],_0x4bb29f,_0xed6b36));}function _0x35c840(_0x5de976,_0x22de7c,_0x2ed6b4){const _0x474942=_0x2759fa['userId'],_0x339432='revision:'+_0x43b0bc+':'+_0x474942+':'+_0xa7bced++,_0x2720c5=_0xed6b36['createRange'](_0x22de7c,_0x2ed6b4);_0x4bb29f['markers']['set'](_0x339432,_0x2720c5),null!==_0x474942&&_0x412d2a['add'](_0x474942);}}['_getVidAttributeName'](_0x270b33){switch(_0x270b33['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x4ab497,_0x2d8332){_0x4ab497['baseVersion']=null;for(const _0x5ccdd5 in _0x4ab497){const _0x210505=_0x4ab497[_0x5ccdd5];if(_0x210505 instanceof _0x4f0201){const _0x21e351=_0x2d8332['get'](_0x210505['root']['rootName']);_0x4ab497[_0x5ccdd5]=this['_fixPosition'](_0x210505,_0x21e351);}if(_0x210505 instanceof _0x5d4c4b){const _0x1fe192=_0x2d8332['get'](_0x210505['root']['rootName']);_0x4ab497[_0x5ccdd5]=this['_fixRange'](_0x210505,_0x1fe192);}'root'===_0x5ccdd5&&(_0x4ab497['root']=_0x2d8332['get'](_0x4ab497['root']['rootName']));}}['_fixRange'](_0x2f844b,_0x3217e6){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2f844b['start'],_0x3217e6),this['_fixPosition'](_0x2f844b['end'],_0x3217e6));}['_fixPosition'](_0x158339,_0xcc08e0){return this['editor']['model']['createPositionFromPath'](_0xcc08e0,_0x158339['path'],_0x158339['stickiness']);}['_handleInsertOperation'](_0x3156bc){const _0x5e66cc=this['_idsRoots']['get'](_0x3156bc['position']['root']['rootName']),_0x479460=this['_fixPosition'](_0x3156bc['position'],_0x5e66cc),_0x5ad7c3=null===_0x3156bc['_authorId']?null:_0x3156bc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x50dee3=_0x479460['parent'],_0x42bd1c=this['_revisionId'],_0x13fa01=[];for(const _0x51c20c of _0x3156bc['nodes'])if(_0x51c20c['is']('element'))_0x13fa01['push'](this['_makeIdsRoot'](_0x51c20c));else{for(let _0x454fb1=0x0;_0x454fb1<_0x51c20c['offsetSize'];_0x454fb1++)_0x13fa01['push'](new _0x5600a1('$text',{'vid':this['_revisionId']++}));}const _0xb7344f=this['_revisionId'];for(let _0x2133fd=_0x42bd1c;_0x2133fd<_0xb7344f;_0x2133fd++)this['_touched']['set'](_0x2133fd,{'userId':_0x5ad7c3});_0x50dee3['_insertChild'](_0x479460['offset'],_0x13fa01);}['_handleMoveOperation'](_0x50f66c){(_0x50f66c=this['_cloneOperation'](_0x50f66c,this['_idsRoots']))['_execute']();const _0x26455c=null===_0x50f66c['_authorId']?null:_0x50f66c['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x51370d=_0x50f66c['getMovedRangeStart'](),_0x55f562=_0x51370d['parent'],_0xef3568=_0x51370d['offset'];!function _0x5227f1(_0x58f4c3,_0x164fda,_0x15f526,_0x839e2e){for(let _0x457ff7=_0x15f526;_0x457ff7<_0x839e2e;_0x457ff7++){const _0x25bd45=_0x164fda['getChild'](_0x457ff7);_0x25bd45['is']('element','$text')?_0x58f4c3['set'](_0x25bd45['getAttribute']('vid'),{'userId':_0x26455c}):(_0x58f4c3['set'](_0x25bd45['getAttribute']('vid_start'),{'userId':_0x26455c}),_0x5227f1(_0x58f4c3,_0x25bd45,0x0,_0x25bd45['childCount']),_0x58f4c3['set'](_0x25bd45['getAttribute']('vid_end'),{'userId':_0x26455c}));}}(this['_touched'],_0x55f562,_0xef3568,_0xef3568+_0x50f66c['howMany']);}['_handleMergeOperation'](_0x114762){const _0x2b7240=null===(_0x114762=this['_cloneOperation'](_0x114762,this['_idsRoots']))['_authorId']?null:_0x114762['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5c2203=_0x114762['targetPosition']['parent'],_0x4dfc41=_0x114762['sourcePosition']['parent'],_0x3d4598=_0x5c2203['getAttribute']('vid_end'),_0x26bc04=_0x4dfc41['getAttribute']('vid_start');_0x5c2203['_setAttribute']('vid_end',_0x4dfc41['getAttribute']('vid_end')),_0x4dfc41['_setAttribute']('vid_end',_0x3d4598),this['_touched']['set'](_0x26bc04,{'userId':_0x2b7240}),this['_touched']['set'](_0x3d4598,{'userId':_0x2b7240}),_0x114762['_execute']();}['_handleSplitOperation'](_0x6c147f){const _0x1e7880=null===(_0x6c147f=this['_cloneOperation'](_0x6c147f,this['_idsRoots']))['_authorId']?null:_0x6c147f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0xed648=_0x6c147f['graveyardPosition'],_0x42d142=_0x6c147f['splitPosition']['parent'];_0x6c147f['_execute']();const _0x19f8f2=_0x42d142['getAttribute']('vid_end'),_0x13f018=_0x6c147f['insertionPosition']['nodeAfter'];if(_0xed648){const _0x3e165e=_0x13f018['getAttribute']('vid_end'),_0x484a0c=_0x42d142['getAttribute']('vid_end');_0x42d142['_setAttribute']('vid_end',_0x3e165e),_0x13f018['_setAttribute']('vid_end',_0x484a0c),this['_touched']['set'](_0x42d142['getAttribute']('vid_end'),{'userId':_0x1e7880}),this['_touched']['set'](_0x13f018['getAttribute']('vid_start'),{'userId':_0x1e7880});}else{const _0x207f0e=this['_revisionId']++,_0x52e2cf=this['_revisionId']++;_0x42d142['_setAttribute']('vid_end',_0x207f0e),_0x13f018['_setAttribute']('vid_start',_0x52e2cf),_0x13f018['_setAttribute']('vid_end',_0x19f8f2),this['_touched']['set'](_0x207f0e,{'userId':_0x1e7880}),this['_touched']['set'](_0x52e2cf,{'userId':_0x1e7880});}}['_handleMarkerOperation'](_0x25bb6a){if(!_0x25bb6a['affectsData'])return;const _0x59720e=(_0x25bb6a=this['_cloneOperation'](_0x25bb6a,this['_diffRoots']))['oldRange']?_0x25bb6a['oldRange']['root']:null,_0x427b2f=_0x25bb6a['newRange']?_0x25bb6a['newRange']['root']:null;_0x59720e&&this['_markers']['delete'](_0x25bb6a['name']),_0x427b2f&&this['_markers']['set'](_0x25bb6a['name'],_0x25bb6a['newRange']['clone']());const _0x471251=null===_0x25bb6a['_authorId']?null:_0x25bb6a['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c6620=_0x25bb6a['name'];if(!this['_touchedMarkers']['has'](_0x4c6620))return void this['_touchedMarkers']['set'](_0x4c6620,{'range':_0x25bb6a['oldRange'],'userId':_0x471251});const _0x67cc8f=this['_touchedMarkers']['get'](_0x4c6620),_0x528c77=_0x67cc8f['range'],_0x14ee75=_0x25bb6a['newRange'];null==_0x528c77&&null==_0x14ee75||_0x528c77&&_0x14ee75&&_0x528c77['isEqual'](_0x14ee75)?this['_touchedMarkers']['delete'](_0x25bb6a['name']):_0x67cc8f['userId']=_0x471251;}['_handleRootOperation'](_0x31f649,_0xf5b4fd){this['_diffRoots']['has'](_0x31f649['rootName'])?this['_diffRoots']['get'](_0x31f649['rootName'])['_isAttached']=_0x31f649['isAdd']:(this['_diffRoots']['set'](_0x31f649['rootName'],N(_0x31f649['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x31f649['rootName'],{}),_0xf5b4fd&&this['_idsRoots']['set'](_0x31f649['rootName'],N(_0x31f649['rootName'],!0x0)));const _0x5a9d88=null===_0x31f649['_authorId']?null:_0x31f649['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x41360c=this['_touchedRoots']['get'](_0x31f649['rootName']);_0x41360c&&_0x41360c['userId']===_0x5a9d88?this['_touchedRoots']['delete'](_0x31f649['rootName']):this['_touchedRoots']['set'](_0x31f649['rootName'],{'userId':_0x5a9d88,'isAttached':_0x31f649['isAdd']});}['_handleRootAttributeOperation'](_0x3a5de4){const _0x33b365=this['_diffRootsAttributes']['get'](_0x3a5de4['root']['rootName']);null===_0x3a5de4['newValue']?delete _0x33b365[_0x3a5de4['key']]:_0x33b365[_0x3a5de4['key']]=_0x3a5de4['newValue'];}}function x(_0x311ecc){const _0x3ecbb0=N(_0x311ecc['rootName'],_0x311ecc['isAttached']());for(const _0x320158 of _0x311ecc['getChildren']()){const _0x13a71b=_0x320158['_clone'](!0x0);_0x3ecbb0['_appendChild'](_0x13a71b);}return _0x3ecbb0;}function N(_0x2ff0dc,_0xc2b142=!0x0){const _0x1e91b8=new _0x15cae0();return _0x1e91b8['rootName']=_0x2ff0dc,_0x1e91b8['_isAttached']=_0xc2b142,_0x1e91b8['isAttached']=()=>_0x1e91b8['_isAttached'],_0x1e91b8;}function P(_0x1e9954,_0x440f81,_0x2f824d){const _0x2b06e8='elementEnd'==_0x1e9954['type']?_0x2f824d['createPositionAt'](_0x1e9954['item'],'end'):_0x2f824d['createPositionBefore'](_0x1e9954['item']);return _0x2f824d['createPositionFromPath'](_0x440f81,_0x2b06e8['path'],_0x2b06e8['stickiness']);}function V(_0x3bf6ea,_0x23f3e4,_0x29ed29){const _0x2ceb4c='elementStart'==_0x3bf6ea['type']?_0x29ed29['createPositionAt'](_0x3bf6ea['item'],0x0):_0x29ed29['createPositionAfter'](_0x3bf6ea['item']);return _0x29ed29['createPositionFromPath'](_0x23f3e4,_0x2ceb4c['path'],_0x2ceb4c['stickiness']);}class me extends/* #__PURE__ -- @preserve */
25
- _0x5e02d5(_0x3cfa23){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x3c66e4,_0x4566cd){super(_0x3c66e4),this['focusTracker']=new _0x231da2(),this['keystrokes']=new _0x3f1f83(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x4566cd),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'](),_0x34d885({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x102d4a=_0x58dc1b=>_0x58dc1b['stopPropagation']();this['keystrokes']['set']('arrowright',_0x102d4a),this['keystrokes']['set']('arrowleft',_0x102d4a),this['keystrokes']['set']('arrowup',_0x102d4a),this['keystrokes']['set']('arrowdown',_0x102d4a);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x48e8db){this['revisionNameInputView']['fieldView']['element']['value']=_0x48e8db['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x55e9d9){const _0x213d3f=new ti(this['locale'],_0x5802d2),_0x5639fb=_0x213d3f['fieldView'];_0x5639fb['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x19f00b=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x55e9d9&&(_0x19f00b+='\x20('+m(this['locale'],'optional')+')'),(_0x213d3f['label']=_0x19f00b,_0x5639fb['on']('input',()=>{this['revisionNameInputValue']=_0x5639fb['element']['value']['trim']();}),_0x213d3f);}}class l extends _0x237363{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x1bdbf2=this['editor'],_0x39a1ca=_0x1bdbf2['plugins']['get']('RevisionTracker');_0x1bdbf2['ui']['componentFactory']['add']('revisionHistory',_0x44ab2b=>{const _0x1ae032=_0x408b44(_0x44ab2b),_0x1f44d3=_0x1ae032['panelView']['children'],_0x34a6aa=new _0x2b1a30(_0x44ab2b),_0x20cbb7=new _0x5a71fd(_0x44ab2b),_0x16758b=this['_createSaveRevisionButton'](_0x58da02),_0x97ed74=new _0x5a71fd(_0x44ab2b),_0x104f8a=this['_createOpenRevisionButton'](_0x58da02);return _0x1ae032['bind']('isEnabled')['to'](_0x39a1ca,'isReady',_0x39a1ca,'isEnabled',_0x1bdbf2,'isReadOnly',(_0x4f49ab,_0x4f125a,_0x5ea518)=>_0x4f49ab&&_0x4f125a&&!_0x5ea518),_0x1ae032['buttonView']['set']({'icon':_0x509fac,'label':m(_0x44ab2b,'Revision\x20history'),'tooltip':!0x0}),_0x16758b['set']({'withText':!0x0,'role':'menuitem'}),_0x104f8a['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x104f8a,'execute',()=>{_0x1ae032['isOpen']=!0x1,_0x1bdbf2['editing']['view']['focus']();},{'priority':'low'}),_0x20cbb7['children']['add'](_0x16758b),_0x97ed74['children']['add'](_0x104f8a),_0x34a6aa['role']='menu',_0x34a6aa['items']['addMany']([_0x20cbb7,_0x97ed74]),_0x1f44d3['add'](_0x34a6aa),_0x1ae032;}),_0x1bdbf2['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x452603=this['editor'],_0x5e001a=_0x452603['locale'],_0x3253a2=_0x452603['plugins']['get']('RevisionTracker'),_0x587b79=new _0x4d1d93(_0x5e001a),_0x315d28=new _0x51a300(_0x5e001a);_0x587b79['bind']('isEnabled')['to'](_0x3253a2,'isReady',_0x3253a2,'isEnabled',_0x452603,'isReadOnly',(_0x4e2a0f,_0x82f85a,_0x4e80c8)=>_0x4e2a0f&&_0x82f85a&&!_0x4e80c8),_0x587b79['buttonView']['set']({'icon':_0x509fac,'label':m(_0x5e001a,'Revision\x20history')});const _0x4e549e=new _0x39d5f5(_0x5e001a,_0x587b79),_0x377c72=this['_createSaveRevisionButton'](_0xda620);_0x377c72['delegate']('execute')['to'](_0x587b79),_0x4e549e['children']['add'](_0x377c72),_0x315d28['items']['add'](_0x4e549e);const _0x304405=new _0x39d5f5(_0x5e001a,_0x587b79),_0xa52233=this['_createOpenRevisionButton'](_0xda620);return _0xa52233['delegate']('execute')['to'](_0x587b79),_0x304405['children']['add'](_0xa52233),_0x315d28['items']['add'](_0x304405),_0x587b79['panelView']['children']['add'](_0x315d28),_0x587b79;}['_createSaveRevisionButton'](_0x1241ae){const _0x5d4694=this['editor'],_0x2351f1=_0x5d4694['plugins']['get']('RevisionTracker'),_0x276176=new _0x1241ae(_0x5d4694['locale']);return _0x276176['set']({'label':m(_0x5d4694['locale'],'Save\x20current\x20revision')}),_0x276176['bind']('isEnabled')['to'](_0x2351f1,'isReady',_0x2351f1,'isEnabled',_0x5d4694,'isReadOnly',(_0x57e764,_0x2cf582,_0xb431c4)=>_0x57e764&&_0x2cf582&&!_0xb431c4),this['listenTo'](_0x276176,'execute',()=>{this['_showDialog']();}),_0x276176;}['_createOpenRevisionButton'](_0x357d99){const _0x1a5bdf=this['editor'],_0x8cb9d6=_0x1a5bdf['plugins']['get']('RevisionTracker'),_0x46eb34=new _0x357d99(_0x1a5bdf['locale']);return _0x46eb34['set']({'label':m(_0x1a5bdf['locale'],'Open\x20revision\x20history')}),_0x46eb34['bind']('isEnabled')['to'](_0x8cb9d6,'isReady',_0x1a5bdf,'isReadOnly',(_0x346a88,_0x5d0acf)=>_0x346a88&&!_0x5d0acf),this['listenTo'](_0x46eb34,'execute',()=>{_0x1a5bdf['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x46eb34;}['_showDialog'](){const _0x4733af=this['editor'],_0x5f1db5=_0x4733af['locale'],_0x497c7f=_0x4733af['plugins']['get']('Dialog'),_0x3a01a8=_0x4733af['plugins']['get']('RevisionTracker');function _0x1cb77a(_0x257f49){_0x4733af['config']['get']('revisionHistory.requireRevisionName')&&''===_0x257f49['revisionName']?_0x257f49['revisionNameInputView']['errorText']=m(_0x5f1db5,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4733af['plugins']['get'](h)['saveRevision']({'name':_0x257f49['revisionName']}),_0x497c7f['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x1cb77a(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x497c7f['show']({'id':'revisionSave','title':m(_0x5f1db5,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x4733af['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x497c7f['hide']()},{'label':m(_0x4733af['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x1751a0){_0x1751a0['bind']('isEnabled')['to'](_0x3a01a8,'isReady',_0x3a01a8,'isEnabled',_0x4733af,'isReadOnly',(_0x227ac6,_0x58d9d7,_0x30b032)=>_0x227ac6&&_0x58d9d7&&!_0x30b032);},'onExecute':()=>_0x1cb77a(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0xa410ec=this['editor'],_0x3ba963=_0xa410ec['locale'];this['_saveRevisionFormView']=new me(_0x3ba963,_0xa410ec['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x3cfa23{['changeId'];['_model'];constructor(_0x21a77e,_0x4716fc){super(_0x21a77e),this['_model']=_0x4716fc,this['changeId']=_0x4716fc['id'];const _0x43d0f9=this['bindTemplate'],_0x1627ef=m(_0x21a77e,_0x4716fc['data']['isSuggestion']?'Suggested\x20by':'add'==_0x4716fc['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x4716fc['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x43d0f9['to']('type',_0x40ed0a=>'ck-revision-change__'+_0x40ed0a)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x1627ef}]},{'text':'\x20'+_0x4716fc['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
- _0x56e76d(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x2c30c8){super(),this['id']=_0x2c30c8['id']||_0x9068c(),this['author']=_0x2c30c8['author'],this['type']=_0x2c30c8['type'],this['data']=_0x2c30c8['data']||{},this['rootName']=_0x2c30c8['rootName'],this['set']('createdAt',_0x2c30c8['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(_0xbf9d77,_0x3ddac2){this['newRevisionId']=_0xbf9d77,this['oldRevisionId']=_0x3ddac2,this['changes']=new _0x17dfa9();}['_setChanges'](_0x3164eb){for(const _0x1e6028 of _0x3164eb)this['changes']['add'](_0x1e6028);}}class u extends _0x237363{['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[_0x2e9ed3,_0x28c0b9,S,$];}constructor(_0x349ecd){super(_0x349ecd),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',(_0xc907a7,_0x55988e,_0x4bfbac)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x2f8a87=>{for(const _0x13a607 of this['editor']['editing']['view']['document']['roots'])_0x4bfbac?_0x2f8a87['removeClass']('ck-editor__editable__overlay',_0x13a607):_0x2f8a87['addClass']('ck-editor__editable__overlay',_0x13a607);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x199ae5=>null!==_0x199ae5),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x22639b,_0x5e7354,_0x3e7cf7)=>_0x22639b&&_0x3e7cf7?_0x5e7354['changes']['getIndex'](_0x3e7cf7):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x1f8d63,_0x1a86c4)=>_0x1f8d63?_0x1a86c4['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x28c0b9);}['init'](){const _0x147d38=this['editor'],_0x1a90c9=new ot(_0x147d38,{'direction':'backward'}),_0x1fcf93=new ot(_0x147d38,{'direction':'forward'});(_0x147d38['commands']['add']('showPreviousChange',_0x1a90c9),_0x147d38['commands']['add']('showNextChange',_0x1fcf93),_0x147d38['commands']['add']('restoreRevision',new nt(_0x147d38)),this['on']('change:numberOfChanges',()=>{_0x1a90c9['refresh'](),_0x1fcf93['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x147d38['enableReadOnlyMode']('revision-viewer'),_0x147d38['plugins']['has']('WidgetToolbarRepository'))&&_0x147d38['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0xf9e116){return await this['_utils']['loadRevisionData'](_0xf9e116,this['adapter']),this['_utils']['getRevisionDocumentData'](_0xf9e116);}async['getRevisionRootsAttributes'](_0x1778fe){return await this['_utils']['loadRevisionData'](_0x1778fe,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1778fe);}async['compare'](_0x3eb717,_0x317949,_0x7421f8=!0x1){if(!this['isEnabled'])return;const _0x3abe08=this['diff'],_0x385653=this['repository'],_0x412bd5='string'==typeof _0x3eb717?_0x385653['getRevision'](_0x3eb717):_0x3eb717,_0x5d6b5e='string'==typeof _0x317949?_0x385653['getRevision'](_0x317949):_0x317949,_0x56c97c=_0x412bd5['id'],_0x2a5589=_0x5d6b5e?_0x5d6b5e['id']:null;if(!_0x7421f8&&this['diff']&&this['diff']['newRevisionId']===_0x56c97c&&this['diff']['oldRevisionId']===_0x2a5589)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x56c97c,_0x2a5589);const _0x1e5e70=this['_getRevisionsRange'](_0x412bd5,_0x5d6b5e,!0x0)['map'](_0x5aebb5=>this['_utils']['loadRevisionData'](_0x5aebb5,this['adapter']));return _0x1e5e70['push'](new Promise(_0x5083d3=>{setTimeout(_0x5083d3,0x14);})),Promise['all'](_0x1e5e70)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x507351=this['_getDiff'](_0x56c97c,_0x2a5589);for(const _0x591933 of _0x507351['changes'])this['_changeIdToChange']['set'](_0x591933['id'],_0x591933);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x479c93=>{for(const _0x2e2dc4 of this['editor']['model']['document']['getRootNames']())_0x479c93['detachRoot'](_0x2e2dc4);for(const _0x342a11 of Object['keys'](_0x507351['model'])){const _0xb29649=_0x479c93['addRoot'](_0x342a11);for(const _0x1990b2 of Object['keys'](_0x507351['attributes'][_0x342a11]))_0x479c93['setAttribute'](_0x1990b2,_0x507351['attributes'][_0x342a11][_0x1990b2],_0xb29649);_0x479c93['insert'](_0x507351['model'][_0x342a11],_0xb29649,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x507351['changes'])),this['isReady']=!0x0;})['catch'](_0x4a4d96=>{console['error'](_0x4a4d96),this['_cleanUp'](),_0x3abe08&&(this['diff']=_0x3abe08),this['isReady']=!0x0;});}['addRevisionData'](_0x23cb04,_0x1465a1){const _0x53596e=this['repository']['createRevision'](_0x23cb04);return _0x53596e['on']('_update',(_0x24cbcf,_0x534a87,_0x4326a9)=>_0x1465a1(_0x534a87,_0x4326a9,_0x53596e)),this['repository']['addRevision'](_0x53596e),_0x53596e;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x26fa88=>{for(const _0x213ddd of this['editor']['model']['document']['getRootNames']())_0x26fa88['detachRoot'](_0x213ddd);});}['_sortAndFilterDiffChanges'](_0x45df6c){const _0x5cf20f=[],_0x4f06e6=new Map();for(const _0x1e228b of this['editor']['model']['document']['getRootNames']()){const _0x573936=this['editor']['editing']['view']['getDomRoot'](_0x1e228b);if(!_0x573936)continue;const _0x3b13bd=_0x573936['getClientRects']()['item'](0x0);_0x3b13bd&&(_0x5cf20f['push'](_0x1e228b),_0x4f06e6['set'](_0x1e228b,_0x3b13bd));}return _0x5cf20f['sort']((_0x5b8f06,_0xd0ae94)=>{const _0x4e1131=_0x4f06e6['get'](_0x5b8f06),_0x1cc20e=_0x4f06e6['get'](_0xd0ae94);return _0x4e1131['y']-_0x1cc20e['y']||_0x4e1131['x']-_0x1cc20e['x'];}),(_0x45df6c=_0x45df6c['filter'](_0xb08bfa=>_0x5cf20f['includes'](_0xb08bfa['rootName'])))['sort']((_0x46728e,_0xde0c06)=>_0x5cf20f['indexOf'](_0x46728e['rootName'])-_0x5cf20f['indexOf'](_0xde0c06['rootName'])),_0x45df6c;}['_makeTape'](_0x10daae){const _0x106507=Array['from'](_0x10daae['markers'])['filter'](([_0x5518e2,_0x27a648])=>_0x5518e2['startsWith']('revision:')&&!_0x27a648['isCollapsed']),_0x291147=Array['from'](this['editor']['model']['createRangeIn'](_0x10daae)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x106507['length'])for(const _0x3b924f of _0x291147){const [_0x481426,_0x461a99]=_0x106507[0x0],[,_0x5c5d89,_0x4fbb5f]=_0x481426['split'](':');if(_0x461a99['end']['isEqual'](_0x3b924f['nextPosition'])&&_0x106507['shift'](),(_0x3b924f['previousPosition']['isEqual'](_0x461a99['start'])||_0x3b924f['previousPosition']['isAfter'](_0x461a99['start']))&&('insertion'==_0x5c5d89?_0x3b924f['isAdded']={'userId':_0x4fbb5f}:'deletion'==_0x5c5d89&&(_0x3b924f['isRemoved']={'userId':_0x4fbb5f})),0x0==_0x106507['length'])break;}return _0x291147;}['_refreshStartEndIndex'](_0x201ebb){const _0x3c8d28=new Map();for(let _0x19e5d6=0x0;_0x19e5d6<_0x201ebb['length'];_0x19e5d6++)'text'===_0x201ebb[_0x19e5d6]['type']?(_0x201ebb[_0x19e5d6]['item']['startIndex']=_0x19e5d6,_0x201ebb[_0x19e5d6]['item']['endIndex']=_0x19e5d6):('elementStart'===_0x201ebb[_0x19e5d6]['type']?_0x201ebb[_0x19e5d6]['item']['startIndex']=_0x19e5d6:'elementEnd'===_0x201ebb[_0x19e5d6]['type']&&(_0x201ebb[_0x19e5d6]['item']['endIndex']=_0x19e5d6),_0x3c8d28['set'](_0x201ebb[_0x19e5d6]['id'],_0x19e5d6));for(const _0x16cd19 of _0x3c8d28['values']())'elementStart'===_0x201ebb[_0x16cd19]['type']?_0x201ebb[_0x16cd19]['item']['endIndex']=_0x3c8d28['get'](_0x201ebb[_0x16cd19]['pairId']):'elementEnd'===_0x201ebb[_0x16cd19]['type']&&(_0x201ebb[_0x16cd19]['item']['startIndex']=_0x3c8d28['get'](_0x201ebb[_0x16cd19]['pairId']));}['_processTape'](_0x193256){for(let _0x536371=0x0;_0x536371<_0x193256['length'];_0x536371++){if('elementStart'===_0x193256[_0x536371]['type'])_0x193256[_0x536371]['item']['startIndex']=_0x536371;else{if('elementEnd'===_0x193256[_0x536371]['type']){_0x193256[_0x536371]['item']['endIndex']=_0x536371;const _0x34eca7=_0x193256[_0x536371]['item']['startIndex'];_0x193256[_0x34eca7]['pairId']=_0x193256[_0x536371]['id'],_0x193256[_0x536371]['pairId']=_0x193256[_0x34eca7]['id'];}else _0x193256[_0x536371]['item']['startIndex']=_0x536371,_0x193256[_0x536371]['item']['endIndex']=_0x536371,_0x193256[_0x536371]['pairId']=null;}_0x193256[_0x536371]['markersStart']||(_0x193256[_0x536371]['markersStart']=[],_0x193256[_0x536371]['markersEnd']=[]);}}['_markInsertions'](_0xee594,_0x3177df){const _0xc88cf0=_0xee594['filter'](_0x323fba=>!_0x323fba['isAdded']);for(let _0x11b913=0x0;_0x11b913<_0x3177df['length'];_0x11b913++)_0x3177df[_0x11b913]['isAdded']&&(_0xc88cf0[_0x11b913]['isAdded']=_0x3177df[_0x11b913]['isAdded']);}['_getDiff'](_0x5ecd39,_0x54b559=null){const _0x32447a=this['repository']['getRevision'](_0x5ecd39),_0xd19be0=_0x54b559?this['repository']['getRevision'](_0x54b559):null,_0x3932d1=this['_getRevisionsRange'](_0x32447a,_0xd19be0),_0x27e18f=_0x3932d1[_0x3932d1['length']-0x1],_0x206d17=new Map(),_0x53e30f={'model':{},'attributes':{},'changes':[]},_0x30ab81=new Set(),_0x205d1e=new Map();for(let _0x2460bc=_0x3932d1['length']-0x1;_0x2460bc>=0x0;_0x2460bc--){const _0x27cfc5=_0x3932d1[_0x2460bc];for(const _0xbad139 of Object['keys'](_0x27cfc5['diffData']))if(_0x27cfc5['diffData'][_0xbad139]['attachChange']){const _0x4f94b8=_0x27cfc5['diffData'][_0xbad139]['attachChange'];_0x4f94b8['isAttached']?(_0x30ab81['add'](_0xbad139),_0x205d1e['has'](_0xbad139)&&_0x205d1e['get'](_0xbad139)['userId']==_0x4f94b8['userId']?_0x205d1e['delete'](_0xbad139):_0x205d1e['set'](_0xbad139,_0x4f94b8)):_0x205d1e['has'](_0xbad139)?(_0x30ab81['delete'](_0xbad139),_0x205d1e['delete'](_0xbad139)):(_0x30ab81['add'](_0xbad139),_0x205d1e['set'](_0xbad139,_0x4f94b8));}else _0x30ab81['add'](_0xbad139);}for(const _0x132285 of _0x30ab81){const _0x2c9a15=_0x205d1e['has'](_0x132285)&&!_0x205d1e['get'](_0x132285)['isAttached'];let _0x2f9062=_0x2c9a15?_0x3932d1['length']-0x1:0x0;const _0x320d38=_0x2c9a15?-0x1:0x1;for(;_0x3932d1[_0x2f9062];){const _0x112f69=_0x3932d1[_0x2f9062];if(_0x112f69['diffData'][_0x132285]){const _0x2e5379=_0x2c9a15?_0x112f69['diffData'][_0x132285]['attributesBefore']:_0x112f69['diffData'][_0x132285]['attributesAfter'];_0x53e30f['attributes'][_0x132285]=_0x2e5379?_0x42245c(_0x2e5379):{};break;}_0x2f9062+=_0x320d38;}}for(const _0xf5f6ca of _0x3932d1){_0xf5f6ca['model']={};for(const _0x18a5a1 of _0xf5f6ca['authors'])_0x206d17['set'](_0x18a5a1['id'],_0x18a5a1);for(const _0x292885 of _0x30ab81){const _0x5c7ffb=_0xf5f6ca['diffData'][_0x292885]?_0xf5f6ca['diffData'][_0x292885]['insertions']:'[]',_0x55ea36=_0xf5f6ca['diffData'][_0x292885]?_0xf5f6ca['diffData'][_0x292885]['deletions']:'[]';_0xf5f6ca['model'][_0x292885]={'insertions':this['_utils']['_makeModelFromViewString'](_0x5c7ffb),'deletions':this['_utils']['_makeModelFromViewString'](_0x55ea36)};}}for(const _0x5332a8 of _0x30ab81){let _0x46cf2d=null,_0x244830=0x0;const _0x5a2933=new Map(Array['from'](_0x32447a['model'][_0x5332a8]['insertions']['markers'])['filter'](([_0x3920be])=>!_0x3920be['startsWith']('revision:')));let _0x2363ee=0x0;for(const _0x5a70d5 of _0x3932d1){const _0xfe4167=this['_makeTape'](_0x5a70d5['model'][_0x5332a8]['insertions']);_0x5a70d5==_0x32447a?(_0x46cf2d=_0xfe4167,_0x244830=_0x46cf2d['length'],_0x46cf2d['forEach'](_0x110527=>{_0x110527['id']=_0x2363ee++;}),this['_processTape'](_0x46cf2d)):this['_markInsertions'](_0x46cf2d,_0xfe4167);const _0x4a7341=_0x46cf2d['filter'](_0x404c2d=>!_0x404c2d['isAdded'])['map'](_0x49b7f3=>_0x49b7f3['id']);let _0x41cb16=0x0;const _0x3b613b=this['_makeTape'](_0x5a70d5['model'][_0x5332a8]['deletions']);_0x3b613b['forEach'](_0x12ef14=>{_0x12ef14['isRemoved']?_0x12ef14['id']=_0x244830++:_0x12ef14['id']=_0x4a7341[_0x41cb16++];}),this['_processTape'](_0x3b613b),this['_setDistance'](_0x46cf2d,'isAdded'),this['_setDistance'](_0x3b613b,'isRemoved'),_0x5a70d5==_0x32447a&&this['_markMarkers'](_0x46cf2d,_0x5a2933),_0x46cf2d=this['_joinTapes'](_0x46cf2d,_0x3b613b),this['_refreshStartEndIndex'](_0x46cf2d),this['_setDistance'](_0x46cf2d,'isRemoved');}_0x46cf2d=_0x46cf2d['filter'](_0x5a6474=>!(_0x5a6474['isAdded']&&_0x5a6474['isRemoved']));const _0x1b99df=new Map(_0x27e18f['model'][_0x5332a8]['deletions']['markers']),_0x2f11c3=new Set(_0x5a2933['keys']());for(const _0x4a4d4b of _0x1b99df['keys']())_0x2f11c3['delete'](_0x4a4d4b);this['_markSuggestions'](_0x46cf2d,_0x2f11c3),this['_fixObsoleteTags'](_0x46cf2d),_0x46cf2d=this['_removeMissingPairs'](_0x46cf2d),_0x46cf2d=this['_markMismatchedRemovedTags'](_0x46cf2d),_0x46cf2d=this['_removeUnsupportedChanges'](_0x46cf2d);const {root:_0x3a7350,changes:_0x50667b}=this['_makeModelFromTape'](_0x46cf2d,_0x206d17,_0x5332a8);_0x53e30f['model'][_0x5332a8]=_0x3a7350;const _0x42d56d=_0x205d1e['get'](_0x5332a8);if(_0x42d56d){const _0x80958a=_0x206d17['get'](_0x42d56d['userId']),_0x22a3d2=new G({'author':_0x80958a,'type':_0x42d56d['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x5332a8});_0x50667b['unshift'](_0x22a3d2),_0x53e30f['attributes'][_0x5332a8]['revisionHistoryAttachChange']=_0x22a3d2['id'];}_0x53e30f['changes']=_0x53e30f['changes']['concat'](_0x50667b);}return _0x53e30f;}['_markMarkers'](_0x4a9cdc,_0x33dcb9){for(let _0x54aa20=0x0;_0x54aa20<_0x4a9cdc['length'];_0x54aa20++)for(const [_0x4eeeaa,_0x17823c]of _0x33dcb9)!_0x17823c['isCollapsed']&&_0x17823c['start']['isEqual'](_0x4a9cdc[_0x54aa20]['previousPosition'])&&_0x4a9cdc[_0x54aa20]['markersStart']['push'](_0x4eeeaa),_0x17823c['end']['isEqual'](_0x4a9cdc[_0x54aa20]['nextPosition'])&&_0x4a9cdc[_0x54aa20]['markersEnd']['push'](_0x4eeeaa);}['_joinTapes'](_0x4d3b6c,_0x2a17a8){let _0x2d27d1=[],_0x3cb922=0x0,_0x220648=0x0;for(;_0x3cb922<_0x4d3b6c['length']||_0x220648<_0x2a17a8['length'];){const _0x1f78f4=_0x4d3b6c[_0x3cb922]||{},_0x10a74b=_0x2a17a8[_0x220648]||{};if(_0x1f78f4['id']==_0x10a74b['id'])_0x3cb922++,_0x220648++,_0x2d27d1['push'](_0x1f78f4);else{if(_0x10a74b['isRemoved']&&_0x1f78f4['isAdded']){const {commonTape:_0x4eb007,iEnd:_0x22f72c,jEnd:_0x25b138}=this['_threeWayMerge'](_0x4d3b6c,_0x3cb922,_0x2a17a8,_0x220648);_0x2d27d1=_0x2d27d1['concat'](_0x4eb007),_0x3cb922=_0x22f72c,_0x220648=_0x25b138;}else _0x10a74b['isRemoved']?(_0x220648++,_0x2d27d1['push'](_0x10a74b)):(_0x3cb922++,_0x2d27d1['push'](_0x1f78f4));}}return _0x2d27d1;}['_markSuggestions'](_0xb0d7f9,_0x357f49){const _0x425434=[];for(let _0x1063ab=0x0;_0x1063ab<_0xb0d7f9['length'];_0x1063ab++){for(let _0x698cc0=0x0;_0x698cc0<_0xb0d7f9[_0x1063ab]['markersStart']['length'];_0x698cc0++){const _0xbe527d=_0xb0d7f9[_0x1063ab]['markersStart'][_0x698cc0];if(!_0x357f49['has'](_0xbe527d))continue;const {group:_0x5d0ecb,type:_0x5290ec,authorId:_0xbe79bb}=_0x19a4e8(_0xbe527d);'revision-suggestion'!=_0x5d0ecb||'insertion'!=_0x5290ec&&'deletion'!=_0x5290ec||(_0x425434['unshift']({'type':_0x5290ec,'name':_0xbe527d,'userId':_0xbe79bb}),_0xb0d7f9[_0x1063ab]['markersStart']['splice'](_0x698cc0,0x1),_0x698cc0--);}_0x5cd799(_0xb0d7f9[_0x1063ab]);for(let _0x1c6e92=0x0;_0x1c6e92<_0xb0d7f9[_0x1063ab]['markersEnd']['length'];_0x1c6e92++){const _0x58f01b=_0xb0d7f9[_0x1063ab]['markersEnd'][_0x1c6e92];if(!_0x357f49['has'](_0x58f01b))continue;const {group:_0x404f21,type:_0x16b083}=_0x19a4e8(_0x58f01b);if('revision-suggestion'!=_0x404f21||'insertion'!=_0x16b083&&'deletion'!=_0x16b083)continue;_0xb0d7f9[_0x1063ab]['markersEnd']['splice'](_0x1c6e92,0x1),_0x1c6e92--;const _0x17a369=_0x425434['findIndex'](_0x48afec=>_0x48afec['name']==_0x58f01b);_0x17a369>-0x1&&_0x425434['splice'](_0x17a369,0x1);}}function _0x19a4e8(_0x51a08a){const _0x435261=_0x51a08a['split'](':');return{'group':_0x435261[0x0],'type':_0x435261[0x1],'subType':_0x435261['length']>=0x5?_0x435261[0x2]:null,'id':_0x435261['length']<0x5?_0x435261[0x2]:_0x435261[0x3],'authorId':_0x435261['length']<0x5?_0x435261[0x3]:_0x435261[0x4],'markerCount':0x6==_0x435261['length']?_0x435261[0x5]:null};}function _0x5cd799(_0x3d9ee8){for(let _0x2eebf4=0x0;_0x2eebf4<_0x425434['length'];_0x2eebf4++){if(_0x3d9ee8['isAdded']&&'insertion'==_0x425434[_0x2eebf4]['type']&&_0x3d9ee8['isAdded']['userId']==_0x425434[_0x2eebf4]['userId'])return _0x3d9ee8['isAddSuggestion']=_0x425434[_0x2eebf4],void delete _0x3d9ee8['isAdded'];if(!_0x3d9ee8['isAdded']&&!_0x3d9ee8['isRemoved']&&'deletion'==_0x425434[_0x2eebf4]['type'])return void(_0x3d9ee8['isRemoveSuggestion']=_0x425434[_0x2eebf4]);}}}['_setDistance'](_0xc9c6b7,_0x5bec81){let _0x322f76=0x0,_0x2722e2=!0x1;const _0x565d9f=new Map();for(const _0x2c1b02 of _0xc9c6b7)_0x2c1b02[_0x5bec81]?_0x2722e2&&(_0x322f76++,_0x2722e2=!0x1):(_0x322f76++,_0x2722e2=!0x0),_0x565d9f['set'](_0x2c1b02['id'],_0x322f76);for(let _0x173ef8=0x0;_0x173ef8<_0xc9c6b7['length'];_0x173ef8++){if('isRemoved'==_0x5bec81&&_0xc9c6b7[_0x173ef8]['isAdded']||'isAdded'==_0x5bec81&&_0xc9c6b7[_0x173ef8]['isRemoved'])continue;if('text'==_0xc9c6b7[_0x173ef8]['type']){_0xc9c6b7[_0x173ef8]['distance']=0x0;continue;}const _0xa8d6e1=_0x565d9f['get'](_0xc9c6b7[_0x173ef8]['pairId']),_0x354d38=_0x565d9f['get'](_0xc9c6b7[_0x173ef8]['id']);_0xc9c6b7[_0x173ef8]['distance']=_0xa8d6e1-_0x354d38;}}['_getRevisionsRange'](_0x61b9b,_0x362ae5,_0x201e21=!0x1){const _0x5baf5=[];let _0x5b80ff=this['repository']['getIndex'](_0x61b9b),_0x85b61=this['repository']['getIndex'](_0x362ae5);for(-0x1==_0x85b61&&(_0x85b61=this['repository']['_revisions']['length'],_0x201e21=!0x1);_0x5b80ff<_0x85b61;)_0x5baf5['push'](this['repository']['getRevision'](_0x5b80ff)),_0x5b80ff++;return _0x201e21&&_0x5baf5['push'](this['repository']['getRevision'](_0x5b80ff)),_0x5baf5;}['_threeWayMerge'](_0x3c9a47,_0x1a0d2d,_0x4436a2,_0x35cd13){const _0x54581b=this['editor']['model']['schema'];let _0x53860e=_0x1a0d2d;for(;_0x3c9a47[_0x53860e]&&_0x3c9a47[_0x53860e]['isAdded'];)_0x53860e++;let _0x40e7d8=_0x35cd13;for(;_0x4436a2[_0x40e7d8]&&_0x4436a2[_0x40e7d8]['isRemoved'];)_0x40e7d8++;_0x2c0444(_0x3c9a47,_0x1a0d2d,_0x53860e),_0x2c0444(_0x4436a2,_0x35cd13,_0x40e7d8);const _0x231ec3=_0x4436a2['slice'](_0x35cd13,_0x40e7d8)['concat'](_0x3c9a47['slice'](_0x1a0d2d,_0x53860e));return _0x231ec3['sort']((_0x294135,_0x5aa8dd)=>_0x294135['side']!=_0x5aa8dd['side']?_0x294135['side']-_0x5aa8dd['side']:_0x294135['level']!=_0x5aa8dd['level']?_0x294135['level']-_0x5aa8dd['level']:_0x294135['distance']!=_0x5aa8dd['distance']?_0x5aa8dd['distance']-_0x294135['distance']:!!_0x294135['isAdded']!=!!_0x5aa8dd['isAdded']?-0x1==_0x294135['side']||0x0==_0x294135['side']?_0x294135['isAdded']?-0x1:0x1:_0x294135['isAdded']?0x1:-0x1:_0x294135['index']-_0x5aa8dd['index']),{'commonTape':_0x231ec3,'iEnd':_0x53860e,'jEnd':_0x40e7d8};function _0x2c0444(_0x2bd10a,_0x1d5d29,_0x5bae8b){let _0x702bc7=-0x1,_0x4290bd=Number['POSITIVE_INFINITY'],_0x553510=!0x0;for(let _0x4f45a2=_0x1d5d29;_0x4f45a2<_0x5bae8b;_0x4f45a2++)if(_0x54581b['isInline'](_0x2bd10a[_0x4f45a2]['item'])||(_0x553510=!0x1),_0x2bd10a[_0x4f45a2]['item']['startIndex']<_0x1d5d29&&(_0x702bc7=_0x4f45a2),_0x2bd10a[_0x4f45a2]['item']['endIndex']>=_0x5bae8b){_0x4290bd=_0x4f45a2;break;}_0x553510&&(_0x702bc7=_0x5bae8b-0x1);for(let _0xcfbbc0=_0x1d5d29;_0xcfbbc0<_0x5bae8b;_0xcfbbc0++)_0x2bd10a[_0xcfbbc0]['side']=_0xcfbbc0<=_0x702bc7?-0x1:_0xcfbbc0<_0x4290bd?0x0:0x1,_0x2bd10a[_0xcfbbc0]['index']=_0xcfbbc0;let _0x363fca=0x0;for(let _0x15f798=_0x1d5d29;_0x15f798<=_0x702bc7;_0x15f798++)0x0==_0x2bd10a[_0x15f798]['distance']?_0x2bd10a[_0x15f798]['level']=_0x363fca:(_0x363fca++,_0x2bd10a[_0x15f798]['level']=_0x363fca,_0x363fca++);for(let _0xc12db8=_0x1d5d29;_0xc12db8<_0x5bae8b;_0xc12db8++)0x0==_0x2bd10a[_0xc12db8]['side']&&(_0x2bd10a[_0xc12db8]['level']=_0x363fca);_0x363fca=0x0;for(let _0x1911ee=_0x5bae8b-0x1;_0x1911ee>=_0x4290bd;_0x1911ee--)0x0==_0x2bd10a[_0x1911ee]['distance']?_0x2bd10a[_0x1911ee]['level']=_0x363fca:(_0x363fca--,_0x2bd10a[_0x1911ee]['level']=_0x363fca,_0x363fca--);}}['_fixObsoleteTags'](_0x170310){const _0x36cd61=new Map(),_0x233d11=this['editor']['model']['schema'];for(let _0x19dad9=0x1;_0x19dad9<_0x170310['length'];_0x19dad9++){let _0x14f6ea,_0x53eb67,_0x1568db;const _0x8c079b=_0x170310[_0x19dad9],_0x5dede7=_0x170310[_0x19dad9-0x1];if('text'==_0x8c079b['type'])continue;if(_0x8c079b['type']!=_0x5dede7['type'])continue;if(!_0x233d11['isBlock'](_0x5dede7['item'])||_0x233d11['isLimit'](_0x5dede7['item']))continue;if(!_0x233d11['isBlock'](_0x8c079b['item'])||_0x233d11['isLimit'](_0x8c079b['item']))continue;if((_0x170310[_0x19dad9]['isAdded']||_0x170310[_0x19dad9]['isAddSuggestion'])&&_0x170310[_0x19dad9-0x1]['isRemoved'])_0x14f6ea=_0x170310[_0x19dad9],_0x53eb67=_0x170310[_0x19dad9-0x1],_0x1568db=_0x19dad9-0x1;else{if(!_0x170310[_0x19dad9]['isRemoved']||!_0x170310[_0x19dad9-0x1]['isAdded']&&!_0x170310[_0x19dad9-0x1]['isAddSuggestion'])continue;_0x14f6ea=_0x170310[_0x19dad9-0x1],_0x53eb67=_0x170310[_0x19dad9],_0x1568db=_0x19dad9;}const _0x4d07e9=_0x14f6ea['level']==_0x53eb67['level'],_0x337325=Math['abs'](_0x14f6ea['level'])<Math['abs'](_0x53eb67['level'])&&0x0==_0x53eb67['distance'];(_0x4d07e9||_0x337325)&&(_0x36cd61['set'](_0x53eb67['id'],_0x14f6ea['id']),_0x170310['splice'](_0x1568db,0x1),_0x19dad9--,_0x14f6ea['isAdded']=!0x1);}for(let _0xd3293=0x0;_0xd3293<_0x170310['length'];_0xd3293++)_0x36cd61['has'](_0x170310[_0xd3293]['pairId'])&&(_0x170310[_0xd3293]['pairId']=_0x36cd61['get'](_0x170310[_0xd3293]['pairId']));}['_removeMissingPairs'](_0x3126ca){const _0x539ddf=new Set(_0x3126ca['map'](_0x447e12=>_0x447e12['id']));for(let _0x53ce6c=0x0;_0x53ce6c<_0x3126ca['length'];_0x53ce6c++)_0x539ddf['has'](_0x3126ca[_0x53ce6c]['pairId'])||0x0==_0x3126ca[_0x53ce6c]['distance']||(_0x3126ca[_0x53ce6c]['isIncorrect']=!0x0);return _0x3126ca['filter'](_0x377d64=>!_0x377d64['isIncorrect']);}['_markMismatchedRemovedTags'](_0xf3ba35){const _0x15fcef=new Set();for(let _0x2a61c1=0x0;_0x2a61c1<_0xf3ba35['length'];_0x2a61c1++){if(_0x15fcef['has'](_0xf3ba35[_0x2a61c1]['id'])&&_0xf3ba35[_0x2a61c1]['isRemoved']&&(_0xf3ba35[_0x2a61c1]['isIncorrect']=!0x0),_0xf3ba35[_0x2a61c1]['isIncorrect'])continue;if(0x0==_0xf3ba35[_0x2a61c1]['distance'])continue;if('elementStart'!=_0xf3ba35[_0x2a61c1]['type'])continue;if(null==_0xf3ba35[_0x2a61c1]['pairId'])continue;let _0x1b02a9=_0x2a61c1+0x1,_0x4977eb=0x0;for(;_0xf3ba35[_0x1b02a9]['id']!=_0xf3ba35[_0x2a61c1]['pairId'];)'elementStart'==_0xf3ba35[_0x1b02a9]['type']?_0x4977eb++:'elementEnd'==_0xf3ba35[_0x1b02a9]['type']&&_0x4977eb--,_0x1b02a9++;if(0x0!=_0x4977eb){if(_0xf3ba35[_0x2a61c1]['isRemoved'])_0xf3ba35[_0x2a61c1]['isIncorrect']=!0x0;else{for(;_0x1b02a9!=_0x2a61c1;)_0xf3ba35[_0x1b02a9]['isRemoved']&&0x0!=_0xf3ba35[_0x1b02a9]['distance']&&(_0xf3ba35[_0x1b02a9]['isIncorrect']=!0x0,_0x15fcef['add'](_0xf3ba35[_0x1b02a9]['pairId'])),_0x1b02a9--;}}}return _0xf3ba35['filter'](_0x3b39fe=>!_0x3b39fe['isIncorrect']);}['_removeUnsupportedChanges'](_0x48901c){const _0x396b37=this['editor']['model']['schema'];for(let _0x3e239c=0x0;_0x3e239c<_0x48901c['length'];_0x3e239c++){if(!(_0x48901c[_0x3e239c]['isAdded']||_0x48901c[_0x3e239c]['isAddSuggestion']||_0x48901c[_0x3e239c]['isRemoved']||_0x48901c[_0x3e239c]['isRemoveSuggestion']))continue;if(0x0==_0x48901c[_0x3e239c]['distance'])continue;const _0x21931e=_0x48901c[_0x3e239c]['item'];_0x396b37['isBlock'](_0x21931e)||_0x396b37['isLimit'](_0x21931e)||(_0x48901c[_0x3e239c]['isAdded']&&delete _0x48901c[_0x3e239c]['isAdded'],_0x48901c[_0x3e239c]['isAddSuggestion']&&delete _0x48901c[_0x3e239c]['isAddSuggestion'],_0x48901c[_0x3e239c]['isRemoveSuggestion']&&delete _0x48901c[_0x3e239c]['isRemoveSuggestion'],_0x48901c[_0x3e239c]['isRemoved']&&(_0x48901c[_0x3e239c]['isIncorrect']=!0x0));}return _0x48901c['filter'](_0x4d91f6=>!_0x4d91f6['isIncorrect']);}['_makeModelFromTape'](_0x240ec5,_0x4f10e4,_0x1fbd27){const _0x482fe5=new _0x15cae0(),_0x146b05=[],_0x555f33=new Map(),_0x3bca73=this['editor']['model'],_0x28eaa1=_0x3bca73['schema'],_0x53f236=[_0x482fe5],_0x3f50fc={},_0x1996b8={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x5dc4bd=null;const _0x568e05=[0x0];for(let _0x18cc49=0x0;_0x18cc49<_0x240ec5['length'];_0x18cc49++)if('elementStart'===_0x240ec5[_0x18cc49]['type']){_0x240ec5[_0x18cc49]['previousPosition']=_0x3bca73['createPositionFromPath'](_0x482fe5,_0x568e05);const _0x52148d=new _0x5600a1(_0x240ec5[_0x18cc49]['item']['name'],_0x240ec5[_0x18cc49]['item']['getAttributes']());_0x53f236[0x0]['_appendChild'](_0x52148d),_0x568e05['push'](0x0),_0x53f236['unshift'](_0x52148d),_0x240ec5[_0x18cc49]['nextPosition']=_0x3bca73['createPositionFromPath'](_0x482fe5,_0x568e05);}else'elementEnd'===_0x240ec5[_0x18cc49]['type']?(_0x53f236['shift'](),_0x240ec5[_0x18cc49]['previousPosition']=_0x3bca73['createPositionFromPath'](_0x482fe5,_0x568e05),_0x568e05['pop'](),_0x568e05[_0x568e05['length']-0x1]++,_0x240ec5[_0x18cc49]['nextPosition']=_0x3bca73['createPositionFromPath'](_0x482fe5,_0x568e05)):(_0x240ec5[_0x18cc49]['previousPosition']=_0x3bca73['createPositionFromPath'](_0x482fe5,_0x568e05),_0x5dc4bd?_0x5dc4bd['_data']+=_0x240ec5[_0x18cc49]['item']['data']:_0x5dc4bd=new _0x260b60(_0x240ec5[_0x18cc49]['item']['data'],_0x240ec5[_0x18cc49]['item']['getAttributes']()),_0x240ec5[_0x18cc49+0x1]&&'text'===_0x240ec5[_0x18cc49+0x1]['type']&&_0x3d6bba(_0x5dc4bd,_0x240ec5[_0x18cc49+0x1]['item'])||(_0x53f236[0x0]['_appendChild'](_0x5dc4bd),_0x5dc4bd=null),_0x568e05[_0x568e05['length']-0x1]+=_0x240ec5[_0x18cc49]['item']['offsetSize'],_0x240ec5[_0x18cc49]['nextPosition']=_0x3bca73['createPositionFromPath'](_0x482fe5,_0x568e05));for(let _0x13bcf9=0x0;_0x13bcf9<_0x240ec5['length'];_0x13bcf9++){const _0x480772=_0x240ec5[_0x13bcf9]['previousPosition'],_0x18edc3=_0x240ec5[_0x13bcf9]['nextPosition'];for(const _0x1be8bb of _0x240ec5[_0x13bcf9]['markersStart'])_0x555f33['set'](_0x1be8bb,{'start':_0x480772,'end':null});_0x366cb1('isRemoveSuggestion',_0x13bcf9,_0x480772,_0x18edc3),_0x366cb1('isAddSuggestion',_0x13bcf9,_0x480772,_0x18edc3),_0x366cb1('isRemoved',_0x13bcf9,_0x480772,_0x18edc3),_0x366cb1('isAdded',_0x13bcf9,_0x480772,_0x18edc3);for(const _0x25f36c of _0x240ec5[_0x13bcf9]['markersEnd']){const _0x24483f=_0x555f33['get'](_0x25f36c);_0x24483f?_0x24483f['end']=_0x18edc3:_0x555f33['set'](_0x25f36c,{'start':_0x18edc3,'end':_0x18edc3});}}for(const [_0x14a2e7,_0x2b838a]of _0x555f33){const _0x1ee846=this['editor']['model']['createRange'](_0x2b838a['start'],_0x2b838a['end']);_0x482fe5['markers']['set'](_0x14a2e7,_0x1ee846);}return _0x146b05['sort']((_0x369583,_0x462048)=>{const _0x48dfb7=_0x482fe5['markers']['get']('revision:'+_0x369583['id']),_0xe8d5ee=_0x482fe5['markers']['get']('revision:'+_0x462048['id']);return _0x48dfb7['start']['isBefore'](_0xe8d5ee['start'])?-0x1:_0x48dfb7['start']['isAfter'](_0xe8d5ee['start'])?0x1:_0x48dfb7['end']['isBefore'](_0xe8d5ee['end'])?-0x1:_0x48dfb7['end']['isAfter'](_0xe8d5ee['end'])?0x1:'add'===_0x369583['type']?-0x1:0x1;}),{'root':_0x482fe5,'changes':_0x146b05};function _0x366cb1(_0xd7a48b,_0x3869a7,_0x261f7d,_0x356ffb){const _0x94eb50=!!_0x240ec5[_0x3869a7][_0xd7a48b],_0x5b045e=_0x94eb50?_0x240ec5[_0x3869a7][_0xd7a48b]['userId']:null,_0x5e8ff8=_0x3869a7===_0x240ec5['length']-0x1,_0x5b43ff=_0x1996b8[_0xd7a48b][0x0],_0x437272=_0x28eaa1['isObject'](_0x240ec5[_0x3869a7]['item']);!_0x3f50fc[_0xd7a48b]&&_0x94eb50?_0x3f50fc[_0xd7a48b]={'start':_0x261f7d,'tapeItem':_0x240ec5[_0x3869a7],'userId':_0x5b045e,'type':_0xd7a48b}:_0x3f50fc[_0xd7a48b]&&!_0x94eb50?(_0x3f50fc[_0xd7a48b]['end']=_0x261f7d,_0x16bd30(_0x3f50fc[_0xd7a48b]),_0x3f50fc[_0xd7a48b]=null):_0x3f50fc[_0xd7a48b]&&_0x94eb50&&_0x3f50fc[_0xd7a48b]['userId']!==_0x5b045e&&(_0x3f50fc[_0xd7a48b]['end']=_0x261f7d,_0x5b43ff&&_0x5b43ff['userId']===_0x3f50fc[_0xd7a48b]['userId']||_0x16bd30(_0x3f50fc[_0xd7a48b]),_0x3f50fc[_0xd7a48b]={'start':_0x261f7d,'tapeItem':_0x240ec5[_0x3869a7],'userId':_0x5b045e,'type':_0xd7a48b}),_0x3f50fc[_0xd7a48b]&&_0x437272&&('elementStart'!==_0x240ec5[_0x3869a7]['type']||_0x5b43ff&&_0x5b43ff['userId']===_0x5b045e||_0x1996b8[_0xd7a48b]['unshift']({'userId':_0x5b045e,'object':_0x240ec5[_0x3869a7]['item'],'change':_0x3f50fc[_0xd7a48b]}),'elementEnd'===_0x240ec5[_0x3869a7]['type']&&_0x5b43ff&&_0x5b43ff['object']===_0x240ec5[_0x3869a7]['item']&&(_0x1996b8[_0xd7a48b]['shift'](),_0x3f50fc[_0xd7a48b]=_0x5b43ff['change'])),_0x3f50fc[_0xd7a48b]&&_0x5e8ff8&&(_0x3f50fc[_0xd7a48b]['end']=_0x356ffb,_0x16bd30(_0x3f50fc[_0xd7a48b]),_0x3f50fc[_0xd7a48b]=null);}function _0x16bd30({start:_0x4acda5,end:_0x300bdc,tapeItem:_0x3a0747,userId:_0x5ec602,type:_0x3c3274}){const _0x144236=_0x3a0747['item'],_0xc6cdd2=_0x3bca73['schema']['isBlock'](_0x144236)&&!_0x3bca73['schema']['isLimit'](_0x144236),_0x4d406b=_0x4acda5['nodeAfter']==_0x300bdc['parent']&&_0x300bdc['isAtStart'];if(_0xc6cdd2&&_0x4d406b)return;const _0x4a4a00=_0x3bca73['createRange'](_0x4acda5,_0x300bdc),_0x44b90a=_0x4f10e4['get'](_0x5ec602),_0xb7c75a=new G({'author':_0x44b90a,'type':'isAdded'==_0x3c3274||'isAddSuggestion'==_0x3c3274?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x3c3274||'isRemoveSuggestion'==_0x3c3274},'createdAt':new Date(),'rootName':_0x1fbd27});_0x146b05['push'](_0xb7c75a),_0x482fe5['markers']['set']('revision:'+_0xb7c75a['id'],_0x4a4a00);}function _0x3d6bba(_0x2c0a23,_0x3f4408){const _0x1d3e13=_0x2c0a23['getAttributes'](),_0x4bc517=_0x3f4408['getAttributes']();for(const _0xc5a014 of _0x1d3e13){if(_0xc5a014[0x1]!==_0x3f4408['getAttribute'](_0xc5a014[0x0]))return!0x1;_0x4bc517['next']();}return _0x4bc517['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x57dc04=>{const _0x481555=_0x57dc04['markerName']['split'](':')[0x1],_0x87cfff=this['_getChangeFromId'](_0x481555);if(!_0x87cfff)return null;const _0x2ec748='add'==_0x87cfff['type']?'insertion':'deletion',_0x15491b=['ck-suggestion-marker','ck-suggestion-marker-'+_0x2ec748];return _0x87cfff['data']['isSuggestion']&&_0x15491b['push']('ck-suggestion-marker-'+_0x2ec748+'-new'),this['activeChange']==_0x87cfff&&_0x15491b['push']('ck-suggestion-marker--active'),{'classes':_0x15491b,'attributes':{'data-change-id':_0x481555}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x3c58bd=>{_0x3c58bd['on']('element:pre',(_0x119775,_0x28be38,_0x109814)=>{const _0x2cfc24=_0x28be38['viewItem']['getChild'](0x0);if(!_0x2cfc24||!_0x2cfc24['is']('element','code'))return;if(!_0x109814['consumable']['consume'](_0x2cfc24,{'attributes':['vid_start','vid_end']}))return;const _0x493f41=_0x28be38['modelRange']['start']['nodeAfter'];_0x109814['writer']['setAttribute']('vid_start',_0x2cfc24['getAttribute']('vid_start'),_0x493f41),_0x109814['writer']['setAttribute']('vid_end',_0x2cfc24['getAttribute']('vid_end'),_0x493f41);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x306aa4=>{_0x306aa4['on']('element',(_0x2d54e3,_0x316e73,_0x399f08)=>{if(!_0x399f08['consumable']['consume'](_0x316e73['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x316e73['modelRange']['isCollapsed'])return;const _0x305d00=_0x316e73['modelRange']['start']['nodeAfter'];_0x305d00['hasAttribute']('vid_start')||_0x305d00['hasAttribute']('vid')||(_0x399f08['writer']['setAttribute']('vid_start',_0x316e73['viewItem']['getAttribute']('vid_start'),_0x305d00),_0x399f08['writer']['setAttribute']('vid_end',_0x316e73['viewItem']['getAttribute']('vid_end'),_0x305d00));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x433ac7=>_0x433ac7['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x32080d,[,_0x26d9ea])=>{['vid_start','vid_end','vid']['includes'](_0x26d9ea)&&(_0x32080d['return']=!0x0,_0x32080d['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x137bfe=>{_0x137bfe['on']('attribute:vid',(_0x49e4db,_0x4e1bb5,_0x3a541c)=>{if('\x20'!=_0x4e1bb5['item']['data']||_0x4e1bb5['item']['parent']['maxOffset']>0x1)return;if(!_0x3a541c['consumable']['consume'](_0x4e1bb5['item'],_0x49e4db['name']))return;const _0x336410=_0x3a541c['writer'],_0x261946=_0x3a541c['mapper']['toViewRange'](_0x4e1bb5['range']);_0x336410['wrap'](_0x261946,_0x336410['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x5102a1){const _0x59a26e=_0x5102a1['plugins']['get']('RevisionViewer');return(_0x13a152,_0x2d8a2f,_0x1b0882)=>{const _0x75ac67=_0x2d8a2f['markerName']['split'](':')[0x1],_0x4400b7=_0x59a26e['_getChangeFromId'](_0x75ac67);if(!_0x4400b7)return null;const _0x23654c='add'==_0x4400b7['type']?'split':'merge';if(!_0x1b0882['consumable']['test'](_0x2d8a2f['markerRange'],_0x13a152['name']))return;const _0x3004ba=_0x2d8a2f['markerRange']['getWalker'](),_0x28c18f=_0x2d8a2f['markerRange']['start'],_0x35051c=_0x5102a1['model']['schema'];let _0xa25acb=null,_0x2012e3=null,_0x13397d=!0x1,_0x3ef06b=!0x1;for(const _0x563f63 of _0x3004ba){const _0x1413a0=_0x563f63['item'];_0x13397d=_0x13397d||_0x35051c['isContent'](_0x1413a0);const _0x188a5a=_0x1b0882['mapper']['toViewElement'](_0x1413a0);if(_0x188a5a&&_0x188a5a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x563f63['type']&&(_0x35051c['isBlock'](_0x1413a0)&&!_0x35051c['isLimit'](_0x1413a0)&&(_0x1413a0['nextSibling']||_0x28c18f['isAtEnd']?_0xa25acb&&_0xa25acb['parent']==_0x1413a0||(_0xa25acb=_0x1413a0,_0x3e41c1(_0x563f63['previousPosition']),_0x3ef06b=!0x0):_0x2012e3=_0x2012e3||_0x563f63['previousPosition']));}function _0x3e41c1(_0x3358f9){const _0x45b2e0=_0x1b0882['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x23654c}),_0x1195fd=_0x1b0882['mapper']['toViewPosition'](_0x3358f9);_0x4400b7['data']['isSuggestion']&&_0x1b0882['writer']['addClass']('ck-suggestion-marker-'+_0x23654c+'-new',_0x45b2e0),_0x59a26e['activeChange']==_0x4400b7&&_0x1b0882['writer']['addClass']('ck-suggestion-marker--active',_0x45b2e0),_0x1b0882['writer']['insert'](_0x1195fd,_0x45b2e0),_0x1b0882['mapper']['bindElementToMarker'](_0x45b2e0,_0x2d8a2f['markerName']);}_0x13397d||_0x3ef06b||!_0x2012e3||_0x3e41c1(_0x2012e3);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0xdd16d3,_0x1f7dba,_0xc78fdb)=>{const _0x33f97a=_0xc78fdb['mapper']['markerNameToElements'](_0x1f7dba['markerName']);if(_0x33f97a){for(const _0x25b8e4 of _0x33f97a)(_0x25b8e4['hasClass']('ck-suggestion-marker-split')||_0x25b8e4['hasClass']('ck-suggestion-marker-merge'))&&(_0xc78fdb['mapper']['unbindElementFromMarkerName'](_0x25b8e4,_0x1f7dba['markerName']),_0xc78fdb['writer']['remove'](_0x25b8e4));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x59c531,_0x5636a0,_0xa22c9c)=>{const _0x4e11e6=_0x5636a0['markerName']['split'](':')[0x1],_0x4b07a6=this['_getChangeFromId'](_0x4e11e6);if(!_0x4b07a6)return null;const _0x61aab8='add'==_0x4b07a6['type']?'split':'merge';if(_0xa22c9c['consumable']['test'](_0x5636a0['markerRange'],_0x59c531['name']))for(const _0xe7e2f7 of _0x5636a0['markerRange']['getItems']()){if(!_0xe7e2f7['is']('element','softBreak'))continue;const _0x2fa5ec=_0xa22c9c['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x61aab8}),_0x3353b3=_0xa22c9c['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0xe7e2f7));_0x4b07a6['data']['isSuggestion']&&_0xa22c9c['writer']['addClass']('ck-suggestion-marker-'+_0x61aab8+'-new',_0x2fa5ec),this['activeChange']==_0x4b07a6&&_0xa22c9c['writer']['addClass']('ck-suggestion-marker--active',_0x2fa5ec),_0xa22c9c['writer']['insert'](_0x3353b3,_0x2fa5ec),_0xa22c9c['mapper']['bindElementToMarker'](_0x2fa5ec,_0x5636a0['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x59174a=>{for(const _0x1d0cad of this['editor']['model']['document']['getRootNames']()){const _0x295ddc=this['editor']['model']['document']['getRoot'](_0x1d0cad),_0x153c8f=this['editor']['editing']['view']['document']['getRoot'](_0x1d0cad);if(_0x153c8f){const _0x44a712=_0x295ddc['getAttribute']('revisionHistoryAttachChange');if(_0x59174a['removeAttribute']('data-change-id',_0x153c8f),_0x59174a['removeClass']('ck-revision-history-root-add',_0x153c8f),_0x59174a['removeClass']('ck-revision-history-root-remove',_0x153c8f),_0x59174a['removeClass']('ck-revision-history-root--active',_0x153c8f),_0x44a712){const _0x2c8571=this['_getChangeFromId'](_0x44a712);if(!_0x2c8571)return null;_0x59174a['setAttribute']('data-change-id',_0x44a712,_0x153c8f),_0x59174a['addClass']('ck-revision-history-root-'+_0x2c8571['type'],_0x153c8f),this['activeChange']==_0x2c8571&&_0x59174a['addClass']('ck-revision-history-root--active',_0x153c8f);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x533233=>'revision-comment:'+_0x533233,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x476aa4=>'revision-suggestion:'+_0x476aa4,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x238c97=>({'name':'suggestion:'+_0x238c97,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0xc07d94=>{const _0x3def0a=_0xc07d94['markerName']['split'](':')[0x1];return'insertion'!=_0x3def0a&&'deletion'!=_0x3def0a?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3def0a]};}}),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',(_0x1396e6,_0x3f8787,_0x5aab16)=>{const _0x4123c7=_0x5aab16['mapper']['markerNameToElements'](_0x3f8787['markerName']);if(_0x4123c7){for(const _0x329a75 of _0x4123c7)_0x329a75['is']('uiElement')&&(_0x5aab16['mapper']['unbindElementFromMarkerName'](_0x329a75,_0x3f8787['markerName']),_0x5aab16['writer']['remove'](_0x329a75));}},{'priority':'high'});}['_getChangeFromId'](_0x262c79){return this['_changeIdToChange']['get'](_0x262c79);}['_getViewForChange'](_0x35579d){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x35579d),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1f1041,_0x349de9,_0x207730,_0x150ebd)=>{_0x150ebd&&this['_balloon']['remove'](_0x150ebd),_0x207730&&(this['_balloon']['add']({'view':_0x207730,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x32cacc=this['editor']['editing'],_0x5881da=this['_getChangeFromId'](_0x207730['changeId']);let _0x18c461;if(_0x5881da['data']['isOnRoot']){const _0x13a65a=_0x32cacc['view']['getDomRoot'](_0x5881da['rootName']);_0x18c461=Array['from'](_0x13a65a['getClientRects']());}else{const _0x3225eb=this['editor']['model']['markers']['get']('revision:'+_0x207730['changeId']);_0x18c461=Array['from'](_0x32cacc['mapper']['markerNameToElements'](_0x3225eb['name']))['map'](_0x5b7adb=>_0x32cacc['view']['domConverter']['mapViewToDom'](_0x5b7adb))['map'](_0x1420c9=>Array['from'](_0x1420c9['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x18c461[0x0];return _0x18c461['find'](_0x22297a=>_0x22297a['top']-0x3<=this['_activeViewTarget']['y']&&_0x22297a['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x22297a['left']-0x3<=this['_activeViewTarget']['x']&&_0x22297a['right']+0x3>=this['_activeViewTarget']['x'])||_0x18c461[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x1f5f3e,_0x22c717,_0x19e68d,_0x46049d)=>{this['activeView']=_0x19e68d?this['_getViewForChange'](_0x19e68d):null,this['editor']['model']['change'](()=>{const _0x110a0e=this['editor']['editing'];_0x46049d&&(_0x46049d['data']['isOnRoot']?_0x110a0e['view']['change'](_0x5b9ff1=>{_0x5b9ff1['removeClass']('ck-revision-history-root--active',_0x110a0e['view']['document']['getRoot'](_0x46049d['rootName']));}):_0x110a0e['reconvertMarker']('revision:'+_0x46049d['id'])),_0x19e68d&&(_0x19e68d['data']['isOnRoot']?_0x110a0e['view']['change'](_0x602e30=>{_0x602e30['addClass']('ck-revision-history-root--active',_0x110a0e['view']['document']['getRoot'](_0x19e68d['rootName']));}):_0x110a0e['reconvertMarker']('revision:'+_0x19e68d['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x26aef1,_0x17c1b7)=>{if(this['activeChange'])return;const _0x599abe=this['_findChangeIdFromDomTarget'](_0x17c1b7['target']),_0x4c1fa2=this['_changeIdToChange']['get'](_0x599abe);_0x4c1fa2?(this['_activeViewTarget']={'x':_0x17c1b7['domEvent']['x'],'y':_0x17c1b7['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x4c1fa2)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x2da82f,_0x134b7f)=>{const _0x552786=this['_findChangeIdFromDomTarget'](_0x134b7f['target']),_0xfe3f7=this['_changeIdToChange']['get'](_0x552786);_0xfe3f7?(this['_activeViewTarget']={'x':_0x134b7f['domEvent']['x'],'y':_0x134b7f['domEvent']['y']},_0xfe3f7===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0xfe3f7):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x284237){do{const _0x467e75=_0x284237['getAttribute']('data-change-id');if(_0x467e75)return _0x467e75;_0x284237=_0x284237['parent'];}while(_0x284237);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x579b3c=>{for(const _0x380aa6 of this['editor']['model']['markers'])_0x579b3c['removeMarker'](_0x380aa6);});}}function Q(_0x47bf57,_0x505529){return(_0x1a5755,_0x4c603a,_0x31b944)=>{if(!_0x31b944['consumable']['test'](_0x4c603a['markerRange'],_0x1a5755['name']))return;const _0x16b4c8=_0x4c603a['markerRange']['getWalker'](),_0x582f25=_0x4c603a['markerRange']['start'],_0x5735b8=_0x47bf57['model']['schema'];let _0x3ab713=null,_0x3b52f6=null,_0x2b4319=!0x1,_0x1643c5=!0x1;for(const _0xfa4264 of _0x16b4c8){const _0x28702b=_0xfa4264['item'];_0x2b4319=_0x2b4319||_0x5735b8['isContent'](_0x28702b);const _0x1d9a61=_0x31b944['mapper']['toViewElement'](_0x28702b);if(_0x1d9a61&&_0x1d9a61['getCustomProperty']('addHighlight'))return;'elementEnd'==_0xfa4264['type']&&(_0x5735b8['isBlock'](_0x28702b)&&!_0x5735b8['isLimit'](_0x28702b)&&(_0x28702b['nextSibling']||_0x582f25['isAtEnd']?_0x3ab713&&_0x3ab713['parent']==_0x28702b||(_0x3ab713=_0x28702b,_0x2e6691(_0xfa4264['previousPosition']),_0x1643c5=!0x0):_0x3b52f6=_0x3b52f6||_0xfa4264['previousPosition']));}function _0x2e6691(_0x4633fc){const _0x32def0=_0x31b944['mapper']['toViewPosition'](_0x4633fc),_0x3ad943=_0x31b944['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x505529});_0x31b944['writer']['insert'](_0x32def0,_0x3ad943),_0x31b944['mapper']['bindElementToMarker'](_0x3ad943,_0x4c603a['markerName']);}_0x2b4319||_0x1643c5||!_0x3b52f6||_0x2e6691(_0x3b52f6);};}class nt extends _0x15d826{constructor(_0x46fa76){super(_0x46fa76);const _0x5e7097=_0x46fa76['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x5e7097,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5e7097,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3c093c=this['editor'],_0x4a5cf9=_0x3c093c['plugins']['get'](u),_0x545211=_0x4a5cf9['isReady']?_0x4a5cf9['diff']['newRevisionId']:null;_0x3c093c['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x545211);}['refresh'](){const {isReady:_0x346e24,isEnabled:_0x1c30f4,repository:_0x2088f,diff:_0x23fbe2}=this['editor']['plugins']['get'](u),_0x56bb70=_0x23fbe2&&_0x2088f['getLaterVisibleRevision'](_0x23fbe2['newRevisionId']);this['isEnabled']=_0x346e24&&_0x1c30f4&&Boolean(_0x56bb70);}}class ot extends _0x15d826{['_step'];constructor(_0x4c541e,{direction:_0x239823}){super(_0x4c541e);const _0x4093d0=_0x4c541e['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x239823?0x1:-0x1,this['listenTo'](_0x4093d0,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x4093d0,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x4093d0,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x36c16b=this['editor'],_0x3cd399=_0x36c16b['plugins']['get'](u),{isNavigationMode:_0x275123,currentChangeNumber:_0x29b4db}=_0x3cd399;let _0x4b2f45;if(_0x3cd399['activeChange']=_0x275123?_0x3cd399['diff']['changes']['get'](_0x29b4db+this['_step']):_0x3cd399['diff']['changes']['first'],_0x3cd399['activeChange']['data']['isOnRoot'])_0x4b2f45=_0x36c16b['editing']['view']['getDomRoot'](_0x3cd399['activeChange']['rootName']);else{const _0x71b4b6=_0x36c16b['model']['markers']['get']('revision:'+_0x3cd399['activeChange']['id']);_0x4b2f45=_0x189758(_0x36c16b['editing'],_0x71b4b6);}_0x3813c7({'target':_0x4b2f45,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x21f39d,currentChangeNumber:_0x4f79f7,numberOfChanges:_0x457701,isReady:_0x4d3668,isEnabled:_0x7d84ca}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x7d84ca&&_0x4d3668&&_0x457701)&&(!_0x21f39d||(0x1===this['_step']?_0x4f79f7<_0x457701-0x1:_0x4f79f7>0x0));}}class Ri extends _0x3cfa23{constructor(_0x2272e4){super(_0x2272e4);const _0x4bbb1e=this['bindTemplate'],_0x29ef05=new _0x58da02(_0x2272e4),_0x18411c=new _0x58da02(_0x2272e4);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',(_0x515f64,_0x3ca90b)=>_0x515f64&&_0x3ca90b>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x221fcf,_0x17ea8a,_0x5c68c7,_0x1219c8)=>{if(!_0x221fcf)return m(_0x2272e4,'Loading...');if(!_0x5c68c7)return m(_0x2272e4,'No\x20changes');const _0x27ee60=m(_0x2272e4,'NUMBER_OF_CHANGES',_0x5c68c7);return _0x1219c8?m(_0x2272e4,'X_OF_Y_CHANGES',[_0x17ea8a+0x1,_0x5c68c7]):_0x27ee60;}),_0x29ef05['set']({'label':m(_0x2272e4,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x2d2d82}),_0x18411c['set']({'label':m(_0x2272e4,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0xc8bb2a}),_0x29ef05['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x18411c['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x29ef05['on']('execute',()=>this['fire']('execute','backward')),_0x18411c['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',_0x4bbb1e['if']('_isStatusLabelVisible','ck-hidden',_0x2f97af=>!_0x2f97af)]},'children':[{'text':_0x4bbb1e['to']('isNavigationMode',_0x4cfea7=>_0x4cfea7?m(_0x2272e4,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x2272e4,'Total')+':\x20')}]},{'text':_0x4bbb1e['to']('_statusText')}]},new _0x27d032(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x29ef05,_0x18411c]}]});}}const ge='ck-editor__editable__loading-overlay';class ji extends _0x237363{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x191e49=this['editor']['editing']['view'];_0x191e49['change'](_0x5c8226=>{for(const _0x3116e9 of _0x191e49['document']['roots'])_0x5c8226['addClass'](ge,_0x3116e9);});}['hide'](){const _0x5a9e00=this['editor']['editing']['view'];_0x5a9e00['change'](_0x1146a3=>{for(const _0x179707 of _0x5a9e00['document']['roots'])_0x1146a3['removeClass'](ge,_0x179707);});}}class v extends _0x237363{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,ji];}['init'](){const _0x3be16d=this['editor'],_0x47da94=_0x3be16d['plugins']['get'](u),_0x2530b3=_0x3be16d['plugins']['get'](ji);_0x3be16d['ui']['componentFactory']['add']('exitToEditing',_0x27f9bd=>{const _0x1a3925=new _0x58da02(_0x27f9bd);return _0x1a3925['set']({'label':m(_0x27f9bd,'Back\x20to\x20editing'),'icon':_0x2c316f,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x1a3925,'execute',()=>{_0x3be16d['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x1a3925;}),_0x3be16d['ui']['componentFactory']['add']('restoreRevision',_0x46a6c0=>{const _0x4bef2b=new _0x58da02(_0x46a6c0);return _0x4bef2b['set']({'label':m(_0x46a6c0,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x4bef2b['bind']('isEnabled')['to'](_0x3be16d['commands']['get']('restoreRevision')),this['listenTo'](_0x4bef2b,'execute',()=>_0x3be16d['execute']('restoreRevision')),_0x4bef2b;}),_0x3be16d['ui']['componentFactory']['add']('changesNavigation',_0x155c2c=>{const _0x4885fa=new Ri(_0x155c2c),_0x2725b6=_0x3be16d['commands']['get']('showPreviousChange'),_0x1ef960=_0x3be16d['commands']['get']('showNextChange');return _0x4885fa['bind']('isBackwardNavigationEnabled')['to'](_0x2725b6,'isEnabled'),_0x4885fa['bind']('isForwardNavigationEnabled')['to'](_0x1ef960,'isEnabled'),_0x4885fa['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x47da94),this['listenTo'](_0x4885fa,'execute',(_0x45e4cf,_0x59b760)=>{_0x3be16d['execute']('forward'===_0x59b760?'showNextChange':'showPreviousChange');}),_0x4885fa;}),_0x2530b3['show'](),_0x47da94['on']('change:isReady',(_0x3a0656,_0x3dd9a7,_0x2332cd)=>{_0x2332cd?_0x2530b3['hide']():_0x2530b3['show']();});}}class li extends ti{['_resizeObserver']=null;constructor(_0xa54896,_0x94b57f){super(_0xa54896,_0x94b57f);const _0x233231=this['bindTemplate'];this['set']({'label':m(_0xa54896,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0xa54896,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x233231['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 _0x4653e7=this['fieldView']['element'];this['_tooltipString']=_0x4653e7['scrollWidth']>_0x4653e7['clientWidth']&&_0x4653e7['value']||'';}}class vi extends _0x3cfa23{constructor(_0x5651cb,_0x257952,_0xb6a579){super(_0x5651cb);const _0x1cb03f=new _0x44d27e();_0x1cb03f['set']({'content':_0x37f372,'viewBox':'0\x200\x2011\x2010'});const _0x905c3a=['ck','ck-revision-history-sidebar__revision-author'];_0xb6a579&&_0x905c3a['push']('ck-revision-history-sidebar__revision-author_creator');const _0x4766f8=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x5651cb,_0xb6a579?'Revision\x20creator':'Revision\x20author')},'children':[_0x1cb03f,_0x257952['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x905c3a},'children':_0x4766f8});}}function mi(_0x158bed,_0x7bca8c){const _0x2cb80e=_0x158bed['bindTemplate'],_0x50a6ec=_0x158bed['locale'],_0x15df77=_0x408b44(_0x50a6ec);_0x15df77['panelPosition']='sw';const _0x1813c4=function(_0x16c368,_0x47f6a7){const _0x3df085=function(_0x289677,_0x395c98){const _0x2ea688=_0x289677['locale'],_0x42ff5d={'Compare\x20against\x20selected':m(_0x2ea688,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x2ea688,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x2ea688,'Restore\x20this\x20revision')};return _0x395c98['map'](_0x450a66=>{const _0x592919=_0x42ff5d[_0x450a66['name']];return _0x592919&&_0x592919!==_0x450a66['name']&&(_0x450a66['name']=_0x592919),_0x450a66;});}(_0x16c368,_0x47f6a7),_0x45b71b=new _0x17dfa9();for(const _0x4de72f of _0x3df085){const _0x4f6ef3={'type':'button','model':new to({'label':_0x4de72f['name'],'class':_0x4de72f['class'],'withText':!0x0,'role':'menuitem','_action':_0x4de72f['action']})};_0x4f6ef3['model']['bind']('isEnabled')['to'](_0x16c368,'isActionsDropdownOpen',_0x309f6c=>'function'!=typeof _0x4de72f['isEnabled']||(!_0x309f6c||_0x4de72f['isEnabled'](_0x16c368))),_0x45b71b['add'](_0x4f6ef3);}return _0x45b71b;}(_0x158bed,_0x7bca8c);return _0x158bed['bind']('isActionsDropdownOpen')['to'](_0x15df77,'isOpen'),_0x15df77['buttonView']['set']({'label':m(_0x50a6ec,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x59d1ed}),_0x15df77['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x2cb80e['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x2cb80e['to'](_0x2479ae=>_0x2479ae['stopPropagation']())}}),_0x15df77['on']('execute',_0x424d54=>{_0x158bed['isReady']&&'function'==typeof _0x424d54['source']['_action']&&_0x424d54['source']['_action'](_0x158bed);}),_0x4d8904(_0x15df77,_0x1813c4,{'role':'menu'}),_0x15df77['listenTo'](_0x158bed,'change:isActionsDropdownOpen',(_0x5e9173,_0x3ffc59,_0x1ad025)=>{if(_0x1ad025)for(const _0x1e6d1b of _0x15df77['listView']['items']){const _0x5d9b28=_0x1e6d1b['children']['first'],_0x16fce9=_0x7bca8c['find'](_0x4bf552=>_0x4bf552['action']===_0x5d9b28['_action'])['isVisible'];_0x1e6d1b['isVisible']=void 0x0===_0x16fce9||_0x16fce9(_0x158bed);}}),_0x15df77;}class pi extends/* #__PURE__ -- @preserve */
27
- _0x588598(_0x3cfa23){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0xaa09cb,_0x1e00b0,_0x5f51d8,_0x199a94){super(_0xaa09cb);const _0x14c512=this['bindTemplate'],_0xc99fb4=function(_0x3e609e,_0x422e12){const _0x2ba50c=Array['from'](_0x422e12['authors'])['filter'](_0x484779=>_0x484779!=_0x422e12['creator']);return _0x422e12['creator']&&_0x2ba50c['unshift'](_0x422e12['creator']),_0x2ba50c['map'](_0x450466=>new vi(_0x3e609e,_0x450466,_0x450466==_0x422e12['creator']));}(_0xaa09cb,_0x1e00b0);this['id']=_0x1e00b0['id'],this['_revision']=_0x1e00b0,this['_requireRevisionName']=_0x199a94,this['bind']('name','createdAt')['to'](_0x1e00b0),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x3139bd=>{return _0x4c8fa8=_0xaa09cb['uiLanguage'],(_0x3904b6=_0x3139bd)['toLocaleDateString'](_0x4c8fa8,{'month':'long','day':'numeric'})+',\x20'+_0x3904b6['toLocaleTimeString'](_0x4c8fa8,{'hour':'numeric','minute':'numeric'});var _0x4c8fa8,_0x3904b6;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new li(_0xaa09cb,_0x5802d2),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x20aba6=>_0x20aba6||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x31cf50,_0x39e07b)=>_0x31cf50&&_0x39e07b),this['revisionActionsView']=_0x5f51d8&&_0x5f51d8['length']?mi(this,_0x5f51d8):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x14c512['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x14c512['if']('isEnabled','ck-disabled',_0x2d7a2e=>!_0x2d7a2e),_0x14c512['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x14c512['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x14c512['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':_0x14c512['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':_0xc99fb4}]},this['revisionActionsView']],'on':{'click':_0x14c512['to'](_0x4a7727=>{_0x4a7727['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x407bd1=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x407bd1,'change',()=>{this['_requireRevisionName']&&!_0x407bd1['value']||this['fire']('setName',{'id':this['id'],'name':_0x407bd1['value']}),_0x407bd1['value']||(_0x407bd1['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bi(_0x4b19c1,_0x5b521d){const _0x2523dd=_0x320207['fromJSDate'](_0x4b19c1)['setLocale'](_0x5b521d),_0x5a9af5=_0x320207['local'](),_0x11aa84=_0x5a9af5['minus']({'days':0x1})['startOf']('day');let _0x1a8bd3,_0x1fab74;return _0x2523dd['hasSame'](_0x5a9af5,'day')?(_0x1a8bd3=_0x2523dd['startOf']('day')['toJSDate'](),_0x1fab74=_0x2523dd['toRelativeCalendar']()):_0x2523dd['hasSame'](_0x11aa84,'day')?(_0x1a8bd3=_0x11aa84['toJSDate'](),_0x1fab74=_0x2523dd['toRelativeCalendar']()):_0x2523dd['hasSame'](_0x5a9af5,'week')?(_0x1a8bd3=_0x2523dd['startOf']('week')['toJSDate'](),_0x1fab74=_0x2523dd['weekdayLong']||''):_0x2523dd['hasSame'](_0x5a9af5,'year')?(_0x1a8bd3=_0x2523dd['startOf']('month')['toJSDate'](),_0x1fab74=_0x2523dd['monthLong']||''):(_0x1a8bd3=_0x2523dd['startOf']('year')['toJSDate'](),_0x1fab74=String(_0x2523dd['year'])),{'startDate':_0x1a8bd3,'localizedPeriodName':_0x1fab74};}class fi extends _0x3cfa23{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x482003,_0x875d4e,_0x12adb1,_0x45808b){super(_0x482003);const _0x1e31e4=bi(_0x875d4e,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x875d4e,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x12adb1,this['_requireRevisionName']=_0x45808b,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':_0x1e31e4}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x11807e){const _0x475f0d=new pi(this['locale'],_0x11807e,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x475f0d);}['removeRevision'](_0x547ec6){const _0xb69358=this['revisionViews']['find'](_0x3b47e2=>_0x3b47e2['id']===_0x547ec6['id']);this['revisionViews']['remove'](_0xb69358);}}class ki extends _0x3cfa23{constructor(_0x55d5e7){super(_0x55d5e7);const _0x24c1f2=new _0x44d27e();_0x24c1f2['content']=_0x509fac,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x24c1f2,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x55d5e7,'Revision\x20history')]}]});}}class ui extends _0x3cfa23{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x2de3a6,_0x57f352,_0x767837,_0x8ddf66){super(_0x2de3a6);const _0x383bc4=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x57f352,this['_revisionActions']=_0x767837,this['_requireRevisionName']=_0x8ddf66,this['on']('select',(_0x202058,_0x656999)=>{this['fire']('revisionSelected',_0x656999);}),this['on']('setName',(_0x159c48,_0x10dce0)=>{this['fire']('revisionSetName',_0x10dce0);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new ki(_0x2de3a6),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x383bc4['if']('isEnabled','ck-disabled',_0x33b145=>!_0x33b145)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0xef1e6d of this['_revisions'])this['_addRevision'](_0xef1e6d);this['_revisions']['on']('add',(_0x328ae3,_0x529514)=>{this['_addRevision'](_0x529514);}),this['_revisions']['on']('remove',(_0x208330,_0x29031d)=>{this['_removeRevision'](_0x29031d);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x1fcc5f=>_0x1fcc5f['revisionViews']['map'](_0x56809f=>_0x56809f))['flat']();}['selectRevision'](_0x11f1bd){for(const _0x257113 of this['revisionViews'])_0x11f1bd&&_0x11f1bd['id']===_0x257113['id']?_0x257113['select']():_0x257113['deselect']();}['highlightRevisions'](_0xb3ee0d){for(const _0x5a1f5d of this['revisionViews'])_0xb3ee0d['some'](({id:_0x132f93})=>_0x132f93===_0x5a1f5d['id'])?_0x5a1f5d['highlight']():_0x5a1f5d['unhighlight']();}['_addRevision'](_0x446149){const _0x57e706=bi(_0x446149['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x4e830e=this['timePeriodViews']['get'](0x0);_0x4e830e&&_0x4e830e['startDate']['getTime']()===_0x57e706['getTime']()||(_0x4e830e=new fi(this['locale'],_0x57e706,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x4e830e)),_0x4e830e['addRevision'](_0x446149);}['_removeRevision'](_0x1b89ce){const _0xbd0d6=bi(_0x1b89ce['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0xbd0d6)['removeRevision'](_0x1b89ce);}['_getTimePeriodViewByStartDate'](_0x42ee5c){return this['timePeriodViews']['find'](_0x515df9=>_0x515df9['startDate']['getTime']()===_0x42ee5c['getTime']());}}class d extends _0x237363{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x2f0b4b,uid as _0x2007cb,Collection as _0x10ef23,logWarning as _0x2254ca,FocusTracker as _0xb1d55b,KeystrokeHandler as _0x5be3b7,scrollViewportToShowTarget as _0x36e0cc,ResizeObserver as ot,ElementReplacer as it,CKEditorError as _0x28aaf8}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2fa70e,set as _0x4fef17,unset as _0x586c0b,isEqual as _0x4d3aac}from'es-toolkit/compat';import{Plugin as _0x37efbb,PendingActions as _0x4626f1,Command as _0x32a8c2,ElementApiMixin as _0x3f7666,Editor as _0x24ae32}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x2a2deb,getMarkerDomElement as _0x5111b4,ConfirmMixin as _0x35bf1a,sanitizeEditorConfig as _0x674281}from'ckeditor5-collaboration/dist/index.js';import{ViewContainerElement as _0xf7b6cb,ViewAttributeElement as _0x49a8ce,ViewEmptyElement as _0x47e816,ViewRawElement as _0x505a83,ViewUIElement as _0x5552ae,ViewDocumentFragment as _0x1eb0f8,ViewText as _0x51a2c1,ViewElement as _0x5c06a7,ModelElement as _0x4d179,ModelRange as _0xf40c04,ModelPosition as _0x430f9e,ModelDocumentFragment as _0x788399,ModelText as _0x4393a3}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x5f4d6c,IconChevronUp as _0x40aa8b,IconChevronDown as _0x286aff,IconUndo as _0x1aee6f,IconUser as _0x44584d,IconThreeVerticalDots as _0x3435b5}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x52266d,View as _0x126ab4,submitHandler as _0x3848c6,LabeledFieldView as et,createLabeledInputText as ti,createDropdown as _0x3295c4,ListView as _0x4fd814,ListItemView as _0x472e37,ButtonView as _0xc3e667,MenuBarMenuView as _0x483f6b,MenuBarMenuListView as _0xf63aa3,MenuBarMenuListItemView as _0x41236d,MenuBarMenuListItemButtonView as _0x5f27ec,ContextualBalloon as _0x282325,ToolbarSeparatorView as _0x550144,IconView as _0x860f76,addListToDropdown as _0x593ae8,UIModel as to,EditorUI as tt,normalizeToolbarConfig as st,BoxedEditorUIView as _0x21a7f9,StickyPanelView as _0x73ee2d,ToolbarView as _0x36ff58,InlineEditableUIView as te}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x1006f5}from'luxon';class I extends/* #__PURE__ -- @preserve */
24
+ _0x2f0b4b(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x539499){super(),this['id']=_0x539499['id']||_0x2007cb(),this['creator']=_0x539499['creator']||null,this['authors']=_0x539499['authors']||[],this['diffData']=_0x539499['diffData']||null,this['toVersion']=_0x539499['toVersion']||0x0,this['fromVersion']=_0x539499['fromVersion']||0x0,this['set']('name',_0x539499['name']||''),this['set']('createdAt',_0x539499['createdAt']||new Date()),this['set']('attributes',_0x539499['attributes']||{});}['setName'](_0x247132){this['_update']({'name':_0x247132});}['setAttribute'](_0x599fa5,_0x15656e){const _0x52fec5=_0x2fa70e(this['attributes']);_0x4fef17(_0x52fec5,_0x599fa5,_0x15656e),this['_update']({'attributes':_0x52fec5});}['removeAttribute'](_0x29d853){const _0x58dde0=_0x2fa70e(this['attributes']);_0x586c0b(_0x58dde0,_0x29d853),this['_update']({'attributes':_0x58dde0});}['_update'](_0x2ba935,_0x48509c=!0x1){let _0x9209fe=!0x1;const _0x1cd404={'id':this['id']},_0x205777=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x2ef9e6 of _0x205777){const _0x310acc=_0x2ba935[_0x2ef9e6];void 0x0!==_0x310acc&&_0x310acc!==this[_0x2ef9e6]&&(this[_0x2ef9e6]=_0x310acc,_0x1cd404[_0x2ef9e6]=_0x310acc,_0x9209fe=!0x0);}_0x9209fe&&(_0x1cd404['authors']&&(_0x1cd404['authorsIds']=_0x1cd404['authors']['map'](_0x2bc686=>_0x2bc686['id']),delete _0x1cd404['authors']),this['fire']('_update',_0x1cd404,_0x48509c));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x2a0417=>_0x2a0417['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class S extends _0x37efbb{['_revisions'];static get['requires'](){return[_0x2a2deb];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x43d36e){super(_0x43d36e),this['_revisions']=new _0x10ef23();}['afterInit'](){!async function(_0x34dc6d){const _0x4af020=_0x5efcc0([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x2a18cf=0xeb829,_0x3f3fbe=0x359e09b0,_0x1e2a5d=0x35997368^_0x3f3fbe,_0x13069a=window[_0x5efcc0([0x44,0x61,0x74,0x65])][_0x5efcc0([0x6e,0x6f,0x77])](),_0x5438aa=_0x34dc6d[_0x5efcc0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x6bb215=new window[(_0x5efcc0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2891db=>{_0x5438aa[_0x5efcc0([0x6f,0x6e,0x63,0x65])](_0x5efcc0([0x72,0x65,0x61,0x64,0x79]),_0x2891db);}),_0x37e4d3={[_0x5efcc0([0x6b,0x74,0x79])]:_0x5efcc0([0x45,0x43]),[_0x5efcc0([0x75,0x73,0x65])]:_0x5efcc0([0x73,0x69,0x67]),[_0x5efcc0([0x63,0x72,0x76])]:_0x5efcc0([0x50,0x2d,0x32,0x35,0x36]),[_0x5efcc0([0x78])]:_0x5efcc0([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]),[_0x5efcc0([0x79])]:_0x5efcc0([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]),[_0x5efcc0([0x61,0x6c,0x67])]:_0x5efcc0([0x45,0x53,0x32,0x35,0x36])},_0x420bde=_0x5438aa[_0x5efcc0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5efcc0([0x67,0x65,0x74])](_0x5efcc0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0xed97cf(){let _0x1d4b4d,_0x4a4d63=null,_0x446f1d=null;try{if(_0x420bde==_0x5efcc0([0x47,0x50,0x4c]))return _0x5efcc0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1d4b4d=_0x8da36c(),!_0x1d4b4d)return _0x5efcc0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1d4b4d[_0x5efcc0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x446f1d=_0x61c714(_0x1d4b4d[_0x5efcc0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1d4b4d[_0x5efcc0([0x6a,0x74,0x69])])),await _0x13d50b()?_0xd0974b()?_0x579f98()?_0x5efcc0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x14db96()?(_0x1d4b4d[_0x5efcc0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5efcc0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4a4d63=_0x2c090c(_0x5efcc0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1d4b4d[_0x5efcc0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5efcc0([0x74,0x72,0x69,0x61,0x6c])&&(_0x4a4d63=_0x2c090c(_0x5efcc0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1728d6()):_0x5efcc0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5efcc0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5efcc0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5efcc0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x579f98(){const _0x1b9696=[_0x5efcc0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5efcc0([0x74,0x72,0x69,0x61,0x6c])][_0x5efcc0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d4b4d[_0x5efcc0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x13069a/0x3e8:0xe10*_0x1e2a5d;return _0x1d4b4d[_0x5efcc0([0x65,0x78,0x70])]<_0x1b9696;}function _0xd0974b(){const _0x2efc95=_0x1d4b4d[_0x5efcc0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x2efc95)return!0x1;if(_0x2efc95[_0x5efcc0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5efcc0([0x2a])))return!0x0;if(_0x2efc95[_0x5efcc0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5efcc0([0x52,0x48])))return!0x0;if(_0x2efc95[_0x5efcc0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5efcc0([0x52,0x52,0x48]))){if(_0x1e6e2c())return!0x0;if(_0x3ce5f7()||_0x1cdad0())return!0x0;}return!0x1;}function _0x14db96(){const _0x58c5a2=_0x1d4b4d[_0x5efcc0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x58c5a2||0x0==_0x58c5a2[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5a3405}=new URL(window[_0x5efcc0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x58c5a2[_0x5efcc0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5a3405))return!0x0;const _0x26d1bd=_0x5a3405[_0x5efcc0([0x73,0x70,0x6c,0x69,0x74])](_0x5efcc0([0x2e]));return _0x58c5a2[_0x5efcc0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x196c75=>_0x196c75[_0x5efcc0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5efcc0([0x2a])))[_0x5efcc0([0x6d,0x61,0x70])](_0x507875=>_0x507875[_0x5efcc0([0x73,0x70,0x6c,0x69,0x74])](_0x5efcc0([0x2e])))[_0x5efcc0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x193505=>_0x193505[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x26d1bd[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5efcc0([0x6d,0x61,0x70])](_0x718fc9=>Array(_0x26d1bd[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x718fc9[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5efcc0([0x66,0x69,0x6c,0x6c])](_0x718fc9[0x0]===_0x5efcc0([0x2a])?_0x5efcc0([0x2a]):'')[_0x5efcc0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x718fc9))[_0x5efcc0([0x73,0x6f,0x6d,0x65])](_0x134911=>_0x26d1bd[_0x5efcc0([0x65,0x76,0x65,0x72,0x79])]((_0x41adb0,_0x248b9b)=>_0x134911[_0x248b9b]===_0x41adb0||_0x134911[_0x248b9b]===_0x5efcc0([0x2a])));}function _0x1728d6(){return _0x4a4d63&&_0x446f1d?new window[(_0x5efcc0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x50a4b6,_0x5a07d1)=>{_0x4a4d63[_0x5efcc0([0x74,0x68,0x65,0x6e])](_0x50a4b6,_0x5a07d1),_0x446f1d[_0x5efcc0([0x74,0x68,0x65,0x6e])](_0xb31f32=>{_0xb31f32!=_0x5efcc0([0x56,0x61,0x6c,0x69,0x64])&&_0x50a4b6(_0xb31f32);},_0x5a07d1);}):_0x4a4d63||_0x446f1d||_0x5efcc0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x61c714(_0x31017a,_0x17b4b3){return new window[(_0x5efcc0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9e9bc6=>{if(_0x27ecef())return _0x9e9bc6(_0x5efcc0([0x56,0x61,0x6c,0x69,0x64]));_0x28d93e(),_0x5438aa[_0x5efcc0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5efcc0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3cc836=!0x1;const _0x4215ec=_0x2007cb();function _0x190aee(_0x4764c9){return!!_0x4764c9&&(typeof _0x4764c9===_0x5efcc0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4764c9===_0x5efcc0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4764c9[_0x5efcc0([0x74,0x68,0x65,0x6e])]===_0x5efcc0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4764c9[_0x5efcc0([0x63,0x61,0x74,0x63,0x68])]===_0x5efcc0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x52e7c2(_0x2185be){_0x21eecd(_0x2185be)[_0x5efcc0([0x74,0x68,0x65,0x6e])](_0x5d425e=>{if(!_0x5d425e||_0x5d425e[_0x5efcc0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5efcc0([0x6f,0x6b]))return _0x5efcc0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5340bc(_0x12a86d(_0x4215ec+_0x17b4b3))!=_0x5d425e[_0x5efcc0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5efcc0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5efcc0([0x56,0x61,0x6c,0x69,0x64]);})[_0x5efcc0([0x74,0x68,0x65,0x6e])](_0x408b2e=>(_0x2c2161(),_0x408b2e),()=>{const _0x5ce37e=_0x27e3a9();return null==_0x5ce37e?(_0x2c2161(),_0x5efcc0([0x56,0x61,0x6c,0x69,0x64])):_0x5efcc0(_0x13069a-_0x5ce37e>(0x11928db0^_0x3f3fbe)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5efcc0([0x74,0x68,0x65,0x6e])](_0x9e9bc6)[_0x5efcc0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x9e9bc6(_0x5efcc0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5940ba=0x35a8e730^_0x3f3fbe;function _0x2c2161(){const _0x1c9acb=_0x5efcc0([0x6c,0x6c,0x63,0x74,0x2d])+_0x5340bc(_0x12a86d(_0x31017a)),_0xad84b4=_0x4966bd(_0x5340bc(window[_0x5efcc0([0x4d,0x61,0x74,0x68])][_0x5efcc0([0x63,0x65,0x69,0x6c])](_0x13069a/_0x5940ba)));window[_0x5efcc0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5efcc0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1c9acb,_0xad84b4);}function _0x27e3a9(){const _0x1ecc5f=_0x5efcc0([0x6c,0x6c,0x63,0x74,0x2d])+_0x5340bc(_0x12a86d(_0x31017a)),_0xf32500=window[_0x5efcc0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5efcc0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1ecc5f);return _0xf32500?window[_0x5efcc0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4966bd(_0xf32500),0x10)*_0x5940ba:null;}function _0x21eecd(_0x259609){return new window[(_0x5efcc0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2d66fb,_0x19ffbd)=>{_0x259609[_0x5efcc0([0x74,0x68,0x65,0x6e])](_0x2d66fb,_0x19ffbd),window[_0x5efcc0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x19ffbd,0x359fdd70^_0x3f3fbe);});}}_0x5438aa[_0x5efcc0([0x6f,0x6e])](_0x5efcc0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x193972,_0x26cb59)=>{if(_0x26cb59[0x0]!=_0x31017a)return _0x9e9bc6(_0x5efcc0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x26cb59[0x1]={..._0x26cb59[0x1],[_0x5efcc0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4215ec};},{[_0x5efcc0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5efcc0([0x68,0x69,0x67,0x68])}),_0x5438aa[_0x5efcc0([0x6f,0x6e])](_0x5efcc0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5200ea=>{_0x190aee(_0x5200ea[_0x5efcc0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3cc836=!0x0,_0x52e7c2(_0x5200ea[_0x5efcc0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5efcc0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5efcc0([0x6c,0x6f,0x77])}),_0x6bb215[_0x5efcc0([0x74,0x68,0x65,0x6e])](()=>{_0x3cc836||_0x9e9bc6(_0x5efcc0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x27ecef(){return _0x5438aa[_0x5efcc0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5efcc0([0x76,0x69,0x65,0x77])][_0x5efcc0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5efcc0([0x61,0x75,0x74,0x6f]);}function _0x28d93e(){_0x5438aa[_0x5efcc0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5efcc0([0x76,0x69,0x65,0x77])][_0x5efcc0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5efcc0([0x61,0x75,0x74,0x6f]);}}function _0x2c090c(_0x1f5246){const _0x16232e=[new window[(_0x5efcc0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1cc0c1=>setTimeout(_0x1cc0c1,0x3597377c^_0x3f3fbe)),_0x6bb215[_0x5efcc0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5efcc0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1af7b4=>{const _0x4f2e54=0x359e09b7^_0x3f3fbe,_0x5eff8b=_0x34dc6d[_0x5efcc0([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x532f73(){_0x5eff8b[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x4f2e54&&_0x1af7b4();}_0x532f73(),_0x5eff8b[_0x5efcc0([0x6f,0x6e])](_0x5efcc0([0x61,0x64,0x64]),_0x532f73);})),new window[(_0x5efcc0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57a4a8=>{function _0x12007e(){for(const _0x17edfb in window)if(window[_0x5efcc0([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5efcc0([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x17edfb))&&window[_0x17edfb]==_0x2a18cf)return _0x57a4a8();_0x5438aa[_0x5efcc0([0x73,0x74,0x61,0x74,0x65])]!=_0x5efcc0([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5efcc0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x12007e,0x359e1a38^_0x3f3fbe);}_0x316e6e(_0x5efcc0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x12007e();})];return window[_0x5efcc0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5efcc0([0x72,0x61,0x63,0x65])](_0x16232e)[_0x5efcc0([0x74,0x68,0x65,0x6e])](()=>_0x1f5246);}async function _0x4d1bd0(){if(await _0x6bb215,_0x316e6e(_0x5efcc0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x2010ce=_0x34dc6d[_0x5efcc0([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0xbbaf3a=_0x34dc6d[_0x5efcc0([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])](_0x2010ce[_0x5efcc0([0x69,0x64])]),_0x3f9ac8=_0x2ce1ef(_0x5efcc0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3f9ac8[_0x5efcc0([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x2010ce['id'],_0xbbaf3a?_0xbbaf3a['id']:null,!0x0),_0x3f9ac8[_0x5efcc0([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5efcc0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3f9ac8[_0x5efcc0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3f9ac8[_0x5efcc0([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x38ae32,void(_0x3f9ac8[_0x5efcc0([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x38ae32);}if(_0x316e6e(_0x5efcc0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x1f13f5=_0x2ce1ef(_0x5efcc0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x1f13f5[_0x5efcc0([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5efcc0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1f13f5[_0x5efcc0([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1f13f5[_0x5efcc0([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x38ae32,_0x1f13f5[_0x5efcc0([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x38ae32;}_0x5438aa[_0x5efcc0([0x6d,0x6f,0x64,0x65,0x6c])][_0x5efcc0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x38ae32,_0x5438aa[_0x5efcc0([0x6d,0x6f,0x64,0x65,0x6c])][_0x5efcc0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x38ae32,_0x5438aa[_0x5efcc0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5efcc0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1e6e2c(){return _0x316e6e(_0x5efcc0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2ce1ef(_0x5efcc0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5efcc0([0x73,0x74,0x61,0x74,0x65])]==_0x5efcc0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3ce5f7(){return _0x316e6e(_0x5efcc0([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 _0x1cdad0(){return _0x316e6e(_0x5efcc0([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x54feba(_0x4581d8){const _0x19c366=_0x27166b();_0x5438aa[_0x19c366]=_0x5efcc0([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])+_0x4581d8,_0x4581d8[_0x5efcc0([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5efcc0([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x27166b()]=_0x2a18cf),_0x4581d8!=_0x5efcc0([0x56,0x61,0x6c,0x69,0x64])&&_0x4d1bd0();}function _0x27166b(){const _0x4ab943=window[_0x5efcc0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5efcc0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5efcc0([0x6e,0x6f,0x77])]())[_0x5efcc0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5efcc0([0x2e]),'');let _0x35bc63=_0x5efcc0([0x76]);for(let _0x2b17ea=0x0;_0x2b17ea<_0x4ab943[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2b17ea+=0x2){let _0x5938c5=window[_0x5efcc0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4ab943[_0x5efcc0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2b17ea,_0x2b17ea+0x2));_0x5938c5>=_0x4af020[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5938c5-=_0x4af020[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x35bc63+=_0x4af020[_0x5938c5];}return _0x35bc63;}function _0x8da36c(){const _0x31bbbb=_0x420bde[_0x5efcc0([0x73,0x70,0x6c,0x69,0x74])](_0x5efcc0([0x2e]));if(0x3!=_0x31bbbb[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x433443(_0x31bbbb[0x1]);function _0x433443(_0x27cdda){const _0x489de1=_0x3f4d44(_0x27cdda);return _0x489de1&&_0x333669()?_0x489de1:null;function _0x333669(){const _0x5496cd=_0x489de1[_0x5efcc0([0x6a,0x74,0x69])],_0x3c60c0=window[_0x5efcc0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5496cd[_0x5efcc0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5496cd[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4b16a4={..._0x489de1,[_0x5efcc0([0x6a,0x74,0x69])]:_0x5496cd[_0x5efcc0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5496cd[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4b16a4[_0x5efcc0([0x76,0x63])],_0x12a86d(_0x4b16a4)==_0x3c60c0;}}}async function _0x13d50b(){let _0xa8b3ac=!0x0;try{const _0x15b4bb=_0x420bde[_0x5efcc0([0x73,0x70,0x6c,0x69,0x74])](_0x5efcc0([0x2e])),[_0x48e2c3,_0x2e3e95,_0xd0cc8e]=_0x15b4bb;return _0x4e11de(_0x48e2c3),await _0x91ba76(_0x48e2c3,_0x2e3e95,_0xd0cc8e),_0xa8b3ac;}catch{return!0x1;}function _0x4e11de(_0x520df7){const _0x21a9bc=_0x3f4d44(_0x520df7);_0x21a9bc&&_0x21a9bc[_0x5efcc0([0x61,0x6c,0x67])]==_0x5efcc0([0x45,0x53,0x32,0x35,0x36])||(_0xa8b3ac=!0x1);}async function _0x91ba76(_0x1695aa,_0x2799c2,_0x56ab6b){const _0x56e633=window[_0x5efcc0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5efcc0([0x66,0x72,0x6f,0x6d])](_0x18f425(_0x56ab6b),_0x6d8de=>_0x6d8de[_0x5efcc0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xf84ee6=new window[(_0x5efcc0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5efcc0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1695aa+_0x5efcc0([0x2e])+_0x2799c2),_0x1aabb3=window[_0x5efcc0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5efcc0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1aabb3)return;const _0x357c24=await _0x1aabb3[_0x5efcc0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5efcc0([0x6a,0x77,0x6b]),_0x37e4d3,{[_0x5efcc0([0x6e,0x61,0x6d,0x65])]:_0x5efcc0([0x45,0x43,0x44,0x53,0x41]),[_0x5efcc0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5efcc0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5efcc0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1aabb3[_0x5efcc0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5efcc0([0x6e,0x61,0x6d,0x65])]:_0x5efcc0([0x45,0x43,0x44,0x53,0x41]),[_0x5efcc0([0x68,0x61,0x73,0x68])]:{[_0x5efcc0([0x6e,0x61,0x6d,0x65])]:_0x5efcc0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x357c24,_0x56e633,_0xf84ee6)||(_0xa8b3ac=!0x1);}}function _0x3f4d44(_0x6f129d){return _0x6f129d[_0x5efcc0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5efcc0([0x65,0x79]))?JSON[_0x5efcc0([0x70,0x61,0x72,0x73,0x65])](_0x18f425(_0x6f129d)):null;}function _0x18f425(_0x24bc9f){return window[_0x5efcc0([0x61,0x74,0x6f,0x62])](_0x24bc9f[_0x5efcc0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5efcc0([0x2b]))[_0x5efcc0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5efcc0([0x2f])));}function _0x12a86d(_0x255f34){let _0x274d65=0x1505;function _0x16c96d(_0x3be1a4){for(let _0x117b9e=0x0;_0x117b9e<_0x3be1a4[_0x5efcc0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x117b9e++){const _0x1864bc=_0x3be1a4[_0x5efcc0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x117b9e);_0x274d65=(_0x274d65<<0x5)+_0x274d65+_0x1864bc,_0x274d65&=_0x274d65;}}function _0x3346ed(_0x3a0727){Array[_0x5efcc0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3a0727)?_0x3a0727[_0x5efcc0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3346ed):_0x3a0727&&typeof _0x3a0727==_0x5efcc0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5efcc0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3a0727)[_0x5efcc0([0x73,0x6f,0x72,0x74])]()[_0x5efcc0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x349e40,_0x5426a2])=>{_0x16c96d(_0x349e40),_0x3346ed(_0x5426a2);}):_0x16c96d(window[_0x5efcc0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3a0727));}return _0x3346ed(_0x255f34),_0x274d65>>>0x0;}function _0x5340bc(_0x5b8e6d){return _0x5b8e6d[_0x5efcc0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5efcc0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5efcc0([0x30]));}function _0x4966bd(_0x4eeda0){return _0x4eeda0[_0x5efcc0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5efcc0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5efcc0([0x6a,0x6f,0x69,0x6e])]('');}function _0x316e6e(_0x466592){return _0x5438aa[_0x5efcc0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5efcc0([0x68,0x61,0x73])](_0x466592);}function _0x2ce1ef(_0xebddc2){return _0x5438aa[_0x5efcc0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5efcc0([0x67,0x65,0x74])](_0xebddc2);}function _0x38ae32(){}function _0x5efcc0(_0x3cd931){return _0x3cd931['map'](_0x15042a=>String['fromCharCode'](_0x15042a))['join']('');}_0x54feba(await _0xed97cf());}(this);}['createRevision'](_0x463c59){const _0x2613f5=this['editor']['plugins']['get']('Users');return new I({'id':_0x463c59['id'],'name':_0x463c59['name'],'creator':_0x463c59['creatorId']?_0x2613f5['getUser'](_0x463c59['creatorId']):null,'diffData':_0x463c59['diffData']||_0x463c59['data'],'authors':_0x463c59['authorsIds']['map'](_0x4f9478=>_0x2613f5['getUser'](_0x4f9478)),'createdAt':new Date(_0x463c59['createdAt']),'attributes':_0x463c59['attributes'],'fromVersion':_0x463c59['fromVersion'],'toVersion':_0x463c59['toVersion']});}['addRevision'](_0x4a1d78,_0x354480=0x0){this['_revisions']['add'](_0x4a1d78,_0x354480);}['getRevision'](_0xaf83f8){return this['_revisions']['get'](_0xaf83f8);}['getRevisions'](_0x8ff333={'toJSON':!0x1}){const _0x5c5876=Array['from'](this['_revisions']);return _0x5c5876['reverse'](),_0x8ff333['toJSON']?_0x5c5876['map'](_0x1afbca=>_0x1afbca['toJSON']()):_0x5c5876;}['getIndex'](_0x208f2f){return this['_revisions']['getIndex'](_0x208f2f);}['getEarlierVisibleRevision'](_0x5025da){const [,_0x169fa4]=this['getRevisionsIterator'](_0x5025da,{'direction':'earlier'});return _0x169fa4;}['getLaterVisibleRevision'](_0x294364){const [,_0x2be109]=this['getRevisionsIterator'](_0x294364,{'direction':'later'});return _0x2be109;}['getRevisionsInDiff'](_0x138e4e){const _0x497f7d=[];for(const _0x15712f of this['getRevisionsIterator'](_0x138e4e['newRevisionId']))if(_0x497f7d['push'](_0x15712f),_0x15712f['id']===_0x138e4e['oldRevisionId'])break;return _0x497f7d;}*['getRevisionsIterator'](_0xc999de,{direction:_0x57b26a='earlier',filter:_0x123f65=()=>!0x0}={}){const _0x4dc4fd='earlier'===_0x57b26a?0x1:-0x1;let _0x59dcad=this['_revisions']['get'](_0xc999de),_0x3e27be=this['getIndex'](_0x59dcad);for(yield _0x59dcad;_0x59dcad;){if(_0x3e27be+=_0x4dc4fd,_0x59dcad=this['getRevision'](_0x3e27be),!_0x59dcad)return;_0x123f65(_0x59dcad)&&(yield _0x59dcad);}}}class $ extends _0x37efbb{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0xf7b6cb,'c'],[_0x49a8ce,'a'],[_0x47e816,'e'],[_0x505a83,'r'],[_0x5552ae,'u']]);['_typeCharToViewClass']=new Map([['c',_0xf7b6cb],['a',_0x49a8ce],['e',_0x47e816],['r',_0x505a83],['u',_0x5552ae]]);async['loadRevisionData'](_0x5f2a99,_0x595bfc){if(_0x5f2a99['diffData']||!_0x595bfc)return;const _0x5b466f=this['editor']['config']['get']('collaboration.channelId'),_0x46e302=await _0x595bfc['getRevision']({'channelId':_0x5b466f,'revisionId':_0x5f2a99['id']});_0x5f2a99['diffData']=_0x46e302['diffData'];}['getRevisionDocumentData'](_0x3cd94b){const _0x54a289={};for(const _0x3be377 in _0x3cd94b['diffData']){if(_0x3cd94b['diffData'][_0x3be377]['attachChange']&&!_0x3cd94b['diffData'][_0x3be377]['attachChange']['isAttached'])continue;const _0x313f5c=this['_removeRevisionMarkers'](JSON['parse'](_0x3cd94b['diffData'][_0x3be377]['insertions'])),_0x111798=this['editor']['editing']['view']['document'],_0x25aa1c=new _0x1eb0f8(_0x111798,_0x313f5c['map'](_0x497d05=>this['_getViewFromDiffObj'](_0x497d05,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x54a289[_0x3be377]=this['editor']['data']['processor']['toData'](_0x25aa1c),this['editor']['data']['processor']['useFillerType']('default');}return _0x54a289;}['getRevisionRootsAttributes'](_0x2f1404){const _0x3c3bef={};for(const _0x58ca0c in _0x2f1404['diffData'])_0x2f1404['diffData'][_0x58ca0c]['attachChange']&&!_0x2f1404['diffData'][_0x58ca0c]['attachChange']['isAttached']||(_0x3c3bef[_0x58ca0c]=_0x2f1404['diffData'][_0x58ca0c]['attributesAfter']||{});return _0x3c3bef;}['_getTypeCharForViewElement'](_0x44749d){return this['_viewClassToTypeChar']['get'](_0x44749d['constructor']);}['_getViewFromDiffObj'](_0xb9094f,_0x38df35){const _0xbc838e=this['editor']['editing']['view']['document'];if('string'==typeof _0xb9094f)return new _0x51a2c1(_0xbc838e,_0xb9094f);{let _0x34876e,_0x4bfbb7;_0x4bfbb7='u'==_0xb9094f['type']||'r'==_0xb9094f['type']?[]:_0xb9094f['children']['map'](_0x1d22e6=>this['_getViewFromDiffObj'](_0x1d22e6,_0x38df35));const _0x145c61=this['_typeCharToViewClass']['get'](_0xb9094f['type'])||_0x5c06a7,_0x4f4c65=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x34876e=new _0x145c61(_0xbc838e,_0xb9094f['name'],_0xb9094f['attributes'],_0x4bfbb7),'u'==_0xb9094f['type']&&_0xb9094f['children'][0x0]){const _0x42c6b9=_0xb9094f['children'][0x0];if(_0x34876e['render']=function(_0x426c30){const _0xbdadab=_0x426c30['createElement']('div');return _0xbdadab['innerHTML']=_0x42c6b9,_0xbdadab['childNodes'][0x0];},_0x38df35){const _0x324757=new _0x1eb0f8(_0xbc838e);_0x324757['_appendChild'](_0x34876e);const _0x2d57fa=Array['from'](_0x4f4c65['viewChildrenToDom'](_0x324757,{'bind':!0x1})),_0x123edb=_0x4f4c65['domDocument']['createElement']('div');_0x123edb['append'](..._0x2d57fa),_0x34876e=Array['from'](_0x4f4c65['domChildrenToView'](_0x123edb))[0x0];}}else{if('r'==_0xb9094f['type']&&_0xb9094f['children'][0x0]){const _0x3bd856=_0xb9094f['children'][0x0];if(_0x34876e['render']=function(_0x28bc54){_0x28bc54['innerHTML']=_0x3bd856;},_0x38df35){const _0x481343=new _0x1eb0f8(_0xbc838e);_0x481343['_appendChild'](_0x34876e);const _0x4190a2=Array['from'](_0x4f4c65['viewChildrenToDom'](_0x481343,{'bind':!0x1})),_0x48b31d=_0x4f4c65['domDocument']['createElement']('div');_0x48b31d['append'](..._0x4190a2);const _0x274d45=Array['from'](_0x4f4c65['domChildrenToView'](_0x48b31d));_0x274d45['length']>0x1?_0x34876e['_appendChild'](_0x274d45):_0x34876e=_0x274d45[0x0];}}}if(_0xb9094f['customProperties']){for(const [_0x3dec25,_0x3e7c69]of _0xb9094f['customProperties'])_0x34876e['_setCustomProperty'](_0x3dec25,_0x3e7c69);}const _0x747829=void 0x0===_0xb9094f['fillerOffset']?null:_0xb9094f['fillerOffset'];return null!==_0x747829&&(_0x34876e['getFillerOffset']=()=>_0x747829),_0x34876e;}}['_makeModelFromViewString'](_0x25bd0d){const _0x4f4d25=JSON['parse'](_0x25bd0d),_0x323be7=this['editor']['editing']['view']['document'],_0xb10f2a=new _0x1eb0f8(_0x323be7,_0x4f4d25['map'](_0x256b6d=>this['_getViewFromDiffObj'](_0x256b6d,!0x0)));return this['editor']['data']['toModel'](_0xb10f2a);}['_removeRevisionMarkers'](_0x156e72){return(_0x156e72=_0x156e72['filter'](_0x10344f=>!_0x10344f['name']||'revision-start'!==_0x10344f['name']&&'revision-end'!==_0x10344f['name']))['forEach'](_0x3615fa=>{'string'!=typeof _0x3615fa&&(_0x3615fa['children']=this['_removeRevisionMarkers'](_0x3615fa['children']),_0x3615fa['attributes']=_0x3615fa['attributes']['filter'](_0x1a2f38=>!_0x1a2f38[0x0]['startsWith']('data-revision-')));}),_0x156e72;}}function m(_0x1ae8de,_0x3b1b0e,_0x3c3774){const t=_0x1ae8de['t'];switch(_0x3b1b0e){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'},_0x3c3774);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3c3774);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 _0x37efbb{['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[_0x2a2deb,S,$,_0x4626f1];}constructor(_0x5f958f){super(_0x5f958f),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 _0x17ad13=_0x2007cb();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x17ad13},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 _0x1c0e20=this['repository']['getRevision'](0x0),_0x2f0693=_0x1c0e20&&null===_0x1c0e20['creator']?_0x1c0e20:null;if(this['_continueCurrentRevision']=!!_0x2f0693&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x123205=this['_source']['getCurrentRevisionId'](),_0x3bac23=this['repository']['getRevision'](_0x123205);if(_0x3bac23)this['_startingVersion']=_0x3bac23['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x4b9e26=this['_source']['history']['_operations']['find'](_0x48ea56=>!_0x48ea56['_isInit']),_0x36487e=_0x4b9e26?_0x4b9e26['baseVersion']:this['_source']['history']['version'];_0x1c0e20?(_0x1c0e20['toVersion']<_0x36487e&&_0x1c0e20['_update']({'toVersion':_0x36487e}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2f0693['id'],this['_startingVersion']=_0x2f0693['fromVersion']):(this['_startingVersion']=_0x1c0e20['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x36487e,this['_continueCurrentRevision']=!0x1);}}else _0x2f0693&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2f0693['toVersion'],this['editor']['model']['document']['history']['version']),_0x2f0693['fromVersion']===_0x2f0693['toVersion']?(0x0!==_0x2f0693['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2f0693['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2f0693['id'],this['_startingVersion']=_0x2f0693['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',_0x37257f=>!_0x37257f),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x54d0d4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2a3acd;for(const _0x38a4c2 in _0x54d0d4){const _0x555f0c=_0x38a4c2,_0x450bca=_0x54d0d4[_0x555f0c];if('revisionHistoryLicenseKeyValid'==_0x450bca||'revisionHistoryLicenseKeyInvalid'==_0x450bca||'revisionHistoryLicenseKeyExpired'==_0x450bca||'revisionHistoryLicenseKeyDomainLimit'==_0x450bca||'revisionHistoryLicenseKeyNotAllowed'==_0x450bca||'revisionHistoryLicenseKeyEvaluationLimit'==_0x450bca||'revisionHistoryLicenseKeyTrialLimit'==_0x450bca||'revisionHistoryLicenseKeyUsageLimit'==_0x450bca){delete _0x54d0d4[_0x555f0c],_0x2a3acd=_0x450bca,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x2a3acd&&_0x54d0d4['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x2a3acd&&_0x54d0d4['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x2a3acd&&_0x54d0d4['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x2a3acd&&_0x54d0d4['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x2a3acd&&_0x54d0d4['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x2a3acd&&_0x54d0d4['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x2a3acd&&_0x54d0d4['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x53c070=this['repository']['getRevision'](0x0),_0x6e184=await this['getRevisionDocumentData'](_0x53c070),_0x4501d3=await this['getRevisionRootsAttributes'](_0x53c070);this['_replaceEditorDataWithRevisionData'](_0x6e184,_0x4501d3);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x3dd970){this['_source']=_0x3dd970;}async['update'](){const _0x53805f=await this['_source']['getLatestVersion']();if(_0x53805f>this['currentRevision']['toVersion']){await this['_loadState']();const _0x11b249=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x53805f});_0x11b249['authors']=_0x11b249['authorsIds']['map'](_0x139f3d=>this['editor']['plugins']['get']('Users')['getUser'](_0x139f3d)),this['currentRevision']['_update'](_0x11b249);}}async['saveRevision'](_0x545f61={},_0xf413ad=null){const _0x479c23=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0xf413ad>this['currentRevision']['toVersion']&&(_0xf413ad=null),null===_0xf413ad&&(_0xf413ad=await this['_source']['getLatestVersion']());const _0x9ba187=this['_getFromVersion'](_0xf413ad),_0x23f3ab=this['buildRevisionData']({'from':_0x9ba187,'to':_0xf413ad});if(this['currentRevision']['toVersion']<_0xf413ad){const _0x4a3206=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0xf413ad,'to':_0xf413ad});_0x4a3206['authors']=[],_0x4a3206['authorsIds']=[],_0x4a3206['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x4a3206,!0x0),delete _0x4a3206['authors'],_0x479c23['push'](_0x4a3206);}_0x545f61['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x545f61['name']=_0x545f61['name']||null,_0x545f61['id']=_0x545f61['id']||_0x2007cb(),_0x545f61={..._0x545f61,..._0x23f3ab};const _0x167d9c=this['addRevisionData'](_0x545f61);_0x479c23['push'](_0x545f61);const _0xe0225e=this['repository']['getIndex'](_0x167d9c);if(0x0!==_0xe0225e){const _0x5e282a=this['repository']['getRevision'](_0xe0225e-0x1);if(_0x5e282a['fromVersion']!==_0xf413ad){const _0x31454d=this['_revisionDataBuilder']['getData'](_0xf413ad,_0x5e282a['toVersion']),_0x3407bb={'id':_0x5e282a['id'],'diffData':_0x31454d['diffData'],'authorsIds':_0x31454d['authorsIds'],'authors':_0x31454d['authorsIds']['map'](_0x317eca=>this['editor']['plugins']['get']('Users')['getUser'](_0x317eca)),'fromVersion':_0xf413ad};_0x5e282a===this['currentRevision']&&(_0x3407bb['createdAt']=new Date(_0x545f61['createdAt']['getTime']()+0xa)),_0x5e282a['_update'](_0x3407bb,!0x0),delete _0x3407bb['authors'],_0x479c23['push'](_0x3407bb);}}if(this['adapter']){for(const _0x3a3902 of _0x479c23)this['_bufferUpdate'](_0x3a3902['id'],_0x3a3902,!0x0);this['sendBufferedUpdates']();}return _0x167d9c;}['addRevisionData'](_0x41429d){const _0x1e49af=this['repository']['createRevision'](_0x41429d);return this['adapter']&&_0x1e49af['on']('_update',(_0x223479,_0x74cb9d,_0x57d9ae)=>{_0x57d9ae||(this['_bufferUpdate'](_0x74cb9d['id'],_0x74cb9d,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x1e49af,this['_findInsertionIndex'](_0x1e49af)),_0x1e49af;}async['getRevisionDocumentData'](_0x1564f0){return await this['_utils']['loadRevisionData'](_0x1564f0,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x1564f0);}async['getRevisionRootsAttributes'](_0x5c6ce9){return await this['_utils']['loadRevisionData'](_0x5c6ce9,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x5c6ce9);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x1b3b80=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x398100=0x0;_0x398100<_0x1b3b80['length'];_0x398100++){const _0x50ef5e=_0x1b3b80[_0x398100];let _0x191a05=!0x1;for(const _0x5a0ab4 of Object['keys'](_0x50ef5e))void 0x0===_0x50ef5e[_0x5a0ab4]?delete _0x50ef5e[_0x5a0ab4]:'id'!==_0x5a0ab4&&(_0x191a05=!0x0);_0x191a05||(_0x1b3b80[_0x398100]=null);}if(_0x1b3b80=_0x1b3b80['filter'](_0x1f22c4=>null!==_0x1f22c4),!_0x1b3b80['length'])return;for(let _0x20fc9c=0x0;_0x20fc9c<_0x1b3b80['length'];_0x20fc9c++){const _0x2e1fca=_0x1b3b80[_0x20fc9c];void 0x0!==_0x2e1fca['fromVersion']&&void 0x0===_0x2e1fca['toVersion']&&(_0x2e1fca['toVersion']=this['repository']['getRevision'](_0x2e1fca['id'])['toVersion']),void 0x0!==_0x2e1fca['toVersion']&&void 0x0===_0x2e1fca['fromVersion']&&(_0x2e1fca['fromVersion']=this['repository']['getRevision'](_0x2e1fca['id'])['fromVersion']);}const _0x1b65f2=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x1b3b80,_0x1b65f2)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x42fb3c=>{if(_0x42fb3c){for(const _0x14635e of _0x42fb3c)this['setRevisionData']({'id':_0x14635e['id'],'createdAt':_0x14635e['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x3e6026=null,from:_0xbd83ed=null,to:_0x1a292d=null}){_0xbd83ed=null!==_0xbd83ed?_0xbd83ed:_0x3e6026['fromVersion'],_0x1a292d=null!==_0x1a292d?_0x1a292d:_0x3e6026['toVersion'];const _0x1f2278=this['_revisionDataBuilder']['getData'](_0xbd83ed,_0x1a292d),_0x3e7a30={'diffData':_0x1f2278['diffData'],'authorsIds':_0x1f2278['authorsIds'],'fromVersion':_0xbd83ed,'toVersion':_0x1a292d};if(!_0x3e6026||_0x1a292d!==_0x3e6026['toVersion']){const _0x109268=_0x1a292d-0x1,_0x311e5b=this['_source']['history']['getOperation'](_0x109268);_0x3e7a30['createdAt']=_0x311e5b&&_0x311e5b['createdAt']||new Date();}if(this['_loadedStateData']&&_0xbd83ed===this['_loadedStateData']['fromVersion']){for(const _0x134524 of this['_loadedStateData']['authors'])_0x3e7a30['authorsIds']['includes'](_0x134524['id'])||_0x3e7a30['authorsIds']['push'](_0x134524['id']);}return _0x3e7a30;}['_bufferUpdate'](_0x293635,_0x97e281,_0x51e8c9){if(this['_bufferedUpdates']['has'](_0x293635)){const _0x431543=this['_bufferedUpdates']['get'](_0x293635);_0x97e281=_0x51e8c9?{..._0x431543,..._0x97e281}:{..._0x97e281,..._0x431543};}this['_bufferedUpdates']['set'](_0x293635,_0x97e281);}['setRevisionData'](_0x5ac193){const _0x3b3011=this['repository']['getRevision'](_0x5ac193['id']);if(_0x5ac193['createdAt']&&(_0x5ac193['createdAt']=new Date(_0x5ac193['createdAt'])),_0x5ac193['authorsIds']){const _0x3875be=this['editor']['plugins']['get']('Users');_0x5ac193['authors']=_0x5ac193['authorsIds']['map'](_0x2e87cd=>_0x3875be['getUser'](_0x2e87cd));}_0x3b3011['_update'](_0x5ac193,!0x0);}['_createInitialRevision'](_0x59aef4){const _0x46520e=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x46520e)this['_initialRevisionId']=_0x46520e['id'];else{const _0x4b70be=!this['editor']['model']['document']['roots']['find'](_0x593521=>this['editor']['model']['hasContent'](_0x593521)),_0x110cf6=this['editor']['plugins']['get']('Users')['me']['id'],_0x55edaa=m(this['editor']['locale'],_0x4b70be?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x59aef4,'to':_0x59aef4,'id':this['_initialRevisionId'],'name':_0x55edaa,'creatorId':_0x110cf6});}}['_createCurrentRevision'](_0x5688cb){const _0x56feed=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x56feed),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x5688cb,'to':_0x5688cb,'id':_0x56feed,'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'](_0x577336,_0x361a09){let _0x3d0f99=this['editor']['config']['get']('initialData'),_0x593869=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x3d0f99){_0x3d0f99={};for(const _0x21d2a1 of this['editor']['model']['document']['getRootNames']())_0x3d0f99[_0x21d2a1]='';}if('string'==typeof _0x3d0f99&&(_0x3d0f99={'main':_0x3d0f99}),void 0x0===_0x593869){_0x593869={};for(const _0xa399e of this['editor']['model']['document']['getRootNames']())_0x593869[_0xa399e]={};}let _0x134fab=!0x1;const _0x2aee0a=Object['keys'](_0x3d0f99),_0x3807fc=Object['keys'](_0x577336);for(const _0x4b71ed of _0x2aee0a){if(_0x3d0f99[_0x4b71ed]!==_0x577336[_0x4b71ed]&&''!==_0x3d0f99[_0x4b71ed]['trim']()){_0x134fab=!0x0;break;}if(!_0x4d3aac(_0x593869[_0x4b71ed],_0x361a09[_0x4b71ed])&&Object['keys'](_0x593869[_0x4b71ed])['length']>0x0){_0x134fab=!0x0;break;}}_0x134fab||(_0x134fab=_0x3807fc['some'](_0x4746fe=>!this['editor']['model']['document']['getRoot'](_0x4746fe))),_0x134fab&&_0x2254ca('editor-initial-data-replaced-with-revision-data',{'editorData':_0x3d0f99,'editorRootsAttributes':_0x593869,'revisionData':_0x577336,'revisionRootsAttributes':_0x361a09}),this['editor']['config']['set']('initialData',_0x577336),this['editor']['config']['set']('rootsAttributes',_0x361a09);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x59f2b1=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x59f2b1['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x4aa43e){const _0x166cff=this['repository']['getRevisions']();_0x166cff['reverse']();let _0x530621=0x0;for(;_0x530621<_0x166cff['length'];){const _0x13bc47=_0x166cff[_0x530621];if(_0x13bc47===this['currentRevision']){_0x530621++;continue;}if(_0x13bc47['id']===this['_initialRevisionId'])break;const _0x162805=_0x4aa43e['toVersion']-_0x13bc47['toVersion']||_0x4aa43e['fromVersion']-_0x13bc47['fromVersion'];if(_0x162805>0x0)break;if(_0x162805<0x0)_0x530621++;else{if(!_0x4aa43e['creator']&&_0x13bc47['creator'])break;if(_0x13bc47['creator']||!_0x4aa43e['creator']){if(_0x4aa43e['createdAt']>_0x13bc47['createdAt'])break;_0x530621++;}else _0x530621++;}}return _0x530621;}['_getFromVersion'](_0x8699cb){const _0x18f941=this['repository']['getRevisions']();_0x18f941['reverse'](),_0x18f941['shift']();const _0x34cb40=_0x18f941['find'](_0x477ff7=>_0x477ff7['toVersion']<=_0x8699cb)['toVersion'];return _0x34cb40<this['_startingVersion']?this['_startingVersion']:_0x34cb40;}['_makeRevision']({name:_0x5f4053,from:_0xb1e12c,to:_0x2f63fe,creatorId:_0x8509c1,id:_0x508370}){const _0x4f175f=this['buildRevisionData']({'from':_0xb1e12c,'to':_0x2f63fe});_0x4f175f['name']=_0x5f4053,_0x4f175f['creatorId']=_0x8509c1,_0x4f175f['id']=_0x508370;const _0x5e2582=this['addRevisionData'](_0x4f175f);return this['adapter']&&this['_bufferUpdate'](_0x4f175f['id'],_0x4f175f,!0x0),_0x5e2582;}['_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(_0x101d2b){this['editor']=_0x101d2b,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'](_0x12cd18){this['source']=_0x12cd18;const _0x23b47e=new Map(),_0x40643f=new Map(),_0x414d35=this['editor']['model']['document']['roots']['map'](_0x14d63e=>_0x14d63e['rootName']);for(const _0x5697c6 of _0x414d35){const _0x71955b=this['editor']['model']['document']['getRoot'](_0x5697c6),_0x41eaae=x(_0x71955b);_0x23b47e['set'](_0x5697c6,_0x41eaae),_0x40643f['set'](_0x5697c6,Object['fromEntries'](_0x71955b['getAttributes']()));}const _0x3e856d=Array['from'](this['editor']['model']['markers'])['map'](_0x16b39f=>[_0x16b39f['name'],_0x16b39f['getRange']()]),_0x11e6b8=this['source']['version'];this['_saveMetaData'](_0x11e6b8,_0x23b47e,_0x3e856d,_0x40643f),this['_startingRevisionId']=this['_revisionId'];const _0x2bae93=new Map(),_0x1fd97e=new Map();for(const _0x4250ec of _0x414d35){const _0x5bd8d7=N(_0x4250ec);_0x2bae93['set'](_0x4250ec,_0x5bd8d7),_0x1fd97e['set'](_0x4250ec,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x2bae93,[],_0x1fd97e);}['getData'](_0x18db25,_0x656098){if(this['_lastFrom']===_0x18db25&&this['_lastTo']<=_0x656098)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x656098,!0x0);else{if(!this['_savedMetaData']['has'](_0x18db25)){const _0x1be08d=this['_getPreviousFrom'](_0x18db25);this['_calculateMetaData'](_0x1be08d,_0x18db25,!0x1);}this['_calculateMetaData'](_0x18db25,_0x656098,!0x0);}return this['_lastFrom']=_0x18db25,this['_lastTo']=_0x656098,this['_getState']();}['loadState'](_0x48df12){if(!this['_savedMetaData']['has'](_0x48df12['fromVersion'])){const _0x4c5432=this['_getPreviousFrom'](_0x48df12['fromVersion']);this['_calculateMetaData'](_0x4c5432,_0x48df12['fromVersion'],!0x1);}this['_calculateMetaData'](_0x48df12['fromVersion'],_0x48df12['toVersion'],!0x1);const _0x424846=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x48df12['fromVersion'],this['_lastTo']=_0x48df12['toVersion'];for(const _0x26b87 in _0x48df12['diffData']){const _0x15d5fa=_0x48df12['diffData'][_0x26b87]['attachChange'],_0x28db38=_0x2fa70e(_0x48df12['diffData'][_0x26b87]['attributesBefore'])||{},_0x28678a=_0x424846['_makeModelFromViewString'](_0x48df12['diffData'][_0x26b87]['deletions']);_0x28678a['rootName']=_0x26b87,_0x28678a['_isAttached']=!_0x15d5fa||!_0x15d5fa['isAttached'],_0x28678a['isAttached']=()=>_0x28678a['_isAttached'],this['_baseRoots']['set'](_0x26b87,_0x28678a),this['_baseRootsAttributes']['set'](_0x26b87,_0x28db38),_0x15d5fa&&this['_touchedRoots']['set'](_0x26b87,_0x15d5fa);const _0x39ed8b=this['_makeIdsRoot'](_0x28678a);this['_baseIdsRoots']['set'](_0x26b87,_0x39ed8b);for(const [_0xc69b0,_0x1e0a21]of _0x28678a['markers']){if(!_0xc69b0['startsWith']('revision:'))continue;const _0x1fe64d=_0xc69b0['split'](':')[0x2];for(const _0xbf53fd of _0x1e0a21['getWalker']({'singleCharacters':!0x0})){const _0x2882c5=this['_getVidAttributeName'](_0xbf53fd),_0x30172d='elementEnd'==_0xbf53fd['type']?_0xbf53fd['previousPosition']['path']['slice'](0x0,-0x1):_0xbf53fd['previousPosition']['path'],_0x2d1bcc=_0x39ed8b['getNodeByPath'](_0x30172d)['getAttribute'](_0x2882c5);this['_touched']['set'](_0x2d1bcc,{'userId':_0x1fe64d});}_0x28678a['markers']['delete'](_0xc69b0);}}this['_startingRevisionId']=this['_revisionId'];const _0x114346=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x31e288=>!this['_touched']['has'](_0x31e288));let _0x13767e=0x0;const _0x2c8713=new Map();for(const _0xe3475c in _0x48df12['diffData']){const _0x14ec8c=_0x48df12['diffData'][_0xe3475c]['attachChange'],_0x557a2f=_0x2fa70e(_0x48df12['diffData'][_0xe3475c]['attributesAfter'])||{},_0x160ee1=_0x424846['_makeModelFromViewString'](_0x48df12['diffData'][_0xe3475c]['insertions']);_0x160ee1['rootName']=_0xe3475c,_0x160ee1['_isAttached']=!_0x14ec8c||_0x14ec8c['isAttached'],_0x160ee1['isAttached']=()=>_0x160ee1['_isAttached'],this['_diffRoots']['set'](_0xe3475c,_0x160ee1),this['_diffRootsAttributes']['set'](_0xe3475c,_0x557a2f);const _0x211041=this['_makeIdsRoot'](_0x160ee1,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0xe3475c,_0x211041),_0x2c8713['set'](_0xe3475c,_0x160ee1['isAttached']()?_0x557a2f:{});for(const [_0x5c21d2,_0x5a9934]of _0x160ee1['markers']){if(!_0x5c21d2['startsWith']('revision:'))continue;const _0x57dcde=_0x5c21d2['split'](':')[0x2];for(const _0x58349d of _0x5a9934['getWalker']({'singleCharacters':!0x0})){const _0x4da36f=this['_getVidAttributeName'](_0x58349d),_0x4dea30=this['_revisionId']++,_0x36a5c5='elementEnd'==_0x58349d['type']?_0x58349d['previousPosition']['path']['slice'](0x0,-0x1):_0x58349d['previousPosition']['path'];_0x211041['getNodeByPath'](_0x36a5c5)['_setAttribute'](_0x4da36f,_0x4dea30),this['_touched']['set'](_0x4dea30,{'userId':_0x57dcde});}_0x160ee1['markers']['delete'](_0x5c21d2);}for(const _0x1c2f29 of this['editor']['model']['createRangeIn'](_0x160ee1)['getWalker']({'singleCharacters':!0x0})){const _0x441aee=this['_getVidAttributeName'](_0x1c2f29),_0xa5ce3f='elementEnd'==_0x1c2f29['type']?_0x1c2f29['previousPosition']['path']['slice'](0x0,-0x1):_0x1c2f29['previousPosition']['path'],_0x5095cd=_0x211041['getNodeByPath'](_0xa5ce3f);_0x5095cd['getAttribute'](_0x441aee)>0x0||_0x5095cd['_setAttribute'](_0x441aee,_0x114346[_0x13767e++]);}for(const [_0x28282d,_0x43b354]of _0x160ee1['markers'])_0x28282d['startsWith']('revision:')||this['_markers']['set'](_0x28282d,_0x43b354);}const {roots:_0x192ada}=this['_savedMetaData']['get'](_0x48df12['fromVersion']),{roots:_0x2da081}=this['_savedMetaData']['get'](_0x48df12['toVersion']),_0x1c9d40=x(_0x192ada['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x1c9d40),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1c9d40,Number['NEGATIVE_INFINITY']));const _0x397fdc=x(_0x2da081['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x397fdc),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x397fdc));const _0x3e9d13=Array['from'](this['_diffRoots'])['map'](([_0xdaa8d2,_0x3fa6c0])=>[_0xdaa8d2,x(_0x3fa6c0)]);this['_saveMetaData'](this['_lastTo'],_0x3e9d13,this['_markers'],_0x2c8713);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x698b75,_0x2444e9,_0x5c3599,_0x3a7c95){const _0x48b54e=new Map(_0x2444e9),_0x39ad8d=new Map(_0x2fa70e(_0x3a7c95)),_0x59c908=new Map();for(const [_0x390dd4,_0x130da6]of _0x5c3599)_0x59c908['set'](_0x390dd4,{'start':_0x130da6['start']['clone'](),'end':_0x130da6['end']['clone'](),'rootName':_0x130da6['root']['rootName']});this['_savedMetaData']['set'](_0x698b75,{'roots':_0x48b54e,'markers':_0x59c908,'rootsAttributes':_0x39ad8d});}['_removeMetaData'](_0x24ceda){this['_savedMetaData']['delete'](_0x24ceda);}['_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'](_0x1b1b2f,_0x2fec0f=null){let _0x40f587=null;_0x1b1b2f['is']('documentFragment')||(_0x40f587=new _0x4d179(_0x1b1b2f['name'],{'vid_start':null===_0x2fec0f?this['_revisionId']++:_0x2fec0f++}));const _0x15c8b5=[];for(const _0x1aa5df of _0x1b1b2f['getChildren']())if(_0x1aa5df['is']('element')){_0x15c8b5['push'](this['_makeIdsRoot'](_0x1aa5df,_0x2fec0f));const _0x2d8faf=_0x15c8b5[_0x15c8b5['length']-0x1];null!==_0x2fec0f&&(_0x2fec0f=_0x2d8faf['is']('element','$text')?_0x2d8faf['getAttribute']('vid')+0x1:_0x2d8faf['getAttribute']('vid_end')+0x1);}else{for(let _0x1a9231=0x0;_0x1a9231<_0x1aa5df['offsetSize'];_0x1a9231++)_0x15c8b5['push'](new _0x4d179('$text',{'vid':null===_0x2fec0f?this['_revisionId']++:_0x2fec0f++}));}if(_0x1b1b2f['is']('documentFragment')){const _0x5bea8c=N(_0x1b1b2f['rootName']);return _0x5bea8c['_insertChild'](0x0,_0x15c8b5),_0x5bea8c;}return _0x40f587['_setAttribute']('vid_end',null===_0x2fec0f?this['_revisionId']++:_0x2fec0f++),_0x40f587['_insertChild'](0x0,_0x15c8b5),_0x40f587;}['_calculateMetaData'](_0x37282c,_0x3650c2,_0x3d8bc2){this['_reset']();const {roots:_0x59ae4d,markers:_0x516411,rootsAttributes:_0x14f080}=this['_savedMetaData']['get'](_0x37282c);this['_baseRoots']=new Map(_0x59ae4d),this['_baseRootsAttributes']=new Map(_0x2fa70e(_0x14f080));for(const [_0x3239a6,_0xb29d14]of this['_baseRoots'])if('$graveyard'!==_0x3239a6&&(this['_diffRoots']['set'](_0x3239a6,x(_0xb29d14)),this['_diffRootsAttributes']=new Map(_0x2fa70e(_0x14f080)),_0x3d8bc2)){const _0x15bf60=this['_revisionId'];this['_idsRoots']['set'](_0x3239a6,this['_makeIdsRoot'](_0xb29d14)),this['_baseIdsRoots']['set'](_0x3239a6,this['_makeIdsRoot'](_0xb29d14,_0x15bf60));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',x(this['_baseRoots']['get']('$graveyard'))),_0x3d8bc2&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x4505c6,_0x4249f1]of _0x516411){const _0x559bc8=this['_baseRoots']['get'](_0x4249f1['rootName']),_0x5bc5a1=this['_diffRoots']['get'](_0x4249f1['rootName']),_0x4f69ae=new _0xf40c04(this['_fixPosition'](_0x4249f1['start'],_0x559bc8),this['_fixPosition'](_0x4249f1['end'],_0x559bc8)),_0x54661f=this['_fixRange'](_0x4f69ae,_0x5bc5a1);_0x559bc8['markers']['set'](_0x4505c6,_0x4f69ae),this['_markers']['set'](_0x4505c6,_0x54661f);}this['_applyOperations'](_0x37282c,_0x3650c2,_0x3d8bc2);}['_applyOperations'](_0x31a7e6,_0x3c21a2,_0x46c73b){for(const _0x33d5b5 of this['source']['getOperations'](_0x31a7e6,_0x3c21a2))this['_handleOperation'](_0x33d5b5,_0x46c73b);for(const _0xe5005f of this['_diffRoots']['values']())_0xe5005f['markers']['clear']();for(const [_0x2a3dd3,_0x6b899f]of this['_markers']){this['_diffRoots']['get'](_0x6b899f['root']['rootName'])['markers']['set'](_0x2a3dd3,_0x6b899f['clone']());}const _0x55faea=new Map(),_0xbb71a3=new Map();for(const [_0x292ac0,_0xcf7d7b]of this['_diffRoots'])_0x55faea['set'](_0x292ac0,x(_0xcf7d7b)),_0xbb71a3['set'](_0x292ac0,this['_diffRootsAttributes']['get'](_0x292ac0));this['_saveMetaData'](_0x3c21a2,_0x55faea,this['_markers'],_0xbb71a3);}['_getPreviousFrom'](_0x2199b8){const _0x27fc45=Array['from'](this['_savedMetaData']['keys']());_0x27fc45['sort']((_0x4e2a2b,_0x528dc2)=>_0x4e2a2b-_0x528dc2),_0x27fc45['reverse']();for(const _0x3c33a2 of _0x27fc45)if(_0x3c33a2<_0x2199b8)return _0x3c33a2;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x121837,_0xe5fa29){const _0x21f850=Array['from'](_0xe5fa29['markers'])['map'](([_0x23223a,_0x17e007])=>[_0x23223a,this['_fixRange'](_0x17e007,_0x121837)]);_0x121837['markers']=new Map(_0x21f850);}['_transformMarkers'](_0x43e857){for(const _0xd5f4b of this['_markers']['values']()){const _0x4629ba=_0xd5f4b['getTransformedByOperation'](_0x43e857),_0x52ed5c=_0xf40c04['_createFromRanges'](_0x4629ba);_0xd5f4b['start']=_0x52ed5c['start'],_0xd5f4b['end']=_0x52ed5c['end'];}}['_handleOperation'](_0x30baa2,_0x22ed56){if('addRoot'!=_0x30baa2['type']&&'detachRoot'!=_0x30baa2['type']){if('insert'==_0x30baa2['type']){const _0x15103d=_0x30baa2['position']['root']['rootName'];this['_diffRoots']['has'](_0x15103d)||(this['_diffRoots']['set'](_0x15103d,N(_0x15103d,!0x0)),this['_diffRootsAttributes']['set'](_0x15103d,{}),_0x22ed56&&this['_idsRoots']['set'](_0x15103d,N(_0x15103d,!0x0)));}else{if('addRootAttribute'==_0x30baa2['type']||'removeRootAttribute'==_0x30baa2['type']||'changeRootAttribute'==_0x30baa2['type'])return void this['_handleRootAttributeOperation'](_0x30baa2);'marker'==_0x30baa2['type']&&this['_handleMarkerOperation'](_0x30baa2);}if('marker'!==_0x30baa2['type']){const _0xc5aa45=this['_cloneOperation'](_0x30baa2,this['_diffRoots']);_0xc5aa45['_execute'](),this['_transformMarkers'](_0xc5aa45);}if(_0x22ed56)switch(_0x30baa2['type']){case'insert':this['_handleInsertOperation'](_0x30baa2);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x30baa2);break;case'merge':this['_handleMergeOperation'](_0x30baa2);break;case'split':this['_handleSplitOperation'](_0x30baa2);}}else this['_handleRootOperation'](_0x30baa2,_0x22ed56);}['_cloneOperation'](_0x4f0e03,_0x3b7e79){const _0xa9b11e=_0x4f0e03['clone']();return _0xa9b11e['_authorId']=_0x4f0e03['_authorId'],this['_fixOperation'](_0xa9b11e,_0x3b7e79),_0xa9b11e;}['_getBaseVids'](_0x89abe4){return _0x89abe4['map'](_0x2e20d0=>{const _0xe35803=this['_getVidAttributeName'](_0x2e20d0);return Number(_0x2e20d0['item']['getAttribute'](_0xe35803));});}['_generateTape'](_0x49f615,_0x52b821){if(_0x49f615['is']('element','$text'))_0x52b821['push']({'item':_0x49f615,'type':'text'});else{_0x49f615['is']('element')&&_0x52b821['push']({'item':_0x49f615,'type':'elementStart'});for(const _0xd1952 of _0x49f615['getChildren']())this['_generateTape'](_0xd1952,_0x52b821);_0x49f615['is']('element')&&_0x52b821['push']({'item':_0x49f615,'type':'elementEnd'});}return _0x52b821;}['_getState'](){const _0x96a1b1=new Map(this['_touched']),_0x2d823d=new Map(_0x96a1b1),_0x499323=new Map(),_0x223e25={'insertions':{},'deletions':{}},_0x5338c3={'insertions':{},'deletions':{}},_0x3b734d=new Map(),_0x3d1fea=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x3d1fea['delete']('$graveyard');for(const _0x3751bb of _0x3d1fea){const _0x509a2f=this['_diffRoots']['get'](_0x3751bb)||N(_0x3751bb,!0x1),_0x32ce5d=this['_baseRoots']['get'](_0x3751bb)||N(_0x3751bb,!0x1);_0x509a2f['isAttached']()||_0x32ce5d['isAttached']()?(_0x223e25['insertions'][_0x3751bb]=x(_0x509a2f),_0x223e25['deletions'][_0x3751bb]=x(_0x32ce5d),this['_copyMarkers'](_0x223e25['deletions'][_0x3751bb],_0x32ce5d),this['_copyMarkers'](_0x223e25['insertions'][_0x3751bb],_0x509a2f),_0x5338c3['insertions'][_0x3751bb]=this['_generateTape'](this['_idsRoots']['get'](_0x3751bb),[]),_0x5338c3['deletions'][_0x3751bb]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x3751bb)||N(_0x3751bb,!0x1),[])):_0x3d1fea['delete'](_0x3751bb);}for(const _0x3c6132 of _0x3d1fea){const _0x417811=_0x5338c3['insertions'][_0x3c6132];for(const _0x2b27b2 of _0x417811){const _0x292327=this['_getVidAttributeName'](_0x2b27b2),_0x19cfe2=_0x2b27b2['item']['getAttribute'](_0x292327);_0x2d823d['delete'](_0x19cfe2),_0x19cfe2>=this['_startingRevisionId']&&_0x499323['set'](_0x19cfe2,_0x96a1b1['get'](_0x19cfe2));}}for(const _0x518c72 of _0x3d1fea){const _0x19dd2b=_0x5338c3['insertions'][_0x518c72],_0x10dced=this['_getBaseVids'](_0x5338c3['deletions'][_0x518c72]);let _0x4e5602=0x0;for(const _0x2cc229 of _0x19dd2b){const _0x399108=this['_getVidAttributeName'](_0x2cc229),_0x2b2798=_0x2cc229['item']['getAttribute'](_0x399108);if(!_0x499323['has'](_0x2b2798)&&!_0x3b734d['has'](_0x2b2798)){if(_0x2d823d['has'](_0x2b2798))_0x4e5602++;else{if(_0x2b2798!=_0x10dced[_0x4e5602]){const _0x1b7e13=_0x96a1b1['get'](_0x2b2798)||_0x96a1b1['get'](_0x10dced[_0x4e5602]);for(;_0x2b2798!=_0x10dced[_0x4e5602];)_0x2d823d['has'](_0x10dced[_0x4e5602])||(_0x3b734d['set'](_0x10dced[_0x4e5602],_0x1b7e13),_0x96a1b1['set'](_0x10dced[_0x4e5602],_0x1b7e13)),_0x4e5602++;}_0x4e5602++;}}}}for(const _0x31d486 of _0x3d1fea){const _0x3dfc61=_0x5338c3['insertions'][_0x31d486];for(const _0x25350a of _0x3dfc61){const _0x4ac16b=this['_getVidAttributeName'](_0x25350a),_0x4559f2=_0x25350a['item']['getAttribute'](_0x4ac16b);if(_0x3b734d['has'](_0x4559f2)){const _0x5d7017=_0x3b734d['get'](_0x4559f2);_0x2d823d['has'](_0x4559f2)||_0x2d823d['set'](_0x4559f2,{..._0x5d7017}),_0x499323['set'](_0x4559f2,{..._0x5d7017});}}}for(const _0x2e725 of _0x2d823d['keys']())_0x2e725>=this['_startingRevisionId']&&_0x2d823d['delete'](_0x2e725);const _0x49925b=new Map();for(const _0x315dff of _0x3d1fea){let _0x3d34ad=_0x5338c3['insertions'][_0x315dff];for(const _0x4ae280 of _0x3d34ad)if(_0x4ae280['item']['is']('element','tableCell')){const _0x140223=this['_getVidAttributeName'](_0x4ae280),_0x446aac=_0x4ae280['item']['getAttribute'](_0x140223);if(_0x499323['has'](_0x446aac)){const _0x4313fe=_0x4ae280['item']['parent']['parent']['getAttribute']('vid_start'),_0x40aa44=_0x49925b['get'](_0x4313fe)||new Set();_0x40aa44['add'](_0x499323['get'](_0x446aac)['userId']),_0x49925b['set'](_0x4313fe,_0x40aa44);}}_0x3d34ad=_0x5338c3['deletions'][_0x315dff];for(const _0x2afae9 of _0x3d34ad)if(_0x2afae9['item']['is']('element','tableCell')){const _0x3bfdcd=this['_getVidAttributeName'](_0x2afae9),_0x590a6f=_0x2afae9['item']['getAttribute'](_0x3bfdcd);if(_0x2d823d['has'](_0x590a6f)){const _0x32deb1=_0x2afae9['item']['parent']['parent']['getAttribute']('vid_start'),_0x3c3f5c=_0x49925b['get'](_0x32deb1)||new Set();_0x3c3f5c['add'](_0x2d823d['get'](_0x590a6f)['userId']),_0x49925b['set'](_0x32deb1,_0x3c3f5c);}}for(const _0x56a50c of _0x49925b['keys']())(_0x499323['has'](_0x56a50c)||_0x2d823d['has'](_0x56a50c))&&_0x49925b['delete'](_0x56a50c);}for(const _0x300989 of _0x3d1fea){const _0x3395cc=_0x5338c3['insertions'][_0x300989];let _0x150918=null,_0x102932=null;for(const _0x172764 of _0x3395cc){const _0x52683d=this['_getVidAttributeName'](_0x172764),_0x5defe5=_0x172764['item']['getAttribute'](_0x52683d),_0x3d9872=_0x49925b['get'](_0x5defe5);_0x3d9872&&'elementStart'==_0x172764['type']&&(_0x150918=Array['from'](_0x3d9872)[0x0],_0x102932=_0x172764['item']['getAttribute']('vid_end')),_0x150918&&(_0x2d823d['set'](_0x5defe5,{'userId':_0x150918}),_0x499323['set'](_0x5defe5,{'userId':_0x150918})),_0x5defe5==_0x102932&&(_0x150918=null,_0x102932=null);}}const _0x171bcd={},_0x1bf92b=new Set();for(const _0x4ea5e8 of _0x3d1fea){const _0x365d74=_0x223e25['deletions'][_0x4ea5e8],_0x1e8c9b=_0x223e25['insertions'][_0x4ea5e8];for(const {userId:_0x4bb285}of this['_touchedMarkers']['values']())null!==_0x4bb285&&_0x1bf92b['add'](_0x4bb285);for(const {userId:_0x3836d9}of this['_touchedRoots']['values']())null!==_0x3836d9&&_0x1bf92b['add'](_0x3836d9);this['_markChanges'](_0x1e8c9b,_0x5338c3['insertions'][_0x4ea5e8],_0x499323,'insertion',_0x1bf92b),this['_markChanges'](_0x365d74,_0x5338c3['deletions'][_0x4ea5e8],_0x2d823d,'deletion',_0x1bf92b),_0x171bcd[_0x4ea5e8]={'insertions':this['_prepareViewToSave'](_0x1e8c9b),'deletions':this['_prepareViewToSave'](_0x365d74),'attachChange':this['_touchedRoots']['get'](_0x4ea5e8)||null,'attributesBefore':_0x2fa70e(this['_baseRootsAttributes']['get'](_0x4ea5e8))||{},'attributesAfter':_0x2fa70e(this['_diffRootsAttributes']['get'](_0x4ea5e8))};}return{'diffData':_0x171bcd,'authorsIds':Array['from'](_0x1bf92b)};}['_processRootBeforeSave'](_0x2d4cab){for(const [,_0x13c1c8]of _0x2d4cab['markers']){const _0x3bea57=_0x13c1c8['start']['getAncestors']()['filter'](_0x369cb1=>'tableCell'==_0x369cb1['name']);for(const _0x8c8954 of _0x3bea57)0x1==_0x8c8954['childCount']&&_0x8c8954['getChild'](0x0)['is']('element','paragraph')&&_0x8c8954['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x8c324e){this['_processRootBeforeSave'](_0x8c324e);const _0x40fa80=this['editor']['data']['toView'](_0x8c324e,{}),_0x4486a5=Array['from'](_0x40fa80['getChildren']())['map'](_0x171cea=>this['_getViewJson'](_0x171cea));return JSON['stringify'](_0x4486a5);}['_getViewJson'](_0x22a3be){if(_0x22a3be['is']('$text'))return _0x22a3be['data'];{const _0x252402=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x1e4bb9=_0x22a3be,_0xd79fe0=this['editor']['data']['htmlProcessor']['domConverter'],_0x22d4aa={'type':_0x252402['_getTypeCharForViewElement'](_0x1e4bb9),'name':_0x1e4bb9['name'],'attributes':Array['from'](_0x1e4bb9['getAttributes']()),'children':Array['from'](_0x1e4bb9['getChildren']())['map'](_0xbff489=>this['_getViewJson'](_0xbff489))};if(_0x22a3be['is']('uiElement')&&'$comment'!=_0x22a3be['name']){const _0x2efe1d=_0x22a3be['render'](_0xd79fe0['domDocument'],_0xd79fe0);_0x22d4aa['children']['push'](_0x2efe1d['outerHTML']);}else{if(_0x22a3be['is']('rawElement')){const _0x12c07c=_0xd79fe0['domDocument']['createElement'](_0x1e4bb9['name']);_0x22a3be['render'](_0x12c07c,_0xd79fe0),_0x22d4aa['children']['push'](_0x12c07c['innerHTML']);}}const _0x3d5f16=Array['from'](_0x1e4bb9['getCustomProperties']());_0x3d5f16['length']>0x0&&(_0x22d4aa['customProperties']=_0x3d5f16);const _0x2a753f=_0x1e4bb9['getFillerOffset']();return null!==_0x2a753f&&(_0x22d4aa['fillerOffset']=_0x2a753f),_0x22d4aa;}}['_markChanges'](_0x2b70f9,_0x411a9c,_0x59bbc7,_0x2d76e3,_0x26ffe2){let _0x3418a6=null,_0x33878b=null,_0x249d40=0x0;const _0x4c33a1=this['editor']['model'];for(let _0x3cc53c=0x0;_0x3cc53c<_0x411a9c['length'];_0x3cc53c++){const _0x376f3e=this['_getVidAttributeName'](_0x411a9c[_0x3cc53c]),_0xb3f5c0=_0x411a9c[_0x3cc53c]['item']['getAttribute'](_0x376f3e),_0xa81f70=_0x59bbc7['get'](_0xb3f5c0),_0x15223e=_0x3cc53c==_0x411a9c['length']-0x1;(!_0x3418a6&&_0xa81f70&&(_0x3418a6=_0xa81f70,_0x33878b=_0x411a9c[_0x3cc53c]),_0x3418a6&&(!_0xa81f70||_0xa81f70['userId']!=_0x3418a6['userId']))&&(_0x4e5b3c(_0xa81f70,P(_0x33878b,_0x2b70f9,_0x4c33a1),P(_0x411a9c[_0x3cc53c],_0x2b70f9,_0x4c33a1)),_0x3418a6=_0xa81f70||null,_0x33878b=_0xa81f70?_0x411a9c[_0x3cc53c]:null),_0x3418a6&&_0x15223e&&_0x4e5b3c(_0xa81f70,P(_0x33878b,_0x2b70f9,_0x4c33a1),V(_0x411a9c[_0x3cc53c],_0x2b70f9,_0x4c33a1));}function _0x4e5b3c(_0x1dab44,_0x4f375d,_0x58bfbf){const _0x194b15=_0x3418a6['userId'],_0x315dc5='revision:'+_0x2d76e3+':'+_0x194b15+':'+_0x249d40++,_0x4d403e=_0x4c33a1['createRange'](_0x4f375d,_0x58bfbf);_0x2b70f9['markers']['set'](_0x315dc5,_0x4d403e),null!==_0x194b15&&_0x26ffe2['add'](_0x194b15);}}['_getVidAttributeName'](_0x41693e){switch(_0x41693e['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x35a383,_0x2da29a){_0x35a383['baseVersion']=null;for(const _0x403a14 in _0x35a383){const _0x1ceda0=_0x35a383[_0x403a14];if(_0x1ceda0 instanceof _0x430f9e){const _0x4608d=_0x2da29a['get'](_0x1ceda0['root']['rootName']);_0x35a383[_0x403a14]=this['_fixPosition'](_0x1ceda0,_0x4608d);}if(_0x1ceda0 instanceof _0xf40c04){const _0x46cee0=_0x2da29a['get'](_0x1ceda0['root']['rootName']);_0x35a383[_0x403a14]=this['_fixRange'](_0x1ceda0,_0x46cee0);}'root'===_0x403a14&&(_0x35a383['root']=_0x2da29a['get'](_0x35a383['root']['rootName']));}}['_fixRange'](_0xf526e4,_0x5e5758){return this['editor']['model']['createRange'](this['_fixPosition'](_0xf526e4['start'],_0x5e5758),this['_fixPosition'](_0xf526e4['end'],_0x5e5758));}['_fixPosition'](_0x386682,_0x26593c){return this['editor']['model']['createPositionFromPath'](_0x26593c,_0x386682['path'],_0x386682['stickiness']);}['_handleInsertOperation'](_0xb36d4b){const _0x4189e8=this['_idsRoots']['get'](_0xb36d4b['position']['root']['rootName']),_0x417488=this['_fixPosition'](_0xb36d4b['position'],_0x4189e8),_0x36fae2=null===_0xb36d4b['_authorId']?null:_0xb36d4b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a2a66=_0x417488['parent'],_0xfe6157=this['_revisionId'],_0x451413=[];for(const _0x256c5b of _0xb36d4b['nodes'])if(_0x256c5b['is']('element'))_0x451413['push'](this['_makeIdsRoot'](_0x256c5b));else{for(let _0x4c745e=0x0;_0x4c745e<_0x256c5b['offsetSize'];_0x4c745e++)_0x451413['push'](new _0x4d179('$text',{'vid':this['_revisionId']++}));}const _0x35530f=this['_revisionId'];for(let _0x146883=_0xfe6157;_0x146883<_0x35530f;_0x146883++)this['_touched']['set'](_0x146883,{'userId':_0x36fae2});_0x1a2a66['_insertChild'](_0x417488['offset'],_0x451413);}['_handleMoveOperation'](_0x2e77a7){(_0x2e77a7=this['_cloneOperation'](_0x2e77a7,this['_idsRoots']))['_execute']();const _0x363c21=null===_0x2e77a7['_authorId']?null:_0x2e77a7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2f438f=_0x2e77a7['getMovedRangeStart'](),_0x4df6d9=_0x2f438f['parent'],_0x25fdbd=_0x2f438f['offset'];!function _0x4a1630(_0x16110e,_0x3a30a6,_0x52f1bf,_0x3997b7){for(let _0x24a387=_0x52f1bf;_0x24a387<_0x3997b7;_0x24a387++){const _0x35f08c=_0x3a30a6['getChild'](_0x24a387);_0x35f08c['is']('element','$text')?_0x16110e['set'](_0x35f08c['getAttribute']('vid'),{'userId':_0x363c21}):(_0x16110e['set'](_0x35f08c['getAttribute']('vid_start'),{'userId':_0x363c21}),_0x4a1630(_0x16110e,_0x35f08c,0x0,_0x35f08c['childCount']),_0x16110e['set'](_0x35f08c['getAttribute']('vid_end'),{'userId':_0x363c21}));}}(this['_touched'],_0x4df6d9,_0x25fdbd,_0x25fdbd+_0x2e77a7['howMany']);}['_handleMergeOperation'](_0x311ff7){const _0x1c4b78=null===(_0x311ff7=this['_cloneOperation'](_0x311ff7,this['_idsRoots']))['_authorId']?null:_0x311ff7['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x40ce70=_0x311ff7['targetPosition']['parent'],_0x528aed=_0x311ff7['sourcePosition']['parent'],_0x84ef99=_0x40ce70['getAttribute']('vid_end'),_0x1f72c6=_0x528aed['getAttribute']('vid_start');_0x40ce70['_setAttribute']('vid_end',_0x528aed['getAttribute']('vid_end')),_0x528aed['_setAttribute']('vid_end',_0x84ef99),this['_touched']['set'](_0x1f72c6,{'userId':_0x1c4b78}),this['_touched']['set'](_0x84ef99,{'userId':_0x1c4b78}),_0x311ff7['_execute']();}['_handleSplitOperation'](_0x407850){const _0x3ebb9f=null===(_0x407850=this['_cloneOperation'](_0x407850,this['_idsRoots']))['_authorId']?null:_0x407850['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2987ab=_0x407850['graveyardPosition'],_0x15e798=_0x407850['splitPosition']['parent'];_0x407850['_execute']();const _0x35a269=_0x15e798['getAttribute']('vid_end'),_0x19f4a1=_0x407850['insertionPosition']['nodeAfter'];if(_0x2987ab){const _0x4ed905=_0x19f4a1['getAttribute']('vid_end'),_0x2ea2b4=_0x15e798['getAttribute']('vid_end');_0x15e798['_setAttribute']('vid_end',_0x4ed905),_0x19f4a1['_setAttribute']('vid_end',_0x2ea2b4),this['_touched']['set'](_0x15e798['getAttribute']('vid_end'),{'userId':_0x3ebb9f}),this['_touched']['set'](_0x19f4a1['getAttribute']('vid_start'),{'userId':_0x3ebb9f});}else{const _0x2563e4=this['_revisionId']++,_0x9890e1=this['_revisionId']++;_0x15e798['_setAttribute']('vid_end',_0x2563e4),_0x19f4a1['_setAttribute']('vid_start',_0x9890e1),_0x19f4a1['_setAttribute']('vid_end',_0x35a269),this['_touched']['set'](_0x2563e4,{'userId':_0x3ebb9f}),this['_touched']['set'](_0x9890e1,{'userId':_0x3ebb9f});}}['_handleMarkerOperation'](_0x416465){if(!_0x416465['affectsData'])return;const _0x1a2af0=(_0x416465=this['_cloneOperation'](_0x416465,this['_diffRoots']))['oldRange']?_0x416465['oldRange']['root']:null,_0x5d7182=_0x416465['newRange']?_0x416465['newRange']['root']:null;_0x1a2af0&&this['_markers']['delete'](_0x416465['name']),_0x5d7182&&this['_markers']['set'](_0x416465['name'],_0x416465['newRange']['clone']());const _0x476b73=null===_0x416465['_authorId']?null:_0x416465['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x20a064=_0x416465['name'];if(!this['_touchedMarkers']['has'](_0x20a064))return void this['_touchedMarkers']['set'](_0x20a064,{'range':_0x416465['oldRange'],'userId':_0x476b73});const _0x57af38=this['_touchedMarkers']['get'](_0x20a064),_0x5f14ce=_0x57af38['range'],_0x4d53a6=_0x416465['newRange'];null==_0x5f14ce&&null==_0x4d53a6||_0x5f14ce&&_0x4d53a6&&_0x5f14ce['isEqual'](_0x4d53a6)?this['_touchedMarkers']['delete'](_0x416465['name']):_0x57af38['userId']=_0x476b73;}['_handleRootOperation'](_0x51a245,_0x849ee8){this['_diffRoots']['has'](_0x51a245['rootName'])?this['_diffRoots']['get'](_0x51a245['rootName'])['_isAttached']=_0x51a245['isAdd']:(this['_diffRoots']['set'](_0x51a245['rootName'],N(_0x51a245['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x51a245['rootName'],{}),_0x849ee8&&this['_idsRoots']['set'](_0x51a245['rootName'],N(_0x51a245['rootName'],!0x0)));const _0x16f7f1=null===_0x51a245['_authorId']?null:_0x51a245['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x250e20=this['_touchedRoots']['get'](_0x51a245['rootName']);_0x250e20&&_0x250e20['userId']===_0x16f7f1?this['_touchedRoots']['delete'](_0x51a245['rootName']):this['_touchedRoots']['set'](_0x51a245['rootName'],{'userId':_0x16f7f1,'isAttached':_0x51a245['isAdd']});}['_handleRootAttributeOperation'](_0xe73daa){const _0x4225ff=this['_diffRootsAttributes']['get'](_0xe73daa['root']['rootName']);null===_0xe73daa['newValue']?delete _0x4225ff[_0xe73daa['key']]:_0x4225ff[_0xe73daa['key']]=_0xe73daa['newValue'];}}function x(_0x5956fc){const _0x4ba44d=N(_0x5956fc['rootName'],_0x5956fc['isAttached']());for(const _0x116e24 of _0x5956fc['getChildren']()){const _0x378520=_0x116e24['_clone'](!0x0);_0x4ba44d['_appendChild'](_0x378520);}return _0x4ba44d;}function N(_0x461a23,_0x569d7f=!0x0){const _0x1e28c8=new _0x788399();return _0x1e28c8['rootName']=_0x461a23,_0x1e28c8['_isAttached']=_0x569d7f,_0x1e28c8['isAttached']=()=>_0x1e28c8['_isAttached'],_0x1e28c8;}function P(_0x4c5de5,_0x1ffb90,_0x2293d8){const _0x3bfde7='elementEnd'==_0x4c5de5['type']?_0x2293d8['createPositionAt'](_0x4c5de5['item'],'end'):_0x2293d8['createPositionBefore'](_0x4c5de5['item']);return _0x2293d8['createPositionFromPath'](_0x1ffb90,_0x3bfde7['path'],_0x3bfde7['stickiness']);}function V(_0x456a1d,_0x5af7e0,_0x5f146b){const _0x1b3047='elementStart'==_0x456a1d['type']?_0x5f146b['createPositionAt'](_0x456a1d['item'],0x0):_0x5f146b['createPositionAfter'](_0x456a1d['item']);return _0x5f146b['createPositionFromPath'](_0x5af7e0,_0x1b3047['path'],_0x1b3047['stickiness']);}class he extends/* #__PURE__ -- @preserve */
25
+ _0x52266d(_0x126ab4){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x1f69de,_0x47e79a){super(_0x1f69de),this['focusTracker']=new _0xb1d55b(),this['keystrokes']=new _0x5be3b7(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x47e79a),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'](),_0x3848c6({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x41fcad=_0x4a28f3=>_0x4a28f3['stopPropagation']();this['keystrokes']['set']('arrowright',_0x41fcad),this['keystrokes']['set']('arrowleft',_0x41fcad),this['keystrokes']['set']('arrowup',_0x41fcad),this['keystrokes']['set']('arrowdown',_0x41fcad);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x223e9b){this['revisionNameInputView']['fieldView']['element']['value']=_0x223e9b['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x24bed7){const _0xee9537=new et(this['locale'],ti),_0x3eb73d=_0xee9537['fieldView'];_0x3eb73d['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x7d1b1f=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x24bed7&&(_0x7d1b1f+='\x20('+m(this['locale'],'optional')+')'),(_0xee9537['label']=_0x7d1b1f,_0x3eb73d['on']('input',()=>{this['revisionNameInputValue']=_0x3eb73d['element']['value']['trim']();}),_0xee9537);}}class l extends _0x37efbb{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h];}['_saveRevisionFormView'];['init'](){const _0x55a7c4=this['editor'],_0x4cd5bb=_0x55a7c4['plugins']['get']('RevisionTracker');_0x55a7c4['ui']['componentFactory']['add']('revisionHistory',_0x14612c=>{const _0x4bcfc4=_0x3295c4(_0x14612c),_0x1f2e27=_0x4bcfc4['panelView']['children'],_0x13293b=new _0x4fd814(_0x14612c),_0x203f9d=new _0x472e37(_0x14612c),_0x8a6877=this['_createSaveRevisionButton'](_0xc3e667),_0x207e44=new _0x472e37(_0x14612c),_0x521ccb=this['_createOpenRevisionButton'](_0xc3e667);return _0x4bcfc4['bind']('isEnabled')['to'](_0x4cd5bb,'isReady',_0x4cd5bb,'isEnabled',_0x55a7c4,'isReadOnly',(_0x29ec37,_0xb4b575,_0x842ea7)=>_0x29ec37&&_0xb4b575&&!_0x842ea7),_0x4bcfc4['buttonView']['set']({'icon':_0x5f4d6c,'label':m(_0x14612c,'Revision\x20history'),'tooltip':!0x0}),_0x8a6877['set']({'withText':!0x0,'role':'menuitem'}),_0x521ccb['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x521ccb,'execute',()=>{_0x4bcfc4['isOpen']=!0x1,_0x55a7c4['editing']['view']['focus']();},{'priority':'low'}),_0x203f9d['children']['add'](_0x8a6877),_0x207e44['children']['add'](_0x521ccb),_0x13293b['role']='menu',_0x13293b['items']['addMany']([_0x203f9d,_0x207e44]),_0x1f2e27['add'](_0x13293b),_0x4bcfc4;}),_0x55a7c4['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x2b1f1d=this['editor'],_0x3ff3b4=_0x2b1f1d['locale'],_0x15c74c=_0x2b1f1d['plugins']['get']('RevisionTracker'),_0x5c9217=new _0x483f6b(_0x3ff3b4),_0x9ba300=new _0xf63aa3(_0x3ff3b4);_0x5c9217['bind']('isEnabled')['to'](_0x15c74c,'isReady',_0x15c74c,'isEnabled',_0x2b1f1d,'isReadOnly',(_0xf0a82b,_0xd11f89,_0x3d1049)=>_0xf0a82b&&_0xd11f89&&!_0x3d1049),_0x5c9217['buttonView']['set']({'icon':_0x5f4d6c,'label':m(_0x3ff3b4,'Revision\x20history')});const _0x2ff525=new _0x41236d(_0x3ff3b4,_0x5c9217),_0x13f8a8=this['_createSaveRevisionButton'](_0x5f27ec);_0x13f8a8['delegate']('execute')['to'](_0x5c9217),_0x2ff525['children']['add'](_0x13f8a8),_0x9ba300['items']['add'](_0x2ff525);const _0x5c8afb=new _0x41236d(_0x3ff3b4,_0x5c9217),_0x2a6093=this['_createOpenRevisionButton'](_0x5f27ec);return _0x2a6093['delegate']('execute')['to'](_0x5c9217),_0x5c8afb['children']['add'](_0x2a6093),_0x9ba300['items']['add'](_0x5c8afb),_0x5c9217['panelView']['children']['add'](_0x9ba300),_0x5c9217;}['_createSaveRevisionButton'](_0x57beaa){const _0x4caf33=this['editor'],_0x11b225=_0x4caf33['plugins']['get']('RevisionTracker'),_0xf128d8=new _0x57beaa(_0x4caf33['locale']);return _0xf128d8['set']({'label':m(_0x4caf33['locale'],'Save\x20current\x20revision')}),_0xf128d8['bind']('isEnabled')['to'](_0x11b225,'isReady',_0x11b225,'isEnabled',_0x4caf33,'isReadOnly',(_0x150282,_0x47c446,_0x4199d2)=>_0x150282&&_0x47c446&&!_0x4199d2),this['listenTo'](_0xf128d8,'execute',()=>{this['_showDialog']();}),_0xf128d8;}['_createOpenRevisionButton'](_0xb85dba){const _0x112970=this['editor'],_0x4b22f3=_0x112970['plugins']['get']('RevisionTracker'),_0x39e3c8=new _0xb85dba(_0x112970['locale']);return _0x39e3c8['set']({'label':m(_0x112970['locale'],'Open\x20revision\x20history')}),_0x39e3c8['bind']('isEnabled')['to'](_0x4b22f3,'isReady',_0x112970,'isReadOnly',(_0x3df76,_0x50d121)=>_0x3df76&&!_0x50d121),this['listenTo'](_0x39e3c8,'execute',()=>{_0x112970['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x39e3c8;}['_showDialog'](){const _0x4fe7f9=this['editor'],_0x6d911e=_0x4fe7f9['locale'],_0x2a09ae=_0x4fe7f9['plugins']['get']('Dialog'),_0x134580=_0x4fe7f9['plugins']['get']('RevisionTracker');function _0x3a9956(_0x2a3fe9){_0x4fe7f9['config']['get']('revisionHistory.requireRevisionName')&&''===_0x2a3fe9['revisionName']?_0x2a3fe9['revisionNameInputView']['errorText']=m(_0x6d911e,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x4fe7f9['plugins']['get'](h)['saveRevision']({'name':_0x2a3fe9['revisionName']}),_0x2a09ae['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3a9956(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x2a09ae['show']({'id':'revisionSave','title':m(_0x6d911e,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x4fe7f9['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x2a09ae['hide']()},{'label':m(_0x4fe7f9['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x5c7bb7){_0x5c7bb7['bind']('isEnabled')['to'](_0x134580,'isReady',_0x134580,'isEnabled',_0x4fe7f9,'isReadOnly',(_0x1f071e,_0x5bd999,_0x6f7110)=>_0x1f071e&&_0x5bd999&&!_0x6f7110);},'onExecute':()=>_0x3a9956(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x2a7b3d=this['editor'],_0x4f38f4=_0x2a7b3d['locale'];this['_saveRevisionFormView']=new he(_0x4f38f4,_0x2a7b3d['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class z extends _0x126ab4{['changeId'];['_model'];constructor(_0x2e3e48,_0x1c5c6e){super(_0x2e3e48),this['_model']=_0x1c5c6e,this['changeId']=_0x1c5c6e['id'];const _0x593d32=this['bindTemplate'],_0x5a5768=m(_0x2e3e48,_0x1c5c6e['data']['isSuggestion']?'Suggested\x20by':'add'==_0x1c5c6e['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x1c5c6e['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x593d32['to']('type',_0x43a2d3=>'ck-revision-change__'+_0x43a2d3)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5a5768}]},{'text':'\x20'+_0x1c5c6e['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class G extends/* #__PURE__ -- @preserve */
26
+ _0x2f0b4b(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x612da0){super(),this['id']=_0x612da0['id']||_0x2007cb(),this['author']=_0x612da0['author'],this['type']=_0x612da0['type'],this['data']=_0x612da0['data']||{},this['rootName']=_0x612da0['rootName'],this['set']('createdAt',_0x612da0['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(_0x34fec6,_0xb626b5){this['newRevisionId']=_0x34fec6,this['oldRevisionId']=_0xb626b5,this['changes']=new _0x10ef23();}['_setChanges'](_0x22021e){for(const _0x9a10bc of _0x22021e)this['changes']['add'](_0x9a10bc);}}class u extends _0x37efbb{['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[_0x2a2deb,_0x282325,S,$];}constructor(_0x1da5bc){super(_0x1da5bc),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',(_0x3f1cf9,_0x1d79b7,_0x18ceb5)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x39358b=>{for(const _0x5577f9 of this['editor']['editing']['view']['document']['roots'])_0x18ceb5?_0x39358b['removeClass']('ck-editor__editable__overlay',_0x5577f9):_0x39358b['addClass']('ck-editor__editable__overlay',_0x5577f9);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x37396e=>null!==_0x37396e),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1857f2,_0x54a69a,_0x127696)=>_0x1857f2&&_0x127696?_0x54a69a['changes']['getIndex'](_0x127696):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x55a8ca,_0x41211b)=>_0x55a8ca?_0x41211b['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](_0x282325);}['init'](){const _0x5e8038=this['editor'],_0x2c85b7=new rt(_0x5e8038,{'direction':'backward'}),_0x51b1e6=new rt(_0x5e8038,{'direction':'forward'});(_0x5e8038['commands']['add']('showPreviousChange',_0x2c85b7),_0x5e8038['commands']['add']('showNextChange',_0x51b1e6),_0x5e8038['commands']['add']('restoreRevision',new nt(_0x5e8038)),this['on']('change:numberOfChanges',()=>{_0x2c85b7['refresh'](),_0x51b1e6['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5e8038['enableReadOnlyMode']('revision-viewer'),_0x5e8038['plugins']['has']('WidgetToolbarRepository'))&&_0x5e8038['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x484322){return await this['_utils']['loadRevisionData'](_0x484322,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x484322);}async['getRevisionRootsAttributes'](_0x11c739){return await this['_utils']['loadRevisionData'](_0x11c739,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x11c739);}async['compare'](_0x599b57,_0x2e282f,_0x4b0c69=!0x1){if(!this['isEnabled'])return;const _0x45da8d=this['diff'],_0x439f61=this['repository'],_0x4321cc='string'==typeof _0x599b57?_0x439f61['getRevision'](_0x599b57):_0x599b57,_0x53686d='string'==typeof _0x2e282f?_0x439f61['getRevision'](_0x2e282f):_0x2e282f,_0x4fbef4=_0x4321cc['id'],_0x1a09fe=_0x53686d?_0x53686d['id']:null;if(!_0x4b0c69&&this['diff']&&this['diff']['newRevisionId']===_0x4fbef4&&this['diff']['oldRevisionId']===_0x1a09fe)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new J(_0x4fbef4,_0x1a09fe);const _0x7f503b=this['_getRevisionsRange'](_0x4321cc,_0x53686d,!0x0)['map'](_0x23368d=>this['_utils']['loadRevisionData'](_0x23368d,this['adapter']));return _0x7f503b['push'](new Promise(_0x49c092=>{setTimeout(_0x49c092,0x14);})),Promise['all'](_0x7f503b)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x2e380a=this['_getDiff'](_0x4fbef4,_0x1a09fe);for(const _0x4a01ed of _0x2e380a['changes'])this['_changeIdToChange']['set'](_0x4a01ed['id'],_0x4a01ed);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x3a46a5=>{for(const _0x299f13 of this['editor']['model']['document']['getRootNames']())_0x3a46a5['detachRoot'](_0x299f13);for(const _0x593967 of Object['keys'](_0x2e380a['model'])){const _0x2d80c8=_0x3a46a5['addRoot'](_0x593967);for(const _0x17e0e3 of Object['keys'](_0x2e380a['attributes'][_0x593967]))_0x3a46a5['setAttribute'](_0x17e0e3,_0x2e380a['attributes'][_0x593967][_0x17e0e3],_0x2d80c8);_0x3a46a5['insert'](_0x2e380a['model'][_0x593967],_0x2d80c8,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x2e380a['changes'])),this['isReady']=!0x0;})['catch'](_0x286942=>{console['error'](_0x286942),this['_cleanUp'](),_0x45da8d&&(this['diff']=_0x45da8d),this['isReady']=!0x0;});}['addRevisionData'](_0x34611c,_0x536b42){const _0x1b1145=this['repository']['createRevision'](_0x34611c);return _0x1b1145['on']('_update',(_0x41ff74,_0x253052,_0x44565d)=>_0x536b42(_0x253052,_0x44565d,_0x1b1145)),this['repository']['addRevision'](_0x1b1145),_0x1b1145;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x4dac5f=>{for(const _0x2bd36f of this['editor']['model']['document']['getRootNames']())_0x4dac5f['detachRoot'](_0x2bd36f);});}['_sortAndFilterDiffChanges'](_0x2de91a){const _0x46d956=[],_0x364bc4=new Map();for(const _0x434607 of this['editor']['model']['document']['getRootNames']()){const _0xd463d1=this['editor']['editing']['view']['getDomRoot'](_0x434607);if(!_0xd463d1)continue;const _0x3c6c20=_0xd463d1['getClientRects']()['item'](0x0);_0x3c6c20&&(_0x46d956['push'](_0x434607),_0x364bc4['set'](_0x434607,_0x3c6c20));}return _0x46d956['sort']((_0x5b981e,_0x250076)=>{const _0x4aa8ea=_0x364bc4['get'](_0x5b981e),_0x1fa6c9=_0x364bc4['get'](_0x250076);return _0x4aa8ea['y']-_0x1fa6c9['y']||_0x4aa8ea['x']-_0x1fa6c9['x'];}),(_0x2de91a=_0x2de91a['filter'](_0x25e10d=>_0x46d956['includes'](_0x25e10d['rootName'])))['sort']((_0x30eee4,_0x2f32e9)=>_0x46d956['indexOf'](_0x30eee4['rootName'])-_0x46d956['indexOf'](_0x2f32e9['rootName'])),_0x2de91a;}['_makeTape'](_0x240b10){const _0x47a1ec=Array['from'](_0x240b10['markers'])['filter'](([_0x1b7c61,_0x377f9a])=>_0x1b7c61['startsWith']('revision:')&&!_0x377f9a['isCollapsed']),_0x2f2caf=Array['from'](this['editor']['model']['createRangeIn'](_0x240b10)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x47a1ec['length'])for(const _0x297aea of _0x2f2caf){const [_0x5a6153,_0x3b7c74]=_0x47a1ec[0x0],[,_0x1838f6,_0x144a59]=_0x5a6153['split'](':');if(_0x3b7c74['end']['isEqual'](_0x297aea['nextPosition'])&&_0x47a1ec['shift'](),(_0x297aea['previousPosition']['isEqual'](_0x3b7c74['start'])||_0x297aea['previousPosition']['isAfter'](_0x3b7c74['start']))&&('insertion'==_0x1838f6?_0x297aea['isAdded']={'userId':_0x144a59}:'deletion'==_0x1838f6&&(_0x297aea['isRemoved']={'userId':_0x144a59})),0x0==_0x47a1ec['length'])break;}return _0x2f2caf;}['_refreshStartEndIndex'](_0x550ce2){const _0x12b890=new Map();for(let _0x1c3c50=0x0;_0x1c3c50<_0x550ce2['length'];_0x1c3c50++)'text'===_0x550ce2[_0x1c3c50]['type']?(_0x550ce2[_0x1c3c50]['item']['startIndex']=_0x1c3c50,_0x550ce2[_0x1c3c50]['item']['endIndex']=_0x1c3c50):('elementStart'===_0x550ce2[_0x1c3c50]['type']?_0x550ce2[_0x1c3c50]['item']['startIndex']=_0x1c3c50:'elementEnd'===_0x550ce2[_0x1c3c50]['type']&&(_0x550ce2[_0x1c3c50]['item']['endIndex']=_0x1c3c50),_0x12b890['set'](_0x550ce2[_0x1c3c50]['id'],_0x1c3c50));for(const _0x4a30e1 of _0x12b890['values']())'elementStart'===_0x550ce2[_0x4a30e1]['type']?_0x550ce2[_0x4a30e1]['item']['endIndex']=_0x12b890['get'](_0x550ce2[_0x4a30e1]['pairId']):'elementEnd'===_0x550ce2[_0x4a30e1]['type']&&(_0x550ce2[_0x4a30e1]['item']['startIndex']=_0x12b890['get'](_0x550ce2[_0x4a30e1]['pairId']));}['_processTape'](_0x3dc3d1){for(let _0x2f81ad=0x0;_0x2f81ad<_0x3dc3d1['length'];_0x2f81ad++){if('elementStart'===_0x3dc3d1[_0x2f81ad]['type'])_0x3dc3d1[_0x2f81ad]['item']['startIndex']=_0x2f81ad;else{if('elementEnd'===_0x3dc3d1[_0x2f81ad]['type']){_0x3dc3d1[_0x2f81ad]['item']['endIndex']=_0x2f81ad;const _0xa9f3cf=_0x3dc3d1[_0x2f81ad]['item']['startIndex'];_0x3dc3d1[_0xa9f3cf]['pairId']=_0x3dc3d1[_0x2f81ad]['id'],_0x3dc3d1[_0x2f81ad]['pairId']=_0x3dc3d1[_0xa9f3cf]['id'];}else _0x3dc3d1[_0x2f81ad]['item']['startIndex']=_0x2f81ad,_0x3dc3d1[_0x2f81ad]['item']['endIndex']=_0x2f81ad,_0x3dc3d1[_0x2f81ad]['pairId']=null;}_0x3dc3d1[_0x2f81ad]['markersStart']||(_0x3dc3d1[_0x2f81ad]['markersStart']=[],_0x3dc3d1[_0x2f81ad]['markersEnd']=[]);}}['_markInsertions'](_0x4d7180,_0x5f43d3){const _0x70f2b5=_0x4d7180['filter'](_0x1f1da6=>!_0x1f1da6['isAdded']);for(let _0x222358=0x0;_0x222358<_0x5f43d3['length'];_0x222358++)_0x5f43d3[_0x222358]['isAdded']&&(_0x70f2b5[_0x222358]['isAdded']=_0x5f43d3[_0x222358]['isAdded']);}['_getDiff'](_0x25c070,_0x85f0a4=null){const _0x4703d5=this['repository']['getRevision'](_0x25c070),_0x5693ad=_0x85f0a4?this['repository']['getRevision'](_0x85f0a4):null,_0x229e75=this['_getRevisionsRange'](_0x4703d5,_0x5693ad),_0x45dcb1=_0x229e75[_0x229e75['length']-0x1],_0x163fe0=new Map(),_0x1baf32={'model':{},'attributes':{},'changes':[]},_0x3fe0fd=new Set(),_0x17b3fb=new Map();for(let _0x3eed1f=_0x229e75['length']-0x1;_0x3eed1f>=0x0;_0x3eed1f--){const _0x3f2fab=_0x229e75[_0x3eed1f];for(const _0x8f1713 of Object['keys'](_0x3f2fab['diffData']))if(_0x3f2fab['diffData'][_0x8f1713]['attachChange']){const _0x6ff50e=_0x3f2fab['diffData'][_0x8f1713]['attachChange'];_0x6ff50e['isAttached']?(_0x3fe0fd['add'](_0x8f1713),_0x17b3fb['has'](_0x8f1713)&&_0x17b3fb['get'](_0x8f1713)['userId']==_0x6ff50e['userId']?_0x17b3fb['delete'](_0x8f1713):_0x17b3fb['set'](_0x8f1713,_0x6ff50e)):_0x17b3fb['has'](_0x8f1713)?(_0x3fe0fd['delete'](_0x8f1713),_0x17b3fb['delete'](_0x8f1713)):(_0x3fe0fd['add'](_0x8f1713),_0x17b3fb['set'](_0x8f1713,_0x6ff50e));}else _0x3fe0fd['add'](_0x8f1713);}for(const _0x3463a5 of _0x3fe0fd){const _0x5765cd=_0x17b3fb['has'](_0x3463a5)&&!_0x17b3fb['get'](_0x3463a5)['isAttached'];let _0x35312c=_0x5765cd?_0x229e75['length']-0x1:0x0;const _0xf8617e=_0x5765cd?-0x1:0x1;for(;_0x229e75[_0x35312c];){const _0x210e79=_0x229e75[_0x35312c];if(_0x210e79['diffData'][_0x3463a5]){const _0x47a9cb=_0x5765cd?_0x210e79['diffData'][_0x3463a5]['attributesBefore']:_0x210e79['diffData'][_0x3463a5]['attributesAfter'];_0x1baf32['attributes'][_0x3463a5]=_0x47a9cb?_0x2fa70e(_0x47a9cb):{};break;}_0x35312c+=_0xf8617e;}}for(const _0x22d126 of _0x229e75){_0x22d126['model']={};for(const _0x22bdaa of _0x22d126['authors'])_0x163fe0['set'](_0x22bdaa['id'],_0x22bdaa);for(const _0x282055 of _0x3fe0fd){const _0x128fba=_0x22d126['diffData'][_0x282055]?_0x22d126['diffData'][_0x282055]['insertions']:'[]',_0x307f6b=_0x22d126['diffData'][_0x282055]?_0x22d126['diffData'][_0x282055]['deletions']:'[]';_0x22d126['model'][_0x282055]={'insertions':this['_utils']['_makeModelFromViewString'](_0x128fba),'deletions':this['_utils']['_makeModelFromViewString'](_0x307f6b)};}}for(const _0x59b312 of _0x3fe0fd){let _0x38da06=null,_0x26e420=0x0;const _0x42a91b=new Map(Array['from'](_0x4703d5['model'][_0x59b312]['insertions']['markers'])['filter'](([_0x53e671])=>!_0x53e671['startsWith']('revision:')));let _0x147a45=0x0;for(const _0x1e3639 of _0x229e75){const _0x154617=this['_makeTape'](_0x1e3639['model'][_0x59b312]['insertions']);_0x1e3639==_0x4703d5?(_0x38da06=_0x154617,_0x26e420=_0x38da06['length'],_0x38da06['forEach'](_0x4799e2=>{_0x4799e2['id']=_0x147a45++;}),this['_processTape'](_0x38da06)):this['_markInsertions'](_0x38da06,_0x154617);const _0x141937=_0x38da06['filter'](_0x226cd2=>!_0x226cd2['isAdded'])['map'](_0x5e0174=>_0x5e0174['id']);let _0x1a26fc=0x0;const _0x442a93=this['_makeTape'](_0x1e3639['model'][_0x59b312]['deletions']);_0x442a93['forEach'](_0x4e607d=>{_0x4e607d['isRemoved']?_0x4e607d['id']=_0x26e420++:_0x4e607d['id']=_0x141937[_0x1a26fc++];}),this['_processTape'](_0x442a93),this['_setDistance'](_0x38da06,'isAdded'),this['_setDistance'](_0x442a93,'isRemoved'),_0x1e3639==_0x4703d5&&this['_markMarkers'](_0x38da06,_0x42a91b),_0x38da06=this['_joinTapes'](_0x38da06,_0x442a93),this['_refreshStartEndIndex'](_0x38da06),this['_setDistance'](_0x38da06,'isRemoved');}_0x38da06=_0x38da06['filter'](_0x256442=>!(_0x256442['isAdded']&&_0x256442['isRemoved']));const _0x380f21=new Map(_0x45dcb1['model'][_0x59b312]['deletions']['markers']),_0x2f5ea9=new Set(_0x42a91b['keys']());for(const _0x4a9d1f of _0x380f21['keys']())_0x2f5ea9['delete'](_0x4a9d1f);this['_markSuggestions'](_0x38da06,_0x2f5ea9),this['_fixObsoleteTags'](_0x38da06),_0x38da06=this['_removeMissingPairs'](_0x38da06),_0x38da06=this['_markMismatchedRemovedTags'](_0x38da06),_0x38da06=this['_removeUnsupportedChanges'](_0x38da06);const {root:_0x544620,changes:_0xcb29bb}=this['_makeModelFromTape'](_0x38da06,_0x163fe0,_0x59b312);_0x1baf32['model'][_0x59b312]=_0x544620;const _0x4219f4=_0x17b3fb['get'](_0x59b312);if(_0x4219f4){const _0x530abd=_0x163fe0['get'](_0x4219f4['userId']),_0xe94ac5=new G({'author':_0x530abd,'type':_0x4219f4['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x59b312});_0xcb29bb['unshift'](_0xe94ac5),_0x1baf32['attributes'][_0x59b312]['revisionHistoryAttachChange']=_0xe94ac5['id'];}_0x1baf32['changes']=_0x1baf32['changes']['concat'](_0xcb29bb);}return _0x1baf32;}['_markMarkers'](_0x357772,_0x4529a3){for(let _0x1f3d45=0x0;_0x1f3d45<_0x357772['length'];_0x1f3d45++)for(const [_0x476a93,_0x14e855]of _0x4529a3)!_0x14e855['isCollapsed']&&_0x14e855['start']['isEqual'](_0x357772[_0x1f3d45]['previousPosition'])&&_0x357772[_0x1f3d45]['markersStart']['push'](_0x476a93),_0x14e855['end']['isEqual'](_0x357772[_0x1f3d45]['nextPosition'])&&_0x357772[_0x1f3d45]['markersEnd']['push'](_0x476a93);}['_joinTapes'](_0x5ab11a,_0x4c668a){let _0x26675c=[],_0x161f37=0x0,_0x2917e2=0x0;for(;_0x161f37<_0x5ab11a['length']||_0x2917e2<_0x4c668a['length'];){const _0x5cd358=_0x5ab11a[_0x161f37]||{},_0x107813=_0x4c668a[_0x2917e2]||{};if(_0x5cd358['id']==_0x107813['id'])_0x161f37++,_0x2917e2++,_0x26675c['push'](_0x5cd358);else{if(_0x107813['isRemoved']&&_0x5cd358['isAdded']){const {commonTape:_0x3e6aca,iEnd:_0x2c129b,jEnd:_0x80740b}=this['_threeWayMerge'](_0x5ab11a,_0x161f37,_0x4c668a,_0x2917e2);_0x26675c=_0x26675c['concat'](_0x3e6aca),_0x161f37=_0x2c129b,_0x2917e2=_0x80740b;}else _0x107813['isRemoved']?(_0x2917e2++,_0x26675c['push'](_0x107813)):(_0x161f37++,_0x26675c['push'](_0x5cd358));}}return _0x26675c;}['_markSuggestions'](_0x1f4a72,_0x4b1842){const _0x4689ea=[];for(let _0x478564=0x0;_0x478564<_0x1f4a72['length'];_0x478564++){for(let _0x10765f=0x0;_0x10765f<_0x1f4a72[_0x478564]['markersStart']['length'];_0x10765f++){const _0x38f138=_0x1f4a72[_0x478564]['markersStart'][_0x10765f];if(!_0x4b1842['has'](_0x38f138))continue;const {group:_0x88efd4,type:_0x5157e8,authorId:_0x296d25}=_0x6bee4d(_0x38f138);'revision-suggestion'!=_0x88efd4||'insertion'!=_0x5157e8&&'deletion'!=_0x5157e8||(_0x4689ea['unshift']({'type':_0x5157e8,'name':_0x38f138,'userId':_0x296d25}),_0x1f4a72[_0x478564]['markersStart']['splice'](_0x10765f,0x1),_0x10765f--);}_0x46393a(_0x1f4a72[_0x478564]);for(let _0x24a60b=0x0;_0x24a60b<_0x1f4a72[_0x478564]['markersEnd']['length'];_0x24a60b++){const _0x1c5ebd=_0x1f4a72[_0x478564]['markersEnd'][_0x24a60b];if(!_0x4b1842['has'](_0x1c5ebd))continue;const {group:_0x446c15,type:_0x4ad4fd}=_0x6bee4d(_0x1c5ebd);if('revision-suggestion'!=_0x446c15||'insertion'!=_0x4ad4fd&&'deletion'!=_0x4ad4fd)continue;_0x1f4a72[_0x478564]['markersEnd']['splice'](_0x24a60b,0x1),_0x24a60b--;const _0x33e093=_0x4689ea['findIndex'](_0x5b2373=>_0x5b2373['name']==_0x1c5ebd);_0x33e093>-0x1&&_0x4689ea['splice'](_0x33e093,0x1);}}function _0x6bee4d(_0x1254ce){const _0x24497a=_0x1254ce['split'](':');return{'group':_0x24497a[0x0],'type':_0x24497a[0x1],'subType':_0x24497a['length']>=0x5?_0x24497a[0x2]:null,'id':_0x24497a['length']<0x5?_0x24497a[0x2]:_0x24497a[0x3],'authorId':_0x24497a['length']<0x5?_0x24497a[0x3]:_0x24497a[0x4],'markerCount':0x6==_0x24497a['length']?_0x24497a[0x5]:null};}function _0x46393a(_0x97d99c){for(let _0x20b098=0x0;_0x20b098<_0x4689ea['length'];_0x20b098++){if(_0x97d99c['isAdded']&&'insertion'==_0x4689ea[_0x20b098]['type']&&_0x97d99c['isAdded']['userId']==_0x4689ea[_0x20b098]['userId'])return _0x97d99c['isAddSuggestion']=_0x4689ea[_0x20b098],void delete _0x97d99c['isAdded'];if(!_0x97d99c['isAdded']&&!_0x97d99c['isRemoved']&&'deletion'==_0x4689ea[_0x20b098]['type'])return void(_0x97d99c['isRemoveSuggestion']=_0x4689ea[_0x20b098]);}}}['_setDistance'](_0x8253d8,_0x3069e3){let _0x28ee92=0x0,_0x77a2b7=!0x1;const _0x3bae43=new Map();for(const _0xfea7ab of _0x8253d8)_0xfea7ab[_0x3069e3]?_0x77a2b7&&(_0x28ee92++,_0x77a2b7=!0x1):(_0x28ee92++,_0x77a2b7=!0x0),_0x3bae43['set'](_0xfea7ab['id'],_0x28ee92);for(let _0x50e38d=0x0;_0x50e38d<_0x8253d8['length'];_0x50e38d++){if('isRemoved'==_0x3069e3&&_0x8253d8[_0x50e38d]['isAdded']||'isAdded'==_0x3069e3&&_0x8253d8[_0x50e38d]['isRemoved'])continue;if('text'==_0x8253d8[_0x50e38d]['type']){_0x8253d8[_0x50e38d]['distance']=0x0;continue;}const _0x553a9d=_0x3bae43['get'](_0x8253d8[_0x50e38d]['pairId']),_0xd3c38e=_0x3bae43['get'](_0x8253d8[_0x50e38d]['id']);_0x8253d8[_0x50e38d]['distance']=_0x553a9d-_0xd3c38e;}}['_getRevisionsRange'](_0x3d7595,_0x5a9fef,_0x246f76=!0x1){const _0x4170de=[];let _0x22ad8c=this['repository']['getIndex'](_0x3d7595),_0x1ccd70=this['repository']['getIndex'](_0x5a9fef);for(-0x1==_0x1ccd70&&(_0x1ccd70=this['repository']['_revisions']['length'],_0x246f76=!0x1);_0x22ad8c<_0x1ccd70;)_0x4170de['push'](this['repository']['getRevision'](_0x22ad8c)),_0x22ad8c++;return _0x246f76&&_0x4170de['push'](this['repository']['getRevision'](_0x22ad8c)),_0x4170de;}['_threeWayMerge'](_0x570adf,_0x85e2cf,_0x515276,_0x21869d){const _0x2664f0=this['editor']['model']['schema'];let _0x786483=_0x85e2cf;for(;_0x570adf[_0x786483]&&_0x570adf[_0x786483]['isAdded'];)_0x786483++;let _0x1f9592=_0x21869d;for(;_0x515276[_0x1f9592]&&_0x515276[_0x1f9592]['isRemoved'];)_0x1f9592++;_0x5ca41d(_0x570adf,_0x85e2cf,_0x786483),_0x5ca41d(_0x515276,_0x21869d,_0x1f9592);const _0x179743=_0x515276['slice'](_0x21869d,_0x1f9592)['concat'](_0x570adf['slice'](_0x85e2cf,_0x786483));return _0x179743['sort']((_0x2788e1,_0x3c7261)=>_0x2788e1['side']!=_0x3c7261['side']?_0x2788e1['side']-_0x3c7261['side']:_0x2788e1['level']!=_0x3c7261['level']?_0x2788e1['level']-_0x3c7261['level']:_0x2788e1['distance']!=_0x3c7261['distance']?_0x3c7261['distance']-_0x2788e1['distance']:!!_0x2788e1['isAdded']!=!!_0x3c7261['isAdded']?-0x1==_0x2788e1['side']||0x0==_0x2788e1['side']?_0x2788e1['isAdded']?-0x1:0x1:_0x2788e1['isAdded']?0x1:-0x1:_0x2788e1['index']-_0x3c7261['index']),{'commonTape':_0x179743,'iEnd':_0x786483,'jEnd':_0x1f9592};function _0x5ca41d(_0x1d0fd2,_0x3ca97b,_0xd7e9af){let _0x150f04=-0x1,_0x5885f8=Number['POSITIVE_INFINITY'],_0xc30ba1=!0x0;for(let _0x337d6d=_0x3ca97b;_0x337d6d<_0xd7e9af;_0x337d6d++)if(_0x2664f0['isInline'](_0x1d0fd2[_0x337d6d]['item'])||(_0xc30ba1=!0x1),_0x1d0fd2[_0x337d6d]['item']['startIndex']<_0x3ca97b&&(_0x150f04=_0x337d6d),_0x1d0fd2[_0x337d6d]['item']['endIndex']>=_0xd7e9af){_0x5885f8=_0x337d6d;break;}_0xc30ba1&&(_0x150f04=_0xd7e9af-0x1);for(let _0x56168f=_0x3ca97b;_0x56168f<_0xd7e9af;_0x56168f++)_0x1d0fd2[_0x56168f]['side']=_0x56168f<=_0x150f04?-0x1:_0x56168f<_0x5885f8?0x0:0x1,_0x1d0fd2[_0x56168f]['index']=_0x56168f;let _0x310c33=0x0;for(let _0x9cb3e0=_0x3ca97b;_0x9cb3e0<=_0x150f04;_0x9cb3e0++)0x0==_0x1d0fd2[_0x9cb3e0]['distance']?_0x1d0fd2[_0x9cb3e0]['level']=_0x310c33:(_0x310c33++,_0x1d0fd2[_0x9cb3e0]['level']=_0x310c33,_0x310c33++);for(let _0x47afc5=_0x3ca97b;_0x47afc5<_0xd7e9af;_0x47afc5++)0x0==_0x1d0fd2[_0x47afc5]['side']&&(_0x1d0fd2[_0x47afc5]['level']=_0x310c33);_0x310c33=0x0;for(let _0x26ef6e=_0xd7e9af-0x1;_0x26ef6e>=_0x5885f8;_0x26ef6e--)0x0==_0x1d0fd2[_0x26ef6e]['distance']?_0x1d0fd2[_0x26ef6e]['level']=_0x310c33:(_0x310c33--,_0x1d0fd2[_0x26ef6e]['level']=_0x310c33,_0x310c33--);}}['_fixObsoleteTags'](_0x562cb8){const _0x8b1634=new Map(),_0xc80786=this['editor']['model']['schema'];for(let _0x4b3232=0x1;_0x4b3232<_0x562cb8['length'];_0x4b3232++){let _0x1fdf66,_0x1773be,_0x4d6bc6;const _0x3947a9=_0x562cb8[_0x4b3232],_0x1f4400=_0x562cb8[_0x4b3232-0x1];if('text'==_0x3947a9['type'])continue;if(_0x3947a9['type']!=_0x1f4400['type'])continue;if(!_0xc80786['isBlock'](_0x1f4400['item'])||_0xc80786['isLimit'](_0x1f4400['item']))continue;if(!_0xc80786['isBlock'](_0x3947a9['item'])||_0xc80786['isLimit'](_0x3947a9['item']))continue;if((_0x562cb8[_0x4b3232]['isAdded']||_0x562cb8[_0x4b3232]['isAddSuggestion'])&&_0x562cb8[_0x4b3232-0x1]['isRemoved'])_0x1fdf66=_0x562cb8[_0x4b3232],_0x1773be=_0x562cb8[_0x4b3232-0x1],_0x4d6bc6=_0x4b3232-0x1;else{if(!_0x562cb8[_0x4b3232]['isRemoved']||!_0x562cb8[_0x4b3232-0x1]['isAdded']&&!_0x562cb8[_0x4b3232-0x1]['isAddSuggestion'])continue;_0x1fdf66=_0x562cb8[_0x4b3232-0x1],_0x1773be=_0x562cb8[_0x4b3232],_0x4d6bc6=_0x4b3232;}const _0x11fbe1=_0x1fdf66['level']==_0x1773be['level'],_0x2c8524=Math['abs'](_0x1fdf66['level'])<Math['abs'](_0x1773be['level'])&&0x0==_0x1773be['distance'];(_0x11fbe1||_0x2c8524)&&(_0x8b1634['set'](_0x1773be['id'],_0x1fdf66['id']),_0x562cb8['splice'](_0x4d6bc6,0x1),_0x4b3232--,_0x1fdf66['isAdded']=!0x1);}for(let _0x4f0ef7=0x0;_0x4f0ef7<_0x562cb8['length'];_0x4f0ef7++)_0x8b1634['has'](_0x562cb8[_0x4f0ef7]['pairId'])&&(_0x562cb8[_0x4f0ef7]['pairId']=_0x8b1634['get'](_0x562cb8[_0x4f0ef7]['pairId']));}['_removeMissingPairs'](_0x92d4c1){const _0x5f56ba=new Set(_0x92d4c1['map'](_0x600833=>_0x600833['id']));for(let _0x11e43f=0x0;_0x11e43f<_0x92d4c1['length'];_0x11e43f++)_0x5f56ba['has'](_0x92d4c1[_0x11e43f]['pairId'])||0x0==_0x92d4c1[_0x11e43f]['distance']||(_0x92d4c1[_0x11e43f]['isIncorrect']=!0x0);return _0x92d4c1['filter'](_0x117d34=>!_0x117d34['isIncorrect']);}['_markMismatchedRemovedTags'](_0x501a2d){const _0x49cb35=new Set();for(let _0x1c651d=0x0;_0x1c651d<_0x501a2d['length'];_0x1c651d++){if(_0x49cb35['has'](_0x501a2d[_0x1c651d]['id'])&&_0x501a2d[_0x1c651d]['isRemoved']&&(_0x501a2d[_0x1c651d]['isIncorrect']=!0x0),_0x501a2d[_0x1c651d]['isIncorrect'])continue;if(0x0==_0x501a2d[_0x1c651d]['distance'])continue;if('elementStart'!=_0x501a2d[_0x1c651d]['type'])continue;if(null==_0x501a2d[_0x1c651d]['pairId'])continue;let _0x45022f=_0x1c651d+0x1,_0x44c3cd=0x0;for(;_0x501a2d[_0x45022f]['id']!=_0x501a2d[_0x1c651d]['pairId'];)'elementStart'==_0x501a2d[_0x45022f]['type']?_0x44c3cd++:'elementEnd'==_0x501a2d[_0x45022f]['type']&&_0x44c3cd--,_0x45022f++;if(0x0!=_0x44c3cd){if(_0x501a2d[_0x1c651d]['isRemoved'])_0x501a2d[_0x1c651d]['isIncorrect']=!0x0;else{for(;_0x45022f!=_0x1c651d;)_0x501a2d[_0x45022f]['isRemoved']&&0x0!=_0x501a2d[_0x45022f]['distance']&&(_0x501a2d[_0x45022f]['isIncorrect']=!0x0,_0x49cb35['add'](_0x501a2d[_0x45022f]['pairId'])),_0x45022f--;}}}return _0x501a2d['filter'](_0x31183a=>!_0x31183a['isIncorrect']);}['_removeUnsupportedChanges'](_0x23d9a1){const _0x13d3ce=this['editor']['model']['schema'];for(let _0x2ef71d=0x0;_0x2ef71d<_0x23d9a1['length'];_0x2ef71d++){if(!(_0x23d9a1[_0x2ef71d]['isAdded']||_0x23d9a1[_0x2ef71d]['isAddSuggestion']||_0x23d9a1[_0x2ef71d]['isRemoved']||_0x23d9a1[_0x2ef71d]['isRemoveSuggestion']))continue;if(0x0==_0x23d9a1[_0x2ef71d]['distance'])continue;const _0x581fe8=_0x23d9a1[_0x2ef71d]['item'];_0x13d3ce['isBlock'](_0x581fe8)||_0x13d3ce['isLimit'](_0x581fe8)||(_0x23d9a1[_0x2ef71d]['isAdded']&&delete _0x23d9a1[_0x2ef71d]['isAdded'],_0x23d9a1[_0x2ef71d]['isAddSuggestion']&&delete _0x23d9a1[_0x2ef71d]['isAddSuggestion'],_0x23d9a1[_0x2ef71d]['isRemoveSuggestion']&&delete _0x23d9a1[_0x2ef71d]['isRemoveSuggestion'],_0x23d9a1[_0x2ef71d]['isRemoved']&&(_0x23d9a1[_0x2ef71d]['isIncorrect']=!0x0));}return _0x23d9a1['filter'](_0x38c77f=>!_0x38c77f['isIncorrect']);}['_makeModelFromTape'](_0x319ab9,_0x5e1526,_0x246cdb){const _0x437154=new _0x788399(),_0x40598e=[],_0x3410a2=new Map(),_0xfb04ac=this['editor']['model'],_0x51ceee=_0xfb04ac['schema'],_0x1ef791=[_0x437154],_0x5d2d30={},_0x1765b2={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x40ea70=null;const _0x146e83=[0x0];for(let _0x3ed659=0x0;_0x3ed659<_0x319ab9['length'];_0x3ed659++)if('elementStart'===_0x319ab9[_0x3ed659]['type']){_0x319ab9[_0x3ed659]['previousPosition']=_0xfb04ac['createPositionFromPath'](_0x437154,_0x146e83);const _0x5f24d0=new _0x4d179(_0x319ab9[_0x3ed659]['item']['name'],_0x319ab9[_0x3ed659]['item']['getAttributes']());_0x1ef791[0x0]['_appendChild'](_0x5f24d0),_0x146e83['push'](0x0),_0x1ef791['unshift'](_0x5f24d0),_0x319ab9[_0x3ed659]['nextPosition']=_0xfb04ac['createPositionFromPath'](_0x437154,_0x146e83);}else'elementEnd'===_0x319ab9[_0x3ed659]['type']?(_0x1ef791['shift'](),_0x319ab9[_0x3ed659]['previousPosition']=_0xfb04ac['createPositionFromPath'](_0x437154,_0x146e83),_0x146e83['pop'](),_0x146e83[_0x146e83['length']-0x1]++,_0x319ab9[_0x3ed659]['nextPosition']=_0xfb04ac['createPositionFromPath'](_0x437154,_0x146e83)):(_0x319ab9[_0x3ed659]['previousPosition']=_0xfb04ac['createPositionFromPath'](_0x437154,_0x146e83),_0x40ea70?_0x40ea70['_data']+=_0x319ab9[_0x3ed659]['item']['data']:_0x40ea70=new _0x4393a3(_0x319ab9[_0x3ed659]['item']['data'],_0x319ab9[_0x3ed659]['item']['getAttributes']()),_0x319ab9[_0x3ed659+0x1]&&'text'===_0x319ab9[_0x3ed659+0x1]['type']&&_0x2fb01d(_0x40ea70,_0x319ab9[_0x3ed659+0x1]['item'])||(_0x1ef791[0x0]['_appendChild'](_0x40ea70),_0x40ea70=null),_0x146e83[_0x146e83['length']-0x1]+=_0x319ab9[_0x3ed659]['item']['offsetSize'],_0x319ab9[_0x3ed659]['nextPosition']=_0xfb04ac['createPositionFromPath'](_0x437154,_0x146e83));for(let _0x2462c6=0x0;_0x2462c6<_0x319ab9['length'];_0x2462c6++){const _0x58d248=_0x319ab9[_0x2462c6]['previousPosition'],_0xf3073d=_0x319ab9[_0x2462c6]['nextPosition'];for(const _0x6a23e1 of _0x319ab9[_0x2462c6]['markersStart'])_0x3410a2['set'](_0x6a23e1,{'start':_0x58d248,'end':null});_0x3b3fad('isRemoveSuggestion',_0x2462c6,_0x58d248,_0xf3073d),_0x3b3fad('isAddSuggestion',_0x2462c6,_0x58d248,_0xf3073d),_0x3b3fad('isRemoved',_0x2462c6,_0x58d248,_0xf3073d),_0x3b3fad('isAdded',_0x2462c6,_0x58d248,_0xf3073d);for(const _0x362712 of _0x319ab9[_0x2462c6]['markersEnd']){const _0x58b84b=_0x3410a2['get'](_0x362712);_0x58b84b?_0x58b84b['end']=_0xf3073d:_0x3410a2['set'](_0x362712,{'start':_0xf3073d,'end':_0xf3073d});}}for(const [_0x3826eb,_0xf5fc59]of _0x3410a2){const _0xaa3eea=this['editor']['model']['createRange'](_0xf5fc59['start'],_0xf5fc59['end']);_0x437154['markers']['set'](_0x3826eb,_0xaa3eea);}return _0x40598e['sort']((_0x40ef7f,_0x26c888)=>{const _0x37811d=_0x437154['markers']['get']('revision:'+_0x40ef7f['id']),_0x2af41c=_0x437154['markers']['get']('revision:'+_0x26c888['id']);return _0x37811d['start']['isBefore'](_0x2af41c['start'])?-0x1:_0x37811d['start']['isAfter'](_0x2af41c['start'])?0x1:_0x37811d['end']['isBefore'](_0x2af41c['end'])?-0x1:_0x37811d['end']['isAfter'](_0x2af41c['end'])?0x1:'add'===_0x40ef7f['type']?-0x1:0x1;}),{'root':_0x437154,'changes':_0x40598e};function _0x3b3fad(_0x4ddfb1,_0x2fbff0,_0x1785de,_0x458b44){const _0x201a27=!!_0x319ab9[_0x2fbff0][_0x4ddfb1],_0x35b9dc=_0x201a27?_0x319ab9[_0x2fbff0][_0x4ddfb1]['userId']:null,_0x5f15c9=_0x2fbff0===_0x319ab9['length']-0x1,_0x2a05e6=_0x1765b2[_0x4ddfb1][0x0],_0xd6c525=_0x51ceee['isObject'](_0x319ab9[_0x2fbff0]['item']);!_0x5d2d30[_0x4ddfb1]&&_0x201a27?_0x5d2d30[_0x4ddfb1]={'start':_0x1785de,'tapeItem':_0x319ab9[_0x2fbff0],'userId':_0x35b9dc,'type':_0x4ddfb1}:_0x5d2d30[_0x4ddfb1]&&!_0x201a27?(_0x5d2d30[_0x4ddfb1]['end']=_0x1785de,_0xe67feb(_0x5d2d30[_0x4ddfb1]),_0x5d2d30[_0x4ddfb1]=null):_0x5d2d30[_0x4ddfb1]&&_0x201a27&&_0x5d2d30[_0x4ddfb1]['userId']!==_0x35b9dc&&(_0x5d2d30[_0x4ddfb1]['end']=_0x1785de,_0x2a05e6&&_0x2a05e6['userId']===_0x5d2d30[_0x4ddfb1]['userId']||_0xe67feb(_0x5d2d30[_0x4ddfb1]),_0x5d2d30[_0x4ddfb1]={'start':_0x1785de,'tapeItem':_0x319ab9[_0x2fbff0],'userId':_0x35b9dc,'type':_0x4ddfb1}),_0x5d2d30[_0x4ddfb1]&&_0xd6c525&&('elementStart'!==_0x319ab9[_0x2fbff0]['type']||_0x2a05e6&&_0x2a05e6['userId']===_0x35b9dc||_0x1765b2[_0x4ddfb1]['unshift']({'userId':_0x35b9dc,'object':_0x319ab9[_0x2fbff0]['item'],'change':_0x5d2d30[_0x4ddfb1]}),'elementEnd'===_0x319ab9[_0x2fbff0]['type']&&_0x2a05e6&&_0x2a05e6['object']===_0x319ab9[_0x2fbff0]['item']&&(_0x1765b2[_0x4ddfb1]['shift'](),_0x5d2d30[_0x4ddfb1]=_0x2a05e6['change'])),_0x5d2d30[_0x4ddfb1]&&_0x5f15c9&&(_0x5d2d30[_0x4ddfb1]['end']=_0x458b44,_0xe67feb(_0x5d2d30[_0x4ddfb1]),_0x5d2d30[_0x4ddfb1]=null);}function _0xe67feb({start:_0x954738,end:_0x232253,tapeItem:_0x18bc6c,userId:_0x4a64cc,type:_0x54bf42}){const _0x2c7bfe=_0x18bc6c['item'],_0x4bc4a9=_0xfb04ac['schema']['isBlock'](_0x2c7bfe)&&!_0xfb04ac['schema']['isLimit'](_0x2c7bfe),_0x2dfd18=_0x954738['nodeAfter']==_0x232253['parent']&&_0x232253['isAtStart'];if(_0x4bc4a9&&_0x2dfd18)return;const _0x4061a5=_0xfb04ac['createRange'](_0x954738,_0x232253),_0x13abd4=_0x5e1526['get'](_0x4a64cc),_0xa2ec71=new G({'author':_0x13abd4,'type':'isAdded'==_0x54bf42||'isAddSuggestion'==_0x54bf42?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x54bf42||'isRemoveSuggestion'==_0x54bf42},'createdAt':new Date(),'rootName':_0x246cdb});_0x40598e['push'](_0xa2ec71),_0x437154['markers']['set']('revision:'+_0xa2ec71['id'],_0x4061a5);}function _0x2fb01d(_0x17e24c,_0xe755f){const _0x2cade0=_0x17e24c['getAttributes'](),_0x4da529=_0xe755f['getAttributes']();for(const _0x55d950 of _0x2cade0){if(_0x55d950[0x1]!==_0xe755f['getAttribute'](_0x55d950[0x0]))return!0x1;_0x4da529['next']();}return _0x4da529['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x33547d=>{const _0x12e971=_0x33547d['markerName']['split'](':')[0x1],_0x2ba124=this['_getChangeFromId'](_0x12e971);if(!_0x2ba124)return null;const _0x2b9185='add'==_0x2ba124['type']?'insertion':'deletion',_0x5af23f=['ck-suggestion-marker','ck-suggestion-marker-'+_0x2b9185];return _0x2ba124['data']['isSuggestion']&&_0x5af23f['push']('ck-suggestion-marker-'+_0x2b9185+'-new'),this['activeChange']==_0x2ba124&&_0x5af23f['push']('ck-suggestion-marker--active'),{'classes':_0x5af23f,'attributes':{'data-change-id':_0x12e971}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5ad1df=>{_0x5ad1df['on']('element:pre',(_0x50d6ed,_0x57f14c,_0x41a1e6)=>{const _0x2835ff=_0x57f14c['viewItem']['getChild'](0x0);if(!_0x2835ff||!_0x2835ff['is']('element','code'))return;if(!_0x41a1e6['consumable']['consume'](_0x2835ff,{'attributes':['vid_start','vid_end']}))return;const _0x1731eb=_0x57f14c['modelRange']['start']['nodeAfter'];_0x41a1e6['writer']['setAttribute']('vid_start',_0x2835ff['getAttribute']('vid_start'),_0x1731eb),_0x41a1e6['writer']['setAttribute']('vid_end',_0x2835ff['getAttribute']('vid_end'),_0x1731eb);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x7ffe49=>{_0x7ffe49['on']('element',(_0xc43c64,_0x16fbb3,_0x2cfa43)=>{if(!_0x2cfa43['consumable']['consume'](_0x16fbb3['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x16fbb3['modelRange']['isCollapsed'])return;const _0x26745d=_0x16fbb3['modelRange']['start']['nodeAfter'];_0x26745d['hasAttribute']('vid_start')||_0x26745d['hasAttribute']('vid')||(_0x2cfa43['writer']['setAttribute']('vid_start',_0x16fbb3['viewItem']['getAttribute']('vid_start'),_0x26745d),_0x2cfa43['writer']['setAttribute']('vid_end',_0x16fbb3['viewItem']['getAttribute']('vid_end'),_0x26745d));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0xc160d1=>_0xc160d1['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0xd6f6fe,[,_0x33d2ed])=>{['vid_start','vid_end','vid']['includes'](_0x33d2ed)&&(_0xd6f6fe['return']=!0x0,_0xd6f6fe['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x12a10c=>{_0x12a10c['on']('attribute:vid',(_0x26e41e,_0x45600b,_0xaab4c3)=>{if('\x20'!=_0x45600b['item']['data']||_0x45600b['item']['parent']['maxOffset']>0x1)return;if(!_0xaab4c3['consumable']['consume'](_0x45600b['item'],_0x26e41e['name']))return;const _0x2b6103=_0xaab4c3['writer'],_0x4be827=_0xaab4c3['mapper']['toViewRange'](_0x45600b['range']);_0x2b6103['wrap'](_0x4be827,_0x2b6103['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0xfa28d9){const _0x2a563f=_0xfa28d9['plugins']['get']('RevisionViewer');return(_0x37a32e,_0x2e799d,_0x3add12)=>{const _0x2e016e=_0x2e799d['markerName']['split'](':')[0x1],_0x5e06f8=_0x2a563f['_getChangeFromId'](_0x2e016e);if(!_0x5e06f8)return null;const _0xc6a44='add'==_0x5e06f8['type']?'split':'merge';if(!_0x3add12['consumable']['test'](_0x2e799d['markerRange'],_0x37a32e['name']))return;const _0x4153c8=_0x2e799d['markerRange']['getWalker'](),_0x14e66e=_0x2e799d['markerRange']['start'],_0x2198c2=_0xfa28d9['model']['schema'];let _0x65c3dd=null,_0x39e285=null,_0x55db5f=!0x1,_0x41353d=!0x1;for(const _0x6cc59f of _0x4153c8){const _0x22d2df=_0x6cc59f['item'];_0x55db5f=_0x55db5f||_0x2198c2['isContent'](_0x22d2df);const _0x3054ec=_0x3add12['mapper']['toViewElement'](_0x22d2df);if(_0x3054ec&&_0x3054ec['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x6cc59f['type']&&(_0x2198c2['isBlock'](_0x22d2df)&&!_0x2198c2['isLimit'](_0x22d2df)&&(_0x22d2df['nextSibling']||_0x14e66e['isAtEnd']?_0x65c3dd&&_0x65c3dd['parent']==_0x22d2df||(_0x65c3dd=_0x22d2df,_0x2093ee(_0x6cc59f['previousPosition']),_0x41353d=!0x0):_0x39e285=_0x39e285||_0x6cc59f['previousPosition']));}function _0x2093ee(_0x1c07a4){const _0xb496e7=_0x3add12['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xc6a44}),_0x4cc571=_0x3add12['mapper']['toViewPosition'](_0x1c07a4);_0x5e06f8['data']['isSuggestion']&&_0x3add12['writer']['addClass']('ck-suggestion-marker-'+_0xc6a44+'-new',_0xb496e7),_0x2a563f['activeChange']==_0x5e06f8&&_0x3add12['writer']['addClass']('ck-suggestion-marker--active',_0xb496e7),_0x3add12['writer']['insert'](_0x4cc571,_0xb496e7),_0x3add12['mapper']['bindElementToMarker'](_0xb496e7,_0x2e799d['markerName']);}_0x55db5f||_0x41353d||!_0x39e285||_0x2093ee(_0x39e285);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x4b28fe,_0x340621,_0x54ffde)=>{const _0x2dabd1=_0x54ffde['mapper']['markerNameToElements'](_0x340621['markerName']);if(_0x2dabd1){for(const _0x14e1f2 of _0x2dabd1)(_0x14e1f2['hasClass']('ck-suggestion-marker-split')||_0x14e1f2['hasClass']('ck-suggestion-marker-merge'))&&(_0x54ffde['mapper']['unbindElementFromMarkerName'](_0x14e1f2,_0x340621['markerName']),_0x54ffde['writer']['remove'](_0x14e1f2));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4e36b0,_0x5cc0cd,_0x14d137)=>{const _0x504057=_0x5cc0cd['markerName']['split'](':')[0x1],_0x4a5df2=this['_getChangeFromId'](_0x504057);if(!_0x4a5df2)return null;const _0xc5443d='add'==_0x4a5df2['type']?'split':'merge';if(_0x14d137['consumable']['test'](_0x5cc0cd['markerRange'],_0x4e36b0['name']))for(const _0x136b2c of _0x5cc0cd['markerRange']['getItems']()){if(!_0x136b2c['is']('element','softBreak'))continue;const _0x344754=_0x14d137['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0xc5443d}),_0x20a702=_0x14d137['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x136b2c));_0x4a5df2['data']['isSuggestion']&&_0x14d137['writer']['addClass']('ck-suggestion-marker-'+_0xc5443d+'-new',_0x344754),this['activeChange']==_0x4a5df2&&_0x14d137['writer']['addClass']('ck-suggestion-marker--active',_0x344754),_0x14d137['writer']['insert'](_0x20a702,_0x344754),_0x14d137['mapper']['bindElementToMarker'](_0x344754,_0x5cc0cd['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x582d03=>{for(const _0x52c272 of this['editor']['model']['document']['getRootNames']()){const _0x4c4d9b=this['editor']['model']['document']['getRoot'](_0x52c272),_0x37cda2=this['editor']['editing']['view']['document']['getRoot'](_0x52c272);if(_0x37cda2){const _0x5d5363=_0x4c4d9b['getAttribute']('revisionHistoryAttachChange');if(_0x582d03['removeAttribute']('data-change-id',_0x37cda2),_0x582d03['removeClass']('ck-revision-history-root-add',_0x37cda2),_0x582d03['removeClass']('ck-revision-history-root-remove',_0x37cda2),_0x582d03['removeClass']('ck-revision-history-root--active',_0x37cda2),_0x5d5363){const _0x21ca08=this['_getChangeFromId'](_0x5d5363);if(!_0x21ca08)return null;_0x582d03['setAttribute']('data-change-id',_0x5d5363,_0x37cda2),_0x582d03['addClass']('ck-revision-history-root-'+_0x21ca08['type'],_0x37cda2),this['activeChange']==_0x21ca08&&_0x582d03['addClass']('ck-revision-history-root--active',_0x37cda2);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x2883dc=>'revision-comment:'+_0x2883dc,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2d4bb6=>'revision-suggestion:'+_0x2d4bb6,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x2b1898=>({'name':'suggestion:'+_0x2b1898,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x90b165=>{const _0x3fc47f=_0x90b165['markerName']['split'](':')[0x1];return'insertion'!=_0x3fc47f&&'deletion'!=_0x3fc47f?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x3fc47f]};}}),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',(_0x3282a9,_0x17e03c,_0x4bb55d)=>{const _0x4afed8=_0x4bb55d['mapper']['markerNameToElements'](_0x17e03c['markerName']);if(_0x4afed8){for(const _0x38e1bf of _0x4afed8)_0x38e1bf['is']('uiElement')&&(_0x4bb55d['mapper']['unbindElementFromMarkerName'](_0x38e1bf,_0x17e03c['markerName']),_0x4bb55d['writer']['remove'](_0x38e1bf));}},{'priority':'high'});}['_getChangeFromId'](_0x5a4265){return this['_changeIdToChange']['get'](_0x5a4265);}['_getViewForChange'](_0x284468){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new z(this['editor']['locale'],_0x284468),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x4161ad,_0x2f9368,_0x1b41b0,_0x5e491c)=>{_0x5e491c&&this['_balloon']['remove'](_0x5e491c),_0x1b41b0&&(this['_balloon']['add']({'view':_0x1b41b0,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x3c77b3=this['editor']['editing'],_0x6f741d=this['_getChangeFromId'](_0x1b41b0['changeId']);let _0x5ae49c;if(_0x6f741d['data']['isOnRoot']){const _0x45f354=_0x3c77b3['view']['getDomRoot'](_0x6f741d['rootName']);_0x5ae49c=Array['from'](_0x45f354['getClientRects']());}else{const _0x13bfb3=this['editor']['model']['markers']['get']('revision:'+_0x1b41b0['changeId']);_0x5ae49c=Array['from'](_0x3c77b3['mapper']['markerNameToElements'](_0x13bfb3['name']))['map'](_0x5daefa=>_0x3c77b3['view']['domConverter']['mapViewToDom'](_0x5daefa))['map'](_0x2a2f33=>Array['from'](_0x2a2f33['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x5ae49c[0x0];return _0x5ae49c['find'](_0x222289=>_0x222289['top']-0x3<=this['_activeViewTarget']['y']&&_0x222289['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x222289['left']-0x3<=this['_activeViewTarget']['x']&&_0x222289['right']+0x3>=this['_activeViewTarget']['x'])||_0x5ae49c[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x470d99,_0x142164,_0x13a6eb,_0x3f34ed)=>{this['activeView']=_0x13a6eb?this['_getViewForChange'](_0x13a6eb):null,this['editor']['model']['change'](()=>{const _0x589330=this['editor']['editing'];_0x3f34ed&&(_0x3f34ed['data']['isOnRoot']?_0x589330['view']['change'](_0x4f7c36=>{_0x4f7c36['removeClass']('ck-revision-history-root--active',_0x589330['view']['document']['getRoot'](_0x3f34ed['rootName']));}):_0x589330['reconvertMarker']('revision:'+_0x3f34ed['id'])),_0x13a6eb&&(_0x13a6eb['data']['isOnRoot']?_0x589330['view']['change'](_0x344de6=>{_0x344de6['addClass']('ck-revision-history-root--active',_0x589330['view']['document']['getRoot'](_0x13a6eb['rootName']));}):_0x589330['reconvertMarker']('revision:'+_0x13a6eb['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x2d3fab,_0x5e78fe)=>{if(this['activeChange'])return;const _0x33a81c=this['_findChangeIdFromDomTarget'](_0x5e78fe['target']),_0x5f1466=this['_changeIdToChange']['get'](_0x33a81c);_0x5f1466?(this['_activeViewTarget']={'x':_0x5e78fe['domEvent']['x'],'y':_0x5e78fe['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x5f1466)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x128724,_0x531931)=>{const _0x31748b=this['_findChangeIdFromDomTarget'](_0x531931['target']),_0x8079f0=this['_changeIdToChange']['get'](_0x31748b);_0x8079f0?(this['_activeViewTarget']={'x':_0x531931['domEvent']['x'],'y':_0x531931['domEvent']['y']},_0x8079f0===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x8079f0):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x4c370a){do{const _0x4f79c8=_0x4c370a['getAttribute']('data-change-id');if(_0x4f79c8)return _0x4f79c8;_0x4c370a=_0x4c370a['parent'];}while(_0x4c370a);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x40b01e=>{for(const _0x592402 of this['editor']['model']['markers'])_0x40b01e['removeMarker'](_0x592402);});}}function Q(_0x470cc9,_0x2c7243){return(_0x33dcce,_0x7196f1,_0x228862)=>{if(!_0x228862['consumable']['test'](_0x7196f1['markerRange'],_0x33dcce['name']))return;const _0x50d521=_0x7196f1['markerRange']['getWalker'](),_0x3e137a=_0x7196f1['markerRange']['start'],_0x5574dc=_0x470cc9['model']['schema'];let _0x27fa6a=null,_0x40c6a3=null,_0x2bee87=!0x1,_0x208a3c=!0x1;for(const _0x143116 of _0x50d521){const _0x5977d2=_0x143116['item'];_0x2bee87=_0x2bee87||_0x5574dc['isContent'](_0x5977d2);const _0xb1d0f=_0x228862['mapper']['toViewElement'](_0x5977d2);if(_0xb1d0f&&_0xb1d0f['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x143116['type']&&(_0x5574dc['isBlock'](_0x5977d2)&&!_0x5574dc['isLimit'](_0x5977d2)&&(_0x5977d2['nextSibling']||_0x3e137a['isAtEnd']?_0x27fa6a&&_0x27fa6a['parent']==_0x5977d2||(_0x27fa6a=_0x5977d2,_0x2a039e(_0x143116['previousPosition']),_0x208a3c=!0x0):_0x40c6a3=_0x40c6a3||_0x143116['previousPosition']));}function _0x2a039e(_0x42ae0f){const _0x4e4a2e=_0x228862['mapper']['toViewPosition'](_0x42ae0f),_0x50e18b=_0x228862['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x2c7243});_0x228862['writer']['insert'](_0x4e4a2e,_0x50e18b),_0x228862['mapper']['bindElementToMarker'](_0x50e18b,_0x7196f1['markerName']);}_0x2bee87||_0x208a3c||!_0x40c6a3||_0x2a039e(_0x40c6a3);};}class nt extends _0x32a8c2{constructor(_0x1646cd){super(_0x1646cd);const _0x5bae8b=_0x1646cd['plugins']['get'](u);this['affectsData']=!0x1,this['listenTo'](_0x5bae8b,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5bae8b,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x24d0c6=this['editor'],_0x41813e=_0x24d0c6['plugins']['get'](u),_0x2f35fb=_0x41813e['isReady']?_0x41813e['diff']['newRevisionId']:null;_0x24d0c6['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2f35fb);}['refresh'](){const {isReady:_0x2feb6c,isEnabled:_0x47f261,repository:_0x9b709d,diff:_0x3be441}=this['editor']['plugins']['get'](u),_0x19f4f1=_0x3be441&&_0x9b709d['getLaterVisibleRevision'](_0x3be441['newRevisionId']);this['isEnabled']=_0x2feb6c&&_0x47f261&&Boolean(_0x19f4f1);}}class rt extends _0x32a8c2{['_step'];constructor(_0x488c12,{direction:_0x1e636b}){super(_0x488c12);const _0x13cfc9=_0x488c12['plugins']['get'](u);this['affectsData']=!0x1,this['_step']='forward'===_0x1e636b?0x1:-0x1,this['listenTo'](_0x13cfc9,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x13cfc9,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x13cfc9,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x581975=this['editor'],_0x310bfd=_0x581975['plugins']['get'](u),{isNavigationMode:_0x4ef61e,currentChangeNumber:_0x4e1557}=_0x310bfd;let _0x3160f2;if(_0x310bfd['activeChange']=_0x4ef61e?_0x310bfd['diff']['changes']['get'](_0x4e1557+this['_step']):_0x310bfd['diff']['changes']['first'],_0x310bfd['activeChange']['data']['isOnRoot'])_0x3160f2=_0x581975['editing']['view']['getDomRoot'](_0x310bfd['activeChange']['rootName']);else{const _0x72aa9d=_0x581975['model']['markers']['get']('revision:'+_0x310bfd['activeChange']['id']);_0x3160f2=_0x5111b4(_0x581975['editing'],_0x72aa9d);}_0x36e0cc({'target':_0x3160f2,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0xa3b11d,currentChangeNumber:_0x1fae47,numberOfChanges:_0x28eb3,isReady:_0x141d21,isEnabled:_0x3da6c0}=this['editor']['plugins']['get'](u);this['isEnabled']=!!(_0x3da6c0&&_0x141d21&&_0x28eb3)&&(!_0xa3b11d||(0x1===this['_step']?_0x1fae47<_0x28eb3-0x1:_0x1fae47>0x0));}}class vi extends _0x126ab4{constructor(_0x55d7a3){super(_0x55d7a3);const _0x531fbe=this['bindTemplate'],_0x5bc3d6=new _0xc3e667(_0x55d7a3),_0x2c5dfd=new _0xc3e667(_0x55d7a3);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',(_0x380c5b,_0x257d80)=>_0x380c5b&&_0x257d80>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x49d888,_0x42befd,_0x1c3ab7,_0x6d86b7)=>{if(!_0x49d888)return m(_0x55d7a3,'Loading...');if(!_0x1c3ab7)return m(_0x55d7a3,'No\x20changes');const _0x4afade=m(_0x55d7a3,'NUMBER_OF_CHANGES',_0x1c3ab7);return _0x6d86b7?m(_0x55d7a3,'X_OF_Y_CHANGES',[_0x42befd+0x1,_0x1c3ab7]):_0x4afade;}),_0x5bc3d6['set']({'label':m(_0x55d7a3,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x40aa8b}),_0x2c5dfd['set']({'label':m(_0x55d7a3,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x286aff}),_0x5bc3d6['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x2c5dfd['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x5bc3d6['on']('execute',()=>this['fire']('execute','backward')),_0x2c5dfd['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',_0x531fbe['if']('_isStatusLabelVisible','ck-hidden',_0x205afb=>!_0x205afb)]},'children':[{'text':_0x531fbe['to']('isNavigationMode',_0x36b762=>_0x36b762?m(_0x55d7a3,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x55d7a3,'Total')+':\x20')}]},{'text':_0x531fbe['to']('_statusText')}]},new _0x550144(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x5bc3d6,_0x2c5dfd]}]});}}const oe='ck-editor__editable__loading-overlay';class wi extends _0x37efbb{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0xc4bc7e=this['editor']['editing']['view'];_0xc4bc7e['change'](_0xa2bd2c=>{for(const _0x3d8c31 of _0xc4bc7e['document']['roots'])_0xa2bd2c['addClass'](oe,_0x3d8c31);});}['hide'](){const _0x1cd157=this['editor']['editing']['view'];_0x1cd157['change'](_0x207607=>{for(const _0x2733a8 of _0x1cd157['document']['roots'])_0x207607['removeClass'](oe,_0x2733a8);});}}class v extends _0x37efbb{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,wi];}['init'](){const _0x3ff263=this['editor'],_0x546dd0=_0x3ff263['plugins']['get'](u),_0x1e0178=_0x3ff263['plugins']['get'](wi);_0x3ff263['ui']['componentFactory']['add']('exitToEditing',_0x4da7c3=>{const _0x5d902f=new _0xc3e667(_0x4da7c3);return _0x5d902f['set']({'label':m(_0x4da7c3,'Back\x20to\x20editing'),'icon':_0x1aee6f,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5d902f,'execute',()=>{_0x3ff263['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5d902f;}),_0x3ff263['ui']['componentFactory']['add']('restoreRevision',_0x2d57a8=>{const _0x598e4e=new _0xc3e667(_0x2d57a8);return _0x598e4e['set']({'label':m(_0x2d57a8,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x598e4e['bind']('isEnabled')['to'](_0x3ff263['commands']['get']('restoreRevision')),this['listenTo'](_0x598e4e,'execute',()=>_0x3ff263['execute']('restoreRevision')),_0x598e4e;}),_0x3ff263['ui']['componentFactory']['add']('changesNavigation',_0x378d80=>{const _0x3f5705=new vi(_0x378d80),_0x2827a5=_0x3ff263['commands']['get']('showPreviousChange'),_0x2fbdc7=_0x3ff263['commands']['get']('showNextChange');return _0x3f5705['bind']('isBackwardNavigationEnabled')['to'](_0x2827a5,'isEnabled'),_0x3f5705['bind']('isForwardNavigationEnabled')['to'](_0x2fbdc7,'isEnabled'),_0x3f5705['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x546dd0),this['listenTo'](_0x3f5705,'execute',(_0x306f05,_0x41745b)=>{_0x3ff263['execute']('forward'===_0x41745b?'showNextChange':'showPreviousChange');}),_0x3f5705;}),_0x1e0178['show'](),_0x546dd0['on']('change:isReady',(_0x38b442,_0x486c2b,_0x40c63b)=>{_0x40c63b?_0x1e0178['hide']():_0x1e0178['show']();});}}class hi extends et{['_resizeObserver']=null;constructor(_0x238ba4,_0x3e34ff){super(_0x238ba4,_0x3e34ff);const _0x55014b=this['bindTemplate'];this['set']({'label':m(_0x238ba4,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x238ba4,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x55014b['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 _0x1f0606=this['fieldView']['element'];this['_tooltipString']=_0x1f0606['scrollWidth']>_0x1f0606['clientWidth']&&_0x1f0606['value']||'';}}class ni extends _0x126ab4{constructor(_0x2b82ca,_0x482336,_0x31fb93){super(_0x2b82ca);const _0x42a8d0=new _0x860f76();_0x42a8d0['set']({'content':_0x44584d,'viewBox':'0\x200\x2011\x2010'});const _0x58618f=['ck','ck-revision-history-sidebar__revision-author'];_0x31fb93&&_0x58618f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x587f1d=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x2b82ca,_0x31fb93?'Revision\x20creator':'Revision\x20author')},'children':[_0x42a8d0,_0x482336['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x58618f},'children':_0x587f1d});}}function ai(_0x774f89,_0x327e8e){const _0x196aa4=_0x774f89['bindTemplate'],_0x2b77a=_0x774f89['locale'],_0x3a5c49=_0x3295c4(_0x2b77a);_0x3a5c49['panelPosition']='sw';const _0x1778b3=function(_0x2ea63e,_0x2e847f){const _0x5e882e=function(_0x4cac30,_0x48b51e){const _0x4ea083=_0x4cac30['locale'],_0x2fc7bb={'Compare\x20against\x20selected':m(_0x4ea083,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x4ea083,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x4ea083,'Restore\x20this\x20revision')};return _0x48b51e['map'](_0x18547c=>{const _0x15c8d7=_0x2fc7bb[_0x18547c['name']];return _0x15c8d7&&_0x15c8d7!==_0x18547c['name']&&(_0x18547c['name']=_0x15c8d7),_0x18547c;});}(_0x2ea63e,_0x2e847f),_0x29d6c7=new _0x10ef23();for(const _0x1b3d9e of _0x5e882e){const _0x5ae775={'type':'button','model':new to({'label':_0x1b3d9e['name'],'class':_0x1b3d9e['class'],'withText':!0x0,'role':'menuitem','_action':_0x1b3d9e['action']})};_0x5ae775['model']['bind']('isEnabled')['to'](_0x2ea63e,'isActionsDropdownOpen',_0x1198ef=>'function'!=typeof _0x1b3d9e['isEnabled']||(!_0x1198ef||_0x1b3d9e['isEnabled'](_0x2ea63e))),_0x29d6c7['add'](_0x5ae775);}return _0x29d6c7;}(_0x774f89,_0x327e8e);return _0x774f89['bind']('isActionsDropdownOpen')['to'](_0x3a5c49,'isOpen'),_0x3a5c49['buttonView']['set']({'label':m(_0x2b77a,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3435b5}),_0x3a5c49['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x196aa4['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x196aa4['to'](_0x267999=>_0x267999['stopPropagation']())}}),_0x3a5c49['on']('execute',_0xe5db4c=>{_0x774f89['isReady']&&'function'==typeof _0xe5db4c['source']['_action']&&_0xe5db4c['source']['_action'](_0x774f89);}),_0x593ae8(_0x3a5c49,_0x1778b3,{'role':'menu'}),_0x3a5c49['listenTo'](_0x774f89,'change:isActionsDropdownOpen',(_0x41bad2,_0x1981d6,_0x16dd1a)=>{if(_0x16dd1a)for(const _0x118fb9 of _0x3a5c49['listView']['items']){const _0x2d60ea=_0x118fb9['children']['first'],_0x2be46c=_0x327e8e['find'](_0x2db010=>_0x2db010['action']===_0x2d60ea['_action'])['isVisible'];_0x118fb9['isVisible']=void 0x0===_0x2be46c||_0x2be46c(_0x774f89);}}),_0x3a5c49;}class _i extends/* #__PURE__ -- @preserve */
27
+ _0x35bf1a(_0x126ab4){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x4505c3,_0x44e5cc,_0x5649ca,_0x420039){super(_0x4505c3);const _0xfcd226=this['bindTemplate'],_0x287512=function(_0x37fa0f,_0x3ed0d7){const _0x171a74=Array['from'](_0x3ed0d7['authors'])['filter'](_0x5ae620=>_0x5ae620!=_0x3ed0d7['creator']);return _0x3ed0d7['creator']&&_0x171a74['unshift'](_0x3ed0d7['creator']),_0x171a74['map'](_0x350ccc=>new ni(_0x37fa0f,_0x350ccc,_0x350ccc==_0x3ed0d7['creator']));}(_0x4505c3,_0x44e5cc);this['id']=_0x44e5cc['id'],this['_revision']=_0x44e5cc,this['_requireRevisionName']=_0x420039,this['bind']('name','createdAt')['to'](_0x44e5cc),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x57468b=>{return _0xd35e31=_0x4505c3['uiLanguage'],(_0x265112=_0x57468b)['toLocaleDateString'](_0xd35e31,{'month':'long','day':'numeric'})+',\x20'+_0x265112['toLocaleTimeString'](_0xd35e31,{'hour':'numeric','minute':'numeric'});var _0xd35e31,_0x265112;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new hi(_0x4505c3,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x141c8c=>_0x141c8c||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x41496e,_0x332e99)=>_0x41496e&&_0x332e99),this['revisionActionsView']=_0x5649ca&&_0x5649ca['length']?ai(this,_0x5649ca):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0xfcd226['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0xfcd226['if']('isEnabled','ck-disabled',_0x3c7a48=>!_0x3c7a48),_0xfcd226['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0xfcd226['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0xfcd226['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':_0xfcd226['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':_0x287512}]},this['revisionActionsView']],'on':{'click':_0xfcd226['to'](_0x3ba263=>{_0x3ba263['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0xbf984d=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0xbf984d,'change',()=>{this['_requireRevisionName']&&!_0xbf984d['value']||this['fire']('setName',{'id':this['id'],'name':_0xbf984d['value']}),_0xbf984d['value']||(_0xbf984d['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function pi(_0x526eaf,_0x39932c){const _0x3ecb49=_0x1006f5['fromJSDate'](_0x526eaf)['setLocale'](_0x39932c),_0x1fdc52=_0x1006f5['local'](),_0x68f210=_0x1fdc52['minus']({'days':0x1})['startOf']('day');let _0x2787fd,_0x263a2e;return _0x3ecb49['hasSame'](_0x1fdc52,'day')?(_0x2787fd=_0x3ecb49['startOf']('day')['toJSDate'](),_0x263a2e=_0x3ecb49['toRelativeCalendar']()):_0x3ecb49['hasSame'](_0x68f210,'day')?(_0x2787fd=_0x68f210['toJSDate'](),_0x263a2e=_0x3ecb49['toRelativeCalendar']()):_0x3ecb49['hasSame'](_0x1fdc52,'week')?(_0x2787fd=_0x3ecb49['startOf']('week')['toJSDate'](),_0x263a2e=_0x3ecb49['weekdayLong']||''):_0x3ecb49['hasSame'](_0x1fdc52,'year')?(_0x2787fd=_0x3ecb49['startOf']('month')['toJSDate'](),_0x263a2e=_0x3ecb49['monthLong']||''):(_0x2787fd=_0x3ecb49['startOf']('year')['toJSDate'](),_0x263a2e=String(_0x3ecb49['year'])),{'startDate':_0x2787fd,'localizedPeriodName':_0x263a2e};}class bi extends _0x126ab4{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x281a03,_0x4ef2cf,_0x27394e,_0x1c1139){super(_0x281a03);const _0x357863=pi(_0x4ef2cf,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x4ef2cf,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x27394e,this['_requireRevisionName']=_0x1c1139,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':_0x357863}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x4ed394){const _0x1721d9=new _i(this['locale'],_0x4ed394,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x1721d9);}['removeRevision'](_0x565708){const _0x160e49=this['revisionViews']['find'](_0x41e1ec=>_0x41e1ec['id']===_0x565708['id']);this['revisionViews']['remove'](_0x160e49);}}class fi extends _0x126ab4{constructor(_0x28fc06){super(_0x28fc06);const _0x337a0b=new _0x860f76();_0x337a0b['content']=_0x5f4d6c,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x337a0b,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x28fc06,'Revision\x20history')]}]});}}class Ri extends _0x126ab4{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x48ba11,_0x54ca74,_0x2b5440,_0x7acbb1){super(_0x48ba11);const _0x50b8e9=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x54ca74,this['_revisionActions']=_0x2b5440,this['_requireRevisionName']=_0x7acbb1,this['on']('select',(_0x563a57,_0x24bd0f)=>{this['fire']('revisionSelected',_0x24bd0f);}),this['on']('setName',(_0x4f80e0,_0x44bcf1)=>{this['fire']('revisionSetName',_0x44bcf1);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new fi(_0x48ba11),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x50b8e9['if']('isEnabled','ck-disabled',_0xba783=>!_0xba783)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x468c93 of this['_revisions'])this['_addRevision'](_0x468c93);this['_revisions']['on']('add',(_0x1533ae,_0x21fab7)=>{this['_addRevision'](_0x21fab7);}),this['_revisions']['on']('remove',(_0x3fa953,_0x5de6cb)=>{this['_removeRevision'](_0x5de6cb);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x580850=>_0x580850['revisionViews']['map'](_0x2c95e3=>_0x2c95e3))['flat']();}['selectRevision'](_0x128644){for(const _0x4150e4 of this['revisionViews'])_0x128644&&_0x128644['id']===_0x4150e4['id']?_0x4150e4['select']():_0x4150e4['deselect']();}['highlightRevisions'](_0x329446){for(const _0x204fc2 of this['revisionViews'])_0x329446['some'](({id:_0x59f53a})=>_0x59f53a===_0x204fc2['id'])?_0x204fc2['highlight']():_0x204fc2['unhighlight']();}['_addRevision'](_0x593e51){const _0x4aa724=pi(_0x593e51['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x11bae7=this['timePeriodViews']['get'](0x0);_0x11bae7&&_0x11bae7['startDate']['getTime']()===_0x4aa724['getTime']()||(_0x11bae7=new bi(this['locale'],_0x4aa724,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x11bae7)),_0x11bae7['addRevision'](_0x593e51);}['_removeRevision'](_0x478f22){const _0x419aee=pi(_0x478f22['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x419aee)['removeRevision'](_0x478f22);}['_getTimePeriodViewByStartDate'](_0x1aa670){return this['timePeriodViews']['find'](_0x28b133=>_0x28b133['startDate']['getTime']()===_0x1aa670['getTime']());}}class d extends _0x37efbb{['_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[u];}constructor(_0x4578e8){super(_0x4578e8),this['_revisionViewer']=_0x4578e8['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1df89d=this['_revisionsRepository']['_revisions'],_0x3bb65d=this['_createRevisionActions'](),_0x56e1a2=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ui(this['editor']['locale'],_0x1df89d,_0x3bb65d,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',(_0x37878b,_0x2ab24e)=>{_0x2ab24e['revisionViews']['on']('add',(_0x3cb26e,_0x5416b5)=>{_0x5416b5['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)),_0x56e1a2['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x400beb=this['_revisionsRepository']['getRevision'](0x0);if(_0x400beb){const _0x57deb0=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x400beb['id']);this['_revisionViewer']['compare'](_0x400beb,_0x57deb0);}}['_handleRevisionSelected'](_0x58f7e6,_0x1783aa){const _0x15d384=this['_revisionsRepository']['getRevision'](_0x1783aa['id']),_0x243dbb=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x15d384['id']);this['_revisionViewer']['compare'](_0x15d384,_0x243dbb);}['_handleRevisionSetName'](_0x284cf2,_0x29e6e9){this['_revisionsRepository']['getRevision'](_0x29e6e9['id'])['setName'](_0x29e6e9['name']);}['_handleDiffChange'](_0x4e6c3b,_0xacff4,_0x442141){const _0x15e22a=this['_revisionsRepository']['getRevisionsInDiff'](_0x442141);_0x15e22a['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x15e22a),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x15e22a[0x0]));}['_createRevisionActions'](){const _0x1186f7=this['editor'],_0x28a98e=d['availableRevisionActions'],_0x4c8284=_0x1186f7['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0x4c8284['length'])return _0x4c8284['map'](_0x3e2145=>{const _0x20d93d='string'==typeof _0x3e2145?Object['assign']({},_0x28a98e[_0x3e2145]):_0x3e2145;return _0x20d93d['action']=_0x20d93d['action']['bind'](this,_0x1186f7),_0x20d93d['isVisible']&&(_0x20d93d['isVisible']=_0x20d93d['isVisible']['bind'](this,_0x1186f7)),_0x20d93d;});}}function rt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x43ebf1},_0x20ce61)=>{const _0x5280f8=_0x43ebf1['get'](u),_0x375c25=_0x5280f8['repository'];let _0x4519a2=_0x5280f8['diff']['newRevisionId'],_0x367d0=_0x20ce61['id'];_0x375c25['getIndex'](_0x4519a2)>_0x375c25['getIndex'](_0x367d0)&&([_0x4519a2,_0x367d0]=[_0x367d0,_0x4519a2]),_0x5280f8['compare'](_0x4519a2,_0x367d0);},'isVisible':({plugins:_0xf5b1c},_0x41f930)=>{const _0x1c2e8e=_0xf5b1c['get'](u);return!(_0x1c2e8e['repository']['getRevisionsInDiff'](_0x1c2e8e['diff'])['length']>0x2)&&!_0x41f930['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x4af63a,{id:_0x3b325c})=>{_0x4af63a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3b325c);},'isVisible':({plugins:_0x7b8243},_0x41eb06)=>!!_0x7b8243['get'](u)['repository']['getLaterVisibleRevision'](_0x41eb06['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x436387},{id:_0x15f05e,revisionNameView:_0x22b132})=>{const _0x55da65=_0x436387['get'](u),_0x5e0b59=_0x55da65['repository']['getEarlierVisibleRevision'](_0x15f05e);_0x55da65['compare'](_0x15f05e,_0x5e0b59),_0x22b132['focus'](),_0x22b132['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x59b816,_0x50692f){super(_0x59b816),this['_view']=_0x50692f,this['_toolbarConfig']=st(_0x59b816['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x3f83d9){const _0x53b322=this['editor'],_0x4d214e=this['view'],_0x1ade90=_0x53b322['editing']['view'],_0x450ef1=_0x4d214e['editable'],_0x4b93f8=_0x1ade90['document']['getRoot']();_0x450ef1['name']=_0x4b93f8['rootName'],_0x4d214e['render']();const _0xb5421d=_0x450ef1['element'];this['setEditableElement'](_0x450ef1['name'],_0xb5421d),_0x4d214e['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x1ade90['attachDomRoot'](_0xb5421d),this['_elementReplacer']['replace'](_0x3f83d9,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x48d7dd=this['view'],_0x1e584a=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x1e584a['detachDomRoot'](_0x48d7dd['editable']['name']),_0x48d7dd['destroy']();}['_initToolbar'](){const _0x5c21d2=this['view'];_0x5c21d2['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x5c21d2['stickyPanel']['limiterElement']=_0x5c21d2['element'],_0x5c21d2['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x31eea5})=>_0x31eea5),_0x5c21d2['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x5c21d2['toolbar']);}}class ii extends _0x2c763f{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0xe240c9,_0x5d698f,_0x24f901={}){super(_0xe240c9),this['stickyPanel']=new _0x543ebe(_0xe240c9),this['toolbar']=new _0x8f2e9b(_0xe240c9,{'shouldGroupWhenFull':_0x24f901['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0xe240c9,_0x5d698f);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
- _0x37662a(_0x455307){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5a2b54,_0x443b2a){super(_0x443b2a),this['sourceElement']=_0x5a2b54,this['model']['document']['createRoot']();const _0x2f8697=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x2f8697);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x1b21a5,_0x2d0200){const _0x21f417=new this(_0x1b21a5,_0x2d0200);return await _0x21f417['initPlugins'](),await _0x21f417['ui']['init'](_0x1b21a5),await _0x21f417['data']['init'](_0x21f417['config']['get']('initialData')||''),_0x21f417['fire']('ready'),_0x21f417;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class at extends _0x237363{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ea3f2){function _0x377dc5(_0x3716c5){return _0x3716c5['map'](_0x153ad8=>String['fromCharCode'](_0x153ad8))['join']('');}super(_0x1ea3f2),this['result']='end',_0x1ea3f2[_0x377dc5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x377dc5([0x76,0x69,0x65,0x77])][_0x377dc5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x377dc5([0x61,0x75,0x74,0x6f]),_0x1ea3f2[_0x377dc5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x377dc5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x377dc5([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x377dc5([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x377dc5([0x6f,0x6b])});}}class ht extends _0x237363{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x2ab3bc){if(super(_0x2ab3bc),!this['editor']['config']['get']('revisionHistory'))throw new _0x155f4d('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x58c3bf=>this['_showRevisionViewer']({..._0x58c3bf,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2a4a81=>this['_closeRevisionViewer'](_0x2a4a81)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x490487=>this['_restoreRevision'](_0x490487)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x355b1d){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x355b1d;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x57144f){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x57144f);}['getRevision'](_0x1c8b4c){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x1c8b4c);}['getRevisions'](_0x14ce40){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x14ce40||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x4c1191=this['editor'],_0x295e64=_0x2f465f(_0x4c1191,p),_0x38a466=_0x4c1191['plugins']['get']('RevisionTracker'),_0x377169=_0x4c1191['plugins']['get']('Users')['users'];return _0x295e64['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x295e64['lazyRoots'],(_0x295e64['plugins']['push'](at,u,v,class extends _0x237363{static get['requires'](){return[u,'Users'];}['init'](){const _0x33fe30=this['editor']['plugins']['get']('Users');for(const _0x204ac8 of _0x377169)_0x204ac8['isAnonymous']||_0x33fe30['getUser'](_0x204ac8['id'])||_0x33fe30['addUser'](_0x204ac8);const _0x3f2367=_0x38a466['repository']['getRevisions']();let _0x54706f=null;const _0x23b899=this['editor']['plugins']['get']('RevisionViewer');_0x23b899['adapter']=_0x38a466['adapter'],_0x23b899['bind']('isEnabled')['to'](_0x38a466),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x4c1191,'isReadOnly',_0x3df8bb=>!_0x3df8bb);for(const _0x1ffc60 of _0x3f2367){const _0x1896a5=null===_0x1ffc60['creator'];if(_0x1896a5&&_0x1ffc60['toVersion']===_0x1ffc60['fromVersion'])continue;const _0x232eb6=_0x1ffc60['toJSON']();_0x23b899['addRevisionData'](_0x232eb6,(_0x189160,_0x2241ce,_0x18cdc3)=>{if(_0x1896a5){if(_0x54706f)_0x54706f['_update'](_0x189160,_0x2241ce);else{if(!_0x2241ce){const _0x20ed0c=_0x18cdc3['toJSON']();_0x20ed0c['id']=_0x9068c(),_0x38a466['saveRevision'](_0x20ed0c,_0x18cdc3['toVersion'])['then'](_0x56ec25=>{_0x54706f=_0x56ec25;});}}}else _0x1ffc60['_update'](_0x189160,_0x2241ce);});}}},d),_0x295e64);}['_enhanceShowRevisionViewerCallback'](){const _0x338493=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x14936e=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x20d326=this['editor']['plugins']['get']('Autosave');await _0x20d326['save']();}else await _0x14936e['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0xe4cdf5=this['editor']['plugins']['get']('Dialog');_0xe4cdf5['isOpen']&&_0xe4cdf5['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x183720=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x163cc8 of _0x183720)_0x163cc8['class']=_0x163cc8['class']?_0x163cc8['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x162876=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x162876&&_0x162876['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x2edbd2=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x2edbd2&&_0x2edbd2['setAttribute']('tabindex','-1');}}const _0x4ec2d0=this['_getRevisionViewerEditorConfig']();return _0x338493(_0x4ec2d0)['then'](_0x1e2ae0=>{return(this['_viewerEditor']=_0x1e2ae0,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'),_0x1e2ae0);})['catch'](_0x14af4f=>(console['error'](_0x14af4f),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x205cc6=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(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['editor']['plugins']['has']('AITabs')){const _0x17d43d=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4071f8 of _0x17d43d)_0x4071f8['class']='ck-tab-panel_disabled'===_0x4071f8['class']?'':_0x4071f8['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x36fabe=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x36fabe&&_0x36fabe['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x174189=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x174189&&_0x174189['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x205cc6(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x1d67fe=this['editor']['plugins']['get']('Annotations');_0x1d67fe['refreshVisibility'](),_0x1d67fe['refreshPositioning']();}});});}['_showRevisionViewer'](_0x48515f){const _0x1f64dd=this['editor']['config']['get']('revisionHistory.editorContainer'),_0xfbf850=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x34d37c=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x34d37c,_0x48515f)['then'](_0x1f77eb=>(_0xfbf850['style']['display']='block',_0x1f64dd['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1f77eb));}['_closeRevisionViewer'](_0x123a3c){const _0x358bc1=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x358bc1['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x123a3c['destroy']();}async['_restoreRevision'](_0x16b3a4){const _0x552e78=this['editor'],_0x143d14=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x526faa=_0x552e78['plugins']['get']('RevisionTracker'),_0x431efb=_0x552e78['plugins']['get']('RevisionHistoryUtils'),_0x2a9809=_0x143d14['repository']['getRevision'](_0x16b3a4);let _0x8822ab,_0x4e78df,_0x24deb7;try{await _0x431efb['loadRevisionData'](_0x2a9809,this['adapter']),_0x8822ab=_0x431efb['getRevisionDocumentData'](_0x2a9809),_0x4e78df=_0x431efb['getRevisionRootsAttributes'](_0x2a9809);}catch(_0x3c5c4e){return void console['error'](_0x3c5c4e);}_0x552e78['model']['change'](_0x5c2cc6=>{for(const _0x4bc81c of Array['from'](_0x552e78['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5c2cc6['removeMarker'](_0x4bc81c);}),_0x143d14['isReady']=!0x1,_0x552e78['model']['enqueueChange'](_0x115c4c=>{_0x115c4c['setSelection'](null),_0x115c4c['removeSelectionAttribute'](_0x552e78['model']['document']['selection']['getAttributeKeys']());const _0x50ac5c=Object['keys'](_0x8822ab);for(const _0x5b5fcf of _0x552e78['model']['document']['roots'])'$graveyard'!=_0x5b5fcf['rootName']&&_0x5b5fcf['isAttached']()&&!_0x50ac5c['includes'](_0x5b5fcf['rootName'])&&_0x115c4c['detachRoot'](_0x5b5fcf);for(const _0x582d7f of _0x50ac5c){let _0x4d6e79=_0x552e78['model']['document']['getRoot'](_0x582d7f);_0x4d6e79&&_0x4d6e79['isAttached']()||(_0x4d6e79=_0x115c4c['addRoot'](_0x582d7f));const _0x46ae83=_0x4e78df[_0x582d7f],_0x4cd4ef=Object['keys'](_0x46ae83),_0x33624a=_0x8822ab[_0x582d7f];for(const _0x43766f of _0x4d6e79['getAttributeKeys']())_0x4cd4ef['includes'](_0x43766f)||_0x115c4c['removeAttribute'](_0x43766f,_0x4d6e79);for(const _0x4bf360 of _0x4cd4ef)_0x115c4c['setAttribute'](_0x4bf360,_0x4e78df[_0x582d7f][_0x4bf360],_0x4d6e79);_0x115c4c['remove'](_0x115c4c['createRangeIn'](_0x4d6e79)),_0x115c4c['insert'](_0x552e78['data']['parse'](_0x33624a,_0x4d6e79),_0x4d6e79,0x0);}});const _0xd798b8=m(_0x552e78['locale'],'Restored');if(_0x2a9809['name'])_0x24deb7=-0x1==_0x2a9809['name']['indexOf'](_0xd798b8)?_0xd798b8+':\x20'+_0x2a9809['name']:_0x2a9809['name'];else _0x24deb7=_0xd798b8+':\x20'+(_0x2a9809['createdAt']['toLocaleDateString'](_0x552e78['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x2a9809['createdAt']['toLocaleTimeString'](_0x552e78['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x526faa['saveRevision']({'name':_0x24deb7}),_0x143d14['isReady']=!0x0,_0x552e78['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ht as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,at as RevisionViewerIntegration,ji as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d 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[u];}constructor(_0x543b67){super(_0x543b67),this['_revisionViewer']=_0x543b67['plugins']['get'](u),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x3a9895=this['_revisionsRepository']['_revisions'],_0x1657fc=this['_createRevisionActions'](),_0x3f688f=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new Ri(this['editor']['locale'],_0x3a9895,_0x1657fc,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',(_0x16296b,_0x4ad327)=>{_0x4ad327['revisionViews']['on']('add',(_0xd55e87,_0x24bddf)=>{_0x24bddf['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)),_0x3f688f['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x4fc585=this['_revisionsRepository']['getRevision'](0x0);if(_0x4fc585){const _0x43f47a=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x4fc585['id']);this['_revisionViewer']['compare'](_0x4fc585,_0x43f47a);}}['_handleRevisionSelected'](_0x3878d6,_0x239e22){const _0xbe74b1=this['_revisionsRepository']['getRevision'](_0x239e22['id']),_0x1335f3=this['_revisionsRepository']['getEarlierVisibleRevision'](_0xbe74b1['id']);this['_revisionViewer']['compare'](_0xbe74b1,_0x1335f3);}['_handleRevisionSetName'](_0x61dffd,_0x411492){this['_revisionsRepository']['getRevision'](_0x411492['id'])['setName'](_0x411492['name']);}['_handleDiffChange'](_0x527020,_0x268430,_0x145967){const _0x4b5487=this['_revisionsRepository']['getRevisionsInDiff'](_0x145967);_0x4b5487['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x4b5487),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x4b5487[0x0]));}['_createRevisionActions'](){const _0x33cf31=this['editor'],_0x4836b0=d['availableRevisionActions'],_0xbb9e3c=_0x33cf31['config']['get']('revisionHistory.revisionActions')||d['defaultRevisionActions'];if(_0xbb9e3c['length'])return _0xbb9e3c['map'](_0x2d911e=>{const _0x44066f='string'==typeof _0x2d911e?Object['assign']({},_0x4836b0[_0x2d911e]):_0x2d911e;return _0x44066f['action']=_0x44066f['action']['bind'](this,_0x33cf31),_0x44066f['isVisible']&&(_0x44066f['isVisible']=_0x44066f['isVisible']['bind'](this,_0x33cf31)),_0x44066f;});}}function at(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x332629},_0x4c1d36)=>{const _0x39329b=_0x332629['get'](u),_0x3c9a48=_0x39329b['repository'];let _0x1baafd=_0x39329b['diff']['newRevisionId'],_0x2ad746=_0x4c1d36['id'];_0x3c9a48['getIndex'](_0x1baafd)>_0x3c9a48['getIndex'](_0x2ad746)&&([_0x1baafd,_0x2ad746]=[_0x2ad746,_0x1baafd]),_0x39329b['compare'](_0x1baafd,_0x2ad746);},'isVisible':({plugins:_0xdb270d},_0x7a0fa5)=>{const _0x42182e=_0xdb270d['get'](u);return!(_0x42182e['repository']['getRevisionsInDiff'](_0x42182e['diff'])['length']>0x2)&&!_0x7a0fa5['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0xf0aff7,{id:_0xb43d03})=>{_0xf0aff7['config']['get']('revisionHistory')['restoreRevisionCallback'](_0xb43d03);},'isVisible':({plugins:_0x33ce43},_0x5bf02b)=>!!_0x33ce43['get'](u)['repository']['getLaterVisibleRevision'](_0x5bf02b['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x1cf63f},{id:_0x2c8d60,revisionNameView:_0x334ef0})=>{const _0x438e82=_0x1cf63f['get'](u),_0x4740ba=_0x438e82['repository']['getEarlierVisibleRevision'](_0x2c8d60);_0x438e82['compare'](_0x2c8d60,_0x4740ba),_0x334ef0['focus'](),_0x334ef0['fieldView']['select']();}}};}class Z extends tt{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x5e4770,_0x38978f){super(_0x5e4770),this['_view']=_0x38978f,this['_toolbarConfig']=st(_0x5e4770['config']['get']('toolbar')),this['_elementReplacer']=new it();}get['element'](){return this['view']['element'];}['init'](_0x394260){const _0x18be1a=this['editor'],_0x5ba0e5=this['view'],_0x3854df=_0x18be1a['editing']['view'],_0xdb2515=_0x5ba0e5['editable'],_0x548a64=_0x3854df['document']['getRoot']();_0xdb2515['name']=_0x548a64['rootName'],_0x5ba0e5['render']();const _0x278318=_0xdb2515['element'];this['setEditableElement'](_0xdb2515['name'],_0x278318),_0x5ba0e5['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3854df['attachDomRoot'](_0x278318),this['_elementReplacer']['replace'](_0x394260,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x3f56ac=this['view'],_0x3c18f3=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x3c18f3['detachDomRoot'](_0x3f56ac['editable']['name']),_0x3f56ac['destroy']();}['_initToolbar'](){const _0x34c3b2=this['view'];_0x34c3b2['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x34c3b2['stickyPanel']['limiterElement']=_0x34c3b2['element'],_0x34c3b2['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x51cea9})=>_0x51cea9),_0x34c3b2['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x34c3b2['toolbar']);}}class ii extends _0x21a7f9{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x249346,_0x332330,_0x42bcda={}){super(_0x249346),this['stickyPanel']=new _0x73ee2d(_0x249346),this['toolbar']=new _0x36ff58(_0x249346,{'shouldGroupWhenFull':_0x42bcda['shouldToolbarGroupWhenFull']}),this['_editable']=new te(_0x249346,_0x332330);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class f extends/* #__PURE__ -- @preserve */
30
+ _0x3f7666(_0x24ae32){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x5c3388,_0x5f48e4){super(_0x5f48e4),this['sourceElement']=_0x5c3388,this['model']['document']['createRoot']();const _0x2214e5=new ii(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new Z(this,_0x2214e5);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x136cf6,_0xddbe2a){const _0x182843=new this(_0x136cf6,_0xddbe2a);return await _0x182843['initPlugins'](),await _0x182843['ui']['init'](_0x136cf6),await _0x182843['data']['init'](_0x182843['config']['get']('initialData')||''),_0x182843['fire']('ready'),_0x182843;}}const p=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions'];class ht extends _0x37efbb{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5c5b16){function _0x266a74(_0x135164){return _0x135164['map'](_0x1c7387=>String['fromCharCode'](_0x1c7387))['join']('');}super(_0x5c5b16),this['result']='end',_0x5c5b16[_0x266a74([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x266a74([0x76,0x69,0x65,0x77])][_0x266a74([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x266a74([0x61,0x75,0x74,0x6f]),_0x5c5b16[_0x266a74([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x266a74([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x266a74([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x266a74([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x266a74([0x6f,0x6b])});}}class ct extends _0x37efbb{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[h,l];}constructor(_0x3e8f5b){if(super(_0x3e8f5b),!this['editor']['config']['get']('revisionHistory'))throw new _0x28aaf8('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x4c50b6=>this['_showRevisionViewer']({..._0x4c50b6,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0xbc9dca=>this['_closeRevisionViewer'](_0xbc9dca)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x4a6680=>this['_restoreRevision'](_0x4a6680)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x2ca3a6){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x2ca3a6;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x1aed4f){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x1aed4f);}['getRevision'](_0x44fbde){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x44fbde);}['getRevisions'](_0x9c5768){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x9c5768||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x44ec16=this['editor'],_0x35a67a=_0x674281(_0x44ec16,p),_0x73ea35=_0x44ec16['plugins']['get']('RevisionTracker'),_0x2e7c21=_0x44ec16['plugins']['get']('Users')['users'];return _0x35a67a['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x35a67a['lazyRoots'],(_0x35a67a['plugins']['push'](ht,u,v,class extends _0x37efbb{static get['requires'](){return[u,'Users'];}['init'](){const _0x2e11d8=this['editor']['plugins']['get']('Users');for(const _0x46070d of _0x2e7c21)_0x46070d['isAnonymous']||_0x2e11d8['getUser'](_0x46070d['id'])||_0x2e11d8['addUser'](_0x46070d);const _0x405ca8=_0x73ea35['repository']['getRevisions']();let _0x16a5bf=null;const _0x557257=this['editor']['plugins']['get']('RevisionViewer');_0x557257['adapter']=_0x73ea35['adapter'],_0x557257['bind']('isEnabled')['to'](_0x73ea35),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x44ec16,'isReadOnly',_0x49c9ff=>!_0x49c9ff);for(const _0x4f7b1c of _0x405ca8){const _0x5d4f4a=null===_0x4f7b1c['creator'];if(_0x5d4f4a&&_0x4f7b1c['toVersion']===_0x4f7b1c['fromVersion'])continue;const _0x37ef8f=_0x4f7b1c['toJSON']();_0x557257['addRevisionData'](_0x37ef8f,(_0x3a7c7e,_0x1aa2cd,_0x421833)=>{if(_0x5d4f4a){if(_0x16a5bf)_0x16a5bf['_update'](_0x3a7c7e,_0x1aa2cd);else{if(!_0x1aa2cd){const _0x30dd27=_0x421833['toJSON']();_0x30dd27['id']=_0x2007cb(),_0x73ea35['saveRevision'](_0x30dd27,_0x421833['toVersion'])['then'](_0x5a6352=>{_0x16a5bf=_0x5a6352;});}}}else _0x4f7b1c['_update'](_0x3a7c7e,_0x1aa2cd);});}}},d),_0x35a67a);}['_enhanceShowRevisionViewerCallback'](){const _0x138cb1=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x55ba98=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x30a21d=this['editor']['plugins']['get']('Autosave');await _0x30a21d['save']();}else await _0x55ba98['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5d8c4c=this['editor']['plugins']['get']('Dialog');_0x5d8c4c['isOpen']&&_0x5d8c4c['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5c4407=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x1cf6e9 of _0x5c4407)_0x1cf6e9['class']=_0x1cf6e9['class']?_0x1cf6e9['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x4f0786=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x4f0786&&_0x4f0786['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x7253e9=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x7253e9&&_0x7253e9['setAttribute']('tabindex','-1');}}const _0x4b2ff7=this['_getRevisionViewerEditorConfig']();return _0x138cb1(_0x4b2ff7)['then'](_0x280eff=>{return(this['_viewerEditor']=_0x280eff,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'),_0x280eff);})['catch'](_0x57f4ae=>(console['error'](_0x57f4ae),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x346809=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(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['editor']['plugins']['has']('AITabs')){const _0x265c2c=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x2d6619 of _0x265c2c)_0x2d6619['class']='ck-tab-panel_disabled'===_0x2d6619['class']?'':_0x2d6619['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x7d72ec=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x7d72ec&&_0x7d72ec['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x1fa222=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x1fa222&&_0x1fa222['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x346809(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x159a9b=this['editor']['plugins']['get']('Annotations');_0x159a9b['refreshVisibility'](),_0x159a9b['refreshPositioning']();}});});}['_showRevisionViewer'](_0x646e56){const _0x527be0=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x396c7c=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x3af381=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return f['create'](_0x3af381,_0x646e56)['then'](_0xebd97d=>(_0x396c7c['style']['display']='block',_0x527be0['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0xebd97d));}['_closeRevisionViewer'](_0x7475f4){const _0x571511=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x571511['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x7475f4['destroy']();}async['_restoreRevision'](_0x1542af){const _0x571ffc=this['editor'],_0x16d6d6=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x5d2459=_0x571ffc['plugins']['get']('RevisionTracker'),_0x8350a1=_0x571ffc['plugins']['get']('RevisionHistoryUtils'),_0x1fd12b=_0x16d6d6['repository']['getRevision'](_0x1542af);let _0x19a505,_0x4a21a0,_0x550bc9;try{await _0x8350a1['loadRevisionData'](_0x1fd12b,this['adapter']),_0x19a505=_0x8350a1['getRevisionDocumentData'](_0x1fd12b),_0x4a21a0=_0x8350a1['getRevisionRootsAttributes'](_0x1fd12b);}catch(_0x59fe1c){return void console['error'](_0x59fe1c);}_0x571ffc['model']['change'](_0x28f654=>{for(const _0x14239b of Array['from'](_0x571ffc['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x28f654['removeMarker'](_0x14239b);}),_0x16d6d6['isReady']=!0x1,_0x571ffc['model']['enqueueChange'](_0x316553=>{_0x316553['setSelection'](null),_0x316553['removeSelectionAttribute'](_0x571ffc['model']['document']['selection']['getAttributeKeys']());const _0x325024=Object['keys'](_0x19a505);for(const _0xe94793 of _0x571ffc['model']['document']['roots'])'$graveyard'!=_0xe94793['rootName']&&_0xe94793['isAttached']()&&!_0x325024['includes'](_0xe94793['rootName'])&&_0x316553['detachRoot'](_0xe94793);for(const _0x4d4709 of _0x325024){let _0x5c05fc=_0x571ffc['model']['document']['getRoot'](_0x4d4709);_0x5c05fc&&_0x5c05fc['isAttached']()||(_0x5c05fc=_0x316553['addRoot'](_0x4d4709));const _0x186810=_0x4a21a0[_0x4d4709],_0x483bb6=Object['keys'](_0x186810),_0xeef998=_0x19a505[_0x4d4709];for(const _0x3b5169 of _0x5c05fc['getAttributeKeys']())_0x483bb6['includes'](_0x3b5169)||_0x316553['removeAttribute'](_0x3b5169,_0x5c05fc);for(const _0x4e4615 of _0x483bb6)_0x316553['setAttribute'](_0x4e4615,_0x4a21a0[_0x4d4709][_0x4e4615],_0x5c05fc);_0x316553['remove'](_0x316553['createRangeIn'](_0x5c05fc)),_0x316553['insert'](_0x571ffc['data']['parse'](_0xeef998,_0x5c05fc),_0x5c05fc,0x0);}});const _0x459c8c=m(_0x571ffc['locale'],'Restored');if(_0x1fd12b['name'])_0x550bc9=-0x1==_0x1fd12b['name']['indexOf'](_0x459c8c)?_0x459c8c+':\x20'+_0x1fd12b['name']:_0x1fd12b['name'];else _0x550bc9=_0x459c8c+':\x20'+(_0x1fd12b['createdAt']['toLocaleDateString'](_0x571ffc['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x1fd12b['createdAt']['toLocaleTimeString'](_0x571ffc['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x5d2459['saveRevision']({'name':_0x550bc9}),_0x16d6d6['isReady']=!0x0,_0x571ffc['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{nt as RestoreRevisionCommand,I as Revision,ct as RevisionHistory,l as RevisionHistoryUI,$ as RevisionHistoryUtils,h as RevisionTracker,u as RevisionViewer,f as RevisionViewerEditor,ht as RevisionViewerIntegration,wi as RevisionViewerLoadingOverlay,v as RevisionViewerUI,S as RevisionsRepository,d as RevisionsSidebar,rt as ShowChangeCommand};