@ckeditor/ckeditor5-revision-history 48.2.0-alpha.5 → 48.2.0-alpha.6
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 +7 -7
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ObservableMixin as
|
|
24
|
-
_0x4cbe68(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x21f77e){super(),this['id']=_0x21f77e['id']||_0x55087c(),this['creator']=_0x21f77e['creator']||null,this['authors']=_0x21f77e['authors']||[],this['diffData']=_0x21f77e['diffData']||null,this['toVersion']=_0x21f77e['toVersion']||0x0,this['fromVersion']=_0x21f77e['fromVersion']||0x0,this['set']('name',_0x21f77e['name']||''),this['set']('createdAt',_0x21f77e['createdAt']||new Date()),this['set']('attributes',_0x21f77e['attributes']||{});}['setName'](_0x5c8e38){this['_update']({'name':_0x5c8e38});}['setAttribute'](_0x1d7f11,_0x40ae8d){const _0x55fa19=_0x527a66(this['attributes']);_0x19e1e7(_0x55fa19,_0x1d7f11,_0x40ae8d),this['_update']({'attributes':_0x55fa19});}['removeAttribute'](_0x430546){const _0x31cc29=_0x527a66(this['attributes']);_0x1fc4f8(_0x31cc29,_0x430546),this['_update']({'attributes':_0x31cc29});}['_update'](_0xa00809,_0x2906e5=!0x1){let _0x130b4b=!0x1;const _0x41efd5={'id':this['id']},_0x506259=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x4bb097 of _0x506259){const _0x401272=_0xa00809[_0x4bb097];void 0x0!==_0x401272&&_0x401272!==this[_0x4bb097]&&(this[_0x4bb097]=_0x401272,_0x41efd5[_0x4bb097]=_0x401272,_0x130b4b=!0x0);}_0x130b4b&&(_0x41efd5['authors']&&(_0x41efd5['authorsIds']=_0x41efd5['authors']['map'](_0xcc67df=>_0xcc67df['id']),delete _0x41efd5['authors']),this['fire']('_update',_0x41efd5,_0x2906e5));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x4b1968=>_0x4b1968['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x18ed42{['_revisions'];static get['requires'](){return[_0x4c4887];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x20b87b){super(_0x20b87b),this['_revisions']=new _0x12a0e4();}['afterInit'](){!async function(_0x5165bc){const _0x498677=_0x5d1c7d([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0xaca41c=0xeb829,_0x440da4=0x359e09b0,_0x481ac3=0x35998208^_0x440da4,_0x8bb4ad=window[_0x5d1c7d([0x44,0x61,0x74,0x65])][_0x5d1c7d([0x6e,0x6f,0x77])](),_0x43c3f7=_0x5165bc[_0x5d1c7d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2b70d4=new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x61a5da=>{_0x43c3f7[_0x5d1c7d([0x6f,0x6e,0x63,0x65])](_0x5d1c7d([0x72,0x65,0x61,0x64,0x79]),_0x61a5da);}),_0x497bae={[_0x5d1c7d([0x6b,0x74,0x79])]:_0x5d1c7d([0x45,0x43]),[_0x5d1c7d([0x75,0x73,0x65])]:_0x5d1c7d([0x73,0x69,0x67]),[_0x5d1c7d([0x63,0x72,0x76])]:_0x5d1c7d([0x50,0x2d,0x32,0x35,0x36]),[_0x5d1c7d([0x78])]:_0x5d1c7d([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]),[_0x5d1c7d([0x79])]:_0x5d1c7d([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]),[_0x5d1c7d([0x61,0x6c,0x67])]:_0x5d1c7d([0x45,0x53,0x32,0x35,0x36])},_0x2b73ae=_0x43c3f7[_0x5d1c7d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5d1c7d([0x67,0x65,0x74])](_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x11bf19(){let _0x548977,_0x2f5160=null,_0x2e1c4a=null;try{if(_0x2b73ae==_0x5d1c7d([0x47,0x50,0x4c]))return _0x5d1c7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x548977=_0x272516(),!_0x548977)return _0x5d1c7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x548977[_0x5d1c7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2e1c4a=_0x2c4678(_0x548977[_0x5d1c7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x548977[_0x5d1c7d([0x6a,0x74,0x69])])),await _0x1da2ea()?_0x3cb106()?_0xe45512()?_0x5d1c7d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5781a4()?(_0x548977[_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5d1c7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2f5160=_0x852988(_0x5d1c7d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x420fca()):_0x5d1c7d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5d1c7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5d1c7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5d1c7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xe45512(){const _0x5783f9=[_0x5d1c7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5d1c7d([0x74,0x72,0x69,0x61,0x6c])][_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x548977[_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x8bb4ad/0x3e8:0xe10*_0x481ac3;return _0x548977[_0x5d1c7d([0x65,0x78,0x70])]<_0x5783f9;}function _0x3cb106(){const _0x1aec8f=_0x548977[_0x5d1c7d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1aec8f)return!0x1;if(_0x1aec8f[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x2a])))return!0x0;if(_0x1aec8f[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x52,0x48])))return!0x0;if(_0x1aec8f[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x52,0x52,0x48]))){if(_0x132679())return!0x0;if(_0x4cfeb2()||_0x3a4c3a())return!0x0;}return!0x1;}function _0x5781a4(){const _0x17740e=_0x548977[_0x5d1c7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x17740e||0x0==_0x17740e[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x21fb9b}=new URL(window[_0x5d1c7d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x17740e[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x21fb9b))return!0x0;const _0x27ff75=_0x21fb9b[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e]));return _0x17740e[_0x5d1c7d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12d628=>_0x12d628[_0x5d1c7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d1c7d([0x2a])))[_0x5d1c7d([0x6d,0x61,0x70])](_0x5b3ca2=>_0x5b3ca2[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e])))[_0x5d1c7d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1fa4a9=>_0x1fa4a9[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x27ff75[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5d1c7d([0x6d,0x61,0x70])](_0xb70fe=>Array(_0x27ff75[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0xb70fe[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5d1c7d([0x66,0x69,0x6c,0x6c])](_0xb70fe[0x0]===_0x5d1c7d([0x2a])?_0x5d1c7d([0x2a]):'')[_0x5d1c7d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0xb70fe))[_0x5d1c7d([0x73,0x6f,0x6d,0x65])](_0x7694e9=>_0x27ff75[_0x5d1c7d([0x65,0x76,0x65,0x72,0x79])]((_0x3b0aa3,_0x1787b4)=>_0x7694e9[_0x1787b4]===_0x3b0aa3||_0x7694e9[_0x1787b4]===_0x5d1c7d([0x2a])));}function _0x420fca(){return _0x2f5160&&_0x2e1c4a?new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x45c921,_0x30aae9)=>{_0x2f5160[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x45c921,_0x30aae9),_0x2e1c4a[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x5ebf6e=>{_0x5ebf6e!=_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64])&&_0x45c921(_0x5ebf6e);},_0x30aae9);}):_0x2f5160||_0x2e1c4a||_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2c4678(_0x8d0dfb,_0x4a76b7){return new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5bf62a=>{if(_0x2d485c())return _0x5bf62a(_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64]));_0x396914(),_0x43c3f7[_0x5d1c7d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5d1c7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x244890=!0x1;const _0x363ddd=_0x55087c();function _0x4a789d(_0xfa7733){return!!_0xfa7733&&(typeof _0xfa7733===_0x5d1c7d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xfa7733===_0x5d1c7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xfa7733[_0x5d1c7d([0x74,0x68,0x65,0x6e])]===_0x5d1c7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xfa7733[_0x5d1c7d([0x63,0x61,0x74,0x63,0x68])]===_0x5d1c7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x439f3a(_0xdc9052){_0x2ae6ab(_0xdc9052)[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x4aa718=>{if(!_0x4aa718||_0x4aa718[_0x5d1c7d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5d1c7d([0x6f,0x6b]))return _0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x36dd10(_0x542649(_0x363ddd+_0x4a76b7))!=_0x4aa718[_0x5d1c7d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64]);})[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x442d2b=>(_0x3ea0d4(),_0x442d2b),()=>{const _0x3407f4=_0x57af19();return null==_0x3407f4?(_0x3ea0d4(),_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64])):_0x5d1c7d(_0x8bb4ad-_0x3407f4>(0x11928db0^_0x440da4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x5bf62a)[_0x5d1c7d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5bf62a(_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4f8f6e=0x35a8e730^_0x440da4;function _0x3ea0d4(){const _0x34c8cb=_0x5d1c7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x36dd10(_0x542649(_0x8d0dfb)),_0x59ab01=_0x420fcb(_0x36dd10(window[_0x5d1c7d([0x4d,0x61,0x74,0x68])][_0x5d1c7d([0x63,0x65,0x69,0x6c])](_0x8bb4ad/_0x4f8f6e)));window[_0x5d1c7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5d1c7d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x34c8cb,_0x59ab01);}function _0x57af19(){const _0x2bd889=_0x5d1c7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x36dd10(_0x542649(_0x8d0dfb)),_0x227ba6=window[_0x5d1c7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5d1c7d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2bd889);return _0x227ba6?window[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x420fcb(_0x227ba6),0x10)*_0x4f8f6e:null;}function _0x2ae6ab(_0x5e17f9){return new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x438199,_0x4d839e)=>{_0x5e17f9[_0x5d1c7d([0x74,0x68,0x65,0x6e])](_0x438199,_0x4d839e),window[_0x5d1c7d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4d839e,0x359fdd70^_0x440da4);});}}_0x43c3f7[_0x5d1c7d([0x6f,0x6e])](_0x5d1c7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3f87db,_0x4f5780)=>{if(_0x4f5780[0x0]!=_0x8d0dfb)return _0x5bf62a(_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4f5780[0x1]={..._0x4f5780[0x1],[_0x5d1c7d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x363ddd};},{[_0x5d1c7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5d1c7d([0x68,0x69,0x67,0x68])}),_0x43c3f7[_0x5d1c7d([0x6f,0x6e])](_0x5d1c7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58738e=>{_0x4a789d(_0x58738e[_0x5d1c7d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x244890=!0x0,_0x439f3a(_0x58738e[_0x5d1c7d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5d1c7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5d1c7d([0x6c,0x6f,0x77])}),_0x2b70d4[_0x5d1c7d([0x74,0x68,0x65,0x6e])](()=>{_0x244890||_0x5bf62a(_0x5d1c7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2d485c(){return _0x43c3f7[_0x5d1c7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d1c7d([0x76,0x69,0x65,0x77])][_0x5d1c7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5d1c7d([0x61,0x75,0x74,0x6f]);}function _0x396914(){_0x43c3f7[_0x5d1c7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d1c7d([0x76,0x69,0x65,0x77])][_0x5d1c7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5d1c7d([0x61,0x75,0x74,0x6f]);}}function _0x852988(_0x3eab18){const _0x24d2a2=[new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f7714=>setTimeout(_0x2f7714,0x3597377c^_0x440da4)),_0x2b70d4[_0x5d1c7d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x12af0d=>{const _0x765392=0x359e09b7^_0x440da4,_0x1aeb1a=_0x5165bc[_0x5d1c7d([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x20683c(){_0x1aeb1a[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x765392&&_0x12af0d();}_0x20683c(),_0x1aeb1a[_0x5d1c7d([0x6f,0x6e])](_0x5d1c7d([0x61,0x64,0x64]),_0x20683c);})),new window[(_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x412aaf=>{function _0x49054a(){for(const _0x58f675 in window)if(window[_0x5d1c7d([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x5d1c7d([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x58f675))&&window[_0x58f675]==_0xaca41c)return _0x412aaf();_0x43c3f7[_0x5d1c7d([0x73,0x74,0x61,0x74,0x65])]!=_0x5d1c7d([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x5d1c7d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x49054a,0x359e1a38^_0x440da4);}_0x1e2a84(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x49054a();})];return window[_0x5d1c7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5d1c7d([0x72,0x61,0x63,0x65])](_0x24d2a2)[_0x5d1c7d([0x74,0x68,0x65,0x6e])](()=>_0x3eab18);}async function _0x281f07(){if(await _0x2b70d4,_0x1e2a84(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x897501=_0x5165bc[_0x5d1c7d([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x453e79=_0x5165bc[_0x5d1c7d([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])](_0x897501[_0x5d1c7d([0x69,0x64])]),_0x5d1438=_0x15c307(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x5d1438[_0x5d1c7d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x897501['id'],_0x453e79?_0x453e79['id']:null,!0x0),_0x5d1438[_0x5d1c7d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x5d1438[_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x5d1438[_0x5d1c7d([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x3f4413,void(_0x5d1438[_0x5d1c7d([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x3f4413);}if(_0x1e2a84(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x51125f=_0x15c307(_0x5d1c7d([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x51125f[_0x5d1c7d([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x51125f[_0x5d1c7d([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x51125f[_0x5d1c7d([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x3f4413,_0x51125f[_0x5d1c7d([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x3f4413;}_0x43c3f7[_0x5d1c7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5d1c7d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3f4413,_0x43c3f7[_0x5d1c7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5d1c7d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3f4413,_0x43c3f7[_0x5d1c7d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5d1c7d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x132679(){return _0x1e2a84(_0x5d1c7d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x15c307(_0x5d1c7d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5d1c7d([0x73,0x74,0x61,0x74,0x65])]==_0x5d1c7d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4cfeb2(){return _0x1e2a84(_0x5d1c7d([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 _0x3a4c3a(){return _0x1e2a84(_0x5d1c7d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x217e6b(_0x4e7d0d){const _0x4fe9f1=_0x1f1b2f();_0x43c3f7[_0x4fe9f1]=_0x5d1c7d([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])+_0x4e7d0d,_0x4e7d0d[_0x5d1c7d([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x5d1c7d([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x1f1b2f()]=_0xaca41c),_0x4e7d0d!=_0x5d1c7d([0x56,0x61,0x6c,0x69,0x64])&&_0x281f07();}function _0x1f1b2f(){const _0x40e340=window[_0x5d1c7d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5d1c7d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5d1c7d([0x6e,0x6f,0x77])]())[_0x5d1c7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5d1c7d([0x2e]),'');let _0x596b77=_0x5d1c7d([0x76]);for(let _0x3d1f13=0x0;_0x3d1f13<_0x40e340[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3d1f13+=0x2){let _0x5cd666=window[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x40e340[_0x5d1c7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3d1f13,_0x3d1f13+0x2));_0x5cd666>=_0x498677[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5cd666-=_0x498677[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x596b77+=_0x498677[_0x5cd666];}return _0x596b77;}function _0x272516(){const _0x576d4c=_0x2b73ae[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e]));if(0x3!=_0x576d4c[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x23cd7a(_0x576d4c[0x1]);function _0x23cd7a(_0x178ea4){const _0xc3e90d=_0x4beae0(_0x178ea4);return _0xc3e90d&&_0x662e2e()?_0xc3e90d:null;function _0x662e2e(){const _0x1b4fca=_0xc3e90d[_0x5d1c7d([0x6a,0x74,0x69])],_0x10bf40=window[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b4fca[_0x5d1c7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b4fca[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3c984c={..._0xc3e90d,[_0x5d1c7d([0x6a,0x74,0x69])]:_0x1b4fca[_0x5d1c7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b4fca[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3c984c[_0x5d1c7d([0x76,0x63])],_0x542649(_0x3c984c)==_0x10bf40;}}}async function _0x1da2ea(){let _0x2479ff=!0x0;try{const _0x2e074e=_0x2b73ae[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])](_0x5d1c7d([0x2e])),[_0x55bbbd,_0x4654d5,_0x79e3d5]=_0x2e074e;return _0x266f3d(_0x55bbbd),await _0x22a50d(_0x55bbbd,_0x4654d5,_0x79e3d5),_0x2479ff;}catch{return!0x1;}function _0x266f3d(_0x1c04fc){const _0x31bcbd=_0x4beae0(_0x1c04fc);_0x31bcbd&&_0x31bcbd[_0x5d1c7d([0x61,0x6c,0x67])]==_0x5d1c7d([0x45,0x53,0x32,0x35,0x36])||(_0x2479ff=!0x1);}async function _0x22a50d(_0x4aa730,_0x13777a,_0x152673){const _0x8a2474=window[_0x5d1c7d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5d1c7d([0x66,0x72,0x6f,0x6d])](_0x2776cb(_0x152673),_0x2a8947=>_0x2a8947[_0x5d1c7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3c228a=new window[(_0x5d1c7d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5d1c7d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4aa730+_0x5d1c7d([0x2e])+_0x13777a),_0x40bbe0=window[_0x5d1c7d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5d1c7d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x40bbe0)return;const _0x57a183=await _0x40bbe0[_0x5d1c7d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5d1c7d([0x6a,0x77,0x6b]),_0x497bae,{[_0x5d1c7d([0x6e,0x61,0x6d,0x65])]:_0x5d1c7d([0x45,0x43,0x44,0x53,0x41]),[_0x5d1c7d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5d1c7d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5d1c7d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x40bbe0[_0x5d1c7d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5d1c7d([0x6e,0x61,0x6d,0x65])]:_0x5d1c7d([0x45,0x43,0x44,0x53,0x41]),[_0x5d1c7d([0x68,0x61,0x73,0x68])]:{[_0x5d1c7d([0x6e,0x61,0x6d,0x65])]:_0x5d1c7d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x57a183,_0x8a2474,_0x3c228a)||(_0x2479ff=!0x1);}}function _0x4beae0(_0x3e2b01){return _0x3e2b01[_0x5d1c7d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5d1c7d([0x65,0x79]))?JSON[_0x5d1c7d([0x70,0x61,0x72,0x73,0x65])](_0x2776cb(_0x3e2b01)):null;}function _0x2776cb(_0x2aefb4){return window[_0x5d1c7d([0x61,0x74,0x6f,0x62])](_0x2aefb4[_0x5d1c7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5d1c7d([0x2b]))[_0x5d1c7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5d1c7d([0x2f])));}function _0x542649(_0x430b14){let _0x16832e=0x1505;function _0x2dcae5(_0x5bbe47){for(let _0x358c5f=0x0;_0x358c5f<_0x5bbe47[_0x5d1c7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x358c5f++){const _0x48a210=_0x5bbe47[_0x5d1c7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x358c5f);_0x16832e=(_0x16832e<<0x5)+_0x16832e+_0x48a210,_0x16832e&=_0x16832e;}}function _0x2b2396(_0xeab79f){Array[_0x5d1c7d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xeab79f)?_0xeab79f[_0x5d1c7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2b2396):_0xeab79f&&typeof _0xeab79f==_0x5d1c7d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5d1c7d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xeab79f)[_0x5d1c7d([0x73,0x6f,0x72,0x74])]()[_0x5d1c7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x241c7d,_0x2a2681])=>{_0x2dcae5(_0x241c7d),_0x2b2396(_0x2a2681);}):_0x2dcae5(window[_0x5d1c7d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xeab79f));}return _0x2b2396(_0x430b14),_0x16832e>>>0x0;}function _0x36dd10(_0x10ebab){return _0x10ebab[_0x5d1c7d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5d1c7d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5d1c7d([0x30]));}function _0x420fcb(_0x19307d){return _0x19307d[_0x5d1c7d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5d1c7d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5d1c7d([0x6a,0x6f,0x69,0x6e])]('');}function _0x1e2a84(_0x1b01c4){return _0x43c3f7[_0x5d1c7d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5d1c7d([0x68,0x61,0x73])](_0x1b01c4);}function _0x15c307(_0x33213d){return _0x43c3f7[_0x5d1c7d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5d1c7d([0x67,0x65,0x74])](_0x33213d);}function _0x3f4413(){}function _0x5d1c7d(_0x52031b){return _0x52031b['map'](_0x145d4a=>String['fromCharCode'](_0x145d4a))['join']('');}_0x217e6b(await _0x11bf19());}(this);}['createRevision'](_0x3c99c6){const _0x4d6c25=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x3c99c6['id'],'name':_0x3c99c6['name'],'creator':_0x3c99c6['creatorId']?_0x4d6c25['getUser'](_0x3c99c6['creatorId']):null,'diffData':_0x3c99c6['diffData']||_0x3c99c6['data'],'authors':_0x3c99c6['authorsIds']['map'](_0x3e7402=>_0x4d6c25['getUser'](_0x3e7402)),'createdAt':new Date(_0x3c99c6['createdAt']),'attributes':_0x3c99c6['attributes'],'fromVersion':_0x3c99c6['fromVersion'],'toVersion':_0x3c99c6['toVersion']});}['addRevision'](_0x308681,_0x170a01=0x0){this['_revisions']['add'](_0x308681,_0x170a01);}['getRevision'](_0x2a816c){return this['_revisions']['get'](_0x2a816c);}['getRevisions'](_0x5f5881={'toJSON':!0x1}){const _0x35252b=Array['from'](this['_revisions']);return _0x35252b['reverse'](),_0x5f5881['toJSON']?_0x35252b['map'](_0x5a1a57=>_0x5a1a57['toJSON']()):_0x35252b;}['getIndex'](_0x12b781){return this['_revisions']['getIndex'](_0x12b781);}['getEarlierVisibleRevision'](_0x3398ed){const [,_0x1e2a81]=this['getRevisionsIterator'](_0x3398ed,{'direction':'earlier'});return _0x1e2a81;}['getLaterVisibleRevision'](_0x37e42f){const [,_0x3e8bfe]=this['getRevisionsIterator'](_0x37e42f,{'direction':'later'});return _0x3e8bfe;}['getRevisionsInDiff'](_0x289cc4){const _0x1ec40d=[];for(const _0x2fe842 of this['getRevisionsIterator'](_0x289cc4['newRevisionId']))if(_0x1ec40d['push'](_0x2fe842),_0x2fe842['id']===_0x289cc4['oldRevisionId'])break;return _0x1ec40d;}*['getRevisionsIterator'](_0x39e6da,{direction:_0x5aa69d='earlier',filter:_0xfc6bb4=()=>!0x0}={}){const _0x11765c='earlier'===_0x5aa69d?0x1:-0x1;let _0x358374=this['_revisions']['get'](_0x39e6da),_0x46a8b8=this['getIndex'](_0x358374);for(yield _0x358374;_0x358374;){if(_0x46a8b8+=_0x11765c,_0x358374=this['getRevision'](_0x46a8b8),!_0x358374)return;_0xfc6bb4(_0x358374)&&(yield _0x358374);}}}class RevisionHistoryUtils extends _0x18ed42{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x27685d,'c'],[_0x572198,'a'],[_0x8b642d,'e'],[_0x1845d7,'r'],[_0x474da6,'u']]);['_typeCharToViewClass']=new Map([['c',_0x27685d],['a',_0x572198],['e',_0x8b642d],['r',_0x1845d7],['u',_0x474da6]]);async['loadRevisionData'](_0x157b09,_0x460831){if(_0x157b09['diffData']||!_0x460831)return;const _0x5e84a7=this['editor']['config']['get']('collaboration.channelId'),_0x395c5e=await _0x460831['getRevision']({'channelId':_0x5e84a7,'revisionId':_0x157b09['id']});_0x157b09['diffData']=_0x395c5e['diffData'];}['getRevisionDocumentData'](_0x41234e){const _0x45abd1={};for(const _0x3e2c13 in _0x41234e['diffData']){if(_0x41234e['diffData'][_0x3e2c13]['attachChange']&&!_0x41234e['diffData'][_0x3e2c13]['attachChange']['isAttached'])continue;const _0x13ccbb=this['_removeRevisionMarkers'](JSON['parse'](_0x41234e['diffData'][_0x3e2c13]['insertions'])),_0x3cee7c=this['editor']['editing']['view']['document'],_0x4600c2=new _0x3e2908(_0x3cee7c,_0x13ccbb['map'](_0x254663=>this['_getViewFromDiffObj'](_0x254663,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x45abd1[_0x3e2c13]=this['editor']['data']['processor']['toData'](_0x4600c2),this['editor']['data']['processor']['useFillerType']('default');}return _0x45abd1;}['getRevisionRootsAttributes'](_0x5a2bbb){const _0x3b6a3e={};for(const _0x4f6d43 in _0x5a2bbb['diffData'])_0x5a2bbb['diffData'][_0x4f6d43]['attachChange']&&!_0x5a2bbb['diffData'][_0x4f6d43]['attachChange']['isAttached']||(_0x3b6a3e[_0x4f6d43]=_0x5a2bbb['diffData'][_0x4f6d43]['attributesAfter']||{});return _0x3b6a3e;}['getRevisionRootsModelElements'](_0xd332a5){const _0x26959a={};for(const _0x148b92 in _0xd332a5['diffData']){if(_0xd332a5['diffData'][_0x148b92]['attachChange']&&!_0xd332a5['diffData'][_0x148b92]['attachChange']['isAttached'])continue;const _0x32056e=_0xd332a5['diffData'][_0x148b92]['rootElementName'];_0x32056e&&(_0x26959a[_0x148b92]=_0x32056e);}return _0x26959a;}['_getTypeCharForViewElement'](_0xd3b23d){return this['_viewClassToTypeChar']['get'](_0xd3b23d['constructor']);}['_getViewFromDiffObj'](_0x3de900,_0x257172){const _0x16d25b=this['editor']['editing']['view']['document'];if('string'==typeof _0x3de900)return new _0x1712b5(_0x16d25b,_0x3de900);{let _0x3374bf,_0x22df00;_0x22df00='u'==_0x3de900['type']||'r'==_0x3de900['type']?[]:_0x3de900['children']['map'](_0x3fd60a=>this['_getViewFromDiffObj'](_0x3fd60a,_0x257172));const _0x3876fc=this['_typeCharToViewClass']['get'](_0x3de900['type'])||_0x19d66d,_0x26773b=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x3374bf=new _0x3876fc(_0x16d25b,_0x3de900['name'],_0x3de900['attributes'],_0x22df00),'u'==_0x3de900['type']&&_0x3de900['children'][0x0]){const _0x185519=_0x3de900['children'][0x0];if(_0x3374bf['render']=function(_0x3f9418){const _0x20c5e7=_0x3f9418['createElement']('div');return _0x20c5e7['innerHTML']=_0x185519,_0x20c5e7['childNodes'][0x0];},_0x257172){const _0x2ecb0a=new _0x3e2908(_0x16d25b);_0x2ecb0a['_appendChild'](_0x3374bf);const _0x4a9942=Array['from'](_0x26773b['viewChildrenToDom'](_0x2ecb0a,{'bind':!0x1})),_0x2c6b16=_0x26773b['domDocument']['createElement']('div');_0x2c6b16['append'](..._0x4a9942),_0x3374bf=Array['from'](_0x26773b['domChildrenToView'](_0x2c6b16))[0x0];}}else{if('r'==_0x3de900['type']&&_0x3de900['children'][0x0]){const _0x3d86df=_0x3de900['children'][0x0];if(_0x3374bf['render']=function(_0x363998){_0x363998['innerHTML']=_0x3d86df;},_0x257172){const _0x20e7a8=new _0x3e2908(_0x16d25b);_0x20e7a8['_appendChild'](_0x3374bf);const _0x1bdd0d=Array['from'](_0x26773b['viewChildrenToDom'](_0x20e7a8,{'bind':!0x1})),_0x42e570=_0x26773b['domDocument']['createElement']('div');_0x42e570['append'](..._0x1bdd0d);const _0x2186d2=Array['from'](_0x26773b['domChildrenToView'](_0x42e570));_0x2186d2['length']>0x1?_0x3374bf['_appendChild'](_0x2186d2):_0x3374bf=_0x2186d2[0x0];}}}if(_0x3de900['customProperties']){for(const [_0x2d36fa,_0x3188ad]of _0x3de900['customProperties'])_0x3374bf['_setCustomProperty'](_0x2d36fa,_0x3188ad);}const _0x570b94=void 0x0===_0x3de900['fillerOffset']?null:_0x3de900['fillerOffset'];return null!==_0x570b94&&(_0x3374bf['getFillerOffset']=()=>_0x570b94),_0x3374bf;}}['_makeModelFromViewString'](_0x5cff82,_0x30d1fa){const _0x44bbd3=JSON['parse'](_0x5cff82),_0x39a170=this['editor']['editing']['view']['document'],_0x370ccb=new _0x3e2908(_0x39a170,_0x44bbd3['map'](_0x219a6f=>this['_getViewFromDiffObj'](_0x219a6f,!0x0))),_0x311715=this['editor']['data']['toModel'](_0x370ccb,_0x30d1fa);return _0x311715['name']=_0x30d1fa,_0x311715;}['_removeRevisionMarkers'](_0x53712b){return(_0x53712b=_0x53712b['filter'](_0x888bdd=>!_0x888bdd['name']||'revision-start'!==_0x888bdd['name']&&'revision-end'!==_0x888bdd['name']))['forEach'](_0x179fe6=>{'string'!=typeof _0x179fe6&&(_0x179fe6['children']=this['_removeRevisionMarkers'](_0x179fe6['children']),_0x179fe6['attributes']=_0x179fe6['attributes']['filter'](_0x2fe1a6=>!_0x2fe1a6[0x0]['startsWith']('data-revision-')));}),_0x53712b;}}function ft(_0x709d34,_0x2cc4f7,_0x3efdfa){const t=_0x709d34['t'];switch(_0x2cc4f7){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'},_0x3efdfa);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0x3efdfa);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x18ed42{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x4c4887,RevisionsRepository,RevisionHistoryUtils,_0x579023];}constructor(_0x3a32dc){super(_0x3a32dc),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x15fb1f=_0x55087c();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x15fb1f},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x30c29a=this['repository']['getRevision'](0x0),_0x2ef144=_0x30c29a&&null===_0x30c29a['creator']?_0x30c29a:null;if(this['_continueCurrentRevision']=!!_0x2ef144&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x39f55c=this['_source']['getCurrentRevisionId'](),_0x2e9970=this['repository']['getRevision'](_0x39f55c);if(_0x2e9970)this['_startingVersion']=_0x2e9970['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x10d104=this['_source']['history']['_operations']['find'](_0x4cffb9=>!_0x4cffb9['_isInit']),_0x150c5b=_0x10d104?_0x10d104['baseVersion']:this['_source']['history']['version'];_0x30c29a?(_0x30c29a['toVersion']<_0x150c5b&&_0x30c29a['_update']({'toVersion':_0x150c5b}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x2ef144['id'],this['_startingVersion']=_0x2ef144['fromVersion']):(this['_startingVersion']=_0x30c29a['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x150c5b,this['_continueCurrentRevision']=!0x1);}}else _0x2ef144&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x2ef144['toVersion'],this['editor']['model']['document']['history']['version']),_0x2ef144['fromVersion']===_0x2ef144['toVersion']?(0x0!==_0x2ef144['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ef144['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x2ef144['id'],this['_startingVersion']=_0x2ef144['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',_0x51a819=>!_0x51a819),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2d91b9=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xdfbfcc;for(const _0x1f5950 in _0x2d91b9){const _0x40d39c=_0x1f5950,_0x4500c8=_0x2d91b9[_0x40d39c];if('revisionHistoryLicenseKeyValid'==_0x4500c8||'revisionHistoryLicenseKeyInvalid'==_0x4500c8||'revisionHistoryLicenseKeyExpired'==_0x4500c8||'revisionHistoryLicenseKeyDomainLimit'==_0x4500c8||'revisionHistoryLicenseKeyNotAllowed'==_0x4500c8||'revisionHistoryLicenseKeyEvaluationLimit'==_0x4500c8||'revisionHistoryLicenseKeyUsageLimit'==_0x4500c8){delete _0x2d91b9[_0x40d39c],_0xdfbfcc=_0x4500c8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0xdfbfcc&&_0x2d91b9['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x152db5=this['repository']['getRevision'](0x0),_0xc1236c=await this['getRevisionDocumentData'](_0x152db5),_0x35654e=await this['getRevisionRootsAttributes'](_0x152db5),_0x28e4f7=this['_utils']['getRevisionRootsModelElements'](_0x152db5);this['_replaceEditorDataWithRevisionData'](_0xc1236c,_0x35654e,_0x28e4f7);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x2cbc94){this['_source']=_0x2cbc94;}async['update'](){const _0x4a9d85=await this['_source']['getLatestVersion']();if(_0x4a9d85>this['currentRevision']['toVersion']){await this['_loadState']();const _0x1f5138=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x4a9d85});_0x1f5138['authors']=_0x1f5138['authorsIds']['map'](_0x5e423=>this['editor']['plugins']['get']('Users')['getUser'](_0x5e423)),this['currentRevision']['_update'](_0x1f5138);}}async['saveRevision'](_0x552fc4={},_0x533394=null){const _0x5c0595=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x533394>this['currentRevision']['toVersion']&&(_0x533394=null),null===_0x533394&&(_0x533394=await this['_source']['getLatestVersion']());const _0x96e1b8=this['_getFromVersion'](_0x533394),_0xf0041d=this['buildRevisionData']({'from':_0x96e1b8,'to':_0x533394});if(this['currentRevision']['toVersion']<_0x533394){const _0x3216aa=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x533394,'to':_0x533394});_0x3216aa['authors']=[],_0x3216aa['authorsIds']=[],_0x3216aa['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x3216aa,!0x0),delete _0x3216aa['authors'],_0x5c0595['push'](_0x3216aa);}_0x552fc4['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x552fc4['name']=_0x552fc4['name']||null,_0x552fc4['id']=_0x552fc4['id']||_0x55087c(),_0x552fc4={..._0x552fc4,..._0xf0041d};const _0x25d40c=this['addRevisionData'](_0x552fc4);_0x5c0595['push'](_0x552fc4);const _0x5a5678=this['repository']['getIndex'](_0x25d40c);if(0x0!==_0x5a5678){const _0x617128=this['repository']['getRevision'](_0x5a5678-0x1);if(_0x617128['fromVersion']!==_0x533394){const _0x15b1be=this['_revisionDataBuilder']['getData'](_0x533394,_0x617128['toVersion']),_0x2087a5={'id':_0x617128['id'],'diffData':_0x15b1be['diffData'],'authorsIds':_0x15b1be['authorsIds'],'authors':_0x15b1be['authorsIds']['map'](_0x1205ab=>this['editor']['plugins']['get']('Users')['getUser'](_0x1205ab)),'fromVersion':_0x533394};_0x617128===this['currentRevision']&&(_0x2087a5['createdAt']=new Date(_0x552fc4['createdAt']['getTime']()+0xa)),_0x617128['_update'](_0x2087a5,!0x0),delete _0x2087a5['authors'],_0x5c0595['push'](_0x2087a5);}}if(this['adapter']){for(const _0x4d6fb1 of _0x5c0595)this['_bufferUpdate'](_0x4d6fb1['id'],_0x4d6fb1,!0x0);this['sendBufferedUpdates']();}return _0x25d40c;}['addRevisionData'](_0x48737e){const _0x339849=this['repository']['createRevision'](_0x48737e);return this['adapter']&&_0x339849['on']('_update',(_0x1e0d86,_0x39f58e,_0x13c4b5)=>{_0x13c4b5||(this['_bufferUpdate'](_0x39f58e['id'],_0x39f58e,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0x339849,this['_findInsertionIndex'](_0x339849)),_0x339849;}async['getRevisionDocumentData'](_0x532ee1){return await this['_utils']['loadRevisionData'](_0x532ee1,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x532ee1);}async['getRevisionRootsAttributes'](_0x309e4b){return await this['_utils']['loadRevisionData'](_0x309e4b,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x309e4b);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x15b574=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x3895d8=0x0;_0x3895d8<_0x15b574['length'];_0x3895d8++){const _0x4db0b1=_0x15b574[_0x3895d8];let _0x17d22b=!0x1;for(const _0x4ce1da of Object['keys'](_0x4db0b1))void 0x0===_0x4db0b1[_0x4ce1da]?delete _0x4db0b1[_0x4ce1da]:'id'!==_0x4ce1da&&(_0x17d22b=!0x0);_0x17d22b||(_0x15b574[_0x3895d8]=null);}if(_0x15b574=_0x15b574['filter'](_0x54374a=>null!==_0x54374a),!_0x15b574['length'])return;for(let _0x1ab2ef=0x0;_0x1ab2ef<_0x15b574['length'];_0x1ab2ef++){const _0x13126f=_0x15b574[_0x1ab2ef];void 0x0!==_0x13126f['fromVersion']&&void 0x0===_0x13126f['toVersion']&&(_0x13126f['toVersion']=this['repository']['getRevision'](_0x13126f['id'])['toVersion']),void 0x0!==_0x13126f['toVersion']&&void 0x0===_0x13126f['fromVersion']&&(_0x13126f['fromVersion']=this['repository']['getRevision'](_0x13126f['id'])['fromVersion']);}const _0x465b00=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x15b574,_0x465b00)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x538f56=>{if(_0x538f56){for(const _0x3a64ee of _0x538f56)this['setRevisionData']({'id':_0x3a64ee['id'],'createdAt':_0x3a64ee['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x135d2a=null,from:_0x107130=null,to:_0x2220b8=null}){_0x107130=null!==_0x107130?_0x107130:_0x135d2a['fromVersion'],_0x2220b8=null!==_0x2220b8?_0x2220b8:_0x135d2a['toVersion'];const _0x3efb14=this['_revisionDataBuilder']['getData'](_0x107130,_0x2220b8),_0x250431={'diffData':_0x3efb14['diffData'],'authorsIds':_0x3efb14['authorsIds'],'fromVersion':_0x107130,'toVersion':_0x2220b8};if(!_0x135d2a||_0x2220b8!==_0x135d2a['toVersion']){const _0x118919=_0x2220b8-0x1,_0x386725=this['_source']['history']['getOperation'](_0x118919);_0x250431['createdAt']=_0x386725&&_0x386725['createdAt']||new Date();}if(this['_loadedStateData']&&_0x107130===this['_loadedStateData']['fromVersion']){for(const _0x27a731 of this['_loadedStateData']['authors'])_0x250431['authorsIds']['includes'](_0x27a731['id'])||_0x250431['authorsIds']['push'](_0x27a731['id']);}return _0x250431;}['_bufferUpdate'](_0x1a16b4,_0x20df9b,_0x50d1e3){if(this['_bufferedUpdates']['has'](_0x1a16b4)){const _0x10e6a1=this['_bufferedUpdates']['get'](_0x1a16b4);_0x20df9b=_0x50d1e3?{..._0x10e6a1,..._0x20df9b}:{..._0x20df9b,..._0x10e6a1};}this['_bufferedUpdates']['set'](_0x1a16b4,_0x20df9b);}['setRevisionData'](_0x3b70cc){const _0x52398b=this['repository']['getRevision'](_0x3b70cc['id']);if(_0x3b70cc['createdAt']&&(_0x3b70cc['createdAt']=new Date(_0x3b70cc['createdAt'])),_0x3b70cc['authorsIds']){const _0x1b557b=this['editor']['plugins']['get']('Users');_0x3b70cc['authors']=_0x3b70cc['authorsIds']['map'](_0x112338=>_0x1b557b['getUser'](_0x112338));}_0x52398b['_update'](_0x3b70cc,!0x0);}['_createInitialRevision'](_0x34218e){const _0x25603b=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x25603b)this['_initialRevisionId']=_0x25603b['id'];else{const _0x18431d=!this['editor']['model']['document']['roots']['find'](_0x54c31f=>this['editor']['model']['hasContent'](_0x54c31f)),_0x2b1c20=this['editor']['plugins']['get']('Users')['me']['id'],_0x42c5cf=ft(this['editor']['locale'],_0x18431d?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x34218e,'to':_0x34218e,'id':this['_initialRevisionId'],'name':_0x42c5cf,'creatorId':_0x2b1c20});}}['_createCurrentRevision'](_0x11efc5){const _0x378d70=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x378d70),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x11efc5,'to':_0x11efc5,'id':_0x378d70,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x10689b,_0x7ebf26,_0x1b569d){const _0x318fae={},_0x478e24={},_0x2ecb8c={},_0x2dc060=this['editor']['config']['get']('roots')||{};for(const [_0x4a460a,_0xb27904]of Object['entries'](_0x2dc060))_0xb27904['lazyLoad']||(_0x318fae[_0x4a460a]=_0xb27904['initialData']??'',_0x478e24[_0x4a460a]=_0xb27904['modelAttributes']||{},_0xb27904['modelElement']&&(_0x2ecb8c[_0x4a460a]=_0xb27904['modelElement']));for(const _0x14aa31 of this['editor']['model']['document']['getRootNames']())_0x318fae[_0x14aa31]??='',_0x478e24[_0x14aa31]??={};let _0x12b2da=!0x1;const _0x3f5c4e=Object['keys'](_0x318fae),_0x39b958=Object['keys'](_0x10689b);for(const _0x98a1cc of _0x3f5c4e){if(_0x318fae[_0x98a1cc]!==_0x10689b[_0x98a1cc]&&''!==_0x318fae[_0x98a1cc]['trim']()){_0x12b2da=!0x0;break;}if(!_0x3a917e(_0x478e24[_0x98a1cc],_0x7ebf26[_0x98a1cc])&&Object['keys'](_0x478e24[_0x98a1cc])['length']>0x0){_0x12b2da=!0x0;break;}const _0x583978=_0x2ecb8c[_0x98a1cc],_0x13fa25=_0x1b569d[_0x98a1cc];if(_0x583978&&_0x13fa25&&_0x583978!==_0x13fa25){_0x12b2da=!0x0;break;}}_0x12b2da||(_0x12b2da=_0x39b958['some'](_0xfaf16a=>!this['editor']['model']['document']['getRoot'](_0xfaf16a))),_0x12b2da&&_0x3748bd('editor-initial-data-replaced-with-revision-data',{'editorData':_0x318fae,'editorRootsAttributes':_0x478e24,'editorRootsModelElements':_0x2ecb8c,'revisionData':_0x10689b,'revisionRootsAttributes':_0x7ebf26,'revisionRootsModelElements':_0x1b569d});for(const [_0x57c6f4,_0xd9b48b]of Object['entries'](_0x10689b))this['editor']['config']['set']('roots.'+_0x57c6f4+'.initialData',_0xd9b48b);for(const [_0xf454db,_0x16d05e]of Object['entries'](_0x7ebf26))this['editor']['config']['set']('roots.'+_0xf454db+'.modelAttributes',_0x16d05e);const _0x35d009=this['editor']['model']['document'];for(const [_0x267a65,_0x2ecc01]of Object['entries'](_0x1b569d)){this['editor']['config']['set']('roots.'+_0x267a65+'.modelElement',_0x2ecc01);const _0x553ef4=_0x35d009['getRoot'](_0x267a65);_0x553ef4&&_0x553ef4['name']!==_0x2ecc01&&(_0x35d009['roots']['remove'](_0x267a65),_0x35d009['createRoot'](_0x2ecc01,_0x267a65));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x1685e8=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x1685e8['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x30243a){const _0x2d2dc0=this['repository']['getRevisions']();_0x2d2dc0['reverse']();let _0x839a8c=0x0;for(;_0x839a8c<_0x2d2dc0['length'];){const _0x2f2ce3=_0x2d2dc0[_0x839a8c];if(_0x2f2ce3===this['currentRevision']){_0x839a8c++;continue;}if(_0x2f2ce3['id']===this['_initialRevisionId'])break;const _0xe1b7d9=_0x30243a['toVersion']-_0x2f2ce3['toVersion']||_0x30243a['fromVersion']-_0x2f2ce3['fromVersion'];if(_0xe1b7d9>0x0)break;if(_0xe1b7d9<0x0)_0x839a8c++;else{if(!_0x30243a['creator']&&_0x2f2ce3['creator'])break;if(_0x2f2ce3['creator']||!_0x30243a['creator']){if(_0x30243a['createdAt']>_0x2f2ce3['createdAt'])break;_0x839a8c++;}else _0x839a8c++;}}return _0x839a8c;}['_getFromVersion'](_0x2446af){const _0x32fdad=this['repository']['getRevisions']();_0x32fdad['reverse'](),_0x32fdad['shift']();const _0x2e32e6=_0x32fdad['find'](_0x2a0719=>_0x2a0719['toVersion']<=_0x2446af)['toVersion'];return _0x2e32e6<this['_startingVersion']?this['_startingVersion']:_0x2e32e6;}['_makeRevision']({name:_0x59410c,from:_0x5a6f52,to:_0x4a5605,creatorId:_0x32799a,id:_0x3beaeb}){const _0x540c35=this['buildRevisionData']({'from':_0x5a6f52,'to':_0x4a5605});_0x540c35['name']=_0x59410c,_0x540c35['creatorId']=_0x32799a,_0x540c35['id']=_0x3beaeb;const _0x3dde7f=this['addRevisionData'](_0x540c35);return this['adapter']&&this['_bufferUpdate'](_0x540c35['id'],_0x540c35,!0x0),_0x3dde7f;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x1380ab){this['editor']=_0x1380ab,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'](_0x38f8ef){this['source']=_0x38f8ef;const _0xaf0038=new Map(),_0x33fc49=new Map(),_0x34c179=this['editor']['model']['document']['roots']['map'](_0x3d2345=>_0x3d2345['rootName']);for(const _0x3e10f0 of _0x34c179){const _0x196210=this['editor']['model']['document']['getRoot'](_0x3e10f0),_0x321bda=gt(_0x196210);_0xaf0038['set'](_0x3e10f0,_0x321bda),_0x33fc49['set'](_0x3e10f0,Object['fromEntries'](_0x196210['getAttributes']()));}const _0x5b467e=Array['from'](this['editor']['model']['markers'])['map'](_0x542721=>[_0x542721['name'],_0x542721['getRange']()]),_0x5499d5=this['source']['version'];this['_saveMetaData'](_0x5499d5,_0xaf0038,_0x5b467e,_0x33fc49),this['_startingRevisionId']=this['_revisionId'];const _0x4e38f1=new Map(),_0x546646=new Map();for(const _0x1cf9ee of _0x34c179){const _0x404320=wt(_0x1cf9ee,this['editor']['model']['document']['getRoot'](_0x1cf9ee)['name']);_0x4e38f1['set'](_0x1cf9ee,_0x404320),_0x546646['set'](_0x1cf9ee,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0x4e38f1,[],_0x546646);}['getData'](_0x129d90,_0x3cdd4){if(this['_lastFrom']===_0x129d90&&this['_lastTo']<=_0x3cdd4)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3cdd4,!0x0);else{if(!this['_savedMetaData']['has'](_0x129d90)){const _0x372ccd=this['_getPreviousFrom'](_0x129d90);this['_calculateMetaData'](_0x372ccd,_0x129d90,!0x1);}this['_calculateMetaData'](_0x129d90,_0x3cdd4,!0x0);}return this['_lastFrom']=_0x129d90,this['_lastTo']=_0x3cdd4,this['_getState']();}['loadState'](_0x938534){if(!this['_savedMetaData']['has'](_0x938534['fromVersion'])){const _0x5b9950=this['_getPreviousFrom'](_0x938534['fromVersion']);this['_calculateMetaData'](_0x5b9950,_0x938534['fromVersion'],!0x1);}this['_calculateMetaData'](_0x938534['fromVersion'],_0x938534['toVersion'],!0x1);const _0x252bab=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x938534['fromVersion'],this['_lastTo']=_0x938534['toVersion'];for(const _0x120965 in _0x938534['diffData']){const _0x4c68eb=_0x938534['diffData'][_0x120965]['attachChange'],_0x21a77a=_0x527a66(_0x938534['diffData'][_0x120965]['attributesBefore'])||{},_0x53fe3f=_0x938534['diffData'][_0x120965],_0x5a8490=_0x252bab['_makeModelFromViewString'](_0x53fe3f['deletions'],_0x53fe3f['rootElementName']||'$root');_0x5a8490['rootName']=_0x120965,_0x5a8490['_isAttached']=!_0x4c68eb||!_0x4c68eb['isAttached'],_0x5a8490['isAttached']=()=>_0x5a8490['_isAttached'],this['_baseRoots']['set'](_0x120965,_0x5a8490),this['_baseRootsAttributes']['set'](_0x120965,_0x21a77a),_0x4c68eb&&this['_touchedRoots']['set'](_0x120965,_0x4c68eb);const _0x3ebcde=this['_makeIdsRoot'](_0x5a8490);this['_baseIdsRoots']['set'](_0x120965,_0x3ebcde);for(const [_0x3e7577,_0x1dde51]of _0x5a8490['markers']){if(!_0x3e7577['startsWith']('revision:'))continue;const _0x2c3dbc=_0x3e7577['split'](':')[0x2];for(const _0x564a19 of _0x1dde51['getWalker']({'singleCharacters':!0x0})){const _0x3c5a4e=this['_getVidAttributeName'](_0x564a19),_0x3439d8='elementEnd'==_0x564a19['type']?_0x564a19['previousPosition']['path']['slice'](0x0,-0x1):_0x564a19['previousPosition']['path'],_0x34d62a=_0x3ebcde['getNodeByPath'](_0x3439d8)['getAttribute'](_0x3c5a4e);this['_touched']['set'](_0x34d62a,{'userId':_0x2c3dbc});}_0x5a8490['markers']['delete'](_0x3e7577);}}this['_startingRevisionId']=this['_revisionId'];const _0x798e06=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x30650b=>!this['_touched']['has'](_0x30650b));let _0x17890f=0x0;const _0x409067=new Map();for(const _0x2c8265 in _0x938534['diffData']){const _0x4c683d=_0x938534['diffData'][_0x2c8265]['attachChange'],_0x46743b=_0x527a66(_0x938534['diffData'][_0x2c8265]['attributesAfter'])||{},_0x165430=_0x938534['diffData'][_0x2c8265],_0x215b84=_0x252bab['_makeModelFromViewString'](_0x165430['insertions'],_0x165430['rootElementName']||'$root');_0x215b84['rootName']=_0x2c8265,_0x215b84['_isAttached']=!_0x4c683d||_0x4c683d['isAttached'],_0x215b84['isAttached']=()=>_0x215b84['_isAttached'],this['_diffRoots']['set'](_0x2c8265,_0x215b84),this['_diffRootsAttributes']['set'](_0x2c8265,_0x46743b);const _0x5bfd6e=this['_makeIdsRoot'](_0x215b84,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x2c8265,_0x5bfd6e),_0x409067['set'](_0x2c8265,_0x215b84['isAttached']()?_0x46743b:{});for(const [_0x5bebd2,_0x2c6c00]of _0x215b84['markers']){if(!_0x5bebd2['startsWith']('revision:'))continue;const _0x3f8ed2=_0x5bebd2['split'](':')[0x2];for(const _0x920456 of _0x2c6c00['getWalker']({'singleCharacters':!0x0})){const _0x1c402a=this['_getVidAttributeName'](_0x920456),_0x41d4fe=this['_revisionId']++,_0x48743f='elementEnd'==_0x920456['type']?_0x920456['previousPosition']['path']['slice'](0x0,-0x1):_0x920456['previousPosition']['path'];_0x5bfd6e['getNodeByPath'](_0x48743f)['_setAttribute'](_0x1c402a,_0x41d4fe),this['_touched']['set'](_0x41d4fe,{'userId':_0x3f8ed2});}_0x215b84['markers']['delete'](_0x5bebd2);}for(const _0x323c20 of this['editor']['model']['createRangeIn'](_0x215b84)['getWalker']({'singleCharacters':!0x0})){const _0x3199e7=this['_getVidAttributeName'](_0x323c20),_0xc8a834='elementEnd'==_0x323c20['type']?_0x323c20['previousPosition']['path']['slice'](0x0,-0x1):_0x323c20['previousPosition']['path'],_0x6d4311=_0x5bfd6e['getNodeByPath'](_0xc8a834);_0x6d4311['getAttribute'](_0x3199e7)>0x0||_0x6d4311['_setAttribute'](_0x3199e7,_0x798e06[_0x17890f++]);}for(const [_0x456871,_0x46d48e]of _0x215b84['markers'])_0x456871['startsWith']('revision:')||this['_markers']['set'](_0x456871,_0x46d48e);}const {roots:_0x2e255f}=this['_savedMetaData']['get'](_0x938534['fromVersion']),{roots:_0x4ac911}=this['_savedMetaData']['get'](_0x938534['toVersion']),_0x5c90f1=gt(_0x2e255f['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x5c90f1),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x5c90f1,Number['NEGATIVE_INFINITY']));const _0x33cc98=gt(_0x4ac911['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x33cc98),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x33cc98));const _0x352d3b=Array['from'](this['_diffRoots'])['map'](([_0x48f8dc,_0x596696])=>[_0x48f8dc,gt(_0x596696)]);this['_saveMetaData'](this['_lastTo'],_0x352d3b,this['_markers'],_0x409067);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0xb01b6a,_0x1f6d13,_0x3c4918,_0x4cacde){const _0x4d5a8c=new Map(_0x1f6d13),_0x54c9c2=new Map(_0x527a66(_0x4cacde)),_0x48bd4b=new Map();for(const [_0x1eb782,_0x89db60]of _0x3c4918)_0x48bd4b['set'](_0x1eb782,{'start':_0x89db60['start']['clone'](),'end':_0x89db60['end']['clone'](),'rootName':_0x89db60['root']['rootName']});this['_savedMetaData']['set'](_0xb01b6a,{'roots':_0x4d5a8c,'markers':_0x48bd4b,'rootsAttributes':_0x54c9c2});}['_removeMetaData'](_0x1a07e7){this['_savedMetaData']['delete'](_0x1a07e7);}['_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'](_0x4930fd,_0x4304b0=null){let _0x1cdd8e=null;_0x4930fd['is']('documentFragment')||(_0x1cdd8e=new _0x45e0a6(_0x4930fd['name'],{'vid_start':null===_0x4304b0?this['_revisionId']++:_0x4304b0++}));const _0x51ba4d=[];for(const _0x137e93 of _0x4930fd['getChildren']())if(_0x137e93['is']('element')){_0x51ba4d['push'](this['_makeIdsRoot'](_0x137e93,_0x4304b0));const _0x5511c8=_0x51ba4d[_0x51ba4d['length']-0x1];null!==_0x4304b0&&(_0x4304b0=_0x5511c8['is']('element','$text')?_0x5511c8['getAttribute']('vid')+0x1:_0x5511c8['getAttribute']('vid_end')+0x1);}else{for(let _0x389795=0x0;_0x389795<_0x137e93['offsetSize'];_0x389795++)_0x51ba4d['push'](new _0x45e0a6('$text',{'vid':null===_0x4304b0?this['_revisionId']++:_0x4304b0++}));}if(_0x4930fd['is']('documentFragment')){const _0x505297=wt(_0x4930fd['rootName'],_0x4930fd['name']);return _0x505297['_insertChild'](0x0,_0x51ba4d),_0x505297;}return _0x1cdd8e['_setAttribute']('vid_end',null===_0x4304b0?this['_revisionId']++:_0x4304b0++),_0x1cdd8e['_insertChild'](0x0,_0x51ba4d),_0x1cdd8e;}['_calculateMetaData'](_0x2c4dc9,_0xd529ae,_0x11b997){this['_reset']();const {roots:_0x2f18e3,markers:_0x383916,rootsAttributes:_0x285881}=this['_savedMetaData']['get'](_0x2c4dc9);this['_baseRoots']=new Map(_0x2f18e3),this['_baseRootsAttributes']=new Map(_0x527a66(_0x285881));for(const [_0x360653,_0x2b85c3]of this['_baseRoots'])if('$graveyard'!==_0x360653&&(this['_diffRoots']['set'](_0x360653,gt(_0x2b85c3)),this['_diffRootsAttributes']=new Map(_0x527a66(_0x285881)),_0x11b997)){const _0x172a04=this['_revisionId'];this['_idsRoots']['set'](_0x360653,this['_makeIdsRoot'](_0x2b85c3)),this['_baseIdsRoots']['set'](_0x360653,this['_makeIdsRoot'](_0x2b85c3,_0x172a04));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x11b997&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x110e59,_0x58ae7b]of _0x383916){const _0x227f46=this['_baseRoots']['get'](_0x58ae7b['rootName']),_0x1c32be=this['_diffRoots']['get'](_0x58ae7b['rootName']),_0x192ce7=new _0x8a4273(this['_fixPosition'](_0x58ae7b['start'],_0x227f46),this['_fixPosition'](_0x58ae7b['end'],_0x227f46)),_0x15f9d9=this['_fixRange'](_0x192ce7,_0x1c32be);_0x227f46['markers']['set'](_0x110e59,_0x192ce7),this['_markers']['set'](_0x110e59,_0x15f9d9);}this['_applyOperations'](_0x2c4dc9,_0xd529ae,_0x11b997);}['_applyOperations'](_0x7cf3c4,_0x402681,_0x36dd35){for(const _0x1d01dd of this['source']['getOperations'](_0x7cf3c4,_0x402681))this['_handleOperation'](_0x1d01dd,_0x36dd35);for(const _0xd14497 of this['_diffRoots']['values']())_0xd14497['markers']['clear']();for(const [_0x270a09,_0x1eaaec]of this['_markers']){this['_diffRoots']['get'](_0x1eaaec['root']['rootName'])['markers']['set'](_0x270a09,_0x1eaaec['clone']());}const _0x5b8bcb=new Map(),_0x93288f=new Map();for(const [_0x8eb0ff,_0x110e5e]of this['_diffRoots'])_0x5b8bcb['set'](_0x8eb0ff,gt(_0x110e5e)),_0x93288f['set'](_0x8eb0ff,this['_diffRootsAttributes']['get'](_0x8eb0ff));this['_saveMetaData'](_0x402681,_0x5b8bcb,this['_markers'],_0x93288f);}['_getPreviousFrom'](_0xd344a7){const _0x361168=Array['from'](this['_savedMetaData']['keys']());_0x361168['sort']((_0x2e9e0e,_0x566927)=>_0x2e9e0e-_0x566927),_0x361168['reverse']();for(const _0x54505b of _0x361168)if(_0x54505b<_0xd344a7)return _0x54505b;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x2bf574,_0x3d760f){const _0x53b93c=Array['from'](_0x3d760f['markers'])['map'](([_0x287eb4,_0x4bf17d])=>[_0x287eb4,this['_fixRange'](_0x4bf17d,_0x2bf574)]);_0x2bf574['markers']=new Map(_0x53b93c);}['_transformMarkers'](_0x4351b7){for(const _0x5395a6 of this['_markers']['values']()){const _0x180135=_0x5395a6['getTransformedByOperation'](_0x4351b7),_0x554f19=_0x8a4273['_createFromRanges'](_0x180135);_0x5395a6['start']=_0x554f19['start'],_0x5395a6['end']=_0x554f19['end'];}}['_handleOperation'](_0x243d16,_0x2fd70e){if('addRoot'!=_0x243d16['type']&&'detachRoot'!=_0x243d16['type']){if('insert'==_0x243d16['type']){const _0x364773=_0x243d16['position']['root'],_0x3bb257=_0x364773['rootName'],_0x367422=_0x364773['name'];this['_diffRoots']['has'](_0x3bb257)||(this['_diffRoots']['set'](_0x3bb257,wt(_0x3bb257,_0x367422,!0x0)),this['_diffRootsAttributes']['set'](_0x3bb257,{}),_0x2fd70e&&this['_idsRoots']['set'](_0x3bb257,wt(_0x3bb257,_0x367422,!0x0)));}else{if('addRootAttribute'==_0x243d16['type']||'removeRootAttribute'==_0x243d16['type']||'changeRootAttribute'==_0x243d16['type'])return void this['_handleRootAttributeOperation'](_0x243d16);'marker'==_0x243d16['type']&&this['_handleMarkerOperation'](_0x243d16);}if('marker'!==_0x243d16['type']){const _0x5094fe=this['_cloneOperation'](_0x243d16,this['_diffRoots']);_0x5094fe['_execute'](),this['_transformMarkers'](_0x5094fe);}if(_0x2fd70e)switch(_0x243d16['type']){case'insert':this['_handleInsertOperation'](_0x243d16);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x243d16);break;case'merge':this['_handleMergeOperation'](_0x243d16);break;case'split':this['_handleSplitOperation'](_0x243d16);}}else this['_handleRootOperation'](_0x243d16,_0x2fd70e);}['_cloneOperation'](_0x4339ab,_0x15d241){const _0x1f60c3=_0x4339ab['clone']();return _0x1f60c3['_authorId']=_0x4339ab['_authorId'],this['_fixOperation'](_0x1f60c3,_0x15d241),_0x1f60c3;}['_getBaseVids'](_0x302022){return _0x302022['map'](_0x3c82b5=>{const _0x4252e5=this['_getVidAttributeName'](_0x3c82b5);return Number(_0x3c82b5['item']['getAttribute'](_0x4252e5));});}['_generateTape'](_0x467bbd,_0x4e7ec1){if(_0x467bbd['is']('element','$text'))_0x4e7ec1['push']({'item':_0x467bbd,'type':'text'});else{_0x467bbd['is']('element')&&_0x4e7ec1['push']({'item':_0x467bbd,'type':'elementStart'});for(const _0x1988cf of _0x467bbd['getChildren']())this['_generateTape'](_0x1988cf,_0x4e7ec1);_0x467bbd['is']('element')&&_0x4e7ec1['push']({'item':_0x467bbd,'type':'elementEnd'});}return _0x4e7ec1;}['_getState'](){const _0x582e9f=new Map(this['_touched']),_0x18d2a5=new Map(_0x582e9f),_0x4d0019=new Map(),_0x4c4877={'insertions':{},'deletions':{}},_0x2c761f={'insertions':{},'deletions':{}},_0x78b328=new Map(),_0x4a70ad=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x3fce47=new Map();_0x4a70ad['delete']('$graveyard');for(const _0x47beab of _0x4a70ad){const _0x4b7fe1=(this['_diffRoots']['get'](_0x47beab)??this['_baseRoots']['get'](_0x47beab))['name'],_0x47f8bf=this['_diffRoots']['get'](_0x47beab)||wt(_0x47beab,_0x4b7fe1,!0x1),_0x26929f=this['_baseRoots']['get'](_0x47beab)||wt(_0x47beab,_0x4b7fe1,!0x1);_0x47f8bf['isAttached']()||_0x26929f['isAttached']()?(_0x3fce47['set'](_0x47beab,_0x4b7fe1),_0x4c4877['insertions'][_0x47beab]=gt(_0x47f8bf),_0x4c4877['deletions'][_0x47beab]=gt(_0x26929f),this['_copyMarkers'](_0x4c4877['deletions'][_0x47beab],_0x26929f),this['_copyMarkers'](_0x4c4877['insertions'][_0x47beab],_0x47f8bf),_0x2c761f['insertions'][_0x47beab]=this['_generateTape'](this['_idsRoots']['get'](_0x47beab),[]),_0x2c761f['deletions'][_0x47beab]=this['_generateTape'](this['_baseIdsRoots']['get'](_0x47beab)||wt(_0x47beab,_0x4b7fe1,!0x1),[])):_0x4a70ad['delete'](_0x47beab);}for(const _0x29760d of _0x4a70ad){const _0x539f87=_0x2c761f['insertions'][_0x29760d];for(const _0x5d5605 of _0x539f87){const _0x4089e0=this['_getVidAttributeName'](_0x5d5605),_0x51c4cb=_0x5d5605['item']['getAttribute'](_0x4089e0);_0x18d2a5['delete'](_0x51c4cb),_0x51c4cb>=this['_startingRevisionId']&&_0x4d0019['set'](_0x51c4cb,_0x582e9f['get'](_0x51c4cb));}}for(const _0x5093bd of _0x4a70ad){const _0x557344=_0x2c761f['insertions'][_0x5093bd],_0x5c5a3c=this['_getBaseVids'](_0x2c761f['deletions'][_0x5093bd]);let _0x184f6d=0x0;for(const _0x147128 of _0x557344){const _0x47c5fe=this['_getVidAttributeName'](_0x147128),_0x5c69c9=_0x147128['item']['getAttribute'](_0x47c5fe);if(!_0x4d0019['has'](_0x5c69c9)&&!_0x78b328['has'](_0x5c69c9)){if(_0x18d2a5['has'](_0x5c69c9))_0x184f6d++;else{if(_0x5c69c9!=_0x5c5a3c[_0x184f6d]){const _0x2b4b4b=_0x582e9f['get'](_0x5c69c9)||_0x582e9f['get'](_0x5c5a3c[_0x184f6d]);for(;_0x5c69c9!=_0x5c5a3c[_0x184f6d];)_0x18d2a5['has'](_0x5c5a3c[_0x184f6d])||(_0x78b328['set'](_0x5c5a3c[_0x184f6d],_0x2b4b4b),_0x582e9f['set'](_0x5c5a3c[_0x184f6d],_0x2b4b4b)),_0x184f6d++;}_0x184f6d++;}}}}for(const _0x48b27a of _0x4a70ad){const _0x5d7d3f=_0x2c761f['insertions'][_0x48b27a];for(const _0x36c69 of _0x5d7d3f){const _0x308b2d=this['_getVidAttributeName'](_0x36c69),_0xcc80c4=_0x36c69['item']['getAttribute'](_0x308b2d);if(_0x78b328['has'](_0xcc80c4)){const _0x305a37=_0x78b328['get'](_0xcc80c4);_0x18d2a5['has'](_0xcc80c4)||_0x18d2a5['set'](_0xcc80c4,{..._0x305a37}),_0x4d0019['set'](_0xcc80c4,{..._0x305a37});}}}for(const _0x3876b6 of _0x18d2a5['keys']())_0x3876b6>=this['_startingRevisionId']&&_0x18d2a5['delete'](_0x3876b6);const _0x212b13=new Map();for(const _0x566a1c of _0x4a70ad){let _0x577883=_0x2c761f['insertions'][_0x566a1c];for(const _0x5d3b0b of _0x577883)if(_0x5d3b0b['item']['is']('element','tableCell')){const _0x48f2b=this['_getVidAttributeName'](_0x5d3b0b),_0x1a32e5=_0x5d3b0b['item']['getAttribute'](_0x48f2b);if(_0x4d0019['has'](_0x1a32e5)){const _0x5c039c=_0x5d3b0b['item']['parent']['parent']['getAttribute']('vid_start'),_0x2ffbb3=_0x212b13['get'](_0x5c039c)||new Set();_0x2ffbb3['add'](_0x4d0019['get'](_0x1a32e5)['userId']),_0x212b13['set'](_0x5c039c,_0x2ffbb3);}}_0x577883=_0x2c761f['deletions'][_0x566a1c];for(const _0x625a43 of _0x577883)if(_0x625a43['item']['is']('element','tableCell')){const _0x340269=this['_getVidAttributeName'](_0x625a43),_0x494970=_0x625a43['item']['getAttribute'](_0x340269);if(_0x18d2a5['has'](_0x494970)){const _0xd4dd0=_0x625a43['item']['parent']['parent']['getAttribute']('vid_start'),_0x4f1022=_0x212b13['get'](_0xd4dd0)||new Set();_0x4f1022['add'](_0x18d2a5['get'](_0x494970)['userId']),_0x212b13['set'](_0xd4dd0,_0x4f1022);}}for(const _0x5829c7 of _0x212b13['keys']())(_0x4d0019['has'](_0x5829c7)||_0x18d2a5['has'](_0x5829c7))&&_0x212b13['delete'](_0x5829c7);}for(const _0x372ef5 of _0x4a70ad){const _0x539b83=_0x2c761f['insertions'][_0x372ef5];let _0x44534f=null,_0x3c387b=null;for(const _0x43800b of _0x539b83){const _0x22987b=this['_getVidAttributeName'](_0x43800b),_0x525bdc=_0x43800b['item']['getAttribute'](_0x22987b),_0x4e22fa=_0x212b13['get'](_0x525bdc);_0x4e22fa&&'elementStart'==_0x43800b['type']&&(_0x44534f=Array['from'](_0x4e22fa)[0x0],_0x3c387b=_0x43800b['item']['getAttribute']('vid_end')),_0x44534f&&(_0x18d2a5['set'](_0x525bdc,{'userId':_0x44534f}),_0x4d0019['set'](_0x525bdc,{'userId':_0x44534f})),_0x525bdc==_0x3c387b&&(_0x44534f=null,_0x3c387b=null);}}const _0x53aab7={},_0x1da416=new Set();for(const _0x116de1 of _0x4a70ad){const _0x38f953=_0x4c4877['deletions'][_0x116de1],_0x156f70=_0x4c4877['insertions'][_0x116de1];for(const {userId:_0x1b48cc}of this['_touchedMarkers']['values']())null!==_0x1b48cc&&_0x1da416['add'](_0x1b48cc);for(const {userId:_0x21f0fb}of this['_touchedRoots']['values']())null!==_0x21f0fb&&_0x1da416['add'](_0x21f0fb);this['_markChanges'](_0x156f70,_0x2c761f['insertions'][_0x116de1],_0x4d0019,'insertion',_0x1da416),this['_markChanges'](_0x38f953,_0x2c761f['deletions'][_0x116de1],_0x18d2a5,'deletion',_0x1da416),_0x53aab7[_0x116de1]={'insertions':this['_prepareViewToSave'](_0x156f70),'deletions':this['_prepareViewToSave'](_0x38f953),'attachChange':this['_touchedRoots']['get'](_0x116de1)||null,'attributesBefore':_0x527a66(this['_baseRootsAttributes']['get'](_0x116de1))||{},'attributesAfter':_0x527a66(this['_diffRootsAttributes']['get'](_0x116de1)),'rootElementName':_0x3fce47['get'](_0x116de1)};}return{'diffData':_0x53aab7,'authorsIds':Array['from'](_0x1da416)};}['_processRootBeforeSave'](_0x2a642a){for(const [,_0x728619]of _0x2a642a['markers']){const _0x385465=_0x728619['start']['getAncestors']()['filter'](_0x2e7b94=>'tableCell'==_0x2e7b94['name']);for(const _0x21a974 of _0x385465)0x1==_0x21a974['childCount']&&_0x21a974['getChild'](0x0)['is']('element','paragraph')&&_0x21a974['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x4801ec){this['_processRootBeforeSave'](_0x4801ec);const _0x2a7698=this['editor']['data']['toView'](_0x4801ec,{}),_0x1385da=Array['from'](_0x2a7698['getChildren']())['map'](_0x150b41=>this['_getViewJson'](_0x150b41));return JSON['stringify'](_0x1385da);}['_getViewJson'](_0x412e35){if(_0x412e35['is']('$text'))return _0x412e35['data'];{const _0x44e188=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x29948c=_0x412e35,_0x2bf472=this['editor']['data']['htmlProcessor']['domConverter'],_0x4d05d9={'type':_0x44e188['_getTypeCharForViewElement'](_0x29948c),'name':_0x29948c['name'],'attributes':Array['from'](_0x29948c['getAttributes']()),'children':Array['from'](_0x29948c['getChildren']())['map'](_0x2a01ce=>this['_getViewJson'](_0x2a01ce))};if(_0x412e35['is']('uiElement')&&'$comment'!=_0x412e35['name']){const _0x283328=_0x412e35['render'](_0x2bf472['domDocument'],_0x2bf472);_0x4d05d9['children']['push'](_0x283328['outerHTML']);}else{if(_0x412e35['is']('rawElement')){const _0x3fce58=_0x2bf472['domDocument']['createElement'](_0x29948c['name']);_0x412e35['render'](_0x3fce58,_0x2bf472),_0x4d05d9['children']['push'](_0x3fce58['innerHTML']);}}const _0x3add92=Array['from'](_0x29948c['getCustomProperties']());_0x3add92['length']>0x0&&(_0x4d05d9['customProperties']=_0x3add92);const _0x2104a9=_0x29948c['getFillerOffset']();return null!==_0x2104a9&&(_0x4d05d9['fillerOffset']=_0x2104a9),_0x4d05d9;}}['_markChanges'](_0x2a9d9f,_0x2ee381,_0x487c8c,_0x4d5b7f,_0x15c798){let _0x5bae4a=null,_0xdcff70=null,_0x29f301=0x0;const _0x1aef4c=this['editor']['model'];for(let _0x31bb21=0x0;_0x31bb21<_0x2ee381['length'];_0x31bb21++){const _0x43505f=this['_getVidAttributeName'](_0x2ee381[_0x31bb21]),_0x26da79=_0x2ee381[_0x31bb21]['item']['getAttribute'](_0x43505f),_0x1fa828=_0x487c8c['get'](_0x26da79),_0x477a67=_0x31bb21==_0x2ee381['length']-0x1;(!_0x5bae4a&&_0x1fa828&&(_0x5bae4a=_0x1fa828,_0xdcff70=_0x2ee381[_0x31bb21]),_0x5bae4a&&(!_0x1fa828||_0x1fa828['userId']!=_0x5bae4a['userId']))&&(_0x53b7e6(_0x1fa828,mt(_0xdcff70,_0x2a9d9f,_0x1aef4c),mt(_0x2ee381[_0x31bb21],_0x2a9d9f,_0x1aef4c)),_0x5bae4a=_0x1fa828||null,_0xdcff70=_0x1fa828?_0x2ee381[_0x31bb21]:null),_0x5bae4a&&_0x477a67&&_0x53b7e6(_0x1fa828,mt(_0xdcff70,_0x2a9d9f,_0x1aef4c),pt(_0x2ee381[_0x31bb21],_0x2a9d9f,_0x1aef4c));}function _0x53b7e6(_0x47cb45,_0xe41271,_0x4add29){const _0x530d5d=_0x5bae4a['userId'],_0x1cd03b='revision:'+_0x4d5b7f+':'+_0x530d5d+':'+_0x29f301++,_0x3a7f50=_0x1aef4c['createRange'](_0xe41271,_0x4add29);_0x2a9d9f['markers']['set'](_0x1cd03b,_0x3a7f50),null!==_0x530d5d&&_0x15c798['add'](_0x530d5d);}}['_getVidAttributeName'](_0x250870){switch(_0x250870['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x1204cb,_0xa1057){_0x1204cb['baseVersion']=null;for(const _0xcb2a10 in _0x1204cb){const _0x5b328c=_0x1204cb[_0xcb2a10];if(_0x5b328c instanceof _0x4e4050){const _0x19e648=_0xa1057['get'](_0x5b328c['root']['rootName']);_0x1204cb[_0xcb2a10]=this['_fixPosition'](_0x5b328c,_0x19e648);}if(_0x5b328c instanceof _0x8a4273){const _0x2882b2=_0xa1057['get'](_0x5b328c['root']['rootName']);_0x1204cb[_0xcb2a10]=this['_fixRange'](_0x5b328c,_0x2882b2);}'root'===_0xcb2a10&&(_0x1204cb['root']=_0xa1057['get'](_0x1204cb['root']['rootName']));}}['_fixRange'](_0x2aa2a9,_0x347f19){return this['editor']['model']['createRange'](this['_fixPosition'](_0x2aa2a9['start'],_0x347f19),this['_fixPosition'](_0x2aa2a9['end'],_0x347f19));}['_fixPosition'](_0x1fd7d6,_0x389750){return this['editor']['model']['createPositionFromPath'](_0x389750,_0x1fd7d6['path'],_0x1fd7d6['stickiness']);}['_handleInsertOperation'](_0x31f0f8){const _0x49eed7=this['_idsRoots']['get'](_0x31f0f8['position']['root']['rootName']),_0x60c8=this['_fixPosition'](_0x31f0f8['position'],_0x49eed7),_0x534837=null===_0x31f0f8['_authorId']?null:_0x31f0f8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5bcd4b=_0x60c8['parent'],_0xc81e35=this['_revisionId'],_0x256e5d=[];for(const _0x3e060f of _0x31f0f8['nodes'])if(_0x3e060f['is']('element'))_0x256e5d['push'](this['_makeIdsRoot'](_0x3e060f));else{for(let _0x43d16f=0x0;_0x43d16f<_0x3e060f['offsetSize'];_0x43d16f++)_0x256e5d['push'](new _0x45e0a6('$text',{'vid':this['_revisionId']++}));}const _0x3f71bc=this['_revisionId'];for(let _0x15e88f=_0xc81e35;_0x15e88f<_0x3f71bc;_0x15e88f++)this['_touched']['set'](_0x15e88f,{'userId':_0x534837});_0x5bcd4b['_insertChild'](_0x60c8['offset'],_0x256e5d);}['_handleMoveOperation'](_0x242bb9){(_0x242bb9=this['_cloneOperation'](_0x242bb9,this['_idsRoots']))['_execute']();const _0x15b857=null===_0x242bb9['_authorId']?null:_0x242bb9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3615d4=_0x242bb9['getMovedRangeStart'](),_0x4c2c80=_0x3615d4['parent'],_0x1bf0be=_0x3615d4['offset'];!function _0xedab9b(_0x3414dc,_0x563f86,_0xacb70c,_0x591466){for(let _0x2b9e3d=_0xacb70c;_0x2b9e3d<_0x591466;_0x2b9e3d++){const _0x135519=_0x563f86['getChild'](_0x2b9e3d);_0x135519['is']('element','$text')?_0x3414dc['set'](_0x135519['getAttribute']('vid'),{'userId':_0x15b857}):(_0x3414dc['set'](_0x135519['getAttribute']('vid_start'),{'userId':_0x15b857}),_0xedab9b(_0x3414dc,_0x135519,0x0,_0x135519['childCount']),_0x3414dc['set'](_0x135519['getAttribute']('vid_end'),{'userId':_0x15b857}));}}(this['_touched'],_0x4c2c80,_0x1bf0be,_0x1bf0be+_0x242bb9['howMany']);}['_handleMergeOperation'](_0x36c6b8){const _0x38b1d0=null===(_0x36c6b8=this['_cloneOperation'](_0x36c6b8,this['_idsRoots']))['_authorId']?null:_0x36c6b8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x31e67b=_0x36c6b8['targetPosition']['parent'],_0x5b3055=_0x36c6b8['sourcePosition']['parent'],_0x48341a=_0x31e67b['getAttribute']('vid_end'),_0x119b9e=_0x5b3055['getAttribute']('vid_start');_0x31e67b['_setAttribute']('vid_end',_0x5b3055['getAttribute']('vid_end')),_0x5b3055['_setAttribute']('vid_end',_0x48341a),this['_touched']['set'](_0x119b9e,{'userId':_0x38b1d0}),this['_touched']['set'](_0x48341a,{'userId':_0x38b1d0}),_0x36c6b8['_execute']();}['_handleSplitOperation'](_0x15c3cf){const _0x2a604b=null===(_0x15c3cf=this['_cloneOperation'](_0x15c3cf,this['_idsRoots']))['_authorId']?null:_0x15c3cf['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x4c14c3=_0x15c3cf['graveyardPosition'],_0x1aae14=_0x15c3cf['splitPosition']['parent'];_0x15c3cf['_execute']();const _0x5c6e8c=_0x1aae14['getAttribute']('vid_end'),_0x3c7e9d=_0x15c3cf['insertionPosition']['nodeAfter'];if(_0x4c14c3){const _0x4da43c=_0x3c7e9d['getAttribute']('vid_end'),_0x123f0a=_0x1aae14['getAttribute']('vid_end');_0x1aae14['_setAttribute']('vid_end',_0x4da43c),_0x3c7e9d['_setAttribute']('vid_end',_0x123f0a),this['_touched']['set'](_0x1aae14['getAttribute']('vid_end'),{'userId':_0x2a604b}),this['_touched']['set'](_0x3c7e9d['getAttribute']('vid_start'),{'userId':_0x2a604b});}else{const _0x1423da=this['_revisionId']++,_0x297578=this['_revisionId']++;_0x1aae14['_setAttribute']('vid_end',_0x1423da),_0x3c7e9d['_setAttribute']('vid_start',_0x297578),_0x3c7e9d['_setAttribute']('vid_end',_0x5c6e8c),this['_touched']['set'](_0x1423da,{'userId':_0x2a604b}),this['_touched']['set'](_0x297578,{'userId':_0x2a604b});}}['_handleMarkerOperation'](_0x8c03ff){if(!_0x8c03ff['affectsData'])return;const _0x4ac037=(_0x8c03ff=this['_cloneOperation'](_0x8c03ff,this['_diffRoots']))['oldRange']?_0x8c03ff['oldRange']['root']:null,_0x6e7abc=_0x8c03ff['newRange']?_0x8c03ff['newRange']['root']:null;_0x4ac037&&this['_markers']['delete'](_0x8c03ff['name']),_0x6e7abc&&this['_markers']['set'](_0x8c03ff['name'],_0x8c03ff['newRange']['clone']());const _0x18c6f3=null===_0x8c03ff['_authorId']?null:_0x8c03ff['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a43e7=_0x8c03ff['name'];if(!this['_touchedMarkers']['has'](_0x1a43e7))return void this['_touchedMarkers']['set'](_0x1a43e7,{'range':_0x8c03ff['oldRange'],'userId':_0x18c6f3});const _0x43c91d=this['_touchedMarkers']['get'](_0x1a43e7),_0xd59a3=_0x43c91d['range'],_0x5af699=_0x8c03ff['newRange'];null==_0xd59a3&&null==_0x5af699||_0xd59a3&&_0x5af699&&_0xd59a3['isEqual'](_0x5af699)?this['_touchedMarkers']['delete'](_0x8c03ff['name']):_0x43c91d['userId']=_0x18c6f3;}['_handleRootOperation'](_0x29cdee,_0x18b559){this['_diffRoots']['has'](_0x29cdee['rootName'])?this['_diffRoots']['get'](_0x29cdee['rootName'])['_isAttached']=_0x29cdee['isAdd']:(this['_diffRoots']['set'](_0x29cdee['rootName'],wt(_0x29cdee['rootName'],_0x29cdee['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x29cdee['rootName'],{}),_0x18b559&&this['_idsRoots']['set'](_0x29cdee['rootName'],wt(_0x29cdee['rootName'],_0x29cdee['elementName'],!0x0)));const _0x1d36aa=null===_0x29cdee['_authorId']?null:_0x29cdee['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1a3e3d=this['_touchedRoots']['get'](_0x29cdee['rootName']);_0x1a3e3d&&_0x1a3e3d['userId']===_0x1d36aa?this['_touchedRoots']['delete'](_0x29cdee['rootName']):this['_touchedRoots']['set'](_0x29cdee['rootName'],{'userId':_0x1d36aa,'isAttached':_0x29cdee['isAdd']});}['_handleRootAttributeOperation'](_0x5f1d03){const _0xc542cf=this['_diffRootsAttributes']['get'](_0x5f1d03['root']['rootName']);null===_0x5f1d03['newValue']?delete _0xc542cf[_0x5f1d03['key']]:_0xc542cf[_0x5f1d03['key']]=_0x5f1d03['newValue'];}}function gt(_0x13bf35){const _0xf71434=wt(_0x13bf35['rootName'],_0x13bf35['name'],_0x13bf35['isAttached']());for(const _0x5a8f89 of _0x13bf35['getChildren']()){const _0x5c7310=_0x5a8f89['_clone'](!0x0);_0xf71434['_appendChild'](_0x5c7310);}return _0xf71434;}function wt(_0x5d15f2,_0x14bca7,_0x24b769=!0x0){const _0x50e9de=new _0x34f38e();return _0x50e9de['rootName']=_0x5d15f2,_0x50e9de['name']=_0x14bca7,_0x50e9de['_isAttached']=_0x24b769,_0x50e9de['isAttached']=()=>_0x50e9de['_isAttached'],_0x50e9de;}function mt(_0x541755,_0x54747f,_0x3c1589){const _0x395271='elementEnd'==_0x541755['type']?_0x3c1589['createPositionAt'](_0x541755['item'],'end'):_0x3c1589['createPositionBefore'](_0x541755['item']);return _0x3c1589['createPositionFromPath'](_0x54747f,_0x395271['path'],_0x395271['stickiness']);}function pt(_0x48c8dd,_0x2e1a7a,_0x12de6a){const _0x57e8b0='elementStart'==_0x48c8dd['type']?_0x12de6a['createPositionAt'](_0x48c8dd['item'],0x0):_0x12de6a['createPositionAfter'](_0x48c8dd['item']);return _0x12de6a['createPositionFromPath'](_0x2e1a7a,_0x57e8b0['path'],_0x57e8b0['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
|
|
25
|
-
|
|
26
|
-
_0x4cbe68(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x27517c){super(),this['id']=_0x27517c['id']||_0x55087c(),this['author']=_0x27517c['author'],this['type']=_0x27517c['type'],this['data']=_0x27517c['data']||{},this['rootName']=_0x27517c['rootName'],this['set']('createdAt',_0x27517c['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x485069,_0x18ebbf){this['newRevisionId']=_0x485069,this['oldRevisionId']=_0x18ebbf,this['changes']=new _0x12a0e4();}['_setChanges'](_0x48334f){for(const _0x2b3df1 of _0x48334f)this['changes']['add'](_0x2b3df1);}}class RevisionViewer extends _0x18ed42{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x4c4887,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x494fe6){super(_0x494fe6),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x3af280,_0x9a3c50,_0x5e6ced)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x5215b1=>{for(const _0x443183 of this['editor']['editing']['view']['document']['roots'])_0x5e6ced?_0x5215b1['removeClass']('ck-editor__editable__overlay',_0x443183):_0x5215b1['addClass']('ck-editor__editable__overlay',_0x443183);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x2a2360=>null!==_0x2a2360),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x3febfd,_0x2daccb,_0x382524)=>_0x3febfd&&_0x382524?_0x2daccb['changes']['getIndex'](_0x382524):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0x364e72,_0x2b9c2d)=>_0x364e72?_0x2b9c2d['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x1657ed=this['editor'],_0x2936c7=new ShowChangeCommand(_0x1657ed,{'direction':'backward'}),_0x135f67=new ShowChangeCommand(_0x1657ed,{'direction':'forward'});(_0x1657ed['commands']['add']('showPreviousChange',_0x2936c7),_0x1657ed['commands']['add']('showNextChange',_0x135f67),_0x1657ed['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x1657ed)),this['on']('change:numberOfChanges',()=>{_0x2936c7['refresh'](),_0x135f67['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x1657ed['enableReadOnlyMode']('revision-viewer'),_0x1657ed['plugins']['has']('WidgetToolbarRepository'))&&_0x1657ed['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x155073){return await this['_utils']['loadRevisionData'](_0x155073,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x155073);}async['getRevisionRootsAttributes'](_0x1ef00d){return await this['_utils']['loadRevisionData'](_0x1ef00d,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x1ef00d);}async['compare'](_0x1540ae,_0x3627aa,_0x18e22b=!0x1){if(!this['isEnabled'])return;const _0x5e7bf8=this['diff'],_0x106a1a=this['repository'],_0xa5d484='string'==typeof _0x1540ae?_0x106a1a['getRevision'](_0x1540ae):_0x1540ae,_0x252dc0='string'==typeof _0x3627aa?_0x106a1a['getRevision'](_0x3627aa):_0x3627aa,_0xd75a43=_0xa5d484['id'],_0x1bb20d=_0x252dc0?_0x252dc0['id']:null;if(!_0x18e22b&&this['diff']&&this['diff']['newRevisionId']===_0xd75a43&&this['diff']['oldRevisionId']===_0x1bb20d)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0xd75a43,_0x1bb20d);const _0x1da27a=this['_getRevisionsRange'](_0xa5d484,_0x252dc0,!0x0)['map'](_0x87c518=>this['_utils']['loadRevisionData'](_0x87c518,this['adapter']));return _0x1da27a['push'](new Promise(_0x116068=>{setTimeout(_0x116068,0x14);})),Promise['all'](_0x1da27a)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x39ec9d=this['_getDiff'](_0xd75a43,_0x1bb20d);for(const _0x232ed8 of _0x39ec9d['changes'])this['_changeIdToChange']['set'](_0x232ed8['id'],_0x232ed8);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x5364f9=>{for(const _0x4ba985 of this['editor']['model']['document']['getRootNames']())_0x5364f9['detachRoot'](_0x4ba985);for(const _0x17da1a of Object['keys'](_0x39ec9d['model'])){const _0x1aa0f=_0x39ec9d['model'][_0x17da1a]['name'],_0x40ae6f=_0x5364f9['addRoot'](_0x17da1a,_0x1aa0f);for(const _0x563cae of Object['keys'](_0x39ec9d['attributes'][_0x17da1a]))_0x5364f9['setAttribute'](_0x563cae,_0x39ec9d['attributes'][_0x17da1a][_0x563cae],_0x40ae6f);_0x5364f9['insert'](_0x39ec9d['model'][_0x17da1a],_0x40ae6f,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x39ec9d['changes'])),this['isReady']=!0x0;})['catch'](_0x257782=>{console['error'](_0x257782),this['_cleanUp'](),_0x5e7bf8&&(this['diff']=_0x5e7bf8),this['isReady']=!0x0;});}['addRevisionData'](_0xa0c232,_0x96f41e){const _0x168c9a=this['repository']['createRevision'](_0xa0c232);return _0x168c9a['on']('_update',(_0x32cf49,_0x3a9a12,_0xa9dcbf)=>_0x96f41e(_0x3a9a12,_0xa9dcbf,_0x168c9a)),this['repository']['addRevision'](_0x168c9a),_0x168c9a;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x1da53b=>{for(const _0x3286bb of this['editor']['model']['document']['getRootNames']())_0x1da53b['detachRoot'](_0x3286bb);});}['_sortAndFilterDiffChanges'](_0x1a7083){const _0x145f33=[],_0x40d99f=new Map();for(const _0xeb6333 of this['editor']['model']['document']['getRootNames']()){const _0x50d858=this['editor']['editing']['view']['getDomRoot'](_0xeb6333);if(!_0x50d858)continue;const _0x5905cf=_0x50d858['getClientRects']()['item'](0x0);_0x5905cf&&(_0x145f33['push'](_0xeb6333),_0x40d99f['set'](_0xeb6333,_0x5905cf));}return _0x145f33['sort']((_0x5b6681,_0x83971)=>{const _0x2145e8=_0x40d99f['get'](_0x5b6681),_0x473752=_0x40d99f['get'](_0x83971);return _0x2145e8['y']-_0x473752['y']||_0x2145e8['x']-_0x473752['x'];}),(_0x1a7083=_0x1a7083['filter'](_0x11b208=>_0x145f33['includes'](_0x11b208['rootName'])))['sort']((_0x537813,_0x43d062)=>_0x145f33['indexOf'](_0x537813['rootName'])-_0x145f33['indexOf'](_0x43d062['rootName'])),_0x1a7083;}['_makeTape'](_0x2baae6){const _0x4083d5=Array['from'](_0x2baae6['markers'])['filter'](([_0x4a030f,_0xd05172])=>_0x4a030f['startsWith']('revision:')&&!_0xd05172['isCollapsed']),_0x2119a8=Array['from'](this['editor']['model']['createRangeIn'](_0x2baae6)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x4083d5['length'])for(const _0x55e963 of _0x2119a8){const [_0x1a5621,_0x31d26b]=_0x4083d5[0x0],[,_0x399490,_0x2c8c20]=_0x1a5621['split'](':');if(_0x31d26b['end']['isEqual'](_0x55e963['nextPosition'])&&_0x4083d5['shift'](),(_0x55e963['previousPosition']['isEqual'](_0x31d26b['start'])||_0x55e963['previousPosition']['isAfter'](_0x31d26b['start']))&&('insertion'==_0x399490?_0x55e963['isAdded']={'userId':_0x2c8c20}:'deletion'==_0x399490&&(_0x55e963['isRemoved']={'userId':_0x2c8c20})),0x0==_0x4083d5['length'])break;}return _0x2119a8;}['_refreshStartEndIndex'](_0x44facd){const _0xf342e6=new Map();for(let _0x5f0cd3=0x0;_0x5f0cd3<_0x44facd['length'];_0x5f0cd3++)'text'===_0x44facd[_0x5f0cd3]['type']?(_0x44facd[_0x5f0cd3]['item']['startIndex']=_0x5f0cd3,_0x44facd[_0x5f0cd3]['item']['endIndex']=_0x5f0cd3):('elementStart'===_0x44facd[_0x5f0cd3]['type']?_0x44facd[_0x5f0cd3]['item']['startIndex']=_0x5f0cd3:'elementEnd'===_0x44facd[_0x5f0cd3]['type']&&(_0x44facd[_0x5f0cd3]['item']['endIndex']=_0x5f0cd3),_0xf342e6['set'](_0x44facd[_0x5f0cd3]['id'],_0x5f0cd3));for(const _0x41513d of _0xf342e6['values']())'elementStart'===_0x44facd[_0x41513d]['type']?_0x44facd[_0x41513d]['item']['endIndex']=_0xf342e6['get'](_0x44facd[_0x41513d]['pairId']):'elementEnd'===_0x44facd[_0x41513d]['type']&&(_0x44facd[_0x41513d]['item']['startIndex']=_0xf342e6['get'](_0x44facd[_0x41513d]['pairId']));}['_processTape'](_0x774158){for(let _0x1a2458=0x0;_0x1a2458<_0x774158['length'];_0x1a2458++){if('elementStart'===_0x774158[_0x1a2458]['type'])_0x774158[_0x1a2458]['item']['startIndex']=_0x1a2458;else{if('elementEnd'===_0x774158[_0x1a2458]['type']){_0x774158[_0x1a2458]['item']['endIndex']=_0x1a2458;const _0x308e72=_0x774158[_0x1a2458]['item']['startIndex'];_0x774158[_0x308e72]['pairId']=_0x774158[_0x1a2458]['id'],_0x774158[_0x1a2458]['pairId']=_0x774158[_0x308e72]['id'];}else _0x774158[_0x1a2458]['item']['startIndex']=_0x1a2458,_0x774158[_0x1a2458]['item']['endIndex']=_0x1a2458,_0x774158[_0x1a2458]['pairId']=null;}_0x774158[_0x1a2458]['markersStart']||(_0x774158[_0x1a2458]['markersStart']=[],_0x774158[_0x1a2458]['markersEnd']=[]);}}['_markInsertions'](_0x58db94,_0x2af9a1){const _0x2b95c4=_0x58db94['filter'](_0x2b3f3c=>!_0x2b3f3c['isAdded']);for(let _0x5160d9=0x0;_0x5160d9<_0x2af9a1['length'];_0x5160d9++)_0x2af9a1[_0x5160d9]['isAdded']&&(_0x2b95c4[_0x5160d9]['isAdded']=_0x2af9a1[_0x5160d9]['isAdded']);}['_getDiff'](_0x4f50dc,_0x318459=null){const _0x900e4f=this['repository']['getRevision'](_0x4f50dc),_0x341385=_0x318459?this['repository']['getRevision'](_0x318459):null,_0x1fcf16=this['_getRevisionsRange'](_0x900e4f,_0x341385),_0x132144=_0x1fcf16[_0x1fcf16['length']-0x1],_0xe017b9=new Map(),_0x3f8873={'model':{},'attributes':{},'changes':[]},_0x4c122b=new Set(),_0x483f79=new Map();for(let _0x64ee4=_0x1fcf16['length']-0x1;_0x64ee4>=0x0;_0x64ee4--){const _0x3118b4=_0x1fcf16[_0x64ee4];for(const _0xe702ec of Object['keys'](_0x3118b4['diffData']))if(_0x3118b4['diffData'][_0xe702ec]['attachChange']){const _0x21ece3=_0x3118b4['diffData'][_0xe702ec]['attachChange'];_0x21ece3['isAttached']?(_0x4c122b['add'](_0xe702ec),_0x483f79['has'](_0xe702ec)&&_0x483f79['get'](_0xe702ec)['userId']==_0x21ece3['userId']?_0x483f79['delete'](_0xe702ec):_0x483f79['set'](_0xe702ec,_0x21ece3)):_0x483f79['has'](_0xe702ec)?(_0x4c122b['delete'](_0xe702ec),_0x483f79['delete'](_0xe702ec)):(_0x4c122b['add'](_0xe702ec),_0x483f79['set'](_0xe702ec,_0x21ece3));}else _0x4c122b['add'](_0xe702ec);}for(const _0xb78017 of _0x4c122b){const _0x3e067d=_0x483f79['has'](_0xb78017)&&!_0x483f79['get'](_0xb78017)['isAttached'];let _0x14d78a=_0x3e067d?_0x1fcf16['length']-0x1:0x0;const _0x54b575=_0x3e067d?-0x1:0x1;for(;_0x1fcf16[_0x14d78a];){const _0x31a01e=_0x1fcf16[_0x14d78a];if(_0x31a01e['diffData'][_0xb78017]){const _0xf72002=_0x3e067d?_0x31a01e['diffData'][_0xb78017]['attributesBefore']:_0x31a01e['diffData'][_0xb78017]['attributesAfter'];_0x3f8873['attributes'][_0xb78017]=_0xf72002?_0x527a66(_0xf72002):{};break;}_0x14d78a+=_0x54b575;}}for(const _0xb173d of _0x1fcf16){_0xb173d['model']={};for(const _0x3d878c of _0xb173d['authors'])_0xe017b9['set'](_0x3d878c['id'],_0x3d878c);for(const _0x33ec15 of _0x4c122b){const _0x4bbd86=_0xb173d['diffData'][_0x33ec15]?_0xb173d['diffData'][_0x33ec15]['insertions']:'[]',_0x2199c9=_0xb173d['diffData'][_0x33ec15]?_0xb173d['diffData'][_0x33ec15]['deletions']:'[]',_0x599d92=_0xb173d['diffData'][_0x33ec15]?.['rootElementName']||'$root';_0xb173d['model'][_0x33ec15]={'insertions':this['_utils']['_makeModelFromViewString'](_0x4bbd86,_0x599d92),'deletions':this['_utils']['_makeModelFromViewString'](_0x2199c9,_0x599d92)};}}for(const _0x365a3d of _0x4c122b){let _0x4c41b3=null,_0x52df91=0x0;const _0x4d6ec5=_0x1fcf16['map'](_0x4dbd55=>_0x4dbd55['diffData'][_0x365a3d]?.['rootElementName'])['find'](_0x252e6e=>void 0x0!==_0x252e6e)||'$root',_0x22a3c1=new Map(Array['from'](_0x900e4f['model'][_0x365a3d]['insertions']['markers'])['filter'](([_0xaac474])=>!_0xaac474['startsWith']('revision:')));let _0x419500=0x0;for(const _0x21470f of _0x1fcf16){const _0x4a261d=this['_makeTape'](_0x21470f['model'][_0x365a3d]['insertions']);_0x21470f==_0x900e4f?(_0x4c41b3=_0x4a261d,_0x52df91=_0x4c41b3['length'],_0x4c41b3['forEach'](_0x4d92c0=>{_0x4d92c0['id']=_0x419500++;}),this['_processTape'](_0x4c41b3)):this['_markInsertions'](_0x4c41b3,_0x4a261d);const _0x11d726=_0x4c41b3['filter'](_0x51806a=>!_0x51806a['isAdded'])['map'](_0x315351=>_0x315351['id']);let _0x4412ac=0x0;const _0x53ea00=this['_makeTape'](_0x21470f['model'][_0x365a3d]['deletions']);_0x53ea00['forEach'](_0x281801=>{_0x281801['isRemoved']?_0x281801['id']=_0x52df91++:_0x281801['id']=_0x11d726[_0x4412ac++];}),this['_processTape'](_0x53ea00),this['_setDistance'](_0x4c41b3,'isAdded'),this['_setDistance'](_0x53ea00,'isRemoved'),_0x21470f==_0x900e4f&&this['_markMarkers'](_0x4c41b3,_0x22a3c1),_0x4c41b3=this['_joinTapes'](_0x4c41b3,_0x53ea00),this['_refreshStartEndIndex'](_0x4c41b3),this['_setDistance'](_0x4c41b3,'isRemoved');}_0x4c41b3=_0x4c41b3['filter'](_0x2527b8=>!(_0x2527b8['isAdded']&&_0x2527b8['isRemoved']));const _0x63a536=new Map(_0x132144['model'][_0x365a3d]['deletions']['markers']),_0x47308f=new Set(_0x22a3c1['keys']());for(const _0x1e0fb6 of _0x63a536['keys']())_0x47308f['delete'](_0x1e0fb6);this['_markSuggestions'](_0x4c41b3,_0x47308f),this['_fixObsoleteTags'](_0x4c41b3),_0x4c41b3=this['_removeMissingPairs'](_0x4c41b3),_0x4c41b3=this['_markMismatchedRemovedTags'](_0x4c41b3),_0x4c41b3=this['_removeUnsupportedChanges'](_0x4c41b3);const {root:_0x5bb5d4,changes:_0x231308}=this['_makeModelFromTape'](_0x4c41b3,_0xe017b9,_0x365a3d,_0x4d6ec5);_0x3f8873['model'][_0x365a3d]=_0x5bb5d4;const _0xcac542=_0x483f79['get'](_0x365a3d);if(_0xcac542){const _0x74e8a6=_0xe017b9['get'](_0xcac542['userId']),_0x153469=new ChangeItem({'author':_0x74e8a6,'type':_0xcac542['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x365a3d});_0x231308['unshift'](_0x153469),_0x3f8873['attributes'][_0x365a3d]['revisionHistoryAttachChange']=_0x153469['id'];}_0x3f8873['changes']=_0x3f8873['changes']['concat'](_0x231308);}return _0x3f8873;}['_markMarkers'](_0x2479ed,_0x12ee00){for(let _0x579a7e=0x0;_0x579a7e<_0x2479ed['length'];_0x579a7e++)for(const [_0x54b306,_0x123917]of _0x12ee00)!_0x123917['isCollapsed']&&_0x123917['start']['isEqual'](_0x2479ed[_0x579a7e]['previousPosition'])&&_0x2479ed[_0x579a7e]['markersStart']['push'](_0x54b306),_0x123917['end']['isEqual'](_0x2479ed[_0x579a7e]['nextPosition'])&&_0x2479ed[_0x579a7e]['markersEnd']['push'](_0x54b306);}['_joinTapes'](_0x5c26d7,_0x3b4ff9){let _0x1f8959=[],_0x4d0f9f=0x0,_0x7b261a=0x0;for(;_0x4d0f9f<_0x5c26d7['length']||_0x7b261a<_0x3b4ff9['length'];){const _0x39efc1=_0x5c26d7[_0x4d0f9f]||{},_0x28ca59=_0x3b4ff9[_0x7b261a]||{};if(_0x39efc1['id']==_0x28ca59['id'])_0x4d0f9f++,_0x7b261a++,_0x1f8959['push'](_0x39efc1);else{if(_0x28ca59['isRemoved']&&_0x39efc1['isAdded']){const {commonTape:_0x13bbf5,iEnd:_0x45ca9c,jEnd:_0x1357c4}=this['_threeWayMerge'](_0x5c26d7,_0x4d0f9f,_0x3b4ff9,_0x7b261a);_0x1f8959=_0x1f8959['concat'](_0x13bbf5),_0x4d0f9f=_0x45ca9c,_0x7b261a=_0x1357c4;}else _0x28ca59['isRemoved']?(_0x7b261a++,_0x1f8959['push'](_0x28ca59)):(_0x4d0f9f++,_0x1f8959['push'](_0x39efc1));}}return _0x1f8959;}['_markSuggestions'](_0x1b5a15,_0x584bf1){const _0x4bc3a2=[];for(let _0x3740f7=0x0;_0x3740f7<_0x1b5a15['length'];_0x3740f7++){for(let _0x10588c=0x0;_0x10588c<_0x1b5a15[_0x3740f7]['markersStart']['length'];_0x10588c++){const _0x22c367=_0x1b5a15[_0x3740f7]['markersStart'][_0x10588c];if(!_0x584bf1['has'](_0x22c367))continue;const {group:_0x4e55fe,type:_0x3ebcce,authorId:_0x4db3a2}=_0x20c608(_0x22c367);'revision-suggestion'!=_0x4e55fe||'insertion'!=_0x3ebcce&&'deletion'!=_0x3ebcce||(_0x4bc3a2['unshift']({'type':_0x3ebcce,'name':_0x22c367,'userId':_0x4db3a2}),_0x1b5a15[_0x3740f7]['markersStart']['splice'](_0x10588c,0x1),_0x10588c--);}_0x1a717b(_0x1b5a15[_0x3740f7]);for(let _0x3fe000=0x0;_0x3fe000<_0x1b5a15[_0x3740f7]['markersEnd']['length'];_0x3fe000++){const _0x577538=_0x1b5a15[_0x3740f7]['markersEnd'][_0x3fe000];if(!_0x584bf1['has'](_0x577538))continue;const {group:_0x493a34,type:_0x503c07}=_0x20c608(_0x577538);if('revision-suggestion'!=_0x493a34||'insertion'!=_0x503c07&&'deletion'!=_0x503c07)continue;_0x1b5a15[_0x3740f7]['markersEnd']['splice'](_0x3fe000,0x1),_0x3fe000--;const _0x54bd8a=_0x4bc3a2['findIndex'](_0x4afdfb=>_0x4afdfb['name']==_0x577538);_0x54bd8a>-0x1&&_0x4bc3a2['splice'](_0x54bd8a,0x1);}}function _0x20c608(_0x364175){const _0x5865e9=_0x364175['split'](':');return{'group':_0x5865e9[0x0],'type':_0x5865e9[0x1],'subType':_0x5865e9['length']>=0x5?_0x5865e9[0x2]:null,'id':_0x5865e9['length']<0x5?_0x5865e9[0x2]:_0x5865e9[0x3],'authorId':_0x5865e9['length']<0x5?_0x5865e9[0x3]:_0x5865e9[0x4],'markerCount':0x6==_0x5865e9['length']?_0x5865e9[0x5]:null};}function _0x1a717b(_0xb3bd3d){for(let _0x1702f1=0x0;_0x1702f1<_0x4bc3a2['length'];_0x1702f1++){if(_0xb3bd3d['isAdded']&&'insertion'==_0x4bc3a2[_0x1702f1]['type']&&_0xb3bd3d['isAdded']['userId']==_0x4bc3a2[_0x1702f1]['userId'])return _0xb3bd3d['isAddSuggestion']=_0x4bc3a2[_0x1702f1],void delete _0xb3bd3d['isAdded'];if(!_0xb3bd3d['isAdded']&&!_0xb3bd3d['isRemoved']&&'deletion'==_0x4bc3a2[_0x1702f1]['type'])return void(_0xb3bd3d['isRemoveSuggestion']=_0x4bc3a2[_0x1702f1]);}}}['_setDistance'](_0x13144c,_0x52eeb3){let _0x329984=0x0,_0x220d63=!0x1;const _0x7c9bc3=new Map();for(const _0x5099ed of _0x13144c)_0x5099ed[_0x52eeb3]?_0x220d63&&(_0x329984++,_0x220d63=!0x1):(_0x329984++,_0x220d63=!0x0),_0x7c9bc3['set'](_0x5099ed['id'],_0x329984);for(let _0x594227=0x0;_0x594227<_0x13144c['length'];_0x594227++){if('isRemoved'==_0x52eeb3&&_0x13144c[_0x594227]['isAdded']||'isAdded'==_0x52eeb3&&_0x13144c[_0x594227]['isRemoved'])continue;if('text'==_0x13144c[_0x594227]['type']){_0x13144c[_0x594227]['distance']=0x0;continue;}const _0x4146f5=_0x7c9bc3['get'](_0x13144c[_0x594227]['pairId']),_0x197f33=_0x7c9bc3['get'](_0x13144c[_0x594227]['id']);_0x13144c[_0x594227]['distance']=_0x4146f5-_0x197f33;}}['_getRevisionsRange'](_0x3c9808,_0x3daf23,_0x2fef34=!0x1){const _0x1bbf4a=[];let _0x2662be=this['repository']['getIndex'](_0x3c9808),_0x533ce0=this['repository']['getIndex'](_0x3daf23);for(-0x1==_0x533ce0&&(_0x533ce0=this['repository']['_revisions']['length'],_0x2fef34=!0x1);_0x2662be<_0x533ce0;)_0x1bbf4a['push'](this['repository']['getRevision'](_0x2662be)),_0x2662be++;return _0x2fef34&&_0x1bbf4a['push'](this['repository']['getRevision'](_0x2662be)),_0x1bbf4a;}['_threeWayMerge'](_0x57cedd,_0x19fc15,_0x1fcfaa,_0xdd63e9){const _0x438a21=this['editor']['model']['schema'];let _0x28021a=_0x19fc15;for(;_0x57cedd[_0x28021a]&&_0x57cedd[_0x28021a]['isAdded'];)_0x28021a++;let _0x123b78=_0xdd63e9;for(;_0x1fcfaa[_0x123b78]&&_0x1fcfaa[_0x123b78]['isRemoved'];)_0x123b78++;_0x2b1282(_0x57cedd,_0x19fc15,_0x28021a),_0x2b1282(_0x1fcfaa,_0xdd63e9,_0x123b78);const _0x5c2ddd=_0x1fcfaa['slice'](_0xdd63e9,_0x123b78)['concat'](_0x57cedd['slice'](_0x19fc15,_0x28021a));return _0x5c2ddd['sort']((_0x4d2dd5,_0x24e3ae)=>_0x4d2dd5['side']!=_0x24e3ae['side']?_0x4d2dd5['side']-_0x24e3ae['side']:_0x4d2dd5['level']!=_0x24e3ae['level']?_0x4d2dd5['level']-_0x24e3ae['level']:_0x4d2dd5['distance']!=_0x24e3ae['distance']?_0x24e3ae['distance']-_0x4d2dd5['distance']:!!_0x4d2dd5['isAdded']!=!!_0x24e3ae['isAdded']?-0x1==_0x4d2dd5['side']||0x0==_0x4d2dd5['side']?_0x4d2dd5['isAdded']?-0x1:0x1:_0x4d2dd5['isAdded']?0x1:-0x1:_0x4d2dd5['index']-_0x24e3ae['index']),{'commonTape':_0x5c2ddd,'iEnd':_0x28021a,'jEnd':_0x123b78};function _0x2b1282(_0x658418,_0x1d71ce,_0x3dfc91){let _0x360aaa=-0x1,_0x3d7938=Number['POSITIVE_INFINITY'],_0x3ef597=!0x0;for(let _0x3591b5=_0x1d71ce;_0x3591b5<_0x3dfc91;_0x3591b5++)if(_0x438a21['isInline'](_0x658418[_0x3591b5]['item'])||(_0x3ef597=!0x1),_0x658418[_0x3591b5]['item']['startIndex']<_0x1d71ce&&(_0x360aaa=_0x3591b5),_0x658418[_0x3591b5]['item']['endIndex']>=_0x3dfc91){_0x3d7938=_0x3591b5;break;}_0x3ef597&&(_0x360aaa=_0x3dfc91-0x1);for(let _0x1929c3=_0x1d71ce;_0x1929c3<_0x3dfc91;_0x1929c3++)_0x658418[_0x1929c3]['side']=_0x1929c3<=_0x360aaa?-0x1:_0x1929c3<_0x3d7938?0x0:0x1,_0x658418[_0x1929c3]['index']=_0x1929c3;let _0x37463a=0x0;for(let _0x1a3d49=_0x1d71ce;_0x1a3d49<=_0x360aaa;_0x1a3d49++)0x0==_0x658418[_0x1a3d49]['distance']?_0x658418[_0x1a3d49]['level']=_0x37463a:(_0x37463a++,_0x658418[_0x1a3d49]['level']=_0x37463a,_0x37463a++);for(let _0x40d79b=_0x1d71ce;_0x40d79b<_0x3dfc91;_0x40d79b++)0x0==_0x658418[_0x40d79b]['side']&&(_0x658418[_0x40d79b]['level']=_0x37463a);_0x37463a=0x0;for(let _0x37b204=_0x3dfc91-0x1;_0x37b204>=_0x3d7938;_0x37b204--)0x0==_0x658418[_0x37b204]['distance']?_0x658418[_0x37b204]['level']=_0x37463a:(_0x37463a--,_0x658418[_0x37b204]['level']=_0x37463a,_0x37463a--);}}['_fixObsoleteTags'](_0x4c0d5f){const _0x29af8e=new Map(),_0x2a2921=this['editor']['model']['schema'];for(let _0x5eb623=0x1;_0x5eb623<_0x4c0d5f['length'];_0x5eb623++){let _0x11b39f,_0x3e1334,_0x2de003;const _0x370038=_0x4c0d5f[_0x5eb623],_0x32865f=_0x4c0d5f[_0x5eb623-0x1];if('text'==_0x370038['type'])continue;if(_0x370038['type']!=_0x32865f['type'])continue;if(!_0x2a2921['isBlock'](_0x32865f['item'])||_0x2a2921['isLimit'](_0x32865f['item']))continue;if(!_0x2a2921['isBlock'](_0x370038['item'])||_0x2a2921['isLimit'](_0x370038['item']))continue;if((_0x4c0d5f[_0x5eb623]['isAdded']||_0x4c0d5f[_0x5eb623]['isAddSuggestion'])&&_0x4c0d5f[_0x5eb623-0x1]['isRemoved'])_0x11b39f=_0x4c0d5f[_0x5eb623],_0x3e1334=_0x4c0d5f[_0x5eb623-0x1],_0x2de003=_0x5eb623-0x1;else{if(!_0x4c0d5f[_0x5eb623]['isRemoved']||!_0x4c0d5f[_0x5eb623-0x1]['isAdded']&&!_0x4c0d5f[_0x5eb623-0x1]['isAddSuggestion'])continue;_0x11b39f=_0x4c0d5f[_0x5eb623-0x1],_0x3e1334=_0x4c0d5f[_0x5eb623],_0x2de003=_0x5eb623;}const _0x4d3298=_0x11b39f['level']==_0x3e1334['level'],_0x249368=Math['abs'](_0x11b39f['level'])<Math['abs'](_0x3e1334['level'])&&0x0==_0x3e1334['distance'];(_0x4d3298||_0x249368)&&(_0x29af8e['set'](_0x3e1334['id'],_0x11b39f['id']),_0x4c0d5f['splice'](_0x2de003,0x1),_0x5eb623--,_0x11b39f['isAdded']=!0x1);}for(let _0x2da6f0=0x0;_0x2da6f0<_0x4c0d5f['length'];_0x2da6f0++)_0x29af8e['has'](_0x4c0d5f[_0x2da6f0]['pairId'])&&(_0x4c0d5f[_0x2da6f0]['pairId']=_0x29af8e['get'](_0x4c0d5f[_0x2da6f0]['pairId']));}['_removeMissingPairs'](_0x32493b){const _0x63ebd0=new Set(_0x32493b['map'](_0x3b6601=>_0x3b6601['id']));for(let _0x15523e=0x0;_0x15523e<_0x32493b['length'];_0x15523e++)_0x63ebd0['has'](_0x32493b[_0x15523e]['pairId'])||0x0==_0x32493b[_0x15523e]['distance']||(_0x32493b[_0x15523e]['isIncorrect']=!0x0);return _0x32493b['filter'](_0x49f429=>!_0x49f429['isIncorrect']);}['_markMismatchedRemovedTags'](_0x54b50e){const _0x263e55=new Set();for(let _0x51532a=0x0;_0x51532a<_0x54b50e['length'];_0x51532a++){if(_0x263e55['has'](_0x54b50e[_0x51532a]['id'])&&_0x54b50e[_0x51532a]['isRemoved']&&(_0x54b50e[_0x51532a]['isIncorrect']=!0x0),_0x54b50e[_0x51532a]['isIncorrect'])continue;if(0x0==_0x54b50e[_0x51532a]['distance'])continue;if('elementStart'!=_0x54b50e[_0x51532a]['type'])continue;if(null==_0x54b50e[_0x51532a]['pairId'])continue;let _0x89fe9b=_0x51532a+0x1,_0x5dab21=0x0;for(;_0x54b50e[_0x89fe9b]['id']!=_0x54b50e[_0x51532a]['pairId'];)'elementStart'==_0x54b50e[_0x89fe9b]['type']?_0x5dab21++:'elementEnd'==_0x54b50e[_0x89fe9b]['type']&&_0x5dab21--,_0x89fe9b++;if(0x0!=_0x5dab21){if(_0x54b50e[_0x51532a]['isRemoved'])_0x54b50e[_0x51532a]['isIncorrect']=!0x0;else{for(;_0x89fe9b!=_0x51532a;)_0x54b50e[_0x89fe9b]['isRemoved']&&0x0!=_0x54b50e[_0x89fe9b]['distance']&&(_0x54b50e[_0x89fe9b]['isIncorrect']=!0x0,_0x263e55['add'](_0x54b50e[_0x89fe9b]['pairId'])),_0x89fe9b--;}}}return _0x54b50e['filter'](_0x1acaac=>!_0x1acaac['isIncorrect']);}['_removeUnsupportedChanges'](_0x1054c4){const _0x56e100=this['editor']['model']['schema'];for(let _0x4fdd1b=0x0;_0x4fdd1b<_0x1054c4['length'];_0x4fdd1b++){if(!(_0x1054c4[_0x4fdd1b]['isAdded']||_0x1054c4[_0x4fdd1b]['isAddSuggestion']||_0x1054c4[_0x4fdd1b]['isRemoved']||_0x1054c4[_0x4fdd1b]['isRemoveSuggestion']))continue;if(0x0==_0x1054c4[_0x4fdd1b]['distance'])continue;const _0x2e23b4=_0x1054c4[_0x4fdd1b]['item'];_0x56e100['isBlock'](_0x2e23b4)||_0x56e100['isLimit'](_0x2e23b4)||(_0x1054c4[_0x4fdd1b]['isAdded']&&delete _0x1054c4[_0x4fdd1b]['isAdded'],_0x1054c4[_0x4fdd1b]['isAddSuggestion']&&delete _0x1054c4[_0x4fdd1b]['isAddSuggestion'],_0x1054c4[_0x4fdd1b]['isRemoveSuggestion']&&delete _0x1054c4[_0x4fdd1b]['isRemoveSuggestion'],_0x1054c4[_0x4fdd1b]['isRemoved']&&(_0x1054c4[_0x4fdd1b]['isIncorrect']=!0x0));}return _0x1054c4['filter'](_0x26a9cf=>!_0x26a9cf['isIncorrect']);}['_makeModelFromTape'](_0x5cf989,_0x10dbc6,_0xb82977,_0x7bf851){const _0x3a642f=new _0x34f38e(),_0x22dbc1=[],_0x55db90=new Map(),_0x2fe856=this['editor']['model'],_0x5bc52a=_0x2fe856['schema'],_0x35e7ee=[_0x3a642f],_0x42c861={},_0x51f6ca={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x3a642f['name']=_0x7bf851;let _0x41afa0=null;const _0x18202b=[0x0];for(let _0x613e8e=0x0;_0x613e8e<_0x5cf989['length'];_0x613e8e++)if('elementStart'===_0x5cf989[_0x613e8e]['type']){_0x5cf989[_0x613e8e]['previousPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b);const _0x3f68b7=new _0x45e0a6(_0x5cf989[_0x613e8e]['item']['name'],_0x5cf989[_0x613e8e]['item']['getAttributes']());_0x35e7ee[0x0]['_appendChild'](_0x3f68b7),_0x18202b['push'](0x0),_0x35e7ee['unshift'](_0x3f68b7),_0x5cf989[_0x613e8e]['nextPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b);}else'elementEnd'===_0x5cf989[_0x613e8e]['type']?(_0x35e7ee['shift'](),_0x5cf989[_0x613e8e]['previousPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b),_0x18202b['pop'](),_0x18202b[_0x18202b['length']-0x1]++,_0x5cf989[_0x613e8e]['nextPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b)):(_0x5cf989[_0x613e8e]['previousPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b),_0x41afa0?_0x41afa0['_data']+=_0x5cf989[_0x613e8e]['item']['data']:_0x41afa0=new _0x541a0c(_0x5cf989[_0x613e8e]['item']['data'],_0x5cf989[_0x613e8e]['item']['getAttributes']()),_0x5cf989[_0x613e8e+0x1]&&'text'===_0x5cf989[_0x613e8e+0x1]['type']&&_0xa4322f(_0x41afa0,_0x5cf989[_0x613e8e+0x1]['item'])||(_0x35e7ee[0x0]['_appendChild'](_0x41afa0),_0x41afa0=null),_0x18202b[_0x18202b['length']-0x1]+=_0x5cf989[_0x613e8e]['item']['offsetSize'],_0x5cf989[_0x613e8e]['nextPosition']=_0x2fe856['createPositionFromPath'](_0x3a642f,_0x18202b));for(let _0x1d83a7=0x0;_0x1d83a7<_0x5cf989['length'];_0x1d83a7++){const _0x5b1720=_0x5cf989[_0x1d83a7]['previousPosition'],_0x14e620=_0x5cf989[_0x1d83a7]['nextPosition'];for(const _0x3a91a5 of _0x5cf989[_0x1d83a7]['markersStart'])_0x55db90['set'](_0x3a91a5,{'start':_0x5b1720,'end':null});_0x428baf('isRemoveSuggestion',_0x1d83a7,_0x5b1720,_0x14e620),_0x428baf('isAddSuggestion',_0x1d83a7,_0x5b1720,_0x14e620),_0x428baf('isRemoved',_0x1d83a7,_0x5b1720,_0x14e620),_0x428baf('isAdded',_0x1d83a7,_0x5b1720,_0x14e620);for(const _0x5ae9bd of _0x5cf989[_0x1d83a7]['markersEnd']){const _0x1518d6=_0x55db90['get'](_0x5ae9bd);_0x1518d6?_0x1518d6['end']=_0x14e620:_0x55db90['set'](_0x5ae9bd,{'start':_0x14e620,'end':_0x14e620});}}for(const [_0x1e06e0,_0x3007a2]of _0x55db90){const _0x368f59=this['editor']['model']['createRange'](_0x3007a2['start'],_0x3007a2['end']);_0x3a642f['markers']['set'](_0x1e06e0,_0x368f59);}return _0x22dbc1['sort']((_0x22fc17,_0x11fbdf)=>{const _0x5c0529=_0x3a642f['markers']['get']('revision:'+_0x22fc17['id']),_0x56ca2d=_0x3a642f['markers']['get']('revision:'+_0x11fbdf['id']);return _0x5c0529['start']['isBefore'](_0x56ca2d['start'])?-0x1:_0x5c0529['start']['isAfter'](_0x56ca2d['start'])?0x1:_0x5c0529['end']['isBefore'](_0x56ca2d['end'])?-0x1:_0x5c0529['end']['isAfter'](_0x56ca2d['end'])?0x1:'add'===_0x22fc17['type']?-0x1:0x1;}),{'root':_0x3a642f,'changes':_0x22dbc1};function _0x428baf(_0x394085,_0x289711,_0x89fd71,_0x15f296){const _0x1e9d2b=!!_0x5cf989[_0x289711][_0x394085],_0x305eb0=_0x1e9d2b?_0x5cf989[_0x289711][_0x394085]['userId']:null,_0x9e678a=_0x289711===_0x5cf989['length']-0x1,_0x771ef3=_0x51f6ca[_0x394085][0x0],_0x563f2a=_0x5bc52a['isObject'](_0x5cf989[_0x289711]['item']);!_0x42c861[_0x394085]&&_0x1e9d2b?_0x42c861[_0x394085]={'start':_0x89fd71,'tapeItem':_0x5cf989[_0x289711],'userId':_0x305eb0,'type':_0x394085}:_0x42c861[_0x394085]&&!_0x1e9d2b?(_0x42c861[_0x394085]['end']=_0x89fd71,_0x11004e(_0x42c861[_0x394085]),_0x42c861[_0x394085]=null):_0x42c861[_0x394085]&&_0x1e9d2b&&_0x42c861[_0x394085]['userId']!==_0x305eb0&&(_0x42c861[_0x394085]['end']=_0x89fd71,_0x771ef3&&_0x771ef3['userId']===_0x42c861[_0x394085]['userId']||_0x11004e(_0x42c861[_0x394085]),_0x42c861[_0x394085]={'start':_0x89fd71,'tapeItem':_0x5cf989[_0x289711],'userId':_0x305eb0,'type':_0x394085}),_0x42c861[_0x394085]&&_0x563f2a&&('elementStart'!==_0x5cf989[_0x289711]['type']||_0x771ef3&&_0x771ef3['userId']===_0x305eb0||_0x51f6ca[_0x394085]['unshift']({'userId':_0x305eb0,'object':_0x5cf989[_0x289711]['item'],'change':_0x42c861[_0x394085]}),'elementEnd'===_0x5cf989[_0x289711]['type']&&_0x771ef3&&_0x771ef3['object']===_0x5cf989[_0x289711]['item']&&(_0x51f6ca[_0x394085]['shift'](),_0x42c861[_0x394085]=_0x771ef3['change'])),_0x42c861[_0x394085]&&_0x9e678a&&(_0x42c861[_0x394085]['end']=_0x15f296,_0x11004e(_0x42c861[_0x394085]),_0x42c861[_0x394085]=null);}function _0x11004e({start:_0x291db8,end:_0x3d1855,tapeItem:_0x4738bf,userId:_0xbd3e81,type:_0x2462f4}){const _0x22a9e6=_0x4738bf['item'],_0x152e0a=_0x2fe856['schema']['isBlock'](_0x22a9e6)&&!_0x2fe856['schema']['isLimit'](_0x22a9e6),_0x5eaff3=_0x291db8['nodeAfter']==_0x3d1855['parent']&&_0x3d1855['isAtStart'];if(_0x152e0a&&_0x5eaff3)return;const _0x4665cc=_0x2fe856['createRange'](_0x291db8,_0x3d1855),_0x3eafdf=_0x10dbc6['get'](_0xbd3e81),_0x21eb71=new ChangeItem({'author':_0x3eafdf,'type':'isAdded'==_0x2462f4||'isAddSuggestion'==_0x2462f4?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x2462f4||'isRemoveSuggestion'==_0x2462f4},'createdAt':new Date(),'rootName':_0xb82977});_0x22dbc1['push'](_0x21eb71),_0x3a642f['markers']['set']('revision:'+_0x21eb71['id'],_0x4665cc);}function _0xa4322f(_0x34ae19,_0x5c8fbc){const _0x49cab5=_0x34ae19['getAttributes'](),_0x5bf926=_0x5c8fbc['getAttributes']();for(const _0x4ea65b of _0x49cab5){if(_0x4ea65b[0x1]!==_0x5c8fbc['getAttribute'](_0x4ea65b[0x0]))return!0x1;_0x5bf926['next']();}return _0x5bf926['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x1df0c2=>{const _0x2da276=_0x1df0c2['markerName']['split'](':')[0x1],_0x500234=this['_getChangeFromId'](_0x2da276);if(!_0x500234)return null;const _0x2c12dd='add'==_0x500234['type']?'insertion':'deletion',_0x1c031b=['ck-suggestion-marker','ck-suggestion-marker-'+_0x2c12dd];return _0x500234['data']['isSuggestion']&&_0x1c031b['push']('ck-suggestion-marker-'+_0x2c12dd+'-new'),this['activeChange']==_0x500234&&_0x1c031b['push']('ck-suggestion-marker--active'),{'classes':_0x1c031b,'attributes':{'data-change-id':_0x2da276}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x5db322=>{_0x5db322['on']('element:pre',(_0x293a01,_0x512aff,_0x2795c4)=>{const _0x56964c=_0x512aff['viewItem']['getChild'](0x0);if(!_0x56964c||!_0x56964c['is']('element','code'))return;if(!_0x2795c4['consumable']['consume'](_0x56964c,{'attributes':['vid_start','vid_end']}))return;const _0x2dba06=_0x512aff['modelRange']['start']['nodeAfter'];_0x2795c4['writer']['setAttribute']('vid_start',_0x56964c['getAttribute']('vid_start'),_0x2dba06),_0x2795c4['writer']['setAttribute']('vid_end',_0x56964c['getAttribute']('vid_end'),_0x2dba06);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x56fab3=>{_0x56fab3['on']('element',(_0x4d6bbd,_0x36d41b,_0xe7c806)=>{if(!_0xe7c806['consumable']['consume'](_0x36d41b['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x36d41b['modelRange']['isCollapsed'])return;const _0x53b46f=_0x36d41b['modelRange']['start']['nodeAfter'];_0x53b46f['hasAttribute']('vid_start')||_0x53b46f['hasAttribute']('vid')||(_0xe7c806['writer']['setAttribute']('vid_start',_0x36d41b['viewItem']['getAttribute']('vid_start'),_0x53b46f),_0xe7c806['writer']['setAttribute']('vid_end',_0x36d41b['viewItem']['getAttribute']('vid_end'),_0x53b46f));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x450c69=>_0x450c69['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x33d2db,[,_0x468f3f])=>{['vid_start','vid_end','vid']['includes'](_0x468f3f)&&(_0x33d2db['return']=!0x0,_0x33d2db['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x46aa7b=>{_0x46aa7b['on']('attribute:vid',(_0x17ab2f,_0x1cf3a,_0x1c6542)=>{if('\x20'!=_0x1cf3a['item']['data']||_0x1cf3a['item']['parent']['maxOffset']>0x1)return;if(!_0x1c6542['consumable']['consume'](_0x1cf3a['item'],_0x17ab2f['name']))return;const _0x49c293=_0x1c6542['writer'],_0x18728a=_0x1c6542['mapper']['toViewRange'](_0x1cf3a['range']);_0x49c293['wrap'](_0x18728a,_0x49c293['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0x350473){const _0x355d02=_0x350473['plugins']['get']('RevisionViewer');return(_0x47fb47,_0x49d8c2,_0x5e026d)=>{const _0x312bee=_0x49d8c2['markerName']['split'](':')[0x1],_0x459b29=_0x355d02['_getChangeFromId'](_0x312bee);if(!_0x459b29)return null;const _0x4044e9='add'==_0x459b29['type']?'split':'merge';if(!_0x5e026d['consumable']['test'](_0x49d8c2['markerRange'],_0x47fb47['name']))return;const _0x2a373f=_0x49d8c2['markerRange']['getWalker'](),_0x384a4f=_0x49d8c2['markerRange']['start'],_0x29144a=_0x350473['model']['schema'];let _0x2fabdb=null,_0x532d26=null,_0x39aac5=!0x1,_0x29f8a0=!0x1;for(const _0x5c8334 of _0x2a373f){const _0x3de85b=_0x5c8334['item'];_0x39aac5=_0x39aac5||_0x29144a['isContent'](_0x3de85b);const _0x25ea8c=_0x5e026d['mapper']['toViewElement'](_0x3de85b);if(_0x25ea8c&&_0x25ea8c['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x5c8334['type']&&(_0x29144a['isBlock'](_0x3de85b)&&!_0x29144a['isLimit'](_0x3de85b)&&(_0x3de85b['nextSibling']||_0x384a4f['isAtEnd']?_0x2fabdb&&_0x2fabdb['parent']==_0x3de85b||(_0x2fabdb=_0x3de85b,_0x296dbf(_0x5c8334['previousPosition']),_0x29f8a0=!0x0):_0x532d26=_0x532d26||_0x5c8334['previousPosition']));}function _0x296dbf(_0x176ca7){const _0x30f73d=_0x5e026d['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x4044e9}),_0x37f051=_0x5e026d['mapper']['toViewPosition'](_0x176ca7);_0x459b29['data']['isSuggestion']&&_0x5e026d['writer']['addClass']('ck-suggestion-marker-'+_0x4044e9+'-new',_0x30f73d),_0x355d02['activeChange']==_0x459b29&&_0x5e026d['writer']['addClass']('ck-suggestion-marker--active',_0x30f73d),_0x5e026d['writer']['insert'](_0x37f051,_0x30f73d),_0x5e026d['mapper']['bindElementToMarker'](_0x30f73d,_0x49d8c2['markerName']);}_0x39aac5||_0x29f8a0||!_0x532d26||_0x296dbf(_0x532d26);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x195c72,_0xbec0cd,_0xa37980)=>{const _0x2ef848=_0xa37980['mapper']['markerNameToElements'](_0xbec0cd['markerName']);if(_0x2ef848){for(const _0x583791 of _0x2ef848)(_0x583791['hasClass']('ck-suggestion-marker-split')||_0x583791['hasClass']('ck-suggestion-marker-merge'))&&(_0xa37980['mapper']['unbindElementFromMarkerName'](_0x583791,_0xbec0cd['markerName']),_0xa37980['writer']['remove'](_0x583791));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x4c3bdd,_0x209e19,_0x28452b)=>{const _0x1f8c51=_0x209e19['markerName']['split'](':')[0x1],_0x10f390=this['_getChangeFromId'](_0x1f8c51);if(!_0x10f390)return null;const _0x38f89f='add'==_0x10f390['type']?'split':'merge';if(_0x28452b['consumable']['test'](_0x209e19['markerRange'],_0x4c3bdd['name']))for(const _0x84ef9d of _0x209e19['markerRange']['getItems']()){if(!_0x84ef9d['is']('element','softBreak'))continue;const _0x4e8f98=_0x28452b['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x38f89f}),_0x1f068a=_0x28452b['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x84ef9d));_0x10f390['data']['isSuggestion']&&_0x28452b['writer']['addClass']('ck-suggestion-marker-'+_0x38f89f+'-new',_0x4e8f98),this['activeChange']==_0x10f390&&_0x28452b['writer']['addClass']('ck-suggestion-marker--active',_0x4e8f98),_0x28452b['writer']['insert'](_0x1f068a,_0x4e8f98),_0x28452b['mapper']['bindElementToMarker'](_0x4e8f98,_0x209e19['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3daa09=>{for(const _0x26fc04 of this['editor']['model']['document']['getRootNames']()){const _0x49c852=this['editor']['model']['document']['getRoot'](_0x26fc04),_0x427526=this['editor']['editing']['view']['document']['getRoot'](_0x26fc04);if(_0x427526){const _0x1cce40=_0x49c852['getAttribute']('revisionHistoryAttachChange');if(_0x3daa09['removeAttribute']('data-change-id',_0x427526),_0x3daa09['removeClass']('ck-revision-history-root-add',_0x427526),_0x3daa09['removeClass']('ck-revision-history-root-remove',_0x427526),_0x3daa09['removeClass']('ck-revision-history-root--active',_0x427526),_0x1cce40){const _0x194987=this['_getChangeFromId'](_0x1cce40);if(!_0x194987)return null;_0x3daa09['setAttribute']('data-change-id',_0x1cce40,_0x427526),_0x3daa09['addClass']('ck-revision-history-root-'+_0x194987['type'],_0x427526),this['activeChange']==_0x194987&&_0x3daa09['addClass']('ck-revision-history-root--active',_0x427526);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0x44f1d0=>'revision-comment:'+_0x44f1d0,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x1e6cee=>'revision-suggestion:'+_0x1e6cee,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x5de848=>({'name':'suggestion:'+_0x5de848,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3f4b5e=>{const _0x24fe3c=_0x3f4b5e['markerName']['split'](':')[0x1];return'insertion'!=_0x24fe3c&&'deletion'!=_0x24fe3c?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x24fe3c]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x539f5f,_0xeee255,_0x2f1ab3)=>{const _0x22e44=_0x2f1ab3['mapper']['markerNameToElements'](_0xeee255['markerName']);if(_0x22e44){for(const _0x4826a4 of _0x22e44)_0x4826a4['is']('uiElement')&&(_0x2f1ab3['mapper']['unbindElementFromMarkerName'](_0x4826a4,_0xeee255['markerName']),_0x2f1ab3['writer']['remove'](_0x4826a4));}},{'priority':'high'});}['_getChangeFromId'](_0x49337d){return this['_changeIdToChange']['get'](_0x49337d);}['_getViewForChange'](_0x2e3748){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x2e3748),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x25c0e7,_0x2c294c,_0x2d1153,_0x3fed35)=>{_0x3fed35&&this['_balloon']['remove'](_0x3fed35),_0x2d1153&&(this['_balloon']['add']({'view':_0x2d1153,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x517c89=this['editor']['editing'],_0x2bc9bf=this['_getChangeFromId'](_0x2d1153['changeId']);let _0x1bbcc5;if(_0x2bc9bf['data']['isOnRoot']){const _0x1b9559=_0x517c89['view']['getDomRoot'](_0x2bc9bf['rootName']);_0x1bbcc5=Array['from'](_0x1b9559['getClientRects']());}else{const _0x8320a=this['editor']['model']['markers']['get']('revision:'+_0x2d1153['changeId']);_0x1bbcc5=Array['from'](_0x517c89['mapper']['markerNameToElements'](_0x8320a['name']))['map'](_0x5f1005=>_0x517c89['view']['domConverter']['mapViewToDom'](_0x5f1005))['map'](_0x2361aa=>Array['from'](_0x2361aa['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x1bbcc5[0x0];return _0x1bbcc5['find'](_0x1b17be=>_0x1b17be['top']-0x3<=this['_activeViewTarget']['y']&&_0x1b17be['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x1b17be['left']-0x3<=this['_activeViewTarget']['x']&&_0x1b17be['right']+0x3>=this['_activeViewTarget']['x'])||_0x1bbcc5[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x49ca26,_0x9b92ee,_0x1c0f55,_0x4f5920)=>{this['activeView']=_0x1c0f55?this['_getViewForChange'](_0x1c0f55):null,this['editor']['model']['change'](()=>{const _0x27ec47=this['editor']['editing'];_0x4f5920&&(_0x4f5920['data']['isOnRoot']?_0x27ec47['view']['change'](_0x219414=>{_0x219414['removeClass']('ck-revision-history-root--active',_0x27ec47['view']['document']['getRoot'](_0x4f5920['rootName']));}):_0x27ec47['reconvertMarker']('revision:'+_0x4f5920['id'])),_0x1c0f55&&(_0x1c0f55['data']['isOnRoot']?_0x27ec47['view']['change'](_0x3b0d27=>{_0x3b0d27['addClass']('ck-revision-history-root--active',_0x27ec47['view']['document']['getRoot'](_0x1c0f55['rootName']));}):_0x27ec47['reconvertMarker']('revision:'+_0x1c0f55['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x13e2b1,_0x594ecd)=>{if(this['activeChange'])return;const _0x3a9d1c=this['_findChangeIdFromDomTarget'](_0x594ecd['target']),_0x533a79=this['_changeIdToChange']['get'](_0x3a9d1c);_0x533a79?(this['_activeViewTarget']={'x':_0x594ecd['domEvent']['x'],'y':_0x594ecd['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x533a79)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x34ae5a,_0x24159b)=>{const _0x90d49c=this['_findChangeIdFromDomTarget'](_0x24159b['target']),_0x309ce0=this['_changeIdToChange']['get'](_0x90d49c);_0x309ce0?(this['_activeViewTarget']={'x':_0x24159b['domEvent']['x'],'y':_0x24159b['domEvent']['y']},_0x309ce0===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x309ce0):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x44f9e1){do{const _0x3232fb=_0x44f9e1['getAttribute']('data-change-id');if(_0x3232fb)return _0x3232fb;_0x44f9e1=_0x44f9e1['parent'];}while(_0x44f9e1);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x5d46ea=>{for(const _0x266c2e of this['editor']['model']['markers'])_0x5d46ea['removeMarker'](_0x266c2e);});}}function _t(_0x20f379,_0x49fb84){return(_0x2a0cc8,_0x45e825,_0x147be9)=>{if(!_0x147be9['consumable']['test'](_0x45e825['markerRange'],_0x2a0cc8['name']))return;const _0xb1e4c0=_0x45e825['markerRange']['getWalker'](),_0x4af739=_0x45e825['markerRange']['start'],_0x202cee=_0x20f379['model']['schema'];let _0x31c0a0=null,_0x4331f9=null,_0x3f36d5=!0x1,_0x5a695f=!0x1;for(const _0x6ad58c of _0xb1e4c0){const _0x37dafa=_0x6ad58c['item'];_0x3f36d5=_0x3f36d5||_0x202cee['isContent'](_0x37dafa);const _0x4b993e=_0x147be9['mapper']['toViewElement'](_0x37dafa);if(_0x4b993e&&_0x4b993e['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x6ad58c['type']&&(_0x202cee['isBlock'](_0x37dafa)&&!_0x202cee['isLimit'](_0x37dafa)&&(_0x37dafa['nextSibling']||_0x4af739['isAtEnd']?_0x31c0a0&&_0x31c0a0['parent']==_0x37dafa||(_0x31c0a0=_0x37dafa,_0x94cf98(_0x6ad58c['previousPosition']),_0x5a695f=!0x0):_0x4331f9=_0x4331f9||_0x6ad58c['previousPosition']));}function _0x94cf98(_0xf7ea09){const _0x16ccf7=_0x147be9['mapper']['toViewPosition'](_0xf7ea09),_0xe74a0e=_0x147be9['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x49fb84});_0x147be9['writer']['insert'](_0x16ccf7,_0xe74a0e),_0x147be9['mapper']['bindElementToMarker'](_0xe74a0e,_0x45e825['markerName']);}_0x3f36d5||_0x5a695f||!_0x4331f9||_0x94cf98(_0x4331f9);};}class RestoreRevisionCommand extends _0x25b174{constructor(_0x2ceef1){super(_0x2ceef1);const _0x5042f3=_0x2ceef1['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x5042f3,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x5042f3,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x3c14eb=this['editor'],_0x3042ca=_0x3c14eb['plugins']['get'](RevisionViewer),_0x3c0f47=_0x3042ca['isReady']?_0x3042ca['diff']['newRevisionId']:null;_0x3c14eb['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x3c0f47);}['refresh'](){const {isReady:_0x54f185,isEnabled:_0x335832,repository:_0x169616,diff:_0x349c49}=this['editor']['plugins']['get'](RevisionViewer),_0x3714d6=_0x349c49&&_0x169616['getLaterVisibleRevision'](_0x349c49['newRevisionId']);this['isEnabled']=_0x54f185&&_0x335832&&Boolean(_0x3714d6);}}class ShowChangeCommand extends _0x25b174{['_step'];constructor(_0x3af8c5,{direction:_0x33af63}){super(_0x3af8c5);const _0x32e421=_0x3af8c5['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0x33af63?0x1:-0x1,this['listenTo'](_0x32e421,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x32e421,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x32e421,'change:activeChange',()=>this['refresh']());}['execute'](){const _0xd0f723=this['editor'],_0xfd4d1d=_0xd0f723['plugins']['get'](RevisionViewer),{isNavigationMode:_0x52a1e2,currentChangeNumber:_0x2bebaf}=_0xfd4d1d;let _0x4d58f5;if(_0xfd4d1d['activeChange']=_0x52a1e2?_0xfd4d1d['diff']['changes']['get'](_0x2bebaf+this['_step']):_0xfd4d1d['diff']['changes']['first'],_0xfd4d1d['activeChange']['data']['isOnRoot'])_0x4d58f5=_0xd0f723['editing']['view']['getDomRoot'](_0xfd4d1d['activeChange']['rootName']);else{const _0x4901d4=_0xd0f723['model']['markers']['get']('revision:'+_0xfd4d1d['activeChange']['id']);_0x4d58f5=_0x1d3e7d(_0xd0f723['editing'],_0x4901d4);}_0x17cc9f({'target':_0x4d58f5,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x2a5277,currentChangeNumber:_0xaacaba,numberOfChanges:_0x5ed73a,isReady:_0xeee4da,isEnabled:_0x589d54}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x589d54&&_0xeee4da&&_0x5ed73a)&&(!_0x2a5277||(0x1===this['_step']?_0xaacaba<_0x5ed73a-0x1:_0xaacaba>0x0));}}class ChangesNavigationView extends _0x39c569{constructor(_0x41985a){super(_0x41985a);const _0x10493d=this['bindTemplate'],_0x676904=new _0x3296a8(_0x41985a),_0x4628ea=new _0x3296a8(_0x41985a);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',(_0x1178b8,_0x33f0f7)=>_0x1178b8&&_0x33f0f7>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x23aedf,_0x2190f9,_0x4ce21,_0x1282e6)=>{if(!_0x23aedf)return ft(_0x41985a,'Loading...');if(!_0x4ce21)return ft(_0x41985a,'No\x20changes');const _0x485767=ft(_0x41985a,'NUMBER_OF_CHANGES',_0x4ce21);return _0x1282e6?ft(_0x41985a,'X_OF_Y_CHANGES',[_0x2190f9+0x1,_0x4ce21]):_0x485767;}),_0x676904['set']({'label':ft(_0x41985a,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x396732}),_0x4628ea['set']({'label':ft(_0x41985a,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x3e48c0}),_0x676904['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x4628ea['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x676904['on']('execute',()=>this['fire']('execute','backward')),_0x4628ea['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',_0x10493d['if']('_isStatusLabelVisible','ck-hidden',_0x11a2f4=>!_0x11a2f4)]},'children':[{'text':_0x10493d['to']('isNavigationMode',_0x59125b=>_0x59125b?ft(_0x41985a,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x41985a,'Total')+':\x20')}]},{'text':_0x10493d['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x676904,_0x4628ea]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x18ed42{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x7b27b2=this['editor']['editing']['view'];_0x7b27b2['change'](_0x2a22c3=>{for(const _0x335436 of _0x7b27b2['document']['roots'])_0x2a22c3['addClass'](yt,_0x335436);});}['hide'](){const _0x2c73be=this['editor']['editing']['view'];_0x2c73be['change'](_0x34fe94=>{for(const _0x909e70 of _0x2c73be['document']['roots'])_0x34fe94['removeClass'](yt,_0x909e70);});}}class RevisionViewerUI extends _0x18ed42{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x5359e4=this['editor'],_0xbcbed4=_0x5359e4['plugins']['get'](RevisionViewer),_0x4ab7f7=_0x5359e4['plugins']['get'](RevisionViewerLoadingOverlay);_0x5359e4['ui']['componentFactory']['add']('exitToEditing',_0x5be2cc=>{const _0x3c5469=new _0x3296a8(_0x5be2cc);return _0x3c5469['set']({'label':ft(_0x5be2cc,'Back\x20to\x20editing'),'icon':_0x54f965,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3c5469,'execute',()=>{_0x5359e4['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3c5469;}),_0x5359e4['ui']['componentFactory']['add']('restoreRevision',_0x8168d8=>{const _0x200fc5=new _0x3296a8(_0x8168d8);return _0x200fc5['set']({'label':ft(_0x8168d8,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x200fc5['bind']('isEnabled')['to'](_0x5359e4['commands']['get']('restoreRevision')),this['listenTo'](_0x200fc5,'execute',()=>_0x5359e4['execute']('restoreRevision')),_0x200fc5;}),_0x5359e4['ui']['componentFactory']['add']('changesNavigation',_0x3af795=>{const _0x397e0e=new ChangesNavigationView(_0x3af795),_0x29cdc8=_0x5359e4['commands']['get']('showPreviousChange'),_0x469fd8=_0x5359e4['commands']['get']('showNextChange');return _0x397e0e['bind']('isBackwardNavigationEnabled')['to'](_0x29cdc8,'isEnabled'),_0x397e0e['bind']('isForwardNavigationEnabled')['to'](_0x469fd8,'isEnabled'),_0x397e0e['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0xbcbed4),this['listenTo'](_0x397e0e,'execute',(_0xb39fff,_0x436b09)=>{_0x5359e4['execute']('forward'===_0x436b09?'showNextChange':'showPreviousChange');}),_0x397e0e;}),_0x4ab7f7['show'](),_0xbcbed4['on']('change:isReady',(_0x405a94,_0x42b432,_0xa1548f)=>{_0xa1548f?_0x4ab7f7['hide']():_0x4ab7f7['show']();});}}class RevisionNameView extends _0x321730{['_resizeObserver']=null;constructor(_0x3fb0b6,_0x183fd3){super(_0x3fb0b6,_0x183fd3);const _0x11a72b=this['bindTemplate'];this['set']({'label':ft(_0x3fb0b6,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x3fb0b6,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x11a72b['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x122c77(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x4aa743=this['fieldView']['element'];this['_tooltipString']=_0x4aa743['scrollWidth']>_0x4aa743['clientWidth']&&_0x4aa743['value']||'';}}class RevisionAuthorView extends _0x39c569{constructor(_0x2adec2,_0x1f92d0,_0x16f381){super(_0x2adec2);const _0x504b35=new nt();_0x504b35['set']({'content':_0x580980,'viewBox':'0\x200\x2011\x2010'});const _0x67855b=['ck','ck-revision-history-sidebar__revision-author'];_0x16f381&&_0x67855b['push']('ck-revision-history-sidebar__revision-author_creator');const _0x37e601=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x2adec2,_0x16f381?'Revision\x20creator':'Revision\x20author')},'children':[_0x504b35,_0x1f92d0['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x67855b},'children':_0x37e601});}}function Rt(_0x3d0644,_0x504ce0){const _0x1575ee=_0x3d0644['bindTemplate'],_0x579887=_0x3d0644['locale'],_0x5c70de=_0x38d1cc(_0x579887);_0x5c70de['panelPosition']='sw';const _0x1c7dbf=function(_0x4f8f7f,_0x327cb2){const _0x1614c5=function(_0x25e52a,_0x4eab0f){const _0x37432e=_0x25e52a['locale'],_0x3a5851={'Compare\x20against\x20selected':ft(_0x37432e,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x37432e,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x37432e,'Restore\x20this\x20revision')};return _0x4eab0f['map'](_0x5a5cb0=>{const _0x327f06=_0x3a5851[_0x5a5cb0['name']];return _0x327f06&&_0x327f06!==_0x5a5cb0['name']&&(_0x5a5cb0['name']=_0x327f06),_0x5a5cb0;});}(_0x4f8f7f,_0x327cb2),_0x395fdd=new _0x12a0e4();for(const _0x2c4ca4 of _0x1614c5){const _0x444e09={'type':'button','model':new rt({'label':_0x2c4ca4['name'],'class':_0x2c4ca4['class'],'withText':!0x0,'role':'menuitem','_action':_0x2c4ca4['action']})};_0x444e09['model']['bind']('isEnabled')['to'](_0x4f8f7f,'isActionsDropdownOpen',_0x1011cc=>'function'!=typeof _0x2c4ca4['isEnabled']||(!_0x1011cc||_0x2c4ca4['isEnabled'](_0x4f8f7f))),_0x395fdd['add'](_0x444e09);}return _0x395fdd;}(_0x3d0644,_0x504ce0);return _0x3d0644['bind']('isActionsDropdownOpen')['to'](_0x5c70de,'isOpen'),_0x5c70de['buttonView']['set']({'label':ft(_0x579887,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x131dec}),_0x5c70de['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x1575ee['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x1575ee['to'](_0x3486c1=>_0x3486c1['stopPropagation']())}}),_0x5c70de['on']('execute',_0x54b071=>{_0x3d0644['isReady']&&'function'==typeof _0x54b071['source']['_action']&&_0x54b071['source']['_action'](_0x3d0644);}),ot(_0x5c70de,_0x1c7dbf,{'role':'menu'}),_0x5c70de['listenTo'](_0x3d0644,'change:isActionsDropdownOpen',(_0x256db9,_0x295fbd,_0x41ab84)=>{if(_0x41ab84)for(const _0x4f15e5 of _0x5c70de['listView']['items']){const _0x40f0c3=_0x4f15e5['children']['first'],_0x573e8c=_0x504ce0['find'](_0x35d6ac=>_0x35d6ac['action']===_0x40f0c3['_action'])['isVisible'];_0x4f15e5['isVisible']=void 0x0===_0x573e8c||_0x573e8c(_0x3d0644);}}),_0x5c70de;}class RevisionView extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
23
|
+
import{ObservableMixin as _0x5f230a,uid as _0x2d6fd8,Collection as _0x1224a0,logWarning as _0xefa158,FocusTracker as _0x4b88e3,KeystrokeHandler as _0x5c26bb,scrollViewportToShowTarget as _0x1e751e,ResizeObserver as _0x3d48f7,ElementReplacer as _0x1e439a,CKEditorError as _0x3684f0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{cloneDeep as _0x531982,set as _0x25f1fc,unset as _0x2b045d,isEqual as _0x2bf393}from'es-toolkit/compat';import{Plugin as _0x4c1791,PendingActions as _0x4daa0a,Command as _0x323c1f,ElementApiMixin as _0x56a52b,Editor as _0x6aac53}from'@ckeditor/ckeditor5-core/dist/index.js';import{Users as _0x48a34e,getMarkerDomElement as _0x3ee994,ConfirmMixin as _0x20e358,sanitizeEditorConfig as _0x505333}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{ViewContainerElement as _0x2dbd6b,ViewAttributeElement as _0x44e60f,ViewEmptyElement as _0x4422b1,ViewRawElement as _0x429ee7,ViewUIElement as _0x5af715,ViewDocumentFragment as _0x2ad0df,ViewText as _0x5330b1,ViewElement as _0x9d29a5,ModelElement as _0x4052b4,ModelRange as _0x5cfc88,ModelPosition as _0x627322,ModelDocumentFragment as _0x54af68,ModelText as _0x354290}from'@ckeditor/ckeditor5-engine/dist/index.js';import{IconHistory as _0x3e8fab,IconChevronUp as _0x319b79,IconChevronDown as _0x2d3c17,IconUndo as _0x11cf6a,IconUser as _0x591bb9,IconThreeVerticalDots as _0x2b6cdd}from'@ckeditor/ckeditor5-icons/dist/index.js';import{CssTransitionDisablerMixin as _0x58cdae,View as _0xb27066,submitHandler as _0x6530a,LabeledFieldView as _0x3dc991,createLabeledInputText as _0x110003,createDropdown as _0xaaea9b,ListView as _0x512836,ListItemView as _0xa9b4cb,ButtonView as _0x1b24ae,MenuBarMenuView as _0x185148,MenuBarMenuListView as _0x430aef,MenuBarMenuListItemView as tt,MenuBarMenuListItemButtonView as it,ContextualBalloon as et,ToolbarSeparatorView as st,IconView as nt,addListToDropdown as ot,UIModel as rt,EditorUI as at,normalizeToolbarConfig as ht,BoxedEditorUIView as ct,StickyPanelView as lt,ToolbarView as ut,InlineEditableUIView as dt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{DateTime as vt}from'luxon';class Revision extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x5f230a(){['id'];['creator'];['authors'];['diffData'];['toVersion'];['fromVersion'];['model'];constructor(_0x4aa323){super(),this['id']=_0x4aa323['id']||_0x2d6fd8(),this['creator']=_0x4aa323['creator']||null,this['authors']=_0x4aa323['authors']||[],this['diffData']=_0x4aa323['diffData']||null,this['toVersion']=_0x4aa323['toVersion']||0x0,this['fromVersion']=_0x4aa323['fromVersion']||0x0,this['set']('name',_0x4aa323['name']||''),this['set']('createdAt',_0x4aa323['createdAt']||new Date()),this['set']('attributes',_0x4aa323['attributes']||{});}['setName'](_0x4cd5e0){this['_update']({'name':_0x4cd5e0});}['setAttribute'](_0x49ed16,_0x14b546){const _0x297b3c=_0x531982(this['attributes']);_0x25f1fc(_0x297b3c,_0x49ed16,_0x14b546),this['_update']({'attributes':_0x297b3c});}['removeAttribute'](_0x3d4da6){const _0x476038=_0x531982(this['attributes']);_0x2b045d(_0x476038,_0x3d4da6),this['_update']({'attributes':_0x476038});}['_update'](_0x4655e0,_0x58568e=!0x1){let _0xce9280=!0x1;const _0xbce1bc={'id':this['id']},_0x50d158=['name','createdAt','diffData','authors','attributes','toVersion','fromVersion','creatorId'];for(const _0x53d466 of _0x50d158){const _0x4e1dfc=_0x4655e0[_0x53d466];void 0x0!==_0x4e1dfc&&_0x4e1dfc!==this[_0x53d466]&&(this[_0x53d466]=_0x4e1dfc,_0xbce1bc[_0x53d466]=_0x4e1dfc,_0xce9280=!0x0);}_0xce9280&&(_0xbce1bc['authors']&&(_0xbce1bc['authorsIds']=_0xbce1bc['authors']['map'](_0x2ec7ec=>_0x2ec7ec['id']),delete _0xbce1bc['authors']),this['fire']('_update',_0xbce1bc,_0x58568e));}['toJSON'](){return{'id':this['id'],'name':this['name'],'creatorId':this['creator']?this['creator']['id']:null,'authorsIds':this['authors']['map'](_0x3b2bee=>_0x3b2bee['id']),'diffData':this['diffData'],'createdAt':this['createdAt'],'attributes':this['attributes'],'fromVersion':this['fromVersion'],'toVersion':this['toVersion']};}}class RevisionsRepository extends _0x4c1791{['_revisions'];static get['requires'](){return[_0x48a34e];}static get['pluginName'](){return'RevisionsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['length'](){return this['_revisions']['length'];}constructor(_0x4fdad5){super(_0x4fdad5),this['_revisions']=new _0x1224a0();}['afterInit'](){!async function(_0x463011){const _0x4d8d36=_0x17e474([0x76,0x73,0x6d,0x4c,0x34,0x54,0x50,0x70,0x75,0x52,0x35,0x33,0x4d,0x6c,0x71,0x53,0x6a,0x32,0x56,0x58,0x77,0x48,0x39,0x6f,0x45,0x41,0x4e,0x38,0x46,0x78,0x4a,0x74,0x47,0x55,0x4f,0x64,0x62,0x44,0x43,0x5a,0x30,0x31,0x69,0x68,0x79,0x66,0x6b,0x42,0x51,0x59,0x36,0x61,0x63,0x67,0x7a,0x37,0x72,0x49,0x65,0x57,0x4b,0x6e]),_0x125fb0=0xeb829,_0x36718a=0x359e09b0,_0x3e38ac=0x35998208^_0x36718a,_0x936f3=window[_0x17e474([0x44,0x61,0x74,0x65])][_0x17e474([0x6e,0x6f,0x77])](),_0x1ab0a7=_0x463011[_0x17e474([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x800d1a=new window[(_0x17e474([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x23c86a=>{_0x1ab0a7[_0x17e474([0x6f,0x6e,0x63,0x65])](_0x17e474([0x72,0x65,0x61,0x64,0x79]),_0x23c86a);}),_0x3547a6={[_0x17e474([0x6b,0x74,0x79])]:_0x17e474([0x45,0x43]),[_0x17e474([0x75,0x73,0x65])]:_0x17e474([0x73,0x69,0x67]),[_0x17e474([0x63,0x72,0x76])]:_0x17e474([0x50,0x2d,0x32,0x35,0x36]),[_0x17e474([0x78])]:_0x17e474([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]),[_0x17e474([0x79])]:_0x17e474([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]),[_0x17e474([0x61,0x6c,0x67])]:_0x17e474([0x45,0x53,0x32,0x35,0x36])},_0x23c136=_0x1ab0a7[_0x17e474([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x17e474([0x67,0x65,0x74])](_0x17e474([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x18f393(){let _0x5899bd,_0x312b33=null,_0xa89ca3=null;try{if(_0x23c136==_0x17e474([0x47,0x50,0x4c]))return _0x17e474([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5899bd=_0x2af01(),!_0x5899bd)return _0x17e474([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5899bd[_0x17e474([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xa89ca3=_0x3f5daa(_0x5899bd[_0x17e474([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5899bd[_0x17e474([0x6a,0x74,0x69])])),await _0x133759()?_0x29da75()?_0x16859a()?_0x17e474([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x3c1e9f()?(_0x5899bd[_0x17e474([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x17e474([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x312b33=_0x1b4a26(_0x17e474([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1e4322()):_0x17e474([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x17e474([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x17e474([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x17e474([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x16859a(){const _0x44758c=[_0x17e474([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x17e474([0x74,0x72,0x69,0x61,0x6c])][_0x17e474([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5899bd[_0x17e474([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x936f3/0x3e8:0xe10*_0x3e38ac;return _0x5899bd[_0x17e474([0x65,0x78,0x70])]<_0x44758c;}function _0x29da75(){const _0x5b9317=_0x5899bd[_0x17e474([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5b9317)return!0x1;if(_0x5b9317[_0x17e474([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x17e474([0x2a])))return!0x0;if(_0x5b9317[_0x17e474([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x17e474([0x52,0x48])))return!0x0;if(_0x5b9317[_0x17e474([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x17e474([0x52,0x52,0x48]))){if(_0x2f456a())return!0x0;if(_0x370d0c()||_0x9fd755())return!0x0;}return!0x1;}function _0x3c1e9f(){const _0x324ba8=_0x5899bd[_0x17e474([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x324ba8||0x0==_0x324ba8[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5d9802}=new URL(window[_0x17e474([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x324ba8[_0x17e474([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5d9802))return!0x0;const _0x25185e=_0x5d9802[_0x17e474([0x73,0x70,0x6c,0x69,0x74])](_0x17e474([0x2e]));return _0x324ba8[_0x17e474([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x503f59=>_0x503f59[_0x17e474([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x17e474([0x2a])))[_0x17e474([0x6d,0x61,0x70])](_0x2b0f10=>_0x2b0f10[_0x17e474([0x73,0x70,0x6c,0x69,0x74])](_0x17e474([0x2e])))[_0x17e474([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2e0921=>_0x2e0921[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x25185e[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x17e474([0x6d,0x61,0x70])](_0x1be6b5=>Array(_0x25185e[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1be6b5[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x17e474([0x66,0x69,0x6c,0x6c])](_0x1be6b5[0x0]===_0x17e474([0x2a])?_0x17e474([0x2a]):'')[_0x17e474([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1be6b5))[_0x17e474([0x73,0x6f,0x6d,0x65])](_0x1d803f=>_0x25185e[_0x17e474([0x65,0x76,0x65,0x72,0x79])]((_0x30e1d3,_0x1bac18)=>_0x1d803f[_0x1bac18]===_0x30e1d3||_0x1d803f[_0x1bac18]===_0x17e474([0x2a])));}function _0x1e4322(){return _0x312b33&&_0xa89ca3?new window[(_0x17e474([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x49881e,_0x8a4150)=>{_0x312b33[_0x17e474([0x74,0x68,0x65,0x6e])](_0x49881e,_0x8a4150),_0xa89ca3[_0x17e474([0x74,0x68,0x65,0x6e])](_0x54c236=>{_0x54c236!=_0x17e474([0x56,0x61,0x6c,0x69,0x64])&&_0x49881e(_0x54c236);},_0x8a4150);}):_0x312b33||_0xa89ca3||_0x17e474([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3f5daa(_0x1d7309,_0x1ead11){return new window[(_0x17e474([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4ed887=>{if(_0x91f4f1())return _0x4ed887(_0x17e474([0x56,0x61,0x6c,0x69,0x64]));_0xc1418d(),_0x1ab0a7[_0x17e474([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x17e474([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x9f1c31=!0x1;const _0x2efab9=_0x2d6fd8();function _0x275f79(_0x3bd8ab){return!!_0x3bd8ab&&(typeof _0x3bd8ab===_0x17e474([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3bd8ab===_0x17e474([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3bd8ab[_0x17e474([0x74,0x68,0x65,0x6e])]===_0x17e474([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3bd8ab[_0x17e474([0x63,0x61,0x74,0x63,0x68])]===_0x17e474([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3a6ea6(_0x11c162){_0x387f0a(_0x11c162)[_0x17e474([0x74,0x68,0x65,0x6e])](_0x3f3565=>{if(!_0x3f3565||_0x3f3565[_0x17e474([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x17e474([0x6f,0x6b]))return _0x17e474([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x52f33f(_0x516eea(_0x2efab9+_0x1ead11))!=_0x3f3565[_0x17e474([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x17e474([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x17e474([0x56,0x61,0x6c,0x69,0x64]);})[_0x17e474([0x74,0x68,0x65,0x6e])](_0x4bb4fd=>(_0x3ffa2a(),_0x4bb4fd),()=>{const _0x1e6fe2=_0x2e163d();return null==_0x1e6fe2?(_0x3ffa2a(),_0x17e474([0x56,0x61,0x6c,0x69,0x64])):_0x17e474(_0x936f3-_0x1e6fe2>(0x11928db0^_0x36718a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x17e474([0x74,0x68,0x65,0x6e])](_0x4ed887)[_0x17e474([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4ed887(_0x17e474([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x38a358=0x35a8e730^_0x36718a;function _0x3ffa2a(){const _0x251110=_0x17e474([0x6c,0x6c,0x63,0x74,0x2d])+_0x52f33f(_0x516eea(_0x1d7309)),_0x18c247=_0x156085(_0x52f33f(window[_0x17e474([0x4d,0x61,0x74,0x68])][_0x17e474([0x63,0x65,0x69,0x6c])](_0x936f3/_0x38a358)));window[_0x17e474([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x17e474([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x251110,_0x18c247);}function _0x2e163d(){const _0x4a0156=_0x17e474([0x6c,0x6c,0x63,0x74,0x2d])+_0x52f33f(_0x516eea(_0x1d7309)),_0x9c8764=window[_0x17e474([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x17e474([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a0156);return _0x9c8764?window[_0x17e474([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x156085(_0x9c8764),0x10)*_0x38a358:null;}function _0x387f0a(_0x128ff4){return new window[(_0x17e474([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x221823,_0x180ab3)=>{_0x128ff4[_0x17e474([0x74,0x68,0x65,0x6e])](_0x221823,_0x180ab3),window[_0x17e474([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x180ab3,0x359fdd70^_0x36718a);});}}_0x1ab0a7[_0x17e474([0x6f,0x6e])](_0x17e474([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x54ccef,_0x355965)=>{if(_0x355965[0x0]!=_0x1d7309)return _0x4ed887(_0x17e474([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x355965[0x1]={..._0x355965[0x1],[_0x17e474([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2efab9};},{[_0x17e474([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x17e474([0x68,0x69,0x67,0x68])}),_0x1ab0a7[_0x17e474([0x6f,0x6e])](_0x17e474([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1013f7=>{_0x275f79(_0x1013f7[_0x17e474([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x9f1c31=!0x0,_0x3a6ea6(_0x1013f7[_0x17e474([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x17e474([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x17e474([0x6c,0x6f,0x77])}),_0x800d1a[_0x17e474([0x74,0x68,0x65,0x6e])](()=>{_0x9f1c31||_0x4ed887(_0x17e474([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x91f4f1(){return _0x1ab0a7[_0x17e474([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x17e474([0x76,0x69,0x65,0x77])][_0x17e474([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x17e474([0x61,0x75,0x74,0x6f]);}function _0xc1418d(){_0x1ab0a7[_0x17e474([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x17e474([0x76,0x69,0x65,0x77])][_0x17e474([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x17e474([0x61,0x75,0x74,0x6f]);}}function _0x1b4a26(_0x541f9b){const _0x46b5f5=[new window[(_0x17e474([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x47b8aa=>setTimeout(_0x47b8aa,0x3597377c^_0x36718a)),_0x800d1a[_0x17e474([0x74,0x68,0x65,0x6e])](()=>new window[(_0x17e474([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x14472e=>{const _0x562358=0x359e09b7^_0x36718a,_0x3b2717=_0x463011[_0x17e474([0x5f,0x72,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x73])];function _0x594fb4(){_0x3b2717[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])]>=_0x562358&&_0x14472e();}_0x594fb4(),_0x3b2717[_0x17e474([0x6f,0x6e])](_0x17e474([0x61,0x64,0x64]),_0x594fb4);})),new window[(_0x17e474([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x36b567=>{function _0x582376(){for(const _0x4eab03 in window)if(window[_0x17e474([0x4e,0x75,0x6d,0x62,0x65,0x72])]['isNaN'](window[_0x17e474([0x4e,0x75,0x6d,0x62,0x65,0x72])](_0x4eab03))&&window[_0x4eab03]==_0x125fb0)return _0x36b567();_0x1ab0a7[_0x17e474([0x73,0x74,0x61,0x74,0x65])]!=_0x17e474([0x64,0x65,0x73,0x74,0x72,0x6f,0x79,0x65,0x64])&&window[_0x17e474([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x582376,0x359e1a38^_0x36718a);}_0x287a96(_0x17e474([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))&&_0x582376();})];return window[_0x17e474([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x17e474([0x72,0x61,0x63,0x65])](_0x46b5f5)[_0x17e474([0x74,0x68,0x65,0x6e])](()=>_0x541f9b);}async function _0x5d8167(){if(await _0x800d1a,_0x287a96(_0x17e474([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]))){const _0x36dee2=_0x463011[_0x17e474([0x67,0x65,0x74,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])](0x0),_0x399613=_0x463011[_0x17e474([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])](_0x36dee2[_0x17e474([0x69,0x64])]),_0x271071=_0x5f167c(_0x17e474([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72]));return await _0x271071[_0x17e474([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])](_0x36dee2['id'],_0x399613?_0x399613['id']:null,!0x0),_0x271071[_0x17e474([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x17e474([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x271071[_0x17e474([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x271071[_0x17e474([0x63,0x6f,0x6d,0x70,0x61,0x72,0x65])]=_0x4983bf,void(_0x271071[_0x17e474([0x5f,0x67,0x65,0x74,0x44,0x69,0x66,0x66])]=_0x4983bf);}if(_0x287a96(_0x17e474([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]))){const _0x36df06=_0x5f167c(_0x17e474([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x54,0x72,0x61,0x63,0x6b,0x65,0x72]));_0x36df06[_0x17e474([0x75,0x6e,0x62,0x69,0x6e,0x64])](_0x17e474([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])),_0x36df06[_0x17e474([0x69,0x73,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64])]=!0x1,_0x36df06[_0x17e474([0x75,0x70,0x64,0x61,0x74,0x65])]=_0x4983bf,_0x36df06[_0x17e474([0x73,0x61,0x76,0x65,0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e])]=_0x4983bf;}_0x1ab0a7[_0x17e474([0x6d,0x6f,0x64,0x65,0x6c])][_0x17e474([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4983bf,_0x1ab0a7[_0x17e474([0x6d,0x6f,0x64,0x65,0x6c])][_0x17e474([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4983bf,_0x1ab0a7[_0x17e474([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x17e474([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2f456a(){return _0x287a96(_0x17e474([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5f167c(_0x17e474([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x17e474([0x73,0x74,0x61,0x74,0x65])]==_0x17e474([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x370d0c(){return _0x287a96(_0x17e474([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 _0x9fd755(){return _0x287a96(_0x17e474([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x43d0a5(_0x29a60b){const _0x15f55b=_0x53eb3b();_0x1ab0a7[_0x15f55b]=_0x17e474([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])+_0x29a60b,_0x29a60b[_0x17e474([0x65,0x6e,0x64,0x73,0x57,0x69,0x74,0x68])](_0x17e474([0x4c,0x69,0x6d,0x69,0x74]))&&(window[_0x53eb3b()]=_0x125fb0),_0x29a60b!=_0x17e474([0x56,0x61,0x6c,0x69,0x64])&&_0x5d8167();}function _0x53eb3b(){const _0x346b24=window[_0x17e474([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x17e474([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x17e474([0x6e,0x6f,0x77])]())[_0x17e474([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x17e474([0x2e]),'');let _0x51a028=_0x17e474([0x76]);for(let _0xa99a68=0x0;_0xa99a68<_0x346b24[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xa99a68+=0x2){let _0xb91487=window[_0x17e474([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x346b24[_0x17e474([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xa99a68,_0xa99a68+0x2));_0xb91487>=_0x4d8d36[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xb91487-=_0x4d8d36[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x51a028+=_0x4d8d36[_0xb91487];}return _0x51a028;}function _0x2af01(){const _0x2c6069=_0x23c136[_0x17e474([0x73,0x70,0x6c,0x69,0x74])](_0x17e474([0x2e]));if(0x3!=_0x2c6069[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x66cebb(_0x2c6069[0x1]);function _0x66cebb(_0x2f4452){const _0x144a8e=_0x20cc43(_0x2f4452);return _0x144a8e&&_0x4299ea()?_0x144a8e:null;function _0x4299ea(){const _0xc8a8a9=_0x144a8e[_0x17e474([0x6a,0x74,0x69])],_0x3ad73f=window[_0x17e474([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xc8a8a9[_0x17e474([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc8a8a9[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x519f1f={..._0x144a8e,[_0x17e474([0x6a,0x74,0x69])]:_0xc8a8a9[_0x17e474([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xc8a8a9[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x519f1f[_0x17e474([0x76,0x63])],_0x516eea(_0x519f1f)==_0x3ad73f;}}}async function _0x133759(){let _0x433baf=!0x0;try{const _0x277748=_0x23c136[_0x17e474([0x73,0x70,0x6c,0x69,0x74])](_0x17e474([0x2e])),[_0x47b0c4,_0x40a6a5,_0x4a0c1b]=_0x277748;return _0x3613d6(_0x47b0c4),await _0x3c6782(_0x47b0c4,_0x40a6a5,_0x4a0c1b),_0x433baf;}catch{return!0x1;}function _0x3613d6(_0x5cdc1f){const _0x400f6f=_0x20cc43(_0x5cdc1f);_0x400f6f&&_0x400f6f[_0x17e474([0x61,0x6c,0x67])]==_0x17e474([0x45,0x53,0x32,0x35,0x36])||(_0x433baf=!0x1);}async function _0x3c6782(_0x2bc847,_0xef9056,_0x3c0ad3){const _0x42d89e=window[_0x17e474([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x17e474([0x66,0x72,0x6f,0x6d])](_0x2fc4a7(_0x3c0ad3),_0x1e55df=>_0x1e55df[_0x17e474([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2811a7=new window[(_0x17e474([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x17e474([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2bc847+_0x17e474([0x2e])+_0xef9056),_0x189878=window[_0x17e474([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x17e474([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x189878)return;const _0x33c973=await _0x189878[_0x17e474([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x17e474([0x6a,0x77,0x6b]),_0x3547a6,{[_0x17e474([0x6e,0x61,0x6d,0x65])]:_0x17e474([0x45,0x43,0x44,0x53,0x41]),[_0x17e474([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x17e474([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x17e474([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x189878[_0x17e474([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x17e474([0x6e,0x61,0x6d,0x65])]:_0x17e474([0x45,0x43,0x44,0x53,0x41]),[_0x17e474([0x68,0x61,0x73,0x68])]:{[_0x17e474([0x6e,0x61,0x6d,0x65])]:_0x17e474([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x33c973,_0x42d89e,_0x2811a7)||(_0x433baf=!0x1);}}function _0x20cc43(_0x26085e){return _0x26085e[_0x17e474([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x17e474([0x65,0x79]))?JSON[_0x17e474([0x70,0x61,0x72,0x73,0x65])](_0x2fc4a7(_0x26085e)):null;}function _0x2fc4a7(_0x38b9ae){return window[_0x17e474([0x61,0x74,0x6f,0x62])](_0x38b9ae[_0x17e474([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x17e474([0x2b]))[_0x17e474([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x17e474([0x2f])));}function _0x516eea(_0x3e7315){let _0x329eeb=0x1505;function _0x1c4c5e(_0x2037fa){for(let _0x13ab88=0x0;_0x13ab88<_0x2037fa[_0x17e474([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x13ab88++){const _0x491617=_0x2037fa[_0x17e474([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x13ab88);_0x329eeb=(_0x329eeb<<0x5)+_0x329eeb+_0x491617,_0x329eeb&=_0x329eeb;}}function _0x57db41(_0x44de19){Array[_0x17e474([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x44de19)?_0x44de19[_0x17e474([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x57db41):_0x44de19&&typeof _0x44de19==_0x17e474([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x17e474([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x44de19)[_0x17e474([0x73,0x6f,0x72,0x74])]()[_0x17e474([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3c8a4f,_0xc6b367])=>{_0x1c4c5e(_0x3c8a4f),_0x57db41(_0xc6b367);}):_0x1c4c5e(window[_0x17e474([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x44de19));}return _0x57db41(_0x3e7315),_0x329eeb>>>0x0;}function _0x52f33f(_0x37cc26){return _0x37cc26[_0x17e474([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x17e474([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x17e474([0x30]));}function _0x156085(_0x584327){return _0x584327[_0x17e474([0x73,0x70,0x6c,0x69,0x74])]('')[_0x17e474([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x17e474([0x6a,0x6f,0x69,0x6e])]('');}function _0x287a96(_0x454bcd){return _0x1ab0a7[_0x17e474([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x17e474([0x68,0x61,0x73])](_0x454bcd);}function _0x5f167c(_0x510f49){return _0x1ab0a7[_0x17e474([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x17e474([0x67,0x65,0x74])](_0x510f49);}function _0x4983bf(){}function _0x17e474(_0x12a4e7){return _0x12a4e7['map'](_0x9ca815=>String['fromCharCode'](_0x9ca815))['join']('');}_0x43d0a5(await _0x18f393());}(this);}['createRevision'](_0x24bf8d){const _0x4bc6a2=this['editor']['plugins']['get']('Users');return new Revision({'id':_0x24bf8d['id'],'name':_0x24bf8d['name'],'creator':_0x24bf8d['creatorId']?_0x4bc6a2['getUser'](_0x24bf8d['creatorId']):null,'diffData':_0x24bf8d['diffData']||_0x24bf8d['data'],'authors':_0x24bf8d['authorsIds']['map'](_0x28d523=>_0x4bc6a2['getUser'](_0x28d523)),'createdAt':new Date(_0x24bf8d['createdAt']),'attributes':_0x24bf8d['attributes'],'fromVersion':_0x24bf8d['fromVersion'],'toVersion':_0x24bf8d['toVersion']});}['addRevision'](_0x518a20,_0x8ea72f=0x0){this['_revisions']['add'](_0x518a20,_0x8ea72f);}['getRevision'](_0x3bcae5){return this['_revisions']['get'](_0x3bcae5);}['getRevisions'](_0x57ac3b={'toJSON':!0x1}){const _0x259a57=Array['from'](this['_revisions']);return _0x259a57['reverse'](),_0x57ac3b['toJSON']?_0x259a57['map'](_0x527cfb=>_0x527cfb['toJSON']()):_0x259a57;}['getIndex'](_0x95d44b){return this['_revisions']['getIndex'](_0x95d44b);}['getEarlierVisibleRevision'](_0x5b1cc6){const [,_0x213f95]=this['getRevisionsIterator'](_0x5b1cc6,{'direction':'earlier'});return _0x213f95;}['getLaterVisibleRevision'](_0x3264b3){const [,_0x2791de]=this['getRevisionsIterator'](_0x3264b3,{'direction':'later'});return _0x2791de;}['getRevisionsInDiff'](_0x2b4fa0){const _0x43cbe7=[];for(const _0x5abc7c of this['getRevisionsIterator'](_0x2b4fa0['newRevisionId']))if(_0x43cbe7['push'](_0x5abc7c),_0x5abc7c['id']===_0x2b4fa0['oldRevisionId'])break;return _0x43cbe7;}*['getRevisionsIterator'](_0x22cf98,{direction:_0x57bf13='earlier',filter:_0x35280f=()=>!0x0}={}){const _0x525c19='earlier'===_0x57bf13?0x1:-0x1;let _0xa2ecd5=this['_revisions']['get'](_0x22cf98),_0x10d0ca=this['getIndex'](_0xa2ecd5);for(yield _0xa2ecd5;_0xa2ecd5;){if(_0x10d0ca+=_0x525c19,_0xa2ecd5=this['getRevision'](_0x10d0ca),!_0xa2ecd5)return;_0x35280f(_0xa2ecd5)&&(yield _0xa2ecd5);}}}class RevisionHistoryUtils extends _0x4c1791{static get['pluginName'](){return'RevisionHistoryUtils';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['_viewClassToTypeChar']=new Map([[_0x2dbd6b,'c'],[_0x44e60f,'a'],[_0x4422b1,'e'],[_0x429ee7,'r'],[_0x5af715,'u']]);['_typeCharToViewClass']=new Map([['c',_0x2dbd6b],['a',_0x44e60f],['e',_0x4422b1],['r',_0x429ee7],['u',_0x5af715]]);async['loadRevisionData'](_0x2f79b5,_0xc05254){if(_0x2f79b5['diffData']||!_0xc05254)return;const _0x3eb933=this['editor']['config']['get']('collaboration.channelId'),_0x453386=await _0xc05254['getRevision']({'channelId':_0x3eb933,'revisionId':_0x2f79b5['id']});_0x2f79b5['diffData']=_0x453386['diffData'];}['getRevisionDocumentData'](_0x285d04){const _0x5ea559={};for(const _0xfbe7 in _0x285d04['diffData']){if(_0x285d04['diffData'][_0xfbe7]['attachChange']&&!_0x285d04['diffData'][_0xfbe7]['attachChange']['isAttached'])continue;const _0x53c64a=this['_removeRevisionMarkers'](JSON['parse'](_0x285d04['diffData'][_0xfbe7]['insertions'])),_0x22e91c=this['editor']['editing']['view']['document'],_0x518041=new _0x2ad0df(_0x22e91c,_0x53c64a['map'](_0x5ad449=>this['_getViewFromDiffObj'](_0x5ad449,!0x1)));this['editor']['data']['processor']['useFillerType']('marked'),_0x5ea559[_0xfbe7]=this['editor']['data']['processor']['toData'](_0x518041),this['editor']['data']['processor']['useFillerType']('default');}return _0x5ea559;}['getRevisionRootsAttributes'](_0x417f41){const _0xd5aca7={};for(const _0x4951a4 in _0x417f41['diffData'])_0x417f41['diffData'][_0x4951a4]['attachChange']&&!_0x417f41['diffData'][_0x4951a4]['attachChange']['isAttached']||(_0xd5aca7[_0x4951a4]=_0x417f41['diffData'][_0x4951a4]['attributesAfter']||{});return _0xd5aca7;}['getRevisionRootsModelElements'](_0x939b6){const _0x443466={};for(const _0x2e2f5f in _0x939b6['diffData']){if(_0x939b6['diffData'][_0x2e2f5f]['attachChange']&&!_0x939b6['diffData'][_0x2e2f5f]['attachChange']['isAttached'])continue;const _0x17e138=_0x939b6['diffData'][_0x2e2f5f]['rootElementName'];_0x17e138&&(_0x443466[_0x2e2f5f]=_0x17e138);}return _0x443466;}['_getTypeCharForViewElement'](_0x180b73){return this['_viewClassToTypeChar']['get'](_0x180b73['constructor']);}['_getViewFromDiffObj'](_0x411b78,_0x6b5484){const _0x30ddbb=this['editor']['editing']['view']['document'];if('string'==typeof _0x411b78)return new _0x5330b1(_0x30ddbb,_0x411b78);{let _0x442292,_0x5df528;_0x5df528='u'==_0x411b78['type']||'r'==_0x411b78['type']?[]:_0x411b78['children']['map'](_0x4e6e70=>this['_getViewFromDiffObj'](_0x4e6e70,_0x6b5484));const _0x198bd0=this['_typeCharToViewClass']['get'](_0x411b78['type'])||_0x9d29a5,_0x62c6d1=this['editor']['data']['htmlProcessor']['domConverter'];if(_0x442292=new _0x198bd0(_0x30ddbb,_0x411b78['name'],_0x411b78['attributes'],_0x5df528),'u'==_0x411b78['type']&&_0x411b78['children'][0x0]){const _0xc31763=_0x411b78['children'][0x0];if(_0x442292['render']=function(_0x2f8229){const _0x10e791=_0x2f8229['createElement']('div');return _0x10e791['innerHTML']=_0xc31763,_0x10e791['childNodes'][0x0];},_0x6b5484){const _0x1292ff=new _0x2ad0df(_0x30ddbb);_0x1292ff['_appendChild'](_0x442292);const _0x572f7f=Array['from'](_0x62c6d1['viewChildrenToDom'](_0x1292ff,{'bind':!0x1})),_0x3ace78=_0x62c6d1['domDocument']['createElement']('div');_0x3ace78['append'](..._0x572f7f),_0x442292=Array['from'](_0x62c6d1['domChildrenToView'](_0x3ace78))[0x0];}}else{if('r'==_0x411b78['type']&&_0x411b78['children'][0x0]){const _0x2feb1c=_0x411b78['children'][0x0];if(_0x442292['render']=function(_0x305f56){_0x305f56['innerHTML']=_0x2feb1c;},_0x6b5484){const _0x3b502a=new _0x2ad0df(_0x30ddbb);_0x3b502a['_appendChild'](_0x442292);const _0x1f5a4c=Array['from'](_0x62c6d1['viewChildrenToDom'](_0x3b502a,{'bind':!0x1})),_0x29efa0=_0x62c6d1['domDocument']['createElement']('div');_0x29efa0['append'](..._0x1f5a4c);const _0x457c1c=Array['from'](_0x62c6d1['domChildrenToView'](_0x29efa0));_0x457c1c['length']>0x1?_0x442292['_appendChild'](_0x457c1c):_0x442292=_0x457c1c[0x0];}}}if(_0x411b78['customProperties']){for(const [_0x39d042,_0xb4f424]of _0x411b78['customProperties'])_0x442292['_setCustomProperty'](_0x39d042,_0xb4f424);}const _0x48cf30=void 0x0===_0x411b78['fillerOffset']?null:_0x411b78['fillerOffset'];return null!==_0x48cf30&&(_0x442292['getFillerOffset']=()=>_0x48cf30),_0x442292;}}['_makeModelFromViewString'](_0x10412c,_0x47980){const _0x242659=JSON['parse'](_0x10412c),_0x2dad49=this['editor']['editing']['view']['document'],_0x448075=new _0x2ad0df(_0x2dad49,_0x242659['map'](_0x199eca=>this['_getViewFromDiffObj'](_0x199eca,!0x0))),_0x2389e7=this['editor']['data']['toModel'](_0x448075,_0x47980);return _0x2389e7['name']=_0x47980,_0x2389e7;}['_removeRevisionMarkers'](_0x50f278){return(_0x50f278=_0x50f278['filter'](_0x366439=>!_0x366439['name']||'revision-start'!==_0x366439['name']&&'revision-end'!==_0x366439['name']))['forEach'](_0x4e7e06=>{'string'!=typeof _0x4e7e06&&(_0x4e7e06['children']=this['_removeRevisionMarkers'](_0x4e7e06['children']),_0x4e7e06['attributes']=_0x4e7e06['attributes']['filter'](_0x276060=>!_0x276060[0x0]['startsWith']('data-revision-')));}),_0x50f278;}}function ft(_0x1a62a0,_0x446e0d,_0xede47b){const t=_0x1a62a0['t'];switch(_0x446e0d){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'},_0xede47b);case'X_OF_Y_CHANGES':return t({'string':'%0\x20of\x20%1','id':'X_OF_Y_CHANGES'},_0xede47b);case'Show\x20previous\x20change':return t('Show\x20previous\x20change');case'Show\x20next\x20change':return t('Show\x20next\x20change');case'EDIT_X_OF_Y_REVISIONS':return t({'string':'Edit','id':'EDIT_X_OF_Y_REVISIONS'});case'Total':return t('Total');case'Revision\x20creator':return t('Revision\x20creator');case'Revision\x20author':return t('Revision\x20author');case'Revision\x20name':return t('Revision\x20name');case'Save\x20current\x20revision':return t('Save\x20current\x20revision');case'Accept':return t('Accept');case'Save':return t('Save');case'Cancel':return t('Cancel');case'Name\x20of\x20the\x20revision':return t('Name\x20of\x20the\x20revision');case'optional':return t('optional');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'The\x20revision\x20name\x20cannot\x20be\x20empty.':return t('The\x20revision\x20name\x20cannot\x20be\x20empty.');case'Enter\x20the\x20revision\x20name':return t('Enter\x20the\x20revision\x20name');default:return'';}}class RevisionTracker extends _0x4c1791{['licenseKey'];['_licenseKeyCheckInterval'];['currentRevision']=null;['repository'];['adapter']=null;['_revisionDataBuilder'];['_source'];['_initialRevisionId'];['_bufferedUpdates'];['_utils'];['_pendingAction'];['_continueCurrentRevision'];['_startingVersion'];['_loadedStateData'];static get['pluginName'](){return'RevisionTracker';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x48a34e,RevisionsRepository,RevisionHistoryUtils,_0x4daa0a];}constructor(_0x5e1f53){super(_0x5e1f53),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['_revisionDataBuilder']=new RevisionDataBuilder(this['editor']),this['_initialRevisionId']=this['editor']['config']['get']('collaboration.channelId')||'initial',this['_bufferedUpdates']=new Map(),this['_loadedStateData']=null;const _0x52a6e3=_0x2d6fd8();this['_source']={'history':this['editor']['model']['document']['history'],'getLatestVersion':()=>Promise['resolve'](this['editor']['model']['document']['version']),'getCurrentRevisionId':()=>_0x52a6e3},this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['set']('_isPendingUpdate',!0x1),this['editor']['config']['define']('revisionHistory.resumeUnsavedRevision',!0x0),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'});}['init'](){this['_setConversion'](),this['editor']['data']['on']('ready',()=>{const _0x3a9ccc=this['repository']['getRevision'](0x0),_0x495f7e=_0x3a9ccc&&null===_0x3a9ccc['creator']?_0x3a9ccc:null;if(this['_continueCurrentRevision']=!!_0x495f7e&&this['editor']['config']['get']('revisionHistory.resumeUnsavedRevision'),this['editor']['plugins']['has']('RealTimeCollaborationClient')){const _0x37b0c5=this['_source']['getCurrentRevisionId'](),_0x33098b=this['repository']['getRevision'](_0x37b0c5);if(_0x33098b)this['_startingVersion']=_0x33098b['fromVersion'],this['_continueCurrentRevision']=!0x1;else{const _0x1c430e=this['_source']['history']['_operations']['find'](_0x467602=>!_0x467602['_isInit']),_0x3db7d8=_0x1c430e?_0x1c430e['baseVersion']:this['_source']['history']['version'];_0x3a9ccc?(_0x3a9ccc['toVersion']<_0x3db7d8&&_0x3a9ccc['_update']({'toVersion':_0x3db7d8}),this['_continueCurrentRevision']?(this['_source']['getCurrentRevisionId']=()=>_0x495f7e['id'],this['_startingVersion']=_0x495f7e['fromVersion']):(this['_startingVersion']=_0x3a9ccc['toVersion'],this['_continueCurrentRevision']=!0x1)):(this['_startingVersion']=_0x3db7d8,this['_continueCurrentRevision']=!0x1);}}else _0x495f7e&&(this['editor']['model']['document']['history']['version']=Math['max'](_0x495f7e['toVersion'],this['editor']['model']['document']['history']['version']),_0x495f7e['fromVersion']===_0x495f7e['toVersion']?(0x0!==_0x495f7e['fromVersion']&&(this['_source']['getCurrentRevisionId']=()=>_0x495f7e['id']),this['_continueCurrentRevision']=!0x1):this['_continueCurrentRevision']&&(this['_source']['getCurrentRevisionId']=()=>_0x495f7e['id'],this['_startingVersion']=_0x495f7e['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',_0x1cb934=>!_0x1cb934),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x56977b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5e5b5d;for(const _0xa84caa in _0x56977b){const _0x3e1fce=_0xa84caa,_0x5be92f=_0x56977b[_0x3e1fce];if('revisionHistoryLicenseKeyValid'==_0x5be92f||'revisionHistoryLicenseKeyInvalid'==_0x5be92f||'revisionHistoryLicenseKeyExpired'==_0x5be92f||'revisionHistoryLicenseKeyDomainLimit'==_0x5be92f||'revisionHistoryLicenseKeyNotAllowed'==_0x5be92f||'revisionHistoryLicenseKeyEvaluationLimit'==_0x5be92f||'revisionHistoryLicenseKeyUsageLimit'==_0x5be92f){delete _0x56977b[_0x3e1fce],_0x5e5b5d=_0x5be92f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'revisionHistoryLicenseKeyInvalid'==_0x5e5b5d&&_0x56977b['_showLicenseError']('invalid'),'revisionHistoryLicenseKeyExpired'==_0x5e5b5d&&_0x56977b['_showLicenseError']('expired'),'revisionHistoryLicenseKeyDomainLimit'==_0x5e5b5d&&_0x56977b['_showLicenseError']('domainLimit'),'revisionHistoryLicenseKeyNotAllowed'==_0x5e5b5d&&_0x56977b['_showLicenseError']('featureNotAllowed','RevisionHistory'),'revisionHistoryLicenseKeyEvaluationLimit'==_0x5e5b5d&&_0x56977b['_showLicenseError']('evaluationLimit'),'revisionHistoryLicenseKeyUsageLimit'==_0x5e5b5d&&_0x56977b['_showLicenseError']('usageLimit');},0x3e8);}async['afterInit'](){if(this['repository']['length']>0x0){const _0x4a861b=this['repository']['getRevision'](0x0),_0x52e0c7=await this['getRevisionDocumentData'](_0x4a861b),_0x1e7c8f=await this['getRevisionRootsAttributes'](_0x4a861b),_0x301146=this['_utils']['getRevisionRootsModelElements'](_0x4a861b);this['_replaceEditorDataWithRevisionData'](_0x52e0c7,_0x1e7c8f,_0x301146);}}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['setSource'](_0x239c15){this['_source']=_0x239c15;}async['update'](){const _0x383926=await this['_source']['getLatestVersion']();if(_0x383926>this['currentRevision']['toVersion']){await this['_loadState']();const _0x3a92c3=this['buildRevisionData']({'revision':this['currentRevision'],'to':_0x383926});_0x3a92c3['authors']=_0x3a92c3['authorsIds']['map'](_0x5e9485=>this['editor']['plugins']['get']('Users')['getUser'](_0x5e9485)),this['currentRevision']['_update'](_0x3a92c3);}}async['saveRevision'](_0x3da11d={},_0x59fe4d=null){const _0x5572a4=[];await this['_loadState'](),this['_continueCurrentRevision']=!0x1,_0x59fe4d>this['currentRevision']['toVersion']&&(_0x59fe4d=null),null===_0x59fe4d&&(_0x59fe4d=await this['_source']['getLatestVersion']());const _0x9b4179=this['_getFromVersion'](_0x59fe4d),_0x22b02d=this['buildRevisionData']({'from':_0x9b4179,'to':_0x59fe4d});if(this['currentRevision']['toVersion']<_0x59fe4d){const _0x2f419e=this['buildRevisionData']({'revision':this['currentRevision'],'from':_0x59fe4d,'to':_0x59fe4d});_0x2f419e['authors']=[],_0x2f419e['authorsIds']=[],_0x2f419e['id']=this['currentRevision']['id'],this['currentRevision']['_update'](_0x2f419e,!0x0),delete _0x2f419e['authors'],_0x5572a4['push'](_0x2f419e);}_0x3da11d['creatorId']=this['editor']['plugins']['get']('Users')['me']['id'],_0x3da11d['name']=_0x3da11d['name']||null,_0x3da11d['id']=_0x3da11d['id']||_0x2d6fd8(),_0x3da11d={..._0x3da11d,..._0x22b02d};const _0x306188=this['addRevisionData'](_0x3da11d);_0x5572a4['push'](_0x3da11d);const _0x20524c=this['repository']['getIndex'](_0x306188);if(0x0!==_0x20524c){const _0x336c07=this['repository']['getRevision'](_0x20524c-0x1);if(_0x336c07['fromVersion']!==_0x59fe4d){const _0x403d34=this['_revisionDataBuilder']['getData'](_0x59fe4d,_0x336c07['toVersion']),_0x431c7a={'id':_0x336c07['id'],'diffData':_0x403d34['diffData'],'authorsIds':_0x403d34['authorsIds'],'authors':_0x403d34['authorsIds']['map'](_0x1cf5ce=>this['editor']['plugins']['get']('Users')['getUser'](_0x1cf5ce)),'fromVersion':_0x59fe4d};_0x336c07===this['currentRevision']&&(_0x431c7a['createdAt']=new Date(_0x3da11d['createdAt']['getTime']()+0xa)),_0x336c07['_update'](_0x431c7a,!0x0),delete _0x431c7a['authors'],_0x5572a4['push'](_0x431c7a);}}if(this['adapter']){for(const _0x268f48 of _0x5572a4)this['_bufferUpdate'](_0x268f48['id'],_0x268f48,!0x0);this['sendBufferedUpdates']();}return _0x306188;}['addRevisionData'](_0x19d87c){const _0xfbf94f=this['repository']['createRevision'](_0x19d87c);return this['adapter']&&_0xfbf94f['on']('_update',(_0x22a871,_0x390aa2,_0x46bf1b)=>{_0x46bf1b||(this['_bufferUpdate'](_0x390aa2['id'],_0x390aa2,!0x0),this['sendBufferedUpdates']());}),this['repository']['addRevision'](_0xfbf94f,this['_findInsertionIndex'](_0xfbf94f)),_0xfbf94f;}async['getRevisionDocumentData'](_0x4f18f9){return await this['_utils']['loadRevisionData'](_0x4f18f9,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x4f18f9);}async['getRevisionRootsAttributes'](_0x2deeee){return await this['_utils']['loadRevisionData'](_0x2deeee,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x2deeee);}['sendBufferedUpdates'](){if(0x0===this['_bufferedUpdates']['size'])return;if(this['_isPendingUpdate'])return;let _0x113191=Array['from'](this['_bufferedUpdates']['values']());this['_bufferedUpdates']['clear']();for(let _0x2139c2=0x0;_0x2139c2<_0x113191['length'];_0x2139c2++){const _0x1f07b0=_0x113191[_0x2139c2];let _0x2d93ae=!0x1;for(const _0x420ee3 of Object['keys'](_0x1f07b0))void 0x0===_0x1f07b0[_0x420ee3]?delete _0x1f07b0[_0x420ee3]:'id'!==_0x420ee3&&(_0x2d93ae=!0x0);_0x2d93ae||(_0x113191[_0x2139c2]=null);}if(_0x113191=_0x113191['filter'](_0xad6aa9=>null!==_0xad6aa9),!_0x113191['length'])return;for(let _0x53c8cb=0x0;_0x53c8cb<_0x113191['length'];_0x53c8cb++){const _0x1edf22=_0x113191[_0x53c8cb];void 0x0!==_0x1edf22['fromVersion']&&void 0x0===_0x1edf22['toVersion']&&(_0x1edf22['toVersion']=this['repository']['getRevision'](_0x1edf22['id'])['toVersion']),void 0x0!==_0x1edf22['toVersion']&&void 0x0===_0x1edf22['fromVersion']&&(_0x1edf22['fromVersion']=this['repository']['getRevision'](_0x1edf22['id'])['fromVersion']);}const _0x14c6c4=this['editor']['config']['get']('collaboration.channelId');this['_isPendingUpdate']=!0x0,this['_addPendingAction'](),this['adapter']['updateRevisions'](_0x113191,_0x14c6c4)['finally'](()=>{this['_isPendingUpdate']=!0x1;})['then'](_0x2d0b54=>{if(_0x2d0b54){for(const _0x46a191 of _0x2d0b54)this['setRevisionData']({'id':_0x46a191['id'],'createdAt':_0x46a191['createdAt']});}this['_removePendingAction'](),this['sendBufferedUpdates']();});}['buildRevisionData']({revision:_0x1ee010=null,from:_0x13b7f7=null,to:_0x861d39=null}){_0x13b7f7=null!==_0x13b7f7?_0x13b7f7:_0x1ee010['fromVersion'],_0x861d39=null!==_0x861d39?_0x861d39:_0x1ee010['toVersion'];const _0x2294d3=this['_revisionDataBuilder']['getData'](_0x13b7f7,_0x861d39),_0x1c8669={'diffData':_0x2294d3['diffData'],'authorsIds':_0x2294d3['authorsIds'],'fromVersion':_0x13b7f7,'toVersion':_0x861d39};if(!_0x1ee010||_0x861d39!==_0x1ee010['toVersion']){const _0x56fbdb=_0x861d39-0x1,_0x3db3f3=this['_source']['history']['getOperation'](_0x56fbdb);_0x1c8669['createdAt']=_0x3db3f3&&_0x3db3f3['createdAt']||new Date();}if(this['_loadedStateData']&&_0x13b7f7===this['_loadedStateData']['fromVersion']){for(const _0x469ee7 of this['_loadedStateData']['authors'])_0x1c8669['authorsIds']['includes'](_0x469ee7['id'])||_0x1c8669['authorsIds']['push'](_0x469ee7['id']);}return _0x1c8669;}['_bufferUpdate'](_0x30a2fe,_0x382c3b,_0x4c9ec7){if(this['_bufferedUpdates']['has'](_0x30a2fe)){const _0x2b258e=this['_bufferedUpdates']['get'](_0x30a2fe);_0x382c3b=_0x4c9ec7?{..._0x2b258e,..._0x382c3b}:{..._0x382c3b,..._0x2b258e};}this['_bufferedUpdates']['set'](_0x30a2fe,_0x382c3b);}['setRevisionData'](_0x2bdf1b){const _0x423736=this['repository']['getRevision'](_0x2bdf1b['id']);if(_0x2bdf1b['createdAt']&&(_0x2bdf1b['createdAt']=new Date(_0x2bdf1b['createdAt'])),_0x2bdf1b['authorsIds']){const _0x3bc4e6=this['editor']['plugins']['get']('Users');_0x2bdf1b['authors']=_0x2bdf1b['authorsIds']['map'](_0x198403=>_0x3bc4e6['getUser'](_0x198403));}_0x423736['_update'](_0x2bdf1b,!0x0);}['_createInitialRevision'](_0x5c8289){const _0x1c9a71=this['repository']['getRevision'](this['repository']['length']-0x1);if(_0x1c9a71)this['_initialRevisionId']=_0x1c9a71['id'];else{const _0x3e5661=!this['editor']['model']['document']['roots']['find'](_0x3811fe=>this['editor']['model']['hasContent'](_0x3811fe)),_0x30d761=this['editor']['plugins']['get']('Users')['me']['id'],_0x4f1191=ft(this['editor']['locale'],_0x3e5661?'Empty\x20document':'Initial\x20revision');this['_makeRevision']({'from':_0x5c8289,'to':_0x5c8289,'id':this['_initialRevisionId'],'name':_0x4f1191,'creatorId':_0x30d761});}}['_createCurrentRevision'](_0x44a006){const _0x5baf35=this['_source']['getCurrentRevisionId']();this['currentRevision']=this['repository']['getRevision'](_0x5baf35),this['currentRevision']||(this['currentRevision']=this['_makeRevision']({'from':_0x44a006,'to':_0x44a006,'id':_0x5baf35,'name':'','creatorId':null}));}async['_loadState'](){this['_continueCurrentRevision']&&!this['_loadedStateData']&&(await this['_utils']['loadRevisionData'](this['currentRevision'],this['adapter']),this['_revisionDataBuilder']['loadState'](this['currentRevision']),this['_loadedStateData']={'fromVersion':this['currentRevision']['fromVersion'],'authors':this['currentRevision']['authors']['slice']()});}['_replaceEditorDataWithRevisionData'](_0x598fd0,_0x41692a,_0x226e94){const _0x34f95c={},_0x5dac26={},_0xe40283={},_0x153d2d=this['editor']['config']['get']('roots')||{};for(const [_0x24aa90,_0x34a9ff]of Object['entries'](_0x153d2d))_0x34a9ff['lazyLoad']||(_0x34f95c[_0x24aa90]=_0x34a9ff['initialData']??'',_0x5dac26[_0x24aa90]=_0x34a9ff['modelAttributes']||{},_0x34a9ff['modelElement']&&(_0xe40283[_0x24aa90]=_0x34a9ff['modelElement']));for(const _0x23e084 of this['editor']['model']['document']['getRootNames']())_0x34f95c[_0x23e084]??='',_0x5dac26[_0x23e084]??={};let _0xba4806=!0x1;const _0x3f73ba=Object['keys'](_0x34f95c),_0x517cf7=Object['keys'](_0x598fd0);for(const _0x4660c3 of _0x3f73ba){if(_0x34f95c[_0x4660c3]!==_0x598fd0[_0x4660c3]&&''!==_0x34f95c[_0x4660c3]['trim']()){_0xba4806=!0x0;break;}if(!_0x2bf393(_0x5dac26[_0x4660c3],_0x41692a[_0x4660c3])&&Object['keys'](_0x5dac26[_0x4660c3])['length']>0x0){_0xba4806=!0x0;break;}const _0x1ec3be=_0xe40283[_0x4660c3],_0x824470=_0x226e94[_0x4660c3];if(_0x1ec3be&&_0x824470&&_0x1ec3be!==_0x824470){_0xba4806=!0x0;break;}}_0xba4806||(_0xba4806=_0x517cf7['some'](_0x1fe738=>!this['editor']['model']['document']['getRoot'](_0x1fe738))),_0xba4806&&_0xefa158('editor-initial-data-replaced-with-revision-data',{'editorData':_0x34f95c,'editorRootsAttributes':_0x5dac26,'editorRootsModelElements':_0xe40283,'revisionData':_0x598fd0,'revisionRootsAttributes':_0x41692a,'revisionRootsModelElements':_0x226e94});for(const [_0x7e59a1,_0x7ec2fe]of Object['entries'](_0x598fd0))this['editor']['config']['set']('roots.'+_0x7e59a1+'.initialData',_0x7ec2fe);for(const [_0x5463c0,_0x1107ac]of Object['entries'](_0x41692a))this['editor']['config']['set']('roots.'+_0x5463c0+'.modelAttributes',_0x1107ac);const _0x59b162=this['editor']['model']['document'];for(const [_0x5a5a4b,_0x5f5dfd]of Object['entries'](_0x226e94)){this['editor']['config']['set']('roots.'+_0x5a5a4b+'.modelElement',_0x5f5dfd);const _0x5d546b=_0x59b162['getRoot'](_0x5a5a4b);_0x5d546b&&_0x5d546b['name']!==_0x5f5dfd&&(_0x59b162['roots']['remove'](_0x5a5a4b),_0x59b162['createRoot'](_0x5f5dfd,_0x5a5a4b));}}['_addPendingAction'](){if(!this['_pendingAction']){const _0x56a0bd=this['editor']['plugins']['get']('PendingActions');this['_pendingAction']=_0x56a0bd['add'](ft(this['editor']['locale'],'PENDING_ACTION_REVISION_HISTORY'));}}['_removePendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get']('PendingActions')['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_findInsertionIndex'](_0x1d3c67){const _0x1ad665=this['repository']['getRevisions']();_0x1ad665['reverse']();let _0x5a563d=0x0;for(;_0x5a563d<_0x1ad665['length'];){const _0x6d79c1=_0x1ad665[_0x5a563d];if(_0x6d79c1===this['currentRevision']){_0x5a563d++;continue;}if(_0x6d79c1['id']===this['_initialRevisionId'])break;const _0x46e726=_0x1d3c67['toVersion']-_0x6d79c1['toVersion']||_0x1d3c67['fromVersion']-_0x6d79c1['fromVersion'];if(_0x46e726>0x0)break;if(_0x46e726<0x0)_0x5a563d++;else{if(!_0x1d3c67['creator']&&_0x6d79c1['creator'])break;if(_0x6d79c1['creator']||!_0x1d3c67['creator']){if(_0x1d3c67['createdAt']>_0x6d79c1['createdAt'])break;_0x5a563d++;}else _0x5a563d++;}}return _0x5a563d;}['_getFromVersion'](_0x27553f){const _0x35cf2b=this['repository']['getRevisions']();_0x35cf2b['reverse'](),_0x35cf2b['shift']();const _0x1638f9=_0x35cf2b['find'](_0x47cd53=>_0x47cd53['toVersion']<=_0x27553f)['toVersion'];return _0x1638f9<this['_startingVersion']?this['_startingVersion']:_0x1638f9;}['_makeRevision']({name:_0x10ff85,from:_0x16d921,to:_0x2286ec,creatorId:_0x2a0a3f,id:_0x29af07}){const _0x56e74e=this['buildRevisionData']({'from':_0x16d921,'to':_0x2286ec});_0x56e74e['name']=_0x10ff85,_0x56e74e['creatorId']=_0x2a0a3f,_0x56e74e['id']=_0x29af07;const _0x5a950d=this['addRevisionData'](_0x56e74e);return this['adapter']&&this['_bufferUpdate'](_0x56e74e['id'],_0x56e74e,!0x0),_0x5a950d;}['_setConversion'](){this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'});}}class RevisionDataBuilder{['editor'];['source'];['_savedMetaData'];['_lastFrom'];['_lastTo'];['_markers'];['_diffRoots'];['_diffRootsAttributes'];['_baseRoots'];['_baseRootsAttributes'];['_idsRoots'];['_baseIdsRoots'];['_touched'];['_touchedMarkers'];['_touchedRoots'];['_revisionId'];['_startingRevisionId'];constructor(_0x99929e){this['editor']=_0x99929e,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'](_0x51cf5c){this['source']=_0x51cf5c;const _0xc20ab8=new Map(),_0x3f885b=new Map(),_0x3ca0b5=this['editor']['model']['document']['roots']['map'](_0x42aa4b=>_0x42aa4b['rootName']);for(const _0x16296b of _0x3ca0b5){const _0x1b6244=this['editor']['model']['document']['getRoot'](_0x16296b),_0x47923b=gt(_0x1b6244);_0xc20ab8['set'](_0x16296b,_0x47923b),_0x3f885b['set'](_0x16296b,Object['fromEntries'](_0x1b6244['getAttributes']()));}const _0x1b45d6=Array['from'](this['editor']['model']['markers'])['map'](_0x275b52=>[_0x275b52['name'],_0x275b52['getRange']()]),_0x497326=this['source']['version'];this['_saveMetaData'](_0x497326,_0xc20ab8,_0x1b45d6,_0x3f885b),this['_startingRevisionId']=this['_revisionId'];const _0xe1965a=new Map(),_0x42026d=new Map();for(const _0x5839a9 of _0x3ca0b5){const _0x4c5061=wt(_0x5839a9,this['editor']['model']['document']['getRoot'](_0x5839a9)['name']);_0xe1965a['set'](_0x5839a9,_0x4c5061),_0x42026d['set'](_0x5839a9,{});}this['_saveMetaData'](Number['NEGATIVE_INFINITY'],_0xe1965a,[],_0x42026d);}['getData'](_0x7e3ef7,_0x3d1683){if(this['_lastFrom']===_0x7e3ef7&&this['_lastTo']<=_0x3d1683)this['_savedMetaData']['size']>0x1&&this['_removeMetaData'](this['_lastTo']),this['_applyOperations'](this['_lastTo'],_0x3d1683,!0x0);else{if(!this['_savedMetaData']['has'](_0x7e3ef7)){const _0xab1349=this['_getPreviousFrom'](_0x7e3ef7);this['_calculateMetaData'](_0xab1349,_0x7e3ef7,!0x1);}this['_calculateMetaData'](_0x7e3ef7,_0x3d1683,!0x0);}return this['_lastFrom']=_0x7e3ef7,this['_lastTo']=_0x3d1683,this['_getState']();}['loadState'](_0x80476){if(!this['_savedMetaData']['has'](_0x80476['fromVersion'])){const _0x150b8a=this['_getPreviousFrom'](_0x80476['fromVersion']);this['_calculateMetaData'](_0x150b8a,_0x80476['fromVersion'],!0x1);}this['_calculateMetaData'](_0x80476['fromVersion'],_0x80476['toVersion'],!0x1);const _0x196996=this['editor']['plugins']['get']('RevisionHistoryUtils');this['_reset'](),this['_lastFrom']=_0x80476['fromVersion'],this['_lastTo']=_0x80476['toVersion'];for(const _0x5c48a3 in _0x80476['diffData']){const _0x51a866=_0x80476['diffData'][_0x5c48a3]['attachChange'],_0x58e058=_0x531982(_0x80476['diffData'][_0x5c48a3]['attributesBefore'])||{},_0x46a168=_0x80476['diffData'][_0x5c48a3],_0x490ab7=_0x196996['_makeModelFromViewString'](_0x46a168['deletions'],_0x46a168['rootElementName']||'$root');_0x490ab7['rootName']=_0x5c48a3,_0x490ab7['_isAttached']=!_0x51a866||!_0x51a866['isAttached'],_0x490ab7['isAttached']=()=>_0x490ab7['_isAttached'],this['_baseRoots']['set'](_0x5c48a3,_0x490ab7),this['_baseRootsAttributes']['set'](_0x5c48a3,_0x58e058),_0x51a866&&this['_touchedRoots']['set'](_0x5c48a3,_0x51a866);const _0x127e12=this['_makeIdsRoot'](_0x490ab7);this['_baseIdsRoots']['set'](_0x5c48a3,_0x127e12);for(const [_0x5a0aed,_0x53ac30]of _0x490ab7['markers']){if(!_0x5a0aed['startsWith']('revision:'))continue;const _0x30e68d=_0x5a0aed['split'](':')[0x2];for(const _0x117459 of _0x53ac30['getWalker']({'singleCharacters':!0x0})){const _0x452f21=this['_getVidAttributeName'](_0x117459),_0x1793df='elementEnd'==_0x117459['type']?_0x117459['previousPosition']['path']['slice'](0x0,-0x1):_0x117459['previousPosition']['path'],_0x3f845f=_0x127e12['getNodeByPath'](_0x1793df)['getAttribute'](_0x452f21);this['_touched']['set'](_0x3f845f,{'userId':_0x30e68d});}_0x490ab7['markers']['delete'](_0x5a0aed);}}this['_startingRevisionId']=this['_revisionId'];const _0x2f6385=[...Array(this['_revisionId'])['keys']()]['slice'](0x1)['filter'](_0x485160=>!this['_touched']['has'](_0x485160));let _0x34ac50=0x0;const _0x1b2298=new Map();for(const _0x263fc7 in _0x80476['diffData']){const _0x3e6199=_0x80476['diffData'][_0x263fc7]['attachChange'],_0x3cff37=_0x531982(_0x80476['diffData'][_0x263fc7]['attributesAfter'])||{},_0x45c5f8=_0x80476['diffData'][_0x263fc7],_0x13cb5b=_0x196996['_makeModelFromViewString'](_0x45c5f8['insertions'],_0x45c5f8['rootElementName']||'$root');_0x13cb5b['rootName']=_0x263fc7,_0x13cb5b['_isAttached']=!_0x3e6199||_0x3e6199['isAttached'],_0x13cb5b['isAttached']=()=>_0x13cb5b['_isAttached'],this['_diffRoots']['set'](_0x263fc7,_0x13cb5b),this['_diffRootsAttributes']['set'](_0x263fc7,_0x3cff37);const _0x1d6ca5=this['_makeIdsRoot'](_0x13cb5b,Number['NEGATIVE_INFINITY']);this['_idsRoots']['set'](_0x263fc7,_0x1d6ca5),_0x1b2298['set'](_0x263fc7,_0x13cb5b['isAttached']()?_0x3cff37:{});for(const [_0x3b5eb6,_0x178ca8]of _0x13cb5b['markers']){if(!_0x3b5eb6['startsWith']('revision:'))continue;const _0x3d84e2=_0x3b5eb6['split'](':')[0x2];for(const _0x1aaf7f of _0x178ca8['getWalker']({'singleCharacters':!0x0})){const _0x50f638=this['_getVidAttributeName'](_0x1aaf7f),_0x2d974e=this['_revisionId']++,_0x299e20='elementEnd'==_0x1aaf7f['type']?_0x1aaf7f['previousPosition']['path']['slice'](0x0,-0x1):_0x1aaf7f['previousPosition']['path'];_0x1d6ca5['getNodeByPath'](_0x299e20)['_setAttribute'](_0x50f638,_0x2d974e),this['_touched']['set'](_0x2d974e,{'userId':_0x3d84e2});}_0x13cb5b['markers']['delete'](_0x3b5eb6);}for(const _0x44726c of this['editor']['model']['createRangeIn'](_0x13cb5b)['getWalker']({'singleCharacters':!0x0})){const _0x317763=this['_getVidAttributeName'](_0x44726c),_0x278a52='elementEnd'==_0x44726c['type']?_0x44726c['previousPosition']['path']['slice'](0x0,-0x1):_0x44726c['previousPosition']['path'],_0x5b4d00=_0x1d6ca5['getNodeByPath'](_0x278a52);_0x5b4d00['getAttribute'](_0x317763)>0x0||_0x5b4d00['_setAttribute'](_0x317763,_0x2f6385[_0x34ac50++]);}for(const [_0x4fd6fd,_0x28c76a]of _0x13cb5b['markers'])_0x4fd6fd['startsWith']('revision:')||this['_markers']['set'](_0x4fd6fd,_0x28c76a);}const {roots:_0x28a61e}=this['_savedMetaData']['get'](_0x80476['fromVersion']),{roots:_0x51707b}=this['_savedMetaData']['get'](_0x80476['toVersion']),_0x502bb0=gt(_0x28a61e['get']('$graveyard'));this['_baseRoots']['set']('$graveyard',_0x502bb0),this['_baseIdsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x502bb0,Number['NEGATIVE_INFINITY']));const _0x2cb6fc=gt(_0x51707b['get']('$graveyard'));this['_diffRoots']['set']('$graveyard',_0x2cb6fc),this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](_0x2cb6fc));const _0x1cf0f3=Array['from'](this['_diffRoots'])['map'](([_0x57eb33,_0x2fe268])=>[_0x57eb33,gt(_0x2fe268)]);this['_saveMetaData'](this['_lastTo'],_0x1cf0f3,this['_markers'],_0x1b2298);}['reInit'](){this['_reset'](),this['_lastFrom']=-0x1,this['_lastTo']=-0x1,this['_savedMetaData']['clear'](),this['init'](this['source']);}['_saveMetaData'](_0x1a3a0f,_0x4cd1ee,_0x12119e,_0x41e98b){const _0x15af4d=new Map(_0x4cd1ee),_0x2d47af=new Map(_0x531982(_0x41e98b)),_0x3de88f=new Map();for(const [_0x5c466d,_0x125400]of _0x12119e)_0x3de88f['set'](_0x5c466d,{'start':_0x125400['start']['clone'](),'end':_0x125400['end']['clone'](),'rootName':_0x125400['root']['rootName']});this['_savedMetaData']['set'](_0x1a3a0f,{'roots':_0x15af4d,'markers':_0x3de88f,'rootsAttributes':_0x2d47af});}['_removeMetaData'](_0x20c1df){this['_savedMetaData']['delete'](_0x20c1df);}['_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'](_0x31415e,_0x2c95d3=null){let _0x3ebfb0=null;_0x31415e['is']('documentFragment')||(_0x3ebfb0=new _0x4052b4(_0x31415e['name'],{'vid_start':null===_0x2c95d3?this['_revisionId']++:_0x2c95d3++}));const _0x21e7cf=[];for(const _0x5c60cf of _0x31415e['getChildren']())if(_0x5c60cf['is']('element')){_0x21e7cf['push'](this['_makeIdsRoot'](_0x5c60cf,_0x2c95d3));const _0x1221c2=_0x21e7cf[_0x21e7cf['length']-0x1];null!==_0x2c95d3&&(_0x2c95d3=_0x1221c2['is']('element','$text')?_0x1221c2['getAttribute']('vid')+0x1:_0x1221c2['getAttribute']('vid_end')+0x1);}else{for(let _0x53957a=0x0;_0x53957a<_0x5c60cf['offsetSize'];_0x53957a++)_0x21e7cf['push'](new _0x4052b4('$text',{'vid':null===_0x2c95d3?this['_revisionId']++:_0x2c95d3++}));}if(_0x31415e['is']('documentFragment')){const _0x47275e=wt(_0x31415e['rootName'],_0x31415e['name']);return _0x47275e['_insertChild'](0x0,_0x21e7cf),_0x47275e;}return _0x3ebfb0['_setAttribute']('vid_end',null===_0x2c95d3?this['_revisionId']++:_0x2c95d3++),_0x3ebfb0['_insertChild'](0x0,_0x21e7cf),_0x3ebfb0;}['_calculateMetaData'](_0xb60ab7,_0x1078de,_0x5510a9){this['_reset']();const {roots:_0x6c66bf,markers:_0x5dd0d,rootsAttributes:_0x59b3fc}=this['_savedMetaData']['get'](_0xb60ab7);this['_baseRoots']=new Map(_0x6c66bf),this['_baseRootsAttributes']=new Map(_0x531982(_0x59b3fc));for(const [_0x2d6a1e,_0x2bf8b4]of this['_baseRoots'])if('$graveyard'!==_0x2d6a1e&&(this['_diffRoots']['set'](_0x2d6a1e,gt(_0x2bf8b4)),this['_diffRootsAttributes']=new Map(_0x531982(_0x59b3fc)),_0x5510a9)){const _0x33e155=this['_revisionId'];this['_idsRoots']['set'](_0x2d6a1e,this['_makeIdsRoot'](_0x2bf8b4)),this['_baseIdsRoots']['set'](_0x2d6a1e,this['_makeIdsRoot'](_0x2bf8b4,_0x33e155));}this['_startingRevisionId']=this['_revisionId'],this['_diffRoots']['set']('$graveyard',gt(this['_baseRoots']['get']('$graveyard'))),_0x5510a9&&this['_idsRoots']['set']('$graveyard',this['_makeIdsRoot'](this['_baseRoots']['get']('$graveyard')));for(const [_0x38cf72,_0x45398d]of _0x5dd0d){const _0x3cfec4=this['_baseRoots']['get'](_0x45398d['rootName']),_0x2cb9a4=this['_diffRoots']['get'](_0x45398d['rootName']),_0x1bda5e=new _0x5cfc88(this['_fixPosition'](_0x45398d['start'],_0x3cfec4),this['_fixPosition'](_0x45398d['end'],_0x3cfec4)),_0x3f474a=this['_fixRange'](_0x1bda5e,_0x2cb9a4);_0x3cfec4['markers']['set'](_0x38cf72,_0x1bda5e),this['_markers']['set'](_0x38cf72,_0x3f474a);}this['_applyOperations'](_0xb60ab7,_0x1078de,_0x5510a9);}['_applyOperations'](_0xd47e8f,_0x1e878a,_0x28bf53){for(const _0x30bfe4 of this['source']['getOperations'](_0xd47e8f,_0x1e878a))this['_handleOperation'](_0x30bfe4,_0x28bf53);for(const _0x413fdd of this['_diffRoots']['values']())_0x413fdd['markers']['clear']();for(const [_0x1dfa0d,_0x23a275]of this['_markers']){this['_diffRoots']['get'](_0x23a275['root']['rootName'])['markers']['set'](_0x1dfa0d,_0x23a275['clone']());}const _0x378780=new Map(),_0x5274b2=new Map();for(const [_0x2d50f4,_0x3b599a]of this['_diffRoots'])_0x378780['set'](_0x2d50f4,gt(_0x3b599a)),_0x5274b2['set'](_0x2d50f4,this['_diffRootsAttributes']['get'](_0x2d50f4));this['_saveMetaData'](_0x1e878a,_0x378780,this['_markers'],_0x5274b2);}['_getPreviousFrom'](_0x31d52c){const _0x44f95e=Array['from'](this['_savedMetaData']['keys']());_0x44f95e['sort']((_0x3ab1a4,_0x40285c)=>_0x3ab1a4-_0x40285c),_0x44f95e['reverse']();for(const _0xb1edee of _0x44f95e)if(_0xb1edee<_0x31d52c)return _0xb1edee;return Number['NEGATIVE_INFINITY'];}['_copyMarkers'](_0x10c667,_0x19681b){const _0x51a115=Array['from'](_0x19681b['markers'])['map'](([_0xc10721,_0x15a2fb])=>[_0xc10721,this['_fixRange'](_0x15a2fb,_0x10c667)]);_0x10c667['markers']=new Map(_0x51a115);}['_transformMarkers'](_0x2b403a){for(const _0x1b0598 of this['_markers']['values']()){const _0x32fc0c=_0x1b0598['getTransformedByOperation'](_0x2b403a),_0x5c7e67=_0x5cfc88['_createFromRanges'](_0x32fc0c);_0x1b0598['start']=_0x5c7e67['start'],_0x1b0598['end']=_0x5c7e67['end'];}}['_handleOperation'](_0x1363d1,_0x28c31d){if('addRoot'!=_0x1363d1['type']&&'detachRoot'!=_0x1363d1['type']){if('insert'==_0x1363d1['type']){const _0x2bf7d9=_0x1363d1['position']['root'],_0x169e7d=_0x2bf7d9['rootName'],_0x48d866=_0x2bf7d9['name'];this['_diffRoots']['has'](_0x169e7d)||(this['_diffRoots']['set'](_0x169e7d,wt(_0x169e7d,_0x48d866,!0x0)),this['_diffRootsAttributes']['set'](_0x169e7d,{}),_0x28c31d&&this['_idsRoots']['set'](_0x169e7d,wt(_0x169e7d,_0x48d866,!0x0)));}else{if('addRootAttribute'==_0x1363d1['type']||'removeRootAttribute'==_0x1363d1['type']||'changeRootAttribute'==_0x1363d1['type'])return void this['_handleRootAttributeOperation'](_0x1363d1);'marker'==_0x1363d1['type']&&this['_handleMarkerOperation'](_0x1363d1);}if('marker'!==_0x1363d1['type']){const _0x117846=this['_cloneOperation'](_0x1363d1,this['_diffRoots']);_0x117846['_execute'](),this['_transformMarkers'](_0x117846);}if(_0x28c31d)switch(_0x1363d1['type']){case'insert':this['_handleInsertOperation'](_0x1363d1);break;case'move':case'remove':case'reinsert':this['_handleMoveOperation'](_0x1363d1);break;case'merge':this['_handleMergeOperation'](_0x1363d1);break;case'split':this['_handleSplitOperation'](_0x1363d1);}}else this['_handleRootOperation'](_0x1363d1,_0x28c31d);}['_cloneOperation'](_0x5226e4,_0x160e3d){const _0x37b3c7=_0x5226e4['clone']();return _0x37b3c7['_authorId']=_0x5226e4['_authorId'],this['_fixOperation'](_0x37b3c7,_0x160e3d),_0x37b3c7;}['_getBaseVids'](_0x477e90){return _0x477e90['map'](_0x5d84dc=>{const _0x2efc09=this['_getVidAttributeName'](_0x5d84dc);return Number(_0x5d84dc['item']['getAttribute'](_0x2efc09));});}['_generateTape'](_0x493163,_0x418ac7){if(_0x493163['is']('element','$text'))_0x418ac7['push']({'item':_0x493163,'type':'text'});else{_0x493163['is']('element')&&_0x418ac7['push']({'item':_0x493163,'type':'elementStart'});for(const _0x3d7794 of _0x493163['getChildren']())this['_generateTape'](_0x3d7794,_0x418ac7);_0x493163['is']('element')&&_0x418ac7['push']({'item':_0x493163,'type':'elementEnd'});}return _0x418ac7;}['_getState'](){const _0x42f030=new Map(this['_touched']),_0x7ec812=new Map(_0x42f030),_0x3f8aac=new Map(),_0x8469a3={'insertions':{},'deletions':{}},_0xb9e6c={'insertions':{},'deletions':{}},_0x2c8539=new Map(),_0x31986c=new Set([...this['_baseRoots']['keys'](),...this['_diffRoots']['keys']()]),_0x5b9438=new Map();_0x31986c['delete']('$graveyard');for(const _0xe5da85 of _0x31986c){const _0x4cc9df=(this['_diffRoots']['get'](_0xe5da85)??this['_baseRoots']['get'](_0xe5da85))['name'],_0x2391a8=this['_diffRoots']['get'](_0xe5da85)||wt(_0xe5da85,_0x4cc9df,!0x1),_0xf8c285=this['_baseRoots']['get'](_0xe5da85)||wt(_0xe5da85,_0x4cc9df,!0x1);_0x2391a8['isAttached']()||_0xf8c285['isAttached']()?(_0x5b9438['set'](_0xe5da85,_0x4cc9df),_0x8469a3['insertions'][_0xe5da85]=gt(_0x2391a8),_0x8469a3['deletions'][_0xe5da85]=gt(_0xf8c285),this['_copyMarkers'](_0x8469a3['deletions'][_0xe5da85],_0xf8c285),this['_copyMarkers'](_0x8469a3['insertions'][_0xe5da85],_0x2391a8),_0xb9e6c['insertions'][_0xe5da85]=this['_generateTape'](this['_idsRoots']['get'](_0xe5da85),[]),_0xb9e6c['deletions'][_0xe5da85]=this['_generateTape'](this['_baseIdsRoots']['get'](_0xe5da85)||wt(_0xe5da85,_0x4cc9df,!0x1),[])):_0x31986c['delete'](_0xe5da85);}for(const _0x19cf6c of _0x31986c){const _0x5cf8ea=_0xb9e6c['insertions'][_0x19cf6c];for(const _0x29306e of _0x5cf8ea){const _0x3c5e5b=this['_getVidAttributeName'](_0x29306e),_0x219601=_0x29306e['item']['getAttribute'](_0x3c5e5b);_0x7ec812['delete'](_0x219601),_0x219601>=this['_startingRevisionId']&&_0x3f8aac['set'](_0x219601,_0x42f030['get'](_0x219601));}}for(const _0x4fb4f9 of _0x31986c){const _0x1b78f0=_0xb9e6c['insertions'][_0x4fb4f9],_0x14e479=this['_getBaseVids'](_0xb9e6c['deletions'][_0x4fb4f9]);let _0x119ae7=0x0;for(const _0x567b2e of _0x1b78f0){const _0x122264=this['_getVidAttributeName'](_0x567b2e),_0x4b5d17=_0x567b2e['item']['getAttribute'](_0x122264);if(!_0x3f8aac['has'](_0x4b5d17)&&!_0x2c8539['has'](_0x4b5d17)){if(_0x7ec812['has'](_0x4b5d17))_0x119ae7++;else{if(_0x4b5d17!=_0x14e479[_0x119ae7]){const _0xc9d14c=_0x42f030['get'](_0x4b5d17)||_0x42f030['get'](_0x14e479[_0x119ae7]);for(;_0x4b5d17!=_0x14e479[_0x119ae7];)_0x7ec812['has'](_0x14e479[_0x119ae7])||(_0x2c8539['set'](_0x14e479[_0x119ae7],_0xc9d14c),_0x42f030['set'](_0x14e479[_0x119ae7],_0xc9d14c)),_0x119ae7++;}_0x119ae7++;}}}}for(const _0x4d5e60 of _0x31986c){const _0x4d7999=_0xb9e6c['insertions'][_0x4d5e60];for(const _0xaaa407 of _0x4d7999){const _0xb08980=this['_getVidAttributeName'](_0xaaa407),_0x39110b=_0xaaa407['item']['getAttribute'](_0xb08980);if(_0x2c8539['has'](_0x39110b)){const _0x427f97=_0x2c8539['get'](_0x39110b);_0x7ec812['has'](_0x39110b)||_0x7ec812['set'](_0x39110b,{..._0x427f97}),_0x3f8aac['set'](_0x39110b,{..._0x427f97});}}}for(const _0x24c032 of _0x7ec812['keys']())_0x24c032>=this['_startingRevisionId']&&_0x7ec812['delete'](_0x24c032);const _0x5c1165=new Map();for(const _0x461eb3 of _0x31986c){let _0x4e8897=_0xb9e6c['insertions'][_0x461eb3];for(const _0x10b655 of _0x4e8897)if(_0x10b655['item']['is']('element','tableCell')){const _0x1af7a0=this['_getVidAttributeName'](_0x10b655),_0x426669=_0x10b655['item']['getAttribute'](_0x1af7a0);if(_0x3f8aac['has'](_0x426669)){const _0x13e55d=_0x10b655['item']['parent']['parent']['getAttribute']('vid_start'),_0x2f4ec8=_0x5c1165['get'](_0x13e55d)||new Set();_0x2f4ec8['add'](_0x3f8aac['get'](_0x426669)['userId']),_0x5c1165['set'](_0x13e55d,_0x2f4ec8);}}_0x4e8897=_0xb9e6c['deletions'][_0x461eb3];for(const _0x2d410f of _0x4e8897)if(_0x2d410f['item']['is']('element','tableCell')){const _0x2624c3=this['_getVidAttributeName'](_0x2d410f),_0x2a7dc8=_0x2d410f['item']['getAttribute'](_0x2624c3);if(_0x7ec812['has'](_0x2a7dc8)){const _0x201f69=_0x2d410f['item']['parent']['parent']['getAttribute']('vid_start'),_0xbadd9=_0x5c1165['get'](_0x201f69)||new Set();_0xbadd9['add'](_0x7ec812['get'](_0x2a7dc8)['userId']),_0x5c1165['set'](_0x201f69,_0xbadd9);}}for(const _0x1bada5 of _0x5c1165['keys']())(_0x3f8aac['has'](_0x1bada5)||_0x7ec812['has'](_0x1bada5))&&_0x5c1165['delete'](_0x1bada5);}for(const _0x2e01cd of _0x31986c){const _0x49d514=_0xb9e6c['insertions'][_0x2e01cd];let _0x34c147=null,_0xdf2b6d=null;for(const _0x899a7b of _0x49d514){const _0x4ede06=this['_getVidAttributeName'](_0x899a7b),_0x38a2eb=_0x899a7b['item']['getAttribute'](_0x4ede06),_0xd9cb59=_0x5c1165['get'](_0x38a2eb);_0xd9cb59&&'elementStart'==_0x899a7b['type']&&(_0x34c147=Array['from'](_0xd9cb59)[0x0],_0xdf2b6d=_0x899a7b['item']['getAttribute']('vid_end')),_0x34c147&&(_0x7ec812['set'](_0x38a2eb,{'userId':_0x34c147}),_0x3f8aac['set'](_0x38a2eb,{'userId':_0x34c147})),_0x38a2eb==_0xdf2b6d&&(_0x34c147=null,_0xdf2b6d=null);}}const _0x45c2be={},_0x2f2aa1=new Set();for(const _0x1a69b0 of _0x31986c){const _0x543e35=_0x8469a3['deletions'][_0x1a69b0],_0x3b6e30=_0x8469a3['insertions'][_0x1a69b0];for(const {userId:_0x10d25e}of this['_touchedMarkers']['values']())null!==_0x10d25e&&_0x2f2aa1['add'](_0x10d25e);for(const {userId:_0x2d9adf}of this['_touchedRoots']['values']())null!==_0x2d9adf&&_0x2f2aa1['add'](_0x2d9adf);this['_markChanges'](_0x3b6e30,_0xb9e6c['insertions'][_0x1a69b0],_0x3f8aac,'insertion',_0x2f2aa1),this['_markChanges'](_0x543e35,_0xb9e6c['deletions'][_0x1a69b0],_0x7ec812,'deletion',_0x2f2aa1),_0x45c2be[_0x1a69b0]={'insertions':this['_prepareViewToSave'](_0x3b6e30),'deletions':this['_prepareViewToSave'](_0x543e35),'attachChange':this['_touchedRoots']['get'](_0x1a69b0)||null,'attributesBefore':_0x531982(this['_baseRootsAttributes']['get'](_0x1a69b0))||{},'attributesAfter':_0x531982(this['_diffRootsAttributes']['get'](_0x1a69b0)),'rootElementName':_0x5b9438['get'](_0x1a69b0)};}return{'diffData':_0x45c2be,'authorsIds':Array['from'](_0x2f2aa1)};}['_processRootBeforeSave'](_0xe6c319){for(const [,_0x261b40]of _0xe6c319['markers']){const _0x5634f3=_0x261b40['start']['getAncestors']()['filter'](_0x20b0fc=>'tableCell'==_0x20b0fc['name']);for(const _0xa6c863 of _0x5634f3)0x1==_0xa6c863['childCount']&&_0xa6c863['getChild'](0x0)['is']('element','paragraph')&&_0xa6c863['getChild'](0x0)['_setAttribute']('keepParagraph',!0x0);}}['_prepareViewToSave'](_0x401aff){this['_processRootBeforeSave'](_0x401aff);const _0x4b6a3f=this['editor']['data']['toView'](_0x401aff,{}),_0x44b53f=Array['from'](_0x4b6a3f['getChildren']())['map'](_0x2fb6fa=>this['_getViewJson'](_0x2fb6fa));return JSON['stringify'](_0x44b53f);}['_getViewJson'](_0x2e48cd){if(_0x2e48cd['is']('$text'))return _0x2e48cd['data'];{const _0x5d83d1=this['editor']['plugins']['get']('RevisionHistoryUtils'),_0x24040b=_0x2e48cd,_0xe936bf=this['editor']['data']['htmlProcessor']['domConverter'],_0x270901={'type':_0x5d83d1['_getTypeCharForViewElement'](_0x24040b),'name':_0x24040b['name'],'attributes':Array['from'](_0x24040b['getAttributes']()),'children':Array['from'](_0x24040b['getChildren']())['map'](_0x28b709=>this['_getViewJson'](_0x28b709))};if(_0x2e48cd['is']('uiElement')&&'$comment'!=_0x2e48cd['name']){const _0x2f0370=_0x2e48cd['render'](_0xe936bf['domDocument'],_0xe936bf);_0x270901['children']['push'](_0x2f0370['outerHTML']);}else{if(_0x2e48cd['is']('rawElement')){const _0x46d480=_0xe936bf['domDocument']['createElement'](_0x24040b['name']);_0x2e48cd['render'](_0x46d480,_0xe936bf),_0x270901['children']['push'](_0x46d480['innerHTML']);}}const _0x391fec=Array['from'](_0x24040b['getCustomProperties']());_0x391fec['length']>0x0&&(_0x270901['customProperties']=_0x391fec);const _0x40412e=_0x24040b['getFillerOffset']();return null!==_0x40412e&&(_0x270901['fillerOffset']=_0x40412e),_0x270901;}}['_markChanges'](_0xf652dc,_0x2de51d,_0x227f58,_0x221bf6,_0x3678fb){let _0x61f713=null,_0x5a337a=null,_0x4b253b=0x0;const _0x249314=this['editor']['model'];for(let _0x1d9809=0x0;_0x1d9809<_0x2de51d['length'];_0x1d9809++){const _0x4a7d60=this['_getVidAttributeName'](_0x2de51d[_0x1d9809]),_0x15a9dc=_0x2de51d[_0x1d9809]['item']['getAttribute'](_0x4a7d60),_0x1fb9ad=_0x227f58['get'](_0x15a9dc),_0x2076e3=_0x1d9809==_0x2de51d['length']-0x1;(!_0x61f713&&_0x1fb9ad&&(_0x61f713=_0x1fb9ad,_0x5a337a=_0x2de51d[_0x1d9809]),_0x61f713&&(!_0x1fb9ad||_0x1fb9ad['userId']!=_0x61f713['userId']))&&(_0x4254c9(_0x1fb9ad,mt(_0x5a337a,_0xf652dc,_0x249314),mt(_0x2de51d[_0x1d9809],_0xf652dc,_0x249314)),_0x61f713=_0x1fb9ad||null,_0x5a337a=_0x1fb9ad?_0x2de51d[_0x1d9809]:null),_0x61f713&&_0x2076e3&&_0x4254c9(_0x1fb9ad,mt(_0x5a337a,_0xf652dc,_0x249314),pt(_0x2de51d[_0x1d9809],_0xf652dc,_0x249314));}function _0x4254c9(_0x28e232,_0x33241d,_0x12b683){const _0x2c7bda=_0x61f713['userId'],_0xfd2ec4='revision:'+_0x221bf6+':'+_0x2c7bda+':'+_0x4b253b++,_0x334e7e=_0x249314['createRange'](_0x33241d,_0x12b683);_0xf652dc['markers']['set'](_0xfd2ec4,_0x334e7e),null!==_0x2c7bda&&_0x3678fb['add'](_0x2c7bda);}}['_getVidAttributeName'](_0x35e007){switch(_0x35e007['type']){case'elementStart':return'vid_start';case'elementEnd':return'vid_end';default:return'vid';}}['_fixOperation'](_0x2b8739,_0x5404cc){_0x2b8739['baseVersion']=null;for(const _0x2a9301 in _0x2b8739){const _0x167b5c=_0x2b8739[_0x2a9301];if(_0x167b5c instanceof _0x627322){const _0x173229=_0x5404cc['get'](_0x167b5c['root']['rootName']);_0x2b8739[_0x2a9301]=this['_fixPosition'](_0x167b5c,_0x173229);}if(_0x167b5c instanceof _0x5cfc88){const _0x5ee572=_0x5404cc['get'](_0x167b5c['root']['rootName']);_0x2b8739[_0x2a9301]=this['_fixRange'](_0x167b5c,_0x5ee572);}'root'===_0x2a9301&&(_0x2b8739['root']=_0x5404cc['get'](_0x2b8739['root']['rootName']));}}['_fixRange'](_0x18cb91,_0x1211b2){return this['editor']['model']['createRange'](this['_fixPosition'](_0x18cb91['start'],_0x1211b2),this['_fixPosition'](_0x18cb91['end'],_0x1211b2));}['_fixPosition'](_0xe6231a,_0x530fa1){return this['editor']['model']['createPositionFromPath'](_0x530fa1,_0xe6231a['path'],_0xe6231a['stickiness']);}['_handleInsertOperation'](_0x59bbe8){const _0x2bd0f3=this['_idsRoots']['get'](_0x59bbe8['position']['root']['rootName']),_0x10f372=this['_fixPosition'](_0x59bbe8['position'],_0x2bd0f3),_0x4bde77=null===_0x59bbe8['_authorId']?null:_0x59bbe8['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5d73ca=_0x10f372['parent'],_0x2709a5=this['_revisionId'],_0x1c5d4c=[];for(const _0x247fcd of _0x59bbe8['nodes'])if(_0x247fcd['is']('element'))_0x1c5d4c['push'](this['_makeIdsRoot'](_0x247fcd));else{for(let _0x1439bc=0x0;_0x1439bc<_0x247fcd['offsetSize'];_0x1439bc++)_0x1c5d4c['push'](new _0x4052b4('$text',{'vid':this['_revisionId']++}));}const _0x492124=this['_revisionId'];for(let _0x5997f3=_0x2709a5;_0x5997f3<_0x492124;_0x5997f3++)this['_touched']['set'](_0x5997f3,{'userId':_0x4bde77});_0x5d73ca['_insertChild'](_0x10f372['offset'],_0x1c5d4c);}['_handleMoveOperation'](_0x2eaa69){(_0x2eaa69=this['_cloneOperation'](_0x2eaa69,this['_idsRoots']))['_execute']();const _0x39df17=null===_0x2eaa69['_authorId']?null:_0x2eaa69['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x5916b7=_0x2eaa69['getMovedRangeStart'](),_0x5e3689=_0x5916b7['parent'],_0xba6304=_0x5916b7['offset'];!function _0x1a7997(_0x1a799e,_0x22f36,_0x3e0ce3,_0x16015f){for(let _0x462ec3=_0x3e0ce3;_0x462ec3<_0x16015f;_0x462ec3++){const _0x598fe4=_0x22f36['getChild'](_0x462ec3);_0x598fe4['is']('element','$text')?_0x1a799e['set'](_0x598fe4['getAttribute']('vid'),{'userId':_0x39df17}):(_0x1a799e['set'](_0x598fe4['getAttribute']('vid_start'),{'userId':_0x39df17}),_0x1a7997(_0x1a799e,_0x598fe4,0x0,_0x598fe4['childCount']),_0x1a799e['set'](_0x598fe4['getAttribute']('vid_end'),{'userId':_0x39df17}));}}(this['_touched'],_0x5e3689,_0xba6304,_0xba6304+_0x2eaa69['howMany']);}['_handleMergeOperation'](_0x5d05a2){const _0x201d3f=null===(_0x5d05a2=this['_cloneOperation'](_0x5d05a2,this['_idsRoots']))['_authorId']?null:_0x5d05a2['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x3d3055=_0x5d05a2['targetPosition']['parent'],_0x588b33=_0x5d05a2['sourcePosition']['parent'],_0x34a58d=_0x3d3055['getAttribute']('vid_end'),_0x514556=_0x588b33['getAttribute']('vid_start');_0x3d3055['_setAttribute']('vid_end',_0x588b33['getAttribute']('vid_end')),_0x588b33['_setAttribute']('vid_end',_0x34a58d),this['_touched']['set'](_0x514556,{'userId':_0x201d3f}),this['_touched']['set'](_0x34a58d,{'userId':_0x201d3f}),_0x5d05a2['_execute']();}['_handleSplitOperation'](_0x30fec9){const _0xcdaec9=null===(_0x30fec9=this['_cloneOperation'](_0x30fec9,this['_idsRoots']))['_authorId']?null:_0x30fec9['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x354d24=_0x30fec9['graveyardPosition'],_0x172354=_0x30fec9['splitPosition']['parent'];_0x30fec9['_execute']();const _0x43f716=_0x172354['getAttribute']('vid_end'),_0x4c76d6=_0x30fec9['insertionPosition']['nodeAfter'];if(_0x354d24){const _0x11741f=_0x4c76d6['getAttribute']('vid_end'),_0x2889e9=_0x172354['getAttribute']('vid_end');_0x172354['_setAttribute']('vid_end',_0x11741f),_0x4c76d6['_setAttribute']('vid_end',_0x2889e9),this['_touched']['set'](_0x172354['getAttribute']('vid_end'),{'userId':_0xcdaec9}),this['_touched']['set'](_0x4c76d6['getAttribute']('vid_start'),{'userId':_0xcdaec9});}else{const _0x451109=this['_revisionId']++,_0x13fe8f=this['_revisionId']++;_0x172354['_setAttribute']('vid_end',_0x451109),_0x4c76d6['_setAttribute']('vid_start',_0x13fe8f),_0x4c76d6['_setAttribute']('vid_end',_0x43f716),this['_touched']['set'](_0x451109,{'userId':_0xcdaec9}),this['_touched']['set'](_0x13fe8f,{'userId':_0xcdaec9});}}['_handleMarkerOperation'](_0x1b12c1){if(!_0x1b12c1['affectsData'])return;const _0x4bb4f8=(_0x1b12c1=this['_cloneOperation'](_0x1b12c1,this['_diffRoots']))['oldRange']?_0x1b12c1['oldRange']['root']:null,_0xc84738=_0x1b12c1['newRange']?_0x1b12c1['newRange']['root']:null;_0x4bb4f8&&this['_markers']['delete'](_0x1b12c1['name']),_0xc84738&&this['_markers']['set'](_0x1b12c1['name'],_0x1b12c1['newRange']['clone']());const _0x14dd2d=null===_0x1b12c1['_authorId']?null:_0x1b12c1['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x1693a3=_0x1b12c1['name'];if(!this['_touchedMarkers']['has'](_0x1693a3))return void this['_touchedMarkers']['set'](_0x1693a3,{'range':_0x1b12c1['oldRange'],'userId':_0x14dd2d});const _0x1324e7=this['_touchedMarkers']['get'](_0x1693a3),_0x48180e=_0x1324e7['range'],_0x54fbcb=_0x1b12c1['newRange'];null==_0x48180e&&null==_0x54fbcb||_0x48180e&&_0x54fbcb&&_0x48180e['isEqual'](_0x54fbcb)?this['_touchedMarkers']['delete'](_0x1b12c1['name']):_0x1324e7['userId']=_0x14dd2d;}['_handleRootOperation'](_0x835289,_0x4feee0){this['_diffRoots']['has'](_0x835289['rootName'])?this['_diffRoots']['get'](_0x835289['rootName'])['_isAttached']=_0x835289['isAdd']:(this['_diffRoots']['set'](_0x835289['rootName'],wt(_0x835289['rootName'],_0x835289['elementName'],!0x0)),this['_diffRootsAttributes']['set'](_0x835289['rootName'],{}),_0x4feee0&&this['_idsRoots']['set'](_0x835289['rootName'],wt(_0x835289['rootName'],_0x835289['elementName'],!0x0)));const _0x825b9b=null===_0x835289['_authorId']?null:_0x835289['_authorId']||this['editor']['plugins']['get']('Users')['me']['id'],_0x53a538=this['_touchedRoots']['get'](_0x835289['rootName']);_0x53a538&&_0x53a538['userId']===_0x825b9b?this['_touchedRoots']['delete'](_0x835289['rootName']):this['_touchedRoots']['set'](_0x835289['rootName'],{'userId':_0x825b9b,'isAttached':_0x835289['isAdd']});}['_handleRootAttributeOperation'](_0x137f66){const _0x2b664c=this['_diffRootsAttributes']['get'](_0x137f66['root']['rootName']);null===_0x137f66['newValue']?delete _0x2b664c[_0x137f66['key']]:_0x2b664c[_0x137f66['key']]=_0x137f66['newValue'];}}function gt(_0x46074a){const _0x584579=wt(_0x46074a['rootName'],_0x46074a['name'],_0x46074a['isAttached']());for(const _0x3e8156 of _0x46074a['getChildren']()){const _0x3f7721=_0x3e8156['_clone'](!0x0);_0x584579['_appendChild'](_0x3f7721);}return _0x584579;}function wt(_0x39f560,_0x2ed003,_0x21a4d6=!0x0){const _0x18dde3=new _0x54af68();return _0x18dde3['rootName']=_0x39f560,_0x18dde3['name']=_0x2ed003,_0x18dde3['_isAttached']=_0x21a4d6,_0x18dde3['isAttached']=()=>_0x18dde3['_isAttached'],_0x18dde3;}function mt(_0x505135,_0x844fbe,_0x3aa038){const _0x5b323d='elementEnd'==_0x505135['type']?_0x3aa038['createPositionAt'](_0x505135['item'],'end'):_0x3aa038['createPositionBefore'](_0x505135['item']);return _0x3aa038['createPositionFromPath'](_0x844fbe,_0x5b323d['path'],_0x5b323d['stickiness']);}function pt(_0x5904c6,_0x1d3913,_0x4ade7a){const _0x8a4dc='elementStart'==_0x5904c6['type']?_0x4ade7a['createPositionAt'](_0x5904c6['item'],0x0):_0x4ade7a['createPositionAfter'](_0x5904c6['item']);return _0x4ade7a['createPositionFromPath'](_0x1d3913,_0x8a4dc['path'],_0x8a4dc['stickiness']);}class RevisionHistorySaveRevisionFormView extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x58cdae(_0xb27066){['focusTracker'];['keystrokes'];['revisionNameInputView'];constructor(_0x4a982e,_0x11f336){super(_0x4a982e),this['focusTracker']=new _0x4b88e3(),this['keystrokes']=new _0x5c26bb(),this['set']('revisionNameInputValue',''),this['revisionNameInputView']=this['_createRevisionNameInput'](_0x11f336),this['setTemplate']({'tag':'form','attributes':{'class':['ck','ck-revision-history-save-revision-form','ck-responsive-form'],'tabindex':'-1'},'children':[this['revisionNameInputView']]}),this['initializeCssTransitionDisablerMixin']();}['render'](){super['render'](),_0x6530a({'view':this}),this['focusTracker']['add'](this['revisionNameInputView']['element']),this['keystrokes']['listenTo'](this['element']);const _0xc6621e=_0x15418f=>_0x15418f['stopPropagation']();this['keystrokes']['set']('arrowright',_0xc6621e),this['keystrokes']['set']('arrowleft',_0xc6621e),this['keystrokes']['set']('arrowup',_0xc6621e),this['keystrokes']['set']('arrowdown',_0xc6621e);}['focus'](){this['revisionNameInputView']['focus']();}get['revisionName'](){return this['revisionNameInputView']['fieldView']['element']['value']['trim']();}set['revisionName'](_0x5f2cbb){this['revisionNameInputView']['fieldView']['element']['value']=_0x5f2cbb['trim']();}['reset'](){this['revisionNameInputView']['fieldView']['element']['value']='',this['revisionNameInputView']['errorText']=null;}['_createRevisionNameInput'](_0x336fed){const _0x1b9286=new _0x3dc991(this['locale'],_0x110003),_0x25529e=_0x1b9286['fieldView'];_0x25529e['extendTemplate']({'attributes':{'maxlength':'220'}});let _0x5b987a=ft(this['locale'],'Name\x20of\x20the\x20revision');return!_0x336fed&&(_0x5b987a+='\x20('+ft(this['locale'],'optional')+')'),(_0x1b9286['label']=_0x5b987a,_0x25529e['on']('input',()=>{this['revisionNameInputValue']=_0x25529e['element']['value']['trim']();}),_0x1b9286);}}class RevisionHistoryUI extends _0x4c1791{static get['pluginName'](){return'RevisionHistoryUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker];}['_saveRevisionFormView'];['init'](){const _0x4a221c=this['editor'],_0x5b2734=_0x4a221c['plugins']['get']('RevisionTracker');_0x4a221c['ui']['componentFactory']['add']('revisionHistory',_0x5df140=>{const _0x342999=_0xaaea9b(_0x5df140),_0x191a5a=_0x342999['panelView']['children'],_0x1efc5a=new _0x512836(_0x5df140),_0xcb6b4e=new _0xa9b4cb(_0x5df140),_0x431c4a=this['_createSaveRevisionButton'](_0x1b24ae),_0x2bbc75=new _0xa9b4cb(_0x5df140),_0x13541b=this['_createOpenRevisionButton'](_0x1b24ae);return _0x342999['bind']('isEnabled')['to'](_0x5b2734,'isReady',_0x5b2734,'isEnabled',_0x4a221c,'isReadOnly',(_0x487cf3,_0x71d9eb,_0x1d8d19)=>_0x487cf3&&_0x71d9eb&&!_0x1d8d19),_0x342999['buttonView']['set']({'icon':_0x3e8fab,'label':ft(_0x5df140,'Revision\x20history'),'tooltip':!0x0}),_0x431c4a['set']({'withText':!0x0,'role':'menuitem'}),_0x13541b['set']({'withText':!0x0,'role':'menuitem'}),this['listenTo'](_0x13541b,'execute',()=>{_0x342999['isOpen']=!0x1,_0x4a221c['editing']['view']['focus']();},{'priority':'low'}),_0xcb6b4e['children']['add'](_0x431c4a),_0x2bbc75['children']['add'](_0x13541b),_0x1efc5a['role']='menu',_0x1efc5a['items']['addMany']([_0xcb6b4e,_0x2bbc75]),_0x191a5a['add'](_0x1efc5a),_0x342999;}),_0x4a221c['ui']['componentFactory']['add']('menuBar:revisionHistory',()=>this['_registerMenuComponent']());}['_registerMenuComponent'](){const _0x36a748=this['editor'],_0x2fd334=_0x36a748['locale'],_0x2014bc=_0x36a748['plugins']['get']('RevisionTracker'),_0x4db4ef=new _0x185148(_0x2fd334),_0x444812=new _0x430aef(_0x2fd334);_0x4db4ef['bind']('isEnabled')['to'](_0x2014bc,'isReady',_0x2014bc,'isEnabled',_0x36a748,'isReadOnly',(_0x35cc9c,_0x503ff6,_0x10ab33)=>_0x35cc9c&&_0x503ff6&&!_0x10ab33),_0x4db4ef['buttonView']['set']({'icon':_0x3e8fab,'label':ft(_0x2fd334,'Revision\x20history')});const _0x3c8c84=new tt(_0x2fd334,_0x4db4ef),_0x1e8215=this['_createSaveRevisionButton'](it);_0x1e8215['delegate']('execute')['to'](_0x4db4ef),_0x3c8c84['children']['add'](_0x1e8215),_0x444812['items']['add'](_0x3c8c84);const _0x5c9ff3=new tt(_0x2fd334,_0x4db4ef),_0x3e985c=this['_createOpenRevisionButton'](it);return _0x3e985c['delegate']('execute')['to'](_0x4db4ef),_0x5c9ff3['children']['add'](_0x3e985c),_0x444812['items']['add'](_0x5c9ff3),_0x4db4ef['panelView']['children']['add'](_0x444812),_0x4db4ef;}['_createSaveRevisionButton'](_0x6b46ef){const _0x4b0f76=this['editor'],_0x4040b4=_0x4b0f76['plugins']['get']('RevisionTracker'),_0x6e480=new _0x6b46ef(_0x4b0f76['locale']);return _0x6e480['set']({'label':ft(_0x4b0f76['locale'],'Save\x20current\x20revision')}),_0x6e480['bind']('isEnabled')['to'](_0x4040b4,'isReady',_0x4040b4,'isEnabled',_0x4b0f76,'isReadOnly',(_0x345d6e,_0x57f0fe,_0x5db43e)=>_0x345d6e&&_0x57f0fe&&!_0x5db43e),this['listenTo'](_0x6e480,'execute',()=>{this['_showDialog']();}),_0x6e480;}['_createOpenRevisionButton'](_0x115260){const _0x233c2c=this['editor'],_0x29d6e1=_0x233c2c['plugins']['get']('RevisionTracker'),_0x7c2d4d=new _0x115260(_0x233c2c['locale']);return _0x7c2d4d['set']({'label':ft(_0x233c2c['locale'],'Open\x20revision\x20history')}),_0x7c2d4d['bind']('isEnabled')['to'](_0x29d6e1,'isReady',_0x233c2c,'isReadOnly',(_0x4ef588,_0x5573c0)=>_0x4ef588&&!_0x5573c0),this['listenTo'](_0x7c2d4d,'execute',()=>{_0x233c2c['config']['get']('revisionHistory')['showRevisionViewerCallback']();}),_0x7c2d4d;}['_showDialog'](){const _0x46288a=this['editor'],_0x36a7cb=_0x46288a['locale'],_0x54e03e=_0x46288a['plugins']['get']('Dialog'),_0x1ab703=_0x46288a['plugins']['get']('RevisionTracker');function _0x54d523(_0x1f6b6d){_0x46288a['config']['get']('revisionHistory.requireRevisionName')&&''===_0x1f6b6d['revisionName']?_0x1f6b6d['revisionNameInputView']['errorText']=ft(_0x36a7cb,'The\x20revision\x20name\x20cannot\x20be\x20empty.'):(_0x46288a['plugins']['get'](RevisionTracker)['saveRevision']({'name':_0x1f6b6d['revisionName']}),_0x54e03e['hide']());}this['_saveRevisionFormView']||(this['_createSaveRevisionFormView'](),this['_saveRevisionFormView']['on']('submit',()=>_0x54d523(this['_saveRevisionFormView']))),this['_saveRevisionFormView']['reset'](),_0x54e03e['show']({'id':'revisionSave','title':ft(_0x36a7cb,'Save\x20current\x20revision'),'isModal':!0x0,'content':this['_saveRevisionFormView'],'actionButtons':[{'label':ft(_0x46288a['locale'],'Cancel'),'withText':!0x0,'onExecute':()=>_0x54e03e['hide']()},{'label':ft(_0x46288a['locale'],'Accept'),'class':'ck-button-action','withText':!0x0,'onCreate'(_0x41c949){_0x41c949['bind']('isEnabled')['to'](_0x1ab703,'isReady',_0x1ab703,'isEnabled',_0x46288a,'isReadOnly',(_0x4544f8,_0x389d85,_0x34f32d)=>_0x4544f8&&_0x389d85&&!_0x34f32d);},'onExecute':()=>_0x54d523(this['_saveRevisionFormView'])}]});}['_createSaveRevisionFormView'](){const _0x3b7b85=this['editor'],_0x21a17b=_0x3b7b85['locale'];this['_saveRevisionFormView']=new RevisionHistorySaveRevisionFormView(_0x21a17b,_0x3b7b85['config']['get']('revisionHistory.requireRevisionName')),this['_saveRevisionFormView']['render']();}}class ChangeDetailsView extends _0xb27066{['changeId'];['_model'];constructor(_0x27d520,_0x2b0480){super(_0x27d520),this['_model']=_0x2b0480,this['changeId']=_0x2b0480['id'];const _0xd58257=this['bindTemplate'],_0x2e5092=ft(_0x27d520,_0x2b0480['data']['isSuggestion']?'Suggested\x20by':'add'==_0x2b0480['type']?'Added\x20by':'Removed\x20by');this['set']('type',_0x2b0480['type']),this['setTemplate']({'tag':'div','attributes':{'class':['ck-annotation','ck-revision-change',_0xd58257['to']('type',_0x432bdd=>'ck-revision-change__'+_0x432bdd)],'tabindex':-0x1},'children':[{'tag':'span','children':[{'tag':'span','attributes':{'class':['ck-revision-change__label']},'children':[{'text':_0x2e5092}]},{'text':'\x20'+_0x2b0480['author']['name']}]}]});}['focus'](){this['element']['focus']();}}class ChangeItem extends/* #__PURE__ -- @preserve */
|
|
26
|
+
_0x5f230a(){['id'];['author'];['type'];['data'];['rootName'];constructor(_0x219384){super(),this['id']=_0x219384['id']||_0x2d6fd8(),this['author']=_0x219384['author'],this['type']=_0x219384['type'],this['data']=_0x219384['data']||{},this['rootName']=_0x219384['rootName'],this['set']('createdAt',_0x219384['createdAt']);}['toJSON'](){return{'id':this['id'],'authorId':this['author']['id'],'type':this['type'],'data':this['data'],'createdAt':this['createdAt']};}}class RevisionDiff{['newRevisionId'];['oldRevisionId'];['changes'];constructor(_0x183b57,_0x155985){this['newRevisionId']=_0x183b57,this['oldRevisionId']=_0x155985,this['changes']=new _0x1224a0();}['_setChanges'](_0x1e6b12){for(const _0x31800c of _0x1e6b12)this['changes']['add'](_0x31800c);}}class RevisionViewer extends _0x4c1791{['repository'];['adapter']=null;['_utils'];['_activeViewTarget'];['_changeView'];['_changeIdToChange'];['_balloon'];static get['pluginName'](){return'RevisionViewer';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x48a34e,et,RevisionsRepository,RevisionHistoryUtils];}constructor(_0x162671){super(_0x162671),this['repository']=this['editor']['plugins']['get']('RevisionsRepository'),this['_utils']=this['editor']['plugins']['get']('RevisionHistoryUtils'),this['set']('activeChange',null),this['set']('activeView',null),this['_activeViewTarget']=null,this['set']('diff',null),this['set']('isReady',!0x1),this['set']('isEnabled',!0x0),this['on']('change:isEnabled',(_0x39608e,_0x44afcb,_0x5c3675)=>{this['activeChange']=null,this['activeView']=null,this['editor']['editing']['view']['change'](_0x205179=>{for(const _0x1b72f9 of this['editor']['editing']['view']['document']['roots'])_0x5c3675?_0x205179['removeClass']('ck-editor__editable__overlay',_0x1b72f9):_0x205179['addClass']('ck-editor__editable__overlay',_0x1b72f9);});}),this['bind']('isNavigationMode')['to'](this,'activeChange',_0x472864=>null!==_0x472864),this['bind']('currentChangeNumber')['to'](this,'isReady',this,'diff',this,'activeChange',(_0x1902f1,_0x32bd1f,_0x188d01)=>_0x1902f1&&_0x188d01?_0x32bd1f['changes']['getIndex'](_0x188d01):0x0),this['bind']('numberOfChanges')['to'](this,'isReady',this,'diff',(_0xd60269,_0x43b1ea)=>_0xd60269?_0x43b1ea['changes']['length']:0x0),this['_changeView']=null,this['_changeIdToChange']=new Map(),this['_balloon']=this['editor']['plugins']['get'](et);}['init'](){const _0x117afc=this['editor'],_0x283beb=new ShowChangeCommand(_0x117afc,{'direction':'backward'}),_0x5680a3=new ShowChangeCommand(_0x117afc,{'direction':'forward'});(_0x117afc['commands']['add']('showPreviousChange',_0x283beb),_0x117afc['commands']['add']('showNextChange',_0x5680a3),_0x117afc['commands']['add']('restoreRevision',new RestoreRevisionCommand(_0x117afc)),this['on']('change:numberOfChanges',()=>{_0x283beb['refresh'](),_0x5680a3['refresh']();}),this['_setConversion'](),this['_initInteractions'](),_0x117afc['enableReadOnlyMode']('revision-viewer'),_0x117afc['plugins']['has']('WidgetToolbarRepository'))&&_0x117afc['plugins']['get']('WidgetToolbarRepository')['forceDisabled']('revision-viewer');}async['getRevisionDocumentData'](_0x35ca6d){return await this['_utils']['loadRevisionData'](_0x35ca6d,this['adapter']),this['_utils']['getRevisionDocumentData'](_0x35ca6d);}async['getRevisionRootsAttributes'](_0x3fd282){return await this['_utils']['loadRevisionData'](_0x3fd282,this['adapter']),this['_utils']['getRevisionRootsAttributes'](_0x3fd282);}async['compare'](_0x510073,_0x56dbae,_0x67bcd1=!0x1){if(!this['isEnabled'])return;const _0x74563c=this['diff'],_0x4ec142=this['repository'],_0x8eb14e='string'==typeof _0x510073?_0x4ec142['getRevision'](_0x510073):_0x510073,_0x538f41='string'==typeof _0x56dbae?_0x4ec142['getRevision'](_0x56dbae):_0x56dbae,_0xd74e25=_0x8eb14e['id'],_0x38e911=_0x538f41?_0x538f41['id']:null;if(!_0x67bcd1&&this['diff']&&this['diff']['newRevisionId']===_0xd74e25&&this['diff']['oldRevisionId']===_0x38e911)return Promise['resolve']();this['isReady']=!0x1,this['activeView']=null,this['activeChange']=null,this['diff']=new RevisionDiff(_0xd74e25,_0x38e911);const _0x3d8187=this['_getRevisionsRange'](_0x8eb14e,_0x538f41,!0x0)['map'](_0x4ec14d=>this['_utils']['loadRevisionData'](_0x4ec14d,this['adapter']));return _0x3d8187['push'](new Promise(_0x655a90=>{setTimeout(_0x655a90,0x14);})),Promise['all'](_0x3d8187)['then'](()=>{if(!this['isEnabled'])return;this['_cleanUp']();const _0x5454a9=this['_getDiff'](_0xd74e25,_0x38e911);for(const _0x238e9b of _0x5454a9['changes'])this['_changeIdToChange']['set'](_0x238e9b['id'],_0x238e9b);this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x37166d=>{for(const _0x4d53b1 of this['editor']['model']['document']['getRootNames']())_0x37166d['detachRoot'](_0x4d53b1);for(const _0x2fd3e0 of Object['keys'](_0x5454a9['model'])){const _0x5856ba=_0x5454a9['model'][_0x2fd3e0]['name'],_0x48fe0f=_0x37166d['addRoot'](_0x2fd3e0,_0x5856ba);for(const _0x40b6d4 of Object['keys'](_0x5454a9['attributes'][_0x2fd3e0]))_0x37166d['setAttribute'](_0x40b6d4,_0x5454a9['attributes'][_0x2fd3e0][_0x40b6d4],_0x48fe0f);_0x37166d['insert'](_0x5454a9['model'][_0x2fd3e0],_0x48fe0f,0x0);}}),this['diff']['_setChanges'](this['_sortAndFilterDiffChanges'](_0x5454a9['changes'])),this['isReady']=!0x0;})['catch'](_0x1f57e3=>{console['error'](_0x1f57e3),this['_cleanUp'](),_0x74563c&&(this['diff']=_0x74563c),this['isReady']=!0x0;});}['addRevisionData'](_0x45835e,_0x25f159){const _0x9c4aca=this['repository']['createRevision'](_0x45835e);return _0x9c4aca['on']('_update',(_0x45df78,_0x376199,_0x3b6947)=>_0x25f159(_0x376199,_0x3b6947,_0x9c4aca)),this['repository']['addRevision'](_0x9c4aca),_0x9c4aca;}['_cleanUp'](){this['activeChange']=null,this['_cleanMarkers'](),this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=null,this['_changeIdToChange']['clear'](),this['editor']['model']['enqueueChange']({'isUndoable':!0x1},_0x498da7=>{for(const _0x4fafc8 of this['editor']['model']['document']['getRootNames']())_0x498da7['detachRoot'](_0x4fafc8);});}['_sortAndFilterDiffChanges'](_0x3601d6){const _0x38d010=[],_0x1dbab9=new Map();for(const _0x504f05 of this['editor']['model']['document']['getRootNames']()){const _0x4ddebb=this['editor']['editing']['view']['getDomRoot'](_0x504f05);if(!_0x4ddebb)continue;const _0x54e068=_0x4ddebb['getClientRects']()['item'](0x0);_0x54e068&&(_0x38d010['push'](_0x504f05),_0x1dbab9['set'](_0x504f05,_0x54e068));}return _0x38d010['sort']((_0x48d2d0,_0xed31e0)=>{const _0xa36d57=_0x1dbab9['get'](_0x48d2d0),_0x5a5ebd=_0x1dbab9['get'](_0xed31e0);return _0xa36d57['y']-_0x5a5ebd['y']||_0xa36d57['x']-_0x5a5ebd['x'];}),(_0x3601d6=_0x3601d6['filter'](_0x49667e=>_0x38d010['includes'](_0x49667e['rootName'])))['sort']((_0xe13d7c,_0x20857c)=>_0x38d010['indexOf'](_0xe13d7c['rootName'])-_0x38d010['indexOf'](_0x20857c['rootName'])),_0x3601d6;}['_makeTape'](_0x11abe3){const _0x63838f=Array['from'](_0x11abe3['markers'])['filter'](([_0x3d77ed,_0x414d32])=>_0x3d77ed['startsWith']('revision:')&&!_0x414d32['isCollapsed']),_0x19f01f=Array['from'](this['editor']['model']['createRangeIn'](_0x11abe3)['getWalker']({'singleCharacters':!0x0}));if(0x0!=_0x63838f['length'])for(const _0x45ed1a of _0x19f01f){const [_0x397ec3,_0x2809d0]=_0x63838f[0x0],[,_0x4af740,_0x3f225f]=_0x397ec3['split'](':');if(_0x2809d0['end']['isEqual'](_0x45ed1a['nextPosition'])&&_0x63838f['shift'](),(_0x45ed1a['previousPosition']['isEqual'](_0x2809d0['start'])||_0x45ed1a['previousPosition']['isAfter'](_0x2809d0['start']))&&('insertion'==_0x4af740?_0x45ed1a['isAdded']={'userId':_0x3f225f}:'deletion'==_0x4af740&&(_0x45ed1a['isRemoved']={'userId':_0x3f225f})),0x0==_0x63838f['length'])break;}return _0x19f01f;}['_refreshStartEndIndex'](_0x36375f){const _0x3abcfb=new Map();for(let _0x5e7ae9=0x0;_0x5e7ae9<_0x36375f['length'];_0x5e7ae9++)'text'===_0x36375f[_0x5e7ae9]['type']?(_0x36375f[_0x5e7ae9]['item']['startIndex']=_0x5e7ae9,_0x36375f[_0x5e7ae9]['item']['endIndex']=_0x5e7ae9):('elementStart'===_0x36375f[_0x5e7ae9]['type']?_0x36375f[_0x5e7ae9]['item']['startIndex']=_0x5e7ae9:'elementEnd'===_0x36375f[_0x5e7ae9]['type']&&(_0x36375f[_0x5e7ae9]['item']['endIndex']=_0x5e7ae9),_0x3abcfb['set'](_0x36375f[_0x5e7ae9]['id'],_0x5e7ae9));for(const _0x56c721 of _0x3abcfb['values']())'elementStart'===_0x36375f[_0x56c721]['type']?_0x36375f[_0x56c721]['item']['endIndex']=_0x3abcfb['get'](_0x36375f[_0x56c721]['pairId']):'elementEnd'===_0x36375f[_0x56c721]['type']&&(_0x36375f[_0x56c721]['item']['startIndex']=_0x3abcfb['get'](_0x36375f[_0x56c721]['pairId']));}['_processTape'](_0x4d8de8){for(let _0x34ec0a=0x0;_0x34ec0a<_0x4d8de8['length'];_0x34ec0a++){if('elementStart'===_0x4d8de8[_0x34ec0a]['type'])_0x4d8de8[_0x34ec0a]['item']['startIndex']=_0x34ec0a;else{if('elementEnd'===_0x4d8de8[_0x34ec0a]['type']){_0x4d8de8[_0x34ec0a]['item']['endIndex']=_0x34ec0a;const _0x2de3b3=_0x4d8de8[_0x34ec0a]['item']['startIndex'];_0x4d8de8[_0x2de3b3]['pairId']=_0x4d8de8[_0x34ec0a]['id'],_0x4d8de8[_0x34ec0a]['pairId']=_0x4d8de8[_0x2de3b3]['id'];}else _0x4d8de8[_0x34ec0a]['item']['startIndex']=_0x34ec0a,_0x4d8de8[_0x34ec0a]['item']['endIndex']=_0x34ec0a,_0x4d8de8[_0x34ec0a]['pairId']=null;}_0x4d8de8[_0x34ec0a]['markersStart']||(_0x4d8de8[_0x34ec0a]['markersStart']=[],_0x4d8de8[_0x34ec0a]['markersEnd']=[]);}}['_markInsertions'](_0x4d4b5d,_0x36ff53){const _0x48b14d=_0x4d4b5d['filter'](_0xa0bafd=>!_0xa0bafd['isAdded']);for(let _0x25da61=0x0;_0x25da61<_0x36ff53['length'];_0x25da61++)_0x36ff53[_0x25da61]['isAdded']&&(_0x48b14d[_0x25da61]['isAdded']=_0x36ff53[_0x25da61]['isAdded']);}['_getDiff'](_0x354ae4,_0x4b5dbb=null){const _0x4d22f8=this['repository']['getRevision'](_0x354ae4),_0x35b4cb=_0x4b5dbb?this['repository']['getRevision'](_0x4b5dbb):null,_0x454da0=this['_getRevisionsRange'](_0x4d22f8,_0x35b4cb),_0x4874a8=_0x454da0[_0x454da0['length']-0x1],_0x4b5001=new Map(),_0x2442d8={'model':{},'attributes':{},'changes':[]},_0x714344=new Set(),_0x24cf69=new Map();for(let _0x2bc41a=_0x454da0['length']-0x1;_0x2bc41a>=0x0;_0x2bc41a--){const _0x3a1d55=_0x454da0[_0x2bc41a];for(const _0x3b3914 of Object['keys'](_0x3a1d55['diffData']))if(_0x3a1d55['diffData'][_0x3b3914]['attachChange']){const _0x3dc5de=_0x3a1d55['diffData'][_0x3b3914]['attachChange'];_0x3dc5de['isAttached']?(_0x714344['add'](_0x3b3914),_0x24cf69['has'](_0x3b3914)&&_0x24cf69['get'](_0x3b3914)['userId']==_0x3dc5de['userId']?_0x24cf69['delete'](_0x3b3914):_0x24cf69['set'](_0x3b3914,_0x3dc5de)):_0x24cf69['has'](_0x3b3914)?(_0x714344['delete'](_0x3b3914),_0x24cf69['delete'](_0x3b3914)):(_0x714344['add'](_0x3b3914),_0x24cf69['set'](_0x3b3914,_0x3dc5de));}else _0x714344['add'](_0x3b3914);}for(const _0x2140fb of _0x714344){const _0x311328=_0x24cf69['has'](_0x2140fb)&&!_0x24cf69['get'](_0x2140fb)['isAttached'];let _0x1f2fce=_0x311328?_0x454da0['length']-0x1:0x0;const _0x296360=_0x311328?-0x1:0x1;for(;_0x454da0[_0x1f2fce];){const _0x31fa7e=_0x454da0[_0x1f2fce];if(_0x31fa7e['diffData'][_0x2140fb]){const _0x1046e7=_0x311328?_0x31fa7e['diffData'][_0x2140fb]['attributesBefore']:_0x31fa7e['diffData'][_0x2140fb]['attributesAfter'];_0x2442d8['attributes'][_0x2140fb]=_0x1046e7?_0x531982(_0x1046e7):{};break;}_0x1f2fce+=_0x296360;}}for(const _0x287e14 of _0x454da0){_0x287e14['model']={};for(const _0x559543 of _0x287e14['authors'])_0x4b5001['set'](_0x559543['id'],_0x559543);for(const _0x268536 of _0x714344){const _0x35f2d6=_0x287e14['diffData'][_0x268536]?_0x287e14['diffData'][_0x268536]['insertions']:'[]',_0x295d95=_0x287e14['diffData'][_0x268536]?_0x287e14['diffData'][_0x268536]['deletions']:'[]',_0x5b4c0e=_0x287e14['diffData'][_0x268536]?.['rootElementName']||'$root';_0x287e14['model'][_0x268536]={'insertions':this['_utils']['_makeModelFromViewString'](_0x35f2d6,_0x5b4c0e),'deletions':this['_utils']['_makeModelFromViewString'](_0x295d95,_0x5b4c0e)};}}for(const _0x54a6a4 of _0x714344){let _0x1499c9=null,_0x211841=0x0;const _0x5253ad=_0x454da0['map'](_0xd118f5=>_0xd118f5['diffData'][_0x54a6a4]?.['rootElementName'])['find'](_0x565b0c=>void 0x0!==_0x565b0c)||'$root',_0x27e4bd=new Map(Array['from'](_0x4d22f8['model'][_0x54a6a4]['insertions']['markers'])['filter'](([_0x11f507])=>!_0x11f507['startsWith']('revision:')));let _0x4afa9c=0x0;for(const _0x34ee06 of _0x454da0){const _0x252e3b=this['_makeTape'](_0x34ee06['model'][_0x54a6a4]['insertions']);_0x34ee06==_0x4d22f8?(_0x1499c9=_0x252e3b,_0x211841=_0x1499c9['length'],_0x1499c9['forEach'](_0x1d94b8=>{_0x1d94b8['id']=_0x4afa9c++;}),this['_processTape'](_0x1499c9)):this['_markInsertions'](_0x1499c9,_0x252e3b);const _0x4eb54d=_0x1499c9['filter'](_0x2b5956=>!_0x2b5956['isAdded'])['map'](_0x4ffbdf=>_0x4ffbdf['id']);let _0x23c5c0=0x0;const _0x35faf3=this['_makeTape'](_0x34ee06['model'][_0x54a6a4]['deletions']);_0x35faf3['forEach'](_0x54c510=>{_0x54c510['isRemoved']?_0x54c510['id']=_0x211841++:_0x54c510['id']=_0x4eb54d[_0x23c5c0++];}),this['_processTape'](_0x35faf3),this['_setDistance'](_0x1499c9,'isAdded'),this['_setDistance'](_0x35faf3,'isRemoved'),_0x34ee06==_0x4d22f8&&this['_markMarkers'](_0x1499c9,_0x27e4bd),_0x1499c9=this['_joinTapes'](_0x1499c9,_0x35faf3),this['_refreshStartEndIndex'](_0x1499c9),this['_setDistance'](_0x1499c9,'isRemoved');}_0x1499c9=_0x1499c9['filter'](_0x530397=>!(_0x530397['isAdded']&&_0x530397['isRemoved']));const _0x10d1a5=new Map(_0x4874a8['model'][_0x54a6a4]['deletions']['markers']),_0x322ca0=new Set(_0x27e4bd['keys']());for(const _0x104cfc of _0x10d1a5['keys']())_0x322ca0['delete'](_0x104cfc);this['_markSuggestions'](_0x1499c9,_0x322ca0),this['_fixObsoleteTags'](_0x1499c9),_0x1499c9=this['_removeMissingPairs'](_0x1499c9),_0x1499c9=this['_markMismatchedRemovedTags'](_0x1499c9),_0x1499c9=this['_removeUnsupportedChanges'](_0x1499c9);const {root:_0x121142,changes:_0x42a9fd}=this['_makeModelFromTape'](_0x1499c9,_0x4b5001,_0x54a6a4,_0x5253ad);_0x2442d8['model'][_0x54a6a4]=_0x121142;const _0x508fe2=_0x24cf69['get'](_0x54a6a4);if(_0x508fe2){const _0x52c6b4=_0x4b5001['get'](_0x508fe2['userId']),_0x58d6b4=new ChangeItem({'author':_0x52c6b4,'type':_0x508fe2['isAttached']?'add':'remove','data':{'isOnRoot':!0x0},'createdAt':new Date(),'rootName':_0x54a6a4});_0x42a9fd['unshift'](_0x58d6b4),_0x2442d8['attributes'][_0x54a6a4]['revisionHistoryAttachChange']=_0x58d6b4['id'];}_0x2442d8['changes']=_0x2442d8['changes']['concat'](_0x42a9fd);}return _0x2442d8;}['_markMarkers'](_0x1a52a8,_0x2b7e58){for(let _0x59e219=0x0;_0x59e219<_0x1a52a8['length'];_0x59e219++)for(const [_0x214a22,_0x48c6db]of _0x2b7e58)!_0x48c6db['isCollapsed']&&_0x48c6db['start']['isEqual'](_0x1a52a8[_0x59e219]['previousPosition'])&&_0x1a52a8[_0x59e219]['markersStart']['push'](_0x214a22),_0x48c6db['end']['isEqual'](_0x1a52a8[_0x59e219]['nextPosition'])&&_0x1a52a8[_0x59e219]['markersEnd']['push'](_0x214a22);}['_joinTapes'](_0x4cdb65,_0x3d9f0b){let _0x1746e7=[],_0x1a801c=0x0,_0x214fab=0x0;for(;_0x1a801c<_0x4cdb65['length']||_0x214fab<_0x3d9f0b['length'];){const _0x46b4e7=_0x4cdb65[_0x1a801c]||{},_0x16731c=_0x3d9f0b[_0x214fab]||{};if(_0x46b4e7['id']==_0x16731c['id'])_0x1a801c++,_0x214fab++,_0x1746e7['push'](_0x46b4e7);else{if(_0x16731c['isRemoved']&&_0x46b4e7['isAdded']){const {commonTape:_0x53ec21,iEnd:_0x5604c7,jEnd:_0x9f9011}=this['_threeWayMerge'](_0x4cdb65,_0x1a801c,_0x3d9f0b,_0x214fab);_0x1746e7=_0x1746e7['concat'](_0x53ec21),_0x1a801c=_0x5604c7,_0x214fab=_0x9f9011;}else _0x16731c['isRemoved']?(_0x214fab++,_0x1746e7['push'](_0x16731c)):(_0x1a801c++,_0x1746e7['push'](_0x46b4e7));}}return _0x1746e7;}['_markSuggestions'](_0x1d6e33,_0x30c208){const _0x1fcd0d=[];for(let _0x2a5d06=0x0;_0x2a5d06<_0x1d6e33['length'];_0x2a5d06++){for(let _0xa7c797=0x0;_0xa7c797<_0x1d6e33[_0x2a5d06]['markersStart']['length'];_0xa7c797++){const _0x1bb251=_0x1d6e33[_0x2a5d06]['markersStart'][_0xa7c797];if(!_0x30c208['has'](_0x1bb251))continue;const {group:_0xdaed7a,type:_0x175f99,authorId:_0x33dd05}=_0xc75c41(_0x1bb251);'revision-suggestion'!=_0xdaed7a||'insertion'!=_0x175f99&&'deletion'!=_0x175f99||(_0x1fcd0d['unshift']({'type':_0x175f99,'name':_0x1bb251,'userId':_0x33dd05}),_0x1d6e33[_0x2a5d06]['markersStart']['splice'](_0xa7c797,0x1),_0xa7c797--);}_0x9dff67(_0x1d6e33[_0x2a5d06]);for(let _0x5c25be=0x0;_0x5c25be<_0x1d6e33[_0x2a5d06]['markersEnd']['length'];_0x5c25be++){const _0x1d297e=_0x1d6e33[_0x2a5d06]['markersEnd'][_0x5c25be];if(!_0x30c208['has'](_0x1d297e))continue;const {group:_0x51144c,type:_0x5d6f83}=_0xc75c41(_0x1d297e);if('revision-suggestion'!=_0x51144c||'insertion'!=_0x5d6f83&&'deletion'!=_0x5d6f83)continue;_0x1d6e33[_0x2a5d06]['markersEnd']['splice'](_0x5c25be,0x1),_0x5c25be--;const _0x567c66=_0x1fcd0d['findIndex'](_0x1ca64b=>_0x1ca64b['name']==_0x1d297e);_0x567c66>-0x1&&_0x1fcd0d['splice'](_0x567c66,0x1);}}function _0xc75c41(_0x4a495e){const _0x3c87d2=_0x4a495e['split'](':');return{'group':_0x3c87d2[0x0],'type':_0x3c87d2[0x1],'subType':_0x3c87d2['length']>=0x5?_0x3c87d2[0x2]:null,'id':_0x3c87d2['length']<0x5?_0x3c87d2[0x2]:_0x3c87d2[0x3],'authorId':_0x3c87d2['length']<0x5?_0x3c87d2[0x3]:_0x3c87d2[0x4],'markerCount':0x6==_0x3c87d2['length']?_0x3c87d2[0x5]:null};}function _0x9dff67(_0x296f35){for(let _0x5f290b=0x0;_0x5f290b<_0x1fcd0d['length'];_0x5f290b++){if(_0x296f35['isAdded']&&'insertion'==_0x1fcd0d[_0x5f290b]['type']&&_0x296f35['isAdded']['userId']==_0x1fcd0d[_0x5f290b]['userId'])return _0x296f35['isAddSuggestion']=_0x1fcd0d[_0x5f290b],void delete _0x296f35['isAdded'];if(!_0x296f35['isAdded']&&!_0x296f35['isRemoved']&&'deletion'==_0x1fcd0d[_0x5f290b]['type'])return void(_0x296f35['isRemoveSuggestion']=_0x1fcd0d[_0x5f290b]);}}}['_setDistance'](_0x255eee,_0x116d63){let _0x163dc3=0x0,_0x198b6a=!0x1;const _0x5b8db1=new Map();for(const _0x5a152a of _0x255eee)_0x5a152a[_0x116d63]?_0x198b6a&&(_0x163dc3++,_0x198b6a=!0x1):(_0x163dc3++,_0x198b6a=!0x0),_0x5b8db1['set'](_0x5a152a['id'],_0x163dc3);for(let _0x1cbd63=0x0;_0x1cbd63<_0x255eee['length'];_0x1cbd63++){if('isRemoved'==_0x116d63&&_0x255eee[_0x1cbd63]['isAdded']||'isAdded'==_0x116d63&&_0x255eee[_0x1cbd63]['isRemoved'])continue;if('text'==_0x255eee[_0x1cbd63]['type']){_0x255eee[_0x1cbd63]['distance']=0x0;continue;}const _0x3cddae=_0x5b8db1['get'](_0x255eee[_0x1cbd63]['pairId']),_0x11b238=_0x5b8db1['get'](_0x255eee[_0x1cbd63]['id']);_0x255eee[_0x1cbd63]['distance']=_0x3cddae-_0x11b238;}}['_getRevisionsRange'](_0x4fae8c,_0x37fad4,_0x5c3fb4=!0x1){const _0x23f733=[];let _0x811003=this['repository']['getIndex'](_0x4fae8c),_0x5e2a3a=this['repository']['getIndex'](_0x37fad4);for(-0x1==_0x5e2a3a&&(_0x5e2a3a=this['repository']['_revisions']['length'],_0x5c3fb4=!0x1);_0x811003<_0x5e2a3a;)_0x23f733['push'](this['repository']['getRevision'](_0x811003)),_0x811003++;return _0x5c3fb4&&_0x23f733['push'](this['repository']['getRevision'](_0x811003)),_0x23f733;}['_threeWayMerge'](_0x2bbcd4,_0x3de3af,_0x30e862,_0x491e00){const _0x2f0671=this['editor']['model']['schema'];let _0x56c311=_0x3de3af;for(;_0x2bbcd4[_0x56c311]&&_0x2bbcd4[_0x56c311]['isAdded'];)_0x56c311++;let _0x51ed61=_0x491e00;for(;_0x30e862[_0x51ed61]&&_0x30e862[_0x51ed61]['isRemoved'];)_0x51ed61++;_0x261ca0(_0x2bbcd4,_0x3de3af,_0x56c311),_0x261ca0(_0x30e862,_0x491e00,_0x51ed61);const _0x4bf8e9=_0x30e862['slice'](_0x491e00,_0x51ed61)['concat'](_0x2bbcd4['slice'](_0x3de3af,_0x56c311));return _0x4bf8e9['sort']((_0x843709,_0x4cdda2)=>_0x843709['side']!=_0x4cdda2['side']?_0x843709['side']-_0x4cdda2['side']:_0x843709['level']!=_0x4cdda2['level']?_0x843709['level']-_0x4cdda2['level']:_0x843709['distance']!=_0x4cdda2['distance']?_0x4cdda2['distance']-_0x843709['distance']:!!_0x843709['isAdded']!=!!_0x4cdda2['isAdded']?-0x1==_0x843709['side']||0x0==_0x843709['side']?_0x843709['isAdded']?-0x1:0x1:_0x843709['isAdded']?0x1:-0x1:_0x843709['index']-_0x4cdda2['index']),{'commonTape':_0x4bf8e9,'iEnd':_0x56c311,'jEnd':_0x51ed61};function _0x261ca0(_0x20f5f1,_0xc3da9d,_0xa09841){let _0x44e730=-0x1,_0x41db30=Number['POSITIVE_INFINITY'],_0x52b57b=!0x0;for(let _0x5b76b2=_0xc3da9d;_0x5b76b2<_0xa09841;_0x5b76b2++)if(_0x2f0671['isInline'](_0x20f5f1[_0x5b76b2]['item'])||(_0x52b57b=!0x1),_0x20f5f1[_0x5b76b2]['item']['startIndex']<_0xc3da9d&&(_0x44e730=_0x5b76b2),_0x20f5f1[_0x5b76b2]['item']['endIndex']>=_0xa09841){_0x41db30=_0x5b76b2;break;}_0x52b57b&&(_0x44e730=_0xa09841-0x1);for(let _0xfc0447=_0xc3da9d;_0xfc0447<_0xa09841;_0xfc0447++)_0x20f5f1[_0xfc0447]['side']=_0xfc0447<=_0x44e730?-0x1:_0xfc0447<_0x41db30?0x0:0x1,_0x20f5f1[_0xfc0447]['index']=_0xfc0447;let _0x546629=0x0;for(let _0x589fe8=_0xc3da9d;_0x589fe8<=_0x44e730;_0x589fe8++)0x0==_0x20f5f1[_0x589fe8]['distance']?_0x20f5f1[_0x589fe8]['level']=_0x546629:(_0x546629++,_0x20f5f1[_0x589fe8]['level']=_0x546629,_0x546629++);for(let _0x1459bd=_0xc3da9d;_0x1459bd<_0xa09841;_0x1459bd++)0x0==_0x20f5f1[_0x1459bd]['side']&&(_0x20f5f1[_0x1459bd]['level']=_0x546629);_0x546629=0x0;for(let _0xb39797=_0xa09841-0x1;_0xb39797>=_0x41db30;_0xb39797--)0x0==_0x20f5f1[_0xb39797]['distance']?_0x20f5f1[_0xb39797]['level']=_0x546629:(_0x546629--,_0x20f5f1[_0xb39797]['level']=_0x546629,_0x546629--);}}['_fixObsoleteTags'](_0x2d4d4c){const _0x443790=new Map(),_0x4d7be1=this['editor']['model']['schema'];for(let _0x4a1dfd=0x1;_0x4a1dfd<_0x2d4d4c['length'];_0x4a1dfd++){let _0x8002e8,_0x1eae36,_0x6fd57a;const _0x421241=_0x2d4d4c[_0x4a1dfd],_0x591388=_0x2d4d4c[_0x4a1dfd-0x1];if('text'==_0x421241['type'])continue;if(_0x421241['type']!=_0x591388['type'])continue;if(!_0x4d7be1['isBlock'](_0x591388['item'])||_0x4d7be1['isLimit'](_0x591388['item']))continue;if(!_0x4d7be1['isBlock'](_0x421241['item'])||_0x4d7be1['isLimit'](_0x421241['item']))continue;if((_0x2d4d4c[_0x4a1dfd]['isAdded']||_0x2d4d4c[_0x4a1dfd]['isAddSuggestion'])&&_0x2d4d4c[_0x4a1dfd-0x1]['isRemoved'])_0x8002e8=_0x2d4d4c[_0x4a1dfd],_0x1eae36=_0x2d4d4c[_0x4a1dfd-0x1],_0x6fd57a=_0x4a1dfd-0x1;else{if(!_0x2d4d4c[_0x4a1dfd]['isRemoved']||!_0x2d4d4c[_0x4a1dfd-0x1]['isAdded']&&!_0x2d4d4c[_0x4a1dfd-0x1]['isAddSuggestion'])continue;_0x8002e8=_0x2d4d4c[_0x4a1dfd-0x1],_0x1eae36=_0x2d4d4c[_0x4a1dfd],_0x6fd57a=_0x4a1dfd;}const _0x255562=_0x8002e8['level']==_0x1eae36['level'],_0x37b72a=Math['abs'](_0x8002e8['level'])<Math['abs'](_0x1eae36['level'])&&0x0==_0x1eae36['distance'];(_0x255562||_0x37b72a)&&(_0x443790['set'](_0x1eae36['id'],_0x8002e8['id']),_0x2d4d4c['splice'](_0x6fd57a,0x1),_0x4a1dfd--,_0x8002e8['isAdded']=!0x1);}for(let _0x4a0a7b=0x0;_0x4a0a7b<_0x2d4d4c['length'];_0x4a0a7b++)_0x443790['has'](_0x2d4d4c[_0x4a0a7b]['pairId'])&&(_0x2d4d4c[_0x4a0a7b]['pairId']=_0x443790['get'](_0x2d4d4c[_0x4a0a7b]['pairId']));}['_removeMissingPairs'](_0x19a302){const _0x189a03=new Set(_0x19a302['map'](_0x1fd3df=>_0x1fd3df['id']));for(let _0x34d9dd=0x0;_0x34d9dd<_0x19a302['length'];_0x34d9dd++)_0x189a03['has'](_0x19a302[_0x34d9dd]['pairId'])||0x0==_0x19a302[_0x34d9dd]['distance']||(_0x19a302[_0x34d9dd]['isIncorrect']=!0x0);return _0x19a302['filter'](_0x3e3dd0=>!_0x3e3dd0['isIncorrect']);}['_markMismatchedRemovedTags'](_0x18a3dd){const _0x2be8a6=new Set();for(let _0xeb55ef=0x0;_0xeb55ef<_0x18a3dd['length'];_0xeb55ef++){if(_0x2be8a6['has'](_0x18a3dd[_0xeb55ef]['id'])&&_0x18a3dd[_0xeb55ef]['isRemoved']&&(_0x18a3dd[_0xeb55ef]['isIncorrect']=!0x0),_0x18a3dd[_0xeb55ef]['isIncorrect'])continue;if(0x0==_0x18a3dd[_0xeb55ef]['distance'])continue;if('elementStart'!=_0x18a3dd[_0xeb55ef]['type'])continue;if(null==_0x18a3dd[_0xeb55ef]['pairId'])continue;let _0x4d54a1=_0xeb55ef+0x1,_0x1d460e=0x0;for(;_0x18a3dd[_0x4d54a1]['id']!=_0x18a3dd[_0xeb55ef]['pairId'];)'elementStart'==_0x18a3dd[_0x4d54a1]['type']?_0x1d460e++:'elementEnd'==_0x18a3dd[_0x4d54a1]['type']&&_0x1d460e--,_0x4d54a1++;if(0x0!=_0x1d460e){if(_0x18a3dd[_0xeb55ef]['isRemoved'])_0x18a3dd[_0xeb55ef]['isIncorrect']=!0x0;else{for(;_0x4d54a1!=_0xeb55ef;)_0x18a3dd[_0x4d54a1]['isRemoved']&&0x0!=_0x18a3dd[_0x4d54a1]['distance']&&(_0x18a3dd[_0x4d54a1]['isIncorrect']=!0x0,_0x2be8a6['add'](_0x18a3dd[_0x4d54a1]['pairId'])),_0x4d54a1--;}}}return _0x18a3dd['filter'](_0x4fcb34=>!_0x4fcb34['isIncorrect']);}['_removeUnsupportedChanges'](_0x479e35){const _0x4716b6=this['editor']['model']['schema'];for(let _0x599afa=0x0;_0x599afa<_0x479e35['length'];_0x599afa++){if(!(_0x479e35[_0x599afa]['isAdded']||_0x479e35[_0x599afa]['isAddSuggestion']||_0x479e35[_0x599afa]['isRemoved']||_0x479e35[_0x599afa]['isRemoveSuggestion']))continue;if(0x0==_0x479e35[_0x599afa]['distance'])continue;const _0x293ed3=_0x479e35[_0x599afa]['item'];_0x4716b6['isBlock'](_0x293ed3)||_0x4716b6['isLimit'](_0x293ed3)||(_0x479e35[_0x599afa]['isAdded']&&delete _0x479e35[_0x599afa]['isAdded'],_0x479e35[_0x599afa]['isAddSuggestion']&&delete _0x479e35[_0x599afa]['isAddSuggestion'],_0x479e35[_0x599afa]['isRemoveSuggestion']&&delete _0x479e35[_0x599afa]['isRemoveSuggestion'],_0x479e35[_0x599afa]['isRemoved']&&(_0x479e35[_0x599afa]['isIncorrect']=!0x0));}return _0x479e35['filter'](_0x779802=>!_0x779802['isIncorrect']);}['_makeModelFromTape'](_0x36b11b,_0x28f457,_0x5d5804,_0x3bdbdb){const _0x2f4e81=new _0x54af68(),_0x237905=[],_0x597e61=new Map(),_0x45fb40=this['editor']['model'],_0x168b4b=_0x45fb40['schema'],_0x2ede75=[_0x2f4e81],_0x28fe32={},_0x5cc3cf={'isAdded':[],'isRemoved':[],'isAddSuggestion':[],'isRemoveSuggestion':[]};_0x2f4e81['name']=_0x3bdbdb;let _0x2a4966=null;const _0x497cab=[0x0];for(let _0x5745c0=0x0;_0x5745c0<_0x36b11b['length'];_0x5745c0++)if('elementStart'===_0x36b11b[_0x5745c0]['type']){_0x36b11b[_0x5745c0]['previousPosition']=_0x45fb40['createPositionFromPath'](_0x2f4e81,_0x497cab);const _0x29a3e6=new _0x4052b4(_0x36b11b[_0x5745c0]['item']['name'],_0x36b11b[_0x5745c0]['item']['getAttributes']());_0x2ede75[0x0]['_appendChild'](_0x29a3e6),_0x497cab['push'](0x0),_0x2ede75['unshift'](_0x29a3e6),_0x36b11b[_0x5745c0]['nextPosition']=_0x45fb40['createPositionFromPath'](_0x2f4e81,_0x497cab);}else'elementEnd'===_0x36b11b[_0x5745c0]['type']?(_0x2ede75['shift'](),_0x36b11b[_0x5745c0]['previousPosition']=_0x45fb40['createPositionFromPath'](_0x2f4e81,_0x497cab),_0x497cab['pop'](),_0x497cab[_0x497cab['length']-0x1]++,_0x36b11b[_0x5745c0]['nextPosition']=_0x45fb40['createPositionFromPath'](_0x2f4e81,_0x497cab)):(_0x36b11b[_0x5745c0]['previousPosition']=_0x45fb40['createPositionFromPath'](_0x2f4e81,_0x497cab),_0x2a4966?_0x2a4966['_data']+=_0x36b11b[_0x5745c0]['item']['data']:_0x2a4966=new _0x354290(_0x36b11b[_0x5745c0]['item']['data'],_0x36b11b[_0x5745c0]['item']['getAttributes']()),_0x36b11b[_0x5745c0+0x1]&&'text'===_0x36b11b[_0x5745c0+0x1]['type']&&_0x19377f(_0x2a4966,_0x36b11b[_0x5745c0+0x1]['item'])||(_0x2ede75[0x0]['_appendChild'](_0x2a4966),_0x2a4966=null),_0x497cab[_0x497cab['length']-0x1]+=_0x36b11b[_0x5745c0]['item']['offsetSize'],_0x36b11b[_0x5745c0]['nextPosition']=_0x45fb40['createPositionFromPath'](_0x2f4e81,_0x497cab));for(let _0x9cc260=0x0;_0x9cc260<_0x36b11b['length'];_0x9cc260++){const _0x48120d=_0x36b11b[_0x9cc260]['previousPosition'],_0x690a10=_0x36b11b[_0x9cc260]['nextPosition'];for(const _0x5b780f of _0x36b11b[_0x9cc260]['markersStart'])_0x597e61['set'](_0x5b780f,{'start':_0x48120d,'end':null});_0x448fb2('isRemoveSuggestion',_0x9cc260,_0x48120d,_0x690a10),_0x448fb2('isAddSuggestion',_0x9cc260,_0x48120d,_0x690a10),_0x448fb2('isRemoved',_0x9cc260,_0x48120d,_0x690a10),_0x448fb2('isAdded',_0x9cc260,_0x48120d,_0x690a10);for(const _0x204e71 of _0x36b11b[_0x9cc260]['markersEnd']){const _0x30935b=_0x597e61['get'](_0x204e71);_0x30935b?_0x30935b['end']=_0x690a10:_0x597e61['set'](_0x204e71,{'start':_0x690a10,'end':_0x690a10});}}for(const [_0x35e5bd,_0x11305c]of _0x597e61){const _0x563fe5=this['editor']['model']['createRange'](_0x11305c['start'],_0x11305c['end']);_0x2f4e81['markers']['set'](_0x35e5bd,_0x563fe5);}return _0x237905['sort']((_0x4d0100,_0x396778)=>{const _0x4f6d05=_0x2f4e81['markers']['get']('revision:'+_0x4d0100['id']),_0x3e753e=_0x2f4e81['markers']['get']('revision:'+_0x396778['id']);return _0x4f6d05['start']['isBefore'](_0x3e753e['start'])?-0x1:_0x4f6d05['start']['isAfter'](_0x3e753e['start'])?0x1:_0x4f6d05['end']['isBefore'](_0x3e753e['end'])?-0x1:_0x4f6d05['end']['isAfter'](_0x3e753e['end'])?0x1:'add'===_0x4d0100['type']?-0x1:0x1;}),{'root':_0x2f4e81,'changes':_0x237905};function _0x448fb2(_0x173b18,_0x55b6bc,_0x4cc16f,_0x3faadf){const _0x2b1420=!!_0x36b11b[_0x55b6bc][_0x173b18],_0x2f62f2=_0x2b1420?_0x36b11b[_0x55b6bc][_0x173b18]['userId']:null,_0x1e05bd=_0x55b6bc===_0x36b11b['length']-0x1,_0x4af08f=_0x5cc3cf[_0x173b18][0x0],_0x3ec54d=_0x168b4b['isObject'](_0x36b11b[_0x55b6bc]['item']);!_0x28fe32[_0x173b18]&&_0x2b1420?_0x28fe32[_0x173b18]={'start':_0x4cc16f,'tapeItem':_0x36b11b[_0x55b6bc],'userId':_0x2f62f2,'type':_0x173b18}:_0x28fe32[_0x173b18]&&!_0x2b1420?(_0x28fe32[_0x173b18]['end']=_0x4cc16f,_0x56b558(_0x28fe32[_0x173b18]),_0x28fe32[_0x173b18]=null):_0x28fe32[_0x173b18]&&_0x2b1420&&_0x28fe32[_0x173b18]['userId']!==_0x2f62f2&&(_0x28fe32[_0x173b18]['end']=_0x4cc16f,_0x4af08f&&_0x4af08f['userId']===_0x28fe32[_0x173b18]['userId']||_0x56b558(_0x28fe32[_0x173b18]),_0x28fe32[_0x173b18]={'start':_0x4cc16f,'tapeItem':_0x36b11b[_0x55b6bc],'userId':_0x2f62f2,'type':_0x173b18}),_0x28fe32[_0x173b18]&&_0x3ec54d&&('elementStart'!==_0x36b11b[_0x55b6bc]['type']||_0x4af08f&&_0x4af08f['userId']===_0x2f62f2||_0x5cc3cf[_0x173b18]['unshift']({'userId':_0x2f62f2,'object':_0x36b11b[_0x55b6bc]['item'],'change':_0x28fe32[_0x173b18]}),'elementEnd'===_0x36b11b[_0x55b6bc]['type']&&_0x4af08f&&_0x4af08f['object']===_0x36b11b[_0x55b6bc]['item']&&(_0x5cc3cf[_0x173b18]['shift'](),_0x28fe32[_0x173b18]=_0x4af08f['change'])),_0x28fe32[_0x173b18]&&_0x1e05bd&&(_0x28fe32[_0x173b18]['end']=_0x3faadf,_0x56b558(_0x28fe32[_0x173b18]),_0x28fe32[_0x173b18]=null);}function _0x56b558({start:_0x29b660,end:_0x221d45,tapeItem:_0x22fdd1,userId:_0xf986b9,type:_0x59ad}){const _0x48d9c2=_0x22fdd1['item'],_0x3897a5=_0x45fb40['schema']['isBlock'](_0x48d9c2)&&!_0x45fb40['schema']['isLimit'](_0x48d9c2),_0x29670c=_0x29b660['nodeAfter']==_0x221d45['parent']&&_0x221d45['isAtStart'];if(_0x3897a5&&_0x29670c)return;const _0x14e340=_0x45fb40['createRange'](_0x29b660,_0x221d45),_0x1d94ad=_0x28f457['get'](_0xf986b9),_0x102985=new ChangeItem({'author':_0x1d94ad,'type':'isAdded'==_0x59ad||'isAddSuggestion'==_0x59ad?'add':'remove','data':{'isSuggestion':'isAddSuggestion'==_0x59ad||'isRemoveSuggestion'==_0x59ad},'createdAt':new Date(),'rootName':_0x5d5804});_0x237905['push'](_0x102985),_0x2f4e81['markers']['set']('revision:'+_0x102985['id'],_0x14e340);}function _0x19377f(_0x356de3,_0x19f075){const _0x543e22=_0x356de3['getAttributes'](),_0x2fdcc1=_0x19f075['getAttributes']();for(const _0x278ebb of _0x543e22){if(_0x278ebb[0x1]!==_0x19f075['getAttribute'](_0x278ebb[0x0]))return!0x1;_0x2fdcc1['next']();}return _0x2fdcc1['next']()['done'];}}['_setConversion'](){this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'revision'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision','view':_0x3baa12=>{const _0x49a3f0=_0x3baa12['markerName']['split'](':')[0x1],_0x240f05=this['_getChangeFromId'](_0x49a3f0);if(!_0x240f05)return null;const _0x1b4968='add'==_0x240f05['type']?'insertion':'deletion',_0x3c80cb=['ck-suggestion-marker','ck-suggestion-marker-'+_0x1b4968];return _0x240f05['data']['isSuggestion']&&_0x3c80cb['push']('ck-suggestion-marker-'+_0x1b4968+'-new'),this['activeChange']==_0x240f05&&_0x3c80cb['push']('ck-suggestion-marker--active'),{'classes':_0x3c80cb,'attributes':{'data-change-id':_0x49a3f0}};}}),this['editor']['conversion']['for']('upcast')['add'](_0x298d88=>{_0x298d88['on']('element:pre',(_0x4d6ed9,_0xdf650b,_0x3e147d)=>{const _0x4dc136=_0xdf650b['viewItem']['getChild'](0x0);if(!_0x4dc136||!_0x4dc136['is']('element','code'))return;if(!_0x3e147d['consumable']['consume'](_0x4dc136,{'attributes':['vid_start','vid_end']}))return;const _0xb8ca72=_0xdf650b['modelRange']['start']['nodeAfter'];_0x3e147d['writer']['setAttribute']('vid_start',_0x4dc136['getAttribute']('vid_start'),_0xb8ca72),_0x3e147d['writer']['setAttribute']('vid_end',_0x4dc136['getAttribute']('vid_end'),_0xb8ca72);},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['add'](_0x59b10a=>{_0x59b10a['on']('element',(_0x746663,_0x4d90db,_0x226b58)=>{if(!_0x226b58['consumable']['consume'](_0x4d90db['viewItem'],{'attributes':['vid_start','vid_end']}))return;if(_0x4d90db['modelRange']['isCollapsed'])return;const _0x46e4e5=_0x4d90db['modelRange']['start']['nodeAfter'];_0x46e4e5['hasAttribute']('vid_start')||_0x46e4e5['hasAttribute']('vid')||(_0x226b58['writer']['setAttribute']('vid_start',_0x4d90db['viewItem']['getAttribute']('vid_start'),_0x46e4e5),_0x226b58['writer']['setAttribute']('vid_end',_0x4d90db['viewItem']['getAttribute']('vid_end'),_0x46e4e5));},{'priority':'low'});}),this['editor']['conversion']['for']('upcast')['elementToAttribute']({'view':{'name':'span','attributes':{'vid':!0x0}},'model':{'key':'vid','value':_0x4e9f55=>_0x4e9f55['getAttribute']('vid')}}),this['editor']['model']['schema']['on']('checkAttribute',(_0x801a79,[,_0x78612c])=>{['vid_start','vid_end','vid']['includes'](_0x78612c)&&(_0x801a79['return']=!0x0,_0x801a79['stop']());},{'priority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5863d0=>{_0x5863d0['on']('attribute:vid',(_0x1a2b6e,_0x539579,_0x4f59b9)=>{if('\x20'!=_0x539579['item']['data']||_0x539579['item']['parent']['maxOffset']>0x1)return;if(!_0x4f59b9['consumable']['consume'](_0x539579['item'],_0x1a2b6e['name']))return;const _0x3abb1f=_0x4f59b9['writer'],_0x12e68e=_0x4f59b9['mapper']['toViewRange'](_0x539579['range']);_0x3abb1f['wrap'](_0x12e68e,_0x3abb1f['createAttributeElement']('span'));});}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',function(_0xcb31fe){const _0x378e0f=_0xcb31fe['plugins']['get']('RevisionViewer');return(_0x4aa5a8,_0x118288,_0x15aa10)=>{const _0x1c70a1=_0x118288['markerName']['split'](':')[0x1],_0x444722=_0x378e0f['_getChangeFromId'](_0x1c70a1);if(!_0x444722)return null;const _0x1d7823='add'==_0x444722['type']?'split':'merge';if(!_0x15aa10['consumable']['test'](_0x118288['markerRange'],_0x4aa5a8['name']))return;const _0x1aeeb2=_0x118288['markerRange']['getWalker'](),_0x5a5368=_0x118288['markerRange']['start'],_0x263dca=_0xcb31fe['model']['schema'];let _0x1bf1e2=null,_0x494b92=null,_0x468c4e=!0x1,_0x5deedd=!0x1;for(const _0x472a78 of _0x1aeeb2){const _0x247d9e=_0x472a78['item'];_0x468c4e=_0x468c4e||_0x263dca['isContent'](_0x247d9e);const _0x2cd0e2=_0x15aa10['mapper']['toViewElement'](_0x247d9e);if(_0x2cd0e2&&_0x2cd0e2['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x472a78['type']&&(_0x263dca['isBlock'](_0x247d9e)&&!_0x263dca['isLimit'](_0x247d9e)&&(_0x247d9e['nextSibling']||_0x5a5368['isAtEnd']?_0x1bf1e2&&_0x1bf1e2['parent']==_0x247d9e||(_0x1bf1e2=_0x247d9e,_0x519bcb(_0x472a78['previousPosition']),_0x5deedd=!0x0):_0x494b92=_0x494b92||_0x472a78['previousPosition']));}function _0x519bcb(_0xf461ac){const _0x3f9b43=_0x15aa10['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x1d7823}),_0x31ed0b=_0x15aa10['mapper']['toViewPosition'](_0xf461ac);_0x444722['data']['isSuggestion']&&_0x15aa10['writer']['addClass']('ck-suggestion-marker-'+_0x1d7823+'-new',_0x3f9b43),_0x378e0f['activeChange']==_0x444722&&_0x15aa10['writer']['addClass']('ck-suggestion-marker--active',_0x3f9b43),_0x15aa10['writer']['insert'](_0x31ed0b,_0x3f9b43),_0x15aa10['mapper']['bindElementToMarker'](_0x3f9b43,_0x118288['markerName']);}_0x468c4e||_0x5deedd||!_0x494b92||_0x519bcb(_0x494b92);};}(this['editor']),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision',(_0x2cb00b,_0xc6b23f,_0x2f7304)=>{const _0x3d16b0=_0x2f7304['mapper']['markerNameToElements'](_0xc6b23f['markerName']);if(_0x3d16b0){for(const _0x1cc6d7 of _0x3d16b0)(_0x1cc6d7['hasClass']('ck-suggestion-marker-split')||_0x1cc6d7['hasClass']('ck-suggestion-marker-merge'))&&(_0x2f7304['mapper']['unbindElementFromMarkerName'](_0x1cc6d7,_0xc6b23f['markerName']),_0x2f7304['writer']['remove'](_0x1cc6d7));}},{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision',(_0x1c9578,_0x3a42ad,_0xab6bcf)=>{const _0x1f2dad=_0x3a42ad['markerName']['split'](':')[0x1],_0x4af67b=this['_getChangeFromId'](_0x1f2dad);if(!_0x4af67b)return null;const _0x341a4c='add'==_0x4af67b['type']?'split':'merge';if(_0xab6bcf['consumable']['test'](_0x3a42ad['markerRange'],_0x1c9578['name']))for(const _0x4924d8 of _0x3a42ad['markerRange']['getItems']()){if(!_0x4924d8['is']('element','softBreak'))continue;const _0x44b871=_0xab6bcf['writer']['createUIElement']('span',{'class':'ck-suggestion-marker-'+_0x341a4c}),_0x1cd1c7=_0xab6bcf['mapper']['toViewPosition'](this['editor']['model']['createPositionBefore'](_0x4924d8));_0x4af67b['data']['isSuggestion']&&_0xab6bcf['writer']['addClass']('ck-suggestion-marker-'+_0x341a4c+'-new',_0x44b871),this['activeChange']==_0x4af67b&&_0xab6bcf['writer']['addClass']('ck-suggestion-marker--active',_0x44b871),_0xab6bcf['writer']['insert'](_0x1cd1c7,_0x44b871),_0xab6bcf['mapper']['bindElementToMarker'](_0x44b871,_0x3a42ad['markerName']);}},{'priority':'high'}),this['editor']['model']['document']['on']('change',()=>{this['editor']['editing']['view']['change'](_0x3ca6b7=>{for(const _0x2d8a54 of this['editor']['model']['document']['getRootNames']()){const _0x28ffcd=this['editor']['model']['document']['getRoot'](_0x2d8a54),_0x4c434c=this['editor']['editing']['view']['document']['getRoot'](_0x2d8a54);if(_0x4c434c){const _0x131aa2=_0x28ffcd['getAttribute']('revisionHistoryAttachChange');if(_0x3ca6b7['removeAttribute']('data-change-id',_0x4c434c),_0x3ca6b7['removeClass']('ck-revision-history-root-add',_0x4c434c),_0x3ca6b7['removeClass']('ck-revision-history-root-remove',_0x4c434c),_0x3ca6b7['removeClass']('ck-revision-history-root--active',_0x4c434c),_0x131aa2){const _0x3895ca=this['_getChangeFromId'](_0x131aa2);if(!_0x3895ca)return null;_0x3ca6b7['setAttribute']('data-change-id',_0x131aa2,_0x4c434c),_0x3ca6b7['addClass']('ck-revision-history-root-'+_0x3895ca['type'],_0x4c434c),this['activeChange']==_0x3895ca&&_0x3ca6b7['addClass']('ck-revision-history-root--active',_0x4c434c);}}}});}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'comment','model':_0xa772d3=>'revision-comment:'+_0xa772d3,'converterPriority':'highest'}),this['editor']['conversion']['for']('upcast')['dataToMarker']({'view':'suggestion','model':_0x302613=>'revision-suggestion:'+_0x302613,'converterPriority':'highest'}),this['editor']['conversion']['for']('dataDowncast')['markerToData']({'model':'revision-suggestion','view':_0x384d21=>({'name':'suggestion:'+_0x384d21,'group':'revision-suggestion'}),'converterPriority':'highest'}),this['editor']['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'revision-suggestion','view':_0x3d12b2=>{const _0x4a43bd=_0x3d12b2['markerName']['split'](':')[0x1];return'insertion'!=_0x4a43bd&&'deletion'!=_0x4a43bd?null:{'classes':['ck-suggestion-preview-marker','ck-suggestion-preview-marker-'+_0x4a43bd]};}}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:deletion',_t(this['editor'],'merge'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('addMarker:revision-suggestion:insertion',_t(this['editor'],'split'),{'priority':'high'}),this['editor']['editing']['downcastDispatcher']['on']('removeMarker:revision-suggestion',(_0x40594f,_0xad0cb7,_0x481386)=>{const _0x1e9036=_0x481386['mapper']['markerNameToElements'](_0xad0cb7['markerName']);if(_0x1e9036){for(const _0x4c4c21 of _0x1e9036)_0x4c4c21['is']('uiElement')&&(_0x481386['mapper']['unbindElementFromMarkerName'](_0x4c4c21,_0xad0cb7['markerName']),_0x481386['writer']['remove'](_0x4c4c21));}},{'priority':'high'});}['_getChangeFromId'](_0x48de8a){return this['_changeIdToChange']['get'](_0x48de8a);}['_getViewForChange'](_0x1a40d0){return this['_changeView']&&this['_changeView']['destroy'](),this['_changeView']=new ChangeDetailsView(this['editor']['locale'],_0x1a40d0),this['_changeView'];}['_initInteractions'](){this['editor']['model']['document']['selection']['observeMarkers']('revision'),this['on']('change:activeView',(_0x5b8068,_0x321146,_0x5785c1,_0x3d8271)=>{_0x3d8271&&this['_balloon']['remove'](_0x3d8271),_0x5785c1&&(this['_balloon']['add']({'view':_0x5785c1,'stackId':'revisionHistoryLabel','position':{'target':()=>{const _0x1cb870=this['editor']['editing'],_0x130803=this['_getChangeFromId'](_0x5785c1['changeId']);let _0x217e1b;if(_0x130803['data']['isOnRoot']){const _0x259e45=_0x1cb870['view']['getDomRoot'](_0x130803['rootName']);_0x217e1b=Array['from'](_0x259e45['getClientRects']());}else{const _0x3788b6=this['editor']['model']['markers']['get']('revision:'+_0x5785c1['changeId']);_0x217e1b=Array['from'](_0x1cb870['mapper']['markerNameToElements'](_0x3788b6['name']))['map'](_0x2d4a51=>_0x1cb870['view']['domConverter']['mapViewToDom'](_0x2d4a51))['map'](_0x4e2225=>Array['from'](_0x4e2225['getClientRects']()))['flat']();}if(!this['_activeViewTarget'])return _0x217e1b[0x0];return _0x217e1b['find'](_0x15179f=>_0x15179f['top']-0x3<=this['_activeViewTarget']['y']&&_0x15179f['bottom']+0x3>=this['_activeViewTarget']['y']&&_0x15179f['left']-0x3<=this['_activeViewTarget']['x']&&_0x15179f['right']+0x3>=this['_activeViewTarget']['x'])||_0x217e1b[0x0];}}}),this['_balloon']['showStack']('revisionHistoryLabel'));}),this['on']('change:activeChange',(_0x2d0e4b,_0x3a639f,_0x26247e,_0x452baf)=>{this['activeView']=_0x26247e?this['_getViewForChange'](_0x26247e):null,this['editor']['model']['change'](()=>{const _0x10678b=this['editor']['editing'];_0x452baf&&(_0x452baf['data']['isOnRoot']?_0x10678b['view']['change'](_0x1f6c76=>{_0x1f6c76['removeClass']('ck-revision-history-root--active',_0x10678b['view']['document']['getRoot'](_0x452baf['rootName']));}):_0x10678b['reconvertMarker']('revision:'+_0x452baf['id'])),_0x26247e&&(_0x26247e['data']['isOnRoot']?_0x10678b['view']['change'](_0x50a55e=>{_0x50a55e['addClass']('ck-revision-history-root--active',_0x10678b['view']['document']['getRoot'](_0x26247e['rootName']));}):_0x10678b['reconvertMarker']('revision:'+_0x26247e['id']));});}),this['listenTo'](this['editor']['editing']['view']['document'],'mouseover',(_0x502f4f,_0x5b8772)=>{if(this['activeChange'])return;const _0x151560=this['_findChangeIdFromDomTarget'](_0x5b8772['target']),_0x49b4f1=this['_changeIdToChange']['get'](_0x151560);_0x49b4f1?(this['_activeViewTarget']={'x':_0x5b8772['domEvent']['x'],'y':_0x5b8772['domEvent']['y']},this['activeView']=this['_getViewForChange'](_0x49b4f1)):(this['_activeViewTarget']=null,this['activeView']=null);}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',(_0x226e02,_0x9e8c80)=>{const _0x42465c=this['_findChangeIdFromDomTarget'](_0x9e8c80['target']),_0x5695d6=this['_changeIdToChange']['get'](_0x42465c);_0x5695d6?(this['_activeViewTarget']={'x':_0x9e8c80['domEvent']['x'],'y':_0x9e8c80['domEvent']['y']},_0x5695d6===this['activeChange']?this['_balloon']['updatePosition']():this['activeChange']=_0x5695d6):(this['_activeViewTarget']=null,this['activeChange']=null);});}['_findChangeIdFromDomTarget'](_0x596d17){do{const _0x3f891c=_0x596d17['getAttribute']('data-change-id');if(_0x3f891c)return _0x3f891c;_0x596d17=_0x596d17['parent'];}while(_0x596d17);return null;}['_cleanMarkers'](){this['editor']['model']['change'](_0x7f8db8=>{for(const _0x4dcba4 of this['editor']['model']['markers'])_0x7f8db8['removeMarker'](_0x4dcba4);});}}function _t(_0x4cb298,_0x581253){return(_0x3ae655,_0x1a71cd,_0x25c597)=>{if(!_0x25c597['consumable']['test'](_0x1a71cd['markerRange'],_0x3ae655['name']))return;const _0x4786a2=_0x1a71cd['markerRange']['getWalker'](),_0x5ae3de=_0x1a71cd['markerRange']['start'],_0x5b0920=_0x4cb298['model']['schema'];let _0x23efbe=null,_0x5a3942=null,_0x28ad02=!0x1,_0x16bd44=!0x1;for(const _0x4c9566 of _0x4786a2){const _0x27a8ee=_0x4c9566['item'];_0x28ad02=_0x28ad02||_0x5b0920['isContent'](_0x27a8ee);const _0x189e94=_0x25c597['mapper']['toViewElement'](_0x27a8ee);if(_0x189e94&&_0x189e94['getCustomProperty']('addHighlight'))return;'elementEnd'==_0x4c9566['type']&&(_0x5b0920['isBlock'](_0x27a8ee)&&!_0x5b0920['isLimit'](_0x27a8ee)&&(_0x27a8ee['nextSibling']||_0x5ae3de['isAtEnd']?_0x23efbe&&_0x23efbe['parent']==_0x27a8ee||(_0x23efbe=_0x27a8ee,_0x14c0a0(_0x4c9566['previousPosition']),_0x16bd44=!0x0):_0x5a3942=_0x5a3942||_0x4c9566['previousPosition']));}function _0x14c0a0(_0x1eddca){const _0x2a884f=_0x25c597['mapper']['toViewPosition'](_0x1eddca),_0x4b2c29=_0x25c597['writer']['createUIElement']('span',{'class':'ck-suggestion-preview-marker-'+_0x581253});_0x25c597['writer']['insert'](_0x2a884f,_0x4b2c29),_0x25c597['mapper']['bindElementToMarker'](_0x4b2c29,_0x1a71cd['markerName']);}_0x28ad02||_0x16bd44||!_0x5a3942||_0x14c0a0(_0x5a3942);};}class RestoreRevisionCommand extends _0x323c1f{constructor(_0x3aa5f7){super(_0x3aa5f7);const _0x8247f8=_0x3aa5f7['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['listenTo'](_0x8247f8,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x8247f8,'change:isEnabled',()=>this['refresh']());}['execute'](){const _0x25f2a1=this['editor'],_0x2b0f27=_0x25f2a1['plugins']['get'](RevisionViewer),_0x2c483c=_0x2b0f27['isReady']?_0x2b0f27['diff']['newRevisionId']:null;_0x25f2a1['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x2c483c);}['refresh'](){const {isReady:_0x5ba73e,isEnabled:_0x333fe0,repository:_0x1e9e7b,diff:_0x2d26e9}=this['editor']['plugins']['get'](RevisionViewer),_0x165c9d=_0x2d26e9&&_0x1e9e7b['getLaterVisibleRevision'](_0x2d26e9['newRevisionId']);this['isEnabled']=_0x5ba73e&&_0x333fe0&&Boolean(_0x165c9d);}}class ShowChangeCommand extends _0x323c1f{['_step'];constructor(_0xf3e6b2,{direction:_0xf94ce2}){super(_0xf3e6b2);const _0x327da8=_0xf3e6b2['plugins']['get'](RevisionViewer);this['affectsData']=!0x1,this['_step']='forward'===_0xf94ce2?0x1:-0x1,this['listenTo'](_0x327da8,'change:isReady',()=>this['refresh']()),this['listenTo'](_0x327da8,'change:isEnabled',()=>this['refresh']()),this['listenTo'](_0x327da8,'change:activeChange',()=>this['refresh']());}['execute'](){const _0x4a8e2a=this['editor'],_0x39508b=_0x4a8e2a['plugins']['get'](RevisionViewer),{isNavigationMode:_0x37e613,currentChangeNumber:_0x5bba4a}=_0x39508b;let _0x5ec5f2;if(_0x39508b['activeChange']=_0x37e613?_0x39508b['diff']['changes']['get'](_0x5bba4a+this['_step']):_0x39508b['diff']['changes']['first'],_0x39508b['activeChange']['data']['isOnRoot'])_0x5ec5f2=_0x4a8e2a['editing']['view']['getDomRoot'](_0x39508b['activeChange']['rootName']);else{const _0x581151=_0x4a8e2a['model']['markers']['get']('revision:'+_0x39508b['activeChange']['id']);_0x5ec5f2=_0x3ee994(_0x4a8e2a['editing'],_0x581151);}_0x1e751e({'target':_0x5ec5f2,'viewportOffset':0x28});}['refresh'](){const {isNavigationMode:_0x473acc,currentChangeNumber:_0x4b9530,numberOfChanges:_0x43be2c,isReady:_0x846367,isEnabled:_0x46bbd9}=this['editor']['plugins']['get'](RevisionViewer);this['isEnabled']=!!(_0x46bbd9&&_0x846367&&_0x43be2c)&&(!_0x473acc||(0x1===this['_step']?_0x4b9530<_0x43be2c-0x1:_0x4b9530>0x0));}}class ChangesNavigationView extends _0xb27066{constructor(_0x34f37e){super(_0x34f37e);const _0x1cbc9e=this['bindTemplate'],_0x2969d0=new _0x1b24ae(_0x34f37e),_0x3424fa=new _0x1b24ae(_0x34f37e);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',(_0xe622c6,_0x576131)=>_0xe622c6&&_0x576131>0x0),this['bind']('_statusText')['to'](this,'isReady',this,'currentChangeNumber',this,'numberOfChanges',this,'isNavigationMode',(_0x5c1192,_0x12e51b,_0x59c8c8,_0x24b9b2)=>{if(!_0x5c1192)return ft(_0x34f37e,'Loading...');if(!_0x59c8c8)return ft(_0x34f37e,'No\x20changes');const _0x480656=ft(_0x34f37e,'NUMBER_OF_CHANGES',_0x59c8c8);return _0x24b9b2?ft(_0x34f37e,'X_OF_Y_CHANGES',[_0x12e51b+0x1,_0x59c8c8]):_0x480656;}),_0x2969d0['set']({'label':ft(_0x34f37e,'Show\x20previous\x20change'),'tooltip':!0x0,'icon':_0x319b79}),_0x3424fa['set']({'label':ft(_0x34f37e,'Show\x20next\x20change'),'tooltip':!0x0,'icon':_0x2d3c17}),_0x2969d0['bind']('isEnabled')['to'](this,'isBackwardNavigationEnabled'),_0x3424fa['bind']('isEnabled')['to'](this,'isForwardNavigationEnabled'),_0x2969d0['on']('execute',()=>this['fire']('execute','backward')),_0x3424fa['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',_0x1cbc9e['if']('_isStatusLabelVisible','ck-hidden',_0x59231e=>!_0x59231e)]},'children':[{'text':_0x1cbc9e['to']('isNavigationMode',_0x461cbf=>_0x461cbf?ft(_0x34f37e,'EDIT_X_OF_Y_REVISIONS')+':\x20':ft(_0x34f37e,'Total')+':\x20')}]},{'text':_0x1cbc9e['to']('_statusText')}]},new st(),{'tag':'div','attributes':{'class':['ck-revision-history-ui__changes-navigation__navigation']},'children':[_0x2969d0,_0x3424fa]}]});}}const yt='ck-editor__editable__loading-overlay';class RevisionViewerLoadingOverlay extends _0x4c1791{static get['pluginName'](){return'RevisionViewerLoadingOverlay';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['show'](){const _0x361bbf=this['editor']['editing']['view'];_0x361bbf['change'](_0x4b9712=>{for(const _0x3c0d9a of _0x361bbf['document']['roots'])_0x4b9712['addClass'](yt,_0x3c0d9a);});}['hide'](){const _0xb6ff16=this['editor']['editing']['view'];_0xb6ff16['change'](_0x5aee2f=>{for(const _0x2fe0c0 of _0xb6ff16['document']['roots'])_0x5aee2f['removeClass'](yt,_0x2fe0c0);});}}class RevisionViewerUI extends _0x4c1791{static get['pluginName'](){return'RevisionViewerUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer,RevisionViewerLoadingOverlay];}['init'](){const _0x5acb46=this['editor'],_0x6f9529=_0x5acb46['plugins']['get'](RevisionViewer),_0x5911a4=_0x5acb46['plugins']['get'](RevisionViewerLoadingOverlay);_0x5acb46['ui']['componentFactory']['add']('exitToEditing',_0x27ca45=>{const _0x3646f8=new _0x1b24ae(_0x27ca45);return _0x3646f8['set']({'label':ft(_0x27ca45,'Back\x20to\x20editing'),'icon':_0x11cf6a,'withText':!0x0,'tooltip':!0x0,'class':'ck-revision-history-ui__back-to-editing'}),this['listenTo'](_0x3646f8,'execute',()=>{_0x5acb46['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}),_0x3646f8;}),_0x5acb46['ui']['componentFactory']['add']('restoreRevision',_0x3524a8=>{const _0x210f2b=new _0x1b24ae(_0x3524a8);return _0x210f2b['set']({'label':ft(_0x3524a8,'Restore\x20this\x20revision'),'withText':!0x0,'tooltip':!0x0}),_0x210f2b['bind']('isEnabled')['to'](_0x5acb46['commands']['get']('restoreRevision')),this['listenTo'](_0x210f2b,'execute',()=>_0x5acb46['execute']('restoreRevision')),_0x210f2b;}),_0x5acb46['ui']['componentFactory']['add']('changesNavigation',_0xfb2b8c=>{const _0x32db19=new ChangesNavigationView(_0xfb2b8c),_0x2f030f=_0x5acb46['commands']['get']('showPreviousChange'),_0x535a28=_0x5acb46['commands']['get']('showNextChange');return _0x32db19['bind']('isBackwardNavigationEnabled')['to'](_0x2f030f,'isEnabled'),_0x32db19['bind']('isForwardNavigationEnabled')['to'](_0x535a28,'isEnabled'),_0x32db19['bind']('isReady','currentChangeNumber','numberOfChanges','isNavigationMode')['to'](_0x6f9529),this['listenTo'](_0x32db19,'execute',(_0x56fe7b,_0x196295)=>{_0x5acb46['execute']('forward'===_0x196295?'showNextChange':'showPreviousChange');}),_0x32db19;}),_0x5911a4['show'](),_0x6f9529['on']('change:isReady',(_0x3e2977,_0x16e669,_0x5d7930)=>{_0x5d7930?_0x5911a4['hide']():_0x5911a4['show']();});}}class RevisionNameView extends _0x3dc991{['_resizeObserver']=null;constructor(_0x2008eb,_0xea898e){super(_0x2008eb,_0xea898e);const _0x227e56=this['bindTemplate'];this['set']({'label':ft(_0x2008eb,'Revision\x20name'),'_tooltipString':''}),this['fieldView']['placeholder']=ft(_0x2008eb,'Enter\x20the\x20revision\x20name'),this['extendTemplate']({'tag':'span','attributes':{'class':['ck-revision-history-sidebar__revision-name'],'data-cke-tooltip-text':_0x227e56['to']('_tooltipString'),'data-cke-tooltip-position':'s','data-cke-tooltip-class':'ck-tooltip_multi-line'}});}['render'](){super['render'](),this['_resizeObserver']=new _0x3d48f7(this['fieldView']['element'],()=>this['_updateTooltipText']()),this['listenTo'](this['fieldView'],'input',()=>this['_updateTooltipText']());}['destroy'](){super['destroy'](),this['_resizeObserver']&&this['_resizeObserver']['destroy']();}['_updateTooltipText'](){const _0x489e58=this['fieldView']['element'];this['_tooltipString']=_0x489e58['scrollWidth']>_0x489e58['clientWidth']&&_0x489e58['value']||'';}}class RevisionAuthorView extends _0xb27066{constructor(_0x2101a8,_0x1320d3,_0x53ea4a){super(_0x2101a8);const _0x40ecde=new nt();_0x40ecde['set']({'content':_0x591bb9,'viewBox':'0\x200\x2011\x2010'});const _0x158c8f=['ck','ck-revision-history-sidebar__revision-author'];_0x53ea4a&&_0x158c8f['push']('ck-revision-history-sidebar__revision-author_creator');const _0x260845=[{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__revision-author__name'],'title':ft(_0x2101a8,_0x53ea4a?'Revision\x20creator':'Revision\x20author')},'children':[_0x40ecde,_0x1320d3['name']]}];this['setTemplate']({'tag':'li','attributes':{'class':_0x158c8f},'children':_0x260845});}}function Rt(_0x2ec855,_0x6e7244){const _0x565ce2=_0x2ec855['bindTemplate'],_0x116b89=_0x2ec855['locale'],_0x425b88=_0xaaea9b(_0x116b89);_0x425b88['panelPosition']='sw';const _0x5a5a4e=function(_0x3fe75e,_0x4c21f1){const _0x35fb47=function(_0x37a6a6,_0x526335){const _0x390633=_0x37a6a6['locale'],_0x4f19d7={'Compare\x20against\x20selected':ft(_0x390633,'Compare\x20against\x20selected'),'Name\x20this\x20revision':ft(_0x390633,'Name\x20this\x20revision'),'Restore\x20this\x20revision':ft(_0x390633,'Restore\x20this\x20revision')};return _0x526335['map'](_0x2669ef=>{const _0x3482f9=_0x4f19d7[_0x2669ef['name']];return _0x3482f9&&_0x3482f9!==_0x2669ef['name']&&(_0x2669ef['name']=_0x3482f9),_0x2669ef;});}(_0x3fe75e,_0x4c21f1),_0x2f0b91=new _0x1224a0();for(const _0x3319fa of _0x35fb47){const _0xfa8f4f={'type':'button','model':new rt({'label':_0x3319fa['name'],'class':_0x3319fa['class'],'withText':!0x0,'role':'menuitem','_action':_0x3319fa['action']})};_0xfa8f4f['model']['bind']('isEnabled')['to'](_0x3fe75e,'isActionsDropdownOpen',_0xa80d9a=>'function'!=typeof _0x3319fa['isEnabled']||(!_0xa80d9a||_0x3319fa['isEnabled'](_0x3fe75e))),_0x2f0b91['add'](_0xfa8f4f);}return _0x2f0b91;}(_0x2ec855,_0x6e7244);return _0x2ec855['bind']('isActionsDropdownOpen')['to'](_0x425b88,'isOpen'),_0x425b88['buttonView']['set']({'label':ft(_0x116b89,'Show\x20more\x20items'),'tooltip':!0x0,'tooltipPosition':'sw','icon':_0x2b6cdd}),_0x425b88['extendTemplate']({'attributes':{'class':['ck-revision-history-sidebar__revision__actions',_0x565ce2['if']('isActionsDropdownOpen','ck-on')]},'on':{'click':_0x565ce2['to'](_0x565168=>_0x565168['stopPropagation']())}}),_0x425b88['on']('execute',_0x2b01d7=>{_0x2ec855['isReady']&&'function'==typeof _0x2b01d7['source']['_action']&&_0x2b01d7['source']['_action'](_0x2ec855);}),ot(_0x425b88,_0x5a5a4e,{'role':'menu'}),_0x425b88['listenTo'](_0x2ec855,'change:isActionsDropdownOpen',(_0x3bba49,_0x31ab44,_0x2c1e2e)=>{if(_0x2c1e2e)for(const _0x5b3c0c of _0x425b88['listView']['items']){const _0x5ae243=_0x5b3c0c['children']['first'],_0x388969=_0x6e7244['find'](_0x2a4ea0=>_0x2a4ea0['action']===_0x5ae243['_action'])['isVisible'];_0x5b3c0c['isVisible']=void 0x0===_0x388969||_0x388969(_0x2ec855);}}),_0x425b88;}class RevisionView extends/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x20e358(_0xb27066){['id'];['revisionNameView'];['revisionActionsView'];['_revision'];['_requireRevisionName'];constructor(_0x158f59,_0x2386cd,_0x4420c5,_0x4ca5c8){super(_0x158f59);const _0x469784=this['bindTemplate'],_0x14d093=function(_0x2a4f7d,_0x446bbe){const _0x3cb07f=Array['from'](_0x446bbe['authors'])['filter'](_0x5608f4=>_0x5608f4!=_0x446bbe['creator']);return _0x446bbe['creator']&&_0x3cb07f['unshift'](_0x446bbe['creator']),_0x3cb07f['map'](_0x3ab468=>new RevisionAuthorView(_0x2a4f7d,_0x3ab468,_0x3ab468==_0x446bbe['creator']));}(_0x158f59,_0x2386cd);this['id']=_0x2386cd['id'],this['_revision']=_0x2386cd,this['_requireRevisionName']=_0x4ca5c8,this['bind']('name','createdAt')['to'](_0x2386cd),this['bind']('_createdAtFormatted')['to'](this,'createdAt',_0x3a10bf=>{return _0x22c23c=_0x158f59['uiLanguage'],(_0x5b803c=_0x3a10bf)['toLocaleDateString'](_0x22c23c,{'month':'long','day':'numeric'})+',\x20'+_0x5b803c['toLocaleTimeString'](_0x22c23c,{'hour':'numeric','minute':'numeric'});var _0x22c23c,_0x5b803c;}),this['set']('isSelected',!0x1),this['set']('isHighlighted',!0x1),this['set']('isActionsDropdownOpen',!0x1),this['set']('isReady',!0x1),this['set']('isEnabled',!0x1),this['revisionNameView']=new RevisionNameView(_0x158f59,_0x110003),this['revisionNameView']['fieldView']['extendTemplate']({'attributes':{'maxlength':'220'}}),this['revisionNameView']['fieldView']['bind']('value')['to'](this,'name',_0xad5987=>_0xad5987||this['_createdAtFormatted']),this['revisionNameView']['bind']('isEnabled')['to'](this,'isSelected',this,'isEnabled',(_0x5175be,_0x322043)=>_0x5175be&&_0x322043),this['revisionActionsView']=_0x4420c5&&_0x4420c5['length']?Rt(this,_0x4420c5):'',this['revisionActionsView']&&this['revisionActionsView']['bind']('isEnabled')['to'](this),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision-wrapper',_0x469784['if']('isConfirm','ck-revision-history-sidebar__revision-wrapper_confirmation_visible')]},'children':[{'tag':'div','attributes':{'class':['ck','ck-reset','ck-revision-history-sidebar__revision',_0x469784['if']('isEnabled','ck-disabled',_0x1156c6=>!_0x1156c6),_0x469784['if']('isSelected','ck-revision-history-sidebar__revision_selected'),_0x469784['if']('isHighlighted','ck-revision-history-sidebar__revision_highlighted'),_0x469784['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':_0x469784['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':_0x14d093}]},this['revisionActionsView']],'on':{'click':_0x469784['to'](_0x2a2d2f=>{_0x2a2d2f['srcElement']['closest']('.ck-confirm-view')||this['isReady']&&this['isEnabled']&&this['fire']('select',{'id':this['id']});})}}]});}['render'](){super['render']();const _0x4f1230=this['revisionNameView']['fieldView']['element'];this['listenTo'](_0x4f1230,'change',()=>{this['_requireRevisionName']&&!_0x4f1230['value']||this['fire']('setName',{'id':this['id'],'name':_0x4f1230['value']}),_0x4f1230['value']||(_0x4f1230['value']=this['name']?this['name']:this['_createdAtFormatted']);});}['select'](){this['isSelected']=!0x0;}['deselect'](){this['isSelected']=!0x1;}['highlight'](){this['isHighlighted']=!0x0;}['unhighlight'](){this['isHighlighted']=!0x1;}}function bt(_0x4eeb0b,_0x3915e7){const _0x1cd405=vt['fromJSDate'](_0x4eeb0b)['setLocale'](_0x3915e7),_0x5a3397=vt['local'](),_0x2e675e=_0x5a3397['minus']({'days':0x1})['startOf']('day');let _0x291152,_0x588c13;return _0x1cd405['hasSame'](_0x5a3397,'day')?(_0x291152=_0x1cd405['startOf']('day')['toJSDate'](),_0x588c13=_0x1cd405['toRelativeCalendar']()):_0x1cd405['hasSame'](_0x2e675e,'day')?(_0x291152=_0x2e675e['toJSDate'](),_0x588c13=_0x1cd405['toRelativeCalendar']()):_0x1cd405['hasSame'](_0x5a3397,'week')?(_0x291152=_0x1cd405['startOf']('week')['toJSDate'](),_0x588c13=_0x1cd405['weekdayLong']||''):_0x1cd405['hasSame'](_0x5a3397,'year')?(_0x291152=_0x1cd405['startOf']('month')['toJSDate'](),_0x588c13=_0x1cd405['monthLong']||''):(_0x291152=_0x1cd405['startOf']('year')['toJSDate'](),_0x588c13=String(_0x1cd405['year'])),{'startDate':_0x291152,'localizedPeriodName':_0x588c13};}class RevisionsSidebarTimePeriodView extends _0xb27066{['startDate'];['revisionViews'];['_revisionActions'];['_requireRevisionName'];constructor(_0x470715,_0xbe1584,_0xd1a956,_0x2e08b2){super(_0x470715);const _0x18ec10=bt(_0xbe1584,this['locale']['uiLanguage'])['localizedPeriodName'];this['startDate']=_0xbe1584,this['revisionViews']=this['createCollection'](),this['_revisionActions']=_0xd1a956,this['_requireRevisionName']=_0x2e08b2,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':_0x18ec10}]},{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__time-period__revisions']},'children':this['revisionViews']}]});}['addRevision'](_0x2ce0da){const _0xff2d3=new RevisionView(this['locale'],_0x2ce0da,this['_revisionActions'],this['_requireRevisionName']);this['revisionViews']['add'](_0xff2d3);}['removeRevision'](_0x41e318){const _0xc694af=this['revisionViews']['find'](_0xfb660b=>_0xfb660b['id']===_0x41e318['id']);this['revisionViews']['remove'](_0xc694af);}}class RevisionsSidebarHeaderView extends _0xb27066{constructor(_0x5d64e3){super(_0x5d64e3);const _0x92491d=new nt();_0x92491d['content']=_0x3e8fab,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset_all','ck-revision-history-sidebar__header']},'children':[_0x92491d,{'tag':'span','attributes':{'class':['ck','ck-revision-history-sidebar__header__label']},'children':[ft(_0x5d64e3,'Revision\x20history')]}]});}}class RevisionsSidebarView extends _0xb27066{['timePeriodViews'];['_revisions'];['_revisionActions'];['_requireRevisionName'];constructor(_0x1aa5f9,_0x3d49c9,_0x1fc9b0,_0x1c82ce){super(_0x1aa5f9);const _0x2bd4a2=this['bindTemplate'];this['timePeriodViews']=this['createCollection'](),this['timePeriodViews']['delegate']('select')['to'](this),this['timePeriodViews']['delegate']('setName')['to'](this),this['_revisions']=_0x3d49c9,this['_revisionActions']=_0x1fc9b0,this['_requireRevisionName']=_0x1c82ce,this['on']('select',(_0x501cf3,_0x23f9f0)=>{this['fire']('revisionSelected',_0x23f9f0);}),this['on']('setName',(_0x4e83b1,_0xd9a4e3)=>{this['fire']('revisionSetName',_0xd9a4e3);}),this['set']('isEnabled',!0x1),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-reset','ck-rounded-corners','ck-revision-history-sidebar']},'children':[new RevisionsSidebarHeaderView(_0x1aa5f9),{'tag':'div','attributes':{'class':['ck','ck-revision-history-sidebar__timeline',_0x2bd4a2['if']('isEnabled','ck-disabled',_0x412f55=>!_0x412f55)]},'children':this['timePeriodViews']}]});}['render'](){super['render']();for(const _0x166345 of this['_revisions'])this['_addRevision'](_0x166345);this['_revisions']['on']('add',(_0xcd993a,_0x2cd092)=>{this['_addRevision'](_0x2cd092);}),this['_revisions']['on']('remove',(_0x1bbf4b,_0x21d705)=>{this['_removeRevision'](_0x21d705);});}get['revisionViews'](){return this['timePeriodViews']['map'](_0x2885ac=>_0x2885ac['revisionViews']['map'](_0x1921d6=>_0x1921d6))['flat']();}['selectRevision'](_0x37e0b0){for(const _0x4d8efc of this['revisionViews'])_0x37e0b0&&_0x37e0b0['id']===_0x4d8efc['id']?_0x4d8efc['select']():_0x4d8efc['deselect']();}['highlightRevisions'](_0x5b4e4b){for(const _0x4ccc09 of this['revisionViews'])_0x5b4e4b['some'](({id:_0x1fb18d})=>_0x1fb18d===_0x4ccc09['id'])?_0x4ccc09['highlight']():_0x4ccc09['unhighlight']();}['_addRevision'](_0x4bc0d1){const _0x20dd28=bt(_0x4bc0d1['createdAt'],this['locale']['uiLanguage'])['startDate'];let _0x19b310=this['_getTimePeriodViewByStartDate'](_0x20dd28);_0x19b310||(_0x19b310=new RevisionsSidebarTimePeriodView(this['locale'],_0x20dd28,this['_revisionActions'],this['_requireRevisionName']),this['timePeriodViews']['add'](_0x19b310)),_0x19b310['addRevision'](_0x4bc0d1);}['_removeRevision'](_0x3d3a3d){const _0x4f2227=bt(_0x3d3a3d['createdAt'],this['locale']['uiLanguage'])['startDate'];this['_getTimePeriodViewByStartDate'](_0x4f2227)['removeRevision'](_0x3d3a3d);}['_getTimePeriodViewByStartDate'](_0x3bc3c2){return this['timePeriodViews']['find'](_0x573d08=>_0x573d08['startDate']['getTime']()===_0x3bc3c2['getTime']());}}class RevisionsSidebar extends _0x4c1791{['_revisionViewer'];['_revisionsRepository'];['_sidebarView'];static ['defaultRevisionActions']=/* #__PURE__ -- @preserve */
|
|
28
28
|
((()=>['compareAgainstSelected','restoreRevision','nameRevision'])());static ['availableRevisionActions']=/* #__PURE__ -- @preserve */
|
|
29
|
-
kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(
|
|
30
|
-
_0x443cf2(_0x2c191d){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x3c75d0,_0x3b04c4){super(_0x3b04c4),this['sourceElement']=_0x3c75d0,this['model']['document']['createRoot']();const _0x2c1442=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x2c1442);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x2707a3,_0x2926c4){const _0x1cf995=new this(_0x2707a3,_0x2926c4);return await _0x1cf995['initPlugins'](),await _0x1cf995['ui']['init'](_0x2707a3),await _0x1cf995['data']['init'](_0x1cf995['config']['get']('initialData')||''),_0x1cf995['fire']('ready'),_0x1cf995;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x18ed42{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x45366e){function _0x33097e(_0x55c7ed){return _0x55c7ed['map'](_0x5dcbdb=>String['fromCharCode'](_0x5dcbdb))['join']('');}super(_0x45366e),this['result']='end',_0x45366e[_0x33097e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x33097e([0x76,0x69,0x65,0x77])][_0x33097e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x33097e([0x61,0x75,0x74,0x6f]),_0x45366e[_0x33097e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x33097e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x33097e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x33097e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x33097e([0x6f,0x6b])});}}class RevisionHistory extends _0x18ed42{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x118676){if(super(_0x118676),!this['editor']['config']['get']('revisionHistory'))throw new _0x1f5a5b('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0xc3c8a5=>this['_showRevisionViewer']({..._0xc3c8a5,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x15aabe=>this['_closeRevisionViewer'](_0x15aabe)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x53aaef=>this['_restoreRevision'](_0x53aaef)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x423d8d){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x423d8d;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x56b804){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x56b804);}['getRevision'](_0x661238){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x661238);}['getRevisions'](_0x416205){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0x416205||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x42a0c5=this['editor'],_0x1ff72f=_0x554e49(_0x42a0c5,It),_0x4402ff=_0x42a0c5['plugins']['get']('RevisionTracker'),_0x3c2bd3=_0x42a0c5['plugins']['get'](_0x4c4887)['users'];return _0x1ff72f['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x1ff72f['lazyRoots'],(_0x1ff72f['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x18ed42{static get['requires'](){return[RevisionViewer,_0x4c4887];}['init'](){const _0x44f1ff=this['editor']['plugins']['get'](_0x4c4887);for(const _0x2bc809 of _0x3c2bd3)_0x2bc809['isAnonymous']||_0x44f1ff['getUser'](_0x2bc809['id'])||_0x44f1ff['addUser'](_0x2bc809);const _0x33be09=_0x4402ff['repository']['getRevisions']();let _0x1daa02=null;const _0x165344=this['editor']['plugins']['get']('RevisionViewer');_0x165344['adapter']=_0x4402ff['adapter'],_0x165344['bind']('isEnabled')['to'](_0x4402ff),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x42a0c5,'isReadOnly',_0x3ff5d7=>!_0x3ff5d7);for(const _0x26d11f of _0x33be09){const _0x273944=null===_0x26d11f['creator'];if(_0x273944&&_0x26d11f['toVersion']===_0x26d11f['fromVersion'])continue;const _0x49a8d1=_0x26d11f['toJSON']();_0x165344['addRevisionData'](_0x49a8d1,(_0x3886c6,_0x46fad3,_0x31d52c)=>{if(_0x273944){if(_0x1daa02)_0x1daa02['_update'](_0x3886c6,_0x46fad3);else{if(!_0x46fad3){const _0x3f500d=_0x31d52c['toJSON']();_0x3f500d['id']=_0x55087c(),_0x4402ff['saveRevision'](_0x3f500d,_0x31d52c['toVersion'])['then'](_0x41115c=>{_0x1daa02=_0x41115c;});}}}else _0x26d11f['_update'](_0x3886c6,_0x46fad3);});}}},RevisionsSidebar),_0x1ff72f);}['_enhanceShowRevisionViewerCallback'](){const _0xf28c12=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x3fd3c1=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x447f07=this['editor']['plugins']['get']('Autosave');await _0x447f07['save']();}else await _0x3fd3c1['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x5d268d=this['editor']['plugins']['get']('Dialog');_0x5d268d['isOpen']&&_0x5d268d['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x3587aa=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x4b4676 of _0x3587aa)_0x4b4676['class']=_0x4b4676['class']?_0x4b4676['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x11b976=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x11b976&&_0x11b976['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0xcd86ab=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0xcd86ab&&_0xcd86ab['setAttribute']('tabindex','-1');}}const _0x38aa35=this['_getRevisionViewerEditorConfig']();return _0xf28c12(_0x38aa35)['then'](_0x281268=>{return(this['_viewerEditor']=_0x281268,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x281268);})['catch'](_0x320d6c=>(console['error'](_0x320d6c),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x3be552=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x21ec5e=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x197d52 of _0x21ec5e)_0x197d52['class']='ck-tab-panel_disabled'===_0x197d52['class']?'':_0x197d52['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x1ae869=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x1ae869&&_0x1ae869['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x425dd1=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x425dd1&&_0x425dd1['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x3be552(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x177062=this['editor']['plugins']['get']('Annotations');_0x177062['refreshVisibility'](),_0x177062['refreshPositioning']();}});});}['_showRevisionViewer'](_0x7ebf95){const _0x595a90=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x581840=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x455657=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x455657,_0x7ebf95)['then'](_0x1e793f=>(_0x581840['style']['display']='block',_0x595a90['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x1e793f));}['_closeRevisionViewer'](_0x497eae){const _0x40ec84=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x40ec84['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x497eae['destroy']();}async['_restoreRevision'](_0x11dd94){const _0x48ad1e=this['editor'],_0x2eba80=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0xf1e945=_0x48ad1e['plugins']['get']('RevisionTracker'),_0xabc710=_0x48ad1e['plugins']['get']('RevisionHistoryUtils'),_0x8ded6b=_0x2eba80['repository']['getRevision'](_0x11dd94);let _0x1d598c,_0x180891,_0x550707;try{await _0xabc710['loadRevisionData'](_0x8ded6b,this['adapter']),_0x1d598c=_0xabc710['getRevisionDocumentData'](_0x8ded6b),_0x180891=_0xabc710['getRevisionRootsAttributes'](_0x8ded6b);}catch(_0x25def1){return void console['error'](_0x25def1);}_0x48ad1e['model']['change'](_0x5aed60=>{for(const _0x4ae39d of Array['from'](_0x48ad1e['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5aed60['removeMarker'](_0x4ae39d);}),_0x2eba80['isReady']=!0x1,_0x48ad1e['model']['enqueueChange'](_0x147cc1=>{_0x147cc1['setSelection'](null),_0x147cc1['removeSelectionAttribute'](_0x48ad1e['model']['document']['selection']['getAttributeKeys']());const _0x578b00=Object['keys'](_0x1d598c);for(const _0x67aa00 of _0x48ad1e['model']['document']['roots'])'$graveyard'!=_0x67aa00['rootName']&&_0x67aa00['isAttached']()&&!_0x578b00['includes'](_0x67aa00['rootName'])&&_0x147cc1['detachRoot'](_0x67aa00);for(const _0xad344e of _0x578b00){let _0x4f4afb=_0x48ad1e['model']['document']['getRoot'](_0xad344e);if(!_0x4f4afb||!_0x4f4afb['isAttached']()){const _0x3ca181=_0x8ded6b['diffData']?.[_0xad344e]?.['rootElementName']||'$root';_0x4f4afb=_0x147cc1['addRoot'](_0xad344e,_0x3ca181);}const _0x3fe02f=_0x180891[_0xad344e],_0x43cf0a=Object['keys'](_0x3fe02f),_0x21351d=_0x1d598c[_0xad344e];for(const _0xa1e2c3 of _0x4f4afb['getAttributeKeys']())_0x43cf0a['includes'](_0xa1e2c3)||_0x147cc1['removeAttribute'](_0xa1e2c3,_0x4f4afb);for(const _0x475ba0 of _0x43cf0a)_0x147cc1['setAttribute'](_0x475ba0,_0x180891[_0xad344e][_0x475ba0],_0x4f4afb);_0x147cc1['remove'](_0x147cc1['createRangeIn'](_0x4f4afb)),_0x147cc1['insert'](_0x48ad1e['data']['parse'](_0x21351d,_0x4f4afb),_0x4f4afb,0x0);}});const _0x4e0e41=ft(_0x48ad1e['locale'],'Restored');if(_0x8ded6b['name'])_0x550707=-0x1==_0x8ded6b['name']['indexOf'](_0x4e0e41)?_0x4e0e41+':\x20'+_0x8ded6b['name']:_0x8ded6b['name'];else _0x550707=_0x4e0e41+':\x20'+(_0x8ded6b['createdAt']['toLocaleDateString'](_0x48ad1e['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x8ded6b['createdAt']['toLocaleTimeString'](_0x48ad1e['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0xf1e945['saveRevision']({'name':_0x550707}),_0x2eba80['isReady']=!0x0,_0x48ad1e['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
|
|
29
|
+
kt();static get['pluginName'](){return'RevisionsSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionViewer];}constructor(_0x123b54){super(_0x123b54),this['_revisionViewer']=_0x123b54['plugins']['get'](RevisionViewer),this['_revisionsRepository']=this['_revisionViewer']['repository'],this['_sidebarView']=null;}['init'](){const _0x1dbe9a=this['_revisionsRepository']['_revisions'],_0x42081e=this['_createRevisionActions'](),_0x1d0974=this['editor']['config']['get']('revisionHistory.viewerSidebarContainer');this['_sidebarView']=new RevisionsSidebarView(this['editor']['locale'],_0x1dbe9a,_0x42081e,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',(_0x322985,_0xbf876)=>{_0xbf876['revisionViews']['on']('add',(_0x2f134c,_0x107b11)=>{_0x107b11['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)),_0x1d0974['appendChild'](this['_sidebarView']['element']);}['destroy'](){this['_sidebarView']['element']['remove'](),this['_sidebarView']['destroy']();}['_handleEditorDataReady'](){const _0x112334=this['_revisionsRepository']['getRevision'](0x0);if(_0x112334){const _0x2ab9da=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x112334['id']);this['_revisionViewer']['compare'](_0x112334,_0x2ab9da);}}['_handleRevisionSelected'](_0x3f010,_0x42f6e7){const _0x95f22f=this['_revisionsRepository']['getRevision'](_0x42f6e7['id']),_0x4b98d8=this['_revisionsRepository']['getEarlierVisibleRevision'](_0x95f22f['id']);this['_revisionViewer']['compare'](_0x95f22f,_0x4b98d8);}['_handleRevisionSetName'](_0x2fbe23,_0x56ae4c){this['_revisionsRepository']['getRevision'](_0x56ae4c['id'])['setName'](_0x56ae4c['name']);}['_handleDiffChange'](_0x5a7aee,_0x1b648e,_0x23e7ba){const _0x1415d5=this['_revisionsRepository']['getRevisionsInDiff'](_0x23e7ba);_0x1415d5['length']>0x2?(this['_sidebarView']['highlightRevisions'](_0x1415d5),this['_sidebarView']['selectRevision'](null)):(this['_sidebarView']['highlightRevisions']([]),this['_sidebarView']['selectRevision'](_0x1415d5[0x0]));}['_createRevisionActions'](){const _0x537507=this['editor'],_0xa0e41a=RevisionsSidebar['availableRevisionActions'],_0x19a92e=_0x537507['config']['get']('revisionHistory.revisionActions')||RevisionsSidebar['defaultRevisionActions'];if(_0x19a92e['length'])return _0x19a92e['map'](_0x245aee=>{const _0xc74ebf='string'==typeof _0x245aee?Object['assign']({},_0xa0e41a[_0x245aee]):_0x245aee;return _0xc74ebf['action']=_0xc74ebf['action']['bind'](this,_0x537507),_0xc74ebf['isVisible']&&(_0xc74ebf['isVisible']=_0xc74ebf['isVisible']['bind'](this,_0x537507)),_0xc74ebf;});}}function kt(){return{'compareAgainstSelected':{'name':'Compare\x20against\x20selected','action':({plugins:_0x167a35},_0x3f4947)=>{const _0x130aba=_0x167a35['get'](RevisionViewer),_0x3ee0fc=_0x130aba['repository'];let _0xa0f5c7=_0x130aba['diff']['newRevisionId'],_0x3abff7=_0x3f4947['id'];_0x3ee0fc['getIndex'](_0xa0f5c7)>_0x3ee0fc['getIndex'](_0x3abff7)&&([_0xa0f5c7,_0x3abff7]=[_0x3abff7,_0xa0f5c7]),_0x130aba['compare'](_0xa0f5c7,_0x3abff7);},'isVisible':({plugins:_0x140d64},_0x524f29)=>{const _0x488cb2=_0x140d64['get'](RevisionViewer);return!(_0x488cb2['repository']['getRevisionsInDiff'](_0x488cb2['diff'])['length']>0x2)&&!_0x524f29['isSelected'];}},'restoreRevision':{'name':'Restore\x20this\x20revision','action':(_0x12a41a,{id:_0x4ea981})=>{_0x12a41a['config']['get']('revisionHistory')['restoreRevisionCallback'](_0x4ea981);},'isVisible':({plugins:_0x34bfca},_0x77480f)=>!!_0x34bfca['get'](RevisionViewer)['repository']['getLaterVisibleRevision'](_0x77480f['id'])},'nameRevision':{'name':'Name\x20this\x20revision','action':({plugins:_0x4bbd88},{id:_0x32a386,revisionNameView:_0x57e199})=>{const _0x1a8ef3=_0x4bbd88['get'](RevisionViewer),_0x11318a=_0x1a8ef3['repository']['getEarlierVisibleRevision'](_0x32a386);_0x1a8ef3['compare'](_0x32a386,_0x11318a),_0x57e199['focus'](),_0x57e199['fieldView']['select']();}}};}class RevisionViewerEditorUI extends at{['_view'];['_toolbarConfig'];['_elementReplacer'];get['view'](){return this['_view'];}constructor(_0x1f5e2a,_0x24eb67){super(_0x1f5e2a),this['_view']=_0x24eb67,this['_toolbarConfig']=ht(_0x1f5e2a['config']['get']('toolbar')),this['_elementReplacer']=new _0x1e439a();}get['element'](){return this['view']['element'];}['init'](_0x5aaf0a){const _0x310d1d=this['editor'],_0x787ab6=this['view'],_0x581a82=_0x310d1d['editing']['view'],_0x5c13a2=_0x787ab6['editable'],_0x1ccb6e=_0x581a82['document']['getRoot']();_0x5c13a2['name']=_0x1ccb6e['rootName'],_0x787ab6['render']();const _0x67a23e=_0x5c13a2['element'];this['setEditableElement'](_0x5c13a2['name'],_0x67a23e),_0x787ab6['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x581a82['attachDomRoot'](_0x67a23e),this['_elementReplacer']['replace'](_0x5aaf0a,this['element']),this['_initToolbar'](),this['fire']('ready');}['destroy'](){super['destroy']();const _0x27797a=this['view'],_0x517361=this['editor']['editing']['view'];this['_elementReplacer']['restore'](),_0x517361['detachDomRoot'](_0x27797a['editable']['name']),_0x27797a['destroy']();}['_initToolbar'](){const _0x2960b7=this['view'];_0x2960b7['stickyPanel']['bind']('isActive')['to'](this['focusTracker'],'isFocused'),_0x2960b7['stickyPanel']['limiterElement']=_0x2960b7['element'],_0x2960b7['stickyPanel']['bind']('viewportTopOffset')['to'](this,'viewportOffset',({top:_0x3a028c})=>_0x3a028c),_0x2960b7['toolbar']['fillFromConfig'](this['_toolbarConfig'],this['componentFactory']),this['addToolbar'](_0x2960b7['toolbar']);}}class RevisionViewerEditorUIView extends ct{['_editable'];['stickyPanel'];['toolbar'];get['editable'](){return this['_editable'];}constructor(_0x554e29,_0x51f844,_0x3459f3={}){super(_0x554e29),this['stickyPanel']=new lt(_0x554e29),this['toolbar']=new ut(_0x554e29,{'shouldGroupWhenFull':_0x3459f3['shouldToolbarGroupWhenFull']}),this['_editable']=new dt(_0x554e29,_0x51f844);}['render'](){super['render'](),this['stickyPanel']['content']['add'](this['toolbar']),this['top']['add'](this['stickyPanel']),this['main']['add'](this['editable']);}}class RevisionViewerEditor extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x56a52b(_0x6aac53){['_ui'];get['ui'](){return this['_ui'];}constructor(_0x430863,_0x4fa3f7){super(_0x4fa3f7),this['sourceElement']=_0x430863,this['model']['document']['createRoot']();const _0x294859=new RevisionViewerEditorUIView(this['locale'],this['editing']['view'],{'shouldToolbarGroupWhenFull':!0x0});this['_ui']=new RevisionViewerEditorUI(this,_0x294859);}['destroy'](){return this['updateSourceElement'](),this['ui']['destroy'](),super['destroy']();}static async['create'](_0x24597c,_0x1beaaf){const _0x3996bf=new this(_0x24597c,_0x1beaaf);return await _0x3996bf['initPlugins'](),await _0x3996bf['ui']['init'](_0x24597c),await _0x3996bf['data']['init'](_0x3996bf['config']['get']('initialData')||''),_0x3996bf['fire']('ready'),_0x3996bf;}}const It=['RevisionHistoryUI','RestrictedEditingMode','AIChat','AIReviewMode','AIBalloon','AIQuickActions','AIActions','AIChatShortcuts','AITranslate'];class RevisionViewerIntegration extends _0x4c1791{['result'];static get['pluginName'](){return'RevisionViewerIntegration';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x118be4){function _0x58617c(_0x3c7d96){return _0x3c7d96['map'](_0x5ca131=>String['fromCharCode'](_0x5ca131))['join']('');}super(_0x118be4),this['result']='end',_0x118be4[_0x58617c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x58617c([0x76,0x69,0x65,0x77])][_0x58617c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x58617c([0x61,0x75,0x74,0x6f]),_0x118be4[_0x58617c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x58617c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x58617c([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x58617c([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x58617c([0x6f,0x6b])});}}class RevisionHistory extends _0x4c1791{['_viewerEditor'];static get['pluginName'](){return'RevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[RevisionTracker,RevisionHistoryUI];}constructor(_0x331291){if(super(_0x331291),!this['editor']['config']['get']('revisionHistory'))throw new _0x3684f0('revision-history-missing-configuration',this);this['_viewerEditor']=null,this['set']('isRevisionViewerOpen',!0x1),this['editor']['config']['define']('revisionHistory.showRevisionViewerCallback',_0x356364=>this['_showRevisionViewer']({..._0x356364,'translations':this['editor']['locale']['translations']})),this['editor']['config']['define']('revisionHistory.closeRevisionViewerCallback',_0x573149=>this['_closeRevisionViewer'](_0x573149)),this['editor']['config']['define']('revisionHistory.restoreRevisionCallback',_0x1958aa=>this['_restoreRevision'](_0x1958aa)),this['editor']['config']['define']('revisionHistory.requireRevisionName',!0x1),this['_enhanceShowRevisionViewerCallback'](),this['_enhanceCloseRevisionViewerCallback']();}set['adapter'](_0x14de42){this['editor']['plugins']['get']('RevisionTracker')['adapter']=_0x14de42;}get['adapter'](){return this['editor']['plugins']['get']('RevisionTracker')['adapter'];}['addRevisionData'](_0x19d833){return this['editor']['plugins']['get']('RevisionTracker')['addRevisionData'](_0x19d833);}['getRevision'](_0x3e376c){return this['editor']['plugins']['get']('RevisionsRepository')['getRevision'](_0x3e376c);}['getRevisions'](_0xe1cad0){return this['editor']['plugins']['get']('RevisionsRepository')['getRevisions'](_0xe1cad0||{'toJSON':!0x1});}['_getRevisionViewerEditorConfig'](){const _0x351cb2=this['editor'],_0x404193=_0x505333(_0x351cb2,It),_0x1f38a2=_0x351cb2['plugins']['get']('RevisionTracker'),_0x320195=_0x351cb2['plugins']['get'](_0x48a34e)['users'];return _0x404193['toolbar']=['exitToEditing','restoreRevision','changesNavigation'],delete _0x404193['lazyRoots'],(_0x404193['plugins']['push'](RevisionViewerIntegration,RevisionViewer,RevisionViewerUI,class RevisionViewerInit extends _0x4c1791{static get['requires'](){return[RevisionViewer,_0x48a34e];}['init'](){const _0x4510d7=this['editor']['plugins']['get'](_0x48a34e);for(const _0x26feef of _0x320195)_0x26feef['isAnonymous']||_0x4510d7['getUser'](_0x26feef['id'])||_0x4510d7['addUser'](_0x26feef);const _0xbbe26d=_0x1f38a2['repository']['getRevisions']();let _0x30da85=null;const _0x52e974=this['editor']['plugins']['get']('RevisionViewer');_0x52e974['adapter']=_0x1f38a2['adapter'],_0x52e974['bind']('isEnabled')['to'](_0x1f38a2),this['editor']['commands']['get']('restoreRevision')['bind']('isEnabled')['to'](_0x351cb2,'isReadOnly',_0x1bfd69=>!_0x1bfd69);for(const _0xce74f8 of _0xbbe26d){const _0x5d8d3a=null===_0xce74f8['creator'];if(_0x5d8d3a&&_0xce74f8['toVersion']===_0xce74f8['fromVersion'])continue;const _0x3c99ed=_0xce74f8['toJSON']();_0x52e974['addRevisionData'](_0x3c99ed,(_0x2b7e41,_0x4f1dcf,_0x2a082c)=>{if(_0x5d8d3a){if(_0x30da85)_0x30da85['_update'](_0x2b7e41,_0x4f1dcf);else{if(!_0x4f1dcf){const _0x15aa0c=_0x2a082c['toJSON']();_0x15aa0c['id']=_0x2d6fd8(),_0x1f38a2['saveRevision'](_0x15aa0c,_0x2a082c['toVersion'])['then'](_0x146bf1=>{_0x30da85=_0x146bf1;});}}}else _0xce74f8['_update'](_0x2b7e41,_0x4f1dcf);});}}},RevisionsSidebar),_0x404193);}['_enhanceShowRevisionViewerCallback'](){const _0x5cf093=this['editor']['config']['get']('revisionHistory')['showRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.showRevisionViewerCallback',async()=>{this['editor']['enableReadOnlyMode']('revision-history-viewer-opened');const _0x48db78=this['editor']['plugins']['get']('RevisionTracker');if(this['editor']['plugins']['has']('Autosave')){const _0x4ed889=this['editor']['plugins']['get']('Autosave');await _0x4ed889['save']();}else await _0x48db78['update']();if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('Dialog')){const _0x16ed47=this['editor']['plugins']['get']('Dialog');_0x16ed47['isOpen']&&_0x16ed47['hide']();}if(this['editor']['plugins']['has']('AITabs')){const _0x5bc464=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x514c6a of _0x5bc464)_0x514c6a['class']=_0x514c6a['class']?_0x514c6a['class']+'\x20ck-tab-panel_disabled':'ck-tab-panel_disabled';if(this['editor']['plugins']['has']('AIChat')){const _0x20ce0d=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x20ce0d&&_0x20ce0d['setAttribute']('tabindex','-1');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x18202f=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x18202f&&_0x18202f['setAttribute']('tabindex','-1');}}const _0x2dd13f=this['_getRevisionViewerEditorConfig']();return _0x5cf093(_0x2dd13f)['then'](_0x17aeef=>{return(this['_viewerEditor']=_0x17aeef,this['editor']['plugins']['has']('Annotations'))&&this['editor']['plugins']['get']('Annotations')['refreshVisibility'](),(this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']='none'),_0x17aeef);})['catch'](_0x2ec643=>(console['error'](_0x2ec643),this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),null));});}['_enhanceCloseRevisionViewerCallback'](){const _0x481898=this['editor']['config']['get']('revisionHistory')['closeRevisionViewerCallback'];this['editor']['config']['set']('revisionHistory.closeRevisionViewerCallback',()=>{if(this['editor']['plugins']['has']('PaginationLookup')&&this['editor']['plugins']['get']('PaginationLookup')['_recalculatePageBreaks'](),this['editor']['plugins']['has']('DocumentOutline')&&(this['editor']['plugins']['get']('DocumentOutlineUI')['view']['element']['style']['display']=''),this['editor']['plugins']['has']('AITabs')){const _0x358fe8=this['editor']['plugins']['get']('AITabs')['view']['panelViews'];for(const _0x5f211a of _0x358fe8)_0x5f211a['class']='ck-tab-panel_disabled'===_0x5f211a['class']?'':_0x5f211a['class']['replace']('\x20ck-tab-panel_disabled','');if(this['editor']['plugins']['has']('AIChat')){const _0x172839=document['querySelector']('.ck-ai-chat__prompt-input\x20.ck-textarea');_0x172839&&_0x172839['removeAttribute']('tabindex');}if(this['editor']['plugins']['has']('AIChatHistory')){const _0x458696=document['querySelector']('.ck-ai-chat-history\x20.ck-input');_0x458696&&_0x458696['removeAttribute']('tabindex');}}return this['_viewerEditor']['plugins']['get']('RevisionViewer')['_cleanUp'](),_0x481898(this['_viewerEditor'])['then'](()=>{if(this['editor']['disableReadOnlyMode']('revision-history-viewer-opened'),this['_viewerEditor']=null,this['editor']['plugins']['has']('Annotations')){const _0x53e059=this['editor']['plugins']['get']('Annotations');_0x53e059['refreshVisibility'](),_0x53e059['refreshPositioning']();}});});}['_showRevisionViewer'](_0x41a5df){const _0x173308=this['editor']['config']['get']('revisionHistory.editorContainer'),_0x574e5f=this['editor']['config']['get']('revisionHistory.viewerContainer'),_0x22f0ce=this['editor']['config']['get']('revisionHistory.viewerEditorElement');return RevisionViewerEditor['create'](_0x22f0ce,_0x41a5df)['then'](_0x597980=>(_0x574e5f['style']['display']='block',_0x173308['style']['display']='none',this['isRevisionViewerOpen']=!0x0,_0x597980));}['_closeRevisionViewer'](_0x29c03c){const _0x2a1ec9=this['editor']['config']['get']('revisionHistory.editorContainer');return this['editor']['config']['get']('revisionHistory.viewerContainer')['style']['display']='none',_0x2a1ec9['style']['display']='',this['isRevisionViewerOpen']=!0x1,_0x29c03c['destroy']();}async['_restoreRevision'](_0x246f2a){const _0x4fac05=this['editor'],_0x5151ca=this['_viewerEditor']['plugins']['get']('RevisionViewer'),_0x471e0f=_0x4fac05['plugins']['get']('RevisionTracker'),_0x2c4355=_0x4fac05['plugins']['get']('RevisionHistoryUtils'),_0x536061=_0x5151ca['repository']['getRevision'](_0x246f2a);let _0x371744,_0x41944d,_0x35480b;try{await _0x2c4355['loadRevisionData'](_0x536061,this['adapter']),_0x371744=_0x2c4355['getRevisionDocumentData'](_0x536061),_0x41944d=_0x2c4355['getRevisionRootsAttributes'](_0x536061);}catch(_0x4efd2d){return void console['error'](_0x4efd2d);}_0x4fac05['model']['change'](_0x5b542e=>{for(const _0x7f24ee of Array['from'](_0x4fac05['model']['markers']['getMarkersGroup']('restrictedEditingException')))_0x5b542e['removeMarker'](_0x7f24ee);}),_0x5151ca['isReady']=!0x1,_0x4fac05['model']['enqueueChange'](_0x2cbf47=>{_0x2cbf47['setSelection'](null),_0x2cbf47['removeSelectionAttribute'](_0x4fac05['model']['document']['selection']['getAttributeKeys']());const _0x1c2c1c=Object['keys'](_0x371744);for(const _0x245f55 of _0x4fac05['model']['document']['roots'])'$graveyard'!=_0x245f55['rootName']&&_0x245f55['isAttached']()&&!_0x1c2c1c['includes'](_0x245f55['rootName'])&&_0x2cbf47['detachRoot'](_0x245f55);for(const _0x6fe4a5 of _0x1c2c1c){let _0x338207=_0x4fac05['model']['document']['getRoot'](_0x6fe4a5);if(!_0x338207||!_0x338207['isAttached']()){const _0x5dfa25=_0x536061['diffData']?.[_0x6fe4a5]?.['rootElementName']||'$root';_0x338207=_0x2cbf47['addRoot'](_0x6fe4a5,_0x5dfa25);}const _0x409623=_0x41944d[_0x6fe4a5],_0x4f0ffb=Object['keys'](_0x409623),_0x3a56d7=_0x371744[_0x6fe4a5];for(const _0xf67af3 of _0x338207['getAttributeKeys']())_0x4f0ffb['includes'](_0xf67af3)||_0x2cbf47['removeAttribute'](_0xf67af3,_0x338207);for(const _0x1b4f9f of _0x4f0ffb)_0x2cbf47['setAttribute'](_0x1b4f9f,_0x41944d[_0x6fe4a5][_0x1b4f9f],_0x338207);_0x2cbf47['remove'](_0x2cbf47['createRangeIn'](_0x338207)),_0x2cbf47['insert'](_0x4fac05['data']['parse'](_0x3a56d7,_0x338207),_0x338207,0x0);}});const _0x41b83f=ft(_0x4fac05['locale'],'Restored');if(_0x536061['name'])_0x35480b=-0x1==_0x536061['name']['indexOf'](_0x41b83f)?_0x41b83f+':\x20'+_0x536061['name']:_0x536061['name'];else _0x35480b=_0x41b83f+':\x20'+(_0x536061['createdAt']['toLocaleDateString'](_0x4fac05['locale']['uiLanguage'],{'month':'long','day':'numeric'})+',\x20'+_0x536061['createdAt']['toLocaleTimeString'](_0x4fac05['locale']['uiLanguage'],{'hour':'numeric','minute':'numeric'}));return await _0x471e0f['saveRevision']({'name':_0x35480b}),_0x5151ca['isReady']=!0x0,_0x4fac05['config']['get']('revisionHistory')['closeRevisionViewerCallback']();}}export{RestoreRevisionCommand,Revision,RevisionHistory,RevisionHistoryUI,RevisionHistoryUtils,RevisionTracker,RevisionViewer,RevisionViewerEditor,RevisionViewerIntegration,RevisionViewerLoadingOverlay,RevisionViewerUI,RevisionsRepository,RevisionsSidebar,ShowChangeCommand};
|