@ckeditor/ckeditor5-revision-history 0.0.0-nightly-20250322.0 → 0.0.0-nightly-20250324.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,10 +20,10 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ObservableMixin as _0x1ff634,uid as _0x51a0e0,Collection as _0x1056b3,logWarning as _0x538e24,FocusTracker as _0x5732ff,KeystrokeHandler as _0x538a05,scrollViewportToShowTarget as _0x42da1f,ResizeObserver as pt,ElementReplacer as ht,CKEditorError as _0x1a961b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x2cf058,set as _0x2b3d38,unset as _0xa852ed,isEqual as _0x45b9b0}from'es-toolkit/compat';import{Plugin as _0x5aa884,PendingActions as _0x24dc87,Command as _0x474bc6,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x500ee0,getMarkerDomElement as _0x26f880,ConfirmMixin as _0x256f9d,sanitizeEditorConfig as _0x4398d8}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x39dd63,Element as ut,Range as ft,ViewUIElement as _0x1231a7,ViewRawElement as _0x1c2455,ViewEmptyElement as _0x48d005,ViewAttributeElement as _0x5dcd99,ViewContainerElement as _0x364db7,Position as vt,ViewText as _0xbf05a4,ViewElement as _0x34efa8,DocumentFragment as gt,Text as wt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x5b5e2c,IconChevronUp as _0x47c9dd,IconChevronDown as _0x35bc15,IconUndo as _0x49f4f5,IconUser as _0x200d00,IconThreeVerticalDots as _0x2aa713}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as _0x377738,injectCssTransitionDisabler as ts,submitHandler as _0x16b26b,LabeledFieldView as at,createLabeledInputText as ti,createDropdown as _0x28f4b1,ListView as _0x122e03,ListItemView as te,ButtonView as _0x4cea6e,MenuBarMenuView as _0x33eb46,MenuBarMenuListView as _0x4867ec,MenuBarMenuListItemView as _0x5e8df2,MenuBarMenuListItemButtonView as _0x15ddd2,ContextualBalloon as _0x5b7085,ToolbarSeparatorView as _0x36a155,IconView as _0x2b341d,addListToDropdown as _0x27322b,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as nt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x371ddf}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
- _0x1ff634(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0xe88f24){super(),this['id']=_0xe88f24['id']||_0x51a0e0(),this['creator']=_0xe88f24['creator']||null,this['authors']=_0xe88f24['authors']||[],this['diffData']=_0xe88f24['diffData']||null,this['toVersion']=_0xe88f24['toVersion']||0x0,this['fromVersion']=_0xe88f24['fromVersion']||0x0,this['set']('name',_0xe88f24['name']||''),this['set']('createdAt',_0xe88f24['createdAt']||new Date()),this['set']('attributes',_0xe88f24['attributes']||{});}['setName'](_0x5b3781){this['_update']({'name':_0x5b3781});}['setAttribute'](_0x4937d7,_0x3bb9e8){const _0x45dc13=_0x2cf058(this['attributes']);_0x2b3d38(_0x45dc13,_0x4937d7,_0x3bb9e8),this['_update']({'attributes':_0x45dc13});}['removeAttribute'](_0x17e584){const _0x130234=_0x2cf058(this['attributes']);_0xa852ed(_0x130234,_0x17e584),this['_update']({'attributes':_0x130234});}['_update'](_0x334bdc,_0x342e05=!0x1){let _0x24761b=!0x1;const _0x574cd5={'id':this['id']},_0xae9f9e=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x3b9898 of _0xae9f9e){const _0xcb6cbd=_0x334bdc[_0x3b9898];void 0x0!==_0xcb6cbd&&_0xcb6cbd!==this[_0x3b9898]&&(this[_0x3b9898]=_0xcb6cbd,_0x574cd5[_0x3b9898]=_0xcb6cbd,_0x24761b=!0x0);}_0x24761b&&(_0x574cd5['authors']&&(_0x574cd5['authorsIds']=_0x574cd5['authors']['map'](_0x511869=>_0x511869['id']),delete _0x574cd5['authors']),this['fire']('_update',_0x574cd5,_0x342e05));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0xf19686=>_0xf19686['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x5aa884{['_revisions'];static get['requires'](){return[_0x500ee0];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x1e28a7){super(_0x1e28a7),this['_revisions']=new _0x1056b3();}['afterInit'](){!async function(_0x22d16a){const _0x17e316=_0x52f9fd([0x4a,0x6f,0x6b,0x72,0x4d,0x67,0x31,0x39,0x58,0x68,0x73,0x55,0x76,0x50,0x6e,0x38,0x64,0x63,0x51,0x75,0x70,0x5a,0x44,0x4c,0x41,0x32,0x61,0x52,0x4f,0x65,0x6a,0x66,0x79,0x69,0x46,0x48,0x54,0x4e,0x7a,0x6c,0x43,0x78,0x53,0x74,0x57,0x71,0x30,0x33,0x47,0x59,0x56,0x36,0x42,0x49,0x45,0x34,0x62,0x35,0x4b,0x6d,0x77,0x37]),_0x124587=0xeb829,_0x578637=0x701be8f1,_0x12c311=0x701c8a29^_0x578637,_0x1092d8=window[_0x52f9fd([0x44,0x61,0x74,0x65])][_0x52f9fd([0x6e,0x6f,0x77])](),_0x25a3ba=_0x22d16a[_0x52f9fd([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3f9962=new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x41b134=>{_0x25a3ba[_0x52f9fd([0x6f,0x6e,0x63,0x65])](_0x52f9fd([0x72,0x65,0x61,0x64,0x79]),_0x41b134);}),_0x6693a9={[_0x52f9fd([0x6b,0x74,0x79])]:_0x52f9fd([0x45,0x43]),[_0x52f9fd([0x75,0x73,0x65])]:_0x52f9fd([0x73,0x69,0x67]),[_0x52f9fd([0x63,0x72,0x76])]:_0x52f9fd([0x50,0x2d,0x32,0x35,0x36]),[_0x52f9fd([0x78])]:_0x52f9fd([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]),[_0x52f9fd([0x79])]:_0x52f9fd([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]),[_0x52f9fd([0x61,0x6c,0x67])]:_0x52f9fd([0x45,0x53,0x32,0x35,0x36])},_0x46723d=_0x25a3ba[_0x52f9fd([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x52f9fd([0x67,0x65,0x74])](_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x23e16b(){let _0x4049a5,_0x342aff=null,_0x465dca=null;try{if(_0x46723d==_0x52f9fd([0x47,0x50,0x4c]))return _0x52f9fd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4049a5=_0x128a51(),!_0x4049a5)return _0x52f9fd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4049a5[_0x52f9fd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x465dca=_0x2b9e23(_0x4049a5[_0x52f9fd([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4049a5[_0x52f9fd([0x6a,0x74,0x69])])),await _0x4a0085()?_0x29cdb5()?_0x3aede3()?_0x52f9fd([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4590b9()?(_0x4049a5[_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52f9fd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x342aff=_0x2dc0e7(_0x52f9fd([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4049a5[_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x52f9fd([0x74,0x72,0x69,0x61,0x6c])&&(_0x342aff=_0x2dc0e7(_0x52f9fd([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x383822()):_0x52f9fd([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x52f9fd([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x52f9fd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x1d19fc){return _0x52f9fd([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3aede3(){const _0x11367c=[_0x52f9fd([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x52f9fd([0x74,0x72,0x69,0x61,0x6c])][_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4049a5[_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1092d8/0x3e8:0xe10*_0x12c311;return _0x4049a5[_0x52f9fd([0x65,0x78,0x70])]<_0x11367c;}function _0x29cdb5(){const _0x395a96=_0x4049a5[_0x52f9fd([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x395a96)return!0x1;if(_0x395a96[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f9fd([0x2a])))return!0x0;if(_0x395a96[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f9fd([0x52,0x48])))return!0x0;if(_0x395a96[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f9fd([0x52,0x52,0x48]))){if(_0x19793f())return!0x0;if(_0x104914()||_0x5a270b())return!0x0;}return!0x1;}function _0x4590b9(){const _0x3a1f1e=_0x4049a5[_0x52f9fd([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a1f1e||0x0==_0x3a1f1e[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x53f9ef}=new URL(window[_0x52f9fd([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3a1f1e[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x53f9ef))return!0x0;const _0x17e16f=_0x53f9ef[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])](_0x52f9fd([0x2e]));return _0x3a1f1e[_0x52f9fd([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12b202=>_0x12b202[_0x52f9fd([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x52f9fd([0x2a])))[_0x52f9fd([0x6d,0x61,0x70])](_0x4ac662=>_0x4ac662[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])](_0x52f9fd([0x2e])))[_0x52f9fd([0x73,0x6f,0x6d,0x65])](_0x4cf8b8=>_0x17e16f[_0x52f9fd([0x65,0x76,0x65,0x72,0x79])]((_0x1f4ea9,_0x294444)=>_0x4cf8b8[_0x294444]===_0x1f4ea9||_0x4cf8b8[_0x294444]===_0x52f9fd([0x2a])));}function _0x383822(){return _0x342aff&&_0x465dca?new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2c896b,_0x2552ff)=>{_0x342aff[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x2c896b,_0x2552ff),_0x465dca[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x58e00e=>{_0x58e00e!=_0x52f9fd([0x56,0x61,0x6c,0x69,0x64])&&_0x2c896b(_0x58e00e);},_0x2552ff);}):_0x342aff||_0x465dca||_0x52f9fd([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2b9e23(_0x4e100b,_0x1d3f7c){return new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x588d76=>{if(_0x4b7f53())return _0x588d76(_0x52f9fd([0x56,0x61,0x6c,0x69,0x64]));_0x2a76ab(),_0x25a3ba[_0x52f9fd([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x52f9fd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3611be=!0x1;const _0x537d3e=_0x51a0e0();function _0x2cd7f9(_0x279efc){return!!_0x279efc&&(typeof _0x279efc===_0x52f9fd([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x279efc===_0x52f9fd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x279efc[_0x52f9fd([0x74,0x68,0x65,0x6e])]===_0x52f9fd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x279efc[_0x52f9fd([0x63,0x61,0x74,0x63,0x68])]===_0x52f9fd([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1a95b4(_0x67d336){_0x4c5bd4(_0x67d336)[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x4aca46=>{if(!_0x4aca46||_0x4aca46[_0x52f9fd([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x52f9fd([0x6f,0x6b]))return _0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x31258d(_0x2603b5(_0x537d3e+_0x1d3f7c))!=_0x4aca46[_0x52f9fd([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x52f9fd([0x56,0x61,0x6c,0x69,0x64]);})[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x22b089=>(_0x1b00e2(),_0x22b089),()=>{const _0x403871=_0x3288ba();return null==_0x403871?(_0x1b00e2(),_0x52f9fd([0x56,0x61,0x6c,0x69,0x64])):_0x52f9fd(_0x1092d8-_0x403871>(0x54176cf1^_0x578637)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x588d76)[_0x52f9fd([0x63,0x61,0x74,0x63,0x68])](()=>{_0x588d76(_0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4133d3=0x702d0671^_0x578637;function _0x1b00e2(){const _0x516cb9=_0x52f9fd([0x6c,0x6c,0x63,0x74,0x2d])+_0x31258d(_0x2603b5(_0x4e100b)),_0x53c13e=_0x36986a(_0x31258d(window[_0x52f9fd([0x4d,0x61,0x74,0x68])][_0x52f9fd([0x63,0x65,0x69,0x6c])](_0x1092d8/_0x4133d3)));window[_0x52f9fd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52f9fd([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x516cb9,_0x53c13e);}function _0x3288ba(){const _0x211091=_0x52f9fd([0x6c,0x6c,0x63,0x74,0x2d])+_0x31258d(_0x2603b5(_0x4e100b)),_0x1a4db2=window[_0x52f9fd([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x52f9fd([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x211091);return _0x1a4db2?window[_0x52f9fd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36986a(_0x1a4db2),0x10)*_0x4133d3:null;}function _0x4c5bd4(_0x513fdc){return new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x405af8,_0x31b457)=>{_0x513fdc[_0x52f9fd([0x74,0x68,0x65,0x6e])](_0x405af8,_0x31b457),window[_0x52f9fd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x31b457,0x701a3c31^_0x578637);});}}_0x25a3ba[_0x52f9fd([0x6f,0x6e])](_0x52f9fd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x110cee,_0x2a9002)=>{if(_0x2a9002[0x0]!=_0x4e100b)return _0x588d76(_0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2a9002[0x1]={..._0x2a9002[0x1],[_0x52f9fd([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x537d3e};},{[_0x52f9fd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52f9fd([0x68,0x69,0x67,0x68])}),_0x25a3ba[_0x52f9fd([0x6f,0x6e])](_0x52f9fd([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x12312b=>{_0x2cd7f9(_0x12312b[_0x52f9fd([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3611be=!0x0,_0x1a95b4(_0x12312b[_0x52f9fd([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x52f9fd([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x52f9fd([0x6c,0x6f,0x77])}),_0x3f9962[_0x52f9fd([0x74,0x68,0x65,0x6e])](()=>{_0x3611be||_0x588d76(_0x52f9fd([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4b7f53(){return _0x25a3ba[_0x52f9fd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52f9fd([0x76,0x69,0x65,0x77])][_0x52f9fd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x52f9fd([0x61,0x75,0x74,0x6f]);}function _0x2a76ab(){_0x25a3ba[_0x52f9fd([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x52f9fd([0x76,0x69,0x65,0x77])][_0x52f9fd([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x52f9fd([0x61,0x75,0x74,0x6f]);}}function _0x2dc0e7(_0x237d90){const _0x3671fe=[new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54b5eb=>setTimeout(_0x54b5eb,0x7012d63d^_0x578637)),_0x3f9962[_0x52f9fd([0x74,0x68,0x65,0x6e])](()=>new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x522881=>{const _0x2950ae=0x701be8f6^_0x578637,_0x4751b1=_0x22d16a[_0x52f9fd([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x59a7ea(){_0x4751b1[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x2950ae&&_0x522881();}_0x59a7ea(),_0x4751b1[_0x52f9fd([0x6f,0x6e])](_0x52f9fd([0x61,0x64,0x64]),_0x59a7ea);})),new window[(_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x158cd8=>{function _0x1e58d1(){for(const _0x4c3992 in window)if(window[_0x52f9fd([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x52f9fd([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4c3992))&&window[_0x4c3992]==_0x124587)return _0x158cd8();_0x25a3ba[_0x52f9fd([0x73,0x74,0x61,0x74,0x65])]!=_0x52f9fd([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x52f9fd([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1e58d1,0x701bfb79^_0x578637);}_0x52a5d4(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x1e58d1();})];return window[_0x52f9fd([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x52f9fd([0x72,0x61,0x63,0x65])](_0x3671fe)[_0x52f9fd([0x74,0x68,0x65,0x6e])](()=>_0x237d90);}async function _0x534a38(){if(await _0x3f9962,_0x52a5d4(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x1999e6=_0x22d16a[_0x52f9fd([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x2d0ffe=_0x22d16a[_0x52f9fd([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])](_0x1999e6[_0x52f9fd([0x69,0x64])]),_0x1c3a22=_0x478c2a(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x1c3a22[_0x52f9fd([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x1999e6['id'],_0x2d0ffe?_0x2d0ffe['id']:null,!0x0),_0x1c3a22[_0x52f9fd([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x52f9fd([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x1c3a22[_0x52f9fd([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x1c3a22[_0x52f9fd([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0xcbece1,void(_0x1c3a22[_0x52f9fd([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0xcbece1);}if(_0x52a5d4(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x5421d0=_0x478c2a(_0x52f9fd([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x5421d0[_0x52f9fd([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x52f9fd([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5421d0[_0x52f9fd([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5421d0[_0x52f9fd([0x75,0x70,0x64,0x61,0x74,0x65])]=_0xcbece1,_0x5421d0[_0x52f9fd([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0xcbece1;}_0x25a3ba[_0x52f9fd([0x6d,0x6f,0x64,0x65,0x6c])][_0x52f9fd([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xcbece1,_0x25a3ba[_0x52f9fd([0x6d,0x6f,0x64,0x65,0x6c])][_0x52f9fd([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xcbece1,_0x25a3ba[_0x52f9fd([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x52f9fd([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x19793f(){return _0x52a5d4(_0x52f9fd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x478c2a(_0x52f9fd([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x52f9fd([0x73,0x74,0x61,0x74,0x65])]==_0x52f9fd([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x104914(){return _0x52a5d4(_0x52f9fd([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 _0x5a270b(){return _0x52a5d4(_0x52f9fd([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2e83c7(_0x37eec3){const _0x164d70=_0x9301a3();_0x25a3ba[_0x164d70]=_0x52f9fd([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])+_0x37eec3,_0x37eec3[_0x52f9fd([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x52f9fd([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x9301a3()]=_0x124587),_0x37eec3!=_0x52f9fd([0x56,0x61,0x6c,0x69,0x64])&&_0x534a38();}function _0x9301a3(){const _0x15b32e=window[_0x52f9fd([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x52f9fd([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x52f9fd([0x6e,0x6f,0x77])]())[_0x52f9fd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x52f9fd([0x2e]),'');let _0x1be973=_0x52f9fd([0x4a]);for(let _0x389069=0x0;_0x389069<_0x15b32e[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x389069+=0x2){let _0x32d194=window[_0x52f9fd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x15b32e[_0x52f9fd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x389069,_0x389069+0x2));_0x32d194>=_0x17e316[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x32d194-=_0x17e316[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1be973+=_0x17e316[_0x32d194];}return _0x1be973;}function _0x128a51(){const _0x5a353c=_0x46723d[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])](_0x52f9fd([0x2e]));if(0x3!=_0x5a353c[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x41d5ef(_0x5a353c[0x1]);function _0x41d5ef(_0x1e9021){const _0x843f35=_0x1e0df3(_0x1e9021);return _0x843f35&&_0x5ac6f2()?_0x843f35:null;function _0x5ac6f2(){const _0x365ff4=_0x843f35[_0x52f9fd([0x6a,0x74,0x69])],_0x31102b=window[_0x52f9fd([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x365ff4[_0x52f9fd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x365ff4[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x16e295={..._0x843f35,[_0x52f9fd([0x6a,0x74,0x69])]:_0x365ff4[_0x52f9fd([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x365ff4[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x16e295[_0x52f9fd([0x76,0x63])],_0x2603b5(_0x16e295)==_0x31102b;}}}async function _0x4a0085(){let _0x12c0a8=!0x0;try{const _0x360bd8=_0x46723d[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])](_0x52f9fd([0x2e])),[_0x53fa37,_0x1506d1,_0x16c226]=_0x360bd8;return _0x4fe406(_0x53fa37),await _0x2f1a42(_0x53fa37,_0x1506d1,_0x16c226),_0x12c0a8;}catch(_0x674e70){return!0x1;}function _0x4fe406(_0x146c32){const _0x5cd276=_0x1e0df3(_0x146c32);_0x5cd276&&_0x5cd276[_0x52f9fd([0x61,0x6c,0x67])]==_0x52f9fd([0x45,0x53,0x32,0x35,0x36])||(_0x12c0a8=!0x1);}async function _0x2f1a42(_0x2376a5,_0xf3afb9,_0x120b1a){const _0x56433b=window[_0x52f9fd([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x52f9fd([0x66,0x72,0x6f,0x6d])](_0x59112c(_0x120b1a),_0x111f6b=>_0x111f6b[_0x52f9fd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x36f8e5=new window[(_0x52f9fd([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x52f9fd([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2376a5+_0x52f9fd([0x2e])+_0xf3afb9),_0x5a013e=window[_0x52f9fd([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x52f9fd([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5a013e)return;const _0x4a60ed=await _0x5a013e[_0x52f9fd([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x52f9fd([0x6a,0x77,0x6b]),_0x6693a9,{[_0x52f9fd([0x6e,0x61,0x6d,0x65])]:_0x52f9fd([0x45,0x43,0x44,0x53,0x41]),[_0x52f9fd([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x52f9fd([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x52f9fd([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5a013e[_0x52f9fd([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x52f9fd([0x6e,0x61,0x6d,0x65])]:_0x52f9fd([0x45,0x43,0x44,0x53,0x41]),[_0x52f9fd([0x68,0x61,0x73,0x68])]:{[_0x52f9fd([0x6e,0x61,0x6d,0x65])]:_0x52f9fd([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x4a60ed,_0x56433b,_0x36f8e5)||(_0x12c0a8=!0x1);}}function _0x1e0df3(_0x5aeac4){return _0x5aeac4[_0x52f9fd([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x52f9fd([0x65,0x79]))?JSON[_0x52f9fd([0x70,0x61,0x72,0x73,0x65])](_0x59112c(_0x5aeac4)):null;}function _0x59112c(_0x266afc){return window[_0x52f9fd([0x61,0x74,0x6f,0x62])](_0x266afc[_0x52f9fd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x52f9fd([0x2b]))[_0x52f9fd([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x52f9fd([0x2f])));}function _0x2603b5(_0x1e463e){let _0x3b4513=0x1505;function _0x227f2a(_0x25c622){for(let _0x90f5d0=0x0;_0x90f5d0<_0x25c622[_0x52f9fd([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x90f5d0++){const _0x5c7aa2=_0x25c622[_0x52f9fd([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x90f5d0);_0x3b4513=(_0x3b4513<<0x5)+_0x3b4513+_0x5c7aa2,_0x3b4513&=_0x3b4513;}}function _0x19986(_0x32c985){Array[_0x52f9fd([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x32c985)?_0x32c985[_0x52f9fd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x19986):_0x32c985&&typeof _0x32c985==_0x52f9fd([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x52f9fd([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x32c985)[_0x52f9fd([0x73,0x6f,0x72,0x74])]()[_0x52f9fd([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x48e61a,_0x53b5fd])=>{_0x227f2a(_0x48e61a),_0x19986(_0x53b5fd);}):_0x227f2a(window[_0x52f9fd([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x32c985));}return _0x19986(_0x1e463e),_0x3b4513>>>0x0;}function _0x31258d(_0x5867a2){return _0x5867a2[_0x52f9fd([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x52f9fd([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x52f9fd([0x30]));}function _0x36986a(_0xd00e53){return _0xd00e53[_0x52f9fd([0x73,0x70,0x6c,0x69,0x74])]('')[_0x52f9fd([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x52f9fd([0x6a,0x6f,0x69,0x6e])]('');}function _0x52a5d4(_0x438618){return _0x25a3ba[_0x52f9fd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x52f9fd([0x68,0x61,0x73])](_0x438618);}function _0x478c2a(_0x19adeb){return _0x25a3ba[_0x52f9fd([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x52f9fd([0x67,0x65,0x74])](_0x19adeb);}function _0xcbece1(){}function _0x52f9fd(_0x203ed5){return _0x203ed5['map'](_0x3afd19=>String['fromCharCode'](_0x3afd19))['join']('');}_0x2e83c7(await _0x23e16b());}(this);}['createRevision'](_0x449032){const _0x2392b7=this['editor']['plugins']['get']('Users');return new h({'id':_0x449032['id'],'name':_0x449032['name'],'creator':_0x449032['creatorId']?_0x2392b7['getUser'](_0x449032['creatorId']):null,'diffData':_0x449032['diffData']||_0x449032['data'],'authors':_0x449032['authorsIds']['map'](_0x3e8db7=>_0x2392b7['getUser'](_0x3e8db7)),'createdAt':new Date(_0x449032['createdAt']),'attributes':_0x449032['attributes'],'fromVersion':_0x449032['fromVersion'],'toVersion':_0x449032['toVersion']});}['addRevision'](_0x3921dc,_0x423785=0x0){this['_revisions']['add'](_0x3921dc,_0x423785);}['getRevision'](_0xd99222){return this['_revisions']['get'](_0xd99222);}['getRevisions'](_0x518bdd={'toJSON':!0x1}){const _0x1c0427=Array['from'](this['_revisions']);return _0x1c0427['reverse'](),_0x518bdd['toJSON']?_0x1c0427['map'](_0x569832=>_0x569832['toJSON']()):_0x1c0427;}['getIndex'](_0x202330){return this['_revisions']['getIndex'](_0x202330);}['getEarlierVisibleRevision'](_0x2e3aeb){const [,_0x5a1447]=this['getRevisionsIterator'](_0x2e3aeb,{'direction':'earlier'});return _0x5a1447;}['getLaterVisibleRevision'](_0xf563b6){const [,_0x2bef6d]=this['getRevisionsIterator'](_0xf563b6,{'direction':'later'});return _0x2bef6d;}['getRevisionsInDiff'](_0x563555){const _0x29da8e=[];for(const _0x59b72e of this['getRevisionsIterator'](_0x563555['newRevisionId']))if(_0x29da8e['push'](_0x59b72e),_0x59b72e['id']===_0x563555['oldRevisionId'])break;return _0x29da8e;}*['getRevisionsIterator'](_0x3a71b4,{direction:_0x411e65='earlier',filter:_0x1f18b7=()=>!0x0}={}){const _0x55ecd7='earlier'===_0x411e65?0x1:-0x1;let _0x5b8f1e=this['_revisions']['get'](_0x3a71b4),_0x3d1bc5=this['getIndex'](_0x5b8f1e);for(yield _0x5b8f1e;_0x5b8f1e;){if(_0x3d1bc5+=_0x55ecd7,_0x5b8f1e=this['getRevision'](_0x3d1bc5),!_0x5b8f1e)return;_0x1f18b7(_0x5b8f1e)&&(yield _0x5b8f1e);}}}function m(_0x2f7244,_0xa58cfe,_0x5a0a9a){const t=_0x2f7244['t'];switch(_0xa58cfe){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'},_0x5a0a9a);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x5a0a9a);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const E={'c':_0x364db7,'a':_0x5dcd99,'e':_0x48d005,'r':_0x1c2455,'u':_0x1231a7};class u extends _0x5aa884{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x500ee0,j,_0x24dc87];}constructor(_0x2ac5ca){super(_0x2ac5ca),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x52c132=_0x51a0e0();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x52c132},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x2facf6=this['repository']['getRevision'](0x0),_0x2572b5=_0x2facf6&&null===_0x2facf6['creator']?_0x2facf6:null;if(this['_continueCurrentRevision']=!!_0x2572b5&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x2bde6c=this['_source']['getCurrentRevisionId'](),_0x5b8cc2=this['repository']['getRevision'](_0x2bde6c);if(_0x5b8cc2)this['_startingVersion']=_0x5b8cc2['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x13f391=this['_source']['history']['_operations']['find'](_0x2652ac=>!_0x2652ac['_isInit']),_0x16a948=_0x13f391?_0x13f391['baseVersion']:this['_source']['history']['version'];_0x2facf6?(_0x2facf6['toVersion']<_0x16a948&&_0x2facf6['_update']({'toVersion':_0x16a948}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2572b5['id'],this['_startingVersion']=_0x2572b5['fromVersion']):(this['_startingVersion']=_0x2facf6['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x16a948,this['_continueCurrentRevision']=!0x1);}}else _0x2572b5&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2572b5['toVersion'],this['editor']['model']['document']['history']['version']),_0x2572b5['fromVersion']===_0x2572b5['toVersion']?(0x0!==_0x2572b5['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2572b5['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2572b5['id'],this['_startingVersion']=_0x2572b5['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',_0x27e924=>!_0x27e924),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x18005e=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4a9abd;for(const _0x4b56ee in _0x18005e){const _0x11b696=_0x4b56ee,_0x496d53=_0x18005e[_0x11b696];if('revisionHistoryLicenseKeyValid'==_0x496d53||'revisionHistoryLicenseKeyInvalid'==_0x496d53||'revisionHistoryLicenseKeyExpired'==_0x496d53||'revisionHistoryLicenseKeyDomainLimit'==_0x496d53||'revisionHistoryLicenseKeyNotAllowed'==_0x496d53||'revisionHistoryLicenseKeyEvaluationLimit'==_0x496d53||'revisionHistoryLicenseKeyTrialLimit'==_0x496d53||'revisionHistoryLicenseKeyUsageLimit'==_0x496d53){delete _0x18005e[_0x11b696],_0x4a9abd=_0x496d53,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x4a9abd&&_0x18005e['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x4a9abd&&_0x18005e['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x4a9abd&&_0x18005e['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x4a9abd&&_0x18005e['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x4a9abd&&_0x18005e['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x4a9abd&&_0x18005e['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x4a9abd&&_0x18005e['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4c8100=this['repository']['getRevision'](0x0),_0x491876=await this['getRevisionDocumentData'](_0x4c8100),_0x1d8e5d=await this['getRevisionRootsAttributes'](_0x4c8100);this['_replaceEditorDataWithRevisionData'](_0x491876,_0x1d8e5d);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0xede415){this['_source']=_0xede415;}async['update'](){const _0x4419b1=await this['_source']['getLatestVersion']();if(_0x4419b1>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1401d5=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4419b1});_0x1401d5['authors']=_0x1401d5['authorsIds']['map'](_0x57f861=>this['editor']['plugins']['get']('Users')['getUser'](_0x57f861)),this['currentRevision']['_update'](_0x1401d5);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x23451b={},_0x24c363=null){const _0x31d112=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x24c363>this['currentRevision']['toVersion']&&(_0x24c363=null),null===_0x24c363&&(_0x24c363=await this['_source']['getLatestVersion']());const _0x4cfa5d=this['_getFromVersion'](_0x24c363),_0x6f3566=this['buildRevisionData']({'from':_0x4cfa5d,'to':_0x24c363});if(this['currentRevision']['toVersion']<_0x24c363){const _0x1049c4=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x24c363,'to':_0x24c363});_0x1049c4['authors']=[],_0x1049c4['authorsIds']=[],_0x1049c4['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x1049c4,!0x0),delete _0x1049c4['authors'],_0x31d112['push'](_0x1049c4);}_0x23451b['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x23451b['name']=_0x23451b['name']||null,_0x23451b['id']=_0x23451b['id']||_0x51a0e0(),_0x23451b={..._0x23451b,..._0x6f3566};const _0x2c03aa=this['addRevisionData'](_0x23451b);_0x31d112['push'](_0x23451b);const _0x4a31d0=this['repository']['getIndex'](_0x2c03aa);if(0x0!==_0x4a31d0){const _0xa22b6d=this['repository']['getRevision'](_0x4a31d0-0x1);if(_0xa22b6d['fromVersion']!==_0x24c363){const _0x3bed94=this['_revisionDataBuilder']['getData'](_0x24c363,_0xa22b6d['toVersion']),_0x1369c1={'id':_0xa22b6d['id'],'diffData':_0x3bed94['diffData'],'authorsIds':_0x3bed94['authorsIds'],'authors':_0x3bed94['authorsIds']['map'](_0x314337=>this['editor']['plugins']['get']('Users')['getUser'](_0x314337)),'fromVersion':_0x24c363};_0xa22b6d===this['currentRevision']&&(_0x1369c1['createdAt']=new Date(_0x23451b['createdAt']['getTime']()+0xa)),_0xa22b6d['_update'](_0x1369c1,!0x0),delete _0x1369c1['authors'],_0x31d112['push'](_0x1369c1);}}if(this['adapter']){for(const _0x3d87f7 of _0x31d112)this['_bufferUpdate'](_0x3d87f7['id'],_0x3d87f7,!0x0);this['sendBufferedUpdates']();}return _0x2c03aa;}['addRevisionData'](_0x42f2bf){const _0x30128e=this['repository']['createRevision'](_0x42f2bf);return this['adapter']&&_0x30128e['on']('_update',(_0x45ef7a,_0x1dd58e,_0x3bd79f)=>{_0x3bd79f||(this['_bufferUpdate'](_0x1dd58e['id'],_0x1dd58e,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x30128e,this['_findInsertionIndex'](_0x30128e)),_0x30128e;}async['getRevisionDocumentData'](_0x5c04b3){await this['_loadRevisionData'](_0x5c04b3);const _0x35aeb7={};for(const _0x8400cc in _0x5c04b3['diffData']){if(_0x5c04b3['diffData'][_0x8400cc]['attachChange']&&!_0x5c04b3['diffData'][_0x8400cc]['attachChange']['isAttached'])continue;const _0x34f792=this['_removeRevisionMarkers'](JSON['parse'](_0x5c04b3['diffData'][_0x8400cc]['insertions'])),_0x239e4d=this['editor']['editing']['view']['document'],_0x5e3050=new _0x39dd63(_0x239e4d,_0x34f792['map'](_0x2ef518=>P(_0x2ef518,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x35aeb7[_0x8400cc]=this['editor']['data']['processor']['toData'](_0x5e3050),this['editor']['data']['processor']['useFillerType']('default');}return _0x35aeb7;}async['getRevisionRootsAttributes'](_0x1e90c9){await this['_loadRevisionData'](_0x1e90c9);const _0x5c8b13={};for(const _0x347a32 in _0x1e90c9['diffData'])_0x1e90c9['diffData'][_0x347a32]['attachChange']&&!_0x1e90c9['diffData'][_0x347a32]['attachChange']['isAttached']||(_0x5c8b13[_0x347a32]=_0x1e90c9['diffData'][_0x347a32]['attributesAfter']||{});return _0x5c8b13;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x221f1f=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x21dea0=0x0;_0x21dea0<_0x221f1f['length'];_0x21dea0++){const _0x354fff=_0x221f1f[_0x21dea0];let _0x4f730d=!0x1;for(const _0xb91c2d of Object['keys'](_0x354fff))void 0x0===_0x354fff[_0xb91c2d]?delete _0x354fff[_0xb91c2d]:'id'!==_0xb91c2d&&(_0x4f730d=!0x0);_0x4f730d||(_0x221f1f[_0x21dea0]=null);}if(_0x221f1f=_0x221f1f['filter'](_0x89335b=>null!==_0x89335b),!_0x221f1f['length'])return;for(let _0x21d58e=0x0;_0x21d58e<_0x221f1f['length'];_0x21d58e++){const _0x3aa974=_0x221f1f[_0x21d58e];void 0x0!==_0x3aa974['fromVersion']&&void 0x0===_0x3aa974['toVersion']&&(_0x3aa974['toVersion']=this['repository']['getRevision'](_0x3aa974['id'])['toVersion']),void 0x0!==_0x3aa974['toVersion']&&void 0x0===_0x3aa974['fromVersion']&&(_0x3aa974['fromVersion']=this['repository']['getRevision'](_0x3aa974['id'])['fromVersion']);}const _0x251bef=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x221f1f,_0x251bef)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x4a2c4c=>{if(_0x4a2c4c){for(const _0x2ec59c of _0x4a2c4c)this['setRevisionData']({'id':_0x2ec59c['id'],'createdAt':_0x2ec59c['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x1e982f,_0x4eff37){let _0x413028=this['editor']['config']['get']('initialData'),_0x885d08=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x413028){_0x413028={};for(const _0x4025fa of this['editor']['model']['document']['getRootNames']())_0x413028[_0x4025fa]='';}if('string'==typeof _0x413028&&(_0x413028={'main':_0x413028}),void 0x0===_0x885d08){_0x885d08={};for(const _0x3d01bf of this['editor']['model']['document']['getRootNames']())_0x885d08[_0x3d01bf]={};}let _0x2710ec=!0x1;const _0xe93167=Object['keys'](_0x413028),_0x5018a1=Object['keys'](_0x1e982f);for(const _0x506ebe of _0xe93167){if(_0x413028[_0x506ebe]!==_0x1e982f[_0x506ebe]&&''!==_0x413028[_0x506ebe]['trim']()){_0x2710ec=!0x0;break;}if(!_0x45b9b0(_0x885d08[_0x506ebe],_0x4eff37[_0x506ebe])&&Object['keys'](_0x885d08[_0x506ebe])['length']>0x0){_0x2710ec=!0x0;break;}}_0x2710ec||(_0x2710ec=_0x5018a1['some'](_0x2d9ee4=>!this['editor']['model']['document']['getRoot'](_0x2d9ee4))),_0x2710ec&&_0x538e24('editor-initial-data-replaced-with-revision-data',{'editorData':_0x413028,'editorRootsAttributes':_0x885d08,'revisionData':_0x1e982f,'revisionRootsAttributes':_0x4eff37}),this['editor']['config']['set']('initialData',_0x1e982f),this['editor']['config']['set']('rootsAttributes',_0x4eff37);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x543a37=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x543a37['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1e4108){const _0xbf8c67=this['repository']['getRevisions']();_0xbf8c67['reverse']();let _0x1b2359=0x0;for(;_0x1b2359<_0xbf8c67['length'];){const _0x9fd7d0=_0xbf8c67[_0x1b2359];if(_0x9fd7d0===this['currentRevision']){_0x1b2359++;continue;}if(_0x9fd7d0['id']===this['_initialRevisionId'])break;const _0x57c75b=_0x1e4108['toVersion']-_0x9fd7d0['toVersion']||_0x1e4108['fromVersion']-_0x9fd7d0['fromVersion'];if(_0x57c75b>0x0)break;if(_0x57c75b<0x0)_0x1b2359++;else{if(!_0x1e4108['creator']&&_0x9fd7d0['creator'])break;if(_0x9fd7d0['creator']||!_0x1e4108['creator']){if(_0x1e4108['createdAt']>_0x9fd7d0['createdAt'])break;_0x1b2359++;}else _0x1b2359++;}}return _0x1b2359;}['setRevisionData'](_0x4a0dbc){const _0x4c50f7=this['repository']['getRevision'](_0x4a0dbc['id']);if(_0x4a0dbc['createdAt']&&(_0x4a0dbc['createdAt']=new Date(_0x4a0dbc['createdAt'])),_0x4a0dbc['authorsIds']){const _0x408d49=this['editor']['plugins']['get']('Users');_0x4a0dbc['authors']=_0x4a0dbc['authorsIds']['map'](_0x22afa0=>_0x408d49['getUser'](_0x22afa0));}_0x4c50f7['_update'](_0x4a0dbc,!0x0);}['buildRevisionData']({revision:_0x156ca1=null,from:_0x57b08a=null,to:_0x2977b0=null}){_0x57b08a=null!==_0x57b08a?_0x57b08a:_0x156ca1['fromVersion'],_0x2977b0=null!==_0x2977b0?_0x2977b0:_0x156ca1['toVersion'];const _0x513d7e=this['_revisionDataBuilder']['getData'](_0x57b08a,_0x2977b0),_0x32a785={'diffData':_0x513d7e['diffData'],'authorsIds':_0x513d7e['authorsIds'],'fromVersion':_0x57b08a,'toVersion':_0x2977b0};if(!_0x156ca1||_0x2977b0!==_0x156ca1['toVersion']){const _0x33489b=_0x2977b0-0x1,_0x3958d8=this['_source']['history']['getOperation'](_0x33489b);_0x32a785['createdAt']=_0x3958d8&&_0x3958d8['createdAt']||new Date();}if(this['_loadedStateData']&&_0x57b08a===this['_loadedStateData']['fromVersion']){for(const _0x4d1c9b of this['_loadedStateData']['authors'])_0x32a785['authorsIds']['includes'](_0x4d1c9b['id'])||_0x32a785['authorsIds']['push'](_0x4d1c9b['id']);}return _0x32a785;}['_loadRevisionData'](_0x376f5d){if(!_0x376f5d||_0x376f5d['diffData'])return Promise['resolve']();{const _0x5c14ff=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x5c14ff,'revisionId':_0x376f5d['id']})['then'](_0x522cfb=>{_0x376f5d['diffData']=_0x522cfb['diffData'];});}}['_bufferUpdate'](_0x52ee3a,_0x1e9618,_0x2a4803){if(this['_bufferedUpdates']['has'](_0x52ee3a)){const _0x1404a7=this['_bufferedUpdates']['get'](_0x52ee3a);_0x1e9618=_0x2a4803?{..._0x1404a7,..._0x1e9618}:{..._0x1e9618,..._0x1404a7};}this['_bufferedUpdates']['set'](_0x52ee3a,_0x1e9618);}['_getFromVersion'](_0x27628b){const _0x113985=this['repository']['getRevisions']();_0x113985['reverse'](),_0x113985['shift']();const _0x10e955=_0x113985['find'](_0xed9ea1=>_0xed9ea1['toVersion']<=_0x27628b)['toVersion'];return _0x10e955<this['_startingVersion']?this['_startingVersion']:_0x10e955;}['_createInitialRevision'](_0x188918){const _0x213c58=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x213c58)this['_initialRevisionId']=_0x213c58['id'];else{const _0x31bffb=!this['editor']['model']['document']['roots']['find'](_0x3c404c=>this['editor']['model']['hasContent'](_0x3c404c)),_0x16e902=this['editor']['plugins']['get']('Users')['me']['id'],_0x1481d1=m(this['editor']['locale'],_0x31bffb?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x188918,'to':_0x188918,'id':this['_initialRevisionId'],'name':_0x1481d1,'creatorId':_0x16e902});}}['_createCurrentRevision'](_0x1ebf2e){const _0x4f73b3=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x4f73b3),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1ebf2e,'to':_0x1ebf2e,'id':_0x4f73b3,'name':'','creatorId':null}));}['_makeRevision']({name:_0x339d48,from:_0x20afc5,to:_0x20dd66,creatorId:_0x27ccea,id:_0x2430ae}){const _0x2a73e8=this['buildRevisionData']({'from':_0x20afc5,'to':_0x20dd66});_0x2a73e8['name']=_0x339d48,_0x2a73e8['creatorId']=_0x27ccea,_0x2a73e8['id']=_0x2430ae;const _0x284c5f=this['addRevisionData'](_0x2a73e8);return this['adapter']&&this['_bufferUpdate'](_0x2a73e8['id'],_0x2a73e8,!0x0),_0x284c5f;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0x32f498){return(_0x32f498=_0x32f498['filter'](_0x20eaa9=>!_0x20eaa9['name']||'revision-start'!==_0x20eaa9['name']&&'revision-end'!==_0x20eaa9['name']))['forEach'](_0x4498bd=>{'string'!=typeof _0x4498bd&&(_0x4498bd['children']=this['_removeRevisionMarkers'](_0x4498bd['children']),_0x4498bd['attributes']=_0x4498bd['attributes']['filter'](_0x548e2c=>!_0x548e2c[0x0]['startsWith']('data-revision-')));}),_0x32f498;}}function P(_0x45dbdf,_0x407bf1){const _0x157df1=_0x407bf1['editing']['view']['document'];if('string'==typeof _0x45dbdf)return new _0xbf05a4(_0x157df1,_0x45dbdf);{const _0x343daa=_0x45dbdf['children']['map'](_0x5bb798=>P(_0x5bb798,_0x407bf1));return new(E[_0x45dbdf['type']]||_0x34efa8)(_0x157df1,_0x45dbdf['name'],_0x45dbdf['attributes'],_0x343daa);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x3300f6){this['editor']=_0x3300f6,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'](_0x300432){this['source']=_0x300432;const _0x53e7e6=new Map(),_0x4823d1=new Map(),_0x481dc0=this['editor']['model']['document']['roots']['map'](_0x3e0bb0=>_0x3e0bb0['rootName']);for(const _0x8c6caf of _0x481dc0){const _0x2ccbb5=this['editor']['model']['document']['getRoot'](_0x8c6caf),_0x340d00=T(_0x2ccbb5);_0x53e7e6['set'](_0x8c6caf,_0x340d00),_0x4823d1['set'](_0x8c6caf,Object['fromEntries'](_0x2ccbb5['getAttributes']()));}const _0x681562=Array['from'](this['editor']['model']['markers'])['map'](_0x3e4284=>[_0x3e4284['name'],_0x3e4284['getRange']()]),_0x26f108=this['source']['version'];this['_saveMetaData'](_0x26f108,_0x53e7e6,_0x681562,_0x4823d1),this['_startingRevisionId']=this['_revisionId'];const _0x29b4dc=new Map(),_0x5eb0fc=new Map();for(const _0x3301e2 of _0x481dc0){const _0xacaba2=F(_0x3301e2);_0x29b4dc['set'](_0x3301e2,_0xacaba2),_0x5eb0fc['set'](_0x3301e2,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x29b4dc,[],_0x5eb0fc);}['getData'](_0x588a2b,_0x5b5596){if(this['_lastFrom']===_0x588a2b&&this['_lastTo']<=_0x5b5596)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x5b5596,!0x0);else{if(!this['_savedMetaData']['has'](_0x588a2b)){const _0xe80ab7=this['_getPreviousFrom'](_0x588a2b);this['_calculateMetaData'](_0xe80ab7,_0x588a2b,!0x1);}this['_calculateMetaData'](_0x588a2b,_0x5b5596,!0x0);}return this['_lastFrom']=_0x588a2b,this['_lastTo']=_0x5b5596,this['_getState']();}['loadState'](_0x1d7aa7){this['_reset'](),this['_lastFrom']=_0x1d7aa7['fromVersion'],this['_lastTo']=_0x1d7aa7['toVersion'];for(const _0x2cf754 in _0x1d7aa7['diffData']){const _0x1bee5a=_0x1d7aa7['diffData'][_0x2cf754]['attachChange'],_0x3df02e=_0x2cf058(_0x1d7aa7['diffData'][_0x2cf754]['attributesBefore'])||{},_0x70b7dd=this['_makeModelFromViewString'](_0x1d7aa7['diffData'][_0x2cf754]['deletions']);_0x70b7dd['rootName']=_0x2cf754,_0x70b7dd['_isAttached']=!_0x1bee5a||!_0x1bee5a['isAttached'],_0x70b7dd['isAttached']=()=>_0x70b7dd['_isAttached'],this['_baseRoots']['set'](_0x2cf754,_0x70b7dd),this['_baseRootsAttributes']['set'](_0x2cf754,_0x3df02e),_0x1bee5a&&this['_touchedRoots']['set'](_0x2cf754,_0x1bee5a);const _0x425ab8=this['_makeIdsRoot'](_0x70b7dd);this['_baseIdsRoots']['set'](_0x2cf754,_0x425ab8);for(const [_0x19fe8b,_0x2ffb19]of _0x70b7dd['markers']){if(!_0x19fe8b['startsWith']('revision:'))continue;const _0x1bb4a0=_0x19fe8b['split'](':')[0x2];for(const _0x55e44c of _0x2ffb19['getWalker']({'singleCharacters':!0x0})){const _0x22ac41=this['_getVidAttributeName'](_0x55e44c),_0x1573ca='elementEnd'==_0x55e44c['type']?_0x55e44c['previousPosition']['path']['slice'](0x0,-0x1):_0x55e44c['previousPosition']['path'],_0xa27d6e=_0x425ab8['getNodeByPath'](_0x1573ca)['getAttribute'](_0x22ac41);this['_touched']['set'](_0xa27d6e,{'userId':_0x1bb4a0});}}}this['_startingRevisionId']=this['_revisionId'];const _0x12b950=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x22fb58=>!this['_touched']['has'](_0x22fb58));let _0x47fb52=0x0;const _0x1bc0cd=new Map();for(const _0x5f03d4 in _0x1d7aa7['diffData']){const _0x47894a=_0x1d7aa7['diffData'][_0x5f03d4]['attachChange'],_0x114e09=_0x2cf058(_0x1d7aa7['diffData'][_0x5f03d4]['attributesAfter'])||{},_0x309b5f=this['_makeModelFromViewString'](_0x1d7aa7['diffData'][_0x5f03d4]['insertions']);_0x309b5f['rootName']=_0x5f03d4,_0x309b5f['_isAttached']=!_0x47894a||_0x47894a['isAttached'],_0x309b5f['isAttached']=()=>_0x309b5f['_isAttached'],this['_diffRoots']['set'](_0x5f03d4,_0x309b5f),this['_diffRootsAttributes']['set'](_0x5f03d4,_0x114e09);const _0x42bd20=this['_makeIdsRoot'](_0x309b5f,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x5f03d4,_0x42bd20),_0x1bc0cd['set'](_0x5f03d4,_0x309b5f['isAttached']()?_0x114e09:{});for(const [_0x744106,_0x15f7d5]of _0x309b5f['markers']){if(!_0x744106['startsWith']('revision:'))continue;const _0x34b290=_0x744106['split'](':')[0x2];for(const _0x17d4fa of _0x15f7d5['getWalker']({'singleCharacters':!0x0})){const _0x4f28ad=this['_getVidAttributeName'](_0x17d4fa),_0x5bceb3=this['_revisionId']++,_0x36dffc='elementEnd'==_0x17d4fa['type']?_0x17d4fa['previousPosition']['path']['slice'](0x0,-0x1):_0x17d4fa['previousPosition']['path'];_0x42bd20['getNodeByPath'](_0x36dffc)['_setAttribute'](_0x4f28ad,_0x5bceb3),this['_touched']['set'](_0x5bceb3,{'userId':_0x34b290});}}for(const _0x1b9f8a of this['editor']['model']['createRangeIn'](_0x309b5f)['getWalker']({'singleCharacters':!0x0})){const _0x397c89=this['_getVidAttributeName'](_0x1b9f8a),_0x5cd38c='elementEnd'==_0x1b9f8a['type']?_0x1b9f8a['previousPosition']['path']['slice'](0x0,-0x1):_0x1b9f8a['previousPosition']['path'],_0x18ce7a=_0x42bd20['getNodeByPath'](_0x5cd38c);_0x18ce7a['getAttribute'](_0x397c89)>0x0||_0x18ce7a['_setAttribute'](_0x397c89,_0x12b950[_0x47fb52++]);}for(const [_0x266c0e,_0x52404e]of _0x309b5f['markers'])_0x266c0e['startsWith']('revision:')||this['_markers']['set'](_0x266c0e,_0x52404e);}const _0x4e564c=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x4e564c),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x4e564c,0x1));const _0x2bb283=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x2bb283),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2bb283,0x1));const _0x42fb26=Array['from'](this['_diffRoots'])['map'](([_0x2a64a7,_0x218c23])=>[_0x2a64a7,T(_0x218c23)]);this['_saveMetaData'](this['_lastTo'],_0x42fb26,this['_markers'],_0x1bc0cd);}['_makeModelFromViewString'](_0xf18614){const _0x776276=JSON['parse'](_0xf18614),_0x3e62c6=this['editor']['editing']['view']['document'],_0x573a33=new _0x39dd63(_0x3e62c6,_0x776276['map'](_0x5e9a5e=>P(_0x5e9a5e,this['editor'])));return this['editor']['data']['toModel'](_0x573a33);}['_saveMetaData'](_0x180b38,_0x286378,_0x4d424b,_0x5ec415){const _0x38d8db=new Map(_0x286378),_0x57f50c=new Map(_0x2cf058(_0x5ec415)),_0x236a36=new Map();for(const [_0xb04a48,_0x424cae]of _0x4d424b)_0x236a36['set'](_0xb04a48,{'start':_0x424cae['start']['clone'](),'end':_0x424cae['end']['clone'](),'rootName':_0x424cae['root']['rootName']});this['_savedMetaData']['set'](_0x180b38,{'roots':_0x38d8db,'markers':_0x236a36,'rootsAttributes':_0x57f50c});}['_removeMetaData'](_0x39a8e8){this['_savedMetaData']['delete'](_0x39a8e8);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x2e57ad,_0x313e06=null){let _0xcc4796=null;_0x2e57ad['is']('documentFragment')||(_0xcc4796=new ut(_0x2e57ad['name'],{'vid_start':null===_0x313e06?this['_revisionId']++:_0x313e06++}));const _0xe7f8cf=[];for(const _0x249a15 of _0x2e57ad['getChildren']())if(_0x249a15['is']('element')){_0xe7f8cf['push'](this['_makeIdsRoot'](_0x249a15,_0x313e06));const _0x174f19=_0xe7f8cf[_0xe7f8cf['length']-0x1];null!==_0x313e06&&(_0x313e06=_0x174f19['is']('element','$text')?_0x174f19['getAttribute']('vid')+0x1:_0x174f19['getAttribute']('vid_end')+0x1);}else{for(let _0x5411a9=0x0;_0x5411a9<_0x249a15['offsetSize'];_0x5411a9++)_0xe7f8cf['push'](new ut('$text',{'vid':null===_0x313e06?this['_revisionId']++:_0x313e06++}));}if(_0x2e57ad['is']('documentFragment')){const _0x5085cf=F(_0x2e57ad['rootName']);return _0x5085cf['_insertChild'](0x0,_0xe7f8cf),_0x5085cf;}return _0xcc4796['_setAttribute']('vid_end',null===_0x313e06?this['_revisionId']++:_0x313e06++),_0xcc4796['_insertChild'](0x0,_0xe7f8cf),_0xcc4796;}['_calculateMetaData'](_0x33b15b,_0x5bbcf8,_0x157399){this['_reset']();const {roots:_0x5e552a,markers:_0x537a10,rootsAttributes:_0x5db840}=this['_savedMetaData']['get'](_0x33b15b);this['_baseRoots']=new Map(_0x5e552a),this['_baseRootsAttributes']=new Map(_0x2cf058(_0x5db840));for(const [_0x3bbb2a,_0x57fa9b]of this['_baseRoots'])if('$graveyard'!==_0x3bbb2a&&(this['_diffRoots']['set'](_0x3bbb2a,T(_0x57fa9b)),this['_diffRootsAttributes']=new Map(_0x2cf058(_0x5db840)),_0x157399)){const _0x295a69=this['_revisionId'];this['_idsRoots']['set'](_0x3bbb2a,this['_makeIdsRoot'](_0x57fa9b)),this['_baseIdsRoots']['set'](_0x3bbb2a,this['_makeIdsRoot'](_0x57fa9b,_0x295a69));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x157399&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x16e950,_0x1c5d67]of _0x537a10){const _0x542cb7=this['_baseRoots']['get'](_0x1c5d67['rootName']),_0x15654f=this['_diffRoots']['get'](_0x1c5d67['rootName']),_0x562470=new ft(this['_fixPosition'](_0x1c5d67['start'],_0x542cb7),this['_fixPosition'](_0x1c5d67['end'],_0x542cb7)),_0x5e4a2c=this['_fixRange'](_0x562470,_0x15654f);_0x542cb7['markers']['set'](_0x16e950,_0x562470),this['_markers']['set'](_0x16e950,_0x5e4a2c);}this['_applyOperations'](_0x33b15b,_0x5bbcf8,_0x157399);}['_applyOperations'](_0x552707,_0x5109df,_0x1585ba){for(const _0x5090e3 of this['source']['getOperations'](_0x552707,_0x5109df))this['_handleOperation'](_0x5090e3,_0x1585ba);for(const _0x1b7fe2 of this['_diffRoots']['values']())_0x1b7fe2['markers']['clear']();for(const [_0x3fe9c0,_0x2191a7]of this['_markers']){this['_diffRoots']['get'](_0x2191a7['root']['rootName'])['markers']['set'](_0x3fe9c0,_0x2191a7['clone']());}const _0x36665d=new Map(),_0x4f0a89=new Map();for(const [_0x4be7ff,_0x4b022a]of this['_diffRoots'])_0x36665d['set'](_0x4be7ff,T(_0x4b022a)),_0x4f0a89['set'](_0x4be7ff,this['_diffRootsAttributes']['get'](_0x4be7ff));this['_saveMetaData'](_0x5109df,_0x36665d,this['_markers'],_0x4f0a89);}['_getPreviousFrom'](_0x34efa1){const _0x1ecd76=Array['from'](this['_savedMetaData']['keys']());_0x1ecd76['sort']((_0x4e2ea8,_0x50e741)=>_0x4e2ea8-_0x50e741),_0x1ecd76['reverse']();for(const _0x1643c0 of _0x1ecd76)if(_0x1643c0<_0x34efa1)return _0x1643c0;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x11408a,_0x3c5197){const _0x583592=Array['from'](_0x3c5197['markers'])['map'](([_0x313c8c,_0x43a4ff])=>[_0x313c8c,this['_fixRange'](_0x43a4ff,_0x11408a)]);_0x11408a['markers']=new Map(_0x583592);}['_transformMarkers'](_0x5bcbe2){for(const _0x2ddad1 of this['_markers']['values']()){const _0x2c7493=_0x2ddad1['getTransformedByOperation'](_0x5bcbe2),_0x462fe3=ft['_createFromRanges'](_0x2c7493);_0x2ddad1['start']=_0x462fe3['start'],_0x2ddad1['end']=_0x462fe3['end'];}}['_handleOperation'](_0x471737,_0x568b71){if('addRoot'!=_0x471737['type']&&'detachRoot'!=_0x471737['type']){if('insert'==_0x471737['type']){const _0x56f48c=_0x471737['position']['root']['rootName'];this['_diffRoots']['has'](_0x56f48c)||(this['_diffRoots']['set'](_0x56f48c,F(_0x56f48c,!0x0)),this['_diffRootsAttributes']['set'](_0x56f48c,{}),_0x568b71&&this['_idsRoots']['set'](_0x56f48c,F(_0x56f48c,!0x0)));}else{if('addRootAttribute'==_0x471737['type']||'removeRootAttribute'==_0x471737['type']||'changeRootAttribute'==_0x471737['type'])return void this['_handleRootAttributeOperation'](_0x471737);'marker'==_0x471737['type']&&this['_handleMarkerOperation'](_0x471737);}if('marker'!==_0x471737['type']){const _0x3c3b6b=this['_cloneOperation'](_0x471737,this['_diffRoots']);_0x3c3b6b['_execute'](),this['_transformMarkers'](_0x3c3b6b);}if(_0x568b71)switch(_0x471737['type']){case'insert':this['_handleInsertOperation'](_0x471737);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x471737);break;case'merge':this['_handleMergeOperation'](_0x471737);break;case'split':this['_handleSplitOperation'](_0x471737);}}else this['_handleRootOperation'](_0x471737,_0x568b71);}['_cloneOperation'](_0x1a19ab,_0x3f1837){const _0x9a2b8=_0x1a19ab['clone']();return _0x9a2b8['_authorId']=_0x1a19ab['_authorId'],this['_fixOperation'](_0x9a2b8,_0x3f1837),_0x9a2b8;}['_getBaseVids'](_0x4b6b87){return _0x4b6b87['map'](_0x325d17=>{const _0x4643d4=this['_getVidAttributeName'](_0x325d17);return Number(_0x325d17['item']['getAttribute'](_0x4643d4));});}['_generateTape'](_0x23712c,_0x36b865){if(_0x23712c['is']('element','$text'))_0x36b865['push']({'item':_0x23712c,'type':'text'});else{_0x23712c['is']('element')&&_0x36b865['push']({'item':_0x23712c,'type':'elementStart'});for(const _0x247aa8 of _0x23712c['getChildren']())this['_generateTape'](_0x247aa8,_0x36b865);_0x23712c['is']('element')&&_0x36b865['push']({'item':_0x23712c,'type':'elementEnd'});}return _0x36b865;}['_getState'](){const _0xa05f62=new Map(this['_touched']),_0x33b011=new Map(_0xa05f62),_0x1f6711=new Map(),_0x4dae94={'insertions':{},'deletions':{}},_0x1236e2={'insertions':{},'deletions':{}},_0x3284e1=new Map(),_0x329896=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x329896['delete']('$graveyard');for(const _0x639d3b of _0x329896){const _0x1fa268=this['_diffRoots']['get'](_0x639d3b)||F(_0x639d3b,!0x1),_0x355476=this['_baseRoots']['get'](_0x639d3b)||F(_0x639d3b,!0x1);_0x1fa268['isAttached']()||_0x355476['isAttached']()?(_0x4dae94['insertions'][_0x639d3b]=T(_0x1fa268),_0x4dae94['deletions'][_0x639d3b]=T(_0x355476),this['_copyMarkers'](_0x4dae94['deletions'][_0x639d3b],_0x355476),this['_copyMarkers'](_0x4dae94['insertions'][_0x639d3b],_0x1fa268),_0x1236e2['insertions'][_0x639d3b]=this['_generateTape'](this['_idsRoots']['get'](_0x639d3b),[]),_0x1236e2['deletions'][_0x639d3b]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x639d3b)||F(_0x639d3b,!0x1),[])):_0x329896['delete'](_0x639d3b);}for(const _0x4a1f34 of _0x329896){const _0x4a2f98=_0x1236e2['insertions'][_0x4a1f34];for(const _0x316c4a of _0x4a2f98){const _0x7ff7b5=this['_getVidAttributeName'](_0x316c4a),_0x222c7e=_0x316c4a['item']['getAttribute'](_0x7ff7b5);_0x33b011['delete'](_0x222c7e),_0x222c7e>=this['_startingRevisionId']&&_0x1f6711['set'](_0x222c7e,_0xa05f62['get'](_0x222c7e));}}for(const _0x53faa2 of _0x329896){const _0x3a7449=_0x1236e2['insertions'][_0x53faa2],_0x5aa3c0=this['_getBaseVids'](_0x1236e2['deletions'][_0x53faa2]);let _0x30ee47=0x0;for(const _0x5726aa of _0x3a7449){const _0x580237=this['_getVidAttributeName'](_0x5726aa),_0x2cab6e=_0x5726aa['item']['getAttribute'](_0x580237);if(!_0x1f6711['has'](_0x2cab6e)&&!_0x3284e1['has'](_0x2cab6e)){if(_0x33b011['has'](_0x2cab6e))_0x30ee47++;else{if(_0x2cab6e!=_0x5aa3c0[_0x30ee47]){const _0xc0f33d=_0xa05f62['get'](_0x2cab6e)||_0xa05f62['get'](_0x5aa3c0[_0x30ee47]);for(;_0x2cab6e!=_0x5aa3c0[_0x30ee47];)_0x33b011['has'](_0x5aa3c0[_0x30ee47])||(_0x3284e1['set'](_0x5aa3c0[_0x30ee47],_0xc0f33d),_0xa05f62['set'](_0x5aa3c0[_0x30ee47],_0xc0f33d)),_0x30ee47++;}_0x30ee47++;}}}}for(const _0x4c7aa6 of _0x329896){const _0x2c2733=_0x1236e2['insertions'][_0x4c7aa6];for(const _0x5e8a84 of _0x2c2733){const _0x9e27d8=this['_getVidAttributeName'](_0x5e8a84),_0xeb7f40=_0x5e8a84['item']['getAttribute'](_0x9e27d8);if(_0x3284e1['has'](_0xeb7f40)){const _0x44cf14=_0x3284e1['get'](_0xeb7f40);_0x33b011['has'](_0xeb7f40)||_0x33b011['set'](_0xeb7f40,{..._0x44cf14}),_0x1f6711['set'](_0xeb7f40,{..._0x44cf14});}}}for(const _0xe0d834 of _0x33b011['keys']())_0xe0d834>=this['_startingRevisionId']&&_0x33b011['delete'](_0xe0d834);const _0x3e353a=new Map();for(const _0x231429 of _0x329896){let _0x4a1401=_0x1236e2['insertions'][_0x231429];for(const _0x132222 of _0x4a1401)if(_0x132222['item']['is']('element','tableCell')){const _0x4a3481=this['_getVidAttributeName'](_0x132222),_0x17b623=_0x132222['item']['getAttribute'](_0x4a3481);if(_0x1f6711['has'](_0x17b623)){const _0x2eb1c5=_0x132222['item']['parent']['parent']['getAttribute']('vid_start'),_0x3e4cbe=_0x3e353a['get'](_0x2eb1c5)||new Set();_0x3e4cbe['add'](_0x1f6711['get'](_0x17b623)['userId']),_0x3e353a['set'](_0x2eb1c5,_0x3e4cbe);}}_0x4a1401=_0x1236e2['deletions'][_0x231429];for(const _0x37931e of _0x4a1401)if(_0x37931e['item']['is']('element','tableCell')){const _0x331e0c=this['_getVidAttributeName'](_0x37931e),_0x1936b6=_0x37931e['item']['getAttribute'](_0x331e0c);if(_0x33b011['has'](_0x1936b6)){const _0x1e4786=_0x37931e['item']['parent']['parent']['getAttribute']('vid_start'),_0x21a947=_0x3e353a['get'](_0x1e4786)||new Set();_0x21a947['add'](_0x33b011['get'](_0x1936b6)['userId']),_0x3e353a['set'](_0x1e4786,_0x21a947);}}for(const _0x52593d of _0x3e353a['keys']())(_0x1f6711['has'](_0x52593d)||_0x33b011['has'](_0x52593d))&&_0x3e353a['delete'](_0x52593d);}for(const _0x547c58 of _0x329896){const _0x3136e6=_0x1236e2['insertions'][_0x547c58];let _0x36dd18=null,_0x33f9b1=null;for(const _0x2293a5 of _0x3136e6){const _0x34ea45=this['_getVidAttributeName'](_0x2293a5),_0x1b7ab3=_0x2293a5['item']['getAttribute'](_0x34ea45),_0x5d0e6f=_0x3e353a['get'](_0x1b7ab3);_0x5d0e6f&&'elementStart'==_0x2293a5['type']&&(_0x36dd18=Array['from'](_0x5d0e6f)[0x0],_0x33f9b1=_0x2293a5['item']['getAttribute']('vid_end')),_0x36dd18&&(_0x33b011['set'](_0x1b7ab3,{'userId':_0x36dd18}),_0x1f6711['set'](_0x1b7ab3,{'userId':_0x36dd18})),_0x1b7ab3==_0x33f9b1&&(_0x36dd18=null,_0x33f9b1=null);}}const _0x5407fe={},_0x1696ed=new Set();for(const _0x591a28 of _0x329896){const _0x1e8f3c=_0x4dae94['deletions'][_0x591a28],_0x4b9436=_0x4dae94['insertions'][_0x591a28];for(const {userId:_0x1cf3aa}of this['_touchedMarkers']['values']())null!==_0x1cf3aa&&_0x1696ed['add'](_0x1cf3aa);for(const {userId:_0x1e9181}of this['_touchedRoots']['values']())null!==_0x1e9181&&_0x1696ed['add'](_0x1e9181);this['_markChanges'](_0x4b9436,_0x1236e2['insertions'][_0x591a28],_0x1f6711,'insertion',_0x1696ed),this['_markChanges'](_0x1e8f3c,_0x1236e2['deletions'][_0x591a28],_0x33b011,'deletion',_0x1696ed),_0x5407fe[_0x591a28]={'insertions':this['_prepareViewToSave'](_0x4b9436),'deletions':this['_prepareViewToSave'](_0x1e8f3c),'attachChange':this['_touchedRoots']['get'](_0x591a28)||null,'attributesBefore':_0x2cf058(this['_baseRootsAttributes']['get'](_0x591a28))||{},'attributesAfter':_0x2cf058(this['_diffRootsAttributes']['get'](_0x591a28))};}return{'diffData':_0x5407fe,'authorsIds':Array['from'](_0x1696ed)};}['_processRootBeforeSave'](_0x41d5a5){for(const [,_0x1c2e46]of _0x41d5a5['markers']){const _0x50dfe0=_0x1c2e46['start']['getAncestors']()['filter'](_0xc6d29c=>'tableCell'==_0xc6d29c['name']);for(const _0x59e6ea of _0x50dfe0)0x1==_0x59e6ea['childCount']&&_0x59e6ea['getChild'](0x0)['is']('element','paragraph')&&_0x59e6ea['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x379b17){this['_processRootBeforeSave'](_0x379b17);const _0x4e90d0=this['editor']['data']['toView'](_0x379b17,{}),_0x4454ed=Array['from'](_0x4e90d0['getChildren']())['map'](_0x36cd44=>this['_getViewJson'](_0x36cd44));return JSON['stringify'](_0x4454ed);}['_getViewJson'](_0x4c5ebd){if(_0x4c5ebd['is']('$text'))return _0x4c5ebd['data'];{const _0x1eb5b5=_0x4c5ebd;return{'type':Object['keys'](E)['find'](_0x4843f8=>_0x4c5ebd instanceof E[_0x4843f8]),'name':_0x1eb5b5['name'],'attributes':Array['from'](_0x1eb5b5['getAttributes']()),'children':Array['from'](_0x1eb5b5['getChildren']())['map'](_0x3f6d25=>this['_getViewJson'](_0x3f6d25))};}}['_markChanges'](_0x8db94f,_0x2dbbfb,_0x8bdce1,_0x54b2dd,_0x4097a5){let _0x59e04a=null,_0x5b17be=null,_0x444886=0x0;const _0x1c80d5=this['editor']['model'];for(let _0x588b59=0x0;_0x588b59<_0x2dbbfb['length'];_0x588b59++){const _0x499977=this['_getVidAttributeName'](_0x2dbbfb[_0x588b59]),_0x32f78b=_0x2dbbfb[_0x588b59]['item']['getAttribute'](_0x499977),_0x2df9f1=_0x8bdce1['get'](_0x32f78b),_0x31b55c=_0x588b59==_0x2dbbfb['length']-0x1;(!_0x59e04a&&_0x2df9f1&&(_0x59e04a=_0x2df9f1,_0x5b17be=_0x2dbbfb[_0x588b59]),_0x59e04a&&(!_0x2df9f1||_0x2df9f1['userId']!=_0x59e04a['userId']))&&(_0x4437aa(_0x2df9f1,B(_0x5b17be,_0x8db94f,_0x1c80d5),B(_0x2dbbfb[_0x588b59],_0x8db94f,_0x1c80d5)),_0x59e04a=_0x2df9f1||null,_0x5b17be=_0x2df9f1?_0x2dbbfb[_0x588b59]:null),_0x59e04a&&_0x31b55c&&_0x4437aa(_0x2df9f1,B(_0x5b17be,_0x8db94f,_0x1c80d5),J(_0x2dbbfb[_0x588b59],_0x8db94f,_0x1c80d5));}function _0x4437aa(_0x5a4c88,_0x36e730,_0x5c723f){const _0x15e732=_0x59e04a['userId'],_0x292f58='revision:'+_0x54b2dd+':'+_0x15e732+':'+_0x444886++,_0x3cba0c=_0x1c80d5['createRange'](_0x36e730,_0x5c723f);_0x8db94f['markers']['set'](_0x292f58,_0x3cba0c),null!==_0x15e732&&_0x4097a5['add'](_0x15e732);}}['_getVidAttributeName'](_0x92fe63){switch(_0x92fe63['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x582193,_0x559a12){_0x582193['baseVersion']=null;for(const _0x59ad59 in _0x582193){const _0x548f97=_0x582193[_0x59ad59];if(_0x548f97 instanceof vt){const _0x1693b6=_0x559a12['get'](_0x548f97['root']['rootName']);_0x582193[_0x59ad59]=this['_fixPosition'](_0x548f97,_0x1693b6);}if(_0x548f97 instanceof ft){const _0x2e6661=_0x559a12['get'](_0x548f97['root']['rootName']);_0x582193[_0x59ad59]=this['_fixRange'](_0x548f97,_0x2e6661);}'root'===_0x59ad59&&(_0x582193['root']=_0x559a12['get'](_0x582193['root']['rootName']));}}['_fixRange'](_0x5a26d4,_0x324f2f){return this['editor']['model']['createRange'](this['_fixPosition'](_0x5a26d4['start'],_0x324f2f),this['_fixPosition'](_0x5a26d4['end'],_0x324f2f));}['_fixPosition'](_0x3708dc,_0x45f596){return this['editor']['model']['createPositionFromPath'](_0x45f596,_0x3708dc['path'],_0x3708dc['stickiness']);}['_handleInsertOperation'](_0x3ef2b8){const _0x1e9073=this['_idsRoots']['get'](_0x3ef2b8['position']['root']['rootName']),_0xb0b45d=this['_fixPosition'](_0x3ef2b8['position'],_0x1e9073),_0x2c8d8b=null===_0x3ef2b8['_authorId']?null:_0x3ef2b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x46df98=_0xb0b45d['parent'],_0x40b482=this['_revisionId'],_0x21a8e0=[];for(const _0x123b05 of _0x3ef2b8['nodes'])if(_0x123b05['is']('element'))_0x21a8e0['push'](this['_makeIdsRoot'](_0x123b05));else{for(let _0x124ad0=0x0;_0x124ad0<_0x123b05['offsetSize'];_0x124ad0++)_0x21a8e0['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x460e60=this['_revisionId'];for(let _0x2057e3=_0x40b482;_0x2057e3<_0x460e60;_0x2057e3++)this['_touched']['set'](_0x2057e3,{'userId':_0x2c8d8b});_0x46df98['_insertChild'](_0xb0b45d['offset'],_0x21a8e0);}['_handleMoveOperation'](_0x12dbc9){(_0x12dbc9=this['_cloneOperation'](_0x12dbc9,this['_idsRoots']))['_execute']();const _0x127867=null===_0x12dbc9['_authorId']?null:_0x12dbc9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x819964=_0x12dbc9['getMovedRangeStart'](),_0x239939=_0x819964['parent'],_0x459c6b=_0x819964['offset'];!function _0x3c8ac7(_0x550977,_0x4445c0,_0x299666,_0x3992db){for(let _0x571f6a=_0x299666;_0x571f6a<_0x3992db;_0x571f6a++){const _0x48beaf=_0x4445c0['getChild'](_0x571f6a);_0x48beaf['is']('element','$text')?_0x550977['set'](_0x48beaf['getAttribute']('vid'),{'userId':_0x127867}):(_0x550977['set'](_0x48beaf['getAttribute']('vid_start'),{'userId':_0x127867}),_0x3c8ac7(_0x550977,_0x48beaf,0x0,_0x48beaf['childCount']),_0x550977['set'](_0x48beaf['getAttribute']('vid_end'),{'userId':_0x127867}));}}(this['_touched'],_0x239939,_0x459c6b,_0x459c6b+_0x12dbc9['howMany']);}['_handleMergeOperation'](_0x41623b){const _0x1e2cba=null===(_0x41623b=this['_cloneOperation'](_0x41623b,this['_idsRoots']))['_authorId']?null:_0x41623b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1cbfc7=_0x41623b['targetPosition']['parent'],_0x1982eb=_0x41623b['sourcePosition']['parent'],_0x9fce0a=_0x1cbfc7['getAttribute']('vid_end'),_0x171ac1=_0x1982eb['getAttribute']('vid_start');_0x1cbfc7['_setAttribute']('vid_end',_0x1982eb['getAttribute']('vid_end')),_0x1982eb['_setAttribute']('vid_end',_0x9fce0a),this['_touched']['set'](_0x171ac1,{'userId':_0x1e2cba}),this['_touched']['set'](_0x9fce0a,{'userId':_0x1e2cba}),_0x41623b['_execute']();}['_handleSplitOperation'](_0x3292b4){const _0x497ba9=null===(_0x3292b4=this['_cloneOperation'](_0x3292b4,this['_idsRoots']))['_authorId']?null:_0x3292b4['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2c2282=_0x3292b4['graveyardPosition'],_0xe8a24f=_0x3292b4['splitPosition']['parent'];_0x3292b4['_execute']();const _0x1f3b56=_0xe8a24f['getAttribute']('vid_end'),_0xfb37b8=_0x3292b4['insertionPosition']['nodeAfter'];if(_0x2c2282){const _0x4aa85a=_0xfb37b8['getAttribute']('vid_end'),_0x1ea49f=_0xe8a24f['getAttribute']('vid_end');_0xe8a24f['_setAttribute']('vid_end',_0x4aa85a),_0xfb37b8['_setAttribute']('vid_end',_0x1ea49f),this['_touched']['set'](_0xe8a24f['getAttribute']('vid_end'),{'userId':_0x497ba9}),this['_touched']['set'](_0xfb37b8['getAttribute']('vid_start'),{'userId':_0x497ba9});}else{const _0x4add5f=this['_revisionId']++,_0x27abe6=this['_revisionId']++;_0xe8a24f['_setAttribute']('vid_end',_0x4add5f),_0xfb37b8['_setAttribute']('vid_start',_0x27abe6),_0xfb37b8['_setAttribute']('vid_end',_0x1f3b56),this['_touched']['set'](_0x4add5f,{'userId':_0x497ba9}),this['_touched']['set'](_0x27abe6,{'userId':_0x497ba9});}}['_handleMarkerOperation'](_0x16929b){if(!_0x16929b['affectsData'])return;const _0x470f89=(_0x16929b=this['_cloneOperation'](_0x16929b,this['_diffRoots']))['oldRange']?_0x16929b['oldRange']['root']:null,_0x5c7a92=_0x16929b['newRange']?_0x16929b['newRange']['root']:null;_0x470f89&&this['_markers']['delete'](_0x16929b['name']),_0x5c7a92&&this['_markers']['set'](_0x16929b['name'],_0x16929b['newRange']['clone']());const _0x566952=null===_0x16929b['_authorId']?null:_0x16929b['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53d775=_0x16929b['name'];if(!this['_touchedMarkers']['has'](_0x53d775))return void this['_touchedMarkers']['set'](_0x53d775,{'range':_0x16929b['oldRange'],'userId':_0x566952});const _0x14d917=this['_touchedMarkers']['get'](_0x53d775),_0x1c52b1=_0x14d917['range'],_0x3eb00a=_0x16929b['newRange'];null==_0x1c52b1&&null==_0x3eb00a||_0x1c52b1&&_0x3eb00a&&_0x1c52b1['isEqual'](_0x3eb00a)?this['_touchedMarkers']['delete'](_0x16929b['name']):_0x14d917['userId']=_0x566952;}['_handleRootOperation'](_0xddec4e,_0x14e9ee){this['_diffRoots']['has'](_0xddec4e['rootName'])?this['_diffRoots']['get'](_0xddec4e['rootName'])['_isAttached']=_0xddec4e['isAdd']:(this['_diffRoots']['set'](_0xddec4e['rootName'],F(_0xddec4e['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0xddec4e['rootName'],{}),_0x14e9ee&&this['_idsRoots']['set'](_0xddec4e['rootName'],F(_0xddec4e['rootName'],!0x0)));const _0x313444=null===_0xddec4e['_authorId']?null:_0xddec4e['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x2d8320=this['_touchedRoots']['get'](_0xddec4e['rootName']);_0x2d8320&&_0x2d8320['userId']===_0x313444?this['_touchedRoots']['delete'](_0xddec4e['rootName']):this['_touchedRoots']['set'](_0xddec4e['rootName'],{'userId':_0x313444,'isAttached':_0xddec4e['isAdd']});}['_handleRootAttributeOperation'](_0x3c2b44){const _0x17fa07=this['_diffRootsAttributes']['get'](_0x3c2b44['root']['rootName']);null===_0x3c2b44['newValue']?delete _0x17fa07[_0x3c2b44['key']]:_0x17fa07[_0x3c2b44['key']]=_0x3c2b44['newValue'];}}function T(_0x315a4a){const _0x1eaf92=F(_0x315a4a['rootName'],_0x315a4a['isAttached']());for(const _0x1cc297 of _0x315a4a['getChildren']()){const _0x23b5a1=_0x1cc297['_clone'](!0x0);_0x1eaf92['_appendChild'](_0x23b5a1);}return _0x1eaf92;}function F(_0x3aa7cb,_0x57b251=!0x0){const _0x33542a=new gt();return _0x33542a['rootName']=_0x3aa7cb,_0x33542a['_isAttached']=_0x57b251,_0x33542a['isAttached']=()=>_0x33542a['_isAttached'],_0x33542a;}function B(_0x3b4534,_0x31ff67,_0x2349c5){const _0x508d70='elementEnd'==_0x3b4534['type']?_0x2349c5['createPositionAt'](_0x3b4534['item'],'end'):_0x2349c5['createPositionBefore'](_0x3b4534['item']);return _0x2349c5['createPositionFromPath'](_0x31ff67,_0x508d70['path'],_0x508d70['stickiness']);}function J(_0x2ca7f0,_0x5515d2,_0x975ebf){const _0xa53d43='elementStart'==_0x2ca7f0['type']?_0x975ebf['createPositionAt'](_0x2ca7f0['item'],0x0):_0x975ebf['createPositionAfter'](_0x2ca7f0['item']);return _0x975ebf['createPositionFromPath'](_0x5515d2,_0xa53d43['path'],_0xa53d43['stickiness']);}class os extends _0x377738{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x41d76a,_0x1b647f){super(_0x41d76a),this['focusTracker']=new _0x5732ff(),this['keystrokes']=new _0x538a05(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1b647f),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),ts(this);}['render'](){super['render'](),_0x16b26b({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x98405d=_0x5cf424=>_0x5cf424['stopPropagation']();this['keystrokes']['set']('arrowright',_0x98405d),this['keystrokes']['set']('arrowleft',_0x98405d),this['keystrokes']['set']('arrowup',_0x98405d),this['keystrokes']['set']('arrowdown',_0x98405d);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x2c29f7){this['revisionNameInputView']['fieldView']['element']['value']=_0x2c29f7['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x3c3063){const _0x210f03=new at(this['locale'],ti),_0x69e178=_0x210f03['fieldView'];_0x69e178['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x4a519f=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x3c3063&&(_0x4a519f+='\x20('+m(this['locale'],'optional')+')'),(_0x210f03['label']=_0x4a519f,_0x69e178['on']('input',()=>{this['revisionNameInputValue']=_0x69e178['element']['value']['trim']();}),_0x210f03);}}class f extends _0x5aa884{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x88039a=this['editor'],_0x1460ed=_0x88039a['plugins']['get']('RevisionTracker');_0x88039a['ui']['componentFactory']['add']('revisionHistory',_0x194994=>{const _0x528d81=_0x28f4b1(_0x194994),_0x1e5d8d=_0x528d81['panelView']['children'],_0x339373=new _0x122e03(_0x194994),_0x529448=new te(_0x194994),_0x73f8da=new _0x4cea6e(_0x194994),_0x29771a=new te(_0x194994),_0x7194af=new _0x4cea6e(_0x194994);return _0x528d81['bind']('isEnabled')['to'](_0x1460ed,'isReady',_0x1460ed,'isEnabled',_0x88039a,'isReadOnly',(_0x282a7d,_0x5433ae,_0x4eded4)=>_0x282a7d&&_0x5433ae&&!_0x4eded4),_0x528d81['buttonView']['set']({'icon':_0x5b5e2c,'label':m(_0x194994,'Revision\x20history'),'tooltip':!0x0}),_0x73f8da['set']({'label':m(_0x194994,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x73f8da['bind']('isEnabled')['to'](_0x1460ed,'isReady',_0x1460ed,'isEnabled',_0x88039a,'isReadOnly',(_0x116363,_0x5c9185,_0x466ab3)=>_0x116363&&_0x5c9185&&!_0x466ab3),_0x73f8da['on']('execute',()=>this['_showDialog']()),_0x7194af['set']({'label':m(_0x194994,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x7194af['bind']('isEnabled')['to'](_0x1460ed,'isReady',_0x88039a,'isReadOnly',(_0xd82124,_0x4a0c10)=>_0xd82124&&!_0x4a0c10),_0x7194af['on']('execute',()=>{_0x88039a['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x528d81['isOpen']=!0x1,_0x88039a['editing']['view']['focus']();}),_0x529448['children']['add'](_0x73f8da),_0x29771a['children']['add'](_0x7194af),_0x339373['role']='menu',_0x339373['items']['addMany']([_0x529448,_0x29771a]),_0x1e5d8d['add'](_0x339373),_0x528d81;}),_0x88039a['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x328434=this['editor'],_0x1a2d98=_0x328434['locale'],_0x51d330=new _0x33eb46(_0x1a2d98),_0x44312f=new _0x4867ec(_0x1a2d98);_0x51d330['buttonView']['set']({'icon':_0x5b5e2c,'label':m(_0x1a2d98,'Revision\x20history')});const _0x19901d=new _0x5e8df2(_0x1a2d98,_0x51d330),_0x2fdb54=new _0x15ddd2(_0x1a2d98);_0x2fdb54['set']({'label':m(_0x1a2d98,'Save\x20current\x20revision')}),_0x2fdb54['delegate']('execute')['to'](_0x51d330),_0x2fdb54['on']('execute',()=>{this['_showDialog']();}),_0x19901d['children']['add'](_0x2fdb54),_0x44312f['items']['add'](_0x19901d);const _0x4339a5=new _0x5e8df2(_0x1a2d98,_0x51d330),_0x5f1bed=new _0x15ddd2(_0x1a2d98);return _0x5f1bed['set']({'label':m(_0x1a2d98,'Open\x20revision\x20history')}),_0x5f1bed['delegate']('execute')['to'](_0x51d330),_0x5f1bed['on']('execute',()=>{_0x328434['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x4339a5['children']['add'](_0x5f1bed),_0x44312f['items']['add'](_0x4339a5),_0x51d330['panelView']['children']['add'](_0x44312f),_0x51d330;}['_showDialog'](){const _0x1042e7=this['editor'],_0x20d431=_0x1042e7['locale'],_0x472b93=_0x1042e7['plugins']['get']('Dialog'),_0x4d142e=_0x1042e7['plugins']['get']('RevisionTracker');function _0x118403(_0xf5c954){_0x1042e7['config']['get']('revisionHistory.requireRevisionName')&&''===_0xf5c954['revisionName']?_0xf5c954['revisionNameInputView']['errorText']=m(_0x20d431,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x1042e7['plugins']['get'](u)['saveRevision']({'name':_0xf5c954['revisionName']}),_0x472b93['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x118403(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x472b93['show']({'id':'revisionSave','title':m(_0x20d431,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x1042e7['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x472b93['hide']()},{'label':m(_0x1042e7['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x4e3d38){_0x4e3d38['bind']('isEnabled')['to'](_0x4d142e,'isReady',_0x4d142e,'isEnabled',_0x1042e7,'isReadOnly',(_0x40af7a,_0x2633a0,_0x1b8d03)=>_0x40af7a&&_0x2633a0&&!_0x1b8d03);},'onExecute':()=>_0x118403(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x205e2b=this['editor'],_0x4d826f=_0x205e2b['locale'];this['_saveRevisionFormView']=new os(_0x4d826f,_0x205e2b['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends _0x377738{['changeId'];['_model'];constructor(_0x2dad62,_0xfe3ca8){super(_0x2dad62),this['_model']=_0xfe3ca8,this['changeId']=_0xfe3ca8['id'];const _0x2e0c31=this['bindTemplate'],_0x5b4978=m(_0x2dad62,_0xfe3ca8['data']['isSuggestion']?'Suggested\x20by':'add'==_0xfe3ca8['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0xfe3ca8['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x2e0c31['to']('type',_0x3af1aa=>'ck-revision-change__'+_0x3af1aa)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x5b4978}]},{'text':'\x20'+_0xfe3ca8['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
- _0x1ff634(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x488758){super(),this['id']=_0x488758['id']||_0x51a0e0(),this['author']=_0x488758['author'],this['type']=_0x488758['type'],this['data']=_0x488758['data']||{},this['rootName']=_0x488758['rootName'],this['set']('createdAt',_0x488758['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x31beb8,_0x33c5a9){this['newRevisionId']=_0x31beb8,this['oldRevisionId']=_0x33c5a9,this['changes']=new _0x1056b3();}['_setChanges'](_0x11bae0){for(const _0x1b64b6 of _0x11bae0)this['changes']['add'](_0x1b64b6);}}const Y={'c':_0x364db7,'a':_0x5dcd99,'e':_0x48d005,'r':_0x1c2455,'u':_0x1231a7};class d extends _0x5aa884{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x500ee0,_0x5b7085,j];}constructor(_0x59c2b7){super(_0x59c2b7),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x3046ef,_0x9df8a8,_0x56bbb8)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x407ac6=>{for(const _0x505ba8 of this['editor']['editing']['view']['document']['roots'])_0x56bbb8?_0x407ac6['removeClass']('ck-editor__editable__overlay',_0x505ba8):_0x407ac6['addClass']('ck-editor__editable__overlay',_0x505ba8);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x5dbf0f=>null!==_0x5dbf0f),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x23bb56,_0x5e6308,_0x51d67e)=>_0x23bb56&&_0x51d67e?_0x5e6308['changes']['getIndex'](_0x51d67e):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x2d6a1e,_0x4302bf)=>_0x2d6a1e?_0x4302bf['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x5b7085);}['init'](){const _0x5c10a0=this['editor'],_0x41b696=new yt(_0x5c10a0,{'direction':'backward'}),_0x56a795=new yt(_0x5c10a0,{'direction':'forward'});(_0x5c10a0['commands']['add']('showPreviousChange',_0x41b696),_0x5c10a0['commands']['add']('showNextChange',_0x56a795),_0x5c10a0['commands']['add']('restoreRevision',new _t(_0x5c10a0)),this['on']('change:numberOfChanges',()=>{_0x41b696['refresh'](),_0x56a795['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5c10a0['enableReadOnlyMode']('revision-viewer'),_0x5c10a0['plugins']['has']('WidgetToolbarRepository'))&&_0x5c10a0['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0x42304a){await this['loadRevisionData'](_0x42304a);const _0x321361={};for(const _0x52cc09 in _0x42304a['diffData']){if(_0x42304a['diffData'][_0x52cc09]['attachChange']&&!_0x42304a['diffData'][_0x52cc09]['attachChange']['isAttached'])continue;const _0xd40eed=this['_removeRevisionMarkers'](JSON['parse'](_0x42304a['diffData'][_0x52cc09]['insertions'])),_0x3a0072=this['editor']['editing']['view']['document'],_0x1f5646=new _0x39dd63(_0x3a0072,_0xd40eed['map'](_0x128848=>this['_getViewObj'](_0x128848)));this['editor']['data']['processor']['useFillerType']('marked'),_0x321361[_0x52cc09]=this['editor']['data']['processor']['toData'](_0x1f5646),this['editor']['data']['processor']['useFillerType']('default');}return _0x321361;}async['getRevisionRootsAttributes'](_0x44814d){await this['loadRevisionData'](_0x44814d);const _0xb88c74={};for(const _0x5a8e4b in _0x44814d['diffData'])_0x44814d['diffData'][_0x5a8e4b]['attachChange']&&!_0x44814d['diffData'][_0x5a8e4b]['attachChange']['isAttached']||(_0xb88c74[_0x5a8e4b]=_0x44814d['diffData'][_0x5a8e4b]['attributesAfter']||{});return _0xb88c74;}['_removeRevisionMarkers'](_0x38c053){return(_0x38c053=_0x38c053['filter'](_0x1cae58=>!_0x1cae58['name']||'revision-start'!==_0x1cae58['name']&&'revision-end'!==_0x1cae58['name']))['forEach'](_0x4d0d93=>{'string'!=typeof _0x4d0d93&&(_0x4d0d93['children']=this['_removeRevisionMarkers'](_0x4d0d93['children']),_0x4d0d93['attributes']=_0x4d0d93['attributes']['filter'](_0x5e8f20=>!_0x5e8f20[0x0]['startsWith']('data-revision-')));}),_0x38c053;}async['compare'](_0x127a54,_0x372c38,_0x33e95a=!0x1){if(!this['isEnabled'])return;const _0x4f4c3d=this['diff'],_0x40ee37=this['repository'],_0xc3307b='string'==typeof _0x127a54?_0x40ee37['getRevision'](_0x127a54):_0x127a54,_0x3b4e80='string'==typeof _0x372c38?_0x40ee37['getRevision'](_0x372c38):_0x372c38,_0x5cd4eb=_0xc3307b['id'],_0x2e5a1a=_0x3b4e80?_0x3b4e80['id']:null;if(!_0x33e95a&&this['diff']&&this['diff']['newRevisionId']===_0x5cd4eb&&this['diff']['oldRevisionId']===_0x2e5a1a)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x5cd4eb,_0x2e5a1a);const _0x50e963=this['_getRevisionsRange'](_0xc3307b,_0x3b4e80,!0x0)['map'](_0x364f67=>this['loadRevisionData'](_0x364f67));return _0x50e963['push'](new Promise(_0x3efa8c=>{setTimeout(_0x3efa8c,0x14);})),Promise['all'](_0x50e963)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x10add6=this['_getDiff'](_0x5cd4eb,_0x2e5a1a);for(const _0x1b4e7c of _0x10add6['changes'])this['_changeIdToChange']['set'](_0x1b4e7c['id'],_0x1b4e7c);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xe9194c=>{for(const _0x1333f0 of this['editor']['model']['document']['getRootNames']())_0xe9194c['detachRoot'](_0x1333f0);for(const _0x3cb260 of Object['keys'](_0x10add6['model'])){const _0x4638fd=_0xe9194c['addRoot'](_0x3cb260);for(const _0x1616ca of Object['keys'](_0x10add6['attributes'][_0x3cb260]))_0xe9194c['setAttribute'](_0x1616ca,_0x10add6['attributes'][_0x3cb260][_0x1616ca],_0x4638fd);_0xe9194c['insert'](_0x10add6['model'][_0x3cb260],_0x4638fd,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x10add6['changes'])),this['isReady']=!0x0;})['catch'](_0x152d5a=>{console['error'](_0x152d5a),this['_cleanUp'](),_0x4f4c3d&&(this['diff']=_0x4f4c3d),this['isReady']=!0x0;});}['addRevisionData'](_0x3d918a,_0x33a4d2){const _0x1976cb=this['repository']['createRevision'](_0x3d918a);return _0x1976cb['on']('_update',(_0x28828a,_0x30bc7d,_0xdd5b6c)=>_0x33a4d2(_0x30bc7d,_0xdd5b6c,_0x1976cb)),this['repository']['addRevision'](_0x1976cb),_0x1976cb;}['loadRevisionData'](_0x5997d1){if(!_0x5997d1||_0x5997d1['diffData'])return Promise['resolve']();{const _0x4b8115=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x4b8115,'revisionId':_0x5997d1['id']})['then'](_0x200a24=>{_0x5997d1['_update']({'diffData':_0x200a24['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x38efc8=>{for(const _0x35e790 of this['editor']['model']['document']['getRootNames']())_0x38efc8['detachRoot'](_0x35e790);});}['_sortAndFilterDiffChanges'](_0x38cadb){const _0xb5e103=[],_0x43b730=new Map();for(const _0x349dfb of this['editor']['model']['document']['getRootNames']()){const _0x1c525c=this['editor']['editing']['view']['getDomRoot'](_0x349dfb);if(!_0x1c525c)continue;const _0x3a9807=_0x1c525c['getClientRects']()['item'](0x0);_0x3a9807&&(_0xb5e103['push'](_0x349dfb),_0x43b730['set'](_0x349dfb,_0x3a9807));}return _0xb5e103['sort']((_0x46265c,_0xc3ea10)=>{const _0x1bdc8a=_0x43b730['get'](_0x46265c),_0x1c2d6d=_0x43b730['get'](_0xc3ea10);return _0x1bdc8a['y']-_0x1c2d6d['y']||_0x1bdc8a['x']-_0x1c2d6d['x'];}),(_0x38cadb=_0x38cadb['filter'](_0xc71126=>_0xb5e103['includes'](_0xc71126['rootName'])))['sort']((_0x213a53,_0x30c61f)=>_0xb5e103['indexOf'](_0x213a53['rootName'])-_0xb5e103['indexOf'](_0x30c61f['rootName'])),_0x38cadb;}['_makeTape'](_0x340d78){const _0xd3f63f=Array['from'](_0x340d78['markers'])['filter'](([_0xd84d49,_0x3b5992])=>_0xd84d49['startsWith']('revision:')&&!_0x3b5992['isCollapsed']),_0x22fd7c=Array['from'](this['editor']['model']['createRangeIn'](_0x340d78)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0xd3f63f['length'])for(const _0x30d55b of _0x22fd7c){const [_0x5e7f59,_0x3e10d8]=_0xd3f63f[0x0],[,_0x430695,_0x196b99]=_0x5e7f59['split'](':');if(_0x3e10d8['end']['isEqual'](_0x30d55b['nextPosition'])&&_0xd3f63f['shift'](),(_0x30d55b['previousPosition']['isEqual'](_0x3e10d8['start'])||_0x30d55b['previousPosition']['isAfter'](_0x3e10d8['start']))&&('insertion'==_0x430695?_0x30d55b['isAdded']={'userId':_0x196b99}:'deletion'==_0x430695&&(_0x30d55b['isRemoved']={'userId':_0x196b99})),0x0==_0xd3f63f['length'])break;}return _0x22fd7c;}['_refreshStartEndIndex'](_0x54f7e6){const _0x5eaa71=new Map();for(let _0x114b19=0x0;_0x114b19<_0x54f7e6['length'];_0x114b19++)'text'===_0x54f7e6[_0x114b19]['type']?(_0x54f7e6[_0x114b19]['item']['startIndex']=_0x114b19,_0x54f7e6[_0x114b19]['item']['endIndex']=_0x114b19):('elementStart'===_0x54f7e6[_0x114b19]['type']?_0x54f7e6[_0x114b19]['item']['startIndex']=_0x114b19:'elementEnd'===_0x54f7e6[_0x114b19]['type']&&(_0x54f7e6[_0x114b19]['item']['endIndex']=_0x114b19),_0x5eaa71['set'](_0x54f7e6[_0x114b19]['id'],_0x114b19));for(const _0x324897 of _0x5eaa71['values']())'elementStart'===_0x54f7e6[_0x324897]['type']?_0x54f7e6[_0x324897]['item']['endIndex']=_0x5eaa71['get'](_0x54f7e6[_0x324897]['pairId']):'elementEnd'===_0x54f7e6[_0x324897]['type']&&(_0x54f7e6[_0x324897]['item']['startIndex']=_0x5eaa71['get'](_0x54f7e6[_0x324897]['pairId']));}['_processTape'](_0x23b5d9){for(let _0x514714=0x0;_0x514714<_0x23b5d9['length'];_0x514714++){if('elementStart'===_0x23b5d9[_0x514714]['type'])_0x23b5d9[_0x514714]['item']['startIndex']=_0x514714;else{if('elementEnd'===_0x23b5d9[_0x514714]['type']){_0x23b5d9[_0x514714]['item']['endIndex']=_0x514714;const _0x1e60bd=_0x23b5d9[_0x514714]['item']['startIndex'];_0x23b5d9[_0x1e60bd]['pairId']=_0x23b5d9[_0x514714]['id'],_0x23b5d9[_0x514714]['pairId']=_0x23b5d9[_0x1e60bd]['id'];}else _0x23b5d9[_0x514714]['item']['startIndex']=_0x514714,_0x23b5d9[_0x514714]['item']['endIndex']=_0x514714,_0x23b5d9[_0x514714]['pairId']=null;}_0x23b5d9[_0x514714]['markersStart']||(_0x23b5d9[_0x514714]['markersStart']=[],_0x23b5d9[_0x514714]['markersEnd']=[]);}}['_markInsertions'](_0x15d4a5,_0x18363e){const _0x345103=_0x15d4a5['filter'](_0x381802=>!_0x381802['isAdded']);for(let _0x29f6cb=0x0;_0x29f6cb<_0x18363e['length'];_0x29f6cb++)_0x18363e[_0x29f6cb]['isAdded']&&(_0x345103[_0x29f6cb]['isAdded']=_0x18363e[_0x29f6cb]['isAdded']);}['_makeModelFromViewString'](_0x4cf9af){const _0x4ef507=JSON['parse'](_0x4cf9af),_0x2440c1=this['editor']['editing']['view']['document'],_0x433139=new _0x39dd63(_0x2440c1,_0x4ef507['map'](_0x399e3c=>this['_getViewObj'](_0x399e3c)));return this['editor']['data']['toModel'](_0x433139);}['_getViewObj'](_0x2aee39){const _0x400450=this['editor']['editing']['view']['document'];if('string'==typeof _0x2aee39)return new _0xbf05a4(_0x400450,_0x2aee39);{const _0x35ffd5=_0x2aee39['children']['map'](_0x24a14a=>this['_getViewObj'](_0x24a14a));return new(Y[_0x2aee39['type']]||_0x34efa8)(_0x400450,_0x2aee39['name'],_0x2aee39['attributes'],_0x35ffd5);}}['_getDiff'](_0x3b020f,_0x2978af=null){const _0x1a8004=this['repository']['getRevision'](_0x3b020f),_0x3bc913=_0x2978af?this['repository']['getRevision'](_0x2978af):null,_0x134da9=this['_getRevisionsRange'](_0x1a8004,_0x3bc913),_0x37cb45=_0x134da9[_0x134da9['length']-0x1],_0x356d58=new Map(),_0x2a8acb={'model':{},'attributes':{},'changes':[]},_0x2be7bb=new Set(),_0x2c4173=new Map();for(let _0x44f743=_0x134da9['length']-0x1;_0x44f743>=0x0;_0x44f743--){const _0x1f657b=_0x134da9[_0x44f743];for(const _0x487df8 of Object['keys'](_0x1f657b['diffData']))if(_0x1f657b['diffData'][_0x487df8]['attachChange']){const _0x23a497=_0x1f657b['diffData'][_0x487df8]['attachChange'];_0x23a497['isAttached']?(_0x2be7bb['add'](_0x487df8),_0x2c4173['has'](_0x487df8)&&_0x2c4173['get'](_0x487df8)['userId']==_0x23a497['userId']?_0x2c4173['delete'](_0x487df8):_0x2c4173['set'](_0x487df8,_0x23a497)):_0x2c4173['has'](_0x487df8)?(_0x2be7bb['delete'](_0x487df8),_0x2c4173['delete'](_0x487df8)):(_0x2be7bb['add'](_0x487df8),_0x2c4173['set'](_0x487df8,_0x23a497));}else _0x2be7bb['add'](_0x487df8);}for(const _0x23d106 of _0x2be7bb){const _0x408739=_0x2c4173['has'](_0x23d106)&&!_0x2c4173['get'](_0x23d106)['isAttached'];let _0x5c46a0=_0x408739?_0x134da9['length']-0x1:0x0;const _0x5dd49e=_0x408739?-0x1:0x1;for(;_0x134da9[_0x5c46a0];){const _0x5e8577=_0x134da9[_0x5c46a0];if(_0x5e8577['diffData'][_0x23d106]){const _0x4fe66c=_0x408739?_0x5e8577['diffData'][_0x23d106]['attributesBefore']:_0x5e8577['diffData'][_0x23d106]['attributesAfter'];_0x2a8acb['attributes'][_0x23d106]=_0x4fe66c?_0x2cf058(_0x4fe66c):{};break;}_0x5c46a0+=_0x5dd49e;}}for(const _0x452cb7 of _0x134da9){_0x452cb7['model']={};for(const _0x1d562a of _0x452cb7['authors'])_0x356d58['set'](_0x1d562a['id'],_0x1d562a);for(const _0x2dd947 of _0x2be7bb){const _0x904cd6=_0x452cb7['diffData'][_0x2dd947]?_0x452cb7['diffData'][_0x2dd947]['insertions']:'[]',_0x595d25=_0x452cb7['diffData'][_0x2dd947]?_0x452cb7['diffData'][_0x2dd947]['deletions']:'[]';_0x452cb7['model'][_0x2dd947]={'insertions':this['_makeModelFromViewString'](_0x904cd6),'deletions':this['_makeModelFromViewString'](_0x595d25)};}}for(const _0x26c265 of _0x2be7bb){let _0x4ced88=null,_0x9b7b42=0x0;const _0x487876=new Map(Array['from'](_0x1a8004['model'][_0x26c265]['insertions']['markers'])['filter'](([_0x4f5c7d])=>!_0x4f5c7d['startsWith']('revision:')));let _0x39356c=0x0;for(const _0x1b5607 of _0x134da9){const _0x3c4767=this['_makeTape'](_0x1b5607['model'][_0x26c265]['insertions']);_0x1b5607==_0x1a8004?(_0x4ced88=_0x3c4767,_0x9b7b42=_0x4ced88['length'],_0x4ced88['forEach'](_0x41df90=>{_0x41df90['id']=_0x39356c++;}),this['_processTape'](_0x4ced88)):this['_markInsertions'](_0x4ced88,_0x3c4767);const _0x5b7b00=_0x4ced88['filter'](_0x5ee05e=>!_0x5ee05e['isAdded'])['map'](_0x217f53=>_0x217f53['id']);let _0x5fb01c=0x0;const _0x5964e9=this['_makeTape'](_0x1b5607['model'][_0x26c265]['deletions']);_0x5964e9['forEach'](_0x41b12f=>{_0x41b12f['isRemoved']?_0x41b12f['id']=_0x9b7b42++:_0x41b12f['id']=_0x5b7b00[_0x5fb01c++];}),this['_processTape'](_0x5964e9),this['_setDistance'](_0x4ced88,'isAdded'),this['_setDistance'](_0x5964e9,'isRemoved'),_0x1b5607==_0x1a8004&&this['_markMarkers'](_0x4ced88,_0x487876),_0x4ced88=this['_joinTapes'](_0x4ced88,_0x5964e9),this['_refreshStartEndIndex'](_0x4ced88),this['_setDistance'](_0x4ced88,'isRemoved');}_0x4ced88=_0x4ced88['filter'](_0x3b3ea8=>!(_0x3b3ea8['isAdded']&&_0x3b3ea8['isRemoved']));const _0x5d8e92=new Map(_0x37cb45['model'][_0x26c265]['deletions']['markers']),_0x35fd3d=new Set(_0x487876['keys']());for(const _0x482739 of _0x5d8e92['keys']())_0x35fd3d['delete'](_0x482739);this['_markSuggestions'](_0x4ced88,_0x35fd3d),this['_fixObsoleteTags'](_0x4ced88),_0x4ced88=this['_removeMissingPairs'](_0x4ced88),_0x4ced88=this['_markMismatchedRemovedTags'](_0x4ced88),_0x4ced88=this['_removeUnsupportedChanges'](_0x4ced88);const {root:_0x22dbf8,changes:_0x20ee27}=this['_makeModelFromTape'](_0x4ced88,_0x356d58,_0x26c265);_0x2a8acb['model'][_0x26c265]=_0x22dbf8;const _0x640827=_0x2c4173['get'](_0x26c265);if(_0x640827){const _0x6f5f16=_0x356d58['get'](_0x640827['userId']),_0x219366=new r({'author':_0x6f5f16,'type':_0x640827['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x26c265});_0x20ee27['unshift'](_0x219366),_0x2a8acb['attributes'][_0x26c265]['revisionHistoryAttachChange']=_0x219366['id'];}_0x2a8acb['changes']=_0x2a8acb['changes']['concat'](_0x20ee27);}return _0x2a8acb;}['_markMarkers'](_0x38670f,_0x3e57b2){for(let _0x33a0d0=0x0;_0x33a0d0<_0x38670f['length'];_0x33a0d0++)for(const [_0x5093cf,_0x316dbb]of _0x3e57b2)_0x316dbb['start']['isEqual'](_0x38670f[_0x33a0d0]['previousPosition'])&&_0x38670f[_0x33a0d0]['markersStart']['push'](_0x5093cf),_0x316dbb['end']['isEqual'](_0x38670f[_0x33a0d0]['nextPosition'])&&_0x38670f[_0x33a0d0]['markersEnd']['push'](_0x5093cf);}['_joinTapes'](_0xb6e284,_0x85379a){let _0x51f18d=[],_0x4061ea=0x0,_0x31dfbb=0x0;for(;_0x4061ea<_0xb6e284['length']||_0x31dfbb<_0x85379a['length'];){const _0x1a4f65=_0xb6e284[_0x4061ea]||{},_0x58b337=_0x85379a[_0x31dfbb]||{};if(_0x1a4f65['id']==_0x58b337['id'])_0x4061ea++,_0x31dfbb++,_0x51f18d['push'](_0x1a4f65);else{if(_0x58b337['isRemoved']&&_0x1a4f65['isAdded']){const {commonTape:_0x3a92f8,iEnd:_0x1ea902,jEnd:_0x679bbd}=this['_threeWayMerge'](_0xb6e284,_0x4061ea,_0x85379a,_0x31dfbb);_0x51f18d=_0x51f18d['concat'](_0x3a92f8),_0x4061ea=_0x1ea902,_0x31dfbb=_0x679bbd;}else _0x58b337['isRemoved']?(_0x31dfbb++,_0x51f18d['push'](_0x58b337)):(_0x4061ea++,_0x51f18d['push'](_0x1a4f65));}}return _0x51f18d;}['_markSuggestions'](_0x531dcf,_0x2e8209){const _0x2fae09=[];for(let _0x88ac1a=0x0;_0x88ac1a<_0x531dcf['length'];_0x88ac1a++){for(let _0x543cf8=0x0;_0x543cf8<_0x531dcf[_0x88ac1a]['markersStart']['length'];_0x543cf8++){const _0x5d8ace=_0x531dcf[_0x88ac1a]['markersStart'][_0x543cf8];if(!_0x2e8209['has'](_0x5d8ace))continue;const {group:_0x3d86ef,type:_0x5808a4,authorId:_0x879ad4}=_0x2e6a7a(_0x5d8ace);'revision-suggestion'!=_0x3d86ef||'insertion'!=_0x5808a4&&'deletion'!=_0x5808a4||(_0x2fae09['unshift']({'type':_0x5808a4,'name':_0x5d8ace,'userId':_0x879ad4}),_0x531dcf[_0x88ac1a]['markersStart']['splice'](_0x543cf8,0x1),_0x543cf8--);}_0x4ab79b(_0x531dcf[_0x88ac1a]);for(let _0x224b75=0x0;_0x224b75<_0x531dcf[_0x88ac1a]['markersEnd']['length'];_0x224b75++){const _0x5461db=_0x531dcf[_0x88ac1a]['markersEnd'][_0x224b75];if(!_0x2e8209['has'](_0x5461db))continue;const {group:_0x567c75,type:_0x53db09}=_0x2e6a7a(_0x5461db);if('revision-suggestion'!=_0x567c75||'insertion'!=_0x53db09&&'deletion'!=_0x53db09)continue;_0x531dcf[_0x88ac1a]['markersEnd']['splice'](_0x224b75,0x1),_0x224b75--;const _0x2309a8=_0x2fae09['findIndex'](_0x27cc8d=>_0x27cc8d['name']==_0x5461db);_0x2309a8>-0x1&&_0x2fae09['splice'](_0x2309a8,0x1);}}function _0x2e6a7a(_0x3b42a0){const _0x4e7845=_0x3b42a0['split'](':');return{'group':_0x4e7845[0x0],'type':_0x4e7845[0x1],'subType':_0x4e7845['length']>=0x5?_0x4e7845[0x2]:null,'id':_0x4e7845['length']<0x5?_0x4e7845[0x2]:_0x4e7845[0x3],'authorId':_0x4e7845['length']<0x5?_0x4e7845[0x3]:_0x4e7845[0x4],'markerCount':0x6==_0x4e7845['length']?_0x4e7845[0x5]:null};}function _0x4ab79b(_0x3887cd){for(let _0x380f1e=0x0;_0x380f1e<_0x2fae09['length'];_0x380f1e++){if(_0x3887cd['isAdded']&&'insertion'==_0x2fae09[_0x380f1e]['type'])return _0x3887cd['isAddSuggestion']=_0x2fae09[_0x380f1e],void delete _0x3887cd['isAdded'];if(!_0x3887cd['isAdded']&&!_0x3887cd['isRemoved']&&'deletion'==_0x2fae09[_0x380f1e]['type'])return void(_0x3887cd['isRemoveSuggestion']=_0x2fae09[_0x380f1e]);}}}['_setDistance'](_0x3a8574,_0xedbcf2){let _0x47d904=0x0,_0x47e1ae=!0x1;const _0x222f6b=new Map();for(const _0x3c568c of _0x3a8574)_0x3c568c[_0xedbcf2]?_0x47e1ae&&(_0x47d904++,_0x47e1ae=!0x1):(_0x47d904++,_0x47e1ae=!0x0),_0x222f6b['set'](_0x3c568c['id'],_0x47d904);for(let _0x195d48=0x0;_0x195d48<_0x3a8574['length'];_0x195d48++){if('isRemoved'==_0xedbcf2&&_0x3a8574[_0x195d48]['isAdded']||'isAdded'==_0xedbcf2&&_0x3a8574[_0x195d48]['isRemoved'])continue;if('text'==_0x3a8574[_0x195d48]['type']){_0x3a8574[_0x195d48]['distance']=0x0;continue;}const _0x40ed1b=_0x222f6b['get'](_0x3a8574[_0x195d48]['pairId']),_0x18227d=_0x222f6b['get'](_0x3a8574[_0x195d48]['id']);_0x3a8574[_0x195d48]['distance']=_0x40ed1b-_0x18227d;}}['_getRevisionsRange'](_0x14409f,_0x44fe48,_0x6e1080=!0x1){const _0x3cad8c=[];let _0x38bd69=this['repository']['getIndex'](_0x14409f),_0x33ace4=this['repository']['getIndex'](_0x44fe48);for(-0x1==_0x33ace4&&(_0x33ace4=this['repository']['_revisions']['length'],_0x6e1080=!0x1);_0x38bd69<_0x33ace4;)_0x3cad8c['push'](this['repository']['getRevision'](_0x38bd69)),_0x38bd69++;return _0x6e1080&&_0x3cad8c['push'](this['repository']['getRevision'](_0x38bd69)),_0x3cad8c;}['_threeWayMerge'](_0x262f74,_0x16e51e,_0x2d53d7,_0x4a2338){const _0x772091=this['editor']['model']['schema'];let _0x12296f=_0x16e51e;for(;_0x262f74[_0x12296f]&&_0x262f74[_0x12296f]['isAdded'];)_0x12296f++;let _0xec34d0=_0x4a2338;for(;_0x2d53d7[_0xec34d0]&&_0x2d53d7[_0xec34d0]['isRemoved'];)_0xec34d0++;_0x240cd9(_0x262f74,_0x16e51e,_0x12296f),_0x240cd9(_0x2d53d7,_0x4a2338,_0xec34d0);const _0x1f1f32=_0x2d53d7['slice'](_0x4a2338,_0xec34d0)['concat'](_0x262f74['slice'](_0x16e51e,_0x12296f));return _0x1f1f32['sort']((_0x340750,_0x1b5d34)=>_0x340750['side']!=_0x1b5d34['side']?_0x340750['side']-_0x1b5d34['side']:_0x340750['level']!=_0x1b5d34['level']?_0x340750['level']-_0x1b5d34['level']:_0x340750['distance']!=_0x1b5d34['distance']?_0x1b5d34['distance']-_0x340750['distance']:!!_0x340750['isAdded']!=!!_0x1b5d34['isAdded']?-0x1==_0x340750['side']||0x0==_0x340750['side']?_0x340750['isAdded']?-0x1:0x1:_0x340750['isAdded']?0x1:-0x1:_0x340750['index']-_0x1b5d34['index']),{'commonTape':_0x1f1f32,'iEnd':_0x12296f,'jEnd':_0xec34d0};function _0x240cd9(_0x1b292b,_0x3cb26e,_0x211cca){let _0x207bab=-0x1,_0x2bd570=Number['POSITIVE_INFINITY'],_0x2bc75f=!0x0;for(let _0x3f3d2b=_0x3cb26e;_0x3f3d2b<_0x211cca;_0x3f3d2b++)if(_0x772091['isInline'](_0x1b292b[_0x3f3d2b]['item'])||(_0x2bc75f=!0x1),_0x1b292b[_0x3f3d2b]['item']['startIndex']<_0x3cb26e&&(_0x207bab=_0x3f3d2b),_0x1b292b[_0x3f3d2b]['item']['endIndex']>=_0x211cca){_0x2bd570=_0x3f3d2b;break;}_0x2bc75f&&(_0x207bab=_0x211cca-0x1);for(let _0x495e48=_0x3cb26e;_0x495e48<_0x211cca;_0x495e48++)_0x1b292b[_0x495e48]['side']=_0x495e48<=_0x207bab?-0x1:_0x495e48<_0x2bd570?0x0:0x1,_0x1b292b[_0x495e48]['index']=_0x495e48;let _0x148f66=0x0;for(let _0x30b95f=_0x3cb26e;_0x30b95f<=_0x207bab;_0x30b95f++)0x0==_0x1b292b[_0x30b95f]['distance']?_0x1b292b[_0x30b95f]['level']=_0x148f66:(_0x148f66++,_0x1b292b[_0x30b95f]['level']=_0x148f66,_0x148f66++);for(let _0x112304=_0x3cb26e;_0x112304<_0x211cca;_0x112304++)0x0==_0x1b292b[_0x112304]['side']&&(_0x1b292b[_0x112304]['level']=_0x148f66);_0x148f66=0x0;for(let _0x5018bc=_0x211cca-0x1;_0x5018bc>=_0x2bd570;_0x5018bc--)0x0==_0x1b292b[_0x5018bc]['distance']?_0x1b292b[_0x5018bc]['level']=_0x148f66:(_0x148f66--,_0x1b292b[_0x5018bc]['level']=_0x148f66,_0x148f66--);}}['_fixObsoleteTags'](_0x2aabcd){const _0x570823=new Map(),_0x4125f7=this['editor']['model']['schema'];for(let _0x1c36ba=0x1;_0x1c36ba<_0x2aabcd['length'];_0x1c36ba++){let _0x218dda,_0x53dab6,_0x2013a9;const _0x14771a=_0x2aabcd[_0x1c36ba],_0x464c18=_0x2aabcd[_0x1c36ba-0x1];if('text'==_0x14771a['type'])continue;if(_0x14771a['type']!=_0x464c18['type'])continue;if(!_0x4125f7['isBlock'](_0x464c18['item'])||_0x4125f7['isLimit'](_0x464c18['item']))continue;if(!_0x4125f7['isBlock'](_0x14771a['item'])||_0x4125f7['isLimit'](_0x14771a['item']))continue;if((_0x2aabcd[_0x1c36ba]['isAdded']||_0x2aabcd[_0x1c36ba]['isAddSuggestion'])&&_0x2aabcd[_0x1c36ba-0x1]['isRemoved'])_0x218dda=_0x2aabcd[_0x1c36ba],_0x53dab6=_0x2aabcd[_0x1c36ba-0x1],_0x2013a9=_0x1c36ba-0x1;else{if(!_0x2aabcd[_0x1c36ba]['isRemoved']||!_0x2aabcd[_0x1c36ba-0x1]['isAdded']&&!_0x2aabcd[_0x1c36ba-0x1]['isAddSuggestion'])continue;_0x218dda=_0x2aabcd[_0x1c36ba-0x1],_0x53dab6=_0x2aabcd[_0x1c36ba],_0x2013a9=_0x1c36ba;}const _0x2abf49=_0x218dda['level']==_0x53dab6['level'],_0xe31fb9=Math['abs'](_0x218dda['level'])<Math['abs'](_0x53dab6['level'])&&0x0==_0x53dab6['distance'];(_0x2abf49||_0xe31fb9)&&(_0x570823['set'](_0x53dab6['id'],_0x218dda['id']),_0x2aabcd['splice'](_0x2013a9,0x1),_0x1c36ba--,_0x218dda['isAdded']=!0x1);}for(let _0x19df16=0x0;_0x19df16<_0x2aabcd['length'];_0x19df16++)_0x570823['has'](_0x2aabcd[_0x19df16]['pairId'])&&(_0x2aabcd[_0x19df16]['pairId']=_0x570823['get'](_0x2aabcd[_0x19df16]['pairId']));}['_removeMissingPairs'](_0x56da8f){const _0x905f90=new Set(_0x56da8f['map'](_0x20d8d4=>_0x20d8d4['id']));for(let _0xca60eb=0x0;_0xca60eb<_0x56da8f['length'];_0xca60eb++)_0x905f90['has'](_0x56da8f[_0xca60eb]['pairId'])||0x0==_0x56da8f[_0xca60eb]['distance']||(_0x56da8f[_0xca60eb]['isIncorrect']=!0x0);return _0x56da8f['filter'](_0x3eeaba=>!_0x3eeaba['isIncorrect']);}['_markMismatchedRemovedTags'](_0x1a5492){const _0x5d61c5=new Set();for(let _0x429462=0x0;_0x429462<_0x1a5492['length'];_0x429462++){if(_0x5d61c5['has'](_0x1a5492[_0x429462]['id'])&&_0x1a5492[_0x429462]['isRemoved']&&(_0x1a5492[_0x429462]['isIncorrect']=!0x0),_0x1a5492[_0x429462]['isIncorrect'])continue;if(0x0==_0x1a5492[_0x429462]['distance'])continue;if('elementStart'!=_0x1a5492[_0x429462]['type'])continue;if(null==_0x1a5492[_0x429462]['pairId'])continue;let _0x2dc4dc=_0x429462+0x1,_0x58530c=0x0;for(;_0x1a5492[_0x2dc4dc]['id']!=_0x1a5492[_0x429462]['pairId'];)'elementStart'==_0x1a5492[_0x2dc4dc]['type']?_0x58530c++:'elementEnd'==_0x1a5492[_0x2dc4dc]['type']&&_0x58530c--,_0x2dc4dc++;if(0x0!=_0x58530c){if(_0x1a5492[_0x429462]['isRemoved'])_0x1a5492[_0x429462]['isIncorrect']=!0x0;else{for(;_0x2dc4dc!=_0x429462;)_0x1a5492[_0x2dc4dc]['isRemoved']&&0x0!=_0x1a5492[_0x2dc4dc]['distance']&&(_0x1a5492[_0x2dc4dc]['isIncorrect']=!0x0,_0x5d61c5['add'](_0x1a5492[_0x2dc4dc]['pairId'])),_0x2dc4dc--;}}}return _0x1a5492['filter'](_0x1aece9=>!_0x1aece9['isIncorrect']);}['_removeUnsupportedChanges'](_0x53922e){const _0x3d6fc2=this['editor']['model']['schema'];for(let _0x448aba=0x0;_0x448aba<_0x53922e['length'];_0x448aba++){if(!(_0x53922e[_0x448aba]['isAdded']||_0x53922e[_0x448aba]['isAddSuggestion']||_0x53922e[_0x448aba]['isRemoved']||_0x53922e[_0x448aba]['isRemoveSuggestion']))continue;if(0x0==_0x53922e[_0x448aba]['distance'])continue;const _0x3e6b53=_0x53922e[_0x448aba]['item'];_0x3d6fc2['isBlock'](_0x3e6b53)||_0x3d6fc2['isLimit'](_0x3e6b53)||(_0x53922e[_0x448aba]['isAdded']&&delete _0x53922e[_0x448aba]['isAdded'],_0x53922e[_0x448aba]['isAddSuggestion']&&delete _0x53922e[_0x448aba]['isAddSuggestion'],_0x53922e[_0x448aba]['isRemoveSuggestion']&&delete _0x53922e[_0x448aba]['isRemoveSuggestion'],_0x53922e[_0x448aba]['isRemoved']&&(_0x53922e[_0x448aba]['isIncorrect']=!0x0));}return _0x53922e['filter'](_0x12abaf=>!_0x12abaf['isIncorrect']);}['_makeModelFromTape'](_0x5f1e7b,_0x26bef3,_0x429c85){const _0x159847=new gt(),_0x4a02c4=[],_0x4038ae=new Map(),_0x4f36ff=this['editor']['model'],_0x247a84=_0x4f36ff['schema'],_0x5890aa=[_0x159847],_0x2fe9a2={},_0x28faa1={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x259ea1=null;const _0x1675a5=[0x0];for(let _0x2a25f9=0x0;_0x2a25f9<_0x5f1e7b['length'];_0x2a25f9++)if('elementStart'===_0x5f1e7b[_0x2a25f9]['type']){_0x5f1e7b[_0x2a25f9]['previousPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5);const _0x3487ab=new ut(_0x5f1e7b[_0x2a25f9]['item']['name'],_0x5f1e7b[_0x2a25f9]['item']['getAttributes']());_0x5890aa[0x0]['_appendChild'](_0x3487ab),_0x1675a5['push'](0x0),_0x5890aa['unshift'](_0x3487ab),_0x5f1e7b[_0x2a25f9]['nextPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5);}else'elementEnd'===_0x5f1e7b[_0x2a25f9]['type']?(_0x5890aa['shift'](),_0x5f1e7b[_0x2a25f9]['previousPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5),_0x1675a5['pop'](),_0x1675a5[_0x1675a5['length']-0x1]++,_0x5f1e7b[_0x2a25f9]['nextPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5)):(_0x5f1e7b[_0x2a25f9]['previousPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5),_0x259ea1?_0x259ea1['_data']+=_0x5f1e7b[_0x2a25f9]['item']['data']:_0x259ea1=new wt(_0x5f1e7b[_0x2a25f9]['item']['data'],_0x5f1e7b[_0x2a25f9]['item']['getAttributes']()),_0x5f1e7b[_0x2a25f9+0x1]&&'text'===_0x5f1e7b[_0x2a25f9+0x1]['type']&&_0x46b277(_0x259ea1,_0x5f1e7b[_0x2a25f9+0x1]['item'])||(_0x5890aa[0x0]['_appendChild'](_0x259ea1),_0x259ea1=null),_0x1675a5[_0x1675a5['length']-0x1]+=_0x5f1e7b[_0x2a25f9]['item']['offsetSize'],_0x5f1e7b[_0x2a25f9]['nextPosition']=_0x4f36ff['createPositionFromPath'](_0x159847,_0x1675a5));for(let _0x4daca8=0x0;_0x4daca8<_0x5f1e7b['length'];_0x4daca8++){const _0x553fe2=_0x5f1e7b[_0x4daca8]['previousPosition'],_0x14aa35=_0x5f1e7b[_0x4daca8]['nextPosition'];for(const _0x54cea3 of _0x5f1e7b[_0x4daca8]['markersStart'])_0x4038ae['set'](_0x54cea3,{'start':_0x553fe2,'end':null});_0x4c85cd('isRemoveSuggestion',_0x4daca8,_0x553fe2,_0x14aa35),_0x4c85cd('isAddSuggestion',_0x4daca8,_0x553fe2,_0x14aa35),_0x4c85cd('isRemoved',_0x4daca8,_0x553fe2,_0x14aa35),_0x4c85cd('isAdded',_0x4daca8,_0x553fe2,_0x14aa35);for(const _0x373e1b of _0x5f1e7b[_0x4daca8]['markersEnd']){_0x4038ae['get'](_0x373e1b)['end']=_0x14aa35;}}for(const [_0x318716,_0x314ef5]of _0x4038ae){const _0x3f2940=this['editor']['model']['createRange'](_0x314ef5['start'],_0x314ef5['end']);_0x159847['markers']['set'](_0x318716,_0x3f2940);}return _0x4a02c4['sort']((_0x420dc9,_0x7c8e1d)=>{const _0x22d99c=_0x159847['markers']['get']('revision:'+_0x420dc9['id']),_0x1c2640=_0x159847['markers']['get']('revision:'+_0x7c8e1d['id']);return _0x22d99c['start']['isBefore'](_0x1c2640['start'])?-0x1:_0x22d99c['start']['isAfter'](_0x1c2640['start'])?0x1:_0x22d99c['end']['isBefore'](_0x1c2640['end'])?-0x1:_0x22d99c['end']['isAfter'](_0x1c2640['end'])?0x1:'add'===_0x420dc9['type']?-0x1:0x1;}),{'root':_0x159847,'changes':_0x4a02c4};function _0x4c85cd(_0x18d241,_0x2a655f,_0x474fb6,_0x25cdbd){const _0x5b234b=!!_0x5f1e7b[_0x2a655f][_0x18d241],_0x4a8126=_0x5b234b?_0x5f1e7b[_0x2a655f][_0x18d241]['userId']:null,_0x32c7a5=_0x2a655f===_0x5f1e7b['length']-0x1,_0x8389b2=_0x28faa1[_0x18d241][0x0],_0x437a72=_0x247a84['isObject'](_0x5f1e7b[_0x2a655f]['item']);!_0x2fe9a2[_0x18d241]&&_0x5b234b?_0x2fe9a2[_0x18d241]={'start':_0x474fb6,'tapeItem':_0x5f1e7b[_0x2a655f],'userId':_0x4a8126,'type':_0x18d241}:_0x2fe9a2[_0x18d241]&&!_0x5b234b?(_0x2fe9a2[_0x18d241]['end']=_0x474fb6,_0x29aa09(_0x2fe9a2[_0x18d241]),_0x2fe9a2[_0x18d241]=null):_0x2fe9a2[_0x18d241]&&_0x5b234b&&_0x2fe9a2[_0x18d241]['userId']!==_0x4a8126&&(_0x2fe9a2[_0x18d241]['end']=_0x474fb6,_0x8389b2&&_0x8389b2['userId']===_0x2fe9a2[_0x18d241]['userId']||_0x29aa09(_0x2fe9a2[_0x18d241]),_0x2fe9a2[_0x18d241]={'start':_0x474fb6,'tapeItem':_0x5f1e7b[_0x2a655f],'userId':_0x4a8126,'type':_0x18d241}),_0x2fe9a2[_0x18d241]&&_0x437a72&&('elementStart'!==_0x5f1e7b[_0x2a655f]['type']||_0x8389b2&&_0x8389b2['userId']===_0x4a8126||_0x28faa1[_0x18d241]['unshift']({'userId':_0x4a8126,'object':_0x5f1e7b[_0x2a655f]['item'],'change':_0x2fe9a2[_0x18d241]}),'elementEnd'===_0x5f1e7b[_0x2a655f]['type']&&_0x8389b2&&_0x8389b2['object']===_0x5f1e7b[_0x2a655f]['item']&&(_0x28faa1[_0x18d241]['shift'](),_0x2fe9a2[_0x18d241]=_0x8389b2['change'])),_0x2fe9a2[_0x18d241]&&_0x32c7a5&&(_0x2fe9a2[_0x18d241]['end']=_0x25cdbd,_0x29aa09(_0x2fe9a2[_0x18d241]),_0x2fe9a2[_0x18d241]=null);}function _0x29aa09({start:_0x3eadbf,end:_0x45076b,tapeItem:_0x464176,userId:_0x25902e,type:_0xe5c666}){const _0xb37a8e=_0x464176['item'],_0x145d79=_0x4f36ff['schema']['isBlock'](_0xb37a8e)&&!_0x4f36ff['schema']['isLimit'](_0xb37a8e),_0x27819c=_0x3eadbf['nodeAfter']==_0x45076b['parent']&&_0x45076b['isAtStart'];if(_0x145d79&&_0x27819c)return;const _0x5f311b=_0x4f36ff['createRange'](_0x3eadbf,_0x45076b),_0xc095de=_0x26bef3['get'](_0x25902e),_0x5c150a=new r({'author':_0xc095de,'type':'isAdded'==_0xe5c666||'isAddSuggestion'==_0xe5c666?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0xe5c666||'isRemoveSuggestion'==_0xe5c666},'createdAt':new Date(),'rootName':_0x429c85});_0x4a02c4['push'](_0x5c150a),_0x159847['markers']['set']('revision:'+_0x5c150a['id'],_0x5f311b);}function _0x46b277(_0x18318d,_0x47745f){const _0x51cb22=_0x18318d['getAttributes'](),_0x4fb279=_0x47745f['getAttributes']();for(const _0x754222 of _0x51cb22){if(_0x754222[0x1]!==_0x47745f['getAttribute'](_0x754222[0x0]))return!0x1;_0x4fb279['next']();}return _0x4fb279['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x52e890=>{const _0x480ee7=_0x52e890['markerName']['split'](':')[0x1],_0x513de4=this['_getChangeFromId'](_0x480ee7);if(!_0x513de4)return null;const _0x5215e1='add'==_0x513de4['type']?'insertion':'deletion',_0x1c118f=['ck-suggestion-marker','ck-suggestion-marker-'+_0x5215e1];return _0x513de4['data']['isSuggestion']&&_0x1c118f['push']('ck-suggestion-marker-'+_0x5215e1+'-new'),this['activeChange']==_0x513de4&&_0x1c118f['push']('ck-suggestion-marker--active'),{'classes':_0x1c118f,'attributes':{'data-change-id':_0x480ee7}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x464fb4=>{_0x464fb4['on']('element:pre',(_0x18700f,_0x43f014,_0x4777d0)=>{const _0x53b181=_0x43f014['viewItem']['getChild'](0x0);if(!_0x53b181||!_0x53b181['is']('element','code'))return;if(!_0x4777d0['consumable']['consume'](_0x53b181,{'attributes':['vid_start','vid_end']}))return;const _0x2fd153=_0x43f014['modelRange']['start']['nodeAfter'];_0x4777d0['writer']['setAttribute']('vid_start',_0x53b181['getAttribute']('vid_start'),_0x2fd153),_0x4777d0['writer']['setAttribute']('vid_end',_0x53b181['getAttribute']('vid_end'),_0x2fd153);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x3ee968=>{_0x3ee968['on']('element',(_0x71eef,_0x2eeb3b,_0x4ed0bc)=>{if(!_0x4ed0bc['consumable']['consume'](_0x2eeb3b['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x2eeb3b['modelRange']['isCollapsed'])return;const _0x1e0a8f=_0x2eeb3b['modelRange']['start']['nodeAfter'];_0x1e0a8f['hasAttribute']('vid_start')||_0x1e0a8f['hasAttribute']('vid')||(_0x4ed0bc['writer']['setAttribute']('vid_start',_0x2eeb3b['viewItem']['getAttribute']('vid_start'),_0x1e0a8f),_0x4ed0bc['writer']['setAttribute']('vid_end',_0x2eeb3b['viewItem']['getAttribute']('vid_end'),_0x1e0a8f));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x2833a9=>_0x2833a9['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x523e47,[,_0x46ad70])=>{['vid_start','vid_end','vid']['includes'](_0x46ad70)&&(_0x523e47['return']=!0x0,_0x523e47['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x17b594=>{_0x17b594['on']('attribute:vid',(_0x5853b6,_0x524747,_0x2ff261)=>{if('\x20'!=_0x524747['item']['data']||_0x524747['item']['parent']['maxOffset']>0x1)return;if(!_0x2ff261['consumable']['consume'](_0x524747['item'],_0x5853b6['name']))return;const _0x35e011=_0x2ff261['writer'],_0x2b6bcd=_0x2ff261['mapper']['toViewRange'](_0x524747['range']);_0x35e011['wrap'](_0x2b6bcd,_0x35e011['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x177ad5){const _0x1d07f0=_0x177ad5['plugins']['get']('RevisionViewer');return(_0x2743c5,_0x30c1da,_0x5c6b9a)=>{const _0x439252=_0x30c1da['markerName']['split'](':')[0x1],_0x302161=_0x1d07f0['_getChangeFromId'](_0x439252);if(!_0x302161)return null;const _0x35364f='add'==_0x302161['type']?'split':'merge';if(!_0x5c6b9a['consumable']['test'](_0x30c1da['markerRange'],_0x2743c5['name']))return;const _0x367729=_0x30c1da['markerRange']['getWalker'](),_0x5d9e43=_0x30c1da['markerRange']['start'],_0x516552=_0x177ad5['model']['schema'];let _0x372e6f=null,_0x3a824a=null,_0x32a119=!0x1,_0x27d35e=!0x1;for(const _0x5efd6f of _0x367729){const _0x3fcecc=_0x5efd6f['item'];_0x32a119=_0x32a119||_0x516552['isContent'](_0x3fcecc);const _0x5a7c1e=_0x5c6b9a['mapper']['toViewElement'](_0x3fcecc);if(_0x5a7c1e&&_0x5a7c1e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5efd6f['type']&&(_0x516552['isBlock'](_0x3fcecc)&&!_0x516552['isLimit'](_0x3fcecc)&&(_0x3fcecc['nextSibling']||_0x5d9e43['isAtEnd']?_0x372e6f&&_0x372e6f['parent']==_0x3fcecc||(_0x372e6f=_0x3fcecc,_0x20bde5(_0x5efd6f['previousPosition']),_0x27d35e=!0x0):_0x3a824a=_0x3a824a||_0x5efd6f['previousPosition']));}function _0x20bde5(_0x1bc634){const _0x4f6caa=_0x5c6b9a['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x35364f}),_0xb25aea=_0x5c6b9a['mapper']['toViewPosition'](_0x1bc634);_0x302161['data']['isSuggestion']&&_0x5c6b9a['writer']['addClass']('ck-suggestion-marker-'+_0x35364f+'-new',_0x4f6caa),_0x1d07f0['activeChange']==_0x302161&&_0x5c6b9a['writer']['addClass']('ck-suggestion-marker--active',_0x4f6caa),_0x5c6b9a['writer']['insert'](_0xb25aea,_0x4f6caa),_0x5c6b9a['mapper']['bindElementToMarker'](_0x4f6caa,_0x30c1da['markerName']);}_0x32a119||_0x27d35e||!_0x3a824a||_0x20bde5(_0x3a824a);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x5be975,_0x3c82d0,_0x5e7103)=>{const _0x48bd33=_0x5e7103['mapper']['markerNameToElements'](_0x3c82d0['markerName']);if(_0x48bd33){for(const _0x3b7582 of _0x48bd33)(_0x3b7582['hasClass']('ck-suggestion-marker-split')||_0x3b7582['hasClass']('ck-suggestion-marker-merge'))&&(_0x5e7103['mapper']['unbindElementFromMarkerName'](_0x3b7582,_0x3c82d0['markerName']),_0x5e7103['writer']['remove'](_0x3b7582));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x38bae5,_0x835d12,_0x5d3794)=>{const _0x223e2d=_0x835d12['markerName']['split'](':')[0x1],_0x5e1a3a=this['_getChangeFromId'](_0x223e2d);if(!_0x5e1a3a)return null;const _0x4fe502='add'==_0x5e1a3a['type']?'split':'merge';if(_0x5d3794['consumable']['test'](_0x835d12['markerRange'],_0x38bae5['name']))for(const _0x23dedc of _0x835d12['markerRange']['getItems']()){if(!_0x23dedc['is']('element','softBreak'))continue;const _0x2b6586=_0x5d3794['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4fe502}),_0x4922ee=_0x5d3794['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x23dedc));_0x5e1a3a['data']['isSuggestion']&&_0x5d3794['writer']['addClass']('ck-suggestion-marker-'+_0x4fe502+'-new',_0x2b6586),this['activeChange']==_0x5e1a3a&&_0x5d3794['writer']['addClass']('ck-suggestion-marker--active',_0x2b6586),_0x5d3794['writer']['insert'](_0x4922ee,_0x2b6586),_0x5d3794['mapper']['bindElementToMarker'](_0x2b6586,_0x835d12['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3788f2=>{for(const _0x5eb240 of this['editor']['model']['document']['getRootNames']()){const _0x35f3fa=this['editor']['model']['document']['getRoot'](_0x5eb240),_0x2f4e97=this['editor']['editing']['view']['document']['getRoot'](_0x5eb240);if(_0x2f4e97){const _0x4526cb=_0x35f3fa['getAttribute']('revisionHistoryAttachChange');if(_0x3788f2['removeAttribute']('data-change-id',_0x2f4e97),_0x3788f2['removeClass']('ck-revision-history-root-add',_0x2f4e97),_0x3788f2['removeClass']('ck-revision-history-root-remove',_0x2f4e97),_0x3788f2['removeClass']('ck-revision-history-root--active',_0x2f4e97),_0x4526cb){const _0x20f37f=this['_getChangeFromId'](_0x4526cb);if(!_0x20f37f)return null;_0x3788f2['setAttribute']('data-change-id',_0x4526cb,_0x2f4e97),_0x3788f2['addClass']('ck-revision-history-root-'+_0x20f37f['type'],_0x2f4e97),this['activeChange']==_0x20f37f&&_0x3788f2['addClass']('ck-revision-history-root--active',_0x2f4e97);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x40811b=>'revision-comment:'+_0x40811b,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x76e760=>'revision-suggestion:'+_0x76e760,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x403643=>({'name':'suggestion:'+_0x403643,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x32f34d=>{const _0x24ba1c=_0x32f34d['markerName']['split'](':')[0x1];return'insertion'!=_0x24ba1c&&'deletion'!=_0x24ba1c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x24ba1c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1738e2,_0x819112,_0x592962)=>{const _0x1e1c5b=_0x592962['mapper']['markerNameToElements'](_0x819112['markerName']);if(_0x1e1c5b){for(const _0x2c0f6e of _0x1e1c5b)_0x2c0f6e['is']('uiElement')&&(_0x592962['mapper']['unbindElementFromMarkerName'](_0x2c0f6e,_0x819112['markerName']),_0x592962['writer']['remove'](_0x2c0f6e));}},{'priority':'high'});}['_getChangeFromId'](_0x4a9e0d){return this['_changeIdToChange']['get'](_0x4a9e0d);}['_getViewForChange'](_0x1ca68e){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x1ca68e),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x2883dd,_0x313a9c,_0x22eb32,_0x3e2ad3)=>{_0x3e2ad3&&this['_balloon']['remove'](_0x3e2ad3),_0x22eb32&&(this['_balloon']['add']({'view':_0x22eb32,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2a9566=this['editor']['editing'],_0x3dbb5f=this['_getChangeFromId'](_0x22eb32['changeId']);let _0x492f62;if(_0x3dbb5f['data']['isOnRoot']){const _0x39ec8b=_0x2a9566['view']['getDomRoot'](_0x3dbb5f['rootName']);_0x492f62=Array['from'](_0x39ec8b['getClientRects']());}else{const _0x5ac01d=this['editor']['model']['markers']['get']('revision:'+_0x22eb32['changeId']);_0x492f62=Array['from'](_0x2a9566['mapper']['markerNameToElements'](_0x5ac01d['name']))['map'](_0x452e00=>_0x2a9566['view']['domConverter']['mapViewToDom'](_0x452e00))['map'](_0x56b8f9=>Array['from'](_0x56b8f9['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x492f62[0x0];return _0x492f62['find'](_0x7a66d7=>_0x7a66d7['top']-0x3<=this['_activeViewTarget']['y']&&_0x7a66d7['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x7a66d7['left']-0x3<=this['_activeViewTarget']['x']&&_0x7a66d7['right']+0x3>=this['_activeViewTarget']['x'])||_0x492f62[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x55856b,_0x247348,_0x26e1bb,_0x240f79)=>{this['activeView']=_0x26e1bb?this['_getViewForChange'](_0x26e1bb):null,this['editor']['model']['change'](()=>{const _0x31b4e7=this['editor']['editing'];_0x240f79&&(_0x240f79['data']['isOnRoot']?_0x31b4e7['view']['change'](_0xe22413=>{_0xe22413['removeClass']('ck-revision-history-root--active',_0x31b4e7['view']['document']['getRoot'](_0x240f79['rootName']));}):_0x31b4e7['reconvertMarker']('revision:'+_0x240f79['id'])),_0x26e1bb&&(_0x26e1bb['data']['isOnRoot']?_0x31b4e7['view']['change'](_0x15f9db=>{_0x15f9db['addClass']('ck-revision-history-root--active',_0x31b4e7['view']['document']['getRoot'](_0x26e1bb['rootName']));}):_0x31b4e7['reconvertMarker']('revision:'+_0x26e1bb['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x50a1a4,_0x4daf6f)=>{if(this['activeChange'])return;const _0x616eae=this['_findChangeIdFromDomTarget'](_0x4daf6f['target']),_0x436273=this['_changeIdToChange']['get'](_0x616eae);_0x436273?(this['_activeViewTarget']={'x':_0x4daf6f['domEvent']['x'],'y':_0x4daf6f['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x436273)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3c4ccb,_0x28a200)=>{const _0x553b05=this['_findChangeIdFromDomTarget'](_0x28a200['target']),_0x417f39=this['_changeIdToChange']['get'](_0x553b05);_0x417f39?(this['_activeViewTarget']={'x':_0x28a200['domEvent']['x'],'y':_0x28a200['domEvent']['y']},_0x417f39===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x417f39):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x36cddd){do{const _0x17a82e=_0x36cddd['getAttribute']('data-change-id');if(_0x17a82e)return _0x17a82e;_0x36cddd=_0x36cddd['parent'];}while(_0x36cddd);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x21d83e=>{for(const _0xe42930 of this['editor']['model']['markers'])_0x21d83e['removeMarker'](_0xe42930);});}}function Z(_0x1acffd,_0x32350e){return(_0x5b5755,_0x5576f2,_0x462cec)=>{if(!_0x462cec['consumable']['test'](_0x5576f2['markerRange'],_0x5b5755['name']))return;const _0x1089a7=_0x5576f2['markerRange']['getWalker'](),_0x4d627b=_0x5576f2['markerRange']['start'],_0x348142=_0x1acffd['model']['schema'];let _0x50ad1c=null,_0x44c47b=null,_0x45c02e=!0x1,_0x13985d=!0x1;for(const _0x32785d of _0x1089a7){const _0x272259=_0x32785d['item'];_0x45c02e=_0x45c02e||_0x348142['isContent'](_0x272259);const _0x4cf3ff=_0x462cec['mapper']['toViewElement'](_0x272259);if(_0x4cf3ff&&_0x4cf3ff['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x32785d['type']&&(_0x348142['isBlock'](_0x272259)&&!_0x348142['isLimit'](_0x272259)&&(_0x272259['nextSibling']||_0x4d627b['isAtEnd']?_0x50ad1c&&_0x50ad1c['parent']==_0x272259||(_0x50ad1c=_0x272259,_0x29776c(_0x32785d['previousPosition']),_0x13985d=!0x0):_0x44c47b=_0x44c47b||_0x32785d['previousPosition']));}function _0x29776c(_0x133532){const _0xb62879=_0x462cec['mapper']['toViewPosition'](_0x133532),_0x17b3bd=_0x462cec['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x32350e});_0x462cec['writer']['insert'](_0xb62879,_0x17b3bd),_0x462cec['mapper']['bindElementToMarker'](_0x17b3bd,_0x5576f2['markerName']);}_0x45c02e||_0x13985d||!_0x44c47b||_0x29776c(_0x44c47b);};}class _t extends _0x474bc6{constructor(_0x90eaee){super(_0x90eaee);const _0x22953f=_0x90eaee['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x22953f,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x22953f,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x4408f6=this['editor'],_0x10ddee=_0x4408f6['plugins']['get'](d),_0x510847=_0x10ddee['isReady']?_0x10ddee['diff']['newRevisionId']:null;_0x4408f6['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x510847);}['refresh'](){const {isReady:_0x3811cb,isEnabled:_0x5a44f2,repository:_0x3c1fbd,diff:_0x46559a}=this['editor']['plugins']['get'](d),_0x2d2da3=_0x46559a&&_0x3c1fbd['getLaterVisibleRevision'](_0x46559a['newRevisionId']);this['isEnabled']=_0x3811cb&&_0x5a44f2&&Boolean(_0x2d2da3);}}class yt extends _0x474bc6{['_step'];constructor(_0x46a9a5,{direction:_0x243c19}){super(_0x46a9a5);const _0x94cccb=_0x46a9a5['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x243c19?0x1:-0x1,this['listenTo'](_0x94cccb,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x94cccb,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x94cccb,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x25886c=this['editor'],_0x25e932=_0x25886c['plugins']['get'](d),{isNavigationMode:_0x31fcd8,currentChangeNumber:_0x3c5f51}=_0x25e932;let _0x253bdb;if(_0x25e932['activeChange']=_0x31fcd8?_0x25e932['diff']['changes']['get'](_0x3c5f51+this['_step']):_0x25e932['diff']['changes']['first'],_0x25e932['activeChange']['data']['isOnRoot'])_0x253bdb=_0x25886c['editing']['view']['getDomRoot'](_0x25e932['activeChange']['rootName']);else{const _0x108ae5=_0x25886c['model']['markers']['get']('revision:'+_0x25e932['activeChange']['id']);_0x253bdb=_0x26f880(_0x25886c['editing'],_0x108ae5);}_0x42da1f({'target':_0x253bdb,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x26441a,currentChangeNumber:_0x241f99,numberOfChanges:_0x2d76df,isReady:_0x5d215c,isEnabled:_0x525ae8}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x525ae8&&_0x5d215c&&_0x2d76df)&&(!_0x26441a||(0x1===this['_step']?_0x241f99<_0x2d76df-0x1:_0x241f99>0x0));}}class _i extends _0x377738{constructor(_0x41611a){super(_0x41611a);const _0xd4a28e=this['bindTemplate'],_0x59d4f3=new _0x4cea6e(_0x41611a),_0x5d4660=new _0x4cea6e(_0x41611a);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',(_0x4e9b56,_0x31dd9d)=>_0x4e9b56&&_0x31dd9d>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x282be3,_0x43eb86,_0x393f92,_0xa66011)=>{if(!_0x282be3)return m(_0x41611a,'Loading...');if(!_0x393f92)return m(_0x41611a,'No\x20changes');const _0x4db490=m(_0x41611a,'NUMBER_OF_CHANGES',_0x393f92);return _0xa66011?m(_0x41611a,'X_OF_Y_CHANGES',[_0x43eb86+0x1,_0x393f92]):_0x4db490;}),_0x59d4f3['set']({'label':m(_0x41611a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x47c9dd}),_0x5d4660['set']({'label':m(_0x41611a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x35bc15}),_0x59d4f3['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5d4660['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x59d4f3['on']('execute',()=>this['fire']('execute','backward')),_0x5d4660['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',_0xd4a28e['if']('_isStatusLabelVisible','ck-hidden',_0x435cde=>!_0x435cde)]},'children':[{'text':_0xd4a28e['to']('isNavigationMode',_0x133681=>_0x133681?m(_0x41611a,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x41611a,'Total')+':\x20')}]},{'text':_0xd4a28e['to']('_statusText')}]},new _0x36a155(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x59d4f3,_0x5d4660]}]});}}const ce='ck-editor__editable__loading-overlay';class le extends _0x5aa884{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x37d1ae=this['editor']['editing']['view'];_0x37d1ae['change'](_0x462691=>{for(const _0x100645 of _0x37d1ae['document']['roots'])_0x462691['addClass'](ce,_0x100645);});}['hide'](){const _0x53507a=this['editor']['editing']['view'];_0x53507a['change'](_0x2a9106=>{for(const _0x1f5363 of _0x53507a['document']['roots'])_0x2a9106['removeClass'](ce,_0x1f5363);});}}class w extends _0x5aa884{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,le];}['init'](){const _0x20ba26=this['editor'],_0x428b7=_0x20ba26['plugins']['get'](d),_0x1a8a77=_0x20ba26['plugins']['get'](le);_0x20ba26['ui']['componentFactory']['add']('exitToEditing',_0xa98aaf=>{const _0xd321e5=new _0x4cea6e(_0xa98aaf);return _0xd321e5['set']({'label':m(_0xa98aaf,'Back\x20to\x20editing'),'icon':_0x49f4f5,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0xd321e5,'execute',()=>{_0x20ba26['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0xd321e5;}),_0x20ba26['ui']['componentFactory']['add']('restoreRevision',_0x5704ae=>{const _0x24ad13=new _0x4cea6e(_0x5704ae);return _0x24ad13['set']({'label':m(_0x5704ae,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x24ad13['bind']('isEnabled')['to'](_0x20ba26['commands']['get']('restoreRevision')),this['listenTo'](_0x24ad13,'execute',()=>_0x20ba26['execute']('restoreRevision')),_0x24ad13;}),_0x20ba26['ui']['componentFactory']['add']('changesNavigation',_0x23bae6=>{const _0x596251=new _i(_0x23bae6),_0x226cb8=_0x20ba26['commands']['get']('showPreviousChange'),_0x5916a1=_0x20ba26['commands']['get']('showNextChange');return _0x596251['bind']('isBackwardNavigationEnabled')['to'](_0x226cb8,'isEnabled'),_0x596251['bind']('isForwardNavigationEnabled')['to'](_0x5916a1,'isEnabled'),_0x596251['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x428b7),this['listenTo'](_0x596251,'execute',(_0x555d52,_0x1c888c)=>{_0x20ba26['execute']('forward'===_0x1c888c?'showNextChange':'showPreviousChange');}),_0x596251;}),_0x1a8a77['show'](),_0x428b7['on']('change:isReady',(_0x4ecdb5,_0x4cf788,_0xbf015e)=>{_0xbf015e?_0x1a8a77['hide']():_0x1a8a77['show']();});}}class mt extends at{['_resizeObserver']=null;constructor(_0x3d25e6,_0x4bb233){super(_0x3d25e6,_0x4bb233);const _0x38fae1=this['bindTemplate'];this['set']({'label':m(_0x3d25e6,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x3d25e6,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x38fae1['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new pt(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x52b6da=this['fieldView']['element'];this['_tooltipString']=_0x52b6da['scrollWidth']>_0x52b6da['clientWidth']&&_0x52b6da['value']||'';}}class oi extends _0x377738{constructor(_0x35d8f3,_0x5d02ac,_0x315b92){super(_0x35d8f3);const _0x4b1604=new _0x2b341d();_0x4b1604['set']({'content':_0x200d00,'viewBox':'0\x200\x2011\x2010'});const _0x370068=['ck','ck-revision-history-sidebar__revision-author'];_0x315b92&&_0x370068['push']('ck-revision-history-sidebar__revision-author_creator');const _0x42a3ec=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x35d8f3,_0x315b92?'Revision\x20creator':'Revision\x20author')},'children':[_0x4b1604,_0x5d02ac['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x370068},'children':_0x42a3ec});}}function ni(_0x53175c,_0x5405f2){const _0x1cf35d=_0x53175c['bindTemplate'],_0x5e70e7=_0x53175c['locale'],_0x6798bb=_0x28f4b1(_0x5e70e7);_0x6798bb['panelPosition']='sw';const _0x1a6669=function(_0x4bd209,_0x1b0867){const _0x4b4855=function(_0x12e48b,_0x21ae25){const _0x9d5f93=_0x12e48b['locale'],_0x30e9ad={'Compare\x20against\x20selected':m(_0x9d5f93,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x9d5f93,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x9d5f93,'Restore\x20this\x20revision')};return _0x21ae25['map'](_0x1cda99=>{const _0x9516bd=_0x30e9ad[_0x1cda99['name']];return _0x9516bd&&_0x9516bd!==_0x1cda99['name']&&(_0x1cda99['name']=_0x9516bd),_0x1cda99;});}(_0x4bd209,_0x1b0867),_0x47f561=new _0x1056b3();for(const _0x52ae30 of _0x4b4855){const _0x4e4f96={'type':'button','model':new to({'label':_0x52ae30['name'],'class':_0x52ae30['class'],'withText':!0x0,'role':'menuitem','_action':_0x52ae30['action']})};_0x4e4f96['model']['bind']('isEnabled')['to'](_0x4bd209,'isActionsDropdownOpen',_0x24bed2=>'function'!=typeof _0x52ae30['isEnabled']||(!_0x24bed2||_0x52ae30['isEnabled'](_0x4bd209))),_0x47f561['add'](_0x4e4f96);}return _0x47f561;}(_0x53175c,_0x5405f2);return _0x53175c['bind']('isActionsDropdownOpen')['to'](_0x6798bb,'isOpen'),_0x6798bb['buttonView']['set']({'label':m(_0x5e70e7,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2aa713}),_0x6798bb['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1cf35d['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1cf35d['to'](_0x576a41=>_0x576a41['stopPropagation']())}}),_0x6798bb['on']('execute',_0x5d6053=>{_0x53175c['isReady']&&'function'==typeof _0x5d6053['source']['_action']&&_0x5d6053['source']['_action'](_0x53175c);}),_0x27322b(_0x6798bb,_0x1a6669,{'role':'menu'}),_0x6798bb['listenTo'](_0x53175c,'change:isActionsDropdownOpen',(_0x3f5538,_0x1d3b13,_0x4ce8cb)=>{if(_0x4ce8cb)for(const _0x15def3 of _0x6798bb['listView']['items']){const _0x290c63=_0x15def3['children']['first'],_0x2d592a=_0x5405f2['find'](_0x499af3=>_0x499af3['action']===_0x290c63['_action'])['isVisible'];_0x15def3['isVisible']=void 0x0===_0x2d592a||_0x2d592a(_0x53175c);}}),_0x6798bb;}class ai extends/* #__PURE__ -- @preserve */
26
- _0x256f9d(_0x377738){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x51246f,_0x437cec,_0x135607,_0xade236){super(_0x51246f);const _0x1f0934=this['bindTemplate'],_0x35f93a=function(_0x27d79e,_0x11c592){const _0x54a153=Array['from'](_0x11c592['authors'])['filter'](_0x398b4b=>_0x398b4b!=_0x11c592['creator']);return _0x11c592['creator']&&_0x54a153['unshift'](_0x11c592['creator']),_0x54a153['map'](_0x374128=>new oi(_0x27d79e,_0x374128,_0x374128==_0x11c592['creator']));}(_0x51246f,_0x437cec);this['id']=_0x437cec['id'],this['_revision']=_0x437cec,this['_requireRevisionName']=_0xade236,this['bind']('name','createdAt')['to'](_0x437cec),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0xa16b94=>{return _0x4d42b1=_0x51246f['uiLanguage'],(_0x1d8e05=_0xa16b94)['toLocaleDateString'](_0x4d42b1,{'month':'long','day':'numeric'})+',\x20'+_0x1d8e05['toLocaleTimeString'](_0x4d42b1,{'hour':'numeric','minute':'numeric'});var _0x4d42b1,_0x1d8e05;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new mt(_0x51246f,ti),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x4f395d=>_0x4f395d||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x43e683,_0x359b90)=>_0x43e683&&_0x359b90),this['revisionActionsView']=_0x135607&&_0x135607['length']?ni(this,_0x135607):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x1f0934['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x1f0934['if']('isEnabled','ck-disabled',_0x15c2cc=>!_0x15c2cc),_0x1f0934['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x1f0934['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x1f0934['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':_0x1f0934['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':_0x35f93a}]},this['revisionActionsView']],'on':{'click':_0x1f0934['to'](_0x1171fb=>{_0x1171fb['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x2aa71a=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x2aa71a,'change',()=>{this['_requireRevisionName']&&!_0x2aa71a['value']||this['fire']('setName',{'id':this['id'],'name':_0x2aa71a['value']}),_0x2aa71a['value']||(_0x2aa71a['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function vi(_0x22901a,_0x5c879e){const _0x47193b=_0x371ddf['fromJSDate'](_0x22901a)['setLocale'](_0x5c879e),_0x3e0d72=_0x371ddf['local'](),_0x3410df=_0x3e0d72['minus']({'days':0x1})['startOf']('day');let _0x526f71,_0x34f1eb;return _0x47193b['hasSame'](_0x3e0d72,'day')?(_0x526f71=_0x47193b['startOf']('day')['toJSDate'](),_0x34f1eb=_0x47193b['toRelativeCalendar']()):_0x47193b['hasSame'](_0x3410df,'day')?(_0x526f71=_0x3410df['toJSDate'](),_0x34f1eb=_0x47193b['toRelativeCalendar']()):_0x47193b['hasSame'](_0x3e0d72,'week')?(_0x526f71=_0x47193b['startOf']('week')['toJSDate'](),_0x34f1eb=_0x47193b['weekdayLong']||''):_0x47193b['hasSame'](_0x3e0d72,'year')?(_0x526f71=_0x47193b['startOf']('month')['toJSDate'](),_0x34f1eb=_0x47193b['monthLong']||''):(_0x526f71=_0x47193b['startOf']('year')['toJSDate'](),_0x34f1eb=String(_0x47193b['year'])),{'startDate':_0x526f71,'localizedPeriodName':_0x34f1eb};}class mi extends _0x377738{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x5a3979,_0x6ea9b7,_0x30b49c,_0x382e32){super(_0x5a3979);const _0x393f16=vi(_0x6ea9b7,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x6ea9b7,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x30b49c,this['_requireRevisionName']=_0x382e32,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':_0x393f16}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x48c529){const _0x3a8926=new ai(this['locale'],_0x48c529,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x3a8926);}['removeRevision'](_0x120b97){const _0x7001e9=this['revisionViews']['find'](_0x4e600c=>_0x4e600c['id']===_0x120b97['id']);this['revisionViews']['remove'](_0x7001e9);}}class as extends _0x377738{constructor(_0x2fc54d){super(_0x2fc54d);const _0x1881dd=new _0x2b341d();_0x1881dd['content']=_0x5b5e2c,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x1881dd,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x2fc54d,'Revision\x20history')]}]});}}class di extends _0x377738{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1c2c8a,_0x162cf3,_0x3f724c,_0x376f20){super(_0x1c2c8a);const _0x218bd0=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x162cf3,this['_revisionActions']=_0x3f724c,this['_requireRevisionName']=_0x376f20,this['on']('select',(_0x1ba821,_0x305f12)=>{this['fire']('revisionSelected',_0x305f12);}),this['on']('setName',(_0x80fcf,_0x193380)=>{this['fire']('revisionSetName',_0x193380);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new as(_0x1c2c8a),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x218bd0['if']('isEnabled','ck-disabled',_0x1cb711=>!_0x1cb711)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x4ca237 of this['_revisions'])this['_addRevision'](_0x4ca237);this['_revisions']['on']('add',(_0x18eabb,_0x1fc009)=>{this['_addRevision'](_0x1fc009);}),this['_revisions']['on']('remove',(_0x5f3e30,_0x57b9bc)=>{this['_removeRevision'](_0x57b9bc);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x238a37=>_0x238a37['revisionViews']['map'](_0x46adb4=>_0x46adb4))['flat']();}['selectRevision'](_0x5bde22){for(const _0xa144fd of this['revisionViews'])_0x5bde22&&_0x5bde22['id']===_0xa144fd['id']?_0xa144fd['select']():_0xa144fd['deselect']();}['highlightRevisions'](_0x229c88){for(const _0x511cf8 of this['revisionViews'])_0x229c88['some'](({id:_0x418155})=>_0x418155===_0x511cf8['id'])?_0x511cf8['highlight']():_0x511cf8['unhighlight']();}['_addRevision'](_0x564fb8){const _0xde20ad=vi(_0x564fb8['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5065ca=this['timePeriodViews']['get'](0x0);_0x5065ca&&_0x5065ca['startDate']['getTime']()===_0xde20ad['getTime']()||(_0x5065ca=new mi(this['locale'],_0xde20ad,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5065ca)),_0x5065ca['addRevision'](_0x564fb8);}['_removeRevision'](_0x3382a6){const _0x1d7556=vi(_0x3382a6['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x1d7556)['removeRevision'](_0x3382a6);}['_getTimePeriodViewByStartDate'](_0x572623){return this['timePeriodViews']['find'](_0x26d6b7=>_0x26d6b7['startDate']['getTime']()===_0x572623['getTime']());}}class g extends _0x5aa884{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
23
+ import{ObservableMixin as _0x4d6e3b,uid as _0xe821f1,Collection as _0x751bfb,logWarning as _0x30edc3,FocusTracker as _0x3dfb88,KeystrokeHandler as _0xef17d7,scrollViewportToShowTarget as _0x16f493,ResizeObserver as at,ElementReplacer as ht,CKEditorError as _0x1d3755}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x351846,set as _0x168284,unset as _0x4a8a1c,isEqual as _0x5db2c9}from'es-toolkit/compat';import{Plugin as _0x3c80d2,PendingActions as _0x11f700,Command as _0x13f25b,ElementApiMixin as it,Editor as tt}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x442638,getMarkerDomElement as _0x11be06,ConfirmMixin as _0x3a7de8,sanitizeEditorConfig as _0x34b419}from'ckeditor5-collaboration/dist/index.js';import{ViewDocumentFragment as _0x469639,Element as ut,Range as ft,ViewUIElement as _0x5ad08c,ViewRawElement as _0x5f2f31,ViewEmptyElement as _0x50a7fd,ViewAttributeElement as _0x378d02,ViewContainerElement as _0x2901db,Position as vt,ViewText as _0x4ccbca,ViewElement as _0x46c9fc,DocumentFragment as gt,Text as mt}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x3144c0,IconChevronUp as _0x235e6b,IconChevronDown as _0x397ef1,IconUndo as _0x324ce9,IconUser as _0x2de24c,IconThreeVerticalDots as _0x3b66e4}from'@ckeditor/ckeditor5-icons/dist/index.js';import{View as ts,injectCssTransitionDisabler as _0x4d7ad0,submitHandler as _0x190f2f,LabeledFieldView as _0xecce61,createLabeledInputText as _0x5c6c61,createDropdown as _0x3690ba,ListView as _0x594650,ListItemView as _0xbcf656,ButtonView as te,MenuBarMenuView as _0x3d65e2,MenuBarMenuListView as _0x3abd94,MenuBarMenuListItemView as _0x390930,MenuBarMenuListItemButtonView as _0x5a5432,ContextualBalloon as _0x44d490,ToolbarSeparatorView as _0x31e5ea,IconView as _0x39d1e2,addListToDropdown as _0x8d46c2,ViewModel as to,EditorUI as st,normalizeToolbarConfig as ot,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as nt,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as _0x3e1eeb}from'luxon';class h extends/* #__PURE__ -- @preserve */
24
+ _0x4d6e3b(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x4cdef6){super(),this['id']=_0x4cdef6['id']||_0xe821f1(),this['creator']=_0x4cdef6['creator']||null,this['authors']=_0x4cdef6['authors']||[],this['diffData']=_0x4cdef6['diffData']||null,this['toVersion']=_0x4cdef6['toVersion']||0x0,this['fromVersion']=_0x4cdef6['fromVersion']||0x0,this['set']('name',_0x4cdef6['name']||''),this['set']('createdAt',_0x4cdef6['createdAt']||new Date()),this['set']('attributes',_0x4cdef6['attributes']||{});}['setName'](_0x24a9a2){this['_update']({'name':_0x24a9a2});}['setAttribute'](_0x34d126,_0x3918b4){const _0x3bad1f=_0x351846(this['attributes']);_0x168284(_0x3bad1f,_0x34d126,_0x3918b4),this['_update']({'attributes':_0x3bad1f});}['removeAttribute'](_0x3a50b4){const _0x161aa6=_0x351846(this['attributes']);_0x4a8a1c(_0x161aa6,_0x3a50b4),this['_update']({'attributes':_0x161aa6});}['_update'](_0xb80e20,_0x480e7f=!0x1){let _0xc352f3=!0x1;const _0x255335={'id':this['id']},_0x395639=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x2093e0 of _0x395639){const _0x2b1a32=_0xb80e20[_0x2093e0];void 0x0!==_0x2b1a32&&_0x2b1a32!==this[_0x2093e0]&&(this[_0x2093e0]=_0x2b1a32,_0x255335[_0x2093e0]=_0x2b1a32,_0xc352f3=!0x0);}_0xc352f3&&(_0x255335['authors']&&(_0x255335['authorsIds']=_0x255335['authors']['map'](_0x17f09e=>_0x17f09e['id']),delete _0x255335['authors']),this['fire']('_update',_0x255335,_0x480e7f));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x1ff610=>_0x1ff610['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class j extends _0x3c80d2{['_revisions'];static get['requires'](){return[_0x442638];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0xe94349){super(_0xe94349),this['_revisions']=new _0x751bfb();}['afterInit'](){!async function(_0x3a2447){const _0x21d078=_0x2b8107([0x42,0x32,0x30,0x4a,0x45,0x64,0x76,0x69,0x43,0x74,0x4f,0x66,0x4d,0x37,0x6f,0x62,0x57,0x46,0x56,0x5a,0x58,0x6e,0x41,0x68,0x4e,0x35,0x61,0x65,0x55,0x4c,0x49,0x77,0x48,0x70,0x54,0x44,0x4b,0x47,0x50,0x39,0x52,0x34,0x33,0x6d,0x6b,0x71,0x75,0x73,0x79,0x38,0x6c,0x7a,0x63,0x53,0x51,0x67,0x59,0x78,0x72,0x31,0x6a,0x36]),_0x5741c4=0xeb829,_0x13476a=0x1fb1eaf4,_0xa17231=0x1fb689fc^_0x13476a,_0x59c6ee=window[_0x2b8107([0x44,0x61,0x74,0x65])][_0x2b8107([0x6e,0x6f,0x77])](),_0x61585d=_0x3a2447[_0x2b8107([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2e4df4=new window[(_0x2b8107([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35b1e1=>{_0x61585d[_0x2b8107([0x6f,0x6e,0x63,0x65])](_0x2b8107([0x72,0x65,0x61,0x64,0x79]),_0x35b1e1);}),_0x11ca24={[_0x2b8107([0x6b,0x74,0x79])]:_0x2b8107([0x45,0x43]),[_0x2b8107([0x75,0x73,0x65])]:_0x2b8107([0x73,0x69,0x67]),[_0x2b8107([0x63,0x72,0x76])]:_0x2b8107([0x50,0x2d,0x32,0x35,0x36]),[_0x2b8107([0x78])]:_0x2b8107([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]),[_0x2b8107([0x79])]:_0x2b8107([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]),[_0x2b8107([0x61,0x6c,0x67])]:_0x2b8107([0x45,0x53,0x32,0x35,0x36])},_0x4e3086=_0x61585d[_0x2b8107([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2b8107([0x67,0x65,0x74])](_0x2b8107([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3cbccc(){let _0x190c1a,_0x374f72=null,_0x126487=null;try{if(_0x4e3086==_0x2b8107([0x47,0x50,0x4c]))return _0x2b8107([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x190c1a=_0x14721b(),!_0x190c1a)return _0x2b8107([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x190c1a[_0x2b8107([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x126487=_0x1a463b(_0x190c1a[_0x2b8107([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x190c1a[_0x2b8107([0x6a,0x74,0x69])])),await _0x571753()?_0x2ddbfc()?_0x25e35c()?_0x2b8107([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x43658c()?(_0x190c1a[_0x2b8107([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2b8107([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x374f72=_0x51023e(_0x2b8107([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x190c1a[_0x2b8107([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2b8107([0x74,0x72,0x69,0x61,0x6c])&&(_0x374f72=_0x51023e(_0x2b8107([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x34ed88()):_0x2b8107([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2b8107([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2b8107([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x36c3ba){return _0x2b8107([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x25e35c(){const _0x1a8578=[_0x2b8107([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2b8107([0x74,0x72,0x69,0x61,0x6c])][_0x2b8107([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x190c1a[_0x2b8107([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x59c6ee/0x3e8:0xe10*_0xa17231;return _0x190c1a[_0x2b8107([0x65,0x78,0x70])]<_0x1a8578;}function _0x2ddbfc(){const _0x409607=_0x190c1a[_0x2b8107([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x409607)return!0x1;if(_0x409607[_0x2b8107([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b8107([0x2a])))return!0x0;if(_0x409607[_0x2b8107([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b8107([0x52,0x48])))return!0x0;if(_0x409607[_0x2b8107([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b8107([0x52,0x52,0x48]))){if(_0x2578a8())return!0x0;if(_0x3872af()||_0x5581c3())return!0x0;}return!0x1;}function _0x43658c(){const _0x477f00=_0x190c1a[_0x2b8107([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x477f00||0x0==_0x477f00[_0x2b8107([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5bd20d}=new URL(window[_0x2b8107([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x477f00[_0x2b8107([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5bd20d))return!0x0;const _0xc29944=_0x5bd20d[_0x2b8107([0x73,0x70,0x6c,0x69,0x74])](_0x2b8107([0x2e]));return _0x477f00[_0x2b8107([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4c8781=>_0x4c8781[_0x2b8107([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b8107([0x2a])))[_0x2b8107([0x6d,0x61,0x70])](_0x18f83d=>_0x18f83d[_0x2b8107([0x73,0x70,0x6c,0x69,0x74])](_0x2b8107([0x2e])))[_0x2b8107([0x73,0x6f,0x6d,0x65])](_0x20a08d=>_0xc29944[_0x2b8107([0x65,0x76,0x65,0x72,0x79])]((_0x57590a,_0x39a054)=>_0x20a08d[_0x39a054]===_0x57590a||_0x20a08d[_0x39a054]===_0x2b8107([0x2a])));}function _0x34ed88(){return _0x374f72&&_0x126487?new window[(_0x2b8107([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x200404,_0xbaaa2)=>{_0x374f72[_0x2b8107([0x74,0x68,0x65,0x6e])](_0x200404,_0xbaaa2),_0x126487[_0x2b8107([0x74,0x68,0x65,0x6e])](_0x450235=>{_0x450235!=_0x2b8107([0x56,0x61,0x6c,0x69,0x64])&&_0x200404(_0x450235);},_0xbaaa2);}):_0x374f72||_0x126487||_0x2b8107([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1a463b(_0x2881ce,_0x3afea0){return new window[(_0x2b8107([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x189159=>{if(_0xc0390d())return _0x189159(_0x2b8107([0x56,0x61,0x6c,0x69,0x64]));_0x958378(),_0x61585d[_0x2b8107([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2b8107([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4f430c=!0x1;const _0x37a066=_0xe821f1();function _0x1b9385(_0x4d9838){return!!_0x4d9838&&(typeof _0x4d9838===_0x2b8107([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4d9838===_0x2b8107([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4d9838[_0x2b8107([0x74,0x68,0x65,0x6e])]===_0x2b8107([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4d9838[_0x2b8107([0x63,0x61,0x74,0x63,0x68])]===_0x2b8107([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x51073d(_0x2da04c){_0x23d385(_0x2da04c)[_0x2b8107([0x74,0x68,0x65,0x6e])](_0xc67467=>{if(!_0xc67467||_0xc67467[_0x2b8107([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2b8107([0x6f,0x6b]))return _0x2b8107([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x498b7d(_0x5638b9(_0x37a066+_0x3afea0))!=_0xc67467[_0x2b8107([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2b8107([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2b8107([0x56,0x61,0x6c,0x69,0x64]);})[_0x2b8107([0x74,0x68,0x65,0x6e])](_0x201f1f=>(_0x42553b(),_0x201f1f),()=>{const _0x5a996b=_0x1cbca1();return null==_0x5a996b?(_0x42553b(),_0x2b8107([0x56,0x61,0x6c,0x69,0x64])):_0x2b8107(_0x59c6ee-_0x5a996b>(0x3bbd6ef4^_0x13476a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2b8107([0x74,0x68,0x65,0x6e])](_0x189159)[_0x2b8107([0x63,0x61,0x74,0x63,0x68])](()=>{_0x189159(_0x2b8107([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4b509d=0x1f870474^_0x13476a;function _0x42553b(){const _0x15df94=_0x2b8107([0x6c,0x6c,0x63,0x74,0x2d])+_0x498b7d(_0x5638b9(_0x2881ce)),_0x1eacbb=_0x22e0ad(_0x498b7d(window[_0x2b8107([0x4d,0x61,0x74,0x68])][_0x2b8107([0x63,0x65,0x69,0x6c])](_0x59c6ee/_0x4b509d)));window[_0x2b8107([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2b8107([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x15df94,_0x1eacbb);}function _0x1cbca1(){const _0x115c17=_0x2b8107([0x6c,0x6c,0x63,0x74,0x2d])+_0x498b7d(_0x5638b9(_0x2881ce)),_0x4742e4=window[_0x2b8107([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2b8107([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x115c17);return _0x4742e4?window[_0x2b8107([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x22e0ad(_0x4742e4),0x10)*_0x4b509d:null;}function _0x23d385(_0x38e8f1){return new window[(_0x2b8107([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x431b45,_0x274a19)=>{_0x38e8f1[_0x2b8107([0x74,0x68,0x65,0x6e])](_0x431b45,_0x274a19),window[_0x2b8107([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x274a19,0x1fb03e34^_0x13476a);});}}_0x61585d[_0x2b8107([0x6f,0x6e])](_0x2b8107([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2016ff,_0x463db0)=>{if(_0x463db0[0x0]!=_0x2881ce)return _0x189159(_0x2b8107([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x463db0[0x1]={..._0x463db0[0x1],[_0x2b8107([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x37a066};},{[_0x2b8107([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2b8107([0x68,0x69,0x67,0x68])}),_0x61585d[_0x2b8107([0x6f,0x6e])](_0x2b8107([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1969a7=>{_0x1b9385(_0x1969a7[_0x2b8107([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4f430c=!0x0,_0x51073d(_0x1969a7[_0x2b8107([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2b8107([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2b8107([0x6c,0x6f,0x77])}),_0x2e4df4[_0x2b8107([0x74,0x68,0x65,0x6e])](()=>{_0x4f430c||_0x189159(_0x2b8107([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xc0390d(){return _0x61585d[_0x2b8107([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b8107([0x76,0x69,0x65,0x77])][_0x2b8107([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2b8107([0x61,0x75,0x74,0x6f]);}function _0x958378(){_0x61585d[_0x2b8107([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b8107([0x76,0x69,0x65,0x77])][_0x2b8107([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2b8107([0x61,0x75,0x74,0x6f]);}}function _0x51023e(_0x26dc2c){const _0x321683=[new window[(_0x2b8107([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2d3f04=>setTimeout(_0x2d3f04,0x1fb8d438^_0x13476a)),_0x2e4df4[_0x2b8107([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2b8107([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a2798=>{const _0xf91890=0x1fb1eaf3^_0x13476a,_0x50a03f=_0x3a2447[_0x2b8107([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x510e96(){_0x50a03f[_0x2b8107([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0xf91890&&_0x4a2798();}_0x510e96(),_0x50a03f[_0x2b8107([0x6f,0x6e])](_0x2b8107([0x61,0x64,0x64]),_0x510e96);})),new window[(_0x2b8107([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xbca977=>{function _0x3aa53a(){for(const _0x4bce27 in window)if(window[_0x2b8107([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x2b8107([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4bce27))&&window[_0x4bce27]==_0x5741c4)return _0xbca977();_0x61585d[_0x2b8107([0x73,0x74,0x61,0x74,0x65])]!=_0x2b8107([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x2b8107([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3aa53a,0x1fb1f97c^_0x13476a);}_0xc421ec(_0x2b8107([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x3aa53a();})];return window[_0x2b8107([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2b8107([0x72,0x61,0x63,0x65])](_0x321683)[_0x2b8107([0x74,0x68,0x65,0x6e])](()=>_0x26dc2c);}async function _0x1cd075(){if(await _0x2e4df4,_0xc421ec(_0x2b8107([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x501837=_0x3a2447[_0x2b8107([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x537909=_0x3a2447[_0x2b8107([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])](_0x501837[_0x2b8107([0x69,0x64])]),_0x3b67ff=_0xc5146b(_0x2b8107([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x3b67ff[_0x2b8107([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x501837['id'],_0x537909?_0x537909['id']:null,!0x0),_0x3b67ff[_0x2b8107([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x2b8107([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x3b67ff[_0x2b8107([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x3b67ff[_0x2b8107([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3b1ba3,void(_0x3b67ff[_0x2b8107([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3b1ba3);}if(_0xc421ec(_0x2b8107([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x38b631=_0xc5146b(_0x2b8107([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x38b631[_0x2b8107([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x2b8107([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x38b631[_0x2b8107([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x38b631[_0x2b8107([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3b1ba3,_0x38b631[_0x2b8107([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3b1ba3;}_0x61585d[_0x2b8107([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b8107([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3b1ba3,_0x61585d[_0x2b8107([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b8107([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3b1ba3,_0x61585d[_0x2b8107([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2b8107([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2578a8(){return _0xc421ec(_0x2b8107([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xc5146b(_0x2b8107([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2b8107([0x73,0x74,0x61,0x74,0x65])]==_0x2b8107([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3872af(){return _0xc421ec(_0x2b8107([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 _0x5581c3(){return _0xc421ec(_0x2b8107([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5ba856(_0x413d06){const _0x14d78c=_0x549569();_0x61585d[_0x14d78c]=_0x2b8107([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])+_0x413d06,_0x413d06[_0x2b8107([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x2b8107([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x549569()]=_0x5741c4),_0x413d06!=_0x2b8107([0x56,0x61,0x6c,0x69,0x64])&&_0x1cd075();}function _0x549569(){const _0x53cabd=window[_0x2b8107([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2b8107([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2b8107([0x6e,0x6f,0x77])]())[_0x2b8107([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2b8107([0x2e]),'');let _0x493fb5=_0x2b8107([0x42]);for(let _0x5759d4=0x0;_0x5759d4<_0x53cabd[_0x2b8107([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5759d4+=0x2){let _0x33430d=window[_0x2b8107([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x53cabd[_0x2b8107([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5759d4,_0x5759d4+0x2));_0x33430d>=_0x21d078[_0x2b8107([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x33430d-=_0x21d078[_0x2b8107([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x493fb5+=_0x21d078[_0x33430d];}return _0x493fb5;}function _0x14721b(){const _0x5c3442=_0x4e3086[_0x2b8107([0x73,0x70,0x6c,0x69,0x74])](_0x2b8107([0x2e]));if(0x3!=_0x5c3442[_0x2b8107([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x44b3be(_0x5c3442[0x1]);function _0x44b3be(_0x5e9f5d){const _0x132e7b=_0x50c738(_0x5e9f5d);return _0x132e7b&&_0x2e030f()?_0x132e7b:null;function _0x2e030f(){const _0x4fe268=_0x132e7b[_0x2b8107([0x6a,0x74,0x69])],_0x459802=window[_0x2b8107([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4fe268[_0x2b8107([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4fe268[_0x2b8107([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4226d0={..._0x132e7b,[_0x2b8107([0x6a,0x74,0x69])]:_0x4fe268[_0x2b8107([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4fe268[_0x2b8107([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4226d0[_0x2b8107([0x76,0x63])],_0x5638b9(_0x4226d0)==_0x459802;}}}async function _0x571753(){let _0x19f874=!0x0;try{const _0x502294=_0x4e3086[_0x2b8107([0x73,0x70,0x6c,0x69,0x74])](_0x2b8107([0x2e])),[_0x1b37cc,_0x354577,_0x213a1e]=_0x502294;return _0x2e2fc3(_0x1b37cc),await _0x405ad3(_0x1b37cc,_0x354577,_0x213a1e),_0x19f874;}catch(_0x45d3d4){return!0x1;}function _0x2e2fc3(_0x569f04){const _0x42bff0=_0x50c738(_0x569f04);_0x42bff0&&_0x42bff0[_0x2b8107([0x61,0x6c,0x67])]==_0x2b8107([0x45,0x53,0x32,0x35,0x36])||(_0x19f874=!0x1);}async function _0x405ad3(_0x17c611,_0x1bf47a,_0x323e5d){const _0x2a943f=window[_0x2b8107([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2b8107([0x66,0x72,0x6f,0x6d])](_0x153d11(_0x323e5d),_0x1a8975=>_0x1a8975[_0x2b8107([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xce05=new window[(_0x2b8107([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2b8107([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x17c611+_0x2b8107([0x2e])+_0x1bf47a),_0x21807f=window[_0x2b8107([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2b8107([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x21807f)return;const _0x383d85=await _0x21807f[_0x2b8107([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2b8107([0x6a,0x77,0x6b]),_0x11ca24,{[_0x2b8107([0x6e,0x61,0x6d,0x65])]:_0x2b8107([0x45,0x43,0x44,0x53,0x41]),[_0x2b8107([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2b8107([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2b8107([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x21807f[_0x2b8107([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2b8107([0x6e,0x61,0x6d,0x65])]:_0x2b8107([0x45,0x43,0x44,0x53,0x41]),[_0x2b8107([0x68,0x61,0x73,0x68])]:{[_0x2b8107([0x6e,0x61,0x6d,0x65])]:_0x2b8107([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x383d85,_0x2a943f,_0xce05)||(_0x19f874=!0x1);}}function _0x50c738(_0x35e939){return _0x35e939[_0x2b8107([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2b8107([0x65,0x79]))?JSON[_0x2b8107([0x70,0x61,0x72,0x73,0x65])](_0x153d11(_0x35e939)):null;}function _0x153d11(_0x3a4c98){return window[_0x2b8107([0x61,0x74,0x6f,0x62])](_0x3a4c98[_0x2b8107([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2b8107([0x2b]))[_0x2b8107([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2b8107([0x2f])));}function _0x5638b9(_0x5b1ed4){let _0x3c04be=0x1505;function _0x4e6ca9(_0x2c9280){for(let _0x4771b4=0x0;_0x4771b4<_0x2c9280[_0x2b8107([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4771b4++){const _0xa6fa1=_0x2c9280[_0x2b8107([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4771b4);_0x3c04be=(_0x3c04be<<0x5)+_0x3c04be+_0xa6fa1,_0x3c04be&=_0x3c04be;}}function _0xbf2d93(_0x36add1){Array[_0x2b8107([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x36add1)?_0x36add1[_0x2b8107([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xbf2d93):_0x36add1&&typeof _0x36add1==_0x2b8107([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2b8107([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x36add1)[_0x2b8107([0x73,0x6f,0x72,0x74])]()[_0x2b8107([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x342c0a,_0x58b441])=>{_0x4e6ca9(_0x342c0a),_0xbf2d93(_0x58b441);}):_0x4e6ca9(window[_0x2b8107([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x36add1));}return _0xbf2d93(_0x5b1ed4),_0x3c04be>>>0x0;}function _0x498b7d(_0x2d552a){return _0x2d552a[_0x2b8107([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2b8107([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2b8107([0x30]));}function _0x22e0ad(_0x523f3e){return _0x523f3e[_0x2b8107([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2b8107([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2b8107([0x6a,0x6f,0x69,0x6e])]('');}function _0xc421ec(_0x39d2c1){return _0x61585d[_0x2b8107([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2b8107([0x68,0x61,0x73])](_0x39d2c1);}function _0xc5146b(_0x4ac578){return _0x61585d[_0x2b8107([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2b8107([0x67,0x65,0x74])](_0x4ac578);}function _0x3b1ba3(){}function _0x2b8107(_0x2b9979){return _0x2b9979['map'](_0x3bda72=>String['fromCharCode'](_0x3bda72))['join']('');}_0x5ba856(await _0x3cbccc());}(this);}['createRevision'](_0x4cd753){const _0x322fd8=this['editor']['plugins']['get']('Users');return new h({'id':_0x4cd753['id'],'name':_0x4cd753['name'],'creator':_0x4cd753['creatorId']?_0x322fd8['getUser'](_0x4cd753['creatorId']):null,'diffData':_0x4cd753['diffData']||_0x4cd753['data'],'authors':_0x4cd753['authorsIds']['map'](_0xfeddb2=>_0x322fd8['getUser'](_0xfeddb2)),'createdAt':new Date(_0x4cd753['createdAt']),'attributes':_0x4cd753['attributes'],'fromVersion':_0x4cd753['fromVersion'],'toVersion':_0x4cd753['toVersion']});}['addRevision'](_0x2a6429,_0x563aac=0x0){this['_revisions']['add'](_0x2a6429,_0x563aac);}['getRevision'](_0x2d7c0d){return this['_revisions']['get'](_0x2d7c0d);}['getRevisions'](_0x3e6315={'toJSON':!0x1}){const _0x50e785=Array['from'](this['_revisions']);return _0x50e785['reverse'](),_0x3e6315['toJSON']?_0x50e785['map'](_0x1889cc=>_0x1889cc['toJSON']()):_0x50e785;}['getIndex'](_0x1f8f85){return this['_revisions']['getIndex'](_0x1f8f85);}['getEarlierVisibleRevision'](_0x4c6eba){const [,_0x931d2f]=this['getRevisionsIterator'](_0x4c6eba,{'direction':'earlier'});return _0x931d2f;}['getLaterVisibleRevision'](_0x3d206c){const [,_0x3e9568]=this['getRevisionsIterator'](_0x3d206c,{'direction':'later'});return _0x3e9568;}['getRevisionsInDiff'](_0x1d0f1d){const _0x21ec20=[];for(const _0x3f65b2 of this['getRevisionsIterator'](_0x1d0f1d['newRevisionId']))if(_0x21ec20['push'](_0x3f65b2),_0x3f65b2['id']===_0x1d0f1d['oldRevisionId'])break;return _0x21ec20;}*['getRevisionsIterator'](_0x485e73,{direction:_0x38a616='earlier',filter:_0x21d761=()=>!0x0}={}){const _0x40b6c3='earlier'===_0x38a616?0x1:-0x1;let _0x5c5c8d=this['_revisions']['get'](_0x485e73),_0x30d9d2=this['getIndex'](_0x5c5c8d);for(yield _0x5c5c8d;_0x5c5c8d;){if(_0x30d9d2+=_0x40b6c3,_0x5c5c8d=this['getRevision'](_0x30d9d2),!_0x5c5c8d)return;_0x21d761(_0x5c5c8d)&&(yield _0x5c5c8d);}}}function m(_0x3bece7,_0x964635,_0x117364){const t=_0x3bece7['t'];switch(_0x964635){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'},_0x117364);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x117364);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}const E={'c':_0x2901db,'a':_0x378d02,'e':_0x50a7fd,'r':_0x5f2f31,'u':_0x5ad08c};class u extends _0x3c80d2{['licenseKey'];['_licenseKeyCheckInterval'];['adapter'];['currentRevision'];['repository'];['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x442638,j,_0x11f700];}constructor(_0x3ee6a4){super(_0x3ee6a4),this['adapter']=null,this['currentRevision']=null,this['_revisionDataBuilder']=new V(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x15378b=_0xe821f1();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x15378b},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x328b0e=this['repository']['getRevision'](0x0),_0x5939d7=_0x328b0e&&null===_0x328b0e['creator']?_0x328b0e:null;if(this['_continueCurrentRevision']=!!_0x5939d7&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x4411a9=this['_source']['getCurrentRevisionId'](),_0x1fc275=this['repository']['getRevision'](_0x4411a9);if(_0x1fc275)this['_startingVersion']=_0x1fc275['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x543cf4=this['_source']['history']['_operations']['find'](_0x36dda2=>!_0x36dda2['_isInit']),_0x7c9459=_0x543cf4?_0x543cf4['baseVersion']:this['_source']['history']['version'];_0x328b0e?(_0x328b0e['toVersion']<_0x7c9459&&_0x328b0e['_update']({'toVersion':_0x7c9459}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x5939d7['id'],this['_startingVersion']=_0x5939d7['fromVersion']):(this['_startingVersion']=_0x328b0e['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x7c9459,this['_continueCurrentRevision']=!0x1);}}else _0x5939d7&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x5939d7['toVersion'],this['editor']['model']['document']['history']['version']),_0x5939d7['fromVersion']===_0x5939d7['toVersion']?(0x0!==_0x5939d7['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x5939d7['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x5939d7['id'],this['_startingVersion']=_0x5939d7['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',_0x15daf8=>!_0x15daf8),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x465282=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5531c2;for(const _0x325078 in _0x465282){const _0x4f8416=_0x325078,_0x1aad5d=_0x465282[_0x4f8416];if('revisionHistoryLicenseKeyValid'==_0x1aad5d||'revisionHistoryLicenseKeyInvalid'==_0x1aad5d||'revisionHistoryLicenseKeyExpired'==_0x1aad5d||'revisionHistoryLicenseKeyDomainLimit'==_0x1aad5d||'revisionHistoryLicenseKeyNotAllowed'==_0x1aad5d||'revisionHistoryLicenseKeyEvaluationLimit'==_0x1aad5d||'revisionHistoryLicenseKeyTrialLimit'==_0x1aad5d||'revisionHistoryLicenseKeyUsageLimit'==_0x1aad5d){delete _0x465282[_0x4f8416],_0x5531c2=_0x1aad5d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5531c2&&_0x465282['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5531c2&&_0x465282['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5531c2&&_0x465282['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5531c2&&_0x465282['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5531c2&&_0x465282['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyTrialLimit'==_0x5531c2&&_0x465282['_showLicenseError']('trialLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5531c2&&_0x465282['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x51916a=this['repository']['getRevision'](0x0),_0x2efae8=await this['getRevisionDocumentData'](_0x51916a),_0x5ab26e=await this['getRevisionRootsAttributes'](_0x51916a);this['_replaceEditorDataWithRevisionData'](_0x2efae8,_0x5ab26e);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x5bcf3c){this['_source']=_0x5bcf3c;}async['update'](){const _0x1c0518=await this['_source']['getLatestVersion']();if(_0x1c0518>this['currentRevision']['toVersion']){await this['_loadState']();const _0x4db8d4=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x1c0518});_0x4db8d4['authors']=_0x4db8d4['authorsIds']['map'](_0x5691fc=>this['editor']['plugins']['get']('Users')['getUser'](_0x5691fc)),this['currentRevision']['_update'](_0x4db8d4);}}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_loadRevisionData'](this['currentRevision']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}async['saveRevision'](_0x5c77c8={},_0x56e250=null){const _0x4e1e86=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x56e250>this['currentRevision']['toVersion']&&(_0x56e250=null),null===_0x56e250&&(_0x56e250=await this['_source']['getLatestVersion']());const _0x4bb72f=this['_getFromVersion'](_0x56e250),_0x57e76=this['buildRevisionData']({'from':_0x4bb72f,'to':_0x56e250});if(this['currentRevision']['toVersion']<_0x56e250){const _0xb9fc7e=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x56e250,'to':_0x56e250});_0xb9fc7e['authors']=[],_0xb9fc7e['authorsIds']=[],_0xb9fc7e['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0xb9fc7e,!0x0),delete _0xb9fc7e['authors'],_0x4e1e86['push'](_0xb9fc7e);}_0x5c77c8['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x5c77c8['name']=_0x5c77c8['name']||null,_0x5c77c8['id']=_0x5c77c8['id']||_0xe821f1(),_0x5c77c8={..._0x5c77c8,..._0x57e76};const _0x36fdc2=this['addRevisionData'](_0x5c77c8);_0x4e1e86['push'](_0x5c77c8);const _0x561f4e=this['repository']['getIndex'](_0x36fdc2);if(0x0!==_0x561f4e){const _0x43a801=this['repository']['getRevision'](_0x561f4e-0x1);if(_0x43a801['fromVersion']!==_0x56e250){const _0x4b57f9=this['_revisionDataBuilder']['getData'](_0x56e250,_0x43a801['toVersion']),_0x212d27={'id':_0x43a801['id'],'diffData':_0x4b57f9['diffData'],'authorsIds':_0x4b57f9['authorsIds'],'authors':_0x4b57f9['authorsIds']['map'](_0x563670=>this['editor']['plugins']['get']('Users')['getUser'](_0x563670)),'fromVersion':_0x56e250};_0x43a801===this['currentRevision']&&(_0x212d27['createdAt']=new Date(_0x5c77c8['createdAt']['getTime']()+0xa)),_0x43a801['_update'](_0x212d27,!0x0),delete _0x212d27['authors'],_0x4e1e86['push'](_0x212d27);}}if(this['adapter']){for(const _0x663886 of _0x4e1e86)this['_bufferUpdate'](_0x663886['id'],_0x663886,!0x0);this['sendBufferedUpdates']();}return _0x36fdc2;}['addRevisionData'](_0x5c2c50){const _0x122707=this['repository']['createRevision'](_0x5c2c50);return this['adapter']&&_0x122707['on']('_update',(_0x5de714,_0x3f27a6,_0x45fcff)=>{_0x45fcff||(this['_bufferUpdate'](_0x3f27a6['id'],_0x3f27a6,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x122707,this['_findInsertionIndex'](_0x122707)),_0x122707;}async['getRevisionDocumentData'](_0x34bd42){await this['_loadRevisionData'](_0x34bd42);const _0x33ac5e={};for(const _0x52072a in _0x34bd42['diffData']){if(_0x34bd42['diffData'][_0x52072a]['attachChange']&&!_0x34bd42['diffData'][_0x52072a]['attachChange']['isAttached'])continue;const _0x369b27=this['_removeRevisionMarkers'](JSON['parse'](_0x34bd42['diffData'][_0x52072a]['insertions'])),_0x10b9f2=this['editor']['editing']['view']['document'],_0x2e2b84=new _0x469639(_0x10b9f2,_0x369b27['map'](_0x345d4f=>P(_0x345d4f,this['editor'])));this['editor']['data']['processor']['useFillerType']('marked'),_0x33ac5e[_0x52072a]=this['editor']['data']['processor']['toData'](_0x2e2b84),this['editor']['data']['processor']['useFillerType']('default');}return _0x33ac5e;}async['getRevisionRootsAttributes'](_0x1ca83d){await this['_loadRevisionData'](_0x1ca83d);const _0xe52330={};for(const _0x423102 in _0x1ca83d['diffData'])_0x1ca83d['diffData'][_0x423102]['attachChange']&&!_0x1ca83d['diffData'][_0x423102]['attachChange']['isAttached']||(_0xe52330[_0x423102]=_0x1ca83d['diffData'][_0x423102]['attributesAfter']||{});return _0xe52330;}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x333311=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0xa2563=0x0;_0xa2563<_0x333311['length'];_0xa2563++){const _0x2664db=_0x333311[_0xa2563];let _0x3202e3=!0x1;for(const _0x4b2cc0 of Object['keys'](_0x2664db))void 0x0===_0x2664db[_0x4b2cc0]?delete _0x2664db[_0x4b2cc0]:'id'!==_0x4b2cc0&&(_0x3202e3=!0x0);_0x3202e3||(_0x333311[_0xa2563]=null);}if(_0x333311=_0x333311['filter'](_0x2d392f=>null!==_0x2d392f),!_0x333311['length'])return;for(let _0x572537=0x0;_0x572537<_0x333311['length'];_0x572537++){const _0x4279b7=_0x333311[_0x572537];void 0x0!==_0x4279b7['fromVersion']&&void 0x0===_0x4279b7['toVersion']&&(_0x4279b7['toVersion']=this['repository']['getRevision'](_0x4279b7['id'])['toVersion']),void 0x0!==_0x4279b7['toVersion']&&void 0x0===_0x4279b7['fromVersion']&&(_0x4279b7['fromVersion']=this['repository']['getRevision'](_0x4279b7['id'])['fromVersion']);}const _0x438042=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x333311,_0x438042)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x277944=>{if(_0x277944){for(const _0x410faf of _0x277944)this['setRevisionData']({'id':_0x410faf['id'],'createdAt':_0x410faf['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['_replaceEditorDataWithRevisionData'](_0x1da30b,_0x5e25ae){let _0x4a2ff4=this['editor']['config']['get']('initialData'),_0x4c35b4=this['editor']['config']['get']('rootsAttributes');if(void 0x0===_0x4a2ff4){_0x4a2ff4={};for(const _0x378c14 of this['editor']['model']['document']['getRootNames']())_0x4a2ff4[_0x378c14]='';}if('string'==typeof _0x4a2ff4&&(_0x4a2ff4={'main':_0x4a2ff4}),void 0x0===_0x4c35b4){_0x4c35b4={};for(const _0x5c357c of this['editor']['model']['document']['getRootNames']())_0x4c35b4[_0x5c357c]={};}let _0x135c6=!0x1;const _0x5031cb=Object['keys'](_0x4a2ff4),_0x58e629=Object['keys'](_0x1da30b);for(const _0x4e4c9d of _0x5031cb){if(_0x4a2ff4[_0x4e4c9d]!==_0x1da30b[_0x4e4c9d]&&''!==_0x4a2ff4[_0x4e4c9d]['trim']()){_0x135c6=!0x0;break;}if(!_0x5db2c9(_0x4c35b4[_0x4e4c9d],_0x5e25ae[_0x4e4c9d])&&Object['keys'](_0x4c35b4[_0x4e4c9d])['length']>0x0){_0x135c6=!0x0;break;}}_0x135c6||(_0x135c6=_0x58e629['some'](_0x31d9b8=>!this['editor']['model']['document']['getRoot'](_0x31d9b8))),_0x135c6&&_0x30edc3('editor-initial-data-replaced-with-revision-data',{'editorData':_0x4a2ff4,'editorRootsAttributes':_0x4c35b4,'revisionData':_0x1da30b,'revisionRootsAttributes':_0x5e25ae}),this['editor']['config']['set']('initialData',_0x1da30b),this['editor']['config']['set']('rootsAttributes',_0x5e25ae);}['_addPendingAction'](){if(!this['_pendingAction']){const _0x363025=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x363025['add'](m(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x5dae32){const _0x590c1e=this['repository']['getRevisions']();_0x590c1e['reverse']();let _0x3ecb4c=0x0;for(;_0x3ecb4c<_0x590c1e['length'];){const _0x55101b=_0x590c1e[_0x3ecb4c];if(_0x55101b===this['currentRevision']){_0x3ecb4c++;continue;}if(_0x55101b['id']===this['_initialRevisionId'])break;const _0x458e3b=_0x5dae32['toVersion']-_0x55101b['toVersion']||_0x5dae32['fromVersion']-_0x55101b['fromVersion'];if(_0x458e3b>0x0)break;if(_0x458e3b<0x0)_0x3ecb4c++;else{if(!_0x5dae32['creator']&&_0x55101b['creator'])break;if(_0x55101b['creator']||!_0x5dae32['creator']){if(_0x5dae32['createdAt']>_0x55101b['createdAt'])break;_0x3ecb4c++;}else _0x3ecb4c++;}}return _0x3ecb4c;}['setRevisionData'](_0x2d7564){const _0x7692a5=this['repository']['getRevision'](_0x2d7564['id']);if(_0x2d7564['createdAt']&&(_0x2d7564['createdAt']=new Date(_0x2d7564['createdAt'])),_0x2d7564['authorsIds']){const _0x9377e5=this['editor']['plugins']['get']('Users');_0x2d7564['authors']=_0x2d7564['authorsIds']['map'](_0x36b67b=>_0x9377e5['getUser'](_0x36b67b));}_0x7692a5['_update'](_0x2d7564,!0x0);}['buildRevisionData']({revision:_0x374ea9=null,from:_0x573ec2=null,to:_0x1a2c34=null}){_0x573ec2=null!==_0x573ec2?_0x573ec2:_0x374ea9['fromVersion'],_0x1a2c34=null!==_0x1a2c34?_0x1a2c34:_0x374ea9['toVersion'];const _0x2ce7c4=this['_revisionDataBuilder']['getData'](_0x573ec2,_0x1a2c34),_0x17de46={'diffData':_0x2ce7c4['diffData'],'authorsIds':_0x2ce7c4['authorsIds'],'fromVersion':_0x573ec2,'toVersion':_0x1a2c34};if(!_0x374ea9||_0x1a2c34!==_0x374ea9['toVersion']){const _0x64eedf=_0x1a2c34-0x1,_0x1891b8=this['_source']['history']['getOperation'](_0x64eedf);_0x17de46['createdAt']=_0x1891b8&&_0x1891b8['createdAt']||new Date();}if(this['_loadedStateData']&&_0x573ec2===this['_loadedStateData']['fromVersion']){for(const _0x4832b6 of this['_loadedStateData']['authors'])_0x17de46['authorsIds']['includes'](_0x4832b6['id'])||_0x17de46['authorsIds']['push'](_0x4832b6['id']);}return _0x17de46;}['_loadRevisionData'](_0x1e2527){if(!_0x1e2527||_0x1e2527['diffData'])return Promise['resolve']();{const _0xc76e81=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0xc76e81,'revisionId':_0x1e2527['id']})['then'](_0xaf2a0=>{_0x1e2527['diffData']=_0xaf2a0['diffData'];});}}['_bufferUpdate'](_0x46ad5c,_0x2566b2,_0x371b54){if(this['_bufferedUpdates']['has'](_0x46ad5c)){const _0x188998=this['_bufferedUpdates']['get'](_0x46ad5c);_0x2566b2=_0x371b54?{..._0x188998,..._0x2566b2}:{..._0x2566b2,..._0x188998};}this['_bufferedUpdates']['set'](_0x46ad5c,_0x2566b2);}['_getFromVersion'](_0x5c7976){const _0x18b925=this['repository']['getRevisions']();_0x18b925['reverse'](),_0x18b925['shift']();const _0xe3973f=_0x18b925['find'](_0x104564=>_0x104564['toVersion']<=_0x5c7976)['toVersion'];return _0xe3973f<this['_startingVersion']?this['_startingVersion']:_0xe3973f;}['_createInitialRevision'](_0x2bde09){const _0x22b6aa=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x22b6aa)this['_initialRevisionId']=_0x22b6aa['id'];else{const _0x5bbe2f=!this['editor']['model']['document']['roots']['find'](_0x199938=>this['editor']['model']['hasContent'](_0x199938)),_0x48826a=this['editor']['plugins']['get']('Users')['me']['id'],_0x2cfd84=m(this['editor']['locale'],_0x5bbe2f?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x2bde09,'to':_0x2bde09,'id':this['_initialRevisionId'],'name':_0x2cfd84,'creatorId':_0x48826a});}}['_createCurrentRevision'](_0x1a9fde){const _0x7d4952=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x7d4952),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x1a9fde,'to':_0x1a9fde,'id':_0x7d4952,'name':'','creatorId':null}));}['_makeRevision']({name:_0xd3e557,from:_0x3f4809,to:_0x1989af,creatorId:_0x46c357,id:_0x3b09a6}){const _0x187c93=this['buildRevisionData']({'from':_0x3f4809,'to':_0x1989af});_0x187c93['name']=_0xd3e557,_0x187c93['creatorId']=_0x46c357,_0x187c93['id']=_0x3b09a6;const _0x1ab6a6=this['addRevisionData'](_0x187c93);return this['adapter']&&this['_bufferUpdate'](_0x187c93['id'],_0x187c93,!0x0),_0x1ab6a6;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}['_removeRevisionMarkers'](_0xf7ec3f){return(_0xf7ec3f=_0xf7ec3f['filter'](_0x8b87e3=>!_0x8b87e3['name']||'revision-start'!==_0x8b87e3['name']&&'revision-end'!==_0x8b87e3['name']))['forEach'](_0x4eb434=>{'string'!=typeof _0x4eb434&&(_0x4eb434['children']=this['_removeRevisionMarkers'](_0x4eb434['children']),_0x4eb434['attributes']=_0x4eb434['attributes']['filter'](_0x2e3334=>!_0x2e3334[0x0]['startsWith']('data-revision-')));}),_0xf7ec3f;}}function P(_0x230c34,_0x296305){const _0x49dd1d=_0x296305['editing']['view']['document'];if('string'==typeof _0x230c34)return new _0x4ccbca(_0x49dd1d,_0x230c34);{const _0x4d8c34=_0x230c34['children']['map'](_0x29da98=>P(_0x29da98,_0x296305));return new(E[_0x230c34['type']]||_0x46c9fc)(_0x49dd1d,_0x230c34['name'],_0x230c34['attributes'],_0x4d8c34);}}class V{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x5aa822){this['editor']=_0x5aa822,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'](_0xc1f45a){this['source']=_0xc1f45a;const _0x39ad4e=new Map(),_0x4475ad=new Map(),_0x1c2272=this['editor']['model']['document']['roots']['map'](_0x2d6c5a=>_0x2d6c5a['rootName']);for(const _0x255940 of _0x1c2272){const _0x4a8a56=this['editor']['model']['document']['getRoot'](_0x255940),_0x306a38=T(_0x4a8a56);_0x39ad4e['set'](_0x255940,_0x306a38),_0x4475ad['set'](_0x255940,Object['fromEntries'](_0x4a8a56['getAttributes']()));}const _0xa6fee9=Array['from'](this['editor']['model']['markers'])['map'](_0x4f9798=>[_0x4f9798['name'],_0x4f9798['getRange']()]),_0x2e6583=this['source']['version'];this['_saveMetaData'](_0x2e6583,_0x39ad4e,_0xa6fee9,_0x4475ad),this['_startingRevisionId']=this['_revisionId'];const _0x131373=new Map(),_0x37a698=new Map();for(const _0x28c6a7 of _0x1c2272){const _0x3bf38f=F(_0x28c6a7);_0x131373['set'](_0x28c6a7,_0x3bf38f),_0x37a698['set'](_0x28c6a7,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x131373,[],_0x37a698);}['getData'](_0x4a1b7a,_0x42dcc2){if(this['_lastFrom']===_0x4a1b7a&&this['_lastTo']<=_0x42dcc2)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x42dcc2,!0x0);else{if(!this['_savedMetaData']['has'](_0x4a1b7a)){const _0x3ec9e5=this['_getPreviousFrom'](_0x4a1b7a);this['_calculateMetaData'](_0x3ec9e5,_0x4a1b7a,!0x1);}this['_calculateMetaData'](_0x4a1b7a,_0x42dcc2,!0x0);}return this['_lastFrom']=_0x4a1b7a,this['_lastTo']=_0x42dcc2,this['_getState']();}['loadState'](_0x35ef92){this['_reset'](),this['_lastFrom']=_0x35ef92['fromVersion'],this['_lastTo']=_0x35ef92['toVersion'];for(const _0x1dee9b in _0x35ef92['diffData']){const _0x18e3dc=_0x35ef92['diffData'][_0x1dee9b]['attachChange'],_0x147d2e=_0x351846(_0x35ef92['diffData'][_0x1dee9b]['attributesBefore'])||{},_0x553de5=this['_makeModelFromViewString'](_0x35ef92['diffData'][_0x1dee9b]['deletions']);_0x553de5['rootName']=_0x1dee9b,_0x553de5['_isAttached']=!_0x18e3dc||!_0x18e3dc['isAttached'],_0x553de5['isAttached']=()=>_0x553de5['_isAttached'],this['_baseRoots']['set'](_0x1dee9b,_0x553de5),this['_baseRootsAttributes']['set'](_0x1dee9b,_0x147d2e),_0x18e3dc&&this['_touchedRoots']['set'](_0x1dee9b,_0x18e3dc);const _0x4cc01f=this['_makeIdsRoot'](_0x553de5);this['_baseIdsRoots']['set'](_0x1dee9b,_0x4cc01f);for(const [_0x455c64,_0x4e0931]of _0x553de5['markers']){if(!_0x455c64['startsWith']('revision:'))continue;const _0x1dc571=_0x455c64['split'](':')[0x2];for(const _0x47df7c of _0x4e0931['getWalker']({'singleCharacters':!0x0})){const _0x3e2b1a=this['_getVidAttributeName'](_0x47df7c),_0x5234fa='elementEnd'==_0x47df7c['type']?_0x47df7c['previousPosition']['path']['slice'](0x0,-0x1):_0x47df7c['previousPosition']['path'],_0x5db969=_0x4cc01f['getNodeByPath'](_0x5234fa)['getAttribute'](_0x3e2b1a);this['_touched']['set'](_0x5db969,{'userId':_0x1dc571});}}}this['_startingRevisionId']=this['_revisionId'];const _0x354dd5=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x300f1f=>!this['_touched']['has'](_0x300f1f));let _0x57d80=0x0;const _0x5b646f=new Map();for(const _0xe5595f in _0x35ef92['diffData']){const _0x41b513=_0x35ef92['diffData'][_0xe5595f]['attachChange'],_0x2dd423=_0x351846(_0x35ef92['diffData'][_0xe5595f]['attributesAfter'])||{},_0xf96dcd=this['_makeModelFromViewString'](_0x35ef92['diffData'][_0xe5595f]['insertions']);_0xf96dcd['rootName']=_0xe5595f,_0xf96dcd['_isAttached']=!_0x41b513||_0x41b513['isAttached'],_0xf96dcd['isAttached']=()=>_0xf96dcd['_isAttached'],this['_diffRoots']['set'](_0xe5595f,_0xf96dcd),this['_diffRootsAttributes']['set'](_0xe5595f,_0x2dd423);const _0x32095c=this['_makeIdsRoot'](_0xf96dcd,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0xe5595f,_0x32095c),_0x5b646f['set'](_0xe5595f,_0xf96dcd['isAttached']()?_0x2dd423:{});for(const [_0x525bb2,_0xff1d48]of _0xf96dcd['markers']){if(!_0x525bb2['startsWith']('revision:'))continue;const _0x38a702=_0x525bb2['split'](':')[0x2];for(const _0x204353 of _0xff1d48['getWalker']({'singleCharacters':!0x0})){const _0xbba61e=this['_getVidAttributeName'](_0x204353),_0x3b5c9a=this['_revisionId']++,_0x489582='elementEnd'==_0x204353['type']?_0x204353['previousPosition']['path']['slice'](0x0,-0x1):_0x204353['previousPosition']['path'];_0x32095c['getNodeByPath'](_0x489582)['_setAttribute'](_0xbba61e,_0x3b5c9a),this['_touched']['set'](_0x3b5c9a,{'userId':_0x38a702});}}for(const _0x4d6c17 of this['editor']['model']['createRangeIn'](_0xf96dcd)['getWalker']({'singleCharacters':!0x0})){const _0x41ba8a=this['_getVidAttributeName'](_0x4d6c17),_0x54749b='elementEnd'==_0x4d6c17['type']?_0x4d6c17['previousPosition']['path']['slice'](0x0,-0x1):_0x4d6c17['previousPosition']['path'],_0x538473=_0x32095c['getNodeByPath'](_0x54749b);_0x538473['getAttribute'](_0x41ba8a)>0x0||_0x538473['_setAttribute'](_0x41ba8a,_0x354dd5[_0x57d80++]);}for(const [_0x4f411c,_0x335829]of _0xf96dcd['markers'])_0x4f411c['startsWith']('revision:')||this['_markers']['set'](_0x4f411c,_0x335829);}const _0x1b42b3=F('$graveyard');this['_baseRoots']['set']('$graveyard',_0x1b42b3),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x1b42b3,0x1));const _0x9e400a=F('$graveyard');this['_diffRoots']['set']('$graveyard',_0x9e400a),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x9e400a,0x1));const _0x21384d=Array['from'](this['_diffRoots'])['map'](([_0x46abf5,_0x433555])=>[_0x46abf5,T(_0x433555)]);this['_saveMetaData'](this['_lastTo'],_0x21384d,this['_markers'],_0x5b646f);}['_makeModelFromViewString'](_0x32d41b){const _0x1fd303=JSON['parse'](_0x32d41b),_0x31f66c=this['editor']['editing']['view']['document'],_0x44266b=new _0x469639(_0x31f66c,_0x1fd303['map'](_0x4eaf5b=>P(_0x4eaf5b,this['editor'])));return this['editor']['data']['toModel'](_0x44266b);}['_saveMetaData'](_0x192548,_0xc92a77,_0x1739bb,_0x2c1e1d){const _0x2905f9=new Map(_0xc92a77),_0x271896=new Map(_0x351846(_0x2c1e1d)),_0xf0087d=new Map();for(const [_0x40427e,_0x4a08dd]of _0x1739bb)_0xf0087d['set'](_0x40427e,{'start':_0x4a08dd['start']['clone'](),'end':_0x4a08dd['end']['clone'](),'rootName':_0x4a08dd['root']['rootName']});this['_savedMetaData']['set'](_0x192548,{'roots':_0x2905f9,'markers':_0xf0087d,'rootsAttributes':_0x271896});}['_removeMetaData'](_0x5a8bf){this['_savedMetaData']['delete'](_0x5a8bf);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_reset'](){this['_touched']['clear'](),this['_touchedMarkers']['clear'](),this['_touchedRoots']['clear'](),this['_diffRoots']['clear'](),this['_diffRootsAttributes']['clear'](),this['_baseRoots']['clear'](),this['_baseRootsAttributes']['clear'](),this['_idsRoots']['clear'](),this['_baseIdsRoots']['clear'](),this['_markers']['clear'](),this['_revisionId']=0x1,this['_startingRevisionId']=this['_revisionId'];}['_makeIdsRoot'](_0x50af31,_0x5d0d13=null){let _0x87537e=null;_0x50af31['is']('documentFragment')||(_0x87537e=new ut(_0x50af31['name'],{'vid_start':null===_0x5d0d13?this['_revisionId']++:_0x5d0d13++}));const _0x4721ac=[];for(const _0x1a960f of _0x50af31['getChildren']())if(_0x1a960f['is']('element')){_0x4721ac['push'](this['_makeIdsRoot'](_0x1a960f,_0x5d0d13));const _0x212d50=_0x4721ac[_0x4721ac['length']-0x1];null!==_0x5d0d13&&(_0x5d0d13=_0x212d50['is']('element','$text')?_0x212d50['getAttribute']('vid')+0x1:_0x212d50['getAttribute']('vid_end')+0x1);}else{for(let _0x2d72cb=0x0;_0x2d72cb<_0x1a960f['offsetSize'];_0x2d72cb++)_0x4721ac['push'](new ut('$text',{'vid':null===_0x5d0d13?this['_revisionId']++:_0x5d0d13++}));}if(_0x50af31['is']('documentFragment')){const _0x3ccde4=F(_0x50af31['rootName']);return _0x3ccde4['_insertChild'](0x0,_0x4721ac),_0x3ccde4;}return _0x87537e['_setAttribute']('vid_end',null===_0x5d0d13?this['_revisionId']++:_0x5d0d13++),_0x87537e['_insertChild'](0x0,_0x4721ac),_0x87537e;}['_calculateMetaData'](_0x29c24a,_0x31b74c,_0x855c3){this['_reset']();const {roots:_0x328fbf,markers:_0x598eed,rootsAttributes:_0x34d2b6}=this['_savedMetaData']['get'](_0x29c24a);this['_baseRoots']=new Map(_0x328fbf),this['_baseRootsAttributes']=new Map(_0x351846(_0x34d2b6));for(const [_0x4de928,_0x256ce]of this['_baseRoots'])if('$graveyard'!==_0x4de928&&(this['_diffRoots']['set'](_0x4de928,T(_0x256ce)),this['_diffRootsAttributes']=new Map(_0x351846(_0x34d2b6)),_0x855c3)){const _0x2e871c=this['_revisionId'];this['_idsRoots']['set'](_0x4de928,this['_makeIdsRoot'](_0x256ce)),this['_baseIdsRoots']['set'](_0x4de928,this['_makeIdsRoot'](_0x256ce,_0x2e871c));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',T(this['_baseRoots']['get']('$graveyard'))),_0x855c3&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x291f46,_0x381604]of _0x598eed){const _0x5e4dff=this['_baseRoots']['get'](_0x381604['rootName']),_0x300e9b=this['_diffRoots']['get'](_0x381604['rootName']),_0x3c776d=new ft(this['_fixPosition'](_0x381604['start'],_0x5e4dff),this['_fixPosition'](_0x381604['end'],_0x5e4dff)),_0x5f43fa=this['_fixRange'](_0x3c776d,_0x300e9b);_0x5e4dff['markers']['set'](_0x291f46,_0x3c776d),this['_markers']['set'](_0x291f46,_0x5f43fa);}this['_applyOperations'](_0x29c24a,_0x31b74c,_0x855c3);}['_applyOperations'](_0x14277d,_0x321425,_0x42fd4d){for(const _0x7a22f3 of this['source']['getOperations'](_0x14277d,_0x321425))this['_handleOperation'](_0x7a22f3,_0x42fd4d);for(const _0xb9d3d2 of this['_diffRoots']['values']())_0xb9d3d2['markers']['clear']();for(const [_0x2e6b51,_0x2544c8]of this['_markers']){this['_diffRoots']['get'](_0x2544c8['root']['rootName'])['markers']['set'](_0x2e6b51,_0x2544c8['clone']());}const _0x29f822=new Map(),_0xc7b9ac=new Map();for(const [_0x2f140d,_0x13a009]of this['_diffRoots'])_0x29f822['set'](_0x2f140d,T(_0x13a009)),_0xc7b9ac['set'](_0x2f140d,this['_diffRootsAttributes']['get'](_0x2f140d));this['_saveMetaData'](_0x321425,_0x29f822,this['_markers'],_0xc7b9ac);}['_getPreviousFrom'](_0x4a7804){const _0x280957=Array['from'](this['_savedMetaData']['keys']());_0x280957['sort']((_0x5ce51c,_0x18f4c6)=>_0x5ce51c-_0x18f4c6),_0x280957['reverse']();for(const _0x4a787a of _0x280957)if(_0x4a787a<_0x4a7804)return _0x4a787a;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x48ced4,_0x19b3f2){const _0x134d27=Array['from'](_0x19b3f2['markers'])['map'](([_0xf1f076,_0x4c3912])=>[_0xf1f076,this['_fixRange'](_0x4c3912,_0x48ced4)]);_0x48ced4['markers']=new Map(_0x134d27);}['_transformMarkers'](_0x15ee29){for(const _0xbfd50d of this['_markers']['values']()){const _0x1da37e=_0xbfd50d['getTransformedByOperation'](_0x15ee29),_0x5a6a4d=ft['_createFromRanges'](_0x1da37e);_0xbfd50d['start']=_0x5a6a4d['start'],_0xbfd50d['end']=_0x5a6a4d['end'];}}['_handleOperation'](_0xc32627,_0x3fbfe5){if('addRoot'!=_0xc32627['type']&&'detachRoot'!=_0xc32627['type']){if('insert'==_0xc32627['type']){const _0x1bb998=_0xc32627['position']['root']['rootName'];this['_diffRoots']['has'](_0x1bb998)||(this['_diffRoots']['set'](_0x1bb998,F(_0x1bb998,!0x0)),this['_diffRootsAttributes']['set'](_0x1bb998,{}),_0x3fbfe5&&this['_idsRoots']['set'](_0x1bb998,F(_0x1bb998,!0x0)));}else{if('addRootAttribute'==_0xc32627['type']||'removeRootAttribute'==_0xc32627['type']||'changeRootAttribute'==_0xc32627['type'])return void this['_handleRootAttributeOperation'](_0xc32627);'marker'==_0xc32627['type']&&this['_handleMarkerOperation'](_0xc32627);}if('marker'!==_0xc32627['type']){const _0x557bc8=this['_cloneOperation'](_0xc32627,this['_diffRoots']);_0x557bc8['_execute'](),this['_transformMarkers'](_0x557bc8);}if(_0x3fbfe5)switch(_0xc32627['type']){case'insert':this['_handleInsertOperation'](_0xc32627);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0xc32627);break;case'merge':this['_handleMergeOperation'](_0xc32627);break;case'split':this['_handleSplitOperation'](_0xc32627);}}else this['_handleRootOperation'](_0xc32627,_0x3fbfe5);}['_cloneOperation'](_0x2d0d80,_0x374309){const _0x273c52=_0x2d0d80['clone']();return _0x273c52['_authorId']=_0x2d0d80['_authorId'],this['_fixOperation'](_0x273c52,_0x374309),_0x273c52;}['_getBaseVids'](_0xfeae05){return _0xfeae05['map'](_0x2bf556=>{const _0x4e27df=this['_getVidAttributeName'](_0x2bf556);return Number(_0x2bf556['item']['getAttribute'](_0x4e27df));});}['_generateTape'](_0x2fc33f,_0x25a178){if(_0x2fc33f['is']('element','$text'))_0x25a178['push']({'item':_0x2fc33f,'type':'text'});else{_0x2fc33f['is']('element')&&_0x25a178['push']({'item':_0x2fc33f,'type':'elementStart'});for(const _0x508bcc of _0x2fc33f['getChildren']())this['_generateTape'](_0x508bcc,_0x25a178);_0x2fc33f['is']('element')&&_0x25a178['push']({'item':_0x2fc33f,'type':'elementEnd'});}return _0x25a178;}['_getState'](){const _0x591713=new Map(this['_touched']),_0x1ccb77=new Map(_0x591713),_0x2cdb3e=new Map(),_0x186a58={'insertions':{},'deletions':{}},_0x4d51c7={'insertions':{},'deletions':{}},_0x35bffd=new Map(),_0x4194f4=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]);_0x4194f4['delete']('$graveyard');for(const _0x82b132 of _0x4194f4){const _0x4822a4=this['_diffRoots']['get'](_0x82b132)||F(_0x82b132,!0x1),_0x3543e3=this['_baseRoots']['get'](_0x82b132)||F(_0x82b132,!0x1);_0x4822a4['isAttached']()||_0x3543e3['isAttached']()?(_0x186a58['insertions'][_0x82b132]=T(_0x4822a4),_0x186a58['deletions'][_0x82b132]=T(_0x3543e3),this['_copyMarkers'](_0x186a58['deletions'][_0x82b132],_0x3543e3),this['_copyMarkers'](_0x186a58['insertions'][_0x82b132],_0x4822a4),_0x4d51c7['insertions'][_0x82b132]=this['_generateTape'](this['_idsRoots']['get'](_0x82b132),[]),_0x4d51c7['deletions'][_0x82b132]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x82b132)||F(_0x82b132,!0x1),[])):_0x4194f4['delete'](_0x82b132);}for(const _0x832d6 of _0x4194f4){const _0x5de806=_0x4d51c7['insertions'][_0x832d6];for(const _0xa44e32 of _0x5de806){const _0x47baa2=this['_getVidAttributeName'](_0xa44e32),_0x312693=_0xa44e32['item']['getAttribute'](_0x47baa2);_0x1ccb77['delete'](_0x312693),_0x312693>=this['_startingRevisionId']&&_0x2cdb3e['set'](_0x312693,_0x591713['get'](_0x312693));}}for(const _0x3a0a53 of _0x4194f4){const _0x35de58=_0x4d51c7['insertions'][_0x3a0a53],_0x377cd9=this['_getBaseVids'](_0x4d51c7['deletions'][_0x3a0a53]);let _0x40a39c=0x0;for(const _0x17f0f2 of _0x35de58){const _0x20d30b=this['_getVidAttributeName'](_0x17f0f2),_0x254da6=_0x17f0f2['item']['getAttribute'](_0x20d30b);if(!_0x2cdb3e['has'](_0x254da6)&&!_0x35bffd['has'](_0x254da6)){if(_0x1ccb77['has'](_0x254da6))_0x40a39c++;else{if(_0x254da6!=_0x377cd9[_0x40a39c]){const _0x46793a=_0x591713['get'](_0x254da6)||_0x591713['get'](_0x377cd9[_0x40a39c]);for(;_0x254da6!=_0x377cd9[_0x40a39c];)_0x1ccb77['has'](_0x377cd9[_0x40a39c])||(_0x35bffd['set'](_0x377cd9[_0x40a39c],_0x46793a),_0x591713['set'](_0x377cd9[_0x40a39c],_0x46793a)),_0x40a39c++;}_0x40a39c++;}}}}for(const _0x613113 of _0x4194f4){const _0xb70ddb=_0x4d51c7['insertions'][_0x613113];for(const _0x3080f4 of _0xb70ddb){const _0x23c1c0=this['_getVidAttributeName'](_0x3080f4),_0x4bfa2c=_0x3080f4['item']['getAttribute'](_0x23c1c0);if(_0x35bffd['has'](_0x4bfa2c)){const _0x104d18=_0x35bffd['get'](_0x4bfa2c);_0x1ccb77['has'](_0x4bfa2c)||_0x1ccb77['set'](_0x4bfa2c,{..._0x104d18}),_0x2cdb3e['set'](_0x4bfa2c,{..._0x104d18});}}}for(const _0x30f410 of _0x1ccb77['keys']())_0x30f410>=this['_startingRevisionId']&&_0x1ccb77['delete'](_0x30f410);const _0x12235c=new Map();for(const _0x3c8304 of _0x4194f4){let _0x2c420b=_0x4d51c7['insertions'][_0x3c8304];for(const _0x123b02 of _0x2c420b)if(_0x123b02['item']['is']('element','tableCell')){const _0x3636fa=this['_getVidAttributeName'](_0x123b02),_0x3bbb67=_0x123b02['item']['getAttribute'](_0x3636fa);if(_0x2cdb3e['has'](_0x3bbb67)){const _0x7d14e1=_0x123b02['item']['parent']['parent']['getAttribute']('vid_start'),_0x447093=_0x12235c['get'](_0x7d14e1)||new Set();_0x447093['add'](_0x2cdb3e['get'](_0x3bbb67)['userId']),_0x12235c['set'](_0x7d14e1,_0x447093);}}_0x2c420b=_0x4d51c7['deletions'][_0x3c8304];for(const _0x47ec2f of _0x2c420b)if(_0x47ec2f['item']['is']('element','tableCell')){const _0x499078=this['_getVidAttributeName'](_0x47ec2f),_0x2800a7=_0x47ec2f['item']['getAttribute'](_0x499078);if(_0x1ccb77['has'](_0x2800a7)){const _0x2a1a8d=_0x47ec2f['item']['parent']['parent']['getAttribute']('vid_start'),_0x5c75ac=_0x12235c['get'](_0x2a1a8d)||new Set();_0x5c75ac['add'](_0x1ccb77['get'](_0x2800a7)['userId']),_0x12235c['set'](_0x2a1a8d,_0x5c75ac);}}for(const _0x497cfe of _0x12235c['keys']())(_0x2cdb3e['has'](_0x497cfe)||_0x1ccb77['has'](_0x497cfe))&&_0x12235c['delete'](_0x497cfe);}for(const _0x41d0f6 of _0x4194f4){const _0x4f3676=_0x4d51c7['insertions'][_0x41d0f6];let _0xba4098=null,_0x29436a=null;for(const _0x34d84b of _0x4f3676){const _0x49ee84=this['_getVidAttributeName'](_0x34d84b),_0x46f012=_0x34d84b['item']['getAttribute'](_0x49ee84),_0x19c06b=_0x12235c['get'](_0x46f012);_0x19c06b&&'elementStart'==_0x34d84b['type']&&(_0xba4098=Array['from'](_0x19c06b)[0x0],_0x29436a=_0x34d84b['item']['getAttribute']('vid_end')),_0xba4098&&(_0x1ccb77['set'](_0x46f012,{'userId':_0xba4098}),_0x2cdb3e['set'](_0x46f012,{'userId':_0xba4098})),_0x46f012==_0x29436a&&(_0xba4098=null,_0x29436a=null);}}const _0x2793b2={},_0x1bfbc2=new Set();for(const _0xa76fae of _0x4194f4){const _0x2233de=_0x186a58['deletions'][_0xa76fae],_0xff4ef2=_0x186a58['insertions'][_0xa76fae];for(const {userId:_0x1d8993}of this['_touchedMarkers']['values']())null!==_0x1d8993&&_0x1bfbc2['add'](_0x1d8993);for(const {userId:_0x51f52a}of this['_touchedRoots']['values']())null!==_0x51f52a&&_0x1bfbc2['add'](_0x51f52a);this['_markChanges'](_0xff4ef2,_0x4d51c7['insertions'][_0xa76fae],_0x2cdb3e,'insertion',_0x1bfbc2),this['_markChanges'](_0x2233de,_0x4d51c7['deletions'][_0xa76fae],_0x1ccb77,'deletion',_0x1bfbc2),_0x2793b2[_0xa76fae]={'insertions':this['_prepareViewToSave'](_0xff4ef2),'deletions':this['_prepareViewToSave'](_0x2233de),'attachChange':this['_touchedRoots']['get'](_0xa76fae)||null,'attributesBefore':_0x351846(this['_baseRootsAttributes']['get'](_0xa76fae))||{},'attributesAfter':_0x351846(this['_diffRootsAttributes']['get'](_0xa76fae))};}return{'diffData':_0x2793b2,'authorsIds':Array['from'](_0x1bfbc2)};}['_processRootBeforeSave'](_0x2f240b){for(const [,_0x86869f]of _0x2f240b['markers']){const _0x5f59ba=_0x86869f['start']['getAncestors']()['filter'](_0x22fff8=>'tableCell'==_0x22fff8['name']);for(const _0x2e9e11 of _0x5f59ba)0x1==_0x2e9e11['childCount']&&_0x2e9e11['getChild'](0x0)['is']('element','paragraph')&&_0x2e9e11['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4735fb){this['_processRootBeforeSave'](_0x4735fb);const _0xd2c23a=this['editor']['data']['toView'](_0x4735fb,{}),_0x5d470c=Array['from'](_0xd2c23a['getChildren']())['map'](_0x3b1810=>this['_getViewJson'](_0x3b1810));return JSON['stringify'](_0x5d470c);}['_getViewJson'](_0x1cc70d){if(_0x1cc70d['is']('$text'))return _0x1cc70d['data'];{const _0xc73e26=_0x1cc70d;return{'type':Object['keys'](E)['find'](_0x30cd2c=>_0x1cc70d instanceof E[_0x30cd2c]),'name':_0xc73e26['name'],'attributes':Array['from'](_0xc73e26['getAttributes']()),'children':Array['from'](_0xc73e26['getChildren']())['map'](_0x52258b=>this['_getViewJson'](_0x52258b))};}}['_markChanges'](_0x15e109,_0x872cf2,_0x1e7612,_0x355197,_0x270439){let _0x35c3d9=null,_0x312d7a=null,_0x12184e=0x0;const _0x3532fb=this['editor']['model'];for(let _0x1d5591=0x0;_0x1d5591<_0x872cf2['length'];_0x1d5591++){const _0x5d0265=this['_getVidAttributeName'](_0x872cf2[_0x1d5591]),_0x1cf3dc=_0x872cf2[_0x1d5591]['item']['getAttribute'](_0x5d0265),_0x47a870=_0x1e7612['get'](_0x1cf3dc),_0x2668ea=_0x1d5591==_0x872cf2['length']-0x1;(!_0x35c3d9&&_0x47a870&&(_0x35c3d9=_0x47a870,_0x312d7a=_0x872cf2[_0x1d5591]),_0x35c3d9&&(!_0x47a870||_0x47a870['userId']!=_0x35c3d9['userId']))&&(_0x538561(_0x47a870,B(_0x312d7a,_0x15e109,_0x3532fb),B(_0x872cf2[_0x1d5591],_0x15e109,_0x3532fb)),_0x35c3d9=_0x47a870||null,_0x312d7a=_0x47a870?_0x872cf2[_0x1d5591]:null),_0x35c3d9&&_0x2668ea&&_0x538561(_0x47a870,B(_0x312d7a,_0x15e109,_0x3532fb),J(_0x872cf2[_0x1d5591],_0x15e109,_0x3532fb));}function _0x538561(_0x201692,_0x4a79ff,_0x4fc8e4){const _0x418538=_0x35c3d9['userId'],_0xe52573='revision:'+_0x355197+':'+_0x418538+':'+_0x12184e++,_0x5d2bc8=_0x3532fb['createRange'](_0x4a79ff,_0x4fc8e4);_0x15e109['markers']['set'](_0xe52573,_0x5d2bc8),null!==_0x418538&&_0x270439['add'](_0x418538);}}['_getVidAttributeName'](_0x33cdc4){switch(_0x33cdc4['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x4724aa,_0x5a28e4){_0x4724aa['baseVersion']=null;for(const _0x2dda2a in _0x4724aa){const _0x6d6b50=_0x4724aa[_0x2dda2a];if(_0x6d6b50 instanceof vt){const _0x27dad3=_0x5a28e4['get'](_0x6d6b50['root']['rootName']);_0x4724aa[_0x2dda2a]=this['_fixPosition'](_0x6d6b50,_0x27dad3);}if(_0x6d6b50 instanceof ft){const _0x2a51e3=_0x5a28e4['get'](_0x6d6b50['root']['rootName']);_0x4724aa[_0x2dda2a]=this['_fixRange'](_0x6d6b50,_0x2a51e3);}'root'===_0x2dda2a&&(_0x4724aa['root']=_0x5a28e4['get'](_0x4724aa['root']['rootName']));}}['_fixRange'](_0x414aaf,_0x43ac08){return this['editor']['model']['createRange'](this['_fixPosition'](_0x414aaf['start'],_0x43ac08),this['_fixPosition'](_0x414aaf['end'],_0x43ac08));}['_fixPosition'](_0xce8c67,_0x15a485){return this['editor']['model']['createPositionFromPath'](_0x15a485,_0xce8c67['path'],_0xce8c67['stickiness']);}['_handleInsertOperation'](_0x4138c8){const _0x2aaa22=this['_idsRoots']['get'](_0x4138c8['position']['root']['rootName']),_0x5e1d05=this['_fixPosition'](_0x4138c8['position'],_0x2aaa22),_0x47a914=null===_0x4138c8['_authorId']?null:_0x4138c8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1ca32e=_0x5e1d05['parent'],_0x497c97=this['_revisionId'],_0x3be5aa=[];for(const _0x7f68e3 of _0x4138c8['nodes'])if(_0x7f68e3['is']('element'))_0x3be5aa['push'](this['_makeIdsRoot'](_0x7f68e3));else{for(let _0x11b068=0x0;_0x11b068<_0x7f68e3['offsetSize'];_0x11b068++)_0x3be5aa['push'](new ut('$text',{'vid':this['_revisionId']++}));}const _0x117d92=this['_revisionId'];for(let _0x5f37b4=_0x497c97;_0x5f37b4<_0x117d92;_0x5f37b4++)this['_touched']['set'](_0x5f37b4,{'userId':_0x47a914});_0x1ca32e['_insertChild'](_0x5e1d05['offset'],_0x3be5aa);}['_handleMoveOperation'](_0x52d7c9){(_0x52d7c9=this['_cloneOperation'](_0x52d7c9,this['_idsRoots']))['_execute']();const _0x16915d=null===_0x52d7c9['_authorId']?null:_0x52d7c9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x596f9c=_0x52d7c9['getMovedRangeStart'](),_0x31b5dd=_0x596f9c['parent'],_0x3b5fb7=_0x596f9c['offset'];!function _0x437a1f(_0x3d740f,_0x2a752d,_0x1a964a,_0x5d3c48){for(let _0x49f2fe=_0x1a964a;_0x49f2fe<_0x5d3c48;_0x49f2fe++){const _0x15ce01=_0x2a752d['getChild'](_0x49f2fe);_0x15ce01['is']('element','$text')?_0x3d740f['set'](_0x15ce01['getAttribute']('vid'),{'userId':_0x16915d}):(_0x3d740f['set'](_0x15ce01['getAttribute']('vid_start'),{'userId':_0x16915d}),_0x437a1f(_0x3d740f,_0x15ce01,0x0,_0x15ce01['childCount']),_0x3d740f['set'](_0x15ce01['getAttribute']('vid_end'),{'userId':_0x16915d}));}}(this['_touched'],_0x31b5dd,_0x3b5fb7,_0x3b5fb7+_0x52d7c9['howMany']);}['_handleMergeOperation'](_0x4cad2f){const _0x59bff4=null===(_0x4cad2f=this['_cloneOperation'](_0x4cad2f,this['_idsRoots']))['_authorId']?null:_0x4cad2f['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3f1359=_0x4cad2f['targetPosition']['parent'],_0x3a0ea6=_0x4cad2f['sourcePosition']['parent'],_0x11780d=_0x3f1359['getAttribute']('vid_end'),_0x49623c=_0x3a0ea6['getAttribute']('vid_start');_0x3f1359['_setAttribute']('vid_end',_0x3a0ea6['getAttribute']('vid_end')),_0x3a0ea6['_setAttribute']('vid_end',_0x11780d),this['_touched']['set'](_0x49623c,{'userId':_0x59bff4}),this['_touched']['set'](_0x11780d,{'userId':_0x59bff4}),_0x4cad2f['_execute']();}['_handleSplitOperation'](_0xfdcc35){const _0x446856=null===(_0xfdcc35=this['_cloneOperation'](_0xfdcc35,this['_idsRoots']))['_authorId']?null:_0xfdcc35['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x73f6c7=_0xfdcc35['graveyardPosition'],_0x19f4aa=_0xfdcc35['splitPosition']['parent'];_0xfdcc35['_execute']();const _0x24832d=_0x19f4aa['getAttribute']('vid_end'),_0x4f1291=_0xfdcc35['insertionPosition']['nodeAfter'];if(_0x73f6c7){const _0x16dfe7=_0x4f1291['getAttribute']('vid_end'),_0x347b42=_0x19f4aa['getAttribute']('vid_end');_0x19f4aa['_setAttribute']('vid_end',_0x16dfe7),_0x4f1291['_setAttribute']('vid_end',_0x347b42),this['_touched']['set'](_0x19f4aa['getAttribute']('vid_end'),{'userId':_0x446856}),this['_touched']['set'](_0x4f1291['getAttribute']('vid_start'),{'userId':_0x446856});}else{const _0x29c957=this['_revisionId']++,_0x1e051c=this['_revisionId']++;_0x19f4aa['_setAttribute']('vid_end',_0x29c957),_0x4f1291['_setAttribute']('vid_start',_0x1e051c),_0x4f1291['_setAttribute']('vid_end',_0x24832d),this['_touched']['set'](_0x29c957,{'userId':_0x446856}),this['_touched']['set'](_0x1e051c,{'userId':_0x446856});}}['_handleMarkerOperation'](_0x1668cc){if(!_0x1668cc['affectsData'])return;const _0x1181ae=(_0x1668cc=this['_cloneOperation'](_0x1668cc,this['_diffRoots']))['oldRange']?_0x1668cc['oldRange']['root']:null,_0x45b259=_0x1668cc['newRange']?_0x1668cc['newRange']['root']:null;_0x1181ae&&this['_markers']['delete'](_0x1668cc['name']),_0x45b259&&this['_markers']['set'](_0x1668cc['name'],_0x1668cc['newRange']['clone']());const _0x39c286=null===_0x1668cc['_authorId']?null:_0x1668cc['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x641d87=_0x1668cc['name'];if(!this['_touchedMarkers']['has'](_0x641d87))return void this['_touchedMarkers']['set'](_0x641d87,{'range':_0x1668cc['oldRange'],'userId':_0x39c286});const _0x3e9250=this['_touchedMarkers']['get'](_0x641d87),_0x4b2427=_0x3e9250['range'],_0x1c8be4=_0x1668cc['newRange'];null==_0x4b2427&&null==_0x1c8be4||_0x4b2427&&_0x1c8be4&&_0x4b2427['isEqual'](_0x1c8be4)?this['_touchedMarkers']['delete'](_0x1668cc['name']):_0x3e9250['userId']=_0x39c286;}['_handleRootOperation'](_0x137125,_0x52955f){this['_diffRoots']['has'](_0x137125['rootName'])?this['_diffRoots']['get'](_0x137125['rootName'])['_isAttached']=_0x137125['isAdd']:(this['_diffRoots']['set'](_0x137125['rootName'],F(_0x137125['rootName'],!0x0)),this['_diffRootsAttributes']['set'](_0x137125['rootName'],{}),_0x52955f&&this['_idsRoots']['set'](_0x137125['rootName'],F(_0x137125['rootName'],!0x0)));const _0x3a1faf=null===_0x137125['_authorId']?null:_0x137125['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x298825=this['_touchedRoots']['get'](_0x137125['rootName']);_0x298825&&_0x298825['userId']===_0x3a1faf?this['_touchedRoots']['delete'](_0x137125['rootName']):this['_touchedRoots']['set'](_0x137125['rootName'],{'userId':_0x3a1faf,'isAttached':_0x137125['isAdd']});}['_handleRootAttributeOperation'](_0x199959){const _0x4fefae=this['_diffRootsAttributes']['get'](_0x199959['root']['rootName']);null===_0x199959['newValue']?delete _0x4fefae[_0x199959['key']]:_0x4fefae[_0x199959['key']]=_0x199959['newValue'];}}function T(_0x49ba8f){const _0x221939=F(_0x49ba8f['rootName'],_0x49ba8f['isAttached']());for(const _0x511fc0 of _0x49ba8f['getChildren']()){const _0x28e439=_0x511fc0['_clone'](!0x0);_0x221939['_appendChild'](_0x28e439);}return _0x221939;}function F(_0x2f44ae,_0x445ae0=!0x0){const _0xb6e315=new gt();return _0xb6e315['rootName']=_0x2f44ae,_0xb6e315['_isAttached']=_0x445ae0,_0xb6e315['isAttached']=()=>_0xb6e315['_isAttached'],_0xb6e315;}function B(_0x11d8cf,_0x274d20,_0x56d56b){const _0x172f26='elementEnd'==_0x11d8cf['type']?_0x56d56b['createPositionAt'](_0x11d8cf['item'],'end'):_0x56d56b['createPositionBefore'](_0x11d8cf['item']);return _0x56d56b['createPositionFromPath'](_0x274d20,_0x172f26['path'],_0x172f26['stickiness']);}function J(_0x51bace,_0x566322,_0x500d00){const _0x2d520f='elementStart'==_0x51bace['type']?_0x500d00['createPositionAt'](_0x51bace['item'],0x0):_0x500d00['createPositionAfter'](_0x51bace['item']);return _0x500d00['createPositionFromPath'](_0x566322,_0x2d520f['path'],_0x2d520f['stickiness']);}class hs extends ts{['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x3dd83c,_0x1a86aa){super(_0x3dd83c),this['focusTracker']=new _0x3dfb88(),this['keystrokes']=new _0xef17d7(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x1a86aa),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),_0x4d7ad0(this);}['render'](){super['render'](),_0x190f2f({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0x37aeb8=_0x3afe01=>_0x3afe01['stopPropagation']();this['keystrokes']['set']('arrowright',_0x37aeb8),this['keystrokes']['set']('arrowleft',_0x37aeb8),this['keystrokes']['set']('arrowup',_0x37aeb8),this['keystrokes']['set']('arrowdown',_0x37aeb8);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x37ddd3){this['revisionNameInputView']['fieldView']['element']['value']=_0x37ddd3['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x16da6a){const _0x199d69=new _0xecce61(this['locale'],_0x5c6c61),_0x504bcf=_0x199d69['fieldView'];_0x504bcf['extendTemplate']({'attributes':{'maxlength':'220'}});let _0xecdc81=m(this['locale'],'Name\x20of\x20the\x20revision');return!_0x16da6a&&(_0xecdc81+='\x20('+m(this['locale'],'optional')+')'),(_0x199d69['label']=_0xecdc81,_0x504bcf['on']('input',()=>{this['revisionNameInputValue']=_0x504bcf['element']['value']['trim']();}),_0x199d69);}}class f extends _0x3c80d2{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u];}['_saveRevisionFormView'];['init'](){const _0x27bc9b=this['editor'],_0x1306f3=_0x27bc9b['plugins']['get']('RevisionTracker');_0x27bc9b['ui']['componentFactory']['add']('revisionHistory',_0x488352=>{const _0x5da3b4=_0x3690ba(_0x488352),_0x3a0272=_0x5da3b4['panelView']['children'],_0x1e9765=new _0x594650(_0x488352),_0xc50de5=new _0xbcf656(_0x488352),_0x3e6e71=new te(_0x488352),_0x2105c7=new _0xbcf656(_0x488352),_0x5a2e82=new te(_0x488352);return _0x5da3b4['bind']('isEnabled')['to'](_0x1306f3,'isReady',_0x1306f3,'isEnabled',_0x27bc9b,'isReadOnly',(_0x220df5,_0x32bf17,_0x41d410)=>_0x220df5&&_0x32bf17&&!_0x41d410),_0x5da3b4['buttonView']['set']({'icon':_0x3144c0,'label':m(_0x488352,'Revision\x20history'),'tooltip':!0x0}),_0x3e6e71['set']({'label':m(_0x488352,'Save\x20current\x20revision'),'withText':!0x0,'role':'menuitem'}),_0x3e6e71['bind']('isEnabled')['to'](_0x1306f3,'isReady',_0x1306f3,'isEnabled',_0x27bc9b,'isReadOnly',(_0x4c7a41,_0x459e7d,_0x30f2ce)=>_0x4c7a41&&_0x459e7d&&!_0x30f2ce),_0x3e6e71['on']('execute',()=>this['_showDialog']()),_0x5a2e82['set']({'label':m(_0x488352,'Open\x20revision\x20history'),'withText':!0x0,'role':'menuitem'}),_0x5a2e82['bind']('isEnabled')['to'](_0x1306f3,'isReady',_0x27bc9b,'isReadOnly',(_0x5e5cce,_0x5dd194)=>_0x5e5cce&&!_0x5dd194),_0x5a2e82['on']('execute',()=>{_0x27bc9b['config']['get']('revisionHistory')['showRevisionViewerCallback'](),_0x5da3b4['isOpen']=!0x1,_0x27bc9b['editing']['view']['focus']();}),_0xc50de5['children']['add'](_0x3e6e71),_0x2105c7['children']['add'](_0x5a2e82),_0x1e9765['role']='menu',_0x1e9765['items']['addMany']([_0xc50de5,_0x2105c7]),_0x3a0272['add'](_0x1e9765),_0x5da3b4;}),_0x27bc9b['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x20bc5f=this['editor'],_0x59a211=_0x20bc5f['locale'],_0x460bea=new _0x3d65e2(_0x59a211),_0x31ecb6=new _0x3abd94(_0x59a211);_0x460bea['buttonView']['set']({'icon':_0x3144c0,'label':m(_0x59a211,'Revision\x20history')});const _0x33d14f=new _0x390930(_0x59a211,_0x460bea),_0x511b33=new _0x5a5432(_0x59a211);_0x511b33['set']({'label':m(_0x59a211,'Save\x20current\x20revision')}),_0x511b33['delegate']('execute')['to'](_0x460bea),_0x511b33['on']('execute',()=>{this['_showDialog']();}),_0x33d14f['children']['add'](_0x511b33),_0x31ecb6['items']['add'](_0x33d14f);const _0x56e415=new _0x390930(_0x59a211,_0x460bea),_0x26bc94=new _0x5a5432(_0x59a211);return _0x26bc94['set']({'label':m(_0x59a211,'Open\x20revision\x20history')}),_0x26bc94['delegate']('execute')['to'](_0x460bea),_0x26bc94['on']('execute',()=>{_0x20bc5f['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x56e415['children']['add'](_0x26bc94),_0x31ecb6['items']['add'](_0x56e415),_0x460bea['panelView']['children']['add'](_0x31ecb6),_0x460bea;}['_showDialog'](){const _0x36731e=this['editor'],_0x313510=_0x36731e['locale'],_0x432b74=_0x36731e['plugins']['get']('Dialog'),_0x67aacf=_0x36731e['plugins']['get']('RevisionTracker');function _0x3bbae9(_0x1a1c38){_0x36731e['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1a1c38['revisionName']?_0x1a1c38['revisionNameInputView']['errorText']=m(_0x313510,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x36731e['plugins']['get'](u)['saveRevision']({'name':_0x1a1c38['revisionName']}),_0x432b74['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x3bbae9(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x432b74['show']({'id':'revisionSave','title':m(_0x313510,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':m(_0x36731e['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x432b74['hide']()},{'label':m(_0x36731e['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x164ad6){_0x164ad6['bind']('isEnabled')['to'](_0x67aacf,'isReady',_0x67aacf,'isEnabled',_0x36731e,'isReadOnly',(_0x350ebb,_0x1ee264,_0x255356)=>_0x350ebb&&_0x1ee264&&!_0x255356);},'onExecute':()=>_0x3bbae9(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x516d7c=this['editor'],_0x642caf=_0x516d7c['locale'];this['_saveRevisionFormView']=new hs(_0x642caf,_0x516d7c['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class X extends ts{['changeId'];['_model'];constructor(_0x5d06e5,_0x41c81c){super(_0x5d06e5),this['_model']=_0x41c81c,this['changeId']=_0x41c81c['id'];const _0x3674cd=this['bindTemplate'],_0x53b380=m(_0x5d06e5,_0x41c81c['data']['isSuggestion']?'Suggested\x20by':'add'==_0x41c81c['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x41c81c['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0x3674cd['to']('type',_0x4efc83=>'ck-revision-change__'+_0x4efc83)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x53b380}]},{'text':'\x20'+_0x41c81c['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class r extends/* #__PURE__ -- @preserve */
25
+ _0x4d6e3b(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x5acedf){super(),this['id']=_0x5acedf['id']||_0xe821f1(),this['author']=_0x5acedf['author'],this['type']=_0x5acedf['type'],this['data']=_0x5acedf['data']||{},this['rootName']=_0x5acedf['rootName'],this['set']('createdAt',_0x5acedf['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class c{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0xddf9e7,_0x5d042b){this['newRevisionId']=_0xddf9e7,this['oldRevisionId']=_0x5d042b,this['changes']=new _0x751bfb();}['_setChanges'](_0x523157){for(const _0x26128f of _0x523157)this['changes']['add'](_0x26128f);}}const Y={'c':_0x2901db,'a':_0x378d02,'e':_0x50a7fd,'r':_0x5f2f31,'u':_0x5ad08c};class d extends _0x3c80d2{['repository'];['adapter'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x442638,_0x44d490,j];}constructor(_0x41000d){super(_0x41000d),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x3aa0e6,_0x422082,_0x2d5509)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x4df287=>{for(const _0x5d2fef of this['editor']['editing']['view']['document']['roots'])_0x2d5509?_0x4df287['removeClass']('ck-editor__editable__overlay',_0x5d2fef):_0x4df287['addClass']('ck-editor__editable__overlay',_0x5d2fef);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x48429b=>null!==_0x48429b),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x46248d,_0x1eaf47,_0x13b3db)=>_0x46248d&&_0x13b3db?_0x1eaf47['changes']['getIndex'](_0x13b3db):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x56f438,_0x2664f7)=>_0x56f438?_0x2664f7['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['adapter']=null,this['_balloon']=this['editor']['plugins']['get'](_0x44d490);}['init'](){const _0x5f448d=this['editor'],_0x508dd8=new _t(_0x5f448d,{'direction':'backward'}),_0xd497d6=new _t(_0x5f448d,{'direction':'forward'});(_0x5f448d['commands']['add']('showPreviousChange',_0x508dd8),_0x5f448d['commands']['add']('showNextChange',_0xd497d6),_0x5f448d['commands']['add']('restoreRevision',new wt(_0x5f448d)),this['on']('change:numberOfChanges',()=>{_0x508dd8['refresh'](),_0xd497d6['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x5f448d['enableReadOnlyMode']('revision-viewer'),_0x5f448d['plugins']['has']('WidgetToolbarRepository'))&&_0x5f448d['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionData'](_0xf13dfd){await this['loadRevisionData'](_0xf13dfd);const _0x5e7921={};for(const _0xf25be4 in _0xf13dfd['diffData']){if(_0xf13dfd['diffData'][_0xf25be4]['attachChange']&&!_0xf13dfd['diffData'][_0xf25be4]['attachChange']['isAttached'])continue;const _0x48b602=this['_removeRevisionMarkers'](JSON['parse'](_0xf13dfd['diffData'][_0xf25be4]['insertions'])),_0x1cf1df=this['editor']['editing']['view']['document'],_0x22730f=new _0x469639(_0x1cf1df,_0x48b602['map'](_0x4cb1b8=>this['_getViewObj'](_0x4cb1b8)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5e7921[_0xf25be4]=this['editor']['data']['processor']['toData'](_0x22730f),this['editor']['data']['processor']['useFillerType']('default');}return _0x5e7921;}async['getRevisionRootsAttributes'](_0x8036c7){await this['loadRevisionData'](_0x8036c7);const _0x54e088={};for(const _0x401e74 in _0x8036c7['diffData'])_0x8036c7['diffData'][_0x401e74]['attachChange']&&!_0x8036c7['diffData'][_0x401e74]['attachChange']['isAttached']||(_0x54e088[_0x401e74]=_0x8036c7['diffData'][_0x401e74]['attributesAfter']||{});return _0x54e088;}['_removeRevisionMarkers'](_0x3d98a7){return(_0x3d98a7=_0x3d98a7['filter'](_0x12d216=>!_0x12d216['name']||'revision-start'!==_0x12d216['name']&&'revision-end'!==_0x12d216['name']))['forEach'](_0x23eafb=>{'string'!=typeof _0x23eafb&&(_0x23eafb['children']=this['_removeRevisionMarkers'](_0x23eafb['children']),_0x23eafb['attributes']=_0x23eafb['attributes']['filter'](_0xb89a2=>!_0xb89a2[0x0]['startsWith']('data-revision-')));}),_0x3d98a7;}async['compare'](_0xa5d19c,_0x87e012,_0x5a86a7=!0x1){if(!this['isEnabled'])return;const _0x3f68ad=this['diff'],_0xaf965a=this['repository'],_0x24bd31='string'==typeof _0xa5d19c?_0xaf965a['getRevision'](_0xa5d19c):_0xa5d19c,_0x78e3e4='string'==typeof _0x87e012?_0xaf965a['getRevision'](_0x87e012):_0x87e012,_0x259982=_0x24bd31['id'],_0x5c375e=_0x78e3e4?_0x78e3e4['id']:null;if(!_0x5a86a7&&this['diff']&&this['diff']['newRevisionId']===_0x259982&&this['diff']['oldRevisionId']===_0x5c375e)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new c(_0x259982,_0x5c375e);const _0x9f6c38=this['_getRevisionsRange'](_0x24bd31,_0x78e3e4,!0x0)['map'](_0x204829=>this['loadRevisionData'](_0x204829));return _0x9f6c38['push'](new Promise(_0x3cb17a=>{setTimeout(_0x3cb17a,0x14);})),Promise['all'](_0x9f6c38)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x269a94=this['_getDiff'](_0x259982,_0x5c375e);for(const _0x487661 of _0x269a94['changes'])this['_changeIdToChange']['set'](_0x487661['id'],_0x487661);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x50c240=>{for(const _0x1cebc5 of this['editor']['model']['document']['getRootNames']())_0x50c240['detachRoot'](_0x1cebc5);for(const _0x14fdd7 of Object['keys'](_0x269a94['model'])){const _0x2025f5=_0x50c240['addRoot'](_0x14fdd7);for(const _0x3856fb of Object['keys'](_0x269a94['attributes'][_0x14fdd7]))_0x50c240['setAttribute'](_0x3856fb,_0x269a94['attributes'][_0x14fdd7][_0x3856fb],_0x2025f5);_0x50c240['insert'](_0x269a94['model'][_0x14fdd7],_0x2025f5,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x269a94['changes'])),this['isReady']=!0x0;})['catch'](_0x3cc91d=>{console['error'](_0x3cc91d),this['_cleanUp'](),_0x3f68ad&&(this['diff']=_0x3f68ad),this['isReady']=!0x0;});}['addRevisionData'](_0x4580a5,_0x4ab92b){const _0x2db92f=this['repository']['createRevision'](_0x4580a5);return _0x2db92f['on']('_update',(_0x27c092,_0x5e2723,_0x4d4d15)=>_0x4ab92b(_0x5e2723,_0x4d4d15,_0x2db92f)),this['repository']['addRevision'](_0x2db92f),_0x2db92f;}['loadRevisionData'](_0xfe3952){if(!_0xfe3952||_0xfe3952['diffData'])return Promise['resolve']();{const _0x9eb6f3=this['editor']['config']['get']('collaboration.channelId');return this['adapter']['getRevision']({'channelId':_0x9eb6f3,'revisionId':_0xfe3952['id']})['then'](_0x48ccb1=>{_0xfe3952['_update']({'diffData':_0x48ccb1['diffData']},!0x0);});}}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0xbfaf57=>{for(const _0x2ccae6 of this['editor']['model']['document']['getRootNames']())_0xbfaf57['detachRoot'](_0x2ccae6);});}['_sortAndFilterDiffChanges'](_0x32b9c1){const _0x1faaa6=[],_0x1a4905=new Map();for(const _0x44d619 of this['editor']['model']['document']['getRootNames']()){const _0x46341c=this['editor']['editing']['view']['getDomRoot'](_0x44d619);if(!_0x46341c)continue;const _0x2d2cd0=_0x46341c['getClientRects']()['item'](0x0);_0x2d2cd0&&(_0x1faaa6['push'](_0x44d619),_0x1a4905['set'](_0x44d619,_0x2d2cd0));}return _0x1faaa6['sort']((_0x80ae40,_0x171129)=>{const _0x408698=_0x1a4905['get'](_0x80ae40),_0x52ab28=_0x1a4905['get'](_0x171129);return _0x408698['y']-_0x52ab28['y']||_0x408698['x']-_0x52ab28['x'];}),(_0x32b9c1=_0x32b9c1['filter'](_0x25e851=>_0x1faaa6['includes'](_0x25e851['rootName'])))['sort']((_0x6cf999,_0x1c0d4c)=>_0x1faaa6['indexOf'](_0x6cf999['rootName'])-_0x1faaa6['indexOf'](_0x1c0d4c['rootName'])),_0x32b9c1;}['_makeTape'](_0x3f66aa){const _0x2e5ff0=Array['from'](_0x3f66aa['markers'])['filter'](([_0x144bd7,_0x2b00a6])=>_0x144bd7['startsWith']('revision:')&&!_0x2b00a6['isCollapsed']),_0x282257=Array['from'](this['editor']['model']['createRangeIn'](_0x3f66aa)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x2e5ff0['length'])for(const _0x4ac0fe of _0x282257){const [_0x3e6025,_0x2627a2]=_0x2e5ff0[0x0],[,_0x36aa31,_0x324f43]=_0x3e6025['split'](':');if(_0x2627a2['end']['isEqual'](_0x4ac0fe['nextPosition'])&&_0x2e5ff0['shift'](),(_0x4ac0fe['previousPosition']['isEqual'](_0x2627a2['start'])||_0x4ac0fe['previousPosition']['isAfter'](_0x2627a2['start']))&&('insertion'==_0x36aa31?_0x4ac0fe['isAdded']={'userId':_0x324f43}:'deletion'==_0x36aa31&&(_0x4ac0fe['isRemoved']={'userId':_0x324f43})),0x0==_0x2e5ff0['length'])break;}return _0x282257;}['_refreshStartEndIndex'](_0x57d5e9){const _0x5d57c3=new Map();for(let _0xefc314=0x0;_0xefc314<_0x57d5e9['length'];_0xefc314++)'text'===_0x57d5e9[_0xefc314]['type']?(_0x57d5e9[_0xefc314]['item']['startIndex']=_0xefc314,_0x57d5e9[_0xefc314]['item']['endIndex']=_0xefc314):('elementStart'===_0x57d5e9[_0xefc314]['type']?_0x57d5e9[_0xefc314]['item']['startIndex']=_0xefc314:'elementEnd'===_0x57d5e9[_0xefc314]['type']&&(_0x57d5e9[_0xefc314]['item']['endIndex']=_0xefc314),_0x5d57c3['set'](_0x57d5e9[_0xefc314]['id'],_0xefc314));for(const _0x5888e4 of _0x5d57c3['values']())'elementStart'===_0x57d5e9[_0x5888e4]['type']?_0x57d5e9[_0x5888e4]['item']['endIndex']=_0x5d57c3['get'](_0x57d5e9[_0x5888e4]['pairId']):'elementEnd'===_0x57d5e9[_0x5888e4]['type']&&(_0x57d5e9[_0x5888e4]['item']['startIndex']=_0x5d57c3['get'](_0x57d5e9[_0x5888e4]['pairId']));}['_processTape'](_0x4b44e4){for(let _0x128557=0x0;_0x128557<_0x4b44e4['length'];_0x128557++){if('elementStart'===_0x4b44e4[_0x128557]['type'])_0x4b44e4[_0x128557]['item']['startIndex']=_0x128557;else{if('elementEnd'===_0x4b44e4[_0x128557]['type']){_0x4b44e4[_0x128557]['item']['endIndex']=_0x128557;const _0x182b3b=_0x4b44e4[_0x128557]['item']['startIndex'];_0x4b44e4[_0x182b3b]['pairId']=_0x4b44e4[_0x128557]['id'],_0x4b44e4[_0x128557]['pairId']=_0x4b44e4[_0x182b3b]['id'];}else _0x4b44e4[_0x128557]['item']['startIndex']=_0x128557,_0x4b44e4[_0x128557]['item']['endIndex']=_0x128557,_0x4b44e4[_0x128557]['pairId']=null;}_0x4b44e4[_0x128557]['markersStart']||(_0x4b44e4[_0x128557]['markersStart']=[],_0x4b44e4[_0x128557]['markersEnd']=[]);}}['_markInsertions'](_0x4be4e4,_0x4eef74){const _0x5b6b69=_0x4be4e4['filter'](_0x3e373d=>!_0x3e373d['isAdded']);for(let _0x5698a3=0x0;_0x5698a3<_0x4eef74['length'];_0x5698a3++)_0x4eef74[_0x5698a3]['isAdded']&&(_0x5b6b69[_0x5698a3]['isAdded']=_0x4eef74[_0x5698a3]['isAdded']);}['_makeModelFromViewString'](_0x1cd748){const _0x2ca51d=JSON['parse'](_0x1cd748),_0x50436f=this['editor']['editing']['view']['document'],_0x5347fe=new _0x469639(_0x50436f,_0x2ca51d['map'](_0x16619a=>this['_getViewObj'](_0x16619a)));return this['editor']['data']['toModel'](_0x5347fe);}['_getViewObj'](_0x1ac7ca){const _0x109204=this['editor']['editing']['view']['document'];if('string'==typeof _0x1ac7ca)return new _0x4ccbca(_0x109204,_0x1ac7ca);{const _0x3587ee=_0x1ac7ca['children']['map'](_0xc99348=>this['_getViewObj'](_0xc99348));return new(Y[_0x1ac7ca['type']]||_0x46c9fc)(_0x109204,_0x1ac7ca['name'],_0x1ac7ca['attributes'],_0x3587ee);}}['_getDiff'](_0x5309c0,_0x1b7421=null){const _0x52f3ee=this['repository']['getRevision'](_0x5309c0),_0x11f36e=_0x1b7421?this['repository']['getRevision'](_0x1b7421):null,_0x50d914=this['_getRevisionsRange'](_0x52f3ee,_0x11f36e),_0x2c8269=_0x50d914[_0x50d914['length']-0x1],_0x19f6df=new Map(),_0x23eaf9={'model':{},'attributes':{},'changes':[]},_0x38b635=new Set(),_0x52c062=new Map();for(let _0x387b60=_0x50d914['length']-0x1;_0x387b60>=0x0;_0x387b60--){const _0x414dcc=_0x50d914[_0x387b60];for(const _0x447f20 of Object['keys'](_0x414dcc['diffData']))if(_0x414dcc['diffData'][_0x447f20]['attachChange']){const _0x1a90be=_0x414dcc['diffData'][_0x447f20]['attachChange'];_0x1a90be['isAttached']?(_0x38b635['add'](_0x447f20),_0x52c062['has'](_0x447f20)&&_0x52c062['get'](_0x447f20)['userId']==_0x1a90be['userId']?_0x52c062['delete'](_0x447f20):_0x52c062['set'](_0x447f20,_0x1a90be)):_0x52c062['has'](_0x447f20)?(_0x38b635['delete'](_0x447f20),_0x52c062['delete'](_0x447f20)):(_0x38b635['add'](_0x447f20),_0x52c062['set'](_0x447f20,_0x1a90be));}else _0x38b635['add'](_0x447f20);}for(const _0x539231 of _0x38b635){const _0x32981e=_0x52c062['has'](_0x539231)&&!_0x52c062['get'](_0x539231)['isAttached'];let _0x1d14b5=_0x32981e?_0x50d914['length']-0x1:0x0;const _0x10109e=_0x32981e?-0x1:0x1;for(;_0x50d914[_0x1d14b5];){const _0x51b6a7=_0x50d914[_0x1d14b5];if(_0x51b6a7['diffData'][_0x539231]){const _0xe02c2b=_0x32981e?_0x51b6a7['diffData'][_0x539231]['attributesBefore']:_0x51b6a7['diffData'][_0x539231]['attributesAfter'];_0x23eaf9['attributes'][_0x539231]=_0xe02c2b?_0x351846(_0xe02c2b):{};break;}_0x1d14b5+=_0x10109e;}}for(const _0x2a3d83 of _0x50d914){_0x2a3d83['model']={};for(const _0x20cb27 of _0x2a3d83['authors'])_0x19f6df['set'](_0x20cb27['id'],_0x20cb27);for(const _0x1d2ccb of _0x38b635){const _0x268086=_0x2a3d83['diffData'][_0x1d2ccb]?_0x2a3d83['diffData'][_0x1d2ccb]['insertions']:'[]',_0x156f33=_0x2a3d83['diffData'][_0x1d2ccb]?_0x2a3d83['diffData'][_0x1d2ccb]['deletions']:'[]';_0x2a3d83['model'][_0x1d2ccb]={'insertions':this['_makeModelFromViewString'](_0x268086),'deletions':this['_makeModelFromViewString'](_0x156f33)};}}for(const _0x27f7ce of _0x38b635){let _0x43e49f=null,_0x1c92a6=0x0;const _0x58b36b=new Map(Array['from'](_0x52f3ee['model'][_0x27f7ce]['insertions']['markers'])['filter'](([_0x56cf20])=>!_0x56cf20['startsWith']('revision:')));let _0x4e414e=0x0;for(const _0x53cef4 of _0x50d914){const _0x40b09f=this['_makeTape'](_0x53cef4['model'][_0x27f7ce]['insertions']);_0x53cef4==_0x52f3ee?(_0x43e49f=_0x40b09f,_0x1c92a6=_0x43e49f['length'],_0x43e49f['forEach'](_0x3cb000=>{_0x3cb000['id']=_0x4e414e++;}),this['_processTape'](_0x43e49f)):this['_markInsertions'](_0x43e49f,_0x40b09f);const _0x47b6b4=_0x43e49f['filter'](_0xe856f1=>!_0xe856f1['isAdded'])['map'](_0x5ea76d=>_0x5ea76d['id']);let _0x5ba198=0x0;const _0x151876=this['_makeTape'](_0x53cef4['model'][_0x27f7ce]['deletions']);_0x151876['forEach'](_0xf676e1=>{_0xf676e1['isRemoved']?_0xf676e1['id']=_0x1c92a6++:_0xf676e1['id']=_0x47b6b4[_0x5ba198++];}),this['_processTape'](_0x151876),this['_setDistance'](_0x43e49f,'isAdded'),this['_setDistance'](_0x151876,'isRemoved'),_0x53cef4==_0x52f3ee&&this['_markMarkers'](_0x43e49f,_0x58b36b),_0x43e49f=this['_joinTapes'](_0x43e49f,_0x151876),this['_refreshStartEndIndex'](_0x43e49f),this['_setDistance'](_0x43e49f,'isRemoved');}_0x43e49f=_0x43e49f['filter'](_0x2ab0ae=>!(_0x2ab0ae['isAdded']&&_0x2ab0ae['isRemoved']));const _0x35cdfa=new Map(_0x2c8269['model'][_0x27f7ce]['deletions']['markers']),_0x4d230c=new Set(_0x58b36b['keys']());for(const _0x2fcf88 of _0x35cdfa['keys']())_0x4d230c['delete'](_0x2fcf88);this['_markSuggestions'](_0x43e49f,_0x4d230c),this['_fixObsoleteTags'](_0x43e49f),_0x43e49f=this['_removeMissingPairs'](_0x43e49f),_0x43e49f=this['_markMismatchedRemovedTags'](_0x43e49f),_0x43e49f=this['_removeUnsupportedChanges'](_0x43e49f);const {root:_0xdea234,changes:_0x1241ad}=this['_makeModelFromTape'](_0x43e49f,_0x19f6df,_0x27f7ce);_0x23eaf9['model'][_0x27f7ce]=_0xdea234;const _0xfadd22=_0x52c062['get'](_0x27f7ce);if(_0xfadd22){const _0x455bc2=_0x19f6df['get'](_0xfadd22['userId']),_0x49b6d4=new r({'author':_0x455bc2,'type':_0xfadd22['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x27f7ce});_0x1241ad['unshift'](_0x49b6d4),_0x23eaf9['attributes'][_0x27f7ce]['revisionHistoryAttachChange']=_0x49b6d4['id'];}_0x23eaf9['changes']=_0x23eaf9['changes']['concat'](_0x1241ad);}return _0x23eaf9;}['_markMarkers'](_0x77a712,_0x54d523){for(let _0x2b6720=0x0;_0x2b6720<_0x77a712['length'];_0x2b6720++)for(const [_0x3765d4,_0x1b85b8]of _0x54d523)_0x1b85b8['start']['isEqual'](_0x77a712[_0x2b6720]['previousPosition'])&&_0x77a712[_0x2b6720]['markersStart']['push'](_0x3765d4),_0x1b85b8['end']['isEqual'](_0x77a712[_0x2b6720]['nextPosition'])&&_0x77a712[_0x2b6720]['markersEnd']['push'](_0x3765d4);}['_joinTapes'](_0x43a355,_0x4df995){let _0x580c28=[],_0x8ec794=0x0,_0x3d3d48=0x0;for(;_0x8ec794<_0x43a355['length']||_0x3d3d48<_0x4df995['length'];){const _0x4616ba=_0x43a355[_0x8ec794]||{},_0x5f52eb=_0x4df995[_0x3d3d48]||{};if(_0x4616ba['id']==_0x5f52eb['id'])_0x8ec794++,_0x3d3d48++,_0x580c28['push'](_0x4616ba);else{if(_0x5f52eb['isRemoved']&&_0x4616ba['isAdded']){const {commonTape:_0x3447bc,iEnd:_0x270b6e,jEnd:_0x33b2b9}=this['_threeWayMerge'](_0x43a355,_0x8ec794,_0x4df995,_0x3d3d48);_0x580c28=_0x580c28['concat'](_0x3447bc),_0x8ec794=_0x270b6e,_0x3d3d48=_0x33b2b9;}else _0x5f52eb['isRemoved']?(_0x3d3d48++,_0x580c28['push'](_0x5f52eb)):(_0x8ec794++,_0x580c28['push'](_0x4616ba));}}return _0x580c28;}['_markSuggestions'](_0x17a067,_0x6195d){const _0x43cb15=[];for(let _0x1d39a0=0x0;_0x1d39a0<_0x17a067['length'];_0x1d39a0++){for(let _0xc6565b=0x0;_0xc6565b<_0x17a067[_0x1d39a0]['markersStart']['length'];_0xc6565b++){const _0x11589f=_0x17a067[_0x1d39a0]['markersStart'][_0xc6565b];if(!_0x6195d['has'](_0x11589f))continue;const {group:_0x403c9e,type:_0x3ecb72,authorId:_0x21c834}=_0x486d08(_0x11589f);'revision-suggestion'!=_0x403c9e||'insertion'!=_0x3ecb72&&'deletion'!=_0x3ecb72||(_0x43cb15['unshift']({'type':_0x3ecb72,'name':_0x11589f,'userId':_0x21c834}),_0x17a067[_0x1d39a0]['markersStart']['splice'](_0xc6565b,0x1),_0xc6565b--);}_0x2f52fc(_0x17a067[_0x1d39a0]);for(let _0x41627e=0x0;_0x41627e<_0x17a067[_0x1d39a0]['markersEnd']['length'];_0x41627e++){const _0x160d99=_0x17a067[_0x1d39a0]['markersEnd'][_0x41627e];if(!_0x6195d['has'](_0x160d99))continue;const {group:_0x1b501e,type:_0x319e47}=_0x486d08(_0x160d99);if('revision-suggestion'!=_0x1b501e||'insertion'!=_0x319e47&&'deletion'!=_0x319e47)continue;_0x17a067[_0x1d39a0]['markersEnd']['splice'](_0x41627e,0x1),_0x41627e--;const _0x3cb87b=_0x43cb15['findIndex'](_0x466581=>_0x466581['name']==_0x160d99);_0x3cb87b>-0x1&&_0x43cb15['splice'](_0x3cb87b,0x1);}}function _0x486d08(_0x1cf988){const _0x6f910c=_0x1cf988['split'](':');return{'group':_0x6f910c[0x0],'type':_0x6f910c[0x1],'subType':_0x6f910c['length']>=0x5?_0x6f910c[0x2]:null,'id':_0x6f910c['length']<0x5?_0x6f910c[0x2]:_0x6f910c[0x3],'authorId':_0x6f910c['length']<0x5?_0x6f910c[0x3]:_0x6f910c[0x4],'markerCount':0x6==_0x6f910c['length']?_0x6f910c[0x5]:null};}function _0x2f52fc(_0x488d8f){for(let _0x510696=0x0;_0x510696<_0x43cb15['length'];_0x510696++){if(_0x488d8f['isAdded']&&'insertion'==_0x43cb15[_0x510696]['type'])return _0x488d8f['isAddSuggestion']=_0x43cb15[_0x510696],void delete _0x488d8f['isAdded'];if(!_0x488d8f['isAdded']&&!_0x488d8f['isRemoved']&&'deletion'==_0x43cb15[_0x510696]['type'])return void(_0x488d8f['isRemoveSuggestion']=_0x43cb15[_0x510696]);}}}['_setDistance'](_0x46aac7,_0x533446){let _0x1b4d5f=0x0,_0x414018=!0x1;const _0x4ca8fd=new Map();for(const _0x2599ec of _0x46aac7)_0x2599ec[_0x533446]?_0x414018&&(_0x1b4d5f++,_0x414018=!0x1):(_0x1b4d5f++,_0x414018=!0x0),_0x4ca8fd['set'](_0x2599ec['id'],_0x1b4d5f);for(let _0x28daa3=0x0;_0x28daa3<_0x46aac7['length'];_0x28daa3++){if('isRemoved'==_0x533446&&_0x46aac7[_0x28daa3]['isAdded']||'isAdded'==_0x533446&&_0x46aac7[_0x28daa3]['isRemoved'])continue;if('text'==_0x46aac7[_0x28daa3]['type']){_0x46aac7[_0x28daa3]['distance']=0x0;continue;}const _0x3b732c=_0x4ca8fd['get'](_0x46aac7[_0x28daa3]['pairId']),_0x22980f=_0x4ca8fd['get'](_0x46aac7[_0x28daa3]['id']);_0x46aac7[_0x28daa3]['distance']=_0x3b732c-_0x22980f;}}['_getRevisionsRange'](_0x3f4631,_0x27e430,_0x3d8dd2=!0x1){const _0x21a6a1=[];let _0x574e18=this['repository']['getIndex'](_0x3f4631),_0x68fb90=this['repository']['getIndex'](_0x27e430);for(-0x1==_0x68fb90&&(_0x68fb90=this['repository']['_revisions']['length'],_0x3d8dd2=!0x1);_0x574e18<_0x68fb90;)_0x21a6a1['push'](this['repository']['getRevision'](_0x574e18)),_0x574e18++;return _0x3d8dd2&&_0x21a6a1['push'](this['repository']['getRevision'](_0x574e18)),_0x21a6a1;}['_threeWayMerge'](_0xec449b,_0x59cde7,_0x74323a,_0x28a234){const _0x17942a=this['editor']['model']['schema'];let _0x4114fb=_0x59cde7;for(;_0xec449b[_0x4114fb]&&_0xec449b[_0x4114fb]['isAdded'];)_0x4114fb++;let _0x551101=_0x28a234;for(;_0x74323a[_0x551101]&&_0x74323a[_0x551101]['isRemoved'];)_0x551101++;_0x599a67(_0xec449b,_0x59cde7,_0x4114fb),_0x599a67(_0x74323a,_0x28a234,_0x551101);const _0x123592=_0x74323a['slice'](_0x28a234,_0x551101)['concat'](_0xec449b['slice'](_0x59cde7,_0x4114fb));return _0x123592['sort']((_0x47ded4,_0x2d89e8)=>_0x47ded4['side']!=_0x2d89e8['side']?_0x47ded4['side']-_0x2d89e8['side']:_0x47ded4['level']!=_0x2d89e8['level']?_0x47ded4['level']-_0x2d89e8['level']:_0x47ded4['distance']!=_0x2d89e8['distance']?_0x2d89e8['distance']-_0x47ded4['distance']:!!_0x47ded4['isAdded']!=!!_0x2d89e8['isAdded']?-0x1==_0x47ded4['side']||0x0==_0x47ded4['side']?_0x47ded4['isAdded']?-0x1:0x1:_0x47ded4['isAdded']?0x1:-0x1:_0x47ded4['index']-_0x2d89e8['index']),{'commonTape':_0x123592,'iEnd':_0x4114fb,'jEnd':_0x551101};function _0x599a67(_0x4129c8,_0x4b4b14,_0x4243cb){let _0x217a55=-0x1,_0x3d321c=Number['POSITIVE_INFINITY'],_0x563091=!0x0;for(let _0x469155=_0x4b4b14;_0x469155<_0x4243cb;_0x469155++)if(_0x17942a['isInline'](_0x4129c8[_0x469155]['item'])||(_0x563091=!0x1),_0x4129c8[_0x469155]['item']['startIndex']<_0x4b4b14&&(_0x217a55=_0x469155),_0x4129c8[_0x469155]['item']['endIndex']>=_0x4243cb){_0x3d321c=_0x469155;break;}_0x563091&&(_0x217a55=_0x4243cb-0x1);for(let _0x4870ac=_0x4b4b14;_0x4870ac<_0x4243cb;_0x4870ac++)_0x4129c8[_0x4870ac]['side']=_0x4870ac<=_0x217a55?-0x1:_0x4870ac<_0x3d321c?0x0:0x1,_0x4129c8[_0x4870ac]['index']=_0x4870ac;let _0x29a2cc=0x0;for(let _0x1b8edc=_0x4b4b14;_0x1b8edc<=_0x217a55;_0x1b8edc++)0x0==_0x4129c8[_0x1b8edc]['distance']?_0x4129c8[_0x1b8edc]['level']=_0x29a2cc:(_0x29a2cc++,_0x4129c8[_0x1b8edc]['level']=_0x29a2cc,_0x29a2cc++);for(let _0x45f551=_0x4b4b14;_0x45f551<_0x4243cb;_0x45f551++)0x0==_0x4129c8[_0x45f551]['side']&&(_0x4129c8[_0x45f551]['level']=_0x29a2cc);_0x29a2cc=0x0;for(let _0x403453=_0x4243cb-0x1;_0x403453>=_0x3d321c;_0x403453--)0x0==_0x4129c8[_0x403453]['distance']?_0x4129c8[_0x403453]['level']=_0x29a2cc:(_0x29a2cc--,_0x4129c8[_0x403453]['level']=_0x29a2cc,_0x29a2cc--);}}['_fixObsoleteTags'](_0x357c97){const _0x4636e5=new Map(),_0xf36b1f=this['editor']['model']['schema'];for(let _0x1f7102=0x1;_0x1f7102<_0x357c97['length'];_0x1f7102++){let _0x139545,_0x50fe2f,_0x5ab3a9;const _0x46dc19=_0x357c97[_0x1f7102],_0x188be4=_0x357c97[_0x1f7102-0x1];if('text'==_0x46dc19['type'])continue;if(_0x46dc19['type']!=_0x188be4['type'])continue;if(!_0xf36b1f['isBlock'](_0x188be4['item'])||_0xf36b1f['isLimit'](_0x188be4['item']))continue;if(!_0xf36b1f['isBlock'](_0x46dc19['item'])||_0xf36b1f['isLimit'](_0x46dc19['item']))continue;if((_0x357c97[_0x1f7102]['isAdded']||_0x357c97[_0x1f7102]['isAddSuggestion'])&&_0x357c97[_0x1f7102-0x1]['isRemoved'])_0x139545=_0x357c97[_0x1f7102],_0x50fe2f=_0x357c97[_0x1f7102-0x1],_0x5ab3a9=_0x1f7102-0x1;else{if(!_0x357c97[_0x1f7102]['isRemoved']||!_0x357c97[_0x1f7102-0x1]['isAdded']&&!_0x357c97[_0x1f7102-0x1]['isAddSuggestion'])continue;_0x139545=_0x357c97[_0x1f7102-0x1],_0x50fe2f=_0x357c97[_0x1f7102],_0x5ab3a9=_0x1f7102;}const _0x2e0cee=_0x139545['level']==_0x50fe2f['level'],_0xf40210=Math['abs'](_0x139545['level'])<Math['abs'](_0x50fe2f['level'])&&0x0==_0x50fe2f['distance'];(_0x2e0cee||_0xf40210)&&(_0x4636e5['set'](_0x50fe2f['id'],_0x139545['id']),_0x357c97['splice'](_0x5ab3a9,0x1),_0x1f7102--,_0x139545['isAdded']=!0x1);}for(let _0x3972a7=0x0;_0x3972a7<_0x357c97['length'];_0x3972a7++)_0x4636e5['has'](_0x357c97[_0x3972a7]['pairId'])&&(_0x357c97[_0x3972a7]['pairId']=_0x4636e5['get'](_0x357c97[_0x3972a7]['pairId']));}['_removeMissingPairs'](_0x56e314){const _0x26662e=new Set(_0x56e314['map'](_0x3fda63=>_0x3fda63['id']));for(let _0x55b7c5=0x0;_0x55b7c5<_0x56e314['length'];_0x55b7c5++)_0x26662e['has'](_0x56e314[_0x55b7c5]['pairId'])||0x0==_0x56e314[_0x55b7c5]['distance']||(_0x56e314[_0x55b7c5]['isIncorrect']=!0x0);return _0x56e314['filter'](_0x54da62=>!_0x54da62['isIncorrect']);}['_markMismatchedRemovedTags'](_0x5ab90f){const _0x3e9dcd=new Set();for(let _0x34cf0d=0x0;_0x34cf0d<_0x5ab90f['length'];_0x34cf0d++){if(_0x3e9dcd['has'](_0x5ab90f[_0x34cf0d]['id'])&&_0x5ab90f[_0x34cf0d]['isRemoved']&&(_0x5ab90f[_0x34cf0d]['isIncorrect']=!0x0),_0x5ab90f[_0x34cf0d]['isIncorrect'])continue;if(0x0==_0x5ab90f[_0x34cf0d]['distance'])continue;if('elementStart'!=_0x5ab90f[_0x34cf0d]['type'])continue;if(null==_0x5ab90f[_0x34cf0d]['pairId'])continue;let _0x4b156e=_0x34cf0d+0x1,_0x50dcdc=0x0;for(;_0x5ab90f[_0x4b156e]['id']!=_0x5ab90f[_0x34cf0d]['pairId'];)'elementStart'==_0x5ab90f[_0x4b156e]['type']?_0x50dcdc++:'elementEnd'==_0x5ab90f[_0x4b156e]['type']&&_0x50dcdc--,_0x4b156e++;if(0x0!=_0x50dcdc){if(_0x5ab90f[_0x34cf0d]['isRemoved'])_0x5ab90f[_0x34cf0d]['isIncorrect']=!0x0;else{for(;_0x4b156e!=_0x34cf0d;)_0x5ab90f[_0x4b156e]['isRemoved']&&0x0!=_0x5ab90f[_0x4b156e]['distance']&&(_0x5ab90f[_0x4b156e]['isIncorrect']=!0x0,_0x3e9dcd['add'](_0x5ab90f[_0x4b156e]['pairId'])),_0x4b156e--;}}}return _0x5ab90f['filter'](_0x4ee308=>!_0x4ee308['isIncorrect']);}['_removeUnsupportedChanges'](_0x41424f){const _0x2cca01=this['editor']['model']['schema'];for(let _0x1bae52=0x0;_0x1bae52<_0x41424f['length'];_0x1bae52++){if(!(_0x41424f[_0x1bae52]['isAdded']||_0x41424f[_0x1bae52]['isAddSuggestion']||_0x41424f[_0x1bae52]['isRemoved']||_0x41424f[_0x1bae52]['isRemoveSuggestion']))continue;if(0x0==_0x41424f[_0x1bae52]['distance'])continue;const _0x1307cf=_0x41424f[_0x1bae52]['item'];_0x2cca01['isBlock'](_0x1307cf)||_0x2cca01['isLimit'](_0x1307cf)||(_0x41424f[_0x1bae52]['isAdded']&&delete _0x41424f[_0x1bae52]['isAdded'],_0x41424f[_0x1bae52]['isAddSuggestion']&&delete _0x41424f[_0x1bae52]['isAddSuggestion'],_0x41424f[_0x1bae52]['isRemoveSuggestion']&&delete _0x41424f[_0x1bae52]['isRemoveSuggestion'],_0x41424f[_0x1bae52]['isRemoved']&&(_0x41424f[_0x1bae52]['isIncorrect']=!0x0));}return _0x41424f['filter'](_0x266575=>!_0x266575['isIncorrect']);}['_makeModelFromTape'](_0x482a7c,_0x87b146,_0xd2f51c){const _0x3fff7f=new gt(),_0x278aad=[],_0x2d2259=new Map(),_0x4752a6=this['editor']['model'],_0x11b063=_0x4752a6['schema'],_0x4f0870=[_0x3fff7f],_0x1a45a9={},_0x1650df={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};let _0x545ddb=null;const _0x1f4eb9=[0x0];for(let _0xcaf772=0x0;_0xcaf772<_0x482a7c['length'];_0xcaf772++)if('elementStart'===_0x482a7c[_0xcaf772]['type']){_0x482a7c[_0xcaf772]['previousPosition']=_0x4752a6['createPositionFromPath'](_0x3fff7f,_0x1f4eb9);const _0x4a746f=new ut(_0x482a7c[_0xcaf772]['item']['name'],_0x482a7c[_0xcaf772]['item']['getAttributes']());_0x4f0870[0x0]['_appendChild'](_0x4a746f),_0x1f4eb9['push'](0x0),_0x4f0870['unshift'](_0x4a746f),_0x482a7c[_0xcaf772]['nextPosition']=_0x4752a6['createPositionFromPath'](_0x3fff7f,_0x1f4eb9);}else'elementEnd'===_0x482a7c[_0xcaf772]['type']?(_0x4f0870['shift'](),_0x482a7c[_0xcaf772]['previousPosition']=_0x4752a6['createPositionFromPath'](_0x3fff7f,_0x1f4eb9),_0x1f4eb9['pop'](),_0x1f4eb9[_0x1f4eb9['length']-0x1]++,_0x482a7c[_0xcaf772]['nextPosition']=_0x4752a6['createPositionFromPath'](_0x3fff7f,_0x1f4eb9)):(_0x482a7c[_0xcaf772]['previousPosition']=_0x4752a6['createPositionFromPath'](_0x3fff7f,_0x1f4eb9),_0x545ddb?_0x545ddb['_data']+=_0x482a7c[_0xcaf772]['item']['data']:_0x545ddb=new mt(_0x482a7c[_0xcaf772]['item']['data'],_0x482a7c[_0xcaf772]['item']['getAttributes']()),_0x482a7c[_0xcaf772+0x1]&&'text'===_0x482a7c[_0xcaf772+0x1]['type']&&_0x4a893e(_0x545ddb,_0x482a7c[_0xcaf772+0x1]['item'])||(_0x4f0870[0x0]['_appendChild'](_0x545ddb),_0x545ddb=null),_0x1f4eb9[_0x1f4eb9['length']-0x1]+=_0x482a7c[_0xcaf772]['item']['offsetSize'],_0x482a7c[_0xcaf772]['nextPosition']=_0x4752a6['createPositionFromPath'](_0x3fff7f,_0x1f4eb9));for(let _0x2897bb=0x0;_0x2897bb<_0x482a7c['length'];_0x2897bb++){const _0x474c7e=_0x482a7c[_0x2897bb]['previousPosition'],_0x5720e3=_0x482a7c[_0x2897bb]['nextPosition'];for(const _0x384b41 of _0x482a7c[_0x2897bb]['markersStart'])_0x2d2259['set'](_0x384b41,{'start':_0x474c7e,'end':null});_0x10bc7b('isRemoveSuggestion',_0x2897bb,_0x474c7e,_0x5720e3),_0x10bc7b('isAddSuggestion',_0x2897bb,_0x474c7e,_0x5720e3),_0x10bc7b('isRemoved',_0x2897bb,_0x474c7e,_0x5720e3),_0x10bc7b('isAdded',_0x2897bb,_0x474c7e,_0x5720e3);for(const _0x1af1ca of _0x482a7c[_0x2897bb]['markersEnd']){_0x2d2259['get'](_0x1af1ca)['end']=_0x5720e3;}}for(const [_0x1913e6,_0x54a29d]of _0x2d2259){const _0x44fc37=this['editor']['model']['createRange'](_0x54a29d['start'],_0x54a29d['end']);_0x3fff7f['markers']['set'](_0x1913e6,_0x44fc37);}return _0x278aad['sort']((_0x24406e,_0xccdddc)=>{const _0x462bf6=_0x3fff7f['markers']['get']('revision:'+_0x24406e['id']),_0x33a1f5=_0x3fff7f['markers']['get']('revision:'+_0xccdddc['id']);return _0x462bf6['start']['isBefore'](_0x33a1f5['start'])?-0x1:_0x462bf6['start']['isAfter'](_0x33a1f5['start'])?0x1:_0x462bf6['end']['isBefore'](_0x33a1f5['end'])?-0x1:_0x462bf6['end']['isAfter'](_0x33a1f5['end'])?0x1:'add'===_0x24406e['type']?-0x1:0x1;}),{'root':_0x3fff7f,'changes':_0x278aad};function _0x10bc7b(_0xb3ef15,_0x584214,_0x291156,_0x33737e){const _0x4481d6=!!_0x482a7c[_0x584214][_0xb3ef15],_0x436dc3=_0x4481d6?_0x482a7c[_0x584214][_0xb3ef15]['userId']:null,_0x4f7f62=_0x584214===_0x482a7c['length']-0x1,_0x1e835b=_0x1650df[_0xb3ef15][0x0],_0xa3f844=_0x11b063['isObject'](_0x482a7c[_0x584214]['item']);!_0x1a45a9[_0xb3ef15]&&_0x4481d6?_0x1a45a9[_0xb3ef15]={'start':_0x291156,'tapeItem':_0x482a7c[_0x584214],'userId':_0x436dc3,'type':_0xb3ef15}:_0x1a45a9[_0xb3ef15]&&!_0x4481d6?(_0x1a45a9[_0xb3ef15]['end']=_0x291156,_0x28426b(_0x1a45a9[_0xb3ef15]),_0x1a45a9[_0xb3ef15]=null):_0x1a45a9[_0xb3ef15]&&_0x4481d6&&_0x1a45a9[_0xb3ef15]['userId']!==_0x436dc3&&(_0x1a45a9[_0xb3ef15]['end']=_0x291156,_0x1e835b&&_0x1e835b['userId']===_0x1a45a9[_0xb3ef15]['userId']||_0x28426b(_0x1a45a9[_0xb3ef15]),_0x1a45a9[_0xb3ef15]={'start':_0x291156,'tapeItem':_0x482a7c[_0x584214],'userId':_0x436dc3,'type':_0xb3ef15}),_0x1a45a9[_0xb3ef15]&&_0xa3f844&&('elementStart'!==_0x482a7c[_0x584214]['type']||_0x1e835b&&_0x1e835b['userId']===_0x436dc3||_0x1650df[_0xb3ef15]['unshift']({'userId':_0x436dc3,'object':_0x482a7c[_0x584214]['item'],'change':_0x1a45a9[_0xb3ef15]}),'elementEnd'===_0x482a7c[_0x584214]['type']&&_0x1e835b&&_0x1e835b['object']===_0x482a7c[_0x584214]['item']&&(_0x1650df[_0xb3ef15]['shift'](),_0x1a45a9[_0xb3ef15]=_0x1e835b['change'])),_0x1a45a9[_0xb3ef15]&&_0x4f7f62&&(_0x1a45a9[_0xb3ef15]['end']=_0x33737e,_0x28426b(_0x1a45a9[_0xb3ef15]),_0x1a45a9[_0xb3ef15]=null);}function _0x28426b({start:_0x5acfba,end:_0x448206,tapeItem:_0x511950,userId:_0x14b537,type:_0x4db02a}){const _0x186d52=_0x511950['item'],_0x48d692=_0x4752a6['schema']['isBlock'](_0x186d52)&&!_0x4752a6['schema']['isLimit'](_0x186d52),_0x929eb0=_0x5acfba['nodeAfter']==_0x448206['parent']&&_0x448206['isAtStart'];if(_0x48d692&&_0x929eb0)return;const _0x16addc=_0x4752a6['createRange'](_0x5acfba,_0x448206),_0x3d1c51=_0x87b146['get'](_0x14b537),_0x308653=new r({'author':_0x3d1c51,'type':'isAdded'==_0x4db02a||'isAddSuggestion'==_0x4db02a?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x4db02a||'isRemoveSuggestion'==_0x4db02a},'createdAt':new Date(),'rootName':_0xd2f51c});_0x278aad['push'](_0x308653),_0x3fff7f['markers']['set']('revision:'+_0x308653['id'],_0x16addc);}function _0x4a893e(_0x25114d,_0x57dc51){const _0x1cc272=_0x25114d['getAttributes'](),_0x802202=_0x57dc51['getAttributes']();for(const _0x5e92bd of _0x1cc272){if(_0x5e92bd[0x1]!==_0x57dc51['getAttribute'](_0x5e92bd[0x0]))return!0x1;_0x802202['next']();}return _0x802202['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x285490=>{const _0x2181b3=_0x285490['markerName']['split'](':')[0x1],_0x557da6=this['_getChangeFromId'](_0x2181b3);if(!_0x557da6)return null;const _0xd51504='add'==_0x557da6['type']?'insertion':'deletion',_0x1283e0=['ck-suggestion-marker','ck-suggestion-marker-'+_0xd51504];return _0x557da6['data']['isSuggestion']&&_0x1283e0['push']('ck-suggestion-marker-'+_0xd51504+'-new'),this['activeChange']==_0x557da6&&_0x1283e0['push']('ck-suggestion-marker--active'),{'classes':_0x1283e0,'attributes':{'data-change-id':_0x2181b3}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x538448=>{_0x538448['on']('element:pre',(_0x3ad042,_0x38987b,_0x32f1b1)=>{const _0x24b12f=_0x38987b['viewItem']['getChild'](0x0);if(!_0x24b12f||!_0x24b12f['is']('element','code'))return;if(!_0x32f1b1['consumable']['consume'](_0x24b12f,{'attributes':['vid_start','vid_end']}))return;const _0x49eb35=_0x38987b['modelRange']['start']['nodeAfter'];_0x32f1b1['writer']['setAttribute']('vid_start',_0x24b12f['getAttribute']('vid_start'),_0x49eb35),_0x32f1b1['writer']['setAttribute']('vid_end',_0x24b12f['getAttribute']('vid_end'),_0x49eb35);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x4679d9=>{_0x4679d9['on']('element',(_0x17575e,_0x394dfe,_0x377099)=>{if(!_0x377099['consumable']['consume'](_0x394dfe['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x394dfe['modelRange']['isCollapsed'])return;const _0x55651b=_0x394dfe['modelRange']['start']['nodeAfter'];_0x55651b['hasAttribute']('vid_start')||_0x55651b['hasAttribute']('vid')||(_0x377099['writer']['setAttribute']('vid_start',_0x394dfe['viewItem']['getAttribute']('vid_start'),_0x55651b),_0x377099['writer']['setAttribute']('vid_end',_0x394dfe['viewItem']['getAttribute']('vid_end'),_0x55651b));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x457092=>_0x457092['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x580376,[,_0x1a7cd5])=>{['vid_start','vid_end','vid']['includes'](_0x1a7cd5)&&(_0x580376['return']=!0x0,_0x580376['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x920bcd=>{_0x920bcd['on']('attribute:vid',(_0x140abb,_0x2a03de,_0x417f46)=>{if('\x20'!=_0x2a03de['item']['data']||_0x2a03de['item']['parent']['maxOffset']>0x1)return;if(!_0x417f46['consumable']['consume'](_0x2a03de['item'],_0x140abb['name']))return;const _0x5a270f=_0x417f46['writer'],_0x37d481=_0x417f46['mapper']['toViewRange'](_0x2a03de['range']);_0x5a270f['wrap'](_0x37d481,_0x5a270f['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0xa42c24){const _0x3bee5b=_0xa42c24['plugins']['get']('RevisionViewer');return(_0x47c240,_0x49ea0c,_0x58da8d)=>{const _0x58c385=_0x49ea0c['markerName']['split'](':')[0x1],_0x25d4af=_0x3bee5b['_getChangeFromId'](_0x58c385);if(!_0x25d4af)return null;const _0x35d131='add'==_0x25d4af['type']?'split':'merge';if(!_0x58da8d['consumable']['test'](_0x49ea0c['markerRange'],_0x47c240['name']))return;const _0x5b146d=_0x49ea0c['markerRange']['getWalker'](),_0xeb7f5a=_0x49ea0c['markerRange']['start'],_0x431ffe=_0xa42c24['model']['schema'];let _0x497ac1=null,_0x35c28e=null,_0x5e10c4=!0x1,_0xbb7d6c=!0x1;for(const _0x328659 of _0x5b146d){const _0xd2df33=_0x328659['item'];_0x5e10c4=_0x5e10c4||_0x431ffe['isContent'](_0xd2df33);const _0x16b85a=_0x58da8d['mapper']['toViewElement'](_0xd2df33);if(_0x16b85a&&_0x16b85a['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x328659['type']&&(_0x431ffe['isBlock'](_0xd2df33)&&!_0x431ffe['isLimit'](_0xd2df33)&&(_0xd2df33['nextSibling']||_0xeb7f5a['isAtEnd']?_0x497ac1&&_0x497ac1['parent']==_0xd2df33||(_0x497ac1=_0xd2df33,_0x4dfb3a(_0x328659['previousPosition']),_0xbb7d6c=!0x0):_0x35c28e=_0x35c28e||_0x328659['previousPosition']));}function _0x4dfb3a(_0xc45c97){const _0x568a2b=_0x58da8d['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x35d131}),_0x2a4197=_0x58da8d['mapper']['toViewPosition'](_0xc45c97);_0x25d4af['data']['isSuggestion']&&_0x58da8d['writer']['addClass']('ck-suggestion-marker-'+_0x35d131+'-new',_0x568a2b),_0x3bee5b['activeChange']==_0x25d4af&&_0x58da8d['writer']['addClass']('ck-suggestion-marker--active',_0x568a2b),_0x58da8d['writer']['insert'](_0x2a4197,_0x568a2b),_0x58da8d['mapper']['bindElementToMarker'](_0x568a2b,_0x49ea0c['markerName']);}_0x5e10c4||_0xbb7d6c||!_0x35c28e||_0x4dfb3a(_0x35c28e);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x3e1a0e,_0x2c9f75,_0x2f21a1)=>{const _0x4f8c22=_0x2f21a1['mapper']['markerNameToElements'](_0x2c9f75['markerName']);if(_0x4f8c22){for(const _0x9264fb of _0x4f8c22)(_0x9264fb['hasClass']('ck-suggestion-marker-split')||_0x9264fb['hasClass']('ck-suggestion-marker-merge'))&&(_0x2f21a1['mapper']['unbindElementFromMarkerName'](_0x9264fb,_0x2c9f75['markerName']),_0x2f21a1['writer']['remove'](_0x9264fb));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x346303,_0x5e3b6e,_0x24cc8e)=>{const _0x44d590=_0x5e3b6e['markerName']['split'](':')[0x1],_0x17bb32=this['_getChangeFromId'](_0x44d590);if(!_0x17bb32)return null;const _0x375ac1='add'==_0x17bb32['type']?'split':'merge';if(_0x24cc8e['consumable']['test'](_0x5e3b6e['markerRange'],_0x346303['name']))for(const _0x5452bf of _0x5e3b6e['markerRange']['getItems']()){if(!_0x5452bf['is']('element','softBreak'))continue;const _0xc13a06=_0x24cc8e['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x375ac1}),_0x573c07=_0x24cc8e['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x5452bf));_0x17bb32['data']['isSuggestion']&&_0x24cc8e['writer']['addClass']('ck-suggestion-marker-'+_0x375ac1+'-new',_0xc13a06),this['activeChange']==_0x17bb32&&_0x24cc8e['writer']['addClass']('ck-suggestion-marker--active',_0xc13a06),_0x24cc8e['writer']['insert'](_0x573c07,_0xc13a06),_0x24cc8e['mapper']['bindElementToMarker'](_0xc13a06,_0x5e3b6e['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x2bd341=>{for(const _0x523b96 of this['editor']['model']['document']['getRootNames']()){const _0x3d4ae6=this['editor']['model']['document']['getRoot'](_0x523b96),_0x58d8e3=this['editor']['editing']['view']['document']['getRoot'](_0x523b96);if(_0x58d8e3){const _0x3e9afa=_0x3d4ae6['getAttribute']('revisionHistoryAttachChange');if(_0x2bd341['removeAttribute']('data-change-id',_0x58d8e3),_0x2bd341['removeClass']('ck-revision-history-root-add',_0x58d8e3),_0x2bd341['removeClass']('ck-revision-history-root-remove',_0x58d8e3),_0x2bd341['removeClass']('ck-revision-history-root--active',_0x58d8e3),_0x3e9afa){const _0x17034b=this['_getChangeFromId'](_0x3e9afa);if(!_0x17034b)return null;_0x2bd341['setAttribute']('data-change-id',_0x3e9afa,_0x58d8e3),_0x2bd341['addClass']('ck-revision-history-root-'+_0x17034b['type'],_0x58d8e3),this['activeChange']==_0x17034b&&_0x2bd341['addClass']('ck-revision-history-root--active',_0x58d8e3);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x37b238=>'revision-comment:'+_0x37b238,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x2042a0=>'revision-suggestion:'+_0x2042a0,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x593fc2=>({'name':'suggestion:'+_0x593fc2,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x42b7de=>{const _0x17f7a1=_0x42b7de['markerName']['split'](':')[0x1];return'insertion'!=_0x17f7a1&&'deletion'!=_0x17f7a1?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x17f7a1]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',Z(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',Z(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x1d7cb2,_0x2eb7ac,_0x26c46d)=>{const _0x35b2be=_0x26c46d['mapper']['markerNameToElements'](_0x2eb7ac['markerName']);if(_0x35b2be){for(const _0x22e48b of _0x35b2be)_0x22e48b['is']('uiElement')&&(_0x26c46d['mapper']['unbindElementFromMarkerName'](_0x22e48b,_0x2eb7ac['markerName']),_0x26c46d['writer']['remove'](_0x22e48b));}},{'priority':'high'});}['_getChangeFromId'](_0x18a5d4){return this['_changeIdToChange']['get'](_0x18a5d4);}['_getViewForChange'](_0x1291bb){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new X(this['editor']['locale'],_0x1291bb),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x1026c6,_0x5e131d,_0x50a1dc,_0x180466)=>{_0x180466&&this['_balloon']['remove'](_0x180466),_0x50a1dc&&(this['_balloon']['add']({'view':_0x50a1dc,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x2ade82=this['editor']['editing'],_0x41d70f=this['_getChangeFromId'](_0x50a1dc['changeId']);let _0x1c5425;if(_0x41d70f['data']['isOnRoot']){const _0x3f7fc8=_0x2ade82['view']['getDomRoot'](_0x41d70f['rootName']);_0x1c5425=Array['from'](_0x3f7fc8['getClientRects']());}else{const _0x3abcb4=this['editor']['model']['markers']['get']('revision:'+_0x50a1dc['changeId']);_0x1c5425=Array['from'](_0x2ade82['mapper']['markerNameToElements'](_0x3abcb4['name']))['map'](_0x5b894d=>_0x2ade82['view']['domConverter']['mapViewToDom'](_0x5b894d))['map'](_0x4c902e=>Array['from'](_0x4c902e['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1c5425[0x0];return _0x1c5425['find'](_0x3ac1c6=>_0x3ac1c6['top']-0x3<=this['_activeViewTarget']['y']&&_0x3ac1c6['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x3ac1c6['left']-0x3<=this['_activeViewTarget']['x']&&_0x3ac1c6['right']+0x3>=this['_activeViewTarget']['x'])||_0x1c5425[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x241fd1,_0x53b4fe,_0x3f2be4,_0xa8bdba)=>{this['activeView']=_0x3f2be4?this['_getViewForChange'](_0x3f2be4):null,this['editor']['model']['change'](()=>{const _0x515946=this['editor']['editing'];_0xa8bdba&&(_0xa8bdba['data']['isOnRoot']?_0x515946['view']['change'](_0x3aa8f9=>{_0x3aa8f9['removeClass']('ck-revision-history-root--active',_0x515946['view']['document']['getRoot'](_0xa8bdba['rootName']));}):_0x515946['reconvertMarker']('revision:'+_0xa8bdba['id'])),_0x3f2be4&&(_0x3f2be4['data']['isOnRoot']?_0x515946['view']['change'](_0x1fe13a=>{_0x1fe13a['addClass']('ck-revision-history-root--active',_0x515946['view']['document']['getRoot'](_0x3f2be4['rootName']));}):_0x515946['reconvertMarker']('revision:'+_0x3f2be4['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x39c5af,_0x237e60)=>{if(this['activeChange'])return;const _0x89351e=this['_findChangeIdFromDomTarget'](_0x237e60['target']),_0x40b589=this['_changeIdToChange']['get'](_0x89351e);_0x40b589?(this['_activeViewTarget']={'x':_0x237e60['domEvent']['x'],'y':_0x237e60['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x40b589)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x3932b4,_0x11e8f5)=>{const _0x56bec3=this['_findChangeIdFromDomTarget'](_0x11e8f5['target']),_0x4b19e3=this['_changeIdToChange']['get'](_0x56bec3);_0x4b19e3?(this['_activeViewTarget']={'x':_0x11e8f5['domEvent']['x'],'y':_0x11e8f5['domEvent']['y']},_0x4b19e3===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x4b19e3):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x26f1f5){do{const _0x468e81=_0x26f1f5['getAttribute']('data-change-id');if(_0x468e81)return _0x468e81;_0x26f1f5=_0x26f1f5['parent'];}while(_0x26f1f5);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x525eed=>{for(const _0x4a8f89 of this['editor']['model']['markers'])_0x525eed['removeMarker'](_0x4a8f89);});}}function Z(_0x472787,_0x591d6d){return(_0x39a2cb,_0x5c1576,_0x46bf1d)=>{if(!_0x46bf1d['consumable']['test'](_0x5c1576['markerRange'],_0x39a2cb['name']))return;const _0x548aff=_0x5c1576['markerRange']['getWalker'](),_0x58063a=_0x5c1576['markerRange']['start'],_0x534aae=_0x472787['model']['schema'];let _0x20b823=null,_0x50707a=null,_0x127516=!0x1,_0x34dc01=!0x1;for(const _0x4bef33 of _0x548aff){const _0x369d70=_0x4bef33['item'];_0x127516=_0x127516||_0x534aae['isContent'](_0x369d70);const _0x46bcde=_0x46bf1d['mapper']['toViewElement'](_0x369d70);if(_0x46bcde&&_0x46bcde['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4bef33['type']&&(_0x534aae['isBlock'](_0x369d70)&&!_0x534aae['isLimit'](_0x369d70)&&(_0x369d70['nextSibling']||_0x58063a['isAtEnd']?_0x20b823&&_0x20b823['parent']==_0x369d70||(_0x20b823=_0x369d70,_0x2d6335(_0x4bef33['previousPosition']),_0x34dc01=!0x0):_0x50707a=_0x50707a||_0x4bef33['previousPosition']));}function _0x2d6335(_0x23f0cb){const _0x111902=_0x46bf1d['mapper']['toViewPosition'](_0x23f0cb),_0x1397b5=_0x46bf1d['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x591d6d});_0x46bf1d['writer']['insert'](_0x111902,_0x1397b5),_0x46bf1d['mapper']['bindElementToMarker'](_0x1397b5,_0x5c1576['markerName']);}_0x127516||_0x34dc01||!_0x50707a||_0x2d6335(_0x50707a);};}class wt extends _0x13f25b{constructor(_0x5d92d2){super(_0x5d92d2);const _0x31a30d=_0x5d92d2['plugins']['get'](d);this['affectsData']=!0x1,this['listenTo'](_0x31a30d,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x31a30d,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0xb48e29=this['editor'],_0x5b1628=_0xb48e29['plugins']['get'](d),_0x1b41ec=_0x5b1628['isReady']?_0x5b1628['diff']['newRevisionId']:null;_0xb48e29['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x1b41ec);}['refresh'](){const {isReady:_0x504fa1,isEnabled:_0x248b02,repository:_0x4bae92,diff:_0x51e9af}=this['editor']['plugins']['get'](d),_0x42e0a9=_0x51e9af&&_0x4bae92['getLaterVisibleRevision'](_0x51e9af['newRevisionId']);this['isEnabled']=_0x504fa1&&_0x248b02&&Boolean(_0x42e0a9);}}class _t extends _0x13f25b{['_step'];constructor(_0x4cd99f,{direction:_0x4b72b0}){super(_0x4cd99f);const _0x38c664=_0x4cd99f['plugins']['get'](d);this['affectsData']=!0x1,this['_step']='forward'===_0x4b72b0?0x1:-0x1,this['listenTo'](_0x38c664,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x38c664,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x38c664,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x2604ac=this['editor'],_0x2f6cb4=_0x2604ac['plugins']['get'](d),{isNavigationMode:_0x3f9c00,currentChangeNumber:_0x24cdbb}=_0x2f6cb4;let _0x29f137;if(_0x2f6cb4['activeChange']=_0x3f9c00?_0x2f6cb4['diff']['changes']['get'](_0x24cdbb+this['_step']):_0x2f6cb4['diff']['changes']['first'],_0x2f6cb4['activeChange']['data']['isOnRoot'])_0x29f137=_0x2604ac['editing']['view']['getDomRoot'](_0x2f6cb4['activeChange']['rootName']);else{const _0x598aec=_0x2604ac['model']['markers']['get']('revision:'+_0x2f6cb4['activeChange']['id']);_0x29f137=_0x11be06(_0x2604ac['editing'],_0x598aec);}_0x16f493({'target':_0x29f137,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x592e0f,currentChangeNumber:_0x515b4d,numberOfChanges:_0x42b4d5,isReady:_0x52e120,isEnabled:_0x20befc}=this['editor']['plugins']['get'](d);this['isEnabled']=!!(_0x20befc&&_0x52e120&&_0x42b4d5)&&(!_0x592e0f||(0x1===this['_step']?_0x515b4d<_0x42b4d5-0x1:_0x515b4d>0x0));}}class li extends ts{constructor(_0x40cacb){super(_0x40cacb);const _0x23b2d0=this['bindTemplate'],_0x3949b8=new te(_0x40cacb),_0x5e40be=new te(_0x40cacb);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',(_0x3cbfae,_0x4a6aa5)=>_0x3cbfae&&_0x4a6aa5>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x354729,_0x358ed8,_0x4b4038,_0x35e555)=>{if(!_0x354729)return m(_0x40cacb,'Loading...');if(!_0x4b4038)return m(_0x40cacb,'No\x20changes');const _0x539c91=m(_0x40cacb,'NUMBER_OF_CHANGES',_0x4b4038);return _0x35e555?m(_0x40cacb,'X_OF_Y_CHANGES',[_0x358ed8+0x1,_0x4b4038]):_0x539c91;}),_0x3949b8['set']({'label':m(_0x40cacb,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x235e6b}),_0x5e40be['set']({'label':m(_0x40cacb,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x397ef1}),_0x3949b8['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x5e40be['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x3949b8['on']('execute',()=>this['fire']('execute','backward')),_0x5e40be['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',_0x23b2d0['if']('_isStatusLabelVisible','ck-hidden',_0x2e86a0=>!_0x2e86a0)]},'children':[{'text':_0x23b2d0['to']('isNavigationMode',_0x2822c8=>_0x2822c8?m(_0x40cacb,'EDIT_X_OF_Y_REVISIONS')+':\x20':m(_0x40cacb,'Total')+':\x20')}]},{'text':_0x23b2d0['to']('_statusText')}]},new _0x31e5ea(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x3949b8,_0x5e40be]}]});}}const le='ck-editor__editable__loading-overlay';class ge extends _0x3c80d2{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x205afd=this['editor']['editing']['view'];_0x205afd['change'](_0x533411=>{for(const _0x4c4b31 of _0x205afd['document']['roots'])_0x533411['addClass'](le,_0x4c4b31);});}['hide'](){const _0x353694=this['editor']['editing']['view'];_0x353694['change'](_0x3c54e5=>{for(const _0x4223b9 of _0x353694['document']['roots'])_0x3c54e5['removeClass'](le,_0x4223b9);});}}class w extends _0x3c80d2{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d,ge];}['init'](){const _0x10f7f8=this['editor'],_0x16b022=_0x10f7f8['plugins']['get'](d),_0x1983d4=_0x10f7f8['plugins']['get'](ge);_0x10f7f8['ui']['componentFactory']['add']('exitToEditing',_0x9ff6f3=>{const _0x5a1721=new te(_0x9ff6f3);return _0x5a1721['set']({'label':m(_0x9ff6f3,'Back\x20to\x20editing'),'icon':_0x324ce9,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x5a1721,'execute',()=>{_0x10f7f8['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x5a1721;}),_0x10f7f8['ui']['componentFactory']['add']('restoreRevision',_0x1c09c1=>{const _0x272b6b=new te(_0x1c09c1);return _0x272b6b['set']({'label':m(_0x1c09c1,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x272b6b['bind']('isEnabled')['to'](_0x10f7f8['commands']['get']('restoreRevision')),this['listenTo'](_0x272b6b,'execute',()=>_0x10f7f8['execute']('restoreRevision')),_0x272b6b;}),_0x10f7f8['ui']['componentFactory']['add']('changesNavigation',_0xed25db=>{const _0x3d3ae7=new li(_0xed25db),_0x15900b=_0x10f7f8['commands']['get']('showPreviousChange'),_0x4e9bb7=_0x10f7f8['commands']['get']('showNextChange');return _0x3d3ae7['bind']('isBackwardNavigationEnabled')['to'](_0x15900b,'isEnabled'),_0x3d3ae7['bind']('isForwardNavigationEnabled')['to'](_0x4e9bb7,'isEnabled'),_0x3d3ae7['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x16b022),this['listenTo'](_0x3d3ae7,'execute',(_0x143b3f,_0x25dd38)=>{_0x10f7f8['execute']('forward'===_0x25dd38?'showNextChange':'showPreviousChange');}),_0x3d3ae7;}),_0x1983d4['show'](),_0x16b022['on']('change:isReady',(_0x2725e0,_0x54cef8,_0x57c003)=>{_0x57c003?_0x1983d4['hide']():_0x1983d4['show']();});}}class pt extends _0xecce61{['_resizeObserver']=null;constructor(_0x5071bd,_0x35451c){super(_0x5071bd,_0x35451c);const _0x28fb42=this['bindTemplate'];this['set']({'label':m(_0x5071bd,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=m(_0x5071bd,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x28fb42['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new at(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x3ac35c=this['fieldView']['element'];this['_tooltipString']=_0x3ac35c['scrollWidth']>_0x3ac35c['clientWidth']&&_0x3ac35c['value']||'';}}class oi extends ts{constructor(_0x450c47,_0x2d50f2,_0x161cf6){super(_0x450c47);const _0x5e2d6e=new _0x39d1e2();_0x5e2d6e['set']({'content':_0x2de24c,'viewBox':'0\x200\x2011\x2010'});const _0x48b621=['ck','ck-revision-history-sidebar__revision-author'];_0x161cf6&&_0x48b621['push']('ck-revision-history-sidebar__revision-author_creator');const _0x387889=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':m(_0x450c47,_0x161cf6?'Revision\x20creator':'Revision\x20author')},'children':[_0x5e2d6e,_0x2d50f2['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x48b621},'children':_0x387889});}}function ai(_0x1258d5,_0x8f1da1){const _0x380a39=_0x1258d5['bindTemplate'],_0x1b755f=_0x1258d5['locale'],_0x1f7ac8=_0x3690ba(_0x1b755f);_0x1f7ac8['panelPosition']='sw';const _0x55ead2=function(_0x51289e,_0x20e26e){const _0xad7c08=function(_0x2f250f,_0x4195c2){const _0x4b7e9a=_0x2f250f['locale'],_0x405622={'Compare\x20against\x20selected':m(_0x4b7e9a,'Compare\x20against\x20selected'),'Name\x20this\x20revision':m(_0x4b7e9a,'Name\x20this\x20revision'),'Restore\x20this\x20revision':m(_0x4b7e9a,'Restore\x20this\x20revision')};return _0x4195c2['map'](_0x45e8a2=>{const _0x488b7e=_0x405622[_0x45e8a2['name']];return _0x488b7e&&_0x488b7e!==_0x45e8a2['name']&&(_0x45e8a2['name']=_0x488b7e),_0x45e8a2;});}(_0x51289e,_0x20e26e),_0x5f44d4=new _0x751bfb();for(const _0x49bdd8 of _0xad7c08){const _0x4fd021={'type':'button','model':new to({'label':_0x49bdd8['name'],'class':_0x49bdd8['class'],'withText':!0x0,'role':'menuitem','_action':_0x49bdd8['action']})};_0x4fd021['model']['bind']('isEnabled')['to'](_0x51289e,'isActionsDropdownOpen',_0x2f12a1=>'function'!=typeof _0x49bdd8['isEnabled']||(!_0x2f12a1||_0x49bdd8['isEnabled'](_0x51289e))),_0x5f44d4['add'](_0x4fd021);}return _0x5f44d4;}(_0x1258d5,_0x8f1da1);return _0x1258d5['bind']('isActionsDropdownOpen')['to'](_0x1f7ac8,'isOpen'),_0x1f7ac8['buttonView']['set']({'label':m(_0x1b755f,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x3b66e4}),_0x1f7ac8['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x380a39['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x380a39['to'](_0x35757d=>_0x35757d['stopPropagation']())}}),_0x1f7ac8['on']('execute',_0x3acc8d=>{_0x1258d5['isReady']&&'function'==typeof _0x3acc8d['source']['_action']&&_0x3acc8d['source']['_action'](_0x1258d5);}),_0x8d46c2(_0x1f7ac8,_0x55ead2,{'role':'menu'}),_0x1f7ac8['listenTo'](_0x1258d5,'change:isActionsDropdownOpen',(_0x24abc3,_0x26df04,_0x4b923e)=>{if(_0x4b923e)for(const _0x517a20 of _0x1f7ac8['listView']['items']){const _0x2068ee=_0x517a20['children']['first'],_0x4cfdda=_0x8f1da1['find'](_0x724efe=>_0x724efe['action']===_0x2068ee['_action'])['isVisible'];_0x517a20['isVisible']=void 0x0===_0x4cfdda||_0x4cfdda(_0x1258d5);}}),_0x1f7ac8;}class si extends/* #__PURE__ -- @preserve */
26
+ _0x3a7de8(ts){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0xcb2bdf,_0x51a8b4,_0x3b188c,_0x385268){super(_0xcb2bdf);const _0x4d89bf=this['bindTemplate'],_0x2f3421=function(_0x273e8f,_0xb3683d){const _0x44a18d=Array['from'](_0xb3683d['authors'])['filter'](_0x13d7c8=>_0x13d7c8!=_0xb3683d['creator']);return _0xb3683d['creator']&&_0x44a18d['unshift'](_0xb3683d['creator']),_0x44a18d['map'](_0x5885d3=>new oi(_0x273e8f,_0x5885d3,_0x5885d3==_0xb3683d['creator']));}(_0xcb2bdf,_0x51a8b4);this['id']=_0x51a8b4['id'],this['_revision']=_0x51a8b4,this['_requireRevisionName']=_0x385268,this['bind']('name','createdAt')['to'](_0x51a8b4),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x108323=>{return _0x24fe50=_0xcb2bdf['uiLanguage'],(_0xff1cd2=_0x108323)['toLocaleDateString'](_0x24fe50,{'month':'long','day':'numeric'})+',\x20'+_0xff1cd2['toLocaleTimeString'](_0x24fe50,{'hour':'numeric','minute':'numeric'});var _0x24fe50,_0xff1cd2;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new pt(_0xcb2bdf,_0x5c6c61),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0x80ff29=>_0x80ff29||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x2cc714,_0x5183b8)=>_0x2cc714&&_0x5183b8),this['revisionActionsView']=_0x3b188c&&_0x3b188c['length']?ai(this,_0x3b188c):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x4d89bf['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x4d89bf['if']('isEnabled','ck-disabled',_0x400bad=>!_0x400bad),_0x4d89bf['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x4d89bf['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x4d89bf['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':_0x4d89bf['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':_0x2f3421}]},this['revisionActionsView']],'on':{'click':_0x4d89bf['to'](_0x3bc651=>{_0x3bc651['srcElement']['closest']('.ck-thread__remove-confirm')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0xa3d158=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0xa3d158,'change',()=>{this['_requireRevisionName']&&!_0xa3d158['value']||this['fire']('setName',{'id':this['id'],'name':_0xa3d158['value']}),_0xa3d158['value']||(_0xa3d158['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function ti(_0x297b14,_0x1d7124){const _0x71ef26=_0x3e1eeb['fromJSDate'](_0x297b14)['setLocale'](_0x1d7124),_0x39f5de=_0x3e1eeb['local'](),_0x338e84=_0x39f5de['minus']({'days':0x1})['startOf']('day');let _0xc6c729,_0x5c67d3;return _0x71ef26['hasSame'](_0x39f5de,'day')?(_0xc6c729=_0x71ef26['startOf']('day')['toJSDate'](),_0x5c67d3=_0x71ef26['toRelativeCalendar']()):_0x71ef26['hasSame'](_0x338e84,'day')?(_0xc6c729=_0x338e84['toJSDate'](),_0x5c67d3=_0x71ef26['toRelativeCalendar']()):_0x71ef26['hasSame'](_0x39f5de,'week')?(_0xc6c729=_0x71ef26['startOf']('week')['toJSDate'](),_0x5c67d3=_0x71ef26['weekdayLong']||''):_0x71ef26['hasSame'](_0x39f5de,'year')?(_0xc6c729=_0x71ef26['startOf']('month')['toJSDate'](),_0x5c67d3=_0x71ef26['monthLong']||''):(_0xc6c729=_0x71ef26['startOf']('year')['toJSDate'](),_0x5c67d3=String(_0x71ef26['year'])),{'startDate':_0xc6c729,'localizedPeriodName':_0x5c67d3};}class ei extends ts{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x55dccc,_0x2169dd,_0x253ead,_0x22e8f8){super(_0x55dccc);const _0x1aed46=ti(_0x2169dd,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0x2169dd,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0x253ead,this['_requireRevisionName']=_0x22e8f8,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':_0x1aed46}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x518613){const _0x816831=new si(this['locale'],_0x518613,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0x816831);}['removeRevision'](_0x3740df){const _0x4ab439=this['revisionViews']['find'](_0xdd121b=>_0xdd121b['id']===_0x3740df['id']);this['revisionViews']['remove'](_0x4ab439);}}class cs extends ts{constructor(_0x4a55a6){super(_0x4a55a6);const _0x35fefd=new _0x39d1e2();_0x35fefd['content']=_0x3144c0,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x35fefd,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[m(_0x4a55a6,'Revision\x20history')]}]});}}class ii extends ts{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x316e96,_0x8f6bbb,_0x14db0f,_0x13eb6b){super(_0x316e96);const _0x42bd58=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x8f6bbb,this['_revisionActions']=_0x14db0f,this['_requireRevisionName']=_0x13eb6b,this['on']('select',(_0x4a3cd9,_0xcfc955)=>{this['fire']('revisionSelected',_0xcfc955);}),this['on']('setName',(_0x31e064,_0x49b65f)=>{this['fire']('revisionSetName',_0x49b65f);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new cs(_0x316e96),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x42bd58['if']('isEnabled','ck-disabled',_0x44c9b4=>!_0x44c9b4)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x29fdfc of this['_revisions'])this['_addRevision'](_0x29fdfc);this['_revisions']['on']('add',(_0x120375,_0x38dbe6)=>{this['_addRevision'](_0x38dbe6);}),this['_revisions']['on']('remove',(_0x5aace4,_0xbbaf92)=>{this['_removeRevision'](_0xbbaf92);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2ae733=>_0x2ae733['revisionViews']['map'](_0x21ad60=>_0x21ad60))['flat']();}['selectRevision'](_0x566844){for(const _0x55f61e of this['revisionViews'])_0x566844&&_0x566844['id']===_0x55f61e['id']?_0x55f61e['select']():_0x55f61e['deselect']();}['highlightRevisions'](_0x457804){for(const _0x17d656 of this['revisionViews'])_0x457804['some'](({id:_0x3b3da4})=>_0x3b3da4===_0x17d656['id'])?_0x17d656['highlight']():_0x17d656['unhighlight']();}['_addRevision'](_0x421959){const _0x2c5812=ti(_0x421959['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x5882a3=this['timePeriodViews']['get'](0x0);_0x5882a3&&_0x5882a3['startDate']['getTime']()===_0x2c5812['getTime']()||(_0x5882a3=new ei(this['locale'],_0x2c5812,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x5882a3)),_0x5882a3['addRevision'](_0x421959);}['_removeRevision'](_0x3a7299){const _0x2617ab=ti(_0x3a7299['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x2617ab)['removeRevision'](_0x3a7299);}['_getTimePeriodViewByStartDate'](_0x32e388){return this['timePeriodViews']['find'](_0x54460b=>_0x54460b['startDate']['getTime']()===_0x32e388['getTime']());}}class g extends _0x3c80d2{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
27
27
  ((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
28
- bt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x20ee79){super(_0x20ee79),this['_revisionViewer']=_0x20ee79['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x2ba7c4=this['_revisionsRepository']['_revisions'],_0x33b1d9=this['_createRevisionActions'](),_0x255dea=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new di(this['editor']['locale'],_0x2ba7c4,_0x33b1d9,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',(_0x229352,_0x53042d)=>{_0x53042d['revisionViews']['on']('add',(_0x39ecf0,_0x4ebf89)=>{_0x4ebf89['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)),_0x255dea['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x265442=this['_revisionsRepository']['getRevision'](0x0);if(_0x265442){const _0x56e7f6=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x265442['id']);this['_revisionViewer']['compare'](_0x265442,_0x56e7f6);}}['_handleRevisionSelected'](_0x3e83ae,_0x147c4a){const _0x5a3d61=this['_revisionsRepository']['getRevision'](_0x147c4a['id']),_0x1606e2=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x5a3d61['id']);this['_revisionViewer']['compare'](_0x5a3d61,_0x1606e2);}['_handleRevisionSetName'](_0x59d993,_0x4781ed){this['_revisionsRepository']['getRevision'](_0x4781ed['id'])['setName'](_0x4781ed['name']);}['_handleDiffChange'](_0x30af4,_0x434a61,_0x5d8121){const _0x523126=this['_revisionsRepository']['getRevisionsInDiff'](_0x5d8121);_0x523126['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x523126),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x523126[0x0]));}['_createRevisionActions'](){const _0x227ded=this['editor'],_0x44560d=g['availableRevisionActions'],_0x547e28=_0x227ded['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x547e28['length'])return _0x547e28['map'](_0x17d935=>{const _0x9cc5d1='string'==typeof _0x17d935?Object['assign']({},_0x44560d[_0x17d935]):_0x17d935;return _0x9cc5d1['action']=_0x9cc5d1['action']['bind'](this,_0x227ded),_0x9cc5d1['isVisible']&&(_0x9cc5d1['isVisible']=_0x9cc5d1['isVisible']['bind'](this,_0x227ded)),_0x9cc5d1;});}}function bt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x305d1c},_0x152406)=>{const _0x324176=_0x305d1c['get'](d),_0x374268=_0x324176['repository'];let _0x5bdc1f=_0x324176['diff']['newRevisionId'],_0x171888=_0x152406['id'];_0x374268['getIndex'](_0x5bdc1f)>_0x374268['getIndex'](_0x171888)&&([_0x5bdc1f,_0x171888]=[_0x171888,_0x5bdc1f]),_0x324176['compare'](_0x5bdc1f,_0x171888);},'isVisible':({plugins:_0x43a305},_0x1fdcf5)=>{const _0x9efca=_0x43a305['get'](d);return!(_0x9efca['repository']['getRevisionsInDiff'](_0x9efca['diff'])['length']>0x2)&&!_0x1fdcf5['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x30d284,{id:_0x39f8c5})=>{_0x30d284['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x39f8c5);},'isVisible':({plugins:_0x48a983},_0x35e7dc)=>!!_0x48a983['get'](d)['repository']['getLaterVisibleRevision'](_0x35e7dc['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x1cec80},{id:_0x225741,revisionNameView:_0x5ca01a})=>{const _0x43ddc3=_0x1cec80['get'](d),_0x11d6ab=_0x43ddc3['repository']['getEarlierVisibleRevision'](_0x225741);_0x43ddc3['compare'](_0x225741,_0x11d6ab),_0x5ca01a['focus'](),_0x5ca01a['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x508c56,_0x39b206){super(_0x508c56),this['_view']=_0x39b206,this['_toolbarConfig']=ot(_0x508c56['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x5d2744){const _0x2028da=this['editor'],_0x6409a6=this['view'],_0x2029f8=_0x2028da['editing']['view'],_0x3a19be=_0x6409a6['editable'],_0x29c0c8=_0x2029f8['document']['getRoot']();_0x3a19be['name']=_0x29c0c8['rootName'],_0x6409a6['render']();const _0x44e2c5=_0x3a19be['element'];this['setEditableElement'](_0x3a19be['name'],_0x44e2c5),_0x6409a6['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x2029f8['attachDomRoot'](_0x44e2c5),this['_elementReplacer']['replace'](_0x5d2744,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x84d9db=this['view'],_0x4a77d5=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x4a77d5['detachDomRoot'](_0x84d9db['editable']['name']),_0x84d9db['destroy']();}['_initToolbar'](){const _0x1e418c=this['view'];_0x1e418c['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x1e418c['stickyPanel']['limiterElement']=_0x1e418c['element'],_0x1e418c['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0xebd3c4})=>_0xebd3c4),_0x1e418c['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x1e418c['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x1a2bdb,_0x508226,_0x3b5d46={}){super(_0x1a2bdb),this['stickyPanel']=new lt(_0x1a2bdb),this['toolbar']=new nt(_0x1a2bdb,{'shouldGroupWhenFull':_0x3b5d46['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x1a2bdb,_0x508226);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
29
- it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x4f9e1d,_0x25208b){super(_0x25208b),this['sourceElement']=_0x4f9e1d,this['model']['document']['createRoot']();const _0xea9eed=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0xea9eed);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x339af3,_0x499ba0){const _0x32d210=new this(_0x339af3,_0x499ba0);return await _0x32d210['initPlugins'](),await _0x32d210['ui']['init'](_0x339af3),await _0x32d210['data']['init'](_0x32d210['config']['get']('initialData')||''),_0x32d210['fire']('ready'),_0x32d210;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class Rt extends _0x5aa884{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7db8d){function _0x209301(_0x52b71d){return _0x52b71d['map'](_0xabbc49=>String['fromCharCode'](_0xabbc49))['join']('');}super(_0x7db8d),this['result']='end',_0x7db8d[_0x209301([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x209301([0x76,0x69,0x65,0x77])][_0x209301([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x209301([0x61,0x75,0x74,0x6f]),_0x7db8d[_0x209301([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x209301([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x209301([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x209301([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x209301([0x6f,0x6b])});}}class k extends _0x5aa884{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x567caf){if(super(_0x567caf),!this['editor']['config']['get']('revisionHistory'))throw new _0x1a961b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xabc942=>this['_showRevisionViewer']({..._0xabc942,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x2c7ea6=>this['_closeRevisionViewer'](_0x2c7ea6)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x430723=>this['_restoreRevision'](_0x430723)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x5e9f61){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x5e9f61;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x3548de){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x3548de);}['getRevision'](_0x27dbf7){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x27dbf7);}['getRevisions'](_0x3e9189){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x3e9189||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x450092=this['editor'],_0x561899=_0x4398d8(_0x450092,p),_0x572cf3=_0x450092['plugins']['get']('RevisionTracker'),_0xdfc85c=_0x450092['plugins']['get']('Users')['users'];return _0x561899['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x561899['lazyRoots'],(_0x561899['plugins']['push'](Rt,d,w,class extends _0x5aa884{static get['requires'](){return[d,'Users'];}['init'](){const _0x3e4634=this['editor']['plugins']['get']('Users');for(const _0x5aaeba of _0xdfc85c)_0x5aaeba['isAnonymous']||_0x3e4634['getUser'](_0x5aaeba['id'])||_0x3e4634['addUser'](_0x5aaeba);const _0x3a7461=_0x572cf3['repository']['getRevisions']();let _0x4fbe19=null;const _0x3a1650=this['editor']['plugins']['get']('RevisionViewer');_0x3a1650['adapter']=_0x572cf3['adapter'],_0x3a1650['bind']('isEnabled')['to'](_0x572cf3),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x450092,'isReadOnly',_0xaade0b=>!_0xaade0b);for(const _0x228957 of _0x3a7461){const _0x4d604d=null===_0x228957['creator'];if(_0x4d604d&&_0x228957['toVersion']===_0x228957['fromVersion'])continue;const _0x4737fa=_0x228957['toJSON']();_0x3a1650['addRevisionData'](_0x4737fa,(_0x20a64d,_0x2cb1fa,_0x5dd295)=>{if(_0x4d604d){if(_0x4fbe19)_0x4fbe19['_update'](_0x20a64d,_0x2cb1fa);else{if(!_0x2cb1fa){const _0x231cd0=_0x5dd295['toJSON']();_0x231cd0['id']=_0x51a0e0(),_0x572cf3['saveRevision'](_0x231cd0,_0x5dd295['toVersion'])['then'](_0x24d97e=>{_0x4fbe19=_0x24d97e;});}}}else _0x228957['_update'](_0x20a64d,_0x2cb1fa);});}}},g),_0x561899);}['_enhanceShowRevisionViewerCallback'](){const _0x208522=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x109fee=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x276cb9=this['editor']['plugins']['get']('Autosave');await _0x276cb9['save']();}else await _0x109fee['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x153af8=this['editor']['plugins']['get']('Dialog');_0x153af8['isOpen']&&_0x153af8['hide']();}const _0x3fa7c7=this['_getRevisionViewerEditorConfig']();return _0x208522(_0x3fa7c7)['then'](_0x11e6f9=>{return(this['_viewerEditor']=_0x11e6f9,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0x11e6f9;})['catch'](_0xb4f100=>(console['error'](_0xb4f100),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x15edf2=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x15edf2(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x465e3d=this['editor']['plugins']['get']('Annotations');_0x465e3d['refreshVisibility'](),_0x465e3d['refreshPositioning']();}})));}['_showRevisionViewer'](_0x2afd8f){const _0x5d747c=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x297ea9=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x29655e=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x29655e,_0x2afd8f)['then'](_0x31aba6=>(_0x297ea9['style']['display']='block',_0x5d747c['style']['display']='none',_0x31aba6));}['_closeRevisionViewer'](_0x187bb7){const _0x5bd91a=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x5bd91a['style']['display']='',_0x187bb7['destroy']();}async['_restoreRevision'](_0x55cc7b){const _0x2cedc1=this['editor'],_0x2670e3=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x119161=_0x2cedc1['plugins']['get']('RevisionTracker'),_0x44fb29=_0x2670e3['repository']['getRevision'](_0x55cc7b);let _0x5a8515,_0x5dc588,_0xf7c678;try{_0x5a8515=await _0x2670e3['getRevisionData'](_0x44fb29),_0x5dc588=await _0x2670e3['getRevisionRootsAttributes'](_0x44fb29);}catch(_0x518478){return void console['error'](_0x518478);}_0x2cedc1['model']['change'](_0x2c50ee=>{for(const _0x7d030b of Array['from'](_0x2cedc1['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x2c50ee['removeMarker'](_0x7d030b);}),_0x2670e3['isReady']=!0x1,_0x2cedc1['model']['enqueueChange'](_0x7986ca=>{_0x7986ca['setSelection'](null),_0x7986ca['removeSelectionAttribute'](_0x2cedc1['model']['document']['selection']['getAttributeKeys']());const _0x29bee6=Object['keys'](_0x5a8515);for(const _0x5700dd of _0x2cedc1['model']['document']['roots'])'$graveyard'!=_0x5700dd['rootName']&&_0x5700dd['isAttached']()&&!_0x29bee6['includes'](_0x5700dd['rootName'])&&_0x7986ca['detachRoot'](_0x5700dd);for(const _0x469884 of _0x29bee6){let _0x27bab8=_0x2cedc1['model']['document']['getRoot'](_0x469884);_0x27bab8&&_0x27bab8['isAttached']()||(_0x27bab8=_0x7986ca['addRoot'](_0x469884));const _0xc328d3=_0x5dc588[_0x469884],_0xf9ab41=Object['keys'](_0xc328d3),_0x232175=_0x5a8515[_0x469884];for(const _0x14348e of _0x27bab8['getAttributeKeys']())_0xf9ab41['includes'](_0x14348e)||_0x7986ca['removeAttribute'](_0x14348e,_0x27bab8);for(const _0x2c1353 of _0xf9ab41)_0x7986ca['setAttribute'](_0x2c1353,_0x5dc588[_0x469884][_0x2c1353],_0x27bab8);_0x7986ca['remove'](_0x7986ca['createRangeIn'](_0x27bab8)),_0x7986ca['insert'](_0x2cedc1['data']['parse'](_0x232175,_0x27bab8),_0x27bab8,0x0);}});const _0x1443c0=m(_0x2cedc1['locale'],'Restored');if(_0x44fb29['name'])_0xf7c678=-0x1==_0x44fb29['name']['indexOf'](_0x1443c0)?_0x1443c0+':\x20'+_0x44fb29['name']:_0x44fb29['name'];else _0xf7c678=_0x1443c0+':\x20'+(_0x44fb29['createdAt']['toLocaleDateString'](_0x2cedc1['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x44fb29['createdAt']['toLocaleTimeString'](_0x2cedc1['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x119161['saveRevision']({'name':_0xf7c678}),_0x2670e3['isReady']=!0x0,_0x2cedc1['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,le as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};
28
+ yt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[d];}constructor(_0x2cdefb){super(_0x2cdefb),this['_revisionViewer']=_0x2cdefb['plugins']['get'](d),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x370ed6=this['_revisionsRepository']['_revisions'],_0x1273c0=this['_createRevisionActions'](),_0x31e93c=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new ii(this['editor']['locale'],_0x370ed6,_0x1273c0,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',(_0x4b9011,_0x3ddb88)=>{_0x3ddb88['revisionViews']['on']('add',(_0x37d7fe,_0x32876f)=>{_0x32876f['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)),_0x31e93c['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x494df0=this['_revisionsRepository']['getRevision'](0x0);if(_0x494df0){const _0xed767b=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x494df0['id']);this['_revisionViewer']['compare'](_0x494df0,_0xed767b);}}['_handleRevisionSelected'](_0x42950a,_0x470b38){const _0x3e95a9=this['_revisionsRepository']['getRevision'](_0x470b38['id']),_0x373b32=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x3e95a9['id']);this['_revisionViewer']['compare'](_0x3e95a9,_0x373b32);}['_handleRevisionSetName'](_0x4c6237,_0x5c6497){this['_revisionsRepository']['getRevision'](_0x5c6497['id'])['setName'](_0x5c6497['name']);}['_handleDiffChange'](_0x567bb4,_0x18b204,_0x1f2c32){const _0x428e22=this['_revisionsRepository']['getRevisionsInDiff'](_0x1f2c32);_0x428e22['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x428e22),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x428e22[0x0]));}['_createRevisionActions'](){const _0x461897=this['editor'],_0x58fa52=g['availableRevisionActions'],_0x2e05ee=_0x461897['config']['get']('revisionHistory.revisionActions')||g['defaultRevisionActions'];if(_0x2e05ee['length'])return _0x2e05ee['map'](_0x5e032d=>{const _0x2b4e09='string'==typeof _0x5e032d?Object['assign']({},_0x58fa52[_0x5e032d]):_0x5e032d;return _0x2b4e09['action']=_0x2b4e09['action']['bind'](this,_0x461897),_0x2b4e09['isVisible']&&(_0x2b4e09['isVisible']=_0x2b4e09['isVisible']['bind'](this,_0x461897)),_0x2b4e09;});}}function yt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x1e620c},_0x172d0e)=>{const _0x3e8507=_0x1e620c['get'](d),_0x26815d=_0x3e8507['repository'];let _0x60f0cf=_0x3e8507['diff']['newRevisionId'],_0x3ad93a=_0x172d0e['id'];_0x26815d['getIndex'](_0x60f0cf)>_0x26815d['getIndex'](_0x3ad93a)&&([_0x60f0cf,_0x3ad93a]=[_0x3ad93a,_0x60f0cf]),_0x3e8507['compare'](_0x60f0cf,_0x3ad93a);},'isVisible':({plugins:_0x28d2ee},_0x2cac31)=>{const _0x108a42=_0x28d2ee['get'](d);return!(_0x108a42['repository']['getRevisionsInDiff'](_0x108a42['diff'])['length']>0x2)&&!_0x2cac31['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0xccfced,{id:_0x2f9791})=>{_0xccfced['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2f9791);},'isVisible':({plugins:_0x25a918},_0x145587)=>!!_0x25a918['get'](d)['repository']['getLaterVisibleRevision'](_0x145587['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x3a1e2f},{id:_0x1f25e,revisionNameView:_0x3abfd6})=>{const _0x1b9eeb=_0x3a1e2f['get'](d),_0x1c7692=_0x1b9eeb['repository']['getEarlierVisibleRevision'](_0x1f25e);_0x1b9eeb['compare'](_0x1f25e,_0x1c7692),_0x3abfd6['focus'](),_0x3abfd6['fieldView']['select']();}}};}class rt extends st{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0xb62984,_0x2a922d){super(_0xb62984),this['_view']=_0x2a922d,this['_toolbarConfig']=ot(_0xb62984['config']['get']('toolbar')),this['_elementReplacer']=new ht();}get['element'](){return this['view']['element'];}['init'](_0x9eb69){const _0xffa539=this['editor'],_0x445b48=this['view'],_0x43aa43=_0xffa539['editing']['view'],_0x4077aa=_0x445b48['editable'],_0x250a8e=_0x43aa43['document']['getRoot']();_0x4077aa['name']=_0x250a8e['rootName'],_0x445b48['render']();const _0xdb3bb0=_0x4077aa['element'];this['setEditableElement'](_0x4077aa['name'],_0xdb3bb0),_0x445b48['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x43aa43['attachDomRoot'](_0xdb3bb0),this['_elementReplacer']['replace'](_0x9eb69,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x45d2ff=this['view'],_0x49ca54=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x49ca54['detachDomRoot'](_0x45d2ff['editable']['name']),_0x45d2ff['destroy']();}['_initToolbar'](){const _0x21de0e=this['view'];_0x21de0e['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x21de0e['stickyPanel']['limiterElement']=_0x21de0e['element'],_0x21de0e['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x5640f1})=>_0x5640f1),_0x21de0e['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x21de0e['toolbar']);}}class et extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x2e901a,_0x159d98,_0x533053={}){super(_0x2e901a),this['stickyPanel']=new lt(_0x2e901a),this['toolbar']=new nt(_0x2e901a,{'shouldGroupWhenFull':_0x533053['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x2e901a,_0x159d98);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class R extends/* #__PURE__ -- @preserve */
29
+ it(tt){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x19050f,_0x2365d5){super(_0x2365d5),this['sourceElement']=_0x19050f,this['model']['document']['createRoot']();const _0x13a0ee=new et(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new rt(this,_0x13a0ee);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x418f20,_0x5afca1){const _0x7995d3=new this(_0x418f20,_0x5afca1);return await _0x7995d3['initPlugins'](),await _0x7995d3['ui']['init'](_0x418f20),await _0x7995d3['data']['init'](_0x7995d3['config']['get']('initialData')||''),_0x7995d3['fire']('ready'),_0x7995d3;}}const p=['RevisionHistoryUI','RestrictedEditingMode'];class bt extends _0x3c80d2{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x319e39){function _0x5be078(_0x4260bf){return _0x4260bf['map'](_0x29eba9=>String['fromCharCode'](_0x29eba9))['join']('');}super(_0x319e39),this['result']='end',_0x319e39[_0x5be078([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5be078([0x76,0x69,0x65,0x77])][_0x5be078([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5be078([0x61,0x75,0x74,0x6f]),_0x319e39[_0x5be078([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5be078([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5be078([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5be078([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5be078([0x6f,0x6b])});}}class k extends _0x3c80d2{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[u,f];}constructor(_0x4312da){if(super(_0x4312da),!this['editor']['config']['get']('revisionHistory'))throw new _0x1d3755('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x6fb5e7=>this['_showRevisionViewer']({..._0x6fb5e7,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x39d049=>this['_closeRevisionViewer'](_0x39d049)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x2d8a45=>this['_restoreRevision'](_0x2d8a45)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x4e23b0){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x4e23b0;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0xfc42b1){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0xfc42b1);}['getRevision'](_0x2ee915){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x2ee915);}['getRevisions'](_0x44a2ea){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x44a2ea||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0xdec514=this['editor'],_0x49bdff=_0x34b419(_0xdec514,p),_0x1383cd=_0xdec514['plugins']['get']('RevisionTracker'),_0x2488b4=_0xdec514['plugins']['get']('Users')['users'];return _0x49bdff['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x49bdff['lazyRoots'],(_0x49bdff['plugins']['push'](bt,d,w,class extends _0x3c80d2{static get['requires'](){return[d,'Users'];}['init'](){const _0x55e75e=this['editor']['plugins']['get']('Users');for(const _0x2c032b of _0x2488b4)_0x2c032b['isAnonymous']||_0x55e75e['getUser'](_0x2c032b['id'])||_0x55e75e['addUser'](_0x2c032b);const _0x473715=_0x1383cd['repository']['getRevisions']();let _0x3a4a53=null;const _0xef89ac=this['editor']['plugins']['get']('RevisionViewer');_0xef89ac['adapter']=_0x1383cd['adapter'],_0xef89ac['bind']('isEnabled')['to'](_0x1383cd),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0xdec514,'isReadOnly',_0x1f87ec=>!_0x1f87ec);for(const _0xdb99e of _0x473715){const _0x2ce1ce=null===_0xdb99e['creator'];if(_0x2ce1ce&&_0xdb99e['toVersion']===_0xdb99e['fromVersion'])continue;const _0xdba29f=_0xdb99e['toJSON']();_0xef89ac['addRevisionData'](_0xdba29f,(_0x596f79,_0x4ffef8,_0x52be86)=>{if(_0x2ce1ce){if(_0x3a4a53)_0x3a4a53['_update'](_0x596f79,_0x4ffef8);else{if(!_0x4ffef8){const _0x39fe9d=_0x52be86['toJSON']();_0x39fe9d['id']=_0xe821f1(),_0x1383cd['saveRevision'](_0x39fe9d,_0x52be86['toVersion'])['then'](_0x2f35e0=>{_0x3a4a53=_0x2f35e0;});}}}else _0xdb99e['_update'](_0x596f79,_0x4ffef8);});}}},g),_0x49bdff);}['_enhanceShowRevisionViewerCallback'](){const _0x435b26=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x30f359=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x335166=this['editor']['plugins']['get']('Autosave');await _0x335166['save']();}else await _0x30f359['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x2856ca=this['editor']['plugins']['get']('Dialog');_0x2856ca['isOpen']&&_0x2856ca['hide']();}const _0x10b052=this['_getRevisionViewerEditorConfig']();return _0x435b26(_0x10b052)['then'](_0xf3f8c=>{return(this['_viewerEditor']=_0xf3f8c,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),_0xf3f8c;})['catch'](_0x353426=>(console['error'](_0x353426),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x25b7d6=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x25b7d6(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x1f77ad=this['editor']['plugins']['get']('Annotations');_0x1f77ad['refreshVisibility'](),_0x1f77ad['refreshPositioning']();}})));}['_showRevisionViewer'](_0x597028){const _0x4ad591=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x248282=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x2de300=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return R['create'](_0x2de300,_0x597028)['then'](_0x58df35=>(_0x248282['style']['display']='block',_0x4ad591['style']['display']='none',_0x58df35));}['_closeRevisionViewer'](_0x412409){const _0x3aec0c=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x3aec0c['style']['display']='',_0x412409['destroy']();}async['_restoreRevision'](_0x4ba499){const _0x32017f=this['editor'],_0x2daea7=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x16e26b=_0x32017f['plugins']['get']('RevisionTracker'),_0x1b8d8d=_0x2daea7['repository']['getRevision'](_0x4ba499);let _0x27d99e,_0xeb00e6,_0x38297f;try{_0x27d99e=await _0x2daea7['getRevisionData'](_0x1b8d8d),_0xeb00e6=await _0x2daea7['getRevisionRootsAttributes'](_0x1b8d8d);}catch(_0x1d80d7){return void console['error'](_0x1d80d7);}_0x32017f['model']['change'](_0xe6ec64=>{for(const _0x2264fb of Array['from'](_0x32017f['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0xe6ec64['removeMarker'](_0x2264fb);}),_0x2daea7['isReady']=!0x1,_0x32017f['model']['enqueueChange'](_0xf8a265=>{_0xf8a265['setSelection'](null),_0xf8a265['removeSelectionAttribute'](_0x32017f['model']['document']['selection']['getAttributeKeys']());const _0x420fbe=Object['keys'](_0x27d99e);for(const _0x5da66a of _0x32017f['model']['document']['roots'])'$graveyard'!=_0x5da66a['rootName']&&_0x5da66a['isAttached']()&&!_0x420fbe['includes'](_0x5da66a['rootName'])&&_0xf8a265['detachRoot'](_0x5da66a);for(const _0x381492 of _0x420fbe){let _0x3e4e34=_0x32017f['model']['document']['getRoot'](_0x381492);_0x3e4e34&&_0x3e4e34['isAttached']()||(_0x3e4e34=_0xf8a265['addRoot'](_0x381492));const _0x2d7bbb=_0xeb00e6[_0x381492],_0x2e212e=Object['keys'](_0x2d7bbb),_0x1a004c=_0x27d99e[_0x381492];for(const _0x2342be of _0x3e4e34['getAttributeKeys']())_0x2e212e['includes'](_0x2342be)||_0xf8a265['removeAttribute'](_0x2342be,_0x3e4e34);for(const _0x3c248e of _0x2e212e)_0xf8a265['setAttribute'](_0x3c248e,_0xeb00e6[_0x381492][_0x3c248e],_0x3e4e34);_0xf8a265['remove'](_0xf8a265['createRangeIn'](_0x3e4e34)),_0xf8a265['insert'](_0x32017f['data']['parse'](_0x1a004c,_0x3e4e34),_0x3e4e34,0x0);}});const _0x5b4cec=m(_0x32017f['locale'],'Restored');if(_0x1b8d8d['name'])_0x38297f=-0x1==_0x1b8d8d['name']['indexOf'](_0x5b4cec)?_0x5b4cec+':\x20'+_0x1b8d8d['name']:_0x1b8d8d['name'];else _0x38297f=_0x5b4cec+':\x20'+(_0x1b8d8d['createdAt']['toLocaleDateString'](_0x32017f['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x1b8d8d['createdAt']['toLocaleTimeString'](_0x32017f['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x16e26b['saveRevision']({'name':_0x38297f}),_0x2daea7['isReady']=!0x0,_0x32017f['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{h as Revision,k as RevisionHistory,f as RevisionHistoryUI,u as RevisionTracker,d as RevisionViewer,ge as RevisionViewerLoadingOverlay,w as RevisionViewerUI,j as RevisionsRepository,g as RevisionsSidebar};